@hearsay-tools/squawk 0.18.0-dev.6936 → 0.18.0-dev.6944

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 (70) 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/delegation/transport.d.ts +62 -62
  6. package/dist/runs/legacy-run-rows.d.ts +7 -0
  7. package/dist/runs/legacy-run-rows.js +25 -0
  8. package/dist/runs/legacy-run-rows.js.map +1 -1
  9. package/dist/runs/outcome-commit.d.ts +1 -5
  10. package/dist/runs/outcome-commit.js +1 -2
  11. package/dist/runs/outcome-commit.js.map +1 -1
  12. package/dist/runs/run-exits.d.ts +18 -0
  13. package/dist/runs/store.d.ts +6 -0
  14. package/dist/server/reports-api.d.ts +2 -2
  15. package/dist/server/server.d.ts +112 -58
  16. package/dist/workflows/continuation-admission.d.ts +3 -0
  17. package/dist/workflows/run/done-accepted.d.ts +14 -8
  18. package/dist/workflows/run/done-accepted.js +31 -12
  19. package/dist/workflows/run/done-accepted.js.map +1 -1
  20. package/dist/workflows/run/input-delivery.d.ts +5 -3
  21. package/dist/workflows/run/input-delivery.js +15 -9
  22. package/dist/workflows/run/input-delivery.js.map +1 -1
  23. package/dist/workflows/run/run-finish.js +8 -5
  24. package/dist/workflows/run/run-finish.js.map +1 -1
  25. package/dist/workflows/run/turn-settler.js +2 -2
  26. package/dist/workflows/run/turn-settler.js.map +1 -1
  27. package/dist/workflows/run/wait-engine.d.ts +3 -0
  28. package/dist/workflows/run/wait-kinds.d.ts +2 -2
  29. package/dist/workflows/run/wait-kinds.js +2 -1
  30. package/dist/workflows/run/wait-kinds.js.map +1 -1
  31. package/package.json +4 -4
  32. package/web/dist/assets/{activity-motion-DXtoOkpz.js → activity-motion-CNFhTAyJ.js} +1 -1
  33. package/web/dist/assets/{activity-route-r-em7Y-G.js → activity-route-DEw-RhOo.js} +1 -1
  34. package/web/dist/assets/{agent-accounts-DuMsyDoO.js → agent-accounts-BiXu1qX6.js} +1 -1
  35. package/web/dist/assets/attention-D4F-L5Pd.js +1 -0
  36. package/web/dist/assets/{commit-diff-panel-BGLQaKRb.js → commit-diff-panel-BmrwPYS-.js} +1 -1
  37. package/web/dist/assets/{diff-BRFJnYsC.js → diff-DnpyQ0n1.js} +2 -2
  38. package/web/dist/assets/{diff-view-JWqbvzMs.js → diff-view-Bt1YTobA.js} +1 -1
  39. package/web/dist/assets/{file-preview-BW__Krxm.js → file-preview-BjxKsQu3.js} +1 -1
  40. package/web/dist/assets/{git-toolbar-DoXf_s-G.js → git-toolbar-BO3VJ7ch.js} +1 -1
  41. package/web/dist/assets/{github-CijmslJ6.js → github-DpER38di.js} +1 -1
  42. package/web/dist/assets/{global-activity-route-B2EeYnAW.js → global-activity-route-BvAyzzV-.js} +1 -1
  43. package/web/dist/assets/{index-BHoqo9RG.js → index-BgSywETH.js} +4 -4
  44. package/web/dist/assets/{preview-pane-connected-D6vrA6hJ.js → preview-pane-connected-DXW08Xx1.js} +1 -1
  45. package/web/dist/assets/{project-router-C5EZmTkk.js → project-router-znDYCNAi.js} +1 -1
  46. package/web/dist/assets/{project-scope-context-HUq7jkZN.js → project-scope-context-D8RGERU-.js} +1 -1
  47. package/web/dist/assets/{prompt-template-menu-DOYsMTKv.js → prompt-template-menu-tmJbj04L.js} +1 -1
  48. package/web/dist/assets/{queries-BXHx1ZPw.js → queries-LH_fzdoQ.js} +1 -1
  49. package/web/dist/assets/{reference-chip-CjJnlcQb.js → reference-chip-DMasK3J9.js} +1 -1
  50. package/web/dist/assets/{repo-git-CyRoQgtr.js → repo-git-CLGuBU9l.js} +1 -1
  51. package/web/dist/assets/{report-reader-BJiEbYfZ.js → report-reader-zvoZvJ8x.js} +1 -1
  52. package/web/dist/assets/{reports-Ddn-WBxa.js → reports-Dw0aaOYg.js} +1 -1
  53. package/web/dist/assets/{run-header-B7qHisMu.js → run-header-pjcEwvZV.js} +1 -1
  54. package/web/dist/assets/{skills-D2wzJWpY.js → skills-DWQTOqs8.js} +1 -1
  55. package/web/dist/assets/{tab-link-B_gKjZgM.js → tab-link-C5SNXkMO.js} +1 -1
  56. package/web/dist/assets/{task-changes-CqKQIYHP.js → task-changes-DNrFdznk.js} +1 -1
  57. package/web/dist/assets/{task-commits-CY7XFJBU.js → task-commits-rBD5uKnT.js} +1 -1
  58. package/web/dist/assets/{task-files-CW1gWAY3.js → task-files-Bd7-ZWkS.js} +1 -1
  59. package/web/dist/assets/{task-github-item-Djq-z2As.js → task-github-item-BwxuT5Wp.js} +1 -1
  60. package/web/dist/assets/{task-thread-DyZ9WjLc.js → task-thread-LWQvapkq.js} +1 -1
  61. package/web/dist/assets/{thread-state-Dbru_dO3.js → thread-state-BNabVGns.js} +1 -1
  62. package/web/dist/assets/{use-desktop-BCMH-x7R.js → use-desktop-kNRvVC8C.js} +1 -1
  63. package/web/dist/assets/{use-hand-to-agent-state-C94Si0KS.js → use-hand-to-agent-state-C54WuUrs.js} +1 -1
  64. package/web/dist/assets/{useInfiniteQuery-O53uZ95W.js → useInfiniteQuery-DZDwRft0.js} +1 -1
  65. package/web/dist/assets/useQuery-BTWv1-sJ.js +1 -0
  66. package/web/dist/assets/{workflows-CwS6zbSa.js → workflows-BeWMwP3r.js} +1 -1
  67. package/web/dist/assets/{ws-CRnL5yIc.js → ws-ClC12aJd.js} +1 -1
  68. package/web/dist/index.html +12 -12
  69. package/web/dist/assets/attention-CB_z05E7.js +0 -1
  70. package/web/dist/assets/useQuery-C9ErlZEv.js +0 -1
