@hearsay-tools/squawk 0.18.0-pr4074.7790 → 0.18.0-pr4075.7794

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (47) hide show
  1. package/dist/ci-wait/controller.d.ts +46 -46
  2. package/dist/delegation/routes.d.ts +10 -10
  3. package/dist/delegation/transport.d.ts +15 -15
  4. package/dist/runs/ports.d.ts +6 -5
  5. package/dist/runs/run-row.d.ts +2 -0
  6. package/dist/runs/run-row.js +8 -0
  7. package/dist/runs/run-row.js.map +1 -1
  8. package/dist/runs/store.d.ts +3 -20
  9. package/dist/runs/store.js +25 -109
  10. package/dist/runs/store.js.map +1 -1
  11. package/dist/runs/transcript-facts-topic.d.ts +45 -0
  12. package/dist/runs/transcript-facts-topic.js +101 -0
  13. package/dist/runs/transcript-facts-topic.js.map +1 -0
  14. package/dist/server/live-routes.d.ts +6 -6
  15. package/dist/server/models-routes.d.ts +13 -13
  16. package/dist/server/reports-api.d.ts +2 -2
  17. package/dist/server/workspace-live-routes.d.ts +6 -6
  18. package/dist/workflows/run/continuation-acceptance.js +1 -1
  19. package/dist/workflows/run/continuation-acceptance.js.map +1 -1
  20. package/dist/workflows/run/continuation-session.js +2 -2
  21. package/dist/workflows/run/continuation-session.js.map +1 -1
  22. package/dist/workflows/run/family-reconciler.js +2 -2
  23. package/dist/workflows/run/family-reconciler.js.map +1 -1
  24. package/dist/workflows/run/human-waits.js +4 -4
  25. package/dist/workflows/run/human-waits.js.map +1 -1
  26. package/dist/workflows/run/input-delivery.js +3 -3
  27. package/dist/workflows/run/input-delivery.js.map +1 -1
  28. package/dist/workflows/run/run-finish.js +3 -3
  29. package/dist/workflows/run/run-finish.js.map +1 -1
  30. package/dist/workflows/run/run-recovery.js +6 -6
  31. package/dist/workflows/run/run-recovery.js.map +1 -1
  32. package/dist/workflows/run/run-settlement.js +3 -3
  33. package/dist/workflows/run/run-settlement.js.map +1 -1
  34. package/dist/workflows/run/session-events.js +1 -1
  35. package/dist/workflows/run/session-events.js.map +1 -1
  36. package/dist/workflows/run/turn-nudges.js +2 -2
  37. package/dist/workflows/run/turn-nudges.js.map +1 -1
  38. package/dist/workflows/run/turn-settler.js +1 -1
  39. package/dist/workflows/run/turn-settler.js.map +1 -1
  40. package/dist/workflows/run/worker-questions.js +16 -16
  41. package/dist/workflows/run/worker-questions.js.map +1 -1
  42. package/dist/workflows/run.js +1 -1
  43. package/dist/workflows/run.js.map +1 -1
  44. package/package.json +4 -4
  45. package/scripts/measure-transcript-facts-health.mjs +2 -2
  46. package/scripts/measure-transcript-facts-lag.mjs +1 -1
  47. package/scripts/transcript-facts-fixture.mjs +1 -1
