jg-agent-hq 0.2.0 → 0.4.0

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 (55) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/README.md +7 -4
  3. package/api/README.md +35 -17
  4. package/dist/actions/live/live.d.ts +4 -1
  5. package/dist/actions/live/live.js +22 -6
  6. package/dist/actions/reads.d.ts +1 -1
  7. package/dist/actions/reads.js +4 -2
  8. package/dist/contracts/actions/types.d.ts +6 -6
  9. package/dist/contracts/actions/types.js +1 -1
  10. package/dist/contracts/browser/index.d.ts +4 -0
  11. package/dist/contracts/browser/index.js +6 -0
  12. package/dist/contracts/browser/types.d.ts +2475 -0
  13. package/dist/contracts/browser/types.js +109 -0
  14. package/dist/contracts/handoffs/types.d.ts +5 -5
  15. package/dist/contracts/index.d.ts +4 -0
  16. package/dist/contracts/index.js +6 -0
  17. package/dist/contracts/plans/types.d.ts +25 -25
  18. package/dist/contracts/plans/types.js +9 -10
  19. package/dist/contracts/types.d.ts +96 -30
  20. package/dist/contracts/types.js +10 -2
  21. package/dist/handoffs/types.d.ts +6 -6
  22. package/dist/plans/admission.d.ts +2 -2
  23. package/dist/plans/admission.js +24 -16
  24. package/dist/plans/authority.d.ts +6 -0
  25. package/dist/plans/authority.js +39 -8
  26. package/dist/plans/finalization.d.ts +1 -1
  27. package/dist/plans/finalization.js +4 -3
  28. package/dist/plans/plans.d.ts +3 -3
  29. package/dist/plans/plans.js +9 -11
  30. package/dist/plans/reconciliation.js +3 -3
  31. package/dist/plans/revisions.d.ts +2 -2
  32. package/dist/plans/revisions.js +21 -3
  33. package/dist/plans/types.d.ts +4 -4
  34. package/dist/providers/claude/control/control.d.ts +1 -1
  35. package/dist/providers/claude/history/types.d.ts +39 -11
  36. package/dist/runtime/browser/browser.d.ts +8 -0
  37. package/dist/runtime/browser/browser.js +55 -0
  38. package/dist/runtime/browser/index.d.ts +1 -0
  39. package/dist/runtime/browser/index.js +2 -0
  40. package/dist/runtime/runtime.js +12 -1
  41. package/dist/runtime/types.d.ts +19 -1
  42. package/dist/store/browser/browser.model.d.ts +24 -0
  43. package/dist/store/browser/browser.model.js +75 -0
  44. package/dist/store/browser/index.d.ts +1 -0
  45. package/dist/store/browser/index.js +2 -0
  46. package/dist/store/control/types.d.ts +6 -6
  47. package/dist/store/plans/plans.model.d.ts +2 -2
  48. package/dist/store/plans/plans.model.js +1 -1
  49. package/dist/store/schema.sql +15 -2
  50. package/dist/store/store.js +4 -1
  51. package/dist/store/store.worker.js +11 -0
  52. package/dist/store/types.d.ts +1545 -510
  53. package/dist/store/types.js +17 -1
  54. package/errors/README.md +11 -1
  55. package/package.json +1 -1
@@ -1,36 +1,137 @@
1
1
  import { z } from 'zod';
2
- import { type IThreadSummary, type IPlanMilestone, type IPlanReconciliationEntry, type IActionReceipt, type IManagedThread, type IActionSummary, type ILifecycleEvent, type IActionPlanContext, type IHandoffFindings, type IHandoffPhase, type IHandoffSummary } from '../contracts/index.js';
2
+ import { type IBrowserAction, type IBrowserReceipt, type IThreadSummary, type IPlanMilestone, type IPlanReconciliationEntry, type IActionReceipt, type IManagedThread, type IActionSummary, type ILifecycleEvent, type IActionPlanContext, type IHandoffFindings, type IHandoffPhase, type IHandoffSummary } from '../contracts/index.js';
3
3
  import { type IHandoffRecord, type IHandoffDispatch, type IHandoffPageRequest } from '../handoffs/index.js';
4
4
  import type { IHistoryRequest } from '../sessions/index.js';
5
5
  import type { IClaudeHistoryRead } from '../providers/claude/history/index.js';
6
6
  import { type IPlanRevisionProjection, type IPlanWriteIntent, type IPlanProjection } from '../plans/index.js';
7
7
  import { type IAdmission, type INativeOutcome, type INativeObservation, type IControlPage, type IEventPage, type IApprovalRecord, type IAdmissionResult, type IDispatch, type IObservationResult } from './control/index.js';
8
8
  export declare const StoreCommandSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
9
- kind: z.ZodLiteral<"handoff-read">;
9
+ kind: z.ZodLiteral<"browser-read">;
10
10
  id: z.ZodUUID;
