@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
|
@@ -4,16 +4,27 @@
|
|
|
4
4
|
* - merge_holds: every repository merge hold record under
|
|
5
5
|
* <hqRoot>/workspace/lanes/holds, grouped by the company that owns it, with
|
|
6
6
|
* that company's `lanes.repo-merge-hold` flag;
|
|
7
|
-
* - merge_approvals: per session id, the conduct
|
|
8
|
-
* gates the session's merges
|
|
9
|
-
*
|
|
10
|
-
*
|
|
7
|
+
* - merge_approvals: per session id, the conduct link whose decision queue
|
|
8
|
+
* gates the session's merges and whether that queue could be read (closed
|
|
9
|
+
* links and stale conductor pointers omitted), the session's company, and
|
|
10
|
+
* whether the `lanes.review-before-merge` gate applies to it, with the lane
|
|
11
|
+
* review records.
|
|
12
|
+
*
|
|
13
|
+
* `decisions` is always written as an empty array. The native owner-approval
|
|
14
|
+
* gate (crates/hq-hook/src/rules/conduct_files.rs) reads the conduct link and
|
|
15
|
+
* its decision queue from disk when the merge is called, so unanswered,
|
|
16
|
+
* withdrawn and superseded decisions are decided there; no reader decides from
|
|
17
|
+
* this section's copy. Copying the queue once per session made the section
|
|
18
|
+
* grow with sessions x queue length (4.5 MB on one machine). The key stays,
|
|
19
|
+
* as an empty array, because released hook binaries require it when
|
|
20
|
+
* queue_status is "present".
|
|
11
21
|
*
|
|
12
22
|
* The native merge check in crates/hq-hook reads only these two sections and
|
|
13
23
|
* starts no process. It refuses every merge while a section is missing, has a
|
|
14
|
-
* missing or wrongly typed field,
|
|
15
|
-
* min(max_age_seconds, 60) seconds, so whenever a
|
|
16
|
-
* the section (or the session) is written so the
|
|
24
|
+
* missing or wrongly typed field, exceeds MAX_SECTION_BYTES (256 KiB), or its
|
|
25
|
+
* `refreshed_at` is older than min(max_age_seconds, 60) seconds, so whenever a
|
|
26
|
+
* decision cannot be made here the section (or the session) is written so the
|
|
27
|
+
* check refuses:
|
|
17
28
|
*
|
|
18
29
|
* - a hold file `hq runners hold` would refuse, an unreadable holds folder, or
|
|
19
30
|
* an unreadable `lanes.repo-merge-hold` flag omits merge_holds;
|
|
@@ -22,7 +33,12 @@
|
|
|
22
33
|
* whose company cannot be resolved is written with queue_status
|
|
23
34
|
* "unreadable";
|
|
24
35
|
* - an unreadable `lanes.review-before-merge` flag writes review_required
|
|
25
|
-
* true with no reviews
|
|
36
|
+
* true with no reviews;
|
|
37
|
+
* - if merge_approvals would still exceed MERGE_APPROVALS_MAX_SECTION_BYTES
|
|
38
|
+
* (a backstop: with no decisions copied it is not expected), the largest
|
|
39
|
+
* sessions lose their review records while keeping review_required, so
|
|
40
|
+
* only those sessions refuse, rather than letting the whole section exceed
|
|
41
|
+
* the reader's cap and refuse every session.
|
|
26
42
|
*
|
|
27
43
|
* Files are read through src/lib/safe-store.ts (a regular single-link file of
|
|
28
44
|
* this user in a folder no other user can write), except lane records and
|
|
@@ -43,6 +59,12 @@ import { TERMINAL_LANE_STATES } from "../lanes/types.js";
|
|
|
43
59
|
import { findSecretText } from "../lanes/text-scan.js";
|
|
44
60
|
export const MERGE_HOLDS_SCHEMA = "merge-holds.v1";
|
|
45
61
|
export const MERGE_APPROVALS_SCHEMA = "merge-approvals.v1";
|
|
62
|
+
export const MERGE_APPROVALS_SECTION_NAME = "merge_approvals";
|
|
63
|
+
/**
|
|
64
|
+
* Per-section cap enforced by `crates/hq-hook/src/state.rs` (`MAX_SECTION_BYTES`):
|
|
65
|
+
* the section name (`"merge_approvals"`) plus compact UTF-8 JSON bytes.
|
|
66
|
+
*/
|
|
67
|
+
export const MERGE_APPROVALS_MAX_SECTION_BYTES = 256 * 1024;
|
|
46
68
|
/** Written as each section's max_age_seconds; the native check caps it at 60 anyway. */
|
|
47
69
|
export const MERGE_SECTION_MAX_AGE_SECONDS = 60;
|
|
48
70
|
/**
|
|
@@ -62,9 +84,11 @@ const COMPANY_UID_RE = /^cmp_[A-Za-z0-9]{3,128}$/;
|
|
|
62
84
|
const COMPANY_SLUG_RE = /^[A-Za-z0-9][A-Za-z0-9_-]{0,63}$/;
|
|
63
85
|
const MAX_HOLD_BYTES = 1024 * 1024;
|
|
64
86
|
const MAX_POINTER_BYTES = 4096;
|
|
87
|
+
const MAX_LINK_META_BYTES = 64 * 1024;
|
|
65
88
|
const MAX_QUEUE_BYTES = 4 * 1024 * 1024;
|
|
66
89
|
const MAX_SESSION_META_BYTES = 256 * 1024;
|
|
67
|
-
const
|
|
90
|
+
const LINKS_REL = path.join("workspace", "lanes-links");
|
|
91
|
+
const LINKS_BY_SESSION_REL = path.join(LINKS_REL, "by-session");
|
|
68
92
|
const CONDUCT_REPORTS_REL = path.join("workspace", "reports", "conduct");
|
|
69
93
|
const TERMINAL_STATES = new Set(TERMINAL_LANE_STATES);
|
|
70
94
|
/** A folder through safe-store: the store, "missing", or "refused". */
|
|
@@ -96,6 +120,9 @@ function readOne(file, maxBytes) {
|
|
|
96
120
|
function isRecord(value) {
|
|
97
121
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
98
122
|
}
|
|
123
|
+
function isSafeLinkId(value) {
|
|
124
|
+
return value !== "." && value !== ".." && LINK_ID_RE.test(value);
|
|
125
|
+
}
|
|
99
126
|
/**
|
|
100
127
|
* Every hold record, or null when any of them is one `hq runners hold list`
|
|
101
128
|
* would refuse (unreadable, not JSON, invalid fields, or a file name that
|
|
@@ -218,36 +245,108 @@ export function foldDecisionQueue(text) {
|
|
|
218
245
|
}
|
|
219
246
|
return { decisions, skipped };
|
|
220
247
|
}
|
|
248
|
+
/**
|
|
249
|
+
* Read `workspace/lanes-links/<link>/meta.json` through safe-store. Returns
|
|
250
|
+
* null when the file is missing, refused, or not a JSON object so callers
|
|
251
|
+
* never drop a session without positive proof its link is closed or stale.
|
|
252
|
+
*/
|
|
253
|
+
function readLinkMeta(hqRoot, link, cache) {
|
|
254
|
+
if (cache.has(link))
|
|
255
|
+
return cache.get(link);
|
|
256
|
+
const read = readOne(path.join(hqRoot, LINKS_REL, link, "meta.json"), MAX_LINK_META_BYTES);
|
|
257
|
+
if (read.kind !== "text") {
|
|
258
|
+
cache.set(link, null);
|
|
259
|
+
return null;
|
|
260
|
+
}
|
|
261
|
+
let parsed;
|
|
262
|
+
try {
|
|
263
|
+
parsed = JSON.parse(read.text);
|
|
264
|
+
}
|
|
265
|
+
catch {
|
|
266
|
+
cache.set(link, null);
|
|
267
|
+
return null;
|
|
268
|
+
}
|
|
269
|
+
if (!isRecord(parsed)) {
|
|
270
|
+
cache.set(link, null);
|
|
271
|
+
return null;
|
|
272
|
+
}
|
|
273
|
+
const meta = {
|
|
274
|
+
closed: Boolean(parsed.closed),
|
|
275
|
+
conductorSession: typeof parsed.conductor_session === "string" ? parsed.conductor_session : null,
|
|
276
|
+
};
|
|
277
|
+
cache.set(link, meta);
|
|
278
|
+
return meta;
|
|
279
|
+
}
|
|
280
|
+
/**
|
|
281
|
+
* Same staleness rule as `dropStalePointer` in `src/lib/lanes/links.ts`:
|
|
282
|
+
* a pointer is stale when its link's meta.json marks the link closed, or when
|
|
283
|
+
* a conductor pointer no longer names the link's conductor_session.
|
|
284
|
+
*/
|
|
285
|
+
function isStaleLinkPointer(hqRoot, sid, role, link, metaCache) {
|
|
286
|
+
const meta = readLinkMeta(hqRoot, link, metaCache);
|
|
287
|
+
if (!meta)
|
|
288
|
+
return false;
|
|
289
|
+
if (meta.closed)
|
|
290
|
+
return true;
|
|
291
|
+
if (role === "conductor" && meta.conductorSession !== null && meta.conductorSession !== sid)
|
|
292
|
+
return true;
|
|
293
|
+
return false;
|
|
294
|
+
}
|
|
295
|
+
/**
|
|
296
|
+
* Whether a link's decision queue exists and can be read, once per link per
|
|
297
|
+
* build. Its rows are not copied: the native owner-approval gate reads the
|
|
298
|
+
* queue file itself when the merge is called.
|
|
299
|
+
*/
|
|
300
|
+
function readQueueStatus(conduct, link, queueCache) {
|
|
301
|
+
const cached = queueCache.get(link);
|
|
302
|
+
if (cached)
|
|
303
|
+
return cached;
|
|
304
|
+
let status;
|
|
305
|
+
if (conduct === "missing") {
|
|
306
|
+
status = "absent";
|
|
307
|
+
}
|
|
308
|
+
else if (conduct === "refused") {
|
|
309
|
+
status = "unreadable";
|
|
310
|
+
}
|
|
311
|
+
else {
|
|
312
|
+
const queue = readIn(conduct, `${link}-decisions.jsonl`, MAX_QUEUE_BYTES);
|
|
313
|
+
if (queue.kind === "missing") {
|
|
314
|
+
status = "absent";
|
|
315
|
+
}
|
|
316
|
+
else if (queue.kind === "refused") {
|
|
317
|
+
status = "unreadable";
|
|
318
|
+
}
|
|
319
|
+
else {
|
|
320
|
+
// Unchanged from when rows were copied: a queue holding sensitive text
|
|
321
|
+
// is written as unreadable, so no change here can turn it into a go.
|
|
322
|
+
const { decisions } = foldDecisionQueue(queue.text);
|
|
323
|
+
const sensitive = decisions.some((decision) => Object.values(decision).some((text) => findSecretText(text)));
|
|
324
|
+
status = sensitive ? "unreadable" : "present";
|
|
325
|
+
}
|
|
326
|
+
}
|
|
327
|
+
queueCache.set(link, status);
|
|
328
|
+
return status;
|
|
329
|
+
}
|
|
221
330
|
/**
|
|
222
331
|
* The conduct gate for one session: null when the gate does not cover it (no
|
|
223
|
-
* link pointer,
|
|
224
|
-
*
|
|
332
|
+
* link pointer, a pointer without a valid link id, or a pointer to a closed
|
|
333
|
+
* link / superseded conductor), else its link and whether its queue could be
|
|
334
|
+
* read. A pointer that exists but cannot be read gives an unreadable queue.
|
|
225
335
|
*/
|
|
226
|
-
function readLinkQueue(byFolder, conduct, sid) {
|
|
336
|
+
function readLinkQueue(hqRoot, byFolder, conduct, sid, metaCache, queueCache) {
|
|
227
337
|
const pointer = readIn(byFolder, sid, MAX_POINTER_BYTES);
|
|
228
338
|
if (pointer.kind === "missing")
|
|
229
339
|
return null;
|
|
230
340
|
if (pointer.kind === "refused")
|
|
231
|
-
return { link_id: "", queue_status: "unreadable"
|
|
232
|
-
const
|
|
233
|
-
|
|
341
|
+
return { link_id: "", queue_status: "unreadable" };
|
|
342
|
+
const words = pointer.text.trim().split(/\s+/);
|
|
343
|
+
const role = words[0] ?? "";
|
|
344
|
+
const link = words[1] ?? "";
|
|
345
|
+
if (!isSafeLinkId(link))
|
|
234
346
|
return null;
|
|
235
|
-
if (
|
|
236
|
-
return
|
|
237
|
-
|
|
238
|
-
return { link_id: link, queue_status: "unreadable", decisions: [] };
|
|
239
|
-
const queue = readIn(conduct, `${link}-decisions.jsonl`, MAX_QUEUE_BYTES);
|
|
240
|
-
if (queue.kind === "missing")
|
|
241
|
-
return { link_id: link, queue_status: "absent", decisions: [] };
|
|
242
|
-
if (queue.kind === "refused")
|
|
243
|
-
return { link_id: link, queue_status: "unreadable", decisions: [] };
|
|
244
|
-
const decisions = foldDecisionQueue(queue.text).decisions;
|
|
245
|
-
// Queue answers are free text. Never copy credentials into hq-state.json;
|
|
246
|
-
// an unreadable queue preserves refusal rather than granting approval.
|
|
247
|
-
if (decisions.some((decision) => Object.values(decision).some((text) => findSecretText(text)))) {
|
|
248
|
-
return { link_id: link, queue_status: "unreadable", decisions: [] };
|
|
249
|
-
}
|
|
250
|
-
return { link_id: link, queue_status: "present", decisions };
|
|
347
|
+
if (isStaleLinkPointer(hqRoot, sid, role, link, metaCache))
|
|
348
|
+
return null;
|
|
349
|
+
return { link_id: link, queue_status: readQueueStatus(conduct, link, queueCache) };
|
|
251
350
|
}
|
|
252
351
|
/** `companies/<slug>/.company-uid` when it exists, else the slug's cloud_uid in companies/manifest.yaml. */
|
|
253
352
|
function companyUidForSlug(hqRoot, slug) {
|
|
@@ -274,7 +373,7 @@ function sessionMetaCompany(hqRoot, sid) {
|
|
|
274
373
|
}
|
|
275
374
|
function laneSessionIds(lane) {
|
|
276
375
|
const ids = [lane.provider_session_id, lane.last_resume?.session_id];
|
|
277
|
-
return ids.filter((id) => typeof id === "string" &&
|
|
376
|
+
return ids.filter((id) => typeof id === "string" && isSafeLinkId(id));
|
|
278
377
|
}
|
|
279
378
|
/**
|
|
280
379
|
* The review context `hq runners hold check` builds for a caller lane, for every
|
|
@@ -367,6 +466,86 @@ async function laneSessions(hqRoot, readFlag) {
|
|
|
367
466
|
}
|
|
368
467
|
return { sessions: out, reviewFlags };
|
|
369
468
|
}
|
|
469
|
+
/**
|
|
470
|
+
* Exact byte size `crates/hq-hook/src/state.rs` measures against
|
|
471
|
+
* `MAX_SECTION_BYTES`: section name plus compact UTF-8 JSON bytes.
|
|
472
|
+
*/
|
|
473
|
+
export function mergeApprovalsSectionBytes(section) {
|
|
474
|
+
return Buffer.byteLength(MERGE_APPROVALS_SECTION_NAME, "utf8")
|
|
475
|
+
+ Buffer.byteLength(JSON.stringify(section), "utf8");
|
|
476
|
+
}
|
|
477
|
+
function sessionEntryBytes(sid, entry) {
|
|
478
|
+
return Buffer.byteLength(`${JSON.stringify(sid)}:${JSON.stringify(entry)}`, "utf8");
|
|
479
|
+
}
|
|
480
|
+
/**
|
|
481
|
+
* Keep `merge_approvals` within the native reader's per-section byte cap so an
|
|
482
|
+
* oversized section never refuses every session. A backstop: with no decision
|
|
483
|
+
* rows copied, a section holds about 200 bytes per session plus review records.
|
|
484
|
+
* Largest sessions are reduced first:
|
|
485
|
+
* 1. largest byte reductions first: `reviews` emptied while keeping
|
|
486
|
+
* `review_required: true`, so only the affected senior sessions refuse;
|
|
487
|
+
* 2. if even empty-payload shells exceed the cap, non-review conduct sessions
|
|
488
|
+
* are omitted (their owner-approval gate is still enforced from disk by
|
|
489
|
+
* `conduct_files`);
|
|
490
|
+
* 3. if the remaining section still cannot fit, return null (fail-closed).
|
|
491
|
+
* Logs at most one line whenever the guard intervenes.
|
|
492
|
+
*/
|
|
493
|
+
function fitMergeApprovalsSection(section, maxBytes, log) {
|
|
494
|
+
const initialBytes = mergeApprovalsSectionBytes(section);
|
|
495
|
+
if (initialBytes <= maxBytes)
|
|
496
|
+
return section;
|
|
497
|
+
let currentBytes = initialBytes;
|
|
498
|
+
const sessions = section.sessions;
|
|
499
|
+
const sids = Object.keys(sessions);
|
|
500
|
+
const totalSessions = sids.length;
|
|
501
|
+
const degraded = new Set();
|
|
502
|
+
const candidates = [];
|
|
503
|
+
for (const sid of sids) {
|
|
504
|
+
const entry = sessions[sid];
|
|
505
|
+
if (entry.reviews.length > 0) {
|
|
506
|
+
const saved = sessionEntryBytes(sid, entry) - sessionEntryBytes(sid, { ...entry, reviews: [] });
|
|
507
|
+
if (saved > 0)
|
|
508
|
+
candidates.push({ sid, saved });
|
|
509
|
+
}
|
|
510
|
+
}
|
|
511
|
+
candidates.sort((a, b) => b.saved - a.saved || (a.sid < b.sid ? -1 : a.sid > b.sid ? 1 : 0));
|
|
512
|
+
for (const candidate of candidates) {
|
|
513
|
+
if (currentBytes <= maxBytes)
|
|
514
|
+
break;
|
|
515
|
+
sessions[candidate.sid] = { ...sessions[candidate.sid], reviews: [] };
|
|
516
|
+
currentBytes -= candidate.saved;
|
|
517
|
+
degraded.add(candidate.sid);
|
|
518
|
+
}
|
|
519
|
+
let omitted = 0;
|
|
520
|
+
let remaining = totalSessions;
|
|
521
|
+
if (currentBytes > maxBytes) {
|
|
522
|
+
const dropCandidates = Object.keys(sessions)
|
|
523
|
+
.filter((sid) => !sessions[sid].review_required)
|
|
524
|
+
.map((sid) => ({ sid, bytes: sessionEntryBytes(sid, sessions[sid]) }))
|
|
525
|
+
.sort((a, b) => b.bytes - a.bytes || (a.sid < b.sid ? -1 : a.sid > b.sid ? 1 : 0));
|
|
526
|
+
for (const candidate of dropCandidates) {
|
|
527
|
+
if (currentBytes <= maxBytes)
|
|
528
|
+
break;
|
|
529
|
+
delete sessions[candidate.sid];
|
|
530
|
+
degraded.delete(candidate.sid);
|
|
531
|
+
currentBytes -= candidate.bytes + (remaining > 1 ? 1 : 0);
|
|
532
|
+
remaining -= 1;
|
|
533
|
+
omitted += 1;
|
|
534
|
+
}
|
|
535
|
+
}
|
|
536
|
+
const finalBytes = mergeApprovalsSectionBytes(section);
|
|
537
|
+
if (finalBytes > maxBytes) {
|
|
538
|
+
log?.("warn", `merge_approvals: omitted section (${initialBytes} bytes; still ${finalBytes} bytes after trimming ${totalSessions} session(s), exceeds ${maxBytes}-byte cap)`);
|
|
539
|
+
return null;
|
|
540
|
+
}
|
|
541
|
+
const actions = [];
|
|
542
|
+
if (degraded.size > 0)
|
|
543
|
+
actions.push(`trimmed ${degraded.size} of ${totalSessions} session(s)`);
|
|
544
|
+
if (omitted > 0)
|
|
545
|
+
actions.push(`omitted ${omitted} conduct-only session(s)`);
|
|
546
|
+
log?.("warn", `merge_approvals: ${actions.join(" and ")} to stay within ${maxBytes}-byte cap (${initialBytes} -> ${finalBytes} bytes)`);
|
|
547
|
+
return section;
|
|
548
|
+
}
|
|
370
549
|
/** The merge_approvals section, or null to leave it out of the state file. */
|
|
371
550
|
export async function buildMergeApprovalsSection(input) {
|
|
372
551
|
const { hqRoot } = input;
|
|
@@ -376,14 +555,16 @@ export async function buildMergeApprovalsSection(input) {
|
|
|
376
555
|
const conduct = openFolder(path.join(hqRoot, CONDUCT_REPORTS_REL));
|
|
377
556
|
try {
|
|
378
557
|
const links = new Map();
|
|
558
|
+
const metaCache = new Map();
|
|
559
|
+
const queueCache = new Map();
|
|
379
560
|
if (byFolder !== "missing") {
|
|
380
561
|
const listed = byFolder.list();
|
|
381
562
|
if (!listed.ok)
|
|
382
563
|
return null;
|
|
383
564
|
for (const sid of listed.value.sort()) {
|
|
384
|
-
if (!
|
|
565
|
+
if (!isSafeLinkId(sid))
|
|
385
566
|
continue;
|
|
386
|
-
const queue = readLinkQueue(byFolder, conduct, sid);
|
|
567
|
+
const queue = readLinkQueue(hqRoot, byFolder, conduct, sid, metaCache, queueCache);
|
|
387
568
|
if (queue)
|
|
388
569
|
links.set(sid, queue);
|
|
389
570
|
}
|
|
@@ -431,18 +612,19 @@ export async function buildMergeApprovalsSection(input) {
|
|
|
431
612
|
company_slug: company.slug,
|
|
432
613
|
link_id: link?.link_id ?? "",
|
|
433
614
|
queue_status: link?.queue_status ?? "absent",
|
|
434
|
-
decisions:
|
|
615
|
+
decisions: [],
|
|
435
616
|
review_required: review !== "off",
|
|
436
617
|
reviews: review === "required" ? allReviews() : [],
|
|
437
618
|
};
|
|
438
619
|
}
|
|
439
|
-
|
|
620
|
+
const section = {
|
|
440
621
|
schema: MERGE_APPROVALS_SCHEMA,
|
|
441
622
|
refreshed_at: input.now.toISOString(),
|
|
442
623
|
max_age_seconds: MERGE_SECTION_MAX_AGE_SECONDS,
|
|
443
624
|
review_flags: laneFacts.reviewFlags,
|
|
444
625
|
sessions,
|
|
445
626
|
};
|
|
627
|
+
return fitMergeApprovalsSection(section, input.maxApprovalsSectionBytes ?? MERGE_APPROVALS_MAX_SECTION_BYTES, input.log);
|
|
446
628
|
}
|
|
447
629
|
finally {
|
|
448
630
|
if (typeof byFolder === "object")
|
|
@@ -541,6 +723,7 @@ export function startMergeSectionRefresh(options) {
|
|
|
541
723
|
let closed = false;
|
|
542
724
|
let timer;
|
|
543
725
|
let running;
|
|
726
|
+
let lastWarning;
|
|
544
727
|
const fresh = (section) => {
|
|
545
728
|
if (!section)
|
|
546
729
|
return null;
|
|
@@ -557,9 +740,23 @@ export function startMergeSectionRefresh(options) {
|
|
|
557
740
|
catch {
|
|
558
741
|
hqRoot = undefined;
|
|
559
742
|
}
|
|
743
|
+
let warned = false;
|
|
744
|
+
const buildLog = options.log
|
|
745
|
+
? (level, message) => {
|
|
746
|
+
if (level === "warn") {
|
|
747
|
+
warned = true;
|
|
748
|
+
if (message === lastWarning)
|
|
749
|
+
return;
|
|
750
|
+
lastWarning = message;
|
|
751
|
+
}
|
|
752
|
+
options.log?.(level, message);
|
|
753
|
+
}
|
|
754
|
+
: undefined;
|
|
560
755
|
current = hqRoot
|
|
561
|
-
? await buildMergeSections({ hqRoot, now, readFlag: options.readFlag })
|
|
756
|
+
? await buildMergeSections({ hqRoot, now, readFlag: options.readFlag, log: buildLog })
|
|
562
757
|
: { merge_holds: null, merge_approvals: null };
|
|
758
|
+
if (!warned)
|
|
759
|
+
lastWarning = undefined;
|
|
563
760
|
if (closed)
|
|
564
761
|
return;
|
|
565
762
|
try {
|
|
@@ -35,6 +35,8 @@ export declare const SKILL_COMMAND_LIB = "core/scripts/hook-lib.sh";
|
|
|
35
35
|
export declare const SKILL_COMMAND_HOOK_SHA256 = "e6ddbaf1fe8f996fa0ade56cc89c3634782db49ab90becff3380bcb0ef6c5c3c";
|
|
36
36
|
/** sha256 of the pinned `hook-lib.sh` (same value as `skill_command_script::LIB_SHA256`). */
|
|
37
37
|
export declare const SKILL_COMMAND_LIB_SHA256 = "9133295e5ce523bf8355a093bbea5a1c19682ec42b59ab6b626dffbc33544f3f";
|
|
38
|
+
/** All accepted `hook-lib.sh` revisions (same values as `skill_command_script::ACCEPTED_LIB_SHA256`). */
|
|
39
|
+
export declare const SKILL_COMMAND_LIB_ACCEPTED: readonly string[];
|
|
38
40
|
/**
|
|
39
41
|
* The libraries the hook sources only when they are present (ANSWERS-1817
|
|
40
42
|
* Q-SCS8 (b)): absent is the released behaviour; present, they must be the
|
|
@@ -39,6 +39,11 @@ export const SKILL_COMMAND_LIB = "core/scripts/hook-lib.sh";
|
|
|
39
39
|
export const SKILL_COMMAND_HOOK_SHA256 = "e6ddbaf1fe8f996fa0ade56cc89c3634782db49ab90becff3380bcb0ef6c5c3c";
|
|
40
40
|
/** sha256 of the pinned `hook-lib.sh` (same value as `skill_command_script::LIB_SHA256`). */
|
|
41
41
|
export const SKILL_COMMAND_LIB_SHA256 = "9133295e5ce523bf8355a093bbea5a1c19682ec42b59ab6b626dffbc33544f3f";
|
|
42
|
+
/** All accepted `hook-lib.sh` revisions (same values as `skill_command_script::ACCEPTED_LIB_SHA256`). */
|
|
43
|
+
export const SKILL_COMMAND_LIB_ACCEPTED = [
|
|
44
|
+
SKILL_COMMAND_LIB_SHA256,
|
|
45
|
+
"436493e3325fb0cbcad651ae8ef42d89f4adf43fe38abd938ed6a39c0b6d17c1",
|
|
46
|
+
];
|
|
42
47
|
/**
|
|
43
48
|
* The libraries the hook sources only when they are present (ANSWERS-1817
|
|
44
49
|
* Q-SCS8 (b)): absent is the released behaviour; present, they must be the
|
|
@@ -196,7 +201,8 @@ export function runSkillCommand(req, deps) {
|
|
|
196
201
|
return Promise.reject(new SkillCommandOpError("root_mismatch", "skill.command runs only in hqd's own HQ root"));
|
|
197
202
|
}
|
|
198
203
|
const hook = path.join(root, SKILL_COMMAND_HOOK);
|
|
199
|
-
|
|
204
|
+
const libHash = sha256File(path.join(root, SKILL_COMMAND_LIB));
|
|
205
|
+
if (sha256File(hook) !== SKILL_COMMAND_HOOK_SHA256 || !libHash || !SKILL_COMMAND_LIB_ACCEPTED.includes(libHash)) {
|
|
200
206
|
return Promise.reject(new SkillCommandOpError("hook_not_pinned", `${SKILL_COMMAND_HOOK} or ${SKILL_COMMAND_LIB} is not the pinned release (hq-core-staging v16.0.48-beta.124)`));
|
|
201
207
|
}
|
|
202
208
|
for (const lib of SKILL_COMMAND_OPTIONAL_LIBS) {
|
package/dist/lib/daemon/run.js
CHANGED
|
@@ -1242,6 +1242,7 @@ export async function runDaemon(opts) {
|
|
|
1242
1242
|
hqRoot: () => readDaemonConfig(paths.configPath).hqRoot ?? (env.HQ_ROOT?.trim() || undefined),
|
|
1243
1243
|
readFlag: createRegistryMergeFlagReader({ env }),
|
|
1244
1244
|
onRefresh: () => stateWriter.refresh(),
|
|
1245
|
+
log,
|
|
1245
1246
|
});
|
|
1246
1247
|
// The cached `hq whoami` answer CLI commands read instead of starting
|
|
1247
1248
|
// `hq whoami` (whoami-cache.ts). The token caches it describes live under
|
|
@@ -12,10 +12,11 @@
|
|
|
12
12
|
*/
|
|
13
13
|
import type { CheckContext, CheckResult } from "../types.js";
|
|
14
14
|
export declare const ANTIGRAVITY_INSTALL_REMEDIATION = "hq install --global --runtime antigravity";
|
|
15
|
+
export declare const ANTIGRAVITY_HOOKS_REMEDIATION = "hq reindex";
|
|
15
16
|
export interface AntigravityWiringOptions {
|
|
16
17
|
home?: string;
|
|
17
18
|
env?: NodeJS.ProcessEnv;
|
|
18
19
|
appPath?: string;
|
|
19
20
|
}
|
|
20
|
-
export declare function checkAntigravityWiring(
|
|
21
|
+
export declare function checkAntigravityWiring(context: CheckContext, options?: AntigravityWiringOptions): CheckResult[];
|
|
21
22
|
//# sourceMappingURL=antigravity-wiring.d.ts.map
|
|
@@ -12,10 +12,13 @@
|
|
|
12
12
|
*/
|
|
13
13
|
import * as fs from "node:fs";
|
|
14
14
|
import * as os from "node:os";
|
|
15
|
-
import {
|
|
15
|
+
import { ANTIGRAVITY_HOOK_EVENTS, antigravityEventEntries, antigravityTargets, detectAntigravity, isHqAntigravityRule, } from "../../install/antigravity-targets.js";
|
|
16
|
+
import { CORE_NEXT_LINK, isCoreNextEntry } from "../../hook-engine/registration-identity.js";
|
|
17
|
+
import { stopCompatibilityHold } from "../../hook-engine/coverage.js";
|
|
16
18
|
import { HQ_MCP_SERVER_NAME } from "../../install/claude-targets.js";
|
|
17
19
|
export const ANTIGRAVITY_INSTALL_REMEDIATION = "hq install --global --runtime antigravity";
|
|
18
|
-
export
|
|
20
|
+
export const ANTIGRAVITY_HOOKS_REMEDIATION = "hq reindex";
|
|
21
|
+
export function checkAntigravityWiring(context, options = {}) {
|
|
19
22
|
const home = options.home ?? os.homedir();
|
|
20
23
|
const detection = detectAntigravity({ home, env: options.env, appPath: options.appPath });
|
|
21
24
|
if (!detection.detected) {
|
|
@@ -30,7 +33,7 @@ export function checkAntigravityWiring(_context, options = {}) {
|
|
|
30
33
|
return [
|
|
31
34
|
checkRule(t.ruleFile),
|
|
32
35
|
checkMcp(t.mcpConfig),
|
|
33
|
-
|
|
36
|
+
checkHooks(t.hooksFile, context.hqRoot, options.env),
|
|
34
37
|
];
|
|
35
38
|
}
|
|
36
39
|
function readOrNull(file) {
|
|
@@ -72,4 +75,73 @@ function checkMcp(mcpConfig) {
|
|
|
72
75
|
}
|
|
73
76
|
return { status: "PASS", checkId: "antigravity.mcp", target: mcpConfig, message: `Antigravity MCP server "${HQ_MCP_SERVER_NAME}" is registered.` };
|
|
74
77
|
}
|
|
78
|
+
function checkHooks(hooksFile, hqRoot, env = process.env) {
|
|
79
|
+
const raw = readOrNull(hooksFile);
|
|
80
|
+
if (raw === null) {
|
|
81
|
+
return {
|
|
82
|
+
status: "WARN",
|
|
83
|
+
checkId: "antigravity.hooks",
|
|
84
|
+
target: hooksFile,
|
|
85
|
+
message: "Antigravity hooks.json is missing; HQ hooks are not registered for Antigravity.",
|
|
86
|
+
remediation: ANTIGRAVITY_HOOKS_REMEDIATION,
|
|
87
|
+
};
|
|
88
|
+
}
|
|
89
|
+
let doc;
|
|
90
|
+
try {
|
|
91
|
+
doc = JSON.parse(raw);
|
|
92
|
+
}
|
|
93
|
+
catch {
|
|
94
|
+
return {
|
|
95
|
+
status: "FAIL",
|
|
96
|
+
checkId: "antigravity.hooks",
|
|
97
|
+
target: hooksFile,
|
|
98
|
+
message: "Antigravity hooks.json is not valid JSON; Antigravity cannot load hooks from it.",
|
|
99
|
+
remediation: `Fix the JSON, then run ${ANTIGRAVITY_HOOKS_REMEDIATION}`,
|
|
100
|
+
};
|
|
101
|
+
}
|
|
102
|
+
const byEvent = new Map(antigravityEventEntries(doc));
|
|
103
|
+
const isHqNative = (entry) => isCoreNextEntry(entry, hqRoot)
|
|
104
|
+
|| (typeof entry.command === "string" && CORE_NEXT_LINK.test(entry.command));
|
|
105
|
+
const present = ANTIGRAVITY_HOOK_EVENTS.filter((event) => (byEvent.get(event) ?? []).some(isHqNative));
|
|
106
|
+
if (present.length === 0) {
|
|
107
|
+
return {
|
|
108
|
+
status: "WARN",
|
|
109
|
+
checkId: "antigravity.hooks",
|
|
110
|
+
target: hooksFile,
|
|
111
|
+
message: "Antigravity hooks.json has no HQ native hook registrations.",
|
|
112
|
+
remediation: ANTIGRAVITY_HOOKS_REMEDIATION,
|
|
113
|
+
};
|
|
114
|
+
}
|
|
115
|
+
const stopHold = fs.existsSync(hqRoot) ? stopCompatibilityHold(hqRoot, env) : null;
|
|
116
|
+
if (stopHold !== null && present.includes("Stop")) {
|
|
117
|
+
return {
|
|
118
|
+
status: "WARN",
|
|
119
|
+
checkId: "antigravity.hooks",
|
|
120
|
+
target: hooksFile,
|
|
121
|
+
message: `Antigravity hooks.json registers Stop while native Stop compatibility holds (${stopHold}); run ${ANTIGRAVITY_HOOKS_REMEDIATION} to remove it.`,
|
|
122
|
+
remediation: ANTIGRAVITY_HOOKS_REMEDIATION,
|
|
123
|
+
};
|
|
124
|
+
}
|
|
125
|
+
const expected = stopHold !== null
|
|
126
|
+
? ANTIGRAVITY_HOOK_EVENTS.filter((event) => event !== "Stop")
|
|
127
|
+
: [...ANTIGRAVITY_HOOK_EVENTS];
|
|
128
|
+
const missing = expected.filter((event) => !present.includes(event));
|
|
129
|
+
if (missing.length > 0) {
|
|
130
|
+
return {
|
|
131
|
+
status: "WARN",
|
|
132
|
+
checkId: "antigravity.hooks",
|
|
133
|
+
target: hooksFile,
|
|
134
|
+
message: `Antigravity hooks.json is missing HQ hook registrations for ${missing.join(", ")}.`,
|
|
135
|
+
remediation: ANTIGRAVITY_HOOKS_REMEDIATION,
|
|
136
|
+
};
|
|
137
|
+
}
|
|
138
|
+
return {
|
|
139
|
+
status: "PASS",
|
|
140
|
+
checkId: "antigravity.hooks",
|
|
141
|
+
target: hooksFile,
|
|
142
|
+
message: stopHold !== null
|
|
143
|
+
? `Antigravity hooks are registered through the native hook engine (${expected.join(", ")}; Stop omitted while native Stop compatibility holds: ${stopHold}).`
|
|
144
|
+
: `Antigravity hooks are registered through the native hook engine (${ANTIGRAVITY_HOOK_EVENTS.join(", ")}).`,
|
|
145
|
+
};
|
|
146
|
+
}
|
|
75
147
|
//# sourceMappingURL=antigravity-wiring.js.map
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import type { CheckFamily, CheckResult } from '../types.js';
|
|
2
|
+
export declare const STRICT_PORT_FLAG_MAX_AGE_SECONDS: number;
|
|
3
|
+
export declare function checkStrictFlagSnapshot(env?: NodeJS.ProcessEnv, nowMs?: number): CheckResult | null;
|
|
2
4
|
export declare function checkHookEngine(): CheckResult;
|
|
3
5
|
export declare const hookEngineFamily: CheckFamily;
|
|
4
6
|
//# sourceMappingURL=hook-engine.d.ts.map
|
|
@@ -1,5 +1,97 @@
|
|
|
1
|
+
import { lstatSync, readFileSync } from 'node:fs';
|
|
2
|
+
import { homedir } from 'node:os';
|
|
3
|
+
import { join } from 'node:path';
|
|
4
|
+
import { flagSnapshotPath, parseSnapshotTime, personFlagSnapshotPath } from '../../flag-snapshot-file.js';
|
|
1
5
|
import { launcherEnabled } from '../../hook-engine/registration.js';
|
|
2
6
|
import { findHookEngine, hookEngineRequired, pinnedHookEngineMatches, HOOK_ENGINE_REPAIR, HOOK_ENGINE_REPAIR_PIN } from '../../hook-engine/resolve.js';
|
|
7
|
+
export const STRICT_PORT_FLAG_MAX_AGE_SECONDS = 15 * 60;
|
|
8
|
+
function pathPresent(filePath) {
|
|
9
|
+
try {
|
|
10
|
+
lstatSync(filePath);
|
|
11
|
+
return true;
|
|
12
|
+
}
|
|
13
|
+
catch {
|
|
14
|
+
return false;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
function isStrictModeActive(env) {
|
|
18
|
+
const engineEnv = env.HQ_HOOK_ENGINE?.trim().toLowerCase();
|
|
19
|
+
const home = env.HOME || env.USERPROFILE || homedir();
|
|
20
|
+
if (engineEnv === 'off' || pathPresent(join(home, '.hq', 'hook-engine.off')))
|
|
21
|
+
return false;
|
|
22
|
+
if (engineEnv === 'strict')
|
|
23
|
+
return true;
|
|
24
|
+
return pathPresent(join(home, '.hq', 'hook-engine.strict'));
|
|
25
|
+
}
|
|
26
|
+
export function checkStrictFlagSnapshot(env = process.env, nowMs = Date.now()) {
|
|
27
|
+
if (!isStrictModeActive(env))
|
|
28
|
+
return null;
|
|
29
|
+
const companyUid = env.HQ_COMPANY_UID?.trim();
|
|
30
|
+
let snapshotPath;
|
|
31
|
+
if (companyUid) {
|
|
32
|
+
const resolved = flagSnapshotPath(companyUid, env);
|
|
33
|
+
if (!resolved) {
|
|
34
|
+
return {
|
|
35
|
+
checkId: 'hooks.strict-flag-snapshot',
|
|
36
|
+
status: 'WARN',
|
|
37
|
+
message: 'Strict mode is active, but HQ_COMPANY_UID is invalid; hq-hook cannot resolve a company flag snapshot.',
|
|
38
|
+
remediation: 'Check HQ_COMPANY_UID and refresh flags (hq daemon status / hq daemon restart).',
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
snapshotPath = resolved;
|
|
42
|
+
}
|
|
43
|
+
else {
|
|
44
|
+
snapshotPath = personFlagSnapshotPath(env);
|
|
45
|
+
}
|
|
46
|
+
try {
|
|
47
|
+
const raw = JSON.parse(readFileSync(snapshotPath, 'utf8'));
|
|
48
|
+
const fetchedMs = typeof raw.fetched_at === 'string' ? parseSnapshotTime(raw.fetched_at) : Number.NaN;
|
|
49
|
+
if (!Number.isFinite(fetchedMs)) {
|
|
50
|
+
return {
|
|
51
|
+
checkId: 'hooks.strict-flag-snapshot',
|
|
52
|
+
status: 'WARN',
|
|
53
|
+
target: snapshotPath,
|
|
54
|
+
message: 'Strict mode is active, but the flag snapshot timestamp is unreadable.',
|
|
55
|
+
remediation: 'Check hq daemon status and refresh flags (hq daemon status / hq daemon restart).',
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
if (fetchedMs > nowMs) {
|
|
59
|
+
const aheadSeconds = Math.ceil((fetchedMs - nowMs) / 1000);
|
|
60
|
+
return {
|
|
61
|
+
checkId: 'hooks.strict-flag-snapshot',
|
|
62
|
+
status: 'WARN',
|
|
63
|
+
target: snapshotPath,
|
|
64
|
+
message: `Strict mode flag snapshot has a future timestamp (${aheadSeconds}s ahead); hq-hook rejects future snapshots and drops port flags.`,
|
|
65
|
+
remediation: 'Check system clock and refresh flags (hq daemon status / hq daemon restart).',
|
|
66
|
+
};
|
|
67
|
+
}
|
|
68
|
+
const ageSeconds = Math.floor((nowMs - fetchedMs) / 1000);
|
|
69
|
+
if (ageSeconds > STRICT_PORT_FLAG_MAX_AGE_SECONDS) {
|
|
70
|
+
return {
|
|
71
|
+
checkId: 'hooks.strict-flag-snapshot',
|
|
72
|
+
status: 'WARN',
|
|
73
|
+
target: snapshotPath,
|
|
74
|
+
message: `Strict mode flag snapshot is stale (${ageSeconds}s old > ${STRICT_PORT_FLAG_MAX_AGE_SECONDS}s limit); hq-hook is holding last-known port flags instead of falling back to bash.`,
|
|
75
|
+
remediation: 'Check hq daemon status and refresh flags (hq daemon status / hq daemon restart).',
|
|
76
|
+
};
|
|
77
|
+
}
|
|
78
|
+
return {
|
|
79
|
+
checkId: 'hooks.strict-flag-snapshot',
|
|
80
|
+
status: 'PASS',
|
|
81
|
+
target: snapshotPath,
|
|
82
|
+
message: `Strict mode flag snapshot is fresh (${ageSeconds}s old).`,
|
|
83
|
+
};
|
|
84
|
+
}
|
|
85
|
+
catch {
|
|
86
|
+
return {
|
|
87
|
+
checkId: 'hooks.strict-flag-snapshot',
|
|
88
|
+
status: 'WARN',
|
|
89
|
+
target: snapshotPath,
|
|
90
|
+
message: 'Strict mode is active, but no readable flag snapshot was found.',
|
|
91
|
+
remediation: 'Check hq daemon status and refresh flags (hq daemon status / hq daemon restart).',
|
|
92
|
+
};
|
|
93
|
+
}
|
|
94
|
+
}
|
|
3
95
|
export function checkHookEngine() {
|
|
4
96
|
const required = hookEngineRequired();
|
|
5
97
|
const fallback = required ? 'Native engine is required; repair before running hooks.' : 'Existing bash hooks remain active.';
|
|
@@ -13,5 +105,12 @@ export function checkHookEngine() {
|
|
|
13
105
|
return { checkId: 'hooks.native-engine', status: required ? 'FAIL' : 'WARN', message: `Native hook engine unavailable: ${error.message}. ${fallback}`, remediation: HOOK_ENGINE_REPAIR };
|
|
14
106
|
}
|
|
15
107
|
}
|
|
16
|
-
export const hookEngineFamily = {
|
|
108
|
+
export const hookEngineFamily = {
|
|
109
|
+
id: 'hook-engine',
|
|
110
|
+
title: 'Native hook engine',
|
|
111
|
+
run: async () => {
|
|
112
|
+
const strictCheck = checkStrictFlagSnapshot();
|
|
113
|
+
return strictCheck ? [checkHookEngine(), strictCheck] : [checkHookEngine()];
|
|
114
|
+
},
|
|
115
|
+
};
|
|
17
116
|
//# sourceMappingURL=hook-engine.js.map
|
|
@@ -5,7 +5,7 @@ export declare const HOST_CORE_FAMILY_ID = "host-core";
|
|
|
5
5
|
export declare const HOST_CORE_FAMILY_TITLE = "Hook core per host";
|
|
6
6
|
export type CoreKind = 'new-core' | 'launcher' | 'old-dispatcher';
|
|
7
7
|
export interface HostRegistrationFile {
|
|
8
|
-
host: 'claude' | 'codex' | 'grok';
|
|
8
|
+
host: 'claude' | 'codex' | 'grok' | 'antigravity';
|
|
9
9
|
scope: 'project' | 'user';
|
|
10
10
|
file: string;
|
|
11
11
|
/** A file the host merges over `file` (Claude Code's `.claude/settings.local.json`), read with it. */
|