@hearsay-tools/squawk 0.18.0-dev.6924 → 0.18.0-dev.6941

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 (69) hide show
  1. package/dist/contract/index.js +12 -4
  2. package/dist/contract/runs.d.ts +13 -2
  3. package/dist/delegation/conversations.d.ts +6 -0
  4. package/dist/delegation/routes.d.ts +62 -62
  5. package/dist/runs/legacy-run-rows.d.ts +7 -0
  6. package/dist/runs/legacy-run-rows.js +25 -0
  7. package/dist/runs/legacy-run-rows.js.map +1 -1
  8. package/dist/runs/outcome-commit.d.ts +1 -5
  9. package/dist/runs/outcome-commit.js +1 -2
  10. package/dist/runs/outcome-commit.js.map +1 -1
  11. package/dist/runs/run-exits.d.ts +18 -0
  12. package/dist/runs/store.d.ts +6 -0
  13. package/dist/server/reports-api.d.ts +2 -2
  14. package/dist/server/server.d.ts +54 -0
  15. package/dist/workflows/continuation-admission.d.ts +3 -0
  16. package/dist/workflows/run/done-accepted.d.ts +14 -8
  17. package/dist/workflows/run/done-accepted.js +31 -12
  18. package/dist/workflows/run/done-accepted.js.map +1 -1
  19. package/dist/workflows/run/input-delivery.d.ts +5 -3
  20. package/dist/workflows/run/input-delivery.js +15 -9
  21. package/dist/workflows/run/input-delivery.js.map +1 -1
  22. package/dist/workflows/run/run-finish.js +8 -5
  23. package/dist/workflows/run/run-finish.js.map +1 -1
  24. package/dist/workflows/run/turn-settler.js +2 -2
  25. package/dist/workflows/run/turn-settler.js.map +1 -1
  26. package/dist/workflows/run/wait-engine.d.ts +3 -0
  27. package/dist/workflows/run/wait-kinds.d.ts +2 -2
  28. package/dist/workflows/run/wait-kinds.js +2 -1
  29. package/dist/workflows/run/wait-kinds.js.map +1 -1
  30. package/package.json +4 -4
  31. package/web/dist/assets/{activity-motion-DXtoOkpz.js → activity-motion-CNFhTAyJ.js} +1 -1
  32. package/web/dist/assets/{activity-route-r-em7Y-G.js → activity-route-DEw-RhOo.js} +1 -1
  33. package/web/dist/assets/{agent-accounts-DuMsyDoO.js → agent-accounts-BiXu1qX6.js} +1 -1
  34. package/web/dist/assets/attention-D4F-L5Pd.js +1 -0
  35. package/web/dist/assets/{commit-diff-panel-BGLQaKRb.js → commit-diff-panel-BmrwPYS-.js} +1 -1
  36. package/web/dist/assets/{diff-BRFJnYsC.js → diff-DnpyQ0n1.js} +2 -2
  37. package/web/dist/assets/{diff-view-JWqbvzMs.js → diff-view-Bt1YTobA.js} +1 -1
  38. package/web/dist/assets/{file-preview-BW__Krxm.js → file-preview-BjxKsQu3.js} +1 -1
  39. package/web/dist/assets/{git-toolbar-DoXf_s-G.js → git-toolbar-BO3VJ7ch.js} +1 -1
  40. package/web/dist/assets/{github-CijmslJ6.js → github-DpER38di.js} +1 -1
  41. package/web/dist/assets/{global-activity-route-B2EeYnAW.js → global-activity-route-BvAyzzV-.js} +1 -1
  42. package/web/dist/assets/{index-BHoqo9RG.js → index-BgSywETH.js} +4 -4
  43. package/web/dist/assets/{preview-pane-connected-D6vrA6hJ.js → preview-pane-connected-DXW08Xx1.js} +1 -1
  44. package/web/dist/assets/{project-router-C5EZmTkk.js → project-router-znDYCNAi.js} +1 -1
  45. package/web/dist/assets/{project-scope-context-HUq7jkZN.js → project-scope-context-D8RGERU-.js} +1 -1
  46. package/web/dist/assets/{prompt-template-menu-DOYsMTKv.js → prompt-template-menu-tmJbj04L.js} +1 -1
  47. package/web/dist/assets/{queries-BXHx1ZPw.js → queries-LH_fzdoQ.js} +1 -1
  48. package/web/dist/assets/{reference-chip-CjJnlcQb.js → reference-chip-DMasK3J9.js} +1 -1
  49. package/web/dist/assets/{repo-git-CyRoQgtr.js → repo-git-CLGuBU9l.js} +1 -1
  50. package/web/dist/assets/{report-reader-BJiEbYfZ.js → report-reader-zvoZvJ8x.js} +1 -1
  51. package/web/dist/assets/{reports-Ddn-WBxa.js → reports-Dw0aaOYg.js} +1 -1
  52. package/web/dist/assets/{run-header-B7qHisMu.js → run-header-pjcEwvZV.js} +1 -1
  53. package/web/dist/assets/{skills-D2wzJWpY.js → skills-DWQTOqs8.js} +1 -1
  54. package/web/dist/assets/{tab-link-B_gKjZgM.js → tab-link-C5SNXkMO.js} +1 -1
  55. package/web/dist/assets/{task-changes-CqKQIYHP.js → task-changes-DNrFdznk.js} +1 -1
  56. package/web/dist/assets/{task-commits-CY7XFJBU.js → task-commits-rBD5uKnT.js} +1 -1
  57. package/web/dist/assets/{task-files-CW1gWAY3.js → task-files-Bd7-ZWkS.js} +1 -1
  58. package/web/dist/assets/{task-github-item-Djq-z2As.js → task-github-item-BwxuT5Wp.js} +1 -1
  59. package/web/dist/assets/{task-thread-DyZ9WjLc.js → task-thread-LWQvapkq.js} +1 -1
  60. package/web/dist/assets/{thread-state-Dbru_dO3.js → thread-state-BNabVGns.js} +1 -1
  61. package/web/dist/assets/{use-desktop-BCMH-x7R.js → use-desktop-kNRvVC8C.js} +1 -1
  62. package/web/dist/assets/{use-hand-to-agent-state-C94Si0KS.js → use-hand-to-agent-state-C54WuUrs.js} +1 -1
  63. package/web/dist/assets/{useInfiniteQuery-O53uZ95W.js → useInfiniteQuery-DZDwRft0.js} +1 -1
  64. package/web/dist/assets/useQuery-BTWv1-sJ.js +1 -0
  65. package/web/dist/assets/{workflows-CwS6zbSa.js → workflows-BeWMwP3r.js} +1 -1
  66. package/web/dist/assets/{ws-CRnL5yIc.js → ws-ClC12aJd.js} +1 -1
  67. package/web/dist/index.html +12 -12
  68. package/web/dist/assets/attention-CB_z05E7.js +0 -1
  69. package/web/dist/assets/useQuery-C9ErlZEv.js +0 -1
