@hearsay-tools/squawk 0.19.0-dev.9229.2 → 0.19.0-dev.9235

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 (135) hide show
  1. package/dist/activity/read-model.js +5 -2
  2. package/dist/activity/read-model.js.map +1 -1
  3. package/dist/contract/index.d.ts +1 -0
  4. package/dist/contract/index.js +2250 -1940
  5. package/dist/contract/runs.d.ts +117 -0
  6. package/dist/contract/task-result.d.ts +1075 -0
  7. package/dist/delegation/readiness.d.ts +8 -5
  8. package/dist/delegation/readiness.js +23 -9
  9. package/dist/delegation/readiness.js.map +1 -1
  10. package/dist/delegation/routes.d.ts +4 -4
  11. package/dist/delegation/service.js +4 -2
  12. package/dist/delegation/service.js.map +1 -1
  13. package/dist/delegation/worker-cleanup.js +1 -1
  14. package/dist/delegation/worker-cleanup.js.map +1 -1
  15. package/dist/project-migration/journal.d.ts +2 -0
  16. package/dist/project-migration/journal.js +1 -1
  17. package/dist/project-migration/journal.js.map +1 -1
  18. package/dist/project-migration/plan.js +2 -0
  19. package/dist/project-migration/plan.js.map +1 -1
  20. package/dist/runs/legacy-run-rows.d.ts +1 -1
  21. package/dist/runs/legacy-run-rows.js +7 -3
  22. package/dist/runs/legacy-run-rows.js.map +1 -1
  23. package/dist/runs/ports.d.ts +16 -1
  24. package/dist/runs/project-run-connection.d.ts +3 -0
  25. package/dist/runs/project-run-connection.js +57 -10
  26. package/dist/runs/project-run-connection.js.map +1 -1
  27. package/dist/runs/project-run-sources.d.ts +6 -0
  28. package/dist/runs/project-run-sources.js +20 -0
  29. package/dist/runs/project-run-sources.js.map +1 -1
  30. package/dist/runs/run-archive.d.ts +19 -0
  31. package/dist/runs/run-decode.d.ts +58 -0
  32. package/dist/runs/run-decode.js +10 -0
  33. package/dist/runs/run-decode.js.map +1 -1
  34. package/dist/runs/run-exits.d.ts +114 -0
  35. package/dist/runs/run-retention.d.ts +2 -0
  36. package/dist/runs/run-retention.js +11 -2
  37. package/dist/runs/run-retention.js.map +1 -1
  38. package/dist/runs/store.d.ts +3 -0
  39. package/dist/runs/store.js +11 -5
  40. package/dist/runs/store.js.map +1 -1
  41. package/dist/runs/task-result-commit.d.ts +24 -0
  42. package/dist/runs/task-result-commit.js +114 -0
  43. package/dist/runs/task-result-commit.js.map +1 -0
  44. package/dist/runs/task-results.d.ts +61 -0
  45. package/dist/runs/task-results.js +220 -0
  46. package/dist/runs/task-results.js.map +1 -0
  47. package/dist/runs/worker-result-commit.d.ts +12 -12
  48. package/dist/runs/worker-result-commit.js +77 -55
  49. package/dist/runs/worker-result-commit.js.map +1 -1
  50. package/dist/runs/worker-results.d.ts +10 -26
  51. package/dist/runs/worker-results.js +11 -73
  52. package/dist/runs/worker-results.js.map +1 -1
  53. package/dist/server/runs-routes.d.ts +205 -34
  54. package/dist/server/server.d.ts +1660 -1318
  55. package/dist/workflows/continuation-admission.d.ts +91 -72
  56. package/dist/workflows/input-acknowledgement.d.ts +24 -24
  57. package/dist/workflows/run/completion-gate.js +10 -4
  58. package/dist/workflows/run/completion-gate.js.map +1 -1
  59. package/dist/workflows/run/wait-engine.d.ts +91 -72
  60. package/package.json +4 -4
  61. package/web/dist/assets/{accounts-section-lnMwvHTo.js → accounts-section-BOZ9JyE6.js} +1 -1
  62. package/web/dist/assets/{activity-motion-DBxIOskd.js → activity-motion-D48R7Vry.js} +1 -1
  63. package/web/dist/assets/{activity-route-BYf5OD8Y.js → activity-route-jcGRtnMT.js} +1 -1
  64. package/web/dist/assets/{agent-accounts-BzD14qLU.js → agent-accounts-CUthX0Yh.js} +1 -1
  65. package/web/dist/assets/{agent-config-section-BwmBjoad.js → agent-config-section-BvwoyNZb.js} +1 -1
  66. package/web/dist/assets/{agent-defaults-section-BbFvw0IO.js → agent-defaults-section-Hb-jy4TN.js} +1 -1
  67. package/web/dist/assets/{appearance-CkohbKAs.js → appearance-EXKzoghV.js} +1 -1
  68. package/web/dist/assets/{archive-on-merge-field-CQ8DBqiG.js → archive-on-merge-field-Ni7bKGkG.js} +1 -1
  69. package/web/dist/assets/{ask-card-Bli7vYif.js → ask-card-CkE44gm3.js} +1 -1
  70. package/web/dist/assets/{automations-route-BNYFQeuu.js → automations-route-3bhtdTy3.js} +1 -1
  71. package/web/dist/assets/{commit-list-CJZtpbaw.js → commit-list-DSw7qvVY.js} +1 -1
  72. package/web/dist/assets/{diff-DPSOaO5_.js → diff-BidPzsVK.js} +2 -2
  73. package/web/dist/assets/{diff-controls-rfNgY_Dd.js → diff-controls-DeMSGYln.js} +1 -1
  74. package/web/dist/assets/{diff-view-CswchTTd.js → diff-view-BqU4sJld.js} +1 -1
  75. package/web/dist/assets/{discard-changes-dialog-BMT0YtWx.js → discard-changes-dialog-B1AO0GSt.js} +1 -1
  76. package/web/dist/assets/{file-preview-DoaMlVS3.js → file-preview-BIZXTzkp.js} +1 -1
  77. package/web/dist/assets/{folder-browser-D_q7aPq-.js → folder-browser-C9Phl0rS.js} +1 -1
  78. package/web/dist/assets/{git-toolbar-BCqNvkr5.js → git-toolbar-BBon1yHh.js} +1 -1
  79. package/web/dist/assets/{github-Bv1h-3dP.js → github-QOB5Qi4v.js} +1 -1
  80. package/web/dist/assets/{global-activity-route-CrAG-ji7.js → global-activity-route-lSnYAZE9.js} +1 -1
  81. package/web/dist/assets/{hosts-pzCm30ta.js → hosts-DDwDUxT9.js} +1 -1
  82. package/web/dist/assets/{index-D9hyWO4C.js → index-BuR9xHfb.js} +5 -5
  83. package/web/dist/assets/{label-DEZnEIpB.js → label-D6vgq5lF.js} +1 -1
  84. package/web/dist/assets/{markdown-BRE9fTUI.js → markdown-A6dvDky9.js} +1 -1
  85. package/web/dist/assets/{open-in-menu-DomSOC26.js → open-in-menu-Bb_jc7pm.js} +1 -1
  86. package/web/dist/assets/{option-select-Cqnmt-CB.js → option-select-CCpypHbW.js} +1 -1
  87. package/web/dist/assets/{preferences-section-CC4m45tb.js → preferences-section-B75Zx0mY.js} +1 -1
  88. package/web/dist/assets/{preview-DFL4D2C_.js → preview-DiBpgf-5.js} +1 -1
  89. package/web/dist/assets/{preview-pane-connected-CvF3zJ9A.js → preview-pane-connected-BVu2oO0V.js} +1 -1
  90. package/web/dist/assets/{project-location-D6-Lo1vY.js → project-location-D1etWKHg.js} +1 -1
  91. package/web/dist/assets/{project-router-CARDbdMX.js → project-router-yoWCTDaT.js} +1 -1
  92. package/web/dist/assets/project-scope-context-hfRzPMZ4.js +4 -0
  93. package/web/dist/assets/{projects-section-zeGtqnI3.js → projects-section-BRnIJ47e.js} +1 -1
  94. package/web/dist/assets/{prompt-templates-section--ygct2zC.js → prompt-templates-section-D7JLM5BM.js} +1 -1
  95. package/web/dist/assets/{queries-D7W-eGim.js → queries-ChH9ctc-.js} +1 -1
  96. package/web/dist/assets/{reference-chip-D8ckcrda.js → reference-chip-BPRZm7Kb.js} +1 -1
  97. package/web/dist/assets/{remote-settings-notice-MxDxNXXw.js → remote-settings-notice-Ip6H5hLU.js} +1 -1
  98. package/web/dist/assets/{repo-git-VfTEbVO3.js → repo-git-Wf30akEt.js} +1 -1
  99. package/web/dist/assets/{report-reader-DLCLUfdH.js → report-reader-DhcZcNql.js} +1 -1
  100. package/web/dist/assets/{report-selection-BcsbTczw.js → report-selection-CwPw7vbG.js} +1 -1
  101. package/web/dist/assets/{reports-QoDlngjL.js → reports-DPKDwzxY.js} +1 -1
  102. package/web/dist/assets/{resources-section-CBL0htm5.js → resources-section-DaWcyqur.js} +1 -1
  103. package/web/dist/assets/{review-notes-drafts-DJDQNemf.js → review-notes-drafts-D7QuBuTL.js} +1 -1
  104. package/web/dist/assets/{review-panel-BY05CuXd.js → review-panel-Bpxl4TvO.js} +1 -1
  105. package/web/dist/assets/{review-strip-BWhQ5CIC.js → review-strip-Da5n1k8s.js} +1 -1
  106. package/web/dist/assets/{run-detail-refresh-CecZhU-h.js → run-detail-refresh-CVSK_VKG.js} +1 -1
  107. package/web/dist/assets/{run-diff-CpwwrpXO.js → run-diff-CPuNFD3X.js} +1 -1
  108. package/web/dist/assets/{run-header-CZU3e9Xk.js → run-header-B8EAOHFc.js} +1 -1
  109. package/web/dist/assets/{select-C72KGfnK.js → select-xjUzLrk9.js} +1 -1
  110. package/web/dist/assets/{session-context-section-D8v30mSp.js → session-context-section-C7OTexKU.js} +1 -1
  111. package/web/dist/assets/{settings-agent-picker-DGhJwDIY.js → settings-agent-picker-mESK-hj4.js} +1 -1
  112. package/web/dist/assets/{settings-save-bar-Dp-eEIEF.js → settings-save-bar-BUaa1kHw.js} +1 -1
  113. package/web/dist/assets/{settings-shell-DZzgCmSz.js → settings-shell-BKSsBxqQ.js} +1 -1
  114. package/web/dist/assets/{sidebar-section-B94mdYUS.js → sidebar-section-BFBZlQ-x.js} +1 -1
  115. package/web/dist/assets/{skills-B6jO_f1w.js → skills-BSqszv5g.js} +1 -1
  116. package/web/dist/assets/{status-dot-B5MkhHDP.js → status-dot-Fp5SnPHI.js} +1 -1
  117. package/web/dist/assets/{tab-link-zXPa9LIz.js → tab-link-j06AaWSU.js} +1 -1
  118. package/web/dist/assets/{task-changes-B_2BDWIf.js → task-changes-B4KFHxVa.js} +1 -1
  119. package/web/dist/assets/{task-commits-kxDG4T81.js → task-commits-D-UAUoZ5.js} +1 -1
  120. package/web/dist/assets/{task-file-scope-DVACyrij.js → task-file-scope-BhWG35a8.js} +1 -1
  121. package/web/dist/assets/{task-files-4CxXkPOx.js → task-files-BOCx_Lp0.js} +1 -1
  122. package/web/dist/assets/{task-github-item-C8hMZej3.js → task-github-item-CZqaaxNv.js} +1 -1
  123. package/web/dist/assets/{task-thread-Bv_Fjceh.js → task-thread-D3d419VX.js} +1 -1
  124. package/web/dist/assets/{thread-state-CufNf_fC.js → thread-state-B0pz2Y8K.js} +1 -1
  125. package/web/dist/assets/{use-finish-run-CjYc6ovQ.js → use-finish-run-TX3pIPCS.js} +1 -1
  126. package/web/dist/assets/{use-hand-to-agent-state-B_j_e1kD.js → use-hand-to-agent-state-D2oChRzw.js} +1 -1
  127. package/web/dist/assets/use-path-bases-DFxEHoyU.js +1 -0
  128. package/web/dist/assets/use-workspace-config-save-DR8brU5p.js +1 -0
  129. package/web/dist/assets/{workflows-iMfDerlK.js → workflows-BwzNhxT0.js} +1 -1
  130. package/web/dist/assets/{workspace-tools-CgYFRggf.js → workspace-tools-Be_j9oke.js} +1 -1
  131. package/web/dist/assets/{worktrees-section-CtT9bwKK.js → worktrees-section-cnibWU5-.js} +1 -1
  132. package/web/dist/index.html +14 -14
  133. package/web/dist/assets/project-scope-context-Bz7AAyJ4.js +0 -4
  134. package/web/dist/assets/use-path-bases-BfjK7tem.js +0 -1
  135. package/web/dist/assets/use-workspace-config-save-toCmvqtz.js +0 -1
