apt-mcp-agent-setup 3.5.36 → 3.5.37
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 +215 -211
- 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/docs/technical-sources.md +7 -7
- package/integrity-manifest.json +172 -172
- package/package.json +1 -1
- package/release-check.js +30 -30
- 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-contract.json +11 -11
- 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 +103 -103
- package/src/backends/source-discovery.js +1 -1
- package/src/core/admission-fence.js +1 -1
- package/src/core/aso-import.js +1 -1
- package/src/core/backend-lease-recovery.js +1 -1
- package/src/core/boot-evidence.js +1 -1
- package/src/core/caller-context.js +1 -1
- package/src/core/catalog.js +1 -1
- package/src/core/claude-caller-authority.js +1 -1
- package/src/core/claude-invocation.js +1 -1
- package/src/core/claude-launch-recovery.js +1 -1
- package/src/core/claude-native.js +1 -1
- package/src/core/claude-plan.js +1 -1
- package/src/core/claude-transcript-scan.js +1 -1
- package/src/core/claude-worker-transcript.js +1 -1
- package/src/core/codex-host-metadata.js +1 -1
- package/src/core/codex-transcript-receipt.js +1 -1
- package/src/core/connection-inspector.js +1 -1
- package/src/core/content-hash-cache.js +1 -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/shared-checkout.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/transport-boot-contract.json +12 -12
- package/src/core/transport-close-contract.json +10 -10
- package/src/core/transport-contract.json +10 -10
- package/src/core/transport-pending-boot-contract.json +12 -12
- 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 -179
- 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 -1
- 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 -1
- 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/run-summary.js +1 -1
- package/src/proxy/server.js +1 -1
- package/src/proxy/workspace-gateway.js +1 -1
- package/src/templates/apt-runtime.md +3 -2
- package/src/templates/mcp-tools.md +3 -3
|
@@ -1,179 +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, 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
|
+
'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
|
-
const
|
|
1
|
+
const _0x22cd64=_0x1f13;(function(_0x48271f,_0xc74af5){const _0x1c7d95=_0x1f13,_0x4c8685=_0x48271f();while(!![]){try{const _0x43f49b=-parseInt(_0x1c7d95(0x168))/0x1+-parseInt(_0x1c7d95(0x1a5))/0x2+parseInt(_0x1c7d95(0x18a))/0x3*(parseInt(_0x1c7d95(0x16e))/0x4)+parseInt(_0x1c7d95(0x16c))/0x5*(-parseInt(_0x1c7d95(0x19a))/0x6)+parseInt(_0x1c7d95(0x190))/0x7*(-parseInt(_0x1c7d95(0x189))/0x8)+-parseInt(_0x1c7d95(0x195))/0x9+parseInt(_0x1c7d95(0x17d))/0xa*(parseInt(_0x1c7d95(0x181))/0xb);if(_0x43f49b===_0xc74af5)break;else _0x4c8685['push'](_0x4c8685['shift']());}catch(_0x2e17e2){_0x4c8685['push'](_0x4c8685['shift']());}}}(_0x893d,0x80716));const fs=require('fs'),path=require(_0x22cd64(0x18f)),{buildHookConfig}=require(_0x22cd64(0x174)),{readJsonWithBackup,parseJson}=require(_0x22cd64(0x184));function mergeHooks(_0x4b4945,_0x406d2b){const _0x1c9620=_0x22cd64;if(Array[_0x1c9620(0x191)](_0x406d2b)){const _0x5ae495=(Array[_0x1c9620(0x191)](_0x4b4945)?_0x4b4945:[])[_0x1c9620(0x182)](_0x178f59=>!JSON[_0x1c9620(0x188)](_0x178f59)[_0x1c9620(0x163)](_0x1c9620(0x199)));return[..._0x5ae495,..._0x406d2b];}if(_0x406d2b&&typeof _0x406d2b===_0x1c9620(0x18e)){const _0x3a44f2={..._0x4b4945&&typeof _0x4b4945===_0x1c9620(0x18e)?_0x4b4945:{}},_0x2455ac=_0x3a44f2;for(const [_0x5e8554,_0x3bba85]of Object[_0x1c9620(0x198)](_0x406d2b)){const _0x2f2a6b=Array[_0x1c9620(0x191)](_0x3bba85)&&!JSON[_0x1c9620(0x188)](_0x2455ac[_0x5e8554]??'')['includes'](_0x1c9620(0x199))&&Object[_0x1c9620(0x198)](_0x2455ac)[_0x1c9620(0x18c)](([_0x4e51a8,_0x4b0a13])=>_0x4e51a8[_0x1c9620(0x19e)](_0x5e8554+'_')&&JSON[_0x1c9620(0x188)](_0x4b0a13)[_0x1c9620(0x163)](_0x1c9620(0x199)));if(!_0x2f2a6b)_0x2455ac[_0x5e8554]=mergeHooks(_0x2455ac[_0x5e8554],_0x3bba85);}return _0x2455ac;}return _0x406d2b;}function _0x1f13(_0x3b762d,_0x6d53c1){_0x3b762d=_0x3b762d-0x162;const _0x893d65=_0x893d();let _0x1f130a=_0x893d65[_0x3b762d];if(_0x1f13['BqRDuP']===undefined){var _0x4f247d=function(_0x5aa770){const _0x487949='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x9e2fc4='',_0x4fda9a='';for(let _0x55da19=0x0,_0x5beb44,_0x2bb4b8,_0x363900=0x0;_0x2bb4b8=_0x5aa770['charAt'](_0x363900++);~_0x2bb4b8&&(_0x5beb44=_0x55da19%0x4?_0x5beb44*0x40+_0x2bb4b8:_0x2bb4b8,_0x55da19++%0x4)?_0x9e2fc4+=String['fromCharCode'](0xff&_0x5beb44>>(-0x2*_0x55da19&0x6)):0x0){_0x2bb4b8=_0x487949['indexOf'](_0x2bb4b8);}for(let _0x4b4945=0x0,_0x406d2b=_0x9e2fc4['length'];_0x4b4945<_0x406d2b;_0x4b4945++){_0x4fda9a+='%'+('00'+_0x9e2fc4['charCodeAt'](_0x4b4945)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x4fda9a);};_0x1f13['heTfkb']=_0x4f247d,_0x1f13['VTFgrt']={},_0x1f13['BqRDuP']=!![];}const _0x594326=_0x893d65[0x0],_0x102dd3=_0x3b762d+_0x594326,_0x1574be=_0x1f13['VTFgrt'][_0x102dd3];return!_0x1574be?(_0x1f130a=_0x1f13['heTfkb'](_0x1f130a),_0x1f13['VTFgrt'][_0x102dd3]=_0x1f130a):_0x1f130a=_0x1574be,_0x1f130a;}function _0x893d(){const _0x5c0f46=['mteWmJK5ngndr3fcyG','sg9VAYbJB25MAwCGCgf0AcbLC2nHCgvZihbYB2PLy3q','Aw5JBhvKzxm','BgL2zvzLCMLMAwvK','CMvJDxjZAxzL','su5wquXjrf9dt05gsuC','ywr2AxnVCNK','nJu3ota2D3fjtgfZ','ChvIBgLJs2v5','AM9PBG','y2XHDwrLlwrLC2T0B3a','nti0mda0nurStwnzvG','A2v5CW','mtu1mZaWzwLXqxbl','BM9KzsaTzsaI','ChjVDg9JB2Xuzxn0zwq','DNnJB2rLlwnVCgLSB3q','yxnZAwDU','Ag9ZDa','lI4Vy29Yzs9OB3n0lwfKyxb0zxjZ','CMvSyxrPDMu','C3rYAw5N','CMvUzgvYrgLZCgf0y2HLCG','CNvUDgLTzvjVB3q','lI9OB29RlwrPC3bHDgnOzxi','CMvWBgfJzq','C3rHDhvZ','CMvZB2X2zq','mJiYotaWtxz5vfnJ','Aw5ZDgfSBgvKlxvUB2jZzxj2zwq','BM9KzsaTzsa','y29KzxG','mtq3nensufL1qq','zMLSDgvY','CMvHzezPBgvtEw5J','lI9Tyw5Hz2vKlwnVBMzPzW','DxrMoa','Aw5ZDgfSBeHVC3riB29RCW','D3jPDgvgAwXLu3LUyW','C3rYAw5NAwz5','nteYrunNtuDQ','mJD4rwritve','D2LUzhn1CMy','C29Tzq','DNnJB2rL','B2jQzwn0','Cgf0Aa','ntG1ntvhq3zYze0','AxnbCNjHEq','ChvZAa','BwvZC2fNzq','yw50AwDYyxzPDhK','mtu2nJK5uxDOv1rt','y29TBwfUza','zxHPC3rZu3LUyW','zw50CMLLCW','qvbux0Hpt0TFqLjjreDf','nKL0rwrUDa','lMfNzw50CY9JB3jLl2HVB2STzgLZCgf0y2HLCI5QCW','y29UzMLN','zMLSzvn5C3rLBq','C3rHCNrZv2L0Aa','CgfYC2u','y3vYC29Y','sw52ywXPzcbJB25MAwCGyxqG','BwvYz2viB29RCW','y2XHDwrLlwnVzgu','zgLYBMfTzq'];_0x893d=function(){return _0x5c0f46;};return _0x893d();}function installHostHooks(_0x36a3df,_0x29ac6d=null,_0x5cf263={}){const _0x2de77c=_0x22cd64,_0x3cbf7f=_0x5cf263[_0x2de77c(0x19d)]||fs,_0x14a4c2={};_0x14a4c2['codex']=_0x2de77c(0x180),_0x14a4c2['claude']=_0x2de77c(0x1a3),_0x14a4c2[_0x2de77c(0x1a0)]=_0x2de77c(0x1a0),_0x14a4c2[_0x2de77c(0x194)]=_0x2de77c(0x194),_0x14a4c2[_0x2de77c(0x18d)]=_0x2de77c(0x171),_0x14a4c2[_0x2de77c(0x18b)]=_0x2de77c(0x18b),_0x14a4c2[_0x2de77c(0x16b)]=_0x2de77c(0x16b);const _0x4c0455=_0x14a4c2;let _0x1957dd=path[_0x2de77c(0x16a)](_0x36a3df,'.agents/core/hook-bridge.js');if(!_0x3cbf7f[_0x2de77c(0x197)](_0x1957dd))return[];if(_0x5cf263['runtimeRoot']&&_0x5cf263[_0x2de77c(0x169)]){_0x1957dd=path[_0x2de77c(0x16a)](_0x36a3df,_0x2de77c(0x19b));const _0x2e3318=require(_0x2de77c(0x179))[_0x2de77c(0x177)](_0x5cf263[_0x2de77c(0x178)],_0x5cf263[_0x2de77c(0x169)]);if(!_0x3cbf7f[_0x2de77c(0x197)](_0x1957dd)||_0x3cbf7f[_0x2de77c(0x183)](_0x1957dd,_0x2de77c(0x185))!==_0x2e3318)_0x3cbf7f[_0x2de77c(0x187)](_0x1957dd,_0x2e3318);}const _0x2e5814=[];for(const _0x19cf2 of _0x29ac6d||Object[_0x2de77c(0x16d)](_0x4c0455)[_0x2de77c(0x182)](_0x5b4a30=>_0x5b4a30!==_0x2de77c(0x16b))){const _0x1061be=buildHookConfig(_0x4c0455[_0x19cf2]||_0x19cf2,_0x1957dd,_0x36a3df);if(!_0x1061be?.[_0x2de77c(0x18f)]||!_0x1061be[_0x2de77c(0x19c)]||_0x1061be[_0x2de77c(0x167)])continue;const _0x538196=path[_0x2de77c(0x17c)](_0x36a3df,_0x1061be[_0x2de77c(0x18f)]);if(path[_0x2de77c(0x175)](_0x36a3df,_0x538196)[_0x2de77c(0x19e)]('..'))throw new Error(_0x2de77c(0x162));const _0x3e58c3=JSON[_0x2de77c(0x19f)](JSON[_0x2de77c(0x188)](_0x1061be[_0x2de77c(0x19c)]),(_0x5a6a15,_0x26217b)=>{const _0x2162c4=_0x2de77c;if(_0x5a6a15===_0x2162c4(0x196)&&typeof _0x26217b===_0x2162c4(0x176)&&_0x26217b[_0x2162c4(0x19e)](_0x2162c4(0x17f))&&!_0x26217b[_0x2162c4(0x163)](_0x2162c4(0x199)))return _0x26217b[_0x2162c4(0x17a)](_0x2162c4(0x16f),'node\x20-e\x20\x22/*APT_HOOK_BRIDGE*/');return _0x26217b;});let _0x966cdd;if(!_0x5cf263[_0x2de77c(0x19d)])_0x966cdd=readJsonWithBackup(_0x538196);else{if(!_0x3cbf7f['existsSync'](_0x538196))_0x966cdd={};else try{_0x966cdd=parseJson(_0x3cbf7f[_0x2de77c(0x183)](_0x538196,_0x2de77c(0x185)));}catch(_0x2c2000){const _0x294f14={};_0x294f14['code']=_0x2de77c(0x166);throw Object[_0x2de77c(0x172)](new Error(_0x2de77c(0x1a1)+_0x538196+';\x20original\x20file\x20was\x20preserved:\x20'+_0x2c2000[_0x2de77c(0x193)]),_0x294f14);}}const _0x2a81b3=mergeHooks(_0x966cdd,_0x3e58c3),_0x33ed5e={};_0x33ed5e[_0x2de77c(0x165)]=!![],_0x3cbf7f['mkdirSync'](path[_0x2de77c(0x1a4)](_0x538196),_0x33ed5e),_0x3cbf7f['writeFileSync'](_0x538196,JSON[_0x2de77c(0x188)](_0x2a81b3,null,0x2)+'\x0a');const _0x5758c3={};_0x5758c3[_0x2de77c(0x173)]=_0x19cf2,_0x5758c3[_0x2de77c(0x18f)]=_0x1061be[_0x2de77c(0x18f)],_0x5758c3[_0x2de77c(0x170)]=![],_0x5758c3[_0x2de77c(0x164)]=![],_0x5758c3[_0x2de77c(0x17b)]=_0x2de77c(0x17e),_0x2e5814[_0x2de77c(0x192)](_0x5758c3);}return _0x2e5814;}const _0x363900={};_0x363900[_0x22cd64(0x186)]=installHostHooks,_0x363900[_0x22cd64(0x1a2)]=mergeHooks,module['exports']=_0x363900;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const _0x1cc0f6=_0x3eb3;(function(_0x2e6873,_0x92dcba){const _0x39338e=_0x3eb3,_0x5e2b76=_0x2e6873();while(!![]){try{const _0x1db191=parseInt(_0x39338e(0x201))/0x1*(parseInt(_0x39338e(0x1ed))/0x2)+parseInt(_0x39338e(0x1bb))/0x3+parseInt(_0x39338e(0x155))/0x4*(-parseInt(_0x39338e(0x20a))/0x5)+-parseInt(_0x39338e(0x1b0))/0x6+parseInt(_0x39338e(0x1d3))/0x7+parseInt(_0x39338e(0x1eb))/0x8+parseInt(_0x39338e(0x1e7))/0x9*(-parseInt(_0x39338e(0x184))/0xa);if(_0x1db191===_0x92dcba)break;else _0x5e2b76['push'](_0x5e2b76['shift']());}catch(_0x3bd981){_0x5e2b76['push'](_0x5e2b76['shift']());}}}(_0x57f7,0x6ef5e));function _0x57f7(){const _0x362290=['zxbVy2G','lI4Vy29Yzs9YzwnVDMvYEs1HCMnOAxzL','AgfZt3DU','CMvHzezPBgvtEw5J','DgvZDa','lMfNzw50CY9Tyw5PzMvZDc5QC29U','DxbKyxrLlMXVy2S','Dg9tDhjPBMC','y29Kzs1YzxzPzxCTz3jHCgG','zgLNzxn0','y2fJAgveAxjLy3rVCNK','CgvUzgLUzW','nJe1mtm4m0Xut3fTyW','Aw5KzxGTyxr0zw1WDhm','C3rHDhvZ','su5ervHFsu5urvjsvvburuq','su5ervHFqvvuse9ssvrzx1vovKvssuzjruq','zNjVBq','lMPZB24','C2H1DgrVD25fDMLKzw5Jzq','ChjVy2vZCY1UB3qTyMvMB3jLlwjVB3q','zgLYBMfTzq','y2HLy2TWB2LUDeHHC2G','y29UDhjHy3rjza','C29Tzq','ywrTAxnZAw9UlMPZB24','Dg9ju09tDhjPBMC','yxv0Ag9YAxrPzxm','CMvWBgfJzufSBa','ChvIBgLJyxrPB25iyxnO','ChjVy2vZC1n0yxj0','zMLSzq','odm3rM5suNzk','z2vUzxjHDgLVBG','C3rHCNrZv2L0Aa','B3bLBG','mJCYntq1nLLXtwHQsG','y29UDgfPBM1LBNq','ng9sAKH5Ba','C3rYAw5N','ChjVzhvJzxi','zxHWB3j0CW','yMfJA3vWlMPZB24','yMfZzw5HBwu','CMvJB3zLCNLjza','AxnbCNjHEq','ChvIBgLJs2v5','zxHLy3v0Aw9U','Aw5ZDgfUy2vjza','CMvZzxj2zwq','AgfZ','y2fWDhvYzujVB3rfDMLKzw5Jzq','ywrTAxnZAw9UlMPZB24UBg9JAW','CMvSyxrPDMu','lMfNzw50CY9YDw50Aw1L','su5ervHFrvzjrevoq0vFvu5wrvjjrKLfra','C3rYAw5NAwz5','CgfYC2u','mZy3mdaXrhjmuuLN','CMvJB3zLCMfIBguTAw50zxjYDxb0Aw9U','y29VCMrPBMf0B3jqCM9JzxnZu3rHCNq','ChvZAa','yxr0zw1WDeLK','Cgf0Aa','C29YDa','D29YA3nWywnL','Dw5RBM93BG','mtu4mde0mgHPCvzxua','C3rHDgveAxjLy3rVCNK','y2XVC2vKqxq','D2LUzg93CY1QB2iTB2jQzwn0','z2vUzxjHDgLVBKHHC2G','ChjVzhvJzxjszwXLyxnL','zw50CMLLCW','AgLZDg9YAwnHBa','y29UDhjHy3q','su5ervHFuKvdt1zfuLLFq0HbtKDfra','ohnUqKfvCG','ChjVy2vZC0LKzw50Axr5','CMfUzg9Tvvvjra','lMfNzw50CY9YDw50Aw1Ll2LUzgv4lwf0DgvTChrZ','zxHLy3v0B3iUBg9JAW','y29Kzq','AM9PBG','CNvUBMLUzW','y29UDgfPBM1LBNrfDMLKzw5Jzq','Aw5ZDgfUy2vZ','CMvHBhbHDgHtEw5J','Aw5ZCgvJDeLUzgv4sw50zxjYDxb0Aw9U','ru5pru5u','zMvUy2u','AM9IlxrYzwu','Bgf1BMnOzxjqAwq','y2f0ywXVz0HHC2G','zMLSDgvY','su5ervHFufjprfvdrvjFvu5wrvjjrKLfra','lMfNzw50CY9YDw50Aw1Ll2DLBMvYyxrPB24UANnVBG','yxbWBhK','lMfNzw50CY9YDw50Aw1LlW','mdaWmdaWmdaTmdaWmc0WmdaWltaWmdaTmdaWmdaWmdaWmdaW','z3jHy2vMDwW','C2HHmJu2','y2fJAguUBg9JAW','ywn0AxzLuhjVy2vZC2vZ','zxf1ywXZ','yxv0Ag9YAxr5lMPZB24','AxntywzLsw50zwDLCG','DMfSAwrHDgvjBMrLEefYy2HPDMu','CgLK','Aw5KzxHszxn1Bhq','zMLSzxm','B3DUzwq','ChjVy2vZC2vZ','yxjJAgL2zq','lI4Vy29Yzs9IB290lwv2AwrLBMnL','yxnZAwDUBwvUDenVBMzPCM1Lza','BM9KztPWyxrO','CMvJzwLWDc5QC29U','yxj0AwzHy3rZ','DhjLzunVBMzPCM1Lza','zMvUy2vfCg9JAa','Aw5KzxGT','yNL0zxm','ywrK','odyZmdb1wLr1wKe','lI4Vy29Yzs93B3jRC3bHy2uTCgf0Aa','lMfNzw50CY9YDw50Aw1Ll2fKBwLZC2LVBI5QC29U','y2XLyxi','BM9KztPJCNLWDg8','su5ervHFuKvdt1zfuLLFqLvtwq','lI4VyMfJA2vUzhmVAw5KzxGTy2fJAguTyxv0Ag9YAxr5','z2vUzxjHDgLVBI5QC29U','CMvJB3zLCNKUANnVBG','y2fJAguTBwfYA2vYCY8','zMLUza','yxjJAgL2zuHHC2G','BgvUz3rO','B2jZzxj2zwruAw1L','A2LUza','ChjVzMLSzq','DgfYz2v0','yNjVA2vYugLK','DhjHBNnHy3rPB25jza','Aw5KzxGTC3rVCc1LDMLKzw5Jzs1Yzxf1AxjLza','zMvUy2viyxnO','CMvJB3zLCNK','Aw5KzxHszwnVDMvYAwvZ','C291CMnL','Bgf1BMnOzxjqCM9JzxnZu3rHCNq','B3jPz2LUywW','yM9VDa','yMfZzty0','DxbKyxrLlxrYyw5Zywn0Aw9UlMPZB24','lI4VBgLJzw5Zzs92zxjPzNK','y29KzwDYyxbO','ChjVzMLSzxm','BwfYA2vY','ywn0AxzL','y29VCMrPBMf0B3jqAwq','Aw5JBhvKzxm','CMvSzwfZzxm','Bwv0Ag9K','DMfSDwu','y2fJAgvZ','CMvZB3vYy2veAwDLC3q','C3rVCfjLyxnVBG','BwfW','lMfWDc1Tyw5Hz2vKlMPZB24','mti1ota2nhvHy09RDq','Aw5KzxGTAw50zxjYDxb0Aw9UCW','lI4VyMfJA2vUzhmVAw5KzxGTC3rVCMu','CMv2zxjZzq','Bg9JywXLq29TCgfYzq','Aw5KzxGTBwfPBNrLBMfUy2uUANnVBG','y2HLy2TWB2LUDa','C2vSzwn0B3jgAwXL','zM9Yy2u','ChvIBgLJyxrPB24UANnVBG','CMvSzwfZzq','ndm2ntKZuuLrCK5X','lI4Vy29Yzs9VD25Lzc1SB2nR','CMvHC29U','Aw50zxjYDxb0zwq','B3v0y29Tzq','CMvZB2X2zq','CMv0CNLHyMXL','DMvYC2LVBG','CNvUDgLTzvjVB3q','AM9I','C3rVChbLza','y2fJAgvdB250CMfJDa'];_0x57f7=function(){return _0x362290;};return _0x57f7();}const fs=require('node:fs'),path=require(_0x1cc0f6(0x17c)),crypto=require(_0x1cc0f6(0x188)),{preserveArchiveBytes}=require(_0x1cc0f6(0x1c8)),{sameWorkspace}=require(_0x1cc0f6(0x185)),{verifyIndexProducer,sha}=require('../core/recovery-proof'),{safePath,validateManagedIndexCache}=require(_0x1cc0f6(0x18a)),fail=_0x5e92a9=>{throw Object['assign'](Error(_0x5e92a9),{'code':_0x5e92a9});},read=(_0x302b41,_0x99c14a)=>{const _0x60988c=_0x1cc0f6;safePath(_0x302b41,_0x99c14a);try{const _0x4e2b76=fs[_0x60988c(0x1ca)](_0x99c14a);return{'file':_0x99c14a,'bytes':_0x4e2b76,'sha256':sha(_0x4e2b76),'value':JSON[_0x60988c(0x200)](_0x4e2b76)};}catch(_0x3b1fb3){if(_0x3b1fb3['code']===_0x60988c(0x161))return null;throw _0x3b1fb3;}};function classifyInterruption({workspace:_0x375056,execution:_0x4ed7b4,boot:_0x4ae42b,processIdentity:_0x442212,producer:_0x532ac2,lifecycle:_0x781032}){const _0x375f76=_0x1cc0f6,_0x12d50a=require(_0x375f76(0x17a)),_0x14fe9e={};_0x14fe9e['execution']=_0x4ed7b4,_0x14fe9e[_0x375f76(0x19e)]=_0x4ae42b,_0x14fe9e[_0x375f76(0x156)]=_0x442212;const _0x144aa3=_0x12d50a['inspectStoppedBeforeBoot'](_0x14fe9e);if(_0x144aa3[_0x375f76(0x1d5)]==='recoverable-interruption'){if(_0x532ac2[_0x375f76(0x212)][_0x375f76(0x1c6)]===0x3&&!_0x12d50a['validLaunchBoot'](_0x4ed7b4,_0x4ae42b))fail('INDEX_AUTHORITY_UNVERIFIED');return _0x144aa3;}if(_0x144aa3['status']!=='unknown'||_0x144aa3[_0x375f76(0x1bd)]!==_0x375f76(0x1db))return _0x144aa3;const _0x5eeb33={};_0x5eeb33[_0x375f76(0x1d5)]=_0x375f76(0x209),_0x5eeb33[_0x375f76(0x1bd)]=_0x375f76(0x197),_0x5eeb33['diagnostic']=_0x144aa3[_0x375f76(0x1bd)];const _0x4e702c=_0x5eeb33;if(_0x532ac2['contract']['stopEvidenceContract']!==0x1||_0x781032?.[_0x375f76(0x1d5)]!==_0x375f76(0x1c5))return _0x4e702c;const _0x6bfc66=_0x781032[_0x375f76(0x1da)],_0x6270cf=_0x4ed7b4[_0x375f76(0x15d)];if(_0x781032[_0x375f76(0x1c2)]!==0x1||!_0x781032[_0x375f76(0x208)]||!sameWorkspace(_0x781032[_0x375f76(0x208)],_0x375056)||_0x781032[_0x375f76(0x194)]?.[_0x375f76(0x1c2)]!==_0x532ac2[_0x375f76(0x1c2)]||_0x781032[_0x375f76(0x194)]?.[_0x375f76(0x1d0)]!==_0x532ac2[_0x375f76(0x1d0)]||JSON[_0x375f76(0x1ff)](_0x781032[_0x375f76(0x1f6)])!==JSON[_0x375f76(0x1ff)](_0x4ed7b4)||_0x4ed7b4[_0x375f76(0x1ec)]!==_0x375f76(0x20d)||_0x6270cf?.[_0x375f76(0x19b)]!=='windows-job-object'||_0x6270cf['assignmentConfirmed']!==!![]||_0x6270cf[_0x375f76(0x164)]!==_0x4ed7b4[_0x375f76(0x164)]||_0x6270cf[_0x375f76(0x19c)]!==_0x4ed7b4[_0x375f76(0x19c)]||_0x6bfc66?.['source']!=='windows-job-object'||!_0x6bfc66['workspace']||!sameWorkspace(_0x6bfc66[_0x375f76(0x208)],_0x375056)||_0x6bfc66[_0x375f76(0x1ec)]!==_0x375f76(0x163)||_0x6bfc66[_0x375f76(0x17f)]!==!![]||_0x6bfc66[_0x375f76(0x174)]!==_0x4ed7b4[_0x375f76(0x164)]||_0x6bfc66[_0x375f76(0x1e5)]!==_0x4ed7b4['launcherProcessStart']||![_0x375f76(0x16c),_0x375f76(0x1b8)][_0x375f76(0x1a7)](_0x6bfc66[_0x375f76(0x1a9)])||typeof _0x6bfc66[_0x375f76(0x1ad)]!==_0x375f76(0x1ee)||!_0x6bfc66[_0x375f76(0x1ad)]['trim']()||_0x6bfc66[_0x375f76(0x1c4)]?.[_0x375f76(0x17b)]!==!![]||_0x6bfc66[_0x375f76(0x1c4)][_0x375f76(0x16f)]!==0x0||_0x6bfc66['job'][_0x375f76(0x1c5)]!==!![]||!Number[_0x375f76(0x172)](_0x6bfc66['job'][_0x375f76(0x195)])||_0x6bfc66[_0x375f76(0x1c4)][_0x375f76(0x195)]<=0x0||_0x6bfc66[_0x375f76(0x1c4)][_0x375f76(0x195)]>0xffffffff||[_0x4ed7b4[_0x375f76(0x1a6)],_0x4ed7b4[_0x375f76(0x164)]][_0x375f76(0x1a7)](_0x6bfc66[_0x375f76(0x1c4)][_0x375f76(0x195)])||!_0x12d50a['validSameLaunchBoot'](_0x4ed7b4,_0x4ae42b))return _0x4e702c;const _0x30c474=typeof _0x6bfc66['closedAt']==='string'?Date[_0x375f76(0x200)](_0x6bfc66['closedAt']):NaN;if(!Number[_0x375f76(0x172)](_0x30c474)||new Date(_0x30c474)[_0x375f76(0x1e1)]()!==_0x6bfc66[_0x375f76(0x20c)])return _0x4e702c;const _0x304409=BigInt(_0x30c474)*0x2710n+0x19db1ded53e8000n;if([_0x4ed7b4[_0x375f76(0x203)],_0x4ed7b4[_0x375f76(0x19c)],_0x4ed7b4['boot'][_0x375f76(0x191)]]['some'](_0x3a86b0=>_0x304409+0x270fn<BigInt(_0x3a86b0))||_0x304409>BigInt(_0x4ae42b['observedTime']))return _0x4e702c;const _0x14aa60={};return _0x14aa60[_0x375f76(0x1d5)]=_0x375f76(0x202),_0x14aa60[_0x375f76(0x1bd)]='recorded-index-job-stopped',_0x14aa60;}function validateIndexArchive(_0x18874e,_0x2ed878,_0x2a9a72=require(_0x1cc0f6(0x1a1))['PRODUCTION_PUBLIC_KEY']){const _0x3b1356=_0x1cc0f6;if(!_0x2ed878||!/^[a-f0-9-]{36}$/[_0x3b1356(0x1cb)](_0x2ed878[_0x3b1356(0x1f3)]||'')||!/^[a-f0-9]{64}$/[_0x3b1356(0x1cb)](_0x2ed878[_0x3b1356(0x18f)]||''))fail(_0x3b1356(0x213));const _0xff4a66=safePath(_0x18874e,path[_0x3b1356(0x15b)](_0x18874e,'.agents/recovery-backups',_0x3b1356(0x181)+_0x2ed878[_0x3b1356(0x1f3)])),_0x1e312e=read(_0x18874e,path[_0x3b1356(0x15b)](_0xff4a66,_0x3b1356(0x1f1)));if(!_0x1e312e||_0x1e312e[_0x3b1356(0x16d)]!==_0x2ed878[_0x3b1356(0x18f)]||_0x1e312e[_0x3b1356(0x1aa)][_0x3b1356(0x1f3)]!==_0x2ed878['recoveryId']||!sameWorkspace(_0x1e312e[_0x3b1356(0x1aa)][_0x3b1356(0x208)],_0x18874e)||!Array[_0x3b1356(0x1f4)](_0x1e312e[_0x3b1356(0x1aa)][_0x3b1356(0x176)]))fail(_0x3b1356(0x213));for(const _0x127717 of _0x1e312e[_0x3b1356(0x1aa)][_0x3b1356(0x176)]){const _0xd1f0d0=safePath(_0x18874e,path[_0x3b1356(0x1c0)](_0xff4a66,_0x127717['path']));if(!_0xd1f0d0[_0x3b1356(0x1e9)](_0xff4a66+path['sep'])||!/^[a-f0-9]{64}$/[_0x3b1356(0x1cb)](_0x127717[_0x3b1356(0x16d)]||'')||sha(fs[_0x3b1356(0x1ca)](_0xd1f0d0))!==_0x127717[_0x3b1356(0x16d)])fail(_0x3b1356(0x213));}const _0x34a9c3=_0x1e312e[_0x3b1356(0x1aa)];if(_0x34a9c3['version']!==0x1||_0x34a9c3[_0x3b1356(0x176)][_0x3b1356(0x1df)]((_0x24b159,_0x5f2446)=>!_0x24b159[_0x3b1356(0x19d)]||_0x34a9c3[_0x3b1356(0x176)]['findIndex'](_0x27f77d=>_0x27f77d[_0x3b1356(0x19d)]===_0x24b159['original']||_0x27f77d['path']===_0x24b159[_0x3b1356(0x206)])!==_0x5f2446))fail('INDEX_RECOVERY_CHANGED');if(!_0x34a9c3[_0x3b1356(0x15e)]||[_0x3b1356(0x1a2),'code-review-graph'][_0x3b1356(0x1df)](_0x37b2b5=>!/^[a-f0-9-]{36}$/[_0x3b1356(0x1cb)](_0x34a9c3[_0x3b1356(0x15e)][_0x37b2b5]||'')))fail(_0x3b1356(0x213));const _0x244270=_0x5cd9ac=>{const _0x195c45=_0x3b1356,_0x31143e=_0x34a9c3[_0x195c45(0x176)][_0x195c45(0x18e)](_0x4127c2=>_0x4127c2['path']===_0x5cd9ac);if(!_0x31143e)fail(_0x195c45(0x213));return JSON[_0x195c45(0x200)](fs['readFileSync'](path[_0x195c45(0x15b)](_0xff4a66,_0x5cd9ac)));},_0xae3f0f=_0x34a9c3['files'][_0x3b1356(0x18e)](_0x4c637c=>['index-maintenance.json',_0x3b1356(0x1a0)]['includes'](_0x4c637c[_0x3b1356(0x206)]));if(!_0xae3f0f||_0xae3f0f[_0x3b1356(0x16d)]!==_0x34a9c3[_0x3b1356(0x1dd)])fail(_0x3b1356(0x213));const _0x501f24=_0x244270(_0xae3f0f['path']),_0x359272=_0x244270('generation.json'),_0x4b4364=_0x244270(_0x3b1356(0x1e0)),_0x18aa3b=_0x501f24[_0x3b1356(0x175)]?.[_0x3b1356(0x1f6)],_0x46779e=verifyIndexProducer(_0x34a9c3[_0x3b1356(0x1ef)]?.['release'],_0x2a9a72);if(!_0x18aa3b||_0x18aa3b[_0x3b1356(0x205)]!==_0x34a9c3[_0x3b1356(0x205)]||!sameWorkspace(_0x501f24['workspace'],_0x18874e)||!sameWorkspace(_0x359272[_0x3b1356(0x208)],_0x18874e)||_0x46779e[_0x3b1356(0x1c2)]!==_0x359272['version']||_0x46779e[_0x3b1356(0x1d0)]!==_0x359272[_0x3b1356(0x1d0)]||_0x501f24[_0x3b1356(0x194)]?.[_0x3b1356(0x1c2)]!==_0x46779e[_0x3b1356(0x1c2)]||_0x501f24[_0x3b1356(0x194)]?.[_0x3b1356(0x1d0)]!==_0x46779e[_0x3b1356(0x1d0)]||[_0x3b1356(0x1e8),_0x3b1356(0x1ac),_0x3b1356(0x165),_0x3b1356(0x196)]['some'](_0x5e904e=>(_0x501f24[_0x5e904e]??null)!==(_0x359272[_0x5e904e]??null)||(_0x18aa3b[_0x5e904e]??null)!==(_0x359272[_0x5e904e]??null))||_0x4b4364['state']!=='open'||_0x4b4364[_0x3b1356(0x1c7)]!==_0x18aa3b[_0x3b1356(0x180)]||_0x34a9c3[_0x3b1356(0x176)]['find'](_0x12f22f=>_0x12f22f[_0x3b1356(0x206)]===_0x3b1356(0x18b))?.[_0x3b1356(0x16d)]!==_0x34a9c3[_0x3b1356(0x20e)]||_0x34a9c3[_0x3b1356(0x176)]['find'](_0x4243a3=>_0x4243a3[_0x3b1356(0x206)]===_0x3b1356(0x1e0))?.[_0x3b1356(0x16d)]!==_0x34a9c3['fenceHash']||_0x34a9c3['outcome']!=='unknown'||!Number[_0x3b1356(0x172)](_0x359272[_0x3b1356(0x1e8)])||_0x359272[_0x3b1356(0x1e8)]<0x1||!/^[a-f0-9]{64}$/[_0x3b1356(0x1cb)](_0x359272[_0x3b1356(0x165)]||'')||_0x4b4364[_0x3b1356(0x1e8)]!=null&&_0x4b4364['generation']!==_0x359272[_0x3b1356(0x1e8)]||_0x18aa3b[_0x3b1356(0x1ec)]&&_0x18aa3b[_0x3b1356(0x1ec)]!==_0x46779e[_0x3b1356(0x212)]['containment']||_0x18aa3b[_0x3b1356(0x1ef)]&&(_0x18aa3b[_0x3b1356(0x1ef)][_0x3b1356(0x1d0)]!==_0x46779e[_0x3b1356(0x1d0)]||_0x18aa3b['producer']['version']!==_0x46779e['version']))fail('INDEX_RECOVERY_CHANGED');const _0x3d9c1a=_0x53f0ca=>_0x34a9c3[_0x3b1356(0x176)][_0x3b1356(0x18e)](_0x395193=>_0x395193[_0x3b1356(0x19d)]===path[_0x3b1356(0x1fc)](_0x18874e,_0x53f0ca)[_0x3b1356(0x1e3)]('\x5c','/')),_0x22ad9f=_0x3d9c1a(path['join'](_0x18874e,_0x3b1356(0x1cc)));if(!_0x22ad9f||_0x22ad9f['sha256']!==_0x359272['resourceDigest'])fail(_0x3b1356(0x213));const _0x3b85a5=require('../backends/index-cache-authority'),_0x2561a2=new Set([_0x3b1356(0x16a)+_0xae3f0f['path'],_0x3b1356(0x168),_0x3b1356(0x186),_0x3b1356(0x1cc),...[_0x3b1356(0x159),'update.lock','admission.json.lock'][_0x3b1356(0x1ae)](_0x55af68=>'.agents/runtime/'+_0x55af68)]);for(const _0x248d6a of[_0x3b1356(0x1a2),_0x3b1356(0x1cf)]){const _0x2e87c7={..._0x46779e['contract'][_0x3b1356(0x1a3)][_0x248d6a]};_0x2e87c7[_0x3b1356(0x1c6)]=_0x46779e[_0x3b1356(0x212)][_0x3b1356(0x1c6)];const _0x295146=_0x2e87c7,_0x3f380c=_0x18aa3b[_0x3b1356(0x1ab)]?.['find'](_0x1c2777=>_0x1c2777[_0x3b1356(0x192)]===_0x248d6a)?.[_0x3b1356(0x1a4)];if(!_0x3f380c&&_0x295146[_0x3b1356(0x1c6)]===0x3)fail('INDEX_RECOVERY_CHANGED');const _0x1bd30a={};_0x1bd30a[_0x3b1356(0x208)]=_0x18874e,_0x1bd30a[_0x3b1356(0x192)]=_0x248d6a,_0x1bd30a['profile']=_0x295146,_0x1bd30a[_0x3b1356(0x1f7)]=_0x3f380c?.['instanceId'],_0x1bd30a[_0x3b1356(0x211)]=!![];const _0x30cdb4=_0x3b85a5['resolveManagedIndexCache'](_0x1bd30a);if(_0x3f380c&&JSON['stringify'](_0x3f380c)!==JSON[_0x3b1356(0x1ff)](_0x30cdb4[_0x3b1356(0x1a4)]))fail(_0x3b1356(0x213));for(const _0x14d4df of[path[_0x3b1356(0x15b)](_0x30cdb4[_0x3b1356(0x20b)],'authority.json'),path[_0x3b1356(0x15b)](_0x30cdb4['cacheDirectory'],_0x3b1356(0x1af))]){const _0x17d501=_0x3d9c1a(_0x14d4df);if(!_0x17d501||_0x17d501[_0x3b1356(0x16d)]!==sha(JSON['stringify'](_0x30cdb4['marker'])))fail(_0x3b1356(0x213));}for(const _0x43c307 of[...[_0x3b1356(0x171),_0x3b1356(0x17d),'recovery.json','cache.lock',_0x3b1356(0x1b9)]['map'](_0x3744be=>path[_0x3b1356(0x15b)](_0x30cdb4[_0x3b1356(0x20b)],_0x3744be)),path[_0x3b1356(0x15b)](_0x30cdb4[_0x3b1356(0x1d1)],_0x3b1356(0x1af)),..._0x30cdb4[_0x3b1356(0x1b7)]?[_0x30cdb4[_0x3b1356(0x1b7)]]:[]])_0x2561a2['add'](path[_0x3b1356(0x1fc)](_0x18874e,_0x43c307)[_0x3b1356(0x1e3)]('\x5c','/'));const _0x4202d8=_0x30cdb4[_0x3b1356(0x1b7)]&&_0x3d9c1a(_0x30cdb4[_0x3b1356(0x1b7)]);if(_0x4202d8){const _0x516d50=_0x244270(_0x4202d8[_0x3b1356(0x206)]);if(_0x516d50[_0x3b1356(0x1c2)]!==0x1||_0x516d50[_0x3b1356(0x1de)]!==_0x30cdb4['contractId']||_0x516d50[_0x3b1356(0x1a5)]!==_0x30cdb4[_0x3b1356(0x1a4)][_0x3b1356(0x1f7)]&&_0x516d50[_0x3b1356(0x1d2)]?.[_0x3b1356(0x1f7)]!==_0x30cdb4[_0x3b1356(0x1a4)][_0x3b1356(0x1f7)]||_0x516d50[_0x3b1356(0x1a5)]===_0x30cdb4[_0x3b1356(0x1a4)][_0x3b1356(0x1f7)]&&_0x516d50[_0x3b1356(0x1a5)]!==_0x3b1356(0x16b)&&_0x3d9c1a(path[_0x3b1356(0x15b)](_0x30cdb4[_0x3b1356(0x20b)],_0x3b1356(0x1b9)))?.[_0x3b1356(0x16d)]!==_0x516d50[_0x3b1356(0x1e4)])fail('INDEX_RECOVERY_CHANGED');}else{if(_0x295146[_0x3b1356(0x1c6)]===0x3&&_0x30cdb4[_0x3b1356(0x1a4)][_0x3b1356(0x1f7)]!==_0x3b1356(0x16b))fail(_0x3b1356(0x213));}}let _0x321913;if(_0x46779e[_0x3b1356(0x212)]['cacheContract']===0x3){const _0x489df0=_0x3d9c1a(path[_0x3b1356(0x15b)](_0x18874e,_0x3b1356(0x158),_0x18aa3b[_0x3b1356(0x205)]+_0x3b1356(0x1d9)));if(!_0x489df0)fail(_0x3b1356(0x213));_0x321913=_0x244270(_0x489df0['path']);if(JSON[_0x3b1356(0x1ff)](_0x321913['execution'])!==JSON[_0x3b1356(0x1ff)](_0x18aa3b)||![_0x3b1356(0x1f8),_0x3b1356(0x1c5)]['includes'](_0x321913['status'])||!sameWorkspace(_0x321913[_0x3b1356(0x208)],_0x18874e)||_0x321913[_0x3b1356(0x194)]?.[_0x3b1356(0x1c2)]!==_0x46779e[_0x3b1356(0x1c2)]||_0x321913[_0x3b1356(0x194)]?.[_0x3b1356(0x1d0)]!==_0x46779e[_0x3b1356(0x1d0)])fail(_0x3b1356(0x213));_0x2561a2[_0x3b1356(0x183)](_0x489df0[_0x3b1356(0x19d)]);}const _0x565c0c=classifyInterruption({'workspace':_0x18874e,'execution':_0x18aa3b,'boot':_0x34a9c3[_0x3b1356(0x19e)],'producer':_0x46779e,'lifecycle':_0x321913,'processIdentity':_0x392989=>Object[_0x3b1356(0x1c9)](_0x34a9c3[_0x3b1356(0x178)]||{},_0x392989)?_0x34a9c3[_0x3b1356(0x178)][_0x392989]:undefined});if(_0x565c0c[_0x3b1356(0x1d5)]!==_0x3b1356(0x202)||_0x565c0c[_0x3b1356(0x1bd)]!==_0x34a9c3[_0x3b1356(0x1bd)])fail(_0x3b1356(0x213));if(_0x34a9c3[_0x3b1356(0x176)][_0x3b1356(0x1df)](_0x343d1d=>!_0x2561a2['has'](_0x343d1d[_0x3b1356(0x19d)])))fail(_0x3b1356(0x213));const _0x31ab7d={..._0x1e312e[_0x3b1356(0x1aa)]};return _0x31ab7d[_0x3b1356(0x179)]=_0xff4a66,_0x31ab7d['archiveHash']=_0x1e312e[_0x3b1356(0x16d)],_0x31ab7d;}function inspectIndexInterruption(_0x2a9b85,_0x2eef04={}){const _0x3c3b66=_0x1cc0f6;try{_0x2a9b85=fs['realpathSync'](_0x2a9b85);const _0x5a60ba=path['join'](_0x2a9b85,'.agents/runtime'),_0x29cffa=read(_0x2a9b85,path[_0x3c3b66(0x15b)](_0x5a60ba,_0x3c3b66(0x18b))),_0xdb9a1f=read(_0x2a9b85,path[_0x3c3b66(0x15b)](_0x5a60ba,'admission.json')),_0x5d786f=['index-maintenance.json','update-transaction.json'][_0x3c3b66(0x1ae)](_0x38121f=>read(_0x2a9b85,path['join'](_0x5a60ba,_0x38121f)))['filter'](Boolean);for(const _0x5e5bc7 of _0x5d786f){for(const _0x3330c8 of[..._0x5e5bc7[_0x3c3b66(0x1aa)][_0x3c3b66(0x19a)]||[],..._0x5e5bc7[_0x3c3b66(0x1aa)][_0x3c3b66(0x175)]?.['recovery']?[_0x5e5bc7['value']['indexResult'][_0x3c3b66(0x199)]]:[]])validateIndexArchive(_0x2a9b85,_0x3330c8,_0x2eef04['publicKey']);}const _0x66d993=_0x5d786f['filter'](_0x11ab98=>[_0x3c3b66(0x15c),_0x3c3b66(0x209)][_0x3c3b66(0x1a7)](_0x11ab98[_0x3c3b66(0x1aa)][_0x3c3b66(0x175)]?.[_0x3c3b66(0x1d5)])&&(path[_0x3c3b66(0x1f2)](_0x11ab98[_0x3c3b66(0x1e6)])!==_0x3c3b66(0x1a0)||!_0x29cffa||_0x11ab98['value'][_0x3c3b66(0x194)]?.[_0x3c3b66(0x1c2)]===_0x29cffa['value'][_0x3c3b66(0x1c2)]&&_0x11ab98[_0x3c3b66(0x1aa)][_0x3c3b66(0x194)]?.['digest']===_0x29cffa['value']['digest']&&(_0x11ab98['value'][_0x3c3b66(0x196)]??null)===(_0x29cffa['value'][_0x3c3b66(0x196)]??null)));if(!_0x66d993[_0x3c3b66(0x190)]){const _0x5deccb=_0x5d786f['find'](_0x32997e=>_0x32997e[_0x3c3b66(0x1aa)][_0x3c3b66(0x175)]?.[_0x3c3b66(0x1d5)]==='interrupted'),_0x554037={};return _0x554037[_0x3c3b66(0x1d5)]=_0x3c3b66(0x187),_0x554037[_0x3c3b66(0x210)]=[],_0x5deccb?{'status':_0x3c3b66(0x1be),...validateIndexArchive(_0x2a9b85,_0x5deccb[_0x3c3b66(0x1aa)][_0x3c3b66(0x175)][_0x3c3b66(0x199)],_0x2eef04[_0x3c3b66(0x1f5)])}:_0x554037;}if(_0x66d993[_0x3c3b66(0x190)]!==0x1||!_0x29cffa||!_0xdb9a1f)fail(_0x3c3b66(0x1d7));const _0x3334d9=_0x66d993[0x0],_0x47c145=_0x3334d9['value'],_0x266e05=_0x47c145['indexResult'][_0x3c3b66(0x1f6)],_0x41059d=_0x29cffa[_0x3c3b66(0x1aa)];if(!_0x266e05||!_0x41059d[_0x3c3b66(0x208)]||!_0x47c145[_0x3c3b66(0x208)]||!sameWorkspace(_0x41059d[_0x3c3b66(0x208)],_0x2a9b85)||!sameWorkspace(_0x47c145['workspace'],_0x2a9b85)||_0x47c145['target']?.[_0x3c3b66(0x1c2)]!==_0x41059d[_0x3c3b66(0x1c2)]||_0x47c145['target']?.[_0x3c3b66(0x1d0)]!==_0x41059d[_0x3c3b66(0x1d0)]||!Number[_0x3c3b66(0x172)](_0x41059d['generation'])||_0x41059d[_0x3c3b66(0x1e8)]<0x1||[_0x3c3b66(0x1e8),_0x3c3b66(0x1ac),'catalogHash',_0x3c3b66(0x196)]['some'](_0x805e5f=>(_0x47c145[_0x805e5f]??null)!==(_0x41059d[_0x805e5f]??null)||(_0x266e05[_0x805e5f]??null)!==(_0x41059d[_0x805e5f]??null))||!/^[a-f0-9]{64}$/[_0x3c3b66(0x1cb)](_0x41059d[_0x3c3b66(0x165)]||'')||_0xdb9a1f[_0x3c3b66(0x1aa)]['state']!==_0x3c3b66(0x1ea)||_0xdb9a1f[_0x3c3b66(0x1aa)][_0x3c3b66(0x1c7)]!==_0x266e05[_0x3c3b66(0x180)]||_0xdb9a1f['value'][_0x3c3b66(0x1e8)]!=null&&_0xdb9a1f[_0x3c3b66(0x1aa)][_0x3c3b66(0x1e8)]!==_0x41059d[_0x3c3b66(0x1e8)]||sha(fs['readFileSync'](safePath(_0x2a9b85,path[_0x3c3b66(0x15b)](_0x2a9b85,_0x3c3b66(0x1cc)))))!==_0x41059d[_0x3c3b66(0x1ac)])fail('INDEX_AUTHORITY_UNVERIFIED');const _0x42ecf3=_0x266e05[_0x3c3b66(0x1ef)]?.['release']||_0x2eef04[_0x3c3b66(0x20f)]||_0x41059d[_0x3c3b66(0x1ba)]||_0x2eef04[_0x3c3b66(0x1c3)]&&path[_0x3c3b66(0x15b)](_0x2eef04[_0x3c3b66(0x1c3)],_0x3c3b66(0x1a8),_0x41059d[_0x3c3b66(0x1c2)]+'-'+_0x41059d['digest']),_0x4ed2f2=verifyIndexProducer(_0x42ecf3,_0x2eef04[_0x3c3b66(0x1f5)]);if(_0x4ed2f2[_0x3c3b66(0x1c2)]!==_0x41059d[_0x3c3b66(0x1c2)]||_0x4ed2f2['digest']!==_0x41059d[_0x3c3b66(0x1d0)]||_0x266e05[_0x3c3b66(0x1ef)]&&(_0x266e05[_0x3c3b66(0x1ef)][_0x3c3b66(0x1c2)]!==_0x4ed2f2[_0x3c3b66(0x1c2)]||_0x266e05[_0x3c3b66(0x1ef)][_0x3c3b66(0x1d0)]!==_0x4ed2f2[_0x3c3b66(0x1d0)])||_0x266e05['containment']&&_0x266e05[_0x3c3b66(0x1ec)]!==_0x4ed2f2['contract'][_0x3c3b66(0x1ec)])fail(_0x3c3b66(0x167));const _0x37cfdf=require(_0x3c3b66(0x18a)),_0x1381e6=['codegraph',_0x3c3b66(0x1cf)][_0x3c3b66(0x1ae)](_0x55f50c=>{const _0x3bbeea=_0x3c3b66,_0x36f16c={..._0x4ed2f2[_0x3bbeea(0x212)][_0x3bbeea(0x1a3)][_0x55f50c]};_0x36f16c[_0x3bbeea(0x1c6)]=_0x4ed2f2['contract'][_0x3bbeea(0x1c6)];const _0x4d7cec=_0x36f16c,_0x36a26d=_0x266e05[_0x3bbeea(0x1ab)]?.['find'](_0x439c98=>_0x439c98[_0x3bbeea(0x192)]===_0x55f50c)?.[_0x3bbeea(0x1a4)],_0x125c17={};_0x125c17[_0x3bbeea(0x208)]=_0x2a9b85,_0x125c17[_0x3bbeea(0x192)]=_0x55f50c,_0x125c17['profile']=_0x4d7cec,_0x125c17[_0x3bbeea(0x1f7)]=_0x36a26d?.[_0x3bbeea(0x1f7)],_0x125c17['historical']=!![];const _0x6ef5b7=_0x37cfdf['resolveManagedIndexCache'](_0x125c17);if(!_0x6ef5b7||_0x36a26d&&JSON[_0x3bbeea(0x1ff)](_0x36a26d)!==JSON[_0x3bbeea(0x1ff)](_0x6ef5b7[_0x3bbeea(0x1a4)])||!_0x36a26d&&_0x4d7cec[_0x3bbeea(0x1c6)]===0x3)fail('INDEX_CACHE_UNVERIFIED');return validateManagedIndexCache(_0x6ef5b7),_0x6ef5b7;}),_0x315091=/^[a-f0-9-]{36}$/[_0x3c3b66(0x1cb)](_0x266e05[_0x3c3b66(0x205)]||'')?read(_0x2a9b85,path[_0x3c3b66(0x15b)](_0x5a60ba,_0x3c3b66(0x1d4),_0x266e05['attemptId']+_0x3c3b66(0x1d9))):null;if(_0x4ed2f2[_0x3c3b66(0x212)]['cacheContract']===0x3&&(!_0x315091||JSON['stringify'](_0x315091[_0x3c3b66(0x1aa)][_0x3c3b66(0x1f6)])!==JSON[_0x3c3b66(0x1ff)](_0x266e05)||![_0x3c3b66(0x1f8),_0x3c3b66(0x1c5)][_0x3c3b66(0x1a7)](_0x315091[_0x3c3b66(0x1aa)][_0x3c3b66(0x1d5)])))fail('INDEX_AUTHORITY_UNVERIFIED');const _0x48cefe=[_0x3334d9,_0x29cffa,_0xdb9a1f,..._0x315091?[_0x315091]:[],read(_0x2a9b85,path[_0x3c3b66(0x15b)](_0x2a9b85,'.agents/manifest.json')),..._0x1381e6['flatMap'](_0x3f78b4=>[...['authority.json',_0x3c3b66(0x17d),_0x3c3b66(0x18c),_0x3c3b66(0x16e),_0x3c3b66(0x1b9)][_0x3c3b66(0x1ae)](_0x525619=>read(_0x2a9b85,path[_0x3c3b66(0x15b)](_0x3f78b4[_0x3c3b66(0x20b)],_0x525619))),read(_0x2a9b85,path[_0x3c3b66(0x15b)](_0x3f78b4[_0x3c3b66(0x1d1)],_0x3c3b66(0x1af))),_0x3f78b4['selectorFile']&&read(_0x2a9b85,_0x3f78b4[_0x3c3b66(0x1b7)])][_0x3c3b66(0x166)](Boolean)),...[_0x3c3b66(0x159),_0x3c3b66(0x1cd),_0x3c3b66(0x1fb)][_0x3c3b66(0x1ae)](_0x5a83ea=>read(_0x2a9b85,path[_0x3c3b66(0x15b)](_0x5a60ba,_0x5a83ea)))[_0x3c3b66(0x166)](Boolean)],_0x3ac321=_0x2eef04[_0x3c3b66(0x19e)]===undefined?require(_0x3c3b66(0x17a))[_0x3c3b66(0x1fa)]():_0x2eef04['boot'],_0x3fd1ce={},_0x414b23=_0x2eef04[_0x3c3b66(0x156)]||require(_0x3c3b66(0x17a))['readProcessIdentity'],_0x285065=classifyInterruption({'workspace':_0x2a9b85,'execution':_0x266e05,'boot':_0x3ac321,'producer':_0x4ed2f2,'lifecycle':_0x315091?.[_0x3c3b66(0x1aa)],'processIdentity':_0x1a5498=>{const _0x4ec525=_0x414b23(_0x1a5498);return _0x3fd1ce[_0x1a5498]=_0x4ec525,_0x4ec525;}}),_0x43e7d0={..._0x285065};return _0x43e7d0[_0x3c3b66(0x208)]=_0x2a9b85,_0x43e7d0[_0x3c3b66(0x1b6)]=_0x3334d9,_0x43e7d0[_0x3c3b66(0x1e8)]=_0x29cffa,_0x43e7d0[_0x3c3b66(0x162)]=_0xdb9a1f,_0x43e7d0[_0x3c3b66(0x1ef)]=_0x4ed2f2,_0x43e7d0[_0x3c3b66(0x1e2)]=_0x1381e6,_0x43e7d0[_0x3c3b66(0x17e)]=_0x48cefe,_0x43e7d0[_0x3c3b66(0x19e)]=_0x3ac321,_0x43e7d0['processes']=_0x3fd1ce,_0x43e7d0;}catch(_0x5880a8){const _0x3c026f={};return _0x3c026f[_0x3c3b66(0x1d5)]=_0x3c3b66(0x209),_0x3c026f[_0x3c3b66(0x1bd)]=_0x5880a8[_0x3c3b66(0x15a)]||_0x3c3b66(0x1fe),_0x3c026f;}}function reconcileIndexInterruption(_0x591290,_0x438dd0={}){const _0x268b0a=_0x1cc0f6;_0x591290=fs[_0x268b0a(0x15f)](_0x591290);const _0x1c9e56=inspectIndexInterruption(_0x591290,_0x438dd0);if(!_0x438dd0[_0x268b0a(0x169)]||![_0x268b0a(0x202),'interrupted'][_0x268b0a(0x1a7)](_0x1c9e56[_0x268b0a(0x1d5)]))return _0x1c9e56;if(_0x1c9e56[_0x268b0a(0x1d5)]==='interrupted')return _0x1c9e56;const _0x25d6c1=path[_0x268b0a(0x15b)](_0x591290,_0x268b0a(0x1fd)),_0x4209a4=[],_0x47f2ff=new Set(['executor.lock','update.lock',_0x268b0a(0x1fb)][_0x268b0a(0x1ae)](_0x10492b=>path['join'](_0x25d6c1,_0x10492b))),_0x264785=_0x57ee05=>JSON[_0x268b0a(0x1ff)](_0x57ee05[_0x268b0a(0x166)](_0x39ba9d=>!_0x47f2ff[_0x268b0a(0x1f9)](_0x39ba9d[_0x268b0a(0x1e6)]))[_0x268b0a(0x1ae)](_0x12fb9a=>[_0x12fb9a['file'],_0x12fb9a[_0x268b0a(0x16d)]])[_0x268b0a(0x207)](([_0x3f6da7],[_0x5053ba])=>_0x3f6da7[_0x268b0a(0x1b4)](_0x5053ba)));try{const _0x58b740=safePath(_0x591290,path['join'](_0x25d6c1,_0x268b0a(0x1b1),_0x1c9e56[_0x268b0a(0x1b6)][_0x268b0a(0x16d)]+_0x268b0a(0x1d9)));safePath(_0x591290,path[_0x268b0a(0x1dc)](_0x58b740),!![]);let _0x5afa7c=read(_0x591290,_0x58b740)?.[_0x268b0a(0x1aa)];const _0x5db069=_0x1defa3=>{const _0x286192=_0x268b0a;if(!/[/\\]selectors[/\\][a-f0-9]{64}\.json$/[_0x286192(0x1cb)](_0x1defa3['file'])||!_0x5afa7c)return![];const _0x111efd=_0x1defa3[_0x286192(0x1aa)],_0x523f09=_0x111efd?.[_0x286192(0x1d2)],_0x24a08a=_0x5afa7c[_0x286192(0x176)]?.['find'](_0x2cd63f=>_0x2cd63f[_0x286192(0x19d)]===path[_0x286192(0x1fc)](_0x591290,_0x1defa3[_0x286192(0x1e6)])['replaceAll']('\x5c','/')),_0x52d267=_0x24a08a&&JSON[_0x286192(0x200)](Buffer[_0x286192(0x1d8)](_0x24a08a['bytes'],_0x286192(0x19f)));return _0x111efd[_0x286192(0x1c2)]===0x1&&_0x523f09?.[_0x286192(0x1f7)]===_0x5afa7c[_0x286192(0x1f3)]&&_0x523f09[_0x286192(0x1f3)]===_0x5afa7c[_0x286192(0x1f3)]&&_0x523f09[_0x286192(0x18f)]===sha(JSON[_0x286192(0x1ff)](_0x5afa7c))&&_0x111efd['active']===(_0x52d267?.['active']||'00000000-0000-0000-0000-000000000000');};if(_0x5afa7c&&(_0x5afa7c[_0x268b0a(0x1dd)]!==_0x1c9e56['checkpoint']['sha256']||_0x5afa7c[_0x268b0a(0x205)]!==_0x1c9e56[_0x268b0a(0x1b6)][_0x268b0a(0x1aa)][_0x268b0a(0x175)][_0x268b0a(0x1f6)][_0x268b0a(0x205)]||_0x5afa7c[_0x268b0a(0x20e)]!==_0x1c9e56['generation']['sha256']||_0x5afa7c['fenceHash']!==_0x1c9e56['fence']['sha256']||_0x1c9e56[_0x268b0a(0x17e)]['some'](_0x34bc3c=>![_0x268b0a(0x159),_0x268b0a(0x1cd),_0x268b0a(0x1fb)]['includes'](path['basename'](_0x34bc3c[_0x268b0a(0x1e6)]))&&!_0x5afa7c[_0x268b0a(0x176)]?.[_0x268b0a(0x1df)](_0x2fec66=>_0x2fec66[_0x268b0a(0x19d)]===path[_0x268b0a(0x1fc)](_0x591290,_0x34bc3c[_0x268b0a(0x1e6)])['replaceAll']('\x5c','/')&&_0x2fec66[_0x268b0a(0x16d)]===_0x34bc3c[_0x268b0a(0x16d)])&&!_0x5db069(_0x34bc3c))))fail(_0x268b0a(0x213));if(!_0x5afa7c){const _0x1e9613=crypto[_0x268b0a(0x157)](),_0x4d21fb=_0x1c9e56[_0x268b0a(0x17e)][_0x268b0a(0x1ae)](_0x491336=>({'path':path[_0x268b0a(0x1fc)](_0x25d6c1,_0x491336[_0x268b0a(0x1e6)])['startsWith']('..')?_0x268b0a(0x18d)+sha(path[_0x268b0a(0x1fc)](_0x591290,_0x491336[_0x268b0a(0x1e6)]))+_0x268b0a(0x1d9):path[_0x268b0a(0x1fc)](_0x25d6c1,_0x491336['file'])[_0x268b0a(0x1e3)]('\x5c','/'),'original':path[_0x268b0a(0x1fc)](_0x591290,_0x491336[_0x268b0a(0x1e6)])[_0x268b0a(0x1e3)]('\x5c','/'),'sha256':_0x491336[_0x268b0a(0x16d)],'bytes':_0x491336[_0x268b0a(0x182)][_0x268b0a(0x1ce)]('base64')})),_0x49cd5c={};_0x49cd5c[_0x268b0a(0x1c2)]=0x1,_0x49cd5c[_0x268b0a(0x208)]=_0x591290,_0x49cd5c[_0x268b0a(0x1f3)]=_0x1e9613,_0x49cd5c['attemptId']=_0x1c9e56[_0x268b0a(0x1b6)][_0x268b0a(0x1aa)]['indexResult']['execution']['attemptId'],_0x49cd5c[_0x268b0a(0x1dd)]=_0x1c9e56[_0x268b0a(0x1b6)][_0x268b0a(0x16d)],_0x49cd5c[_0x268b0a(0x20e)]=_0x1c9e56[_0x268b0a(0x1e8)][_0x268b0a(0x16d)],_0x49cd5c[_0x268b0a(0x198)]=_0x1c9e56[_0x268b0a(0x162)]['sha256'],_0x49cd5c[_0x268b0a(0x1bf)]=_0x268b0a(0x209),_0x49cd5c[_0x268b0a(0x1bd)]=_0x1c9e56['reason'],_0x49cd5c[_0x268b0a(0x19e)]=_0x1c9e56[_0x268b0a(0x19e)],_0x49cd5c['processes']=_0x1c9e56['processes'],_0x49cd5c[_0x268b0a(0x1ef)]=_0x1c9e56[_0x268b0a(0x1ef)],_0x49cd5c[_0x268b0a(0x15e)]={},_0x49cd5c[_0x268b0a(0x176)]=_0x4d21fb,_0x49cd5c[_0x268b0a(0x15e)][_0x268b0a(0x1a2)]=_0x1e9613,_0x49cd5c[_0x268b0a(0x15e)][_0x268b0a(0x1cf)]=_0x1e9613,_0x5afa7c=_0x49cd5c,preserveArchiveBytes(_0x58b740,JSON[_0x268b0a(0x1ff)](_0x5afa7c));}const {acquireExactRuntimeLock:_0x16c324}=require(_0x268b0a(0x1bc));for(const _0xef0f1a of[_0x268b0a(0x159),_0x268b0a(0x1cd),_0x268b0a(0x1fb)]){const _0x1805f8=safePath(_0x591290,path[_0x268b0a(0x15b)](_0x25d6c1,_0xef0f1a)),_0x4b9d66=_0x1c9e56[_0x268b0a(0x17e)]['find'](_0x3b2aa8=>_0x3b2aa8[_0x268b0a(0x1e6)]===_0x1805f8)?.[_0x268b0a(0x182)]||null,_0x5a9abf=_0x16c324(_0x1805f8,_0x4b9d66);if(!_0x5a9abf)fail(_0x268b0a(0x189));_0x4209a4[_0x268b0a(0x204)](_0x5a9abf);}const _0x357abf=inspectIndexInterruption(_0x591290,_0x438dd0);if(_0x357abf[_0x268b0a(0x1d5)]!==_0x268b0a(0x202)||_0x1c9e56['checkpoint'][_0x268b0a(0x16d)]!==_0x357abf[_0x268b0a(0x1b6)][_0x268b0a(0x16d)]||_0x1c9e56[_0x268b0a(0x1e8)][_0x268b0a(0x16d)]!==_0x357abf['generation'][_0x268b0a(0x16d)]||_0x1c9e56[_0x268b0a(0x162)]['sha256']!==_0x357abf[_0x268b0a(0x162)][_0x268b0a(0x16d)]||_0x264785(_0x1c9e56[_0x268b0a(0x17e)])!==_0x264785(_0x357abf[_0x268b0a(0x17e)]))fail(_0x268b0a(0x213));for(const _0x82172 of _0x1c9e56[_0x268b0a(0x17e)])if(!_0x47f2ff['has'](_0x82172[_0x268b0a(0x1e6)])&&!fs['readFileSync'](_0x82172[_0x268b0a(0x1e6)])[_0x268b0a(0x170)](_0x82172[_0x268b0a(0x182)]))fail(_0x268b0a(0x213));const _0xf3093f=safePath(_0x591290,path[_0x268b0a(0x15b)](_0x591290,'.agents/recovery-backups',_0x268b0a(0x181)+_0x5afa7c[_0x268b0a(0x1f3)]),!![]),_0x52e365=Buffer[_0x268b0a(0x1d8)](JSON[_0x268b0a(0x1ff)](_0x5afa7c));preserveArchiveBytes(safePath(_0x591290,path[_0x268b0a(0x15b)](_0xf3093f,_0x268b0a(0x1f1))),_0x52e365);for(const _0x20935a of _0x5afa7c['files']){const _0x164e7f=Buffer[_0x268b0a(0x1d8)](_0x20935a[_0x268b0a(0x182)],_0x268b0a(0x19f));if(sha(_0x164e7f)!==_0x20935a[_0x268b0a(0x16d)])fail('INDEX_RECOVERY_CHANGED');const _0x23f65a=safePath(_0x591290,path[_0x268b0a(0x15b)](_0xf3093f,_0x20935a[_0x268b0a(0x206)]));safePath(_0x591290,path['dirname'](_0x23f65a),!![]),preserveArchiveBytes(_0x23f65a,_0x164e7f);}const _0x3ae774={'recoveryId':_0x5afa7c[_0x268b0a(0x1f3)],'archiveHash':sha(_0x52e365)};validateIndexArchive(_0x591290,_0x3ae774,_0x438dd0[_0x268b0a(0x1f5)]);const _0x436b23=inspectIndexInterruption(_0x591290,_0x438dd0);if(_0x436b23[_0x268b0a(0x1d5)]!==_0x268b0a(0x202)||_0x436b23['checkpoint']['sha256']!==_0x5afa7c[_0x268b0a(0x1dd)]||_0x436b23[_0x268b0a(0x1e8)][_0x268b0a(0x16d)]!==_0x5afa7c['generationHash']||_0x436b23[_0x268b0a(0x162)][_0x268b0a(0x16d)]!==_0x5afa7c[_0x268b0a(0x198)]||_0x264785(_0x1c9e56['artifacts'])!==_0x264785(_0x436b23[_0x268b0a(0x17e)])||_0x4209a4['some'](_0xf9e77a=>!_0xf9e77a[_0x268b0a(0x177)]()))fail(_0x268b0a(0x213));for(const _0x5866d1 of _0x1c9e56[_0x268b0a(0x17e)])if(!_0x47f2ff[_0x268b0a(0x1f9)](_0x5866d1[_0x268b0a(0x1e6)])&&!fs[_0x268b0a(0x1ca)](_0x5866d1['file'])[_0x268b0a(0x170)](_0x5866d1['bytes']))fail(_0x268b0a(0x213));const _0x22278c=_0x436b23['checkpoint']['value'];for(const _0x3c0a54 of[_0x268b0a(0x1a2),_0x268b0a(0x1cf)]){const _0x53af69=require(_0x268b0a(0x18a)),_0x340477={};_0x340477[_0x268b0a(0x208)]=_0x591290,_0x340477[_0x268b0a(0x192)]=_0x3c0a54,_0x340477[_0x268b0a(0x193)]={..._0x436b23['producer']['contract'][_0x268b0a(0x1a3)][_0x3c0a54]},_0x340477[_0x268b0a(0x211)]=!![],_0x340477[_0x268b0a(0x193)][_0x268b0a(0x1c6)]=0x3;const _0x20e617=_0x53af69['resolveManagedIndexCache'](_0x340477);_0x53af69['stageManagedIndexCache'](_0x20e617,_0x3ae774,_0x438dd0[_0x268b0a(0x1f5)]);}const _0x4c7b39={..._0x22278c};_0x4c7b39[_0x268b0a(0x19a)]=[..._0x22278c['indexRecoveries']||[],_0x3ae774],_0x4c7b39[_0x268b0a(0x175)]={..._0x22278c['indexResult']},_0x4c7b39[_0x268b0a(0x175)][_0x268b0a(0x1d5)]=_0x268b0a(0x1be),_0x4c7b39[_0x268b0a(0x175)][_0x268b0a(0x1bf)]=_0x268b0a(0x209),_0x4c7b39[_0x268b0a(0x175)]['code']=_0x268b0a(0x1d6),_0x4c7b39[_0x268b0a(0x175)][_0x268b0a(0x1c1)]=!![],_0x4c7b39[_0x268b0a(0x175)][_0x268b0a(0x199)]=_0x3ae774,require(_0x268b0a(0x1b2))['atomic'](_0x436b23[_0x268b0a(0x1b6)][_0x268b0a(0x1e6)],_0x4c7b39);const _0x1f9643={};return _0x1f9643[_0x268b0a(0x1d5)]='interrupted',_0x1f9643[_0x268b0a(0x1f3)]=_0x5afa7c[_0x268b0a(0x1f3)],_0x1f9643[_0x268b0a(0x18f)]=_0x3ae774['archiveHash'],_0x1f9643[_0x268b0a(0x179)]=_0xf3093f,_0x1f9643;}catch(_0x474fd8){const _0x3ee0c3={};return _0x3ee0c3[_0x268b0a(0x1d5)]=_0x268b0a(0x209),_0x3ee0c3['reason']=_0x474fd8[_0x268b0a(0x15a)]||'INDEX_RECOVERY_UNVERIFIED',_0x3ee0c3;}finally{for(const _0x3ed294 of _0x4209a4[_0x268b0a(0x1b3)]())_0x3ed294();}}function _0x3eb3(_0x4c9f03,_0x36f4a5){_0x4c9f03=_0x4c9f03-0x155;const _0x57f746=_0x57f7();let _0x3eb375=_0x57f746[_0x4c9f03];if(_0x3eb3['CTHQiO']===undefined){var _0x5dcd33=function(_0x27cd9f){const _0x364559='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x3ae8bf='',_0x95e8f0='';for(let _0x4e1945=0x0,_0x4bb1b0,_0xf8ef04,_0x24cb76=0x0;_0xf8ef04=_0x27cd9f['charAt'](_0x24cb76++);~_0xf8ef04&&(_0x4bb1b0=_0x4e1945%0x4?_0x4bb1b0*0x40+_0xf8ef04:_0xf8ef04,_0x4e1945++%0x4)?_0x3ae8bf+=String['fromCharCode'](0xff&_0x4bb1b0>>(-0x2*_0x4e1945&0x6)):0x0){_0xf8ef04=_0x364559['indexOf'](_0xf8ef04);}for(let _0x3829dc=0x0,_0x23f985=_0x3ae8bf['length'];_0x3829dc<_0x23f985;_0x3829dc++){_0x95e8f0+='%'+('00'+_0x3ae8bf['charCodeAt'](_0x3829dc)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x95e8f0);};_0x3eb3['bSGJab']=_0x5dcd33,_0x3eb3['JHRMHJ']={},_0x3eb3['CTHQiO']=!![];}const _0x5eb50d=_0x57f746[0x0],_0x54cadd=_0x4c9f03+_0x5eb50d,_0x40f3df=_0x3eb3['JHRMHJ'][_0x54cadd];return!_0x40f3df?(_0x3eb375=_0x3eb3['bSGJab'](_0x3eb375),_0x3eb3['JHRMHJ'][_0x54cadd]=_0x3eb375):_0x3eb375=_0x40f3df,_0x3eb375;}function validateRetiredCacheArtifact(_0x29f1ce,_0x34603d,_0x48085a,_0x22a1f2){const _0x357095=_0x1cc0f6;try{_0x29f1ce=fs[_0x357095(0x15f)](_0x29f1ce),safePath(_0x29f1ce,_0x34603d);const _0x27dd18=path[_0x357095(0x1fc)](_0x29f1ce,_0x34603d)[_0x357095(0x1e3)]('\x5c','/'),_0x51a159=sha(_0x48085a),_0x2f5c6d=[_0x357095(0x1b5),_0x357095(0x1a0)][_0x357095(0x1ae)](_0x1ebe82=>read(_0x29f1ce,path[_0x357095(0x15b)](_0x29f1ce,_0x357095(0x1fd),_0x1ebe82)))['filter'](Boolean);for(const _0x2586d1 of _0x2f5c6d)for(const _0x34da8e of[..._0x2586d1[_0x357095(0x1aa)][_0x357095(0x19a)]||[],..._0x2586d1[_0x357095(0x1aa)]['indexResult']?.[_0x357095(0x199)]?[_0x2586d1[_0x357095(0x1aa)][_0x357095(0x175)][_0x357095(0x199)]]:[]]){const _0x28c196=validateIndexArchive(_0x29f1ce,_0x34da8e,_0x22a1f2);if(_0x2f5c6d[_0x357095(0x1df)](_0x1d1278=>['running','unknown'][_0x357095(0x1a7)](_0x1d1278[_0x357095(0x1aa)][_0x357095(0x175)]?.[_0x357095(0x1d5)])&&_0x1d1278['value']['indexResult']['execution']?.[_0x357095(0x205)]===_0x28c196[_0x357095(0x205)]))continue;const _0x4e6105=_0x28c196[_0x357095(0x176)][_0x357095(0x18e)](_0x3f9176=>_0x3f9176[_0x357095(0x19d)]===_0x27dd18&&_0x3f9176[_0x357095(0x16d)]===_0x51a159);if(!_0x4e6105||!/^\.agents\/runtime\/backends\/(codegraph|code-review-graph)\/caches\/[a-f0-9]{24}\/(receipt|recovery)\.json$/['test'](_0x27dd18))continue;if(!fs['readFileSync'](_0x34603d)[_0x357095(0x170)](Buffer[_0x357095(0x1d8)](_0x48085a))||!fs[_0x357095(0x1ca)](path[_0x357095(0x15b)](_0x28c196['archive'],_0x4e6105[_0x357095(0x206)]))[_0x357095(0x170)](Buffer[_0x357095(0x1d8)](_0x48085a)))continue;return!![];}}catch{}return![];}const _0x3ed0fd={};_0x3ed0fd[_0x1cc0f6(0x160)]=inspectIndexInterruption,_0x3ed0fd['reconcileIndexInterruption']=reconcileIndexInterruption,_0x3ed0fd[_0x1cc0f6(0x173)]=validateIndexArchive,_0x3ed0fd['validateRetiredCacheArtifact']=validateRetiredCacheArtifact,module[_0x1cc0f6(0x1f0)]=_0x3ed0fd;
|
|
1
|
+
'use strict';const _0x107c6a=_0x190a;function _0x525f(){const _0x5775ab=['CMvZB2X2zu1HBMfNzwrjBMrLEenHy2HL','zMLSzxm','lMfNzw50CY9YDw50Aw1Ll2fKBwLZC2LVBI5QC29U','zMLSzq','y29Kzq','CMfUzg9Tvvvjra','CMv2zxjZzq','y29UDhjHy3q','DxbKyxrLlxrYyw5Zywn0Aw9UlMPZB24','zxHLy3v0B3iUBg9JAW','zgLYBMfTzq','BgvUz3rO','Aw5ZCgvJDeLUzgv4sw50zxjYDxb0Aw9U','C29YDa','AM9PBG','C3rVChbLza','C3rHDhvZ','CMvJB3zLCNKUANnVBG','y2f0ywXVz0HHC2G','ntKZmta2wxzmvK1p','BM9KztPJCNLWDg8','ywrTAxnZAw9UlMPZB24UBg9JAW','nteZmuTcCvP6uG','CMvHzezPBgvtEw5J','ChjVy2vZC2vZ','lI4Vy29Yzs9YzwnVDMvYEs1WCM9VzG','zMvUy2u','yMfZzty0','CMvZzxj2zwq','y2fWDhvYzujVB3rfDMLKzw5Jzq','ChvIBgLJs2v5','Aw5KzxHszxn1Bhq','CMvZB3vYy2veAwDLC3q','mtbZA2rOBhe','DMfSAwrtyw1Ltgf1BMnOqM9VDa','su5ervHFq0fdsevFvu5wrvjjrKLfra','Bwv0Ag9K','y29UDgfPBM1LBNq','lI4VBgLJzw5Zzs92zxjPzNK','yNL0zxm','B3bLBG','Dw5RBM93BG','DMfSAwrHDgvjBMrLEefYy2HPDMu','mdaWmdaWmdaTmdaWmc0WmdaWltaWmdaTmdaWmdaWmdaWmdaW','ChjVzhvJzxi','lMfNzw50CY9YDw50Aw1L','y2HLy2TWB2LUDeHHC2G','lMfNzw50CY9YDw50Aw1Ll2LUzgv4lwf0DgvTChrZ','yM9VDa','yxv0Ag9YAxr5lMPZB24','y2fJAgvdB250CMfJDa','Cgf0Aa','DMfSAwrHDgvszxrPCMvKq2fJAgvbCNrPzMfJDa','CgfYC2u','su5ervHFsu5urvjsvvburuq','nJm0mZK1EKj4s3rz','z2vUzxjHDgLVBKHHC2G','C29Tzq','Aw5KzxGT','yxr0zw1WDeLK','mtiYBvrZwhnR','mZe5nZm2ngn0ugnUCG','Aw5KzxGTC3rVCc1LDMLKzw5Jzs1Yzxf1AxjLza','C3rYAw5NAwz5','y29VCMrPBMf0B3jqCM9JzxnZu3rHCNq','Aw50zxjYDxb0zwq','ywn0AxzL','DMfSAwrmyxvUy2HcB290','zxf1ywXZ','ChvIBgLJyxrPB25iyxnO','lI4Vy29Yzs9IB290lwv2AwrLBMnL','DhjPBq','lMfWDc1Tyw5Hz2vKlMPZB24','CMvSyxrPDMu','CMvWBgfJzufSBa','y2fJAguTBwfYA2vYCY8','D29YA3nWywnL','B2jZzxj2zwruAw1L','zMLSDgvY','Aw5ZCgvJDfn0B3bWzwrczwzVCMvcB290','CMvHBhbHDgHtEw5J','su5ervHFrvzjrevoq0vFvu5wrvjjrKLfra','AgfZt3DU','DgvZDa','ywrTAxnZAw9UlMPZB24','Aw5JBhvKzxm','B3jPz2LUywW','zMvUy2vfCg9JAa','C3rYAw5N','C3rHDgveAxjLy3rVCNK','y2fJAgveAxjLy3rVCNK','yxjJAgL2zq','lMfNzw50CY9YzwnVDMvYEs1IywnRDxbZ','Aw5KzxHszwnVDMvYAwvZ','zMvUy2viyxnO','ody1nJq3Cxb5wLvS','lMfNzw50CY9Tyw5PzMvZDc5QC29U','CNvUBMLUzW','z3jHy2vMDwW','AM9I','ChvIBgLJyxrPB24UANnVBG','CMvJB25JAwXLsw5KzxHjBNrLCNj1ChrPB24','zNjVBq','lI4VyMfJA2vUzhmVAw5KzxGTy2fJAguTyxv0Ag9YAxr5','AM9IlxrYzwu','ru5pru5u','C3rHCNrZv2L0Aa','C2HHmJu2','CMvJB3zLCMfIBguTAw50zxjYDxb0Aw9U','yNjVA2vYugLK','yxnZAwDUBwvUDenVBMzPCM1Lza','z2vUzxjHDgLVBI5QC29U','lI4Vy29Yzs93B3jRC3bHy2uTCgf0Aa','DxbKyxrLlMXVy2S','y2fJAgvZ','ywn0AxzLuhjVy2vZC2vZ','z2vUzxjHDgLVBG','CMvJB3jKzwqTAw5KzxGTAM9Ilxn0B3bWzwq','DgfYz2v0','Aw5KzxGTyxr0zw1WDhm','CMvHC29U','Bgf1BMnOzxjqCM9JzxnZu3rHCNq','y29VCMrPBMf0B3jqAwq','zMLUzeLUzgv4','y2XVC2vKqxq','CgvUzgLUzW','zxHLy3v0Aw9U','CMv0CNLHyMXL','zM9Yy2u','Dg9tDhjPBMC','su5ervHFqvvuse9ssvrzx1vovKvssuzjruq','lMfNzw50CY9YDw50Aw1LlW','CMvHzfbYB2nLC3njzgvUDgL0Eq','lMfNzw50CY9YDw50Aw1Ll2DLBMvYyxrPB24UANnVBG','C3rVCfjLyxnVBG','mtfdBfrbuuO','yMfJA3vWlMPZB24','CMvJB3zLCNLjza','CMvJzwLWDc5QC29U','zMXHDe1HCa','ChjVy2vZC0LKzw50Axr5','ChvZAa','CNvUDgLTzvjVB3q','yxjJAgL2zuHHC2G','A2LUza','su5ervHFufjprfvdrvjFvu5wrvjjrKLfra','y29Kzs1YzxzPzxCTz3jHCgG','D2LUzg93CY1QB2iTB2jQzwn0','ufjprfvdveLptL9qvujmsunFs0vz','AgLZDg9YAwnHBa','Aw5KzxGTAw50zxjYDxb0Aw9UCW','BM9KztPWyxrO','lMPZB24','mJy4nZfAA1juyvi','B3v0y29Tzq','DMvYC2LVBG','su5ervHFuKvdt1zfuLLFvu5wrvjjrKLfra','zgLNzxn0','zxbVy2G','Bgf1BMnOzxjqAwq','ofjJq0z4qW','ywrK','Aw5ZDgfUy2vjza','C3rHDgu','CMvSzwfZzxm','B3DUzwq','zw50CMLLCW','BwfYA2vY','ChjVzMLSzxm','yxj0AwzHy3rZ','yxv0Ag9YAxrPzxm','C3rHz2vnyw5Hz2vKsw5KzxHdywnOzq','BwfW','AgfZ','y2fJAguUBg9JAW','y29KzwDYyxbO','zMLUza','DhjLzunVBMzPCM1Lza','mtqYmta3nZj4yxrIvMC','su5ervHFuKvdt1zfuLLFq0HbtKDfra','CMvJB3zLCNK','Aw5KzxGTBwfPBNrLBMfUy2uUANnVBG','C291CMnL','C2vSzwn0B3jgAwXL','DhjHBNnHy3rPB25jza','yMfZzw5HBwu','C3rVCev2AwrLBMnLq29UDhjHy3q','nJm2ohrVALfuvG','y2HLy2TWB2LUDa','CMvSzwfZzq','Aw5ZDgfUy2vZ','BM9KztPMCW','AxnbCNjHEq','AxntywzLsw50zwDLCG','y29UDhjHy3rjza','DMfSDwu'];_0x525f=function(){return _0x5775ab;};return _0x525f();}(function(_0x5e8f37,_0x35e517){const _0x16653f=_0x190a,_0x579a4a=_0x5e8f37();while(!![]){try{const _0x92288a=-parseInt(_0x16653f(0x11e))/0x1+parseInt(_0x16653f(0x147))/0x2*(parseInt(_0x16653f(0x1a4))/0x3)+-parseInt(_0x16653f(0x1ab))/0x4*(-parseInt(_0x16653f(0x142))/0x5)+-parseInt(_0x16653f(0x148))/0x6+-parseInt(_0x16653f(0x121))/0x7*(parseInt(_0x16653f(0x102))/0x8)+parseInt(_0x16653f(0x16a))/0x9*(parseInt(_0x16653f(0x12c))/0xa)+parseInt(_0x16653f(0x192))/0xb*(parseInt(_0x16653f(0xf9))/0xc);if(_0x92288a===_0x35e517)break;else _0x579a4a['push'](_0x579a4a['shift']());}catch(_0x1c34c0){_0x579a4a['push'](_0x579a4a['shift']());}}}(_0x525f,0x5a989));const fs=require(_0x107c6a(0x106)),path=require(_0x107c6a(0x1a2)),crypto=require(_0x107c6a(0x11f)),{preserveArchiveBytes}=require('../core/recovery-archive'),{sameWorkspace}=require(_0x107c6a(0x17b)),{verifyIndexProducer,sha}=require(_0x107c6a(0x124)),{safePath,validateManagedIndexCache}=require(_0x107c6a(0x172)),fail=_0x596bc4=>{throw Object['assign'](Error(_0x596bc4),{'code':_0x596bc4});},read=(_0x2c9220,_0x29f3bf)=>{const _0x7e3684=_0x107c6a;safePath(_0x2c9220,_0x29f3bf);try{const _0x15f9bd=fs[_0x7e3684(0x122)](_0x29f3bf);return{'file':_0x29f3bf,'bytes':_0x15f9bd,'sha256':sha(_0x15f9bd),'value':JSON[_0x7e3684(0x140)](_0x15f9bd)};}catch(_0x4a7650){if(_0x4a7650[_0x7e3684(0x10f)]===_0x7e3684(0x174))return null;throw _0x4a7650;}};function classifyInterruption({workspace:_0x4e9d68,execution:_0x17c118,boot:_0x338e7e,processIdentity:_0x46ae65,producer:_0x3cdac4,lifecycle:_0x9a8b5b}){const _0x4cf464=_0x107c6a,_0x3553e7=require('../core/boot-evidence'),_0x2c82cd={};_0x2c82cd[_0x4cf464(0x189)]=_0x17c118,_0x2c82cd[_0x4cf464(0x13b)]=_0x338e7e,_0x2c82cd[_0x4cf464(0x197)]=_0x46ae65;const _0x3253f1=_0x3553e7[_0x4cf464(0x15a)](_0x2c82cd);if(_0x3253f1[_0x4cf464(0x11b)]===_0x4cf464(0x177)){if(_0x3cdac4[_0x4cf464(0x112)][_0x4cf464(0x13d)]===0x3&&!_0x3553e7[_0x4cf464(0x14e)](_0x17c118,_0x338e7e))fail(_0x4cf464(0x18d));return _0x3253f1;}if(_0x3253f1[_0x4cf464(0x11b)]!==_0x4cf464(0x134)||_0x3253f1[_0x4cf464(0x183)]!=='process-not-before-boot')return _0x3253f1;const _0x4b47b2={};_0x4b47b2[_0x4cf464(0x11b)]=_0x4cf464(0x134),_0x4b47b2['reason']=_0x4cf464(0x149),_0x4b47b2['diagnostic']=_0x3253f1[_0x4cf464(0x183)];const _0x5e2dfd=_0x4b47b2;if(_0x3cdac4['contract'][_0x4cf464(0x101)]!==0x1||_0x9a8b5b?.[_0x4cf464(0x11b)]!==_0x4cf464(0x11a))return _0x5e2dfd;const _0x5a49d1=_0x9a8b5b['shutdownEvidence'],_0x2483d6=_0x17c118['containmentEvidence'];if(_0x9a8b5b[_0x4cf464(0x1a6)]!==0x1||!_0x9a8b5b['workspace']||!sameWorkspace(_0x9a8b5b[_0x4cf464(0x157)],_0x4e9d68)||_0x9a8b5b[_0x4cf464(0x181)]?.['version']!==_0x3cdac4[_0x4cf464(0x1a6)]||_0x9a8b5b['target']?.['digest']!==_0x3cdac4[_0x4cf464(0x1a8)]||JSON[_0x4cf464(0x14a)](_0x9a8b5b[_0x4cf464(0x189)])!==JSON['stringify'](_0x17c118)||_0x17c118[_0x4cf464(0x130)]!==_0x4cf464(0x19e)||_0x2483d6?.[_0x4cf464(0xfd)]!==_0x4cf464(0x19e)||_0x2483d6[_0x4cf464(0x179)]!==!![]||_0x2483d6[_0x4cf464(0x1aa)]!==_0x17c118['launcherPid']||_0x2483d6[_0x4cf464(0x184)]!==_0x17c118[_0x4cf464(0x184)]||_0x5a49d1?.[_0x4cf464(0xfd)]!==_0x4cf464(0x19e)||!_0x5a49d1[_0x4cf464(0x157)]||!sameWorkspace(_0x5a49d1[_0x4cf464(0x157)],_0x4e9d68)||_0x5a49d1[_0x4cf464(0x130)]!==_0x4cf464(0x173)||_0x5a49d1[_0x4cf464(0xf8)]!==!![]||_0x5a49d1['pid']!==_0x17c118[_0x4cf464(0x1aa)]||_0x5a49d1['processStart']!==_0x17c118[_0x4cf464(0x184)]||![_0x4cf464(0x16d),_0x4cf464(0x18b)][_0x4cf464(0x160)](_0x5a49d1[_0x4cf464(0x12f)])||typeof _0x5a49d1['stopReason']!=='string'||!_0x5a49d1[_0x4cf464(0x191)][_0x4cf464(0x152)]()||_0x5a49d1[_0x4cf464(0x16e)]?.[_0x4cf464(0x179)]!==!![]||_0x5a49d1[_0x4cf464(0x16e)][_0x4cf464(0x17e)]!==0x0||_0x5a49d1[_0x4cf464(0x16e)][_0x4cf464(0x11a)]!==!![]||!Number[_0x4cf464(0x108)](_0x5a49d1['job'][_0x4cf464(0x178)])||_0x5a49d1['job']['brokerPid']<=0x0||_0x5a49d1[_0x4cf464(0x16e)][_0x4cf464(0x178)]>0xffffffff||[_0x17c118[_0x4cf464(0x185)],_0x17c118[_0x4cf464(0x1aa)]][_0x4cf464(0x160)](_0x5a49d1[_0x4cf464(0x16e)]['brokerPid'])||!_0x3553e7[_0x4cf464(0x12d)](_0x17c118,_0x338e7e))return _0x5e2dfd;const _0x7383b7=typeof _0x5a49d1[_0x4cf464(0x187)]===_0x4cf464(0x163)?Date[_0x4cf464(0x140)](_0x5a49d1['closedAt']):NaN;if(!Number[_0x4cf464(0x108)](_0x7383b7)||new Date(_0x7383b7)['toISOString']()!==_0x5a49d1[_0x4cf464(0x187)])return _0x5e2dfd;const _0x5af8e8=BigInt(_0x7383b7)*0x2710n+0x19db1ded53e8000n;if([_0x17c118[_0x4cf464(0x14b)],_0x17c118['launcherProcessStart'],_0x17c118[_0x4cf464(0x13b)][_0x4cf464(0x158)]][_0x4cf464(0x144)](_0x2dea7c=>_0x5af8e8+0x270fn<BigInt(_0x2dea7c))||_0x5af8e8>BigInt(_0x338e7e[_0x4cf464(0x158)]))return _0x5e2dfd;const _0x149728={};return _0x149728[_0x4cf464(0x11b)]=_0x4cf464(0x177),_0x149728[_0x4cf464(0x183)]=_0x4cf464(0x180),_0x149728;}function validateIndexArchive(_0x20295c,_0x32f42c,_0x3a652d=require(_0x107c6a(0x131))[_0x107c6a(0x19f)]){const _0x521330=_0x107c6a;if(!_0x32f42c||!/^[a-f0-9-]{36}$/[_0x521330(0x15e)](_0x32f42c[_0x521330(0x194)]||'')||!/^[a-f0-9]{64}$/[_0x521330(0x15e)](_0x32f42c[_0x521330(0x19a)]||''))fail(_0x521330(0xfa));const _0x4d7e0e=safePath(_0x20295c,path[_0x521330(0x119)](_0x20295c,_0x521330(0x167),_0x521330(0x145)+_0x32f42c[_0x521330(0x194)])),_0x9743dd=read(_0x20295c,path[_0x521330(0x119)](_0x4d7e0e,'backup.json'));if(!_0x9743dd||_0x9743dd[_0x521330(0x176)]!==_0x32f42c[_0x521330(0x19a)]||_0x9743dd[_0x521330(0x10a)][_0x521330(0x194)]!==_0x32f42c[_0x521330(0x194)]||!sameWorkspace(_0x9743dd[_0x521330(0x10a)][_0x521330(0x157)],_0x20295c)||!Array[_0x521330(0x107)](_0x9743dd['value'][_0x521330(0x10c)]))fail('INDEX_RECOVERY_CHANGED');for(const _0x5ca56d of _0x9743dd[_0x521330(0x10a)][_0x521330(0x10c)]){const _0x4a9549=safePath(_0x20295c,path['resolve'](_0x4d7e0e,_0x5ca56d['path']));if(!_0x4a9549[_0x521330(0x175)](_0x4d7e0e+path['sep'])||!/^[a-f0-9]{64}$/[_0x521330(0x15e)](_0x5ca56d[_0x521330(0x176)]||'')||sha(fs[_0x521330(0x122)](_0x4a9549))!==_0x5ca56d[_0x521330(0x176)])fail(_0x521330(0xfa));}const _0x448013=_0x9743dd[_0x521330(0x10a)];if(_0x448013['version']!==0x1||_0x448013['files']['some']((_0x3e0948,_0x1cca57)=>!_0x3e0948['original']||_0x448013[_0x521330(0x10c)][_0x521330(0x186)](_0x2aa688=>_0x2aa688[_0x521330(0x161)]===_0x3e0948[_0x521330(0x161)]||_0x2aa688[_0x521330(0x13e)]===_0x3e0948['path'])!==_0x1cca57))fail(_0x521330(0xfa));if(!_0x448013['instances']||[_0x521330(0xf6),_0x521330(0x19d)][_0x521330(0x144)](_0x5ad6ff=>!/^[a-f0-9-]{36}$/[_0x521330(0x15e)](_0x448013[_0x521330(0x105)][_0x5ad6ff]||'')))fail(_0x521330(0xfa));const _0xf17fe4=_0x1062a2=>{const _0x174faa=_0x521330,_0x22cff6=_0x448013[_0x174faa(0x10c)]['find'](_0x22aaa4=>_0x22aaa4['path']===_0x1062a2);if(!_0x22cff6)fail(_0x174faa(0xfa));return JSON[_0x174faa(0x140)](fs[_0x174faa(0x122)](path[_0x174faa(0x119)](_0x4d7e0e,_0x1062a2)));},_0x250a7d=_0x448013[_0x521330(0x10c)][_0x521330(0xf7)](_0x455190=>[_0x521330(0xfc),'update-transaction.json']['includes'](_0x455190['path']));if(!_0x250a7d||_0x250a7d[_0x521330(0x176)]!==_0x448013[_0x521330(0x139)])fail(_0x521330(0xfa));const _0x168a22=_0xf17fe4(_0x250a7d[_0x521330(0x13e)]),_0x2f83a8=_0xf17fe4(_0x521330(0x17a)),_0x1f70e4=_0xf17fe4(_0x521330(0x15f)),_0x361d0b=_0x168a22[_0x521330(0x12a)]?.['execution'],_0x5d56c7=verifyIndexProducer(_0x448013[_0x521330(0x137)]?.[_0x521330(0x104)],_0x3a652d);if(!_0x361d0b||_0x361d0b[_0x521330(0x146)]!==_0x448013[_0x521330(0x146)]||!sameWorkspace(_0x168a22[_0x521330(0x157)],_0x20295c)||!sameWorkspace(_0x2f83a8[_0x521330(0x157)],_0x20295c)||_0x5d56c7[_0x521330(0x1a6)]!==_0x2f83a8['version']||_0x5d56c7[_0x521330(0x1a8)]!==_0x2f83a8[_0x521330(0x1a8)]||_0x168a22['target']?.[_0x521330(0x1a6)]!==_0x5d56c7[_0x521330(0x1a6)]||_0x168a22['target']?.[_0x521330(0x1a8)]!==_0x5d56c7[_0x521330(0x1a8)]||[_0x521330(0x17f),_0x521330(0x12b),_0x521330(0x11d),'transactionId'][_0x521330(0x144)](_0x49b1d2=>(_0x168a22[_0x49b1d2]??null)!==(_0x2f83a8[_0x49b1d2]??null)||(_0x361d0b[_0x49b1d2]??null)!==(_0x2f83a8[_0x49b1d2]??null))||_0x1f70e4[_0x521330(0x1ae)]!==_0x521330(0x133)||_0x1f70e4[_0x521330(0x1a9)]!==_0x361d0b['fenceEpoch']||_0x448013[_0x521330(0x10c)][_0x521330(0xf7)](_0x513be5=>_0x513be5[_0x521330(0x13e)]===_0x521330(0x17a))?.[_0x521330(0x176)]!==_0x448013[_0x521330(0x143)]||_0x448013['files']['find'](_0x1957d9=>_0x1957d9['path']==='admission.json')?.[_0x521330(0x176)]!==_0x448013['fenceHash']||_0x448013[_0x521330(0x1a5)]!==_0x521330(0x134)||!Number[_0x521330(0x108)](_0x2f83a8['generation'])||_0x2f83a8[_0x521330(0x17f)]<0x1||!/^[a-f0-9]{64}$/['test'](_0x2f83a8['catalogHash']||'')||_0x1f70e4[_0x521330(0x17f)]!=null&&_0x1f70e4[_0x521330(0x17f)]!==_0x2f83a8['generation']||_0x361d0b[_0x521330(0x130)]&&_0x361d0b[_0x521330(0x130)]!==_0x5d56c7['contract'][_0x521330(0x130)]||_0x361d0b[_0x521330(0x137)]&&(_0x361d0b[_0x521330(0x137)]['digest']!==_0x5d56c7['digest']||_0x361d0b[_0x521330(0x137)][_0x521330(0x1a6)]!==_0x5d56c7[_0x521330(0x1a6)]))fail('INDEX_RECOVERY_CHANGED');const _0x531dde=_0x4b3889=>_0x448013[_0x521330(0x10c)][_0x521330(0xf7)](_0x25af13=>_0x25af13['original']===path[_0x521330(0x154)](_0x20295c,_0x4b3889)[_0x521330(0x155)]('\x5c','/')),_0x207a64=_0x531dde(path[_0x521330(0x119)](_0x20295c,_0x521330(0x16b)));if(!_0x207a64||_0x207a64[_0x521330(0x176)]!==_0x2f83a8[_0x521330(0x12b)])fail(_0x521330(0xfa));const _0x5bbffc=require(_0x521330(0x172)),_0x403f29=new Set([_0x521330(0x18e)+_0x250a7d[_0x521330(0x13e)],_0x521330(0x190),_0x521330(0x10d),_0x521330(0x16b),...[_0x521330(0x114),'update.lock',_0x521330(0x120)][_0x521330(0x1b7)](_0x4eb31a=>_0x521330(0x18e)+_0x4eb31a)]);for(const _0x5b7fbc of[_0x521330(0xf6),_0x521330(0x19d)]){const _0x823601={..._0x5d56c7[_0x521330(0x112)][_0x521330(0x1b3)][_0x5b7fbc]};_0x823601['cacheContract']=_0x5d56c7['contract']['cacheContract'];const _0x380664=_0x823601,_0x544b78=_0x361d0b[_0x521330(0x17d)]?.[_0x521330(0xf7)](_0x2ca344=>_0x2ca344[_0x521330(0x19b)]===_0x5b7fbc)?.['marker'];if(!_0x544b78&&_0x380664['cacheContract']===0x3)fail(_0x521330(0xfa));const _0x29a32c={};_0x29a32c[_0x521330(0x157)]=_0x20295c,_0x29a32c[_0x521330(0x19b)]=_0x5b7fbc,_0x29a32c['profile']=_0x380664,_0x29a32c[_0x521330(0x1ad)]=_0x544b78?.[_0x521330(0x1ad)],_0x29a32c[_0x521330(0x1a0)]=!![];const _0x1fc053=_0x5bbffc[_0x521330(0x10b)](_0x29a32c);if(_0x544b78&&JSON[_0x521330(0x14a)](_0x544b78)!==JSON['stringify'](_0x1fc053[_0x521330(0x1b2)]))fail('INDEX_RECOVERY_CHANGED');for(const _0x5cdb4 of[path[_0x521330(0x119)](_0x1fc053['stateDirectory'],_0x521330(0x13c)),path['join'](_0x1fc053[_0x521330(0x165)],_0x521330(0x153))]){const _0x367b65=_0x531dde(_0x5cdb4);if(!_0x367b65||_0x367b65[_0x521330(0x176)]!==sha(JSON['stringify'](_0x1fc053[_0x521330(0x1b2)])))fail('INDEX_RECOVERY_CHANGED');}for(const _0x35311a of[...[_0x521330(0x13c),_0x521330(0x195),_0x521330(0x11c),_0x521330(0xf5),_0x521330(0x16f)][_0x521330(0x1b7)](_0x16923e=>path[_0x521330(0x119)](_0x1fc053[_0x521330(0x164)],_0x16923e)),path[_0x521330(0x119)](_0x1fc053[_0x521330(0x165)],_0x521330(0x153)),..._0x1fc053['selectorFile']?[_0x1fc053[_0x521330(0xfe)]]:[]])_0x403f29[_0x521330(0x1ac)](path[_0x521330(0x154)](_0x20295c,_0x35311a)['replaceAll']('\x5c','/'));const _0x1a849c=_0x1fc053[_0x521330(0xfe)]&&_0x531dde(_0x1fc053[_0x521330(0xfe)]);if(_0x1a849c){const _0x250b81=_0xf17fe4(_0x1a849c['path']);if(_0x250b81[_0x521330(0x1a6)]!==0x1||_0x250b81[_0x521330(0x109)]!==_0x1fc053[_0x521330(0x109)]||_0x250b81['active']!==_0x1fc053[_0x521330(0x1b2)][_0x521330(0x1ad)]&&_0x250b81[_0x521330(0x188)]?.[_0x521330(0x1ad)]!==_0x1fc053['marker'][_0x521330(0x1ad)]||_0x250b81[_0x521330(0x14d)]===_0x1fc053[_0x521330(0x1b2)][_0x521330(0x1ad)]&&_0x250b81[_0x521330(0x14d)]!==_0x521330(0x136)&&_0x531dde(path[_0x521330(0x119)](_0x1fc053[_0x521330(0x164)],_0x521330(0x16f)))?.[_0x521330(0x176)]!==_0x250b81[_0x521330(0x150)])fail('INDEX_RECOVERY_CHANGED');}else{if(_0x380664['cacheContract']===0x3&&_0x1fc053[_0x521330(0x1b2)][_0x521330(0x1ad)]!=='00000000-0000-0000-0000-000000000000')fail(_0x521330(0xfa));}}let _0x5605e9;if(_0x5d56c7['contract'][_0x521330(0x13d)]===0x3){const _0x10a5c4=_0x531dde(path[_0x521330(0x119)](_0x20295c,_0x521330(0x13a),_0x361d0b[_0x521330(0x146)]+_0x521330(0x1a3)));if(!_0x10a5c4)fail(_0x521330(0xfa));_0x5605e9=_0xf17fe4(_0x10a5c4[_0x521330(0x13e)]);if(JSON[_0x521330(0x14a)](_0x5605e9[_0x521330(0x189)])!==JSON[_0x521330(0x14a)](_0x361d0b)||![_0x521330(0x127),'stopped']['includes'](_0x5605e9[_0x521330(0x11b)])||!sameWorkspace(_0x5605e9[_0x521330(0x157)],_0x20295c)||_0x5605e9['target']?.[_0x521330(0x1a6)]!==_0x5d56c7[_0x521330(0x1a6)]||_0x5605e9[_0x521330(0x181)]?.[_0x521330(0x1a8)]!==_0x5d56c7['digest'])fail('INDEX_RECOVERY_CHANGED');_0x403f29[_0x521330(0x1ac)](_0x10a5c4[_0x521330(0x161)]);}const _0x1d990b=classifyInterruption({'workspace':_0x20295c,'execution':_0x361d0b,'boot':_0x448013[_0x521330(0x13b)],'producer':_0x5d56c7,'lifecycle':_0x5605e9,'processIdentity':_0x4c081e=>Object[_0x521330(0x15d)](_0x448013[_0x521330(0x123)]||{},_0x4c081e)?_0x448013[_0x521330(0x123)][_0x4c081e]:undefined});if(_0x1d990b[_0x521330(0x11b)]!=='recoverable-interruption'||_0x1d990b[_0x521330(0x183)]!==_0x448013[_0x521330(0x183)])fail('INDEX_RECOVERY_CHANGED');if(_0x448013['files'][_0x521330(0x144)](_0x3b4daf=>!_0x403f29[_0x521330(0x1b8)](_0x3b4daf[_0x521330(0x161)])))fail(_0x521330(0xfa));const _0x527730={..._0x9743dd[_0x521330(0x10a)]};return _0x527730[_0x521330(0x166)]=_0x4d7e0e,_0x527730['archiveHash']=_0x9743dd[_0x521330(0x176)],_0x527730;}function _0x190a(_0x2f9d54,_0x400152){_0x2f9d54=_0x2f9d54-0xf5;const _0x525fe4=_0x525f();let _0x190aaf=_0x525fe4[_0x2f9d54];if(_0x190a['kyMLiF']===undefined){var _0x286727=function(_0x1a05fe){const _0x5532e2='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x13be8c='',_0x1bcb5f='';for(let _0x48d9af=0x0,_0x59d459,_0x14eedf,_0x25f5c7=0x0;_0x14eedf=_0x1a05fe['charAt'](_0x25f5c7++);~_0x14eedf&&(_0x59d459=_0x48d9af%0x4?_0x59d459*0x40+_0x14eedf:_0x14eedf,_0x48d9af++%0x4)?_0x13be8c+=String['fromCharCode'](0xff&_0x59d459>>(-0x2*_0x48d9af&0x6)):0x0){_0x14eedf=_0x5532e2['indexOf'](_0x14eedf);}for(let _0x3784e5=0x0,_0x42bdc9=_0x13be8c['length'];_0x3784e5<_0x42bdc9;_0x3784e5++){_0x1bcb5f+='%'+('00'+_0x13be8c['charCodeAt'](_0x3784e5)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x1bcb5f);};_0x190a['TfGfwm']=_0x286727,_0x190a['eSENPn']={},_0x190a['kyMLiF']=!![];}const _0x3861d3=_0x525fe4[0x0],_0x29a68c=_0x2f9d54+_0x3861d3,_0x455bd4=_0x190a['eSENPn'][_0x29a68c];return!_0x455bd4?(_0x190aaf=_0x190a['TfGfwm'](_0x190aaf),_0x190a['eSENPn'][_0x29a68c]=_0x190aaf):_0x190aaf=_0x455bd4,_0x190aaf;}function inspectIndexInterruption(_0x563f1a,_0x58b1c3={}){const _0x4d6d4f=_0x107c6a;try{_0x563f1a=fs['realpathSync'](_0x563f1a);const _0x24a20d=path[_0x4d6d4f(0x119)](_0x563f1a,_0x4d6d4f(0x138)),_0x59691f=read(_0x563f1a,path[_0x4d6d4f(0x119)](_0x24a20d,'generation.json')),_0x445b36=read(_0x563f1a,path['join'](_0x24a20d,_0x4d6d4f(0x15f))),_0x12af96=[_0x4d6d4f(0xfc),_0x4d6d4f(0x113)][_0x4d6d4f(0x1b7)](_0x21efbd=>read(_0x563f1a,path[_0x4d6d4f(0x119)](_0x24a20d,_0x21efbd)))[_0x4d6d4f(0x159)](Boolean);for(const _0x581e4b of _0x12af96){for(const _0x44346d of[..._0x581e4b[_0x4d6d4f(0x10a)]['indexRecoveries']||[],..._0x581e4b[_0x4d6d4f(0x10a)][_0x4d6d4f(0x12a)]?.[_0x4d6d4f(0xfb)]?[_0x581e4b[_0x4d6d4f(0x10a)][_0x4d6d4f(0x12a)][_0x4d6d4f(0xfb)]]:[]])validateIndexArchive(_0x563f1a,_0x44346d,_0x58b1c3[_0x4d6d4f(0x129)]);}const _0x38d630=_0x12af96[_0x4d6d4f(0x159)](_0x2a069b=>[_0x4d6d4f(0x16c),'unknown'][_0x4d6d4f(0x160)](_0x2a069b['value'][_0x4d6d4f(0x12a)]?.['status'])&&(path[_0x4d6d4f(0x100)](_0x2a069b['file'])!==_0x4d6d4f(0x113)||!_0x59691f||_0x2a069b['value']['target']?.['version']===_0x59691f['value'][_0x4d6d4f(0x1a6)]&&_0x2a069b[_0x4d6d4f(0x10a)][_0x4d6d4f(0x181)]?.[_0x4d6d4f(0x1a8)]===_0x59691f[_0x4d6d4f(0x10a)][_0x4d6d4f(0x1a8)]&&(_0x2a069b['value'][_0x4d6d4f(0xff)]??null)===(_0x59691f[_0x4d6d4f(0x10a)][_0x4d6d4f(0xff)]??null)));if(!_0x38d630[_0x4d6d4f(0x116)]){const _0x4f3206=_0x12af96[_0x4d6d4f(0xf7)](_0x133fa2=>_0x133fa2[_0x4d6d4f(0x10a)]['indexResult']?.['status']===_0x4d6d4f(0x14c)),_0x588536={};return _0x588536[_0x4d6d4f(0x11b)]='clear',_0x588536[_0x4d6d4f(0x1b1)]=[],_0x4f3206?{'status':'interrupted',...validateIndexArchive(_0x563f1a,_0x4f3206[_0x4d6d4f(0x10a)][_0x4d6d4f(0x12a)][_0x4d6d4f(0xfb)],_0x58b1c3[_0x4d6d4f(0x129)])}:_0x588536;}if(_0x38d630[_0x4d6d4f(0x116)]!==0x1||!_0x59691f||!_0x445b36)fail(_0x4d6d4f(0x18d));const _0x11cf3e=_0x38d630[0x0],_0x2b343c=_0x11cf3e[_0x4d6d4f(0x10a)],_0x4aecfd=_0x2b343c[_0x4d6d4f(0x12a)]['execution'],_0x23e92a=_0x59691f[_0x4d6d4f(0x10a)];if(!_0x4aecfd||!_0x23e92a[_0x4d6d4f(0x157)]||!_0x2b343c['workspace']||!sameWorkspace(_0x23e92a[_0x4d6d4f(0x157)],_0x563f1a)||!sameWorkspace(_0x2b343c['workspace'],_0x563f1a)||_0x2b343c[_0x4d6d4f(0x181)]?.[_0x4d6d4f(0x1a6)]!==_0x23e92a[_0x4d6d4f(0x1a6)]||_0x2b343c['target']?.['digest']!==_0x23e92a['digest']||!Number[_0x4d6d4f(0x108)](_0x23e92a[_0x4d6d4f(0x17f)])||_0x23e92a[_0x4d6d4f(0x17f)]<0x1||['generation','resourceDigest',_0x4d6d4f(0x11d),_0x4d6d4f(0xff)][_0x4d6d4f(0x144)](_0x48f1f1=>(_0x2b343c[_0x48f1f1]??null)!==(_0x23e92a[_0x48f1f1]??null)||(_0x4aecfd[_0x48f1f1]??null)!==(_0x23e92a[_0x48f1f1]??null))||!/^[a-f0-9]{64}$/[_0x4d6d4f(0x15e)](_0x23e92a[_0x4d6d4f(0x11d)]||'')||_0x445b36['value'][_0x4d6d4f(0x1ae)]!==_0x4d6d4f(0x133)||_0x445b36[_0x4d6d4f(0x10a)][_0x4d6d4f(0x1a9)]!==_0x4aecfd[_0x4d6d4f(0x162)]||_0x445b36[_0x4d6d4f(0x10a)][_0x4d6d4f(0x17f)]!=null&&_0x445b36[_0x4d6d4f(0x10a)][_0x4d6d4f(0x17f)]!==_0x23e92a[_0x4d6d4f(0x17f)]||sha(fs[_0x4d6d4f(0x122)](safePath(_0x563f1a,path[_0x4d6d4f(0x119)](_0x563f1a,_0x4d6d4f(0x16b)))))!==_0x23e92a[_0x4d6d4f(0x12b)])fail(_0x4d6d4f(0x18d));const _0x2cc413=_0x4aecfd[_0x4d6d4f(0x137)]?.[_0x4d6d4f(0x104)]||_0x58b1c3['producerRelease']||_0x23e92a[_0x4d6d4f(0x104)]||_0x58b1c3['runtimeRoot']&&path[_0x4d6d4f(0x119)](_0x58b1c3[_0x4d6d4f(0x199)],_0x4d6d4f(0x1af),_0x23e92a[_0x4d6d4f(0x1a6)]+'-'+_0x23e92a[_0x4d6d4f(0x1a8)]),_0x4ced47=verifyIndexProducer(_0x2cc413,_0x58b1c3[_0x4d6d4f(0x129)]);if(_0x4ced47['version']!==_0x23e92a[_0x4d6d4f(0x1a6)]||_0x4ced47[_0x4d6d4f(0x1a8)]!==_0x23e92a[_0x4d6d4f(0x1a8)]||_0x4aecfd[_0x4d6d4f(0x137)]&&(_0x4aecfd['producer']['version']!==_0x4ced47[_0x4d6d4f(0x1a6)]||_0x4aecfd[_0x4d6d4f(0x137)][_0x4d6d4f(0x1a8)]!==_0x4ced47[_0x4d6d4f(0x1a8)])||_0x4aecfd[_0x4d6d4f(0x130)]&&_0x4aecfd[_0x4d6d4f(0x130)]!==_0x4ced47[_0x4d6d4f(0x112)]['containment'])fail(_0x4d6d4f(0x19c));const _0x16f7d7=require(_0x4d6d4f(0x172)),_0x4179ef=[_0x4d6d4f(0xf6),'code-review-graph']['map'](_0xc983b3=>{const _0x3f8f60=_0x4d6d4f,_0x59e46b={..._0x4ced47[_0x3f8f60(0x112)][_0x3f8f60(0x1b3)][_0xc983b3]};_0x59e46b[_0x3f8f60(0x13d)]=_0x4ced47[_0x3f8f60(0x112)][_0x3f8f60(0x13d)];const _0x179eff=_0x59e46b,_0x43cd61=_0x4aecfd['caches']?.[_0x3f8f60(0xf7)](_0x16f4f2=>_0x16f4f2[_0x3f8f60(0x19b)]===_0xc983b3)?.[_0x3f8f60(0x1b2)],_0x3beae6={};_0x3beae6['workspace']=_0x563f1a,_0x3beae6[_0x3f8f60(0x19b)]=_0xc983b3,_0x3beae6['profile']=_0x179eff,_0x3beae6[_0x3f8f60(0x1ad)]=_0x43cd61?.[_0x3f8f60(0x1ad)],_0x3beae6[_0x3f8f60(0x1a0)]=!![];const _0x5b0b6c=_0x16f7d7[_0x3f8f60(0x10b)](_0x3beae6);if(!_0x5b0b6c||_0x43cd61&&JSON[_0x3f8f60(0x14a)](_0x43cd61)!==JSON[_0x3f8f60(0x14a)](_0x5b0b6c[_0x3f8f60(0x1b2)])||!_0x43cd61&&_0x179eff[_0x3f8f60(0x13d)]===0x3)fail(_0x3f8f60(0x12e));return validateManagedIndexCache(_0x5b0b6c),_0x5b0b6c;}),_0x5f1c70=/^[a-f0-9-]{36}$/[_0x4d6d4f(0x15e)](_0x4aecfd[_0x4d6d4f(0x146)]||'')?read(_0x563f1a,path[_0x4d6d4f(0x119)](_0x24a20d,_0x4d6d4f(0x182),_0x4aecfd[_0x4d6d4f(0x146)]+'.json')):null;if(_0x4ced47[_0x4d6d4f(0x112)][_0x4d6d4f(0x13d)]===0x3&&(!_0x5f1c70||JSON[_0x4d6d4f(0x14a)](_0x5f1c70[_0x4d6d4f(0x10a)][_0x4d6d4f(0x189)])!==JSON[_0x4d6d4f(0x14a)](_0x4aecfd)||!['reserved',_0x4d6d4f(0x11a)]['includes'](_0x5f1c70[_0x4d6d4f(0x10a)][_0x4d6d4f(0x11b)])))fail(_0x4d6d4f(0x18d));const _0x58aee8=[_0x11cf3e,_0x59691f,_0x445b36,..._0x5f1c70?[_0x5f1c70]:[],read(_0x563f1a,path[_0x4d6d4f(0x119)](_0x563f1a,_0x4d6d4f(0x16b))),..._0x4179ef[_0x4d6d4f(0x196)](_0x5b3e93=>[...[_0x4d6d4f(0x13c),_0x4d6d4f(0x195),_0x4d6d4f(0x11c),_0x4d6d4f(0xf5),_0x4d6d4f(0x16f)][_0x4d6d4f(0x1b7)](_0x1d1c85=>read(_0x563f1a,path[_0x4d6d4f(0x119)](_0x5b3e93[_0x4d6d4f(0x164)],_0x1d1c85))),read(_0x563f1a,path[_0x4d6d4f(0x119)](_0x5b3e93[_0x4d6d4f(0x165)],_0x4d6d4f(0x153))),_0x5b3e93['selectorFile']&&read(_0x563f1a,_0x5b3e93[_0x4d6d4f(0xfe)])][_0x4d6d4f(0x159)](Boolean)),...[_0x4d6d4f(0x114),'update.lock',_0x4d6d4f(0x120)][_0x4d6d4f(0x1b7)](_0x581a44=>read(_0x563f1a,path['join'](_0x24a20d,_0x581a44)))['filter'](Boolean)],_0x13c58c=_0x58b1c3['boot']===undefined?require(_0x4d6d4f(0x151))[_0x4d6d4f(0x128)]():_0x58b1c3[_0x4d6d4f(0x13b)],_0x5b1fdc={},_0x3a65e7=_0x58b1c3[_0x4d6d4f(0x197)]||require('../core/boot-evidence')[_0x4d6d4f(0x18f)],_0x2490a7=classifyInterruption({'workspace':_0x563f1a,'execution':_0x4aecfd,'boot':_0x13c58c,'producer':_0x4ced47,'lifecycle':_0x5f1c70?.['value'],'processIdentity':_0x363bc3=>{const _0x45a18e=_0x3a65e7(_0x363bc3);return _0x5b1fdc[_0x363bc3]=_0x45a18e,_0x45a18e;}}),_0x56f392={..._0x2490a7};return _0x56f392[_0x4d6d4f(0x157)]=_0x563f1a,_0x56f392[_0x4d6d4f(0x103)]=_0x11cf3e,_0x56f392[_0x4d6d4f(0x17f)]=_0x59691f,_0x56f392[_0x4d6d4f(0x125)]=_0x445b36,_0x56f392[_0x4d6d4f(0x137)]=_0x4ced47,_0x56f392[_0x4d6d4f(0x1b5)]=_0x4179ef,_0x56f392[_0x4d6d4f(0x1b4)]=_0x58aee8,_0x56f392['boot']=_0x13c58c,_0x56f392[_0x4d6d4f(0x123)]=_0x5b1fdc,_0x56f392;}catch(_0x55787b){const _0x514613={};return _0x514613['status']=_0x4d6d4f(0x134),_0x514613['reason']=_0x55787b['code']||_0x4d6d4f(0x15c),_0x514613;}}function reconcileIndexInterruption(_0x900e6,_0x4100b0={}){const _0x596979=_0x107c6a;_0x900e6=fs['realpathSync'](_0x900e6);const _0x4d1de1=inspectIndexInterruption(_0x900e6,_0x4100b0);if(!_0x4100b0['apply']||!['recoverable-interruption',_0x596979(0x14c)][_0x596979(0x160)](_0x4d1de1[_0x596979(0x11b)]))return _0x4d1de1;if(_0x4d1de1[_0x596979(0x11b)]===_0x596979(0x14c))return _0x4d1de1;const _0x240bd3=path[_0x596979(0x119)](_0x900e6,'.agents/runtime'),_0x112025=[],_0x268a3a=new Set(['executor.lock',_0x596979(0x17c),_0x596979(0x120)]['map'](_0x194936=>path[_0x596979(0x119)](_0x240bd3,_0x194936))),_0xf80209=_0x636805=>JSON[_0x596979(0x14a)](_0x636805[_0x596979(0x159)](_0x2749da=>!_0x268a3a[_0x596979(0x1b8)](_0x2749da[_0x596979(0x10e)]))[_0x596979(0x1b7)](_0x3efaff=>[_0x3efaff['file'],_0x3efaff[_0x596979(0x176)]])[_0x596979(0x118)](([_0xde0832],[_0x561a8d])=>_0xde0832['localeCompare'](_0x561a8d)));try{const _0xce94ca=safePath(_0x900e6,path[_0x596979(0x119)](_0x240bd3,_0x596979(0x1a1),_0x4d1de1[_0x596979(0x103)][_0x596979(0x176)]+_0x596979(0x1a3)));safePath(_0x900e6,path[_0x596979(0x115)](_0xce94ca),!![]);let _0x2e88dd=read(_0x900e6,_0xce94ca)?.[_0x596979(0x10a)];const _0x138834=_0x8c752e=>{const _0x5ed031=_0x596979;if(!/[/\\]selectors[/\\][a-f0-9]{64}\.json$/['test'](_0x8c752e['file'])||!_0x2e88dd)return![];const _0x502b8f=_0x8c752e[_0x5ed031(0x10a)],_0x5b4cdb=_0x502b8f?.[_0x5ed031(0x188)],_0x58ccce=_0x2e88dd[_0x5ed031(0x10c)]?.['find'](_0x73ba1c=>_0x73ba1c[_0x5ed031(0x161)]===path[_0x5ed031(0x154)](_0x900e6,_0x8c752e[_0x5ed031(0x10e)])['replaceAll']('\x5c','/')),_0x3e0ba5=_0x58ccce&&JSON['parse'](Buffer['from'](_0x58ccce[_0x5ed031(0x132)],'base64'));return _0x502b8f[_0x5ed031(0x1a6)]===0x1&&_0x5b4cdb?.[_0x5ed031(0x1ad)]===_0x2e88dd[_0x5ed031(0x194)]&&_0x5b4cdb[_0x5ed031(0x194)]===_0x2e88dd[_0x5ed031(0x194)]&&_0x5b4cdb[_0x5ed031(0x19a)]===sha(JSON[_0x5ed031(0x14a)](_0x2e88dd))&&_0x502b8f[_0x5ed031(0x14d)]===(_0x3e0ba5?.['active']||'00000000-0000-0000-0000-000000000000');};if(_0x2e88dd&&(_0x2e88dd[_0x596979(0x139)]!==_0x4d1de1[_0x596979(0x103)][_0x596979(0x176)]||_0x2e88dd[_0x596979(0x146)]!==_0x4d1de1[_0x596979(0x103)][_0x596979(0x10a)][_0x596979(0x12a)][_0x596979(0x189)][_0x596979(0x146)]||_0x2e88dd[_0x596979(0x143)]!==_0x4d1de1[_0x596979(0x17f)][_0x596979(0x176)]||_0x2e88dd[_0x596979(0x169)]!==_0x4d1de1[_0x596979(0x125)][_0x596979(0x176)]||_0x4d1de1[_0x596979(0x1b4)][_0x596979(0x144)](_0x36c789=>!['executor.lock',_0x596979(0x17c),'admission.json.lock']['includes'](path[_0x596979(0x100)](_0x36c789[_0x596979(0x10e)]))&&!_0x2e88dd[_0x596979(0x10c)]?.[_0x596979(0x144)](_0xd2855b=>_0xd2855b[_0x596979(0x161)]===path[_0x596979(0x154)](_0x900e6,_0x36c789['file'])[_0x596979(0x155)]('\x5c','/')&&_0xd2855b[_0x596979(0x176)]===_0x36c789[_0x596979(0x176)])&&!_0x138834(_0x36c789))))fail(_0x596979(0xfa));if(!_0x2e88dd){const _0x558c07=crypto[_0x596979(0x110)](),_0x5ce175=_0x4d1de1[_0x596979(0x1b4)][_0x596979(0x1b7)](_0xaab5d1=>({'path':path[_0x596979(0x154)](_0x240bd3,_0xaab5d1[_0x596979(0x10e)])[_0x596979(0x175)]('..')?_0x596979(0x156)+sha(path[_0x596979(0x154)](_0x900e6,_0xaab5d1['file']))+_0x596979(0x1a3):path[_0x596979(0x154)](_0x240bd3,_0xaab5d1[_0x596979(0x10e)])[_0x596979(0x155)]('\x5c','/'),'original':path[_0x596979(0x154)](_0x900e6,_0xaab5d1[_0x596979(0x10e)])[_0x596979(0x155)]('\x5c','/'),'sha256':_0xaab5d1[_0x596979(0x176)],'bytes':_0xaab5d1[_0x596979(0x132)][_0x596979(0x18c)](_0x596979(0x126))})),_0x1a64be={};_0x1a64be[_0x596979(0x1a6)]=0x1,_0x1a64be[_0x596979(0x157)]=_0x900e6,_0x1a64be[_0x596979(0x194)]=_0x558c07,_0x1a64be[_0x596979(0x146)]=_0x4d1de1[_0x596979(0x103)][_0x596979(0x10a)][_0x596979(0x12a)][_0x596979(0x189)][_0x596979(0x146)],_0x1a64be[_0x596979(0x139)]=_0x4d1de1[_0x596979(0x103)][_0x596979(0x176)],_0x1a64be[_0x596979(0x143)]=_0x4d1de1[_0x596979(0x17f)][_0x596979(0x176)],_0x1a64be['fenceHash']=_0x4d1de1[_0x596979(0x125)][_0x596979(0x176)],_0x1a64be['outcome']=_0x596979(0x134),_0x1a64be[_0x596979(0x183)]=_0x4d1de1['reason'],_0x1a64be[_0x596979(0x13b)]=_0x4d1de1[_0x596979(0x13b)],_0x1a64be[_0x596979(0x123)]=_0x4d1de1[_0x596979(0x123)],_0x1a64be[_0x596979(0x137)]=_0x4d1de1[_0x596979(0x137)],_0x1a64be[_0x596979(0x105)]={},_0x1a64be[_0x596979(0x10c)]=_0x5ce175,_0x1a64be[_0x596979(0x105)][_0x596979(0xf6)]=_0x558c07,_0x1a64be[_0x596979(0x105)][_0x596979(0x19d)]=_0x558c07,_0x2e88dd=_0x1a64be,preserveArchiveBytes(_0xce94ca,JSON[_0x596979(0x14a)](_0x2e88dd));}const {acquireExactRuntimeLock:_0x15990d}=require('../core/owned-lock');for(const _0x5dab93 of[_0x596979(0x114),'update.lock','admission.json.lock']){const _0x38da5a=safePath(_0x900e6,path[_0x596979(0x119)](_0x240bd3,_0x5dab93)),_0x4e204f=_0x4d1de1[_0x596979(0x1b4)]['find'](_0x180df5=>_0x180df5[_0x596979(0x10e)]===_0x38da5a)?.['bytes']||null,_0x9a29c3=_0x15990d(_0x38da5a,_0x4e204f);if(!_0x9a29c3)fail('INDEX_RECOVERY_BUSY');_0x112025[_0x596979(0x198)](_0x9a29c3);}const _0x280b9e=inspectIndexInterruption(_0x900e6,_0x4100b0);if(_0x280b9e[_0x596979(0x11b)]!==_0x596979(0x177)||_0x4d1de1[_0x596979(0x103)][_0x596979(0x176)]!==_0x280b9e[_0x596979(0x103)]['sha256']||_0x4d1de1[_0x596979(0x17f)][_0x596979(0x176)]!==_0x280b9e[_0x596979(0x17f)][_0x596979(0x176)]||_0x4d1de1[_0x596979(0x125)]['sha256']!==_0x280b9e[_0x596979(0x125)][_0x596979(0x176)]||_0xf80209(_0x4d1de1[_0x596979(0x1b4)])!==_0xf80209(_0x280b9e[_0x596979(0x1b4)]))fail(_0x596979(0xfa));for(const _0x4455a5 of _0x4d1de1[_0x596979(0x1b4)])if(!_0x268a3a[_0x596979(0x1b8)](_0x4455a5[_0x596979(0x10e)])&&!fs[_0x596979(0x122)](_0x4455a5['file'])[_0x596979(0x14f)](_0x4455a5[_0x596979(0x132)]))fail(_0x596979(0xfa));const _0x2c8f24=safePath(_0x900e6,path[_0x596979(0x119)](_0x900e6,_0x596979(0x167),_0x596979(0x145)+_0x2e88dd[_0x596979(0x194)]),!![]),_0xfb3dcb=Buffer[_0x596979(0x171)](JSON[_0x596979(0x14a)](_0x2e88dd));preserveArchiveBytes(safePath(_0x900e6,path[_0x596979(0x119)](_0x2c8f24,_0x596979(0x193))),_0xfb3dcb);for(const _0x1484ce of _0x2e88dd[_0x596979(0x10c)]){const _0x35a2d1=Buffer[_0x596979(0x171)](_0x1484ce['bytes'],_0x596979(0x126));if(sha(_0x35a2d1)!==_0x1484ce[_0x596979(0x176)])fail(_0x596979(0xfa));const _0x192885=safePath(_0x900e6,path['join'](_0x2c8f24,_0x1484ce[_0x596979(0x13e)]));safePath(_0x900e6,path[_0x596979(0x115)](_0x192885),!![]),preserveArchiveBytes(_0x192885,_0x35a2d1);}const _0x51d8c5={'recoveryId':_0x2e88dd[_0x596979(0x194)],'archiveHash':sha(_0xfb3dcb)};validateIndexArchive(_0x900e6,_0x51d8c5,_0x4100b0['publicKey']);const _0x2e4eb7=inspectIndexInterruption(_0x900e6,_0x4100b0);if(_0x2e4eb7[_0x596979(0x11b)]!=='recoverable-interruption'||_0x2e4eb7[_0x596979(0x103)][_0x596979(0x176)]!==_0x2e88dd[_0x596979(0x139)]||_0x2e4eb7[_0x596979(0x17f)][_0x596979(0x176)]!==_0x2e88dd[_0x596979(0x143)]||_0x2e4eb7[_0x596979(0x125)][_0x596979(0x176)]!==_0x2e88dd['fenceHash']||_0xf80209(_0x4d1de1[_0x596979(0x1b4)])!==_0xf80209(_0x2e4eb7['artifacts'])||_0x112025[_0x596979(0x144)](_0x382522=>!_0x382522[_0x596979(0x1b0)]()))fail(_0x596979(0xfa));for(const _0x50588c of _0x4d1de1[_0x596979(0x1b4)])if(!_0x268a3a[_0x596979(0x1b8)](_0x50588c[_0x596979(0x10e)])&&!fs['readFileSync'](_0x50588c[_0x596979(0x10e)])['equals'](_0x50588c[_0x596979(0x132)]))fail(_0x596979(0xfa));const _0xc1e42=_0x2e4eb7[_0x596979(0x103)][_0x596979(0x10a)];for(const _0x3186ed of[_0x596979(0xf6),_0x596979(0x19d)]){const _0x4ef80=require(_0x596979(0x172)),_0x36938f={};_0x36938f['workspace']=_0x900e6,_0x36938f[_0x596979(0x19b)]=_0x3186ed,_0x36938f['profile']={..._0x2e4eb7[_0x596979(0x137)][_0x596979(0x112)][_0x596979(0x1b3)][_0x3186ed]},_0x36938f[_0x596979(0x1a0)]=!![],_0x36938f['profile'][_0x596979(0x13d)]=0x3;const _0x6de71f=_0x4ef80[_0x596979(0x10b)](_0x36938f);_0x4ef80[_0x596979(0x1b6)](_0x6de71f,_0x51d8c5,_0x4100b0['publicKey']);}const _0x1e5082={..._0xc1e42};_0x1e5082[_0x596979(0x168)]=[..._0xc1e42['indexRecoveries']||[],_0x51d8c5],_0x1e5082[_0x596979(0x12a)]={..._0xc1e42[_0x596979(0x12a)]},_0x1e5082[_0x596979(0x12a)]['status']=_0x596979(0x14c),_0x1e5082[_0x596979(0x12a)][_0x596979(0x1a5)]=_0x596979(0x134),_0x1e5082[_0x596979(0x12a)][_0x596979(0x10f)]=_0x596979(0x141),_0x1e5082[_0x596979(0x12a)][_0x596979(0x18a)]=!![],_0x1e5082[_0x596979(0x12a)][_0x596979(0xfb)]=_0x51d8c5,require('../backends/index-store')['atomic'](_0x2e4eb7[_0x596979(0x103)][_0x596979(0x10e)],_0x1e5082);const _0x498395={};return _0x498395[_0x596979(0x11b)]=_0x596979(0x14c),_0x498395[_0x596979(0x194)]=_0x2e88dd[_0x596979(0x194)],_0x498395['archiveHash']=_0x51d8c5[_0x596979(0x19a)],_0x498395['archive']=_0x2c8f24,_0x498395;}catch(_0x77a6d4){const _0x1046e6={};return _0x1046e6[_0x596979(0x11b)]=_0x596979(0x134),_0x1046e6['reason']=_0x77a6d4[_0x596979(0x10f)]||_0x596979(0x1a7),_0x1046e6;}finally{for(const _0xf3da81 of _0x112025[_0x596979(0x111)]())_0xf3da81();}}function validateRetiredCacheArtifact(_0x1f7944,_0x4dd034,_0x32d5b5,_0x4ceb37){const _0x33ed34=_0x107c6a;try{_0x1f7944=fs[_0x33ed34(0x15b)](_0x1f7944),safePath(_0x1f7944,_0x4dd034);const _0x2bab37=path[_0x33ed34(0x154)](_0x1f7944,_0x4dd034)[_0x33ed34(0x155)]('\x5c','/'),_0x5bd3d1=sha(_0x32d5b5),_0x1a5883=[_0x33ed34(0xfc),_0x33ed34(0x113)][_0x33ed34(0x1b7)](_0x529031=>read(_0x1f7944,path['join'](_0x1f7944,_0x33ed34(0x138),_0x529031)))[_0x33ed34(0x159)](Boolean);for(const _0x860a32 of _0x1a5883)for(const _0x2f38db of[..._0x860a32[_0x33ed34(0x10a)][_0x33ed34(0x168)]||[],..._0x860a32['value']['indexResult']?.[_0x33ed34(0xfb)]?[_0x860a32[_0x33ed34(0x10a)]['indexResult'][_0x33ed34(0xfb)]]:[]]){const _0x39bf96=validateIndexArchive(_0x1f7944,_0x2f38db,_0x4ceb37);if(_0x1a5883[_0x33ed34(0x144)](_0x29e5e1=>[_0x33ed34(0x16c),_0x33ed34(0x134)][_0x33ed34(0x160)](_0x29e5e1[_0x33ed34(0x10a)]['indexResult']?.['status'])&&_0x29e5e1['value'][_0x33ed34(0x12a)]['execution']?.[_0x33ed34(0x146)]===_0x39bf96[_0x33ed34(0x146)]))continue;const _0x2de4cb=_0x39bf96[_0x33ed34(0x10c)][_0x33ed34(0xf7)](_0x14698f=>_0x14698f['original']===_0x2bab37&&_0x14698f[_0x33ed34(0x176)]===_0x5bd3d1);if(!_0x2de4cb||!/^\.agents\/runtime\/backends\/(codegraph|code-review-graph)\/caches\/[a-f0-9]{24}\/(receipt|recovery)\.json$/[_0x33ed34(0x15e)](_0x2bab37))continue;if(!fs['readFileSync'](_0x4dd034)[_0x33ed34(0x14f)](Buffer[_0x33ed34(0x171)](_0x32d5b5))||!fs[_0x33ed34(0x122)](path[_0x33ed34(0x119)](_0x39bf96['archive'],_0x2de4cb[_0x33ed34(0x13e)]))[_0x33ed34(0x14f)](Buffer[_0x33ed34(0x171)](_0x32d5b5)))continue;return!![];}}catch{}return![];}const _0x9086f={};_0x9086f[_0x107c6a(0x117)]=inspectIndexInterruption,_0x9086f[_0x107c6a(0x170)]=reconcileIndexInterruption,_0x9086f[_0x107c6a(0x135)]=validateIndexArchive,_0x9086f[_0x107c6a(0x13f)]=validateRetiredCacheArtifact,module['exports']=_0x9086f;
|