@@ -285,11 +285,12 @@ export declare function ciToolRoutes(capabilities: Map<string, Capability>): imp
285
285
  "/api/v1/tools/ask": {
286
286
  $post: {
287
287
  output: {
288
- code: 'capability_revoked';
288
+ ok: false;
289
+ code: 'unavailable';
289
290
  message: string;
290
291
  };
291
292
  outputFormat: "json";
292
- status: 401;
293
+ status: import("hono/utils/http-status").ContentfulStatusCode;
293
294
  input: {
294
295
  json: {
295
296
  questions: {
@@ -308,12 +309,11 @@ export declare function ciToolRoutes(capabilities: Map<string, Capability>): imp
308
309
  };
309
310
  } | {
310
311
  output: {
311
- ok: false;
312
- code: 'unavailable';
312
+ code: 'capability_revoked';
313
313
  message: string;
314
314
  };
315
315
  outputFormat: "json";
316
- status: import("hono/utils/http-status").ContentfulStatusCode;
316
+ status: 401;
317
317
  input: {
318
318
  json: {
319
319
  questions: {
@@ -383,11 +383,12 @@ export declare function ciToolRoutes(capabilities: Map<string, Capability>): imp
383
383
  "/api/v1/tools/cancel-wait": {
384
384
  $post: {
385
385
  output: {
386
- code: 'capability_revoked';
386
+ cancelled: false;
387
+ code: 'unavailable';
387
388
  message: string;
388
389
  };
389
390
  outputFormat: "json";
390
- status: 401;
391
+ status: import("hono/utils/http-status").ContentfulStatusCode;
391
392
  input: {
392
393
  json: {
393
394
  wait_id: string;
@@ -395,12 +396,11 @@ export declare function ciToolRoutes(capabilities: Map<string, Capability>): imp
395
396
  };
396
397
  } | {
397
398
  output: {
398
- cancelled: false;
399
- code: 'unavailable';
399
+ code: 'capability_revoked';
400
400
  message: string;
401
401
  };
402
402
  outputFormat: "json";
403
- status: import("hono/utils/http-status").ContentfulStatusCode;
403
+ status: 401;
404
404
  input: {
405
405
  json: {
406
406
  wait_id: string;
@@ -448,11 +448,12 @@ export declare function ciToolRoutes(capabilities: Map<string, Capability>): imp
448
448
  "/api/v1/tools/done": {
449
449
  $post: {
450
450
  output: {
451
- code: 'capability_revoked';
451
+ ok: false;
452
+ code: 'unavailable';
452
453
  message: string;
453
454
  };
454
455
  outputFormat: "json";
455
- status: 401;
456
+ status: import("hono/utils/http-status").ContentfulStatusCode;
456
457
  input: {
457
458
  json: {
458
459
  summary?: string | undefined;
@@ -460,12 +461,11 @@ export declare function ciToolRoutes(capabilities: Map<string, Capability>): imp
460
461
  };
461
462
  } | {
462
463
  output: {
463
- ok: false;
464
- code: 'unavailable';
464
+ code: 'capability_revoked';
465
465
  message: string;
466
466
  };
467
467
  outputFormat: "json";
468
- status: import("hono/utils/http-status").ContentfulStatusCode;
468
+ status: 401;
469
469
  input: {
470
470
  json: {
471
471
  summary?: string | undefined;
@@ -548,11 +548,13 @@ export declare function ciToolRoutes(capabilities: Map<string, Capability>): imp
548
548
  "/api/v1/tools/preview-stop": {
549
549
  $post: {
550
550
  output: {
551
- code: 'capability_revoked';
551
+ ok: boolean;
552
+ code: "adopted" | "approval_required" | "headless" | "invalid_input" | "not_registered" | "port_held" | "port_in_use" | "preview_disabled" | "restarted" | "stopped" | "unavailable" | "worktree_missing";
552
553
  message: string;
554
+ hint: string;
553
555
  };
554
556
  outputFormat: "json";
555
- status: 401;
557
+ status: import("hono/utils/http-status").ContentfulStatusCode;
556
558
  input: {
557
559
  json: {
558
560
  port: number;
@@ -561,13 +563,11 @@ export declare function ciToolRoutes(capabilities: Map<string, Capability>): imp
561
563
  };
562
564
  } | {
563
565
  output: {
564
- ok: boolean;
565
- code: "adopted" | "approval_required" | "headless" | "invalid_input" | "not_registered" | "port_held" | "port_in_use" | "preview_disabled" | "restarted" | "stopped" | "unavailable" | "worktree_missing";
566
+ code: 'capability_revoked';
566
567
  message: string;
567
- hint: string;
568
568
  };
569
569
  outputFormat: "json";
570
- status: import("hono/utils/http-status").ContentfulStatusCode;
570
+ status: 401;
571
571
  input: {
572
572
  json: {
573
573
  port: number;
@@ -580,11 +580,13 @@ export declare function ciToolRoutes(capabilities: Map<string, Capability>): imp
580
580
  "/api/v1/tools/preview-serve": {
581
581
  $post: {
582
582
  output: {
583
- code: 'capability_revoked';
583
+ ok: boolean;
584
+ code: "cezar_port" | "cwd_outside_worktree" | "headless" | "invalid_input" | "port_held" | "preview_disabled" | "registered" | "replaced" | "too_many" | "unavailable" | "worktree_missing";
584
585
  message: string;
586
+ hint: string;
585
587
  };
586
588
  outputFormat: "json";
587
- status: 401;
589
+ status: import("hono/utils/http-status").ContentfulStatusCode;
588
590
  input: {
589
591
  json: {
590
592
  command: string;
@@ -596,13 +598,11 @@ export declare function ciToolRoutes(capabilities: Map<string, Capability>): imp
596
598
  };
597
599
  } | {
598
600
  output: {
599
- ok: boolean;
600
- code: "cezar_port" | "cwd_outside_worktree" | "headless" | "invalid_input" | "port_held" | "preview_disabled" | "registered" | "replaced" | "too_many" | "unavailable" | "worktree_missing";
601
+ code: 'capability_revoked';
601
602
  message: string;
602
- hint: string;
603
603
  };
604
604
  outputFormat: "json";
605
- status: import("hono/utils/http-status").ContentfulStatusCode;
605
+ status: 401;
606
606
  input: {
607
607
  json: {
608
608
  command: string;
@@ -618,11 +618,12 @@ export declare function ciToolRoutes(capabilities: Map<string, Capability>): imp
618
618
  "/api/v1/tools/automation": {
619
619
  $post: {
620
620
  output: {
621
- code: 'capability_revoked';
621
+ ok: false;
622
+ code: import('../contract/index.js').ScheduledTaskRefusalCode;
622
623
  message: string;
623
624
  };
624
625
  outputFormat: "json";
625
- status: 401;
626
+ status: import("hono/utils/http-status").ContentfulStatusCode;
626
627
  input: {
627
628
  json: {
628
629
  action: "create";
@@ -702,12 +703,11 @@ export declare function ciToolRoutes(capabilities: Map<string, Capability>): imp
702
703
  };
703
704
  } | {
704
705
  output: {
705
- ok: false;
706
- code: import('../contract/index.js').ScheduledTaskRefusalCode;
706
+ code: 'capability_revoked';
707
707
  message: string;
708
708
  };
709
709
  outputFormat: "json";
710
- status: import("hono/utils/http-status").ContentfulStatusCode;
710
+ status: 401;
711
711
  input: {
712
712
  json: {
713
713
  action: "create";
@@ -963,11 +963,12 @@ export declare function ciToolRoutes(capabilities: Map<string, Capability>): imp
963
963
  "/api/v1/tools/schedule-task": {
964
964
  $post: {
965
965
  output: {
966
- code: 'capability_revoked';
966
+ ok: false;
967
+ code: import('../contract/index.js').ScheduledTaskRefusalCode;
967
968
  message: string;
968
969
  };
969
970
  outputFormat: "json";
970
- status: 401;
971
+ status: import("hono/utils/http-status").ContentfulStatusCode;
971
972
  input: {
972
973
  json: {
973
974
  at?: string | undefined;
@@ -984,12 +985,11 @@ export declare function ciToolRoutes(capabilities: Map<string, Capability>): imp
984
985
  };
985
986
  } | {
986
987
  output: {
987
- ok: false;
988
- code: import('../contract/index.js').ScheduledTaskRefusalCode;
988
+ code: 'capability_revoked';
989
989
  message: string;
990
990
  };
991
991
  outputFormat: "json";
992
- status: import("hono/utils/http-status").ContentfulStatusCode;
992
+ status: 401;
993
993
  input: {
994
994
  json: {
995
995
  at?: string | undefined;
@@ -1006,10 +1006,6 @@ export declare function ciToolRoutes(capabilities: Map<string, Capability>): imp
1006
1006
  };
1007
1007
  } | {
1008
1008
  output: {
1009
- ok: false;
1010
- code: "automations_off" | "conflict" | "invalid_request" | "not_found" | "unavailable";
1011
- message: string;
1012
- } | {
1013
1009
  ok: true;
1014
1010
  task: {
1015
1011
  id: string;
@@ -1021,6 +1017,10 @@ export declare function ciToolRoutes(capabilities: Map<string, Capability>): imp
1021
1017
  url?: string | undefined;
1022
1018
  };
1023
1019
  note: string;
1020
+ } | {
1021
+ ok: false;
1022
+ code: "automations_off" | "conflict" | "invalid_request" | "not_found" | "unavailable";
1023
+ message: string;
1024
1024
  };
1025
1025
  outputFormat: "json";
1026
1026
  status: import("hono/utils/http-status").ContentfulStatusCode;
@@ -1044,11 +1044,12 @@ export declare function ciToolRoutes(capabilities: Map<string, Capability>): imp
1044
1044
  "/api/v1/tools/scheduled-tasks": {
1045
1045
  $post: {
1046
1046
  output: {
1047
- code: 'capability_revoked';
1047
+ ok: false;
1048
+ code: import('../contract/index.js').ScheduledTaskRefusalCode;
1048
1049
  message: string;
1049
1050
  };
1050
1051
  outputFormat: "json";
1051
- status: 401;
1052
+ status: import("hono/utils/http-status").ContentfulStatusCode;
1052
1053
  input: {
1053
1054
  json: {
1054
1055
  at?: string | undefined;
@@ -1081,12 +1082,11 @@ export declare function ciToolRoutes(capabilities: Map<string, Capability>): imp
1081
1082
  };
1082
1083
  } | {
1083
1084
  output: {
1084
- ok: false;
1085
- code: import('../contract/index.js').ScheduledTaskRefusalCode;
1085
+ code: 'capability_revoked';
1086
1086
  message: string;
1087
1087
  };
1088
1088
  outputFormat: "json";
1089
- status: import("hono/utils/http-status").ContentfulStatusCode;
1089
+ status: 401;
1090
1090
  input: {
1091
1091
  json: {
1092
1092
  at?: string | undefined;
@@ -91,16 +91,6 @@ export declare function createDelegationRoutes(service: DelegationService, crede
91
91
  "/discover": {
92
92
  $post: {
93
93
  output: {
94
- scope: "host-default-account";
95
- runners: {
96
- requiresAccountHome?: boolean | undefined;
97
- status: "connected" | "disconnected" | "not-installed" | "unknown";
98
- enabled?: boolean | undefined;
99
- hint?: string | undefined;
100
- authFailureId?: string | undefined;
101
- runner: string;
102
- }[];
103
- } | {
104
94
  runner: string;
105
95
  models: {
106
96
  id: string;
@@ -111,6 +101,16 @@ export declare function createDelegationRoutes(service: DelegationService, crede
111
101
  source: "cache" | "live" | "unavailable";
112
102
  stale: boolean;
113
103
  reason?: string | undefined;
104
+ } | {
105
+ scope: "host-default-account";
106
+ runners: {
107
+ requiresAccountHome?: boolean | undefined;
108
+ status: "connected" | "disconnected" | "not-installed" | "unknown";
109
+ enabled?: boolean | undefined;
110
+ hint?: string | undefined;
111
+ authFailureId?: string | undefined;
112
+ runner: string;
113
+ }[];
114
114
  } | {
115
115
  tasks: {
116
116
  id: string;
@@ -66,17 +66,6 @@ export declare function createDelegationApp(routes: DelegationRoutes): import("h
66
66
  "/discover": {
67
67
  $post: {
68
68
  output: {
69
- runner: string;
70
- models: {
71
- id: string;
72
- label: string;
73
- description: string;
74
- effortLevels?: ("high" | "low" | "max" | "medium" | "xhigh")[] | undefined;
75
- }[];
76
- source: "cache" | "live" | "unavailable";
77
- stale: boolean;
78
- reason?: string | undefined;
79
- } | {
80
69
  scope: "host-default-account";
81
70
  runners: {
82
71
  requiresAccountHome?: boolean | undefined;
@@ -98,6 +87,17 @@ export declare function createDelegationApp(routes: DelegationRoutes): import("h
98
87
  reason?: string | undefined;
99
88
  }[];
100
89
  nextOffset?: number | undefined;
90
+ } | {
91
+ runner: string;
92
+ models: {
93
+ id: string;
94
+ label: string;
95
+ description: string;
96
+ effortLevels?: ("high" | "low" | "max" | "medium" | "xhigh")[] | undefined;
97
+ }[];
98
+ source: "cache" | "live" | "unavailable";
99
+ stale: boolean;
100
+ reason?: string | undefined;
101
101
  };
102
102
  outputFormat: "json";
103
103
  status: 200;
@@ -207,13 +207,13 @@ export declare function createDelegationApp(routes: DelegationRoutes): import("h
207
207
  status: 200;
208
208
  input: {
209
209
  json: {
210
- workerIds: string[];
211
- timeoutSeconds?: number | undefined;
212
- mode?: "all" | "any" | "one" | undefined;
213
- } | {
214
210
  requestIds: string[];
215
211
  mode?: "all" | "any" | "one" | undefined;
216
212
  timeoutSeconds?: number | undefined;
213
+ } | {
214
+ workerIds: string[];
215
+ timeoutSeconds?: number | undefined;
216
+ mode?: "all" | "any" | "one" | undefined;
217
217
  } | {
218
218
  peerIds: string[];
219
219
  timeoutSeconds?: number | undefined;
@@ -9,6 +9,7 @@
9
9
  * that implements it. A later slice may move a method between ports when its topic moves. The store stays the only writer of status and exit fields (ADR 0056).
10
10
  */
11
11
  import type { RunStore } from './store.ts';
12
+ import type { TranscriptFacts } from './transcript-facts.ts';
12
13
  export type { RunLifecycleSource } from './lifecycle.ts';
13
14
  /** One run's record, by id. Nearly every caller needs only this. */
14
15
  export interface RunLookup {
@@ -78,11 +79,11 @@ export interface RunEventLog {
78
79
  }
79
80
  /** What the transcript says about a run. The type `TranscriptFacts` is the facts themselves. */
80
81
  export interface TranscriptFactsPort {
81
- transcriptFacts: RunStore['transcriptFacts'];
82
- knownTranscriptFacts: RunStore['knownTranscriptFacts'];
83
- prepareTranscriptFacts: RunStore['prepareTranscriptFacts'];
84
- prepareRecoveryFacts: RunStore['prepareRecoveryFacts'];
85
- factsWarmIdle: RunStore['factsWarmIdle'];
82
+ transcriptFacts(runId: string): Readonly<TranscriptFacts>;
83
+ knownTranscriptFacts(runId: string): Readonly<TranscriptFacts> | undefined;
84
+ prepareTranscriptFacts(runIds: Iterable<string>): Promise<void>;
85
+ prepareRecoveryFacts(familyRootId?: string): Promise<void>;
86
+ factsWarmIdle(): Promise<void>;
86
87
  }
87
88
  /** A worker's collected result. */
88
89
  export interface WorkerResults {
@@ -7,6 +7,8 @@ export { isLiveStatus } from '../contract/index.js';
7
7
  * the live column.
8
8
  */
9
9
  export declare function isLiveRecord(run: RunRecord): boolean;
10
+ /** The family a run belongs to, by its root's id. A worker a worker started is filed under the root too. */
11
+ export declare function familyRootOf(run: Pick<RunRecord, 'id' | 'delegation'>): string | undefined;
10
12
  /** A worker family's root once the family may end (hearsay-tools/squawk#911): archived, settled
11
13
  * (done, failed or cancelled) and not live. A user may archive a running root; that is no end. */
12
14
  export declare function isEndedRoot(run: RunRecord): boolean;
@@ -24,6 +24,14 @@ export function isLiveRecord(run) {
24
24
  return true;
25
25
  return run.stopping !== undefined;
26
26
  }
27
+ /** The family a run belongs to, by its root's id. A worker a worker started is filed under the root too. */
28
+ export function familyRootOf(run) {
29
+ if (run.delegation?.role === 'root')
30
+ return run.id;
31
+ if (run.delegation?.role === 'worker')
32
+ return run.delegation.parentRunId;
33
+ return undefined;
34
+ }
27
35
  /** A worker family's root once the family may end (hearsay-tools/squawk#911): archived, settled
28
36
  * (done, failed or cancelled) and not live. A user may archive a running root; that is no end. */
29
37
  export function isEndedRoot(run) {
@@ -1 +1 @@
1
- {"version":3,"file":"run-row.js","sourceRoot":"","sources":["../../src/runs/run-row.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,yCAAyC,CAAC;AACxE,OAAO,EAAE,YAAY,EAAE,MAAM,mCAAmC,CAAC;AAMjE,OAAO,EAAE,YAAY,EAAE,MAAM,6CAA6C,CAAC;AAC3E,OAAO,EAAE,YAAY,EAAE,MAAM,6CAA6C,CAAC;AAE3E;;;;GAIG;AACH,MAAM,UAAU,YAAY,CAAC,GAAc;IACzC,IAAI,YAAY,CAAC,GAAG,CAAC,MAAM,CAAC;QAAE,OAAO,IAAI,CAAC;IAC1C,+FAA+F;IAC/F,qDAAqD;IACrD,IAAI,GAAG,CAAC,YAAY,KAAK,SAAS,IAAI,GAAG,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,KAAK,KAAK,MAAM,IAAI,IAAI,CAAC,KAAK,KAAK,UAAU,CAAC;QAAE,OAAO,IAAI,CAAC;IACjI,mGAAmG;IACnG,sGAAsG;IACtG,kGAAkG;IAClG,8BAA8B;IAC9B,IAAI,GAAG,CAAC,UAAU,EAAE,IAAI,KAAK,QAAQ,IAAI,GAAG,CAAC,UAAU,CAAC,OAAO,KAAK,SAAS,IAAI,GAAG,CAAC,UAAU,CAAC,OAAO,CAAC,KAAK,KAAK,UAAU;QAAE,OAAO,IAAI,CAAC;IAC1I,IAAI,GAAG,CAAC,UAAU,EAAE,IAAI,KAAK,MAAM,IAAI,GAAG,CAAC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,EAAE,GAAG,CAAC,UAAU,IAAI,IAAI;QAClC,MAAM,EAAE,GAAG,CAAC,MAAM;QAClB,QAAQ,EAAE,GAAG,CAAC,QAAQ;QACtB,IAAI,EAAE,YAAY,CAAC,GAAG,CAAC;QACvB,WAAW,EAAE,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC,CAAC,IAAI;QAC/C,eAAe,EAAE,GAAG,CAAC,eAAe,IAAI,IAAI;QAC5C,OAAO,EAAE,GAAG,CAAC,OAAO,IAAI,IAAI;QAC5B,YAAY,EAAE,wBAAwB,CAAC,GAAG,CAAC,IAAI,IAAI;QACnD,MAAM,EAAE,WAAW,CAAC,GAAG,EAAE,MAAM,IAAI,aAAa,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC,CAAC,SAAS,CAAC;QACzG,UAAU,EAAE,GAAG,CAAC,UAAU,IAAI,IAAI;QAClC,IAAI;QACJ,OAAO,EAAE,IAAI,CAAC,SAAS,CAAC,YAAY,CAAC,GAAG,CAAC,CAAC;QAC1C,mBAAmB,EAAE,qBAAqB,CAAC,GAAG,CAAC;QAC/C,cAAc,EAAE,gBAAgB,CAAC,GAAG,CAAC;KACtC,CAAC;AACJ,CAAC;AAED;;4CAE4C;AAC5C,SAAS,WAAW,CAAC,GAAc,EAAE,mBAAuC;IAC1E,OAAO,GAAG,CAAC,MAAM,IAAI,mBAAmB,IAAI,CAAC,GAAG,CAAC,YAAY,KAAK,SAAS,CAAC,CAAC,CAAC,OAAO,GAAG,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC;AACpH,CAAC"}
@@ -9,7 +9,7 @@ import { queuedMessageSchema } from '../contract/index.js';
9
9
  import { type WaitRegistrationReceipt } from '../contract/index.js';
10
10
  import type { ArchiveFinishedScope, ArchivedRunsResponse, ArchivePullRequestIdentity, ConversationState, AgentInput, InboxClaim, DelegationState, MergedPullRequest, RunSummary, Wait, WorkerCollectedResult, WorkerDestroyRetry } from '../contract/index.js';
11
11
  import { type AutomationNames } from '../contract/index.js';
12
- import { type TranscriptFacts } from './transcript-facts.ts';
12
+ import { RunTranscriptFacts } from './transcript-facts-topic.ts';
13
13
  import { type WorkerExecutionIdentity } from '../delegation/execution-identity.ts';
14
14
  import { type WorkerProcessRecord } from '../core/process-stat.ts';
15
15
  import { workflowDefSchema } from '../workflows/types.ts';
@@ -3308,11 +3308,9 @@ export declare class RunStore {
3308
3308
  private readonly unreadable;
3309
3309
  /** Background one-at-a-time compressor for archived transcripts (#818). */
3310
3310
  private readonly compressor;
3311
- /** Transcript facts the delegation paths ask about, so they never re-read a transcript (#880). */
3312
- private readonly facts;
3311
+ /** What the transcript says about a run (hearsay-tools/squawk#4036). */
3312
+ readonly transcriptFacts: RunTranscriptFacts;
3313
3313
  private readonly liveItems;
3314
- private fallbackFacts;
3315
- private factsFor;
3316
3314
  /** Capture both sources on the same synchronous sequence boundary before history IO. */
3317
3315
  liveReadSnapshot(runId: string): {
3318
3316
  events: {
@@ -3935,24 +3933,9 @@ export declare class RunStore {
3935
3933
  * the `CEZ_REDACT_SECRETS=0` opt-out itself so every caller inherits it. */
3936
3934
  redactText(text: string): string;
3937
3935
  private hostSecrets;
3938
- /** The run's indexed transcript facts (#880): a read-only view, never a transcript read once
3939
- * the run's index is loaded. An unreadable transcript answers as empty, as readEvents does. */
3940
- transcriptFacts(runId: string): Readonly<TranscriptFacts>;
3941
- /** The run's transcript facts when they are known: undefined when the transcript exists but its
3942
- * facts are not current or cannot be read, so a caller can tell "no ask" from "no evidence". */
3943
- knownTranscriptFacts(runId: string): Readonly<TranscriptFacts> | undefined;
3944
3936
  hasProjection(runId: string, projectionId: string): boolean;
3945
- private factsWarming;
3946
3937
  /** Indexed family enumeration, including members not yet flushed to SQLite. */
3947
3938
  listFamilyRunIds(rootId: string): string[];
3948
- private recoveryFactIds;
3949
- /** Readiness owns no run snapshot across an await: refresh only the currently held owner. */
3950
- prepareTranscriptFacts(runIds: Iterable<string>): Promise<void>;
3951
- prepareRecoveryFacts(familyRootId?: string): Promise<void>;
3952
- /** Register IDs only here; the index yields between cache reads and off-loop rebuilds. */
3953
- private warmTranscriptFacts;
3954
- /** Resolves when the open-time warm-up is done (tests). */
3955
- factsWarmIdle(): Promise<void>;
3956
3939
  /** `readEvents` off the event loop (async read and async brotli), for collection paths. */
3957
3940
  readEventsAsync(runId: string): Promise<RunEvent[]>;
3958
3941
  readEvents(runId: string): RunEvent[];