apt-mcp-agent-setup 3.5.25 → 3.5.31
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/bin/cli.js +1 -1
- package/build-input.json +68 -43
- package/bundle/NOTICES.md +0 -0
- package/bundle/core.enc +0 -0
- package/bundle/mcp-rules.enc +0 -0
- package/bundle/skills-aso.enc +0 -0
- package/bundle/skills-ba.enc +0 -0
- package/bundle/skills-base.enc +0 -0
- package/bundle/skills-be.enc +0 -0
- package/bundle/skills-design.enc +0 -0
- package/bundle/skills-fe.enc +0 -0
- package/bundle/skills-marketing.enc +0 -0
- package/bundle/skills-mobile.enc +0 -0
- package/bundle/skills-pm.enc +0 -0
- package/integrity-manifest.json +163 -159
- package/package.json +1 -1
- package/src/backends/browser-tools.js +1 -1
- package/src/backends/index-cache-authority.js +1 -1
- package/src/backends/index-command.js +1 -1
- package/src/backends/index-maintenance.js +1 -1
- package/src/backends/index-store.js +1 -1
- package/src/backends/profiles.js +1 -1
- package/src/backends/review_graph.py +65 -0
- package/src/backends/source-discovery.js +1 -1
- package/src/core/admission-fence.js +1 -1
- package/src/core/aso-import.js +1 -1
- package/src/core/backend-lease-recovery.js +1 -1
- package/src/core/boot-evidence.js +1 -1
- package/src/core/caller-context.js +1 -1
- package/src/core/catalog.js +1 -1
- package/src/core/claude-caller-authority.js +1 -1
- package/src/core/claude-invocation.js +1 -1
- package/src/core/claude-launch-recovery.js +1 -1
- package/src/core/claude-native.js +1 -1
- package/src/core/claude-plan.js +1 -1
- package/src/core/claude-transcript-scan.js +1 -1
- package/src/core/claude-worker-transcript.js +1 -1
- package/src/core/codex-host-metadata.js +1 -1
- package/src/core/codex-transcript-receipt.js +1 -1
- package/src/core/connection-inspector.js +1 -1
- package/src/core/content-hash-cache.js +1 -0
- package/src/core/context-metrics.js +1 -1
- package/src/core/doctor.js +1 -1
- package/src/core/draining-completion.js +1 -1
- package/src/core/execution.js +1 -1
- package/src/core/git-context.js +1 -1
- package/src/core/hook-bridge.js +1 -1
- package/src/core/hook-diagnostics.js +1 -1
- package/src/core/hook-lease.js +1 -1
- package/src/core/host-adapters.js +1 -1
- package/src/core/interrupted-boot-transport-proof.js +1 -1
- package/src/core/interrupted-natural-closure-proof.js +1 -1
- package/src/core/interrupted-operation-audit.js +1 -1
- package/src/core/interrupted-transport-proof.js +1 -1
- package/src/core/ipc-envelope.js +1 -1
- package/src/core/legacy-retirement-proof.js +1 -1
- package/src/core/memory-scope.js +1 -1
- package/src/core/memory-store.js +1 -1
- package/src/core/model-inventory.js +1 -1
- package/src/core/model-routing.js +1 -1
- package/src/core/native-dispatch.js +1 -1
- package/src/core/native-receipt.js +1 -1
- package/src/core/native-retirement.js +1 -1
- package/src/core/node-version.js +1 -1
- package/src/core/npm-cli.js +1 -1
- package/src/core/owned-command-child.js +1 -1
- package/src/core/owned-command.js +1 -1
- package/src/core/owned-lock.js +1 -1
- package/src/core/owned-process.js +1 -1
- package/src/core/pipeline-journal.js +1 -1
- package/src/core/presentations.js +1 -1
- package/src/core/quality-artifacts.js +1 -1
- package/src/core/quality.js +1 -1
- package/src/core/read-command.js +1 -1
- package/src/core/readonly-skill.js +1 -1
- package/src/core/recovery-archive.js +1 -1
- package/src/core/recovery-proof.js +1 -1
- package/src/core/resource-transaction.js +1 -1
- package/src/core/run-checkpoint.js +1 -1
- package/src/core/run-compatibility.js +1 -1
- package/src/core/run-state-codec.js +1 -1
- package/src/core/runtime-authority.js +1 -1
- package/src/core/runtime-info.js +1 -1
- package/src/core/runtime-ownership.js +1 -1
- package/src/core/session.js +1 -1
- package/src/core/shared-checkout.js +1 -0
- package/src/core/skill-companions.js +1 -1
- package/src/core/skill-names.js +1 -1
- package/src/core/storage-retry.js +1 -1
- package/src/core/tool-contracts.js +1 -1
- package/src/core/update-control.js +1 -1
- package/src/core/upgrade-runs.js +1 -1
- package/src/core/upgrade-stop.js +1 -1
- package/src/core/windows-job.js +1 -1
- package/src/core/workflow-policy.js +1 -1
- package/src/core/workspace-generation.js +1 -1
- package/src/core/workspace-path.js +1 -1
- package/src/installer/bounded-command.js +1 -1
- package/src/installer/candidate-preflight.js +1 -1
- package/src/installer/claude-commands.js +1 -1
- package/src/installer/connection-activation.js +1 -1
- package/src/installer/connection-supervisor.js +1 -1
- package/src/installer/deployment-draft.js +1 -1
- package/src/installer/gateway-context.js +1 -1
- package/src/installer/gateway-migration.js +1 -1
- package/src/installer/gateway-runtime.js +1 -1
- package/src/installer/global-setup.js +1 -1
- package/src/installer/hook-context-client.js +1 -1
- package/src/installer/hook-dispatcher.js +179 -141
- package/src/installer/host-hooks.js +1 -1
- package/src/installer/index-interruption-recovery.js +1 -1
- package/src/installer/index-recovery.js +1 -1
- package/src/installer/install-intent.js +1 -1
- package/src/installer/interrupted-operation-recovery.js +1 -1
- package/src/installer/legacy-prepared-plan.js +1 -1
- package/src/installer/legacy-registration.js +1 -1
- package/src/installer/managed-config.js +1 -1
- package/src/installer/migration-scope.js +1 -1
- package/src/installer/platform-config.js +1 -1
- package/src/installer/prerequisites.js +1 -1
- package/src/installer/presentations.js +1 -1
- package/src/installer/project-outcome.js +1 -1
- package/src/installer/project-setup.js +1 -1
- package/src/installer/recovery-backup-retention.js +1 -0
- package/src/installer/registration-closure.js +1 -1
- package/src/installer/registration-plan.js +1 -1
- package/src/installer/registration-receipt.js +1 -1
- package/src/installer/registrations.js +1 -1
- package/src/installer/runtime-activation.js +1 -1
- package/src/installer/runtime-child.js +1 -1
- package/src/installer/runtime-cleanup.js +1 -1
- package/src/installer/runtime-lock.js +1 -1
- package/src/installer/runtime-store.js +1 -1
- package/src/installer/runtime-supervisor.js +1 -1
- package/src/installer/setup-wizard.js +1 -1
- package/src/installer/stale-run-release.js +1 -1
- package/src/installer/update-addons.js +1 -1
- package/src/installer/update-cleanup.js +1 -1
- package/src/installer/update-executor.js +1 -1
- package/src/installer/update-history.js +1 -1
- package/src/installer/update-registration.js +1 -1
- package/src/installer/update-report.js +1 -0
- package/src/installer/update-request.js +1 -1
- package/src/installer/update-scope.js +1 -1
- package/src/installer/workspace-registry.js +1 -1
- package/src/installer/workspace-transaction.js +1 -1
- package/src/installer/workspace-update.js +1 -1
- package/src/license/crypto.js +1 -1
- package/src/license/fingerprint.js +1 -1
- package/src/license/terms.js +1 -1
- package/src/license/verify.js +1 -1
- package/src/presets/index.js +1 -1
- package/src/proxy/backends.js +1 -1
- package/src/proxy/browser-sessions.js +1 -1
- package/src/proxy/core-tools.js +1 -1
- package/src/proxy/pipeline.js +1 -1
- package/src/proxy/public-catalog.js +1 -1
- package/src/proxy/router.config.js +1 -1
- package/src/proxy/router.js +1 -1
- package/src/proxy/server.js +1 -1
- package/src/proxy/workspace-gateway.js +1 -1
- package/src/templates/mcp-tools.md +3 -3
|
@@ -1,141 +1,179 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
// Embedded with a trusted installation key. Only built-in modules may be used
|
|
4
|
-
// until the committed release has been verified.
|
|
5
|
-
function hookDispatcher(root, publicKey) {
|
|
6
|
-
return { runCLI(host, event, projectPath, executionOptions = {}) {
|
|
7
|
-
const fs = require('node:fs'), path = require('node:path'), crypto = require('node:crypto');
|
|
8
|
-
// Host adapters pass the workspace as base64 so hook command shells never
|
|
9
|
-
// reinterpret path data. Keep absolute raw paths usable for internal calls.
|
|
10
|
-
const inputPath = String(projectPath);
|
|
11
|
-
const decodedProjectPath = Buffer.from(inputPath, 'base64').toString('utf8');
|
|
12
|
-
const workspaceInput = path.isAbsolute(inputPath) || !fs.existsSync(decodedProjectPath) ? inputPath : decodedProjectPath;
|
|
13
|
-
const workspace = fs.realpathSync(workspaceInput);
|
|
14
|
-
const canonical = process.platform === 'win32' ? workspace.toLowerCase() : workspace;
|
|
15
|
-
const authorityFile = path.join(workspace, '.agents', 'runtime', 'generation.json');
|
|
16
|
-
let selected;
|
|
17
|
-
try { selected = JSON.parse(fs.readFileSync(authorityFile, 'utf8')); }
|
|
18
|
-
catch (error) {
|
|
19
|
-
if (error.code !== 'ENOENT') throw error;
|
|
20
|
-
// Migration only: the workspace pin is explicit, never the machine's
|
|
21
|
-
// latest pointer or a release inferred from deployed resource version.
|
|
22
|
-
selected = JSON.parse(fs.readFileSync(path.join(root, 'workspaces',
|
|
23
|
-
crypto.createHash('sha256').update(canonical).digest('hex') + '.json'), 'utf8'));
|
|
24
|
-
}
|
|
25
|
-
if (selected.workspace && (process.platform === 'win32' ? selected.workspace.toLowerCase() : selected.workspace) !== canonical)
|
|
26
|
-
throw Error('HOOK_WORKSPACE_BINDING_CONFLICT');
|
|
27
|
-
if (!/^\d+\.\d+\.\d+$/.test(selected.version) || !/^[a-f0-9]{64}$/.test(selected.digest))
|
|
28
|
-
throw Error('HOOK_RUNTIME_BINDING_REQUIRED');
|
|
29
|
-
const release = path.join(root, 'releases', `${selected.version}-${selected.digest}`);
|
|
30
|
-
if (fs.lstatSync(release).isSymbolicLink()) throw Error('HOOK_RUNTIME_LINK_REJECTED');
|
|
31
|
-
const manifest = JSON.parse(fs.readFileSync(path.join(release, 'integrity-manifest.json'), 'utf8'));
|
|
32
|
-
if (crypto.createHash('sha256').update(JSON.stringify(manifest)).digest('hex') !== selected.digest ||
|
|
33
|
-
!crypto.verify(null, Buffer.from(JSON.stringify(manifest.files)), publicKey, Buffer.from(manifest.signature, 'base64url')))
|
|
34
|
-
throw Error('HOOK_RUNTIME_SIGNATURE_INVALID');
|
|
35
|
-
for (const required of ['src/core/hook-bridge.js'])
|
|
36
|
-
if (!manifest.files[required]) throw Error('HOOK_RUNTIME_RECONNECT_REQUIRED');
|
|
37
|
-
for (const [file, digest] of Object.entries(manifest.files)) {
|
|
38
|
-
if (path.isAbsolute(file) || file.includes('\\') || file.split('/').some(part => !part || part === '..' || part === '.'))
|
|
39
|
-
throw Error('HOOK_RUNTIME_PATH_INVALID');
|
|
40
|
-
let cursor = release;
|
|
41
|
-
for (const part of file.split('/')) {
|
|
42
|
-
cursor = path.join(cursor, part);
|
|
43
|
-
if (fs.lstatSync(cursor).isSymbolicLink()) throw Error('HOOK_RUNTIME_LINK_REJECTED');
|
|
44
|
-
}
|
|
45
|
-
if (crypto.createHash('sha256').update(fs.readFileSync(cursor)).digest('hex') !== digest)
|
|
46
|
-
throw Error('HOOK_RUNTIME_INTEGRITY_INVALID');
|
|
47
|
-
}
|
|
48
|
-
return require(path.join(release, 'src/core/hook-bridge.js')).runCLI(host, event,
|
|
49
|
-
Buffer.from(workspace, 'utf8').toString('base64'), executionOptions);
|
|
50
|
-
} };
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
// The parent only uses built-ins. Synchronous hashing/locks in the signed
|
|
54
|
-
// worker cannot prevent the parent from producing a blocking decision.
|
|
55
|
-
function superviseHook(root, publicKey, dispatcherSource, args, timeoutMs) {
|
|
56
|
-
const cp = require('node:child_process'), crypto = require('node:crypto');
|
|
57
|
-
const lease = { id: crypto.randomUUID(), notAfter: Date.now() + timeoutMs, maxDurationMs: timeoutMs };
|
|
58
|
-
// The worker lives for one host event. APT_HOOK_PROCESS lets its runtime
|
|
59
|
-
// locks record a start hint instead of starting PowerShell on every tool call.
|
|
60
|
-
const program = `process.env.APT_HOOK_PROCESS = '1';
|
|
61
|
-
const dispatcher = (${dispatcherSource})(${JSON.stringify(root)}, ${JSON.stringify(publicKey)});
|
|
62
|
-
process.once('message', async message => {
|
|
63
|
-
try { await dispatcher.runCLI(...message.args, { hookLease: message.lease }); }
|
|
64
|
-
catch (error) { process.stderr.write('APT hook: ' + (error.message || String(error)) + '\\n'); process.exitCode = 2; }
|
|
65
|
-
finally { if (process.connected) process.disconnect(); }
|
|
66
|
-
});`;
|
|
67
|
-
return new Promise((resolve, reject) => {
|
|
68
|
-
let settled = false, output = '', errors = '', inputBytes = 0;
|
|
69
|
-
const
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
child.
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
if (
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
// Embedded with a trusted installation key. Only built-in modules may be used
|
|
4
|
+
// until the committed release has been verified.
|
|
5
|
+
function hookDispatcher(root, publicKey) {
|
|
6
|
+
return { runCLI(host, event, projectPath, executionOptions = {}) {
|
|
7
|
+
const fs = require('node:fs'), path = require('node:path'), crypto = require('node:crypto');
|
|
8
|
+
// Host adapters pass the workspace as base64 so hook command shells never
|
|
9
|
+
// reinterpret path data. Keep absolute raw paths usable for internal calls.
|
|
10
|
+
const inputPath = String(projectPath);
|
|
11
|
+
const decodedProjectPath = Buffer.from(inputPath, 'base64').toString('utf8');
|
|
12
|
+
const workspaceInput = path.isAbsolute(inputPath) || !fs.existsSync(decodedProjectPath) ? inputPath : decodedProjectPath;
|
|
13
|
+
const workspace = fs.realpathSync(workspaceInput);
|
|
14
|
+
const canonical = process.platform === 'win32' ? workspace.toLowerCase() : workspace;
|
|
15
|
+
const authorityFile = path.join(workspace, '.agents', 'runtime', 'generation.json');
|
|
16
|
+
let selected;
|
|
17
|
+
try { selected = JSON.parse(fs.readFileSync(authorityFile, 'utf8')); }
|
|
18
|
+
catch (error) {
|
|
19
|
+
if (error.code !== 'ENOENT') throw error;
|
|
20
|
+
// Migration only: the workspace pin is explicit, never the machine's
|
|
21
|
+
// latest pointer or a release inferred from deployed resource version.
|
|
22
|
+
selected = JSON.parse(fs.readFileSync(path.join(root, 'workspaces',
|
|
23
|
+
crypto.createHash('sha256').update(canonical).digest('hex') + '.json'), 'utf8'));
|
|
24
|
+
}
|
|
25
|
+
if (selected.workspace && (process.platform === 'win32' ? selected.workspace.toLowerCase() : selected.workspace) !== canonical)
|
|
26
|
+
throw Error('HOOK_WORKSPACE_BINDING_CONFLICT');
|
|
27
|
+
if (!/^\d+\.\d+\.\d+$/.test(selected.version) || !/^[a-f0-9]{64}$/.test(selected.digest))
|
|
28
|
+
throw Error('HOOK_RUNTIME_BINDING_REQUIRED');
|
|
29
|
+
const release = path.join(root, 'releases', `${selected.version}-${selected.digest}`);
|
|
30
|
+
if (fs.lstatSync(release).isSymbolicLink()) throw Error('HOOK_RUNTIME_LINK_REJECTED');
|
|
31
|
+
const manifest = JSON.parse(fs.readFileSync(path.join(release, 'integrity-manifest.json'), 'utf8'));
|
|
32
|
+
if (crypto.createHash('sha256').update(JSON.stringify(manifest)).digest('hex') !== selected.digest ||
|
|
33
|
+
!crypto.verify(null, Buffer.from(JSON.stringify(manifest.files)), publicKey, Buffer.from(manifest.signature, 'base64url')))
|
|
34
|
+
throw Error('HOOK_RUNTIME_SIGNATURE_INVALID');
|
|
35
|
+
for (const required of ['src/core/hook-bridge.js'])
|
|
36
|
+
if (!manifest.files[required]) throw Error('HOOK_RUNTIME_RECONNECT_REQUIRED');
|
|
37
|
+
for (const [file, digest] of Object.entries(manifest.files)) {
|
|
38
|
+
if (path.isAbsolute(file) || file.includes('\\') || file.split('/').some(part => !part || part === '..' || part === '.'))
|
|
39
|
+
throw Error('HOOK_RUNTIME_PATH_INVALID');
|
|
40
|
+
let cursor = release;
|
|
41
|
+
for (const part of file.split('/')) {
|
|
42
|
+
cursor = path.join(cursor, part);
|
|
43
|
+
if (fs.lstatSync(cursor).isSymbolicLink()) throw Error('HOOK_RUNTIME_LINK_REJECTED');
|
|
44
|
+
}
|
|
45
|
+
if (crypto.createHash('sha256').update(fs.readFileSync(cursor)).digest('hex') !== digest)
|
|
46
|
+
throw Error('HOOK_RUNTIME_INTEGRITY_INVALID');
|
|
47
|
+
}
|
|
48
|
+
return require(path.join(release, 'src/core/hook-bridge.js')).runCLI(host, event,
|
|
49
|
+
Buffer.from(workspace, 'utf8').toString('base64'), executionOptions);
|
|
50
|
+
} };
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
// The parent only uses built-ins. Synchronous hashing/locks in the signed
|
|
54
|
+
// worker cannot prevent the parent from producing a blocking decision.
|
|
55
|
+
function superviseHook(root, publicKey, dispatcherSource, args, timeoutMs, passive) {
|
|
56
|
+
const cp = require('node:child_process'), crypto = require('node:crypto');
|
|
57
|
+
const lease = { id: crypto.randomUUID(), notAfter: Date.now() + timeoutMs, maxDurationMs: timeoutMs };
|
|
58
|
+
// The worker lives for one host event. APT_HOOK_PROCESS lets its runtime
|
|
59
|
+
// locks record a start hint instead of starting PowerShell on every tool call.
|
|
60
|
+
const program = `process.env.APT_HOOK_PROCESS = '1';
|
|
61
|
+
const dispatcher = (${dispatcherSource})(${JSON.stringify(root)}, ${JSON.stringify(publicKey)});
|
|
62
|
+
process.once('message', async message => {
|
|
63
|
+
try { await dispatcher.runCLI(...message.args, { hookLease: message.lease }); }
|
|
64
|
+
catch (error) { process.stderr.write('APT hook: ' + (error.message || String(error)) + '\\n'); process.exitCode = 2; }
|
|
65
|
+
finally { if (process.connected) process.disconnect(); }
|
|
66
|
+
});`;
|
|
67
|
+
return new Promise((resolve, reject) => {
|
|
68
|
+
let settled = false, output = '', errors = '', inputBytes = 0;
|
|
69
|
+
const received = [];
|
|
70
|
+
// APT allows a passive host read in every session state. A fault of APT
|
|
71
|
+
// itself, a missed deadline above all, must not refuse one. The answer is
|
|
72
|
+
// the output that lets the call proceed, or null for every other call.
|
|
73
|
+
const allowance = () => {
|
|
74
|
+
try {
|
|
75
|
+
const table = passive && passive[args[0]];
|
|
76
|
+
const allow = table && table.events[args[1]];
|
|
77
|
+
if (typeof allow !== 'string') return null;
|
|
78
|
+
const input = JSON.parse(Buffer.concat(received).toString('utf8'));
|
|
79
|
+
const name = input.tool_name;
|
|
80
|
+
if (typeof name !== 'string' || input.toolCall !== undefined || input.userStopped === true) return null;
|
|
81
|
+
return table.exact.includes(name) || table.insensitive.includes(name.toLowerCase()) ? allow : null;
|
|
82
|
+
} catch { return null; }
|
|
83
|
+
};
|
|
84
|
+
const child = cp.spawn(process.execPath, ['-e', program], { windowsHide: true, stdio: ['pipe', 'pipe', 'pipe', 'ipc'] });
|
|
85
|
+
const detach = () => {
|
|
86
|
+
clearTimeout(timer); process.stdin.unpipe(child.stdin); process.stdin.removeListener('data', countInput);
|
|
87
|
+
child.stdin.destroy();
|
|
88
|
+
};
|
|
89
|
+
const fail = code => {
|
|
90
|
+
if (settled) return;
|
|
91
|
+
settled = true; detach();
|
|
92
|
+
if (child.connected) child.disconnect();
|
|
93
|
+
child.kill(); child.stdout.destroy(); child.stderr.destroy(); child.unref();
|
|
94
|
+
const allow = allowance();
|
|
95
|
+
if (allow === null) return reject(new Error(code));
|
|
96
|
+
process.stderr.write('APT hook: ' + code + ' (not refused)\n');
|
|
97
|
+
process.stdout.write(allow + '\n');
|
|
98
|
+
process.exitCode = 0;
|
|
99
|
+
resolve();
|
|
100
|
+
};
|
|
101
|
+
const countInput = chunk => {
|
|
102
|
+
inputBytes += chunk.length;
|
|
103
|
+
if (inputBytes > 2 * 1024 * 1024) fail('HOOK_INPUT_LIMIT'); else received.push(Buffer.from(chunk));
|
|
104
|
+
};
|
|
105
|
+
const timer = setTimeout(() => fail('HOOK_DEADLINE_EXCEEDED'), timeoutMs);
|
|
106
|
+
child.on('error', () => fail('HOOK_WORKER_UNAVAILABLE'));
|
|
107
|
+
child.stdin.on('error', () => {});
|
|
108
|
+
child.stdout.on('data', chunk => { output += chunk.toString(); if (Buffer.byteLength(output) > 2 * 1024 * 1024) fail('HOOK_OUTPUT_LIMIT'); });
|
|
109
|
+
child.stderr.on('data', chunk => { errors += chunk.toString(); if (Buffer.byteLength(errors) > 64 * 1024) fail('HOOK_OUTPUT_LIMIT'); });
|
|
110
|
+
child.on('close', code => {
|
|
111
|
+
if (settled) return;
|
|
112
|
+
if (Date.now() >= lease.notAfter) return fail('HOOK_DEADLINE_EXCEEDED');
|
|
113
|
+
settled = true; detach();
|
|
114
|
+
// A worker that failed before the bridge could decide refuses nothing
|
|
115
|
+
// that APT always allows.
|
|
116
|
+
const allow = code === 0 ? null : allowance();
|
|
117
|
+
if (code === 0) { if (output) process.stdout.write(output); }
|
|
118
|
+
if (errors) process.stderr.write(errors);
|
|
119
|
+
if (allow !== null) process.stdout.write(allow + '\n');
|
|
120
|
+
process.exitCode = code === 0 || allow !== null ? 0 : 2;
|
|
121
|
+
resolve();
|
|
122
|
+
});
|
|
123
|
+
process.stdin.on('data', countInput); process.stdin.pipe(child.stdin);
|
|
124
|
+
child.send({ args, lease }, error => { if (error) fail('HOOK_WORKER_UNAVAILABLE'); });
|
|
125
|
+
});
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
// Only a pre-tool decision may block its host. Any other event observes
|
|
129
|
+
// something that already happened, so a dispatcher or runtime fault there is a
|
|
130
|
+
// non-blocking error: it must not reject a prompt or force a continuation.
|
|
131
|
+
function blockingEvents() {
|
|
132
|
+
const { HOSTS } = require('../core/host-adapters');
|
|
133
|
+
return Object.fromEntries(Object.entries(HOSTS).map(([host, adapter]) =>
|
|
134
|
+
[host, Object.keys(adapter.events).filter(event => adapter.events[event] === 'before-tool')]));
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
// For each host: the events that guard a tool call, each with the output
|
|
138
|
+
// that lets the call proceed, and the tools APT allows in every session state.
|
|
139
|
+
function passiveReads() {
|
|
140
|
+
const { HOSTS, formatHookResult } = require('../core/host-adapters');
|
|
141
|
+
const { passiveHostTools } = require('../core/hook-bridge');
|
|
142
|
+
return Object.fromEntries(Object.entries(HOSTS).map(([host, adapter]) => [host, {
|
|
143
|
+
events: Object.fromEntries(Object.keys(adapter.events).filter(event => adapter.events[event] === 'before-tool')
|
|
144
|
+
.map(event => [event, JSON.stringify(formatHookResult(host, event, { allow: true }).output)])),
|
|
145
|
+
...passiveHostTools(host) }]));
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
function renderDispatcher(runtimeRoot, publicKey, options = {}) {
|
|
149
|
+
const timeoutMs = options.timeoutMs === undefined ? 10000 : options.timeoutMs;
|
|
150
|
+
if (!Number.isSafeInteger(timeoutMs) || timeoutMs < 100 || timeoutMs > 10000) throw new Error('HOOK_DEADLINE_INVALID');
|
|
151
|
+
return `'use strict';
|
|
152
|
+
const dispatcher = (${hookDispatcher.toString()})(${JSON.stringify(runtimeRoot)}, ${JSON.stringify(publicKey.toString())});
|
|
153
|
+
const blockingEvents = ${JSON.stringify(blockingEvents())};
|
|
154
|
+
// An unknown host or event stays blocking.
|
|
155
|
+
const failureCode = args => !blockingEvents[args[0]] || blockingEvents[args[0]].includes(args[1]) ? 2 : 1;
|
|
156
|
+
function reportFailure(error, args) {
|
|
157
|
+
process.stderr.write('APT hook: ' + (error && error.message ? error.message : String(error)) + '\\n');
|
|
158
|
+
process.exitCode = failureCode(args);
|
|
159
|
+
}
|
|
160
|
+
module.exports = { runCLI(...args) {
|
|
161
|
+
try {
|
|
162
|
+
// Generated host commands use node --eval. Direct verifier consumers keep
|
|
163
|
+
// the synchronous interface; host execution always has an outer watchdog.
|
|
164
|
+
const hostCLI = process.argv.length === 1 && process.execArgv.some(arg => arg === '-e' || arg === '--eval');
|
|
165
|
+
const result = hostCLI
|
|
166
|
+
? (${superviseHook.toString()})(${JSON.stringify(runtimeRoot)}, ${JSON.stringify(publicKey.toString())}, ${JSON.stringify(hookDispatcher.toString())}, args, ${timeoutMs}, ${JSON.stringify(passiveReads())})
|
|
167
|
+
: dispatcher.runCLI(...args);
|
|
168
|
+
if (result && typeof result.then === 'function')
|
|
169
|
+
result.then(() => { if (hostCLI && process.exitCode) process.exitCode = failureCode(args); },
|
|
170
|
+
error => reportFailure(error, args));
|
|
171
|
+
return result;
|
|
172
|
+
} catch (error) {
|
|
173
|
+
reportFailure(error, args);
|
|
174
|
+
}
|
|
175
|
+
} };
|
|
176
|
+
`;
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
module.exports = { hookDispatcher, renderDispatcher };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const _0x4805a0=_0x3393;(function(_0x5d5b5a,_0x2dda0c){const _0x409528=_0x3393,_0x25370d=_0x5d5b5a();while(!![]){try{const _0x493521=parseInt(_0x409528(0xd8))/0x1+parseInt(_0x409528(0xda))/0x2*(parseInt(_0x409528(0xab))/0x3)+-parseInt(_0x409528(0xa3))/0x4+parseInt(_0x409528(0xb9))/0x5+parseInt(_0x409528(0xa4))/0x6*(-parseInt(_0x409528(0x9e))/0x7)+-parseInt(_0x409528(0xd1))/0x8+parseInt(_0x409528(0xc9))/0x9*(-parseInt(_0x409528(0xb0))/0xa);if(_0x493521===_0x2dda0c)break;else _0x25370d['push'](_0x25370d['shift']());}catch(_0x52e8ef){_0x25370d['push'](_0x25370d['shift']());}}}(_0xf6fd,0xe950d));const fs=require('fs'),path=require(_0x4805a0(0xa7)),{buildHookConfig}=require(_0x4805a0(0xaf)),{readJsonWithBackup,parseJson}=require('./managed-config');function mergeHooks(_0x54f47a,_0x12b047){const _0x443aa3=_0x4805a0;if(Array[_0x443aa3(0xd2)](_0x12b047)){const _0x2e192a=(Array[_0x443aa3(0xd2)](_0x54f47a)?_0x54f47a:[])['filter'](_0x5ec8d5=>!JSON[_0x443aa3(0xa6)](_0x5ec8d5)[_0x443aa3(0xac)](_0x443aa3(0xb1)));return[..._0x2e192a,..._0x12b047];}if(_0x12b047&&typeof _0x12b047===_0x443aa3(0xcd)){const _0x5b12ee={..._0x54f47a&&typeof _0x54f47a===_0x443aa3(0xcd)?_0x54f47a:{}},_0x4cc6c5=_0x5b12ee;for(const [_0x210b4a,_0xef5937]of Object[_0x443aa3(0xa0)](_0x12b047)){const _0x5676c6=Array[_0x443aa3(0xd2)](_0xef5937)&&!JSON[_0x443aa3(0xa6)](_0x4cc6c5[_0x210b4a]??'')[_0x443aa3(0xac)](_0x443aa3(0xb1))&&Object['entries'](_0x4cc6c5)[_0x443aa3(0xa2)](([_0x44af43,_0x4b533c])=>_0x44af43[_0x443aa3(0xcc)](_0x210b4a+'_')&&JSON['stringify'](_0x4b533c)['includes'](_0x443aa3(0xb1)));if(!_0x5676c6)_0x4cc6c5[_0x210b4a]=mergeHooks(_0x4cc6c5[_0x210b4a],_0xef5937);}return _0x4cc6c5;}return _0x12b047;}function installHostHooks(_0x3b1f06,_0x2e5380=null,_0x3ba37a={}){const _0x12f386=_0x4805a0,_0x3f3ab7=_0x3ba37a[_0x12f386(0xb2)]||fs,_0x9e9a73={};_0x9e9a73[_0x12f386(0xbf)]=_0x12f386(0xbf),_0x9e9a73['claude']=_0x12f386(0xaa),_0x9e9a73[_0x12f386(0xb6)]=_0x12f386(0xb6),_0x9e9a73['antigravity']=_0x12f386(0xd4),_0x9e9a73[_0x12f386(0xbe)]=_0x12f386(0xd7),_0x9e9a73['windsurf']='windsurf',_0x9e9a73[_0x12f386(0xb4)]=_0x12f386(0xb4);const _0x18595e=_0x9e9a73;let _0x146d29=path[_0x12f386(0xc5)](_0x3b1f06,_0x12f386(0xc7));if(!_0x3f3ab7[_0x12f386(0xdb)](_0x146d29))return[];if(_0x3ba37a[_0x12f386(0xc1)]&&_0x3ba37a[_0x12f386(0xcb)]){_0x146d29=path['join'](_0x3b1f06,_0x12f386(0x9d));const _0x78141c=require(_0x12f386(0xbb))['renderDispatcher'](_0x3ba37a[_0x12f386(0xc1)],_0x3ba37a[_0x12f386(0xcb)]);if(!_0x3f3ab7[_0x12f386(0xdb)](_0x146d29)||_0x3f3ab7[_0x12f386(0xae)](_0x146d29,_0x12f386(0xd3))!==_0x78141c)_0x3f3ab7['writeFileSync'](_0x146d29,_0x78141c);}const _0x366de0=[];for(const _0x4e3e36 of _0x2e5380||Object[_0x12f386(0xc3)](_0x18595e)[_0x12f386(0xa9)](_0x4dc32a=>_0x4dc32a!=='claude-desktop')){const _0x3dc13c=buildHookConfig(_0x18595e[_0x4e3e36]||_0x4e3e36,_0x146d29,_0x3b1f06);if(!_0x3dc13c?.[_0x12f386(0xa7)]||!_0x3dc13c[_0x12f386(0xbd)]||_0x3dc13c[_0x12f386(0xa1)])continue;const _0x31d606=path['resolve'](_0x3b1f06,_0x3dc13c[_0x12f386(0xa7)]);if(path[_0x12f386(0xce)](_0x3b1f06,_0x31d606)['startsWith']('..'))throw new Error(_0x12f386(0xd6));const _0x517594=JSON[_0x12f386(0xcf)](JSON[_0x12f386(0xa6)](_0x3dc13c[_0x12f386(0xbd)]),(_0x1dc570,_0x1058d8)=>{const _0x58a21d=_0x12f386;if(_0x1dc570===_0x58a21d(0xba)&&typeof _0x1058d8==='string'&&_0x1058d8[_0x58a21d(0xcc)](_0x58a21d(0xbc))&&!_0x1058d8['includes'](_0x58a21d(0xb1)))return _0x1058d8[_0x58a21d(0xd9)](_0x58a21d(0xc8),_0x58a21d(0xc0));return _0x1058d8;});let _0x2313d4;if(!_0x3ba37a[_0x12f386(0xb2)])_0x2313d4=readJsonWithBackup(_0x31d606);else{if(!_0x3f3ab7['existsSync'](_0x31d606))_0x2313d4={};else try{_0x2313d4=parseJson(_0x3f3ab7['readFileSync'](_0x31d606,_0x12f386(0xd3)));}catch(_0x4a65c3){const _0x50da44={};_0x50da44['code']='INVALID_CONFIG';throw Object[_0x12f386(0xb7)](new Error(_0x12f386(0xa5)+_0x31d606+_0x12f386(0xad)+_0x4a65c3[_0x12f386(0xd5)]),_0x50da44);}}const _0x41b306=mergeHooks(_0x2313d4,_0x517594),_0x381bc5={};_0x381bc5[_0x12f386(0xa8)]=!![],_0x3f3ab7[_0x12f386(0xc2)](path[_0x12f386(0xb5)](_0x31d606),_0x381bc5),_0x3f3ab7[_0x12f386(0x9f)](_0x31d606,JSON[_0x12f386(0xa6)](_0x41b306,null,0x2)+'\x0a');const _0x55baae={};_0x55baae[_0x12f386(0xc6)]=_0x4e3e36,_0x55baae[_0x12f386(0xa7)]=_0x3dc13c[_0x12f386(0xa7)],_0x55baae['protocolTested']=![],_0x55baae['liveVerified']=![],_0x55baae[_0x12f386(0xca)]='installed-unobserved',_0x366de0[_0x12f386(0xb3)](_0x55baae);}return _0x366de0;}const _0xc1ec97={};function _0xf6fd(){const _0x7af81a=['mZeXnuDqshHTsW','D3jPDgvgAwXLu3LUyW','zw50CMLLCW','ywr2AxnVCNK','C29Tzq','mtKXmteZnMHHvMjTBW','mtK0mtbZt1LrqxO','sw52ywXPzcbJB25MAwCGyxqG','C3rYAw5NAwz5','Cgf0Aa','CMvJDxjZAxzL','zMLSDgvY','y2XHDwrLlwnVzgu','m0TQDfnorW','Aw5JBhvKzxm','oYbVCMLNAw5HBcbMAwXLihDHCYbWCMvZzxj2zwq6ia','CMvHzezPBgvtEw5J','lI4Vy29Yzs9OB3n0lwfKyxb0zxjZ','mtbeyvb3uLa','qvbux0Hpt0TFqLjjreDf','zMLSzvn5C3rLBq','ChvZAa','y2XHDwrLlwrLC2T0B3a','zgLYBMfTzq','y3vYC29Y','yxnZAwDU','Aw5ZDgfSBeHVC3riB29RCW','nJmWnJu5nw9UzxvzuW','y29TBwfUza','lI9OB29RlwrPC3bHDgnOzxi','BM9KzsaTzsa','y29UzMLN','DNnJB2rL','y29KzxG','BM9KzsaTzsaIlYPbufrFse9ps19cuKLer0uQlW','CNvUDgLTzvjVB3q','BwTKAxjtEw5J','A2v5CW','zxHWB3j0CW','AM9PBG','Ag9ZDa','lMfNzw50CY9JB3jLl2HVB2STyNjPzgDLlMPZ','BM9KzsaTzsaI','nZGZmJy5mw9rv0fOCW','C3rHDhvZ','ChvIBgLJs2v5','C3rHCNrZv2L0Aa','B2jQzwn0','CMvSyxrPDMu','CgfYC2u','BwvYz2viB29RCW','mti5odG2nfn0sg1XEa','AxnbCNjHEq','DxrMoa','yw50AwDYyxzPDhK','BwvZC2fNzq','sg9VAYbJB25MAwCGCgf0AcbLC2nHCgvZihbYB2PLy3q','DNnJB2rLlwnVCgLSB3q','otmXnZK2zKviwMz4','CMvWBgfJzq','mZqYnteYnfr3rvvxuq','zxHPC3rZu3LUyW','lMfNzw50CY9JB3jLl2HVB2STzgLZCgf0y2HLCI5QCW'];_0xf6fd=function(){return _0x7af81a;};return _0xf6fd();}function _0x3393(_0x11fa3b,_0x18fdef){_0x11fa3b=_0x11fa3b-0x9d;const _0xf6fde8=_0xf6fd();let _0x33937c=_0xf6fde8[_0x11fa3b];if(_0x3393['wEZtNi']===undefined){var _0x4654f2=function(_0x101b27){const _0x12d0d6='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x44e9ad='',_0x1bbe2f='';for(let _0x453862=0x0,_0xee18e2,_0x46dcf2,_0xc1ec97=0x0;_0x46dcf2=_0x101b27['charAt'](_0xc1ec97++);~_0x46dcf2&&(_0xee18e2=_0x453862%0x4?_0xee18e2*0x40+_0x46dcf2:_0x46dcf2,_0x453862++%0x4)?_0x44e9ad+=String['fromCharCode'](0xff&_0xee18e2>>(-0x2*_0x453862&0x6)):0x0){_0x46dcf2=_0x12d0d6['indexOf'](_0x46dcf2);}for(let _0x54f47a=0x0,_0x12b047=_0x44e9ad['length'];_0x54f47a<_0x12b047;_0x54f47a++){_0x1bbe2f+='%'+('00'+_0x44e9ad['charCodeAt'](_0x54f47a)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x1bbe2f);};_0x3393['SzeJrX']=_0x4654f2,_0x3393['mbdkyA']={},_0x3393['wEZtNi']=!![];}const _0x128557=_0xf6fde8[0x0],_0x47fef0=_0x11fa3b+_0x128557,_0x537dba=_0x3393['mbdkyA'][_0x47fef0];return!_0x537dba?(_0x33937c=_0x3393['SzeJrX'](_0x33937c),_0x3393['mbdkyA'][_0x47fef0]=_0x33937c):_0x33937c=_0x537dba,_0x33937c;}_0xc1ec97[_0x4805a0(0xb8)]=installHostHooks,_0xc1ec97[_0x4805a0(0xd0)]=mergeHooks,module[_0x4805a0(0xc4)]=_0xc1ec97;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const _0x14798c=_0x22ed;(function(_0x560630,_0x46c419){const _0x536e6d=_0x22ed,_0x55986c=_0x560630();while(!![]){try{const _0x252343=-parseInt(_0x536e6d(0x16a))/0x1+-parseInt(_0x536e6d(0xee))/0x2*(-parseInt(_0x536e6d(0xfd))/0x3)+-parseInt(_0x536e6d(0x15b))/0x4+parseInt(_0x536e6d(0xe4))/0x5+-parseInt(_0x536e6d(0x126))/0x6+-parseInt(_0x536e6d(0x10f))/0x7+-parseInt(_0x536e6d(0x183))/0x8*(-parseInt(_0x536e6d(0xe7))/0x9);if(_0x252343===_0x46c419)break;else _0x55986c['push'](_0x55986c['shift']());}catch(_0x481be1){_0x55986c['push'](_0x55986c['shift']());}}}(_0x2798,0x19caf));function _0x22ed(_0x4bdbdc,_0x108b79){_0x4bdbdc=_0x4bdbdc-0xd3;const _0x279843=_0x2798();let _0x22ed04=_0x279843[_0x4bdbdc];if(_0x22ed['HxbwiS']===undefined){var _0x46bc4b=function(_0x49188e){const _0x2994f8='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x54925f='',_0x45d040='';for(let _0x1bb567=0x0,_0x59acbe,_0x381ebd,_0x39b5d5=0x0;_0x381ebd=_0x49188e['charAt'](_0x39b5d5++);~_0x381ebd&&(_0x59acbe=_0x1bb567%0x4?_0x59acbe*0x40+_0x381ebd:_0x381ebd,_0x1bb567++%0x4)?_0x54925f+=String['fromCharCode'](0xff&_0x59acbe>>(-0x2*_0x1bb567&0x6)):0x0){_0x381ebd=_0x2994f8['indexOf'](_0x381ebd);}for(let _0x18c8a7=0x0,_0x548ba2=_0x54925f['length'];_0x18c8a7<_0x548ba2;_0x18c8a7++){_0x45d040+='%'+('00'+_0x54925f['charCodeAt'](_0x18c8a7)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x45d040);};_0x22ed['CihqHb']=_0x46bc4b,_0x22ed['JFSUzK']={},_0x22ed['HxbwiS']=!![];}const _0x39615e=_0x279843[0x0],_0x1e0824=_0x4bdbdc+_0x39615e,_0x4dcae4=_0x22ed['JFSUzK'][_0x1e0824];return!_0x4dcae4?(_0x22ed04=_0x22ed['CihqHb'](_0x22ed04),_0x22ed['JFSUzK'][_0x1e0824]=_0x22ed04):_0x22ed04=_0x4dcae4,_0x22ed04;}const fs=require(_0x14798c(0x189)),path=require(_0x14798c(0x172)),crypto=require(_0x14798c(0x178)),{preserveArchiveBytes}=require(_0x14798c(0x13d)),{sameWorkspace}=require(_0x14798c(0x127)),{verifyIndexProducer,sha}=require(_0x14798c(0xd3)),{safePath,validateManagedIndexCache}=require(_0x14798c(0x11f)),fail=_0x5c0a43=>{throw Object['assign'](Error(_0x5c0a43),{'code':_0x5c0a43});},read=(_0xa4a919,_0x3b0b70)=>{const _0xbcef25=_0x14798c;safePath(_0xa4a919,_0x3b0b70);try{const _0x1a7b9b=fs[_0xbcef25(0xf9)](_0x3b0b70);return{'file':_0x3b0b70,'bytes':_0x1a7b9b,'sha256':sha(_0x1a7b9b),'value':JSON['parse'](_0x1a7b9b)};}catch(_0x3041d5){if(_0x3041d5['code']===_0xbcef25(0x12d))return null;throw _0x3041d5;}};function classifyInterruption({workspace:_0x320e11,execution:_0x4f90a7,boot:_0x179b5a,processIdentity:_0x33f21d,producer:_0x1adc8f,lifecycle:_0x3b4c03}){const _0x2ca655=_0x14798c,_0x558284=require(_0x2ca655(0x12a)),_0x47817c={};_0x47817c[_0x2ca655(0x199)]=_0x4f90a7,_0x47817c['boot']=_0x179b5a,_0x47817c[_0x2ca655(0x17e)]=_0x33f21d;const _0xf240a7=_0x558284[_0x2ca655(0x12f)](_0x47817c);if(_0xf240a7[_0x2ca655(0x14b)]==='recoverable-interruption'){if(_0x1adc8f['contract'][_0x2ca655(0xf5)]===0x3&&!_0x558284['validLaunchBoot'](_0x4f90a7,_0x179b5a))fail(_0x2ca655(0x100));return _0xf240a7;}if(_0xf240a7['status']!==_0x2ca655(0x193)||_0xf240a7[_0x2ca655(0x122)]!=='process-not-before-boot')return _0xf240a7;const _0x3b216c={};_0x3b216c[_0x2ca655(0x14b)]=_0x2ca655(0x193),_0x3b216c[_0x2ca655(0x122)]=_0x2ca655(0xff),_0x3b216c[_0x2ca655(0x13e)]=_0xf240a7['reason'];const _0x1fdf48=_0x3b216c;if(_0x1adc8f['contract'][_0x2ca655(0xd5)]!==0x1||_0x3b4c03?.['status']!==_0x2ca655(0x15f))return _0x1fdf48;const _0x1d8250=_0x3b4c03[_0x2ca655(0x184)],_0x54b61e=_0x4f90a7[_0x2ca655(0x171)];if(_0x3b4c03[_0x2ca655(0x179)]!==0x1||!_0x3b4c03[_0x2ca655(0xfb)]||!sameWorkspace(_0x3b4c03[_0x2ca655(0xfb)],_0x320e11)||_0x3b4c03['target']?.['version']!==_0x1adc8f[_0x2ca655(0x179)]||_0x3b4c03[_0x2ca655(0xdd)]?.[_0x2ca655(0x110)]!==_0x1adc8f[_0x2ca655(0x110)]||JSON[_0x2ca655(0x13c)](_0x3b4c03[_0x2ca655(0x199)])!==JSON[_0x2ca655(0x13c)](_0x4f90a7)||_0x4f90a7['containment']!==_0x2ca655(0x11d)||_0x54b61e?.[_0x2ca655(0xe8)]!==_0x2ca655(0x11d)||_0x54b61e[_0x2ca655(0x17f)]!==!![]||_0x54b61e[_0x2ca655(0x10e)]!==_0x4f90a7[_0x2ca655(0x10e)]||_0x54b61e['launcherProcessStart']!==_0x4f90a7[_0x2ca655(0x18c)]||_0x1d8250?.[_0x2ca655(0xe8)]!==_0x2ca655(0x11d)||!_0x1d8250[_0x2ca655(0xfb)]||!sameWorkspace(_0x1d8250[_0x2ca655(0xfb)],_0x320e11)||_0x1d8250[_0x2ca655(0xf6)]!==_0x2ca655(0x10d)||_0x1d8250[_0x2ca655(0x11b)]!==!![]||_0x1d8250['pid']!==_0x4f90a7['launcherPid']||_0x1d8250[_0x2ca655(0x107)]!==_0x4f90a7[_0x2ca655(0x18c)]||![_0x2ca655(0xd4),_0x2ca655(0x141)][_0x2ca655(0x146)](_0x1d8250[_0x2ca655(0xf8)])||typeof _0x1d8250[_0x2ca655(0x116)]!=='string'||!_0x1d8250[_0x2ca655(0x116)][_0x2ca655(0x15d)]()||_0x1d8250['job']?.['assignmentConfirmed']!==!![]||_0x1d8250[_0x2ca655(0x188)][_0x2ca655(0x12e)]!==0x0||_0x1d8250['job'][_0x2ca655(0x15f)]!==!![]||!Number[_0x2ca655(0xed)](_0x1d8250[_0x2ca655(0x188)][_0x2ca655(0x17c)])||_0x1d8250['job'][_0x2ca655(0x17c)]<=0x0||_0x1d8250[_0x2ca655(0x188)]['brokerPid']>0xffffffff||[_0x4f90a7[_0x2ca655(0xe5)],_0x4f90a7[_0x2ca655(0x10e)]][_0x2ca655(0x146)](_0x1d8250[_0x2ca655(0x188)][_0x2ca655(0x17c)])||!_0x558284[_0x2ca655(0x12c)](_0x4f90a7,_0x179b5a))return _0x1fdf48;const _0x59b490=typeof _0x1d8250['closedAt']===_0x2ca655(0xea)?Date['parse'](_0x1d8250['closedAt']):NaN;if(!Number[_0x2ca655(0xed)](_0x59b490)||new Date(_0x59b490)[_0x2ca655(0x108)]()!==_0x1d8250[_0x2ca655(0xd8)])return _0x1fdf48;const _0x34d7ad=BigInt(_0x59b490)*0x2710n+0x19db1ded53e8000n;if([_0x4f90a7[_0x2ca655(0x103)],_0x4f90a7['launcherProcessStart'],_0x4f90a7[_0x2ca655(0x155)][_0x2ca655(0x10b)]][_0x2ca655(0x111)](_0x5eb4d6=>_0x34d7ad+0x270fn<BigInt(_0x5eb4d6))||_0x34d7ad>BigInt(_0x179b5a[_0x2ca655(0x10b)]))return _0x1fdf48;const _0x5ec891={};return _0x5ec891[_0x2ca655(0x14b)]=_0x2ca655(0x120),_0x5ec891[_0x2ca655(0x122)]=_0x2ca655(0x168),_0x5ec891;}function validateIndexArchive(_0x2cda23,_0x1ff07d,_0x12305d=require('../license/verify')[_0x14798c(0x14c)]){const _0x57a0b6=_0x14798c;if(!_0x1ff07d||!/^[a-f0-9-]{36}$/['test'](_0x1ff07d[_0x57a0b6(0x13a)]||'')||!/^[a-f0-9]{64}$/['test'](_0x1ff07d['archiveHash']||''))fail(_0x57a0b6(0x144));const _0x27344d=safePath(_0x2cda23,path[_0x57a0b6(0xd7)](_0x2cda23,'.agents/recovery-backups',_0x57a0b6(0x198)+_0x1ff07d[_0x57a0b6(0x13a)])),_0x47bcf9=read(_0x2cda23,path[_0x57a0b6(0xd7)](_0x27344d,_0x57a0b6(0x132)));if(!_0x47bcf9||_0x47bcf9[_0x57a0b6(0x15c)]!==_0x1ff07d[_0x57a0b6(0x156)]||_0x47bcf9[_0x57a0b6(0x114)][_0x57a0b6(0x13a)]!==_0x1ff07d[_0x57a0b6(0x13a)]||!sameWorkspace(_0x47bcf9['value'][_0x57a0b6(0xfb)],_0x2cda23)||!Array[_0x57a0b6(0x165)](_0x47bcf9[_0x57a0b6(0x114)][_0x57a0b6(0x13b)]))fail(_0x57a0b6(0x144));for(const _0x403406 of _0x47bcf9['value'][_0x57a0b6(0x13b)]){const _0x5e0ebd=safePath(_0x2cda23,path[_0x57a0b6(0x135)](_0x27344d,_0x403406[_0x57a0b6(0x147)]));if(!_0x5e0ebd[_0x57a0b6(0x10c)](_0x27344d+path[_0x57a0b6(0x133)])||!/^[a-f0-9]{64}$/['test'](_0x403406[_0x57a0b6(0x15c)]||'')||sha(fs[_0x57a0b6(0xf9)](_0x5e0ebd))!==_0x403406[_0x57a0b6(0x15c)])fail(_0x57a0b6(0x144));}const _0x572099=_0x47bcf9[_0x57a0b6(0x114)];if(_0x572099[_0x57a0b6(0x179)]!==0x1||_0x572099[_0x57a0b6(0x13b)][_0x57a0b6(0x111)]((_0x1dc888,_0x3feb72)=>!_0x1dc888[_0x57a0b6(0x160)]||_0x572099[_0x57a0b6(0x13b)][_0x57a0b6(0xe6)](_0x2c81dd=>_0x2c81dd[_0x57a0b6(0x160)]===_0x1dc888[_0x57a0b6(0x160)]||_0x2c81dd[_0x57a0b6(0x147)]===_0x1dc888[_0x57a0b6(0x147)])!==_0x3feb72))fail(_0x57a0b6(0x144));if(!_0x572099[_0x57a0b6(0x130)]||['codegraph','code-review-graph'][_0x57a0b6(0x111)](_0x185831=>!/^[a-f0-9-]{36}$/[_0x57a0b6(0x145)](_0x572099['instances'][_0x185831]||'')))fail('INDEX_RECOVERY_CHANGED');const _0x438fdf=_0x28f2d5=>{const _0x4e58ed=_0x57a0b6,_0x1e9989=_0x572099[_0x4e58ed(0x13b)][_0x4e58ed(0x18d)](_0x9a3a15=>_0x9a3a15[_0x4e58ed(0x147)]===_0x28f2d5);if(!_0x1e9989)fail('INDEX_RECOVERY_CHANGED');return JSON[_0x4e58ed(0x139)](fs['readFileSync'](path[_0x4e58ed(0xd7)](_0x27344d,_0x28f2d5)));},_0x2b80e0=_0x572099[_0x57a0b6(0x13b)][_0x57a0b6(0x18d)](_0x298d31=>[_0x57a0b6(0xdb),_0x57a0b6(0x117)][_0x57a0b6(0x146)](_0x298d31[_0x57a0b6(0x147)]));if(!_0x2b80e0||_0x2b80e0[_0x57a0b6(0x15c)]!==_0x572099[_0x57a0b6(0x16e)])fail(_0x57a0b6(0x144));const _0xf35cd6=_0x438fdf(_0x2b80e0[_0x57a0b6(0x147)]),_0x146186=_0x438fdf(_0x57a0b6(0x173)),_0x4377a5=_0x438fdf(_0x57a0b6(0x161)),_0x5c3a4e=_0xf35cd6[_0x57a0b6(0xf4)]?.[_0x57a0b6(0x199)],_0x1de0ff=verifyIndexProducer(_0x572099['producer']?.[_0x57a0b6(0x18f)],_0x12305d);if(!_0x5c3a4e||_0x5c3a4e[_0x57a0b6(0x148)]!==_0x572099['attemptId']||!sameWorkspace(_0xf35cd6[_0x57a0b6(0xfb)],_0x2cda23)||!sameWorkspace(_0x146186[_0x57a0b6(0xfb)],_0x2cda23)||_0x1de0ff[_0x57a0b6(0x179)]!==_0x146186[_0x57a0b6(0x179)]||_0x1de0ff[_0x57a0b6(0x110)]!==_0x146186[_0x57a0b6(0x110)]||_0xf35cd6[_0x57a0b6(0xdd)]?.[_0x57a0b6(0x179)]!==_0x1de0ff[_0x57a0b6(0x179)]||_0xf35cd6['target']?.[_0x57a0b6(0x110)]!==_0x1de0ff['digest']||[_0x57a0b6(0x15e),_0x57a0b6(0xd6),_0x57a0b6(0x101),_0x57a0b6(0x16f)][_0x57a0b6(0x111)](_0x4b9f8d=>(_0xf35cd6[_0x4b9f8d]??null)!==(_0x146186[_0x4b9f8d]??null)||(_0x5c3a4e[_0x4b9f8d]??null)!==(_0x146186[_0x4b9f8d]??null))||_0x4377a5[_0x57a0b6(0x142)]!==_0x57a0b6(0x10a)||_0x4377a5[_0x57a0b6(0x119)]!==_0x5c3a4e[_0x57a0b6(0x170)]||_0x572099[_0x57a0b6(0x13b)]['find'](_0x1eade6=>_0x1eade6['path']==='generation.json')?.[_0x57a0b6(0x15c)]!==_0x572099['generationHash']||_0x572099[_0x57a0b6(0x13b)]['find'](_0x5c6496=>_0x5c6496[_0x57a0b6(0x147)]===_0x57a0b6(0x161))?.[_0x57a0b6(0x15c)]!==_0x572099[_0x57a0b6(0x105)]||_0x572099[_0x57a0b6(0x112)]!==_0x57a0b6(0x193)||!Number[_0x57a0b6(0xed)](_0x146186['generation'])||_0x146186[_0x57a0b6(0x15e)]<0x1||!/^[a-f0-9]{64}$/[_0x57a0b6(0x145)](_0x146186[_0x57a0b6(0x101)]||'')||_0x4377a5['generation']!=null&&_0x4377a5['generation']!==_0x146186[_0x57a0b6(0x15e)]||_0x5c3a4e['containment']&&_0x5c3a4e[_0x57a0b6(0xf6)]!==_0x1de0ff[_0x57a0b6(0x162)][_0x57a0b6(0xf6)]||_0x5c3a4e[_0x57a0b6(0x158)]&&(_0x5c3a4e[_0x57a0b6(0x158)][_0x57a0b6(0x110)]!==_0x1de0ff[_0x57a0b6(0x110)]||_0x5c3a4e[_0x57a0b6(0x158)][_0x57a0b6(0x179)]!==_0x1de0ff['version']))fail(_0x57a0b6(0x144));const _0xbb0ff2=_0x5f5f67=>_0x572099[_0x57a0b6(0x13b)]['find'](_0x2932b9=>_0x2932b9['original']===path['relative'](_0x2cda23,_0x5f5f67)['replaceAll']('\x5c','/')),_0x262661=_0xbb0ff2(path[_0x57a0b6(0xd7)](_0x2cda23,_0x57a0b6(0x154)));if(!_0x262661||_0x262661[_0x57a0b6(0x15c)]!==_0x146186[_0x57a0b6(0xd6)])fail(_0x57a0b6(0x144));const _0x516401=require(_0x57a0b6(0x11f)),_0x1d896d=new Set([_0x57a0b6(0xec)+_0x2b80e0[_0x57a0b6(0x147)],_0x57a0b6(0x195),'.agents/runtime/admission.json',_0x57a0b6(0x154),...['executor.lock',_0x57a0b6(0x16c),_0x57a0b6(0xfa)]['map'](_0x4d7c21=>_0x57a0b6(0xec)+_0x4d7c21)]);for(const _0x461eca of[_0x57a0b6(0x14f),_0x57a0b6(0x187)]){const _0x32539b={..._0x1de0ff[_0x57a0b6(0x162)]['profiles'][_0x461eca]};_0x32539b[_0x57a0b6(0xf5)]=_0x1de0ff[_0x57a0b6(0x162)]['cacheContract'];const _0x164fb5=_0x32539b,_0x5ee005=_0x5c3a4e[_0x57a0b6(0x157)]?.['find'](_0x326aa6=>_0x326aa6[_0x57a0b6(0x197)]===_0x461eca)?.[_0x57a0b6(0x17a)];if(!_0x5ee005&&_0x164fb5[_0x57a0b6(0xf5)]===0x3)fail('INDEX_RECOVERY_CHANGED');const _0x4fa57b={};_0x4fa57b['workspace']=_0x2cda23,_0x4fa57b[_0x57a0b6(0x197)]=_0x461eca,_0x4fa57b[_0x57a0b6(0x159)]=_0x164fb5,_0x4fa57b[_0x57a0b6(0x164)]=_0x5ee005?.['instanceId'],_0x4fa57b[_0x57a0b6(0xe2)]=!![];const _0x44d193=_0x516401[_0x57a0b6(0x124)](_0x4fa57b);if(_0x5ee005&&JSON[_0x57a0b6(0x13c)](_0x5ee005)!==JSON[_0x57a0b6(0x13c)](_0x44d193[_0x57a0b6(0x17a)]))fail(_0x57a0b6(0x144));for(const _0x21de9a of[path[_0x57a0b6(0xd7)](_0x44d193[_0x57a0b6(0x149)],_0x57a0b6(0xda)),path[_0x57a0b6(0xd7)](_0x44d193[_0x57a0b6(0x138)],_0x57a0b6(0x11c))]){const _0x4f8f1c=_0xbb0ff2(_0x21de9a);if(!_0x4f8f1c||_0x4f8f1c['sha256']!==sha(JSON[_0x57a0b6(0x13c)](_0x44d193[_0x57a0b6(0x17a)])))fail(_0x57a0b6(0x144));}for(const _0x532588 of[...[_0x57a0b6(0xda),_0x57a0b6(0x104),_0x57a0b6(0xef),'cache.lock',_0x57a0b6(0x128)]['map'](_0x4c4be0=>path[_0x57a0b6(0xd7)](_0x44d193[_0x57a0b6(0x149)],_0x4c4be0)),path[_0x57a0b6(0xd7)](_0x44d193[_0x57a0b6(0x138)],_0x57a0b6(0x11c)),..._0x44d193['selectorFile']?[_0x44d193[_0x57a0b6(0xf1)]]:[]])_0x1d896d[_0x57a0b6(0x167)](path[_0x57a0b6(0x175)](_0x2cda23,_0x532588)[_0x57a0b6(0xdc)]('\x5c','/'));const _0x359070=_0x44d193[_0x57a0b6(0xf1)]&&_0xbb0ff2(_0x44d193[_0x57a0b6(0xf1)]);if(_0x359070){const _0x5a014e=_0x438fdf(_0x359070[_0x57a0b6(0x147)]);if(_0x5a014e[_0x57a0b6(0x179)]!==0x1||_0x5a014e['contractId']!==_0x44d193[_0x57a0b6(0x17d)]||_0x5a014e[_0x57a0b6(0x11e)]!==_0x44d193[_0x57a0b6(0x17a)][_0x57a0b6(0x164)]&&_0x5a014e['pending']?.[_0x57a0b6(0x164)]!==_0x44d193['marker'][_0x57a0b6(0x164)]||_0x5a014e['active']===_0x44d193[_0x57a0b6(0x17a)][_0x57a0b6(0x164)]&&_0x5a014e['active']!==_0x57a0b6(0x11a)&&_0xbb0ff2(path[_0x57a0b6(0xd7)](_0x44d193[_0x57a0b6(0x149)],_0x57a0b6(0x128)))?.[_0x57a0b6(0x15c)]!==_0x5a014e[_0x57a0b6(0x150)])fail(_0x57a0b6(0x144));}else{if(_0x164fb5[_0x57a0b6(0xf5)]===0x3&&_0x44d193[_0x57a0b6(0x17a)][_0x57a0b6(0x164)]!==_0x57a0b6(0x11a))fail(_0x57a0b6(0x144));}}let _0x1f290c;if(_0x1de0ff['contract'][_0x57a0b6(0xf5)]===0x3){const _0x4aef86=_0xbb0ff2(path[_0x57a0b6(0xd7)](_0x2cda23,_0x57a0b6(0x17b),_0x5c3a4e[_0x57a0b6(0x148)]+_0x57a0b6(0x174)));if(!_0x4aef86)fail(_0x57a0b6(0x144));_0x1f290c=_0x438fdf(_0x4aef86[_0x57a0b6(0x147)]);if(JSON[_0x57a0b6(0x13c)](_0x1f290c[_0x57a0b6(0x199)])!==JSON[_0x57a0b6(0x13c)](_0x5c3a4e)||![_0x57a0b6(0x182),_0x57a0b6(0x15f)][_0x57a0b6(0x146)](_0x1f290c[_0x57a0b6(0x14b)])||!sameWorkspace(_0x1f290c['workspace'],_0x2cda23)||_0x1f290c['target']?.[_0x57a0b6(0x179)]!==_0x1de0ff[_0x57a0b6(0x179)]||_0x1f290c[_0x57a0b6(0xdd)]?.[_0x57a0b6(0x110)]!==_0x1de0ff[_0x57a0b6(0x110)])fail(_0x57a0b6(0x144));_0x1d896d[_0x57a0b6(0x167)](_0x4aef86[_0x57a0b6(0x160)]);}const _0x3286a2=classifyInterruption({'workspace':_0x2cda23,'execution':_0x5c3a4e,'boot':_0x572099['boot'],'producer':_0x1de0ff,'lifecycle':_0x1f290c,'processIdentity':_0x24a248=>Object[_0x57a0b6(0x169)](_0x572099['processes']||{},_0x24a248)?_0x572099[_0x57a0b6(0x12b)][_0x24a248]:undefined});if(_0x3286a2['status']!==_0x57a0b6(0x120)||_0x3286a2[_0x57a0b6(0x122)]!==_0x572099[_0x57a0b6(0x122)])fail(_0x57a0b6(0x144));if(_0x572099['files'][_0x57a0b6(0x111)](_0x30361e=>!_0x1d896d['has'](_0x30361e[_0x57a0b6(0x160)])))fail(_0x57a0b6(0x144));const _0xc42694={..._0x47bcf9['value']};return _0xc42694[_0x57a0b6(0x140)]=_0x27344d,_0xc42694[_0x57a0b6(0x156)]=_0x47bcf9[_0x57a0b6(0x15c)],_0xc42694;}function inspectIndexInterruption(_0x15a21e,_0x219730={}){const _0x3730fe=_0x14798c;try{_0x15a21e=fs[_0x3730fe(0xf2)](_0x15a21e);const _0x473402=path[_0x3730fe(0xd7)](_0x15a21e,_0x3730fe(0x14a)),_0x846b92=read(_0x15a21e,path['join'](_0x473402,_0x3730fe(0x173))),_0x4840f2=read(_0x15a21e,path[_0x3730fe(0xd7)](_0x473402,_0x3730fe(0x161))),_0x4a4142=['index-maintenance.json',_0x3730fe(0x117)][_0x3730fe(0x115)](_0x5328f9=>read(_0x15a21e,path[_0x3730fe(0xd7)](_0x473402,_0x5328f9)))[_0x3730fe(0xf0)](Boolean);for(const _0x51cdcd of _0x4a4142){for(const _0x423a64 of[..._0x51cdcd[_0x3730fe(0x114)][_0x3730fe(0x196)]||[],..._0x51cdcd[_0x3730fe(0x114)][_0x3730fe(0xf4)]?.[_0x3730fe(0xf3)]?[_0x51cdcd[_0x3730fe(0x114)][_0x3730fe(0xf4)]['recovery']]:[]])validateIndexArchive(_0x15a21e,_0x423a64,_0x219730['publicKey']);}const _0x41f29d=_0x4a4142[_0x3730fe(0xf0)](_0x56654f=>[_0x3730fe(0x153),'unknown'][_0x3730fe(0x146)](_0x56654f[_0x3730fe(0x114)][_0x3730fe(0xf4)]?.[_0x3730fe(0x14b)])&&(path[_0x3730fe(0x185)](_0x56654f[_0x3730fe(0xeb)])!==_0x3730fe(0x117)||!_0x846b92||_0x56654f[_0x3730fe(0x114)][_0x3730fe(0xdd)]?.[_0x3730fe(0x179)]===_0x846b92[_0x3730fe(0x114)][_0x3730fe(0x179)]&&_0x56654f[_0x3730fe(0x114)][_0x3730fe(0xdd)]?.['digest']===_0x846b92[_0x3730fe(0x114)]['digest']&&(_0x56654f[_0x3730fe(0x114)][_0x3730fe(0x16f)]??null)===(_0x846b92['value'][_0x3730fe(0x16f)]??null)));if(!_0x41f29d[_0x3730fe(0x163)]){const _0x3eb4ce=_0x4a4142[_0x3730fe(0x18d)](_0x566a04=>_0x566a04['value'][_0x3730fe(0xf4)]?.['status']==='interrupted'),_0x2b1ae3={};return _0x2b1ae3[_0x3730fe(0x14b)]=_0x3730fe(0xfc),_0x2b1ae3[_0x3730fe(0x181)]=[],_0x3eb4ce?{'status':_0x3730fe(0xe3),...validateIndexArchive(_0x15a21e,_0x3eb4ce[_0x3730fe(0x114)][_0x3730fe(0xf4)][_0x3730fe(0xf3)],_0x219730['publicKey'])}:_0x2b1ae3;}if(_0x41f29d[_0x3730fe(0x163)]!==0x1||!_0x846b92||!_0x4840f2)fail(_0x3730fe(0x100));const _0x17f581=_0x41f29d[0x0],_0x42a3ad=_0x17f581['value'],_0x1532cc=_0x42a3ad[_0x3730fe(0xf4)][_0x3730fe(0x199)],_0x3634a5=_0x846b92[_0x3730fe(0x114)];if(!_0x1532cc||!_0x3634a5[_0x3730fe(0xfb)]||!_0x42a3ad[_0x3730fe(0xfb)]||!sameWorkspace(_0x3634a5[_0x3730fe(0xfb)],_0x15a21e)||!sameWorkspace(_0x42a3ad[_0x3730fe(0xfb)],_0x15a21e)||_0x42a3ad[_0x3730fe(0xdd)]?.['version']!==_0x3634a5['version']||_0x42a3ad[_0x3730fe(0xdd)]?.['digest']!==_0x3634a5['digest']||!Number[_0x3730fe(0xed)](_0x3634a5[_0x3730fe(0x15e)])||_0x3634a5[_0x3730fe(0x15e)]<0x1||[_0x3730fe(0x15e),_0x3730fe(0xd6),'catalogHash',_0x3730fe(0x16f)][_0x3730fe(0x111)](_0x7eabb4=>(_0x42a3ad[_0x7eabb4]??null)!==(_0x3634a5[_0x7eabb4]??null)||(_0x1532cc[_0x7eabb4]??null)!==(_0x3634a5[_0x7eabb4]??null))||!/^[a-f0-9]{64}$/[_0x3730fe(0x145)](_0x3634a5['catalogHash']||'')||_0x4840f2[_0x3730fe(0x114)][_0x3730fe(0x142)]!=='open'||_0x4840f2[_0x3730fe(0x114)][_0x3730fe(0x119)]!==_0x1532cc[_0x3730fe(0x170)]||_0x4840f2[_0x3730fe(0x114)]['generation']!=null&&_0x4840f2[_0x3730fe(0x114)][_0x3730fe(0x15e)]!==_0x3634a5[_0x3730fe(0x15e)]||sha(fs['readFileSync'](safePath(_0x15a21e,path['join'](_0x15a21e,_0x3730fe(0x154)))))!==_0x3634a5[_0x3730fe(0xd6)])fail(_0x3730fe(0x100));const _0x3e73ac=_0x1532cc[_0x3730fe(0x158)]?.[_0x3730fe(0x18f)]||_0x219730[_0x3730fe(0x177)]||_0x3634a5[_0x3730fe(0x18f)]||_0x219730[_0x3730fe(0x121)]&&path[_0x3730fe(0xd7)](_0x219730[_0x3730fe(0x121)],_0x3730fe(0x102),_0x3634a5[_0x3730fe(0x179)]+'-'+_0x3634a5[_0x3730fe(0x110)]),_0x9a9028=verifyIndexProducer(_0x3e73ac,_0x219730[_0x3730fe(0xe1)]);if(_0x9a9028['version']!==_0x3634a5[_0x3730fe(0x179)]||_0x9a9028[_0x3730fe(0x110)]!==_0x3634a5[_0x3730fe(0x110)]||_0x1532cc[_0x3730fe(0x158)]&&(_0x1532cc['producer'][_0x3730fe(0x179)]!==_0x9a9028[_0x3730fe(0x179)]||_0x1532cc[_0x3730fe(0x158)][_0x3730fe(0x110)]!==_0x9a9028[_0x3730fe(0x110)])||_0x1532cc[_0x3730fe(0xf6)]&&_0x1532cc[_0x3730fe(0xf6)]!==_0x9a9028[_0x3730fe(0x162)]['containment'])fail(_0x3730fe(0x134));const _0x14caba=require('../backends/index-cache-authority'),_0x2a3358=[_0x3730fe(0x14f),_0x3730fe(0x187)][_0x3730fe(0x115)](_0x221249=>{const _0x413ac4=_0x3730fe,_0x5d8bfe={..._0x9a9028[_0x413ac4(0x162)][_0x413ac4(0x192)][_0x221249]};_0x5d8bfe['cacheContract']=_0x9a9028[_0x413ac4(0x162)][_0x413ac4(0xf5)];const _0x304a39=_0x5d8bfe,_0xe65a52=_0x1532cc[_0x413ac4(0x157)]?.[_0x413ac4(0x18d)](_0x3393e0=>_0x3393e0[_0x413ac4(0x197)]===_0x221249)?.[_0x413ac4(0x17a)],_0x4a4ac0={};_0x4a4ac0[_0x413ac4(0xfb)]=_0x15a21e,_0x4a4ac0[_0x413ac4(0x197)]=_0x221249,_0x4a4ac0[_0x413ac4(0x159)]=_0x304a39,_0x4a4ac0[_0x413ac4(0x164)]=_0xe65a52?.['instanceId'],_0x4a4ac0['historical']=!![];const _0x2d7c6a=_0x14caba[_0x413ac4(0x124)](_0x4a4ac0);if(!_0x2d7c6a||_0xe65a52&&JSON[_0x413ac4(0x13c)](_0xe65a52)!==JSON[_0x413ac4(0x13c)](_0x2d7c6a[_0x413ac4(0x17a)])||!_0xe65a52&&_0x304a39[_0x413ac4(0xf5)]===0x3)fail(_0x413ac4(0xe0));return validateManagedIndexCache(_0x2d7c6a),_0x2d7c6a;}),_0x3d1f77=/^[a-f0-9-]{36}$/[_0x3730fe(0x145)](_0x1532cc[_0x3730fe(0x148)]||'')?read(_0x15a21e,path[_0x3730fe(0xd7)](_0x473402,_0x3730fe(0x166),_0x1532cc[_0x3730fe(0x148)]+'.json')):null;if(_0x9a9028[_0x3730fe(0x162)][_0x3730fe(0xf5)]===0x3&&(!_0x3d1f77||JSON[_0x3730fe(0x13c)](_0x3d1f77['value'][_0x3730fe(0x199)])!==JSON[_0x3730fe(0x13c)](_0x1532cc)||!['reserved',_0x3730fe(0x15f)][_0x3730fe(0x146)](_0x3d1f77['value']['status'])))fail(_0x3730fe(0x100));const _0x42c4a4=[_0x17f581,_0x846b92,_0x4840f2,..._0x3d1f77?[_0x3d1f77]:[],read(_0x15a21e,path[_0x3730fe(0xd7)](_0x15a21e,_0x3730fe(0x154))),..._0x2a3358['flatMap'](_0x249c58=>[...['authority.json','receipt.json','recovery.json',_0x3730fe(0x151),_0x3730fe(0x128)][_0x3730fe(0x115)](_0x336bd7=>read(_0x15a21e,path[_0x3730fe(0xd7)](_0x249c58[_0x3730fe(0x149)],_0x336bd7))),read(_0x15a21e,path[_0x3730fe(0xd7)](_0x249c58[_0x3730fe(0x138)],_0x3730fe(0x11c))),_0x249c58[_0x3730fe(0xf1)]&&read(_0x15a21e,_0x249c58['selectorFile'])][_0x3730fe(0xf0)](Boolean)),...[_0x3730fe(0x14e),_0x3730fe(0x16c),_0x3730fe(0xfa)][_0x3730fe(0x115)](_0xb9afe7=>read(_0x15a21e,path['join'](_0x473402,_0xb9afe7)))['filter'](Boolean)],_0x1d9280=_0x219730[_0x3730fe(0x155)]===undefined?require('../core/boot-evidence')['captureBootEvidence']():_0x219730[_0x3730fe(0x155)],_0x1d1f4c={},_0x5297a2=_0x219730['processIdentity']||require(_0x3730fe(0x12a))[_0x3730fe(0x16d)],_0x24a3d2=classifyInterruption({'workspace':_0x15a21e,'execution':_0x1532cc,'boot':_0x1d9280,'producer':_0x9a9028,'lifecycle':_0x3d1f77?.[_0x3730fe(0x114)],'processIdentity':_0x27276f=>{const _0x5018d6=_0x5297a2(_0x27276f);return _0x1d1f4c[_0x27276f]=_0x5018d6,_0x5018d6;}}),_0x6e6354={..._0x24a3d2};return _0x6e6354[_0x3730fe(0xfb)]=_0x15a21e,_0x6e6354[_0x3730fe(0x13f)]=_0x17f581,_0x6e6354[_0x3730fe(0x15e)]=_0x846b92,_0x6e6354[_0x3730fe(0x18b)]=_0x4840f2,_0x6e6354[_0x3730fe(0x158)]=_0x9a9028,_0x6e6354[_0x3730fe(0xdf)]=_0x2a3358,_0x6e6354['artifacts']=_0x42c4a4,_0x6e6354[_0x3730fe(0x155)]=_0x1d9280,_0x6e6354['processes']=_0x1d1f4c,_0x6e6354;}catch(_0xad486c){const _0x58217c={};return _0x58217c[_0x3730fe(0x14b)]='unknown',_0x58217c[_0x3730fe(0x122)]=_0xad486c[_0x3730fe(0x118)]||_0x3730fe(0x143),_0x58217c;}}function reconcileIndexInterruption(_0x5e60f0,_0x228b03={}){const _0x2ba02e=_0x14798c;_0x5e60f0=fs[_0x2ba02e(0xf2)](_0x5e60f0);const _0x1384cf=inspectIndexInterruption(_0x5e60f0,_0x228b03);if(!_0x228b03['apply']||![_0x2ba02e(0x120),'interrupted']['includes'](_0x1384cf[_0x2ba02e(0x14b)]))return _0x1384cf;if(_0x1384cf['status']==='interrupted')return _0x1384cf;const _0x183fb1=path[_0x2ba02e(0xd7)](_0x5e60f0,_0x2ba02e(0x14a)),_0x1fca41=[],_0x4cdffd=new Set([_0x2ba02e(0x14e),_0x2ba02e(0x16c),_0x2ba02e(0xfa)][_0x2ba02e(0x115)](_0x168134=>path[_0x2ba02e(0xd7)](_0x183fb1,_0x168134))),_0x317c25=_0x247376=>JSON[_0x2ba02e(0x13c)](_0x247376['filter'](_0xffb4e7=>!_0x4cdffd['has'](_0xffb4e7[_0x2ba02e(0xeb)]))[_0x2ba02e(0x115)](_0x4cc337=>[_0x4cc337[_0x2ba02e(0xeb)],_0x4cc337['sha256']])[_0x2ba02e(0x125)](([_0x302251],[_0x9712ee])=>_0x302251[_0x2ba02e(0xe9)](_0x9712ee)));try{const _0x4e2d46=safePath(_0x5e60f0,path[_0x2ba02e(0xd7)](_0x183fb1,'index-interruptions',_0x1384cf[_0x2ba02e(0x13f)][_0x2ba02e(0x15c)]+_0x2ba02e(0x174)));safePath(_0x5e60f0,path[_0x2ba02e(0x123)](_0x4e2d46),!![]);let _0x59aca9=read(_0x5e60f0,_0x4e2d46)?.[_0x2ba02e(0x114)];const _0x1237c8=_0x3da166=>{const _0x4c5b88=_0x2ba02e;if(!/[/\\]selectors[/\\][a-f0-9]{64}\.json$/[_0x4c5b88(0x145)](_0x3da166[_0x4c5b88(0xeb)])||!_0x59aca9)return![];const _0x461561=_0x3da166['value'],_0x5b49ec=_0x461561?.['pending'],_0x21a271=_0x59aca9[_0x4c5b88(0x13b)]?.[_0x4c5b88(0x18d)](_0x3037ab=>_0x3037ab['original']===path[_0x4c5b88(0x175)](_0x5e60f0,_0x3da166[_0x4c5b88(0xeb)])[_0x4c5b88(0xdc)]('\x5c','/')),_0x135160=_0x21a271&&JSON['parse'](Buffer['from'](_0x21a271[_0x4c5b88(0x18a)],_0x4c5b88(0x180)));return _0x461561[_0x4c5b88(0x179)]===0x1&&_0x5b49ec?.[_0x4c5b88(0x164)]===_0x59aca9['recoveryId']&&_0x5b49ec[_0x4c5b88(0x13a)]===_0x59aca9[_0x4c5b88(0x13a)]&&_0x5b49ec[_0x4c5b88(0x156)]===sha(JSON[_0x4c5b88(0x13c)](_0x59aca9))&&_0x461561[_0x4c5b88(0x11e)]===(_0x135160?.[_0x4c5b88(0x11e)]||_0x4c5b88(0x11a));};if(_0x59aca9&&(_0x59aca9[_0x2ba02e(0x16e)]!==_0x1384cf[_0x2ba02e(0x13f)][_0x2ba02e(0x15c)]||_0x59aca9[_0x2ba02e(0x148)]!==_0x1384cf[_0x2ba02e(0x13f)][_0x2ba02e(0x114)][_0x2ba02e(0xf4)][_0x2ba02e(0x199)][_0x2ba02e(0x148)]||_0x59aca9[_0x2ba02e(0x137)]!==_0x1384cf['generation'][_0x2ba02e(0x15c)]||_0x59aca9[_0x2ba02e(0x105)]!==_0x1384cf[_0x2ba02e(0x18b)][_0x2ba02e(0x15c)]||_0x1384cf['artifacts'][_0x2ba02e(0x111)](_0x61b73c=>![_0x2ba02e(0x14e),_0x2ba02e(0x16c),_0x2ba02e(0xfa)][_0x2ba02e(0x146)](path['basename'](_0x61b73c['file']))&&!_0x59aca9[_0x2ba02e(0x13b)]?.['some'](_0x604d57=>_0x604d57[_0x2ba02e(0x160)]===path['relative'](_0x5e60f0,_0x61b73c[_0x2ba02e(0xeb)])[_0x2ba02e(0xdc)]('\x5c','/')&&_0x604d57[_0x2ba02e(0x15c)]===_0x61b73c[_0x2ba02e(0x15c)])&&!_0x1237c8(_0x61b73c))))fail(_0x2ba02e(0x144));if(!_0x59aca9){const _0x1a3fb8=crypto[_0x2ba02e(0xf7)](),_0x1f1361=_0x1384cf['artifacts'][_0x2ba02e(0x115)](_0xb8a45b=>({'path':path[_0x2ba02e(0x175)](_0x183fb1,_0xb8a45b['file'])[_0x2ba02e(0x10c)]('..')?'cache-markers/'+sha(path[_0x2ba02e(0x175)](_0x5e60f0,_0xb8a45b[_0x2ba02e(0xeb)]))+_0x2ba02e(0x174):path[_0x2ba02e(0x175)](_0x183fb1,_0xb8a45b[_0x2ba02e(0xeb)])[_0x2ba02e(0xdc)]('\x5c','/'),'original':path[_0x2ba02e(0x175)](_0x5e60f0,_0xb8a45b[_0x2ba02e(0xeb)])[_0x2ba02e(0xdc)]('\x5c','/'),'sha256':_0xb8a45b['sha256'],'bytes':_0xb8a45b['bytes'][_0x2ba02e(0x186)]('base64')})),_0x1b2841={};_0x1b2841[_0x2ba02e(0x179)]=0x1,_0x1b2841[_0x2ba02e(0xfb)]=_0x5e60f0,_0x1b2841[_0x2ba02e(0x13a)]=_0x1a3fb8,_0x1b2841['attemptId']=_0x1384cf['checkpoint'][_0x2ba02e(0x114)]['indexResult'][_0x2ba02e(0x199)][_0x2ba02e(0x148)],_0x1b2841[_0x2ba02e(0x16e)]=_0x1384cf[_0x2ba02e(0x13f)][_0x2ba02e(0x15c)],_0x1b2841[_0x2ba02e(0x137)]=_0x1384cf['generation'][_0x2ba02e(0x15c)],_0x1b2841[_0x2ba02e(0x105)]=_0x1384cf[_0x2ba02e(0x18b)]['sha256'],_0x1b2841[_0x2ba02e(0x112)]='unknown',_0x1b2841[_0x2ba02e(0x122)]=_0x1384cf['reason'],_0x1b2841[_0x2ba02e(0x155)]=_0x1384cf[_0x2ba02e(0x155)],_0x1b2841[_0x2ba02e(0x12b)]=_0x1384cf[_0x2ba02e(0x12b)],_0x1b2841[_0x2ba02e(0x158)]=_0x1384cf[_0x2ba02e(0x158)],_0x1b2841[_0x2ba02e(0x130)]={},_0x1b2841[_0x2ba02e(0x13b)]=_0x1f1361,_0x1b2841[_0x2ba02e(0x130)][_0x2ba02e(0x14f)]=_0x1a3fb8,_0x1b2841[_0x2ba02e(0x130)][_0x2ba02e(0x187)]=_0x1a3fb8,_0x59aca9=_0x1b2841,preserveArchiveBytes(_0x4e2d46,JSON[_0x2ba02e(0x13c)](_0x59aca9));}const {acquireExactRuntimeLock:_0x317b07}=require(_0x2ba02e(0x190));for(const _0x47e1e9 of[_0x2ba02e(0x14e),'update.lock',_0x2ba02e(0xfa)]){const _0x49ac36=safePath(_0x5e60f0,path[_0x2ba02e(0xd7)](_0x183fb1,_0x47e1e9)),_0x53b170=_0x1384cf[_0x2ba02e(0x131)]['find'](_0x4d71c5=>_0x4d71c5[_0x2ba02e(0xeb)]===_0x49ac36)?.[_0x2ba02e(0x18a)]||null,_0x338dc7=_0x317b07(_0x49ac36,_0x53b170);if(!_0x338dc7)fail(_0x2ba02e(0x152));_0x1fca41[_0x2ba02e(0x109)](_0x338dc7);}const _0x17f638=inspectIndexInterruption(_0x5e60f0,_0x228b03);if(_0x17f638[_0x2ba02e(0x14b)]!==_0x2ba02e(0x120)||_0x1384cf[_0x2ba02e(0x13f)][_0x2ba02e(0x15c)]!==_0x17f638[_0x2ba02e(0x13f)][_0x2ba02e(0x15c)]||_0x1384cf[_0x2ba02e(0x15e)][_0x2ba02e(0x15c)]!==_0x17f638['generation'][_0x2ba02e(0x15c)]||_0x1384cf['fence'][_0x2ba02e(0x15c)]!==_0x17f638[_0x2ba02e(0x18b)]['sha256']||_0x317c25(_0x1384cf['artifacts'])!==_0x317c25(_0x17f638[_0x2ba02e(0x131)]))fail(_0x2ba02e(0x144));for(const _0x13592a of _0x1384cf['artifacts'])if(!_0x4cdffd['has'](_0x13592a[_0x2ba02e(0xeb)])&&!fs[_0x2ba02e(0xf9)](_0x13592a[_0x2ba02e(0xeb)])[_0x2ba02e(0x191)](_0x13592a['bytes']))fail(_0x2ba02e(0x144));const _0x50b0ea=safePath(_0x5e60f0,path[_0x2ba02e(0xd7)](_0x5e60f0,'.agents/recovery-backups',_0x2ba02e(0x198)+_0x59aca9[_0x2ba02e(0x13a)]),!![]),_0x442310=Buffer['from'](JSON[_0x2ba02e(0x13c)](_0x59aca9));preserveArchiveBytes(safePath(_0x5e60f0,path[_0x2ba02e(0xd7)](_0x50b0ea,_0x2ba02e(0x132))),_0x442310);for(const _0x5bfba0 of _0x59aca9['files']){const _0x755477=Buffer['from'](_0x5bfba0[_0x2ba02e(0x18a)],'base64');if(sha(_0x755477)!==_0x5bfba0[_0x2ba02e(0x15c)])fail(_0x2ba02e(0x144));const _0x452c42=safePath(_0x5e60f0,path[_0x2ba02e(0xd7)](_0x50b0ea,_0x5bfba0['path']));safePath(_0x5e60f0,path[_0x2ba02e(0x123)](_0x452c42),!![]),preserveArchiveBytes(_0x452c42,_0x755477);}const _0x2d89bc={'recoveryId':_0x59aca9[_0x2ba02e(0x13a)],'archiveHash':sha(_0x442310)};validateIndexArchive(_0x5e60f0,_0x2d89bc,_0x228b03['publicKey']);const _0x1e8c1a=inspectIndexInterruption(_0x5e60f0,_0x228b03);if(_0x1e8c1a[_0x2ba02e(0x14b)]!==_0x2ba02e(0x120)||_0x1e8c1a['checkpoint'][_0x2ba02e(0x15c)]!==_0x59aca9[_0x2ba02e(0x16e)]||_0x1e8c1a[_0x2ba02e(0x15e)][_0x2ba02e(0x15c)]!==_0x59aca9[_0x2ba02e(0x137)]||_0x1e8c1a[_0x2ba02e(0x18b)][_0x2ba02e(0x15c)]!==_0x59aca9[_0x2ba02e(0x105)]||_0x317c25(_0x1384cf[_0x2ba02e(0x131)])!==_0x317c25(_0x1e8c1a[_0x2ba02e(0x131)])||_0x1fca41[_0x2ba02e(0x111)](_0x150100=>!_0x150100[_0x2ba02e(0xfe)]()))fail('INDEX_RECOVERY_CHANGED');for(const _0x31c1e2 of _0x1384cf['artifacts'])if(!_0x4cdffd[_0x2ba02e(0x106)](_0x31c1e2['file'])&&!fs[_0x2ba02e(0xf9)](_0x31c1e2['file'])[_0x2ba02e(0x191)](_0x31c1e2[_0x2ba02e(0x18a)]))fail(_0x2ba02e(0x144));const _0x10196c=_0x1e8c1a['checkpoint'][_0x2ba02e(0x114)];for(const _0x3d89de of[_0x2ba02e(0x14f),'code-review-graph']){const _0x6e4348=require(_0x2ba02e(0x11f)),_0xa32677={};_0xa32677[_0x2ba02e(0xfb)]=_0x5e60f0,_0xa32677['kind']=_0x3d89de,_0xa32677[_0x2ba02e(0x159)]={..._0x1e8c1a[_0x2ba02e(0x158)][_0x2ba02e(0x162)][_0x2ba02e(0x192)][_0x3d89de]},_0xa32677[_0x2ba02e(0xe2)]=!![],_0xa32677[_0x2ba02e(0x159)][_0x2ba02e(0xf5)]=0x3;const _0x1a0b72=_0x6e4348[_0x2ba02e(0x124)](_0xa32677);_0x6e4348[_0x2ba02e(0x129)](_0x1a0b72,_0x2d89bc,_0x228b03['publicKey']);}const _0x2d4979={..._0x10196c};_0x2d4979['indexRecoveries']=[..._0x10196c[_0x2ba02e(0x196)]||[],_0x2d89bc],_0x2d4979[_0x2ba02e(0xf4)]={..._0x10196c[_0x2ba02e(0xf4)]},_0x2d4979[_0x2ba02e(0xf4)][_0x2ba02e(0x14b)]='interrupted',_0x2d4979[_0x2ba02e(0xf4)][_0x2ba02e(0x112)]=_0x2ba02e(0x193),_0x2d4979[_0x2ba02e(0xf4)]['code']=_0x2ba02e(0x194),_0x2d4979[_0x2ba02e(0xf4)][_0x2ba02e(0x113)]=!![],_0x2d4979[_0x2ba02e(0xf4)]['recovery']=_0x2d89bc,require('../backends/index-store')[_0x2ba02e(0xd9)](_0x1e8c1a[_0x2ba02e(0x13f)][_0x2ba02e(0xeb)],_0x2d4979);const _0x47aad4={};return _0x47aad4['status']='interrupted',_0x47aad4[_0x2ba02e(0x13a)]=_0x59aca9['recoveryId'],_0x47aad4['archiveHash']=_0x2d89bc[_0x2ba02e(0x156)],_0x47aad4[_0x2ba02e(0x140)]=_0x50b0ea,_0x47aad4;}catch(_0x58c1d4){const _0x1b565c={};return _0x1b565c[_0x2ba02e(0x14b)]='unknown',_0x1b565c[_0x2ba02e(0x122)]=_0x58c1d4[_0x2ba02e(0x118)]||_0x2ba02e(0x136),_0x1b565c;}finally{for(const _0x49ea00 of _0x1fca41[_0x2ba02e(0x15a)]())_0x49ea00();}}function validateRetiredCacheArtifact(_0x153c91,_0x1aa9da,_0x179933,_0x156b39){const _0x550301=_0x14798c;try{_0x153c91=fs['realpathSync'](_0x153c91),safePath(_0x153c91,_0x1aa9da);const _0xe50c2a=path[_0x550301(0x175)](_0x153c91,_0x1aa9da)[_0x550301(0xdc)]('\x5c','/'),_0x5375af=sha(_0x179933),_0x1375ba=[_0x550301(0xdb),_0x550301(0x117)][_0x550301(0x115)](_0x4ad0db=>read(_0x153c91,path[_0x550301(0xd7)](_0x153c91,'.agents/runtime',_0x4ad0db)))['filter'](Boolean);for(const _0x288729 of _0x1375ba)for(const _0x157c82 of[..._0x288729[_0x550301(0x114)][_0x550301(0x196)]||[],..._0x288729[_0x550301(0x114)][_0x550301(0xf4)]?.[_0x550301(0xf3)]?[_0x288729['value'][_0x550301(0xf4)][_0x550301(0xf3)]]:[]]){const _0x31ab76=validateIndexArchive(_0x153c91,_0x157c82,_0x156b39);if(_0x1375ba['some'](_0x3d3960=>['running',_0x550301(0x193)]['includes'](_0x3d3960[_0x550301(0x114)][_0x550301(0xf4)]?.[_0x550301(0x14b)])&&_0x3d3960[_0x550301(0x114)]['indexResult'][_0x550301(0x199)]?.[_0x550301(0x148)]===_0x31ab76[_0x550301(0x148)]))continue;const _0x46415b=_0x31ab76['files'][_0x550301(0x18d)](_0x542529=>_0x542529[_0x550301(0x160)]===_0xe50c2a&&_0x542529[_0x550301(0x15c)]===_0x5375af);if(!_0x46415b||!/^\.agents\/runtime\/backends\/(codegraph|code-review-graph)\/caches\/[a-f0-9]{24}\/(receipt|recovery)\.json$/['test'](_0xe50c2a))continue;if(!fs[_0x550301(0xf9)](_0x1aa9da)[_0x550301(0x191)](Buffer[_0x550301(0x18e)](_0x179933))||!fs['readFileSync'](path['join'](_0x31ab76[_0x550301(0x140)],_0x46415b[_0x550301(0x147)]))[_0x550301(0x191)](Buffer[_0x550301(0x18e)](_0x179933)))continue;return!![];}}catch{}return![];}const _0x37f28c={};_0x37f28c[_0x14798c(0xde)]=inspectIndexInterruption,_0x37f28c['reconcileIndexInterruption']=reconcileIndexInterruption,_0x37f28c[_0x14798c(0x14d)]=validateIndexArchive,_0x37f28c[_0x14798c(0x16b)]=validateRetiredCacheArtifact,module[_0x14798c(0x176)]=_0x37f28c;function _0x2798(){const _0xb990d2=['C3rVCfjLyxnVBG','DxbKyxrLlxrYyw5Zywn0Aw9UlMPZB24','y29Kzq','zxbVy2G','mdaWmdaWmdaTmdaWmc0WmdaWltaWmdaTmdaWmdaWmdaWmdaW','DhjLzunVBMzPCM1Lza','lMfWDc1Tyw5Hz2vKlMPZB24','D2LUzg93CY1QB2iTB2jQzwn0','ywn0AxzL','lI4VyMfJA2vUzhmVAw5KzxGTy2fJAguTyxv0Ag9YAxr5','CMvJB3zLCMfIBguTAw50zxjYDxb0Aw9U','CNvUDgLTzvjVB3q','CMvHC29U','zgLYBMfTzq','CMvZB2X2zu1HBMfNzwrjBMrLEenHy2HL','C29YDa','ntmWotuYveX6Dfjk','lI4Vy29Yzs93B3jRC3bHy2uTCgf0Aa','ChvIBgLJyxrPB24UANnVBG','C3rHz2vnyw5Hz2vKsw5KzxHdywnOzq','lI4Vy29Yzs9IB290lwv2AwrLBMnL','ChjVy2vZC2vZ','DMfSAwrtyw1Ltgf1BMnOqM9VDa','ru5pru5u','ywn0AxzLuhjVy2vZC2vZ','Aw5ZCgvJDfn0B3bWzwrczwzVCMvcB290','Aw5ZDgfUy2vZ','yxj0AwzHy3rZ','yMfJA3vWlMPZB24','C2vW','su5ervHFufjprfvdrvjFvu5wrvjjrKLfra','CMvZB2X2zq','su5ervHFuKvdt1zfuLLFvu5wrvjjrKLfra','z2vUzxjHDgLVBKHHC2G','y2fJAgveAxjLy3rVCNK','CgfYC2u','CMvJB3zLCNLjza','zMLSzxm','C3rYAw5NAwz5','lI4Vy29Yzs9YzwnVDMvYEs1HCMnOAxzL','zgLHz25VC3rPyW','y2HLy2TWB2LUDa','yxjJAgL2zq','zM9Yy2u','C3rHDgu','su5ervHFrvzjrevoq0vFvu5wrvjjrKLfra','su5ervHFuKvdt1zfuLLFq0HbtKDfra','DgvZDa','Aw5JBhvKzxm','Cgf0Aa','yxr0zw1WDeLK','C3rHDgveAxjLy3rVCNK','lMfNzw50CY9YDw50Aw1L','C3rHDhvZ','ufjprfvdveLptL9qvujmsunFs0vz','DMfSAwrHDgvjBMrLEefYy2HPDMu','zxHLy3v0B3iUBg9JAW','y29KzwDYyxbO','ChvIBgLJyxrPB25iyxnO','y2fJAguUBg9JAW','su5ervHFuKvdt1zfuLLFqLvtwq','CNvUBMLUzW','lMfNzw50CY9Tyw5PzMvZDc5QC29U','yM9VDa','yxjJAgL2zuHHC2G','y2fJAgvZ','ChjVzhvJzxi','ChjVzMLSzq','CMv2zxjZzq','nZyZmdrbB05ACNG','C2HHmJu2','DhjPBq','z2vUzxjHDgLVBG','C3rVChbLza','B3jPz2LUywW','ywrTAxnZAw9UlMPZB24','y29UDhjHy3q','BgvUz3rO','Aw5ZDgfUy2vjza','AxnbCNjHEq','Aw5KzxGTyxr0zw1WDhm','ywrK','CMvJB3jKzwqTAw5KzxGTAM9Ilxn0B3bWzwq','AgfZt3DU','mZGZmtz5wxHVCLe','DMfSAwrHDgvszxrPCMvKq2fJAgvbCNrPzMfJDa','DxbKyxrLlMXVy2S','CMvHzfbYB2nLC3njzgvUDgL0Eq','y2HLy2TWB2LUDeHHC2G','DhjHBNnHy3rPB25jza','zMvUy2vfCg9JAa','y29UDgfPBM1LBNrfDMLKzw5Jzq','BM9KztPWyxrO','z2vUzxjHDgLVBI5QC29U','lMPZB24','CMvSyxrPDMu','zxHWB3j0CW','ChjVzhvJzxjszwXLyxnL','BM9KztPJCNLWDg8','DMvYC2LVBG','BwfYA2vY','lMfNzw50CY9YDw50Aw1Ll2LUzgv4lwf0DgvTChrZ','yNjVA2vYugLK','y29UDhjHy3rjza','ChjVy2vZC0LKzw50Axr5','yxnZAwDUBwvUDenVBMzPCM1Lza','yMfZzty0','zw50CMLLCW','CMvZzxj2zwq','nZe2nta0vMLhsuzZ','C2H1DgrVD25fDMLKzw5Jzq','yMfZzw5HBwu','Dg9tDhjPBMC','y29Kzs1YzxzPzxCTz3jHCgG','AM9I','BM9KztPMCW','yNL0zxm','zMvUy2u','Bgf1BMnOzxjqCM9JzxnZu3rHCNq','zMLUza','zNjVBq','CMvSzwfZzq','lI4Vy29Yzs9VD25Lzc1SB2nR','zxf1ywXZ','ChjVzMLSzxm','Dw5RBM93BG','su5ervHFsu5urvjsvvburuq','lMfNzw50CY9YDw50Aw1Ll2DLBMvYyxrPB24UANnVBG','Aw5KzxHszwnVDMvYAwvZ','A2LUza','Aw5KzxGT','zxHLy3v0Aw9U','lI4Vy29Yzs9YzwnVDMvYEs1WCM9VzG','z3jHy2vMDwW','C3rVCev2AwrLBMnLq29UDhjHy3q','CMvZB3vYy2veAwDLC3q','AM9PBG','y2XVC2vKqxq','yxrVBwLJ','yxv0Ag9YAxr5lMPZB24','Aw5KzxGTBwfPBNrLBMfUy2uUANnVBG','CMvWBgfJzufSBa','DgfYz2v0','Aw5ZCgvJDeLUzgv4sw50zxjYDxb0Aw9U','yxv0Ag9YAxrPzxm','su5ervHFq0fdsevFvu5wrvjjrKLfra','ChvIBgLJs2v5','AgLZDg9YAwnHBa','Aw50zxjYDxb0zwq','nJGZmJaWChbry3PK','y29VCMrPBMf0B3jqAwq','zMLUzeLUzgv4','ovbvtKDJsa','C291CMnL','Bg9JywXLq29TCgfYzq','C3rYAw5N','zMLSzq','lMfNzw50CY9YDw50Aw1LlW','AxntywzLsw50zwDLCG','mti4mtrtCLzcv08','CMvJB3zLCNKUANnVBG','zMLSDgvY','C2vSzwn0B3jgAwXL','CMvHBhbHDgHtEw5J','CMvJB3zLCNK','Aw5KzxHszxn1Bhq','y2fJAgvdB250CMfJDa','y29UDgfPBM1LBNq','CMfUzg9Tvvvjra','Bwv0Ag9K','CMvHzezPBgvtEw5J','ywrTAxnZAw9UlMPZB24UBg9JAW','D29YA3nWywnL','y2XLyxi','nZjHufzowNm','B3DUzwq','Aw5KzxGTC3rVCc1LDMLKzw5Jzs1Yzxf1AxjLza','su5ervHFqvvuse9ssvrzx1vovKvssuzjruq','y2f0ywXVz0HHC2G','CMvSzwfZzxm','y29VCMrPBMf0B3jqCM9JzxnZu3rHCNq','CMvJzwLWDc5QC29U','zMvUy2viyxnO','AgfZ','ChjVy2vZC1n0yxj0','Dg9ju09tDhjPBMC','ChvZAa','B3bLBG','B2jZzxj2zwruAw1L','C3rHCNrZv2L0Aa','AM9IlxrYzwu','Bgf1BMnOzxjqAwq','odK5mdGWvfvesNLO','zgLNzxn0','C29Tzq','B3v0y29Tzq','CMv0CNLHyMXL','DMfSDwu','BwfW'];_0x2798=function(){return _0xb990d2;};return _0x2798();}
|
|
1
|
+
'use strict';const _0x394b83=_0x47be;(function(_0x16e53f,_0x175b78){const _0x5f28e1=_0x47be,_0x39b7af=_0x16e53f();while(!![]){try{const _0x4cf6b9=parseInt(_0x5f28e1(0x162))/0x1+-parseInt(_0x5f28e1(0x189))/0x2+-parseInt(_0x5f28e1(0xf9))/0x3+-parseInt(_0x5f28e1(0x16e))/0x4+parseInt(_0x5f28e1(0x108))/0x5*(parseInt(_0x5f28e1(0x13e))/0x6)+parseInt(_0x5f28e1(0x168))/0x7+-parseInt(_0x5f28e1(0xe4))/0x8*(-parseInt(_0x5f28e1(0xed))/0x9);if(_0x4cf6b9===_0x175b78)break;else _0x39b7af['push'](_0x39b7af['shift']());}catch(_0x3ea0e9){_0x39b7af['push'](_0x39b7af['shift']());}}}(_0x54ed,0x8e66f));function _0x47be(_0x94ead7,_0xc8382b){_0x94ead7=_0x94ead7-0xe3;const _0x54eda9=_0x54ed();let _0x47be7d=_0x54eda9[_0x94ead7];if(_0x47be['iJzOir']===undefined){var _0xe1af93=function(_0x5aa1e0){const _0x6644c2='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x2da718='',_0x52ae73='';for(let _0x5c4b4f=0x0,_0x59b13c,_0x5d5967,_0x314e4e=0x0;_0x5d5967=_0x5aa1e0['charAt'](_0x314e4e++);~_0x5d5967&&(_0x59b13c=_0x5c4b4f%0x4?_0x59b13c*0x40+_0x5d5967:_0x5d5967,_0x5c4b4f++%0x4)?_0x2da718+=String['fromCharCode'](0xff&_0x59b13c>>(-0x2*_0x5c4b4f&0x6)):0x0){_0x5d5967=_0x6644c2['indexOf'](_0x5d5967);}for(let _0x4870ba=0x0,_0x222a50=_0x2da718['length'];_0x4870ba<_0x222a50;_0x4870ba++){_0x52ae73+='%'+('00'+_0x2da718['charCodeAt'](_0x4870ba)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x52ae73);};_0x47be['rAXrHR']=_0xe1af93,_0x47be['rZEBUV']={},_0x47be['iJzOir']=!![];}const _0x2ccdd1=_0x54eda9[0x0],_0x21d474=_0x94ead7+_0x2ccdd1,_0x44a2f8=_0x47be['rZEBUV'][_0x21d474];return!_0x44a2f8?(_0x47be7d=_0x47be['rAXrHR'](_0x47be7d),_0x47be['rZEBUV'][_0x21d474]=_0x47be7d):_0x47be7d=_0x44a2f8,_0x47be7d;}function _0x54ed(){const _0x52366b=['ChvIBgLJyxrPB24UANnVBG','C2H1DgrVD25fDMLKzw5Jzq','B3v0y29Tzq','yxnZAwDUBwvUDenVBMzPCM1Lza','CMvZB2X2zu1HBMfNzwrjBMrLEenHy2HL','lI4Vy29Yzs9VD25Lzc1SB2nR','DgvZDa','ru5pru5u','CMvJB3zLCMfIBguTAw50zxjYDxb0Aw9U','DhjLzunVBMzPCM1Lza','CMvJB3jKzwqTAw5KzxGTAM9Ilxn0B3bWzwq','y2fJAguUBg9JAW','y2HLy2TWB2LUDa','lMfNzw50CY9Tyw5PzMvZDc5QC29U','lMfWDc1Tyw5Hz2vKlMPZB24','su5ervHFufjprfvdrvjFvu5wrvjjrKLfra','yxnZAwDU','y2XLyxi','lMfNzw50CY9YzwnVDMvYEs1IywnRDxbZ','y2f0ywXVz0HHC2G','su5ervHFqvvuse9ssvrzx1vovKvssuzjruq','C3rHDhvZ','zNjVBq','zMLSzq','DMfSAwrHDgvszxrPCMvKq2fJAgvbCNrPzMfJDa','D2LUzg93CY1QB2iTB2jQzwn0','C2HHmJu2','yMfZzty0','CMvSyxrPDMu','ChjVzMLSzxm','Aw50zxjYDxb0zwq','Dw5RBM93BG','Aw5KzxGTAw50zxjYDxb0Aw9UCW','y29Kzq','ywrK','Aw5KzxHszxn1Bhq','ywn0AxzL','ChjVy2vZC2vZ','yxjJAgL2zuHHC2G','zgLYBMfTzq','C3rHDgu','zMLUza','Aw5KzxGTBwfPBNrLBMfUy2uUANnVBG','DgfYz2v0','CMvZzxj2zwq','CMvWBgfJzufSBa','B3DUzwq','zMLSzxm','mtjNshDcqxe','DMfSAwrtyw1Ltgf1BMnOqM9VDa','DMvYC2LVBG','lMfNzw50CY9YDw50Aw1Ll2DLBMvYyxrPB24UANnVBG','y29KzwDYyxbO','lMfNzw50CY9YDw50Aw1Ll2LUzgv4lwf0DgvTChrZ','CMvJB3zLCNKUANnVBG','y29UDgfPBM1LBNq','B3bLBG','yxjJAgL2zq','zgLHz25VC3rPyW','BgvUz3rO','CgfYC2u','B3jPz2LUywW','ywn0AxzLuhjVy2vZC2vZ','AxnbCNjHEq','BwfYA2vY','zxHWB3j0CW','CMvJB3zLCNK','C2vW','AxntywzLsw50zwDLCG','AgfZt3DU','B2jZzxj2zwruAw1L','DxbKyxrLlxrYyw5Zywn0Aw9UlMPZB24','CMvHC29U','lI4Vy29Yzs93B3jRC3bHy2uTCgf0Aa','CMvJB3zLCNLjza','ywrTAxnZAw9UlMPZB24UBg9JAW','Bg9JywXLq29TCgfYzq','z2vUzxjHDgLVBKHHC2G','C3rHCNrZv2L0Aa','y2fJAgvZ','AM9PBG','yM9VDa','z3jHy2vMDwW','C3rHDgveAxjLy3rVCNK','nduWmZC4qwvHAxzu','zMvUy2u','C3rVChbLza','ufjprfvdveLptL9qvujmsunFs0vz','zxf1ywXZ','yxv0Ag9YAxr5lMPZB24','mZm0mdC5ouLODMjgDW','CMvSzwfZzxm','Aw5ZDgfUy2vZ','ChjVy2vZC0LKzw50Axr5','su5ervHFuKvdt1zfuLLFvu5wrvjjrKLfra','BwfW','mZa3mtqYogDMv0n2za','zMvUy2viyxnO','su5ervHFq0fdsevFvu5wrvjjrKLfra','mdaWmdaWmdaTmdaWmc0WmdaWltaWmdaTmdaWmdaWmdaWmdaW','ChjVy2vZCY1UB3qTyMvMB3jLlwjVB3q','su5ervHFrvzjrevoq0vFvu5wrvjjrKLfra','zxHLy3v0B3iUBg9JAW','C291CMnL','lI4Vy29Yzs9YzwnVDMvYEs1WCM9VzG','Bgf1BMnOzxjqAwq','su5ervHFuKvdt1zfuLLFq0HbtKDfra','z2vUzxjHDgLVBG','y29VCMrPBMf0B3jqAwq','C2vSzwn0B3jgAwXL','yNL0zxm','CMvHzezPBgvtEw5J','lI4VyMfJA2vUzhmVAw5KzxGTC3rVCMu','y2fJAgveAxjLy3rVCNK','su5ervHFsu5urvjsvvburuq','CMv2zxjZzq','lI4Vy29Yzs9IB290lwv2AwrLBMnL','lMfNzw50CY9YDw50Aw1L','y29Kzs1YzxzPzxCTz3jHCgG','DxbKyxrLlMXVy2S','A2LUza','lMfNzw50CY9YDw50Aw1Ll2fKBwLZC2LVBI5QC29U','y2HLy2TWB2LUDeHHC2G','mteZndKZohnRyMXKsa','Dg9ju09tDhjPBMC','C29Tzq','su5ervHFuKvdt1zfuLLFqLvtwq','Aw5ZDgfUy2vjza','lMPZB24','Bgf1BMnOzxjqCM9JzxnZu3rHCNq','CMvJzwLWDc5QC29U','DMfSDwu','CMvSzwfZzq','Aw5KzxGT','AM9I','CMvHBhbHDgHtEw5J','lI4VBgLJzw5Zzs92zxjPzNK','CgLK','zMLSDgvY','zgLNzxn0','yxr0zw1WDeLK','ywrTAxnZAw9UlMPZB24','AgfZ','ofH1C3jizW','y2fJAgvdB250CMfJDa','DhjPBq','yxbWBhK','DMfSAwrmyxvUy2HcB290','C3rYAw5NAwz5','BM9KztPMCW','C3rYAw5N','DhjHBNnHy3rPB25jza','mtiXnta5nJncyxfRv3m','zw50CMLLCW','ChvIBgLJyxrPB25iyxnO','y29VCMrPBMf0B3jqCM9JzxnZu3rHCNq','zM9Yy2u','ChvIBgLJs2v5','Aw5KzxHszwnVDMvYAwvZ','Cgf0Aa','zMXHDe1HCa','lI4VyMfJA2vUzhmVAw5KzxGTy2fJAguTyxv0Ag9YAxr5','y29UDhjHy3rjza','CMfUzg9Tvvvjra','mteWmdK5n2Pqq2HPtW','CNvUBMLUzW','C3rVCev2AwrLBMnLq29UDhjHy3q','Aw5JBhvKzxm','zxbVy2G','zxHLy3v0Aw9U','yNjVA2vYugLK','yxj0AwzHy3rZ','D29YA3nWywnL','yxv0Ag9YAxrPzxm','CMvZB3vYy2veAwDLC3q','y29UDhjHy3q','Aw5ZCgvJDeLUzgv4sw50zxjYDxb0Aw9U','z2vUzxjHDgLVBI5QC29U','ChjVzMLSzq','mtK2ntvAAhfnAhy','Dg9tDhjPBMC','AgLZDg9YAwnHBa','ChjVzhvJzxi','lMfNzw50CY9YDw50Aw1LlW','y2XVC2vKqxq'];_0x54ed=function(){return _0x52366b;};return _0x54ed();}const fs=require(_0x394b83(0xea)),path=require('node:path'),crypto=require('node:crypto'),{preserveArchiveBytes}=require('../core/recovery-archive'),{sameWorkspace}=require(_0x394b83(0x157)),{verifyIndexProducer,sha}=require(_0x394b83(0x176)),{safePath,validateManagedIndexCache}=require(_0x394b83(0xf6)),fail=_0x356e27=>{const _0x4e3bc0=_0x394b83;throw Object[_0x4e3bc0(0x11e)](Error(_0x356e27),{'code':_0x356e27});},read=(_0x22531c,_0x29b3fc)=>{const _0x45acfe=_0x394b83;safePath(_0x22531c,_0x29b3fc);try{const _0x4532fa=fs['readFileSync'](_0x29b3fc);return{'file':_0x29b3fc,'bytes':_0x4532fa,'sha256':sha(_0x4532fa),'value':JSON[_0x45acfe(0x14a)](_0x4532fa)};}catch(_0x2c0e91){if(_0x2c0e91[_0x45acfe(0x12f)]===_0x45acfe(0x115))return null;throw _0x2c0e91;}};function classifyInterruption({workspace:_0x598321,execution:_0x3bfd4d,boot:_0x2abe13,processIdentity:_0x27088d,producer:_0x314b8a,lifecycle:_0x1d2aa9}){const _0x6924f6=_0x394b83,_0x1b2ead=require('../core/boot-evidence'),_0x300040={};_0x300040[_0x6924f6(0xfe)]=_0x3bfd4d,_0x300040[_0x6924f6(0x15f)]=_0x2abe13,_0x300040[_0x6924f6(0x16b)]=_0x27088d;const _0x5ef8ec=_0x1b2ead['inspectStoppedBeforeBoot'](_0x300040);if(_0x5ef8ec[_0x6924f6(0x123)]===_0x6924f6(0x116)){if(_0x314b8a[_0x6924f6(0x104)][_0x6924f6(0xe5)]===0x3&&!_0x1b2ead[_0x6924f6(0xe8)](_0x3bfd4d,_0x2abe13))fail(_0x6924f6(0x122));return _0x5ef8ec;}if(_0x5ef8ec[_0x6924f6(0x123)]!==_0x6924f6(0x12d)||_0x5ef8ec['reason']!==_0x6924f6(0x172))return _0x5ef8ec;const _0x5af7f9={};_0x5af7f9[_0x6924f6(0x123)]=_0x6924f6(0x12d),_0x5af7f9['reason']='index-stop-evidence-required',_0x5af7f9[_0x6924f6(0x148)]=_0x5ef8ec[_0x6924f6(0x156)];const _0x235d86=_0x5af7f9;if(_0x314b8a[_0x6924f6(0x104)][_0x6924f6(0xfb)]!==0x1||_0x1d2aa9?.['status']!==_0x6924f6(0x164))return _0x235d86;const _0x91fefb=_0x1d2aa9[_0x6924f6(0x10f)],_0x42ac9f=_0x3bfd4d['containmentEvidence'];if(_0x1d2aa9['version']!==0x1||!_0x1d2aa9[_0x6924f6(0x101)]||!sameWorkspace(_0x1d2aa9['workspace'],_0x598321)||_0x1d2aa9['target']?.[_0x6924f6(0x140)]!==_0x314b8a[_0x6924f6(0x140)]||_0x1d2aa9['target']?.[_0x6924f6(0x199)]!==_0x314b8a[_0x6924f6(0x199)]||JSON['stringify'](_0x1d2aa9[_0x6924f6(0xfe)])!==JSON[_0x6924f6(0xe9)](_0x3bfd4d)||_0x3bfd4d[_0x6924f6(0x145)]!=='windows-job-object'||_0x42ac9f?.[_0x6924f6(0x175)]!==_0x6924f6(0x127)||_0x42ac9f[_0x6924f6(0x111)]!==!![]||_0x42ac9f[_0x6924f6(0x177)]!==_0x3bfd4d[_0x6924f6(0x177)]||_0x42ac9f['launcherProcessStart']!==_0x3bfd4d[_0x6924f6(0x18f)]||_0x91fefb?.['source']!=='windows-job-object'||!_0x91fefb['workspace']||!sameWorkspace(_0x91fefb[_0x6924f6(0x101)],_0x598321)||_0x91fefb[_0x6924f6(0x145)]!=='job-tree'||_0x91fefb[_0x6924f6(0x117)]!==!![]||_0x91fefb[_0x6924f6(0x197)]!==_0x3bfd4d[_0x6924f6(0x177)]||_0x91fefb['processStart']!==_0x3bfd4d[_0x6924f6(0x18f)]||![_0x6924f6(0x160),_0x6924f6(0xf1)][_0x6924f6(0xfc)](_0x91fefb['method'])||typeof _0x91fefb['stopReason']!==_0x6924f6(0xeb)||!_0x91fefb['stopReason'][_0x6924f6(0xe6)]()||_0x91fefb[_0x6924f6(0x194)]?.[_0x6924f6(0x111)]!==!![]||_0x91fefb[_0x6924f6(0x194)][_0x6924f6(0x14c)]!==0x0||_0x91fefb[_0x6924f6(0x194)]['stopped']!==!![]||!Number[_0x6924f6(0x152)](_0x91fefb[_0x6924f6(0x194)]['brokerPid'])||_0x91fefb['job'][_0x6924f6(0xff)]<=0x0||_0x91fefb[_0x6924f6(0x194)][_0x6924f6(0xff)]>0xffffffff||[_0x3bfd4d[_0x6924f6(0x17a)],_0x3bfd4d[_0x6924f6(0x177)]][_0x6924f6(0xfc)](_0x91fefb[_0x6924f6(0x194)][_0x6924f6(0xff)])||!_0x1b2ead[_0x6924f6(0x13f)](_0x3bfd4d,_0x2abe13))return _0x235d86;const _0x1c0673=typeof _0x91fefb[_0x6924f6(0x10d)]===_0x6924f6(0xeb)?Date[_0x6924f6(0x14a)](_0x91fefb[_0x6924f6(0x10d)]):NaN;if(!Number[_0x6924f6(0x152)](_0x1c0673)||new Date(_0x1c0673)[_0x6924f6(0x18a)]()!==_0x91fefb[_0x6924f6(0x10d)])return _0x235d86;const _0x30e73d=BigInt(_0x1c0673)*0x2710n+0x19db1ded53e8000n;if([_0x3bfd4d[_0x6924f6(0xf0)],_0x3bfd4d['launcherProcessStart'],_0x3bfd4d['boot'][_0x6924f6(0x154)]][_0x6924f6(0x18b)](_0x4a985f=>_0x30e73d+0x270fn<BigInt(_0x4a985f))||_0x30e73d>BigInt(_0x2abe13[_0x6924f6(0x154)]))return _0x235d86;const _0x1da34e={};return _0x1da34e['status']=_0x6924f6(0x116),_0x1da34e[_0x6924f6(0x156)]=_0x6924f6(0x118),_0x1da34e;}function validateIndexArchive(_0x4c63d3,_0x2e632b,_0xb99af8=require(_0x394b83(0x196))[_0x394b83(0x165)]){const _0x490da0=_0x394b83;if(!_0x2e632b||!/^[a-f0-9-]{36}$/[_0x490da0(0x114)](_0x2e632b[_0x490da0(0x158)]||'')||!/^[a-f0-9]{64}$/[_0x490da0(0x114)](_0x2e632b[_0x490da0(0x134)]||''))fail(_0x490da0(0x178));const _0x294586=safePath(_0x4c63d3,path['join'](_0x4c63d3,'.agents/recovery-backups','index-'+_0x2e632b[_0x490da0(0x158)])),_0x5681a0=read(_0x4c63d3,path[_0x490da0(0x15e)](_0x294586,'backup.json'));if(!_0x5681a0||_0x5681a0[_0x490da0(0x128)]!==_0x2e632b[_0x490da0(0x134)]||_0x5681a0['value']['recoveryId']!==_0x2e632b[_0x490da0(0x158)]||!sameWorkspace(_0x5681a0[_0x490da0(0x191)][_0x490da0(0x101)],_0x4c63d3)||!Array[_0x490da0(0x14d)](_0x5681a0[_0x490da0(0x191)][_0x490da0(0x13d)]))fail(_0x490da0(0x178));for(const _0x3e7142 of _0x5681a0[_0x490da0(0x191)]['files']){const _0x567705=safePath(_0x4c63d3,path['resolve'](_0x294586,_0x3e7142[_0x490da0(0xf4)]));if(!_0x567705[_0x490da0(0x15c)](_0x294586+path[_0x490da0(0x151)])||!/^[a-f0-9]{64}$/[_0x490da0(0x114)](_0x3e7142['sha256']||'')||sha(fs[_0x490da0(0x17d)](_0x567705))!==_0x3e7142['sha256'])fail(_0x490da0(0x178));}const _0x24c8a0=_0x5681a0[_0x490da0(0x191)];if(_0x24c8a0['version']!==0x1||_0x24c8a0[_0x490da0(0x13d)][_0x490da0(0x18b)]((_0x41646f,_0x39a2fc)=>!_0x41646f[_0x490da0(0x14b)]||_0x24c8a0['files']['findIndex'](_0x3f7ef6=>_0x3f7ef6[_0x490da0(0x14b)]===_0x41646f[_0x490da0(0x14b)]||_0x3f7ef6['path']===_0x41646f[_0x490da0(0xf4)])!==_0x39a2fc))fail('INDEX_RECOVERY_CHANGED');if(!_0x24c8a0[_0x490da0(0x16a)]||[_0x490da0(0x142),_0x490da0(0x184)][_0x490da0(0x18b)](_0x13c1ec=>!/^[a-f0-9-]{36}$/[_0x490da0(0x114)](_0x24c8a0[_0x490da0(0x16a)][_0x13c1ec]||'')))fail(_0x490da0(0x178));const _0x25cfe0=_0x5e8abf=>{const _0x4e3b8d=_0x490da0,_0x341ec0=_0x24c8a0[_0x4e3b8d(0x13d)][_0x4e3b8d(0x137)](_0x498d03=>_0x498d03[_0x4e3b8d(0xf4)]===_0x5e8abf);if(!_0x341ec0)fail(_0x4e3b8d(0x178));return JSON[_0x4e3b8d(0x14a)](fs[_0x4e3b8d(0x17d)](path[_0x4e3b8d(0x15e)](_0x294586,_0x5e8abf)));},_0x2397a0=_0x24c8a0[_0x490da0(0x13d)]['find'](_0x3af022=>[_0x490da0(0x138),_0x490da0(0x155)][_0x490da0(0xfc)](_0x3af022[_0x490da0(0xf4)]));if(!_0x2397a0||_0x2397a0[_0x490da0(0x128)]!==_0x24c8a0[_0x490da0(0x188)])fail('INDEX_RECOVERY_CHANGED');const _0x190b7a=_0x25cfe0(_0x2397a0[_0x490da0(0xf4)]),_0x28cd1d=_0x25cfe0('generation.json'),_0x41c539=_0x25cfe0(_0x490da0(0x19b)),_0xfc51a2=_0x190b7a[_0x490da0(0x131)]?.[_0x490da0(0xfe)],_0x404195=verifyIndexProducer(_0x24c8a0[_0x490da0(0x10b)]?.[_0x490da0(0x192)],_0xb99af8);if(!_0xfc51a2||_0xfc51a2['attemptId']!==_0x24c8a0['attemptId']||!sameWorkspace(_0x190b7a[_0x490da0(0x101)],_0x4c63d3)||!sameWorkspace(_0x28cd1d[_0x490da0(0x101)],_0x4c63d3)||_0x404195[_0x490da0(0x140)]!==_0x28cd1d['version']||_0x404195['digest']!==_0x28cd1d[_0x490da0(0x199)]||_0x190b7a[_0x490da0(0x139)]?.[_0x490da0(0x140)]!==_0x404195['version']||_0x190b7a[_0x490da0(0x139)]?.[_0x490da0(0x199)]!==_0x404195['digest']||[_0x490da0(0x179),_0x490da0(0x103),_0x490da0(0x121),_0x490da0(0xec)][_0x490da0(0x18b)](_0x575a05=>(_0x190b7a[_0x575a05]??null)!==(_0x28cd1d[_0x575a05]??null)||(_0xfc51a2[_0x575a05]??null)!==(_0x28cd1d[_0x575a05]??null))||_0x41c539[_0x490da0(0x136)]!==_0x490da0(0x146)||_0x41c539[_0x490da0(0xfd)]!==_0xfc51a2['fenceEpoch']||_0x24c8a0[_0x490da0(0x13d)][_0x490da0(0x137)](_0x5c4e6a=>_0x5c4e6a[_0x490da0(0xf4)]===_0x490da0(0x106))?.[_0x490da0(0x128)]!==_0x24c8a0['generationHash']||_0x24c8a0[_0x490da0(0x13d)][_0x490da0(0x137)](_0x330acc=>_0x330acc[_0x490da0(0xf4)]===_0x490da0(0x19b))?.[_0x490da0(0x128)]!==_0x24c8a0[_0x490da0(0x16f)]||_0x24c8a0['outcome']!==_0x490da0(0x12d)||!Number[_0x490da0(0x152)](_0x28cd1d[_0x490da0(0x179)])||_0x28cd1d['generation']<0x1||!/^[a-f0-9]{64}$/['test'](_0x28cd1d[_0x490da0(0x121)]||'')||_0x41c539[_0x490da0(0x179)]!=null&&_0x41c539[_0x490da0(0x179)]!==_0x28cd1d[_0x490da0(0x179)]||_0xfc51a2[_0x490da0(0x145)]&&_0xfc51a2['containment']!==_0x404195[_0x490da0(0x104)][_0x490da0(0x145)]||_0xfc51a2[_0x490da0(0x10b)]&&(_0xfc51a2['producer'][_0x490da0(0x199)]!==_0x404195[_0x490da0(0x199)]||_0xfc51a2['producer'][_0x490da0(0x140)]!==_0x404195[_0x490da0(0x140)]))fail(_0x490da0(0x178));const _0x5bcc4b=_0x167d9f=>_0x24c8a0[_0x490da0(0x13d)]['find'](_0x311b2b=>_0x311b2b[_0x490da0(0x14b)]===path['relative'](_0x4c63d3,_0x167d9f)[_0x490da0(0x13b)]('\x5c','/')),_0x1398ed=_0x5bcc4b(path['join'](_0x4c63d3,_0x490da0(0x11b)));if(!_0x1398ed||_0x1398ed[_0x490da0(0x128)]!==_0x28cd1d[_0x490da0(0x103)])fail('INDEX_RECOVERY_CHANGED');const _0x2e79f9=require(_0x490da0(0xf6)),_0x3e5333=new Set([_0x490da0(0x10c)+_0x2397a0['path'],_0x490da0(0x141),_0x490da0(0x187),_0x490da0(0x11b),...[_0x490da0(0x174),_0x490da0(0x185),_0x490da0(0x159)][_0x490da0(0x16d)](_0xe1bf1d=>_0x490da0(0x10c)+_0xe1bf1d)]);for(const _0x4fcae5 of['codegraph',_0x490da0(0x184)]){const _0x481da8={..._0x404195[_0x490da0(0x104)][_0x490da0(0x12b)][_0x4fcae5]};_0x481da8['cacheContract']=_0x404195[_0x490da0(0x104)][_0x490da0(0xe5)];const _0x42a1c4=_0x481da8,_0x42ec4f=_0xfc51a2['caches']?.[_0x490da0(0x137)](_0x21d531=>_0x21d531[_0x490da0(0x186)]===_0x4fcae5)?.[_0x490da0(0x14e)];if(!_0x42ec4f&&_0x42a1c4[_0x490da0(0xe5)]===0x3)fail(_0x490da0(0x178));const _0x5a0f2f={};_0x5a0f2f['workspace']=_0x4c63d3,_0x5a0f2f[_0x490da0(0x186)]=_0x4fcae5,_0x5a0f2f[_0x490da0(0x107)]=_0x42a1c4,_0x5a0f2f[_0x490da0(0x18d)]=_0x42ec4f?.[_0x490da0(0x18d)],_0x5a0f2f['historical']=!![];const _0x4c5e65=_0x2e79f9[_0x490da0(0x112)](_0x5a0f2f);if(_0x42ec4f&&JSON['stringify'](_0x42ec4f)!==JSON[_0x490da0(0xe9)](_0x4c5e65[_0x490da0(0x14e)]))fail('INDEX_RECOVERY_CHANGED');for(const _0x5c5aea of[path[_0x490da0(0x15e)](_0x4c5e65[_0x490da0(0x161)],'authority.json'),path[_0x490da0(0x15e)](_0x4c5e65[_0x490da0(0x17f)],_0x490da0(0x11c))]){const _0x230a2d=_0x5bcc4b(_0x5c5aea);if(!_0x230a2d||_0x230a2d['sha256']!==sha(JSON[_0x490da0(0xe9)](_0x4c5e65[_0x490da0(0x14e)])))fail(_0x490da0(0x178));}for(const _0x47859a of[...['authority.json',_0x490da0(0x190),_0x490da0(0x144),'cache.lock',_0x490da0(0x10e)][_0x490da0(0x16d)](_0x49a429=>path[_0x490da0(0x15e)](_0x4c5e65[_0x490da0(0x161)],_0x49a429)),path['join'](_0x4c5e65[_0x490da0(0x17f)],'.apt-managed.json'),..._0x4c5e65['selectorFile']?[_0x4c5e65[_0x490da0(0x17b)]]:[]])_0x3e5333[_0x490da0(0x130)](path[_0x490da0(0x12a)](_0x4c63d3,_0x47859a)['replaceAll']('\x5c','/'));const _0x30bbf8=_0x4c5e65[_0x490da0(0x17b)]&&_0x5bcc4b(_0x4c5e65['selectorFile']);if(_0x30bbf8){const _0x3f8a21=_0x25cfe0(_0x30bbf8[_0x490da0(0xf4)]);if(_0x3f8a21[_0x490da0(0x140)]!==0x1||_0x3f8a21[_0x490da0(0xf7)]!==_0x4c5e65[_0x490da0(0xf7)]||_0x3f8a21['active']!==_0x4c5e65[_0x490da0(0x14e)][_0x490da0(0x18d)]&&_0x3f8a21['pending']?.['instanceId']!==_0x4c5e65[_0x490da0(0x14e)][_0x490da0(0x18d)]||_0x3f8a21['active']===_0x4c5e65['marker'][_0x490da0(0x18d)]&&_0x3f8a21[_0x490da0(0x132)]!==_0x490da0(0x171)&&_0x5bcc4b(path['join'](_0x4c5e65[_0x490da0(0x161)],_0x490da0(0x10e)))?.['sha256']!==_0x3f8a21[_0x490da0(0xef)])fail('INDEX_RECOVERY_CHANGED');}else{if(_0x42a1c4[_0x490da0(0xe5)]===0x3&&_0x4c5e65[_0x490da0(0x14e)][_0x490da0(0x18d)]!==_0x490da0(0x171))fail('INDEX_RECOVERY_CHANGED');}}let _0x108c75;if(_0x404195[_0x490da0(0x104)]['cacheContract']===0x3){const _0x5d1275=_0x5bcc4b(path['join'](_0x4c63d3,_0x490da0(0x143),_0xfc51a2[_0x490da0(0x19a)]+_0x490da0(0x18e)));if(!_0x5d1275)fail(_0x490da0(0x178));_0x108c75=_0x25cfe0(_0x5d1275[_0x490da0(0xf4)]);if(JSON[_0x490da0(0xe9)](_0x108c75[_0x490da0(0xfe)])!==JSON[_0x490da0(0xe9)](_0xfc51a2)||!['reserved',_0x490da0(0x164)][_0x490da0(0xfc)](_0x108c75[_0x490da0(0x123)])||!sameWorkspace(_0x108c75['workspace'],_0x4c63d3)||_0x108c75['target']?.[_0x490da0(0x140)]!==_0x404195[_0x490da0(0x140)]||_0x108c75['target']?.[_0x490da0(0x199)]!==_0x404195[_0x490da0(0x199)])fail(_0x490da0(0x178));_0x3e5333[_0x490da0(0x130)](_0x5d1275[_0x490da0(0x14b)]);}const _0x150dd4=classifyInterruption({'workspace':_0x4c63d3,'execution':_0xfc51a2,'boot':_0x24c8a0[_0x490da0(0x15f)],'producer':_0x404195,'lifecycle':_0x108c75,'processIdentity':_0x1ad0c5=>Object[_0x490da0(0x153)](_0x24c8a0[_0x490da0(0x133)]||{},_0x1ad0c5)?_0x24c8a0[_0x490da0(0x133)][_0x1ad0c5]:undefined});if(_0x150dd4[_0x490da0(0x123)]!==_0x490da0(0x116)||_0x150dd4[_0x490da0(0x156)]!==_0x24c8a0[_0x490da0(0x156)])fail(_0x490da0(0x178));if(_0x24c8a0['files']['some'](_0x3acd66=>!_0x3e5333[_0x490da0(0xe3)](_0x3acd66[_0x490da0(0x14b)])))fail(_0x490da0(0x178));const _0x11e9fc={..._0x5681a0[_0x490da0(0x191)]};return _0x11e9fc['archive']=_0x294586,_0x11e9fc[_0x490da0(0x134)]=_0x5681a0[_0x490da0(0x128)],_0x11e9fc;}function inspectIndexInterruption(_0x32118d,_0x5808be={}){const _0x5aa642=_0x394b83;try{_0x32118d=fs[_0x5aa642(0x195)](_0x32118d);const _0x577f3d=path[_0x5aa642(0x15e)](_0x32118d,_0x5aa642(0x183)),_0x43d686=read(_0x32118d,path[_0x5aa642(0x15e)](_0x577f3d,_0x5aa642(0x106))),_0x492dfa=read(_0x32118d,path[_0x5aa642(0x15e)](_0x577f3d,'admission.json')),_0xbaf3db=['index-maintenance.json',_0x5aa642(0x155)]['map'](_0xbd5a3e=>read(_0x32118d,path[_0x5aa642(0x15e)](_0x577f3d,_0xbd5a3e)))['filter'](Boolean);for(const _0x1ba8c9 of _0xbaf3db){for(const _0x464d3e of[..._0x1ba8c9['value']['indexRecoveries']||[],..._0x1ba8c9[_0x5aa642(0x191)][_0x5aa642(0x131)]?.[_0x5aa642(0x150)]?[_0x1ba8c9[_0x5aa642(0x191)][_0x5aa642(0x131)][_0x5aa642(0x150)]]:[]])validateIndexArchive(_0x32118d,_0x464d3e,_0x5808be[_0x5aa642(0xf2)]);}const _0x2d55fd=_0xbaf3db[_0x5aa642(0x198)](_0x31f0e3=>[_0x5aa642(0xfa),_0x5aa642(0x12d)][_0x5aa642(0xfc)](_0x31f0e3[_0x5aa642(0x191)][_0x5aa642(0x131)]?.[_0x5aa642(0x123)])&&(path['basename'](_0x31f0e3['file'])!==_0x5aa642(0x155)||!_0x43d686||_0x31f0e3[_0x5aa642(0x191)][_0x5aa642(0x139)]?.[_0x5aa642(0x140)]===_0x43d686['value'][_0x5aa642(0x140)]&&_0x31f0e3[_0x5aa642(0x191)]['target']?.[_0x5aa642(0x199)]===_0x43d686[_0x5aa642(0x191)]['digest']&&(_0x31f0e3[_0x5aa642(0x191)][_0x5aa642(0xec)]??null)===(_0x43d686[_0x5aa642(0x191)][_0x5aa642(0xec)]??null)));if(!_0x2d55fd[_0x5aa642(0x149)]){const _0x3cfeec=_0xbaf3db[_0x5aa642(0x137)](_0x59f38b=>_0x59f38b['value']['indexResult']?.[_0x5aa642(0x123)]===_0x5aa642(0x12c)),_0x13287c={};return _0x13287c[_0x5aa642(0x123)]=_0x5aa642(0x11f),_0x13287c[_0x5aa642(0xee)]=[],_0x3cfeec?{'status':_0x5aa642(0x12c),...validateIndexArchive(_0x32118d,_0x3cfeec['value'][_0x5aa642(0x131)][_0x5aa642(0x150)],_0x5808be['publicKey'])}:_0x13287c;}if(_0x2d55fd[_0x5aa642(0x149)]!==0x1||!_0x43d686||!_0x492dfa)fail(_0x5aa642(0x122));const _0x37513b=_0x2d55fd[0x0],_0x4ae998=_0x37513b[_0x5aa642(0x191)],_0x70e10d=_0x4ae998[_0x5aa642(0x131)][_0x5aa642(0xfe)],_0x1b0656=_0x43d686[_0x5aa642(0x191)];if(!_0x70e10d||!_0x1b0656[_0x5aa642(0x101)]||!_0x4ae998[_0x5aa642(0x101)]||!sameWorkspace(_0x1b0656[_0x5aa642(0x101)],_0x32118d)||!sameWorkspace(_0x4ae998['workspace'],_0x32118d)||_0x4ae998['target']?.[_0x5aa642(0x140)]!==_0x1b0656[_0x5aa642(0x140)]||_0x4ae998[_0x5aa642(0x139)]?.['digest']!==_0x1b0656[_0x5aa642(0x199)]||!Number[_0x5aa642(0x152)](_0x1b0656[_0x5aa642(0x179)])||_0x1b0656[_0x5aa642(0x179)]<0x1||[_0x5aa642(0x179),_0x5aa642(0x103),'catalogHash',_0x5aa642(0xec)]['some'](_0xf5a6c2=>(_0x4ae998[_0xf5a6c2]??null)!==(_0x1b0656[_0xf5a6c2]??null)||(_0x70e10d[_0xf5a6c2]??null)!==(_0x1b0656[_0xf5a6c2]??null))||!/^[a-f0-9]{64}$/[_0x5aa642(0x114)](_0x1b0656['catalogHash']||'')||_0x492dfa['value'][_0x5aa642(0x136)]!==_0x5aa642(0x146)||_0x492dfa[_0x5aa642(0x191)][_0x5aa642(0xfd)]!==_0x70e10d['fenceEpoch']||_0x492dfa[_0x5aa642(0x191)][_0x5aa642(0x179)]!=null&&_0x492dfa['value'][_0x5aa642(0x179)]!==_0x1b0656[_0x5aa642(0x179)]||sha(fs['readFileSync'](safePath(_0x32118d,path[_0x5aa642(0x15e)](_0x32118d,_0x5aa642(0x11b)))))!==_0x1b0656[_0x5aa642(0x103)])fail(_0x5aa642(0x122));const _0x26c96a=_0x70e10d[_0x5aa642(0x10b)]?.[_0x5aa642(0x192)]||_0x5808be['producerRelease']||_0x1b0656['release']||_0x5808be['runtimeRoot']&&path['join'](_0x5808be['runtimeRoot'],_0x5aa642(0x169),_0x1b0656['version']+'-'+_0x1b0656[_0x5aa642(0x199)]),_0x5a5bac=verifyIndexProducer(_0x26c96a,_0x5808be[_0x5aa642(0xf2)]);if(_0x5a5bac[_0x5aa642(0x140)]!==_0x1b0656[_0x5aa642(0x140)]||_0x5a5bac[_0x5aa642(0x199)]!==_0x1b0656[_0x5aa642(0x199)]||_0x70e10d['producer']&&(_0x70e10d[_0x5aa642(0x10b)][_0x5aa642(0x140)]!==_0x5a5bac['version']||_0x70e10d[_0x5aa642(0x10b)][_0x5aa642(0x199)]!==_0x5a5bac[_0x5aa642(0x199)])||_0x70e10d[_0x5aa642(0x145)]&&_0x70e10d[_0x5aa642(0x145)]!==_0x5a5bac[_0x5aa642(0x104)][_0x5aa642(0x145)])fail(_0x5aa642(0x11d));const _0x38b790=require(_0x5aa642(0xf6)),_0x48d636=['codegraph',_0x5aa642(0x184)]['map'](_0x2b5d57=>{const _0x52f089=_0x5aa642,_0x581598={..._0x5a5bac[_0x52f089(0x104)][_0x52f089(0x12b)][_0x2b5d57]};_0x581598[_0x52f089(0xe5)]=_0x5a5bac[_0x52f089(0x104)][_0x52f089(0xe5)];const _0x5e1129=_0x581598,_0x1235dc=_0x70e10d[_0x52f089(0x15d)]?.[_0x52f089(0x137)](_0x8a4cd7=>_0x8a4cd7[_0x52f089(0x186)]===_0x2b5d57)?.[_0x52f089(0x14e)],_0x4b0de3={};_0x4b0de3[_0x52f089(0x101)]=_0x32118d,_0x4b0de3[_0x52f089(0x186)]=_0x2b5d57,_0x4b0de3[_0x52f089(0x107)]=_0x5e1129,_0x4b0de3[_0x52f089(0x18d)]=_0x1235dc?.[_0x52f089(0x18d)],_0x4b0de3[_0x52f089(0x10a)]=!![];const _0x10ba56=_0x38b790[_0x52f089(0x112)](_0x4b0de3);if(!_0x10ba56||_0x1235dc&&JSON[_0x52f089(0xe9)](_0x1235dc)!==JSON[_0x52f089(0xe9)](_0x10ba56['marker'])||!_0x1235dc&&_0x5e1129[_0x52f089(0xe5)]===0x3)fail(_0x52f089(0x170));return validateManagedIndexCache(_0x10ba56),_0x10ba56;}),_0xa46e7c=/^[a-f0-9-]{36}$/['test'](_0x70e10d['attemptId']||'')?read(_0x32118d,path[_0x5aa642(0x15e)](_0x577f3d,'index-attempts',_0x70e10d[_0x5aa642(0x19a)]+'.json')):null;if(_0x5a5bac[_0x5aa642(0x104)]['cacheContract']===0x3&&(!_0xa46e7c||JSON[_0x5aa642(0xe9)](_0xa46e7c[_0x5aa642(0x191)]['execution'])!==JSON[_0x5aa642(0xe9)](_0x70e10d)||![_0x5aa642(0x13a),_0x5aa642(0x164)][_0x5aa642(0xfc)](_0xa46e7c[_0x5aa642(0x191)]['status'])))fail('INDEX_AUTHORITY_UNVERIFIED');const _0x39824d=[_0x37513b,_0x43d686,_0x492dfa,..._0xa46e7c?[_0xa46e7c]:[],read(_0x32118d,path[_0x5aa642(0x15e)](_0x32118d,_0x5aa642(0x11b))),..._0x48d636[_0x5aa642(0xf5)](_0x5cd72d=>[...[_0x5aa642(0x167),_0x5aa642(0x190),'recovery.json',_0x5aa642(0x119),_0x5aa642(0x10e)][_0x5aa642(0x16d)](_0x286471=>read(_0x32118d,path['join'](_0x5cd72d[_0x5aa642(0x161)],_0x286471))),read(_0x32118d,path[_0x5aa642(0x15e)](_0x5cd72d[_0x5aa642(0x17f)],'.apt-managed.json')),_0x5cd72d['selectorFile']&&read(_0x32118d,_0x5cd72d[_0x5aa642(0x17b)])][_0x5aa642(0x198)](Boolean)),...[_0x5aa642(0x174),_0x5aa642(0x185),'admission.json.lock'][_0x5aa642(0x16d)](_0x227c9e=>read(_0x32118d,path[_0x5aa642(0x15e)](_0x577f3d,_0x227c9e)))['filter'](Boolean)],_0xcd5403=_0x5808be['boot']===undefined?require(_0x5aa642(0x182))['captureBootEvidence']():_0x5808be[_0x5aa642(0x15f)],_0xb05c37={},_0x15409d=_0x5808be['processIdentity']||require(_0x5aa642(0x182))['readProcessIdentity'],_0x55c04c=classifyInterruption({'workspace':_0x32118d,'execution':_0x70e10d,'boot':_0xcd5403,'producer':_0x5a5bac,'lifecycle':_0xa46e7c?.[_0x5aa642(0x191)],'processIdentity':_0x533de7=>{const _0xdc3868=_0x15409d(_0x533de7);return _0xb05c37[_0x533de7]=_0xdc3868,_0xdc3868;}}),_0x24bb45={..._0x55c04c};return _0x24bb45['workspace']=_0x32118d,_0x24bb45['checkpoint']=_0x37513b,_0x24bb45['generation']=_0x43d686,_0x24bb45[_0x5aa642(0x163)]=_0x492dfa,_0x24bb45[_0x5aa642(0x10b)]=_0x5a5bac,_0x24bb45[_0x5aa642(0x102)]=_0x48d636,_0x24bb45[_0x5aa642(0x100)]=_0x39824d,_0x24bb45[_0x5aa642(0x15f)]=_0xcd5403,_0x24bb45[_0x5aa642(0x133)]=_0xb05c37,_0x24bb45;}catch(_0x3fd7b6){const _0x5d53b7={};return _0x5d53b7[_0x5aa642(0x123)]='unknown',_0x5d53b7['reason']=_0x3fd7b6[_0x5aa642(0x12f)]||_0x5aa642(0x173),_0x5d53b7;}}function reconcileIndexInterruption(_0x1bf9db,_0x4cc37c={}){const _0x367d50=_0x394b83;_0x1bf9db=fs[_0x367d50(0x195)](_0x1bf9db);const _0x5bd44b=inspectIndexInterruption(_0x1bf9db,_0x4cc37c);if(!_0x4cc37c[_0x367d50(0xe7)]||![_0x367d50(0x116),_0x367d50(0x12c)]['includes'](_0x5bd44b['status']))return _0x5bd44b;if(_0x5bd44b[_0x367d50(0x123)]==='interrupted')return _0x5bd44b;const _0x4a17dd=path[_0x367d50(0x15e)](_0x1bf9db,_0x367d50(0x183)),_0x313cd5=[],_0x37478e=new Set([_0x367d50(0x174),_0x367d50(0x185),_0x367d50(0x159)]['map'](_0x128b07=>path[_0x367d50(0x15e)](_0x4a17dd,_0x128b07))),_0x9e5364=_0x4873e6=>JSON[_0x367d50(0xe9)](_0x4873e6[_0x367d50(0x198)](_0x596747=>!_0x37478e[_0x367d50(0xe3)](_0x596747[_0x367d50(0x125)]))[_0x367d50(0x16d)](_0x2dabe4=>[_0x2dabe4['file'],_0x2dabe4[_0x367d50(0x128)]])['sort'](([_0x521144],[_0x30ff83])=>_0x521144[_0x367d50(0x15a)](_0x30ff83)));try{const _0xc44b73=safePath(_0x1bf9db,path[_0x367d50(0x15e)](_0x4a17dd,_0x367d50(0x12e),_0x5bd44b[_0x367d50(0x11a)][_0x367d50(0x128)]+'.json'));safePath(_0x1bf9db,path['dirname'](_0xc44b73),!![]);let _0x33710c=read(_0x1bf9db,_0xc44b73)?.[_0x367d50(0x191)];const _0x38768f=_0x61492f=>{const _0x1f47e9=_0x367d50;if(!/[/\\]selectors[/\\][a-f0-9]{64}\.json$/[_0x1f47e9(0x114)](_0x61492f[_0x1f47e9(0x125)])||!_0x33710c)return![];const _0x302a5d=_0x61492f['value'],_0x217b61=_0x302a5d?.['pending'],_0x287410=_0x33710c[_0x1f47e9(0x13d)]?.[_0x1f47e9(0x137)](_0x483e6b=>_0x483e6b[_0x1f47e9(0x14b)]===path['relative'](_0x1bf9db,_0x61492f[_0x1f47e9(0x125)])['replaceAll']('\x5c','/')),_0x94c8a0=_0x287410&&JSON['parse'](Buffer[_0x1f47e9(0x124)](_0x287410['bytes'],_0x1f47e9(0x129)));return _0x302a5d[_0x1f47e9(0x140)]===0x1&&_0x217b61?.['instanceId']===_0x33710c[_0x1f47e9(0x158)]&&_0x217b61['recoveryId']===_0x33710c[_0x1f47e9(0x158)]&&_0x217b61[_0x1f47e9(0x134)]===sha(JSON[_0x1f47e9(0xe9)](_0x33710c))&&_0x302a5d[_0x1f47e9(0x132)]===(_0x94c8a0?.['active']||_0x1f47e9(0x171));};if(_0x33710c&&(_0x33710c[_0x367d50(0x188)]!==_0x5bd44b[_0x367d50(0x11a)][_0x367d50(0x128)]||_0x33710c[_0x367d50(0x19a)]!==_0x5bd44b[_0x367d50(0x11a)][_0x367d50(0x191)][_0x367d50(0x131)][_0x367d50(0xfe)][_0x367d50(0x19a)]||_0x33710c[_0x367d50(0x15b)]!==_0x5bd44b[_0x367d50(0x179)][_0x367d50(0x128)]||_0x33710c[_0x367d50(0x16f)]!==_0x5bd44b[_0x367d50(0x163)][_0x367d50(0x128)]||_0x5bd44b[_0x367d50(0x100)][_0x367d50(0x18b)](_0x4433c2=>![_0x367d50(0x174),'update.lock',_0x367d50(0x159)][_0x367d50(0xfc)](path['basename'](_0x4433c2[_0x367d50(0x125)]))&&!_0x33710c[_0x367d50(0x13d)]?.[_0x367d50(0x18b)](_0x516eff=>_0x516eff[_0x367d50(0x14b)]===path[_0x367d50(0x12a)](_0x1bf9db,_0x4433c2[_0x367d50(0x125)])[_0x367d50(0x13b)]('\x5c','/')&&_0x516eff[_0x367d50(0x128)]===_0x4433c2[_0x367d50(0x128)])&&!_0x38768f(_0x4433c2))))fail(_0x367d50(0x178));if(!_0x33710c){const _0x58071e=crypto[_0x367d50(0xf8)](),_0xf296a5=_0x5bd44b['artifacts'][_0x367d50(0x16d)](_0x29cc4b=>({'path':path[_0x367d50(0x12a)](_0x4a17dd,_0x29cc4b[_0x367d50(0x125)])['startsWith']('..')?'cache-markers/'+sha(path[_0x367d50(0x12a)](_0x1bf9db,_0x29cc4b[_0x367d50(0x125)]))+'.json':path[_0x367d50(0x12a)](_0x4a17dd,_0x29cc4b[_0x367d50(0x125)])[_0x367d50(0x13b)]('\x5c','/'),'original':path['relative'](_0x1bf9db,_0x29cc4b[_0x367d50(0x125)])[_0x367d50(0x13b)]('\x5c','/'),'sha256':_0x29cc4b['sha256'],'bytes':_0x29cc4b[_0x367d50(0x17c)][_0x367d50(0x109)]('base64')})),_0x1316f2={};_0x1316f2[_0x367d50(0x140)]=0x1,_0x1316f2[_0x367d50(0x101)]=_0x1bf9db,_0x1316f2['recoveryId']=_0x58071e,_0x1316f2[_0x367d50(0x19a)]=_0x5bd44b[_0x367d50(0x11a)][_0x367d50(0x191)][_0x367d50(0x131)]['execution'][_0x367d50(0x19a)],_0x1316f2[_0x367d50(0x188)]=_0x5bd44b[_0x367d50(0x11a)]['sha256'],_0x1316f2[_0x367d50(0x15b)]=_0x5bd44b[_0x367d50(0x179)][_0x367d50(0x128)],_0x1316f2['fenceHash']=_0x5bd44b[_0x367d50(0x163)][_0x367d50(0x128)],_0x1316f2[_0x367d50(0x110)]=_0x367d50(0x12d),_0x1316f2[_0x367d50(0x156)]=_0x5bd44b[_0x367d50(0x156)],_0x1316f2[_0x367d50(0x15f)]=_0x5bd44b['boot'],_0x1316f2[_0x367d50(0x133)]=_0x5bd44b['processes'],_0x1316f2[_0x367d50(0x10b)]=_0x5bd44b['producer'],_0x1316f2[_0x367d50(0x16a)]={},_0x1316f2[_0x367d50(0x13d)]=_0xf296a5,_0x1316f2[_0x367d50(0x16a)]['codegraph']=_0x58071e,_0x1316f2[_0x367d50(0x16a)][_0x367d50(0x184)]=_0x58071e,_0x33710c=_0x1316f2,preserveArchiveBytes(_0xc44b73,JSON[_0x367d50(0xe9)](_0x33710c));}const {acquireExactRuntimeLock:_0x1a127d}=require(_0x367d50(0x113));for(const _0x1320b0 of[_0x367d50(0x174),_0x367d50(0x185),_0x367d50(0x159)]){const _0x216edb=safePath(_0x1bf9db,path[_0x367d50(0x15e)](_0x4a17dd,_0x1320b0)),_0x4f2239=_0x5bd44b[_0x367d50(0x100)]['find'](_0x5a7f23=>_0x5a7f23[_0x367d50(0x125)]===_0x216edb)?.[_0x367d50(0x17c)]||null,_0x1428dc=_0x1a127d(_0x216edb,_0x4f2239);if(!_0x1428dc)fail(_0x367d50(0x18c));_0x313cd5['push'](_0x1428dc);}const _0x26dc93=inspectIndexInterruption(_0x1bf9db,_0x4cc37c);if(_0x26dc93['status']!==_0x367d50(0x116)||_0x5bd44b[_0x367d50(0x11a)][_0x367d50(0x128)]!==_0x26dc93[_0x367d50(0x11a)]['sha256']||_0x5bd44b[_0x367d50(0x179)]['sha256']!==_0x26dc93[_0x367d50(0x179)]['sha256']||_0x5bd44b[_0x367d50(0x163)]['sha256']!==_0x26dc93[_0x367d50(0x163)]['sha256']||_0x9e5364(_0x5bd44b[_0x367d50(0x100)])!==_0x9e5364(_0x26dc93['artifacts']))fail(_0x367d50(0x178));for(const _0x201841 of _0x5bd44b[_0x367d50(0x100)])if(!_0x37478e[_0x367d50(0xe3)](_0x201841[_0x367d50(0x125)])&&!fs[_0x367d50(0x17d)](_0x201841['file'])[_0x367d50(0x166)](_0x201841[_0x367d50(0x17c)]))fail(_0x367d50(0x178));const _0x55d027=safePath(_0x1bf9db,path['join'](_0x1bf9db,_0x367d50(0x120),_0x367d50(0x193)+_0x33710c[_0x367d50(0x158)]),!![]),_0x5b9bc1=Buffer[_0x367d50(0x124)](JSON[_0x367d50(0xe9)](_0x33710c));preserveArchiveBytes(safePath(_0x1bf9db,path[_0x367d50(0x15e)](_0x55d027,'backup.json')),_0x5b9bc1);for(const _0x486078 of _0x33710c[_0x367d50(0x13d)]){const _0x3edb97=Buffer[_0x367d50(0x124)](_0x486078[_0x367d50(0x17c)],_0x367d50(0x129));if(sha(_0x3edb97)!==_0x486078[_0x367d50(0x128)])fail(_0x367d50(0x178));const _0x185a79=safePath(_0x1bf9db,path['join'](_0x55d027,_0x486078['path']));safePath(_0x1bf9db,path[_0x367d50(0x135)](_0x185a79),!![]),preserveArchiveBytes(_0x185a79,_0x3edb97);}const _0x28bbaa={'recoveryId':_0x33710c['recoveryId'],'archiveHash':sha(_0x5b9bc1)};validateIndexArchive(_0x1bf9db,_0x28bbaa,_0x4cc37c[_0x367d50(0xf2)]);const _0x428464=inspectIndexInterruption(_0x1bf9db,_0x4cc37c);if(_0x428464['status']!==_0x367d50(0x116)||_0x428464[_0x367d50(0x11a)]['sha256']!==_0x33710c[_0x367d50(0x188)]||_0x428464[_0x367d50(0x179)][_0x367d50(0x128)]!==_0x33710c[_0x367d50(0x15b)]||_0x428464[_0x367d50(0x163)]['sha256']!==_0x33710c[_0x367d50(0x16f)]||_0x9e5364(_0x5bd44b[_0x367d50(0x100)])!==_0x9e5364(_0x428464['artifacts'])||_0x313cd5[_0x367d50(0x18b)](_0x1c0f60=>!_0x1c0f60[_0x367d50(0x13c)]()))fail(_0x367d50(0x178));for(const _0x9622c of _0x5bd44b[_0x367d50(0x100)])if(!_0x37478e['has'](_0x9622c[_0x367d50(0x125)])&&!fs[_0x367d50(0x17d)](_0x9622c[_0x367d50(0x125)])[_0x367d50(0x166)](_0x9622c[_0x367d50(0x17c)]))fail('INDEX_RECOVERY_CHANGED');const _0x190310=_0x428464[_0x367d50(0x11a)][_0x367d50(0x191)];for(const _0x2d7221 of[_0x367d50(0x142),_0x367d50(0x184)]){const _0x8da96f=require(_0x367d50(0xf6)),_0x4bdcbd={};_0x4bdcbd[_0x367d50(0x101)]=_0x1bf9db,_0x4bdcbd[_0x367d50(0x186)]=_0x2d7221,_0x4bdcbd[_0x367d50(0x107)]={..._0x428464['producer'][_0x367d50(0x104)][_0x367d50(0x12b)][_0x2d7221]},_0x4bdcbd[_0x367d50(0x10a)]=!![],_0x4bdcbd[_0x367d50(0x107)][_0x367d50(0xe5)]=0x3;const _0xdfdaa3=_0x8da96f[_0x367d50(0x112)](_0x4bdcbd);_0x8da96f['stageManagedIndexCache'](_0xdfdaa3,_0x28bbaa,_0x4cc37c[_0x367d50(0xf2)]);}const _0x2969f3={..._0x190310};_0x2969f3[_0x367d50(0xf3)]=[..._0x190310[_0x367d50(0xf3)]||[],_0x28bbaa],_0x2969f3[_0x367d50(0x131)]={..._0x190310[_0x367d50(0x131)]},_0x2969f3[_0x367d50(0x131)][_0x367d50(0x123)]='interrupted',_0x2969f3[_0x367d50(0x131)][_0x367d50(0x110)]=_0x367d50(0x12d),_0x2969f3[_0x367d50(0x131)][_0x367d50(0x12f)]=_0x367d50(0x180),_0x2969f3[_0x367d50(0x131)]['retryable']=!![],_0x2969f3[_0x367d50(0x131)]['recovery']=_0x28bbaa,require(_0x367d50(0x17e))['atomic'](_0x428464['checkpoint'][_0x367d50(0x125)],_0x2969f3);const _0x11e34d={};return _0x11e34d['status']=_0x367d50(0x12c),_0x11e34d['recoveryId']=_0x33710c[_0x367d50(0x158)],_0x11e34d[_0x367d50(0x134)]=_0x28bbaa['archiveHash'],_0x11e34d[_0x367d50(0x147)]=_0x55d027,_0x11e34d;}catch(_0x261af3){const _0x443382={};return _0x443382['status']=_0x367d50(0x12d),_0x443382[_0x367d50(0x156)]=_0x261af3['code']||_0x367d50(0x16c),_0x443382;}finally{for(const _0x4f1a4a of _0x313cd5[_0x367d50(0x181)]())_0x4f1a4a();}}function validateRetiredCacheArtifact(_0x322f61,_0x181ee5,_0x29ff6a,_0x234612){const _0x49e597=_0x394b83;try{_0x322f61=fs[_0x49e597(0x195)](_0x322f61),safePath(_0x322f61,_0x181ee5);const _0x20da40=path[_0x49e597(0x12a)](_0x322f61,_0x181ee5)[_0x49e597(0x13b)]('\x5c','/'),_0x5d2198=sha(_0x29ff6a),_0x1141da=[_0x49e597(0x138),_0x49e597(0x155)][_0x49e597(0x16d)](_0x2081e3=>read(_0x322f61,path[_0x49e597(0x15e)](_0x322f61,'.agents/runtime',_0x2081e3)))[_0x49e597(0x198)](Boolean);for(const _0x50637d of _0x1141da)for(const _0x1c088e of[..._0x50637d['value']['indexRecoveries']||[],..._0x50637d['value'][_0x49e597(0x131)]?.[_0x49e597(0x150)]?[_0x50637d[_0x49e597(0x191)][_0x49e597(0x131)][_0x49e597(0x150)]]:[]]){const _0x1f7017=validateIndexArchive(_0x322f61,_0x1c088e,_0x234612);if(_0x1141da[_0x49e597(0x18b)](_0x51993d=>[_0x49e597(0xfa),_0x49e597(0x12d)][_0x49e597(0xfc)](_0x51993d[_0x49e597(0x191)][_0x49e597(0x131)]?.['status'])&&_0x51993d[_0x49e597(0x191)]['indexResult'][_0x49e597(0xfe)]?.[_0x49e597(0x19a)]===_0x1f7017[_0x49e597(0x19a)]))continue;const _0xc7355f=_0x1f7017[_0x49e597(0x13d)]['find'](_0x910b2e=>_0x910b2e['original']===_0x20da40&&_0x910b2e['sha256']===_0x5d2198);if(!_0xc7355f||!/^\.agents\/runtime\/backends\/(codegraph|code-review-graph)\/caches\/[a-f0-9]{24}\/(receipt|recovery)\.json$/[_0x49e597(0x114)](_0x20da40))continue;if(!fs[_0x49e597(0x17d)](_0x181ee5)[_0x49e597(0x166)](Buffer['from'](_0x29ff6a))||!fs[_0x49e597(0x17d)](path[_0x49e597(0x15e)](_0x1f7017[_0x49e597(0x147)],_0xc7355f[_0x49e597(0xf4)]))[_0x49e597(0x166)](Buffer[_0x49e597(0x124)](_0x29ff6a)))continue;return!![];}}catch{}return![];}const _0x15da0e={};_0x15da0e[_0x394b83(0x105)]=inspectIndexInterruption,_0x15da0e['reconcileIndexInterruption']=reconcileIndexInterruption,_0x15da0e['validateIndexArchive']=validateIndexArchive,_0x15da0e[_0x394b83(0x126)]=validateRetiredCacheArtifact,module[_0x394b83(0x14f)]=_0x15da0e;
|