apt-mcp-agent-setup 3.5.35 → 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.
Files changed (172) hide show
  1. package/README.md +1 -1
  2. package/bin/cli.js +1 -1
  3. package/build-input.json +220 -215
  4. package/bundle/NOTICES.md +0 -0
  5. package/bundle/core.enc +0 -0
  6. package/bundle/mcp-rules.enc +0 -0
  7. package/bundle/skills-aso.enc +0 -0
  8. package/bundle/skills-ba.enc +0 -0
  9. package/bundle/skills-base.enc +0 -0
  10. package/bundle/skills-be.enc +0 -0
  11. package/bundle/skills-design.enc +0 -0
  12. package/bundle/skills-fe.enc +0 -0
  13. package/bundle/skills-marketing.enc +0 -0
  14. package/bundle/skills-mobile.enc +0 -0
  15. package/bundle/skills-pm.enc +0 -0
  16. package/docs/technical-sources.md +7 -7
  17. package/integrity-manifest.json +172 -172
  18. package/package.json +1 -1
  19. package/release-check.js +30 -30
  20. package/src/backends/browser-tools.js +1 -1
  21. package/src/backends/index-cache-authority.js +1 -1
  22. package/src/backends/index-command.js +1 -1
  23. package/src/backends/index-contract.json +11 -11
  24. package/src/backends/index-maintenance.js +1 -1
  25. package/src/backends/index-store.js +1 -1
  26. package/src/backends/profiles.js +1 -1
  27. package/src/backends/review_graph.py +103 -103
  28. package/src/backends/source-discovery.js +1 -1
  29. package/src/core/admission-fence.js +1 -1
  30. package/src/core/aso-import.js +1 -1
  31. package/src/core/backend-lease-recovery.js +1 -1
  32. package/src/core/boot-evidence.js +1 -1
  33. package/src/core/caller-context.js +1 -1
  34. package/src/core/catalog.js +1 -1
  35. package/src/core/claude-caller-authority.js +1 -1
  36. package/src/core/claude-invocation.js +1 -1
  37. package/src/core/claude-launch-recovery.js +1 -1
  38. package/src/core/claude-native.js +1 -1
  39. package/src/core/claude-plan.js +1 -1
  40. package/src/core/claude-transcript-scan.js +1 -1
  41. package/src/core/claude-worker-transcript.js +1 -1
  42. package/src/core/codex-host-metadata.js +1 -1
  43. package/src/core/codex-transcript-receipt.js +1 -1
  44. package/src/core/connection-inspector.js +1 -1
  45. package/src/core/content-hash-cache.js +1 -1
  46. package/src/core/context-metrics.js +1 -1
  47. package/src/core/doctor.js +1 -1
  48. package/src/core/draining-completion.js +1 -1
  49. package/src/core/execution.js +1 -1
  50. package/src/core/git-context.js +1 -1
  51. package/src/core/hook-bridge.js +1 -1
  52. package/src/core/hook-diagnostics.js +1 -1
  53. package/src/core/hook-lease.js +1 -1
  54. package/src/core/host-adapters.js +1 -1
  55. package/src/core/interrupted-boot-transport-proof.js +1 -1
  56. package/src/core/interrupted-natural-closure-proof.js +1 -1
  57. package/src/core/interrupted-operation-audit.js +1 -1
  58. package/src/core/interrupted-transport-proof.js +1 -1
  59. package/src/core/ipc-envelope.js +1 -1
  60. package/src/core/legacy-retirement-proof.js +1 -1
  61. package/src/core/memory-scope.js +1 -1
  62. package/src/core/memory-store.js +1 -1
  63. package/src/core/model-inventory.js +1 -1
  64. package/src/core/model-routing.js +1 -1
  65. package/src/core/native-dispatch.js +1 -1
  66. package/src/core/native-receipt.js +1 -1
  67. package/src/core/native-retirement.js +1 -1
  68. package/src/core/node-version.js +1 -1
  69. package/src/core/npm-cli.js +1 -1
  70. package/src/core/owned-command-child.js +1 -1
  71. package/src/core/owned-command.js +1 -1
  72. package/src/core/owned-lock.js +1 -1
  73. package/src/core/owned-process.js +1 -1
  74. package/src/core/pipeline-journal.js +1 -1
  75. package/src/core/presentations.js +1 -1
  76. package/src/core/quality-artifacts.js +1 -1
  77. package/src/core/quality.js +1 -1
  78. package/src/core/read-command.js +1 -1
  79. package/src/core/readonly-skill.js +1 -1
  80. package/src/core/recovery-archive.js +1 -1
  81. package/src/core/recovery-proof.js +1 -1
  82. package/src/core/resource-transaction.js +1 -1
  83. package/src/core/run-checkpoint.js +1 -1
  84. package/src/core/run-compatibility.js +1 -1
  85. package/src/core/run-state-codec.js +1 -1
  86. package/src/core/runtime-authority.js +1 -1
  87. package/src/core/runtime-info.js +1 -1
  88. package/src/core/runtime-ownership.js +1 -1
  89. package/src/core/session.js +1 -1
  90. package/src/core/shared-checkout.js +1 -1
  91. package/src/core/skill-companions.js +1 -1
  92. package/src/core/skill-names.js +1 -1
  93. package/src/core/storage-retry.js +1 -1
  94. package/src/core/tool-contracts.js +1 -1
  95. package/src/core/transport-boot-contract.json +12 -12
  96. package/src/core/transport-close-contract.json +10 -10
  97. package/src/core/transport-contract.json +10 -10
  98. package/src/core/transport-pending-boot-contract.json +12 -12
  99. package/src/core/update-control.js +1 -1
  100. package/src/core/upgrade-runs.js +1 -1
  101. package/src/core/upgrade-stop.js +1 -1
  102. package/src/core/windows-job.js +1 -1
  103. package/src/core/workflow-policy.js +1 -1
  104. package/src/core/workspace-generation.js +1 -1
  105. package/src/core/workspace-path.js +1 -1
  106. package/src/installer/bounded-command.js +1 -1
  107. package/src/installer/candidate-preflight.js +1 -1
  108. package/src/installer/claude-commands.js +1 -1
  109. package/src/installer/connection-activation.js +1 -1
  110. package/src/installer/connection-supervisor.js +1 -1
  111. package/src/installer/deployment-draft.js +1 -1
  112. package/src/installer/gateway-context.js +1 -1
  113. package/src/installer/gateway-migration.js +1 -1
  114. package/src/installer/gateway-runtime.js +1 -1
  115. package/src/installer/global-setup.js +1 -1
  116. package/src/installer/hook-context-client.js +1 -1
  117. package/src/installer/hook-dispatcher.js +179 -179
  118. package/src/installer/host-hooks.js +1 -1
  119. package/src/installer/index-interruption-recovery.js +1 -1
  120. package/src/installer/index-recovery.js +1 -1
  121. package/src/installer/install-intent.js +1 -1
  122. package/src/installer/interrupted-operation-recovery.js +1 -1
  123. package/src/installer/legacy-prepared-plan.js +1 -1
  124. package/src/installer/legacy-registration.js +1 -1
  125. package/src/installer/managed-config.js +1 -1
  126. package/src/installer/migration-scope.js +1 -1
  127. package/src/installer/platform-config.js +1 -1
  128. package/src/installer/prerequisites.js +1 -1
  129. package/src/installer/presentations.js +1 -1
  130. package/src/installer/project-outcome.js +1 -1
  131. package/src/installer/project-setup.js +1 -1
  132. package/src/installer/recovery-backup-retention.js +1 -1
  133. package/src/installer/registration-closure.js +1 -1
  134. package/src/installer/registration-plan.js +1 -1
  135. package/src/installer/registration-receipt.js +1 -1
  136. package/src/installer/registrations.js +1 -1
  137. package/src/installer/runtime-activation.js +1 -1
  138. package/src/installer/runtime-child.js +1 -1
  139. package/src/installer/runtime-cleanup.js +1 -1
  140. package/src/installer/runtime-lock.js +1 -1
  141. package/src/installer/runtime-store.js +1 -1
  142. package/src/installer/runtime-supervisor.js +1 -1
  143. package/src/installer/setup-wizard.js +1 -1
  144. package/src/installer/stale-run-release.js +1 -1
  145. package/src/installer/update-addons.js +1 -1
  146. package/src/installer/update-cleanup.js +1 -1
  147. package/src/installer/update-executor.js +1 -1
  148. package/src/installer/update-history.js +1 -1
  149. package/src/installer/update-registration.js +1 -1
  150. package/src/installer/update-report.js +1 -1
  151. package/src/installer/update-request.js +1 -1
  152. package/src/installer/update-scope.js +1 -1
  153. package/src/installer/workspace-registry.js +1 -1
  154. package/src/installer/workspace-transaction.js +1 -1
  155. package/src/installer/workspace-update.js +1 -1
  156. package/src/license/crypto.js +1 -1
  157. package/src/license/fingerprint.js +1 -1
  158. package/src/license/terms.js +1 -1
  159. package/src/license/verify.js +1 -1
  160. package/src/presets/index.js +1 -1
  161. package/src/proxy/backends.js +1 -1
  162. package/src/proxy/browser-sessions.js +1 -1
  163. package/src/proxy/core-tools.js +1 -1
  164. package/src/proxy/pipeline.js +1 -1
  165. package/src/proxy/public-catalog.js +1 -1
  166. package/src/proxy/router.config.js +1 -1
  167. package/src/proxy/router.js +1 -1
  168. package/src/proxy/run-summary.js +1 -1
  169. package/src/proxy/server.js +1 -1
  170. package/src/proxy/workspace-gateway.js +1 -1
  171. package/src/templates/apt-runtime.md +3 -2
  172. package/src/templates/mcp-tools.md +3 -2