11
+ operatorId: z.ZodString;
11
12
  }, z.core.$strict>, z.ZodObject<{
12
- kind: z.ZodLiteral<"handoff-prepare">;
13
- record: z.ZodObject<{
13
+ kind: z.ZodLiteral<"browser-admit">;
14
+ action: z.ZodObject<{
14
15
  id: z.ZodUUID;
15
- digest: z.ZodString;
16
- purpose: z.ZodEnum<{
17
- review: "review";
18
- challenge: "challenge";
19
- }>;
20
- source: z.ZodObject<{
21
- threadId: z.ZodUUID;
22
- provider: z.ZodEnum<{
23
- claude: "claude";
24
- codex: "codex";
25
- }>;
26
- nativeId: z.ZodString;
27
- workspaceRoot: z.ZodString;
28
- plan: z.ZodNullable<z.ZodObject<{
29
- directory: z.ZodString;
30
- scope: z.ZodNullable<z.ZodDiscriminatedUnion<[z.ZodObject<{
16
+ runtimeEpoch: z.ZodUUID;
17
+ command: z.ZodDiscriminatedUnion<[z.ZodObject<{
18
+ kind: z.ZodLiteral<"native">;
19
+ action: z.ZodObject<{
20
+ id: z.ZodUUID;
21
+ runtimeEpoch: z.ZodUUID;
22
+ command: z.ZodDiscriminatedUnion<[z.ZodObject<{
23
+ kind: z.ZodLiteral<"thread-create">;
24
+ provider: z.ZodEnum<{
25
+ claude: "claude";
26
+ codex: "codex";
27
+ }>;
28
+ workspaceRoot: z.ZodString;
29
+ name: z.ZodString;
30
+ }, z.core.$strict>, z.ZodObject<{
31
+ kind: z.ZodLiteral<"thread-adopt">;
32
+ provider: z.ZodEnum<{
33
+ claude: "claude";
34
+ codex: "codex";
35
+ }>;
36
+ workspaceRoot: z.ZodString;
37
+ nativeId: z.ZodString;
38
+ name: z.ZodString;
39
+ operatorConfirmation: z.ZodString;
40
+ }, z.core.$strict>, z.ZodObject<{
41
+ kind: z.ZodLiteral<"thread-resume">;
42
+ threadId: z.ZodUUID;
43
+ operatorConfirmation: z.ZodString;
44
+ }, z.core.$strict>, z.ZodObject<{
45
+ kind: z.ZodLiteral<"thread-close">;
46
+ threadId: z.ZodUUID;
47
+ }, z.core.$strict>, z.ZodObject<{
48
+ kind: z.ZodLiteral<"thread-recover">;
49
+ threadId: z.ZodUUID;
50
+ recovery: z.ZodDiscriminatedUnion<[z.ZodObject<{
51
+ kind: z.ZodLiteral<"resume">;
52
+ }, z.core.$strict>, z.ZodObject<{
53
+ kind: z.ZodLiteral<"attach">;
54
+ nativeId: z.ZodString;
55
+ }, z.core.$strict>, z.ZodObject<{
56
+ kind: z.ZodLiteral<"create">;
57
+ }, z.core.$strict>], "kind">;
58
+ operatorConfirmation: z.ZodString;
59
+ }, z.core.$strict>, z.ZodObject<{
60
+ kind: z.ZodLiteral<"thread-rename">;
61
+ threadId: z.ZodUUID;
62
+ name: z.ZodString;
63
+ }, z.core.$strict>, z.ZodObject<{
64
+ kind: z.ZodLiteral<"message">;
65
+ threadId: z.ZodUUID;
66
+ input: z.ZodDiscriminatedUnion<[z.ZodObject<{
67
+ kind: z.ZodLiteral<"text">;
68
+ text: z.ZodString;
69
+ }, z.core.$strict>, z.ZodObject<{
70
+ kind: z.ZodLiteral<"skill">;
71
+ skillId: z.ZodString;
72
+ arguments: z.ZodString;
73
+ }, z.core.$strict>], "kind">;
74
+ }, z.core.$strict>, z.ZodObject<{
75
+ text: z.ZodString;
76
+ threadId: z.ZodUUID;
77
+ expectedTurnId: z.ZodString;
78
+ kind: z.ZodLiteral<"steer">;
79
+ }, z.core.$strict>, z.ZodObject<{
80
+ input: z.ZodDiscriminatedUnion<[z.ZodObject<{
81
+ kind: z.ZodLiteral<"text">;
82
+ text: z.ZodString;
83
+ }, z.core.$strict>, z.ZodObject<{
84
+ kind: z.ZodLiteral<"skill">;
85
+ skillId: z.ZodString;
86
+ arguments: z.ZodString;
87
+ }, z.core.$strict>], "kind">;
88
+ threadId: z.ZodUUID;
89
+ expectedTurnId: z.ZodString;
90
+ kind: z.ZodLiteral<"queue">;
91
+ }, z.core.$strict>, z.ZodObject<{
92
+ threadId: z.ZodUUID;
93
+ expectedTurnId: z.ZodString;
94
+ kind: z.ZodLiteral<"interrupt">;
95
+ }, z.core.$strict>, z.ZodObject<{
96
+ kind: z.ZodLiteral<"queue-send">;
97
+ queuedActionId: z.ZodUUID;
98
+ }, z.core.$strict>, z.ZodObject<{
99
+ kind: z.ZodLiteral<"queue-cancel">;
100
+ queuedActionId: z.ZodUUID;
101
+ }, z.core.$strict>, z.ZodObject<{
102
+ approvalId: z.ZodUUID;
103
+ response: z.ZodDiscriminatedUnion<[z.ZodObject<{
104
+ kind: z.ZodLiteral<"decision">;
105
+ decision: z.ZodEnum<{
106
+ accept: "accept";
107
+ acceptForSession: "acceptForSession";
108
+ decline: "decline";
109
+ cancel: "cancel";
110
+ }>;
111
+ }, z.core.$strict>, z.ZodObject<{
112
+ kind: z.ZodLiteral<"permission">;
113
+ decision: z.ZodEnum<{
114
+ accept: "accept";
115
+ decline: "decline";
116
+ }>;
117
+ scope: z.ZodEnum<{
118
+ turn: "turn";
119
+ session: "session";
120
+ }>;
121
+ }, z.core.$strict>, z.ZodObject<{
122
+ kind: z.ZodLiteral<"answers">;
123
+ answers: z.ZodPipe<z.ZodRecord<z.ZodString, z.ZodArray<z.ZodString>>, z.ZodTransform<{
124
+ [k: string]: string[];
125
+ }, Record<string, string[]>>>;
126
+ }, z.core.$strict>], "kind">;
127
+ threadId: z.ZodUUID;
128
+ expectedTurnId: z.ZodString;
129
+ kind: z.ZodLiteral<"native-reply">;
130
+ }, z.core.$strict>], "kind">;
131
+ plan: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
31
132
  kind: z.ZodLiteral<"execution">;
32
133
  authorizationId: z.ZodUUID;
33
- milestoneId: z.ZodUUID;
134
+ milestoneId: z.ZodNullable<z.ZodUUID>;
34
135
  mode: z.ZodEnum<{
35
136
  supervised: "supervised";
36
137
  auto: "auto";
@@ -44,200 +145,414 @@ export declare const StoreCommandSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
44
145
  revisionId: z.ZodUUID;
45
146
  invocationId: z.ZodUUID;
46
147
  }, z.core.$strict>], "kind">>;
47
- observedRevision: z.ZodObject<{
48
- planDigest: z.ZodString;
49
- breakdownDigest: z.ZodNullable<z.ZodString>;
50
- }, z.core.$strict>;
51
- }, z.core.$strict>>;
52
- commit: z.ZodNullable<z.ZodString>;
53
- }, z.core.$strip>;
54
- creation: z.ZodObject<{
55
- id: z.ZodUUID;
56
- runtimeEpoch: z.ZodUUID;
148
+ expectedPlan: z.ZodOptional<z.ZodNullable<z.ZodObject<{
149
+ directory: z.ZodString;
150
+ scope: z.ZodNullable<z.ZodDiscriminatedUnion<[z.ZodObject<{
151
+ kind: z.ZodLiteral<"execution">;
152
+ authorizationId: z.ZodUUID;
153
+ milestoneId: z.ZodNullable<z.ZodUUID>;
154
+ mode: z.ZodEnum<{
155
+ supervised: "supervised";
156
+ auto: "auto";
157
+ }>;
158
+ revision: z.ZodObject<{
159
+ planDigest: z.ZodString;
160
+ breakdownDigest: z.ZodNullable<z.ZodString>;
161
+ }, z.core.$strict>;
162
+ }, z.core.$strict>, z.ZodObject<{
163
+ kind: z.ZodLiteral<"planning">;
164
+ revisionId: z.ZodUUID;
165
+ invocationId: z.ZodUUID;
166
+ }, z.core.$strict>], "kind">>;
167
+ observedRevision: z.ZodObject<{
168
+ planDigest: z.ZodString;
169
+ breakdownDigest: z.ZodNullable<z.ZodString>;
170
+ }, z.core.$strict>;
171
+ }, z.core.$strict>>>;
172
+ }, z.core.$strict>;
173
+ }, z.core.$strict>, z.ZodObject<{
174
+ kind: z.ZodLiteral<"plan">;
57
175
  command: z.ZodDiscriminatedUnion<[z.ZodObject<{
58
- kind: z.ZodLiteral<"thread-create">;
59
- provider: z.ZodEnum<{
60
- claude: "claude";
61
- codex: "codex";
62
- }>;
63
- workspaceRoot: z.ZodString;
64
- name: z.ZodString;
65
- }, z.core.$strict>, z.ZodObject<{
66
- kind: z.ZodLiteral<"thread-adopt">;
67
- provider: z.ZodEnum<{
68
- claude: "claude";
69
- codex: "codex";
70
- }>;
71
- workspaceRoot: z.ZodString;
72
- nativeId: z.ZodString;
73
- name: z.ZodString;
74
- operatorConfirmation: z.ZodString;
75
- }, z.core.$strict>, z.ZodObject<{
76
- kind: z.ZodLiteral<"thread-resume">;
77
- threadId: z.ZodUUID;
78
- operatorConfirmation: z.ZodString;
79
- }, z.core.$strict>, z.ZodObject<{
80
- kind: z.ZodLiteral<"thread-close">;
81
- threadId: z.ZodUUID;
176
+ kind: z.ZodLiteral<"status">;
177
+ target: z.ZodObject<{
178
+ directory: z.ZodString;
179
+ }, z.core.$strict>;
82
180
  }, z.core.$strict>, z.ZodObject<{
83
- kind: z.ZodLiteral<"thread-recover">;
84
- threadId: z.ZodUUID;
85
- recovery: z.ZodDiscriminatedUnion<[z.ZodObject<{
86
- kind: z.ZodLiteral<"resume">;
87
- }, z.core.$strict>, z.ZodObject<{
88
- kind: z.ZodLiteral<"attach">;
89
- nativeId: z.ZodString;
90
- }, z.core.$strict>, z.ZodObject<{
91
- kind: z.ZodLiteral<"create">;
92
- }, z.core.$strict>], "kind">;
93
- operatorConfirmation: z.ZodString;
181
+ kind: z.ZodLiteral<"milestones">;
182
+ target: z.ZodObject<{
183
+ directory: z.ZodString;
184
+ }, z.core.$strict>;
185
+ limit: z.ZodDefault<z.ZodNumber>;
186
+ cursor: z.ZodOptional<z.ZodString>;
94
187
  }, z.core.$strict>, z.ZodObject<{
95
- kind: z.ZodLiteral<"thread-rename">;
96
- threadId: z.ZodUUID;
97
- name: z.ZodString;
188
+ confirmation: z.ZodOptional<z.ZodObject<{
189
+ proposalId: z.ZodUUID;
190
+ decisions: z.ZodArray<z.ZodObject<{
191
+ sourceIds: z.ZodArray<z.ZodUUID>;
192
+ targetIds: z.ZodArray<z.ZodUUID>;
193
+ relation: z.ZodEnum<{
194
+ equivalent: "equivalent";
195
+ "requirements-changed": "requirements-changed";
196
+ omitted: "omitted";
197
+ reopened: "reopened";
198
+ }>;
199
+ retainedPairs: z.ZodArray<z.ZodObject<{
200
+ sourceId: z.ZodUUID;
201
+ targetId: z.ZodUUID;
202
+ }, z.core.$strict>>;
203
+ }, z.core.$strict>>;
204
+ }, z.core.$strict>>;
205
+ target: z.ZodObject<{
206
+ directory: z.ZodString;
207
+ }, z.core.$strict>;
208
+ action: z.ZodObject<{
209
+ id: z.ZodUUID;
210
+ operatorId: z.ZodString;
211
+ source: z.ZodObject<{
212
+ kind: z.ZodEnum<{
213
+ "user-action": "user-action";
214
+ "user-message": "user-message";
215
+ }>;
216
+ reference: z.ZodString;
217
+ }, z.core.$strict>;
218
+ }, z.core.$strict>;
219
+ expected: z.ZodObject<{
220
+ planDigest: z.ZodString;
221
+ breakdownDigest: z.ZodNullable<z.ZodString>;
222
+ }, z.core.$strict>;
223
+ kind: z.ZodLiteral<"finalize">;
98
224
  }, z.core.$strict>, z.ZodObject<{
99
- kind: z.ZodLiteral<"message">;
100
- threadId: z.ZodUUID;
101
- input: z.ZodDiscriminatedUnion<[z.ZodObject<{
102
- kind: z.ZodLiteral<"text">;
103
- text: z.ZodString;
104
- }, z.core.$strict>, z.ZodObject<{
105
- kind: z.ZodLiteral<"skill">;
106
- skillId: z.ZodString;
107
- arguments: z.ZodString;
108
- }, z.core.$strict>], "kind">;
225
+ milestoneId: z.ZodNullable<z.ZodUUID>;
226
+ checks: z.ZodArray<z.ZodObject<{
227
+ command: z.ZodString;
228
+ outcome: z.ZodLiteral<"passed">;
229
+ reference: z.ZodString;
230
+ }, z.core.$strict>>;
231
+ checkouts: z.ZodArray<z.ZodObject<{
232
+ repository: z.ZodString;
233
+ directory: z.ZodString;
234
+ claimReference: z.ZodString;
235
+ paths: z.ZodArray<z.ZodString>;
236
+ }, z.core.$strict>>;
237
+ target: z.ZodObject<{
238
+ directory: z.ZodString;
239
+ }, z.core.$strict>;
240
+ action: z.ZodObject<{
241
+ id: z.ZodUUID;
242
+ operatorId: z.ZodString;
243
+ source: z.ZodObject<{
244
+ kind: z.ZodEnum<{
245
+ "user-action": "user-action";
246
+ "user-message": "user-message";
247
+ }>;
248
+ reference: z.ZodString;
249
+ }, z.core.$strict>;
250
+ }, z.core.$strict>;
251
+ expected: z.ZodObject<{
252
+ planDigest: z.ZodString;
253
+ breakdownDigest: z.ZodNullable<z.ZodString>;
254
+ }, z.core.$strict>;
255
+ kind: z.ZodLiteral<"complete">;
109
256
  }, z.core.$strict>, z.ZodObject<{
110
- text: z.ZodString;
111
- threadId: z.ZodUUID;
112
- expectedTurnId: z.ZodString;
113
- kind: z.ZodLiteral<"steer">;
257
+ intent: z.ZodEnum<{
258
+ plan: "plan";
259
+ breakdown: "breakdown";
260
+ }>;
261
+ threadIds: z.ZodArray<z.ZodUUID>;
262
+ checkouts: z.ZodArray<z.ZodObject<{
263
+ repository: z.ZodString;
264
+ directory: z.ZodString;
265
+ claimReference: z.ZodString;
266
+ paths: z.ZodArray<z.ZodString>;
267
+ }, z.core.$strict>>;
268
+ target: z.ZodObject<{
269
+ directory: z.ZodString;
270
+ }, z.core.$strict>;
271
+ action: z.ZodObject<{
272
+ id: z.ZodUUID;
273
+ operatorId: z.ZodString;
274
+ source: z.ZodObject<{
275
+ kind: z.ZodEnum<{
276
+ "user-action": "user-action";
277
+ "user-message": "user-message";
278
+ }>;
279
+ reference: z.ZodString;
280
+ }, z.core.$strict>;
281
+ }, z.core.$strict>;
282
+ expected: z.ZodObject<{
283
+ planDigest: z.ZodString;
284
+ breakdownDigest: z.ZodNullable<z.ZodString>;
285
+ }, z.core.$strict>;
286
+ kind: z.ZodLiteral<"begin-revision">;
114
287
  }, z.core.$strict>, z.ZodObject<{
115
- input: z.ZodDiscriminatedUnion<[z.ZodObject<{
116
- kind: z.ZodLiteral<"text">;
117
- text: z.ZodString;
118
- }, z.core.$strict>, z.ZodObject<{
119
- kind: z.ZodLiteral<"skill">;
120
- skillId: z.ZodString;
121
- arguments: z.ZodString;
122
- }, z.core.$strict>], "kind">;
123
- threadId: z.ZodUUID;
124
- expectedTurnId: z.ZodString;
125
- kind: z.ZodLiteral<"queue">;
288
+ revisionId: z.ZodUUID;
289
+ skill: z.ZodEnum<{
290
+ "jg-plan": "jg-plan";
291
+ "jg-breakdown": "jg-breakdown";
292
+ }>;
293
+ target: z.ZodObject<{
294
+ directory: z.ZodString;
295
+ }, z.core.$strict>;
296
+ action: z.ZodObject<{
297
+ id: z.ZodUUID;
298
+ operatorId: z.ZodString;
299
+ source: z.ZodObject<{
300
+ kind: z.ZodEnum<{
301
+ "user-action": "user-action";
302
+ "user-message": "user-message";
303
+ }>;
304
+ reference: z.ZodString;
305
+ }, z.core.$strict>;
306
+ }, z.core.$strict>;
307
+ expected: z.ZodObject<{
308
+ planDigest: z.ZodString;
309
+ breakdownDigest: z.ZodNullable<z.ZodString>;
310
+ }, z.core.$strict>;
311
+ kind: z.ZodLiteral<"revision-invoke">;
126
312
  }, z.core.$strict>, z.ZodObject<{
127
- threadId: z.ZodUUID;
128
- expectedTurnId: z.ZodString;
129
- kind: z.ZodLiteral<"interrupt">;
313
+ kind: z.ZodLiteral<"reconciliation">;
314
+ target: z.ZodObject<{
315
+ directory: z.ZodString;
316
+ }, z.core.$strict>;
317
+ collection: z.ZodEnum<{
318
+ drafts: "drafts";
319
+ sources: "sources";
320
+ evidence: "evidence";
321
+ correspondences: "correspondences";
322
+ }>;
323
+ limit: z.ZodDefault<z.ZodNumber>;
324
+ cursor: z.ZodOptional<z.ZodString>;
130
325
  }, z.core.$strict>, z.ZodObject<{
131
- kind: z.ZodLiteral<"queue-send">;
132
- queuedActionId: z.ZodUUID;
326
+ scope: z.ZodEnum<{
327
+ plan: "plan";
328
+ sequence: "sequence";
329
+ }>;
330
+ presentationHash: z.ZodString;
331
+ target: z.ZodObject<{
332
+ directory: z.ZodString;
333
+ }, z.core.$strict>;
334
+ action: z.ZodObject<{
335
+ id: z.ZodUUID;
336
+ operatorId: z.ZodString;
337
+ source: z.ZodObject<{
338
+ kind: z.ZodEnum<{
339
+ "user-action": "user-action";
340
+ "user-message": "user-message";
341
+ }>;
342
+ reference: z.ZodString;
343
+ }, z.core.$strict>;
344
+ }, z.core.$strict>;
345
+ expected: z.ZodObject<{
346
+ planDigest: z.ZodString;
347
+ breakdownDigest: z.ZodNullable<z.ZodString>;
348
+ }, z.core.$strict>;
349
+ kind: z.ZodLiteral<"approve">;
133
350
  }, z.core.$strict>, z.ZodObject<{
134
- kind: z.ZodLiteral<"queue-cancel">;
135
- queuedActionId: z.ZodUUID;
351
+ scope: z.ZodEnum<{
352
+ plan: "plan";
353
+ sequence: "sequence";
354
+ execution: "execution";
355
+ all: "all";
356
+ }>;
357
+ target: z.ZodObject<{
358
+ directory: z.ZodString;
359
+ }, z.core.$strict>;
360
+ action: z.ZodObject<{
361
+ id: z.ZodUUID;
362
+ operatorId: z.ZodString;
363
+ source: z.ZodObject<{
364
+ kind: z.ZodEnum<{
365
+ "user-action": "user-action";
366
+ "user-message": "user-message";
367
+ }>;
368
+ reference: z.ZodString;
369
+ }, z.core.$strict>;
370
+ }, z.core.$strict>;
371
+ expected: z.ZodObject<{
372
+ planDigest: z.ZodString;
373
+ breakdownDigest: z.ZodNullable<z.ZodString>;
374
+ }, z.core.$strict>;
375
+ kind: z.ZodLiteral<"revoke">;
136
376
  }, z.core.$strict>, z.ZodObject<{
137
- approvalId: z.ZodUUID;
138
- response: z.ZodDiscriminatedUnion<[z.ZodObject<{
139
- kind: z.ZodLiteral<"decision">;
140
- decision: z.ZodEnum<{
141
- accept: "accept";
142
- acceptForSession: "acceptForSession";
143
- decline: "decline";
144
- cancel: "cancel";
145
- }>;
146
- }, z.core.$strict>, z.ZodObject<{
147
- kind: z.ZodLiteral<"permission">;
148
- decision: z.ZodEnum<{
149
- accept: "accept";
150
- decline: "decline";
151
- }>;
152
- scope: z.ZodEnum<{
153
- turn: "turn";
154
- session: "session";
155
- }>;
156
- }, z.core.$strict>, z.ZodObject<{
157
- kind: z.ZodLiteral<"answers">;
158
- answers: z.ZodPipe<z.ZodRecord<z.ZodString, z.ZodArray<z.ZodString>>, z.ZodTransform<{
159
- [k: string]: string[];
160
- }, Record<string, string[]>>>;
161
- }, z.core.$strict>], "kind">;
162
- threadId: z.ZodUUID;
163
- expectedTurnId: z.ZodString;
164
- kind: z.ZodLiteral<"native-reply">;
165
- }, z.core.$strict>], "kind">;
166
- plan: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
167
- kind: z.ZodLiteral<"execution">;
168
- authorizationId: z.ZodUUID;
169
- milestoneId: z.ZodUUID;
170
377
  mode: z.ZodEnum<{
171
378
  supervised: "supervised";
172
379
  auto: "auto";
173
380
  }>;
174
- revision: z.ZodObject<{
381
+ milestoneIds: z.ZodArray<z.ZodUUID>;
382
+ target: z.ZodObject<{
383
+ directory: z.ZodString;
384
+ }, z.core.$strict>;
385
+ action: z.ZodObject<{
386
+ id: z.ZodUUID;
387
+ operatorId: z.ZodString;
388
+ source: z.ZodObject<{
389
+ kind: z.ZodEnum<{
390
+ "user-action": "user-action";
391
+ "user-message": "user-message";
392
+ }>;
393
+ reference: z.ZodString;
394
+ }, z.core.$strict>;
395
+ }, z.core.$strict>;
396
+ expected: z.ZodObject<{
175
397
  planDigest: z.ZodString;
176
398
  breakdownDigest: z.ZodNullable<z.ZodString>;
177
399
  }, z.core.$strict>;
400
+ kind: z.ZodLiteral<"authorize">;
178
401
  }, z.core.$strict>, z.ZodObject<{
179
- kind: z.ZodLiteral<"planning">;
180
- revisionId: z.ZodUUID;
181
- invocationId: z.ZodUUID;
182
- }, z.core.$strict>], "kind">>;
183
- expectedPlan: z.ZodOptional<z.ZodNullable<z.ZodObject<{
184
- directory: z.ZodString;
185
- scope: z.ZodNullable<z.ZodDiscriminatedUnion<[z.ZodObject<{
186
- kind: z.ZodLiteral<"execution">;
187
- authorizationId: z.ZodUUID;
188
- milestoneId: z.ZodUUID;
189
- mode: z.ZodEnum<{
190
- supervised: "supervised";
191
- auto: "auto";
192
- }>;
193
- revision: z.ZodObject<{
194
- planDigest: z.ZodString;
195
- breakdownDigest: z.ZodNullable<z.ZodString>;
196
- }, z.core.$strict>;
197
- }, z.core.$strict>, z.ZodObject<{
198
- kind: z.ZodLiteral<"planning">;
199
- revisionId: z.ZodUUID;
200
- invocationId: z.ZodUUID;
201
- }, z.core.$strict>], "kind">>;
202
- observedRevision: z.ZodObject<{
402
+ kind: z.ZodLiteral<"check-execution">;
403
+ target: z.ZodObject<{
404
+ directory: z.ZodString;
405
+ }, z.core.$strict>;
406
+ expected: z.ZodObject<{
203
407
  planDigest: z.ZodString;
204
408
  breakdownDigest: z.ZodNullable<z.ZodString>;
205
409
  }, z.core.$strict>;
206
- }, z.core.$strict>>>;
207
- }, z.core.$strict>;
208
- findings: z.ZodNullable<z.ZodObject<{
209
- turnId: z.ZodString;
210
- itemId: z.ZodString;
211
- hash: z.ZodString;
212
- text: z.ZodString;
213
- }, z.core.$strip>>;
214
- createdAt: z.ZodNumber;
410
+ authorizationId: z.ZodUUID;
411
+ milestoneId: z.ZodNullable<z.ZodUUID>;
412
+ mode: z.ZodEnum<{
413
+ supervised: "supervised";
414
+ auto: "auto";
415
+ }>;
416
+ }, z.core.$strict>], "kind">;
417
+ }, z.core.$strict>, z.ZodObject<{
418
+ kind: z.ZodLiteral<"handoff">;
419
+ command: z.ZodDiscriminatedUnion<[z.ZodObject<{
420
+ kind: z.ZodLiteral<"create">;
421
+ id: z.ZodUUID;
422
+ runtimeEpoch: z.ZodUUID;
423
+ sourceThreadId: z.ZodUUID;
424
+ purpose: z.ZodEnum<{
425
+ review: "review";
426
+ challenge: "challenge";
427
+ }>;
428
+ commit: z.ZodDefault<z.ZodNullable<z.ZodString>>;
429
+ }, z.core.$strict>, z.ZodObject<{
430
+ kind: z.ZodLiteral<"show">;
431
+ id: z.ZodUUID;
432
+ }, z.core.$strict>, z.ZodObject<{
433
+ kind: z.ZodLiteral<"preview">;
434
+ id: z.ZodUUID;
435
+ phase: z.ZodEnum<{
436
+ review: "review";
437
+ feedback: "feedback";
438
+ }>;
439
+ }, z.core.$strict>, z.ZodObject<{
440
+ kind: z.ZodLiteral<"send">;
441
+ id: z.ZodUUID;
442
+ phase: z.ZodEnum<{
443
+ review: "review";
444
+ feedback: "feedback";
445
+ }>;
446
+ expectedPreviewDigest: z.ZodString;
447
+ }, z.core.$strict>, z.ZodObject<{
448
+ kind: z.ZodLiteral<"collect">;
449
+ id: z.ZodUUID;
450
+ turnId: z.ZodString;
451
+ itemId: z.ZodString;
452
+ limit: z.ZodDefault<z.ZodNumber>;
453
+ cursor: z.ZodOptional<z.ZodString>;
454
+ }, z.core.$strict>, z.ZodObject<{
455
+ kind: z.ZodLiteral<"list">;
456
+ workspaceRoot: z.ZodString;
457
+ sourceThreadId: z.ZodOptional<z.ZodUUID>;
458
+ limit: z.ZodDefault<z.ZodNumber>;
459
+ cursor: z.ZodOptional<z.ZodString>;
460
+ }, z.core.$strict>], "kind">;
461
+ }, z.core.$strict>, z.ZodObject<{
462
+ kind: z.ZodLiteral<"priority">;
463
+ target: z.ZodObject<{
464
+ directory: z.ZodString;
465
+ }, z.core.$strict>;
466
+ expectedRevision: z.ZodObject<{
467
+ planDigest: z.ZodString;
468
+ breakdownDigest: z.ZodNullable<z.ZodString>;
469
+ }, z.core.$strict>;
470
+ priority: z.ZodEnum<{
471
+ P0: "P0";
472
+ P1: "P1";
473
+ P2: "P2";
474
+ P3: "P3";
475
+ }>;
476
+ reason: z.ZodString;
477
+ }, z.core.$strict>, z.ZodObject<{
478
+ kind: z.ZodLiteral<"error-reservation">;
479
+ target: z.ZodObject<{
480
+ directory: z.ZodString;
481
+ }, z.core.$strict>;
482
+ expectedRevision: z.ZodObject<{
483
+ planDigest: z.ZodString;
484
+ breakdownDigest: z.ZodNullable<z.ZodString>;
485
+ }, z.core.$strict>;
486
+ reservation: z.ZodObject<{
487
+ repository: z.ZodString;
488
+ namespace: z.ZodString;
489
+ start: z.ZodNumber;
490
+ end: z.ZodNumber;
491
+ registryPath: z.ZodString;
492
+ purpose: z.ZodString;
493
+ }, z.core.$strict>;
494
+ release: z.ZodBoolean;
495
+ }, z.core.$strict>, z.ZodObject<{
496
+ kind: z.ZodLiteral<"publication-retry">;
497
+ expectedCommit: z.ZodString;
498
+ }, z.core.$strict>], "kind">;
215
499
  }, z.core.$strict>;
500
+ operatorId: z.ZodString;
216
501
  }, z.core.$strict>, z.ZodObject<{
217
- kind: z.ZodLiteral<"handoff-dispatch-read">;
502
+ kind: z.ZodLiteral<"browser-settle">;
218
503
  id: z.ZodUUID;
219
- phase: z.ZodEnum<{
220
- review: "review";
221
- feedback: "feedback";
504
+ operatorId: z.ZodString;
505
+ state: z.ZodEnum<{
506
+ acknowledged: "acknowledged";
507
+ uncertain: "uncertain";
222
508
  }>;
223
509
  }, z.core.$strict>, z.ZodObject<{
224
- kind: z.ZodLiteral<"handoff-dispatch-prepare">;
225
- dispatch: z.ZodObject<{
226
- handoffId: z.ZodUUID;
227
- phase: z.ZodEnum<{
510
+ kind: z.ZodLiteral<"handoff-read">;
511
+ id: z.ZodUUID;
512
+ }, z.core.$strict>, z.ZodObject<{
513
+ kind: z.ZodLiteral<"handoff-prepare">;
514
+ record: z.ZodObject<{
515
+ id: z.ZodUUID;
516
+ digest: z.ZodString;
517
+ purpose: z.ZodEnum<{
228
518
  review: "review";
229
- feedback: "feedback";
519
+ challenge: "challenge";
230
520
  }>;
231
- previewDigest: z.ZodString;
232
- destination: z.ZodObject<{
521
+ source: z.ZodObject<{
233
522
  threadId: z.ZodUUID;
234
523
  provider: z.ZodEnum<{
235
524
  claude: "claude";
236
525
  codex: "codex";
237
526
  }>;
238
527
  nativeId: z.ZodString;
528
+ workspaceRoot: z.ZodString;
529
+ plan: z.ZodNullable<z.ZodObject<{
530
+ directory: z.ZodString;
531
+ scope: z.ZodNullable<z.ZodDiscriminatedUnion<[z.ZodObject<{
532
+ kind: z.ZodLiteral<"execution">;
533
+ authorizationId: z.ZodUUID;
534
+ milestoneId: z.ZodNullable<z.ZodUUID>;
535
+ mode: z.ZodEnum<{
536
+ supervised: "supervised";
537
+ auto: "auto";
538
+ }>;
539
+ revision: z.ZodObject<{
540
+ planDigest: z.ZodString;
541
+ breakdownDigest: z.ZodNullable<z.ZodString>;
542
+ }, z.core.$strict>;
543
+ }, z.core.$strict>, z.ZodObject<{
544
+ kind: z.ZodLiteral<"planning">;
545
+ revisionId: z.ZodUUID;
546
+ invocationId: z.ZodUUID;
547
+ }, z.core.$strict>], "kind">>;
548
+ observedRevision: z.ZodObject<{
549
+ planDigest: z.ZodString;
550
+ breakdownDigest: z.ZodNullable<z.ZodString>;
551
+ }, z.core.$strict>;
552
+ }, z.core.$strict>>;
553
+ commit: z.ZodNullable<z.ZodString>;
239
554
  }, z.core.$strip>;
240
- action: z.ZodObject<{
555
+ creation: z.ZodObject<{
241
556
  id: z.ZodUUID;
242
557
  runtimeEpoch: z.ZodUUID;
243
558
  command: z.ZodDiscriminatedUnion<[z.ZodObject<{
@@ -352,7 +667,7 @@ export declare const StoreCommandSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
352
667
  plan: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
353
668
  kind: z.ZodLiteral<"execution">;
354
669
  authorizationId: z.ZodUUID;
355
- milestoneId: z.ZodUUID;
670
+ milestoneId: z.ZodNullable<z.ZodUUID>;
356
671
  mode: z.ZodEnum<{
357
672
  supervised: "supervised";
358
673
  auto: "auto";
@@ -371,7 +686,7 @@ export declare const StoreCommandSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
371
686
  scope: z.ZodNullable<z.ZodDiscriminatedUnion<[z.ZodObject<{
372
687
  kind: z.ZodLiteral<"execution">;
373
688
  authorizationId: z.ZodUUID;
374
- milestoneId: z.ZodUUID;
689
+ milestoneId: z.ZodNullable<z.ZodUUID>;
375
690
  mode: z.ZodEnum<{
376
691
  supervised: "supervised";
377
692
  auto: "auto";
@@ -391,121 +706,276 @@ export declare const StoreCommandSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
391
706
  }, z.core.$strict>;
392
707
  }, z.core.$strict>>>;
393
708
  }, z.core.$strict>;
709
+ findings: z.ZodNullable<z.ZodObject<{
710
+ turnId: z.ZodString;
711
+ itemId: z.ZodString;
712
+ hash: z.ZodString;
713
+ text: z.ZodString;
714
+ }, z.core.$strip>>;
715
+ createdAt: z.ZodNumber;
394
716
  }, z.core.$strict>;
395
717
  }, z.core.$strict>, z.ZodObject<{
396
- kind: z.ZodLiteral<"handoff-collect">;
718
+ kind: z.ZodLiteral<"handoff-dispatch-read">;
397
719
  id: z.ZodUUID;
398
- findings: z.ZodObject<{
399
- turnId: z.ZodString;
400
- itemId: z.ZodString;
401
- hash: z.ZodString;
402
- text: z.ZodString;
403
- }, z.core.$strip>;
404
- }, z.core.$strict>, z.ZodObject<{
405
- kind: z.ZodLiteral<"handoff-list">;
406
- page: z.ZodObject<{
407
- workspaceRoot: z.ZodString;
408
- sourceThreadId: z.ZodOptional<z.ZodUUID>;
409
- limit: z.ZodNumber;
410
- after: z.ZodOptional<z.ZodObject<{
411
- createdAt: z.ZodNumber;
412
- id: z.ZodUUID;
413
- }, z.core.$strict>>;
414
- }, z.core.$strict>;
720
+ phase: z.ZodEnum<{
721
+ review: "review";
722
+ feedback: "feedback";
723
+ }>;
415
724
  }, z.core.$strict>, z.ZodObject<{
416
- kind: z.ZodLiteral<"claude-history">;
417
- request: z.ZodDiscriminatedUnion<[z.ZodObject<{
418
- kind: z.ZodLiteral<"status">;
419
- }, z.core.$strict>, z.ZodObject<{
420
- kind: z.ZodLiteral<"plan">;
421
- command: z.ZodDiscriminatedUnion<[z.ZodObject<{
422
- kind: z.ZodLiteral<"status">;
423
- target: z.ZodObject<{
424
- directory: z.ZodString;
425
- }, z.core.$strict>;
426
- }, z.core.$strict>, z.ZodObject<{
427
- kind: z.ZodLiteral<"milestones">;
428
- target: z.ZodObject<{
429
- directory: z.ZodString;
430
- }, z.core.$strict>;
431
- limit: z.ZodDefault<z.ZodNumber>;
432
- cursor: z.ZodOptional<z.ZodString>;
433
- }, z.core.$strict>, z.ZodObject<{
434
- confirmation: z.ZodOptional<z.ZodObject<{
435
- proposalId: z.ZodUUID;
436
- decisions: z.ZodArray<z.ZodObject<{
437
- sourceIds: z.ZodArray<z.ZodUUID>;
438
- targetIds: z.ZodArray<z.ZodUUID>;
439
- relation: z.ZodEnum<{
440
- equivalent: "equivalent";
441
- "requirements-changed": "requirements-changed";
442
- omitted: "omitted";
443
- reopened: "reopened";
444
- }>;
445
- retainedPairs: z.ZodArray<z.ZodObject<{
446
- sourceId: z.ZodUUID;
447
- targetId: z.ZodUUID;
448
- }, z.core.$strict>>;
449
- }, z.core.$strict>>;
450
- }, z.core.$strict>>;
451
- target: z.ZodObject<{
452
- directory: z.ZodString;
453
- }, z.core.$strict>;
454
- action: z.ZodObject<{
455
- id: z.ZodUUID;
456
- operatorId: z.ZodString;
457
- source: z.ZodObject<{
458
- kind: z.ZodEnum<{
459
- "user-action": "user-action";
460
- "user-message": "user-message";
461
- }>;
462
- reference: z.ZodString;
463
- }, z.core.$strict>;
464
- }, z.core.$strict>;
465
- expected: z.ZodObject<{
466
- planDigest: z.ZodString;
467
- breakdownDigest: z.ZodNullable<z.ZodString>;
468
- }, z.core.$strict>;
469
- kind: z.ZodLiteral<"finalize">;
470
- }, z.core.$strict>, z.ZodObject<{
471
- milestoneId: z.ZodUUID;
472
- checks: z.ZodArray<z.ZodObject<{
473
- command: z.ZodString;
474
- outcome: z.ZodLiteral<"passed">;
475
- reference: z.ZodString;
476
- }, z.core.$strict>>;
477
- checkouts: z.ZodArray<z.ZodObject<{
478
- repository: z.ZodString;
479
- directory: z.ZodString;
480
- claimReference: z.ZodString;
481
- paths: z.ZodArray<z.ZodString>;
482
- }, z.core.$strict>>;
483
- target: z.ZodObject<{
484
- directory: z.ZodString;
485
- }, z.core.$strict>;
486
- action: z.ZodObject<{
487
- id: z.ZodUUID;
488
- operatorId: z.ZodString;
489
- source: z.ZodObject<{
490
- kind: z.ZodEnum<{
491
- "user-action": "user-action";
492
- "user-message": "user-message";
493
- }>;
494
- reference: z.ZodString;
495
- }, z.core.$strict>;
496
- }, z.core.$strict>;
497
- expected: z.ZodObject<{
498
- planDigest: z.ZodString;
499
- breakdownDigest: z.ZodNullable<z.ZodString>;
500
- }, z.core.$strict>;
501
- kind: z.ZodLiteral<"complete">;
502
- }, z.core.$strict>, z.ZodObject<{
503
- intent: z.ZodEnum<{
504
- plan: "plan";
505
- breakdown: "breakdown";
725
+ kind: z.ZodLiteral<"handoff-dispatch-prepare">;
726
+ dispatch: z.ZodObject<{
727
+ handoffId: z.ZodUUID;
728
+ phase: z.ZodEnum<{
729
+ review: "review";
730
+ feedback: "feedback";
731
+ }>;
732
+ previewDigest: z.ZodString;
733
+ destination: z.ZodObject<{
734
+ threadId: z.ZodUUID;
735
+ provider: z.ZodEnum<{
736
+ claude: "claude";
737
+ codex: "codex";
506
738
  }>;
507
- threadIds: z.ZodArray<z.ZodUUID>;
508
- checkouts: z.ZodArray<z.ZodObject<{
739
+ nativeId: z.ZodString;
740
+ }, z.core.$strip>;
741
+ action: z.ZodObject<{
742
+ id: z.ZodUUID;
743
+ runtimeEpoch: z.ZodUUID;
744
+ command: z.ZodDiscriminatedUnion<[z.ZodObject<{
745
+ kind: z.ZodLiteral<"thread-create">;
746
+ provider: z.ZodEnum<{
747
+ claude: "claude";
748
+ codex: "codex";
749
+ }>;
750
+ workspaceRoot: z.ZodString;
751
+ name: z.ZodString;
752
+ }, z.core.$strict>, z.ZodObject<{
753
+ kind: z.ZodLiteral<"thread-adopt">;
754
+ provider: z.ZodEnum<{
755
+ claude: "claude";
756
+ codex: "codex";
757
+ }>;
758
+ workspaceRoot: z.ZodString;
759
+ nativeId: z.ZodString;
760
+ name: z.ZodString;
761
+ operatorConfirmation: z.ZodString;
762
+ }, z.core.$strict>, z.ZodObject<{
763
+ kind: z.ZodLiteral<"thread-resume">;
764
+ threadId: z.ZodUUID;
765
+ operatorConfirmation: z.ZodString;
766
+ }, z.core.$strict>, z.ZodObject<{
767
+ kind: z.ZodLiteral<"thread-close">;
768
+ threadId: z.ZodUUID;
769
+ }, z.core.$strict>, z.ZodObject<{
770
+ kind: z.ZodLiteral<"thread-recover">;
771
+ threadId: z.ZodUUID;
772
+ recovery: z.ZodDiscriminatedUnion<[z.ZodObject<{
773
+ kind: z.ZodLiteral<"resume">;
774
+ }, z.core.$strict>, z.ZodObject<{
775
+ kind: z.ZodLiteral<"attach">;
776
+ nativeId: z.ZodString;
777
+ }, z.core.$strict>, z.ZodObject<{
778
+ kind: z.ZodLiteral<"create">;
779
+ }, z.core.$strict>], "kind">;
780
+ operatorConfirmation: z.ZodString;
781
+ }, z.core.$strict>, z.ZodObject<{
782
+ kind: z.ZodLiteral<"thread-rename">;
783
+ threadId: z.ZodUUID;
784
+ name: z.ZodString;
785
+ }, z.core.$strict>, z.ZodObject<{
786
+ kind: z.ZodLiteral<"message">;
787
+ threadId: z.ZodUUID;
788
+ input: z.ZodDiscriminatedUnion<[z.ZodObject<{
789
+ kind: z.ZodLiteral<"text">;
790
+ text: z.ZodString;
791
+ }, z.core.$strict>, z.ZodObject<{
792
+ kind: z.ZodLiteral<"skill">;
793
+ skillId: z.ZodString;
794
+ arguments: z.ZodString;
795
+ }, z.core.$strict>], "kind">;
796
+ }, z.core.$strict>, z.ZodObject<{
797
+ text: z.ZodString;
798
+ threadId: z.ZodUUID;
799
+ expectedTurnId: z.ZodString;
800
+ kind: z.ZodLiteral<"steer">;
801
+ }, z.core.$strict>, z.ZodObject<{
802
+ input: z.ZodDiscriminatedUnion<[z.ZodObject<{
803
+ kind: z.ZodLiteral<"text">;
804
+ text: z.ZodString;
805
+ }, z.core.$strict>, z.ZodObject<{
806
+ kind: z.ZodLiteral<"skill">;
807
+ skillId: z.ZodString;
808
+ arguments: z.ZodString;
809
+ }, z.core.$strict>], "kind">;
810
+ threadId: z.ZodUUID;
811
+ expectedTurnId: z.ZodString;
812
+ kind: z.ZodLiteral<"queue">;
813
+ }, z.core.$strict>, z.ZodObject<{
814
+ threadId: z.ZodUUID;
815
+ expectedTurnId: z.ZodString;
816
+ kind: z.ZodLiteral<"interrupt">;
817
+ }, z.core.$strict>, z.ZodObject<{
818
+ kind: z.ZodLiteral<"queue-send">;
819
+ queuedActionId: z.ZodUUID;
820
+ }, z.core.$strict>, z.ZodObject<{
821
+ kind: z.ZodLiteral<"queue-cancel">;
822
+ queuedActionId: z.ZodUUID;
823
+ }, z.core.$strict>, z.ZodObject<{
824
+ approvalId: z.ZodUUID;
825
+ response: z.ZodDiscriminatedUnion<[z.ZodObject<{
826
+ kind: z.ZodLiteral<"decision">;
827
+ decision: z.ZodEnum<{
828
+ accept: "accept";
829
+ acceptForSession: "acceptForSession";
830
+ decline: "decline";
831
+ cancel: "cancel";
832
+ }>;
833
+ }, z.core.$strict>, z.ZodObject<{
834
+ kind: z.ZodLiteral<"permission">;
835
+ decision: z.ZodEnum<{
836
+ accept: "accept";
837
+ decline: "decline";
838
+ }>;
839
+ scope: z.ZodEnum<{
840
+ turn: "turn";
841
+ session: "session";
842
+ }>;
843
+ }, z.core.$strict>, z.ZodObject<{
844
+ kind: z.ZodLiteral<"answers">;
845
+ answers: z.ZodPipe<z.ZodRecord<z.ZodString, z.ZodArray<z.ZodString>>, z.ZodTransform<{
846
+ [k: string]: string[];
847
+ }, Record<string, string[]>>>;
848
+ }, z.core.$strict>], "kind">;
849
+ threadId: z.ZodUUID;
850
+ expectedTurnId: z.ZodString;
851
+ kind: z.ZodLiteral<"native-reply">;
852
+ }, z.core.$strict>], "kind">;
853
+ plan: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
854
+ kind: z.ZodLiteral<"execution">;
855
+ authorizationId: z.ZodUUID;
856
+ milestoneId: z.ZodNullable<z.ZodUUID>;
857
+ mode: z.ZodEnum<{
858
+ supervised: "supervised";
859
+ auto: "auto";
860
+ }>;
861
+ revision: z.ZodObject<{
862
+ planDigest: z.ZodString;
863
+ breakdownDigest: z.ZodNullable<z.ZodString>;
864
+ }, z.core.$strict>;
865
+ }, z.core.$strict>, z.ZodObject<{
866
+ kind: z.ZodLiteral<"planning">;
867
+ revisionId: z.ZodUUID;
868
+ invocationId: z.ZodUUID;
869
+ }, z.core.$strict>], "kind">>;
870
+ expectedPlan: z.ZodOptional<z.ZodNullable<z.ZodObject<{
871
+ directory: z.ZodString;
872
+ scope: z.ZodNullable<z.ZodDiscriminatedUnion<[z.ZodObject<{
873
+ kind: z.ZodLiteral<"execution">;
874
+ authorizationId: z.ZodUUID;
875
+ milestoneId: z.ZodNullable<z.ZodUUID>;
876
+ mode: z.ZodEnum<{
877
+ supervised: "supervised";
878
+ auto: "auto";
879
+ }>;
880
+ revision: z.ZodObject<{
881
+ planDigest: z.ZodString;
882
+ breakdownDigest: z.ZodNullable<z.ZodString>;
883
+ }, z.core.$strict>;
884
+ }, z.core.$strict>, z.ZodObject<{
885
+ kind: z.ZodLiteral<"planning">;
886
+ revisionId: z.ZodUUID;
887
+ invocationId: z.ZodUUID;
888
+ }, z.core.$strict>], "kind">>;
889
+ observedRevision: z.ZodObject<{
890
+ planDigest: z.ZodString;
891
+ breakdownDigest: z.ZodNullable<z.ZodString>;
892
+ }, z.core.$strict>;
893
+ }, z.core.$strict>>>;
894
+ }, z.core.$strict>;
895
+ }, z.core.$strict>;
896
+ }, z.core.$strict>, z.ZodObject<{
897
+ kind: z.ZodLiteral<"handoff-collect">;
898
+ id: z.ZodUUID;
899
+ findings: z.ZodObject<{
900
+ turnId: z.ZodString;
901
+ itemId: z.ZodString;
902
+ hash: z.ZodString;
903
+ text: z.ZodString;
904
+ }, z.core.$strip>;
905
+ }, z.core.$strict>, z.ZodObject<{
906
+ kind: z.ZodLiteral<"handoff-list">;
907
+ page: z.ZodObject<{
908
+ workspaceRoot: z.ZodString;
909
+ sourceThreadId: z.ZodOptional<z.ZodUUID>;
910
+ limit: z.ZodNumber;
911
+ after: z.ZodOptional<z.ZodObject<{
912
+ createdAt: z.ZodNumber;
913
+ id: z.ZodUUID;
914
+ }, z.core.$strict>>;
915
+ }, z.core.$strict>;
916
+ }, z.core.$strict>, z.ZodObject<{
917
+ kind: z.ZodLiteral<"claude-history">;
918
+ request: z.ZodDiscriminatedUnion<[z.ZodObject<{
919
+ kind: z.ZodLiteral<"status">;
920
+ }, z.core.$strict>, z.ZodObject<{
921
+ kind: z.ZodLiteral<"plan">;
922
+ command: z.ZodDiscriminatedUnion<[z.ZodObject<{
923
+ kind: z.ZodLiteral<"status">;
924
+ target: z.ZodObject<{
925
+ directory: z.ZodString;
926
+ }, z.core.$strict>;
927
+ }, z.core.$strict>, z.ZodObject<{
928
+ kind: z.ZodLiteral<"milestones">;
929
+ target: z.ZodObject<{
930
+ directory: z.ZodString;
931
+ }, z.core.$strict>;
932
+ limit: z.ZodDefault<z.ZodNumber>;
933
+ cursor: z.ZodOptional<z.ZodString>;
934
+ }, z.core.$strict>, z.ZodObject<{
935
+ confirmation: z.ZodOptional<z.ZodObject<{
936
+ proposalId: z.ZodUUID;
937
+ decisions: z.ZodArray<z.ZodObject<{
938
+ sourceIds: z.ZodArray<z.ZodUUID>;
939
+ targetIds: z.ZodArray<z.ZodUUID>;
940
+ relation: z.ZodEnum<{
941
+ equivalent: "equivalent";
942
+ "requirements-changed": "requirements-changed";
943
+ omitted: "omitted";
944
+ reopened: "reopened";
945
+ }>;
946
+ retainedPairs: z.ZodArray<z.ZodObject<{
947
+ sourceId: z.ZodUUID;
948
+ targetId: z.ZodUUID;
949
+ }, z.core.$strict>>;
950
+ }, z.core.$strict>>;
951
+ }, z.core.$strict>>;
952
+ target: z.ZodObject<{
953
+ directory: z.ZodString;
954
+ }, z.core.$strict>;
955
+ action: z.ZodObject<{
956
+ id: z.ZodUUID;
957
+ operatorId: z.ZodString;
958
+ source: z.ZodObject<{
959
+ kind: z.ZodEnum<{
960
+ "user-action": "user-action";
961
+ "user-message": "user-message";
962
+ }>;
963
+ reference: z.ZodString;
964
+ }, z.core.$strict>;
965
+ }, z.core.$strict>;
966
+ expected: z.ZodObject<{
967
+ planDigest: z.ZodString;
968
+ breakdownDigest: z.ZodNullable<z.ZodString>;
969
+ }, z.core.$strict>;
970
+ kind: z.ZodLiteral<"finalize">;
971
+ }, z.core.$strict>, z.ZodObject<{
972
+ milestoneId: z.ZodNullable<z.ZodUUID>;
973
+ checks: z.ZodArray<z.ZodObject<{
974
+ command: z.ZodString;
975
+ outcome: z.ZodLiteral<"passed">;
976
+ reference: z.ZodString;
977
+ }, z.core.$strict>>;
978
+ checkouts: z.ZodArray<z.ZodObject<{
509
979
  repository: z.ZodString;
510
980
  directory: z.ZodString;
511
981
  claimReference: z.ZodString;
@@ -529,13 +999,19 @@ export declare const StoreCommandSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
529
999
  planDigest: z.ZodString;
530
1000
  breakdownDigest: z.ZodNullable<z.ZodString>;
531
1001
  }, z.core.$strict>;
532
- kind: z.ZodLiteral<"begin-revision">;
1002
+ kind: z.ZodLiteral<"complete">;
533
1003
  }, z.core.$strict>, z.ZodObject<{
534
- revisionId: z.ZodUUID;
535
- skill: z.ZodEnum<{
536
- "jg-plan": "jg-plan";
537
- "jg-breakdown": "jg-breakdown";
1004
+ intent: z.ZodEnum<{
1005
+ plan: "plan";
1006
+ breakdown: "breakdown";
538
1007
  }>;
1008
+ threadIds: z.ZodArray<z.ZodUUID>;
1009
+ checkouts: z.ZodArray<z.ZodObject<{
1010
+ repository: z.ZodString;
1011
+ directory: z.ZodString;
1012
+ claimReference: z.ZodString;
1013
+ paths: z.ZodArray<z.ZodString>;
1014
+ }, z.core.$strict>>;
539
1015
  target: z.ZodObject<{
540
1016
  directory: z.ZodString;
541
1017
  }, z.core.$strict>;
@@ -554,9 +1030,34 @@ export declare const StoreCommandSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
554
1030
  planDigest: z.ZodString;
555
1031
  breakdownDigest: z.ZodNullable<z.ZodString>;
556
1032
  }, z.core.$strict>;
557
- kind: z.ZodLiteral<"revision-invoke">;
1033
+ kind: z.ZodLiteral<"begin-revision">;
558
1034
  }, z.core.$strict>, z.ZodObject<{
559
- kind: z.ZodLiteral<"reconciliation">;
1035
+ revisionId: z.ZodUUID;
1036
+ skill: z.ZodEnum<{
1037
+ "jg-plan": "jg-plan";
1038
+ "jg-breakdown": "jg-breakdown";
1039
+ }>;
1040
+ target: z.ZodObject<{
1041
+ directory: z.ZodString;
1042
+ }, z.core.$strict>;
1043
+ action: z.ZodObject<{
1044
+ id: z.ZodUUID;
1045
+ operatorId: z.ZodString;
1046
+ source: z.ZodObject<{
1047
+ kind: z.ZodEnum<{
1048
+ "user-action": "user-action";
1049
+ "user-message": "user-message";
1050
+ }>;
1051
+ reference: z.ZodString;
1052
+ }, z.core.$strict>;
1053
+ }, z.core.$strict>;
1054
+ expected: z.ZodObject<{
1055
+ planDigest: z.ZodString;
1056
+ breakdownDigest: z.ZodNullable<z.ZodString>;
1057
+ }, z.core.$strict>;
1058
+ kind: z.ZodLiteral<"revision-invoke">;
1059
+ }, z.core.$strict>, z.ZodObject<{
1060
+ kind: z.ZodLiteral<"reconciliation">;
560
1061
  target: z.ZodObject<{
561
1062
  directory: z.ZodString;
562
1063
  }, z.core.$strict>;
@@ -654,7 +1155,7 @@ export declare const StoreCommandSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
654
1155
  breakdownDigest: z.ZodNullable<z.ZodString>;
655
1156
  }, z.core.$strict>;
656
1157
  authorizationId: z.ZodUUID;
657
- milestoneId: z.ZodUUID;
1158
+ milestoneId: z.ZodNullable<z.ZodUUID>;
658
1159
  mode: z.ZodEnum<{
659
1160
  supervised: "supervised";
660
1161
  auto: "auto";
@@ -879,7 +1380,7 @@ export declare const StoreCommandSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
879
1380
  plan: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
880
1381
  kind: z.ZodLiteral<"execution">;
881
1382
  authorizationId: z.ZodUUID;
882
- milestoneId: z.ZodUUID;
1383
+ milestoneId: z.ZodNullable<z.ZodUUID>;
883
1384
  mode: z.ZodEnum<{
884
1385
  supervised: "supervised";
885
1386
  auto: "auto";
@@ -898,7 +1399,7 @@ export declare const StoreCommandSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
898
1399
  scope: z.ZodNullable<z.ZodDiscriminatedUnion<[z.ZodObject<{
899
1400
  kind: z.ZodLiteral<"execution">;
900
1401
  authorizationId: z.ZodUUID;
901
- milestoneId: z.ZodUUID;
1402
+ milestoneId: z.ZodNullable<z.ZodUUID>;
902
1403
  mode: z.ZodEnum<{
903
1404
  supervised: "supervised";
904
1405
  auto: "auto";
@@ -929,6 +1430,9 @@ export declare const StoreCommandSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
929
1430
  }, z.core.$strict>, z.ZodObject<{
930
1431
  kind: z.ZodLiteral<"managed-thread">;
931
1432
  threadId: z.ZodUUID;
1433
+ }, z.core.$strict>, z.ZodObject<{
1434
+ kind: z.ZodLiteral<"thread-plan">;
1435
+ threadId: z.ZodUUID;
932
1436
  }, z.core.$strict>, z.ZodObject<{
933
1437
  kind: z.ZodLiteral<"managed-thread-name">;
934
1438
  name: z.ZodString;
@@ -951,6 +1455,7 @@ export declare const StoreCommandSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
951
1455
  }, z.core.$strict>, z.ZodObject<{
952
1456
  kind: z.ZodLiteral<"live-items">;
953
1457
  threadId: z.ZodUUID;
1458
+ afterRevision: z.ZodOptional<z.ZodNumber>;
954
1459
  }, z.core.$strict>], "kind">;
955
1460
  }, z.core.$strict>, z.ZodObject<{
956
1461
  kind: z.ZodLiteral<"remember">;
@@ -1043,7 +1548,7 @@ export declare const StoreCommandSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
1043
1548
  reference: z.ZodString;
1044
1549
  }, z.core.$strict>;
1045
1550
  }, z.core.$strict>;
1046
- milestoneId: z.ZodUUID;
1551
+ milestoneId: z.ZodNullable<z.ZodUUID>;
1047
1552
  revision: z.ZodObject<{
1048
1553
  planDigest: z.ZodString;
1049
1554
  breakdownDigest: z.ZodNullable<z.ZodString>;
@@ -1051,7 +1556,7 @@ export declare const StoreCommandSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
1051
1556
  contractDigest: z.ZodString;
1052
1557
  title: z.ZodString;
1053
1558
  contract: z.ZodString;
1054
- sharedDigest: z.ZodString;
1559
+ sharedDigest: z.ZodNullable<z.ZodString>;
1055
1560
  checkouts: z.ZodArray<z.ZodObject<{
1056
1561
  repository: z.ZodString;
1057
1562
  directory: z.ZodString;
@@ -1364,7 +1869,7 @@ export declare const StoreCommandSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
1364
1869
  plan: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
1365
1870
  kind: z.ZodLiteral<"execution">;
1366
1871
  authorizationId: z.ZodUUID;
1367
- milestoneId: z.ZodUUID;
1872
+ milestoneId: z.ZodNullable<z.ZodUUID>;
1368
1873
  mode: z.ZodEnum<{
1369
1874
  supervised: "supervised";
1370
1875
  auto: "auto";
@@ -1383,7 +1888,7 @@ export declare const StoreCommandSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
1383
1888
  scope: z.ZodNullable<z.ZodDiscriminatedUnion<[z.ZodObject<{
1384
1889
  kind: z.ZodLiteral<"execution">;
1385
1890
  authorizationId: z.ZodUUID;
1386
- milestoneId: z.ZodUUID;
1891
+ milestoneId: z.ZodNullable<z.ZodUUID>;
1387
1892
  mode: z.ZodEnum<{
1388
1893
  supervised: "supervised";
1389
1894
  auto: "auto";
@@ -1393,210 +1898,711 @@ export declare const StoreCommandSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
1393
1898
  breakdownDigest: z.ZodNullable<z.ZodString>;
1394
1899
  }, z.core.$strict>;
1395
1900
  }, z.core.$strict>, z.ZodObject<{
1396
- kind: z.ZodLiteral<"planning">;
1397
- revisionId: z.ZodUUID;
1398
- invocationId: z.ZodUUID;
1399
- }, z.core.$strict>], "kind">>;
1400
- observedRevision: z.ZodObject<{
1401
- planDigest: z.ZodString;
1402
- breakdownDigest: z.ZodNullable<z.ZodString>;
1403
- }, z.core.$strict>;
1404
- }, z.core.$strict>>>;
1405
- }, z.core.$strict>;
1406
- prepared: z.ZodObject<{
1407
- workspaceRoot: z.ZodOptional<z.ZodString>;
1408
- nativeId: z.ZodOptional<z.ZodString>;
1409
- text: z.ZodOptional<z.ZodString>;
1410
- skill: z.ZodOptional<z.ZodNullable<z.ZodObject<{
1411
- name: z.ZodString;
1412
- path: z.ZodNullable<z.ZodString>;
1413
- }, z.core.$strip>>>;
1414
- planContext: z.ZodOptional<z.ZodObject<{
1415
- directory: z.ZodString;
1416
- scope: z.ZodNullable<z.ZodDiscriminatedUnion<[z.ZodObject<{
1417
- kind: z.ZodLiteral<"execution">;
1901
+ kind: z.ZodLiteral<"planning">;
1902
+ revisionId: z.ZodUUID;
1903
+ invocationId: z.ZodUUID;
1904
+ }, z.core.$strict>], "kind">>;
1905
+ observedRevision: z.ZodObject<{
1906
+ planDigest: z.ZodString;
1907
+ breakdownDigest: z.ZodNullable<z.ZodString>;
1908
+ }, z.core.$strict>;
1909
+ }, z.core.$strict>>>;
1910
+ }, z.core.$strict>;
1911
+ prepared: z.ZodObject<{
1912
+ workspaceRoot: z.ZodOptional<z.ZodString>;
1913
+ nativeId: z.ZodOptional<z.ZodString>;
1914
+ text: z.ZodOptional<z.ZodString>;
1915
+ skill: z.ZodOptional<z.ZodNullable<z.ZodObject<{
1916
+ name: z.ZodString;
1917
+ path: z.ZodNullable<z.ZodString>;
1918
+ }, z.core.$strip>>>;
1919
+ planContext: z.ZodOptional<z.ZodObject<{
1920
+ directory: z.ZodString;
1921
+ scope: z.ZodNullable<z.ZodDiscriminatedUnion<[z.ZodObject<{
1922
+ kind: z.ZodLiteral<"execution">;
1923
+ authorizationId: z.ZodUUID;
1924
+ milestoneId: z.ZodNullable<z.ZodUUID>;
1925
+ mode: z.ZodEnum<{
1926
+ supervised: "supervised";
1927
+ auto: "auto";
1928
+ }>;
1929
+ revision: z.ZodObject<{
1930
+ planDigest: z.ZodString;
1931
+ breakdownDigest: z.ZodNullable<z.ZodString>;
1932
+ }, z.core.$strict>;
1933
+ }, z.core.$strict>, z.ZodObject<{
1934
+ kind: z.ZodLiteral<"planning">;
1935
+ revisionId: z.ZodUUID;
1936
+ invocationId: z.ZodUUID;
1937
+ }, z.core.$strict>], "kind">>;
1938
+ observedRevision: z.ZodObject<{
1939
+ planDigest: z.ZodString;
1940
+ breakdownDigest: z.ZodNullable<z.ZodString>;
1941
+ }, z.core.$strict>;
1942
+ }, z.core.$strict>>;
1943
+ }, z.core.$strict>;
1944
+ }, z.core.$strict>;
1945
+ }, z.core.$strict>, z.ZodObject<{
1946
+ kind: z.ZodLiteral<"outcome">;
1947
+ input: z.ZodDiscriminatedUnion<[z.ZodObject<{
1948
+ nativeId: z.ZodString;
1949
+ actionId: z.ZodUUID;
1950
+ requestId: z.ZodString;
1951
+ kind: z.ZodLiteral<"created">;
1952
+ }, z.core.$strict>, z.ZodObject<{
1953
+ nativeState: z.ZodEnum<{
1954
+ idle: "idle";
1955
+ notLoaded: "notLoaded";
1956
+ systemError: "systemError";
1957
+ active: "active";
1958
+ }>;
1959
+ actionId: z.ZodUUID;
1960
+ requestId: z.ZodString;
1961
+ kind: z.ZodLiteral<"resumed">;
1962
+ }, z.core.$strict>, z.ZodObject<{
1963
+ actionId: z.ZodUUID;
1964
+ requestId: z.ZodString;
1965
+ kind: z.ZodLiteral<"closed">;
1966
+ }, z.core.$strict>, z.ZodObject<{
1967
+ actionId: z.ZodUUID;
1968
+ requestId: z.ZodString;
1969
+ kind: z.ZodLiteral<"cleaned">;
1970
+ }, z.core.$strict>, z.ZodObject<{
1971
+ actionId: z.ZodUUID;
1972
+ requestId: z.ZodString;
1973
+ kind: z.ZodLiteral<"renamed">;
1974
+ }, z.core.$strict>, z.ZodObject<{
1975
+ nativeTurnId: z.ZodString;
1976
+ actionId: z.ZodUUID;
1977
+ requestId: z.ZodString;
1978
+ kind: z.ZodLiteral<"turn-accepted">;
1979
+ }, z.core.$strict>, z.ZodObject<{
1980
+ nativeTurnId: z.ZodString;
1981
+ actionId: z.ZodUUID;
1982
+ requestId: z.ZodString;
1983
+ kind: z.ZodLiteral<"steer-accepted">;
1984
+ }, z.core.$strict>, z.ZodObject<{
1985
+ actionId: z.ZodUUID;
1986
+ requestId: z.ZodString;
1987
+ kind: z.ZodLiteral<"interrupt-accepted">;
1988
+ }, z.core.$strict>, z.ZodObject<{
1989
+ actionId: z.ZodUUID;
1990
+ requestId: z.ZodString;
1991
+ kind: z.ZodLiteral<"reply-written">;
1992
+ }, z.core.$strict>, z.ZodObject<{
1993
+ actionId: z.ZodUUID;
1994
+ requestId: z.ZodString;
1995
+ kind: z.ZodLiteral<"uncertain">;
1996
+ }, z.core.$strict>, z.ZodObject<{
1997
+ failure: z.ZodEnum<{
1998
+ "state-conflict": "state-conflict";
1999
+ "access-denied": "access-denied";
2000
+ "agent-unavailable": "agent-unavailable";
2001
+ "operation-failed": "operation-failed";
2002
+ }>;
2003
+ actionId: z.ZodUUID;
2004
+ requestId: z.ZodString;
2005
+ kind: z.ZodLiteral<"failed">;
2006
+ }, z.core.$strict>], "kind">;
2007
+ }, z.core.$strict>, z.ZodObject<{
2008
+ kind: z.ZodLiteral<"observe">;
2009
+ input: z.ZodDiscriminatedUnion<[z.ZodObject<{
2010
+ provider: z.ZodEnum<{
2011
+ claude: "claude";
2012
+ codex: "codex";
2013
+ }>;
2014
+ nativeThreadId: z.ZodString;
2015
+ nativeTurnId: z.ZodString;
2016
+ kind: z.ZodLiteral<"turn-started">;
2017
+ }, z.core.$strict>, z.ZodObject<{
2018
+ state: z.ZodEnum<{
2019
+ completed: "completed";
2020
+ failed: "failed";
2021
+ interrupted: "interrupted";
2022
+ }>;
2023
+ provider: z.ZodEnum<{
2024
+ claude: "claude";
2025
+ codex: "codex";
2026
+ }>;
2027
+ nativeThreadId: z.ZodString;
2028
+ nativeTurnId: z.ZodString;
2029
+ kind: z.ZodLiteral<"turn-completed">;
2030
+ }, z.core.$strict>, z.ZodObject<{
2031
+ nativeItemId: z.ZodString;
2032
+ provider: z.ZodEnum<{
2033
+ claude: "claude";
2034
+ codex: "codex";
2035
+ }>;
2036
+ nativeThreadId: z.ZodString;
2037
+ nativeTurnId: z.ZodString;
2038
+ kind: z.ZodLiteral<"item-started">;
2039
+ }, z.core.$strict>, z.ZodObject<{
2040
+ nativeItemId: z.ZodString;
2041
+ provider: z.ZodEnum<{
2042
+ claude: "claude";
2043
+ codex: "codex";
2044
+ }>;
2045
+ nativeThreadId: z.ZodString;
2046
+ nativeTurnId: z.ZodString;
2047
+ kind: z.ZodLiteral<"item-completed">;
2048
+ }, z.core.$strict>, z.ZodObject<{
2049
+ kind: z.ZodLiteral<"name-updated">;
2050
+ provider: z.ZodEnum<{
2051
+ claude: "claude";
2052
+ codex: "codex";
2053
+ }>;
2054
+ nativeThreadId: z.ZodString;
2055
+ name: z.ZodNullable<z.ZodString>;
2056
+ }, z.core.$strict>, z.ZodObject<{
2057
+ kind: z.ZodEnum<{
2058
+ "request-resolved": "request-resolved";
2059
+ "request-canceled": "request-canceled";
2060
+ }>;
2061
+ provider: z.ZodEnum<{
2062
+ claude: "claude";
2063
+ codex: "codex";
2064
+ }>;
2065
+ nativeThreadId: z.ZodString;
2066
+ requestId: z.ZodString;
2067
+ }, z.core.$strict>, z.ZodObject<{
2068
+ kind: z.ZodLiteral<"native-unavailable">;
2069
+ provider: z.ZodEnum<{
2070
+ claude: "claude";
2071
+ codex: "codex";
2072
+ }>;
2073
+ nativeThreadId: z.ZodOptional<z.ZodString>;
2074
+ }, z.core.$strict>], "kind">;
2075
+ }, z.core.$strict>, z.ZodObject<{
2076
+ kind: z.ZodLiteral<"claim-queue">;
2077
+ threadId: z.ZodUUID;
2078
+ }, z.core.$strict>, z.ZodObject<{
2079
+ kind: z.ZodLiteral<"approval">;
2080
+ input: z.ZodObject<{
2081
+ provider: z.ZodEnum<{
2082
+ claude: "claude";
2083
+ codex: "codex";
2084
+ }>;
2085
+ id: z.ZodUUID;
2086
+ nativeThreadId: z.ZodString;
2087
+ nativeTurnId: z.ZodString;
2088
+ requestId: z.ZodString;
2089
+ kind: z.ZodEnum<{
2090
+ command: "command";
2091
+ permission: "permission";
2092
+ "file-change": "file-change";
2093
+ question: "question";
2094
+ }>;
2095
+ digest: z.ZodString;
2096
+ isBlocking: z.ZodBoolean;
2097
+ }, z.core.$strict>;
2098
+ }, z.core.$strict>, z.ZodObject<{
2099
+ kind: z.ZodLiteral<"release">;
2100
+ }, z.core.$strict>], "kind">;
2101
+ export type IStoreCommand = z.infer<typeof StoreCommandSchema>;
2102
+ export declare const StoreRequestSchema: z.ZodObject<{
2103
+ id: z.ZodNumber;
2104
+ command: z.ZodDiscriminatedUnion<[z.ZodObject<{
2105
+ kind: z.ZodLiteral<"browser-read">;
2106
+ id: z.ZodUUID;
2107
+ operatorId: z.ZodString;
2108
+ }, z.core.$strict>, z.ZodObject<{
2109
+ kind: z.ZodLiteral<"browser-admit">;
2110
+ action: z.ZodObject<{
2111
+ id: z.ZodUUID;
2112
+ runtimeEpoch: z.ZodUUID;
2113
+ command: z.ZodDiscriminatedUnion<[z.ZodObject<{
2114
+ kind: z.ZodLiteral<"native">;
2115
+ action: z.ZodObject<{
2116
+ id: z.ZodUUID;
2117
+ runtimeEpoch: z.ZodUUID;
2118
+ command: z.ZodDiscriminatedUnion<[z.ZodObject<{
2119
+ kind: z.ZodLiteral<"thread-create">;
2120
+ provider: z.ZodEnum<{
2121
+ claude: "claude";
2122
+ codex: "codex";
2123
+ }>;
2124
+ workspaceRoot: z.ZodString;
2125
+ name: z.ZodString;
2126
+ }, z.core.$strict>, z.ZodObject<{
2127
+ kind: z.ZodLiteral<"thread-adopt">;
2128
+ provider: z.ZodEnum<{
2129
+ claude: "claude";
2130
+ codex: "codex";
2131
+ }>;
2132
+ workspaceRoot: z.ZodString;
2133
+ nativeId: z.ZodString;
2134
+ name: z.ZodString;
2135
+ operatorConfirmation: z.ZodString;
2136
+ }, z.core.$strict>, z.ZodObject<{
2137
+ kind: z.ZodLiteral<"thread-resume">;
2138
+ threadId: z.ZodUUID;
2139
+ operatorConfirmation: z.ZodString;
2140
+ }, z.core.$strict>, z.ZodObject<{
2141
+ kind: z.ZodLiteral<"thread-close">;
2142
+ threadId: z.ZodUUID;
2143
+ }, z.core.$strict>, z.ZodObject<{
2144
+ kind: z.ZodLiteral<"thread-recover">;
2145
+ threadId: z.ZodUUID;
2146
+ recovery: z.ZodDiscriminatedUnion<[z.ZodObject<{
2147
+ kind: z.ZodLiteral<"resume">;
2148
+ }, z.core.$strict>, z.ZodObject<{
2149
+ kind: z.ZodLiteral<"attach">;
2150
+ nativeId: z.ZodString;
2151
+ }, z.core.$strict>, z.ZodObject<{
2152
+ kind: z.ZodLiteral<"create">;
2153
+ }, z.core.$strict>], "kind">;
2154
+ operatorConfirmation: z.ZodString;
2155
+ }, z.core.$strict>, z.ZodObject<{
2156
+ kind: z.ZodLiteral<"thread-rename">;
2157
+ threadId: z.ZodUUID;
2158
+ name: z.ZodString;
2159
+ }, z.core.$strict>, z.ZodObject<{
2160
+ kind: z.ZodLiteral<"message">;
2161
+ threadId: z.ZodUUID;
2162
+ input: z.ZodDiscriminatedUnion<[z.ZodObject<{
2163
+ kind: z.ZodLiteral<"text">;
2164
+ text: z.ZodString;
2165
+ }, z.core.$strict>, z.ZodObject<{
2166
+ kind: z.ZodLiteral<"skill">;
2167
+ skillId: z.ZodString;
2168
+ arguments: z.ZodString;
2169
+ }, z.core.$strict>], "kind">;
2170
+ }, z.core.$strict>, z.ZodObject<{
2171
+ text: z.ZodString;
2172
+ threadId: z.ZodUUID;
2173
+ expectedTurnId: z.ZodString;
2174
+ kind: z.ZodLiteral<"steer">;
2175
+ }, z.core.$strict>, z.ZodObject<{
2176
+ input: z.ZodDiscriminatedUnion<[z.ZodObject<{
2177
+ kind: z.ZodLiteral<"text">;
2178
+ text: z.ZodString;
2179
+ }, z.core.$strict>, z.ZodObject<{
2180
+ kind: z.ZodLiteral<"skill">;
2181
+ skillId: z.ZodString;
2182
+ arguments: z.ZodString;
2183
+ }, z.core.$strict>], "kind">;
2184
+ threadId: z.ZodUUID;
2185
+ expectedTurnId: z.ZodString;
2186
+ kind: z.ZodLiteral<"queue">;
2187
+ }, z.core.$strict>, z.ZodObject<{
2188
+ threadId: z.ZodUUID;
2189
+ expectedTurnId: z.ZodString;
2190
+ kind: z.ZodLiteral<"interrupt">;
2191
+ }, z.core.$strict>, z.ZodObject<{
2192
+ kind: z.ZodLiteral<"queue-send">;
2193
+ queuedActionId: z.ZodUUID;
2194
+ }, z.core.$strict>, z.ZodObject<{
2195
+ kind: z.ZodLiteral<"queue-cancel">;
2196
+ queuedActionId: z.ZodUUID;
2197
+ }, z.core.$strict>, z.ZodObject<{
2198
+ approvalId: z.ZodUUID;
2199
+ response: z.ZodDiscriminatedUnion<[z.ZodObject<{
2200
+ kind: z.ZodLiteral<"decision">;
2201
+ decision: z.ZodEnum<{
2202
+ accept: "accept";
2203
+ acceptForSession: "acceptForSession";
2204
+ decline: "decline";
2205
+ cancel: "cancel";
2206
+ }>;
2207
+ }, z.core.$strict>, z.ZodObject<{
2208
+ kind: z.ZodLiteral<"permission">;
2209
+ decision: z.ZodEnum<{
2210
+ accept: "accept";
2211
+ decline: "decline";
2212
+ }>;
2213
+ scope: z.ZodEnum<{
2214
+ turn: "turn";
2215
+ session: "session";
2216
+ }>;
2217
+ }, z.core.$strict>, z.ZodObject<{
2218
+ kind: z.ZodLiteral<"answers">;
2219
+ answers: z.ZodPipe<z.ZodRecord<z.ZodString, z.ZodArray<z.ZodString>>, z.ZodTransform<{
2220
+ [k: string]: string[];
2221
+ }, Record<string, string[]>>>;
2222
+ }, z.core.$strict>], "kind">;
2223
+ threadId: z.ZodUUID;
2224
+ expectedTurnId: z.ZodString;
2225
+ kind: z.ZodLiteral<"native-reply">;
2226
+ }, z.core.$strict>], "kind">;
2227
+ plan: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
2228
+ kind: z.ZodLiteral<"execution">;
2229
+ authorizationId: z.ZodUUID;
2230
+ milestoneId: z.ZodNullable<z.ZodUUID>;
2231
+ mode: z.ZodEnum<{
2232
+ supervised: "supervised";
2233
+ auto: "auto";
2234
+ }>;
2235
+ revision: z.ZodObject<{
2236
+ planDigest: z.ZodString;
2237
+ breakdownDigest: z.ZodNullable<z.ZodString>;
2238
+ }, z.core.$strict>;
2239
+ }, z.core.$strict>, z.ZodObject<{
2240
+ kind: z.ZodLiteral<"planning">;
2241
+ revisionId: z.ZodUUID;
2242
+ invocationId: z.ZodUUID;
2243
+ }, z.core.$strict>], "kind">>;
2244
+ expectedPlan: z.ZodOptional<z.ZodNullable<z.ZodObject<{
2245
+ directory: z.ZodString;
2246
+ scope: z.ZodNullable<z.ZodDiscriminatedUnion<[z.ZodObject<{
2247
+ kind: z.ZodLiteral<"execution">;
2248
+ authorizationId: z.ZodUUID;
2249
+ milestoneId: z.ZodNullable<z.ZodUUID>;
2250
+ mode: z.ZodEnum<{
2251
+ supervised: "supervised";
2252
+ auto: "auto";
2253
+ }>;
2254
+ revision: z.ZodObject<{
2255
+ planDigest: z.ZodString;
2256
+ breakdownDigest: z.ZodNullable<z.ZodString>;
2257
+ }, z.core.$strict>;
2258
+ }, z.core.$strict>, z.ZodObject<{
2259
+ kind: z.ZodLiteral<"planning">;
2260
+ revisionId: z.ZodUUID;
2261
+ invocationId: z.ZodUUID;
2262
+ }, z.core.$strict>], "kind">>;
2263
+ observedRevision: z.ZodObject<{
2264
+ planDigest: z.ZodString;
2265
+ breakdownDigest: z.ZodNullable<z.ZodString>;
2266
+ }, z.core.$strict>;
2267
+ }, z.core.$strict>>>;
2268
+ }, z.core.$strict>;
2269
+ }, z.core.$strict>, z.ZodObject<{
2270
+ kind: z.ZodLiteral<"plan">;
2271
+ command: z.ZodDiscriminatedUnion<[z.ZodObject<{
2272
+ kind: z.ZodLiteral<"status">;
2273
+ target: z.ZodObject<{
2274
+ directory: z.ZodString;
2275
+ }, z.core.$strict>;
2276
+ }, z.core.$strict>, z.ZodObject<{
2277
+ kind: z.ZodLiteral<"milestones">;
2278
+ target: z.ZodObject<{
2279
+ directory: z.ZodString;
2280
+ }, z.core.$strict>;
2281
+ limit: z.ZodDefault<z.ZodNumber>;
2282
+ cursor: z.ZodOptional<z.ZodString>;
2283
+ }, z.core.$strict>, z.ZodObject<{
2284
+ confirmation: z.ZodOptional<z.ZodObject<{
2285
+ proposalId: z.ZodUUID;
2286
+ decisions: z.ZodArray<z.ZodObject<{
2287
+ sourceIds: z.ZodArray<z.ZodUUID>;
2288
+ targetIds: z.ZodArray<z.ZodUUID>;
2289
+ relation: z.ZodEnum<{
2290
+ equivalent: "equivalent";
2291
+ "requirements-changed": "requirements-changed";
2292
+ omitted: "omitted";
2293
+ reopened: "reopened";
2294
+ }>;
2295
+ retainedPairs: z.ZodArray<z.ZodObject<{
2296
+ sourceId: z.ZodUUID;
2297
+ targetId: z.ZodUUID;
2298
+ }, z.core.$strict>>;
2299
+ }, z.core.$strict>>;
2300
+ }, z.core.$strict>>;
2301
+ target: z.ZodObject<{
2302
+ directory: z.ZodString;
2303
+ }, z.core.$strict>;
2304
+ action: z.ZodObject<{
2305
+ id: z.ZodUUID;
2306
+ operatorId: z.ZodString;
2307
+ source: z.ZodObject<{
2308
+ kind: z.ZodEnum<{
2309
+ "user-action": "user-action";
2310
+ "user-message": "user-message";
2311
+ }>;
2312
+ reference: z.ZodString;
2313
+ }, z.core.$strict>;
2314
+ }, z.core.$strict>;
2315
+ expected: z.ZodObject<{
2316
+ planDigest: z.ZodString;
2317
+ breakdownDigest: z.ZodNullable<z.ZodString>;
2318
+ }, z.core.$strict>;
2319
+ kind: z.ZodLiteral<"finalize">;
2320
+ }, z.core.$strict>, z.ZodObject<{
2321
+ milestoneId: z.ZodNullable<z.ZodUUID>;
2322
+ checks: z.ZodArray<z.ZodObject<{
2323
+ command: z.ZodString;
2324
+ outcome: z.ZodLiteral<"passed">;
2325
+ reference: z.ZodString;
2326
+ }, z.core.$strict>>;
2327
+ checkouts: z.ZodArray<z.ZodObject<{
2328
+ repository: z.ZodString;
2329
+ directory: z.ZodString;
2330
+ claimReference: z.ZodString;
2331
+ paths: z.ZodArray<z.ZodString>;
2332
+ }, z.core.$strict>>;
2333
+ target: z.ZodObject<{
2334
+ directory: z.ZodString;
2335
+ }, z.core.$strict>;
2336
+ action: z.ZodObject<{
2337
+ id: z.ZodUUID;
2338
+ operatorId: z.ZodString;
2339
+ source: z.ZodObject<{
2340
+ kind: z.ZodEnum<{
2341
+ "user-action": "user-action";
2342
+ "user-message": "user-message";
2343
+ }>;
2344
+ reference: z.ZodString;
2345
+ }, z.core.$strict>;
2346
+ }, z.core.$strict>;
2347
+ expected: z.ZodObject<{
2348
+ planDigest: z.ZodString;
2349
+ breakdownDigest: z.ZodNullable<z.ZodString>;
2350
+ }, z.core.$strict>;
2351
+ kind: z.ZodLiteral<"complete">;
2352
+ }, z.core.$strict>, z.ZodObject<{
2353
+ intent: z.ZodEnum<{
2354
+ plan: "plan";
2355
+ breakdown: "breakdown";
2356
+ }>;
2357
+ threadIds: z.ZodArray<z.ZodUUID>;
2358
+ checkouts: z.ZodArray<z.ZodObject<{
2359
+ repository: z.ZodString;
2360
+ directory: z.ZodString;
2361
+ claimReference: z.ZodString;
2362
+ paths: z.ZodArray<z.ZodString>;
2363
+ }, z.core.$strict>>;
2364
+ target: z.ZodObject<{
2365
+ directory: z.ZodString;
2366
+ }, z.core.$strict>;
2367
+ action: z.ZodObject<{
2368
+ id: z.ZodUUID;
2369
+ operatorId: z.ZodString;
2370
+ source: z.ZodObject<{
2371
+ kind: z.ZodEnum<{
2372
+ "user-action": "user-action";
2373
+ "user-message": "user-message";
2374
+ }>;
2375
+ reference: z.ZodString;
2376
+ }, z.core.$strict>;
2377
+ }, z.core.$strict>;
2378
+ expected: z.ZodObject<{
2379
+ planDigest: z.ZodString;
2380
+ breakdownDigest: z.ZodNullable<z.ZodString>;
2381
+ }, z.core.$strict>;
2382
+ kind: z.ZodLiteral<"begin-revision">;
2383
+ }, z.core.$strict>, z.ZodObject<{
2384
+ revisionId: z.ZodUUID;
2385
+ skill: z.ZodEnum<{
2386
+ "jg-plan": "jg-plan";
2387
+ "jg-breakdown": "jg-breakdown";
2388
+ }>;
2389
+ target: z.ZodObject<{
2390
+ directory: z.ZodString;
2391
+ }, z.core.$strict>;
2392
+ action: z.ZodObject<{
2393
+ id: z.ZodUUID;
2394
+ operatorId: z.ZodString;
2395
+ source: z.ZodObject<{
2396
+ kind: z.ZodEnum<{
2397
+ "user-action": "user-action";
2398
+ "user-message": "user-message";
2399
+ }>;
2400
+ reference: z.ZodString;
2401
+ }, z.core.$strict>;
2402
+ }, z.core.$strict>;
2403
+ expected: z.ZodObject<{
2404
+ planDigest: z.ZodString;
2405
+ breakdownDigest: z.ZodNullable<z.ZodString>;
2406
+ }, z.core.$strict>;
2407
+ kind: z.ZodLiteral<"revision-invoke">;
2408
+ }, z.core.$strict>, z.ZodObject<{
2409
+ kind: z.ZodLiteral<"reconciliation">;
2410
+ target: z.ZodObject<{
2411
+ directory: z.ZodString;
2412
+ }, z.core.$strict>;
2413
+ collection: z.ZodEnum<{
2414
+ drafts: "drafts";
2415
+ sources: "sources";
2416
+ evidence: "evidence";
2417
+ correspondences: "correspondences";
2418
+ }>;
2419
+ limit: z.ZodDefault<z.ZodNumber>;
2420
+ cursor: z.ZodOptional<z.ZodString>;
2421
+ }, z.core.$strict>, z.ZodObject<{
2422
+ scope: z.ZodEnum<{
2423
+ plan: "plan";
2424
+ sequence: "sequence";
2425
+ }>;
2426
+ presentationHash: z.ZodString;
2427
+ target: z.ZodObject<{
2428
+ directory: z.ZodString;
2429
+ }, z.core.$strict>;
2430
+ action: z.ZodObject<{
2431
+ id: z.ZodUUID;
2432
+ operatorId: z.ZodString;
2433
+ source: z.ZodObject<{
2434
+ kind: z.ZodEnum<{
2435
+ "user-action": "user-action";
2436
+ "user-message": "user-message";
2437
+ }>;
2438
+ reference: z.ZodString;
2439
+ }, z.core.$strict>;
2440
+ }, z.core.$strict>;
2441
+ expected: z.ZodObject<{
2442
+ planDigest: z.ZodString;
2443
+ breakdownDigest: z.ZodNullable<z.ZodString>;
2444
+ }, z.core.$strict>;
2445
+ kind: z.ZodLiteral<"approve">;
2446
+ }, z.core.$strict>, z.ZodObject<{
2447
+ scope: z.ZodEnum<{
2448
+ plan: "plan";
2449
+ sequence: "sequence";
2450
+ execution: "execution";
2451
+ all: "all";
2452
+ }>;
2453
+ target: z.ZodObject<{
2454
+ directory: z.ZodString;
2455
+ }, z.core.$strict>;
2456
+ action: z.ZodObject<{
2457
+ id: z.ZodUUID;
2458
+ operatorId: z.ZodString;
2459
+ source: z.ZodObject<{
2460
+ kind: z.ZodEnum<{
2461
+ "user-action": "user-action";
2462
+ "user-message": "user-message";
2463
+ }>;
2464
+ reference: z.ZodString;
2465
+ }, z.core.$strict>;
2466
+ }, z.core.$strict>;
2467
+ expected: z.ZodObject<{
2468
+ planDigest: z.ZodString;
2469
+ breakdownDigest: z.ZodNullable<z.ZodString>;
2470
+ }, z.core.$strict>;
2471
+ kind: z.ZodLiteral<"revoke">;
2472
+ }, z.core.$strict>, z.ZodObject<{
2473
+ mode: z.ZodEnum<{
2474
+ supervised: "supervised";
2475
+ auto: "auto";
2476
+ }>;
2477
+ milestoneIds: z.ZodArray<z.ZodUUID>;
2478
+ target: z.ZodObject<{
2479
+ directory: z.ZodString;
2480
+ }, z.core.$strict>;
2481
+ action: z.ZodObject<{
2482
+ id: z.ZodUUID;
2483
+ operatorId: z.ZodString;
2484
+ source: z.ZodObject<{
2485
+ kind: z.ZodEnum<{
2486
+ "user-action": "user-action";
2487
+ "user-message": "user-message";
2488
+ }>;
2489
+ reference: z.ZodString;
2490
+ }, z.core.$strict>;
2491
+ }, z.core.$strict>;
2492
+ expected: z.ZodObject<{
2493
+ planDigest: z.ZodString;
2494
+ breakdownDigest: z.ZodNullable<z.ZodString>;
2495
+ }, z.core.$strict>;
2496
+ kind: z.ZodLiteral<"authorize">;
2497
+ }, z.core.$strict>, z.ZodObject<{
2498
+ kind: z.ZodLiteral<"check-execution">;
2499
+ target: z.ZodObject<{
2500
+ directory: z.ZodString;
2501
+ }, z.core.$strict>;
2502
+ expected: z.ZodObject<{
2503
+ planDigest: z.ZodString;
2504
+ breakdownDigest: z.ZodNullable<z.ZodString>;
2505
+ }, z.core.$strict>;
1418
2506
  authorizationId: z.ZodUUID;
1419
- milestoneId: z.ZodUUID;
2507
+ milestoneId: z.ZodNullable<z.ZodUUID>;
1420
2508
  mode: z.ZodEnum<{
1421
2509
  supervised: "supervised";
1422
2510
  auto: "auto";
1423
2511
  }>;
1424
- revision: z.ZodObject<{
1425
- planDigest: z.ZodString;
1426
- breakdownDigest: z.ZodNullable<z.ZodString>;
1427
- }, z.core.$strict>;
2512
+ }, z.core.$strict>], "kind">;
2513
+ }, z.core.$strict>, z.ZodObject<{
2514
+ kind: z.ZodLiteral<"handoff">;
2515
+ command: z.ZodDiscriminatedUnion<[z.ZodObject<{
2516
+ kind: z.ZodLiteral<"create">;
2517
+ id: z.ZodUUID;
2518
+ runtimeEpoch: z.ZodUUID;
2519
+ sourceThreadId: z.ZodUUID;
2520
+ purpose: z.ZodEnum<{
2521
+ review: "review";
2522
+ challenge: "challenge";
2523
+ }>;
2524
+ commit: z.ZodDefault<z.ZodNullable<z.ZodString>>;
1428
2525
  }, z.core.$strict>, z.ZodObject<{
1429
- kind: z.ZodLiteral<"planning">;
1430
- revisionId: z.ZodUUID;
1431
- invocationId: z.ZodUUID;
1432
- }, z.core.$strict>], "kind">>;
1433
- observedRevision: z.ZodObject<{
2526
+ kind: z.ZodLiteral<"show">;
2527
+ id: z.ZodUUID;
2528
+ }, z.core.$strict>, z.ZodObject<{
2529
+ kind: z.ZodLiteral<"preview">;
2530
+ id: z.ZodUUID;
2531
+ phase: z.ZodEnum<{
2532
+ review: "review";
2533
+ feedback: "feedback";
2534
+ }>;
2535
+ }, z.core.$strict>, z.ZodObject<{
2536
+ kind: z.ZodLiteral<"send">;
2537
+ id: z.ZodUUID;
2538
+ phase: z.ZodEnum<{
2539
+ review: "review";
2540
+ feedback: "feedback";
2541
+ }>;
2542
+ expectedPreviewDigest: z.ZodString;
2543
+ }, z.core.$strict>, z.ZodObject<{
2544
+ kind: z.ZodLiteral<"collect">;
2545
+ id: z.ZodUUID;
2546
+ turnId: z.ZodString;
2547
+ itemId: z.ZodString;
2548
+ limit: z.ZodDefault<z.ZodNumber>;
2549
+ cursor: z.ZodOptional<z.ZodString>;
2550
+ }, z.core.$strict>, z.ZodObject<{
2551
+ kind: z.ZodLiteral<"list">;
2552
+ workspaceRoot: z.ZodString;
2553
+ sourceThreadId: z.ZodOptional<z.ZodUUID>;
2554
+ limit: z.ZodDefault<z.ZodNumber>;
2555
+ cursor: z.ZodOptional<z.ZodString>;
2556
+ }, z.core.$strict>], "kind">;
2557
+ }, z.core.$strict>, z.ZodObject<{
2558
+ kind: z.ZodLiteral<"priority">;
2559
+ target: z.ZodObject<{
2560
+ directory: z.ZodString;
2561
+ }, z.core.$strict>;
2562
+ expectedRevision: z.ZodObject<{
1434
2563
  planDigest: z.ZodString;
1435
2564
  breakdownDigest: z.ZodNullable<z.ZodString>;
1436
2565
  }, z.core.$strict>;
1437
- }, z.core.$strict>>;
2566
+ priority: z.ZodEnum<{
2567
+ P0: "P0";
2568
+ P1: "P1";
2569
+ P2: "P2";
2570
+ P3: "P3";
2571
+ }>;
2572
+ reason: z.ZodString;
2573
+ }, z.core.$strict>, z.ZodObject<{
2574
+ kind: z.ZodLiteral<"error-reservation">;
2575
+ target: z.ZodObject<{
2576
+ directory: z.ZodString;
2577
+ }, z.core.$strict>;
2578
+ expectedRevision: z.ZodObject<{
2579
+ planDigest: z.ZodString;
2580
+ breakdownDigest: z.ZodNullable<z.ZodString>;
2581
+ }, z.core.$strict>;
2582
+ reservation: z.ZodObject<{
2583
+ repository: z.ZodString;
2584
+ namespace: z.ZodString;
2585
+ start: z.ZodNumber;
2586
+ end: z.ZodNumber;
2587
+ registryPath: z.ZodString;
2588
+ purpose: z.ZodString;
2589
+ }, z.core.$strict>;
2590
+ release: z.ZodBoolean;
2591
+ }, z.core.$strict>, z.ZodObject<{
2592
+ kind: z.ZodLiteral<"publication-retry">;
2593
+ expectedCommit: z.ZodString;
2594
+ }, z.core.$strict>], "kind">;
1438
2595
  }, z.core.$strict>;
1439
- }, z.core.$strict>;
1440
- }, z.core.$strict>, z.ZodObject<{
1441
- kind: z.ZodLiteral<"outcome">;
1442
- input: z.ZodDiscriminatedUnion<[z.ZodObject<{
1443
- nativeId: z.ZodString;
1444
- actionId: z.ZodUUID;
1445
- requestId: z.ZodString;
1446
- kind: z.ZodLiteral<"created">;
1447
- }, z.core.$strict>, z.ZodObject<{
1448
- nativeState: z.ZodEnum<{
1449
- idle: "idle";
1450
- notLoaded: "notLoaded";
1451
- systemError: "systemError";
1452
- active: "active";
1453
- }>;
1454
- actionId: z.ZodUUID;
1455
- requestId: z.ZodString;
1456
- kind: z.ZodLiteral<"resumed">;
1457
- }, z.core.$strict>, z.ZodObject<{
1458
- actionId: z.ZodUUID;
1459
- requestId: z.ZodString;
1460
- kind: z.ZodLiteral<"closed">;
1461
- }, z.core.$strict>, z.ZodObject<{
1462
- actionId: z.ZodUUID;
1463
- requestId: z.ZodString;
1464
- kind: z.ZodLiteral<"cleaned">;
1465
- }, z.core.$strict>, z.ZodObject<{
1466
- actionId: z.ZodUUID;
1467
- requestId: z.ZodString;
1468
- kind: z.ZodLiteral<"renamed">;
1469
- }, z.core.$strict>, z.ZodObject<{
1470
- nativeTurnId: z.ZodString;
1471
- actionId: z.ZodUUID;
1472
- requestId: z.ZodString;
1473
- kind: z.ZodLiteral<"turn-accepted">;
1474
- }, z.core.$strict>, z.ZodObject<{
1475
- nativeTurnId: z.ZodString;
1476
- actionId: z.ZodUUID;
1477
- requestId: z.ZodString;
1478
- kind: z.ZodLiteral<"steer-accepted">;
1479
- }, z.core.$strict>, z.ZodObject<{
1480
- actionId: z.ZodUUID;
1481
- requestId: z.ZodString;
1482
- kind: z.ZodLiteral<"interrupt-accepted">;
1483
- }, z.core.$strict>, z.ZodObject<{
1484
- actionId: z.ZodUUID;
1485
- requestId: z.ZodString;
1486
- kind: z.ZodLiteral<"reply-written">;
1487
- }, z.core.$strict>, z.ZodObject<{
1488
- actionId: z.ZodUUID;
1489
- requestId: z.ZodString;
1490
- kind: z.ZodLiteral<"uncertain">;
1491
- }, z.core.$strict>, z.ZodObject<{
1492
- failure: z.ZodEnum<{
1493
- "state-conflict": "state-conflict";
1494
- "access-denied": "access-denied";
1495
- "agent-unavailable": "agent-unavailable";
1496
- "operation-failed": "operation-failed";
1497
- }>;
1498
- actionId: z.ZodUUID;
1499
- requestId: z.ZodString;
1500
- kind: z.ZodLiteral<"failed">;
1501
- }, z.core.$strict>], "kind">;
1502
- }, z.core.$strict>, z.ZodObject<{
1503
- kind: z.ZodLiteral<"observe">;
1504
- input: z.ZodDiscriminatedUnion<[z.ZodObject<{
1505
- provider: z.ZodEnum<{
1506
- claude: "claude";
1507
- codex: "codex";
1508
- }>;
1509
- nativeThreadId: z.ZodString;
1510
- nativeTurnId: z.ZodString;
1511
- kind: z.ZodLiteral<"turn-started">;
2596
+ operatorId: z.ZodString;
1512
2597
  }, z.core.$strict>, z.ZodObject<{
2598
+ kind: z.ZodLiteral<"browser-settle">;
2599
+ id: z.ZodUUID;
2600
+ operatorId: z.ZodString;
1513
2601
  state: z.ZodEnum<{
1514
- completed: "completed";
1515
- failed: "failed";
1516
- interrupted: "interrupted";
1517
- }>;
1518
- provider: z.ZodEnum<{
1519
- claude: "claude";
1520
- codex: "codex";
1521
- }>;
1522
- nativeThreadId: z.ZodString;
1523
- nativeTurnId: z.ZodString;
1524
- kind: z.ZodLiteral<"turn-completed">;
1525
- }, z.core.$strict>, z.ZodObject<{
1526
- nativeItemId: z.ZodString;
1527
- provider: z.ZodEnum<{
1528
- claude: "claude";
1529
- codex: "codex";
1530
- }>;
1531
- nativeThreadId: z.ZodString;
1532
- nativeTurnId: z.ZodString;
1533
- kind: z.ZodLiteral<"item-started">;
1534
- }, z.core.$strict>, z.ZodObject<{
1535
- nativeItemId: z.ZodString;
1536
- provider: z.ZodEnum<{
1537
- claude: "claude";
1538
- codex: "codex";
1539
- }>;
1540
- nativeThreadId: z.ZodString;
1541
- nativeTurnId: z.ZodString;
1542
- kind: z.ZodLiteral<"item-completed">;
1543
- }, z.core.$strict>, z.ZodObject<{
1544
- kind: z.ZodLiteral<"name-updated">;
1545
- provider: z.ZodEnum<{
1546
- claude: "claude";
1547
- codex: "codex";
1548
- }>;
1549
- nativeThreadId: z.ZodString;
1550
- name: z.ZodNullable<z.ZodString>;
1551
- }, z.core.$strict>, z.ZodObject<{
1552
- kind: z.ZodEnum<{
1553
- "request-resolved": "request-resolved";
1554
- "request-canceled": "request-canceled";
1555
- }>;
1556
- provider: z.ZodEnum<{
1557
- claude: "claude";
1558
- codex: "codex";
2602
+ acknowledged: "acknowledged";
2603
+ uncertain: "uncertain";
1559
2604
  }>;
1560
- nativeThreadId: z.ZodString;
1561
- requestId: z.ZodString;
1562
2605
  }, z.core.$strict>, z.ZodObject<{
1563
- kind: z.ZodLiteral<"native-unavailable">;
1564
- provider: z.ZodEnum<{
1565
- claude: "claude";
1566
- codex: "codex";
1567
- }>;
1568
- nativeThreadId: z.ZodOptional<z.ZodString>;
1569
- }, z.core.$strict>], "kind">;
1570
- }, z.core.$strict>, z.ZodObject<{
1571
- kind: z.ZodLiteral<"claim-queue">;
1572
- threadId: z.ZodUUID;
1573
- }, z.core.$strict>, z.ZodObject<{
1574
- kind: z.ZodLiteral<"approval">;
1575
- input: z.ZodObject<{
1576
- provider: z.ZodEnum<{
1577
- claude: "claude";
1578
- codex: "codex";
1579
- }>;
1580
- id: z.ZodUUID;
1581
- nativeThreadId: z.ZodString;
1582
- nativeTurnId: z.ZodString;
1583
- requestId: z.ZodString;
1584
- kind: z.ZodEnum<{
1585
- command: "command";
1586
- permission: "permission";
1587
- "file-change": "file-change";
1588
- question: "question";
1589
- }>;
1590
- digest: z.ZodString;
1591
- isBlocking: z.ZodBoolean;
1592
- }, z.core.$strict>;
1593
- }, z.core.$strict>, z.ZodObject<{
1594
- kind: z.ZodLiteral<"release">;
1595
- }, z.core.$strict>], "kind">;
1596
- export type IStoreCommand = z.infer<typeof StoreCommandSchema>;
1597
- export declare const StoreRequestSchema: z.ZodObject<{
1598
- id: z.ZodNumber;
1599
- command: z.ZodDiscriminatedUnion<[z.ZodObject<{
1600
2606
  kind: z.ZodLiteral<"handoff-read">;
1601
2607
  id: z.ZodUUID;
1602
2608
  }, z.core.$strict>, z.ZodObject<{
@@ -1621,7 +2627,7 @@ export declare const StoreRequestSchema: z.ZodObject<{
1621
2627
  scope: z.ZodNullable<z.ZodDiscriminatedUnion<[z.ZodObject<{
1622
2628
  kind: z.ZodLiteral<"execution">;
1623
2629
  authorizationId: z.ZodUUID;
1624
- milestoneId: z.ZodUUID;
2630
+ milestoneId: z.ZodNullable<z.ZodUUID>;
1625
2631
  mode: z.ZodEnum<{
1626
2632
  supervised: "supervised";
1627
2633
  auto: "auto";
@@ -1757,7 +2763,7 @@ export declare const StoreRequestSchema: z.ZodObject<{
1757
2763
  plan: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
1758
2764
  kind: z.ZodLiteral<"execution">;
1759
2765
  authorizationId: z.ZodUUID;
1760
- milestoneId: z.ZodUUID;
2766
+ milestoneId: z.ZodNullable<z.ZodUUID>;
1761
2767
  mode: z.ZodEnum<{
1762
2768
  supervised: "supervised";
1763
2769
  auto: "auto";
@@ -1776,7 +2782,7 @@ export declare const StoreRequestSchema: z.ZodObject<{
1776
2782
  scope: z.ZodNullable<z.ZodDiscriminatedUnion<[z.ZodObject<{
1777
2783
  kind: z.ZodLiteral<"execution">;
1778
2784
  authorizationId: z.ZodUUID;
1779
- milestoneId: z.ZodUUID;
2785
+ milestoneId: z.ZodNullable<z.ZodUUID>;
1780
2786
  mode: z.ZodEnum<{
1781
2787
  supervised: "supervised";
1782
2788
  auto: "auto";
@@ -1943,7 +2949,7 @@ export declare const StoreRequestSchema: z.ZodObject<{
1943
2949
  plan: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
1944
2950
  kind: z.ZodLiteral<"execution">;
1945
2951
  authorizationId: z.ZodUUID;
1946
- milestoneId: z.ZodUUID;
2952
+ milestoneId: z.ZodNullable<z.ZodUUID>;
1947
2953
  mode: z.ZodEnum<{
1948
2954
  supervised: "supervised";
1949
2955
  auto: "auto";
@@ -1962,7 +2968,7 @@ export declare const StoreRequestSchema: z.ZodObject<{
1962
2968
  scope: z.ZodNullable<z.ZodDiscriminatedUnion<[z.ZodObject<{
1963
2969
  kind: z.ZodLiteral<"execution">;
1964
2970
  authorizationId: z.ZodUUID;
1965
- milestoneId: z.ZodUUID;
2971
+ milestoneId: z.ZodNullable<z.ZodUUID>;
1966
2972
  mode: z.ZodEnum<{
1967
2973
  supervised: "supervised";
1968
2974
  auto: "auto";
@@ -2059,7 +3065,7 @@ export declare const StoreRequestSchema: z.ZodObject<{
2059
3065
  }, z.core.$strict>;
2060
3066
  kind: z.ZodLiteral<"finalize">;
2061
3067
  }, z.core.$strict>, z.ZodObject<{
2062
- milestoneId: z.ZodUUID;
3068
+ milestoneId: z.ZodNullable<z.ZodUUID>;
2063
3069
  checks: z.ZodArray<z.ZodObject<{
2064
3070
  command: z.ZodString;
2065
3071
  outcome: z.ZodLiteral<"passed">;
@@ -2245,7 +3251,7 @@ export declare const StoreRequestSchema: z.ZodObject<{
2245
3251
  breakdownDigest: z.ZodNullable<z.ZodString>;
2246
3252
  }, z.core.$strict>;
2247
3253
  authorizationId: z.ZodUUID;
2248
- milestoneId: z.ZodUUID;
3254
+ milestoneId: z.ZodNullable<z.ZodUUID>;
2249
3255
  mode: z.ZodEnum<{
2250
3256
  supervised: "supervised";
2251
3257
  auto: "auto";
@@ -2470,7 +3476,7 @@ export declare const StoreRequestSchema: z.ZodObject<{
2470
3476
  plan: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
2471
3477
  kind: z.ZodLiteral<"execution">;
2472
3478
  authorizationId: z.ZodUUID;
2473
- milestoneId: z.ZodUUID;
3479
+ milestoneId: z.ZodNullable<z.ZodUUID>;
2474
3480
  mode: z.ZodEnum<{
2475
3481
  supervised: "supervised";
2476
3482
  auto: "auto";
@@ -2489,7 +3495,7 @@ export declare const StoreRequestSchema: z.ZodObject<{
2489
3495
  scope: z.ZodNullable<z.ZodDiscriminatedUnion<[z.ZodObject<{
2490
3496
  kind: z.ZodLiteral<"execution">;
2491
3497
  authorizationId: z.ZodUUID;
2492
- milestoneId: z.ZodUUID;
3498
+ milestoneId: z.ZodNullable<z.ZodUUID>;
2493
3499
  mode: z.ZodEnum<{
2494
3500
  supervised: "supervised";
2495
3501
  auto: "auto";
@@ -2520,6 +3526,9 @@ export declare const StoreRequestSchema: z.ZodObject<{
2520
3526
  }, z.core.$strict>, z.ZodObject<{
2521
3527
  kind: z.ZodLiteral<"managed-thread">;
2522
3528
  threadId: z.ZodUUID;
3529
+ }, z.core.$strict>, z.ZodObject<{
3530
+ kind: z.ZodLiteral<"thread-plan">;
3531
+ threadId: z.ZodUUID;
2523
3532
  }, z.core.$strict>, z.ZodObject<{
2524
3533
  kind: z.ZodLiteral<"managed-thread-name">;
2525
3534
  name: z.ZodString;
@@ -2542,6 +3551,7 @@ export declare const StoreRequestSchema: z.ZodObject<{
2542
3551
  }, z.core.$strict>, z.ZodObject<{
2543
3552
  kind: z.ZodLiteral<"live-items">;
2544
3553
  threadId: z.ZodUUID;
3554
+ afterRevision: z.ZodOptional<z.ZodNumber>;
2545
3555
  }, z.core.$strict>], "kind">;
2546
3556
  }, z.core.$strict>, z.ZodObject<{
2547
3557
  kind: z.ZodLiteral<"remember">;
@@ -2634,7 +3644,7 @@ export declare const StoreRequestSchema: z.ZodObject<{
2634
3644
  reference: z.ZodString;
2635
3645
  }, z.core.$strict>;
2636
3646
  }, z.core.$strict>;
2637
- milestoneId: z.ZodUUID;
3647
+ milestoneId: z.ZodNullable<z.ZodUUID>;
2638
3648
  revision: z.ZodObject<{
2639
3649
  planDigest: z.ZodString;
2640
3650
  breakdownDigest: z.ZodNullable<z.ZodString>;
@@ -2642,7 +3652,7 @@ export declare const StoreRequestSchema: z.ZodObject<{
2642
3652
  contractDigest: z.ZodString;
2643
3653
  title: z.ZodString;
2644
3654
  contract: z.ZodString;
2645
- sharedDigest: z.ZodString;
3655
+ sharedDigest: z.ZodNullable<z.ZodString>;
2646
3656
  checkouts: z.ZodArray<z.ZodObject<{
2647
3657
  repository: z.ZodString;
2648
3658
  directory: z.ZodString;
@@ -2955,7 +3965,7 @@ export declare const StoreRequestSchema: z.ZodObject<{
2955
3965
  plan: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
2956
3966
  kind: z.ZodLiteral<"execution">;
2957
3967
  authorizationId: z.ZodUUID;
2958
- milestoneId: z.ZodUUID;
3968
+ milestoneId: z.ZodNullable<z.ZodUUID>;
2959
3969
  mode: z.ZodEnum<{
2960
3970
  supervised: "supervised";
2961
3971
  auto: "auto";
@@ -2974,7 +3984,7 @@ export declare const StoreRequestSchema: z.ZodObject<{
2974
3984
  scope: z.ZodNullable<z.ZodDiscriminatedUnion<[z.ZodObject<{
2975
3985
  kind: z.ZodLiteral<"execution">;
2976
3986
  authorizationId: z.ZodUUID;
2977
- milestoneId: z.ZodUUID;
3987
+ milestoneId: z.ZodNullable<z.ZodUUID>;
2978
3988
  mode: z.ZodEnum<{
2979
3989
  supervised: "supervised";
2980
3990
  auto: "auto";
@@ -3007,7 +4017,7 @@ export declare const StoreRequestSchema: z.ZodObject<{
3007
4017
  scope: z.ZodNullable<z.ZodDiscriminatedUnion<[z.ZodObject<{
3008
4018
  kind: z.ZodLiteral<"execution">;
3009
4019
  authorizationId: z.ZodUUID;
3010
- milestoneId: z.ZodUUID;
4020
+ milestoneId: z.ZodNullable<z.ZodUUID>;
3011
4021
  mode: z.ZodEnum<{
3012
4022
  supervised: "supervised";
3013
4023
  auto: "auto";
@@ -3211,6 +4221,31 @@ export declare const StoreWorkerSchema: z.ZodObject<{
3211
4221
  }, z.core.$strict>;
3212
4222
  export type IStore = {
3213
4223
  readonly isAvailable: boolean;
4224
+ /**
4225
+ * Reads the operator-owned browser receipt.
4226
+ * @returns The receipt or null.
4227
+ * @throws
4228
+ * - -1: The HQ store failed
4229
+ */
4230
+ getBrowserAction(id: string, operatorId: string): Promise<IBrowserReceipt | null>;
4231
+ /**
4232
+ * Admits one browser effect.
4233
+ * @returns Its durable receipt and dispatch ownership.
4234
+ * @throws
4235
+ * - -1: The HQ store failed
4236
+ * - -1: The HQ action conflicts with its recorded state
4237
+ */
4238
+ admitBrowserAction(action: IBrowserAction, operatorId: string): Promise<{
4239
+ receipt: IBrowserReceipt;
4240
+ isNew: boolean;
4241
+ }>;
4242
+ /**
4243
+ * Settles a submitted effect.
4244
+ * @returns Its receipt.
4245
+ * @throws
4246
+ * - -1: The HQ store failed
4247
+ */
4248
+ settleBrowserAction(id: string, operatorId: string, state: 'acknowledged' | 'uncertain'): Promise<IBrowserReceipt | null>;
3214
4249
  /** Reads a bounded handoff intent.
3215
4250
  * @returns The selected record, or null.
3216
4251
  * @throws