@indigoai-us/hq-cli 5.286.0 → 5.288.0
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 +57 -0
- package/assets/scaffold/core/scripts/clean-worktree-reconcile-handoff.sh +171 -0
- package/assets/scaffold/core/scripts/resume-thread-lock.sh +285 -0
- package/assets/scaffold/core/scripts/verify-story-deliverables.sh +148 -0
- package/assets/scaffold/core/scripts/worktree-gc.sh +362 -0
- package/dist/command-catalog.generated.d.ts +55 -0
- package/dist/command-catalog.generated.js +68 -0
- package/dist/commands/agent-enroll.js +10 -2
- package/dist/commands/agents.d.ts +1 -0
- package/dist/commands/agents.js +12 -4
- package/dist/commands/cloud-provision.js +99 -78
- package/dist/commands/core-native-handoff-flag.d.ts +4 -0
- package/dist/commands/core-native-handoff-flag.js +7 -0
- package/dist/commands/core-ontology.d.ts +4 -1
- package/dist/commands/core-ontology.js +26 -0
- package/dist/commands/core.js +45 -0
- package/dist/commands/lanes-resume.js +41 -2
- package/dist/commands/lanes-shared.d.ts +2 -0
- package/dist/commands/lanes.js +48 -29
- package/dist/commands/team-sync.js +71 -10
- package/dist/fast-lanes-list-route.js +2 -0
- package/dist/fast-lanes-list.js +1 -29
- package/dist/lanes-drain-hook.d.ts +12 -0
- package/dist/lanes-drain-hook.js +59 -55
- package/dist/lib/checkpoint-ontology/merge-copies.d.ts +10 -1
- package/dist/lib/checkpoint-ontology/merge-copies.js +17 -2
- package/dist/lib/checkpoint-ontology/plan.d.ts +0 -88
- package/dist/lib/checkpoint-ontology/plan.js +80 -107
- package/dist/lib/core-utils/sentry-report.js +5 -32
- package/dist/lib/core-utils/worktree-resume.d.ts +18 -0
- package/dist/lib/core-utils/worktree-resume.js +1182 -0
- package/dist/lib/lanes/dropbox.d.ts +1 -2
- package/dist/lib/lanes/dropbox.js +10 -111
- package/dist/lib/lanes/message-replay.d.ts +8 -0
- package/dist/lib/lanes/message-replay.js +119 -0
- package/dist/lib/lanes/outpost-snapshot-refresh.d.ts +21 -0
- package/dist/lib/lanes/outpost-snapshot-refresh.js +329 -0
- package/dist/lib/plan-limit-nag.js +11 -0
- package/dist/main.js +17 -4
- package/dist/utils/cli-telemetry.d.ts +21 -0
- package/dist/utils/cli-telemetry.js +101 -1
- package/dist/utils/cognito-refresh-sentry.d.ts +3 -0
- package/dist/utils/cognito-refresh-sentry.js +49 -0
- package/dist/utils/cognito-session.js +55 -0
- package/package.json +1 -1
|
@@ -25,99 +25,12 @@ export const ONTOLOGY_FLAG = "checkpoint.ontology";
|
|
|
25
25
|
* 6.18.7 or later; see ./sync-client.ts.
|
|
26
26
|
*/
|
|
27
27
|
export const ONTOLOGY_SYNC_GATED_FLAG = "checkpoint.ontology.sync-gated";
|
|
28
|
-
export const COMPANY_BRIEF_FLAG = "checkpoint.ontology.company-brief";
|
|
29
|
-
/**
|
|
30
|
-
* Applies only when the payload's sibling backend is grok. On gold-v2, Claude
|
|
31
|
-
* with stripped inputs lost 0.139 recall; Grok with stripped inputs gained
|
|
32
|
-
* precision without losing recall. A machine that falls back from grok keeps
|
|
33
|
-
* the annotated inputs.
|
|
34
|
-
*/
|
|
35
|
-
export const IGNORE_ANNOTATIONS_FLAG = "checkpoint.ontology.ignore-annotations";
|
|
36
|
-
/**
|
|
37
|
-
* With `--backend auto`, `hq core checkpoint` tries grok first for this
|
|
38
|
-
* company. Read here, in the detached sibling, and recorded in the company's
|
|
39
|
-
* state directory, so the foreground checkpoint makes no network call.
|
|
40
|
-
*/
|
|
41
|
-
export const GROK_BACKEND_FLAG = "checkpoint.ontology.grok-backend";
|
|
42
28
|
/**
|
|
43
29
|
* Several writers in one company vault (design section 20): record written
|
|
44
30
|
* entity bytes in the outbox, merge back set-aside versions, and report
|
|
45
31
|
* duplicate entities.
|
|
46
32
|
*/
|
|
47
33
|
export const MULTI_WRITER_FLAG = "checkpoint.ontology.multi-writer";
|
|
48
|
-
/**
|
|
49
|
-
* A candidate that links to an existing entity adds no aliases to it; the plan
|
|
50
|
-
* carries `link_aliases: false` and apply honours it. CO-42: most aliases
|
|
51
|
-
* written through links on the CO-41 runs were other things the text named
|
|
52
|
-
* next to the entity (`Publisher` on indigo, `Stripe Connect` on Stripe), and
|
|
53
|
-
* entity-hints multiplied them (22 aliases on a flag-off run, 45 and 125 on two
|
|
54
|
-
* hinted runs).
|
|
55
|
-
*/
|
|
56
|
-
export const NO_LINK_ALIASES_FLAG = "checkpoint.ontology.no-link-aliases";
|
|
57
|
-
/**
|
|
58
|
-
* A person the input and the company's entities give only a first name for is
|
|
59
|
-
* named by that first name instead of being left out. CO-44: on the CO-41
|
|
60
|
-
* grok-4.6 runs the model read "not a first name alone" as "skip them", and
|
|
61
|
-
* dropped people such as Amir and Sebastian, whose own entities carry only a
|
|
62
|
-
* first name. People were 24 of the 138 missed gold entities over three runs.
|
|
63
|
-
* The plan carries `first_name_people: true`, and apply then defers a one-word
|
|
64
|
-
* person whose word starts an existing person's fuller name or alias, since
|
|
65
|
-
* the model cannot see that `John Smith` already exists.
|
|
66
|
-
*/
|
|
67
|
-
export const FIRST_NAME_PEOPLE_FLAG = "checkpoint.ontology.first-name-people";
|
|
68
|
-
/**
|
|
69
|
-
* A knowledge input does not link to a concept entity whose canonical name is
|
|
70
|
-
* also the canonical name of an entity of another type (`concept/hq-secrets`
|
|
71
|
-
* beside `project/hq-secrets`). The plan carries
|
|
72
|
-
* `skip_ambiguous_concept_links: true`, and apply rejects the link as
|
|
73
|
-
* `ambiguous_type`. CO-46: 34 of the 73 false positives on the knowledge
|
|
74
|
-
* fixtures were such concept links; skipping them raised precision from 0.733
|
|
75
|
-
* to 0.803 and cost recall 0.023 on a replay of six runs.
|
|
76
|
-
*/
|
|
77
|
-
export const SKIP_AMBIGUOUS_CONCEPT_LINKS_FLAG = "checkpoint.ontology.skip-ambiguous-concept-links";
|
|
78
|
-
/**
|
|
79
|
-
* A knowledge link to the weaker of two entities that share a canonical name
|
|
80
|
-
* across types is redirected to the sibling other entity files link to
|
|
81
|
-
* (`project/build-your-own-agi` beside `concept/build-your-own-agi`, or
|
|
82
|
-
* `project/hq-core 2` beside `project/hq-core` when a concept also holds the
|
|
83
|
-
* name). The plan carries `dominant_sibling_link: true`, and apply reports
|
|
84
|
-
* the move in `dominant_sibling_redirects` without writing the entity files.
|
|
85
|
-
* CO-60: a replay of six runs raised knowledge precision from 0.725 to 0.754
|
|
86
|
-
* and recall from 0.784 to 0.816, and never changed a create.
|
|
87
|
-
*/
|
|
88
|
-
export const DOMINANT_SIBLING_LINK_FLAG = "checkpoint.ontology.dominant-sibling-link";
|
|
89
|
-
/**
|
|
90
|
-
* A knowledge link to a non-person entity that 50 or more
|
|
91
|
-
* other entity files link to is rejected as `hub_under_mentioned` when the
|
|
92
|
-
* input names it fewer than 2 times (whole word, any case, canonical name
|
|
93
|
-
* only). The plan carries `hub_mention_floor: true`. CO-62: a replay of six
|
|
94
|
-
* runs raised knowledge precision from 0.753 to 0.781 at the same recall.
|
|
95
|
-
*/
|
|
96
|
-
export const HUB_MENTION_FLOOR_FLAG = "checkpoint.ontology.hub-mention-floor";
|
|
97
|
-
/**
|
|
98
|
-
* A knowledge concept candidate whose name is an alias of more than one
|
|
99
|
-
* entity, and which apply would defer as `ambiguous_alias`, links instead to
|
|
100
|
-
* the one project whose canonical name it is (`HQ` typed as a concept beside
|
|
101
|
-
* `project/HQ` and several concepts aliased `HQ`). The plan carries
|
|
102
|
-
* `concept_project_link: true`. CO-51: over six runs of the shipping config
|
|
103
|
-
* the model typed HQ as a concept in some runs and not others, and the
|
|
104
|
-
* deferral lost 61 gold links; a replay of this rule raised recall from 0.639
|
|
105
|
-
* to 0.709 at precision 0.747 to 0.731 (61 of the 63 added links are HQ).
|
|
106
|
-
*/
|
|
107
|
-
export const CONCEPT_PROJECT_LINK_FLAG = "checkpoint.ontology.concept-project-link";
|
|
108
|
-
/**
|
|
109
|
-
* A knowledge link to the company's own company entity, or a
|
|
110
|
-
* concept-project-link redirect, needs evidence that names the entity as a
|
|
111
|
-
* word: the candidate name or one of its aliases, not inside a path, domain,
|
|
112
|
-
* handle, tag or identifier (`indigoai-us/hq`, `getindigo.ai`,
|
|
113
|
-
* `scope: company:indigo`). The plan carries `named_evidence: true`, and apply
|
|
114
|
-
* rejects such a link as `unnamed_in_evidence`. CO-57: on the six CO-52 runs,
|
|
115
|
-
* 67 of 143 false positives were links to company/indigo and project/HQ, most
|
|
116
|
-
* on evidence that only held the name inside an identifier; a replay of this
|
|
117
|
-
* rule raised precision on the concept-project-link arm from 0.705 to 0.750
|
|
118
|
-
* and lost no gold link.
|
|
119
|
-
*/
|
|
120
|
-
export const NAMED_EVIDENCE_FLAG = "checkpoint.ontology.named-evidence";
|
|
121
34
|
/**
|
|
122
35
|
* CO-59: consume the files touched by company checkpoints that were queued
|
|
123
36
|
* behind a busy sibling (see queued-touches.ts). On, the plan adds the
|
|
@@ -139,7 +52,6 @@ export const BUDGET = {
|
|
|
139
52
|
chunkTokens: 12_000,
|
|
140
53
|
};
|
|
141
54
|
export const READ_PATH_INSTRUCTION = "When an input has read_path, read that file (relative to the run directory) instead of path, with the same line range. It is the same text with an older annotator's entity lists and entity links removed.";
|
|
142
|
-
export const PERSON_NAME_INSTRUCTION = "Name a person by the full name the input or the company's entities give, not a first name alone.";
|
|
143
55
|
export const FIRST_NAME_PEOPLE_INSTRUCTION = "Name a person by the full name the input or the company's entities give. When neither gives more than a first name, name the person by that first name; do not leave them out.";
|
|
144
56
|
const CANDIDATE_INSTRUCTIONS = [
|
|
145
57
|
`Write ${CANDIDATES_FILE} in the run directory as {"schema":"${CANDIDATES_SCHEMA}","candidates":[...]} and nothing else.`,
|
|
@@ -317,17 +229,18 @@ export async function planOntologyRun(options) {
|
|
|
317
229
|
fs.rmSync(backendPreferencePath(hqRoot, company), { force: true });
|
|
318
230
|
return { status: "skipped", reason: syncClient && !syncClient.ok ? syncClient.reason : "flag off" };
|
|
319
231
|
}
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
232
|
+
// Was checkpoint.ontology.ignore-annotations, always on since CO-68.
|
|
233
|
+
// Applies only when the payload's sibling backend is grok. On gold-v2, Claude
|
|
234
|
+
// with stripped inputs lost 0.139 recall; Grok with stripped inputs gained
|
|
235
|
+
// precision without losing recall. A machine that falls back from grok keeps
|
|
236
|
+
// the annotated inputs.
|
|
237
|
+
const ignoreAnnotations = payload.backend === "grok";
|
|
238
|
+
// Was checkpoint.ontology.grok-backend, always on since CO-68.
|
|
239
|
+
// With `--backend auto`, `hq core checkpoint` tries grok first for this
|
|
240
|
+
// company. Read here, in the detached sibling, and recorded in the company's
|
|
241
|
+
// state directory, so the foreground checkpoint makes no network call.
|
|
242
|
+
recordBackendPreference(hqRoot, company, true);
|
|
323
243
|
const multiWriterOn = await options.readFlag(MULTI_WRITER_FLAG, company);
|
|
324
|
-
const noLinkAliases = await options.readFlag(NO_LINK_ALIASES_FLAG, company);
|
|
325
|
-
const firstNamePeople = await options.readFlag(FIRST_NAME_PEOPLE_FLAG, company);
|
|
326
|
-
const skipAmbiguousConceptLinks = await options.readFlag(SKIP_AMBIGUOUS_CONCEPT_LINKS_FLAG, company);
|
|
327
|
-
const dominantSiblingLink = await options.readFlag(DOMINANT_SIBLING_LINK_FLAG, company);
|
|
328
|
-
const hubMentionFloor = await options.readFlag(HUB_MENTION_FLOOR_FLAG, company);
|
|
329
|
-
const conceptProjectLink = await options.readFlag(CONCEPT_PROJECT_LINK_FLAG, company);
|
|
330
|
-
const namedEvidence = await options.readFlag(NAMED_EVIDENCE_FLAG, company);
|
|
331
244
|
const queuedTouchesOn = borrowed || (await options.readFlag(QUEUED_TOUCHES_FLAG, company));
|
|
332
245
|
// A borrowed company's run belongs to another session: its own files and
|
|
333
246
|
// session text are not this company's input.
|
|
@@ -343,7 +256,8 @@ export async function planOntologyRun(options) {
|
|
|
343
256
|
// a plan still merges set-aside versions and records the brief; the brief
|
|
344
257
|
// follows merge-back so its counts include merged entities.
|
|
345
258
|
const multiWriter = multiWriterOn ? startMultiWriterRun(hqRoot, company, options.now ?? new Date()) : undefined;
|
|
346
|
-
|
|
259
|
+
// Was checkpoint.ontology.company-brief, always on since CO-68.
|
|
260
|
+
const companyBrief = writeCompanyBrief(hqRoot, company, options.now ?? new Date());
|
|
347
261
|
const pending = Object.entries(ledger.entries)
|
|
348
262
|
.filter(([, entry]) => entry.state === "pending" && entry.reason === "session-touched")
|
|
349
263
|
.sort(([aRel, a], [bRel, b]) => a.mtime_ms - b.mtime_ms || aRel.localeCompare(bRel));
|
|
@@ -446,13 +360,72 @@ export async function planOntologyRun(options) {
|
|
|
446
360
|
}
|
|
447
361
|
: {}),
|
|
448
362
|
...(multiWriter ? { multi_writer: multiWriter } : {}),
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
363
|
+
// Was checkpoint.ontology.no-link-aliases, always on since CO-68.
|
|
364
|
+
// A candidate that links to an existing entity adds no aliases to it; the plan
|
|
365
|
+
// carries `link_aliases: false` and apply honours it. CO-42: most aliases
|
|
366
|
+
// written through links on the CO-41 runs were other things the text named
|
|
367
|
+
// next to the entity (`Publisher` on indigo, `Stripe Connect` on Stripe), and
|
|
368
|
+
// entity-hints multiplied them (22 aliases on a flag-off run, 45 and 125 on two
|
|
369
|
+
// hinted runs).
|
|
370
|
+
link_aliases: false,
|
|
371
|
+
// Was checkpoint.ontology.first-name-people, always on since CO-68.
|
|
372
|
+
// A person the input and the company's entities give only a first name for is
|
|
373
|
+
// named by that first name instead of being left out. CO-44: on the CO-41
|
|
374
|
+
// grok-4.6 runs the model read "not a first name alone" as "skip them", and
|
|
375
|
+
// dropped people such as Amir and Sebastian, whose own entities carry only a
|
|
376
|
+
// first name. People were 24 of the 138 missed gold entities over three runs.
|
|
377
|
+
// The plan carries `first_name_people: true`, and apply then defers a one-word
|
|
378
|
+
// person whose word starts an existing person's fuller name or alias, since
|
|
379
|
+
// the model cannot see that `John Smith` already exists.
|
|
380
|
+
first_name_people: true,
|
|
381
|
+
// Was checkpoint.ontology.skip-ambiguous-concept-links, always on since CO-68.
|
|
382
|
+
// A knowledge input does not link to a concept entity whose canonical name is
|
|
383
|
+
// also the canonical name of an entity of another type (`concept/hq-secrets`
|
|
384
|
+
// beside `project/hq-secrets`). The plan carries
|
|
385
|
+
// `skip_ambiguous_concept_links: true`, and apply rejects the link as
|
|
386
|
+
// `ambiguous_type`. CO-46: 34 of the 73 false positives on the knowledge
|
|
387
|
+
// fixtures were such concept links; skipping them raised precision from 0.733
|
|
388
|
+
// to 0.803 and cost recall 0.023 on a replay of six runs.
|
|
389
|
+
skip_ambiguous_concept_links: true,
|
|
390
|
+
// Was checkpoint.ontology.dominant-sibling-link, always on since CO-68.
|
|
391
|
+
// A knowledge link to the weaker of two entities that share a canonical name
|
|
392
|
+
// across types is redirected to the sibling other entity files link to
|
|
393
|
+
// (`project/build-your-own-agi` beside `concept/build-your-own-agi`, or
|
|
394
|
+
// `project/hq-core 2` beside `project/hq-core` when a concept also holds the
|
|
395
|
+
// name). The plan carries `dominant_sibling_link: true`, and apply reports
|
|
396
|
+
// the move in `dominant_sibling_redirects` without writing the entity files.
|
|
397
|
+
// CO-60: a replay of six runs raised knowledge precision from 0.725 to 0.754
|
|
398
|
+
// and recall from 0.784 to 0.816, and never changed a create.
|
|
399
|
+
dominant_sibling_link: true,
|
|
400
|
+
// Was checkpoint.ontology.hub-mention-floor, always on since CO-68.
|
|
401
|
+
// A knowledge link to a non-person entity that 50 or more
|
|
402
|
+
// other entity files link to is rejected as `hub_under_mentioned` when the
|
|
403
|
+
// input names it fewer than 2 times (whole word, any case, canonical name
|
|
404
|
+
// only). The plan carries `hub_mention_floor: true`. CO-62: a replay of six
|
|
405
|
+
// runs raised knowledge precision from 0.753 to 0.781 at the same recall.
|
|
406
|
+
hub_mention_floor: true,
|
|
407
|
+
// Was checkpoint.ontology.concept-project-link, always on since CO-68.
|
|
408
|
+
// A knowledge concept candidate whose name is an alias of more than one
|
|
409
|
+
// entity, and which apply would defer as `ambiguous_alias`, links instead to
|
|
410
|
+
// the one project whose canonical name it is (`HQ` typed as a concept beside
|
|
411
|
+
// `project/HQ` and several concepts aliased `HQ`). The plan carries
|
|
412
|
+
// `concept_project_link: true`. CO-51: over six runs of the shipping config
|
|
413
|
+
// the model typed HQ as a concept in some runs and not others, and the
|
|
414
|
+
// deferral lost 61 gold links; a replay of this rule raised recall from 0.639
|
|
415
|
+
// to 0.709 at precision 0.747 to 0.731 (61 of the 63 added links are HQ).
|
|
416
|
+
concept_project_link: true,
|
|
417
|
+
// Was checkpoint.ontology.named-evidence, always on since CO-68.
|
|
418
|
+
// A knowledge link to the company's own company entity, or a
|
|
419
|
+
// concept-project-link redirect, needs evidence that names the entity as a
|
|
420
|
+
// word: the candidate name or one of its aliases, not inside a path, domain,
|
|
421
|
+
// handle, tag or identifier (`indigoai-us/hq`, `getindigo.ai`,
|
|
422
|
+
// `scope: company:indigo`). The plan carries `named_evidence: true`, and apply
|
|
423
|
+
// rejects such a link as `unnamed_in_evidence`. CO-57: on the six CO-52 runs,
|
|
424
|
+
// 67 of 143 false positives were links to company/indigo and project/HQ, most
|
|
425
|
+
// on evidence that only held the name inside an identifier; a replay of this
|
|
426
|
+
// rule raised precision on the concept-project-link arm from 0.705 to 0.750
|
|
427
|
+
// and lost no gold link.
|
|
428
|
+
named_evidence: true,
|
|
456
429
|
inputs,
|
|
457
430
|
session_text: sessionText,
|
|
458
431
|
pending_after_run: remaining,
|
|
@@ -466,7 +439,7 @@ export async function planOntologyRun(options) {
|
|
|
466
439
|
instructions: [
|
|
467
440
|
...CANDIDATE_INSTRUCTIONS.slice(0, 3),
|
|
468
441
|
...(inputs.some((input) => input.read_path) ? [READ_PATH_INSTRUCTION] : []),
|
|
469
|
-
`${CANDIDATE_INSTRUCTIONS[3]} ${
|
|
442
|
+
`${CANDIDATE_INSTRUCTIONS[3]} ${FIRST_NAME_PEOPLE_INSTRUCTION}`,
|
|
470
443
|
...CANDIDATE_INSTRUCTIONS.slice(4),
|
|
471
444
|
],
|
|
472
445
|
};
|
|
@@ -44,9 +44,6 @@ const HOOK_TIMEOUT_EXCEEDED_TYPE = "hook_timeout_exceeded";
|
|
|
44
44
|
const HOOK_LATE_FINISH_TYPE = "hook_late_finish";
|
|
45
45
|
const HOOK_TIMEOUT_WARNING_METRIC = "hq.hook_timeout_warning";
|
|
46
46
|
const HOOK_TIMEOUT_EXCEEDED_METRIC = "hq.hook_timeout_exceeded";
|
|
47
|
-
const HOOK_TIMEOUT_EXCEEDED_FINGERPRINT = "hook-timeout-exceeded";
|
|
48
|
-
const HOOK_TIMEOUT_WARNING_FINGERPRINT = "hook-timeout";
|
|
49
|
-
const HOOK_TIMEOUT_MACHINE_WIDE_FINGERPRINT = "hq-hook-slow";
|
|
50
47
|
const MAX_HOOK_SEQUENCE_ENTRIES = 20;
|
|
51
48
|
const MAX_HOOK_TIMEOUT_DEBUG_PHASES = 24;
|
|
52
49
|
const MAX_HOOK_TIMEOUT_DEBUG_MS = 86_400_000;
|
|
@@ -580,10 +577,9 @@ function hookTimeoutDebugContextTags(context) {
|
|
|
580
577
|
}
|
|
581
578
|
function safeSlowChild(metadata) {
|
|
582
579
|
const value = metadata.slow_child;
|
|
583
|
-
if (typeof value !== "string" || value
|
|
580
|
+
if (typeof value !== "string" || !SAFE_HOOK_SCRIPT.test(value))
|
|
584
581
|
return "other";
|
|
585
|
-
|
|
586
|
-
return KNOWN_HOOK_SCRIPTS.has(script) ? script : "other";
|
|
582
|
+
return value;
|
|
587
583
|
}
|
|
588
584
|
function isMachineWideHookSlowness(metadata) {
|
|
589
585
|
const spawnMs = metadata.spawn_ms;
|
|
@@ -621,6 +617,7 @@ function hookTimeoutTags(event) {
|
|
|
621
617
|
const loadAverage = parsedLoadAverage(metadata);
|
|
622
618
|
const slowChildMs = metadata.slow_child_ms;
|
|
623
619
|
return {
|
|
620
|
+
hook_timeout_kind: hookTimeoutKind(event),
|
|
624
621
|
hook_event: hookEvent(metadata),
|
|
625
622
|
hook_script: hookScript(metadata),
|
|
626
623
|
elapsed_bucket: elapsedBucket(elapsedMs),
|
|
@@ -680,37 +677,13 @@ function scrubbedSentryEnvelope(event, overrides, additionalTags = {}) {
|
|
|
680
677
|
...sentryEnvelope(event, overrides, additionalTags),
|
|
681
678
|
}, {});
|
|
682
679
|
}
|
|
683
|
-
/**
|
|
684
|
-
* Keep timeout faults visible at warning level while grouping them by the
|
|
685
|
-
* hook event and installation-independent script basename. A genuine
|
|
686
|
-
* exceeded or late-finish payload gets its own stable condition group.
|
|
687
|
-
*/
|
|
680
|
+
/** Keep all hook-timeout conditions together by script while retaining tags for triage. */
|
|
688
681
|
function hookTimeoutExceededOverrides(event) {
|
|
689
|
-
const eventName = hookEvent(event.metadata);
|
|
690
682
|
if (!isHookTimeoutEvent(event))
|
|
691
683
|
return undefined;
|
|
692
|
-
const kind = hookTimeoutKind(event);
|
|
693
|
-
if (isMachineWideHookSlowness(event.metadata)) {
|
|
694
|
-
return {
|
|
695
|
-
level: "warning",
|
|
696
|
-
fingerprint: [
|
|
697
|
-
HOOK_TIMEOUT_MACHINE_WIDE_FINGERPRINT,
|
|
698
|
-
"machine-wide",
|
|
699
|
-
operatingSystemName(event.metadata),
|
|
700
|
-
eventName,
|
|
701
|
-
kind,
|
|
702
|
-
],
|
|
703
|
-
};
|
|
704
|
-
}
|
|
705
|
-
if (kind === "warning") {
|
|
706
|
-
return {
|
|
707
|
-
level: "warning",
|
|
708
|
-
fingerprint: [HOOK_TIMEOUT_WARNING_FINGERPRINT, eventName, hookScript(event.metadata)],
|
|
709
|
-
};
|
|
710
|
-
}
|
|
711
684
|
return {
|
|
712
685
|
level: "warning",
|
|
713
|
-
fingerprint: [
|
|
686
|
+
fingerprint: ["hook-timeout", hookScript(event.metadata)],
|
|
714
687
|
};
|
|
715
688
|
}
|
|
716
689
|
/**
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/** Native TypeScript ports of the Wave 2 worktree and resume helpers. */
|
|
2
|
+
export declare const WORKTREE_GC_ASSET = "core/scripts/worktree-gc.sh";
|
|
3
|
+
export declare const CLEAN_HANDOFF_ASSET = "core/scripts/clean-worktree-reconcile-handoff.sh";
|
|
4
|
+
export declare const RESUME_LOCK_ASSET = "core/scripts/resume-thread-lock.sh";
|
|
5
|
+
export declare const VERIFY_DELIVERABLES_ASSET = "core/scripts/verify-story-deliverables.sh";
|
|
6
|
+
export type CoreIo = {
|
|
7
|
+
stdout?: (value: string) => void;
|
|
8
|
+
stderr?: (value: string) => void;
|
|
9
|
+
env?: NodeJS.ProcessEnv;
|
|
10
|
+
cwd?: string;
|
|
11
|
+
now?: () => Date;
|
|
12
|
+
};
|
|
13
|
+
export declare function worktreeGcPathKey(value: string): string;
|
|
14
|
+
export declare function runWorktreeGc(args: readonly string[], hqRoot: string, io?: CoreIo): number;
|
|
15
|
+
export declare function runCleanWorktreeReconcileHandoff(args: readonly string[], io?: CoreIo): number;
|
|
16
|
+
export declare function runResumeThreadLock(args: readonly string[], hqRoot: string, io?: CoreIo): number;
|
|
17
|
+
export declare function runVerifyStoryDeliverables(args: readonly string[], hqRoot: string, io?: CoreIo): Promise<number>;
|
|
18
|
+
//# sourceMappingURL=worktree-resume.d.ts.map
|