@@ -7078,6 +7078,9 @@ export declare function createApp(deps: ServerDeps): import("hono/hono-base").Ho
7078
7078
  session: string;
7079
7079
  at: string;
7080
7080
  seq: number;
7081
+ openWaits: string[];
7082
+ settledWaits: string[];
7083
+ lastInput?: string | undefined;
7081
7084
  summary?: string | undefined;
7082
7085
  freeTurn?: true | undefined;
7083
7086
  } | undefined;
@@ -9693,6 +9696,9 @@ export declare function createApp(deps: ServerDeps): import("hono/hono-base").Ho
9693
9696
  session: string;
9694
9697
  at: string;
9695
9698
  seq: number;
9699
+ openWaits: string[];
9700
+ settledWaits: string[];
9701
+ lastInput?: string | undefined;
9696
9702
  summary?: string | undefined;
9697
9703
  freeTurn?: true | undefined;
9698
9704
  } | undefined;
@@ -10800,6 +10806,9 @@ export declare function createApp(deps: ServerDeps): import("hono/hono-base").Ho
10800
10806
  session: string;
10801
10807
  at: string;
10802
10808
  seq: number;
10809
+ openWaits: string[];
10810
+ settledWaits: string[];
10811
+ lastInput?: string | undefined;
10803
10812
  summary?: string | undefined;