@@ -0,0 +1,1075 @@
1
+ import { z } from 'zod';
2
+ import { type WorkerCollectedResult } from './delegation.ts';
3
+ /**
4
+ * Task results (spec 2026-12-01-task-results, E2 hearsay-tools/squawk#4627):
5
+ * - `taskResultSchema` is the public host-path-free wire shape (Decision 4 / D3).
6
+ * - `storedTaskResultSchema` and `taskResultFileSchema` represent internal on-disk snapshots
7
+ * under `runs/<runId>-results/<snapshotId>.json` (keeping host paths for internal validation
8
+ * and project migration, and accepting worker snapshots so `worker collect` and deleted-worker
9
+ * checks remain lossless until E6).
10
+ * - `taskResultReferenceSchema` is the pointer stored at `RunRecord.result`.
11
+ * - `workerAcknowledgementSchema` is the supervisor acknowledgement entry stored at top-level
12
+ * `RunRecord.workerAcknowledgements` on the family root (D1).
13
+ */
14
+ export declare const taskResultIdSchema: z.ZodString;
15
+ export declare const taskExecutionOutcomeSchema: z.ZodEnum<{
16
+ cancelled: "cancelled";
17
+ completed: "completed";
18
+ failed: "failed";
19
+ "review-ready": "review-ready";
20
+ running: "running";
21
+ }>;
22
+ export type TaskExecutionOutcome = z.infer<typeof taskExecutionOutcomeSchema>;
23
+ export declare const taskOutcomeSchema: z.ZodEnum<{
24
+ cancelled: "cancelled";
25
+ completed: "completed";
26
+ destroyed: "destroyed";
27
+ failed: "failed";
28
+ "review-ready": "review-ready";
29
+ running: "running";
30
+ }>;
31
+ export type TaskOutcome = z.infer<typeof taskOutcomeSchema>;
32
+ /** Pointer to the latest persisted task result snapshot, stored at `RunRecord.result`. */
33
+ export declare const taskResultReferenceSchema: z.ZodObject<{
34
+ revision: z.ZodNumber;
35
+ snapshotId: z.ZodUUID;
36
+ observedAt: z.ZodISODateTime;
37
+ lastExecutionOutcome: z.ZodEnum<{
38
+ cancelled: "cancelled";
39
+ completed: "completed";
40
+ failed: "failed";
41
+ "review-ready": "review-ready";
42
+ running: "running";
43
+ }>;
44
+ previous: z.ZodOptional<z.ZodObject<{
45
+ revision: z.ZodNumber;
46
+ observedAt: z.ZodISODateTime;
47
+ lastExecutionOutcome: z.ZodEnum<{
48
+ cancelled: "cancelled";
49
+ completed: "completed";
50
+ failed: "failed";
51
+ "review-ready": "review-ready";
52
+ running: "running";
53
+ }>;
54
+ }, z.core.$strict>>;
55
+ }, z.core.$strict>;
56
+ export type TaskResultReference = z.infer<typeof taskResultReferenceSchema>;
57
+ /** Supervisor acknowledgement that it read a settled worker revision (or completed destroy). */
58
+ export declare const workerAcknowledgementSchema: z.ZodObject<{
59
+ workerId: z.ZodUUID;
60
+ revision: z.ZodNumber;
61
+ status: z.ZodEnum<{
62
+ cancelled: "cancelled";
63
+ done: "done";
64
+ failed: "failed";
65
+ queued: "queued";
66
+ review: "review";
67
+ running: "running";
68
+ waiting: "waiting";
69
+ }>;
70
+ observedAt: z.ZodISODateTime;
71
+ }, z.core.$strict>;
72
+ export type WorkerAcknowledgement = z.infer<typeof workerAcknowledgementSchema>;
73
+ /** Public host-path-free workspace descriptor on `TaskResult`. */
74
+ export declare const taskResultWorkspaceSchema: z.ZodObject<{
75
+ kind: z.ZodEnum<{
76
+ owned: "owned";
77
+ project: "project";
78
+ shared: "shared";
79
+ }>;
80
+ state: z.ZodEnum<{
81
+ available: "available";
82
+ deleted: "deleted";
83
+ unavailable: "unavailable";
84
+ }>;
85
+ branch: z.ZodOptional<z.ZodString>;
86
+ baselineSha: z.ZodOptional<z.ZodString>;
87
+ hostRunId: z.ZodOptional<z.ZodUUID>;
88
+ }, z.core.$strict>;
89
+ export type TaskResultWorkspace = z.infer<typeof taskResultWorkspaceSchema>;
90
+ export declare const taskResultSummarySchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
91
+ state: z.ZodLiteral<"available">;
92
+ text: z.ZodString;
93
+ source: z.ZodEnum<{
94
+ assistant: "assistant";
95
+ failure: "failure";
96
+ }>;
97
+ seq: z.ZodNumber;
98
+ truncated: z.ZodBoolean;
99
+ totalLines: z.ZodNumber;
100
+ }, z.core.$strict>, z.ZodObject<{
101
+ state: z.ZodLiteral<"unavailable">;
102
+ reason: z.ZodEnum<{
103
+ missing: "missing";
104
+ "no-assistant-output": "no-assistant-output";
105
+ unreadable: "unreadable";
106
+ unsupported: "unsupported";
107
+ unverified: "unverified";
108
+ }>;
109
+ detail: z.ZodOptional<z.ZodString>;
110
+ }, z.core.$strict>, z.ZodObject<{
111
+ state: z.ZodLiteral<"deleted">;
112
+ reason: z.ZodLiteral<"missing">;
113
+ }, z.core.$strict>], "state">;
114
+ export type TaskResultSummary = z.infer<typeof taskResultSummarySchema>;
115
+ export declare const taskResultHeadSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
116
+ state: z.ZodLiteral<"available">;
117
+ sha: z.ZodString;
118
+ }, z.core.$strict>, z.ZodObject<{
119
+ state: z.ZodLiteral<"unavailable">;
120
+ reason: z.ZodEnum<{
121
+ missing: "missing";
122
+ "no-assistant-output": "no-assistant-output";
123
+ unreadable: "unreadable";
124
+ unsupported: "unsupported";
125
+ unverified: "unverified";
126
+ }>;
127
+ detail: z.ZodOptional<z.ZodString>;
128
+ sha: z.ZodOptional<z.ZodString>;
129
+ }, z.core.$strict>, z.ZodObject<{
130
+ state: z.ZodLiteral<"deleted">;
131
+ reason: z.ZodLiteral<"missing">;
132
+ sha: z.ZodOptional<z.ZodString>;
133
+ }, z.core.$strict>], "state">;
134
+ export type TaskResultHead = z.infer<typeof taskResultHeadSchema>;
135
+ export declare const taskResultDiffSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
136
+ state: z.ZodLiteral<"available">;
137
+ truncated: z.ZodBoolean;
138
+ bytes: z.ZodNumber;
139
+ patch: z.ZodOptional<z.ZodString>;
140
+ patchTruncated: z.ZodOptional<z.ZodBoolean>;
141
+ }, z.core.$strict>, z.ZodObject<{
142
+ state: z.ZodLiteral<"unavailable">;
143
+ reason: z.ZodEnum<{
144
+ missing: "missing";
145
+ "no-assistant-output": "no-assistant-output";
146
+ unreadable: "unreadable";
147
+ unsupported: "unsupported";
148
+ unverified: "unverified";
149
+ }>;
150
+ detail: z.ZodOptional<z.ZodString>;
151
+ }, z.core.$strict>, z.ZodObject<{
152
+ state: z.ZodLiteral<"deleted">;
153
+ reason: z.ZodLiteral<"missing">;
154
+ }, z.core.$strict>], "state">;
155
+ export type TaskResultDiff = z.infer<typeof taskResultDiffSchema>;
156
+ export declare const taskResultArtifactItemSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
157
+ id: z.ZodString;
158
+ kind: z.ZodEnum<{
159
+ attachment: "attachment";
160
+ published: "published";
161
+ }>;
162
+ name: z.ZodOptional<z.ZodString>;
163
+ size: z.ZodOptional<z.ZodNumber>;
164
+ state: z.ZodLiteral<"available">;
165
+ }, z.core.$strict>, z.ZodObject<{
166
+ state: z.ZodLiteral<"unavailable">;
167
+ reason: z.ZodEnum<{
168
+ missing: "missing";
169
+ "no-assistant-output": "no-assistant-output";
170
+ unreadable: "unreadable";
171
+ unsupported: "unsupported";
172
+ unverified: "unverified";
173
+ }>;
174
+ detail: z.ZodOptional<z.ZodString>;
175
+ id: z.ZodString;
176
+ kind: z.ZodEnum<{
177
+ attachment: "attachment";
178
+ published: "published";
179
+ }>;
180
+ name: z.ZodOptional<z.ZodString>;
181
+ size: z.ZodOptional<z.ZodNumber>;
182
+ }, z.core.$strict>, z.ZodObject<{
183
+ state: z.ZodLiteral<"deleted">;
184
+ reason: z.ZodLiteral<"missing">;
185
+ id: z.ZodString;
186
+ kind: z.ZodEnum<{
187
+ attachment: "attachment";
188
+ published: "published";
189
+ }>;
190
+ name: z.ZodOptional<z.ZodString>;
191
+ size: z.ZodOptional<z.ZodNumber>;
192
+ }, z.core.$strict>], "state">;
193
+ export type TaskResultArtifactItem = z.infer<typeof taskResultArtifactItemSchema>;
194
+ export declare const taskResultArtifactsSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
195
+ state: z.ZodLiteral<"available">;
196
+ items: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
197
+ id: z.ZodString;
198
+ kind: z.ZodEnum<{
199
+ attachment: "attachment";
200
+ published: "published";
201
+ }>;
202
+ name: z.ZodOptional<z.ZodString>;
203
+ size: z.ZodOptional<z.ZodNumber>;
204
+ state: z.ZodLiteral<"available">;
205
+ }, z.core.$strict>, z.ZodObject<{
206
+ state: z.ZodLiteral<"unavailable">;
207
+ reason: z.ZodEnum<{
208
+ missing: "missing";
209
+ "no-assistant-output": "no-assistant-output";
210
+ unreadable: "unreadable";
211
+ unsupported: "unsupported";
212
+ unverified: "unverified";
213
+ }>;
214
+ detail: z.ZodOptional<z.ZodString>;
215
+ id: z.ZodString;
216
+ kind: z.ZodEnum<{
217
+ attachment: "attachment";
218
+ published: "published";
219
+ }>;
220
+ name: z.ZodOptional<z.ZodString>;
221
+ size: z.ZodOptional<z.ZodNumber>;
222
+ }, z.core.$strict>, z.ZodObject<{
223
+ state: z.ZodLiteral<"deleted">;
224
+ reason: z.ZodLiteral<"missing">;
225
+ id: z.ZodString;
226
+ kind: z.ZodEnum<{
227
+ attachment: "attachment";
228
+ published: "published";
229
+ }>;
230
+ name: z.ZodOptional<z.ZodString>;
231
+ size: z.ZodOptional<z.ZodNumber>;
232
+ }, z.core.$strict>], "state">>;
233
+ truncated: z.ZodBoolean;
234
+ }, z.core.$strict>, z.ZodObject<{
235
+ state: z.ZodLiteral<"unavailable">;
236
+ reason: z.ZodEnum<{
237
+ missing: "missing";
238
+ "no-assistant-output": "no-assistant-output";
239
+ unreadable: "unreadable";
240
+ unsupported: "unsupported";
241
+ unverified: "unverified";
242
+ }>;
243
+ detail: z.ZodOptional<z.ZodString>;
244
+ }, z.core.$strict>, z.ZodObject<{
245
+ state: z.ZodLiteral<"deleted">;
246
+ reason: z.ZodLiteral<"missing">;
247
+ }, z.core.$strict>], "state">;
248
+ export type TaskResultArtifacts = z.infer<typeof taskResultArtifactsSchema>;
249
+ /** Public host-path-free wire shape for the operator task-result read (`GET /runs/:id/result` and MCP `task_result` in S3). */
250
+ export declare const taskResultSchema: z.ZodObject<{
251
+ taskId: z.ZodString;
252
+ revision: z.ZodNumber;
253
+ observedAt: z.ZodISODateTime;
254
+ status: z.ZodEnum<{
255
+ cancelled: "cancelled";
256
+ done: "done";
257
+ failed: "failed";
258
+ queued: "queued";
259
+ review: "review";
260
+ running: "running";
261
+ waiting: "waiting";
262
+ }>;
263
+ outcome: z.ZodEnum<{
264
+ cancelled: "cancelled";
265
+ completed: "completed";
266
+ destroyed: "destroyed";
267
+ failed: "failed";
268
+ "review-ready": "review-ready";
269
+ running: "running";
270
+ }>;
271
+ lastExecutionOutcome: z.ZodEnum<{
272
+ cancelled: "cancelled";
273
+ completed: "completed";
274
+ failed: "failed";
275
+ "review-ready": "review-ready";
276
+ running: "running";
277
+ }>;
278
+ settled: z.ZodBoolean;
279
+ partial: z.ZodBoolean;
280
+ error: z.ZodOptional<z.ZodString>;
281
+ runner: z.ZodOptional<z.ZodString>;
282
+ model: z.ZodOptional<z.ZodString>;
283
+ baselineSha: z.ZodOptional<z.ZodString>;
284
+ head: z.ZodDiscriminatedUnion<[z.ZodObject<{
285
+ state: z.ZodLiteral<"available">;
286
+ sha: z.ZodString;
287
+ }, z.core.$strict>, z.ZodObject<{
288
+ state: z.ZodLiteral<"unavailable">;
289
+ reason: z.ZodEnum<{
290
+ missing: "missing";
291
+ "no-assistant-output": "no-assistant-output";
292
+ unreadable: "unreadable";
293
+ unsupported: "unsupported";
294
+ unverified: "unverified";
295
+ }>;
296
+ detail: z.ZodOptional<z.ZodString>;
297
+ sha: z.ZodOptional<z.ZodString>;
298
+ }, z.core.$strict>, z.ZodObject<{
299
+ state: z.ZodLiteral<"deleted">;
300
+ reason: z.ZodLiteral<"missing">;
301
+ sha: z.ZodOptional<z.ZodString>;
302
+ }, z.core.$strict>], "state">;
303
+ changes: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
304
+ state: z.ZodLiteral<"unchanged">;
305
+ }, z.core.$strict>, z.ZodObject<{
306
+ state: z.ZodLiteral<"changed">;
307
+ paths: z.ZodArray<z.ZodString>;
308
+ truncated: z.ZodBoolean;
309
+ headMoved: z.ZodBoolean;
310
+ branchMoved: z.ZodBoolean;
311
+ indexMoved: z.ZodBoolean;
312
+ }, z.core.$strict>, z.ZodObject<{
313
+ state: z.ZodLiteral<"unavailable">;
314
+ reason: z.ZodString;
315
+ }, z.core.$strict>], "state">>;
316
+ parentRunId: z.ZodOptional<z.ZodUUID>;
317
+ cleanup: z.ZodOptional<z.ZodEnum<{
318
+ cleaning: "cleaning";
319
+ complete: "complete";
320
+ incomplete: "incomplete";
321
+ requested: "requested";
322
+ retained: "retained";
323
+ terminating: "terminating";
324
+ }>>;
325
+ source: z.ZodEnum<{
326
+ live: "live";
327
+ stored: "stored";
328
+ }>;
329
+ workspace: z.ZodObject<{
330
+ kind: z.ZodEnum<{
331
+ owned: "owned";
332
+ project: "project";
333
+ shared: "shared";
334
+ }>;
335
+ state: z.ZodEnum<{
336
+ available: "available";
337
+ deleted: "deleted";
338
+ unavailable: "unavailable";
339
+ }>;
340
+ branch: z.ZodOptional<z.ZodString>;
341
+ baselineSha: z.ZodOptional<z.ZodString>;
342
+ hostRunId: z.ZodOptional<z.ZodUUID>;
343
+ }, z.core.$strict>;
344
+ summary: z.ZodDiscriminatedUnion<[z.ZodObject<{
345
+ state: z.ZodLiteral<"available">;
346
+ text: z.ZodString;
347
+ source: z.ZodEnum<{
348
+ assistant: "assistant";
349
+ failure: "failure";
350
+ }>;
351
+ seq: z.ZodNumber;
352
+ truncated: z.ZodBoolean;
353
+ totalLines: z.ZodNumber;
354
+ }, z.core.$strict>, z.ZodObject<{
355
+ state: z.ZodLiteral<"unavailable">;
356
+ reason: z.ZodEnum<{
357
+ missing: "missing";
358
+ "no-assistant-output": "no-assistant-output";
359
+ unreadable: "unreadable";
360
+ unsupported: "unsupported";
361
+ unverified: "unverified";
362
+ }>;
363
+ detail: z.ZodOptional<z.ZodString>;
364
+ }, z.core.$strict>, z.ZodObject<{
365
+ state: z.ZodLiteral<"deleted">;
366
+ reason: z.ZodLiteral<"missing">;
367
+ }, z.core.$strict>], "state">;
368
+ diff: z.ZodDiscriminatedUnion<[z.ZodObject<{
369
+ state: z.ZodLiteral<"available">;
370
+ truncated: z.ZodBoolean;
371
+ bytes: z.ZodNumber;
372
+ patch: z.ZodOptional<z.ZodString>;
373
+ patchTruncated: z.ZodOptional<z.ZodBoolean>;
374
+ }, z.core.$strict>, z.ZodObject<{
375
+ state: z.ZodLiteral<"unavailable">;
376
+ reason: z.ZodEnum<{
377
+ missing: "missing";
378
+ "no-assistant-output": "no-assistant-output";
379
+ unreadable: "unreadable";
380
+ unsupported: "unsupported";
381
+ unverified: "unverified";
382
+ }>;
383
+ detail: z.ZodOptional<z.ZodString>;
384
+ }, z.core.$strict>, z.ZodObject<{
385
+ state: z.ZodLiteral<"deleted">;
386
+ reason: z.ZodLiteral<"missing">;
387
+ }, z.core.$strict>], "state">;
388
+ artifacts: z.ZodDiscriminatedUnion<[z.ZodObject<{
389
+ state: z.ZodLiteral<"available">;
390
+ items: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
391
+ id: z.ZodString;
392
+ kind: z.ZodEnum<{
393
+ attachment: "attachment";
394
+ published: "published";
395
+ }>;
396
+ name: z.ZodOptional<z.ZodString>;
397
+ size: z.ZodOptional<z.ZodNumber>;
398
+ state: z.ZodLiteral<"available">;
399
+ }, z.core.$strict>, z.ZodObject<{
400
+ state: z.ZodLiteral<"unavailable">;
401
+ reason: z.ZodEnum<{
402
+ missing: "missing";
403
+ "no-assistant-output": "no-assistant-output";
404
+ unreadable: "unreadable";
405
+ unsupported: "unsupported";
406
+ unverified: "unverified";
407
+ }>;
408
+ detail: z.ZodOptional<z.ZodString>;
409
+ id: z.ZodString;
410
+ kind: z.ZodEnum<{
411
+ attachment: "attachment";
412
+ published: "published";
413
+ }>;
414
+ name: z.ZodOptional<z.ZodString>;
415
+ size: z.ZodOptional<z.ZodNumber>;
416
+ }, z.core.$strict>, z.ZodObject<{
417
+ state: z.ZodLiteral<"deleted">;
418
+ reason: z.ZodLiteral<"missing">;
419
+ id: z.ZodString;
420
+ kind: z.ZodEnum<{
421
+ attachment: "attachment";
422
+ published: "published";
423
+ }>;
424
+ name: z.ZodOptional<z.ZodString>;
425
+ size: z.ZodOptional<z.ZodNumber>;
426
+ }, z.core.$strict>], "state">>;
427
+ truncated: z.ZodBoolean;
428
+ }, z.core.$strict>, z.ZodObject<{
429
+ state: z.ZodLiteral<"unavailable">;
430
+ reason: z.ZodEnum<{
431
+ missing: "missing";
432
+ "no-assistant-output": "no-assistant-output";
433
+ unreadable: "unreadable";
434
+ unsupported: "unsupported";
435
+ unverified: "unverified";
436
+ }>;
437
+ detail: z.ZodOptional<z.ZodString>;
438
+ }, z.core.$strict>, z.ZodObject<{
439
+ state: z.ZodLiteral<"deleted">;
440
+ reason: z.ZodLiteral<"missing">;
441
+ }, z.core.$strict>], "state">;
442
+ }, z.core.$strict>;
443
+ export type TaskResult = z.infer<typeof taskResultSchema>;
444
+ export declare const storedTaskResultArtifactItemSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
445
+ id: z.ZodString;
446
+ kind: z.ZodEnum<{
447
+ attachment: "attachment";
448
+ published: "published";
449
+ }>;
450
+ name: z.ZodOptional<z.ZodString>;
451
+ size: z.ZodOptional<z.ZodNumber>;
452
+ path: z.ZodOptional<z.ZodString>;
453
+ state: z.ZodLiteral<"available">;
454
+ }, z.core.$strict>, z.ZodObject<{
455
+ state: z.ZodLiteral<"unavailable">;
456
+ reason: z.ZodEnum<{
457
+ missing: "missing";
458
+ "no-assistant-output": "no-assistant-output";
459
+ unreadable: "unreadable";
460
+ unsupported: "unsupported";
461
+ unverified: "unverified";
462
+ }>;
463
+ detail: z.ZodOptional<z.ZodString>;
464
+ id: z.ZodString;
465
+ kind: z.ZodEnum<{
466
+ attachment: "attachment";
467
+ published: "published";
468
+ }>;
469
+ name: z.ZodOptional<z.ZodString>;
470
+ size: z.ZodOptional<z.ZodNumber>;
471
+ path: z.ZodOptional<z.ZodString>;
472
+ }, z.core.$strict>, z.ZodObject<{
473
+ state: z.ZodLiteral<"deleted">;
474
+ reason: z.ZodLiteral<"missing">;
475
+ id: z.ZodString;
476
+ kind: z.ZodEnum<{
477
+ attachment: "attachment";
478
+ published: "published";
479
+ }>;
480
+ name: z.ZodOptional<z.ZodString>;
481
+ size: z.ZodOptional<z.ZodNumber>;
482
+ path: z.ZodOptional<z.ZodString>;
483
+ }, z.core.$strict>], "state">;
484
+ export type StoredTaskResultArtifactItem = z.infer<typeof storedTaskResultArtifactItemSchema>;
485
+ /** Internal stored task snapshot (may retain host paths for rebinding and project migration). */
486
+ export declare const storedTaskResultSchema: z.ZodObject<{
487
+ taskId: z.ZodString;
488
+ revision: z.ZodNumber;
489
+ observedAt: z.ZodISODateTime;
490
+ status: z.ZodEnum<{
491
+ cancelled: "cancelled";
492
+ done: "done";
493
+ failed: "failed";
494
+ queued: "queued";
495
+ review: "review";
496
+ running: "running";
497
+ waiting: "waiting";
498
+ }>;
499
+ outcome: z.ZodEnum<{
500
+ cancelled: "cancelled";
501
+ completed: "completed";
502
+ destroyed: "destroyed";
503
+ failed: "failed";
504
+ "review-ready": "review-ready";
505
+ running: "running";
506
+ }>;
507
+ lastExecutionOutcome: z.ZodEnum<{
508
+ cancelled: "cancelled";
509
+ completed: "completed";
510
+ failed: "failed";
511
+ "review-ready": "review-ready";
512
+ running: "running";
513
+ }>;
514
+ settled: z.ZodBoolean;
515
+ partial: z.ZodBoolean;
516
+ error: z.ZodOptional<z.ZodString>;
517
+ runner: z.ZodOptional<z.ZodString>;
518
+ model: z.ZodOptional<z.ZodString>;
519
+ baselineSha: z.ZodOptional<z.ZodString>;
520
+ head: z.ZodDiscriminatedUnion<[z.ZodObject<{
521
+ state: z.ZodLiteral<"available">;
522
+ sha: z.ZodString;
523
+ }, z.core.$strict>, z.ZodObject<{
524
+ state: z.ZodLiteral<"unavailable">;
525
+ reason: z.ZodEnum<{
526
+ missing: "missing";
527
+ "no-assistant-output": "no-assistant-output";
528
+ unreadable: "unreadable";
529
+ unsupported: "unsupported";
530
+ unverified: "unverified";
531
+ }>;
532
+ detail: z.ZodOptional<z.ZodString>;
533
+ sha: z.ZodOptional<z.ZodString>;
534
+ }, z.core.$strict>, z.ZodObject<{
535
+ state: z.ZodLiteral<"deleted">;
536
+ reason: z.ZodLiteral<"missing">;
537
+ sha: z.ZodOptional<z.ZodString>;
538
+ }, z.core.$strict>], "state">;
539
+ changes: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
540
+ state: z.ZodLiteral<"unchanged">;
541
+ }, z.core.$strict>, z.ZodObject<{
542
+ state: z.ZodLiteral<"changed">;
543
+ paths: z.ZodArray<z.ZodString>;
544
+ truncated: z.ZodBoolean;
545
+ headMoved: z.ZodBoolean;
546
+ branchMoved: z.ZodBoolean;
547
+ indexMoved: z.ZodBoolean;
548
+ }, z.core.$strict>, z.ZodObject<{
549
+ state: z.ZodLiteral<"unavailable">;
550
+ reason: z.ZodString;
551
+ }, z.core.$strict>], "state">>;
552
+ parentRunId: z.ZodOptional<z.ZodUUID>;
553
+ cleanup: z.ZodOptional<z.ZodEnum<{
554
+ cleaning: "cleaning";
555
+ complete: "complete";
556
+ incomplete: "incomplete";
557
+ requested: "requested";
558
+ retained: "retained";
559
+ terminating: "terminating";
560
+ }>>;
561
+ workspace: z.ZodObject<{
562
+ kind: z.ZodEnum<{
563
+ owned: "owned";
564
+ project: "project";
565
+ shared: "shared";
566
+ }>;
567
+ state: z.ZodEnum<{
568
+ available: "available";
569
+ deleted: "deleted";
570
+ unavailable: "unavailable";
571
+ }>;
572
+ branch: z.ZodOptional<z.ZodString>;
573
+ baselineSha: z.ZodOptional<z.ZodString>;
574
+ hostRunId: z.ZodOptional<z.ZodUUID>;
575
+ path: z.ZodOptional<z.ZodString>;
576
+ }, z.core.$strict>;
577
+ summary: z.ZodDiscriminatedUnion<[z.ZodObject<{
578
+ state: z.ZodLiteral<"available">;
579
+ text: z.ZodString;
580
+ source: z.ZodEnum<{
581
+ assistant: "assistant";
582
+ failure: "failure";
583
+ }>;
584
+ seq: z.ZodNumber;
585
+ truncated: z.ZodBoolean;
586
+ totalLines: z.ZodOptional<z.ZodNumber>;
587
+ }, z.core.$strict>, z.ZodObject<{
588
+ state: z.ZodLiteral<"unavailable">;
589
+ reason: z.ZodEnum<{
590
+ missing: "missing";
591
+ "no-assistant-output": "no-assistant-output";
592
+ unreadable: "unreadable";
593
+ unsupported: "unsupported";
594
+ unverified: "unverified";
595
+ }>;
596
+ detail: z.ZodOptional<z.ZodString>;
597
+ }, z.core.$strict>, z.ZodObject<{
598
+ state: z.ZodLiteral<"deleted">;
599
+ reason: z.ZodLiteral<"missing">;
600
+ }, z.core.$strict>], "state">;
601
+ diff: z.ZodDiscriminatedUnion<[z.ZodObject<{
602
+ state: z.ZodLiteral<"available">;
603
+ snapshotId: z.ZodUUID;
604
+ path: z.ZodOptional<z.ZodString>;
605
+ truncated: z.ZodBoolean;
606
+ bytes: z.ZodOptional<z.ZodNumber>;
607
+ }, z.core.$strict>, z.ZodObject<{
608
+ state: z.ZodLiteral<"unavailable">;
609
+ reason: z.ZodEnum<{
610
+ missing: "missing";
611
+ "no-assistant-output": "no-assistant-output";
612
+ unreadable: "unreadable";
613
+ unsupported: "unsupported";
614
+ unverified: "unverified";
615
+ }>;
616
+ detail: z.ZodOptional<z.ZodString>;
617
+ }, z.core.$strict>, z.ZodObject<{
618
+ state: z.ZodLiteral<"deleted">;
619
+ reason: z.ZodLiteral<"missing">;
620
+ }, z.core.$strict>], "state">;
621
+ artifacts: z.ZodDiscriminatedUnion<[z.ZodObject<{
622
+ state: z.ZodLiteral<"available">;
623
+ items: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
624
+ id: z.ZodString;
625
+ kind: z.ZodEnum<{
626
+ attachment: "attachment";
627
+ published: "published";
628
+ }>;
629
+ name: z.ZodOptional<z.ZodString>;
630
+ size: z.ZodOptional<z.ZodNumber>;
631
+ path: z.ZodOptional<z.ZodString>;
632
+ state: z.ZodLiteral<"available">;
633
+ }, z.core.$strict>, z.ZodObject<{
634
+ state: z.ZodLiteral<"unavailable">;
635
+ reason: z.ZodEnum<{
636
+ missing: "missing";
637
+ "no-assistant-output": "no-assistant-output";
638
+ unreadable: "unreadable";
639
+ unsupported: "unsupported";
640
+ unverified: "unverified";
641
+ }>;
642
+ detail: z.ZodOptional<z.ZodString>;
643
+ id: z.ZodString;
644
+ kind: z.ZodEnum<{
645
+ attachment: "attachment";
646
+ published: "published";
647
+ }>;
648
+ name: z.ZodOptional<z.ZodString>;
649
+ size: z.ZodOptional<z.ZodNumber>;
650
+ path: z.ZodOptional<z.ZodString>;
651
+ }, z.core.$strict>, z.ZodObject<{
652
+ state: z.ZodLiteral<"deleted">;
653
+ reason: z.ZodLiteral<"missing">;
654
+ id: z.ZodString;
655
+ kind: z.ZodEnum<{
656
+ attachment: "attachment";
657
+ published: "published";
658
+ }>;
659
+ name: z.ZodOptional<z.ZodString>;
660
+ size: z.ZodOptional<z.ZodNumber>;
661
+ path: z.ZodOptional<z.ZodString>;
662
+ }, z.core.$strict>], "state">>;
663
+ truncated: z.ZodBoolean;
664
+ }, z.core.$strict>, z.ZodObject<{
665
+ state: z.ZodLiteral<"unavailable">;
666
+ reason: z.ZodEnum<{
667
+ missing: "missing";
668
+ "no-assistant-output": "no-assistant-output";
669
+ unreadable: "unreadable";
670
+ unsupported: "unsupported";
671
+ unverified: "unverified";
672
+ }>;
673
+ detail: z.ZodOptional<z.ZodString>;
674
+ }, z.core.$strict>, z.ZodObject<{
675
+ state: z.ZodLiteral<"deleted">;
676
+ reason: z.ZodLiteral<"missing">;
677
+ }, z.core.$strict>], "state">;
678
+ }, z.core.$strict>;
679
+ export type StoredTaskResult = z.infer<typeof storedTaskResultSchema>;
680
+ /**
681
+ * On-disk snapshot document under `runs/<runId>-results/<snapshotId>.json`.
682
+ * Accepts both generic task snapshots and worker snapshots (`workerResultFileSchema`).
683
+ */
684
+ export declare const taskResultFileSchema: z.ZodUnion<readonly [z.ZodObject<{
685
+ result: z.ZodObject<{
686
+ taskId: z.ZodString;
687
+ revision: z.ZodNumber;
688
+ observedAt: z.ZodISODateTime;
689
+ status: z.ZodEnum<{
690
+ cancelled: "cancelled";
691
+ done: "done";
692
+ failed: "failed";
693
+ queued: "queued";
694
+ review: "review";
695
+ running: "running";
696
+ waiting: "waiting";
697
+ }>;
698
+ outcome: z.ZodEnum<{
699
+ cancelled: "cancelled";
700
+ completed: "completed";
701
+ destroyed: "destroyed";
702
+ failed: "failed";
703
+ "review-ready": "review-ready";
704
+ running: "running";
705
+ }>;
706
+ lastExecutionOutcome: z.ZodEnum<{
707
+ cancelled: "cancelled";
708
+ completed: "completed";
709
+ failed: "failed";
710
+ "review-ready": "review-ready";
711
+ running: "running";
712
+ }>;
713
+ settled: z.ZodBoolean;
714
+ partial: z.ZodBoolean;
715
+ error: z.ZodOptional<z.ZodString>;
716
+ runner: z.ZodOptional<z.ZodString>;
717
+ model: z.ZodOptional<z.ZodString>;
718
+ baselineSha: z.ZodOptional<z.ZodString>;
719
+ head: z.ZodDiscriminatedUnion<[z.ZodObject<{
720
+ state: z.ZodLiteral<"available">;
721
+ sha: z.ZodString;
722
+ }, z.core.$strict>, z.ZodObject<{
723
+ state: z.ZodLiteral<"unavailable">;
724
+ reason: z.ZodEnum<{
725
+ missing: "missing";
726
+ "no-assistant-output": "no-assistant-output";
727
+ unreadable: "unreadable";
728
+ unsupported: "unsupported";
729
+ unverified: "unverified";
730
+ }>;
731
+ detail: z.ZodOptional<z.ZodString>;
732
+ sha: z.ZodOptional<z.ZodString>;
733
+ }, z.core.$strict>, z.ZodObject<{
734
+ state: z.ZodLiteral<"deleted">;
735
+ reason: z.ZodLiteral<"missing">;
736
+ sha: z.ZodOptional<z.ZodString>;
737
+ }, z.core.$strict>], "state">;
738
+ changes: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
739
+ state: z.ZodLiteral<"unchanged">;
740
+ }, z.core.$strict>, z.ZodObject<{
741
+ state: z.ZodLiteral<"changed">;
742
+ paths: z.ZodArray<z.ZodString>;
743
+ truncated: z.ZodBoolean;
744
+ headMoved: z.ZodBoolean;
745
+ branchMoved: z.ZodBoolean;
746
+ indexMoved: z.ZodBoolean;
747
+ }, z.core.$strict>, z.ZodObject<{
748
+ state: z.ZodLiteral<"unavailable">;
749
+ reason: z.ZodString;
750
+ }, z.core.$strict>], "state">>;
751
+ parentRunId: z.ZodOptional<z.ZodUUID>;
752
+ cleanup: z.ZodOptional<z.ZodEnum<{
753
+ cleaning: "cleaning";
754
+ complete: "complete";
755
+ incomplete: "incomplete";
756
+ requested: "requested";
757
+ retained: "retained";
758
+ terminating: "terminating";
759
+ }>>;
760
+ workspace: z.ZodObject<{
761
+ kind: z.ZodEnum<{
762
+ owned: "owned";
763
+ project: "project";
764
+ shared: "shared";
765
+ }>;
766
+ state: z.ZodEnum<{
767
+ available: "available";
768
+ deleted: "deleted";
769
+ unavailable: "unavailable";
770
+ }>;
771
+ branch: z.ZodOptional<z.ZodString>;
772
+ baselineSha: z.ZodOptional<z.ZodString>;
773
+ hostRunId: z.ZodOptional<z.ZodUUID>;
774
+ path: z.ZodOptional<z.ZodString>;
775
+ }, z.core.$strict>;
776
+ summary: z.ZodDiscriminatedUnion<[z.ZodObject<{
777
+ state: z.ZodLiteral<"available">;
778
+ text: z.ZodString;
779
+ source: z.ZodEnum<{
780
+ assistant: "assistant";
781
+ failure: "failure";
782
+ }>;
783
+ seq: z.ZodNumber;
784
+ truncated: z.ZodBoolean;
785
+ totalLines: z.ZodOptional<z.ZodNumber>;
786
+ }, z.core.$strict>, z.ZodObject<{
787
+ state: z.ZodLiteral<"unavailable">;
788
+ reason: z.ZodEnum<{
789
+ missing: "missing";
790
+ "no-assistant-output": "no-assistant-output";
791
+ unreadable: "unreadable";
792
+ unsupported: "unsupported";
793
+ unverified: "unverified";
794
+ }>;
795
+ detail: z.ZodOptional<z.ZodString>;
796
+ }, z.core.$strict>, z.ZodObject<{
797
+ state: z.ZodLiteral<"deleted">;
798
+ reason: z.ZodLiteral<"missing">;
799
+ }, z.core.$strict>], "state">;
800
+ diff: z.ZodDiscriminatedUnion<[z.ZodObject<{
801
+ state: z.ZodLiteral<"available">;
802
+ snapshotId: z.ZodUUID;
803
+ path: z.ZodOptional<z.ZodString>;
804
+ truncated: z.ZodBoolean;
805
+ bytes: z.ZodOptional<z.ZodNumber>;
806
+ }, z.core.$strict>, z.ZodObject<{
807
+ state: z.ZodLiteral<"unavailable">;
808
+ reason: z.ZodEnum<{
809
+ missing: "missing";
810
+ "no-assistant-output": "no-assistant-output";
811
+ unreadable: "unreadable";
812
+ unsupported: "unsupported";
813
+ unverified: "unverified";
814
+ }>;
815
+ detail: z.ZodOptional<z.ZodString>;
816
+ }, z.core.$strict>, z.ZodObject<{
817
+ state: z.ZodLiteral<"deleted">;
818
+ reason: z.ZodLiteral<"missing">;
819
+ }, z.core.$strict>], "state">;
820
+ artifacts: z.ZodDiscriminatedUnion<[z.ZodObject<{
821
+ state: z.ZodLiteral<"available">;
822
+ items: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
823
+ id: z.ZodString;
824
+ kind: z.ZodEnum<{
825
+ attachment: "attachment";
826
+ published: "published";
827
+ }>;
828
+ name: z.ZodOptional<z.ZodString>;
829
+ size: z.ZodOptional<z.ZodNumber>;
830
+ path: z.ZodOptional<z.ZodString>;
831
+ state: z.ZodLiteral<"available">;
832
+ }, z.core.$strict>, z.ZodObject<{
833
+ state: z.ZodLiteral<"unavailable">;
834
+ reason: z.ZodEnum<{
835
+ missing: "missing";
836
+ "no-assistant-output": "no-assistant-output";
837
+ unreadable: "unreadable";
838
+ unsupported: "unsupported";
839
+ unverified: "unverified";
840
+ }>;
841
+ detail: z.ZodOptional<z.ZodString>;
842
+ id: z.ZodString;
843
+ kind: z.ZodEnum<{
844
+ attachment: "attachment";
845
+ published: "published";
846
+ }>;
847
+ name: z.ZodOptional<z.ZodString>;
848
+ size: z.ZodOptional<z.ZodNumber>;
849
+ path: z.ZodOptional<z.ZodString>;
850
+ }, z.core.$strict>, z.ZodObject<{
851
+ state: z.ZodLiteral<"deleted">;
852
+ reason: z.ZodLiteral<"missing">;
853
+ id: z.ZodString;
854
+ kind: z.ZodEnum<{
855
+ attachment: "attachment";
856
+ published: "published";
857
+ }>;
858
+ name: z.ZodOptional<z.ZodString>;
859
+ size: z.ZodOptional<z.ZodNumber>;
860
+ path: z.ZodOptional<z.ZodString>;
861
+ }, z.core.$strict>], "state">>;
862
+ truncated: z.ZodBoolean;
863
+ }, z.core.$strict>, z.ZodObject<{
864
+ state: z.ZodLiteral<"unavailable">;
865
+ reason: z.ZodEnum<{
866
+ missing: "missing";
867
+ "no-assistant-output": "no-assistant-output";
868
+ unreadable: "unreadable";
869
+ unsupported: "unsupported";
870
+ unverified: "unverified";
871
+ }>;
872
+ detail: z.ZodOptional<z.ZodString>;
873
+ }, z.core.$strict>, z.ZodObject<{
874
+ state: z.ZodLiteral<"deleted">;
875
+ reason: z.ZodLiteral<"missing">;
876
+ }, z.core.$strict>], "state">;
877
+ }, z.core.$strict>;
878
+ diffSnapshot: z.ZodOptional<z.ZodString>;
879
+ }, z.core.$strict>, z.ZodObject<{
880
+ result: z.ZodObject<{
881
+ workerId: z.ZodUUID;
882
+ parentRunId: z.ZodUUID;
883
+ revision: z.ZodNumber;
884
+ observedAt: z.ZodISODateTime;
885
+ status: z.ZodEnum<{
886
+ cancelled: "cancelled";
887
+ done: "done";
888
+ failed: "failed";
889
+ queued: "queued";
890
+ review: "review";
891
+ running: "running";
892
+ waiting: "waiting";
893
+ }>;
894
+ outcome: z.ZodEnum<{
895
+ cancelled: "cancelled";
896
+ completed: "completed";
897
+ destroyed: "destroyed";
898
+ failed: "failed";
899
+ "review-ready": "review-ready";
900
+ running: "running";
901
+ }>;
902
+ lastExecutionOutcome: z.ZodEnum<{
903
+ cancelled: "cancelled";
904
+ completed: "completed";
905
+ failed: "failed";
906
+ "review-ready": "review-ready";
907
+ running: "running";
908
+ }>;
909
+ partial: z.ZodBoolean;
910
+ settled: z.ZodBoolean;
911
+ error: z.ZodOptional<z.ZodString>;
912
+ backend: z.ZodOptional<z.ZodString>;
913
+ model: z.ZodOptional<z.ZodString>;
914
+ baselineSha: z.ZodString;
915
+ workspace: z.ZodDiscriminatedUnion<[z.ZodObject<{
916
+ ownerRunId: z.ZodUUID;
917
+ resourceId: z.ZodUUID;
918
+ kind: z.ZodLiteral<"owned-isolated">;
919
+ path: z.ZodString;
920
+ branch: z.ZodString;
921
+ baselineSha: z.ZodString;
922
+ state: z.ZodOptional<z.ZodEnum<{
923
+ available: "available";
924
+ deleted: "deleted";
925
+ unavailable: "unavailable";
926
+ }>>;
927
+ }, z.core.$strict>, z.ZodObject<{
928
+ ownerRunId: z.ZodUUID;
929
+ resourceId: z.ZodUUID;
930
+ kind: z.ZodLiteral<"shared">;
931
+ path: z.ZodString;
932
+ hostRunId: z.ZodUUID;
933
+ baselineSha: z.ZodString;
934
+ state: z.ZodOptional<z.ZodEnum<{
935
+ available: "available";
936
+ deleted: "deleted";
937
+ unavailable: "unavailable";
938
+ }>>;
939
+ }, z.core.$strict>], "kind">;
940
+ cleanup: z.ZodEnum<{
941
+ cleaning: "cleaning";
942
+ complete: "complete";
943
+ incomplete: "incomplete";
944
+ requested: "requested";
945
+ retained: "retained";
946
+ terminating: "terminating";
947
+ }>;
948
+ summary: z.ZodDiscriminatedUnion<[z.ZodObject<{
949
+ state: z.ZodLiteral<"available">;
950
+ text: z.ZodString;
951
+ source: z.ZodEnum<{
952
+ assistant: "assistant";
953
+ failure: "failure";
954
+ }>;
955
+ seq: z.ZodNumber;
956
+ truncated: z.ZodBoolean;
957
+ totalLines: z.ZodOptional<z.ZodNumber>;
958
+ fullCommand: z.ZodOptional<z.ZodString>;
959
+ }, z.core.$strict>, z.ZodObject<{
960
+ state: z.ZodLiteral<"unavailable">;
961
+ reason: z.ZodEnum<{
962
+ missing: "missing";
963
+ "no-assistant-output": "no-assistant-output";
964
+ unreadable: "unreadable";
965
+ unsupported: "unsupported";
966
+ unverified: "unverified";
967
+ }>;
968
+ detail: z.ZodOptional<z.ZodString>;
969
+ }, z.core.$strict>, z.ZodObject<{
970
+ state: z.ZodLiteral<"deleted">;
971
+ reason: z.ZodLiteral<"missing">;
972
+ }, z.core.$strict>], "state">;
973
+ head: z.ZodDiscriminatedUnion<[z.ZodObject<{
974
+ state: z.ZodLiteral<"available">;
975
+ sha: z.ZodString;
976
+ }, z.core.$strict>, z.ZodObject<{
977
+ state: z.ZodLiteral<"unavailable">;
978
+ reason: z.ZodEnum<{
979
+ missing: "missing";
980
+ "no-assistant-output": "no-assistant-output";
981
+ unreadable: "unreadable";
982
+ unsupported: "unsupported";
983
+ unverified: "unverified";
984
+ }>;
985
+ detail: z.ZodOptional<z.ZodString>;
986
+ sha: z.ZodOptional<z.ZodString>;
987
+ }, z.core.$strict>, z.ZodObject<{
988
+ state: z.ZodLiteral<"deleted">;
989
+ reason: z.ZodLiteral<"missing">;
990
+ sha: z.ZodOptional<z.ZodString>;
991
+ }, z.core.$strict>], "state">;
992
+ diff: z.ZodDiscriminatedUnion<[z.ZodObject<{
993
+ state: z.ZodLiteral<"available">;
994
+ snapshotId: z.ZodUUID;
995
+ path: z.ZodString;
996
+ truncated: z.ZodBoolean;
997
+ }, z.core.$strict>, z.ZodObject<{
998
+ state: z.ZodLiteral<"unavailable">;
999
+ reason: z.ZodEnum<{
1000
+ missing: "missing";
1001
+ "no-assistant-output": "no-assistant-output";
1002
+ unreadable: "unreadable";
1003
+ unsupported: "unsupported";
1004
+ unverified: "unverified";
1005
+ }>;
1006
+ detail: z.ZodOptional<z.ZodString>;
1007
+ }, z.core.$strict>, z.ZodObject<{
1008
+ state: z.ZodLiteral<"deleted">;
1009
+ reason: z.ZodLiteral<"missing">;
1010
+ }, z.core.$strict>], "state">;
1011
+ changes: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
1012
+ state: z.ZodLiteral<"unchanged">;
1013
+ }, z.core.$strict>, z.ZodObject<{
1014
+ state: z.ZodLiteral<"changed">;
1015
+ paths: z.ZodArray<z.ZodString>;
1016
+ truncated: z.ZodBoolean;
1017
+ headMoved: z.ZodBoolean;
1018
+ branchMoved: z.ZodBoolean;
1019
+ indexMoved: z.ZodBoolean;
1020
+ }, z.core.$strict>, z.ZodObject<{
1021
+ state: z.ZodLiteral<"unavailable">;
1022
+ reason: z.ZodString;
1023
+ }, z.core.$strict>], "state">>;
1024
+ artifacts: z.ZodDiscriminatedUnion<[z.ZodObject<{
1025
+ state: z.ZodLiteral<"available">;
1026
+ items: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
1027
+ state: z.ZodLiteral<"available">;
1028
+ id: z.ZodString;
1029
+ path: z.ZodString;
1030
+ }, z.core.$strict>, z.ZodObject<{
1031
+ state: z.ZodLiteral<"unavailable">;
1032
+ reason: z.ZodEnum<{
1033
+ missing: "missing";
1034
+ "no-assistant-output": "no-assistant-output";
1035
+ unreadable: "unreadable";
1036
+ unsupported: "unsupported";
1037
+ unverified: "unverified";
1038
+ }>;
1039
+ detail: z.ZodOptional<z.ZodString>;
1040
+ id: z.ZodString;
1041
+ path: z.ZodString;
1042
+ }, z.core.$strict>, z.ZodObject<{
1043
+ state: z.ZodLiteral<"deleted">;
1044
+ reason: z.ZodLiteral<"missing">;
1045
+ id: z.ZodString;
1046
+ path: z.ZodString;
1047
+ }, z.core.$strict>], "state">>;
1048
+ truncated: z.ZodBoolean;
1049
+ }, z.core.$strict>, z.ZodObject<{
1050
+ state: z.ZodLiteral<"unavailable">;
1051
+ reason: z.ZodEnum<{
1052
+ missing: "missing";
1053
+ "no-assistant-output": "no-assistant-output";
1054
+ unreadable: "unreadable";
1055
+ unsupported: "unsupported";
1056
+ unverified: "unverified";
1057
+ }>;
1058
+ detail: z.ZodOptional<z.ZodString>;
1059
+ }, z.core.$strict>, z.ZodObject<{
1060
+ state: z.ZodLiteral<"deleted">;
1061
+ reason: z.ZodLiteral<"missing">;
1062
+ }, z.core.$strict>], "state">;
1063
+ }, z.core.$strict>;
1064
+ diffSnapshot: z.ZodOptional<z.ZodString>;
1065
+ }, z.core.$strict>]>;
1066
+ export type TaskResultFile = z.infer<typeof taskResultFileSchema>;
1067
+ /** Project a stored worker snapshot into the unified `StoredTaskResult` shape. */
1068
+ export declare function workerResultToStoredTaskResult(worker: WorkerCollectedResult, diffSnapshot?: string): StoredTaskResult;
1069
+ /** Project an internal `StoredTaskResult` into the host-path-free public `TaskResult` wire shape. */
1070
+ export declare function toPublicTaskResult(stored: StoredTaskResult, opts: {
1071
+ source: 'live' | 'stored';
1072
+ diffSnapshot?: string;
1073
+ includeDiff?: boolean;
1074
+ maxChars?: number;
1075
+ }): TaskResult;