@hearsay-tools/squawk 0.18.0-pr4335.8421 → 0.18.0-pr4337.8439

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 (146) hide show
  1. package/dist/automations/tools.d.ts +8 -8
  2. package/dist/autosave-cleanup.js +2 -1
  3. package/dist/autosave-cleanup.js.map +1 -1
  4. package/dist/boot.d.ts +5 -1
  5. package/dist/boot.js +5 -2
  6. package/dist/boot.js.map +1 -1
  7. package/dist/built-in-cli-commands.js +0 -4
  8. package/dist/built-in-cli-commands.js.map +1 -1
  9. package/dist/built-in-launch-parts.d.ts +0 -2
  10. package/dist/built-in-launch-parts.js +1 -8
  11. package/dist/built-in-launch-parts.js.map +1 -1
  12. package/dist/built-in-run-slots.js +1 -2
  13. package/dist/built-in-run-slots.js.map +1 -1
  14. package/dist/ci-wait/controller.d.ts +7 -7
  15. package/dist/ci-wait/tool-catalog.d.ts +2 -1
  16. package/dist/ci-wait/tool-catalog.js +22 -16
  17. package/dist/ci-wait/tool-catalog.js.map +1 -1
  18. package/dist/cli-dispatch.d.ts +1 -1
  19. package/dist/cli-dispatch.js +24 -16
  20. package/dist/cli-dispatch.js.map +1 -1
  21. package/dist/core/cli-registry.d.ts +3 -0
  22. package/dist/core/cli-registry.js +3 -0
  23. package/dist/core/cli-registry.js.map +1 -1
  24. package/dist/core/managed-session.d.ts +0 -5
  25. package/dist/core/managed-session.js +0 -25
  26. package/dist/core/managed-session.js.map +1 -1
  27. package/dist/core/process-ownership.d.ts +12 -0
  28. package/dist/core/process-ownership.js +33 -0
  29. package/dist/core/process-ownership.js.map +1 -0
  30. package/dist/delegation/process-liveness.d.ts +6 -3
  31. package/dist/delegation/process-liveness.js +0 -16
  32. package/dist/delegation/process-liveness.js.map +1 -1
  33. package/dist/delegation/scratch-cleanup.js +5 -5
  34. package/dist/delegation/scratch-cleanup.js.map +1 -1
  35. package/dist/delegation/transport.d.ts +10 -10
  36. package/dist/{jobs → features/jobs}/cli.js +1 -1
  37. package/dist/features/jobs/cli.js.map +1 -0
  38. package/dist/{jobs → features/jobs}/command.js +2 -2
  39. package/dist/features/jobs/command.js.map +1 -0
  40. package/dist/features/jobs/index.d.ts +11 -0
  41. package/dist/features/jobs/index.js +20 -0
  42. package/dist/features/jobs/index.js.map +1 -0
  43. package/dist/{jobs → features/jobs}/job.js +9 -10
  44. package/dist/features/jobs/job.js.map +1 -0
  45. package/dist/features/jobs/removal-slot.d.ts +14 -0
  46. package/dist/features/jobs/removal-slot.js +50 -0
  47. package/dist/features/jobs/removal-slot.js.map +1 -0
  48. package/dist/index.js +1 -1
  49. package/dist/index.js.map +1 -1
  50. package/dist/legacy-runs.js.map +1 -1
  51. package/dist/pack-check.d.ts +4 -1
  52. package/dist/pack-check.js +9 -1
  53. package/dist/pack-check.js.map +1 -1
  54. package/dist/plugin/bundled-features.d.ts +11 -0
  55. package/dist/plugin/bundled-features.js +37 -0
  56. package/dist/plugin/bundled-features.js.map +1 -0
  57. package/dist/plugin/cli.js +1 -1
  58. package/dist/plugin/index.d.ts +1 -1
  59. package/dist/plugin/loader.d.ts +2 -0
  60. package/dist/plugin/loader.js +23 -11
  61. package/dist/plugin/loader.js.map +1 -1
  62. package/dist/runners/antigravity/acp/events.d.ts +3 -5
  63. package/dist/runners/antigravity/acp/events.js +28 -13
  64. package/dist/runners/antigravity/acp/events.js.map +1 -1
  65. package/dist/runs/agent-tmpdir.d.ts +5 -4
  66. package/dist/runs/agent-tmpdir.js +7 -5
  67. package/dist/runs/agent-tmpdir.js.map +1 -1
  68. package/dist/runs/removal-slots.d.ts +15 -3
  69. package/dist/runs/removal-slots.js +12 -2
  70. package/dist/runs/removal-slots.js.map +1 -1
  71. package/dist/runs/run-exits.d.ts +352 -352
  72. package/dist/runs/worker-execution.js.map +1 -1
  73. package/dist/server/automations-routes.d.ts +150 -150
  74. package/dist/server/repo-routes.d.ts +13 -13
  75. package/dist/server/runner-install-routes.d.ts +10 -10
  76. package/dist/server/runs-routes.d.ts +956 -956
  77. package/dist/server/workspace-live-routes.d.ts +6 -6
  78. package/dist/worker-scope/groups.d.ts +0 -9
  79. package/dist/worker-scope/groups.js +3 -18
  80. package/dist/worker-scope/groups.js.map +1 -1
  81. package/dist/workflows/input-acknowledgement.d.ts +24 -24
  82. package/dist/workflows/run/run-settlement.d.ts +0 -10
  83. package/dist/workflows/run/run-settlement.js +5 -38
  84. package/dist/workflows/run/run-settlement.js.map +1 -1
  85. package/dist/workflows/run/session-events.js +0 -16
  86. package/dist/workflows/run/session-events.js.map +1 -1
  87. package/dist/workflows/run/wait-engine.d.ts +72 -72
  88. package/dist/workflows/run/wait-input-descriptors.js +11 -2
  89. package/dist/workflows/run/wait-input-descriptors.js.map +1 -1
  90. package/dist/workflows/run/wait-kinds.d.ts +52 -52
  91. package/package.json +4 -4
  92. package/scripts/check-pack.mjs +5 -2
  93. package/scripts/measure-transcript-facts-health.mjs +41 -4
  94. package/scripts/measure-transcript-facts-lag.mjs +3 -3
  95. package/scripts/transcript-facts-timing.mjs +133 -9
  96. package/web/dist/assets/{accounts-section-DmCfsIhE.js → accounts-section-DPb768q9.js} +1 -1
  97. package/web/dist/assets/{activity-motion-Dl9i8LMp.js → activity-motion-D3CzGjrR.js} +1 -1
  98. package/web/dist/assets/{activity-route-Cu2YIdei.js → activity-route-DFJlsU13.js} +1 -1
  99. package/web/dist/assets/{agent-config-section-Bzm4-R__.js → agent-config-section-2esq_SCK.js} +1 -1
  100. package/web/dist/assets/{agent-defaults-section-BKqo164A.js → agent-defaults-section-DykQGFoV.js} +1 -1
  101. package/web/dist/assets/{appearance-BqzgpB-Y.js → appearance-CEhpCQZS.js} +1 -1
  102. package/web/dist/assets/{automations-route-CUgWc2Qw.js → automations-route-C6e7440u.js} +1 -1
  103. package/web/dist/assets/{commit-diff-panel-Cm558uOv.js → commit-diff-panel-CloSSaTz.js} +1 -1
  104. package/web/dist/assets/{diff-GEuSlT_R.js → diff-DVDzDVOV.js} +2 -2
  105. package/web/dist/assets/{diff-view-DLSixc9l.js → diff-view-isM51Pgu.js} +1 -1
  106. package/web/dist/assets/{file-preview-RPc0KAo_.js → file-preview-BZA9e981.js} +1 -1
  107. package/web/dist/assets/{git-toolbar-Dd_SYvD0.js → git-toolbar-DHAavjba.js} +1 -1
  108. package/web/dist/assets/{github-CQ7IuYHM.js → github-MN8flcF0.js} +1 -1
  109. package/web/dist/assets/{global-activity-route-BxZ0CMwG.js → global-activity-route-CAXyZ8LF.js} +1 -1
  110. package/web/dist/assets/{index-BRgRv29I.js → index-CHIFhfha.js} +4 -4
  111. package/web/dist/assets/{markdown-CIm2Q7mB.js → markdown-DhdLkyGx.js} +3 -3
  112. package/web/dist/assets/{notifications-section-Cw8yBZWz.js → notifications-section-Yiyd4TEk.js} +1 -1
  113. package/web/dist/assets/{preview-pane-connected-C3DmH_yh.js → preview-pane-connected-BnNucXbg.js} +1 -1
  114. package/web/dist/assets/{projects-section-DftkCQ4q.js → projects-section-CYnMlFyZ.js} +1 -1
  115. package/web/dist/assets/{prompt-templates-section-CKSYhpin.js → prompt-templates-section-BaaI89Ej.js} +1 -1
  116. package/web/dist/assets/{remote-settings-notice-C727a84A.js → remote-settings-notice-Drbpb7K4.js} +1 -1
  117. package/web/dist/assets/{repo-git-CfmNmHkb.js → repo-git-UR__WAGI.js} +1 -1
  118. package/web/dist/assets/{report-reader-wIj2Yog1.js → report-reader-DydKaDxP.js} +1 -1
  119. package/web/dist/assets/{reports-DSkGAItT.js → reports-FE9fPBLK.js} +1 -1
  120. package/web/dist/assets/{resources-section-DaEv2dar.js → resources-section-BAz7yc3V.js} +1 -1
  121. package/web/dist/assets/{run-header-CVZ0ZK7C.js → run-header-DsyPfNlS.js} +1 -1
  122. package/web/dist/assets/{settings-agent-picker-DMVlOQzv.js → settings-agent-picker-i4wCYEex.js} +1 -1
  123. package/web/dist/assets/{settings-shell-DfnGZk9I.js → settings-shell-C1RbQ--s.js} +1 -1
  124. package/web/dist/assets/{sidebar-section-DYJZAqtU.js → sidebar-section-CdvgsziI.js} +1 -1
  125. package/web/dist/assets/{skills-CfzNcHh1.js → skills-Cx1c72fB.js} +1 -1
  126. package/web/dist/assets/{task-changes-C1I9CMew.js → task-changes-CJCU26Rn.js} +1 -1
  127. package/web/dist/assets/{task-commits-d_R4H7pu.js → task-commits-BvDHw2z3.js} +1 -1
  128. package/web/dist/assets/{task-files-B2JBO9Dx.js → task-files-BtEb73_A.js} +1 -1
  129. package/web/dist/assets/{task-github-item-C9HMDHKn.js → task-github-item-DguvLtyn.js} +1 -1
  130. package/web/dist/assets/{task-thread-dKvX9xg6.js → task-thread-DiiErUqw.js} +9 -9
  131. package/web/dist/assets/thread-state-XrQOGOYN.js +4 -0
  132. package/web/dist/assets/{use-hand-to-agent-state-DzHDdmHn.js → use-hand-to-agent-state-CDqXR3F2.js} +1 -1
  133. package/web/dist/assets/{workflows-DqArthZn.js → workflows-C8Wu6BrK.js} +1 -1
  134. package/web/dist/assets/{workspace-tools-S5KvgCRm.js → workspace-tools-DG99Pw_m.js} +1 -1
  135. package/web/dist/assets/{worktrees-section-DNFnQfiW.js → worktrees-section-BtDBsA-d.js} +1 -1
  136. package/web/dist/index.html +1 -1
  137. package/dist/jobs/cli.js.map +0 -1
  138. package/dist/jobs/command.js.map +0 -1
  139. package/dist/jobs/job.js.map +0 -1
  140. package/dist/jobs/removal-slot.d.ts +0 -4
  141. package/dist/jobs/removal-slot.js +0 -10
  142. package/dist/jobs/removal-slot.js.map +0 -1
  143. package/web/dist/assets/thread-state-B3HGSNEy.js +0 -4
  144. /package/dist/{jobs → features/jobs}/cli.d.ts +0 -0
  145. /package/dist/{jobs → features/jobs}/command.d.ts +0 -0
  146. /package/dist/{jobs → features/jobs}/job.d.ts +0 -0