@@ -2576,7 +2576,16 @@ var runPullRequestSchema = z20.object({
2576
2576
  source: z20.enum(["declared", "created"])
2577
2577
  }).refine((entry) => entry.url === void 0 || Number(/\/pull\/(\d+)/i.exec(entry.url)?.[1]) === entry.number, { message: "PR URL and number must agree" });
2578
2578
  var workflowCursorSchema = z20.object({ stepId: z20.string(), mode: z20.enum(["resume", "start"]) });
2579
- var doneAcceptedSchema = z20.object({ session: z20.string(), at: z20.string(), seq: z20.number().int().nonnegative(), summary: z20.string().optional(), freeTurn: z20.literal(true).optional() });
2579
+ var doneAcceptedSchema = z20.object({
2580
+ session: z20.string(),
2581
+ at: z20.string(),
2582
+ seq: z20.number().int().nonnegative(),
2583
+ openWaits: z20.array(z20.string()).max(32),
2584
+ settledWaits: z20.array(z20.string()).max(32),
2585
+ lastInput: z20.string().optional(),
2586
+ summary: z20.string().optional(),
2587
+ freeTurn: z20.literal(true).optional()
2588
+ });
2580
2589
  var runRecordSchema = z20.object({
2581
2590
  id: z20.string(),
2582
2591
  title: z20.string(),
@@ -2598,9 +2607,8 @@ var runRecordSchema = z20.object({
2598
2607
  * failed attempt awaiting CI recovery or a provider retry), `start` runs it after a Continue
2599
2608
  * completed the step before it. Only the run exits write it (`runs/run-exits.ts`). */
2600
2609
  workflowCursor: workflowCursorSchema.optional(),
2601
- /** An accepted `cezar_done` (ADR 0064): the run finishes at the end of a turn with no new wait or
2602
- * question, also one that delivered input after it (hearsay-tools/squawk#2587). `run-finish.ts`
2603
- * records it and `turn-settler.ts` retires it, through `commitOutcome`; a final run keeps it. */
2610
+ /** An accepted `cezar_done` (ADR 0064, hearsay-tools/squawk#2587): `run-finish.ts` records it,
2611
+ * `turn-settler.ts` decides at each turn end whether it holds and retires it. */
2604
2612
  doneAccepted: doneAcceptedSchema.optional(),
2605
2613
  /** The last turn carried a malformed explicit structured question. */
2606
2614
  invalidAsk: z20.boolean().optional(),
@@ -194,12 +194,14 @@ export declare const workflowCursorSchema: z.ZodObject<{
194
194
  }>;
195
195
  }, z.core.$strip>;
196
196
  export type WorkflowCursor = z.infer<typeof workflowCursorSchema>;
197
- /** An accepted `cezar_done`: the tool generation that accepted it, when, the last event sequence
198
- * then, its summary, and whether its one free delivery turn is spent. */
197
+ /** An accepted `cezar_done`: generation, time, and the last event, waits and input then, which order what came after. */
199
198
  export declare const doneAcceptedSchema: z.ZodObject<{
200
199
  session: z.ZodString;
201
200
  at: z.ZodString;
202
201
  seq: z.ZodNumber;
202
+ openWaits: z.ZodArray<z.ZodString>;
203
+ settledWaits: z.ZodArray<z.ZodString>;
204
+ lastInput: z.ZodOptional<z.ZodString>;
203
205
  summary: z.ZodOptional<z.ZodString>;
204
206
  freeTurn: z.ZodOptional<z.ZodLiteral<true>>;
205
207
  }, z.core.$strip>;
@@ -256,6 +258,9 @@ export declare const runRecordSchema: z.ZodObject<{
256
258
  session: z.ZodString;
257
259
  at: z.ZodString;
258
260
  seq: z.ZodNumber;
261
+ openWaits: z.ZodArray<z.ZodString>;
262
+ settledWaits: z.ZodArray<z.ZodString>;
263
+ lastInput: z.ZodOptional<z.ZodString>;
259
264
  summary: z.ZodOptional<z.ZodString>;
260
265
  freeTurn: z.ZodOptional<z.ZodLiteral<true>>;
261
266
  }, z.core.$strip>>;
@@ -2200,6 +2205,9 @@ export declare const apiRunSchema: z.ZodObject<{
2200
2205
  session: z.ZodString;
2201
2206
  at: z.ZodString;
2202
2207
  seq: z.ZodNumber;
2208
+ openWaits: z.ZodArray<z.ZodString>;
2209
+ settledWaits: z.ZodArray<z.ZodString>;
2210
+ lastInput: z.ZodOptional<z.ZodString>;
2203
2211
  summary: z.ZodOptional<z.ZodString>;
2204
2212
  freeTurn: z.ZodOptional<z.ZodLiteral<true>>;
2205
2213
  }, z.core.$strip>>;
@@ -4915,6 +4923,9 @@ export declare const createRunResponseSchema: z.ZodObject<{
4915
4923
  session: z.ZodString;
4916
4924
  at: z.ZodString;
4917
4925
  seq: z.ZodNumber;
4926
+ openWaits: z.ZodArray<z.ZodString>;
4927
+ settledWaits: z.ZodArray<z.ZodString>;
4928
+ lastInput: z.ZodOptional<z.ZodString>;
4918
4929
  summary: z.ZodOptional<z.ZodString>;
4919
4930
  freeTurn: z.ZodOptional<z.ZodLiteral<true>>;
4920
4931
  }, z.core.$strip>>;
@@ -1000,6 +1000,9 @@ export declare function peerPair(sender: RunRecord | undefined, recipient: RunRe
1000
1000
  session: string;
1001
1001
  at: string;
1002
1002
  seq: number;
1003
+ openWaits: string[];
1004
+ settledWaits: string[];
1005
+ lastInput?: string | undefined;
1003
1006
  summary?: string | undefined;
1004
1007
  freeTurn?: true | undefined;
1005
1008
  } | undefined;
@@ -2060,6 +2063,9 @@ export declare function peerPair(sender: RunRecord | undefined, recipient: RunRe
2060
2063
  session: string;
2061
2064
  at: string;
2062
2065
  seq: number;
2066
+ openWaits: string[];
2067
+ settledWaits: string[];
2068
+ lastInput?: string | undefined;
2063
2069
  summary?: string | undefined;
2064
2070
  freeTurn?: true | undefined;
2065
2071
  } | undefined;
@@ -27,6 +27,18 @@ export declare function delegationFailure(error: unknown): {
27
27
  export declare function createDelegationRoutes(service: DelegationService, credentials: CredentialRegistry): import("hono/hono-base").HonoBase<Env, {
28
28
  "/list": {
29
29
  $get: {
30
+ output: {
31
+ error: string;
32
+ code?: "invalid_input" | undefined;
33
+ };
34
+ outputFormat: "json";
35
+ status: 400;
36
+ input: {
37
+ query: {
38
+ offset?: string | undefined;
39
+ };
40
+ };
41
+ } | {
30
42
  output: {
31
43
  workers: {
32
44
  workerId: string;
@@ -64,18 +76,6 @@ export declare function createDelegationRoutes(service: DelegationService, crede
64
76
  offset?: string | undefined;
65
77
  };
66
78
  };
67
- } | {
68
- output: {
69
- error: string;
70
- code?: "invalid_input" | undefined;
71
- };
72
- outputFormat: "json";
73
- status: 400;
74
- input: {
75
- query: {
76
- offset?: string | undefined;
77
- };
78
- };
79
79
  };
80
80
  };
81
81
  } & {
@@ -613,6 +613,18 @@ export declare function createDelegationRoutes(service: DelegationService, crede
613
613
  } & {
614
614
  "/:workerId": {
615
615
  $get: {
616
+ output: {
617
+ error: string;
618
+ code?: "invalid_input" | undefined;
619
+ };
620
+ outputFormat: "json";
621
+ status: 400;
622
+ input: {
623
+ param: {
624
+ workerId: string;
625
+ };
626
+ };
627
+ } | {
616
628
  output: {
617
629
  workerId: string;
618
630
  parentRunId: string;
@@ -720,7 +732,11 @@ export declare function createDelegationRoutes(service: DelegationService, crede
720
732
  workerId: string;
721
733
  };
722
734
  };
723
- } | {
735
+ };
736
+ };
737
+ } & {
738
+ "/:workerId/collect": {
739
+ $post: {
724
740
  output: {
725
741
  error: string;
726
742
  code?: "invalid_input" | undefined;
@@ -731,12 +747,10 @@ export declare function createDelegationRoutes(service: DelegationService, crede
731
747
  param: {
732
748
  workerId: string;
733
749
  };
750
+ } & {
751
+ json: Record<string, never>;
734
752
  };
735
- };
736
- };
737
- } & {
738
- "/:workerId/collect": {
739
- $post: {
753
+ } | {
740
754
  output: {
741
755
  workerId: string;
742
756
  parentRunId: string;
@@ -838,7 +852,11 @@ export declare function createDelegationRoutes(service: DelegationService, crede
838
852
  } & {
839
853
  json: Record<string, never>;
840
854
  };
841
- } | {
855
+ };
856
+ };
857
+ } & {
858
+ "/:workerId/steer": {
859
+ $post: {
842
860
  output: {
843
861
  error: string;
844
862
  code?: "invalid_input" | undefined;
@@ -850,13 +868,11 @@ export declare function createDelegationRoutes(service: DelegationService, crede
850
868
  workerId: string;
851
869
  };
852
870
  } & {
853
- json: Record<string, never>;
871
+ json: {
872
+ text: string;
873
+ };
854
874
  };
855
- };
856
- };
857
- } & {
858
- "/:workerId/steer": {
859
- $post: {
875
+ } | {
860
876
  output: {
861
877
  workerId: string;
862
878
  state: "delivered" | "queued";
@@ -872,7 +888,11 @@ export declare function createDelegationRoutes(service: DelegationService, crede
872
888
  text: string;
873
889
  };
874
890
  };
875
- } | {
891
+ };
892
+ };
893
+ } & {
894
+ "/:workerId/stop": {
895
+ $post: {
876
896
  output: {
877
897
  error: string;
878
898
  code?: "invalid_input" | undefined;
@@ -884,15 +904,9 @@ export declare function createDelegationRoutes(service: DelegationService, crede
884
904
  workerId: string;
885
905
  };
886
906
  } & {
887
- json: {
888
- text: string;
889
- };
907
+ json: Record<string, never>;
890
908
  };
891
- };
892
- };
893
- } & {
894
- "/:workerId/stop": {
895
- $post: {
909
+ } | {
896
910
  output: {
897
911
  workerId: string;
898
912
  state: "stopping" | "terminated";
@@ -906,7 +920,11 @@ export declare function createDelegationRoutes(service: DelegationService, crede
906
920
  } & {
907
921
  json: Record<string, never>;
908
922
  };
909
- } | {
923
+ };
924
+ };
925
+ } & {
926
+ "/:workerId/destroy": {
927
+ $post: {
910
928
  output: {
911
929
  error: string;
912
930
  code?: "invalid_input" | undefined;
@@ -920,11 +938,7 @@ export declare function createDelegationRoutes(service: DelegationService, crede
920
938
  } & {
921
939
  json: Record<string, never>;
922
940
  };
923
- };
924
- };
925
- } & {
926
- "/:workerId/destroy": {
927
- $post: {
941
+ } | {
928
942
  output: {
929
943
  workerId: string;
930
944
  state: "complete" | "incomplete";
@@ -947,20 +961,6 @@ export declare function createDelegationRoutes(service: DelegationService, crede
947
961
  } & {
948
962
  json: Record<string, never>;
949
963
  };
950
- } | {
951
- output: {
952
- error: string;
953
- code?: "invalid_input" | undefined;
954
- };
955
- outputFormat: "json";
956
- status: 400;
957
- input: {
958
- param: {
959
- workerId: string;
960
- };
961
- } & {
962
- json: Record<string, never>;
963
- };
964
964
  } | {
965
965
  output: {
966
966
  workerId: string;
@@ -990,13 +990,11 @@ export declare function createDelegationRoutes(service: DelegationService, crede
990
990
  "/:workerId/diff": {
991
991
  $get: {
992
992
  output: {
993
- workerId: string;
994
- baselineSha: string;
995
- diff: string;
996
- truncated: boolean;
993
+ error: string;
994
+ code?: "invalid_input" | undefined;
997
995
  };
998
996
  outputFormat: "json";
999
- status: 200;
997
+ status: 400;
1000
998
  input: {
1001
999
  param: {
1002
1000
  workerId: string;
@@ -1004,11 +1002,13 @@ export declare function createDelegationRoutes(service: DelegationService, crede
1004
1002
  };
1005
1003
  } | {
1006
1004
  output: {
1007
- error: string;
1008
- code?: "invalid_input" | undefined;
1005
+ workerId: string;
1006
+ baselineSha: string;
1007
+ diff: string;
1008
+ truncated: boolean;
1009
1009
  };
1010
1010
  outputFormat: "json";
1011
- status: 400;
1011
+ status: 200;
1012
1012
  input: {
1013
1013
  param: {
1014
1014
  workerId: string;
@@ -2,18 +2,6 @@ import type { DelegationRoutes } from './routes.ts';
2
2
  export declare function createDelegationApp(routes: DelegationRoutes): import("hono/hono-base").HonoBase<import("hono/types").BlankEnv, import("hono/types").BlankSchema | import("hono/types").MergeSchemaPath<{
3
3
  "/list": {
4
4
  $get: {
5
- output: {
6
- error: string;
7
- code?: "invalid_input" | undefined;
8
- };
9
- outputFormat: "json";
10
- status: 400;
11
- input: {
12
- query: {
13
- offset?: string | undefined;
14
- };
15
- };
16
- } | {
17
5
  output: {
18
6
  workers: {
19
7
  workerId: string;
@@ -51,6 +39,18 @@ export declare function createDelegationApp(routes: DelegationRoutes): import("h
51
39
  offset?: string | undefined;
52
40
  };
53
41
  };
42
+ } | {
43
+ output: {
44
+ error: string;
45
+ code?: "invalid_input" | undefined;
46
+ };
47
+ outputFormat: "json";
48
+ status: 400;
49
+ input: {
50
+ query: {
51
+ offset?: string | undefined;
52
+ };
53
+ };
54
54
  };
55
55
  };
56
56
  } & {
@@ -588,18 +588,6 @@ export declare function createDelegationApp(routes: DelegationRoutes): import("h
588
588
  } & {
589
589
  "/:workerId": {
590
590
  $get: {
591
- output: {
592
- error: string;
593
- code?: "invalid_input" | undefined;
594
- };
595
- outputFormat: "json";
596
- status: 400;
597
- input: {
598
- param: {
599
- workerId: string;
600
- };
601
- };
602
- } | {
603
591
  output: {
604
592
  workerId: string;
605
593
  parentRunId: string;
@@ -707,11 +695,7 @@ export declare function createDelegationApp(routes: DelegationRoutes): import("h
707
695
  workerId: string;
708
696
  };
709
697
  };
710
- };
711
- };
712
- } & {
713
- "/:workerId/collect": {
714
- $post: {
698
+ } | {
715
699
  output: {
716
700
  error: string;
717
701
  code?: "invalid_input" | undefined;
@@ -722,10 +706,12 @@ export declare function createDelegationApp(routes: DelegationRoutes): import("h
722
706
  param: {
723
707
  workerId: string;
724
708
  };
725
- } & {
726
- json: Record<string, never>;
727
709
  };
728
- } | {
710
+ };
711
+ };
712
+ } & {
713
+ "/:workerId/collect": {
714
+ $post: {
729
715
  output: {
730
716
  workerId: string;
731
717
  parentRunId: string;
@@ -827,11 +813,7 @@ export declare function createDelegationApp(routes: DelegationRoutes): import("h
827
813
  } & {
828
814
  json: Record<string, never>;
829
815
  };
830
- };
831
- };
832
- } & {
833
- "/:workerId/steer": {
834
- $post: {
816
+ } | {
835
817
  output: {
836
818
  error: string;
837
819
  code?: "invalid_input" | undefined;
@@ -843,11 +825,13 @@ export declare function createDelegationApp(routes: DelegationRoutes): import("h
843
825
  workerId: string;
844
826
  };
845
827
  } & {
846
- json: {
847
- text: string;
848
- };
828
+ json: Record<string, never>;
849
829
  };
850
- } | {
830
+ };
831
+ };
832
+ } & {
833
+ "/:workerId/steer": {
834
+ $post: {
851
835
  output: {
852
836
  workerId: string;
853
837
  state: "delivered" | "queued";
@@ -863,11 +847,7 @@ export declare function createDelegationApp(routes: DelegationRoutes): import("h
863
847
  text: string;
864
848
  };
865
849
  };
866
- };
867
- };
868
- } & {
869
- "/:workerId/stop": {
870
- $post: {
850
+ } | {
871
851
  output: {
872
852
  error: string;
873
853
  code?: "invalid_input" | undefined;
@@ -879,9 +859,15 @@ export declare function createDelegationApp(routes: DelegationRoutes): import("h
879
859
  workerId: string;
880
860
  };
881
861
  } & {
882
- json: Record<string, never>;
862
+ json: {
863
+ text: string;
864
+ };
883
865
  };
884
- } | {
866
+ };
867
+ };
868
+ } & {
869
+ "/:workerId/stop": {
870
+ $post: {
885
871
  output: {
886
872
  workerId: string;
887
873
  state: "stopping" | "terminated";
@@ -895,11 +881,7 @@ export declare function createDelegationApp(routes: DelegationRoutes): import("h
895
881
  } & {
896
882
  json: Record<string, never>;
897
883
  };
898
- };
899
- };
900
- } & {
901
- "/:workerId/destroy": {
902
- $post: {
884
+ } | {
903
885
  output: {
904
886
  error: string;
905
887
  code?: "invalid_input" | undefined;
@@ -913,7 +895,11 @@ export declare function createDelegationApp(routes: DelegationRoutes): import("h
913
895
  } & {
914
896
  json: Record<string, never>;
915
897
  };
916
- } | {
898
+ };
899
+ };
900
+ } & {
901
+ "/:workerId/destroy": {
902
+ $post: {
917
903
  output: {
918
904
  workerId: string;
919
905
  state: "complete" | "incomplete";
@@ -936,6 +922,20 @@ export declare function createDelegationApp(routes: DelegationRoutes): import("h
936
922
  } & {
937
923
  json: Record<string, never>;
938
924
  };
925
+ } | {
926
+ output: {
927
+ error: string;
928
+ code?: "invalid_input" | undefined;
929
+ };
930
+ outputFormat: "json";
931
+ status: 400;
932
+ input: {
933
+ param: {
934
+ workerId: string;
935
+ };
936
+ } & {
937
+ json: Record<string, never>;
938
+ };
939
939
  } | {
940
940
  output: {
941
941
  workerId: string;
@@ -965,11 +965,13 @@ export declare function createDelegationApp(routes: DelegationRoutes): import("h
965
965
  "/:workerId/diff": {
966
966
  $get: {
967
967
  output: {
968
- error: string;
969
- code?: "invalid_input" | undefined;
968
+ workerId: string;
969
+ baselineSha: string;
970
+ diff: string;
971
+ truncated: boolean;
970
972
  };
971
973
  outputFormat: "json";
972
- status: 400;
974
+ status: 200;
973
975
  input: {
974
976
  param: {
975
977
  workerId: string;
@@ -977,13 +979,11 @@ export declare function createDelegationApp(routes: DelegationRoutes): import("h
977
979
  };
978
980
  } | {
979
981
  output: {
980
- workerId: string;
981
- baselineSha: string;
982
- diff: string;
983
- truncated: boolean;
982
+ error: string;
983
+ code?: "invalid_input" | undefined;
984
984
  };
985
985
  outputFormat: "json";
986
- status: 200;
986
+ status: 400;
987
987
  input: {
988
988
  param: {
989
989
  workerId: string;
@@ -21,6 +21,13 @@ export declare function upgradeRemovedRunnerResult(file: unknown): unknown;
21
21
  * row stores the cursor instead.
22
22
  */
23
23
  export declare function upgradeLegacyWorkflowCursor(row: Record<string, unknown>): void;
24
+ /**
25
+ * A `doneAccepted` saved before its identity facts (hearsay-tools/squawk#3708 saved `session`,
26
+ * `at`, `seq` and `summary`) gets them from the row's own times, as that build ordered them: the
27
+ * waits registered by `at`, of those the ones settled by `at`, and the last agent input created by
28
+ * `at`. The next write of the row stores them.
29
+ */
30
+ export declare function upgradeLegacyDoneAccepted(row: Record<string, unknown>): void;
24
31
  /** `runs.json`'s records as rows, and how many of its entries were left out. Each row's `data` is
25
32
  * the record's own JSON as `runs.json` held it, so nothing this Squawk's schema does not know is lost
26
33
  * (raw-record.ts); its summary and columns come from the parsed record, which is what decoding that
@@ -4,6 +4,7 @@ import { upgradeLegacyWaits } from './legacy-waits.js';
4
4
  export function upgradeLegacyRunRow(row) {
5
5
  upgradeLegacyWaits(row);
6
6
  upgradeLegacyWorkflowCursor(row);
7
+ upgradeLegacyDoneAccepted(row);
7
8
  upgradeRemovedRunner(row);
8
9
  }
9
10
  /** Runners Squawk no longer ships (hearsay-tools/squawk#3715). A run saved on one still opens,
@@ -78,6 +79,30 @@ export function upgradeLegacyWorkflowCursor(row) {
78
79
  if (typeof stepId === 'string' && row.workflowCursor === undefined)
79
80
  row.workflowCursor = { stepId, mode: 'resume' };
80
81
  }
82
+ /** A time a row entry recorded at or before `at`. */
83
+ function recordedBy(value, at) {
84
+ return typeof value === 'string' && value <= at;
85
+ }
86
+ /**
87
+ * A `doneAccepted` saved before its identity facts (hearsay-tools/squawk#3708 saved `session`,
88
+ * `at`, `seq` and `summary`) gets them from the row's own times, as that build ordered them: the
89
+ * waits registered by `at`, of those the ones settled by `at`, and the last agent input created by
90
+ * `at`. The next write of the row stores them.
91
+ */
92
+ export function upgradeLegacyDoneAccepted(row) {
93
+ const done = row.doneAccepted;
94
+ if (!done || typeof done !== 'object' || Array.isArray(done.openWaits) || typeof done.at !== 'string')
95
+ return;
96
+ const at = done.at;
97
+ const entries = (value) => Array.isArray(value) ? value.filter((entry) => !!entry && typeof entry === 'object') : [];
98
+ const waits = [...entries(row.waits), ...entries(row.lastWaits)].filter(wait => typeof wait.id === 'string' && recordedBy(wait.registeredAt, at));
99
+ const settled = (wait) => [wait.resolvedAt, wait.deliveredAt, wait.cancelledAt].some(time => recordedBy(time, at));
100
+ const last = entries(row.agentInputs).filter(input => typeof input.id === 'string' && recordedBy(input.createdAt, at)).at(-1)?.id;
101
+ row.doneAccepted = { ...done,
102
+ openWaits: waits.filter(wait => !settled(wait)).map(wait => wait.id).slice(-32),
103
+ settledWaits: waits.filter(settled).map(wait => wait.id).slice(-32),
104
+ ...(typeof last === 'string' ? { lastInput: last } : {}) };
105
+ }
81
106
  /** `runs.json`'s records as rows, and how many of its entries were left out. Each row's `data` is
82
107
  * the record's own JSON as `runs.json` held it, so nothing this Squawk's schema does not know is lost
83
108
  * (raw-record.ts); its summary and columns come from the parsed record, which is what decoding that
@@ -1 +1 @@
1
- {"version":3,"file":"legacy-run-rows.js","sourceRoot":"","sources":["../../src/runs/legacy-run-rows.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAC5C,OAAO,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AAEvD,uFAAuF;AACvF,MAAM,UAAU,mBAAmB,CAAC,GAA4B;IAC9D,kBAAkB,CAAC,GAAG,CAAC,CAAC;IACxB,2BAA2B,CAAC,GAAG,CAAC,CAAC;IACjC,oBAAoB,CAAC,GAAG,CAAC,CAAC;AAC5B,CAAC;AAED;sCACsC;AACtC,MAAM,kBAAkB,GAAsB,CAAC,QAAQ,CAAC,CAAC;AAEzD,SAAS,eAAe,CAAC,KAAc;IACrC,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,kBAAkB,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;AACzE,CAAC;AAED;;;;;;;GAOG;AACH,MAAM,UAAU,oBAAoB,CAAC,GAA4B;IAC/D,IAAI,OAAO,GAAG,eAAe,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,SAAS,CAAC;IACnE,IAAI,OAAO,KAAK,SAAS;QAAE,OAAO,GAAG,CAAC,MAAM,CAAC;IAC7C,KAAK,MAAM,IAAI,IAAI,OAAO,CAAC,GAA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-82,11 +82,7 @@ export type RunOutcome =
82
82
  * `workflows/run/run-finish.ts` stages it. It replaces an earlier record. */
83
83
  | {
84
84
  kind: 'done-accepted';
85
- session: string;
86
- at: string;
87
- seq: number;
88
- summary?: string | undefined;
89
- freeTurn?: true | undefined;
85
+ done: NonNullable<RunRecord['doneAccepted']>;
90
86
  }
91
87
  /** The accepted done's one free delivery turn is spent: later deliveries charge as wakes do.
92
88
  * Only `spendDoneFreeTurn` in `workflows/run/turn-settler.ts` stages it. */
@@ -121,8 +121,7 @@ const APPLY = {
121
121
  : { run: { ...run, waitDeliveryFailures: outcome.waitDeliveryFailures }, changed: true };
122
122
  },
123
123
  'done-accepted'(run, outcome) {
124
- return { run: { ...run, doneAccepted: { session: outcome.session, at: outcome.at, seq: outcome.seq,
125
- ...(outcome.summary === undefined ? {} : { summary: outcome.summary }), ...(outcome.freeTurn ? { freeTurn: true } : {}) } }, changed: true };
124
+ return { run: { ...run, doneAccepted: { ...outcome.done } }, changed: true };
126
125
  },
127
126
  'done-free-turn'(run) {
128
127
  if (!run.doneAccepted || run.doneAccepted.freeTurn)