10804
10813
  freeTurn?: true | undefined;
10805
10814
  } | undefined;
@@ -11908,6 +11917,9 @@ export declare function createApp(deps: ServerDeps): import("hono/hono-base").Ho
11908
11917
  session: string;
11909
11918
  at: string;
11910
11919
  seq: number;
11920
+ openWaits: string[];
11921
+ settledWaits: string[];
11922
+ lastInput?: string | undefined;
11911
11923
  summary?: string | undefined;
11912
11924
  freeTurn?: true | undefined;
11913
11925
  } | undefined;
@@ -13043,6 +13055,9 @@ export declare function createApp(deps: ServerDeps): import("hono/hono-base").Ho
13043
13055
  session: string;
13044
13056
  at: string;
13045
13057
  seq: number;
13058
+ openWaits: string[];
13059
+ settledWaits: string[];
13060
+ lastInput?: string | undefined;
13046
13061
  summary?: string | undefined;
13047
13062
  freeTurn?: true | undefined;
13048
13063
  } | undefined;
@@ -14126,6 +14141,9 @@ export declare function createApp(deps: ServerDeps): import("hono/hono-base").Ho
14126
14141
  session: string;
14127
14142
  at: string;
14128
14143
  seq: number;
14144
+ openWaits: string[];
14145
+ settledWaits: string[];
14146
+ lastInput?: string | undefined;
14129
14147
  summary?: string | undefined;
14130
14148
  freeTurn?: true | undefined;
14131
14149
  } | undefined;
@@ -15209,6 +15227,9 @@ export declare function createApp(deps: ServerDeps): import("hono/hono-base").Ho
15209
15227
  session: string;
15210
15228
  at: string;
15211
15229
  seq: number;
15230
+ openWaits: string[];
15231
+ settledWaits: string[];
15232
+ lastInput?: string | undefined;
15212
15233
  summary?: string | undefined;
15213
15234
  freeTurn?: true | undefined;
15214
15235
  } | undefined;
@@ -15431,6 +15452,9 @@ export declare function createApp(deps: ServerDeps): import("hono/hono-base").Ho
15431
15452
  session: string;
15432
15453
  at: string;
15433
15454
  seq: number;
15455
+ openWaits: string[];
15456
+ settledWaits: string[];
15457
+ lastInput?: string | undefined;
15434
15458
  summary?: string | undefined;
15435
15459
  freeTurn?: true | undefined;
15436
15460
  } | undefined;
@@ -17576,6 +17600,9 @@ export declare function createApp(deps: ServerDeps): import("hono/hono-base").Ho
17576
17600
  session: string;
17577
17601
  at: string;
17578
17602
  seq: number;
17603
+ openWaits: string[];
17604
+ settledWaits: string[];
17605
+ lastInput?: string | undefined;
17579
17606
  summary?: string | undefined;
17580
17607
  freeTurn?: true | undefined;
17581
17608
  } | undefined;
@@ -22956,6 +22983,9 @@ export declare function createApp(deps: ServerDeps): import("hono/hono-base").Ho
22956
22983
  session: string;
22957
22984
  at: string;
22958
22985
  seq: number;
22986
+ openWaits: string[];
22987
+ settledWaits: string[];
22988
+ lastInput?: string | undefined;
22959
22989
  summary?: string | undefined;
22960
22990
  freeTurn?: true | undefined;
22961
22991
  } | undefined;
@@ -25571,6 +25601,9 @@ export declare function createApp(deps: ServerDeps): import("hono/hono-base").Ho
25571
25601
  session: string;
25572
25602
  at: string;
25573
25603
  seq: number;
25604
+ openWaits: string[];
25605
+ settledWaits: string[];
25606
+ lastInput?: string | undefined;
25574
25607
  summary?: string | undefined;
25575
25608
  freeTurn?: true | undefined;
25576
25609
  } | undefined;
@@ -26678,6 +26711,9 @@ export declare function createApp(deps: ServerDeps): import("hono/hono-base").Ho
26678
26711
  session: string;
26679
26712
  at: string;
26680
26713
  seq: number;
26714
+ openWaits: string[];
26715
+ settledWaits: string[];
26716
+ lastInput?: string | undefined;
26681
26717
  summary?: string | undefined;
