apt-mcp-agent-setup 3.5.25 → 3.5.30
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 +54 -36
- 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 +161 -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/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/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 +2 -2
|
@@ -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
|
-
function
|
|
1
|
+
function _0x1942(){const _0x24d718=['lMfNzw50CY9JB3jLl2HVB2STyNjPzgDLlMPZ','BwvZC2fNzq','mtyWndCWoezPzfDAwq','DNnJB2rL','odaWntz3Cu1muwy','mJK0nZKYs252BvH3','sw52ywXPzcbJB25MAwCGyxqG','zw50CMLLCW','DNnJB2rLlwnVCgLSB3q','Cgf0Aa','y3vYC29Y','su5wquXjrf9dt05gsuC','Aw5JBhvKzxm','BwvYz2viB29RCW','y29KzxG','lI9Tyw5Hz2vKlwnVBMzPzW','CMvHzezPBgvtEw5J','y29Kzq','CMvWBgfJzq','y2XHDwrL','AM9PBG','zxHPC3rZu3LUyW','B2jQzwn0','C29Tzq','y29UzMLN','ywr2AxnVCNK','m3Hyr2THyW','ntGZmtK2zxfKC0XI','y29TBwfUza','y2XHDwrLlwrLC2T0B3a','lI4Vy29Yzs9OB3n0lwfKyxb0zxjZ','sg9VAYbJB25MAwCGCgf0AcbLC2nHCgvZihbYB2PLy3q','odKYntz2r29fq2q','lI9OB29RlwrPC3bHDgnOzxi','zMLSDgvY','CMvJDxjZAxzL','lMfNzw50CY9JB3jLl2HVB2STzgLZCgf0y2HLCI5QCW','zgLYBMfTzq','BM9KzsaTzsaIlYPbufrFse9ps19cuKLer0uQlW','BgL2zvzLCMLMAwvK','DxrMoa','ChvIBgLJs2v5','ChvZAa','nZvRqNDfvg4','CMvSyxrPDMu','zMLSzvn5C3rLBq','AxnbCNjHEq','CNvUDgLTzvjVB3q','A2v5CW','yw50AwDYyxzPDhK','nJm1mJDvtLfUAKe','D3jPDgvgAwXLu3LUyW','ndyYmZaWm21LwuzOsG','C3rYAw5NAwz5','BM9KzsaTzsa','yxnZAwDU','CMvZB2X2zq','CgfYC2u','C3rYAw5N','C3rHCNrZv2L0Aa','C3rHDhvZ','qvbux0Hpt0TFqLjjreDf','oYbVCMLNAw5HBcbMAwXLihDHCYbWCMvZzxj2zwq6ia'];_0x1942=function(){return _0x24d718;};return _0x1942();}const _0x532277=_0x1f9e;(function(_0x50050f,_0x45656c){const _0x1181dd=_0x1f9e,_0x2990c0=_0x50050f();while(!![]){try{const _0x6b20af=parseInt(_0x1181dd(0xa1))/0x1+parseInt(_0x1181dd(0xb3))/0x2+-parseInt(_0x1181dd(0x89))/0x3*(parseInt(_0x1181dd(0x8a))/0x4)+parseInt(_0x1181dd(0x9a))/0x5*(-parseInt(_0x1181dd(0x8f))/0x6)+-parseInt(_0x1181dd(0xb0))/0x7+-parseInt(_0x1181dd(0xb2))/0x8+parseInt(_0x1181dd(0xa3))/0x9;if(_0x6b20af===_0x45656c)break;else _0x2990c0['push'](_0x2990c0['shift']());}catch(_0x2670ce){_0x2990c0['push'](_0x2990c0['shift']());}}}(_0x1942,0x1c6b0));const fs=require('fs'),path=require(_0x532277(0xb7)),{buildHookConfig}=require(_0x532277(0x8d)),{readJsonWithBackup,parseJson}=require(_0x532277(0xbd));function mergeHooks(_0x5dda61,_0x482c75){const _0x536290=_0x532277;if(Array[_0x536290(0x9d)](_0x482c75)){const _0x1f8e5d=(Array['isArray'](_0x5dda61)?_0x5dda61:[])[_0x536290(0x91)](_0x37f39e=>!JSON[_0x536290(0xa4)](_0x37f39e)['includes'](_0x536290(0xac)));return[..._0x1f8e5d,..._0x482c75];}if(_0x482c75&&typeof _0x482c75==='object'){const _0x2c29b6={..._0x5dda61&&typeof _0x5dda61===_0x536290(0x85)?_0x5dda61:{}},_0x2674c8=_0x2c29b6;for(const [_0x29dffb,_0x53c6ef]of Object[_0x536290(0xb5)](_0x482c75)){const _0x4467ec=Array[_0x536290(0x9d)](_0x53c6ef)&&!JSON[_0x536290(0xa4)](_0x2674c8[_0x29dffb]??'')[_0x536290(0xba)](_0x536290(0xac))&&Object[_0x536290(0xb5)](_0x2674c8)[_0x536290(0x86)](([_0x32110b,_0x1ca188])=>_0x32110b[_0x536290(0xaa)](_0x29dffb+'_')&&JSON[_0x536290(0xa4)](_0x1ca188)[_0x536290(0xba)](_0x536290(0xac)));if(!_0x4467ec)_0x2674c8[_0x29dffb]=mergeHooks(_0x2674c8[_0x29dffb],_0x53c6ef);}return _0x2674c8;}return _0x482c75;}function installHostHooks(_0x272f03,_0x22c949=null,_0x25ffc7={}){const _0x5bbece=_0x532277,_0x3a67a3=_0x25ffc7['fileSystem']||fs,_0x5f3a6a={};_0x5f3a6a[_0x5bbece(0xbc)]=_0x5bbece(0xbc),_0x5f3a6a[_0x5bbece(0xc1)]='claude-code',_0x5f3a6a[_0x5bbece(0xb8)]=_0x5bbece(0xb8),_0x5f3a6a[_0x5bbece(0xa0)]=_0x5bbece(0xa0),_0x5f3a6a[_0x5bbece(0xb1)]=_0x5bbece(0xb6),_0x5f3a6a['windsurf']='windsurf',_0x5f3a6a[_0x5bbece(0x8c)]='claude-desktop';const _0x5b6ba6=_0x5f3a6a;let _0x665abe=path[_0x5bbece(0xc2)](_0x272f03,_0x5bbece(0xae));if(!_0x3a67a3[_0x5bbece(0xc3)](_0x665abe))return[];if(_0x25ffc7[_0x5bbece(0x9e)]&&_0x25ffc7[_0x5bbece(0x98)]){_0x665abe=path['join'](_0x272f03,_0x5bbece(0x93));const _0x3e14f5=require(_0x5bbece(0x90))['renderDispatcher'](_0x25ffc7[_0x5bbece(0x9e)],_0x25ffc7[_0x5bbece(0x98)]);if(!_0x3a67a3[_0x5bbece(0xc3)](_0x665abe)||_0x3a67a3['readFileSync'](_0x665abe,_0x5bbece(0x97))!==_0x3e14f5)_0x3a67a3[_0x5bbece(0xa2)](_0x665abe,_0x3e14f5);}const _0x5cbb52=[];for(const _0x26373c of _0x22c949||Object[_0x5bbece(0x9f)](_0x5b6ba6)['filter'](_0x5f3378=>_0x5f3378!==_0x5bbece(0x8c))){const _0x37ddf4=buildHookConfig(_0x5b6ba6[_0x26373c]||_0x26373c,_0x665abe,_0x272f03);if(!_0x37ddf4?.[_0x5bbece(0xb7)]||!_0x37ddf4[_0x5bbece(0x87)]||_0x37ddf4[_0x5bbece(0x88)])continue;const _0x1408d8=path[_0x5bbece(0xa7)](_0x272f03,_0x37ddf4[_0x5bbece(0xb7)]);if(path[_0x5bbece(0x9b)](_0x272f03,_0x1408d8)[_0x5bbece(0xaa)]('..'))throw new Error(_0x5bbece(0x8e));const _0x359ba8=JSON[_0x5bbece(0xa8)](JSON[_0x5bbece(0xa4)](_0x37ddf4[_0x5bbece(0x87)]),(_0x231cb1,_0x3af8fe)=>{const _0x31039f=_0x5bbece;if(_0x231cb1===_0x31039f(0x8b)&&typeof _0x3af8fe===_0x31039f(0xa9)&&_0x3af8fe[_0x31039f(0xaa)](_0x31039f(0xa5))&&!_0x3af8fe[_0x31039f(0xba)]('APT_HOOK_BRIDGE'))return _0x3af8fe[_0x31039f(0xc0)]('node\x20-e\x20\x22',_0x31039f(0x95));return _0x3af8fe;});let _0xeb3ecf;if(!_0x25ffc7[_0x5bbece(0x9c)])_0xeb3ecf=readJsonWithBackup(_0x1408d8);else{if(!_0x3a67a3['existsSync'](_0x1408d8))_0xeb3ecf={};else try{_0xeb3ecf=parseJson(_0x3a67a3[_0x5bbece(0xbe)](_0x1408d8,_0x5bbece(0x97)));}catch(_0x240c7c){const _0x3307f6={};_0x3307f6[_0x5bbece(0xbf)]=_0x5bbece(0xb9);throw Object[_0x5bbece(0xa6)](new Error(_0x5bbece(0xb4)+_0x1408d8+_0x5bbece(0xad)+_0x240c7c[_0x5bbece(0xaf)]),_0x3307f6);}}const _0xa0926c=mergeHooks(_0xeb3ecf,_0x359ba8),_0x5d80fc={};_0x5d80fc[_0x5bbece(0x92)]=!![],_0x3a67a3['mkdirSync'](path[_0x5bbece(0x94)](_0x1408d8),_0x5d80fc),_0x3a67a3['writeFileSync'](_0x1408d8,JSON['stringify'](_0xa0926c,null,0x2)+'\x0a');const _0x44f3c3={};_0x44f3c3['host']=_0x26373c,_0x44f3c3[_0x5bbece(0xb7)]=_0x37ddf4[_0x5bbece(0xb7)],_0x44f3c3['protocolTested']=![],_0x44f3c3[_0x5bbece(0x96)]=![],_0x44f3c3[_0x5bbece(0xab)]='installed-unobserved',_0x5cbb52[_0x5bbece(0x99)](_0x44f3c3);}return _0x5cbb52;}const _0x242770={};function _0x1f9e(_0x1cefb,_0x533fbc){_0x1cefb=_0x1cefb-0x85;const _0x194244=_0x1942();let _0x1f9ee2=_0x194244[_0x1cefb];if(_0x1f9e['RMiumS']===undefined){var _0x44e96a=function(_0x3cc4aa){const _0x46ee70='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x337065='',_0x477fad='';for(let _0x560499=0x0,_0x4cca69,_0x126826,_0x242770=0x0;_0x126826=_0x3cc4aa['charAt'](_0x242770++);~_0x126826&&(_0x4cca69=_0x560499%0x4?_0x4cca69*0x40+_0x126826:_0x126826,_0x560499++%0x4)?_0x337065+=String['fromCharCode'](0xff&_0x4cca69>>(-0x2*_0x560499&0x6)):0x0){_0x126826=_0x46ee70['indexOf'](_0x126826);}for(let _0x5dda61=0x0,_0x482c75=_0x337065['length'];_0x5dda61<_0x482c75;_0x5dda61++){_0x477fad+='%'+('00'+_0x337065['charCodeAt'](_0x5dda61)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x477fad);};_0x1f9e['PQGPSy']=_0x44e96a,_0x1f9e['eDrvtC']={},_0x1f9e['RMiumS']=!![];}const _0x3bd1cf=_0x194244[0x0],_0x37e43d=_0x1cefb+_0x3bd1cf,_0x17ec77=_0x1f9e['eDrvtC'][_0x37e43d];return!_0x17ec77?(_0x1f9ee2=_0x1f9e['PQGPSy'](_0x1f9ee2),_0x1f9e['eDrvtC'][_0x37e43d]=_0x1f9ee2):_0x1f9ee2=_0x17ec77,_0x1f9ee2;}_0x242770['installHostHooks']=installHostHooks,_0x242770[_0x532277(0xbb)]=mergeHooks,module['exports']=_0x242770;
|
|
@@ -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 _0x3aa1b9=_0x355b;(function(_0x2d03f2,_0x1e980c){const _0x210c97=_0x355b,_0x471549=_0x2d03f2();while(!![]){try{const _0x1836c9=-parseInt(_0x210c97(0x149))/0x1*(-parseInt(_0x210c97(0x171))/0x2)+parseInt(_0x210c97(0x140))/0x3+parseInt(_0x210c97(0x14b))/0x4*(parseInt(_0x210c97(0x166))/0x5)+parseInt(_0x210c97(0x14f))/0x6*(-parseInt(_0x210c97(0xe8))/0x7)+parseInt(_0x210c97(0x187))/0x8+-parseInt(_0x210c97(0x161))/0x9*(-parseInt(_0x210c97(0x178))/0xa)+parseInt(_0x210c97(0x12a))/0xb*(-parseInt(_0x210c97(0x167))/0xc);if(_0x1836c9===_0x1e980c)break;else _0x471549['push'](_0x471549['shift']());}catch(_0x4f6d0d){_0x471549['push'](_0x471549['shift']());}}}(_0x3ce1,0x937a1));const fs=require(_0x3aa1b9(0x18e)),path=require(_0x3aa1b9(0x106)),crypto=require(_0x3aa1b9(0x188)),{preserveArchiveBytes}=require(_0x3aa1b9(0x13a)),{sameWorkspace}=require(_0x3aa1b9(0x139)),{verifyIndexProducer,sha}=require('../core/recovery-proof'),{safePath,validateManagedIndexCache}=require(_0x3aa1b9(0xfa)),fail=_0xfca618=>{const _0x37231c=_0x3aa1b9;throw Object[_0x37231c(0x1a5)](Error(_0xfca618),{'code':_0xfca618});},read=(_0x562dc7,_0x12a2da)=>{const _0x3df13b=_0x3aa1b9;safePath(_0x562dc7,_0x12a2da);try{const _0x48eb35=fs[_0x3df13b(0xf1)](_0x12a2da);return{'file':_0x12a2da,'bytes':_0x48eb35,'sha256':sha(_0x48eb35),'value':JSON['parse'](_0x48eb35)};}catch(_0x8964b1){if(_0x8964b1[_0x3df13b(0x148)]===_0x3df13b(0x169))return null;throw _0x8964b1;}};function classifyInterruption({workspace:_0x2a15ab,execution:_0x4ce81f,boot:_0x4dfaf5,processIdentity:_0x1ccf57,producer:_0x5f3cb3,lifecycle:_0x101f65}){const _0xbc79a5=_0x3aa1b9,_0x4a660c=require('../core/boot-evidence'),_0x254136={};_0x254136[_0xbc79a5(0xe6)]=_0x4ce81f,_0x254136[_0xbc79a5(0x176)]=_0x4dfaf5,_0x254136[_0xbc79a5(0xf9)]=_0x1ccf57;const _0x3c6272=_0x4a660c[_0xbc79a5(0x154)](_0x254136);if(_0x3c6272[_0xbc79a5(0xe5)]===_0xbc79a5(0x14e)){if(_0x5f3cb3[_0xbc79a5(0x18d)]['cacheContract']===0x3&&!_0x4a660c['validLaunchBoot'](_0x4ce81f,_0x4dfaf5))fail(_0xbc79a5(0x104));return _0x3c6272;}if(_0x3c6272[_0xbc79a5(0xe5)]!==_0xbc79a5(0xe9)||_0x3c6272[_0xbc79a5(0x12c)]!=='process-not-before-boot')return _0x3c6272;const _0x122a57={};_0x122a57[_0xbc79a5(0xe5)]=_0xbc79a5(0xe9),_0x122a57[_0xbc79a5(0x12c)]='index-stop-evidence-required',_0x122a57['diagnostic']=_0x3c6272[_0xbc79a5(0x12c)];const _0x371eb4=_0x122a57;if(_0x5f3cb3[_0xbc79a5(0x18d)][_0xbc79a5(0x10a)]!==0x1||_0x101f65?.[_0xbc79a5(0xe5)]!==_0xbc79a5(0x144))return _0x371eb4;const _0x5edde2=_0x101f65[_0xbc79a5(0x117)],_0x25c788=_0x4ce81f[_0xbc79a5(0xfc)];if(_0x101f65[_0xbc79a5(0xea)]!==0x1||!_0x101f65[_0xbc79a5(0x123)]||!sameWorkspace(_0x101f65[_0xbc79a5(0x123)],_0x2a15ab)||_0x101f65[_0xbc79a5(0x18f)]?.[_0xbc79a5(0xea)]!==_0x5f3cb3['version']||_0x101f65[_0xbc79a5(0x18f)]?.[_0xbc79a5(0x137)]!==_0x5f3cb3[_0xbc79a5(0x137)]||JSON[_0xbc79a5(0x1a0)](_0x101f65['execution'])!==JSON[_0xbc79a5(0x1a0)](_0x4ce81f)||_0x4ce81f['containment']!=='windows-job-object'||_0x25c788?.[_0xbc79a5(0x147)]!==_0xbc79a5(0xe4)||_0x25c788[_0xbc79a5(0x102)]!==!![]||_0x25c788['launcherPid']!==_0x4ce81f[_0xbc79a5(0x15f)]||_0x25c788[_0xbc79a5(0x103)]!==_0x4ce81f[_0xbc79a5(0x103)]||_0x5edde2?.['source']!==_0xbc79a5(0xe4)||!_0x5edde2[_0xbc79a5(0x123)]||!sameWorkspace(_0x5edde2[_0xbc79a5(0x123)],_0x2a15ab)||_0x5edde2[_0xbc79a5(0x12d)]!==_0xbc79a5(0x19b)||_0x5edde2[_0xbc79a5(0x19e)]!==!![]||_0x5edde2[_0xbc79a5(0xf6)]!==_0x4ce81f['launcherPid']||_0x5edde2['processStart']!==_0x4ce81f['launcherProcessStart']||!['graceful','force']['includes'](_0x5edde2[_0xbc79a5(0xf4)])||typeof _0x5edde2[_0xbc79a5(0x189)]!==_0xbc79a5(0x163)||!_0x5edde2[_0xbc79a5(0x189)]['trim']()||_0x5edde2['job']?.[_0xbc79a5(0x102)]!==!![]||_0x5edde2[_0xbc79a5(0x17b)][_0xbc79a5(0x113)]!==0x0||_0x5edde2['job']['stopped']!==!![]||!Number[_0xbc79a5(0x17f)](_0x5edde2['job'][_0xbc79a5(0x175)])||_0x5edde2[_0xbc79a5(0x17b)][_0xbc79a5(0x175)]<=0x0||_0x5edde2[_0xbc79a5(0x17b)][_0xbc79a5(0x175)]>0xffffffff||[_0x4ce81f[_0xbc79a5(0x12f)],_0x4ce81f['launcherPid']][_0xbc79a5(0x13e)](_0x5edde2[_0xbc79a5(0x17b)][_0xbc79a5(0x175)])||!_0x4a660c[_0xbc79a5(0x159)](_0x4ce81f,_0x4dfaf5))return _0x371eb4;const _0x4730c9=typeof _0x5edde2[_0xbc79a5(0x138)]===_0xbc79a5(0x163)?Date['parse'](_0x5edde2['closedAt']):NaN;if(!Number[_0xbc79a5(0x17f)](_0x4730c9)||new Date(_0x4730c9)[_0xbc79a5(0x160)]()!==_0x5edde2[_0xbc79a5(0x138)])return _0x371eb4;const _0x3f8d3c=BigInt(_0x4730c9)*0x2710n+0x19db1ded53e8000n;if([_0x4ce81f['coordinatorProcessStart'],_0x4ce81f[_0xbc79a5(0x103)],_0x4ce81f[_0xbc79a5(0x176)][_0xbc79a5(0x152)]][_0xbc79a5(0x116)](_0x4be99b=>_0x3f8d3c+0x270fn<BigInt(_0x4be99b))||_0x3f8d3c>BigInt(_0x4dfaf5[_0xbc79a5(0x152)]))return _0x371eb4;const _0xc73c6d={};return _0xc73c6d[_0xbc79a5(0xe5)]='recoverable-interruption',_0xc73c6d['reason']=_0xbc79a5(0x125),_0xc73c6d;}function _0x355b(_0x40e649,_0x2dc70d){_0x40e649=_0x40e649-0xe4;const _0x3ce122=_0x3ce1();let _0x355be7=_0x3ce122[_0x40e649];if(_0x355b['geTPDh']===undefined){var _0x3ceadf=function(_0x29e8d3){const _0x417045='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x275c76='',_0x4c9317='';for(let _0x1d2d07=0x0,_0x157527,_0x4befb4,_0x26bf2f=0x0;_0x4befb4=_0x29e8d3['charAt'](_0x26bf2f++);~_0x4befb4&&(_0x157527=_0x1d2d07%0x4?_0x157527*0x40+_0x4befb4:_0x4befb4,_0x1d2d07++%0x4)?_0x275c76+=String['fromCharCode'](0xff&_0x157527>>(-0x2*_0x1d2d07&0x6)):0x0){_0x4befb4=_0x417045['indexOf'](_0x4befb4);}for(let _0x93cdbb=0x0,_0x2266e7=_0x275c76['length'];_0x93cdbb<_0x2266e7;_0x93cdbb++){_0x4c9317+='%'+('00'+_0x275c76['charCodeAt'](_0x93cdbb)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x4c9317);};_0x355b['uecnsK']=_0x3ceadf,_0x355b['tpsbQv']={},_0x355b['geTPDh']=!![];}const _0x2fb0c2=_0x3ce122[0x0],_0x2edb77=_0x40e649+_0x2fb0c2,_0x4c6e4d=_0x355b['tpsbQv'][_0x2edb77];return!_0x4c6e4d?(_0x355be7=_0x355b['uecnsK'](_0x355be7),_0x355b['tpsbQv'][_0x2edb77]=_0x355be7):_0x355be7=_0x4c6e4d,_0x355be7;}function validateIndexArchive(_0x1947bb,_0x51ffa0,_0x5e75f9=require(_0x3aa1b9(0x108))[_0x3aa1b9(0xf5)]){const _0x4b6177=_0x3aa1b9;if(!_0x51ffa0||!/^[a-f0-9-]{36}$/[_0x4b6177(0x114)](_0x51ffa0['recoveryId']||'')||!/^[a-f0-9]{64}$/['test'](_0x51ffa0['archiveHash']||''))fail('INDEX_RECOVERY_CHANGED');const _0x49533c=safePath(_0x1947bb,path[_0x4b6177(0x172)](_0x1947bb,_0x4b6177(0x19f),_0x4b6177(0x110)+_0x51ffa0['recoveryId'])),_0x3e64b3=read(_0x1947bb,path[_0x4b6177(0x172)](_0x49533c,'backup.json'));if(!_0x3e64b3||_0x3e64b3[_0x4b6177(0x15e)]!==_0x51ffa0[_0x4b6177(0x141)]||_0x3e64b3[_0x4b6177(0x100)]['recoveryId']!==_0x51ffa0['recoveryId']||!sameWorkspace(_0x3e64b3['value'][_0x4b6177(0x123)],_0x1947bb)||!Array[_0x4b6177(0x18a)](_0x3e64b3[_0x4b6177(0x100)]['files']))fail(_0x4b6177(0x19c));for(const _0x1fad08 of _0x3e64b3[_0x4b6177(0x100)]['files']){const _0x45a370=safePath(_0x1947bb,path[_0x4b6177(0x109)](_0x49533c,_0x1fad08[_0x4b6177(0x10b)]));if(!_0x45a370['startsWith'](_0x49533c+path[_0x4b6177(0xec)])||!/^[a-f0-9]{64}$/[_0x4b6177(0x114)](_0x1fad08[_0x4b6177(0x15e)]||'')||sha(fs[_0x4b6177(0xf1)](_0x45a370))!==_0x1fad08[_0x4b6177(0x15e)])fail('INDEX_RECOVERY_CHANGED');}const _0xae4705=_0x3e64b3[_0x4b6177(0x100)];if(_0xae4705[_0x4b6177(0xea)]!==0x1||_0xae4705[_0x4b6177(0x131)][_0x4b6177(0x116)]((_0x36ef10,_0x3cca26)=>!_0x36ef10[_0x4b6177(0x136)]||_0xae4705['files']['findIndex'](_0x4931a0=>_0x4931a0[_0x4b6177(0x136)]===_0x36ef10[_0x4b6177(0x136)]||_0x4931a0[_0x4b6177(0x10b)]===_0x36ef10[_0x4b6177(0x10b)])!==_0x3cca26))fail(_0x4b6177(0x19c));if(!_0xae4705[_0x4b6177(0x16a)]||[_0x4b6177(0x12b),'code-review-graph'][_0x4b6177(0x116)](_0x33a8bf=>!/^[a-f0-9-]{36}$/['test'](_0xae4705['instances'][_0x33a8bf]||'')))fail(_0x4b6177(0x19c));const _0x236d80=_0x380c6c=>{const _0xd1c787=_0x4b6177,_0x5dcb2e=_0xae4705[_0xd1c787(0x131)][_0xd1c787(0x134)](_0x4dd8e3=>_0x4dd8e3[_0xd1c787(0x10b)]===_0x380c6c);if(!_0x5dcb2e)fail('INDEX_RECOVERY_CHANGED');return JSON['parse'](fs[_0xd1c787(0xf1)](path['join'](_0x49533c,_0x380c6c)));},_0x24eb56=_0xae4705['files']['find'](_0x4af475=>[_0x4b6177(0x13b),_0x4b6177(0x135)]['includes'](_0x4af475[_0x4b6177(0x10b)]));if(!_0x24eb56||_0x24eb56['sha256']!==_0xae4705[_0x4b6177(0x12e)])fail('INDEX_RECOVERY_CHANGED');const _0x10464d=_0x236d80(_0x24eb56[_0x4b6177(0x10b)]),_0x178f1f=_0x236d80(_0x4b6177(0x184)),_0x1f00a4=_0x236d80(_0x4b6177(0x181)),_0x509f7d=_0x10464d['indexResult']?.[_0x4b6177(0xe6)],_0x12ace7=verifyIndexProducer(_0xae4705[_0x4b6177(0x13f)]?.[_0x4b6177(0x174)],_0x5e75f9);if(!_0x509f7d||_0x509f7d['attemptId']!==_0xae4705['attemptId']||!sameWorkspace(_0x10464d[_0x4b6177(0x123)],_0x1947bb)||!sameWorkspace(_0x178f1f['workspace'],_0x1947bb)||_0x12ace7[_0x4b6177(0xea)]!==_0x178f1f['version']||_0x12ace7[_0x4b6177(0x137)]!==_0x178f1f[_0x4b6177(0x137)]||_0x10464d[_0x4b6177(0x18f)]?.['version']!==_0x12ace7[_0x4b6177(0xea)]||_0x10464d['target']?.[_0x4b6177(0x137)]!==_0x12ace7['digest']||[_0x4b6177(0xfd),'resourceDigest',_0x4b6177(0xf3),_0x4b6177(0x111)]['some'](_0x9ffeb1=>(_0x10464d[_0x9ffeb1]??null)!==(_0x178f1f[_0x9ffeb1]??null)||(_0x509f7d[_0x9ffeb1]??null)!==(_0x178f1f[_0x9ffeb1]??null))||_0x1f00a4[_0x4b6177(0x16d)]!=='open'||_0x1f00a4[_0x4b6177(0x18b)]!==_0x509f7d[_0x4b6177(0x157)]||_0xae4705[_0x4b6177(0x131)]['find'](_0x183ddb=>_0x183ddb[_0x4b6177(0x10b)]===_0x4b6177(0x184))?.[_0x4b6177(0x15e)]!==_0xae4705[_0x4b6177(0x180)]||_0xae4705['files']['find'](_0x209564=>_0x209564[_0x4b6177(0x10b)]===_0x4b6177(0x181))?.[_0x4b6177(0x15e)]!==_0xae4705[_0x4b6177(0x13c)]||_0xae4705[_0x4b6177(0x197)]!==_0x4b6177(0xe9)||!Number[_0x4b6177(0x17f)](_0x178f1f['generation'])||_0x178f1f[_0x4b6177(0xfd)]<0x1||!/^[a-f0-9]{64}$/[_0x4b6177(0x114)](_0x178f1f[_0x4b6177(0xf3)]||'')||_0x1f00a4['generation']!=null&&_0x1f00a4[_0x4b6177(0xfd)]!==_0x178f1f[_0x4b6177(0xfd)]||_0x509f7d['containment']&&_0x509f7d[_0x4b6177(0x12d)]!==_0x12ace7[_0x4b6177(0x18d)][_0x4b6177(0x12d)]||_0x509f7d[_0x4b6177(0x13f)]&&(_0x509f7d['producer']['digest']!==_0x12ace7[_0x4b6177(0x137)]||_0x509f7d[_0x4b6177(0x13f)][_0x4b6177(0xea)]!==_0x12ace7['version']))fail(_0x4b6177(0x19c));const _0x39cf13=_0x421289=>_0xae4705[_0x4b6177(0x131)]['find'](_0x252e22=>_0x252e22[_0x4b6177(0x136)]===path[_0x4b6177(0x14a)](_0x1947bb,_0x421289)[_0x4b6177(0x13d)]('\x5c','/')),_0x2c7dd9=_0x39cf13(path[_0x4b6177(0x172)](_0x1947bb,_0x4b6177(0xff)));if(!_0x2c7dd9||_0x2c7dd9[_0x4b6177(0x15e)]!==_0x178f1f[_0x4b6177(0x164)])fail('INDEX_RECOVERY_CHANGED');const _0x3a5f19=require(_0x4b6177(0xfa)),_0x1eb708=new Set([_0x4b6177(0xfb)+_0x24eb56['path'],'.agents/runtime/generation.json',_0x4b6177(0x191),_0x4b6177(0xff),...[_0x4b6177(0x190),_0x4b6177(0x11c),_0x4b6177(0x173)]['map'](_0xd4230d=>'.agents/runtime/'+_0xd4230d)]);for(const _0x41ed56 of[_0x4b6177(0x12b),_0x4b6177(0x17e)]){const _0x13022e={..._0x12ace7[_0x4b6177(0x18d)][_0x4b6177(0xf0)][_0x41ed56]};_0x13022e['cacheContract']=_0x12ace7[_0x4b6177(0x18d)][_0x4b6177(0x142)];const _0x1e63c4=_0x13022e,_0x56f6b8=_0x509f7d[_0x4b6177(0x193)]?.[_0x4b6177(0x134)](_0x58d22a=>_0x58d22a[_0x4b6177(0x15d)]===_0x41ed56)?.['marker'];if(!_0x56f6b8&&_0x1e63c4['cacheContract']===0x3)fail(_0x4b6177(0x19c));const _0x4876a6={};_0x4876a6['workspace']=_0x1947bb,_0x4876a6[_0x4b6177(0x15d)]=_0x41ed56,_0x4876a6[_0x4b6177(0x16c)]=_0x1e63c4,_0x4876a6[_0x4b6177(0x1a3)]=_0x56f6b8?.[_0x4b6177(0x1a3)],_0x4876a6[_0x4b6177(0x121)]=!![];const _0x530c89=_0x3a5f19['resolveManagedIndexCache'](_0x4876a6);if(_0x56f6b8&&JSON[_0x4b6177(0x1a0)](_0x56f6b8)!==JSON[_0x4b6177(0x1a0)](_0x530c89[_0x4b6177(0xf7)]))fail(_0x4b6177(0x19c));for(const _0x2557ac of[path[_0x4b6177(0x172)](_0x530c89['stateDirectory'],_0x4b6177(0xf8)),path['join'](_0x530c89[_0x4b6177(0x195)],_0x4b6177(0x186))]){const _0x16e883=_0x39cf13(_0x2557ac);if(!_0x16e883||_0x16e883[_0x4b6177(0x15e)]!==sha(JSON[_0x4b6177(0x1a0)](_0x530c89['marker'])))fail('INDEX_RECOVERY_CHANGED');}for(const _0x2b337e of[...[_0x4b6177(0xf8),_0x4b6177(0x16e),_0x4b6177(0x17c),_0x4b6177(0x17d),_0x4b6177(0x192)][_0x4b6177(0xef)](_0x5e8623=>path[_0x4b6177(0x172)](_0x530c89['stateDirectory'],_0x5e8623)),path['join'](_0x530c89[_0x4b6177(0x195)],_0x4b6177(0x186)),..._0x530c89[_0x4b6177(0x146)]?[_0x530c89[_0x4b6177(0x146)]]:[]])_0x1eb708['add'](path[_0x4b6177(0x14a)](_0x1947bb,_0x2b337e)['replaceAll']('\x5c','/'));const _0x1136d0=_0x530c89[_0x4b6177(0x146)]&&_0x39cf13(_0x530c89['selectorFile']);if(_0x1136d0){const _0x4778f2=_0x236d80(_0x1136d0[_0x4b6177(0x10b)]);if(_0x4778f2[_0x4b6177(0xea)]!==0x1||_0x4778f2[_0x4b6177(0x145)]!==_0x530c89[_0x4b6177(0x145)]||_0x4778f2[_0x4b6177(0x14c)]!==_0x530c89[_0x4b6177(0xf7)]['instanceId']&&_0x4778f2[_0x4b6177(0x126)]?.[_0x4b6177(0x1a3)]!==_0x530c89['marker'][_0x4b6177(0x1a3)]||_0x4778f2['active']===_0x530c89[_0x4b6177(0xf7)][_0x4b6177(0x1a3)]&&_0x4778f2['active']!=='00000000-0000-0000-0000-000000000000'&&_0x39cf13(path['join'](_0x530c89[_0x4b6177(0x168)],_0x4b6177(0x192)))?.[_0x4b6177(0x15e)]!==_0x4778f2[_0x4b6177(0x1a1)])fail(_0x4b6177(0x19c));}else{if(_0x1e63c4[_0x4b6177(0x142)]===0x3&&_0x530c89[_0x4b6177(0xf7)][_0x4b6177(0x1a3)]!==_0x4b6177(0x128))fail(_0x4b6177(0x19c));}}let _0xb2b699;if(_0x12ace7[_0x4b6177(0x18d)][_0x4b6177(0x142)]===0x3){const _0x123706=_0x39cf13(path[_0x4b6177(0x172)](_0x1947bb,_0x4b6177(0xed),_0x509f7d[_0x4b6177(0x10c)]+_0x4b6177(0x129)));if(!_0x123706)fail(_0x4b6177(0x19c));_0xb2b699=_0x236d80(_0x123706[_0x4b6177(0x10b)]);if(JSON[_0x4b6177(0x1a0)](_0xb2b699['execution'])!==JSON[_0x4b6177(0x1a0)](_0x509f7d)||![_0x4b6177(0x115),'stopped'][_0x4b6177(0x13e)](_0xb2b699[_0x4b6177(0xe5)])||!sameWorkspace(_0xb2b699[_0x4b6177(0x123)],_0x1947bb)||_0xb2b699[_0x4b6177(0x18f)]?.[_0x4b6177(0xea)]!==_0x12ace7['version']||_0xb2b699['target']?.[_0x4b6177(0x137)]!==_0x12ace7['digest'])fail('INDEX_RECOVERY_CHANGED');_0x1eb708[_0x4b6177(0xe7)](_0x123706['original']);}const _0x47f2fe=classifyInterruption({'workspace':_0x1947bb,'execution':_0x509f7d,'boot':_0xae4705[_0x4b6177(0x176)],'producer':_0x12ace7,'lifecycle':_0xb2b699,'processIdentity':_0x4246ee=>Object[_0x4b6177(0x14d)](_0xae4705[_0x4b6177(0x130)]||{},_0x4246ee)?_0xae4705[_0x4b6177(0x130)][_0x4246ee]:undefined});if(_0x47f2fe[_0x4b6177(0xe5)]!==_0x4b6177(0x14e)||_0x47f2fe[_0x4b6177(0x12c)]!==_0xae4705[_0x4b6177(0x12c)])fail(_0x4b6177(0x19c));if(_0xae4705[_0x4b6177(0x131)][_0x4b6177(0x116)](_0x36a89b=>!_0x1eb708[_0x4b6177(0x153)](_0x36a89b['original'])))fail(_0x4b6177(0x19c));const _0xe4f8be={..._0x3e64b3[_0x4b6177(0x100)]};return _0xe4f8be[_0x4b6177(0xeb)]=_0x49533c,_0xe4f8be['archiveHash']=_0x3e64b3[_0x4b6177(0x15e)],_0xe4f8be;}function inspectIndexInterruption(_0xc7f84d,_0x744f31={}){const _0xf15a9d=_0x3aa1b9;try{_0xc7f84d=fs[_0xf15a9d(0x19a)](_0xc7f84d);const _0x3cee4e=path['join'](_0xc7f84d,_0xf15a9d(0x11a)),_0x31f891=read(_0xc7f84d,path['join'](_0x3cee4e,_0xf15a9d(0x184))),_0xc75cda=read(_0xc7f84d,path[_0xf15a9d(0x172)](_0x3cee4e,_0xf15a9d(0x181))),_0x28e991=[_0xf15a9d(0x13b),_0xf15a9d(0x135)][_0xf15a9d(0xef)](_0x15a58b=>read(_0xc7f84d,path[_0xf15a9d(0x172)](_0x3cee4e,_0x15a58b)))[_0xf15a9d(0x10d)](Boolean);for(const _0x18bb41 of _0x28e991){for(const _0x411450 of[..._0x18bb41[_0xf15a9d(0x100)][_0xf15a9d(0x162)]||[],..._0x18bb41['value'][_0xf15a9d(0x1a2)]?.[_0xf15a9d(0x122)]?[_0x18bb41[_0xf15a9d(0x100)]['indexResult'][_0xf15a9d(0x122)]]:[]])validateIndexArchive(_0xc7f84d,_0x411450,_0x744f31['publicKey']);}const _0x2c7520=_0x28e991[_0xf15a9d(0x10d)](_0x2aaae5=>[_0xf15a9d(0x143),_0xf15a9d(0xe9)]['includes'](_0x2aaae5[_0xf15a9d(0x100)][_0xf15a9d(0x1a2)]?.[_0xf15a9d(0xe5)])&&(path['basename'](_0x2aaae5[_0xf15a9d(0x16b)])!==_0xf15a9d(0x135)||!_0x31f891||_0x2aaae5[_0xf15a9d(0x100)][_0xf15a9d(0x18f)]?.['version']===_0x31f891[_0xf15a9d(0x100)]['version']&&_0x2aaae5[_0xf15a9d(0x100)][_0xf15a9d(0x18f)]?.[_0xf15a9d(0x137)]===_0x31f891['value'][_0xf15a9d(0x137)]&&(_0x2aaae5['value'][_0xf15a9d(0x111)]??null)===(_0x31f891['value'][_0xf15a9d(0x111)]??null)));if(!_0x2c7520['length']){const _0x15930d=_0x28e991[_0xf15a9d(0x134)](_0x4ebccc=>_0x4ebccc['value'][_0xf15a9d(0x1a2)]?.['status']===_0xf15a9d(0x185)),_0x39f8a7={};return _0x39f8a7[_0xf15a9d(0xe5)]=_0xf15a9d(0x196),_0x39f8a7['entries']=[],_0x15930d?{'status':_0xf15a9d(0x185),...validateIndexArchive(_0xc7f84d,_0x15930d[_0xf15a9d(0x100)]['indexResult']['recovery'],_0x744f31[_0xf15a9d(0x127)])}:_0x39f8a7;}if(_0x2c7520[_0xf15a9d(0x15b)]!==0x1||!_0x31f891||!_0xc75cda)fail('INDEX_AUTHORITY_UNVERIFIED');const _0x2e87b3=_0x2c7520[0x0],_0x2932ad=_0x2e87b3[_0xf15a9d(0x100)],_0x2ca9ad=_0x2932ad[_0xf15a9d(0x1a2)][_0xf15a9d(0xe6)],_0x4ccef5=_0x31f891[_0xf15a9d(0x100)];if(!_0x2ca9ad||!_0x4ccef5[_0xf15a9d(0x123)]||!_0x2932ad['workspace']||!sameWorkspace(_0x4ccef5[_0xf15a9d(0x123)],_0xc7f84d)||!sameWorkspace(_0x2932ad[_0xf15a9d(0x123)],_0xc7f84d)||_0x2932ad[_0xf15a9d(0x18f)]?.['version']!==_0x4ccef5['version']||_0x2932ad[_0xf15a9d(0x18f)]?.['digest']!==_0x4ccef5[_0xf15a9d(0x137)]||!Number[_0xf15a9d(0x17f)](_0x4ccef5[_0xf15a9d(0xfd)])||_0x4ccef5[_0xf15a9d(0xfd)]<0x1||[_0xf15a9d(0xfd),_0xf15a9d(0x164),_0xf15a9d(0xf3),_0xf15a9d(0x111)][_0xf15a9d(0x116)](_0x4e7404=>(_0x2932ad[_0x4e7404]??null)!==(_0x4ccef5[_0x4e7404]??null)||(_0x2ca9ad[_0x4e7404]??null)!==(_0x4ccef5[_0x4e7404]??null))||!/^[a-f0-9]{64}$/['test'](_0x4ccef5[_0xf15a9d(0xf3)]||'')||_0xc75cda[_0xf15a9d(0x100)][_0xf15a9d(0x16d)]!==_0xf15a9d(0x179)||_0xc75cda[_0xf15a9d(0x100)][_0xf15a9d(0x18b)]!==_0x2ca9ad[_0xf15a9d(0x157)]||_0xc75cda[_0xf15a9d(0x100)][_0xf15a9d(0xfd)]!=null&&_0xc75cda['value']['generation']!==_0x4ccef5[_0xf15a9d(0xfd)]||sha(fs[_0xf15a9d(0xf1)](safePath(_0xc7f84d,path[_0xf15a9d(0x172)](_0xc7f84d,_0xf15a9d(0xff)))))!==_0x4ccef5[_0xf15a9d(0x164)])fail('INDEX_AUTHORITY_UNVERIFIED');const _0x31aa7a=_0x2ca9ad[_0xf15a9d(0x13f)]?.['release']||_0x744f31[_0xf15a9d(0xee)]||_0x4ccef5['release']||_0x744f31[_0xf15a9d(0x101)]&&path[_0xf15a9d(0x172)](_0x744f31[_0xf15a9d(0x101)],_0xf15a9d(0x15a),_0x4ccef5['version']+'-'+_0x4ccef5['digest']),_0x18d22b=verifyIndexProducer(_0x31aa7a,_0x744f31['publicKey']);if(_0x18d22b[_0xf15a9d(0xea)]!==_0x4ccef5[_0xf15a9d(0xea)]||_0x18d22b[_0xf15a9d(0x137)]!==_0x4ccef5[_0xf15a9d(0x137)]||_0x2ca9ad[_0xf15a9d(0x13f)]&&(_0x2ca9ad[_0xf15a9d(0x13f)][_0xf15a9d(0xea)]!==_0x18d22b[_0xf15a9d(0xea)]||_0x2ca9ad[_0xf15a9d(0x13f)][_0xf15a9d(0x137)]!==_0x18d22b['digest'])||_0x2ca9ad[_0xf15a9d(0x12d)]&&_0x2ca9ad[_0xf15a9d(0x12d)]!==_0x18d22b[_0xf15a9d(0x18d)][_0xf15a9d(0x12d)])fail('INDEX_PRODUCER_UNVERIFIED');const _0x408fce=require(_0xf15a9d(0xfa)),_0x255018=['codegraph',_0xf15a9d(0x17e)][_0xf15a9d(0xef)](_0x3c1b53=>{const _0x21fe70=_0xf15a9d,_0x1f4d78={..._0x18d22b[_0x21fe70(0x18d)][_0x21fe70(0xf0)][_0x3c1b53]};_0x1f4d78['cacheContract']=_0x18d22b[_0x21fe70(0x18d)][_0x21fe70(0x142)];const _0x3c586a=_0x1f4d78,_0x2c48c6=_0x2ca9ad['caches']?.[_0x21fe70(0x134)](_0x4602ac=>_0x4602ac[_0x21fe70(0x15d)]===_0x3c1b53)?.['marker'],_0x3b43d8={};_0x3b43d8['workspace']=_0xc7f84d,_0x3b43d8[_0x21fe70(0x15d)]=_0x3c1b53,_0x3b43d8['profile']=_0x3c586a,_0x3b43d8[_0x21fe70(0x1a3)]=_0x2c48c6?.['instanceId'],_0x3b43d8[_0x21fe70(0x121)]=!![];const _0x4a4986=_0x408fce[_0x21fe70(0xfe)](_0x3b43d8);if(!_0x4a4986||_0x2c48c6&&JSON[_0x21fe70(0x1a0)](_0x2c48c6)!==JSON[_0x21fe70(0x1a0)](_0x4a4986[_0x21fe70(0xf7)])||!_0x2c48c6&&_0x3c586a[_0x21fe70(0x142)]===0x3)fail(_0x21fe70(0x156));return validateManagedIndexCache(_0x4a4986),_0x4a4986;}),_0x3e360e=/^[a-f0-9-]{36}$/[_0xf15a9d(0x114)](_0x2ca9ad[_0xf15a9d(0x10c)]||'')?read(_0xc7f84d,path[_0xf15a9d(0x172)](_0x3cee4e,_0xf15a9d(0x11d),_0x2ca9ad[_0xf15a9d(0x10c)]+_0xf15a9d(0x129))):null;if(_0x18d22b[_0xf15a9d(0x18d)][_0xf15a9d(0x142)]===0x3&&(!_0x3e360e||JSON[_0xf15a9d(0x1a0)](_0x3e360e[_0xf15a9d(0x100)][_0xf15a9d(0xe6)])!==JSON[_0xf15a9d(0x1a0)](_0x2ca9ad)||![_0xf15a9d(0x115),'stopped'][_0xf15a9d(0x13e)](_0x3e360e[_0xf15a9d(0x100)][_0xf15a9d(0xe5)])))fail('INDEX_AUTHORITY_UNVERIFIED');const _0x982dd0=[_0x2e87b3,_0x31f891,_0xc75cda,..._0x3e360e?[_0x3e360e]:[],read(_0xc7f84d,path[_0xf15a9d(0x172)](_0xc7f84d,'.agents/manifest.json')),..._0x255018['flatMap'](_0x14f37b=>[...[_0xf15a9d(0xf8),'receipt.json',_0xf15a9d(0x17c),'cache.lock',_0xf15a9d(0x192)][_0xf15a9d(0xef)](_0x2d4bbe=>read(_0xc7f84d,path['join'](_0x14f37b[_0xf15a9d(0x168)],_0x2d4bbe))),read(_0xc7f84d,path[_0xf15a9d(0x172)](_0x14f37b[_0xf15a9d(0x195)],_0xf15a9d(0x186))),_0x14f37b[_0xf15a9d(0x146)]&&read(_0xc7f84d,_0x14f37b[_0xf15a9d(0x146)])][_0xf15a9d(0x10d)](Boolean)),...[_0xf15a9d(0x190),_0xf15a9d(0x11c),'admission.json.lock'][_0xf15a9d(0xef)](_0x234ef1=>read(_0xc7f84d,path[_0xf15a9d(0x172)](_0x3cee4e,_0x234ef1)))['filter'](Boolean)],_0x7764e0=_0x744f31['boot']===undefined?require(_0xf15a9d(0x18c))['captureBootEvidence']():_0x744f31[_0xf15a9d(0x176)],_0x4f4ca0={},_0x4502d5=_0x744f31[_0xf15a9d(0xf9)]||require(_0xf15a9d(0x18c))['readProcessIdentity'],_0x1fdfcb=classifyInterruption({'workspace':_0xc7f84d,'execution':_0x2ca9ad,'boot':_0x7764e0,'producer':_0x18d22b,'lifecycle':_0x3e360e?.[_0xf15a9d(0x100)],'processIdentity':_0x5e5ccd=>{const _0xf224a7=_0x4502d5(_0x5e5ccd);return _0x4f4ca0[_0x5e5ccd]=_0xf224a7,_0xf224a7;}}),_0x1990a9={..._0x1fdfcb};return _0x1990a9[_0xf15a9d(0x123)]=_0xc7f84d,_0x1990a9[_0xf15a9d(0x16f)]=_0x2e87b3,_0x1990a9[_0xf15a9d(0xfd)]=_0x31f891,_0x1990a9[_0xf15a9d(0x133)]=_0xc75cda,_0x1990a9[_0xf15a9d(0x13f)]=_0x18d22b,_0x1990a9[_0xf15a9d(0x194)]=_0x255018,_0x1990a9[_0xf15a9d(0x11f)]=_0x982dd0,_0x1990a9[_0xf15a9d(0x176)]=_0x7764e0,_0x1990a9[_0xf15a9d(0x130)]=_0x4f4ca0,_0x1990a9;}catch(_0x4c277d){const _0x4ac9e3={};return _0x4ac9e3[_0xf15a9d(0xe5)]=_0xf15a9d(0xe9),_0x4ac9e3[_0xf15a9d(0x12c)]=_0x4c277d['code']||_0xf15a9d(0xf2),_0x4ac9e3;}}function _0x3ce1(){const _0x5b731d=['D29YA3nWywnL','su5ervHFuKvdt1zfuLLFqLvtwq','CMvJB3jKzwqTAw5KzxGTAM9Ilxn0B3bWzwq','CgvUzgLUzW','ChvIBgLJs2v5','mdaWmdaWmdaTmdaWmc0WmdaWltaWmdaTmdaWmdaWmdaWmdaW','lMPZB24','nZm3ruvty3Lb','y29KzwDYyxbO','CMvHC29U','y29UDgfPBM1LBNq','y2HLy2TWB2LUDeHHC2G','y29VCMrPBMf0B3jqAwq','ChjVy2vZC2vZ','zMLSzxm','Aw5ZCgvJDeLUzgv4sw50zxjYDxb0Aw9U','zMvUy2u','zMLUza','DxbKyxrLlxrYyw5Zywn0Aw9UlMPZB24','B3jPz2LUywW','zgLNzxn0','y2XVC2vKqxq','lI4Vy29Yzs93B3jRC3bHy2uTCgf0Aa','lI4Vy29Yzs9YzwnVDMvYEs1HCMnOAxzL','Aw5KzxGTBwfPBNrLBMfUy2uUANnVBG','zMvUy2viyxnO','CMvWBgfJzufSBa','Aw5JBhvKzxm','ChjVzhvJzxi','mtaYmZa3ohrIq2zlza','yxjJAgL2zuHHC2G','y2fJAgvdB250CMfJDa','CNvUBMLUzW','C3rVChbLza','y29UDhjHy3rjza','C2vSzwn0B3jgAwXL','C291CMnL','y29Kzq','mtm1mtbfuw5utwu','CMvSyxrPDMu','mtqXnNj2BM5cBq','ywn0AxzL','AgfZt3DU','CMvJB3zLCMfIBguTAw50zxjYDxb0Aw9U','ndKZnZq2suXUBKPk','zxHWB3j0CW','CMv2zxjZzq','B2jZzxj2zwruAw1L','AgfZ','Aw5ZCgvJDfn0B3bWzwrczwzVCMvcB290','C29YDa','su5ervHFq0fdsevFvu5wrvjjrKLfra','zMvUy2vfCg9JAa','Dg9tDhjPBMC','DMfSAwrtyw1Ltgf1BMnOqM9VDa','CMvSzwfZzxm','BgvUz3rO','CMvJB25JAwXLsw5KzxHjBNrLCNj1ChrPB24','A2LUza','C2HHmJu2','Bgf1BMnOzxjqAwq','Dg9ju09tDhjPBMC','ovrpzgrTuG','Aw5KzxHszwnVDMvYAwvZ','C3rYAw5N','CMvZB3vYy2veAwDLC3q','yMfJA3vWlMPZB24','nJeXnuvrB05YDW','ndiWndy4y2rrzNrm','C3rHDgveAxjLy3rVCNK','ru5pru5u','Aw5ZDgfUy2vZ','zMLSzq','ChjVzMLSzq','C3rHDgu','CMvJzwLWDc5QC29U','y2HLy2TWB2LUDa','zNjVBq','mty0rhntwNr5','AM9PBG','ywrTAxnZAw9UlMPZB24UBg9JAW','CMvSzwfZzq','yNjVA2vYugLK','yM9VDa','y2fJAguTBwfYA2vYCY8','nJeWodiZmhD5wLjQua','B3bLBG','CMfUzg9Tvvvjra','AM9I','CMvJB3zLCNKUANnVBG','y2fJAguUBg9JAW','y29Kzs1YzxzPzxCTz3jHCgG','AxntywzLsw50zwDLCG','z2vUzxjHDgLVBKHHC2G','ywrTAxnZAw9UlMPZB24','yMfZzw5HBwu','yMfZzty0','z2vUzxjHDgLVBI5QC29U','Aw50zxjYDxb0zwq','lMfWDc1Tyw5Hz2vKlMPZB24','odi4mdGZmMnTyLb1tq','BM9KztPJCNLWDg8','C3rVCfjLyxnVBG','AxnbCNjHEq','zxbVy2G','lI4Vy29Yzs9IB290lwv2AwrLBMnL','y29UDhjHy3q','BM9KztPMCW','DgfYz2v0','zxHLy3v0B3iUBg9JAW','lMfNzw50CY9YDw50Aw1Ll2fKBwLZC2LVBI5QC29U','ChvIBgLJyxrPB24UANnVBG','y2fJAgvZ','yxv0Ag9YAxrPzxm','y2fJAgveAxjLy3rVCNK','y2XLyxi','B3v0y29Tzq','Bg9JywXLq29TCgfYzq','ChvZAa','CMvHBhbHDgHtEw5J','AM9IlxrYzwu','su5ervHFuKvdt1zfuLLFq0HbtKDfra','lI4VyMfJA2vUzhmVAw5KzxGTC3rVCMu','DhjLzunVBMzPCM1Lza','lMfNzw50CY9YzwnVDMvYEs1IywnRDxbZ','C3rYAw5NAwz5','ChvIBgLJyxrPB25iyxnO','Aw5KzxHszxn1Bhq','Aw5ZDgfUy2vjza','su5ervHFuKvdt1zfuLLFvu5wrvjjrKLfra','yxnZAwDU','D2LUzg93CY1QB2iTB2jQzwn0','C3rHDhvZ','zxHLy3v0Aw9U','ywrK','ndLZrw1tDMO','Dw5RBM93BG','DMvYC2LVBG','yxjJAgL2zq','C2vW','lMfNzw50CY9YDw50Aw1Ll2LUzgv4lwf0DgvTChrZ','ChjVzhvJzxjszwXLyxnL','BwfW','ChjVzMLSzxm','CMvHzezPBgvtEw5J','su5ervHFrvzjrevoq0vFvu5wrvjjrKLfra','y2f0ywXVz0HHC2G','Bwv0Ag9K','ufjprfvdveLptL9qvujmsunFs0vz','CgLK','BwfYA2vY','yxv0Ag9YAxr5lMPZB24','ChjVy2vZC0LKzw50Axr5','lI4VyMfJA2vUzhmVAw5KzxGTy2fJAguTyxv0Ag9YAxr5','lMfNzw50CY9YDw50Aw1LlW','y29UDgfPBM1LBNrfDMLKzw5Jzq','z2vUzxjHDgLVBG','CMvZB2X2zu1HBMfNzwrjBMrLEenHy2HL','lMfNzw50CY9Tyw5PzMvZDc5QC29U','DMfSDwu','CNvUDgLTzvjVB3q','yxnZAwDUBwvUDenVBMzPCM1Lza','Bgf1BMnOzxjqCM9JzxnZu3rHCNq','su5ervHFqvvuse9ssvrzx1vovKvssuzjruq','lI4Vy29Yzs9VD25Lzc1SB2nR','BM9KztPWyxrO','yNL0zxm','lI4VBgLJzw5Zzs92zxjPzNK','CMvZB2X2zq','C3rVCev2AwrLBMnLq29UDhjHy3q','Cgf0Aa','yxr0zw1WDeLK','zMLSDgvY','zgLYBMfTzq','zxf1ywXZ','Aw5KzxGT','DhjHBNnHy3rPB25jza','C3rHCNrZv2L0Aa','ywn0AxzLuhjVy2vZC2vZ','DgvZDa','CMvZzxj2zwq','C29Tzq','C2H1DgrVD25fDMLKzw5Jzq','yxbWBhK','CMvJB3zLCNLjza','lMfNzw50CY9YDw50Aw1L','yxrVBwLJ','DxbKyxrLlMXVy2S','Aw5KzxGTyxr0zw1WDhm','DMfSAwrHDgvszxrPCMvKq2fJAgvbCNrPzMfJDa','yxj0AwzHy3rZ','B3DUzwq','AgLZDg9YAwnHBa','CMvJB3zLCNK'];_0x3ce1=function(){return _0x5b731d;};return _0x3ce1();}function reconcileIndexInterruption(_0xb6e1b,_0x13df5a={}){const _0x3d2e31=_0x3aa1b9;_0xb6e1b=fs[_0x3d2e31(0x19a)](_0xb6e1b);const _0x37e40d=inspectIndexInterruption(_0xb6e1b,_0x13df5a);if(!_0x13df5a[_0x3d2e31(0x118)]||![_0x3d2e31(0x14e),_0x3d2e31(0x185)][_0x3d2e31(0x13e)](_0x37e40d[_0x3d2e31(0xe5)]))return _0x37e40d;if(_0x37e40d['status']===_0x3d2e31(0x185))return _0x37e40d;const _0x133046=path[_0x3d2e31(0x172)](_0xb6e1b,_0x3d2e31(0x11a)),_0x29a1d9=[],_0x55a9f3=new Set([_0x3d2e31(0x190),_0x3d2e31(0x11c),_0x3d2e31(0x173)][_0x3d2e31(0xef)](_0x3cd349=>path['join'](_0x133046,_0x3cd349))),_0x489d0b=_0x1777f5=>JSON[_0x3d2e31(0x1a0)](_0x1777f5[_0x3d2e31(0x10d)](_0x4c80ae=>!_0x55a9f3[_0x3d2e31(0x153)](_0x4c80ae[_0x3d2e31(0x16b)]))[_0x3d2e31(0xef)](_0x5a7673=>[_0x5a7673[_0x3d2e31(0x16b)],_0x5a7673['sha256']])[_0x3d2e31(0x155)](([_0x57faa3],[_0xa94e0d])=>_0x57faa3[_0x3d2e31(0x198)](_0xa94e0d)));try{const _0x37249b=safePath(_0xb6e1b,path[_0x3d2e31(0x172)](_0x133046,'index-interruptions',_0x37e40d['checkpoint']['sha256']+_0x3d2e31(0x129)));safePath(_0xb6e1b,path[_0x3d2e31(0x10e)](_0x37249b),!![]);let _0x38a1a1=read(_0xb6e1b,_0x37249b)?.[_0x3d2e31(0x100)];const _0xc8200d=_0x5298d1=>{const _0x450273=_0x3d2e31;if(!/[/\\]selectors[/\\][a-f0-9]{64}\.json$/[_0x450273(0x114)](_0x5298d1[_0x450273(0x16b)])||!_0x38a1a1)return![];const _0x343ae8=_0x5298d1[_0x450273(0x100)],_0x3095a2=_0x343ae8?.[_0x450273(0x126)],_0xb9ab14=_0x38a1a1[_0x450273(0x131)]?.[_0x450273(0x134)](_0x459327=>_0x459327[_0x450273(0x136)]===path[_0x450273(0x14a)](_0xb6e1b,_0x5298d1[_0x450273(0x16b)])[_0x450273(0x13d)]('\x5c','/')),_0x275899=_0xb9ab14&&JSON['parse'](Buffer[_0x450273(0x170)](_0xb9ab14[_0x450273(0x107)],_0x450273(0x183)));return _0x343ae8['version']===0x1&&_0x3095a2?.[_0x450273(0x1a3)]===_0x38a1a1[_0x450273(0x119)]&&_0x3095a2[_0x450273(0x119)]===_0x38a1a1['recoveryId']&&_0x3095a2[_0x450273(0x141)]===sha(JSON['stringify'](_0x38a1a1))&&_0x343ae8[_0x450273(0x14c)]===(_0x275899?.['active']||_0x450273(0x128));};if(_0x38a1a1&&(_0x38a1a1['checkpointHash']!==_0x37e40d[_0x3d2e31(0x16f)][_0x3d2e31(0x15e)]||_0x38a1a1[_0x3d2e31(0x10c)]!==_0x37e40d[_0x3d2e31(0x16f)][_0x3d2e31(0x100)][_0x3d2e31(0x1a2)]['execution'][_0x3d2e31(0x10c)]||_0x38a1a1['generationHash']!==_0x37e40d[_0x3d2e31(0xfd)][_0x3d2e31(0x15e)]||_0x38a1a1[_0x3d2e31(0x13c)]!==_0x37e40d['fence']['sha256']||_0x37e40d[_0x3d2e31(0x11f)][_0x3d2e31(0x116)](_0x2db0a1=>!['executor.lock',_0x3d2e31(0x11c),_0x3d2e31(0x173)][_0x3d2e31(0x13e)](path[_0x3d2e31(0x182)](_0x2db0a1[_0x3d2e31(0x16b)]))&&!_0x38a1a1[_0x3d2e31(0x131)]?.[_0x3d2e31(0x116)](_0x30e411=>_0x30e411[_0x3d2e31(0x136)]===path[_0x3d2e31(0x14a)](_0xb6e1b,_0x2db0a1['file'])[_0x3d2e31(0x13d)]('\x5c','/')&&_0x30e411['sha256']===_0x2db0a1[_0x3d2e31(0x15e)])&&!_0xc8200d(_0x2db0a1))))fail(_0x3d2e31(0x19c));if(!_0x38a1a1){const _0x4f86f6=crypto[_0x3d2e31(0x17a)](),_0x3728c5=_0x37e40d[_0x3d2e31(0x11f)]['map'](_0x253f0a=>({'path':path[_0x3d2e31(0x14a)](_0x133046,_0x253f0a[_0x3d2e31(0x16b)])[_0x3d2e31(0x112)]('..')?_0x3d2e31(0x177)+sha(path[_0x3d2e31(0x14a)](_0xb6e1b,_0x253f0a[_0x3d2e31(0x16b)]))+_0x3d2e31(0x129):path[_0x3d2e31(0x14a)](_0x133046,_0x253f0a['file'])[_0x3d2e31(0x13d)]('\x5c','/'),'original':path[_0x3d2e31(0x14a)](_0xb6e1b,_0x253f0a['file'])[_0x3d2e31(0x13d)]('\x5c','/'),'sha256':_0x253f0a[_0x3d2e31(0x15e)],'bytes':_0x253f0a[_0x3d2e31(0x107)][_0x3d2e31(0x158)](_0x3d2e31(0x183))})),_0x3c29f3={};_0x3c29f3[_0x3d2e31(0xea)]=0x1,_0x3c29f3[_0x3d2e31(0x123)]=_0xb6e1b,_0x3c29f3[_0x3d2e31(0x119)]=_0x4f86f6,_0x3c29f3[_0x3d2e31(0x10c)]=_0x37e40d['checkpoint'][_0x3d2e31(0x100)][_0x3d2e31(0x1a2)][_0x3d2e31(0xe6)][_0x3d2e31(0x10c)],_0x3c29f3[_0x3d2e31(0x12e)]=_0x37e40d[_0x3d2e31(0x16f)]['sha256'],_0x3c29f3[_0x3d2e31(0x180)]=_0x37e40d['generation']['sha256'],_0x3c29f3[_0x3d2e31(0x13c)]=_0x37e40d['fence'][_0x3d2e31(0x15e)],_0x3c29f3['outcome']='unknown',_0x3c29f3[_0x3d2e31(0x12c)]=_0x37e40d[_0x3d2e31(0x12c)],_0x3c29f3[_0x3d2e31(0x176)]=_0x37e40d[_0x3d2e31(0x176)],_0x3c29f3[_0x3d2e31(0x130)]=_0x37e40d[_0x3d2e31(0x130)],_0x3c29f3[_0x3d2e31(0x13f)]=_0x37e40d['producer'],_0x3c29f3[_0x3d2e31(0x16a)]={},_0x3c29f3[_0x3d2e31(0x131)]=_0x3728c5,_0x3c29f3[_0x3d2e31(0x16a)][_0x3d2e31(0x12b)]=_0x4f86f6,_0x3c29f3[_0x3d2e31(0x16a)][_0x3d2e31(0x17e)]=_0x4f86f6,_0x38a1a1=_0x3c29f3,preserveArchiveBytes(_0x37249b,JSON[_0x3d2e31(0x1a0)](_0x38a1a1));}const {acquireExactRuntimeLock:_0x52fd93}=require(_0x3d2e31(0x105));for(const _0x20211b of[_0x3d2e31(0x190),_0x3d2e31(0x11c),'admission.json.lock']){const _0x406f9f=safePath(_0xb6e1b,path[_0x3d2e31(0x172)](_0x133046,_0x20211b)),_0x178ee3=_0x37e40d[_0x3d2e31(0x11f)][_0x3d2e31(0x134)](_0x4c9f92=>_0x4c9f92['file']===_0x406f9f)?.[_0x3d2e31(0x107)]||null,_0xca3e35=_0x52fd93(_0x406f9f,_0x178ee3);if(!_0xca3e35)fail(_0x3d2e31(0x124));_0x29a1d9[_0x3d2e31(0x199)](_0xca3e35);}const _0x38d2bd=inspectIndexInterruption(_0xb6e1b,_0x13df5a);if(_0x38d2bd['status']!==_0x3d2e31(0x14e)||_0x37e40d[_0x3d2e31(0x16f)][_0x3d2e31(0x15e)]!==_0x38d2bd[_0x3d2e31(0x16f)][_0x3d2e31(0x15e)]||_0x37e40d['generation'][_0x3d2e31(0x15e)]!==_0x38d2bd['generation'][_0x3d2e31(0x15e)]||_0x37e40d['fence'][_0x3d2e31(0x15e)]!==_0x38d2bd[_0x3d2e31(0x133)][_0x3d2e31(0x15e)]||_0x489d0b(_0x37e40d[_0x3d2e31(0x11f)])!==_0x489d0b(_0x38d2bd[_0x3d2e31(0x11f)]))fail(_0x3d2e31(0x19c));for(const _0xea8bb3 of _0x37e40d[_0x3d2e31(0x11f)])if(!_0x55a9f3[_0x3d2e31(0x153)](_0xea8bb3[_0x3d2e31(0x16b)])&&!fs[_0x3d2e31(0xf1)](_0xea8bb3[_0x3d2e31(0x16b)])[_0x3d2e31(0x10f)](_0xea8bb3[_0x3d2e31(0x107)]))fail('INDEX_RECOVERY_CHANGED');const _0x25a4da=safePath(_0xb6e1b,path['join'](_0xb6e1b,_0x3d2e31(0x19f),_0x3d2e31(0x110)+_0x38a1a1['recoveryId']),!![]),_0x10d069=Buffer[_0x3d2e31(0x170)](JSON[_0x3d2e31(0x1a0)](_0x38a1a1));preserveArchiveBytes(safePath(_0xb6e1b,path[_0x3d2e31(0x172)](_0x25a4da,_0x3d2e31(0x165))),_0x10d069);for(const _0x2bb011 of _0x38a1a1[_0x3d2e31(0x131)]){const _0x3b97ed=Buffer[_0x3d2e31(0x170)](_0x2bb011[_0x3d2e31(0x107)],'base64');if(sha(_0x3b97ed)!==_0x2bb011[_0x3d2e31(0x15e)])fail(_0x3d2e31(0x19c));const _0x3f2188=safePath(_0xb6e1b,path['join'](_0x25a4da,_0x2bb011[_0x3d2e31(0x10b)]));safePath(_0xb6e1b,path[_0x3d2e31(0x10e)](_0x3f2188),!![]),preserveArchiveBytes(_0x3f2188,_0x3b97ed);}const _0x2fcedc={'recoveryId':_0x38a1a1[_0x3d2e31(0x119)],'archiveHash':sha(_0x10d069)};validateIndexArchive(_0xb6e1b,_0x2fcedc,_0x13df5a[_0x3d2e31(0x127)]);const _0x6e4524=inspectIndexInterruption(_0xb6e1b,_0x13df5a);if(_0x6e4524[_0x3d2e31(0xe5)]!==_0x3d2e31(0x14e)||_0x6e4524[_0x3d2e31(0x16f)][_0x3d2e31(0x15e)]!==_0x38a1a1[_0x3d2e31(0x12e)]||_0x6e4524[_0x3d2e31(0xfd)][_0x3d2e31(0x15e)]!==_0x38a1a1[_0x3d2e31(0x180)]||_0x6e4524[_0x3d2e31(0x133)][_0x3d2e31(0x15e)]!==_0x38a1a1[_0x3d2e31(0x13c)]||_0x489d0b(_0x37e40d[_0x3d2e31(0x11f)])!==_0x489d0b(_0x6e4524[_0x3d2e31(0x11f)])||_0x29a1d9[_0x3d2e31(0x116)](_0x2d48bf=>!_0x2d48bf[_0x3d2e31(0x120)]()))fail(_0x3d2e31(0x19c));for(const _0x156a30 of _0x37e40d[_0x3d2e31(0x11f)])if(!_0x55a9f3['has'](_0x156a30[_0x3d2e31(0x16b)])&&!fs[_0x3d2e31(0xf1)](_0x156a30[_0x3d2e31(0x16b)])[_0x3d2e31(0x10f)](_0x156a30[_0x3d2e31(0x107)]))fail('INDEX_RECOVERY_CHANGED');const _0x458d7d=_0x6e4524[_0x3d2e31(0x16f)]['value'];for(const _0x232563 of[_0x3d2e31(0x12b),_0x3d2e31(0x17e)]){const _0x39a8f8=require(_0x3d2e31(0xfa)),_0x11da6a={};_0x11da6a[_0x3d2e31(0x123)]=_0xb6e1b,_0x11da6a[_0x3d2e31(0x15d)]=_0x232563,_0x11da6a[_0x3d2e31(0x16c)]={..._0x6e4524[_0x3d2e31(0x13f)][_0x3d2e31(0x18d)]['profiles'][_0x232563]},_0x11da6a[_0x3d2e31(0x121)]=!![],_0x11da6a[_0x3d2e31(0x16c)][_0x3d2e31(0x142)]=0x3;const _0x2e26c7=_0x39a8f8['resolveManagedIndexCache'](_0x11da6a);_0x39a8f8['stageManagedIndexCache'](_0x2e26c7,_0x2fcedc,_0x13df5a[_0x3d2e31(0x127)]);}const _0xb23292={..._0x458d7d};_0xb23292['indexRecoveries']=[..._0x458d7d['indexRecoveries']||[],_0x2fcedc],_0xb23292[_0x3d2e31(0x1a2)]={..._0x458d7d[_0x3d2e31(0x1a2)]},_0xb23292[_0x3d2e31(0x1a2)][_0x3d2e31(0xe5)]='interrupted',_0xb23292[_0x3d2e31(0x1a2)][_0x3d2e31(0x197)]='unknown',_0xb23292[_0x3d2e31(0x1a2)][_0x3d2e31(0x148)]='INDEX_INTERRUPTED',_0xb23292[_0x3d2e31(0x1a2)]['retryable']=!![],_0xb23292[_0x3d2e31(0x1a2)][_0x3d2e31(0x122)]=_0x2fcedc,require(_0x3d2e31(0x19d))[_0x3d2e31(0x11b)](_0x6e4524[_0x3d2e31(0x16f)]['file'],_0xb23292);const _0x5f26e3={};return _0x5f26e3[_0x3d2e31(0xe5)]=_0x3d2e31(0x185),_0x5f26e3[_0x3d2e31(0x119)]=_0x38a1a1['recoveryId'],_0x5f26e3[_0x3d2e31(0x141)]=_0x2fcedc['archiveHash'],_0x5f26e3['archive']=_0x25a4da,_0x5f26e3;}catch(_0x5eef3f){const _0x26f755={};return _0x26f755['status']='unknown',_0x26f755['reason']=_0x5eef3f[_0x3d2e31(0x148)]||_0x3d2e31(0x1a4),_0x26f755;}finally{for(const _0x4ff391 of _0x29a1d9[_0x3d2e31(0x151)]())_0x4ff391();}}function validateRetiredCacheArtifact(_0x1323c6,_0x58a2ef,_0x5385e9,_0x1f066f){const _0x856248=_0x3aa1b9;try{_0x1323c6=fs[_0x856248(0x19a)](_0x1323c6),safePath(_0x1323c6,_0x58a2ef);const _0x3edebf=path['relative'](_0x1323c6,_0x58a2ef)[_0x856248(0x13d)]('\x5c','/'),_0x43fb3f=sha(_0x5385e9),_0x24c5b8=[_0x856248(0x13b),'update-transaction.json']['map'](_0x3c9233=>read(_0x1323c6,path[_0x856248(0x172)](_0x1323c6,_0x856248(0x11a),_0x3c9233)))['filter'](Boolean);for(const _0x113a85 of _0x24c5b8)for(const _0x57d1ea of[..._0x113a85['value']['indexRecoveries']||[],..._0x113a85[_0x856248(0x100)][_0x856248(0x1a2)]?.[_0x856248(0x122)]?[_0x113a85[_0x856248(0x100)][_0x856248(0x1a2)]['recovery']]:[]]){const _0x5b35de=validateIndexArchive(_0x1323c6,_0x57d1ea,_0x1f066f);if(_0x24c5b8[_0x856248(0x116)](_0x2fcfbe=>[_0x856248(0x143),_0x856248(0xe9)][_0x856248(0x13e)](_0x2fcfbe[_0x856248(0x100)]['indexResult']?.[_0x856248(0xe5)])&&_0x2fcfbe['value'][_0x856248(0x1a2)][_0x856248(0xe6)]?.[_0x856248(0x10c)]===_0x5b35de[_0x856248(0x10c)]))continue;const _0x5533ce=_0x5b35de[_0x856248(0x131)][_0x856248(0x134)](_0x5a543a=>_0x5a543a[_0x856248(0x136)]===_0x3edebf&&_0x5a543a[_0x856248(0x15e)]===_0x43fb3f);if(!_0x5533ce||!/^\.agents\/runtime\/backends\/(codegraph|code-review-graph)\/caches\/[a-f0-9]{24}\/(receipt|recovery)\.json$/['test'](_0x3edebf))continue;if(!fs['readFileSync'](_0x58a2ef)[_0x856248(0x10f)](Buffer[_0x856248(0x170)](_0x5385e9))||!fs[_0x856248(0xf1)](path[_0x856248(0x172)](_0x5b35de[_0x856248(0xeb)],_0x5533ce[_0x856248(0x10b)]))[_0x856248(0x10f)](Buffer[_0x856248(0x170)](_0x5385e9)))continue;return!![];}}catch{}return![];}const _0x532e0b={};_0x532e0b[_0x3aa1b9(0x132)]=inspectIndexInterruption,_0x532e0b[_0x3aa1b9(0x15c)]=reconcileIndexInterruption,_0x532e0b['validateIndexArchive']=validateIndexArchive,_0x532e0b[_0x3aa1b9(0x11e)]=validateRetiredCacheArtifact,module[_0x3aa1b9(0x150)]=_0x532e0b;
|