@hearsay-tools/squawk 0.19.0-dev.8724 → 0.19.0-dev.8731

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 (92) hide show
  1. package/dist/contract/index.js +32 -2
  2. package/dist/contract/repo-requests.d.ts +9 -1
  3. package/dist/contract/repo.d.ts +39 -2
  4. package/dist/delegation/routes.d.ts +65 -65
  5. package/dist/delegation/transport.d.ts +65 -65
  6. package/dist/git-worktree.d.ts +9 -0
  7. package/dist/git-worktree.js +118 -3
  8. package/dist/git-worktree.js.map +1 -1
  9. package/dist/runs/retention.d.ts +6 -0
  10. package/dist/runs/retention.js +7 -3
  11. package/dist/runs/retention.js.map +1 -1
  12. package/dist/server/automations-routes.d.ts +150 -150
  13. package/dist/server/project-settings-routes.d.ts +107 -107
  14. package/dist/server/projects-routes.d.ts +45 -45
  15. package/dist/server/repo-routes.d.ts +27 -1
  16. package/dist/server/repo-routes.js +30 -15
  17. package/dist/server/repo-routes.js.map +1 -1
  18. package/dist/server/run-checkout.d.ts +1 -1
  19. package/dist/server/run-checkout.js +20 -7
  20. package/dist/server/run-checkout.js.map +1 -1
  21. package/dist/server/runners-routes.d.ts +10 -10
  22. package/dist/server/runs-routes.d.ts +16 -16
  23. package/dist/server/server.d.ts +54 -2
  24. package/dist/server/worktree-size-cache.d.ts +11 -0
  25. package/dist/server/worktree-size-cache.js +3 -1
  26. package/dist/server/worktree-size-cache.js.map +1 -1
  27. package/package.json +4 -4
  28. package/web/dist/assets/{accounts-section-DDKrIQHV.js → accounts-section-DVJon113.js} +1 -1
  29. package/web/dist/assets/{activity-motion-BTEsjlIe.js → activity-motion-D_Mig_D4.js} +1 -1
  30. package/web/dist/assets/{activity-route-nAfZdSHs.js → activity-route-BvYIEdOs.js} +1 -1
  31. package/web/dist/assets/{agent-config-section-SeeFuvxb.js → agent-config-section-BImy20b0.js} +1 -1
  32. package/web/dist/assets/{agent-defaults-section-BfBT817S.js → agent-defaults-section-D30dOTKu.js} +1 -1
  33. package/web/dist/assets/{appearance-BTm4Q_SI.js → appearance-CHsrT2VO.js} +1 -1
  34. package/web/dist/assets/{archive-on-merge-field-D7-FuLiL.js → archive-on-merge-field-BT4e_k9f.js} +1 -1
  35. package/web/dist/assets/attention-CGsbqL2t.js +1 -0
  36. package/web/dist/assets/{automations-route-CBTOewMF.js → automations-route-BEhmjeVF.js} +1 -1
  37. package/web/dist/assets/{commit-list-DkFgC3zM.js → commit-list-02HM16KN.js} +1 -1
  38. package/web/dist/assets/{diff-is16ZW0n.js → diff-BmDcJsHL.js} +2 -2
  39. package/web/dist/assets/{diff-controls-Bg2hEd-d.js → diff-controls-HmgYRhy7.js} +1 -1
  40. package/web/dist/assets/{diff-view-Cr8XQJSx.js → diff-view-CRx2ZNOd.js} +1 -1
  41. package/web/dist/assets/{file-preview-Bnls5OJY.js → file-preview-B361k1Oo.js} +1 -1
  42. package/web/dist/assets/{folder-browser-6stmlyVQ.js → folder-browser-BJ3aXo9k.js} +1 -1
  43. package/web/dist/assets/{git-toolbar-CNKKRUHu.js → git-toolbar-DsNQUL5f.js} +1 -1
  44. package/web/dist/assets/{github-BqFTLhmt.js → github-DP2REdU5.js} +1 -1
  45. package/web/dist/assets/{global-activity-route-CWe04LvJ.js → global-activity-route-Iv0uN7Wy.js} +1 -1
  46. package/web/dist/assets/index-CVz-Ls8s.css +1 -0
  47. package/web/dist/assets/{index-CZ2f_VDZ.js → index-mCjln54E.js} +5 -5
  48. package/web/dist/assets/{label-BKUl84DF.js → label-CH-a6Jyv.js} +1 -1
  49. package/web/dist/assets/{markdown-BlP4Ruj9.js → markdown-DiMerfHU.js} +1 -1
  50. package/web/dist/assets/{notifications-section-D74r_7fK.js → notifications-section-DGH8tp1N.js} +1 -1
  51. package/web/dist/assets/{open-in-menu-N8rXgYSG.js → open-in-menu-CML2QKil.js} +1 -1
  52. package/web/dist/assets/{preview-pane-connected-Bmczg9HP.js → preview-pane-connected-Cl_6DHNm.js} +1 -1
  53. package/web/dist/assets/{project-location-CcmuGA5W.js → project-location-CZNz3wYW.js} +1 -1
  54. package/web/dist/assets/{project-router-CT6gVIcC.js → project-router-BvBqllk2.js} +1 -1
  55. package/web/dist/assets/{projects-section-nCxUoesH.js → projects-section-D3h_nr6-.js} +1 -1
  56. package/web/dist/assets/{prompt-templates-section-BrLXH68w.js → prompt-templates-section-DelsVm7I.js} +1 -1
  57. package/web/dist/assets/{queries-ClkIgWFx.js → queries-CYWRnyM5.js} +1 -1
  58. package/web/dist/assets/{reference-chip-D_AkXXCW.js → reference-chip-BdikRjql.js} +1 -1
  59. package/web/dist/assets/{remote-settings-notice-DgXTd6s8.js → remote-settings-notice-D2x0qeKt.js} +1 -1
  60. package/web/dist/assets/repo-git-DKkOxBOJ.js +1 -0
  61. package/web/dist/assets/{report-reader-CGmbDHza.js → report-reader-D2b9baRm.js} +1 -1
  62. package/web/dist/assets/{report-selection-D9xJZoKb.js → report-selection-D2RvkiGX.js} +1 -1
  63. package/web/dist/assets/{reports-CTFaCJWS.js → reports-CBP54u9k.js} +1 -1
  64. package/web/dist/assets/{resources-section-BhRQQrVy.js → resources-section-D86nQvrk.js} +1 -1
  65. package/web/dist/assets/{review-panel-DJN1QoGx.js → review-panel-BcuyfiuF.js} +1 -1
  66. package/web/dist/assets/{run-detail-refresh-Bo51TspT.js → run-detail-refresh-BNI7eMgG.js} +1 -1
  67. package/web/dist/assets/{run-header-CRtXOTxt.js → run-header-B2AfxeyZ.js} +1 -1
  68. package/web/dist/assets/{select-BfLaIiyd.js → select-KMLdkF0Y.js} +1 -1
  69. package/web/dist/assets/{session-context-section-CaPupOFU.js → session-context-section-Do5bNw8y.js} +1 -1
  70. package/web/dist/assets/{settings-agent-picker-CzE4qiW7.js → settings-agent-picker-Dtqb26Hz.js} +1 -1
  71. package/web/dist/assets/{settings-shell-CpEw1Yep.js → settings-shell-CWPwhUDh.js} +1 -1
  72. package/web/dist/assets/{sidebar-section-Ct0x6SOQ.js → sidebar-section-pLjtUKHT.js} +1 -1
  73. package/web/dist/assets/{skills-D2HTiFIT.js → skills-CaXsJiUU.js} +1 -1
  74. package/web/dist/assets/{tab-link-BMblA2WK.js → tab-link-B0pNjKxZ.js} +1 -1
  75. package/web/dist/assets/{task-changes-4SjmpLQN.js → task-changes-oogngDub.js} +1 -1
  76. package/web/dist/assets/{task-commits-C6CoCyG9.js → task-commits-_Aa8bkJq.js} +1 -1
  77. package/web/dist/assets/{task-file-scope-BkUJ30q2.js → task-file-scope-DY0ozMDn.js} +1 -1
  78. package/web/dist/assets/{task-files-CCX3HTxx.js → task-files-DxFFK3zI.js} +1 -1
  79. package/web/dist/assets/{task-github-item-DWLVVmvv.js → task-github-item-LSzJuoiu.js} +1 -1
  80. package/web/dist/assets/{task-groups-aquji1Kv.js → task-groups-lh9gz7TP.js} +1 -1
  81. package/web/dist/assets/{task-thread-EBqjZ5Vz.js → task-thread-BlThx_dR.js} +1 -1
  82. package/web/dist/assets/{tasks-table-BkjZYg2J.js → tasks-table-k18AuMR5.js} +1 -1
  83. package/web/dist/assets/{thread-state-DU6OEOIL.js → thread-state-DA2aAkKF.js} +1 -1
  84. package/web/dist/assets/{toaster-C-xqAWVX.js → toaster-B0kvcFif.js} +1 -1
  85. package/web/dist/assets/{use-hand-to-agent-state-DUkm37P-.js → use-hand-to-agent-state-dgiJEULj.js} +1 -1
  86. package/web/dist/assets/{workflows-CGHzfqLC.js → workflows-DNs9e08u.js} +1 -1
  87. package/web/dist/assets/{workspace-tools-9mkf36oR.js → workspace-tools-DHek4GFd.js} +1 -1
  88. package/web/dist/assets/{worktrees-section-B91kPX6V.js → worktrees-section-fLfqff8U.js} +1 -1
  89. package/web/dist/index.html +14 -14
  90. package/web/dist/assets/attention--Y0CyzCN.js +0 -1
  91. package/web/dist/assets/index-DefVZIaB.css +0 -1
  92. package/web/dist/assets/repo-git-kl6QizKC.js +0 -1