26682
26718
  freeTurn?: true | undefined;
26683
26719
  } | undefined;
@@ -27786,6 +27822,9 @@ export declare function createApp(deps: ServerDeps): import("hono/hono-base").Ho
27786
27822
  session: string;
27787
27823
  at: string;
27788
27824
  seq: number;
27825
+ openWaits: string[];
27826
+ settledWaits: string[];
27827
+ lastInput?: string | undefined;
27789
27828
  summary?: string | undefined;
27790
27829
  freeTurn?: true | undefined;
27791
27830
  } | undefined;
@@ -28921,6 +28960,9 @@ export declare function createApp(deps: ServerDeps): import("hono/hono-base").Ho
28921
28960
  session: string;
28922
28961
  at: string;
28923
28962
  seq: number;
28963
+ openWaits: string[];
28964
+ settledWaits: string[];
28965
+ lastInput?: string | undefined;
28924
28966
  summary?: string | undefined;
28925
28967
  freeTurn?: true | undefined;
28926
28968
  } | undefined;
@@ -30004,6 +30046,9 @@ export declare function createApp(deps: ServerDeps): import("hono/hono-base").Ho
30004
30046
  session: string;
30005
30047
  at: string;
30006
30048
  seq: number;
30049
+ openWaits: string[];
30050
+ settledWaits: string[];
30051
+ lastInput?: string | undefined;
30007
30052
  summary?: string | undefined;
30008
30053
  freeTurn?: true | undefined;
30009
30054
  } | undefined;
@@ -31087,6 +31132,9 @@ export declare function createApp(deps: ServerDeps): import("hono/hono-base").Ho
31087
31132
  session: string;
31088
31133
  at: string;
31089
31134
  seq: number;
31135
+ openWaits: string[];
31136
+ settledWaits: string[];
31137
+ lastInput?: string | undefined;
31090
31138
  summary?: string | undefined;
31091
31139
  freeTurn?: true | undefined;
31092
31140
  } | undefined;
@@ -31309,6 +31357,9 @@ export declare function createApp(deps: ServerDeps): import("hono/hono-base").Ho
31309
31357
  session: string;
31310
31358
  at: string;
31311
31359
  seq: number;
31360
+ openWaits: string[];
31361
+ settledWaits: string[];
31362
+ lastInput?: string | undefined;
31312
31363
  summary?: string | undefined;
31313
31364
  freeTurn?: true | undefined;
31314
31365
  } | undefined;
@@ -33454,6 +33505,9 @@ export declare function createApp(deps: ServerDeps): import("hono/hono-base").Ho
33454
33505
  session: string;
33455
33506
  at: string;
33456
33507
  seq: number;
33508
+ openWaits: string[];
33509
+ settledWaits: string[];
33510
+ lastInput?: string | undefined;
33457
33511
  summary?: string | undefined;
33458
33512
  freeTurn?: true | undefined;
33459
33513
  } | undefined;
@@ -1141,6 +1141,9 @@ export declare class ContinuationChecks {
1141
1141
  session: string;
1142
1142
  at: string;
1143
1143
  seq: number;
1144
+ openWaits: string[];
1145
+ settledWaits: string[];
1146
+ lastInput?: string | undefined;
1144
1147
  summary?: string | undefined;
1145
1148
  freeTurn?: true | undefined;
1146
1149
  } | undefined;