@@ -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 _0x549689=_0x1d92;function _0x1d92(_0x183f98,_0x18e765){_0x183f98=_0x183f98-0x1c4;const _0x9af01f=_0x9af0();let _0x1d9278=_0x9af01f[_0x183f98];if(_0x1d92['NGggCT']===undefined){var _0xd2b34e=function(_0x3a4215){const _0x4bd215='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x3b8922='',_0x52824d='';for(let _0x3a7910=0x0,_0x49ce76,_0x123b5c,_0x5adb6c=0x0;_0x123b5c=_0x3a4215['charAt'](_0x5adb6c++);~_0x123b5c&&(_0x49ce76=_0x3a7910%0x4?_0x49ce76*0x40+_0x123b5c:_0x123b5c,_0x3a7910++%0x4)?_0x3b8922+=String['fromCharCode'](0xff&_0x49ce76>>(-0x2*_0x3a7910&0x6)):0x0){_0x123b5c=_0x4bd215['indexOf'](_0x123b5c);}for(let _0x5d820f=0x0,_0x148bb8=_0x3b8922['length'];_0x5d820f<_0x148bb8;_0x5d820f++){_0x52824d+='%'+('00'+_0x3b8922['charCodeAt'](_0x5d820f)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x52824d);};_0x1d92['wdUEGB']=_0xd2b34e,_0x1d92['feVtCd']={},_0x1d92['NGggCT']=!![];}const _0x4d0a2b=_0x9af01f[0x0],_0x5e858a=_0x183f98+_0x4d0a2b,_0x26d91d=_0x1d92['feVtCd'][_0x5e858a];return!_0x26d91d?(_0x1d9278=_0x1d92['wdUEGB'](_0x1d9278),_0x1d92['feVtCd'][_0x5e858a]=_0x1d9278):_0x1d9278=_0x26d91d,_0x1d9278;}function _0x9af0(){const _0x2dabc1=['lI9OB29RlwrPC3bHDgnOzxi','qvbux0Hpt0TFqLjjreDf','BM9KzsaTzsa','BgL2zvzLCMLMAwvK','lI9Tyw5Hz2vKlwnVBMzPzW','mJyYodHOtgn0uhu','CMvZB2X2zq','Aw5JBhvKzxm','CgfYC2u','C29Tzq','CMvSyxrPDMu','D2LUzhn1CMy','lMfNzw50CY9JB3jLl2HVB2STzgLZCgf0y2HLCI5QCW','zMLSDgvY','mJm5mZu4mejbAvHQDG','DxrMoa','Cgf0Aa','CMvJDxjZAxzL','C3rHCNrZv2L0Aa','Ag9ZDa','zgLYBMfTzq','lMfNzw50CY9JB3jLl2HVB2STyNjPzgDLlMPZ','DNnJB2rL','ChvIBgLJs2v5','BwvZC2fNzq','CMvHzezPBgvtEw5J','y2XHDwrLlwrLC2T0B3a','BwTKAxjtEw5J','ChvZAa','A2v5CW','y29KzxG','y29TBwfUza','y2XHDwrL','AxnbCNjHEq','C3rYAw5N','CMvWBgfJzq','oYbVCMLNAw5HBcbMAwXLihDHCYbWCMvZzxj2zwq6ia','zxHPC3rZu3LUyW','nZq2nZiXDLrIB2Pd','mJaZntaZmMnvD3Dxzq','ywr2AxnVCNK','yw50AwDYyxzPDhK','y3vYC29Y','C3rYAw5NAwz5','sw52ywXPzcbJB25MAwCGyxqG','mJi3otC3mgvIrxPhtq','BM9KzsaTzsaI','nfLcu0zfAq','mZC1ndy1nuvmuMTtzG','AM9PBG','zMLSzvn5C3rLBq','CNvUDgLTzvjVB3q','ndK3n1rSsKr2wa','zxHWB3j0CW','ChjVDg9JB2Xuzxn0zwq','yxnZAwDU','mtm5odKWENf0AfLY','y2XHDwrLlwnVzgu','su5wquXjrf9dt05gsuC','Aw5ZDgfSBgvKlxvUB2jZzxj2zwq','zw50CMLLCW','lI4Vy29Yzs9OB3n0lwfKyxb0zxjZ','y29UzMLN'];_0x9af0=function(){return _0x2dabc1;};return _0x9af0();}(function(_0x1c7f84,_0x1fc6c2){const _0x1172d9=_0x1d92,_0x4272e9=_0x1c7f84();while(!![]){try{const _0xe4837e=-parseInt(_0x1172d9(0x1cd))/0x1+-parseInt(_0x1172d9(0x1d4))/0x2+-parseInt(_0x1172d9(0x1df))/0x3*(parseInt(_0x1172d9(0x1d6))/0x4)+parseInt(_0x1172d9(0x1d7))/0x5+-parseInt(_0x1172d9(0x1ce))/0x6+parseInt(_0x1172d9(0x1f4))/0x7+-parseInt(_0x1172d9(0x1eb))/0x8*(-parseInt(_0x1172d9(0x1db))/0x9);if(_0xe4837e===_0x1fc6c2)break;else _0x4272e9['push'](_0x4272e9['shift']());}catch(_0x5351cd){_0x4272e9['push'](_0x4272e9['shift']());}}}(_0x9af0,0x9bab5));const fs=require('fs'),path=require(_0x549689(0x1f6)),{buildHookConfig}=require(_0x549689(0x1e4)),{readJsonWithBackup,parseJson}=require(_0x549689(0x1ea));function mergeHooks(_0x5d820f,_0x148bb8){const _0x3d70e6=_0x549689;if(Array[_0x3d70e6(0x1c8)](_0x148bb8)){const _0x402f64=(Array['isArray'](_0x5d820f)?_0x5d820f:[])[_0x3d70e6(0x1f3)](_0x355c28=>!JSON[_0x3d70e6(0x1d2)](_0x355c28)['includes'](_0x3d70e6(0x1e7)));return[..._0x402f64,..._0x148bb8];}if(_0x148bb8&&typeof _0x148bb8==='object'){const _0x3a1df8={..._0x5d820f&&typeof _0x5d820f==='object'?_0x5d820f:{}},_0x222597=_0x3a1df8;for(const [_0x46f8a0,_0x146fdc]of Object[_0x3d70e6(0x1e3)](_0x148bb8)){const _0x3491bd=Array[_0x3d70e6(0x1c8)](_0x146fdc)&&!JSON['stringify'](_0x222597[_0x46f8a0]??'')[_0x3d70e6(0x1ed)](_0x3d70e6(0x1e7))&&Object[_0x3d70e6(0x1e3)](_0x222597)[_0x3d70e6(0x1ef)](([_0x1a56c3,_0x2d34d7])=>_0x1a56c3[_0x3d70e6(0x1f8)](_0x46f8a0+'_')&&JSON['stringify'](_0x2d34d7)[_0x3d70e6(0x1ed)](_0x3d70e6(0x1e7)));if(!_0x3491bd)_0x222597[_0x46f8a0]=mergeHooks(_0x222597[_0x46f8a0],_0x146fdc);}return _0x222597;}return _0x148bb8;}function installHostHooks(_0x154ddb,_0x33eeec=null,_0x21577f={}){const _0x3342ba=_0x549689,_0x271e18=_0x21577f[_0x3342ba(0x1d9)]||fs,_0x214c02={};_0x214c02['codex']=_0x3342ba(0x1c5),_0x214c02[_0x3342ba(0x1c7)]=_0x3342ba(0x1e0),_0x214c02[_0x3342ba(0x1d1)]=_0x3342ba(0x1d1),_0x214c02[_0x3342ba(0x1d0)]=_0x3342ba(0x1d0),_0x214c02[_0x3342ba(0x1fc)]='vscode-copilot',_0x214c02[_0x3342ba(0x1f1)]=_0x3342ba(0x1f1),_0x214c02[_0x3342ba(0x200)]=_0x3342ba(0x200);const _0xfac44e=_0x214c02;let _0x16505f=path[_0x3342ba(0x1d8)](_0x154ddb,_0x3342ba(0x1fb));if(!_0x271e18[_0x3342ba(0x1cc)](_0x16505f))return[];if(_0x21577f[_0x3342ba(0x1da)]&&_0x21577f[_0x3342ba(0x1fd)]){_0x16505f=path[_0x3342ba(0x1d8)](_0x154ddb,_0x3342ba(0x1f2));const _0x405916=require(_0x3342ba(0x1e6))['renderDispatcher'](_0x21577f[_0x3342ba(0x1da)],_0x21577f[_0x3342ba(0x1fd)]);if(!_0x271e18[_0x3342ba(0x1cc)](_0x16505f)||_0x271e18[_0x3342ba(0x1ff)](_0x16505f,_0x3342ba(0x1f5))!==_0x405916)_0x271e18['writeFileSync'](_0x16505f,_0x405916);}const _0xfba090=[];for(const _0x33c24e of _0x33eeec||Object[_0x3342ba(0x1c4)](_0xfac44e)[_0x3342ba(0x1f3)](_0x18de75=>_0x18de75!==_0x3342ba(0x200))){const _0x1221df=buildHookConfig(_0xfac44e[_0x33c24e]||_0x33c24e,_0x16505f,_0x154ddb);if(!_0x1221df?.[_0x3342ba(0x1f6)]||!_0x1221df[_0x3342ba(0x1e5)]||_0x1221df[_0x3342ba(0x1cf)])continue;const _0x5c14a2=path[_0x3342ba(0x1ec)](_0x154ddb,_0x1221df['path']);if(path[_0x3342ba(0x1f0)](_0x154ddb,_0x5c14a2)['startsWith']('..'))throw new Error('Hook\x20config\x20path\x20escapes\x20project');const _0x19a009=JSON[_0x3342ba(0x1ee)](JSON['stringify'](_0x1221df[_0x3342ba(0x1e5)]),(_0x3ba5f6,_0x35ca34)=>{const _0x16df15=_0x3342ba;if(_0x3ba5f6===_0x16df15(0x1c6)&&typeof _0x35ca34===_0x16df15(0x1c9)&&_0x35ca34[_0x16df15(0x1f8)](_0x16df15(0x1e8))&&!_0x35ca34[_0x16df15(0x1ed)]('APT_HOOK_BRIDGE'))return _0x35ca34[_0x16df15(0x1ca)](_0x16df15(0x1d5),'node\x20-e\x20\x22/*APT_HOOK_BRIDGE*/');return _0x35ca34;});let _0x45a436;if(!_0x21577f[_0x3342ba(0x1d9)])_0x45a436=readJsonWithBackup(_0x5c14a2);else{if(!_0x271e18[_0x3342ba(0x1cc)](_0x5c14a2))_0x45a436={};else try{_0x45a436=parseJson(_0x271e18[_0x3342ba(0x1ff)](_0x5c14a2,_0x3342ba(0x1f5)));}catch(_0x13e65a){const _0x56a1b6={};_0x56a1b6['code']=_0x3342ba(0x1e1);throw Object[_0x3342ba(0x1de)](new Error(_0x3342ba(0x1d3)+_0x5c14a2+_0x3342ba(0x1cb)+_0x13e65a[_0x3342ba(0x1fe)]),_0x56a1b6);}}const _0x4ec93b=mergeHooks(_0x45a436,_0x19a009),_0x4a024f={};_0x4a024f[_0x3342ba(0x1f7)]=!![],_0x271e18[_0x3342ba(0x201)](path[_0x3342ba(0x1fa)](_0x5c14a2),_0x4a024f),_0x271e18['writeFileSync'](_0x5c14a2,JSON[_0x3342ba(0x1d2)](_0x4ec93b,null,0x2)+'\x0a');const _0x49691f={};_0x49691f[_0x3342ba(0x1f9)]=_0x33c24e,_0x49691f[_0x3342ba(0x1f6)]=_0x1221df['path'],_0x49691f[_0x3342ba(0x1dd)]=![],_0x49691f[_0x3342ba(0x1e9)]=![],_0x49691f['status']=_0x3342ba(0x1e2),_0xfba090[_0x3342ba(0x202)](_0x49691f);}return _0xfba090;}const _0x5adb6c={};_0x5adb6c['installHostHooks']=installHostHooks,_0x5adb6c['mergeHooks']=mergeHooks,module[_0x549689(0x1dc)]=_0x5adb6c;
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 _0x44ffa6=_0x4c29;(function(_0x30fa48,_0x2e4777){const _0x53db9e=_0x4c29,_0x28d532=_0x30fa48();while(!![]){try{const _0x2749a9=parseInt(_0x53db9e(0x187))/0x1*(parseInt(_0x53db9e(0x13f))/0x2)+-parseInt(_0x53db9e(0x1da))/0x3*(-parseInt(_0x53db9e(0x1a7))/0x4)+-parseInt(_0x53db9e(0x193))/0x5+-parseInt(_0x53db9e(0x165))/0x6+-parseInt(_0x53db9e(0x1a0))/0x7*(parseInt(_0x53db9e(0x1ca))/0x8)+-parseInt(_0x53db9e(0x172))/0x9*(-parseInt(_0x53db9e(0x16f))/0xa)+parseInt(_0x53db9e(0x1dd))/0xb;if(_0x2749a9===_0x2e4777)break;else _0x28d532['push'](_0x28d532['shift']());}catch(_0x24c414){_0x28d532['push'](_0x28d532['shift']());}}}(_0x5836,0x1ad9d));function _0x4c29(_0x1ad70c,_0x5a57b6){_0x1ad70c=_0x1ad70c-0x13e;const _0x5836ab=_0x5836();let _0x4c2906=_0x5836ab[_0x1ad70c];if(_0x4c29['gYjrju']===undefined){var _0x37837c=function(_0x42b3bf){const _0x3c4969='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x55c4a1='',_0x4fad0e='';for(let _0x3b5081=0x0,_0x97624d,_0x1db4ca,_0x58f970=0x0;_0x1db4ca=_0x42b3bf['charAt'](_0x58f970++);~_0x1db4ca&&(_0x97624d=_0x3b5081%0x4?_0x97624d*0x40+_0x1db4ca:_0x1db4ca,_0x3b5081++%0x4)?_0x55c4a1+=String['fromCharCode'](0xff&_0x97624d>>(-0x2*_0x3b5081&0x6)):0x0){_0x1db4ca=_0x3c4969['indexOf'](_0x1db4ca);}for(let _0x3a3ed0=0x0,_0x368099=_0x55c4a1['length'];_0x3a3ed0<_0x368099;_0x3a3ed0++){_0x4fad0e+='%'+('00'+_0x55c4a1['charCodeAt'](_0x3a3ed0)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x4fad0e);};_0x4c29['xievBj']=_0x37837c,_0x4c29['WieGmL']={},_0x4c29['gYjrju']=!![];}const _0x3983e4=_0x5836ab[0x0],_0x28660e=_0x1ad70c+_0x3983e4,_0x11c70=_0x4c29['WieGmL'][_0x28660e];return!_0x11c70?(_0x4c2906=_0x4c29['xievBj'](_0x4c2906),_0x4c29['WieGmL'][_0x28660e]=_0x4c2906):_0x4c2906=_0x11c70,_0x4c2906;}const fs=require(_0x44ffa6(0x1cf)),path=require(_0x44ffa6(0x144)),crypto=require('node:crypto'),{preserveArchiveBytes}=require(_0x44ffa6(0x1e3)),{sameWorkspace}=require(_0x44ffa6(0x1ab)),{verifyIndexProducer,sha}=require(_0x44ffa6(0x1b5)),{safePath,validateManagedIndexCache}=require(_0x44ffa6(0x15f)),fail=_0x508fef=>{const _0x19be4a=_0x44ffa6;throw Object[_0x19be4a(0x1fd)](Error(_0x508fef),{'code':_0x508fef});},read=(_0x49151a,_0x340d40)=>{const _0x51bf5a=_0x44ffa6;safePath(_0x49151a,_0x340d40);try{const _0x11c0a5=fs[_0x51bf5a(0x155)](_0x340d40);return{'file':_0x340d40,'bytes':_0x11c0a5,'sha256':sha(_0x11c0a5),'value':JSON[_0x51bf5a(0x1e0)](_0x11c0a5)};}catch(_0x260f0f){if(_0x260f0f['code']===_0x51bf5a(0x1a8))return null;throw _0x260f0f;}};function classifyInterruption({workspace:_0x4a77e4,execution:_0x2c3f9c,boot:_0x394e4a,processIdentity:_0x1fc097,producer:_0x339f46,lifecycle:_0x3221f5}){const _0xc46374=_0x44ffa6,_0x596ed8=require(_0xc46374(0x166)),_0x190536={};_0x190536[_0xc46374(0x198)]=_0x2c3f9c,_0x190536['boot']=_0x394e4a,_0x190536['processIdentity']=_0x1fc097;const _0xa1b5d=_0x596ed8[_0xc46374(0x141)](_0x190536);if(_0xa1b5d['status']==='recoverable-interruption'){if(_0x339f46[_0xc46374(0x1fa)][_0xc46374(0x1d8)]===0x3&&!_0x596ed8[_0xc46374(0x1e2)](_0x2c3f9c,_0x394e4a))fail(_0xc46374(0x142));return _0xa1b5d;}if(_0xa1b5d[_0xc46374(0x199)]!==_0xc46374(0x1f6)||_0xa1b5d[_0xc46374(0x1fb)]!==_0xc46374(0x1b1))return _0xa1b5d;const _0x4593b7={};_0x4593b7[_0xc46374(0x199)]='unknown',_0x4593b7[_0xc46374(0x1fb)]=_0xc46374(0x1f4),_0x4593b7['diagnostic']=_0xa1b5d[_0xc46374(0x1fb)];const _0x803f34=_0x4593b7;if(_0x339f46['contract'][_0xc46374(0x18b)]!==0x1||_0x3221f5?.[_0xc46374(0x199)]!=='stopped')return _0x803f34;const _0x2a3b34=_0x3221f5[_0xc46374(0x19d)],_0x15e312=_0x2c3f9c['containmentEvidence'];if(_0x3221f5[_0xc46374(0x1de)]!==0x1||!_0x3221f5[_0xc46374(0x1a3)]||!sameWorkspace(_0x3221f5[_0xc46374(0x1a3)],_0x4a77e4)||_0x3221f5['target']?.[_0xc46374(0x1de)]!==_0x339f46['version']||_0x3221f5[_0xc46374(0x18c)]?.[_0xc46374(0x157)]!==_0x339f46[_0xc46374(0x157)]||JSON['stringify'](_0x3221f5[_0xc46374(0x198)])!==JSON[_0xc46374(0x146)](_0x2c3f9c)||_0x2c3f9c[_0xc46374(0x17a)]!==_0xc46374(0x1c6)||_0x15e312?.[_0xc46374(0x15d)]!==_0xc46374(0x1c6)||_0x15e312[_0xc46374(0x14f)]!==!![]||_0x15e312['launcherPid']!==_0x2c3f9c[_0xc46374(0x1ed)]||_0x15e312[_0xc46374(0x17b)]!==_0x2c3f9c[_0xc46374(0x17b)]||_0x2a3b34?.[_0xc46374(0x15d)]!=='windows-job-object'||!_0x2a3b34[_0xc46374(0x1a3)]||!sameWorkspace(_0x2a3b34[_0xc46374(0x1a3)],_0x4a77e4)||_0x2a3b34['containment']!=='job-tree'||_0x2a3b34['treeConfirmed']!==!![]||_0x2a3b34[_0xc46374(0x161)]!==_0x2c3f9c[_0xc46374(0x1ed)]||_0x2a3b34[_0xc46374(0x16e)]!==_0x2c3f9c['launcherProcessStart']||!['graceful','force']['includes'](_0x2a3b34['method'])||typeof _0x2a3b34[_0xc46374(0x153)]!==_0xc46374(0x17d)||!_0x2a3b34[_0xc46374(0x153)][_0xc46374(0x15b)]()||_0x2a3b34['job']?.['assignmentConfirmed']!==!![]||_0x2a3b34[_0xc46374(0x1bf)][_0xc46374(0x1a6)]!==0x0||_0x2a3b34[_0xc46374(0x1bf)][_0xc46374(0x192)]!==!![]||!Number[_0xc46374(0x173)](_0x2a3b34[_0xc46374(0x1bf)]['brokerPid'])||_0x2a3b34['job']['brokerPid']<=0x0||_0x2a3b34[_0xc46374(0x1bf)][_0xc46374(0x148)]>0xffffffff||[_0x2c3f9c['coordinatorPid'],_0x2c3f9c[_0xc46374(0x1ed)]][_0xc46374(0x17e)](_0x2a3b34[_0xc46374(0x1bf)][_0xc46374(0x148)])||!_0x596ed8[_0xc46374(0x1ba)](_0x2c3f9c,_0x394e4a))return _0x803f34;const _0x292369=typeof _0x2a3b34[_0xc46374(0x154)]==='string'?Date[_0xc46374(0x1e0)](_0x2a3b34[_0xc46374(0x154)]):NaN;if(!Number[_0xc46374(0x173)](_0x292369)||new Date(_0x292369)[_0xc46374(0x188)]()!==_0x2a3b34[_0xc46374(0x154)])return _0x803f34;const _0x575036=BigInt(_0x292369)*0x2710n+0x19db1ded53e8000n;if([_0x2c3f9c[_0xc46374(0x196)],_0x2c3f9c['launcherProcessStart'],_0x2c3f9c[_0xc46374(0x1ea)][_0xc46374(0x18e)]][_0xc46374(0x149)](_0x346bcf=>_0x575036+0x270fn<BigInt(_0x346bcf))||_0x575036>BigInt(_0x394e4a[_0xc46374(0x18e)]))return _0x803f34;const _0x5e6902={};return _0x5e6902[_0xc46374(0x199)]=_0xc46374(0x177),_0x5e6902[_0xc46374(0x1fb)]=_0xc46374(0x185),_0x5e6902;}function validateIndexArchive(_0x26ee4e,_0x19a871,_0x3c5d9a=require(_0x44ffa6(0x1cc))[_0x44ffa6(0x1e6)]){const _0x2a39e2=_0x44ffa6;if(!_0x19a871||!/^[a-f0-9-]{36}$/[_0x2a39e2(0x182)](_0x19a871[_0x2a39e2(0x1bc)]||'')||!/^[a-f0-9]{64}$/[_0x2a39e2(0x182)](_0x19a871[_0x2a39e2(0x1ac)]||''))fail(_0x2a39e2(0x14d));const _0xc5abdb=safePath(_0x26ee4e,path[_0x2a39e2(0x14a)](_0x26ee4e,_0x2a39e2(0x195),_0x2a39e2(0x1fc)+_0x19a871['recoveryId'])),_0xe493a7=read(_0x26ee4e,path[_0x2a39e2(0x14a)](_0xc5abdb,_0x2a39e2(0x1f0)));if(!_0xe493a7||_0xe493a7['sha256']!==_0x19a871[_0x2a39e2(0x1ac)]||_0xe493a7[_0x2a39e2(0x16b)][_0x2a39e2(0x1bc)]!==_0x19a871[_0x2a39e2(0x1bc)]||!sameWorkspace(_0xe493a7[_0x2a39e2(0x16b)][_0x2a39e2(0x1a3)],_0x26ee4e)||!Array[_0x2a39e2(0x145)](_0xe493a7[_0x2a39e2(0x16b)][_0x2a39e2(0x15e)]))fail(_0x2a39e2(0x14d));for(const _0x1d9d0a of _0xe493a7[_0x2a39e2(0x16b)]['files']){const _0x96a046=safePath(_0x26ee4e,path[_0x2a39e2(0x1c3)](_0xc5abdb,_0x1d9d0a[_0x2a39e2(0x1c9)]));if(!_0x96a046[_0x2a39e2(0x160)](_0xc5abdb+path['sep'])||!/^[a-f0-9]{64}$/['test'](_0x1d9d0a[_0x2a39e2(0x147)]||'')||sha(fs[_0x2a39e2(0x155)](_0x96a046))!==_0x1d9d0a[_0x2a39e2(0x147)])fail(_0x2a39e2(0x14d));}const _0x795102=_0xe493a7[_0x2a39e2(0x16b)];if(_0x795102[_0x2a39e2(0x1de)]!==0x1||_0x795102[_0x2a39e2(0x15e)][_0x2a39e2(0x149)]((_0x54bb6b,_0x168b84)=>!_0x54bb6b[_0x2a39e2(0x152)]||_0x795102[_0x2a39e2(0x15e)][_0x2a39e2(0x181)](_0x28a406=>_0x28a406['original']===_0x54bb6b['original']||_0x28a406[_0x2a39e2(0x1c9)]===_0x54bb6b[_0x2a39e2(0x1c9)])!==_0x168b84))fail('INDEX_RECOVERY_CHANGED');if(!_0x795102[_0x2a39e2(0x19c)]||['codegraph',_0x2a39e2(0x17c)][_0x2a39e2(0x149)](_0x4e2f61=>!/^[a-f0-9-]{36}$/[_0x2a39e2(0x182)](_0x795102[_0x2a39e2(0x19c)][_0x4e2f61]||'')))fail(_0x2a39e2(0x14d));const _0x8f7b95=_0x912863=>{const _0x157c20=_0x2a39e2,_0x54a7f1=_0x795102['files'][_0x157c20(0x1f2)](_0x538a74=>_0x538a74[_0x157c20(0x1c9)]===_0x912863);if(!_0x54a7f1)fail(_0x157c20(0x14d));return JSON[_0x157c20(0x1e0)](fs[_0x157c20(0x155)](path['join'](_0xc5abdb,_0x912863)));},_0x1af85c=_0x795102[_0x2a39e2(0x15e)][_0x2a39e2(0x1f2)](_0xe93cdd=>['index-maintenance.json',_0x2a39e2(0x1aa)][_0x2a39e2(0x17e)](_0xe93cdd[_0x2a39e2(0x1c9)]));if(!_0x1af85c||_0x1af85c['sha256']!==_0x795102[_0x2a39e2(0x19a)])fail(_0x2a39e2(0x14d));const _0xe9a0fc=_0x8f7b95(_0x1af85c[_0x2a39e2(0x1c9)]),_0x560424=_0x8f7b95('generation.json'),_0x149600=_0x8f7b95(_0x2a39e2(0x1e8)),_0x4c2a9b=_0xe9a0fc[_0x2a39e2(0x17f)]?.[_0x2a39e2(0x198)],_0x55403f=verifyIndexProducer(_0x795102[_0x2a39e2(0x175)]?.['release'],_0x3c5d9a);if(!_0x4c2a9b||_0x4c2a9b['attemptId']!==_0x795102[_0x2a39e2(0x194)]||!sameWorkspace(_0xe9a0fc[_0x2a39e2(0x1a3)],_0x26ee4e)||!sameWorkspace(_0x560424['workspace'],_0x26ee4e)||_0x55403f['version']!==_0x560424[_0x2a39e2(0x1de)]||_0x55403f['digest']!==_0x560424[_0x2a39e2(0x157)]||_0xe9a0fc[_0x2a39e2(0x18c)]?.['version']!==_0x55403f[_0x2a39e2(0x1de)]||_0xe9a0fc[_0x2a39e2(0x18c)]?.['digest']!==_0x55403f['digest']||['generation',_0x2a39e2(0x1a2),'catalogHash','transactionId'][_0x2a39e2(0x149)](_0x20f477=>(_0xe9a0fc[_0x20f477]??null)!==(_0x560424[_0x20f477]??null)||(_0x4c2a9b[_0x20f477]??null)!==(_0x560424[_0x20f477]??null))||_0x149600[_0x2a39e2(0x164)]!==_0x2a39e2(0x1ec)||_0x149600[_0x2a39e2(0x1e1)]!==_0x4c2a9b[_0x2a39e2(0x167)]||_0x795102['files']['find'](_0x5e30ba=>_0x5e30ba[_0x2a39e2(0x1c9)]===_0x2a39e2(0x1e4))?.[_0x2a39e2(0x147)]!==_0x795102[_0x2a39e2(0x14e)]||_0x795102[_0x2a39e2(0x15e)][_0x2a39e2(0x1f2)](_0x1b42b3=>_0x1b42b3[_0x2a39e2(0x1c9)]===_0x2a39e2(0x1e8))?.['sha256']!==_0x795102['fenceHash']||_0x795102[_0x2a39e2(0x174)]!==_0x2a39e2(0x1f6)||!Number[_0x2a39e2(0x173)](_0x560424[_0x2a39e2(0x1d2)])||_0x560424[_0x2a39e2(0x1d2)]<0x1||!/^[a-f0-9]{64}$/[_0x2a39e2(0x182)](_0x560424['catalogHash']||'')||_0x149600[_0x2a39e2(0x1d2)]!=null&&_0x149600[_0x2a39e2(0x1d2)]!==_0x560424[_0x2a39e2(0x1d2)]||_0x4c2a9b[_0x2a39e2(0x17a)]&&_0x4c2a9b['containment']!==_0x55403f[_0x2a39e2(0x1fa)][_0x2a39e2(0x17a)]||_0x4c2a9b['producer']&&(_0x4c2a9b['producer'][_0x2a39e2(0x157)]!==_0x55403f['digest']||_0x4c2a9b[_0x2a39e2(0x175)][_0x2a39e2(0x1de)]!==_0x55403f[_0x2a39e2(0x1de)]))fail(_0x2a39e2(0x14d));const _0x88a849=_0xd3ee86=>_0x795102[_0x2a39e2(0x15e)][_0x2a39e2(0x1f2)](_0x199642=>_0x199642[_0x2a39e2(0x152)]===path[_0x2a39e2(0x1ee)](_0x26ee4e,_0xd3ee86)['replaceAll']('\x5c','/')),_0x437de7=_0x88a849(path['join'](_0x26ee4e,_0x2a39e2(0x1a4)));if(!_0x437de7||_0x437de7[_0x2a39e2(0x147)]!==_0x560424['resourceDigest'])fail('INDEX_RECOVERY_CHANGED');const _0x496421=require(_0x2a39e2(0x15f)),_0x583725=new Set([_0x2a39e2(0x1b9)+_0x1af85c[_0x2a39e2(0x1c9)],_0x2a39e2(0x1b6),'.agents/runtime/admission.json','.agents/manifest.json',...[_0x2a39e2(0x162),_0x2a39e2(0x191),_0x2a39e2(0x1db)][_0x2a39e2(0x14b)](_0xa3d510=>_0x2a39e2(0x1b9)+_0xa3d510)]);for(const _0x47fdcd of[_0x2a39e2(0x180),_0x2a39e2(0x17c)]){const _0x2d9712={..._0x55403f[_0x2a39e2(0x1fa)][_0x2a39e2(0x1b7)][_0x47fdcd]};_0x2d9712['cacheContract']=_0x55403f[_0x2a39e2(0x1fa)][_0x2a39e2(0x1d8)];const _0x459ec4=_0x2d9712,_0x1cff24=_0x4c2a9b[_0x2a39e2(0x1bd)]?.[_0x2a39e2(0x1f2)](_0x35dad4=>_0x35dad4[_0x2a39e2(0x1d6)]===_0x47fdcd)?.[_0x2a39e2(0x178)];if(!_0x1cff24&&_0x459ec4[_0x2a39e2(0x1d8)]===0x3)fail(_0x2a39e2(0x14d));const _0x1a2a1c={};_0x1a2a1c['workspace']=_0x26ee4e,_0x1a2a1c[_0x2a39e2(0x1d6)]=_0x47fdcd,_0x1a2a1c[_0x2a39e2(0x1b3)]=_0x459ec4,_0x1a2a1c[_0x2a39e2(0x1af)]=_0x1cff24?.[_0x2a39e2(0x1af)],_0x1a2a1c[_0x2a39e2(0x170)]=!![];const _0x722c29=_0x496421['resolveManagedIndexCache'](_0x1a2a1c);if(_0x1cff24&&JSON[_0x2a39e2(0x146)](_0x1cff24)!==JSON[_0x2a39e2(0x146)](_0x722c29[_0x2a39e2(0x178)]))fail('INDEX_RECOVERY_CHANGED');for(const _0x1f7e25 of[path[_0x2a39e2(0x14a)](_0x722c29['stateDirectory'],_0x2a39e2(0x19b)),path['join'](_0x722c29['cacheDirectory'],_0x2a39e2(0x1a5))]){const _0x3443e7=_0x88a849(_0x1f7e25);if(!_0x3443e7||_0x3443e7[_0x2a39e2(0x147)]!==sha(JSON['stringify'](_0x722c29[_0x2a39e2(0x178)])))fail(_0x2a39e2(0x14d));}for(const _0x3e8a8b of[...[_0x2a39e2(0x19b),_0x2a39e2(0x1f1),_0x2a39e2(0x1f8),_0x2a39e2(0x1e9),_0x2a39e2(0x18a)][_0x2a39e2(0x14b)](_0x41a2fb=>path[_0x2a39e2(0x14a)](_0x722c29['stateDirectory'],_0x41a2fb)),path[_0x2a39e2(0x14a)](_0x722c29[_0x2a39e2(0x156)],'.apt-managed.json'),..._0x722c29['selectorFile']?[_0x722c29[_0x2a39e2(0x1c8)]]:[]])_0x583725[_0x2a39e2(0x1b0)](path['relative'](_0x26ee4e,_0x3e8a8b)['replaceAll']('\x5c','/'));const _0x5aa558=_0x722c29[_0x2a39e2(0x1c8)]&&_0x88a849(_0x722c29[_0x2a39e2(0x1c8)]);if(_0x5aa558){const _0x1810db=_0x8f7b95(_0x5aa558[_0x2a39e2(0x1c9)]);if(_0x1810db[_0x2a39e2(0x1de)]!==0x1||_0x1810db[_0x2a39e2(0x1a1)]!==_0x722c29['contractId']||_0x1810db[_0x2a39e2(0x1b8)]!==_0x722c29[_0x2a39e2(0x178)][_0x2a39e2(0x1af)]&&_0x1810db['pending']?.[_0x2a39e2(0x1af)]!==_0x722c29['marker'][_0x2a39e2(0x1af)]||_0x1810db['active']===_0x722c29[_0x2a39e2(0x178)][_0x2a39e2(0x1af)]&&_0x1810db['active']!==_0x2a39e2(0x14c)&&_0x88a849(path[_0x2a39e2(0x14a)](_0x722c29[_0x2a39e2(0x1f5)],_0x2a39e2(0x18a)))?.[_0x2a39e2(0x147)]!==_0x1810db[_0x2a39e2(0x186)])fail(_0x2a39e2(0x14d));}else{if(_0x459ec4[_0x2a39e2(0x1d8)]===0x3&&_0x722c29[_0x2a39e2(0x178)][_0x2a39e2(0x1af)]!==_0x2a39e2(0x14c))fail(_0x2a39e2(0x14d));}}let _0x47cb4f;if(_0x55403f[_0x2a39e2(0x1fa)]['cacheContract']===0x3){const _0x2fe9ec=_0x88a849(path[_0x2a39e2(0x14a)](_0x26ee4e,_0x2a39e2(0x19e),_0x4c2a9b[_0x2a39e2(0x194)]+_0x2a39e2(0x151)));if(!_0x2fe9ec)fail(_0x2a39e2(0x14d));_0x47cb4f=_0x8f7b95(_0x2fe9ec[_0x2a39e2(0x1c9)]);if(JSON['stringify'](_0x47cb4f[_0x2a39e2(0x198)])!==JSON[_0x2a39e2(0x146)](_0x4c2a9b)||!['reserved',_0x2a39e2(0x192)][_0x2a39e2(0x17e)](_0x47cb4f[_0x2a39e2(0x199)])||!sameWorkspace(_0x47cb4f[_0x2a39e2(0x1a3)],_0x26ee4e)||_0x47cb4f[_0x2a39e2(0x18c)]?.[_0x2a39e2(0x1de)]!==_0x55403f[_0x2a39e2(0x1de)]||_0x47cb4f[_0x2a39e2(0x18c)]?.[_0x2a39e2(0x157)]!==_0x55403f['digest'])fail(_0x2a39e2(0x14d));_0x583725[_0x2a39e2(0x1b0)](_0x2fe9ec[_0x2a39e2(0x152)]);}const _0x535938=classifyInterruption({'workspace':_0x26ee4e,'execution':_0x4c2a9b,'boot':_0x795102[_0x2a39e2(0x1ea)],'producer':_0x55403f,'lifecycle':_0x47cb4f,'processIdentity':_0x18b6db=>Object['hasOwn'](_0x795102['processes']||{},_0x18b6db)?_0x795102['processes'][_0x18b6db]:undefined});if(_0x535938[_0x2a39e2(0x199)]!==_0x2a39e2(0x177)||_0x535938[_0x2a39e2(0x1fb)]!==_0x795102[_0x2a39e2(0x1fb)])fail(_0x2a39e2(0x14d));if(_0x795102[_0x2a39e2(0x15e)]['some'](_0x961f70=>!_0x583725['has'](_0x961f70[_0x2a39e2(0x152)])))fail('INDEX_RECOVERY_CHANGED');const _0x460578={..._0xe493a7[_0x2a39e2(0x16b)]};return _0x460578['archive']=_0xc5abdb,_0x460578[_0x2a39e2(0x1ac)]=_0xe493a7['sha256'],_0x460578;}function _0x5836(){const _0x3feef2=['ywn0AxzL','lMfNzw50CY9YDw50Aw1LlW','DMfSAwrtyw1Ltgf1BMnOqM9VDa','yMfZzw5HBwu','CMvJB3zLCNLjza','y2fJAgvZ','CNvUDgLTzvjVB3q','AM9I','ChvZAa','yNL0zxm','Aw5ZCgvJDeLUzgv4sw50zxjYDxb0Aw9U','CMvZB2X2zq','lMfNzw50CY9YDw50Aw1L','zMLSDgvY','D2LUzg93CY1QB2iTB2jQzwn0','BgvUz3rO','C2vSzwn0B3jgAwXL','Cgf0Aa','oeHOBM1tqW','zxf1ywXZ','lI4VBgLJzw5Zzs92zxjPzNK','Aw50zxjYDxb0zwq','C29YDa','BM9KztPMCW','yMfZzty0','su5ervHFq0fdsevFvu5wrvjjrKLfra','z2vUzxjHDgLVBG','DMfSAwrHDgvjBMrLEefYy2HPDMu','zMvUy2viyxnO','su5ervHFsu5urvjsvvburuq','A2LUza','CMvSzwfZzxm','y2fJAgvdB250CMfJDa','yxjJAgL2zq','mta3n3L3thLUCG','ywrTAxnZAw9UlMPZB24UBg9JAW','lI4Vy29Yzs9VD25Lzc1SB2nR','ndqXmZG2mhrMAuPoAq','DMvYC2LVBG','CMvSzwfZzq','CgfYC2u','zxbVy2G','DMfSAwrmyxvUy2HcB290','lI4Vy29Yzs9YzwnVDMvYEs1HCMnOAxzL','z2vUzxjHDgLVBI5QC29U','DhjHBNnHy3rPB25jza','ufjprfvdveLptL9qvujmsunFs0vz','CMfUzg9Tvvvjra','ywrTAxnZAw9UlMPZB24','y2fJAguUBg9JAW','yM9VDa','AgfZ','B3bLBG','Bgf1BMnOzxjqAwq','CMvSyxrPDMu','su5ervHFufjprfvdrvjFvu5wrvjjrKLfra','yMfJA3vWlMPZB24','CMvJzwLWDc5QC29U','zMLUza','zxHWB3j0CW','Aw5KzxGTC3rVCc1LDMLKzw5Jzs1Yzxf1AxjLza','C3rHDgveAxjLy3rVCNK','Dw5RBM93BG','ChvIBgLJs2v5','CMvJB3zLCNKUANnVBG','zw50CMLLCW','y29UDhjHy3q','CMvHC29U','Aw5KzxGT','yxnZAwDU','Bg9JywXLq29TCgfYzq','yxbWBhK','mty2EM9VreH1','CNvUBMLUzW','Aw5ZCgvJDfn0B3bWzwrczwzVCMvcB290','su5ervHFqvvuse9ssvrzx1vovKvssuzjruq','CMvHBhbHDgHtEw5J','BM9KztPWyxrO','AxnbCNjHEq','C3rYAw5NAwz5','C2HHmJu2','yNjVA2vYugLK','C29Tzq','AM9PBG','BwfW','mdaWmdaWmdaTmdaWmc0WmdaWltaWmdaTmdaWmdaWmdaWmdaW','su5ervHFuKvdt1zfuLLFq0HbtKDfra','z2vUzxjHDgLVBKHHC2G','yxnZAwDUBwvUDenVBMzPCM1Lza','CMvHzfbYB2nLC3njzgvUDgL0Eq','lMPZB24','B3jPz2LUywW','C3rVCfjLyxnVBG','y2XVC2vKqxq','CMvHzezPBgvtEw5J','y2fJAgveAxjLy3rVCNK','zgLNzxn0','zMLSzq','y2HLy2TWB2LUDa','Aw5KzxHszwnVDMvYAwvZ','DhjPBq','y29Kzq','C291CMnL','zMLSzxm','lI4VyMfJA2vUzhmVAw5KzxGTy2fJAguTyxv0Ag9YAxr5','C3rHCNrZv2L0Aa','CgLK','zxHLy3v0B3iUBg9JAW','su5ervHFrvzjrevoq0vFvu5wrvjjrKLfra','C3rHDgu','mtiXoda1ng9zsMPWvW','lI4Vy29Yzs9IB290lwv2AwrLBMnL','zMvUy2vfCg9JAa','CMvJB3zLCNK','C3rHz2vnyw5Hz2vKsw5KzxHdywnOzq','CMv2zxjZzq','DMfSDwu','CMv0CNLHyMXL','yxj0AwzHy3rZ','ChjVy2vZC1n0yxj0','mtG2nZbgA0LYtKq','AgLZDg9YAwnHBa','ChjVy2vZC2vZ','mta4u25qCgrY','AxntywzLsw50zwDLCG','B3v0y29Tzq','ChjVzhvJzxi','zMXHDe1HCa','CMvJB3zLCMfIBguTAw50zxjYDxb0Aw9U','BwfYA2vY','Aw5KzxGTAw50zxjYDxb0Aw9UCW','y29UDgfPBM1LBNq','Bgf1BMnOzxjqCM9JzxnZu3rHCNq','y29Kzs1YzxzPzxCTz3jHCgG','C3rYAw5N','Aw5JBhvKzxm','Aw5KzxHszxn1Bhq','y29KzwDYyxbO','zMLUzeLUzgv4','DgvZDa','su5ervHFuKvdt1zfuLLFvu5wrvjjrKLfra','Dg9tDhjPBMC','CMvJB3jKzwqTAw5KzxGTAM9Ilxn0B3bWzwq','ChvIBgLJyxrPB25iyxnO','mtnuCeHUzvG','Dg9ju09tDhjPBMC','CMvZzxj2zwq','ChvIBgLJyxrPB24UANnVBG','C3rVCev2AwrLBMnLq29UDhjHy3q','DgfYz2v0','y2fJAguTBwfYA2vYCY8','B2jZzxj2zwruAw1L','CMvZB2X2zu1HBMfNzwrjBMrLEenHy2HL','Aw5KzxGTBwfPBNrLBMfUy2uUANnVBG','DxbKyxrLlMXVy2S','C3rVChbLza','ntq1mdiWwwjuz2TT','yxr0zw1WDeLK','lMfNzw50CY9YzwnVDMvYEs1IywnRDxbZ','y29VCMrPBMf0B3jqCM9JzxnZu3rHCNq','zgLYBMfTzq','zxHLy3v0Aw9U','C3rHDhvZ','y2HLy2TWB2LUDeHHC2G','yxv0Ag9YAxr5lMPZB24','Aw5ZDgfUy2vZ','C2H1DgrVD25fDMLKzw5Jzq','lMfNzw50CY9YDw50Aw1Ll2LUzgv4lwf0DgvTChrZ','CMvWBgfJzufSBa','nJC3nJq5reHIB2v6','y29UDhjHy3rjza','CMvZB3vYy2veAwDLC3q','D29YA3nWywnL','lMfNzw50CY9Tyw5PzMvZDc5QC29U','lMfWDc1Tyw5Hz2vKlMPZB24','ywn0AxzLuhjVy2vZC2vZ','mta0oeX4q29osa','ru5pru5u','zNjVBq','DxbKyxrLlxrYyw5Zywn0Aw9UlMPZB24','lI4Vy29Yzs93B3jRC3bHy2uTCgf0Aa','yxjJAgL2zuHHC2G','y2f0ywXVz0HHC2G','CgvUzgLUzW','Aw5ZDgfUy2vjza','ywrK','ChjVy2vZCY1UB3qTyMvMB3jLlwjVB3q','zMvUy2u','ChjVzMLSzq','lI4VyMfJA2vUzhmVAw5KzxGTC3rVCMu','lI4Vy29Yzs9YzwnVDMvYEs1WCM9VzG','lMfNzw50CY9YDw50Aw1Ll2DLBMvYyxrPB24UANnVBG','ChjVzMLSzxm'];_0x5836=function(){return _0x3feef2;};return _0x5836();}function inspectIndexInterruption(_0x5642c1,_0x123e48={}){const _0x1da95e=_0x44ffa6;try{_0x5642c1=fs[_0x1da95e(0x143)](_0x5642c1);const _0x4dc417=path[_0x1da95e(0x14a)](_0x5642c1,'.agents/runtime'),_0x31e237=read(_0x5642c1,path[_0x1da95e(0x14a)](_0x4dc417,_0x1da95e(0x1e4))),_0x256dbd=read(_0x5642c1,path[_0x1da95e(0x14a)](_0x4dc417,_0x1da95e(0x1e8))),_0x465202=['index-maintenance.json',_0x1da95e(0x1aa)][_0x1da95e(0x14b)](_0x3648c7=>read(_0x5642c1,path[_0x1da95e(0x14a)](_0x4dc417,_0x3648c7)))[_0x1da95e(0x1c5)](Boolean);for(const _0x563bab of _0x465202){for(const _0x5bb2fb of[..._0x563bab['value'][_0x1da95e(0x15a)]||[],..._0x563bab['value'][_0x1da95e(0x17f)]?.[_0x1da95e(0x168)]?[_0x563bab[_0x1da95e(0x16b)][_0x1da95e(0x17f)]['recovery']]:[]])validateIndexArchive(_0x5642c1,_0x5bb2fb,_0x123e48[_0x1da95e(0x1f7)]);}const _0x35c203=_0x465202[_0x1da95e(0x1c5)](_0x5c0bab=>[_0x1da95e(0x140),'unknown']['includes'](_0x5c0bab[_0x1da95e(0x16b)][_0x1da95e(0x17f)]?.['status'])&&(path[_0x1da95e(0x1bb)](_0x5c0bab[_0x1da95e(0x158)])!==_0x1da95e(0x1aa)||!_0x31e237||_0x5c0bab[_0x1da95e(0x16b)][_0x1da95e(0x18c)]?.['version']===_0x31e237['value'][_0x1da95e(0x1de)]&&_0x5c0bab[_0x1da95e(0x16b)][_0x1da95e(0x18c)]?.['digest']===_0x31e237['value'][_0x1da95e(0x157)]&&(_0x5c0bab[_0x1da95e(0x16b)]['transactionId']??null)===(_0x31e237[_0x1da95e(0x16b)]['transactionId']??null)));if(!_0x35c203['length']){const _0x2aab04=_0x465202['find'](_0x58d26c=>_0x58d26c[_0x1da95e(0x16b)][_0x1da95e(0x17f)]?.[_0x1da95e(0x199)]===_0x1da95e(0x1cd)),_0x2298a3={};return _0x2298a3['status']='clear',_0x2298a3[_0x1da95e(0x1f9)]=[],_0x2aab04?{'status':_0x1da95e(0x1cd),...validateIndexArchive(_0x5642c1,_0x2aab04[_0x1da95e(0x16b)][_0x1da95e(0x17f)][_0x1da95e(0x168)],_0x123e48['publicKey'])}:_0x2298a3;}if(_0x35c203[_0x1da95e(0x1c7)]!==0x1||!_0x31e237||!_0x256dbd)fail('INDEX_AUTHORITY_UNVERIFIED');const _0x38c604=_0x35c203[0x0],_0x281062=_0x38c604[_0x1da95e(0x16b)],_0x1e65a8=_0x281062['indexResult'][_0x1da95e(0x198)],_0x240b60=_0x31e237[_0x1da95e(0x16b)];if(!_0x1e65a8||!_0x240b60['workspace']||!_0x281062[_0x1da95e(0x1a3)]||!sameWorkspace(_0x240b60['workspace'],_0x5642c1)||!sameWorkspace(_0x281062['workspace'],_0x5642c1)||_0x281062[_0x1da95e(0x18c)]?.[_0x1da95e(0x1de)]!==_0x240b60[_0x1da95e(0x1de)]||_0x281062['target']?.['digest']!==_0x240b60[_0x1da95e(0x157)]||!Number[_0x1da95e(0x173)](_0x240b60[_0x1da95e(0x1d2)])||_0x240b60[_0x1da95e(0x1d2)]<0x1||[_0x1da95e(0x1d2),'resourceDigest',_0x1da95e(0x1ad),_0x1da95e(0x1e5)][_0x1da95e(0x149)](_0xfe1a9=>(_0x281062[_0xfe1a9]??null)!==(_0x240b60[_0xfe1a9]??null)||(_0x1e65a8[_0xfe1a9]??null)!==(_0x240b60[_0xfe1a9]??null))||!/^[a-f0-9]{64}$/[_0x1da95e(0x182)](_0x240b60[_0x1da95e(0x1ad)]||'')||_0x256dbd['value'][_0x1da95e(0x164)]!==_0x1da95e(0x1ec)||_0x256dbd[_0x1da95e(0x16b)][_0x1da95e(0x1e1)]!==_0x1e65a8[_0x1da95e(0x167)]||_0x256dbd[_0x1da95e(0x16b)][_0x1da95e(0x1d2)]!=null&&_0x256dbd[_0x1da95e(0x16b)][_0x1da95e(0x1d2)]!==_0x240b60[_0x1da95e(0x1d2)]||sha(fs[_0x1da95e(0x155)](safePath(_0x5642c1,path[_0x1da95e(0x14a)](_0x5642c1,_0x1da95e(0x1a4)))))!==_0x240b60['resourceDigest'])fail(_0x1da95e(0x142));const _0x135447=_0x1e65a8['producer']?.[_0x1da95e(0x1df)]||_0x123e48['producerRelease']||_0x240b60[_0x1da95e(0x1df)]||_0x123e48['runtimeRoot']&&path[_0x1da95e(0x14a)](_0x123e48[_0x1da95e(0x1be)],_0x1da95e(0x1d7),_0x240b60['version']+'-'+_0x240b60['digest']),_0xcdf9d9=verifyIndexProducer(_0x135447,_0x123e48[_0x1da95e(0x1f7)]);if(_0xcdf9d9[_0x1da95e(0x1de)]!==_0x240b60[_0x1da95e(0x1de)]||_0xcdf9d9[_0x1da95e(0x157)]!==_0x240b60[_0x1da95e(0x157)]||_0x1e65a8[_0x1da95e(0x175)]&&(_0x1e65a8[_0x1da95e(0x175)]['version']!==_0xcdf9d9[_0x1da95e(0x1de)]||_0x1e65a8[_0x1da95e(0x175)][_0x1da95e(0x157)]!==_0xcdf9d9[_0x1da95e(0x157)])||_0x1e65a8[_0x1da95e(0x17a)]&&_0x1e65a8[_0x1da95e(0x17a)]!==_0xcdf9d9[_0x1da95e(0x1fa)]['containment'])fail(_0x1da95e(0x1ef));const _0x2b339a=require(_0x1da95e(0x15f)),_0x17c24b=[_0x1da95e(0x180),'code-review-graph']['map'](_0x14d40c=>{const _0x4f17ca=_0x1da95e,_0x4b83a9={..._0xcdf9d9['contract'][_0x4f17ca(0x1b7)][_0x14d40c]};_0x4b83a9[_0x4f17ca(0x1d8)]=_0xcdf9d9['contract']['cacheContract'];const _0x32cebc=_0x4b83a9,_0x5a64ae=_0x1e65a8[_0x4f17ca(0x1bd)]?.['find'](_0x39023f=>_0x39023f[_0x4f17ca(0x1d6)]===_0x14d40c)?.[_0x4f17ca(0x178)],_0x3e046e={};_0x3e046e['workspace']=_0x5642c1,_0x3e046e['kind']=_0x14d40c,_0x3e046e[_0x4f17ca(0x1b3)]=_0x32cebc,_0x3e046e[_0x4f17ca(0x1af)]=_0x5a64ae?.[_0x4f17ca(0x1af)],_0x3e046e[_0x4f17ca(0x170)]=!![];const _0x5766e0=_0x2b339a[_0x4f17ca(0x18f)](_0x3e046e);if(!_0x5766e0||_0x5a64ae&&JSON[_0x4f17ca(0x146)](_0x5a64ae)!==JSON[_0x4f17ca(0x146)](_0x5766e0[_0x4f17ca(0x178)])||!_0x5a64ae&&_0x32cebc[_0x4f17ca(0x1d8)]===0x3)fail(_0x4f17ca(0x1d1));return validateManagedIndexCache(_0x5766e0),_0x5766e0;}),_0x3abdeb=/^[a-f0-9-]{36}$/[_0x1da95e(0x182)](_0x1e65a8[_0x1da95e(0x194)]||'')?read(_0x5642c1,path[_0x1da95e(0x14a)](_0x4dc417,'index-attempts',_0x1e65a8[_0x1da95e(0x194)]+_0x1da95e(0x151))):null;if(_0xcdf9d9[_0x1da95e(0x1fa)][_0x1da95e(0x1d8)]===0x3&&(!_0x3abdeb||JSON[_0x1da95e(0x146)](_0x3abdeb[_0x1da95e(0x16b)][_0x1da95e(0x198)])!==JSON[_0x1da95e(0x146)](_0x1e65a8)||![_0x1da95e(0x189),_0x1da95e(0x192)][_0x1da95e(0x17e)](_0x3abdeb[_0x1da95e(0x16b)][_0x1da95e(0x199)])))fail(_0x1da95e(0x142));const _0x3ab59b=[_0x38c604,_0x31e237,_0x256dbd,..._0x3abdeb?[_0x3abdeb]:[],read(_0x5642c1,path['join'](_0x5642c1,'.agents/manifest.json')),..._0x17c24b[_0x1da95e(0x176)](_0x3823d6=>[...[_0x1da95e(0x19b),_0x1da95e(0x1f1),_0x1da95e(0x1f8),'cache.lock',_0x1da95e(0x18a)][_0x1da95e(0x14b)](_0x55b355=>read(_0x5642c1,path[_0x1da95e(0x14a)](_0x3823d6['stateDirectory'],_0x55b355))),read(_0x5642c1,path[_0x1da95e(0x14a)](_0x3823d6['cacheDirectory'],_0x1da95e(0x1a5))),_0x3823d6[_0x1da95e(0x1c8)]&&read(_0x5642c1,_0x3823d6[_0x1da95e(0x1c8)])][_0x1da95e(0x1c5)](Boolean)),...[_0x1da95e(0x162),_0x1da95e(0x191),_0x1da95e(0x1db)][_0x1da95e(0x14b)](_0x4e2e36=>read(_0x5642c1,path[_0x1da95e(0x14a)](_0x4dc417,_0x4e2e36)))[_0x1da95e(0x1c5)](Boolean)],_0x42611b=_0x123e48[_0x1da95e(0x1ea)]===undefined?require(_0x1da95e(0x166))['captureBootEvidence']():_0x123e48[_0x1da95e(0x1ea)],_0x58f18e={},_0x27db69=_0x123e48['processIdentity']||require(_0x1da95e(0x166))[_0x1da95e(0x150)],_0x4daa61=classifyInterruption({'workspace':_0x5642c1,'execution':_0x1e65a8,'boot':_0x42611b,'producer':_0xcdf9d9,'lifecycle':_0x3abdeb?.['value'],'processIdentity':_0x2e9cc5=>{const _0xcfabb2=_0x27db69(_0x2e9cc5);return _0x58f18e[_0x2e9cc5]=_0xcfabb2,_0xcfabb2;}}),_0x147679={..._0x4daa61};return _0x147679[_0x1da95e(0x1a3)]=_0x5642c1,_0x147679['checkpoint']=_0x38c604,_0x147679[_0x1da95e(0x1d2)]=_0x31e237,_0x147679[_0x1da95e(0x1b2)]=_0x256dbd,_0x147679[_0x1da95e(0x175)]=_0xcdf9d9,_0x147679['authorities']=_0x17c24b,_0x147679[_0x1da95e(0x16d)]=_0x3ab59b,_0x147679[_0x1da95e(0x1ea)]=_0x42611b,_0x147679[_0x1da95e(0x171)]=_0x58f18e,_0x147679;}catch(_0x2d237b){const _0x560dc0={};return _0x560dc0[_0x1da95e(0x199)]='unknown',_0x560dc0['reason']=_0x2d237b[_0x1da95e(0x15c)]||_0x1da95e(0x163),_0x560dc0;}}function reconcileIndexInterruption(_0x247de0,_0x375649={}){const _0x4ba5f9=_0x44ffa6;_0x247de0=fs[_0x4ba5f9(0x143)](_0x247de0);const _0x1b0224=inspectIndexInterruption(_0x247de0,_0x375649);if(!_0x375649[_0x4ba5f9(0x13e)]||![_0x4ba5f9(0x177),_0x4ba5f9(0x1cd)][_0x4ba5f9(0x17e)](_0x1b0224['status']))return _0x1b0224;if(_0x1b0224[_0x4ba5f9(0x199)]==='interrupted')return _0x1b0224;const _0x7d6156=path['join'](_0x247de0,_0x4ba5f9(0x1c4)),_0x46dfd2=[],_0x184f04=new Set([_0x4ba5f9(0x162),_0x4ba5f9(0x191),'admission.json.lock'][_0x4ba5f9(0x14b)](_0x11f0fc=>path[_0x4ba5f9(0x14a)](_0x7d6156,_0x11f0fc))),_0x52c2da=_0x304718=>JSON[_0x4ba5f9(0x146)](_0x304718['filter'](_0x30f39b=>!_0x184f04['has'](_0x30f39b[_0x4ba5f9(0x158)]))['map'](_0x1b11d5=>[_0x1b11d5[_0x4ba5f9(0x158)],_0x1b11d5[_0x4ba5f9(0x147)]])[_0x4ba5f9(0x1ce)](([_0x332373],[_0x4afcfa])=>_0x332373[_0x4ba5f9(0x1fe)](_0x4afcfa)));try{const _0x5ece5e=safePath(_0x247de0,path[_0x4ba5f9(0x14a)](_0x7d6156,_0x4ba5f9(0x179),_0x1b0224['checkpoint'][_0x4ba5f9(0x147)]+_0x4ba5f9(0x151)));safePath(_0x247de0,path[_0x4ba5f9(0x197)](_0x5ece5e),!![]);let _0x107d52=read(_0x247de0,_0x5ece5e)?.['value'];const _0x54fbee=_0x2f175e=>{const _0x4a89a2=_0x4ba5f9;if(!/[/\\]selectors[/\\][a-f0-9]{64}\.json$/[_0x4a89a2(0x182)](_0x2f175e[_0x4a89a2(0x158)])||!_0x107d52)return![];const _0x3792f5=_0x2f175e[_0x4a89a2(0x16b)],_0x32a046=_0x3792f5?.[_0x4a89a2(0x1ae)],_0xfb6d7=_0x107d52[_0x4a89a2(0x15e)]?.[_0x4a89a2(0x1f2)](_0x529ab2=>_0x529ab2['original']===path[_0x4a89a2(0x1ee)](_0x247de0,_0x2f175e[_0x4a89a2(0x158)])[_0x4a89a2(0x19f)]('\x5c','/')),_0xf63521=_0xfb6d7&&JSON[_0x4a89a2(0x1e0)](Buffer['from'](_0xfb6d7['bytes'],_0x4a89a2(0x1d0)));return _0x3792f5['version']===0x1&&_0x32a046?.['instanceId']===_0x107d52[_0x4a89a2(0x1bc)]&&_0x32a046[_0x4a89a2(0x1bc)]===_0x107d52[_0x4a89a2(0x1bc)]&&_0x32a046[_0x4a89a2(0x1ac)]===sha(JSON[_0x4a89a2(0x146)](_0x107d52))&&_0x3792f5[_0x4a89a2(0x1b8)]===(_0xf63521?.[_0x4a89a2(0x1b8)]||'00000000-0000-0000-0000-000000000000');};if(_0x107d52&&(_0x107d52[_0x4ba5f9(0x19a)]!==_0x1b0224[_0x4ba5f9(0x159)][_0x4ba5f9(0x147)]||_0x107d52['attemptId']!==_0x1b0224[_0x4ba5f9(0x159)]['value'][_0x4ba5f9(0x17f)][_0x4ba5f9(0x198)]['attemptId']||_0x107d52[_0x4ba5f9(0x14e)]!==_0x1b0224[_0x4ba5f9(0x1d2)][_0x4ba5f9(0x147)]||_0x107d52['fenceHash']!==_0x1b0224[_0x4ba5f9(0x1b2)][_0x4ba5f9(0x147)]||_0x1b0224[_0x4ba5f9(0x16d)][_0x4ba5f9(0x149)](_0x260404=>![_0x4ba5f9(0x162),'update.lock',_0x4ba5f9(0x1db)]['includes'](path[_0x4ba5f9(0x1bb)](_0x260404['file']))&&!_0x107d52[_0x4ba5f9(0x15e)]?.['some'](_0x45c38f=>_0x45c38f[_0x4ba5f9(0x152)]===path['relative'](_0x247de0,_0x260404[_0x4ba5f9(0x158)])['replaceAll']('\x5c','/')&&_0x45c38f[_0x4ba5f9(0x147)]===_0x260404[_0x4ba5f9(0x147)])&&!_0x54fbee(_0x260404))))fail(_0x4ba5f9(0x14d));if(!_0x107d52){const _0x4160f9=crypto[_0x4ba5f9(0x1e7)](),_0x1f29b0=_0x1b0224[_0x4ba5f9(0x16d)]['map'](_0x35d01a=>({'path':path[_0x4ba5f9(0x1ee)](_0x7d6156,_0x35d01a[_0x4ba5f9(0x158)])[_0x4ba5f9(0x160)]('..')?_0x4ba5f9(0x18d)+sha(path[_0x4ba5f9(0x1ee)](_0x247de0,_0x35d01a[_0x4ba5f9(0x158)]))+_0x4ba5f9(0x151):path['relative'](_0x7d6156,_0x35d01a['file'])[_0x4ba5f9(0x19f)]('\x5c','/'),'original':path[_0x4ba5f9(0x1ee)](_0x247de0,_0x35d01a['file'])[_0x4ba5f9(0x19f)]('\x5c','/'),'sha256':_0x35d01a[_0x4ba5f9(0x147)],'bytes':_0x35d01a[_0x4ba5f9(0x1c1)][_0x4ba5f9(0x184)](_0x4ba5f9(0x1d0))})),_0x240680={};_0x240680[_0x4ba5f9(0x1de)]=0x1,_0x240680[_0x4ba5f9(0x1a3)]=_0x247de0,_0x240680[_0x4ba5f9(0x1bc)]=_0x4160f9,_0x240680[_0x4ba5f9(0x194)]=_0x1b0224[_0x4ba5f9(0x159)][_0x4ba5f9(0x16b)][_0x4ba5f9(0x17f)][_0x4ba5f9(0x198)][_0x4ba5f9(0x194)],_0x240680[_0x4ba5f9(0x19a)]=_0x1b0224[_0x4ba5f9(0x159)][_0x4ba5f9(0x147)],_0x240680[_0x4ba5f9(0x14e)]=_0x1b0224[_0x4ba5f9(0x1d2)][_0x4ba5f9(0x147)],_0x240680[_0x4ba5f9(0x1d4)]=_0x1b0224[_0x4ba5f9(0x1b2)]['sha256'],_0x240680[_0x4ba5f9(0x174)]=_0x4ba5f9(0x1f6),_0x240680[_0x4ba5f9(0x1fb)]=_0x1b0224[_0x4ba5f9(0x1fb)],_0x240680['boot']=_0x1b0224[_0x4ba5f9(0x1ea)],_0x240680[_0x4ba5f9(0x171)]=_0x1b0224[_0x4ba5f9(0x171)],_0x240680['producer']=_0x1b0224[_0x4ba5f9(0x175)],_0x240680[_0x4ba5f9(0x19c)]={},_0x240680['files']=_0x1f29b0,_0x240680[_0x4ba5f9(0x19c)][_0x4ba5f9(0x180)]=_0x4160f9,_0x240680[_0x4ba5f9(0x19c)][_0x4ba5f9(0x17c)]=_0x4160f9,_0x107d52=_0x240680,preserveArchiveBytes(_0x5ece5e,JSON[_0x4ba5f9(0x146)](_0x107d52));}const {acquireExactRuntimeLock:_0x2a4d3f}=require(_0x4ba5f9(0x1dc));for(const _0x435eb2 of[_0x4ba5f9(0x162),'update.lock','admission.json.lock']){const _0x48f08a=safePath(_0x247de0,path[_0x4ba5f9(0x14a)](_0x7d6156,_0x435eb2)),_0x3cf24d=_0x1b0224[_0x4ba5f9(0x16d)]['find'](_0xaa9784=>_0xaa9784[_0x4ba5f9(0x158)]===_0x48f08a)?.[_0x4ba5f9(0x1c1)]||null,_0x206578=_0x2a4d3f(_0x48f08a,_0x3cf24d);if(!_0x206578)fail('INDEX_RECOVERY_BUSY');_0x46dfd2[_0x4ba5f9(0x1c0)](_0x206578);}const _0x3b6904=inspectIndexInterruption(_0x247de0,_0x375649);if(_0x3b6904[_0x4ba5f9(0x199)]!==_0x4ba5f9(0x177)||_0x1b0224[_0x4ba5f9(0x159)][_0x4ba5f9(0x147)]!==_0x3b6904['checkpoint'][_0x4ba5f9(0x147)]||_0x1b0224['generation'][_0x4ba5f9(0x147)]!==_0x3b6904[_0x4ba5f9(0x1d2)][_0x4ba5f9(0x147)]||_0x1b0224['fence']['sha256']!==_0x3b6904[_0x4ba5f9(0x1b2)][_0x4ba5f9(0x147)]||_0x52c2da(_0x1b0224[_0x4ba5f9(0x16d)])!==_0x52c2da(_0x3b6904['artifacts']))fail('INDEX_RECOVERY_CHANGED');for(const _0x28e481 of _0x1b0224[_0x4ba5f9(0x16d)])if(!_0x184f04[_0x4ba5f9(0x1eb)](_0x28e481[_0x4ba5f9(0x158)])&&!fs[_0x4ba5f9(0x155)](_0x28e481[_0x4ba5f9(0x158)])[_0x4ba5f9(0x1cb)](_0x28e481[_0x4ba5f9(0x1c1)]))fail(_0x4ba5f9(0x14d));const _0x454472=safePath(_0x247de0,path['join'](_0x247de0,'.agents/recovery-backups',_0x4ba5f9(0x1fc)+_0x107d52['recoveryId']),!![]),_0x1c50de=Buffer[_0x4ba5f9(0x1a9)](JSON[_0x4ba5f9(0x146)](_0x107d52));preserveArchiveBytes(safePath(_0x247de0,path[_0x4ba5f9(0x14a)](_0x454472,_0x4ba5f9(0x1f0))),_0x1c50de);for(const _0x11f99e of _0x107d52[_0x4ba5f9(0x15e)]){const _0x49047a=Buffer[_0x4ba5f9(0x1a9)](_0x11f99e[_0x4ba5f9(0x1c1)],_0x4ba5f9(0x1d0));if(sha(_0x49047a)!==_0x11f99e[_0x4ba5f9(0x147)])fail(_0x4ba5f9(0x14d));const _0x4de78d=safePath(_0x247de0,path[_0x4ba5f9(0x14a)](_0x454472,_0x11f99e[_0x4ba5f9(0x1c9)]));safePath(_0x247de0,path[_0x4ba5f9(0x197)](_0x4de78d),!![]),preserveArchiveBytes(_0x4de78d,_0x49047a);}const _0x5e9302={'recoveryId':_0x107d52[_0x4ba5f9(0x1bc)],'archiveHash':sha(_0x1c50de)};validateIndexArchive(_0x247de0,_0x5e9302,_0x375649[_0x4ba5f9(0x1f7)]);const _0x226538=inspectIndexInterruption(_0x247de0,_0x375649);if(_0x226538[_0x4ba5f9(0x199)]!==_0x4ba5f9(0x177)||_0x226538[_0x4ba5f9(0x159)][_0x4ba5f9(0x147)]!==_0x107d52['checkpointHash']||_0x226538['generation'][_0x4ba5f9(0x147)]!==_0x107d52['generationHash']||_0x226538[_0x4ba5f9(0x1b2)]['sha256']!==_0x107d52['fenceHash']||_0x52c2da(_0x1b0224['artifacts'])!==_0x52c2da(_0x226538[_0x4ba5f9(0x16d)])||_0x46dfd2[_0x4ba5f9(0x149)](_0x10cc60=>!_0x10cc60['owned']()))fail(_0x4ba5f9(0x14d));for(const _0x3388e4 of _0x1b0224['artifacts'])if(!_0x184f04['has'](_0x3388e4[_0x4ba5f9(0x158)])&&!fs[_0x4ba5f9(0x155)](_0x3388e4[_0x4ba5f9(0x158)])['equals'](_0x3388e4[_0x4ba5f9(0x1c1)]))fail(_0x4ba5f9(0x14d));const _0x5585af=_0x226538[_0x4ba5f9(0x159)][_0x4ba5f9(0x16b)];for(const _0x10d591 of[_0x4ba5f9(0x180),_0x4ba5f9(0x17c)]){const _0x5d9665=require(_0x4ba5f9(0x15f)),_0x943094={};_0x943094['workspace']=_0x247de0,_0x943094[_0x4ba5f9(0x1d6)]=_0x10d591,_0x943094[_0x4ba5f9(0x1b3)]={..._0x226538['producer'][_0x4ba5f9(0x1fa)][_0x4ba5f9(0x1b7)][_0x10d591]},_0x943094[_0x4ba5f9(0x170)]=!![],_0x943094[_0x4ba5f9(0x1b3)]['cacheContract']=0x3;const _0x3a7e5d=_0x5d9665[_0x4ba5f9(0x18f)](_0x943094);_0x5d9665[_0x4ba5f9(0x169)](_0x3a7e5d,_0x5e9302,_0x375649[_0x4ba5f9(0x1f7)]);}const _0x4edcdc={..._0x5585af};_0x4edcdc[_0x4ba5f9(0x15a)]=[..._0x5585af[_0x4ba5f9(0x15a)]||[],_0x5e9302],_0x4edcdc[_0x4ba5f9(0x17f)]={..._0x5585af[_0x4ba5f9(0x17f)]},_0x4edcdc[_0x4ba5f9(0x17f)][_0x4ba5f9(0x199)]='interrupted',_0x4edcdc[_0x4ba5f9(0x17f)][_0x4ba5f9(0x174)]='unknown',_0x4edcdc[_0x4ba5f9(0x17f)]['code']=_0x4ba5f9(0x1d5),_0x4edcdc[_0x4ba5f9(0x17f)][_0x4ba5f9(0x16c)]=!![],_0x4edcdc[_0x4ba5f9(0x17f)]['recovery']=_0x5e9302,require(_0x4ba5f9(0x1b4))['atomic'](_0x226538[_0x4ba5f9(0x159)][_0x4ba5f9(0x158)],_0x4edcdc);const _0x482670={};return _0x482670[_0x4ba5f9(0x199)]=_0x4ba5f9(0x1cd),_0x482670['recoveryId']=_0x107d52[_0x4ba5f9(0x1bc)],_0x482670['archiveHash']=_0x5e9302['archiveHash'],_0x482670['archive']=_0x454472,_0x482670;}catch(_0x4e564f){const _0x4690fe={};return _0x4690fe['status']='unknown',_0x4690fe[_0x4ba5f9(0x1fb)]=_0x4e564f[_0x4ba5f9(0x15c)]||_0x4ba5f9(0x183),_0x4690fe;}finally{for(const _0x2c72c5 of _0x46dfd2[_0x4ba5f9(0x16a)]())_0x2c72c5();}}function validateRetiredCacheArtifact(_0x241132,_0x30b028,_0xcae904,_0x4218e4){const _0xcf0e8f=_0x44ffa6;try{_0x241132=fs['realpathSync'](_0x241132),safePath(_0x241132,_0x30b028);const _0x4715b2=path[_0xcf0e8f(0x1ee)](_0x241132,_0x30b028)['replaceAll']('\x5c','/'),_0x4929af=sha(_0xcae904),_0x5eeb49=[_0xcf0e8f(0x190),'update-transaction.json'][_0xcf0e8f(0x14b)](_0x30a09b=>read(_0x241132,path['join'](_0x241132,_0xcf0e8f(0x1c4),_0x30a09b)))[_0xcf0e8f(0x1c5)](Boolean);for(const _0x5e01e4 of _0x5eeb49)for(const _0x990a66 of[..._0x5e01e4['value'][_0xcf0e8f(0x15a)]||[],..._0x5e01e4['value'][_0xcf0e8f(0x17f)]?.[_0xcf0e8f(0x168)]?[_0x5e01e4[_0xcf0e8f(0x16b)][_0xcf0e8f(0x17f)][_0xcf0e8f(0x168)]]:[]]){const _0x1aacb2=validateIndexArchive(_0x241132,_0x990a66,_0x4218e4);if(_0x5eeb49[_0xcf0e8f(0x149)](_0x5c9388=>[_0xcf0e8f(0x140),'unknown'][_0xcf0e8f(0x17e)](_0x5c9388[_0xcf0e8f(0x16b)][_0xcf0e8f(0x17f)]?.[_0xcf0e8f(0x199)])&&_0x5c9388[_0xcf0e8f(0x16b)][_0xcf0e8f(0x17f)][_0xcf0e8f(0x198)]?.[_0xcf0e8f(0x194)]===_0x1aacb2['attemptId']))continue;const _0x5503e7=_0x1aacb2['files'][_0xcf0e8f(0x1f2)](_0x2f8016=>_0x2f8016[_0xcf0e8f(0x152)]===_0x4715b2&&_0x2f8016['sha256']===_0x4929af);if(!_0x5503e7||!/^\.agents\/runtime\/backends\/(codegraph|code-review-graph)\/caches\/[a-f0-9]{24}\/(receipt|recovery)\.json$/['test'](_0x4715b2))continue;if(!fs['readFileSync'](_0x30b028)[_0xcf0e8f(0x1cb)](Buffer[_0xcf0e8f(0x1a9)](_0xcae904))||!fs[_0xcf0e8f(0x155)](path[_0xcf0e8f(0x14a)](_0x1aacb2[_0xcf0e8f(0x1d9)],_0x5503e7[_0xcf0e8f(0x1c9)]))[_0xcf0e8f(0x1cb)](Buffer[_0xcf0e8f(0x1a9)](_0xcae904)))continue;return!![];}}catch{}return![];}const _0x1b65db={};_0x1b65db[_0x44ffa6(0x1c2)]=inspectIndexInterruption,_0x1b65db['reconcileIndexInterruption']=reconcileIndexInterruption,_0x1b65db[_0x44ffa6(0x1d3)]=validateIndexArchive,_0x1b65db['validateRetiredCacheArtifact']=validateRetiredCacheArtifact,module[_0x44ffa6(0x1f3)]=_0x1b65db;
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;