@@ -3106,6 +3106,22 @@ var worktreeEntrySchema = z24.discriminatedUnion("type", [
3106
3106
  content: z24.string().optional()
3107
3107
  })
3108
3108
  ]);
3109
+ var worktreeReclaimBlockerSchema = z24.discriminatedUnion("kind", [
3110
+ z24.object({
3111
+ kind: z24.literal("dirty"),
3112
+ uncommittedFiles: z24.number().int().min(1),
3113
+ detachedHead: z24.boolean()
3114
+ }),
3115
+ z24.object({
3116
+ kind: z24.literal("detached-head")
3117
+ }),
3118
+ z24.object({
3119
+ kind: z24.literal("submodules")
3120
+ }),
3121
+ z24.object({
3122
+ kind: z24.literal("invalid")
3123
+ })
3124
+ ]);
3109
3125
  var worktreeInfoSchema = z24.object({
3110
3126
  runId: z24.string(),
3111
3127
  title: z24.string(),
@@ -3114,7 +3130,8 @@ var worktreeInfoSchema = z24.object({
3114
3130
  sizeBytes: z24.number().nullable(),
3115
3131
  finishedAt: z24.string().nullable(),
3116
3132
  reclaimable: z24.boolean(),
3117
- pastKeep: z24.boolean()
3133
+ pastKeep: z24.boolean(),
3134
+ reclaimBlocker: worktreeReclaimBlockerSchema.nullable()
3118
3135
  });
3119
3136
  var worktreesResponseSchema = z24.object({
3120
3137
  worktrees: z24.array(worktreeInfoSchema),
@@ -6186,7 +6203,18 @@ import { z as z52 } from "zod";
6186
6203
  var gitCommitSchema = z52.object({
6187
6204
  message: z52.string().trim().min(1, "must not be empty").max(5e3)
6188
6205
  });
6189
- var reclaimBodySchema = z52.object({}).passthrough();
6206
+ var reclaimWorktreeBodySchema = z52.object({
6207
+ discardWork: z52.boolean().optional()
6208
+ });
6209
+ var reclaimBodySchema = z52.union([
6210
+ z52.object({
6211
+ discardWork: z52.literal(true),
6212
+ runIds: z52.array(z52.string().min(1)).min(1)
6213
+ }),
6214
+ z52.object({
6215
+ discardWork: z52.literal(false).optional()
6216
+ })
6217
+ ]);
6190
6218
  var repoBranchSchema = z52.object({
6191
6219
  name: z52.string().trim().min(1).max(200),
6192
6220
  from: z52.string().trim().min(1).max(200).optional()
@@ -6877,6 +6905,7 @@ export {
6877
6905
  queuedMessageSchema,
6878
6906
  reclaimBodySchema,
6879
6907
  reclaimRunParamsSchema,
6908
+ reclaimWorktreeBodySchema,
6880
6909
  reclaimWorktreeResponseSchema,
6881
6910
  reclaimWorktreesResponseSchema,
6882
6911
  refNumberFromUrl,
@@ -7144,6 +7173,7 @@ export {
7144
7173
  worktreeEntrySchema,
7145
7174
  worktreeFilesQuerySchema,
7146
7175
  worktreeInfoSchema,
7176
+ worktreeReclaimBlockerSchema,
7147
7177
  worktreeSetupConfigSchema,
7148
7178
  worktreesResponseSchema,
7149
7179
  writableAutomationTask,
@@ -2,7 +2,15 @@ import { z } from 'zod';
2
2
  export declare const gitCommitSchema: z.ZodObject<{
3
3
  message: z.ZodString;
4
4
  }, z.core.$strip>;
5
- export declare const reclaimBodySchema: z.ZodObject<{}, z.core.$loose>;
5
+ export declare const reclaimWorktreeBodySchema: z.ZodObject<{
6
+ discardWork: z.ZodOptional<z.ZodBoolean>;
7
+ }, z.core.$strip>;
8
+ export declare const reclaimBodySchema: z.ZodUnion<readonly [z.ZodObject<{
9
+ discardWork: z.ZodLiteral<true>;
10
+ runIds: z.ZodArray<z.ZodString>;
11
+ }, z.core.$strip>, z.ZodObject<{
12
+ discardWork: z.ZodOptional<z.ZodLiteral<false>>;
13
+ }, z.core.$strip>]>;
6
14
  export declare const repoBranchSchema: z.ZodObject<{
7
15
  name: z.ZodString;
8
16
  from: z.ZodOptional<z.ZodString>;
@@ -453,10 +453,25 @@ export declare const worktreeEntrySchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
453
453
  content: z.ZodOptional<z.ZodString>;
454
454
  }, z.core.$strip>], "type">;
455
455
  export type WorktreeEntry = z.infer<typeof worktreeEntrySchema>;
456
+ /** Why a finished worktree cannot be reclaimed cleanly without discarding work. */
457
+ export declare const worktreeReclaimBlockerSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
458
+ kind: z.ZodLiteral<"dirty">;
459
+ uncommittedFiles: z.ZodNumber;
460
+ detachedHead: z.ZodBoolean;
461
+ }, z.core.$strip>, z.ZodObject<{
462
+ kind: z.ZodLiteral<"detached-head">;
463
+ }, z.core.$strip>, z.ZodObject<{
464
+ kind: z.ZodLiteral<"submodules">;
465
+ }, z.core.$strip>, z.ZodObject<{
466
+ kind: z.ZodLiteral<"invalid">;
467
+ }, z.core.$strip>], "kind">;
468
+ export type WorktreeReclaimBlocker = z.infer<typeof worktreeReclaimBlockerSchema>;
456
469
  /** One materialized task worktree in the management panel (#483). `sizeBytes` is null when `du`
457
470
  * is unavailable (Windows / missing). `reclaimable` = finished, has a directory, not yet
458
- * reclaimed (retention's rule). `pastKeep` = reclaimable AND outside the newest `keep`, i.e.
459
- * exactly the rows a "Reclaim now" would take; a reclaimable row that is not past it is kept. */
471
+ * reclaimed (retention's rule). `pastKeep` = reclaimable AND outside the newest `keep`.
472
+ * `reclaimBlocker` is non-null when a clean reclaim would refuse the checkout (uncommitted files,
473
+ * detached HEAD with no keeping ref, or an unregistered/broken directory); explicit discard can
474
+ * still reclaim its directory while keeping the branch. */
460
475
  export declare const worktreeInfoSchema: z.ZodObject<{
461
476
  runId: z.ZodString;
462
477
  title: z.ZodString;
@@ -474,6 +489,17 @@ export declare const worktreeInfoSchema: z.ZodObject<{
474
489
  finishedAt: z.ZodNullable<z.ZodString>;
475
490
  reclaimable: z.ZodBoolean;
476
491
  pastKeep: z.ZodBoolean;
492
+ reclaimBlocker: z.ZodNullable<z.ZodDiscriminatedUnion<[z.ZodObject<{
493
+ kind: z.ZodLiteral<"dirty">;
494
+ uncommittedFiles: z.ZodNumber;
495
+ detachedHead: z.ZodBoolean;
496
+ }, z.core.$strip>, z.ZodObject<{
497
+ kind: z.ZodLiteral<"detached-head">;
498
+ }, z.core.$strip>, z.ZodObject<{
499
+ kind: z.ZodLiteral<"submodules">;
500
+ }, z.core.$strip>, z.ZodObject<{
501
+ kind: z.ZodLiteral<"invalid">;
502
+ }, z.core.$strip>], "kind">>;
477
503
  }, z.core.$strip>;
478
504
  export type WorktreeInfo = z.infer<typeof worktreeInfoSchema>;
479
505
  /** `GET /api/v1/worktrees` (#483): the worktrees on disk, their total size (null when any
@@ -496,6 +522,17 @@ export declare const worktreesResponseSchema: z.ZodObject<{
496
522
  finishedAt: z.ZodNullable<z.ZodString>;
497
523
  reclaimable: z.ZodBoolean;
498
524
  pastKeep: z.ZodBoolean;
525
+ reclaimBlocker: z.ZodNullable<z.ZodDiscriminatedUnion<[z.ZodObject<{
526
+ kind: z.ZodLiteral<"dirty">;
527
+ uncommittedFiles: z.ZodNumber;
528
+ detachedHead: z.ZodBoolean;
529
+ }, z.core.$strip>, z.ZodObject<{
530
+ kind: z.ZodLiteral<"detached-head">;
531
+ }, z.core.$strip>, z.ZodObject<{
532
+ kind: z.ZodLiteral<"submodules">;
533
+ }, z.core.$strip>, z.ZodObject<{
534
+ kind: z.ZodLiteral<"invalid">;
535
+ }, z.core.$strip>], "kind">>;
499
536
  }, z.core.$strip>>;
500
537
  totalBytes: z.ZodNullable<z.ZodNumber>;
501
538
  keep: z.ZodNumber;
@@ -27,18 +27,6 @@ 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
- } | {
42
30
  output: {
43
31
  workers: {
44
32
  workerId: string;
@@ -91,6 +79,18 @@ export declare function createDelegationRoutes(service: DelegationService, crede
91
79
  offset?: string | undefined;
92
80
  };
93
81
  };
82
+ } | {
83
+ output: {
84
+ error: string;
85
+ code?: "invalid_input" | undefined;
86
+ };
87
+ outputFormat: "json";
88
+ status: 400;
89
+ input: {
90
+ query: {
91
+ offset?: string | undefined;
92
+ };
93
+ };
94
94
  };
95
95
  };
96
96
  } & {
@@ -677,18 +677,6 @@ export declare function createDelegationRoutes(service: DelegationService, crede
677
677
  } & {
678
678
  "/:workerId": {
679
679
  $get: {
680
- output: {
681
- error: string;
682
- code?: "invalid_input" | undefined;
683
- };
684
- outputFormat: "json";
685
- status: 400;
686
- input: {
687
- param: {
688
- workerId: string;
689
- };
690
- };
691
- } | {
692
680
  output: {
693
681
  workerId: string;
694
682
  settled: boolean;
@@ -813,11 +801,7 @@ export declare function createDelegationRoutes(service: DelegationService, crede
813
801
  workerId: string;
814
802
  };
815
803
  };
816
- };
817
- };
818
- } & {
819
- "/:workerId/collect": {
820
- $post: {
804
+ } | {
821
805
  output: {
822
806
  error: string;
823
807
  code?: "invalid_input" | undefined;
@@ -828,10 +812,12 @@ export declare function createDelegationRoutes(service: DelegationService, crede
828
812
  param: {
829
813
  workerId: string;
830
814
  };
831
- } & {
832
- json: Record<string, never>;
833
815
  };
834
- } | {
816
+ };
817
+ };
818
+ } & {
819
+ "/:workerId/collect": {
820
+ $post: {
835
821
  output: {
836
822
  workerId: string;
837
823
  parentRunId: string;
@@ -954,11 +940,7 @@ export declare function createDelegationRoutes(service: DelegationService, crede
954
940
  } & {
955
941
  json: Record<string, never>;
956
942
  };
957
- };
958
- };
959
- } & {
960
- "/:workerId/steer": {
961
- $post: {
943
+ } | {
962
944
  output: {
963
945
  error: string;
964
946
  code?: "invalid_input" | undefined;
@@ -970,11 +952,13 @@ export declare function createDelegationRoutes(service: DelegationService, crede
970
952
  workerId: string;
971
953
  };
972
954
  } & {
973
- json: {
974
- text: string;
975
- };
955
+ json: Record<string, never>;
976
956
  };
977
- } | {
957
+ };
958
+ };
959
+ } & {
960
+ "/:workerId/steer": {
961
+ $post: {
978
962
  output: {
979
963
  workerId: string;
980
964
  state: "delivered" | "queued";
@@ -990,11 +974,7 @@ export declare function createDelegationRoutes(service: DelegationService, crede
990
974
  text: string;
991
975
  };
992
976
  };
993
- };
994
- };
995
- } & {
996
- "/:workerId/stop": {
997
- $post: {
977
+ } | {
998
978
  output: {
999
979
  error: string;
1000
980
  code?: "invalid_input" | undefined;
@@ -1006,9 +986,15 @@ export declare function createDelegationRoutes(service: DelegationService, crede
1006
986
  workerId: string;
1007
987
  };
1008
988
  } & {
1009
- json: Record<string, never>;
989
+ json: {
990
+ text: string;
991
+ };
1010
992
  };
1011
- } | {
993
+ };
994
+ };
995
+ } & {
996
+ "/:workerId/stop": {
997
+ $post: {
1012
998
  output: {
1013
999
  workerId: string;
1014
1000
  state: "stopping" | "terminated";
@@ -1022,11 +1008,7 @@ export declare function createDelegationRoutes(service: DelegationService, crede
1022
1008
  } & {
1023
1009
  json: Record<string, never>;
1024
1010
  };
1025
- };
1026
- };
1027
- } & {
1028
- "/:workerId/destroy": {
1029
- $post: {
1011
+ } | {
1030
1012
  output: {
1031
1013
  error: string;
1032
1014
  code?: "invalid_input" | undefined;
@@ -1038,11 +1020,13 @@ export declare function createDelegationRoutes(service: DelegationService, crede
1038
1020
  workerId: string;
1039
1021
  };
1040
1022
  } & {
1041
- json: {
1042
- discardWork?: true | undefined;
1043
- };
1023
+ json: Record<string, never>;
1044
1024
  };
1045
- } | {
1025
+ };
1026
+ };
1027
+ } & {
1028
+ "/:workerId/destroy": {
1029
+ $post: {
1046
1030
  output: {
1047
1031
  workerId: string;
1048
1032
  state: "complete" | "incomplete";
@@ -1071,6 +1055,22 @@ export declare function createDelegationRoutes(service: DelegationService, crede
1071
1055
  discardWork?: true | undefined;
1072
1056
  };
1073
1057
  };
1058
+ } | {
1059
+ output: {
1060
+ error: string;
1061
+ code?: "invalid_input" | undefined;
1062
+ };
1063
+ outputFormat: "json";
1064
+ status: 400;
1065
+ input: {
1066
+ param: {
1067
+ workerId: string;
1068
+ };
1069
+ } & {
1070
+ json: {
1071
+ discardWork?: true | undefined;
1072
+ };
1073
+ };
1074
1074
  } | {
1075
1075
  output: {
1076
1076
  workerId: string;
@@ -1106,11 +1106,13 @@ export declare function createDelegationRoutes(service: DelegationService, crede
1106
1106
  "/:workerId/diff": {
1107
1107
  $get: {
1108
1108
  output: {
1109
- error: string;
1110
- code?: "invalid_input" | undefined;
1109
+ workerId: string;
1110
+ baselineSha: string;
1111
+ diff: string;
1112
+ truncated: boolean;
1111
1113
  };
1112
1114
  outputFormat: "json";
1113
- status: 400;
1115
+ status: 200;
1114
1116
  input: {
1115
1117
  param: {
1116
1118
  workerId: string;
@@ -1118,13 +1120,11 @@ export declare function createDelegationRoutes(service: DelegationService, crede
1118
1120
  };
1119
1121
  } | {
1120
1122
  output: {
1121
- workerId: string;
1122
- baselineSha: string;
1123
- diff: string;
1124
- truncated: boolean;
1123
+ error: string;
1124
+ code?: "invalid_input" | undefined;
1125
1125
  };
1126
1126
  outputFormat: "json";
1127
- status: 200;
1127
+ status: 400;
1128
1128
  input: {
1129
1129
  param: {
1130
1130
  workerId: string;
@@ -2,6 +2,18 @@ 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
+ } | {
5
17
  output: {
6
18
  workers: {
7
19
  workerId: string;
@@ -54,18 +66,6 @@ export declare function createDelegationApp(routes: DelegationRoutes): import("h
54
66
  offset?: string | undefined;
55
67
  };
56
68
  };
57
- } | {
58
- output: {
59
- error: string;
60
- code?: "invalid_input" | undefined;
61
- };
62
- outputFormat: "json";
63
- status: 400;
64
- input: {
65
- query: {
66
- offset?: string | undefined;
67
- };
68
- };
69
69
  };
70
70
  };
71
71
  } & {
@@ -652,6 +652,18 @@ export declare function createDelegationApp(routes: DelegationRoutes): import("h
652
652
  } & {
653
653
  "/:workerId": {
654
654
  $get: {
655
+ output: {
656
+ error: string;
657
+ code?: "invalid_input" | undefined;
658
+ };
659
+ outputFormat: "json";
660
+ status: 400;
661
+ input: {
662
+ param: {
663
+ workerId: string;
664
+ };
665
+ };
666
+ } | {
655
667
  output: {
656
668
  workerId: string;
657
669
  settled: boolean;
@@ -776,7 +788,11 @@ export declare function createDelegationApp(routes: DelegationRoutes): import("h
776
788
  workerId: string;
777
789
  };
778
790
  };
779
- } | {
791
+ };
792
+ };
793
+ } & {
794
+ "/:workerId/collect": {
795
+ $post: {
780
796
  output: {
781
797
  error: string;
782
798
  code?: "invalid_input" | undefined;
@@ -787,12 +803,10 @@ export declare function createDelegationApp(routes: DelegationRoutes): import("h
787
803
  param: {
788
804
  workerId: string;
789
805
  };
806
+ } & {
807
+ json: Record<string, never>;
790
808
  };
791
- };
792
- };
793
- } & {
794
- "/:workerId/collect": {
795
- $post: {
809
+ } | {
796
810
  output: {
797
811
  workerId: string;
798
812
  parentRunId: string;
@@ -915,7 +929,11 @@ export declare function createDelegationApp(routes: DelegationRoutes): import("h
915
929
  } & {
916
930
  json: Record<string, never>;
917
931
  };
918
- } | {
932
+ };
933
+ };
934
+ } & {
935
+ "/:workerId/steer": {
936
+ $post: {
919
937
  output: {
920
938
  error: string;
921
939
  code?: "invalid_input" | undefined;
@@ -927,13 +945,11 @@ export declare function createDelegationApp(routes: DelegationRoutes): import("h
927
945
  workerId: string;
928
946
  };
929
947
  } & {
930
- json: Record<string, never>;
948
+ json: {
949
+ text: string;
950
+ };
931
951
  };
932
- };
933
- };
934
- } & {
935
- "/:workerId/steer": {
936
- $post: {
952
+ } | {
937
953
  output: {
938
954
  workerId: string;
939
955
  state: "delivered" | "queued";
@@ -949,7 +965,11 @@ export declare function createDelegationApp(routes: DelegationRoutes): import("h
949
965
  text: string;
950
966
  };
951
967
  };
952
- } | {
968
+ };
969
+ };
970
+ } & {
971
+ "/:workerId/stop": {
972
+ $post: {
953
973
  output: {
954
974
  error: string;
955
975
  code?: "invalid_input" | undefined;
@@ -961,15 +981,9 @@ export declare function createDelegationApp(routes: DelegationRoutes): import("h
961
981
  workerId: string;
962
982
  };
963
983
  } & {
964
- json: {
965
- text: string;
966
- };
984
+ json: Record<string, never>;
967
985
  };
968
- };
969
- };
970
- } & {
971
- "/:workerId/stop": {
972
- $post: {
986
+ } | {
973
987
  output: {
974
988
  workerId: string;
975
989
  state: "stopping" | "terminated";
@@ -983,7 +997,11 @@ export declare function createDelegationApp(routes: DelegationRoutes): import("h
983
997
  } & {
984
998
  json: Record<string, never>;
985
999
  };
986
- } | {
1000
+ };
1001
+ };
1002
+ } & {
1003
+ "/:workerId/destroy": {
1004
+ $post: {
987
1005
  output: {
988
1006
  error: string;
989
1007
  code?: "invalid_input" | undefined;
@@ -995,13 +1013,11 @@ export declare function createDelegationApp(routes: DelegationRoutes): import("h
995
1013
  workerId: string;
996
1014
  };
997
1015
  } & {
998
- json: Record<string, never>;
1016
+ json: {
1017
+ discardWork?: true | undefined;
1018
+ };
999
1019
  };
1000
- };
1001
- };
1002
- } & {
1003
- "/:workerId/destroy": {
1004
- $post: {
1020
+ } | {
1005
1021
  output: {
1006
1022
  workerId: string;
1007
1023
  state: "complete" | "incomplete";
@@ -1030,22 +1046,6 @@ export declare function createDelegationApp(routes: DelegationRoutes): import("h
1030
1046
  discardWork?: true | undefined;
1031
1047
  };
1032
1048
  };
1033
- } | {
1034
- output: {
1035
- error: string;
1036
- code?: "invalid_input" | undefined;
1037
- };
1038
- outputFormat: "json";
1039
- status: 400;
1040
- input: {
1041
- param: {
1042
- workerId: string;
1043
- };
1044
- } & {
1045
- json: {
1046
- discardWork?: true | undefined;
1047
- };
1048
- };
1049
1049
  } | {
1050
1050
  output: {
1051
1051
  workerId: string;
@@ -1081,13 +1081,11 @@ export declare function createDelegationApp(routes: DelegationRoutes): import("h
1081
1081
  "/:workerId/diff": {
1082
1082
  $get: {
1083
1083
  output: {
1084
- workerId: string;
1085
- baselineSha: string;
1086
- diff: string;
1087
- truncated: boolean;
1084
+ error: string;
1085
+ code?: "invalid_input" | undefined;
1088
1086
  };
1089
1087
  outputFormat: "json";
1090
- status: 200;
1088
+ status: 400;
1091
1089
  input: {
1092
1090
  param: {
1093
1091
  workerId: string;
@@ -1095,11 +1093,13 @@ export declare function createDelegationApp(routes: DelegationRoutes): import("h
1095
1093
  };
1096
1094
  } | {
1097
1095
  output: {
1098
- error: string;
1099
- code?: "invalid_input" | undefined;
1096
+ workerId: string;
1097
+ baselineSha: string;
1098
+ diff: string;
1099
+ truncated: boolean;
1100
1100
  };
1101
1101
  outputFormat: "json";
1102
- status: 400;
1102
+ status: 200;
1103
1103
  input: {
1104
1104
  param: {
1105
1105
  workerId: string;
@@ -1,3 +1,4 @@
1
+ import type { WorktreeReclaimBlocker } from './contract/index.js';
1
2
  import { type LiveIndexCheck, type DiffRefusal } from './git-private-index.ts';
2
3
  import { type WorktreeGitResult } from './git-worktree-lock.ts';
3
4
  /** One worktree per task (spec 006). Only createWorktree throws; its caller reports failure. */
@@ -55,6 +56,14 @@ export type RemoveWorktreeOptions = {
55
56
  assertCurrent?: () => void;
56
57
  };
57
58
  export declare function removeWorktree(repoRoot: string, worktreePath: string, branch?: string, opts?: RemoveWorktreeOptions): Promise<void>;
59
+ /**
60
+ * Inspect whether a finished worktree directory would be refused by a clean reclaim
61
+ * (`removeCleanWorktree`): uncommitted files, a detached HEAD with no branch/remote ref holding
62
+ * its commit, initialized submodules, or an unregistered/broken directory (missing `.git`).
63
+ * Returns `null` when clean and ref-backed (or when the directory no longer exists).
64
+ * Best-effort: never throws.
65
+ */
66
+ export declare function inspectWorktreeReclaimBlocker(repoRoot: string, worktreePath: string): Promise<WorktreeReclaimBlocker | null>;
58
67
  /**
59
68
  * Whole-branch committed, uncommitted and untracked diff against the merge-base. Preserve this
60
69
  * anchor for the protected text endpoint and conservative settlement checks.