@@ -17,15 +17,20 @@ export declare function reconsideredBy(run: RunRecord, inputIds: readonly string
17
17
  * opens completes, so it cannot be told from the message that opened this turn. It runs as the
18
18
  * next turn before any done, and one sent after the done withdraws it (`acceptedDoneHolds`). */
19
19
  export declare function owedAtDone(run: RunRecord, state: ActiveRun): DoneOwedInput[];
20
- /** Recorded after the accepted done (strictly later than `at`): the first instruction among the
21
- * agent inputs, on any path (a steer, an inbox read, a continuation's opening input). */
22
- export declare function instructionAfter(run: RunRecord, at: string): string | undefined;
23
- /** A wait result that failed and resolved after the done. */
24
- export declare function failedResultAfter(run: RunRecord, at: string): string | undefined;
20
+ type DoneAccepted = NonNullable<RunRecord['doneAccepted']>;
21
+ /** What the run held when the done was accepted, by identity (hearsay-tools/squawk#2587): the
22
+ * waits open then, the waits settled then, and its last agent input. "After the done" is read
23
+ * against these, never against clock time, which cannot order two facts of one millisecond. */
24
+ export declare function factsAtDone(run: RunRecord): Pick<DoneAccepted, 'openWaits' | 'settledWaits' | 'lastInput'>;
25
+ /** The first instruction among the agent inputs added after the done, on any path (a steer, an
26
+ * inbox read, a continuation's opening input). */
27
+ export declare function instructionAfter(run: RunRecord, done: DoneAccepted): string | undefined;
28
+ /** A wait result that failed and was not settled when the done was accepted. */
29
+ export declare function failedResultAfter(run: RunRecord, done: DoneAccepted): string | undefined;
25
30
  /** A wait or a question the agent registered after the done, by any path: the tool, the CLI, a
26
- * native ask. A replayed registration keeps its first time, and Squawk's own waits and its
27
- * live-workers timer are not the agent's. */
28
- export declare function registeredAfter(run: RunRecord, at: string): string | undefined;
31
+ * native ask; one the done did not know. A replayed registration keeps its wait, and Squawk's own
32
+ * waits and its live-workers timer are not the agent's. */
33
+ export declare function registeredAfter(run: RunRecord, done: DoneAccepted): string | undefined;
29
34
  /** A human message recorded after the done: its `user-message` event. */
30
35
  export declare function humanMessageAfter(events: readonly RunEvent[], seq: number): string | undefined;
31
36
  /** A turn started after the done: the turn end that reads it is not the done's own. */
@@ -34,3 +39,4 @@ export declare function laterTurn(events: readonly RunEvent[], seq: number): boo
34
39
  * done's one delivery turn that costs no wake; `kept`, the done holds but that turn is spent;
35
40
  * `withdrawn`, the input or a fact recorded since withdraws it. Undefined with no done or no input. */
36
41
  export declare function acceptedDoneDelivery(run: RunRecord, events: readonly RunEvent[], inputIds: readonly string[]): 'free' | 'kept' | 'withdrawn' | undefined;
42
+ export {};
@@ -74,11 +74,29 @@ function notReadYet(state) {
74
74
  const thisTurn = new Set([...input.turnOpenerIds ?? [], ...input.bundledInputIds ?? [], ...input.consumedBeforeAck ?? [], ...(input.openingAgentInputId ? [input.openingAgentInputId] : [])]);
75
75
  return id => !thisTurn.has(id);
76
76
  }
77
- /** Recorded after the accepted done (strictly later than `at`): the first instruction among the
78
- * agent inputs, on any path (a steer, an inbox read, a continuation's opening input). */
79
- export function instructionAfter(run, at) {
80
- for (const entry of run.agentInputs ?? []) {
81
- const reason = entry.createdAt > at ? instruction(entry) : undefined;
77
+ /** What the run held when the done was accepted, by identity (hearsay-tools/squawk#2587): the
78
+ * waits open then, the waits settled then, and its last agent input. "After the done" is read
79
+ * against these, never against clock time, which cannot order two facts of one millisecond. */
80
+ export function factsAtDone(run) {
81
+ const waits = [...run.waits ?? [], ...run.lastWaits ?? []];
82
+ const last = run.agentInputs?.at(-1)?.id;
83
+ return {
84
+ openWaits: waits.filter(wait => wait.phase === 'open').map(wait => wait.id).slice(-32),
85
+ settledWaits: waits.filter(wait => wait.phase !== 'open').map(wait => wait.id).slice(-32),
86
+ ...(last === undefined ? {} : { lastInput: last }),
87
+ };
88
+ }
89
+ /** The agent inputs added after the done: those after its last input then. An input then is
90
+ * never removed (the call refused undelivered input, and only undelivered input is withdrawn). */
91
+ function inputsAfter(run, done) {
92
+ const inputs = run.agentInputs ?? [];
93
+ return done.lastInput === undefined ? inputs : inputs.slice(inputs.findIndex(entry => entry.id === done.lastInput) + 1);
94
+ }
95
+ /** The first instruction among the agent inputs added after the done, on any path (a steer, an
96
+ * inbox read, a continuation's opening input). */
97
+ export function instructionAfter(run, done) {
98
+ for (const entry of inputsAfter(run, done)) {
99
+ const reason = instruction(entry);
82
100
  if (reason)
83
101
  return reason;
84
102
  }
@@ -88,16 +106,17 @@ export function instructionAfter(run, at) {
88
106
  function liveAndSettledWaits(run) {
89
107
  return [...run.waits ?? [], ...run.lastWaits ?? []].filter(wait => wait.phase !== 'cancelled');
90
108
  }
91
- /** A wait result that failed and resolved after the done. */
92
- export function failedResultAfter(run, at) {
93
- const failed = liveAndSettledWaits(run).find(wait => (wait.resolvedAt ?? '') > at && WAIT_KINDS[wait.kind].failedResult(wait));
109
+ /** A wait result that failed and was not settled when the done was accepted. */
110
+ export function failedResultAfter(run, done) {
111
+ const failed = liveAndSettledWaits(run).find(wait => wait.phase !== 'open' && !done.settledWaits.includes(wait.id) && WAIT_KINDS[wait.kind].failedResult(wait));
94
112
  return failed && `a failed ${failed.kind} wait result`;
95
113
  }
96
114
  /** A wait or a question the agent registered after the done, by any path: the tool, the CLI, a
97
- * native ask. A replayed registration keeps its first time, and Squawk's own waits and its
98
- * live-workers timer are not the agent's. */
99
- export function registeredAfter(run, at) {
100
- const wait = liveAndSettledWaits(run).find(entry => entry.registeredAt > at && entry.source === 'agent' && entry.via !== 'monitoring-line');
115
+ * native ask; one the done did not know. A replayed registration keeps its wait, and Squawk's own
116
+ * waits and its live-workers timer are not the agent's. */
117
+ export function registeredAfter(run, done) {
118
+ const known = new Set([...done.openWaits, ...done.settledWaits]);
119
+ const wait = liveAndSettledWaits(run).find(entry => !known.has(entry.id) && entry.source === 'agent' && entry.via !== 'monitoring-line');
101
120
  if (!wait)
102
121
  return undefined;
103
122
  return WAIT_KINDS[wait.kind].userAnswers ? 'the agent asked the user' : 'the agent registered a wait';
@@ -1 +1 @@
1
- {"version":3,"file":"done-accepted.js","sourceRoot":"","sources":["../../../src/workflows/run/done-accepted.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AACzD,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7C,OAAO,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAEtD;;;;;GAKG;AAEH;;+BAE+B;AAC/B,SAAS,WAAW,CAAC,KAAiB;IACpC,IAAI,KAAK,CAAC,MAAM,KAAK,OAAO;QAAE,OAAO,SAAS,CAAC;IAC/C,IAAI,CAAC,KAAK,CAAC,YAAY;QAAE,OAAO,mCAAmC,CAAC;IACpE,IAAI,KAAK,CAAC,YAAY,CAAC,IAAI,KAAK,SAAS,IAAI,KAAK,CAAC,YAAY,CAAC,IAAI,KAAK,WAAW;QAAE,OAAO,SAAS,CAAC;IACvG,OAAO,KAAK,CAAC,YAAY,CAAC,YAAY,KAAK,MAAM,CAAC,CAAC,CAAC,oBAAoB,CAAC,CAAC,CAAC,qBAAqB,CAAC;AACnG,CAAC;AAED;iDACiD;AACjD,MAAM,UAAU,cAAc,CAAC,GAAc,EAAE,QAA2B;IACxE,MAAM,GAAG,GAAG,IAAI,GAAG,CAAC,QAAQ,CAAC,CAAC;IAC9B,MAAM,MAAM,GAAG,aAAa,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC,IAAI,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC,CAAC;IACvH,IAAI,MAAM;QAA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,CAAC,CAAC,CAAC,SAAS,CAAC;AACpH,CAAC;AAED,uFAAuF;AACvF,MAAM,UAAU,SAAS,CAAC,MAA2B,EAAE,GAAW;IAChE,OAAO,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,GAAG,GAAG,GAAG,IAAI,KAAK,CAAC,IAAI,KAAK,cAAc,CAAC,CAAC;AAChF,CAAC;AAED;;wGAEwG;AACxG,MAAM,UAAU,oBAAoB,CAAC,GAAc,EAAE,MAA2B,EAAE,QAA2B;IAC3G,IAAI,CAAC,GAAG,CAAC,YAAY,IAAI,CAAC,QAAQ,CAAC,MAAM;QAAE,OAAO,SAAS,CAAC;IAC5D,IAAI,CAAC,iBAAiB,CAAC,GAAG,EAAE,MAAM,CAAC,CAAC,KAAK,IAAI,cAAc,CAAC,GAAG,EAAE,QAAQ,CAAC;QAAE,OAAO,WAAW,CAAC;IAC/F,OAAO,GAAG,CAAC,YAAY,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC;AACrD,CAAC"}
@@ -54,8 +54,10 @@ export declare class InputGroup {
54
54
  get consumedBeforeAck(): ReadonlySet<string> | undefined;
55
55
  /** Messages carried behind a human answer, read at that turn's end. */
56
56
  get bundledInputIds(): readonly string[] | undefined;
57
- /** The input submitted at the last turn boundary: it opened the turn after it, which reads it
58
- * whenever its harness reports the read (hearsay-tools/squawk#2587). */
57
+ /** The input the transport accepted at the last turn boundary: it opened the turn after it,
58
+ * which reads it whenever its harness reports the read (hearsay-tools/squawk#2587). A later
59
+ * boundary send, a human message included, replaces it; an accepted send mid-turn takes its
60
+ * inputs out of it. */
59
61
  get turnOpenerIds(): readonly string[] | undefined;
60
62
  /** Unread reports received while the same submission's ACK is pending. */
61
63
  get retiredInFlight(): ReadonlySet<string> | undefined;
@@ -84,7 +86,7 @@ export declare class InputGroup {
84
86
  clearUnreadInputs(): void;
85
87
  bundleInputs(ids: readonly string[]): void;
86
88
  clearBundledInputs(): void;
87
- openTurnWith(ids: readonly string[]): void;
89
+ markTurnOpeners(ids: readonly string[], opensTurn: boolean): void;
88
90
  retireInFlight(id: string): void;
89
91
  forgetRetiredInput(id: string): void;
90
92
  prepareUnreadRetry(): void;
@@ -88,8 +88,10 @@ export class InputGroup {
88
88
  get consumedBeforeAck() { return this.#consumedView; }
89
89
  /** Messages carried behind a human answer, read at that turn's end. */
90
90
  get bundledInputIds() { return this.#bundledInputIds; }
91
- /** The input submitted at the last turn boundary: it opened the turn after it, which reads it
92
- * whenever its harness reports the read (hearsay-tools/squawk#2587). */
91
+ /** The input the transport accepted at the last turn boundary: it opened the turn after it,
92
+ * which reads it whenever its harness reports the read (hearsay-tools/squawk#2587). A later
93
+ * boundary send, a human message included, replaces it; an accepted send mid-turn takes its
94
+ * inputs out of it. */
93
95
  get turnOpenerIds() { return this.#turnOpenerIds; }
94
96
  /** Unread reports received while the same submission's ACK is pending. */
95
97
  get retiredInFlight() { return this.#retiredView; }
@@ -126,7 +128,9 @@ export class InputGroup {
126
128
  this.#bundledInputIds = Object.freeze([...(this.#bundledInputIds ?? []), ...ids]);
127
129
  }
128
130
  clearBundledInputs() { this.#bundledInputIds = undefined; }
129
- openTurnWith(ids) { this.#turnOpenerIds = Object.freeze([...ids]); }
131
+ markTurnOpeners(ids, opensTurn) {
132
+ this.#turnOpenerIds = Object.freeze(opensTurn ? [...ids] : (this.#turnOpenerIds ?? []).filter(id => !ids.includes(id)));
133
+ }
130
134
  retireInFlight(id) {
131
135
  if (!this.#retiredInFlight) {
132
136
  this.#retiredInFlight = new Set();
@@ -364,11 +368,10 @@ export class InputDelivery {
364
368
  const session = state.liveSession.session;
365
369
  const content = [{ type: 'text', text }, ...(bundle ? [{ type: 'text', text: bundle.text }] : [])];
366
370
  const delivered = [reply.id, ...(bundle?.inputs.map(input => input.id) ?? [])];
371
+ const opensTurn = state.boundary.atTurnBoundary === session;
367
372
  if (!handToTransport(state, session, delivered, wire => wire.sendMessage(content)))
368
373
  return;
369
- // The answer opens the worker's next turn when it is at a boundary (hearsay-tools/squawk#2587).
370
- if (state.boundary.atTurnBoundary === session)
371
- state.inputState.openTurnWith(delivered);
374
+ state.inputState.markTurnOpeners(delivered, opensTurn);
372
375
  this.context.store.appendEvent(runId, { type: 'human-input-delivered', askSeq, source });
373
376
  inputReceipts.commitRoutedAnswer(this.context, runId, state, { askSeq, delivered: [reply.id, ...(bundle?.inputs.map(input => input.id) ?? [])] }, fallback, this.maxAutoContinues);
374
377
  // Spend the answer's admission now so later messages can steer before its turn ends.
@@ -553,8 +556,6 @@ export class InputDelivery {
553
556
  const refusal = !!this.context.store.getRun(runId)?.agentInputs?.some(input => input.purpose === 'completion-refusal' && inputIds.includes(input.id));
554
557
  const atBoundary = state.boundary.atTurnBoundary === session;
555
558
  const flight = new InputFlight(session, inputIds, this.host.line.isAdmitted(runId) && atBoundary ? true : undefined);
556
- if (atBoundary && inputIds.length)
557
- state.inputState.openTurnWith(inputIds);
558
559
  // A batch with timer results is an automatic wake: it reserves one unit of the budget now, so a timer that comes due before this acknowledgement counts it, and gives it back if the batch is refused or its acknowledgement rejects (hearsay-tools/cezarion#1233).
559
560
  // The accepted done's one free delivery turn costs no wake: the run finishes when it ends (hearsay-tools/squawk#2587).
560
561
  if (done !== 'free' && reservesAutomaticWake(this.context.store.getRun(runId), flight, inputIds, () => this.host.countAutomaticWakes(runId, beforeHumanReset), this.maxAutoContinues))
@@ -563,6 +564,8 @@ export class InputDelivery {
563
564
  const settled = this.sendAgentInput(runId, state, flight, content, refusal);
564
565
  if (!settled)
565
566
  return false;
567
+ // Only a send the transport accepted at a boundary opens the turn after it (hearsay-tools/squawk#2587).
568
+ state.inputState.markTurnOpeners(inputIds, atBoundary);
566
569
  this.host.workerExecutions.trackDelivery(runId, settled);
567
570
  this.resumeParkedRun(runId, state, beforeHumanReset);
568
571
  this.recordAgentInputTurn(runId, state, flight, refusal);
@@ -864,7 +867,10 @@ export class InputDelivery {
864
867
  const atTurnBoundary = state.boundary.atTurnBoundary === session;
865
868
  // A human message withdraws an accepted done: its turn end reads the message (hearsay-tools/squawk#2587).
866
869
  const sent = this.context.store.getRun(runId)?.doneAccepted ? [...deliverable, { type: 'text', text: `\n\n${DONE_RECONSIDERED_NOTE}` }] : deliverable;
867
- const delivered = handToTransport(state, session, prepared.bundle?.inputs.map(input => input.id) ?? [], wire => wire.sendMessage(sent));
870
+ const bundled = prepared.bundle?.inputs.map(input => input.id) ?? [];
871
+ const delivered = handToTransport(state, session, bundled, wire => wire.sendMessage(sent));
872
+ if (delivered)
873
+ state.inputState.markTurnOpeners(bundled, atTurnBoundary);
868
874
  if (delivered && expanded !== blocks)
869
875
  this.host.runSkills.provisionLiveSlashSkill(runId, state, blocks);
870
876
  if (delivered)