@@ -237,30 +237,6 @@ export declare class WaitEngine {
237
237
  deadline: string;
238
238
  seconds: number;
239
239
  note?: string | undefined;
240
- } | {
241
- id: string;
242
- source: "agent" | "cezar";
243
- via: "ask-line" | "budget" | "cez-message-wait" | "cez-worker-wait" | "cezar_ask" | "cezar_wait" | "cezar_wait_for_ci" | "completion" | "monitoring-line" | "native-ask" | "native-subagents" | "no-wait" | "schedule-wakeup";
244
- registeredAt: string;
245
- phase: "cancelled" | "delivered" | "open" | "resolved";
246
- resolvedAt?: string | undefined;
247
- deliveredAt?: string | undefined;
248
- cancelledAt?: string | undefined;
249
- turnId: string;
250
- kind: "process";
251
- deadline: string;
252
- timeoutSeconds: number;
253
- pid: number;
254
- startToken?: string | undefined;
255
- exitFile?: string | undefined;
256
- note?: string | undefined;
257
- result?: {
258
- outcome: "deadline" | "error" | "exit_file" | "exited";
259
- observedAt: string;
260
- exitCode?: number | undefined;
261
- exitFileNote?: "not-an-exit-code" | undefined;
262
- diagnostic?: string | undefined;
263
- } | undefined;
264
240
  } | {
265
241
  id: string;
266
242
  source: "agent" | "cezar";
@@ -322,6 +298,30 @@ export declare class WaitEngine {
322
298
  reason: "outcome" | "timeout";
323
299
  } | undefined;
324
300
  wakeInputId?: string | undefined;
301
+ } | {
302
+ id: string;
303
+ source: "agent" | "cezar";
304
+ via: "ask-line" | "budget" | "cez-message-wait" | "cez-worker-wait" | "cezar_ask" | "cezar_wait" | "cezar_wait_for_ci" | "completion" | "monitoring-line" | "native-ask" | "native-subagents" | "no-wait" | "schedule-wakeup";
305
+ registeredAt: string;
306
+ phase: "cancelled" | "delivered" | "open" | "resolved";
307
+ resolvedAt?: string | undefined;
308
+ deliveredAt?: string | undefined;
309
+ cancelledAt?: string | undefined;
310
+ turnId: string;
311
+ kind: "process";
312
+ deadline: string;
313
+ timeoutSeconds: number;
314
+ pid: number;
315
+ startToken?: string | undefined;
316
+ exitFile?: string | undefined;
317
+ note?: string | undefined;
318
+ result?: {
319
+ outcome: "deadline" | "error" | "exit_file" | "exited";
320
+ observedAt: string;
321
+ exitCode?: number | undefined;
322
+ exitFileNote?: "not-an-exit-code" | undefined;
323
+ diagnostic?: string | undefined;
324
+ } | undefined;
325
325
  } | {
326
326
  id: string;
327
327
  source: "agent" | "cezar";
@@ -449,30 +449,6 @@ export declare class WaitEngine {
449
449
  deadline: string;
450
450
  seconds: number;
451
451
  note?: string | undefined;
452
- } | {
453
- id: string;
454
- source: "agent" | "cezar";
455
- via: "ask-line" | "budget" | "cez-message-wait" | "cez-worker-wait" | "cezar_ask" | "cezar_wait" | "cezar_wait_for_ci" | "completion" | "monitoring-line" | "native-ask" | "native-subagents" | "no-wait" | "schedule-wakeup";
456
- registeredAt: string;
457
- phase: "cancelled" | "delivered" | "open" | "resolved";
458
- resolvedAt?: string | undefined;
459
- deliveredAt?: string | undefined;
460
- cancelledAt?: string | undefined;
461
- turnId: string;
462
- kind: "process";
463
- deadline: string;
464
- timeoutSeconds: number;
465
- pid: number;
466
- startToken?: string | undefined;
467
- exitFile?: string | undefined;
468
- note?: string | undefined;
469
- result?: {
470
- outcome: "deadline" | "error" | "exit_file" | "exited";
471
- observedAt: string;
472
- exitCode?: number | undefined;
473
- exitFileNote?: "not-an-exit-code" | undefined;
474
- diagnostic?: string | undefined;
475
- } | undefined;
476
452
  } | {
477
453
  id: string;
478
454
  source: "agent" | "cezar";
@@ -534,6 +510,30 @@ export declare class WaitEngine {
534
510
  reason: "outcome" | "timeout";
535
511
  } | undefined;
536
512
  wakeInputId?: string | undefined;
513
+ } | {
514
+ id: string;
515
+ source: "agent" | "cezar";
516
+ via: "ask-line" | "budget" | "cez-message-wait" | "cez-worker-wait" | "cezar_ask" | "cezar_wait" | "cezar_wait_for_ci" | "completion" | "monitoring-line" | "native-ask" | "native-subagents" | "no-wait" | "schedule-wakeup";
517
+ registeredAt: string;
518
+ phase: "cancelled" | "delivered" | "open" | "resolved";
519
+ resolvedAt?: string | undefined;
520
+ deliveredAt?: string | undefined;
521
+ cancelledAt?: string | undefined;
522
+ turnId: string;
523
+ kind: "process";
524
+ deadline: string;
525
+ timeoutSeconds: number;
526
+ pid: number;
527
+ startToken?: string | undefined;
528
+ exitFile?: string | undefined;
529
+ note?: string | undefined;
530
+ result?: {
531
+ outcome: "deadline" | "error" | "exit_file" | "exited";
532
+ observedAt: string;
533
+ exitCode?: number | undefined;
534
+ exitFileNote?: "not-an-exit-code" | undefined;
535
+ diagnostic?: string | undefined;
536
+ } | undefined;
537
537
  } | {
538
538
  id: string;
539
539
  source: "agent" | "cezar";
@@ -660,30 +660,6 @@ export declare class WaitEngine {
660
660
  deadline: string;
661
661
  seconds: number;
662
662
  note?: string | undefined;
663
- } | {
664
- id: string;
665
- source: "agent" | "cezar";
666
- via: "ask-line" | "budget" | "cez-message-wait" | "cez-worker-wait" | "cezar_ask" | "cezar_wait" | "cezar_wait_for_ci" | "completion" | "monitoring-line" | "native-ask" | "native-subagents" | "no-wait" | "schedule-wakeup";
667
- registeredAt: string;
668
- phase: "cancelled" | "delivered" | "open" | "resolved";
669
- resolvedAt?: string | undefined;
670
- deliveredAt?: string | undefined;
671
- cancelledAt?: string | undefined;
672
- turnId: string;
673
- kind: "process";
674
- deadline: string;
675
- timeoutSeconds: number;
676
- pid: number;
677
- startToken?: string | undefined;
678
- exitFile?: string | undefined;
679
- note?: string | undefined;
680
- result?: {
681
- outcome: "deadline" | "error" | "exit_file" | "exited";
682
- observedAt: string;
683
- exitCode?: number | undefined;
684
- exitFileNote?: "not-an-exit-code" | undefined;
685
- diagnostic?: string | undefined;
686
- } | undefined;
687
663
  } | {
688
664
  id: string;
689
665
  source: "agent" | "cezar";
@@ -745,6 +721,30 @@ export declare class WaitEngine {
745
721
  reason: "outcome" | "timeout";
746
722
  } | undefined;
747
723
  wakeInputId?: string | undefined;
724
+ } | {
725
+ id: string;
726
+ source: "agent" | "cezar";
727
+ via: "ask-line" | "budget" | "cez-message-wait" | "cez-worker-wait" | "cezar_ask" | "cezar_wait" | "cezar_wait_for_ci" | "completion" | "monitoring-line" | "native-ask" | "native-subagents" | "no-wait" | "schedule-wakeup";
728
+ registeredAt: string;
729
+ phase: "cancelled" | "delivered" | "open" | "resolved";
730
+ resolvedAt?: string | undefined;
731
+ deliveredAt?: string | undefined;
732
+ cancelledAt?: string | undefined;
733
+ turnId: string;
734
+ kind: "process";
735
+ deadline: string;
736
+ timeoutSeconds: number;
737
+ pid: number;
738
+ startToken?: string | undefined;
739
+ exitFile?: string | undefined;
740
+ note?: string | undefined;
741
+ result?: {
742
+ outcome: "deadline" | "error" | "exit_file" | "exited";
743
+ observedAt: string;
744
+ exitCode?: number | undefined;
745
+ exitFileNote?: "not-an-exit-code" | undefined;
746
+ diagnostic?: string | undefined;
747
+ } | undefined;
748
748
  } | {
749
749
  id: string;
750
750
  source: "agent" | "cezar";
@@ -1,5 +1,9 @@
1
1
  import { builtInSquawkWaitRequestSchema } from '../../contract/index.js';
2
2
  import { z } from 'zod';
3
+ import { cliCommandAdvertised } from '../../core/cli-registry.js';
4
+ /** The process-wait fields name `hsq job` only while that command can run here; without the jobs
5
+ * feature they name only the agent's own exit file (spec 2026-11-26-launch-slot-and-bundled-jobs). */
6
+ const jobs = () => cliCommandAdvertised('job');
3
7
  const descriptions = {
4
8
  operation_id: 'Optional retry identity. Reuse it with exactly the same arguments after an unknown outcome; never use it for a different registration.',
5
9
  pr: 'kind "pr": the HTTPS GitHub pull request URL.',
@@ -12,8 +16,13 @@ const descriptions = {
12
16
  mode: 'kind "worker" or "request": "any" wakes you when one selected id settles (default), "all" when every one has, "one" takes exactly one id.',
13
17
  timeout_seconds: 'The deadline in seconds. kind "pr": 1–7200, default 1800. kind "worker", "request" or "peer": 1–7200, default 600 (the default shown is the pr one). kind "process": 1–7200, default 1800.',
14
18
  seconds: 'kind "timer": seconds until the wake (60–7200).',
15
- pid: 'kind "process": the PID of the background command: the `pid` the job start command printed.',
16
- exit_file: 'kind "process": optional. The `exitFile` that `hsq job start` printed for this `pid`, in any `--dir`, or a file that your own wrapper writes the exit code to, in $TMPDIR or the worktree, with a new name for each command. Leave it out for a command that is already running or that writes its status file somewhere else.',
19
+ get pid() {
20
+ return jobs() ? 'kind "process": the PID of the background command: the `pid` the job start command printed.'
21
+ : 'kind "process": the PID of the background command.';
22
+ },
23
+ get exit_file() {
24
+ return `kind "process": optional. ${jobs() ? 'The `exitFile` that `hsq job start` printed for this `pid`, in any `--dir`, or a' : 'A'} file that your own wrapper writes the exit code to, in $TMPDIR or the worktree, with a new name for each command. Leave it out for a command that is already running or that writes its status file somewhere else.`;
25
+ },
17
26
  note: 'kind "timer" or "process": what to re-check, handed back to you at the wake.',
18
27
  };
19
28
  const kindDescriptions = '"pr" waits for a GitHub pull request: its checks or its merge (see `until`); "worker" waits for workers you own; "request" waits for replies to requests you sent; "peer" waits for named peer tasks to message you or settle; "timer" wakes you after `seconds`; "process" wakes you when a background command ends.'.split('; ');
@@ -1 +1 @@
1
- {"version":3,"file":"wait-input-descriptors.js","sourceRoot":"","sources":["../../../src/workflows/run/wait-input-descriptors.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,8BAA8B,EAAE,MAAM,yCAAyC,CAAC;AACzF,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,MAAM,YAAY,GAA2B;IAC3C,YAAY,EAAE,wIAAwI;IACtJ,EAAE,EAAE,+CAA+C;IACnD,KAAK,EAAE,udAAud;IAC9d,gBAAgB,EAAE,8SAA8S;IAChU,QAAQ,EAAE,iLAAiL;IAC3L,UAAU,EAAE,mEAAmE;IAC/E,WAAW,EAAE,2HAA2H;IACxI,QAAQ,EAAE,wOAAwO;IAClP,IAAI,EAAE,2IAA2I;IACjJ,eAAe,EAAE,4LAA4L;IAC7M,OAAO,EAAE,iDAAiD;IAC1D,GAAG,EAAE,6FAA6F;IAClG,SAAS,EAAE,gUAAgU;IAC3U,IAAI,EAAE,8EAA8E;CACrF,CAAC;AACF,MAAM,gBAAgB,GAAG,uTAAuT,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;AAE7V,+FAA+F;AAC/F,MAAM,UAAU,iBAAiB,CAAC,IAAY;IAC5C,OAAO,8BAA8B,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,MAAM,EAAE,KAAK,EAAE,EAAE;QACtE,MAAM,WAAW,GAAG,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC;QAC5C,IAAI,WAAW,KAAK,IAAI,IAAI,CAAE,EAAE,MAAM,EAAE,CAAC,SAAS,CAAC,EAA+B,CAAC,IAAI,CAAC,EAAE,QAAQ,CAAC,WAAW,CAAC;YAAE,OAAO,EAAE,CAAC;QAC3H,MAAM,UAAU,GAAG,CAAC,CAAC,YAAY,CAAC,MAAM,EAAE,EAAE,EAAE,EAAE,OAAO,EAAE,CAAC,CAAC,UAAU,IAAI,EAAE,CAAC;QAC5E,OAAO,CAAC,EAAE,IAAI,EAAE,WAAW,EAAE,KAAK,EAAE,WAAW,EAAE,MAAM,EAAE,UAAU,EAAE,YAAY,EAAE,WAAW,EAAE,gBAAgB,CAAC,KAAK,CAAE,EAAE,CAAC,CAAC;IAC9H,CAAC,CAAC,CAAC;AACL,CAAC"}
1
+ {"version":3,"file":"wait-input-descriptors.js","sourceRoot":"","sources":["../../../src/workflows/run/wait-input-descriptors.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,8BAA8B,EAAE,MAAM,yCAAyC,CAAC;AACzF,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,oBAAoB,EAAE,MAAM,4BAA4B,CAAC;AAElE;uGACuG;AACvG,MAAM,IAAI,GAAG,GAAG,EAAE,CAAC,oBAAoB,CAAC,KAAK,CAAC,CAAC;AAE/C,MAAM,YAAY,GAA2B;IAC3C,YAAY,EAAE,wIAAwI;IACtJ,EAAE,EAAE,+CAA+C;IACnD,KAAK,EAAE,udAAud;IAC9d,gBAAgB,EAAE,8SAA8S;IAChU,QAAQ,EAAE,iLAAiL;IAC3L,UAAU,EAAE,mEAAmE;IAC/E,WAAW,EAAE,2HAA2H;IACxI,QAAQ,EAAE,wOAAwO;IAClP,IAAI,EAAE,2IAA2I;IACjJ,eAAe,EAAE,4LAA4L;IAC7M,OAAO,EAAE,iDAAiD;IAC1D,IAAI,GAAG;QACL,OAAO,IAAI,EAAE,CAAC,CAAC,CAAC,6FAA6F;YAC3G,CAAC,CAAC,oDAAoD,CAAC;IAC3D,CAAC;IACD,IAAI,SAAS;QACX,OAAO,6BAA6B,IAAI,EAAE,CAAC,CAAC,CAAC,kFAAkF,CAAC,CAAC,CAAC,GAAG,sNAAsN,CAAC;IAC9V,CAAC;IACD,IAAI,EAAE,8EAA8E;CACrF,CAAC;AACF,MAAM,gBAAgB,GAAG,uTAAuT,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;AAE7V,+FAA+F;AAC/F,MAAM,UAAU,iBAAiB,CAAC,IAAY;IAC5C,OAAO,8BAA8B,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,MAAM,EAAE,KAAK,EAAE,EAAE;QACtE,MAAM,WAAW,GAAG,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC;QAC5C,IAAI,WAAW,KAAK,IAAI,IAAI,CAAE,EAAE,MAAM,EAAE,CAAC,SAAS,CAAC,EAA+B,CAAC,IAAI,CAAC,EAAE,QAAQ,CAAC,WAAW,CAAC;YAAE,OAAO,EAAE,CAAC;QAC3H,MAAM,UAAU,GAAG,CAAC,CAAC,YAAY,CAAC,MAAM,EAAE,EAAE,EAAE,EAAE,OAAO,EAAE,CAAC,CAAC,UAAU,IAAI,EAAE,CAAC;QAC5E,OAAO,CAAC,EAAE,IAAI,EAAE,WAAW,EAAE,KAAK,EAAE,WAAW,EAAE,MAAM,EAAE,UAAU,EAAE,YAAY,EAAE,WAAW,EAAE,gBAAgB,CAAC,KAAK,CAAE,EAAE,CAAC,CAAC;IAC9H,CAAC,CAAC,CAAC;AACL,CAAC"}
@@ -234,6 +234,32 @@ export declare function waitSelectors<K extends Wait['kind']>(kind: K): {
234
234
  note?: string | undefined;
235
235
  }, {
236
236
  kind: K;
237
+ }> | Extract<{
238
+ id: string;
239
+ source: "agent" | "cezar";
240
+ via: "ask-line" | "budget" | "cez-message-wait" | "cez-worker-wait" | "cezar_ask" | "cezar_wait" | "cezar_wait_for_ci" | "completion" | "monitoring-line" | "native-ask" | "native-subagents" | "no-wait" | "schedule-wakeup";
241
+ registeredAt: string;
242
+ phase: "cancelled" | "delivered" | "open" | "resolved";
243
+ resolvedAt?: string | undefined;
244
+ deliveredAt?: string | undefined;
245
+ cancelledAt?: string | undefined;
246
+ turnId: string;
247
+ kind: "process";
248
+ deadline: string;
249
+ timeoutSeconds: number;
250
+ pid: number;
251
+ startToken?: string | undefined;
252
+ exitFile?: string | undefined;
253
+ note?: string | undefined;
254
+ result?: {
255
+ outcome: "deadline" | "error" | "exit_file" | "exited";
256
+ observedAt: string;
257
+ exitCode?: number | undefined;
258
+ exitFileNote?: "not-an-exit-code" | undefined;
259
+ diagnostic?: string | undefined;
260
+ } | undefined;
261
+ }, {
262
+ kind: K;
237
263
  }> | Extract<{
238
264
  id: string;
239
265
  source: "agent" | "cezar";
@@ -299,32 +325,6 @@ export declare function waitSelectors<K extends Wait['kind']>(kind: K): {
299
325
  wakeInputId?: string | undefined;
300
326
  }, {
301
327
  kind: K;
302
- }> | Extract<{
303
- id: string;
304
- source: "agent" | "cezar";
305
- via: "ask-line" | "budget" | "cez-message-wait" | "cez-worker-wait" | "cezar_ask" | "cezar_wait" | "cezar_wait_for_ci" | "completion" | "monitoring-line" | "native-ask" | "native-subagents" | "no-wait" | "schedule-wakeup";
306
- registeredAt: string;
307
- phase: "cancelled" | "delivered" | "open" | "resolved";
308
- resolvedAt?: string | undefined;
309
- deliveredAt?: string | undefined;
310
- cancelledAt?: string | undefined;
311
- turnId: string;
312
- kind: "process";
313
- deadline: string;
314
- timeoutSeconds: number;
315
- pid: number;
316
- startToken?: string | undefined;
317
- exitFile?: string | undefined;
318
- note?: string | undefined;
319
- result?: {
320
- outcome: "deadline" | "error" | "exit_file" | "exited";
321
- observedAt: string;
322
- exitCode?: number | undefined;
323
- exitFileNote?: "not-an-exit-code" | undefined;
324
- diagnostic?: string | undefined;
325
- } | undefined;
326
- }, {
327
- kind: K;
328
328
  }> | Extract<{
329
329
  id: string;
330
330
  source: "agent" | "cezar";
@@ -459,6 +459,32 @@ export declare function waitSelectors<K extends Wait['kind']>(kind: K): {
459
459
  note?: string | undefined;
460
460
  }, {
461
461
  kind: K;
462
+ }> | Extract<{
463
+ id: string;
464
+ source: "agent" | "cezar";
465
+ via: "ask-line" | "budget" | "cez-message-wait" | "cez-worker-wait" | "cezar_ask" | "cezar_wait" | "cezar_wait_for_ci" | "completion" | "monitoring-line" | "native-ask" | "native-subagents" | "no-wait" | "schedule-wakeup";
466
+ registeredAt: string;
467
+ phase: "cancelled" | "delivered" | "open" | "resolved";
468
+ resolvedAt?: string | undefined;
469
+ deliveredAt?: string | undefined;
470
+ cancelledAt?: string | undefined;
471
+ turnId: string;
472
+ kind: "process";
473
+ deadline: string;
474
+ timeoutSeconds: number;
475
+ pid: number;
476
+ startToken?: string | undefined;
477
+ exitFile?: string | undefined;
478
+ note?: string | undefined;
479
+ result?: {
480
+ outcome: "deadline" | "error" | "exit_file" | "exited";
481
+ observedAt: string;
482
+ exitCode?: number | undefined;
483
+ exitFileNote?: "not-an-exit-code" | undefined;
484
+ diagnostic?: string | undefined;
485
+ } | undefined;
486
+ }, {
487
+ kind: K;
462
488
  }> | Extract<{
463
489
  id: string;
464
490
  source: "agent" | "cezar";
@@ -524,32 +550,6 @@ export declare function waitSelectors<K extends Wait['kind']>(kind: K): {
524
550
  wakeInputId?: string | undefined;
525
551
  }, {
526
552
  kind: K;
527
- }> | Extract<{
528
- id: string;
529
- source: "agent" | "cezar";
530
- via: "ask-line" | "budget" | "cez-message-wait" | "cez-worker-wait" | "cezar_ask" | "cezar_wait" | "cezar_wait_for_ci" | "completion" | "monitoring-line" | "native-ask" | "native-subagents" | "no-wait" | "schedule-wakeup";
531
- registeredAt: string;
532
- phase: "cancelled" | "delivered" | "open" | "resolved";
533
- resolvedAt?: string | undefined;
534
- deliveredAt?: string | undefined;
535
- cancelledAt?: string | undefined;
536
- turnId: string;
537
- kind: "process";
538
- deadline: string;
539
- timeoutSeconds: number;
540
- pid: number;
541
- startToken?: string | undefined;
542
- exitFile?: string | undefined;
543
- note?: string | undefined;
544
- result?: {
545
- outcome: "deadline" | "error" | "exit_file" | "exited";
546
- observedAt: string;
547
- exitCode?: number | undefined;
548
- exitFileNote?: "not-an-exit-code" | undefined;
549
- diagnostic?: string | undefined;
550
- } | undefined;
551
- }, {
552
- kind: K;
553
553
  }> | Extract<{
554
554
  id: string;
555
555
  source: "agent" | "cezar";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hearsay-tools/squawk",
3
- "version": "0.18.0-pr4335.8421",
3
+ "version": "0.18.0-pr4337.8439",
4
4
  "description": "Local cockpit for running and tracking AI agent tasks in your repo. Uses your logged-in `claude` CLI and `gh` — zero config, zero database.",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -68,8 +68,8 @@
68
68
  "devDependencies": {
69
69
  "@babel/parser": "^8.0.8",
70
70
  "@babel/types": "^8.0.8",
71
- "@open-mercato/cezar-api-client": "0.18.0-pr4335.8421",
72
- "@open-mercato/cezar-contract": "0.18.0-pr4335.8421",
71
+ "@open-mercato/cezar-api-client": "0.18.0-pr4337.8439",
72
+ "@open-mercato/cezar-contract": "0.18.0-pr4337.8439",
73
73
  "@types/node": "^24.19.1",
74
74
  "@types/ws": "^8.18.1",
75
75
  "esbuild": "^0.28.1",
@@ -86,5 +86,5 @@
86
86
  "publishConfig": {
87
87
  "access": "public"
88
88
  },
89
- "gitHead": "3d1be01cb76280db5b70521f229975e50f31f161"
89
+ "gitHead": "b9c1293d96dd5b49cf106855c06eda15dba8624b"
90
90
  }
@@ -16,6 +16,7 @@ import path from 'node:path';
16
16
  import { fileURLToPath } from 'node:url';
17
17
  import { findPackGaps } from '../dist/pack-check.js';
18
18
  import { bundledRunnerIds } from '../dist/plugin/bundled-runners.js';
19
+ import { bundledFeatureFolders } from '../dist/plugin/bundled-features.js';
19
20
  import { listRunnerAssets } from './copy-runner-assets.mjs';
20
21
 
21
22
  const repoRoot = path.resolve(path.dirname(fileURLToPath(import.meta.url)), '..');
@@ -43,7 +44,9 @@ if (files.length === 0) {
43
44
  const srcRunnersDir = path.join(repoRoot, 'src/runners');
44
45
  const runnerIds = bundledRunnerIds(srcRunnersDir);
45
46
  const runnerAssets = listRunnerAssets(srcRunnersDir, runnerIds).map((rel) => `dist/runners/${rel}`);
46
- const gaps = findPackGaps(files, runnerIds, runnerAssets);
47
+ // The bundled features the source declares: each must ship its built plugin entry.
48
+ const featureIds = bundledFeatureFolders(path.join(repoRoot, 'src/features')).map((folder) => folder.id);
49
+ const gaps = findPackGaps(files, runnerIds, runnerAssets, featureIds);
47
50
  if (gaps.length > 0) {
48
51
  console.error('check:pack: the npm tarball would ship a broken cockpit:');
49
52
  for (const gap of gaps) console.error(` - ${gap}`);
@@ -51,4 +54,4 @@ if (gaps.length > 0) {
51
54
  }
52
55
 
53
56
  const uiFiles = files.filter((f) => f.startsWith('web/dist/')).length;
54
- console.log(`check:pack ok — ${files.length} files, ${uiFiles} under web/dist (shell + assets present), bundled runners ${runnerIds.join(', ')}, ${runnerAssets.length} runner asset(s)`);
57
+ console.log(`check:pack ok — ${files.length} files, ${uiFiles} under web/dist (shell + assets present), bundled runners ${runnerIds.join(', ')}, ${runnerAssets.length} runner asset(s), bundled features ${featureIds.join(', ') || 'none'}`);
@@ -8,7 +8,8 @@ import { mkdtempSync, readdirSync, rmSync } from 'node:fs';
8
8
  import { tmpdir } from 'node:os';
9
9
  import { join } from 'node:path';
10
10
  import { setTimeout as delay } from 'node:timers/promises';
11
- import { timingSnapshot, timingDelta, blockingBudget, prepareOpenTiming } from './transcript-facts-timing.mjs';
11
+ import { PerformanceObserver } from 'node:perf_hooks';
12
+ import { timingSnapshot, timingDelta, blockingBudget, prepareOpenTiming, hookCalls, callsWithin, startThreadWatch, summarizeWaits } from './transcript-facts-timing.mjs';
12
13
  import { seedColdHistories, verifyFacts } from './transcript-facts-fixture.mjs';
13
14
 
14
15
  const root = mkdtempSync(join(process.platform === 'win32' ? tmpdir() : '/tmp', 'cez-facts-health-'));
@@ -23,6 +24,9 @@ let dataDir;
23
24
  let store;
24
25
  let bootStore;
25
26
  let server;
27
+ let unhookCalls;
28
+ let gcObserver;
29
+ let threadWatch;
26
30
  const watchdog = setTimeout(() => { console.error('health measurement exceeded 30s'); process.exitCode = 1; server?.closeAllConnections(); server?.close(); store?.close(); bootStore?.close(); }, 30_000);
27
31
  try {
28
32
  const { RunStore } = await import(new URL('runs/store.js', runtime.url));
@@ -79,18 +83,32 @@ try {
79
83
  assert.equal((await prime.json()).version, 'task4-measurement');
80
84
  const primingLatencyMs = performance.now() - primingStart;
81
85
  assert.equal(readdirSync(join(dataDir, 'runs')).filter(name => name.endsWith('.facts.json')).length, 0);
86
+ // Diagnostics only: name the main-thread calls and GC pauses inside each sample.
87
+ const { TranscriptFactsIndex } = await import(new URL('runs/transcript-facts.js', runtime.url));
88
+ const { TranscriptFactsQueue } = await import(new URL('runs/transcript-facts-queue.js', runtime.url));
89
+ const { RunQueriesTopic } = await import(new URL('runs/run-queries.js', runtime.url));
90
+ const calls = [];
91
+ unhookCalls = hookCalls([[RunQueriesTopic.prototype, 'listConversationRootIds'], [RunQueriesTopic.prototype, 'listFamilyRunIds'],
92
+ [RunQueriesTopic.prototype, 'listRunIds'], [TranscriptFactsIndex.prototype, 'warm'], [TranscriptFactsIndex.prototype, 'peek'],
93
+ [TranscriptFactsIndex.prototype, 'accept'], [TranscriptFactsIndex.prototype, 'persist'],
94
+ [TranscriptFactsQueue.prototype, 'start'], [TranscriptFactsQueue.prototype, 'createWorker']], calls);
95
+ const gcPauses = [];
96
+ gcObserver = new PerformanceObserver(list => { for (const entry of list.getEntries()) gcPauses.push(entry); });
97
+ gcObserver.observe({ entryTypes: ['gc'] });
98
+ threadWatch = await startThreadWatch();
82
99
  const start = performance.now();
83
100
  let end;
84
101
  let warming;
85
102
  const samples = [];
86
103
  const pauseMs = 5;
87
104
  // Each sample after the first also covers the pause before its request, so blocking
88
- // between requests is measured too; blockingBudget subtracts the planned pause.
105
+ // between requests is measured too; the pause is loop idle time, which blockingBudget excludes.
89
106
  let pauseStart;
90
107
  for (;;) {
91
108
  const measurementStart = pauseStart ?? timingSnapshot();
92
109
  const plannedMs = pauseStart ? pauseMs : 0;
93
110
  const requestStart = performance.now();
111
+ if (!store) threadWatch?.watch(true);
94
112
  const pendingResponse = fetch(endpoint, { signal: AbortSignal.timeout(2_000) });
95
113
  // The first request includes synchronous project-open work too.
96
114
  if (!store) {
@@ -103,13 +121,26 @@ try {
103
121
  const requestEnd = performance.now();
104
122
  // Include EVERY request begun while cold warm-up was active, even one ending after it.
105
123
  const measurement = timingDelta(measurementStart, timingSnapshot());
124
+ threadWatch?.watch(false);
106
125
  samples.push({ fromMs: measurementStart.at - start, startMs: requestStart - start, endMs: requestEnd - start,
107
- latencyMs: requestEnd - requestStart, plannedMs, ...measurement, ...blockingBudget(measurement, plannedMs) });
126
+ latencyMs: requestEnd - requestStart, plannedMs, ...measurement, ...blockingBudget(measurement) });
108
127
  if (end !== undefined) break;
109
128
  pauseStart = timingSnapshot();
110
129
  await delay(pauseMs);
111
130
  }
112
131
  await warming;
132
+ unhookCalls();
133
+ const firstSampleWaits = (await threadWatch?.stop()) ?? [];
134
+ threadWatch = undefined;
135
+ for (const entry of gcObserver.takeRecords()) gcPauses.push(entry);
136
+ gcObserver.disconnect();
137
+ for (const sample of samples) {
138
+ const from = start + sample.fromMs;
139
+ const to = from + sample.elapsedMs;
140
+ const gc = gcPauses.filter(entry => entry.startTime >= from && entry.startTime < to);
141
+ Object.assign(sample, { calls: callsWithin(calls, from, to),
142
+ gc: { count: gc.length, durationMs: gc.reduce((sum, entry) => sum + entry.duration, 0) } });
143
+ }
113
144
  assert.ok(samples.length > 0, 'health requests must overlap cold warming');
114
145
  assert.ok(samples.every(sample => sample.fromMs < end - start && sample.endMs > 0));
115
146
  // Keep first-open and repeated-open costs separate. Reopening must not rescan clean history.
@@ -124,12 +155,18 @@ try {
124
155
  ...verifyFacts(dataDir, fixtures, store), durationMs: end - start,
125
156
  maxBlockingMs: Math.max(...samples.map(sample => sample.blockingMs)),
126
157
  maxMainThreadCpuMs: Math.max(...samples.map(sample => sample.mainThreadCpuMs)),
158
+ maxLoopIdleMs: Math.max(...samples.map(sample => sample.loopIdleMs)),
159
+ firstSampleWaits: summarizeWaits(firstSampleWaits), firstSampleWaitTrace: firstSampleWaits.slice(0, 300),
127
160
  sampleCount: samples.length, maxLatencyMs: Math.max(...samples.map(sample => sample.latencyMs)), samples };
128
161
  console.log(JSON.stringify(result));
129
- // Exclude run-queue delay, but retain synchronous blocking and request latency.
162
+ // Exclude run-queue delay and loop idle time: a response that waits on the thread pool, a worker
163
+ // or the kernel is latency (kept in maxLatencyMs), not main-thread blocking. Synchronous work counts.
130
164
  assert.ok(result.maxBlockingMs < 50, `max health blocking ${result.maxBlockingMs.toFixed(3)}ms must be <50ms`);
131
165
  } finally {
132
166
  clearTimeout(watchdog);
167
+ unhookCalls?.();
168
+ gcObserver?.disconnect();
169
+ await threadWatch?.stop();
133
170
  let cleanupTimer;
134
171
  try {
135
172
  if (server) await Promise.race([server.shutdownForRestart(), new Promise((_, reject) => {
@@ -2,7 +2,7 @@
2
2
  * node --expose-gc --import tsx packages/cezar/scripts/measure-transcript-facts-lag.mjs
3
3
  * Built runtime: pass an absolute dist directory. Baseline source: pass its src directory and ts.
4
4
  * A separate process removes test-runner loop work, NOT unrelated host CPU scheduling.
5
- * Gate loop CPU and blocking time; exclude host run-queue delay.
5
+ * Gate loop CPU and blocking time; exclude loop idle time and host run-queue delay.
6
6
  */
7
7
  import assert from 'node:assert/strict';
8
8
  import { mkdtempSync, rmSync } from 'node:fs';
@@ -30,7 +30,7 @@ try {
30
30
  timer = setInterval(() => {
31
31
  const current = timingSnapshot();
32
32
  const sample = timingDelta(previous, current);
33
- ticks.push({ at: current.at, lagMs: Math.max(0, sample.elapsedMs - periodMs), ...sample, ...blockingBudget(sample, periodMs) });
33
+ ticks.push({ at: current.at, lagMs: Math.max(0, sample.elapsedMs - periodMs), ...sample, ...blockingBudget(sample) });
34
34
  previous = current;
35
35
  }, periodMs);
36
36
  // Establish a real interval before starting; retain the first tick after completion too.
@@ -69,7 +69,7 @@ try {
69
69
  assert.ok(result.trailingTicks > 0, 'must retain a trailing tick after warming');
70
70
  assert.ok(overlapping.length > 0, 'must sample during cold warm-up');
71
71
  assert.ok(result.durationMs > 0);
72
- // Exclude planned timer sleep and run-queue delay, but retain synchronous blocking.
72
+ // Exclude loop idle time (the planned timer sleep) and run-queue delay, but retain synchronous blocking.
73
73
  assert.ok(result.maxBlockingMs < 20, `max interval blocking ${result.maxBlockingMs.toFixed(3)}ms must be <20ms`);
74
74
  } finally {
75
75
  clearInterval(timer);