@indigoai-us/hq-cli 5.345.263 → 5.345.267
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +116 -0
- package/assets/scaffold/core/scripts/hq-delegate-grant.sh +4 -48
- package/assets/scaffold/core/scripts/hq-delegate-secrets.sh +16 -10
- package/assets/scaffold/core/scripts/hq-delegate-send.sh +17 -1
- package/contracts/host-canary-release.json +7 -7
- package/dist/command-catalog.generated.d.ts +67 -1
- package/dist/command-catalog.generated.js +83 -1
- package/dist/command-registration-plan.d.ts +6 -0
- package/dist/command-registration-plan.js +1 -0
- package/dist/commands/bot.d.ts +2 -0
- package/dist/commands/bot.js +4 -3
- package/dist/commands/core-delegate-w1b.js +21 -40
- package/dist/commands/core-delegate.js +11 -8
- package/dist/commands/files-browse.d.ts +83 -4
- package/dist/commands/files-browse.js +404 -54
- package/dist/commands/groups.js +2 -2
- package/dist/commands/skill.js +15 -0
- package/dist/commands/sync-held.d.ts +11 -0
- package/dist/commands/sync-held.js +65 -1
- package/dist/commands/sync-telemetry-report.d.ts +5 -0
- package/dist/commands/sync-telemetry-report.js +239 -0
- package/dist/commands/sync-telemetry.d.ts +47 -0
- package/dist/commands/sync-telemetry.js +309 -0
- package/dist/index.js +107 -43
- package/dist/lib/agent-kit/mcp/tools.js +2 -2
- package/dist/lib/agent-kit/skills.js +12 -6
- package/dist/lib/bot/runnable.d.ts +17 -7
- package/dist/lib/bot/runnable.js +17 -10
- package/dist/lib/capacity/available.js +6 -2
- package/dist/lib/capacity/collectors/claude-oauth.d.ts +10 -256
- package/dist/lib/capacity/collectors/claude-oauth.js +19 -1078
- package/dist/lib/capacity/ledger.d.ts +12 -1
- package/dist/lib/capacity/ledger.js +15 -5
- package/dist/lib/capacity/route.d.ts +2 -0
- package/dist/lib/capacity/route.js +21 -4
- package/dist/lib/capacity/scheduler.js +2 -3
- package/dist/lib/capacity/sign-in.js +4 -4
- package/dist/lib/daemon/merge-sections.d.ts +44 -9
- package/dist/lib/daemon/merge-sections.js +234 -37
- package/dist/lib/daemon/ops/skill-command.d.ts +2 -0
- package/dist/lib/daemon/ops/skill-command.js +7 -1
- package/dist/lib/daemon/run.js +1 -0
- package/dist/lib/doctor/checks/antigravity-wiring.d.ts +2 -1
- package/dist/lib/doctor/checks/antigravity-wiring.js +75 -3
- package/dist/lib/doctor/checks/hook-engine.d.ts +2 -0
- package/dist/lib/doctor/checks/hook-engine.js +100 -1
- package/dist/lib/doctor/checks/host-core.d.ts +1 -1
- package/dist/lib/doctor/checks/host-core.js +19 -7
- package/dist/lib/doctor/fix/process-identity.d.ts +2 -0
- package/dist/lib/doctor/fix/process-identity.js +5 -2
- package/dist/lib/hook-engine/coverage.d.ts +19 -10
- package/dist/lib/hook-engine/coverage.js +116 -25
- package/dist/lib/hook-engine/native-precompact-compatibility.json +8 -1
- package/dist/lib/hook-engine/native-stop-compatibility.json +8 -4
- package/dist/lib/hook-engine/reconcile.js +60 -2
- package/dist/lib/install/antigravity-targets.d.ts +22 -0
- package/dist/lib/install/antigravity-targets.js +82 -0
- package/dist/lib/signals/reply.js +25 -5
- package/dist/lib/signals/steps/extract.d.ts +28 -4
- package/dist/lib/signals/steps/extract.js +124 -10
- package/dist/lib/sync-core/release.d.ts +1 -1
- package/dist/lib/sync-core/release.js +2 -2
- package/dist/main.js +8 -3
- package/dist/sentry-init.d.ts +7 -1
- package/dist/sentry-init.js +6 -2
- package/dist/sentry.d.ts +7 -0
- package/dist/sentry.js +16 -1
- package/dist/started-version.d.ts +13 -0
- package/dist/started-version.js +34 -0
- package/dist/startup-registration.d.ts +9 -9
- package/dist/startup-registration.js +42 -18
- package/dist/utils/client-health.d.ts +1 -0
- package/dist/utils/client-health.js +54 -11
- package/dist/utils/core-next-kill.d.ts +9 -0
- package/dist/utils/core-next-kill.js +22 -0
- package/dist/utils/host-registration.d.ts +4 -2
- package/dist/utils/host-registration.js +55 -7
- package/dist/utils/install-tree-recovery-markers.d.ts +45 -0
- package/dist/utils/install-tree-recovery-markers.js +70 -0
- package/dist/utils/install-tree-torn.d.ts +102 -5
- package/dist/utils/install-tree-torn.js +199 -2
- package/dist/utils/sentry-fingerprint.js +3 -0
- package/package.json +7 -7
|
@@ -13,7 +13,8 @@ import * as path from 'node:path';
|
|
|
13
13
|
import { jsonFormat } from '../../../commands/mcp-registration.js';
|
|
14
14
|
import { CORE_NEXT_LINK, isCoreNextEntry, isNativeEntry } from '../../hook-engine/registration.js';
|
|
15
15
|
import { isAdapterEntry } from '../../install/codex-targets.js';
|
|
16
|
-
import {
|
|
16
|
+
import { antigravityEventEntries, antigravityTargets } from '../../install/antigravity-targets.js';
|
|
17
|
+
import { claudeProjectAdapterHold, stopCompatibilityHold, uncoveredHooks } from '../../hook-engine/coverage.js';
|
|
17
18
|
import { masterHookPath, shimPath } from '../../install/claude-targets.js';
|
|
18
19
|
import { CORE_NEXT_FLAG, CORE_NEXT_KILL_ENV, CORE_NEXT_KILL_FILE, ENGINE_KILL_ENV, ENGINE_KILL_FILE, REQUIRED_EVALUATORS, STABLE_LINK_NAME, coreNextEnabled, coreNextKillReason, coreNextTargetFor, missingEvaluators, probeEngine, } from '../../../utils/host-registration.js';
|
|
19
20
|
import { fleetHookCoreResults } from './fleet-hook-core.js';
|
|
@@ -28,6 +29,7 @@ export function hostRegistrationFiles(root, home, env) {
|
|
|
28
29
|
{ host: 'codex', scope: 'project', file: path.join(root, '.codex', 'hooks.json') },
|
|
29
30
|
{ host: 'codex', scope: 'user', file: path.join(env.CODEX_HOME || path.join(home, '.codex'), 'hooks.json') },
|
|
30
31
|
{ host: 'grok', scope: 'user', file: path.join(home, '.grok', 'hooks', 'hq-hq-bridge.json') },
|
|
32
|
+
{ host: 'antigravity', scope: 'user', file: antigravityTargets(home).hooksFile },
|
|
31
33
|
];
|
|
32
34
|
}
|
|
33
35
|
function hookEntries(doc) {
|
|
@@ -50,6 +52,8 @@ export function classifyEntry(entry, host, root) {
|
|
|
50
52
|
// A stable-path entry for another HQ root still calls the new core.
|
|
51
53
|
if (CORE_NEXT_LINK.test(command))
|
|
52
54
|
return 'new-core';
|
|
55
|
+
if (host === 'antigravity')
|
|
56
|
+
return null;
|
|
53
57
|
if (host === 'grok')
|
|
54
58
|
return command.includes('hq-hq-bridge.sh') ? 'old-dispatcher' : null;
|
|
55
59
|
if (host === 'codex') {
|
|
@@ -63,6 +67,7 @@ const OLD_DISPATCHER = {
|
|
|
63
67
|
claude: 'old dispatcher (master-hook.sh)',
|
|
64
68
|
codex: 'old dispatcher (Codex hook adapter)',
|
|
65
69
|
grok: 'old dispatcher (Grok bash bridge)',
|
|
70
|
+
antigravity: 'none (native engine only)',
|
|
66
71
|
};
|
|
67
72
|
function label(kind, host) {
|
|
68
73
|
if (kind === 'new-core')
|
|
@@ -139,7 +144,9 @@ export function hostCoreResults(root, options = {}) {
|
|
|
139
144
|
return { status: 'PASS', reason: `the new core has ${REQUIRED_EVALUATORS[event].join(', ')}` };
|
|
140
145
|
};
|
|
141
146
|
/** Old-dispatcher hooks for `event` on `host` that the engine's report does not cover. */
|
|
142
|
-
const uncovered = (caps, host, event) =>
|
|
147
|
+
const uncovered = (caps, host, event) => host === 'antigravity'
|
|
148
|
+
? (event === 'Stop' ? (() => { const hold = stopCompatibilityHold(root, env); return hold ? [`(native Stop compatibility: ${hold})`] : []; })() : [])
|
|
149
|
+
: uncoveredHooks(root, host, event, caps.covers, env);
|
|
143
150
|
const listed = (hooks) => (hooks.length > 6 ? `${hooks.slice(0, 6).join(', ')} and ${hooks.length - 6} more` : hooks.join(', '));
|
|
144
151
|
/**
|
|
145
152
|
* Why an event of `<root>/.claude/settings.json` stays on master-hook.sh for
|
|
@@ -217,8 +224,8 @@ export function hostCoreResults(root, options = {}) {
|
|
|
217
224
|
}
|
|
218
225
|
}
|
|
219
226
|
}
|
|
220
|
-
const merged = new Map(eventEntries(doc));
|
|
221
|
-
for (const [event, entries] of eventEntries(overlay))
|
|
227
|
+
const merged = new Map(eventEntries(doc, target.host));
|
|
228
|
+
for (const [event, entries] of eventEntries(overlay, target.host))
|
|
222
229
|
merged.set(event, [...(merged.get(event) ?? []), ...entries]);
|
|
223
230
|
const events = [];
|
|
224
231
|
const mixed = [];
|
|
@@ -246,8 +253,11 @@ export function hostCoreResults(root, options = {}) {
|
|
|
246
253
|
verdict = newCore(event, engine);
|
|
247
254
|
const caps = verdict.status === 'PASS' && engine ? capabilities(engine) : undefined;
|
|
248
255
|
const left = caps && !(caps instanceof Error) ? uncovered(caps, target.host, event) : [];
|
|
249
|
-
if (left.length > 0)
|
|
250
|
-
verdict =
|
|
256
|
+
if (left.length > 0) {
|
|
257
|
+
verdict = target.host === 'antigravity'
|
|
258
|
+
? { status: 'FAIL', reason: `the new core does not cover ${listed(left)}, so Stop refuses every turn; run hq reindex to remove the Stop registration` }
|
|
259
|
+
: { status: 'FAIL', reason: `the new core does not cover ${listed(left)}, so they do not run; run hq reindex to put this event back on the old dispatcher` };
|
|
260
|
+
}
|
|
251
261
|
const held = verdict.status === 'PASS' && caps && !(caps instanceof Error) && target.host === 'claude' && target.scope === 'project' ? adapterHold(caps, event) : null;
|
|
252
262
|
if (held)
|
|
253
263
|
verdict = { status: 'FAIL', reason: `registered to the new core while ${held}, so that adapter finds no master record for it; run hq reindex to put this event back on master-hook.sh` };
|
|
@@ -298,7 +308,9 @@ export function hostCoreResults(root, options = {}) {
|
|
|
298
308
|
return results;
|
|
299
309
|
}
|
|
300
310
|
/** HQ-relevant entries per event, in file order. */
|
|
301
|
-
function eventEntries(doc) {
|
|
311
|
+
function eventEntries(doc, host) {
|
|
312
|
+
if (host === 'antigravity')
|
|
313
|
+
return antigravityEventEntries(doc);
|
|
302
314
|
const hooks = doc?.hooks;
|
|
303
315
|
if (!hooks || typeof hooks !== 'object' || Array.isArray(hooks))
|
|
304
316
|
return [];
|
|
@@ -24,6 +24,8 @@ export declare function lastProcessStartFailure(): ProcessStartFailure | null;
|
|
|
24
24
|
export declare function resetProcessStartTimeCache(): void;
|
|
25
25
|
/** The fixed POSIX locations of `ps`, tried in order. */
|
|
26
26
|
export declare const POSIX_PS_PATHS: readonly string[];
|
|
27
|
+
/** Timeout for the Windows PowerShell process-start-time probe (cold CLR start can exceed 10s under load). */
|
|
28
|
+
export declare const WINDOWS_PROCESS_START_TIMEOUT_MS = 30000;
|
|
27
29
|
/**
|
|
28
30
|
* The absolute path of the system tool that reads a process start time, found
|
|
29
31
|
* at a fixed location and never through PATH, so the answer is the same on
|
|
@@ -18,6 +18,8 @@ export function resetProcessStartTimeCache() {
|
|
|
18
18
|
}
|
|
19
19
|
/** The fixed POSIX locations of `ps`, tried in order. */
|
|
20
20
|
export const POSIX_PS_PATHS = ["/bin/ps", "/usr/bin/ps"];
|
|
21
|
+
/** Timeout for the Windows PowerShell process-start-time probe (cold CLR start can exceed 10s under load). */
|
|
22
|
+
export const WINDOWS_PROCESS_START_TIMEOUT_MS = 30_000;
|
|
21
23
|
function defaultIsExecutable(platform) {
|
|
22
24
|
return (file) => {
|
|
23
25
|
try {
|
|
@@ -85,11 +87,12 @@ export function processStartTime(pid, probe = {}) {
|
|
|
85
87
|
try {
|
|
86
88
|
const result = platform === "win32"
|
|
87
89
|
? runSpawn(tool, [
|
|
90
|
+
"-NoLogo",
|
|
88
91
|
"-NoProfile",
|
|
89
92
|
"-NonInteractive",
|
|
90
93
|
"-Command",
|
|
91
|
-
`(
|
|
92
|
-
], { encoding: "utf8", timeout:
|
|
94
|
+
`[System.Diagnostics.Process]::GetProcessById(${pid}).StartTime.ToUniversalTime().ToString('o')`,
|
|
95
|
+
], { encoding: "utf8", timeout: WINDOWS_PROCESS_START_TIMEOUT_MS, windowsHide: true })
|
|
93
96
|
: runSpawn(tool, ["-o", "lstart=", "-p", String(pid)], { encoding: "utf8", timeout: 5_000 });
|
|
94
97
|
const text = (result.stdout ?? "").trim();
|
|
95
98
|
if (result.status === 0 && text) {
|
|
@@ -184,7 +184,8 @@ export declare const MERGED_WRITE_GUARD_PINS_1649: ReadonlyArray<readonly [strin
|
|
|
184
184
|
export declare function fleetLocalMergedWriteGuardHold(root: string): string | null;
|
|
185
185
|
/**
|
|
186
186
|
* The script revisions the native SessionStart master rebuilds (hq-core v16.0.48 through v16.0.50,
|
|
187
|
-
*
|
|
187
|
+
* the hq-core-staging fd709b39a shim and hq-session.sh, and the hq-core v16.0.53 shim d1d7e7d0
|
|
188
|
+
* from hq-core-staging #2024, whose flag-off error answer `hqd_open.rs` ends quietly as the shim does):
|
|
188
189
|
* `hqd_open.rs` (the daemon shim and its flag-cache library), `session_set/mod.rs` `SCRIPTS`,
|
|
189
190
|
* `ID_LIBS` and `CAPABILITY_LIBS` (hq-session.sh and the two libraries it sources) and
|
|
190
191
|
* `foreign_bind.rs` `RESOLVE_REVISIONS` (resolve-company.sh). The native port
|
|
@@ -220,9 +221,12 @@ export declare function migratePolicyTriggersHold(root: string): string | null;
|
|
|
220
221
|
* and `host::fleet::inherit_scope::RELEASED_LIB_SHA256` (`session-scope-capability.sh`).
|
|
221
222
|
* `FleetLocalPre` matches the shell adapter when either file is absent (`DISPATCHER_UNAVAILABLE`
|
|
222
223
|
* / skip scope inheritance), and refuses any other revision present on disk.
|
|
223
|
-
* `RELEASED_CORE_SHA256`
|
|
224
|
-
*
|
|
225
|
-
*
|
|
224
|
+
* `RELEASED_CORE_SHA256` and this list accept the bd733f7b core (940bb5a0, hq-core v16.0.48 to
|
|
225
|
+
* v16.0.50) and the two classifying cores: hq-core-staging 810d0faa (#2119, 09f5a3e0, v16.0.51)
|
|
226
|
+
* and 7222e9bb (#2129, cf1abd5c, v16.0.52, a comment change). The fleet-local parity tests run
|
|
227
|
+
* against bd733f7b (tests/fleet_local_pre_tool_use_parity.rs) and against cf1abd5c, with the
|
|
228
|
+
* engine's own settings entry it classifies as a master record
|
|
229
|
+
* (tests/fleet_local_pretool_master_parity.rs).
|
|
226
230
|
*/
|
|
227
231
|
export declare const FLEET_LOCAL_PRE_TOOL_USE_PINS: readonly PinnedFile[];
|
|
228
232
|
/**
|
|
@@ -314,7 +318,8 @@ export declare function grokPreToolUseHold(root: string, shadow: boolean): strin
|
|
|
314
318
|
* crates/hq-hook/src/pre_tool_use_master.rs `DISPATCHER_PINS`. master-hook.sh is v16.0.48 (1a2439ae),
|
|
315
319
|
* v16.0.50 (774bca73), v16.0.49 (d5049d5f), v16.0.51 (443272ef) or v16.0.52 (ab46ebdf, and hq-core-staging #2152's f9a32c25, which only scopes the folder hook limit by event; v16.0.51 plus a PostToolUse-only
|
|
316
320
|
* prefilter text for MCP tools), whose session-id alias record the native bind writes too; hook-adapter-core.sh is held per host below; hqd-hook-shim.sh is the released ab289ac0 or the
|
|
317
|
-
* hq-core-staging fd709b39a ee5e9fe7
|
|
321
|
+
* hq-core-staging fd709b39a ee5e9fe7 or the hq-core v16.0.53 d1d7e7d0 (hq-core-staging #2024, whose new
|
|
322
|
+
* branches run only on an error answer from hqd, which the model never asks), and session-id.sh the released 2ebbc508 or the fd709b39a
|
|
318
323
|
* d6a04155; every other file is one revision.
|
|
319
324
|
*/
|
|
320
325
|
export declare const PRE_TOOL_USE_DISPATCHER_PINS: readonly PinnedFile[];
|
|
@@ -326,8 +331,13 @@ export declare const PRE_TOOL_USE_DISPATCHER_PINS: readonly PinnedFile[];
|
|
|
326
331
|
*/
|
|
327
332
|
export declare const PRE_TOOL_USE_CLAUDE_DISPATCHER_PINS: readonly PinnedFile[];
|
|
328
333
|
export declare const PRE_TOOL_USE_CODEX_DISPATCHER_PINS: readonly PinnedFile[];
|
|
334
|
+
export declare const PRE_TOOL_USE_GROK_DISPATCHER_PINS: readonly PinnedFile[];
|
|
335
|
+
export declare const PRE_TOOL_USE_AGENTS_V2_DISPATCHER_PINS: readonly PinnedFile[];
|
|
336
|
+
export declare const PRE_TOOL_USE_FLEET_LOCAL_DISPATCHER_PINS: readonly PinnedFile[];
|
|
329
337
|
/** The Codex adapter the model reproduces on Codex only (pre_tool_use_master.rs `CODEX_ADAPTER_PIN`). */
|
|
330
338
|
export declare const PRE_TOOL_USE_CODEX_ADAPTER_PIN: PinnedFile;
|
|
339
|
+
/** The Grok adapter the model reproduces on Grok only (pre_tool_use_master.rs `GROK_ADAPTER_PIN`). */
|
|
340
|
+
export declare const PRE_TOOL_USE_GROK_ADAPTER_PIN: PinnedFile;
|
|
331
341
|
/**
|
|
332
342
|
* The claimed vault-write guard's script and the companions it reads (crates/hq-hook/src/ports.rs
|
|
333
343
|
* `HOOK_SCRIPT_SHA256` and `HOOK_COMPANION_SHA256` for enforce-vault-write-access). Its arithmetic
|
|
@@ -339,10 +349,9 @@ export declare const PRE_TOOL_USE_VAULT_GUARD_PINS: readonly PinnedFile[];
|
|
|
339
349
|
* Claimed PreToolUse hooks whose native member answers in place of the root's script with no port
|
|
340
350
|
* pin of its own, with the script revisions the member answers for: pre_tool_use_master.rs
|
|
341
351
|
* `CLAIMED_SCRIPT_PINS`, where the native PreToolUse refuses any other present revision. The scope
|
|
342
|
-
* authorizer: hq-core v16.0.45 to v16.0.52
|
|
343
|
-
* 16.0.53-beta.1 (36312275
|
|
344
|
-
*
|
|
345
|
-
* registered safety guard that is missing, as master-hook did.
|
|
352
|
+
* authorizer: hq-core v16.0.45 to v16.0.52, the prereleases core-pins.json lists, and hq-core
|
|
353
|
+
* 16.0.53-beta.1 (36312275, PowerShell check ported in #3993). A missing script is not held: the
|
|
354
|
+
* native PreToolUse refuses a registered safety guard that is missing, as master-hook did.
|
|
346
355
|
*/
|
|
347
356
|
export declare const PRE_TOOL_USE_CLAIMED_SCRIPT_PINS: readonly PinnedFile[];
|
|
348
357
|
/**
|
|
@@ -355,7 +364,7 @@ export declare const PRE_TOOL_USE_CREDENTIAL_GUARD_GENERATIONS: ReadonlyArray<re
|
|
|
355
364
|
/**
|
|
356
365
|
* The native policy-frontmatter check's evaluator scripts, in the order it reads them
|
|
357
366
|
* (crates/hq-hook/src/policy_frontmatter.rs `EVAL_TRIGGER_SHA256`, `FORWARDER_LIB_SHA256`,
|
|
358
|
-
* `
|
|
367
|
+
* `FLOOR_LIB_PINS`). Each is read only once the one before it is on its pin; a missing file
|
|
359
368
|
* gives the same evaluator-unavailable answer bash gave (or skips the floor check), so it is not
|
|
360
369
|
* held.
|
|
361
370
|
*/
|
|
@@ -28,13 +28,25 @@ import * as fs from 'node:fs';
|
|
|
28
28
|
import * as path from 'node:path';
|
|
29
29
|
import { isCoreNextEntry } from './registration.js';
|
|
30
30
|
import { CLASSIFYING_ADAPTER_CORE_SHA256, RELEASED_CLASSIFYING_ADAPTER_CORE_SHA256 } from './adapter-core-pin.js';
|
|
31
|
+
const CRATE_POLICY_FALLBACKS = {
|
|
32
|
+
'native-precompact-compatibility.json': '../../../crates/hq-hook/src/stop/precompact/native-precompact-compatibility.json',
|
|
33
|
+
};
|
|
31
34
|
/**
|
|
32
35
|
* Read a policy file that ships beside this module (src/ and dist/ alike; scripts/copy-schemas.mjs copies
|
|
33
36
|
* them to dist/). Not a JSON import: import attributes need Node 20.10, and `engines` allows Node 20.0, where
|
|
34
37
|
* the attribute syntax is a SyntaxError that stops the whole CLI from loading (Sentry HQ-CLI-HZ).
|
|
35
38
|
*/
|
|
36
39
|
function readPolicy(name) {
|
|
37
|
-
|
|
40
|
+
const local = new URL(`./${name}`, import.meta.url);
|
|
41
|
+
if (fs.existsSync(local))
|
|
42
|
+
return JSON.parse(fs.readFileSync(local, 'utf8'));
|
|
43
|
+
const fallback = CRATE_POLICY_FALLBACKS[name];
|
|
44
|
+
if (fallback) {
|
|
45
|
+
const crateCopy = new URL(fallback, import.meta.url);
|
|
46
|
+
if (fs.existsSync(crateCopy))
|
|
47
|
+
return JSON.parse(fs.readFileSync(crateCopy, 'utf8'));
|
|
48
|
+
}
|
|
49
|
+
return JSON.parse(fs.readFileSync(local, 'utf8'));
|
|
38
50
|
}
|
|
39
51
|
const stopCompatibility = readPolicy('native-stop-compatibility.json');
|
|
40
52
|
const gitStopConfig = readPolicy('git-stop-config.json');
|
|
@@ -1482,8 +1494,8 @@ export function generationHold(root) {
|
|
|
1482
1494
|
}
|
|
1483
1495
|
return null;
|
|
1484
1496
|
}
|
|
1485
|
-
/** Folder
|
|
1486
|
-
const RETIRED = new Set(['Stop/70-work-mesh-done.sh']);
|
|
1497
|
+
/** Folder hooks that master-hook.sh never dispatches (retired; `hq rescue` can leave them on disk). */
|
|
1498
|
+
const RETIRED = new Set(['Stop/70-work-mesh-done.sh', 'SessionStart/40-conduct-reap.sh']);
|
|
1487
1499
|
function listDir(dir) {
|
|
1488
1500
|
try {
|
|
1489
1501
|
return fs.readdirSync(dir).sort();
|
|
@@ -1626,7 +1638,7 @@ export function precompactCompatibilityHold(root, env = process.env) {
|
|
|
1626
1638
|
const master = hashes.get('.claude/hooks/master-hook.sh');
|
|
1627
1639
|
if (master && precompactCompatibility.fromBeta104Master.includes(master)) {
|
|
1628
1640
|
const reader = hashes.get('core/scripts/lib/session-id.sh');
|
|
1629
|
-
if (reader &&
|
|
1641
|
+
if (reader && !precompactCompatibility.fromBeta104SessionIds.includes(reader))
|
|
1630
1642
|
return 'mixed PreCompact session reader generation';
|
|
1631
1643
|
if (!reader && env.SESSION_ID_PAYLOAD_JQ)
|
|
1632
1644
|
return 'PreCompact session reader environment override';
|
|
@@ -1810,7 +1822,8 @@ export function fleetLocalMergedWriteGuardHold(root) {
|
|
|
1810
1822
|
return `unreadable merged-write-guard-shadow file ${wrapperRel}`;
|
|
1811
1823
|
}
|
|
1812
1824
|
const wrapperSha = createHash('sha256').update(wrapperBytes).digest('hex');
|
|
1813
|
-
const
|
|
1825
|
+
const isReleased = wrapperSha === MERGED_WRITE_GUARD_PINS_1649[0][1];
|
|
1826
|
+
const pins = isReleased
|
|
1814
1827
|
? MERGED_WRITE_GUARD_PINS_1649
|
|
1815
1828
|
: wrapperSha === MERGED_WRITE_GUARD_PINS_LEGACY[0][1]
|
|
1816
1829
|
? MERGED_WRITE_GUARD_PINS_LEGACY
|
|
@@ -1828,7 +1841,11 @@ export function fleetLocalMergedWriteGuardHold(root) {
|
|
|
1828
1841
|
catch {
|
|
1829
1842
|
return `unreadable merged-write-guard-shadow file ${relative}`;
|
|
1830
1843
|
}
|
|
1831
|
-
|
|
1844
|
+
const actual = createHash('sha256').update(bytes).digest('hex');
|
|
1845
|
+
const accepted = isReleased && relative === HOOK_LIB
|
|
1846
|
+
? MERGED_WRITE_GUARD_SETS.released.hookLibs
|
|
1847
|
+
: [sha];
|
|
1848
|
+
if (!accepted.includes(actual)) {
|
|
1832
1849
|
return `unmodeled merged-write-guard-shadow file ${relative}`;
|
|
1833
1850
|
}
|
|
1834
1851
|
}
|
|
@@ -1836,7 +1853,8 @@ export function fleetLocalMergedWriteGuardHold(root) {
|
|
|
1836
1853
|
}
|
|
1837
1854
|
/**
|
|
1838
1855
|
* The script revisions the native SessionStart master rebuilds (hq-core v16.0.48 through v16.0.50,
|
|
1839
|
-
*
|
|
1856
|
+
* the hq-core-staging fd709b39a shim and hq-session.sh, and the hq-core v16.0.53 shim d1d7e7d0
|
|
1857
|
+
* from hq-core-staging #2024, whose flag-off error answer `hqd_open.rs` ends quietly as the shim does):
|
|
1840
1858
|
* `hqd_open.rs` (the daemon shim and its flag-cache library), `session_set/mod.rs` `SCRIPTS`,
|
|
1841
1859
|
* `ID_LIBS` and `CAPABILITY_LIBS` (hq-session.sh and the two libraries it sources) and
|
|
1842
1860
|
* `foreign_bind.rs` `RESOLVE_REVISIONS` (resolve-company.sh). The native port
|
|
@@ -1844,10 +1862,10 @@ export function fleetLocalMergedWriteGuardHold(root) {
|
|
|
1844
1862
|
* refusal, so the session would start with no SessionStart hook at all.
|
|
1845
1863
|
*/
|
|
1846
1864
|
export const SESSION_START_PINS = [
|
|
1847
|
-
['core/scripts/hqd-hook-shim.sh', ['ab289ac0af680fe3bcacb110302ca8b998bdc33c6f94321d42bd04a344163eed', 'ee5e9fe729eb7e51f87b5f90cdc020be865f5b6b35ac0b5758587546b35715c0']],
|
|
1865
|
+
['core/scripts/hqd-hook-shim.sh', ['ab289ac0af680fe3bcacb110302ca8b998bdc33c6f94321d42bd04a344163eed', 'ee5e9fe729eb7e51f87b5f90cdc020be865f5b6b35ac0b5758587546b35715c0', 'd1d7e7d0231131afc1a49547018207e9bf4df03808aca3fda8f25fedade15b2f']],
|
|
1848
1866
|
['core/scripts/hqd-hook-flag-cache-lib.sh', ['061d264460408e9eaf43fdf0fdde662c906a9a7dacb4e7a591e684bca28c138a']],
|
|
1849
1867
|
['core/scripts/hq-session.sh', ['db701162f71b53fd2188974d2f46c58250593dde1252d65b36e6d02b9a765fe7', '02a37c5dbf4fb5af27cc64d0f271121e990758b757a479f60e9ce099f4d65ded', 'd4d4aef60ff8b095e3abcc817598f376d3c2de8d59758c3ed6dd40d4aa4b11fb']],
|
|
1850
|
-
['core/scripts/lib/session-id.sh', ['2ebbc50893c7c601a111b9e8f9945afeac88f552d7caeec09c4096f4c27a833d']],
|
|
1868
|
+
['core/scripts/lib/session-id.sh', ['2ebbc50893c7c601a111b9e8f9945afeac88f552d7caeec09c4096f4c27a833d', 'd6a04155571ec53edd853878cebaba5a5bab93801a73e356499440c1cd009c71']],
|
|
1851
1869
|
['core/scripts/lib/session-scope-capability.sh', ['388ffef43cfe05810c38ce377245d0d86f415b4009b21a008bca8897be0c9ead']],
|
|
1852
1870
|
['core/scripts/resolve-company.sh', ['00d6fa069f574a86087c77daa44887a2617446d4300d5daebecc9bfb5d81abe7']],
|
|
1853
1871
|
];
|
|
@@ -1933,12 +1951,23 @@ export function migratePolicyTriggersHold(root) {
|
|
|
1933
1951
|
* and `host::fleet::inherit_scope::RELEASED_LIB_SHA256` (`session-scope-capability.sh`).
|
|
1934
1952
|
* `FleetLocalPre` matches the shell adapter when either file is absent (`DISPATCHER_UNAVAILABLE`
|
|
1935
1953
|
* / skip scope inheritance), and refuses any other revision present on disk.
|
|
1936
|
-
* `RELEASED_CORE_SHA256`
|
|
1937
|
-
*
|
|
1938
|
-
*
|
|
1954
|
+
* `RELEASED_CORE_SHA256` and this list accept the bd733f7b core (940bb5a0, hq-core v16.0.48 to
|
|
1955
|
+
* v16.0.50) and the two classifying cores: hq-core-staging 810d0faa (#2119, 09f5a3e0, v16.0.51)
|
|
1956
|
+
* and 7222e9bb (#2129, cf1abd5c, v16.0.52, a comment change). The fleet-local parity tests run
|
|
1957
|
+
* against bd733f7b (tests/fleet_local_pre_tool_use_parity.rs) and against cf1abd5c, with the
|
|
1958
|
+
* engine's own settings entry it classifies as a master record
|
|
1959
|
+
* (tests/fleet_local_pretool_master_parity.rs).
|
|
1939
1960
|
*/
|
|
1940
1961
|
export const FLEET_LOCAL_PRE_TOOL_USE_PINS = [
|
|
1941
|
-
{
|
|
1962
|
+
{
|
|
1963
|
+
relative: 'core/scripts/lib/hook-adapter-core.sh',
|
|
1964
|
+
accepted: [
|
|
1965
|
+
'940bb5a0a268929a4cd3f88b61a0ce619f0fdf64e5d3f25f7f18da35df466ab5',
|
|
1966
|
+
RELEASED_CLASSIFYING_ADAPTER_CORE_SHA256,
|
|
1967
|
+
CLASSIFYING_ADAPTER_CORE_SHA256,
|
|
1968
|
+
],
|
|
1969
|
+
missing: 'allowed',
|
|
1970
|
+
},
|
|
1942
1971
|
{ relative: 'core/scripts/lib/session-scope-capability.sh', accepted: ['388ffef43cfe05810c38ce377245d0d86f415b4009b21a008bca8897be0c9ead'], missing: 'allowed' },
|
|
1943
1972
|
];
|
|
1944
1973
|
/**
|
|
@@ -2095,7 +2124,15 @@ export function grokStopObserveHold(root, event) {
|
|
|
2095
2124
|
*/
|
|
2096
2125
|
export const GROK_PRE_TOOL_USE_ADAPTER_PINS = [
|
|
2097
2126
|
{ relative: '.grok/hooks/hq-grok-hook-adapter.sh', accepted: ['b9075b2f96a6ef8d2ba9675e32ce5881d50522da4eca02b69e6dc8bcd57efddf'], missing: 'allowed' },
|
|
2098
|
-
{
|
|
2127
|
+
{
|
|
2128
|
+
relative: 'core/scripts/lib/hook-adapter-core.sh',
|
|
2129
|
+
accepted: [
|
|
2130
|
+
'940bb5a0a268929a4cd3f88b61a0ce619f0fdf64e5d3f25f7f18da35df466ab5',
|
|
2131
|
+
RELEASED_CLASSIFYING_ADAPTER_CORE_SHA256,
|
|
2132
|
+
CLASSIFYING_ADAPTER_CORE_SHA256,
|
|
2133
|
+
],
|
|
2134
|
+
missing: 'allowed',
|
|
2135
|
+
},
|
|
2099
2136
|
];
|
|
2100
2137
|
/**
|
|
2101
2138
|
* Why Grok PreToolUse must stay on the shell adapter in `root`: the adapter or its library is not the
|
|
@@ -2115,7 +2152,8 @@ export function grokPreToolUseHold(root, shadow) {
|
|
|
2115
2152
|
* crates/hq-hook/src/pre_tool_use_master.rs `DISPATCHER_PINS`. master-hook.sh is v16.0.48 (1a2439ae),
|
|
2116
2153
|
* v16.0.50 (774bca73), v16.0.49 (d5049d5f), v16.0.51 (443272ef) or v16.0.52 (ab46ebdf, and hq-core-staging #2152's f9a32c25, which only scopes the folder hook limit by event; v16.0.51 plus a PostToolUse-only
|
|
2117
2154
|
* prefilter text for MCP tools), whose session-id alias record the native bind writes too; hook-adapter-core.sh is held per host below; hqd-hook-shim.sh is the released ab289ac0 or the
|
|
2118
|
-
* hq-core-staging fd709b39a ee5e9fe7
|
|
2155
|
+
* hq-core-staging fd709b39a ee5e9fe7 or the hq-core v16.0.53 d1d7e7d0 (hq-core-staging #2024, whose new
|
|
2156
|
+
* branches run only on an error answer from hqd, which the model never asks), and session-id.sh the released 2ebbc508 or the fd709b39a
|
|
2119
2157
|
* d6a04155; every other file is one revision.
|
|
2120
2158
|
*/
|
|
2121
2159
|
export const PRE_TOOL_USE_DISPATCHER_PINS = [
|
|
@@ -2145,6 +2183,7 @@ export const PRE_TOOL_USE_DISPATCHER_PINS = [
|
|
|
2145
2183
|
'443272ef7642d87b6833bc97b71350502491445cd09b26be9f45140804368b00',
|
|
2146
2184
|
'ab46ebdf0cc84a90dd95a54417817f9f9023b109d5b3710c472a8f5e89061592',
|
|
2147
2185
|
'f9a32c25f5984856a1bb91a7914495577e505c42a8c02831acf8faf049a9a806',
|
|
2186
|
+
'711fb6d2ba7a3b126ddbbcc83e6f14a59178a75f4b856d8a4e64f67b586cabbd',
|
|
2148
2187
|
],
|
|
2149
2188
|
},
|
|
2150
2189
|
{ relative: '.claude/hooks/turn-timing.sh', accepted: ['97c70a3251225ba9e469e41fd3fe2341cfe2936490f54571d2ca16de8e766443'] },
|
|
@@ -2157,7 +2196,14 @@ export const PRE_TOOL_USE_DISPATCHER_PINS = [
|
|
|
2157
2196
|
},
|
|
2158
2197
|
{ relative: 'core/scripts/hq-anywhere-runtime-flag.cjs', accepted: ['8a484cef83d383b440462798ac13e26d132e10bbe509b47e0eb1a3d0db76b2b4'] },
|
|
2159
2198
|
{ relative: 'core/scripts/hqd-hook-flag-cache-lib.sh', accepted: ['061d264460408e9eaf43fdf0fdde662c906a9a7dacb4e7a591e684bca28c138a'] },
|
|
2160
|
-
{
|
|
2199
|
+
{
|
|
2200
|
+
relative: 'core/scripts/hqd-hook-shim.sh',
|
|
2201
|
+
accepted: [
|
|
2202
|
+
'ab289ac0af680fe3bcacb110302ca8b998bdc33c6f94321d42bd04a344163eed',
|
|
2203
|
+
'ee5e9fe729eb7e51f87b5f90cdc020be865f5b6b35ac0b5758587546b35715c0',
|
|
2204
|
+
'd1d7e7d0231131afc1a49547018207e9bf4df03808aca3fda8f25fedade15b2f',
|
|
2205
|
+
],
|
|
2206
|
+
},
|
|
2161
2207
|
{ relative: 'core/scripts/lib/advisory-cap.sh', accepted: ['ab80b2a3f63a5955db392eaff4e54fed88d20130e96ca5c2a0945a3ea146d39b'] },
|
|
2162
2208
|
{ relative: 'core/scripts/lib/epochrealtime.sh', accepted: ['4c9205520dba31533c95eea145f6068ba626885c342c2aa1f232a7237d046cdf'] },
|
|
2163
2209
|
{ relative: 'core/scripts/lib/perl-child-locale.sh', accepted: ['18e6b9d0e22874eea00ecc868b4dcfebbc3bb42434d8d0c81b20baec1194df2e'] },
|
|
@@ -2191,6 +2237,29 @@ export const PRE_TOOL_USE_CODEX_DISPATCHER_PINS = [
|
|
|
2191
2237
|
],
|
|
2192
2238
|
},
|
|
2193
2239
|
];
|
|
2240
|
+
export const PRE_TOOL_USE_GROK_DISPATCHER_PINS = [
|
|
2241
|
+
{
|
|
2242
|
+
relative: 'core/scripts/lib/hook-adapter-core.sh',
|
|
2243
|
+
accepted: [
|
|
2244
|
+
'940bb5a0a268929a4cd3f88b61a0ce619f0fdf64e5d3f25f7f18da35df466ab5',
|
|
2245
|
+
RELEASED_CLASSIFYING_ADAPTER_CORE_SHA256,
|
|
2246
|
+
CLASSIFYING_ADAPTER_CORE_SHA256,
|
|
2247
|
+
],
|
|
2248
|
+
},
|
|
2249
|
+
];
|
|
2250
|
+
export const PRE_TOOL_USE_AGENTS_V2_DISPATCHER_PINS = [
|
|
2251
|
+
{
|
|
2252
|
+
relative: 'core/scripts/lib/hook-adapter-core.sh',
|
|
2253
|
+
accepted: [
|
|
2254
|
+
'940bb5a0a268929a4cd3f88b61a0ce619f0fdf64e5d3f25f7f18da35df466ab5',
|
|
2255
|
+
RELEASED_CLASSIFYING_ADAPTER_CORE_SHA256,
|
|
2256
|
+
CLASSIFYING_ADAPTER_CORE_SHA256,
|
|
2257
|
+
],
|
|
2258
|
+
},
|
|
2259
|
+
];
|
|
2260
|
+
export const PRE_TOOL_USE_FLEET_LOCAL_DISPATCHER_PINS = PRE_TOOL_USE_AGENTS_V2_DISPATCHER_PINS;
|
|
2261
|
+
/** The fleet hosts, whose adapters run master-hook as the Codex adapter does (`HQ_HARNESS=codex`). */
|
|
2262
|
+
const fleetHost = (host) => host === 'agents-v2' || host === 'fleet-local';
|
|
2194
2263
|
/** The Codex adapter the model reproduces on Codex only (pre_tool_use_master.rs `CODEX_ADAPTER_PIN`). */
|
|
2195
2264
|
export const PRE_TOOL_USE_CODEX_ADAPTER_PIN = {
|
|
2196
2265
|
relative: '.codex/hooks/hq-codex-hook-adapter.sh',
|
|
@@ -2200,6 +2269,14 @@ export const PRE_TOOL_USE_CODEX_ADAPTER_PIN = {
|
|
|
2200
2269
|
'a905f51887c497165df1e46e703a504fee7dbc6c879ebcec845d585b13151f52',
|
|
2201
2270
|
],
|
|
2202
2271
|
};
|
|
2272
|
+
/** The Grok adapter the model reproduces on Grok only (pre_tool_use_master.rs `GROK_ADAPTER_PIN`). */
|
|
2273
|
+
export const PRE_TOOL_USE_GROK_ADAPTER_PIN = {
|
|
2274
|
+
relative: '.grok/hooks/hq-grok-hook-adapter.sh',
|
|
2275
|
+
// b9075b2f: v16.0.48 through staging main df7fca97.
|
|
2276
|
+
accepted: [
|
|
2277
|
+
'b9075b2f96a6ef8d2ba9675e32ce5881d50522da4eca02b69e6dc8bcd57efddf',
|
|
2278
|
+
],
|
|
2279
|
+
};
|
|
2203
2280
|
/**
|
|
2204
2281
|
* The claimed vault-write guard's script and the companions it reads (crates/hq-hook/src/ports.rs
|
|
2205
2282
|
* `HOOK_SCRIPT_SHA256` and `HOOK_COMPANION_SHA256` for enforce-vault-write-access). Its arithmetic
|
|
@@ -2223,10 +2300,9 @@ export const PRE_TOOL_USE_VAULT_GUARD_PINS = [
|
|
|
2223
2300
|
* Claimed PreToolUse hooks whose native member answers in place of the root's script with no port
|
|
2224
2301
|
* pin of its own, with the script revisions the member answers for: pre_tool_use_master.rs
|
|
2225
2302
|
* `CLAIMED_SCRIPT_PINS`, where the native PreToolUse refuses any other present revision. The scope
|
|
2226
|
-
* authorizer: hq-core v16.0.45 to v16.0.52
|
|
2227
|
-
* 16.0.53-beta.1 (36312275
|
|
2228
|
-
*
|
|
2229
|
-
* registered safety guard that is missing, as master-hook did.
|
|
2303
|
+
* authorizer: hq-core v16.0.45 to v16.0.52, the prereleases core-pins.json lists, and hq-core
|
|
2304
|
+
* 16.0.53-beta.1 (36312275, PowerShell check ported in #3993). A missing script is not held: the
|
|
2305
|
+
* native PreToolUse refuses a registered safety guard that is missing, as master-hook did.
|
|
2230
2306
|
*/
|
|
2231
2307
|
export const PRE_TOOL_USE_CLAIMED_SCRIPT_PINS = [
|
|
2232
2308
|
{
|
|
@@ -2238,6 +2314,7 @@ export const PRE_TOOL_USE_CLAIMED_SCRIPT_PINS = [
|
|
|
2238
2314
|
'bfe9c24e9aaa6403a83a137326f43ff1eba09acd791ceae232b0b6aed315b6ef',
|
|
2239
2315
|
'1b114e78a6f46a534a3cf4cba96b7d0a9ee33683e0976f9968ee0c956abe6482',
|
|
2240
2316
|
'23e1ce16f323178623faae664697ea5e38e24834884cacfc0978622dad46f74f',
|
|
2317
|
+
'36312275a519af7202ba366fdf4fd22139fb7080d1886eff87c541174e6bdf19',
|
|
2241
2318
|
],
|
|
2242
2319
|
missing: 'allowed',
|
|
2243
2320
|
},
|
|
@@ -2262,14 +2339,21 @@ const CREDENTIAL_ARITH_LIB = '.claude/hooks/bash-arith-subst-guard-lib.sh';
|
|
|
2262
2339
|
/**
|
|
2263
2340
|
* The native policy-frontmatter check's evaluator scripts, in the order it reads them
|
|
2264
2341
|
* (crates/hq-hook/src/policy_frontmatter.rs `EVAL_TRIGGER_SHA256`, `FORWARDER_LIB_SHA256`,
|
|
2265
|
-
* `
|
|
2342
|
+
* `FLOOR_LIB_PINS`). Each is read only once the one before it is on its pin; a missing file
|
|
2266
2343
|
* gives the same evaluator-unavailable answer bash gave (or skips the floor check), so it is not
|
|
2267
2344
|
* held.
|
|
2268
2345
|
*/
|
|
2269
2346
|
export const PRE_TOOL_USE_FRONTMATTER_EVALUATOR_PINS = [
|
|
2270
2347
|
{ relative: 'core/scripts/eval-trigger.sh', accepted: ['0066d89590f96855d800cdce2b883f265eaa6b92ac3fbc6649b82bf768772328'], missing: 'allowed' },
|
|
2271
2348
|
{ relative: 'core/scripts/lib/forwarder.sh', accepted: ['a030068f482cac2ecbfad90394fd7bcd1e24926e9179bcec5c770076ad6e4fc4'], missing: 'allowed' },
|
|
2272
|
-
{
|
|
2349
|
+
{
|
|
2350
|
+
relative: 'core/scripts/lib/hq-cli-floor.sh',
|
|
2351
|
+
accepted: [
|
|
2352
|
+
'd5087c69c33250a71dee35174c259e0a301cee1cd02110a1df5e5ca9d6334fac',
|
|
2353
|
+
'377df32ace180f3825e6de8de5de2fb6237e1132d447331a19fe6fb7efa6defe',
|
|
2354
|
+
],
|
|
2355
|
+
missing: 'allowed',
|
|
2356
|
+
},
|
|
2273
2357
|
];
|
|
2274
2358
|
/** The native image rule's script (ports.rs `HOOK_SCRIPT_SHA256` image-context-guard) and the hook-lib.sh revisions it accepts. */
|
|
2275
2359
|
export const PRE_TOOL_USE_IMAGE_GUARD_PINS = [
|
|
@@ -2499,7 +2583,13 @@ export function stableEngineCommand(command, windows) {
|
|
|
2499
2583
|
export function preToolUseHold(root, host, hooks = []) {
|
|
2500
2584
|
const files = host === 'codex'
|
|
2501
2585
|
? [...PRE_TOOL_USE_DISPATCHER_PINS, ...PRE_TOOL_USE_CODEX_DISPATCHER_PINS, PRE_TOOL_USE_CODEX_ADAPTER_PIN]
|
|
2502
|
-
:
|
|
2586
|
+
: host === 'grok'
|
|
2587
|
+
? [...PRE_TOOL_USE_DISPATCHER_PINS, ...PRE_TOOL_USE_GROK_DISPATCHER_PINS, PRE_TOOL_USE_GROK_ADAPTER_PIN]
|
|
2588
|
+
: host === 'agents-v2'
|
|
2589
|
+
? [...PRE_TOOL_USE_DISPATCHER_PINS, ...PRE_TOOL_USE_AGENTS_V2_DISPATCHER_PINS]
|
|
2590
|
+
: host === 'fleet-local'
|
|
2591
|
+
? [...PRE_TOOL_USE_DISPATCHER_PINS, ...PRE_TOOL_USE_FLEET_LOCAL_DISPATCHER_PINS]
|
|
2592
|
+
: [...PRE_TOOL_USE_DISPATCHER_PINS, ...PRE_TOOL_USE_CLAUDE_DISPATCHER_PINS];
|
|
2503
2593
|
const credential = PRE_TOOL_USE_CREDENTIAL_GUARD_GENERATIONS;
|
|
2504
2594
|
const evaluator = () => {
|
|
2505
2595
|
for (const pin of PRE_TOOL_USE_FRONTMATTER_EVALUATOR_PINS) {
|
|
@@ -2512,7 +2602,7 @@ export function preToolUseHold(root, host, hooks = []) {
|
|
|
2512
2602
|
return null;
|
|
2513
2603
|
};
|
|
2514
2604
|
return pinnedFilesHold(root, 'PreToolUse', files)
|
|
2515
|
-
?? (host === 'codex' ? codexExecFormSettingsHold(root, 'PreToolUse') : null)
|
|
2605
|
+
?? ((host === 'codex' || host === 'grok' || fleetHost(host)) ? codexExecFormSettingsHold(root, 'PreToolUse') : null)
|
|
2516
2606
|
?? pinnedFilesHold(root, 'PreToolUse', PRE_TOOL_USE_VAULT_GUARD_PINS)
|
|
2517
2607
|
?? pinnedFilesHold(root, 'PreToolUse', PRE_TOOL_USE_CLAIMED_SCRIPT_PINS)
|
|
2518
2608
|
?? pinnedFilesHold(root, 'PreToolUse', [
|
|
@@ -2538,7 +2628,7 @@ export const PROMPT_COMPANY_BIND_PINS = [
|
|
|
2538
2628
|
],
|
|
2539
2629
|
},
|
|
2540
2630
|
{ relative: 'core/scripts/hq-session.sh', accepted: ['db701162f71b53fd2188974d2f46c58250593dde1252d65b36e6d02b9a765fe7', '02a37c5dbf4fb5af27cc64d0f271121e990758b757a479f60e9ce099f4d65ded', 'd4d4aef60ff8b095e3abcc817598f376d3c2de8d59758c3ed6dd40d4aa4b11fb'] },
|
|
2541
|
-
{ relative: 'core/scripts/lib/session-id.sh', accepted: ['2ebbc50893c7c601a111b9e8f9945afeac88f552d7caeec09c4096f4c27a833d'] },
|
|
2631
|
+
{ relative: 'core/scripts/lib/session-id.sh', accepted: ['2ebbc50893c7c601a111b9e8f9945afeac88f552d7caeec09c4096f4c27a833d', 'd6a04155571ec53edd853878cebaba5a5bab93801a73e356499440c1cd009c71'] },
|
|
2542
2632
|
{ relative: 'core/scripts/lib/session-scope-capability.sh', accepted: ['388ffef43cfe05810c38ce377245d0d86f415b4009b21a008bca8897be0c9ead'] },
|
|
2543
2633
|
];
|
|
2544
2634
|
/**
|
|
@@ -2598,6 +2688,7 @@ export const CODEX_POST_TOOL_USE_GENERATIONS = [
|
|
|
2598
2688
|
['3c3196254614df7b14dccad507dcee3299fa8cf9c163a6903eac2d86fb2159c5', '98da450068af022eb1eee5420a4eca98867b91690e57316ee565eb7788fb6e7a'],
|
|
2599
2689
|
['a3178b59e633310f3cc39a8c257ff58863169696ffda04dc6ea93a34a5db05ef', '940bb5a0a268929a4cd3f88b61a0ce619f0fdf64e5d3f25f7f18da35df466ab5'],
|
|
2600
2690
|
['a3178b59e633310f3cc39a8c257ff58863169696ffda04dc6ea93a34a5db05ef', CLASSIFYING_ADAPTER_CORE_SHA256],
|
|
2691
|
+
['a905f51887c497165df1e46e703a504fee7dbc6c879ebcec845d585b13151f52', CLASSIFYING_ADAPTER_CORE_SHA256],
|
|
2601
2692
|
];
|
|
2602
2693
|
/** The (Grok adapter, hook-adapter-core.sh) pairs of crates/hq-hook/src/post_hooks/grok.rs `ADAPTER_GENERATIONS`. */
|
|
2603
2694
|
export const GROK_POST_TOOL_USE_GENERATIONS = [
|
|
@@ -21,6 +21,7 @@
|
|
|
21
21
|
"1b082635f2166ca668fe8f8ad180e1c8dc6e3517f5657beece68056200219350",
|
|
22
22
|
"5a74d090475b7112f1013f1f11b777dd9cff9032608030d3ab004e56567b5b3d",
|
|
23
23
|
"7ac8365fa95474b2003caa1ff8bed07c88e18abc4d4cbae041f0249dd826a70c",
|
|
24
|
+
"825dd3fbbe6ddbf699d2cc50fb313313dc286e06255904cb5c14c2f99c3eb51f",
|
|
24
25
|
"afdc525b83ad443ca3cbafd650746599f702748b9d01e1e6c34f747fb5e098ae",
|
|
25
26
|
"bc8ddf7a648832db6314a989a7c26355f59909cbbcb001c553c6150f072623e8",
|
|
26
27
|
"ca4f0c5cf4c1de34e90f8e3e3114a025958fa78905c569b3a780cca0506e71f8",
|
|
@@ -38,6 +39,7 @@
|
|
|
38
39
|
"22258fbc7b86d807148fbbb1aad25cce68ae653efc44bed6f2d9f2c445a03144",
|
|
39
40
|
"320d13924e430aaa5fd227f15a502c1c5d7c793351133c2ff5d9611e1bf8847e",
|
|
40
41
|
"368f8944ea69f125c221b5d502028bb3efad4f8ef212d91ff91c64d0ace1e880",
|
|
42
|
+
"436493e3325fb0cbcad651ae8ef42d89f4adf43fe38abd938ed6a39c0b6d17c1",
|
|
41
43
|
"49c337ceccf0a2d7c2a64f6b1de8c3c4d1da507bc5d7afcd01ed292e1f25abf7",
|
|
42
44
|
"4c98cd6f07d4090c062d980b0d85b0084635efdcd4a09afc05cf77287a74b28d",
|
|
43
45
|
"4fe86a1847962a62e203ccba9e20f46f5c2dce050b9d3a5f2aa52b5f95e82d36",
|
|
@@ -68,7 +70,8 @@
|
|
|
68
70
|
"4828d36894273d27a30d1a07a8d8cd649c50ea86ada3505e298a6543a6c84832",
|
|
69
71
|
"5178dfed9387cf5924bb71d5cdded37f445fd7b496e6037e81c43af0e7831d5b",
|
|
70
72
|
"7e615d46df287b8aa9786819cb7e0d49e1d4b0c448bfade59f5fee9d5d169cde",
|
|
71
|
-
"9c5c2ea68f6564e547d8e7f82bed64622c3bc3f78da05b03a2e928db9d1dc0db"
|
|
73
|
+
"9c5c2ea68f6564e547d8e7f82bed64622c3bc3f78da05b03a2e928db9d1dc0db",
|
|
74
|
+
"d6a04155571ec53edd853878cebaba5a5bab93801a73e356499440c1cd009c71"
|
|
72
75
|
],
|
|
73
76
|
".claude/hooks/master-hook.sh": [
|
|
74
77
|
"00ce7c7d805b6300d6a987c340ecf48c5ccbbdf2c6d02265e191975c9cf43424",
|
|
@@ -422,6 +425,10 @@
|
|
|
422
425
|
"1a2439aee50652c5143ccd18561a0aa84a1e94848d02c1aa1c99157f70023f29"
|
|
423
426
|
],
|
|
424
427
|
"fromBeta104SessionId": "2ebbc50893c7c601a111b9e8f9945afeac88f552d7caeec09c4096f4c27a833d",
|
|
428
|
+
"fromBeta104SessionIds": [
|
|
429
|
+
"2ebbc50893c7c601a111b9e8f9945afeac88f552d7caeec09c4096f4c27a833d",
|
|
430
|
+
"d6a04155571ec53edd853878cebaba5a5bab93801a73e356499440c1cd009c71"
|
|
431
|
+
],
|
|
425
432
|
"fileOrder": [
|
|
426
433
|
".claude/hooks/precompact-thrashing-detector.sh",
|
|
427
434
|
".claude/hooks/auto-checkpoint-precompact.sh",
|
|
@@ -137,7 +137,8 @@
|
|
|
137
137
|
"b971dae4a2b82bfa5b31782e54717115abaf052457fb1a546893d04cae43adbb",
|
|
138
138
|
"df3d8ddc15a0c179227c9ba7f855c040973fcee249673156d08b2e2ff2c850b8",
|
|
139
139
|
"49c337ceccf0a2d7c2a64f6b1de8c3c4d1da507bc5d7afcd01ed292e1f25abf7",
|
|
140
|
-
"9133295e5ce523bf8355a093bbea5a1c19682ec42b59ab6b626dffbc33544f3f"
|
|
140
|
+
"9133295e5ce523bf8355a093bbea5a1c19682ec42b59ab6b626dffbc33544f3f",
|
|
141
|
+
"436493e3325fb0cbcad651ae8ef42d89f4adf43fe38abd938ed6a39c0b6d17c1"
|
|
141
142
|
],
|
|
142
143
|
"core/scripts/hook-stop-async-drain.sh": [
|
|
143
144
|
"d7be9aa17c42bd96ba6f9d929240e06d9c057471347374de40ea4be3560da4f5"
|
|
@@ -184,7 +185,8 @@
|
|
|
184
185
|
],
|
|
185
186
|
"core/scripts/lib/session-id.sh": [
|
|
186
187
|
"5178dfed9387cf5924bb71d5cdded37f445fd7b496e6037e81c43af0e7831d5b",
|
|
187
|
-
"2ebbc50893c7c601a111b9e8f9945afeac88f552d7caeec09c4096f4c27a833d"
|
|
188
|
+
"2ebbc50893c7c601a111b9e8f9945afeac88f552d7caeec09c4096f4c27a833d",
|
|
189
|
+
"d6a04155571ec53edd853878cebaba5a5bab93801a73e356499440c1cd009c71"
|
|
188
190
|
],
|
|
189
191
|
"core/scripts/lib/session-scope-capability.sh": [
|
|
190
192
|
"388ffef43cfe05810c38ce377245d0d86f415b4009b21a008bca8897be0c9ead"
|
|
@@ -350,10 +352,12 @@
|
|
|
350
352
|
"b373b582a906b0993a3ce56aa43c1ef0aec6668a6b7e150d59ef3214b7d65b70"
|
|
351
353
|
],
|
|
352
354
|
"core/scripts/hook-lib.sh": [
|
|
353
|
-
"9133295e5ce523bf8355a093bbea5a1c19682ec42b59ab6b626dffbc33544f3f"
|
|
355
|
+
"9133295e5ce523bf8355a093bbea5a1c19682ec42b59ab6b626dffbc33544f3f",
|
|
356
|
+
"436493e3325fb0cbcad651ae8ef42d89f4adf43fe38abd938ed6a39c0b6d17c1"
|
|
354
357
|
],
|
|
355
358
|
"core/scripts/lib/session-id.sh": [
|
|
356
|
-
"2ebbc50893c7c601a111b9e8f9945afeac88f552d7caeec09c4096f4c27a833d"
|
|
359
|
+
"2ebbc50893c7c601a111b9e8f9945afeac88f552d7caeec09c4096f4c27a833d",
|
|
360
|
+
"d6a04155571ec53edd853878cebaba5a5bab93801a73e356499440c1cd009c71"
|
|
357
361
|
],
|
|
358
362
|
"core/scripts/lib/work-mesh-live-hook.sh": [
|
|
359
363
|
"2962e17569d62f5953d41cd516bd7d1b3db9849c3c4fbbd750ae13d7d181bcbe"
|