@maiaos/cli 0.1.0-canary.44938d4.manual.1

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 (75) hide show
  1. package/README.md +382 -0
  2. package/dist/bin/maia.NOTICES.txt +31 -0
  3. package/dist/bin/maia.cdx.json +138 -0
  4. package/dist/bin/maia.mjs +115 -0
  5. package/dist/command-line/arguments.d.ts +21 -0
  6. package/dist/command-line/arguments.js +99 -0
  7. package/dist/command-line/context.d.ts +112 -0
  8. package/dist/command-line/context.js +2 -0
  9. package/dist/command-line/help.d.ts +36 -0
  10. package/dist/command-line/help.js +267 -0
  11. package/dist/command-line/output.d.ts +2111 -0
  12. package/dist/command-line/output.js +643 -0
  13. package/dist/command-line/stdin.d.ts +7 -0
  14. package/dist/command-line/stdin.js +34 -0
  15. package/dist/command-receipt/command.d.ts +3 -0
  16. package/dist/command-receipt/command.js +63 -0
  17. package/dist/command-receipt/compact-list.d.ts +18 -0
  18. package/dist/command-receipt/compact-list.js +18 -0
  19. package/dist/context/client.d.ts +4 -0
  20. package/dist/context/client.js +19 -0
  21. package/dist/context/commands.d.ts +3 -0
  22. package/dist/context/commands.js +13 -0
  23. package/dist/index.d.ts +7 -0
  24. package/dist/index.js +202 -0
  25. package/dist/integration-authorization/client.d.ts +16 -0
  26. package/dist/integration-authorization/client.js +30 -0
  27. package/dist/integration-authorization/commands.d.ts +3 -0
  28. package/dist/integration-authorization/commands.js +92 -0
  29. package/dist/local-node/client.d.ts +31 -0
  30. package/dist/local-node/client.js +99 -0
  31. package/dist/orchestration/client.d.ts +59 -0
  32. package/dist/orchestration/client.js +66 -0
  33. package/dist/orchestration/commands.d.ts +3 -0
  34. package/dist/orchestration/commands.js +336 -0
  35. package/dist/orchestration/compact-aggregate.d.ts +123 -0
  36. package/dist/orchestration/compact-aggregate.js +110 -0
  37. package/dist/orchestration/compact-run-list.d.ts +19 -0
  38. package/dist/orchestration/compact-run-list.js +16 -0
  39. package/dist/project-workspace/client.d.ts +43 -0
  40. package/dist/project-workspace/client.js +54 -0
  41. package/dist/project-workspace/commands.d.ts +5 -0
  42. package/dist/project-workspace/commands.js +239 -0
  43. package/dist/runtime/client.d.ts +6 -0
  44. package/dist/runtime/client.js +10 -0
  45. package/dist/runtime/command.d.ts +3 -0
  46. package/dist/runtime/command.js +20 -0
  47. package/dist/session/client.d.ts +32 -0
  48. package/dist/session/client.js +30 -0
  49. package/dist/session/commands.d.ts +3 -0
  50. package/dist/session/commands.js +160 -0
  51. package/dist/status/client.d.ts +5 -0
  52. package/dist/status/client.js +15 -0
  53. package/dist/status/command.d.ts +3 -0
  54. package/dist/status/command.js +17 -0
  55. package/dist/status/compact.d.ts +31 -0
  56. package/dist/status/compact.js +46 -0
  57. package/dist/terminal/arguments.d.ts +12 -0
  58. package/dist/terminal/arguments.js +79 -0
  59. package/dist/terminal/client.d.ts +45 -0
  60. package/dist/terminal/client.js +48 -0
  61. package/dist/terminal/commands.d.ts +3 -0
  62. package/dist/terminal/commands.js +151 -0
  63. package/dist/terminal/compact-list.d.ts +148 -0
  64. package/dist/terminal/compact-list.js +152 -0
  65. package/dist/terminal/control-commands.d.ts +7 -0
  66. package/dist/terminal/control-commands.js +211 -0
  67. package/dist/turn/client.d.ts +17 -0
  68. package/dist/turn/client.js +23 -0
  69. package/dist/turn/commands.d.ts +3 -0
  70. package/dist/turn/commands.js +126 -0
  71. package/dist/turn/prompt.d.ts +2 -0
  72. package/dist/turn/prompt.js +9 -0
  73. package/guidance/maia-cli/SKILL.md +75 -0
  74. package/guidance/maia-orchestration/SKILL.md +54 -0
  75. package/package.json +50 -0
@@ -0,0 +1,2111 @@
1
+ import type { ExecutionCatalogGetResult, InstalledHarnessListResult, IntegrationApplyCodexResult, IntegrationApplyPiRpcResult, IntegrationPlanCodexResult, IntegrationPlanPiRpcResult, IntegrationRemoveCodexResult, IntegrationRemovePiRpcResult, IntegrationStatusCodexResult, IntegrationStatusPiRpcResult, InvocationContextShowResult, LiveTerminalCloseResult, LiveTerminalControllerAcquireResult, LiveTerminalControllerReleaseResult, LiveTerminalControllerRequestResult, LiveTerminalControllerRequestShowResult, LiveTerminalResizeResult, LiveTerminalSignalResult, LiveTerminalWriteResult, LocalNodeStatusResult, MonitorBootstrapCreateResult, OrchestrationDispatchShowResult, OrchestrationInboxCheckResult, OrchestrationRunListResult, OrchestrationTaskListResult, OrchestrationTaskShowResult, ProjectListResult, ProjectRegisterResult, ProjectShowResult, ProtocolError, ReceiptGetResult, RuntimeProbeResult, SessionCreateResult, SessionEventsListResult, SessionListResult, SessionShowResult, SessionStartResult, TerminalCreateResult, TerminalListResult, TurnInterruptResult, TurnSendResult, TurnShowResult, TurnTokenUsage, WorkspaceExecutionConfigureResult, WorkspaceExecutionShowResult, WorkspaceListResult, WorkspaceRepositoryAttachResult, WorkspaceShowResult } from "@maiaos/sdk";
2
+ import type { CliReceiptListResult } from "../command-receipt/compact-list.js";
3
+ import type { CliDispatchSettleResult, CliDispatchShowDispatch, CliInboxAckResult, CliQuestionCancelResult, CliQuestionOpenResult, CliQuestionReplyResult, CliRunCreateResult, CliRunShowResult } from "../orchestration/compact-aggregate.js";
4
+ import type { CliRunListResult } from "../orchestration/compact-run-list.js";
5
+ import type { CliMutationRecovery, CliNodeResult } from "../project-workspace/client.js";
6
+ import type { CliCompactStatusResult } from "../status/compact.js";
7
+ import type { CliOutputAudience, CliTerminalEventsResult, CliTerminalListResult, CliTerminalReadResult, CliTerminalShowResult } from "../terminal/compact-list.js";
8
+ import type { CliHelpResult } from "./help.js";
9
+ import type { BoundedStdinRequest } from "./stdin.js";
10
+ export type CliIo = {
11
+ readonly stderr: (text: string) => void;
12
+ readonly stdin?: (request: BoundedStdinRequest) => Promise<string>;
13
+ readonly stdout: (text: string) => void;
14
+ };
15
+ export type { CliHelpAvailability, CliHelpFamilyName, CliHelpFamilyResult, CliHelpFamilyUsage, CliHelpIndexCommand, CliHelpIndexResult, CliHelpResult, } from "./help.js";
16
+ export type CliVersionResult = {
17
+ readonly command: "version";
18
+ readonly name: "maia";
19
+ readonly version: string;
20
+ };
21
+ export type CliStatusResult = {
22
+ readonly command: "status";
23
+ readonly node: LocalNodeStatusResult;
24
+ };
25
+ export type { CliCompactStatusResult } from "../status/compact.js";
26
+ type CliContextResult = {
27
+ readonly actorId: InvocationContextShowResult["actorId"];
28
+ readonly allowedActions: InvocationContextShowResult["allowedActions"];
29
+ readonly command: "context.show";
30
+ readonly contextRevision: InvocationContextShowResult["contextRevision"];
31
+ readonly principal: InvocationContextShowResult["principal"];
32
+ };
33
+ type CliProjectResult = {
34
+ readonly command: "project.add";
35
+ readonly result: {
36
+ readonly checkoutId: string;
37
+ readonly delivery: ProjectRegisterResult["delivery"];
38
+ readonly projectId: string;
39
+ readonly receipt: ProjectRegisterResult["receipt"];
40
+ readonly repositoryId: string;
41
+ readonly workspaceId: string;
42
+ };
43
+ } | {
44
+ readonly command: "project.list";
45
+ readonly result: ProjectListResult;
46
+ } | {
47
+ readonly command: "project.show";
48
+ readonly result: ProjectShowResult;
49
+ };
50
+ type CliExecutionResult = {
51
+ readonly command: "execution.catalog";
52
+ readonly result: ExecutionCatalogGetResult;
53
+ };
54
+ type CliMonitorResult = {
55
+ readonly command: "monitor";
56
+ readonly result: MonitorBootstrapCreateResult;
57
+ };
58
+ type CliWorkspaceResult = {
59
+ readonly command: "workspace.execution.configure";
60
+ readonly result: {
61
+ readonly binding?: WorkspaceExecutionConfigureResult["binding"];
62
+ readonly delivery: WorkspaceExecutionConfigureResult["delivery"];
63
+ readonly receipt: WorkspaceExecutionConfigureResult["receipt"];
64
+ readonly resolution: WorkspaceExecutionConfigureResult["resolution"];
65
+ readonly workspaceId: string;
66
+ readonly workspaceRevision: string;
67
+ };
68
+ } | {
69
+ readonly command: "workspace.execution.show";
70
+ readonly result: WorkspaceExecutionShowResult;
71
+ } | {
72
+ readonly command: "workspace.list";
73
+ readonly result: WorkspaceListResult;
74
+ } | {
75
+ readonly command: "workspace.repo.add";
76
+ readonly result: {
77
+ readonly checkoutId: string;
78
+ readonly delivery: WorkspaceRepositoryAttachResult["delivery"];
79
+ readonly receipt: WorkspaceRepositoryAttachResult["receipt"];
80
+ readonly repositoryId: string;
81
+ readonly workspaceId: string;
82
+ readonly workspaceRevision: string;
83
+ };
84
+ } | {
85
+ readonly command: "workspace.show";
86
+ readonly result: WorkspaceShowResult;
87
+ };
88
+ type CliReceiptResult = CliReceiptListResult | {
89
+ readonly command: "receipt.show";
90
+ readonly result: ReceiptGetResult;
91
+ };
92
+ type InstalledHarnessInventoryItem = InstalledHarnessListResult["items"][number];
93
+ type CliRuntimeListItem = {
94
+ readonly harnessId: InstalledHarnessInventoryItem["harnessId"];
95
+ readonly reason?: Extract<InstalledHarnessInventoryItem, {
96
+ readonly detected: false;
97
+ }>["reason"];
98
+ readonly status: InstalledHarnessInventoryItem["status"];
99
+ };
100
+ type CliIntegrationResult = {
101
+ readonly command: "integration.apply";
102
+ readonly result: IntegrationApplyCodexResult | IntegrationApplyPiRpcResult;
103
+ } | {
104
+ readonly command: "integration.plan";
105
+ readonly result: IntegrationPlanCodexResult | IntegrationPlanPiRpcResult;
106
+ } | {
107
+ readonly command: "integration.remove";
108
+ readonly result: IntegrationRemoveCodexResult | IntegrationRemovePiRpcResult;
109
+ } | {
110
+ readonly command: "integration.status";
111
+ readonly result: IntegrationStatusCodexResult | IntegrationStatusPiRpcResult;
112
+ };
113
+ type CliRuntimeResult = {
114
+ readonly command: "runtime.list";
115
+ readonly items: readonly CliRuntimeListItem[];
116
+ } | {
117
+ readonly command: "runtime.probe";
118
+ readonly result: RuntimeProbeResult;
119
+ };
120
+ type CliSessionResult = {
121
+ readonly command: "session.create";
122
+ readonly result: {
123
+ readonly delivery: SessionCreateResult["delivery"];
124
+ readonly receipt: SessionCreateResult["receipt"];
125
+ readonly sessionId: string;
126
+ readonly state: SessionCreateResult["session"]["state"];
127
+ readonly workspaceId: string;
128
+ readonly workspaceRevision: string;
129
+ };
130
+ } | {
131
+ readonly command: "session.events";
132
+ readonly result: SessionEventsListResult;
133
+ } | {
134
+ readonly command: "session.list";
135
+ readonly result: SessionListResult;
136
+ } | {
137
+ readonly command: "session.show";
138
+ readonly result: SessionShowResult;
139
+ } | {
140
+ readonly command: "session.start";
141
+ readonly result: {
142
+ readonly delivery: SessionStartResult["delivery"];
143
+ readonly receipt: SessionStartResult["receipt"];
144
+ readonly revision: string;
145
+ readonly sessionId: string;
146
+ readonly state: SessionStartResult["session"]["state"];
147
+ };
148
+ };
149
+ type CliTurnResult = {
150
+ readonly command: "turn.interrupt";
151
+ readonly result: {
152
+ readonly delivery: TurnInterruptResult["delivery"];
153
+ readonly receipt: TurnInterruptResult["receipt"];
154
+ readonly revision: string;
155
+ readonly sessionId: string;
156
+ readonly state: TurnInterruptResult["turn"]["state"];
157
+ readonly turnId: string;
158
+ };
159
+ } | {
160
+ readonly command: "turn.send";
161
+ readonly result: {
162
+ readonly delivery: TurnSendResult["delivery"];
163
+ readonly receipt: TurnSendResult["receipt"];
164
+ readonly revision: string;
165
+ readonly sessionId: string;
166
+ readonly state: TurnSendResult["turn"]["state"];
167
+ readonly turnId: string;
168
+ };
169
+ } | {
170
+ readonly command: "turn.show";
171
+ readonly result: (TurnShowResult & {
172
+ readonly contentIncluded: true;
173
+ }) | {
174
+ readonly contentIncluded: false;
175
+ readonly method: "turn.show";
176
+ readonly turn: {
177
+ readonly failureReason?: string;
178
+ readonly id: string;
179
+ readonly inputBytes: number;
180
+ readonly responseBytes?: number;
181
+ readonly revision: string;
182
+ readonly sessionId: string;
183
+ readonly sessionRevision: string;
184
+ readonly state: TurnShowResult["turn"]["state"];
185
+ readonly tokenUsage?: TurnTokenUsage;
186
+ };
187
+ };
188
+ };
189
+ type UnavailableTerminal = Extract<TerminalListResult["items"][number], {
190
+ readonly state: "unavailable";
191
+ }>;
192
+ type UnavailableTerminalCreateResult = Extract<TerminalCreateResult, {
193
+ readonly accepted: false;
194
+ }>;
195
+ type InteractiveTerminalCreateResult = Exclude<TerminalCreateResult, UnavailableTerminalCreateResult>;
196
+ type CliTerminalResult = CliTerminalEventsResult<CliOutputAudience> | CliTerminalListResult<CliOutputAudience> | CliTerminalReadResult | CliTerminalShowResult<CliOutputAudience> | {
197
+ readonly command: "terminal.close";
198
+ readonly result: LiveTerminalCloseResult;
199
+ } | {
200
+ readonly command: "terminal.controller.acquire";
201
+ readonly result: LiveTerminalControllerAcquireResult;
202
+ } | {
203
+ readonly command: "terminal.controller.release";
204
+ readonly result: LiveTerminalControllerReleaseResult;
205
+ } | {
206
+ readonly command: "terminal.controller.request";
207
+ readonly result: LiveTerminalControllerRequestResult;
208
+ } | {
209
+ readonly command: "terminal.controller.request.show";
210
+ readonly result: LiveTerminalControllerRequestShowResult;
211
+ } | {
212
+ readonly command: "terminal.create";
213
+ readonly result: InteractiveTerminalCreateResult | {
214
+ readonly accepted: false;
215
+ readonly delivery: UnavailableTerminalCreateResult["delivery"];
216
+ readonly receipt: UnavailableTerminalCreateResult["receipt"];
217
+ readonly state: UnavailableTerminal["state"];
218
+ readonly terminalId: string;
219
+ readonly unavailability: UnavailableTerminal["unavailability"];
220
+ readonly workspaceId: string;
221
+ readonly workspaceRevision: string;
222
+ };
223
+ } | {
224
+ readonly command: "terminal.input.write";
225
+ readonly result: LiveTerminalWriteResult;
226
+ } | {
227
+ readonly command: "terminal.resize";
228
+ readonly result: LiveTerminalResizeResult;
229
+ } | {
230
+ readonly command: "terminal.signal";
231
+ readonly result: LiveTerminalSignalResult;
232
+ };
233
+ type CliInboxCheckItem = {
234
+ readonly body: OrchestrationInboxCheckResult["items"][number]["message"]["body"];
235
+ readonly deliveryId: OrchestrationInboxCheckResult["items"][number]["id"];
236
+ readonly mailboxId: OrchestrationInboxCheckResult["items"][number]["mailboxId"];
237
+ readonly sequence: OrchestrationInboxCheckResult["items"][number]["sequence"];
238
+ readonly subject: OrchestrationInboxCheckResult["items"][number]["message"]["subject"];
239
+ readonly type: OrchestrationInboxCheckResult["items"][number]["message"]["type"];
240
+ };
241
+ type CliInboxCheckResult = {
242
+ readonly command: "run.inbox.check";
243
+ readonly count: number;
244
+ readonly items: readonly CliInboxCheckItem[];
245
+ readonly mailboxId: OrchestrationInboxCheckResult["mailbox"]["id"];
246
+ readonly mailboxRevision: OrchestrationInboxCheckResult["mailbox"]["revision"];
247
+ readonly owner: OrchestrationInboxCheckResult["mailbox"]["owner"];
248
+ readonly runId: OrchestrationInboxCheckResult["mailbox"]["runId"];
249
+ };
250
+ type CliTaskListItem = {
251
+ readonly clientKey: OrchestrationTaskListResult["items"][number]["clientKey"];
252
+ readonly dependencyTaskIds: OrchestrationTaskListResult["items"][number]["dependencyTaskIds"];
253
+ readonly id: OrchestrationTaskListResult["items"][number]["id"];
254
+ readonly revision: OrchestrationTaskListResult["items"][number]["revision"];
255
+ readonly state: OrchestrationTaskListResult["items"][number]["state"];
256
+ };
257
+ type CliTaskListResult = {
258
+ readonly command: "run.task.list";
259
+ readonly count: number;
260
+ readonly items: readonly CliTaskListItem[];
261
+ readonly nextCursor?: OrchestrationTaskListResult["nextCursor"];
262
+ readonly runId: OrchestrationTaskListResult["runId"];
263
+ };
264
+ type CliTaskShowTask = {
265
+ readonly clientKey: OrchestrationTaskShowResult["task"]["clientKey"];
266
+ readonly dependencyTaskIds: OrchestrationTaskShowResult["task"]["dependencyTaskIds"];
267
+ readonly id: OrchestrationTaskShowResult["task"]["id"];
268
+ readonly objective: OrchestrationTaskShowResult["task"]["objective"];
269
+ readonly revision: OrchestrationTaskShowResult["task"]["revision"];
270
+ readonly runId: OrchestrationTaskShowResult["task"]["runId"];
271
+ readonly state: OrchestrationTaskShowResult["task"]["state"];
272
+ };
273
+ type CliTaskShowResult = {
274
+ readonly command: "run.task.show";
275
+ readonly task: CliTaskShowTask;
276
+ };
277
+ type CliDispatchShowResult = {
278
+ readonly command: "run.dispatch.show";
279
+ readonly dispatch: CliDispatchShowDispatch;
280
+ };
281
+ type CliOrchestrationResult = CliDispatchSettleResult | CliDispatchShowResult | CliInboxAckResult | CliInboxCheckResult | CliQuestionCancelResult | CliQuestionOpenResult | CliQuestionReplyResult | CliRunCreateResult | CliRunListResult | CliRunShowResult | CliTaskListResult | CliTaskShowResult;
282
+ export type CliSuccessResult = CliCompactStatusResult | CliContextResult | CliExecutionResult | CliHelpResult | CliIntegrationResult | CliMonitorResult | CliOrchestrationResult | CliProjectResult | CliReceiptResult | CliRuntimeResult | CliSessionResult | CliStatusResult | CliTerminalResult | CliTurnResult | CliVersionResult | CliWorkspaceResult;
283
+ export type CliSuccessOutput = {
284
+ readonly ok: true;
285
+ readonly result: CliSuccessResult;
286
+ };
287
+ export type CliErrorOutput = {
288
+ readonly error: ProtocolError;
289
+ readonly ok: false;
290
+ readonly recovery?: CliMutationRecovery;
291
+ };
292
+ type OutputContext = {
293
+ readonly io: CliIo;
294
+ readonly json: boolean;
295
+ };
296
+ type ErrorContext = OutputContext & {
297
+ readonly recovery?: CliMutationRecovery;
298
+ };
299
+ export declare const formatTerminalList: (result: CliTerminalListResult<CliOutputAudience>) => string;
300
+ export declare const formatTerminalShow: (result: CliTerminalShowResult<CliOutputAudience>) => string;
301
+ export declare const formatTerminalEvents: (result: CliTerminalEventsResult<CliOutputAudience>) => string;
302
+ export declare const formatTerminalRead: (result: CliTerminalReadResult) => string;
303
+ export declare const formatInboxAck: (result: CliInboxAckResult) => string;
304
+ export declare const formatReceiptList: (result: CliReceiptListResult) => string;
305
+ export declare const formatRunList: (result: CliRunListResult) => string;
306
+ export declare const formatRunShow: (result: CliRunShowResult) => string;
307
+ export declare const formatRunCreate: (result: CliRunCreateResult) => string;
308
+ export declare const formatQuestionOpen: (result: CliQuestionOpenResult) => string;
309
+ export declare const formatQuestionReply: (result: CliQuestionReplyResult) => string;
310
+ export declare const formatQuestionCancel: (result: CliQuestionCancelResult) => string;
311
+ export declare const formatDispatchSettle: (result: CliDispatchSettleResult) => string;
312
+ export declare const writeStatusResult: (node: LocalNodeStatusResult, context: OutputContext) => void;
313
+ export declare const writeSuccess: (result: CliSuccessResult, json: boolean, io: CliIo) => void;
314
+ export declare const reportError: (error: ProtocolError, context: ErrorContext) => number;
315
+ export declare const writeNodeResult: <TValue>(result: CliNodeResult<TValue>, context: OutputContext, map: (value: TValue) => CliSuccessResult) => number;
316
+ export declare const writeInboxAckResult: (result: CliNodeResult<{
317
+ readonly delivery: {
318
+ readonly message: {
319
+ readonly recipient: {
320
+ readonly id: string;
321
+ readonly kind: "dispatch";
322
+ };
323
+ readonly type: "dispatch";
324
+ readonly body: string;
325
+ readonly createdAt: string;
326
+ readonly digest: string;
327
+ readonly id: string;
328
+ readonly runId: string;
329
+ readonly schemaVersion: "maia.orchestration-message/v1";
330
+ readonly sender: {
331
+ readonly actorId: "actor_local_user";
332
+ readonly kind: "run-coordinator";
333
+ readonly runId: string;
334
+ };
335
+ readonly subject: string;
336
+ } | {
337
+ readonly questionId: string;
338
+ readonly recipient: {
339
+ readonly id: string;
340
+ readonly kind: "run";
341
+ };
342
+ readonly type: "question";
343
+ readonly body: string;
344
+ readonly createdAt: string;
345
+ readonly digest: string;
346
+ readonly id: string;
347
+ readonly runId: string;
348
+ readonly schemaVersion: "maia.orchestration-message/v1";
349
+ readonly sender: {
350
+ readonly actorId: "actor_local_user";
351
+ readonly kind: "run-coordinator";
352
+ readonly runId: string;
353
+ };
354
+ readonly subject: string;
355
+ } | {
356
+ readonly questionId: string;
357
+ readonly recipient: {
358
+ readonly id: string;
359
+ readonly kind: "dispatch";
360
+ };
361
+ readonly type: "reply";
362
+ readonly body: string;
363
+ readonly createdAt: string;
364
+ readonly digest: string;
365
+ readonly id: string;
366
+ readonly runId: string;
367
+ readonly schemaVersion: "maia.orchestration-message/v1";
368
+ readonly sender: {
369
+ readonly actorId: "actor_local_user";
370
+ readonly kind: "run-coordinator";
371
+ readonly runId: string;
372
+ };
373
+ readonly subject: string;
374
+ } | {
375
+ readonly recipient: {
376
+ readonly id: string;
377
+ readonly kind: "run";
378
+ };
379
+ readonly type: "dispatch-settled";
380
+ readonly body: string;
381
+ readonly createdAt: string;
382
+ readonly digest: string;
383
+ readonly id: string;
384
+ readonly runId: string;
385
+ readonly schemaVersion: "maia.orchestration-message/v1";
386
+ readonly sender: {
387
+ readonly actorId: "actor_local_user";
388
+ readonly kind: "run-coordinator";
389
+ readonly runId: string;
390
+ };
391
+ readonly subject: string;
392
+ };
393
+ readonly state: "acknowledged";
394
+ readonly id: string;
395
+ readonly createdAt: string;
396
+ readonly mailboxId: string;
397
+ readonly attemptCount: number;
398
+ readonly sequence: string;
399
+ readonly acknowledgingActorId: "actor_local_user";
400
+ readonly acknowledgedAt: string;
401
+ readonly firstDeliveredAt?: string | undefined;
402
+ readonly lastDeliveredAt?: string | undefined;
403
+ };
404
+ readonly mailbox: {
405
+ readonly contentBytes: string;
406
+ readonly createdAt: string;
407
+ readonly deliveryCount: string;
408
+ readonly headSequence: string;
409
+ readonly id: string;
410
+ readonly owner: {
411
+ readonly id: string;
412
+ readonly kind: "run";
413
+ } | {
414
+ readonly id: string;
415
+ readonly kind: "dispatch";
416
+ };
417
+ readonly revision: string;
418
+ readonly runId: string;
419
+ readonly schemaVersion: "maia.orchestration/v1";
420
+ readonly updatedAt: string;
421
+ };
422
+ readonly method: "run.inbox.ack";
423
+ readonly receipt: {
424
+ readonly actorId: string;
425
+ readonly aggregateRevision: string;
426
+ readonly commandId: string;
427
+ readonly createdAt: string;
428
+ readonly eventCursor: string;
429
+ readonly method: string;
430
+ readonly receiptId: string;
431
+ readonly schemaVersion: 1;
432
+ readonly state: "succeeded";
433
+ readonly target: {
434
+ readonly id: string;
435
+ readonly type: string;
436
+ };
437
+ readonly updatedAt: string;
438
+ };
439
+ }>, context: OutputContext) => number;
440
+ export declare const writeInboxCheckResult: (result: CliNodeResult<OrchestrationInboxCheckResult>, context: OutputContext) => number;
441
+ export declare const writeRunListResult: (result: CliNodeResult<OrchestrationRunListResult>, context: OutputContext, workspaceId: string) => number;
442
+ export declare const writeTaskListResult: (result: CliNodeResult<OrchestrationTaskListResult>, context: OutputContext) => number;
443
+ export declare const writeTaskShowResult: (result: CliNodeResult<OrchestrationTaskShowResult>, context: OutputContext) => number;
444
+ export declare const writeDispatchShowResult: (result: CliNodeResult<OrchestrationDispatchShowResult>, context: OutputContext) => number;
445
+ export declare const writeRunShowResult: (result: CliNodeResult<{
446
+ readonly aggregate: {
447
+ readonly run: {
448
+ readonly coordinator: {
449
+ readonly actorId: "actor_local_user";
450
+ readonly epoch: 1;
451
+ };
452
+ readonly createdAt: string;
453
+ readonly dispatchTaskId: string;
454
+ readonly id: string;
455
+ readonly revision: string;
456
+ readonly rootTaskId: string;
457
+ readonly schemaVersion: "maia.orchestration/v1";
458
+ readonly state: "failed" | "active" | "waiting-question";
459
+ readonly terminalId: string;
460
+ readonly updatedAt: string;
461
+ readonly workspaceId: string;
462
+ };
463
+ readonly dispatch: {
464
+ readonly state: "active";
465
+ readonly attemptId: string;
466
+ readonly createdAt: string;
467
+ readonly id: string;
468
+ readonly revision: string;
469
+ readonly runId: string;
470
+ readonly schemaVersion: "maia.orchestration/v1";
471
+ readonly taskId: string;
472
+ readonly terminalId: string;
473
+ readonly updatedAt: string;
474
+ } | {
475
+ readonly state: "waiting-question";
476
+ readonly attemptId: string;
477
+ readonly createdAt: string;
478
+ readonly id: string;
479
+ readonly revision: string;
480
+ readonly runId: string;
481
+ readonly schemaVersion: "maia.orchestration/v1";
482
+ readonly taskId: string;
483
+ readonly terminalId: string;
484
+ readonly updatedAt: string;
485
+ } | {
486
+ readonly failure: {
487
+ readonly code: "terminal_containment_unsupported";
488
+ readonly platform: "darwin" | "linux";
489
+ } | {
490
+ readonly code: "platform_unsupported";
491
+ readonly platform: "win32" | "other";
492
+ };
493
+ readonly state: "failed";
494
+ readonly attemptId: string;
495
+ readonly createdAt: string;
496
+ readonly id: string;
497
+ readonly revision: string;
498
+ readonly runId: string;
499
+ readonly schemaVersion: "maia.orchestration/v1";
500
+ readonly taskId: string;
501
+ readonly terminalId: string;
502
+ readonly updatedAt: string;
503
+ };
504
+ readonly tasks: readonly {
505
+ readonly objective: string;
506
+ readonly clientKey: string;
507
+ readonly createdAt: string;
508
+ readonly dependencyTaskIds: readonly string[];
509
+ readonly id: string;
510
+ readonly revision: string;
511
+ readonly runId: string;
512
+ readonly schemaVersion: "maia.orchestration/v1";
513
+ readonly state: "failed" | "active" | "pending" | "waiting-question";
514
+ readonly updatedAt: string;
515
+ readonly workspaceId: string;
516
+ }[];
517
+ readonly attempt: {
518
+ readonly createdAt: string;
519
+ readonly id: string;
520
+ readonly ordinal: 1;
521
+ readonly revision: string;
522
+ readonly runId: string;
523
+ readonly schemaVersion: "maia.orchestration/v1";
524
+ readonly state: "failed" | "active" | "waiting-question";
525
+ readonly taskId: string;
526
+ readonly updatedAt: string;
527
+ };
528
+ readonly mailboxes: readonly {
529
+ readonly contentBytes: string;
530
+ readonly createdAt: string;
531
+ readonly deliveryCount: string;
532
+ readonly headSequence: string;
533
+ readonly id: string;
534
+ readonly owner: {
535
+ readonly id: string;
536
+ readonly kind: "run";
537
+ } | {
538
+ readonly id: string;
539
+ readonly kind: "dispatch";
540
+ };
541
+ readonly revision: string;
542
+ readonly runId: string;
543
+ readonly schemaVersion: "maia.orchestration/v1";
544
+ readonly updatedAt: string;
545
+ }[];
546
+ readonly question?: {
547
+ readonly state: "open";
548
+ readonly askMessageId: string;
549
+ readonly attemptId: string;
550
+ readonly body: string;
551
+ readonly createdAt: string;
552
+ readonly dispatchId: string;
553
+ readonly id: string;
554
+ readonly revision: string;
555
+ readonly runId: string;
556
+ readonly schemaVersion: "maia.orchestration/v1";
557
+ readonly subject: string;
558
+ readonly taskId: string;
559
+ readonly updatedAt: string;
560
+ } | {
561
+ readonly answer: string;
562
+ readonly replyMessageId: string;
563
+ readonly state: "answered";
564
+ readonly askMessageId: string;
565
+ readonly attemptId: string;
566
+ readonly body: string;
567
+ readonly createdAt: string;
568
+ readonly dispatchId: string;
569
+ readonly id: string;
570
+ readonly revision: string;
571
+ readonly runId: string;
572
+ readonly schemaVersion: "maia.orchestration/v1";
573
+ readonly subject: string;
574
+ readonly taskId: string;
575
+ readonly updatedAt: string;
576
+ } | {
577
+ readonly state: "cancelled";
578
+ readonly askMessageId: string;
579
+ readonly attemptId: string;
580
+ readonly body: string;
581
+ readonly createdAt: string;
582
+ readonly dispatchId: string;
583
+ readonly id: string;
584
+ readonly revision: string;
585
+ readonly runId: string;
586
+ readonly schemaVersion: "maia.orchestration/v1";
587
+ readonly subject: string;
588
+ readonly taskId: string;
589
+ readonly updatedAt: string;
590
+ } | undefined;
591
+ };
592
+ readonly method: "run.show";
593
+ }>, context: OutputContext) => number;
594
+ export declare const writeRunCreateResult: (result: CliNodeResult<{
595
+ readonly aggregate: {
596
+ readonly run: {
597
+ readonly coordinator: {
598
+ readonly actorId: "actor_local_user";
599
+ readonly epoch: 1;
600
+ };
601
+ readonly createdAt: string;
602
+ readonly dispatchTaskId: string;
603
+ readonly id: string;
604
+ readonly revision: string;
605
+ readonly rootTaskId: string;
606
+ readonly schemaVersion: "maia.orchestration/v1";
607
+ readonly state: "failed" | "active" | "waiting-question";
608
+ readonly terminalId: string;
609
+ readonly updatedAt: string;
610
+ readonly workspaceId: string;
611
+ };
612
+ readonly dispatch: {
613
+ readonly state: "active";
614
+ readonly attemptId: string;
615
+ readonly createdAt: string;
616
+ readonly id: string;
617
+ readonly revision: string;
618
+ readonly runId: string;
619
+ readonly schemaVersion: "maia.orchestration/v1";
620
+ readonly taskId: string;
621
+ readonly terminalId: string;
622
+ readonly updatedAt: string;
623
+ } | {
624
+ readonly state: "waiting-question";
625
+ readonly attemptId: string;
626
+ readonly createdAt: string;
627
+ readonly id: string;
628
+ readonly revision: string;
629
+ readonly runId: string;
630
+ readonly schemaVersion: "maia.orchestration/v1";
631
+ readonly taskId: string;
632
+ readonly terminalId: string;
633
+ readonly updatedAt: string;
634
+ } | {
635
+ readonly failure: {
636
+ readonly code: "terminal_containment_unsupported";
637
+ readonly platform: "darwin" | "linux";
638
+ } | {
639
+ readonly code: "platform_unsupported";
640
+ readonly platform: "win32" | "other";
641
+ };
642
+ readonly state: "failed";
643
+ readonly attemptId: string;
644
+ readonly createdAt: string;
645
+ readonly id: string;
646
+ readonly revision: string;
647
+ readonly runId: string;
648
+ readonly schemaVersion: "maia.orchestration/v1";
649
+ readonly taskId: string;
650
+ readonly terminalId: string;
651
+ readonly updatedAt: string;
652
+ };
653
+ readonly tasks: readonly {
654
+ readonly objective: string;
655
+ readonly clientKey: string;
656
+ readonly createdAt: string;
657
+ readonly dependencyTaskIds: readonly string[];
658
+ readonly id: string;
659
+ readonly revision: string;
660
+ readonly runId: string;
661
+ readonly schemaVersion: "maia.orchestration/v1";
662
+ readonly state: "failed" | "active" | "pending" | "waiting-question";
663
+ readonly updatedAt: string;
664
+ readonly workspaceId: string;
665
+ }[];
666
+ readonly attempt: {
667
+ readonly createdAt: string;
668
+ readonly id: string;
669
+ readonly ordinal: 1;
670
+ readonly revision: string;
671
+ readonly runId: string;
672
+ readonly schemaVersion: "maia.orchestration/v1";
673
+ readonly state: "failed" | "active" | "waiting-question";
674
+ readonly taskId: string;
675
+ readonly updatedAt: string;
676
+ };
677
+ readonly mailboxes: readonly {
678
+ readonly contentBytes: string;
679
+ readonly createdAt: string;
680
+ readonly deliveryCount: string;
681
+ readonly headSequence: string;
682
+ readonly id: string;
683
+ readonly owner: {
684
+ readonly id: string;
685
+ readonly kind: "run";
686
+ } | {
687
+ readonly id: string;
688
+ readonly kind: "dispatch";
689
+ };
690
+ readonly revision: string;
691
+ readonly runId: string;
692
+ readonly schemaVersion: "maia.orchestration/v1";
693
+ readonly updatedAt: string;
694
+ }[];
695
+ readonly question?: {
696
+ readonly state: "open";
697
+ readonly askMessageId: string;
698
+ readonly attemptId: string;
699
+ readonly body: string;
700
+ readonly createdAt: string;
701
+ readonly dispatchId: string;
702
+ readonly id: string;
703
+ readonly revision: string;
704
+ readonly runId: string;
705
+ readonly schemaVersion: "maia.orchestration/v1";
706
+ readonly subject: string;
707
+ readonly taskId: string;
708
+ readonly updatedAt: string;
709
+ } | {
710
+ readonly answer: string;
711
+ readonly replyMessageId: string;
712
+ readonly state: "answered";
713
+ readonly askMessageId: string;
714
+ readonly attemptId: string;
715
+ readonly body: string;
716
+ readonly createdAt: string;
717
+ readonly dispatchId: string;
718
+ readonly id: string;
719
+ readonly revision: string;
720
+ readonly runId: string;
721
+ readonly schemaVersion: "maia.orchestration/v1";
722
+ readonly subject: string;
723
+ readonly taskId: string;
724
+ readonly updatedAt: string;
725
+ } | {
726
+ readonly state: "cancelled";
727
+ readonly askMessageId: string;
728
+ readonly attemptId: string;
729
+ readonly body: string;
730
+ readonly createdAt: string;
731
+ readonly dispatchId: string;
732
+ readonly id: string;
733
+ readonly revision: string;
734
+ readonly runId: string;
735
+ readonly schemaVersion: "maia.orchestration/v1";
736
+ readonly subject: string;
737
+ readonly taskId: string;
738
+ readonly updatedAt: string;
739
+ } | undefined;
740
+ };
741
+ readonly delivery: "new" | "duplicate";
742
+ readonly initialDelivery: {
743
+ readonly message: {
744
+ readonly recipient: {
745
+ readonly id: string;
746
+ readonly kind: "dispatch";
747
+ };
748
+ readonly type: "dispatch";
749
+ readonly body: string;
750
+ readonly createdAt: string;
751
+ readonly digest: string;
752
+ readonly id: string;
753
+ readonly runId: string;
754
+ readonly schemaVersion: "maia.orchestration-message/v1";
755
+ readonly sender: {
756
+ readonly actorId: "actor_local_user";
757
+ readonly kind: "run-coordinator";
758
+ readonly runId: string;
759
+ };
760
+ readonly subject: string;
761
+ } | {
762
+ readonly questionId: string;
763
+ readonly recipient: {
764
+ readonly id: string;
765
+ readonly kind: "run";
766
+ };
767
+ readonly type: "question";
768
+ readonly body: string;
769
+ readonly createdAt: string;
770
+ readonly digest: string;
771
+ readonly id: string;
772
+ readonly runId: string;
773
+ readonly schemaVersion: "maia.orchestration-message/v1";
774
+ readonly sender: {
775
+ readonly actorId: "actor_local_user";
776
+ readonly kind: "run-coordinator";
777
+ readonly runId: string;
778
+ };
779
+ readonly subject: string;
780
+ } | {
781
+ readonly questionId: string;
782
+ readonly recipient: {
783
+ readonly id: string;
784
+ readonly kind: "dispatch";
785
+ };
786
+ readonly type: "reply";
787
+ readonly body: string;
788
+ readonly createdAt: string;
789
+ readonly digest: string;
790
+ readonly id: string;
791
+ readonly runId: string;
792
+ readonly schemaVersion: "maia.orchestration-message/v1";
793
+ readonly sender: {
794
+ readonly actorId: "actor_local_user";
795
+ readonly kind: "run-coordinator";
796
+ readonly runId: string;
797
+ };
798
+ readonly subject: string;
799
+ } | {
800
+ readonly recipient: {
801
+ readonly id: string;
802
+ readonly kind: "run";
803
+ };
804
+ readonly type: "dispatch-settled";
805
+ readonly body: string;
806
+ readonly createdAt: string;
807
+ readonly digest: string;
808
+ readonly id: string;
809
+ readonly runId: string;
810
+ readonly schemaVersion: "maia.orchestration-message/v1";
811
+ readonly sender: {
812
+ readonly actorId: "actor_local_user";
813
+ readonly kind: "run-coordinator";
814
+ readonly runId: string;
815
+ };
816
+ readonly subject: string;
817
+ };
818
+ readonly state: "pending";
819
+ readonly id: string;
820
+ readonly createdAt: string;
821
+ readonly mailboxId: string;
822
+ readonly attemptCount: number;
823
+ readonly sequence: string;
824
+ readonly firstDeliveredAt?: string | undefined;
825
+ readonly lastDeliveredAt?: string | undefined;
826
+ } | {
827
+ readonly message: {
828
+ readonly recipient: {
829
+ readonly id: string;
830
+ readonly kind: "dispatch";
831
+ };
832
+ readonly type: "dispatch";
833
+ readonly body: string;
834
+ readonly createdAt: string;
835
+ readonly digest: string;
836
+ readonly id: string;
837
+ readonly runId: string;
838
+ readonly schemaVersion: "maia.orchestration-message/v1";
839
+ readonly sender: {
840
+ readonly actorId: "actor_local_user";
841
+ readonly kind: "run-coordinator";
842
+ readonly runId: string;
843
+ };
844
+ readonly subject: string;
845
+ } | {
846
+ readonly questionId: string;
847
+ readonly recipient: {
848
+ readonly id: string;
849
+ readonly kind: "run";
850
+ };
851
+ readonly type: "question";
852
+ readonly body: string;
853
+ readonly createdAt: string;
854
+ readonly digest: string;
855
+ readonly id: string;
856
+ readonly runId: string;
857
+ readonly schemaVersion: "maia.orchestration-message/v1";
858
+ readonly sender: {
859
+ readonly actorId: "actor_local_user";
860
+ readonly kind: "run-coordinator";
861
+ readonly runId: string;
862
+ };
863
+ readonly subject: string;
864
+ } | {
865
+ readonly questionId: string;
866
+ readonly recipient: {
867
+ readonly id: string;
868
+ readonly kind: "dispatch";
869
+ };
870
+ readonly type: "reply";
871
+ readonly body: string;
872
+ readonly createdAt: string;
873
+ readonly digest: string;
874
+ readonly id: string;
875
+ readonly runId: string;
876
+ readonly schemaVersion: "maia.orchestration-message/v1";
877
+ readonly sender: {
878
+ readonly actorId: "actor_local_user";
879
+ readonly kind: "run-coordinator";
880
+ readonly runId: string;
881
+ };
882
+ readonly subject: string;
883
+ } | {
884
+ readonly recipient: {
885
+ readonly id: string;
886
+ readonly kind: "run";
887
+ };
888
+ readonly type: "dispatch-settled";
889
+ readonly body: string;
890
+ readonly createdAt: string;
891
+ readonly digest: string;
892
+ readonly id: string;
893
+ readonly runId: string;
894
+ readonly schemaVersion: "maia.orchestration-message/v1";
895
+ readonly sender: {
896
+ readonly actorId: "actor_local_user";
897
+ readonly kind: "run-coordinator";
898
+ readonly runId: string;
899
+ };
900
+ readonly subject: string;
901
+ };
902
+ readonly state: "acknowledged";
903
+ readonly id: string;
904
+ readonly createdAt: string;
905
+ readonly mailboxId: string;
906
+ readonly attemptCount: number;
907
+ readonly sequence: string;
908
+ readonly acknowledgingActorId: "actor_local_user";
909
+ readonly acknowledgedAt: string;
910
+ readonly firstDeliveredAt?: string | undefined;
911
+ readonly lastDeliveredAt?: string | undefined;
912
+ };
913
+ readonly method: "run.create";
914
+ readonly receipt: {
915
+ readonly actorId: string;
916
+ readonly aggregateRevision: string;
917
+ readonly commandId: string;
918
+ readonly createdAt: string;
919
+ readonly eventCursor: string;
920
+ readonly method: string;
921
+ readonly receiptId: string;
922
+ readonly schemaVersion: 1;
923
+ readonly state: "succeeded";
924
+ readonly target: {
925
+ readonly id: string;
926
+ readonly type: string;
927
+ };
928
+ readonly updatedAt: string;
929
+ };
930
+ }>, context: OutputContext) => number;
931
+ export declare const writeQuestionOpenResult: (result: CliNodeResult<{
932
+ readonly delivery: {
933
+ readonly message: {
934
+ readonly recipient: {
935
+ readonly id: string;
936
+ readonly kind: "dispatch";
937
+ };
938
+ readonly type: "dispatch";
939
+ readonly body: string;
940
+ readonly createdAt: string;
941
+ readonly digest: string;
942
+ readonly id: string;
943
+ readonly runId: string;
944
+ readonly schemaVersion: "maia.orchestration-message/v1";
945
+ readonly sender: {
946
+ readonly actorId: "actor_local_user";
947
+ readonly kind: "run-coordinator";
948
+ readonly runId: string;
949
+ };
950
+ readonly subject: string;
951
+ } | {
952
+ readonly questionId: string;
953
+ readonly recipient: {
954
+ readonly id: string;
955
+ readonly kind: "run";
956
+ };
957
+ readonly type: "question";
958
+ readonly body: string;
959
+ readonly createdAt: string;
960
+ readonly digest: string;
961
+ readonly id: string;
962
+ readonly runId: string;
963
+ readonly schemaVersion: "maia.orchestration-message/v1";
964
+ readonly sender: {
965
+ readonly actorId: "actor_local_user";
966
+ readonly kind: "run-coordinator";
967
+ readonly runId: string;
968
+ };
969
+ readonly subject: string;
970
+ } | {
971
+ readonly questionId: string;
972
+ readonly recipient: {
973
+ readonly id: string;
974
+ readonly kind: "dispatch";
975
+ };
976
+ readonly type: "reply";
977
+ readonly body: string;
978
+ readonly createdAt: string;
979
+ readonly digest: string;
980
+ readonly id: string;
981
+ readonly runId: string;
982
+ readonly schemaVersion: "maia.orchestration-message/v1";
983
+ readonly sender: {
984
+ readonly actorId: "actor_local_user";
985
+ readonly kind: "run-coordinator";
986
+ readonly runId: string;
987
+ };
988
+ readonly subject: string;
989
+ } | {
990
+ readonly recipient: {
991
+ readonly id: string;
992
+ readonly kind: "run";
993
+ };
994
+ readonly type: "dispatch-settled";
995
+ readonly body: string;
996
+ readonly createdAt: string;
997
+ readonly digest: string;
998
+ readonly id: string;
999
+ readonly runId: string;
1000
+ readonly schemaVersion: "maia.orchestration-message/v1";
1001
+ readonly sender: {
1002
+ readonly actorId: "actor_local_user";
1003
+ readonly kind: "run-coordinator";
1004
+ readonly runId: string;
1005
+ };
1006
+ readonly subject: string;
1007
+ };
1008
+ readonly state: "pending";
1009
+ readonly id: string;
1010
+ readonly createdAt: string;
1011
+ readonly mailboxId: string;
1012
+ readonly attemptCount: number;
1013
+ readonly sequence: string;
1014
+ readonly firstDeliveredAt?: string | undefined;
1015
+ readonly lastDeliveredAt?: string | undefined;
1016
+ } | {
1017
+ readonly message: {
1018
+ readonly recipient: {
1019
+ readonly id: string;
1020
+ readonly kind: "dispatch";
1021
+ };
1022
+ readonly type: "dispatch";
1023
+ readonly body: string;
1024
+ readonly createdAt: string;
1025
+ readonly digest: string;
1026
+ readonly id: string;
1027
+ readonly runId: string;
1028
+ readonly schemaVersion: "maia.orchestration-message/v1";
1029
+ readonly sender: {
1030
+ readonly actorId: "actor_local_user";
1031
+ readonly kind: "run-coordinator";
1032
+ readonly runId: string;
1033
+ };
1034
+ readonly subject: string;
1035
+ } | {
1036
+ readonly questionId: string;
1037
+ readonly recipient: {
1038
+ readonly id: string;
1039
+ readonly kind: "run";
1040
+ };
1041
+ readonly type: "question";
1042
+ readonly body: string;
1043
+ readonly createdAt: string;
1044
+ readonly digest: string;
1045
+ readonly id: string;
1046
+ readonly runId: string;
1047
+ readonly schemaVersion: "maia.orchestration-message/v1";
1048
+ readonly sender: {
1049
+ readonly actorId: "actor_local_user";
1050
+ readonly kind: "run-coordinator";
1051
+ readonly runId: string;
1052
+ };
1053
+ readonly subject: string;
1054
+ } | {
1055
+ readonly questionId: string;
1056
+ readonly recipient: {
1057
+ readonly id: string;
1058
+ readonly kind: "dispatch";
1059
+ };
1060
+ readonly type: "reply";
1061
+ readonly body: string;
1062
+ readonly createdAt: string;
1063
+ readonly digest: string;
1064
+ readonly id: string;
1065
+ readonly runId: string;
1066
+ readonly schemaVersion: "maia.orchestration-message/v1";
1067
+ readonly sender: {
1068
+ readonly actorId: "actor_local_user";
1069
+ readonly kind: "run-coordinator";
1070
+ readonly runId: string;
1071
+ };
1072
+ readonly subject: string;
1073
+ } | {
1074
+ readonly recipient: {
1075
+ readonly id: string;
1076
+ readonly kind: "run";
1077
+ };
1078
+ readonly type: "dispatch-settled";
1079
+ readonly body: string;
1080
+ readonly createdAt: string;
1081
+ readonly digest: string;
1082
+ readonly id: string;
1083
+ readonly runId: string;
1084
+ readonly schemaVersion: "maia.orchestration-message/v1";
1085
+ readonly sender: {
1086
+ readonly actorId: "actor_local_user";
1087
+ readonly kind: "run-coordinator";
1088
+ readonly runId: string;
1089
+ };
1090
+ readonly subject: string;
1091
+ };
1092
+ readonly state: "acknowledged";
1093
+ readonly id: string;
1094
+ readonly createdAt: string;
1095
+ readonly mailboxId: string;
1096
+ readonly attemptCount: number;
1097
+ readonly sequence: string;
1098
+ readonly acknowledgingActorId: "actor_local_user";
1099
+ readonly acknowledgedAt: string;
1100
+ readonly firstDeliveredAt?: string | undefined;
1101
+ readonly lastDeliveredAt?: string | undefined;
1102
+ };
1103
+ readonly method: "run.question.open";
1104
+ readonly aggregate: {
1105
+ readonly run: {
1106
+ readonly coordinator: {
1107
+ readonly actorId: "actor_local_user";
1108
+ readonly epoch: 1;
1109
+ };
1110
+ readonly createdAt: string;
1111
+ readonly dispatchTaskId: string;
1112
+ readonly id: string;
1113
+ readonly revision: string;
1114
+ readonly rootTaskId: string;
1115
+ readonly schemaVersion: "maia.orchestration/v1";
1116
+ readonly state: "failed" | "active" | "waiting-question";
1117
+ readonly terminalId: string;
1118
+ readonly updatedAt: string;
1119
+ readonly workspaceId: string;
1120
+ };
1121
+ readonly dispatch: {
1122
+ readonly state: "active";
1123
+ readonly attemptId: string;
1124
+ readonly createdAt: string;
1125
+ readonly id: string;
1126
+ readonly revision: string;
1127
+ readonly runId: string;
1128
+ readonly schemaVersion: "maia.orchestration/v1";
1129
+ readonly taskId: string;
1130
+ readonly terminalId: string;
1131
+ readonly updatedAt: string;
1132
+ } | {
1133
+ readonly state: "waiting-question";
1134
+ readonly attemptId: string;
1135
+ readonly createdAt: string;
1136
+ readonly id: string;
1137
+ readonly revision: string;
1138
+ readonly runId: string;
1139
+ readonly schemaVersion: "maia.orchestration/v1";
1140
+ readonly taskId: string;
1141
+ readonly terminalId: string;
1142
+ readonly updatedAt: string;
1143
+ } | {
1144
+ readonly failure: {
1145
+ readonly code: "terminal_containment_unsupported";
1146
+ readonly platform: "darwin" | "linux";
1147
+ } | {
1148
+ readonly code: "platform_unsupported";
1149
+ readonly platform: "win32" | "other";
1150
+ };
1151
+ readonly state: "failed";
1152
+ readonly attemptId: string;
1153
+ readonly createdAt: string;
1154
+ readonly id: string;
1155
+ readonly revision: string;
1156
+ readonly runId: string;
1157
+ readonly schemaVersion: "maia.orchestration/v1";
1158
+ readonly taskId: string;
1159
+ readonly terminalId: string;
1160
+ readonly updatedAt: string;
1161
+ };
1162
+ readonly tasks: readonly {
1163
+ readonly objective: string;
1164
+ readonly clientKey: string;
1165
+ readonly createdAt: string;
1166
+ readonly dependencyTaskIds: readonly string[];
1167
+ readonly id: string;
1168
+ readonly revision: string;
1169
+ readonly runId: string;
1170
+ readonly schemaVersion: "maia.orchestration/v1";
1171
+ readonly state: "failed" | "active" | "pending" | "waiting-question";
1172
+ readonly updatedAt: string;
1173
+ readonly workspaceId: string;
1174
+ }[];
1175
+ readonly attempt: {
1176
+ readonly createdAt: string;
1177
+ readonly id: string;
1178
+ readonly ordinal: 1;
1179
+ readonly revision: string;
1180
+ readonly runId: string;
1181
+ readonly schemaVersion: "maia.orchestration/v1";
1182
+ readonly state: "failed" | "active" | "waiting-question";
1183
+ readonly taskId: string;
1184
+ readonly updatedAt: string;
1185
+ };
1186
+ readonly mailboxes: readonly {
1187
+ readonly contentBytes: string;
1188
+ readonly createdAt: string;
1189
+ readonly deliveryCount: string;
1190
+ readonly headSequence: string;
1191
+ readonly id: string;
1192
+ readonly owner: {
1193
+ readonly id: string;
1194
+ readonly kind: "run";
1195
+ } | {
1196
+ readonly id: string;
1197
+ readonly kind: "dispatch";
1198
+ };
1199
+ readonly revision: string;
1200
+ readonly runId: string;
1201
+ readonly schemaVersion: "maia.orchestration/v1";
1202
+ readonly updatedAt: string;
1203
+ }[];
1204
+ readonly question?: {
1205
+ readonly state: "open";
1206
+ readonly askMessageId: string;
1207
+ readonly attemptId: string;
1208
+ readonly body: string;
1209
+ readonly createdAt: string;
1210
+ readonly dispatchId: string;
1211
+ readonly id: string;
1212
+ readonly revision: string;
1213
+ readonly runId: string;
1214
+ readonly schemaVersion: "maia.orchestration/v1";
1215
+ readonly subject: string;
1216
+ readonly taskId: string;
1217
+ readonly updatedAt: string;
1218
+ } | {
1219
+ readonly answer: string;
1220
+ readonly replyMessageId: string;
1221
+ readonly state: "answered";
1222
+ readonly askMessageId: string;
1223
+ readonly attemptId: string;
1224
+ readonly body: string;
1225
+ readonly createdAt: string;
1226
+ readonly dispatchId: string;
1227
+ readonly id: string;
1228
+ readonly revision: string;
1229
+ readonly runId: string;
1230
+ readonly schemaVersion: "maia.orchestration/v1";
1231
+ readonly subject: string;
1232
+ readonly taskId: string;
1233
+ readonly updatedAt: string;
1234
+ } | {
1235
+ readonly state: "cancelled";
1236
+ readonly askMessageId: string;
1237
+ readonly attemptId: string;
1238
+ readonly body: string;
1239
+ readonly createdAt: string;
1240
+ readonly dispatchId: string;
1241
+ readonly id: string;
1242
+ readonly revision: string;
1243
+ readonly runId: string;
1244
+ readonly schemaVersion: "maia.orchestration/v1";
1245
+ readonly subject: string;
1246
+ readonly taskId: string;
1247
+ readonly updatedAt: string;
1248
+ } | undefined;
1249
+ };
1250
+ readonly receipt: {
1251
+ readonly actorId: string;
1252
+ readonly aggregateRevision: string;
1253
+ readonly commandId: string;
1254
+ readonly createdAt: string;
1255
+ readonly eventCursor: string;
1256
+ readonly method: string;
1257
+ readonly receiptId: string;
1258
+ readonly schemaVersion: 1;
1259
+ readonly state: "succeeded";
1260
+ readonly target: {
1261
+ readonly id: string;
1262
+ readonly type: string;
1263
+ };
1264
+ readonly updatedAt: string;
1265
+ };
1266
+ }>, context: OutputContext) => number;
1267
+ export declare const writeQuestionReplyResult: (result: CliNodeResult<{
1268
+ readonly delivery: {
1269
+ readonly message: {
1270
+ readonly recipient: {
1271
+ readonly id: string;
1272
+ readonly kind: "dispatch";
1273
+ };
1274
+ readonly type: "dispatch";
1275
+ readonly body: string;
1276
+ readonly createdAt: string;
1277
+ readonly digest: string;
1278
+ readonly id: string;
1279
+ readonly runId: string;
1280
+ readonly schemaVersion: "maia.orchestration-message/v1";
1281
+ readonly sender: {
1282
+ readonly actorId: "actor_local_user";
1283
+ readonly kind: "run-coordinator";
1284
+ readonly runId: string;
1285
+ };
1286
+ readonly subject: string;
1287
+ } | {
1288
+ readonly questionId: string;
1289
+ readonly recipient: {
1290
+ readonly id: string;
1291
+ readonly kind: "run";
1292
+ };
1293
+ readonly type: "question";
1294
+ readonly body: string;
1295
+ readonly createdAt: string;
1296
+ readonly digest: string;
1297
+ readonly id: string;
1298
+ readonly runId: string;
1299
+ readonly schemaVersion: "maia.orchestration-message/v1";
1300
+ readonly sender: {
1301
+ readonly actorId: "actor_local_user";
1302
+ readonly kind: "run-coordinator";
1303
+ readonly runId: string;
1304
+ };
1305
+ readonly subject: string;
1306
+ } | {
1307
+ readonly questionId: string;
1308
+ readonly recipient: {
1309
+ readonly id: string;
1310
+ readonly kind: "dispatch";
1311
+ };
1312
+ readonly type: "reply";
1313
+ readonly body: string;
1314
+ readonly createdAt: string;
1315
+ readonly digest: string;
1316
+ readonly id: string;
1317
+ readonly runId: string;
1318
+ readonly schemaVersion: "maia.orchestration-message/v1";
1319
+ readonly sender: {
1320
+ readonly actorId: "actor_local_user";
1321
+ readonly kind: "run-coordinator";
1322
+ readonly runId: string;
1323
+ };
1324
+ readonly subject: string;
1325
+ } | {
1326
+ readonly recipient: {
1327
+ readonly id: string;
1328
+ readonly kind: "run";
1329
+ };
1330
+ readonly type: "dispatch-settled";
1331
+ readonly body: string;
1332
+ readonly createdAt: string;
1333
+ readonly digest: string;
1334
+ readonly id: string;
1335
+ readonly runId: string;
1336
+ readonly schemaVersion: "maia.orchestration-message/v1";
1337
+ readonly sender: {
1338
+ readonly actorId: "actor_local_user";
1339
+ readonly kind: "run-coordinator";
1340
+ readonly runId: string;
1341
+ };
1342
+ readonly subject: string;
1343
+ };
1344
+ readonly state: "pending";
1345
+ readonly id: string;
1346
+ readonly createdAt: string;
1347
+ readonly mailboxId: string;
1348
+ readonly attemptCount: number;
1349
+ readonly sequence: string;
1350
+ readonly firstDeliveredAt?: string | undefined;
1351
+ readonly lastDeliveredAt?: string | undefined;
1352
+ } | {
1353
+ readonly message: {
1354
+ readonly recipient: {
1355
+ readonly id: string;
1356
+ readonly kind: "dispatch";
1357
+ };
1358
+ readonly type: "dispatch";
1359
+ readonly body: string;
1360
+ readonly createdAt: string;
1361
+ readonly digest: string;
1362
+ readonly id: string;
1363
+ readonly runId: string;
1364
+ readonly schemaVersion: "maia.orchestration-message/v1";
1365
+ readonly sender: {
1366
+ readonly actorId: "actor_local_user";
1367
+ readonly kind: "run-coordinator";
1368
+ readonly runId: string;
1369
+ };
1370
+ readonly subject: string;
1371
+ } | {
1372
+ readonly questionId: string;
1373
+ readonly recipient: {
1374
+ readonly id: string;
1375
+ readonly kind: "run";
1376
+ };
1377
+ readonly type: "question";
1378
+ readonly body: string;
1379
+ readonly createdAt: string;
1380
+ readonly digest: string;
1381
+ readonly id: string;
1382
+ readonly runId: string;
1383
+ readonly schemaVersion: "maia.orchestration-message/v1";
1384
+ readonly sender: {
1385
+ readonly actorId: "actor_local_user";
1386
+ readonly kind: "run-coordinator";
1387
+ readonly runId: string;
1388
+ };
1389
+ readonly subject: string;
1390
+ } | {
1391
+ readonly questionId: string;
1392
+ readonly recipient: {
1393
+ readonly id: string;
1394
+ readonly kind: "dispatch";
1395
+ };
1396
+ readonly type: "reply";
1397
+ readonly body: string;
1398
+ readonly createdAt: string;
1399
+ readonly digest: string;
1400
+ readonly id: string;
1401
+ readonly runId: string;
1402
+ readonly schemaVersion: "maia.orchestration-message/v1";
1403
+ readonly sender: {
1404
+ readonly actorId: "actor_local_user";
1405
+ readonly kind: "run-coordinator";
1406
+ readonly runId: string;
1407
+ };
1408
+ readonly subject: string;
1409
+ } | {
1410
+ readonly recipient: {
1411
+ readonly id: string;
1412
+ readonly kind: "run";
1413
+ };
1414
+ readonly type: "dispatch-settled";
1415
+ readonly body: string;
1416
+ readonly createdAt: string;
1417
+ readonly digest: string;
1418
+ readonly id: string;
1419
+ readonly runId: string;
1420
+ readonly schemaVersion: "maia.orchestration-message/v1";
1421
+ readonly sender: {
1422
+ readonly actorId: "actor_local_user";
1423
+ readonly kind: "run-coordinator";
1424
+ readonly runId: string;
1425
+ };
1426
+ readonly subject: string;
1427
+ };
1428
+ readonly state: "acknowledged";
1429
+ readonly id: string;
1430
+ readonly createdAt: string;
1431
+ readonly mailboxId: string;
1432
+ readonly attemptCount: number;
1433
+ readonly sequence: string;
1434
+ readonly acknowledgingActorId: "actor_local_user";
1435
+ readonly acknowledgedAt: string;
1436
+ readonly firstDeliveredAt?: string | undefined;
1437
+ readonly lastDeliveredAt?: string | undefined;
1438
+ };
1439
+ readonly method: "run.question.reply";
1440
+ readonly aggregate: {
1441
+ readonly run: {
1442
+ readonly coordinator: {
1443
+ readonly actorId: "actor_local_user";
1444
+ readonly epoch: 1;
1445
+ };
1446
+ readonly createdAt: string;
1447
+ readonly dispatchTaskId: string;
1448
+ readonly id: string;
1449
+ readonly revision: string;
1450
+ readonly rootTaskId: string;
1451
+ readonly schemaVersion: "maia.orchestration/v1";
1452
+ readonly state: "failed" | "active" | "waiting-question";
1453
+ readonly terminalId: string;
1454
+ readonly updatedAt: string;
1455
+ readonly workspaceId: string;
1456
+ };
1457
+ readonly dispatch: {
1458
+ readonly state: "active";
1459
+ readonly attemptId: string;
1460
+ readonly createdAt: string;
1461
+ readonly id: string;
1462
+ readonly revision: string;
1463
+ readonly runId: string;
1464
+ readonly schemaVersion: "maia.orchestration/v1";
1465
+ readonly taskId: string;
1466
+ readonly terminalId: string;
1467
+ readonly updatedAt: string;
1468
+ } | {
1469
+ readonly state: "waiting-question";
1470
+ readonly attemptId: string;
1471
+ readonly createdAt: string;
1472
+ readonly id: string;
1473
+ readonly revision: string;
1474
+ readonly runId: string;
1475
+ readonly schemaVersion: "maia.orchestration/v1";
1476
+ readonly taskId: string;
1477
+ readonly terminalId: string;
1478
+ readonly updatedAt: string;
1479
+ } | {
1480
+ readonly failure: {
1481
+ readonly code: "terminal_containment_unsupported";
1482
+ readonly platform: "darwin" | "linux";
1483
+ } | {
1484
+ readonly code: "platform_unsupported";
1485
+ readonly platform: "win32" | "other";
1486
+ };
1487
+ readonly state: "failed";
1488
+ readonly attemptId: string;
1489
+ readonly createdAt: string;
1490
+ readonly id: string;
1491
+ readonly revision: string;
1492
+ readonly runId: string;
1493
+ readonly schemaVersion: "maia.orchestration/v1";
1494
+ readonly taskId: string;
1495
+ readonly terminalId: string;
1496
+ readonly updatedAt: string;
1497
+ };
1498
+ readonly tasks: readonly {
1499
+ readonly objective: string;
1500
+ readonly clientKey: string;
1501
+ readonly createdAt: string;
1502
+ readonly dependencyTaskIds: readonly string[];
1503
+ readonly id: string;
1504
+ readonly revision: string;
1505
+ readonly runId: string;
1506
+ readonly schemaVersion: "maia.orchestration/v1";
1507
+ readonly state: "failed" | "active" | "pending" | "waiting-question";
1508
+ readonly updatedAt: string;
1509
+ readonly workspaceId: string;
1510
+ }[];
1511
+ readonly attempt: {
1512
+ readonly createdAt: string;
1513
+ readonly id: string;
1514
+ readonly ordinal: 1;
1515
+ readonly revision: string;
1516
+ readonly runId: string;
1517
+ readonly schemaVersion: "maia.orchestration/v1";
1518
+ readonly state: "failed" | "active" | "waiting-question";
1519
+ readonly taskId: string;
1520
+ readonly updatedAt: string;
1521
+ };
1522
+ readonly mailboxes: readonly {
1523
+ readonly contentBytes: string;
1524
+ readonly createdAt: string;
1525
+ readonly deliveryCount: string;
1526
+ readonly headSequence: string;
1527
+ readonly id: string;
1528
+ readonly owner: {
1529
+ readonly id: string;
1530
+ readonly kind: "run";
1531
+ } | {
1532
+ readonly id: string;
1533
+ readonly kind: "dispatch";
1534
+ };
1535
+ readonly revision: string;
1536
+ readonly runId: string;
1537
+ readonly schemaVersion: "maia.orchestration/v1";
1538
+ readonly updatedAt: string;
1539
+ }[];
1540
+ readonly question?: {
1541
+ readonly state: "open";
1542
+ readonly askMessageId: string;
1543
+ readonly attemptId: string;
1544
+ readonly body: string;
1545
+ readonly createdAt: string;
1546
+ readonly dispatchId: string;
1547
+ readonly id: string;
1548
+ readonly revision: string;
1549
+ readonly runId: string;
1550
+ readonly schemaVersion: "maia.orchestration/v1";
1551
+ readonly subject: string;
1552
+ readonly taskId: string;
1553
+ readonly updatedAt: string;
1554
+ } | {
1555
+ readonly answer: string;
1556
+ readonly replyMessageId: string;
1557
+ readonly state: "answered";
1558
+ readonly askMessageId: string;
1559
+ readonly attemptId: string;
1560
+ readonly body: string;
1561
+ readonly createdAt: string;
1562
+ readonly dispatchId: string;
1563
+ readonly id: string;
1564
+ readonly revision: string;
1565
+ readonly runId: string;
1566
+ readonly schemaVersion: "maia.orchestration/v1";
1567
+ readonly subject: string;
1568
+ readonly taskId: string;
1569
+ readonly updatedAt: string;
1570
+ } | {
1571
+ readonly state: "cancelled";
1572
+ readonly askMessageId: string;
1573
+ readonly attemptId: string;
1574
+ readonly body: string;
1575
+ readonly createdAt: string;
1576
+ readonly dispatchId: string;
1577
+ readonly id: string;
1578
+ readonly revision: string;
1579
+ readonly runId: string;
1580
+ readonly schemaVersion: "maia.orchestration/v1";
1581
+ readonly subject: string;
1582
+ readonly taskId: string;
1583
+ readonly updatedAt: string;
1584
+ } | undefined;
1585
+ };
1586
+ readonly receipt: {
1587
+ readonly actorId: string;
1588
+ readonly aggregateRevision: string;
1589
+ readonly commandId: string;
1590
+ readonly createdAt: string;
1591
+ readonly eventCursor: string;
1592
+ readonly method: string;
1593
+ readonly receiptId: string;
1594
+ readonly schemaVersion: 1;
1595
+ readonly state: "succeeded";
1596
+ readonly target: {
1597
+ readonly id: string;
1598
+ readonly type: string;
1599
+ };
1600
+ readonly updatedAt: string;
1601
+ };
1602
+ }>, context: OutputContext) => number;
1603
+ export declare const writeQuestionCancelResult: (result: CliNodeResult<{
1604
+ readonly method: "run.question.cancel";
1605
+ readonly aggregate: {
1606
+ readonly run: {
1607
+ readonly coordinator: {
1608
+ readonly actorId: "actor_local_user";
1609
+ readonly epoch: 1;
1610
+ };
1611
+ readonly createdAt: string;
1612
+ readonly dispatchTaskId: string;
1613
+ readonly id: string;
1614
+ readonly revision: string;
1615
+ readonly rootTaskId: string;
1616
+ readonly schemaVersion: "maia.orchestration/v1";
1617
+ readonly state: "failed" | "active" | "waiting-question";
1618
+ readonly terminalId: string;
1619
+ readonly updatedAt: string;
1620
+ readonly workspaceId: string;
1621
+ };
1622
+ readonly dispatch: {
1623
+ readonly state: "active";
1624
+ readonly attemptId: string;
1625
+ readonly createdAt: string;
1626
+ readonly id: string;
1627
+ readonly revision: string;
1628
+ readonly runId: string;
1629
+ readonly schemaVersion: "maia.orchestration/v1";
1630
+ readonly taskId: string;
1631
+ readonly terminalId: string;
1632
+ readonly updatedAt: string;
1633
+ } | {
1634
+ readonly state: "waiting-question";
1635
+ readonly attemptId: string;
1636
+ readonly createdAt: string;
1637
+ readonly id: string;
1638
+ readonly revision: string;
1639
+ readonly runId: string;
1640
+ readonly schemaVersion: "maia.orchestration/v1";
1641
+ readonly taskId: string;
1642
+ readonly terminalId: string;
1643
+ readonly updatedAt: string;
1644
+ } | {
1645
+ readonly failure: {
1646
+ readonly code: "terminal_containment_unsupported";
1647
+ readonly platform: "darwin" | "linux";
1648
+ } | {
1649
+ readonly code: "platform_unsupported";
1650
+ readonly platform: "win32" | "other";
1651
+ };
1652
+ readonly state: "failed";
1653
+ readonly attemptId: string;
1654
+ readonly createdAt: string;
1655
+ readonly id: string;
1656
+ readonly revision: string;
1657
+ readonly runId: string;
1658
+ readonly schemaVersion: "maia.orchestration/v1";
1659
+ readonly taskId: string;
1660
+ readonly terminalId: string;
1661
+ readonly updatedAt: string;
1662
+ };
1663
+ readonly tasks: readonly {
1664
+ readonly objective: string;
1665
+ readonly clientKey: string;
1666
+ readonly createdAt: string;
1667
+ readonly dependencyTaskIds: readonly string[];
1668
+ readonly id: string;
1669
+ readonly revision: string;
1670
+ readonly runId: string;
1671
+ readonly schemaVersion: "maia.orchestration/v1";
1672
+ readonly state: "failed" | "active" | "pending" | "waiting-question";
1673
+ readonly updatedAt: string;
1674
+ readonly workspaceId: string;
1675
+ }[];
1676
+ readonly attempt: {
1677
+ readonly createdAt: string;
1678
+ readonly id: string;
1679
+ readonly ordinal: 1;
1680
+ readonly revision: string;
1681
+ readonly runId: string;
1682
+ readonly schemaVersion: "maia.orchestration/v1";
1683
+ readonly state: "failed" | "active" | "waiting-question";
1684
+ readonly taskId: string;
1685
+ readonly updatedAt: string;
1686
+ };
1687
+ readonly mailboxes: readonly {
1688
+ readonly contentBytes: string;
1689
+ readonly createdAt: string;
1690
+ readonly deliveryCount: string;
1691
+ readonly headSequence: string;
1692
+ readonly id: string;
1693
+ readonly owner: {
1694
+ readonly id: string;
1695
+ readonly kind: "run";
1696
+ } | {
1697
+ readonly id: string;
1698
+ readonly kind: "dispatch";
1699
+ };
1700
+ readonly revision: string;
1701
+ readonly runId: string;
1702
+ readonly schemaVersion: "maia.orchestration/v1";
1703
+ readonly updatedAt: string;
1704
+ }[];
1705
+ readonly question?: {
1706
+ readonly state: "open";
1707
+ readonly askMessageId: string;
1708
+ readonly attemptId: string;
1709
+ readonly body: string;
1710
+ readonly createdAt: string;
1711
+ readonly dispatchId: string;
1712
+ readonly id: string;
1713
+ readonly revision: string;
1714
+ readonly runId: string;
1715
+ readonly schemaVersion: "maia.orchestration/v1";
1716
+ readonly subject: string;
1717
+ readonly taskId: string;
1718
+ readonly updatedAt: string;
1719
+ } | {
1720
+ readonly answer: string;
1721
+ readonly replyMessageId: string;
1722
+ readonly state: "answered";
1723
+ readonly askMessageId: string;
1724
+ readonly attemptId: string;
1725
+ readonly body: string;
1726
+ readonly createdAt: string;
1727
+ readonly dispatchId: string;
1728
+ readonly id: string;
1729
+ readonly revision: string;
1730
+ readonly runId: string;
1731
+ readonly schemaVersion: "maia.orchestration/v1";
1732
+ readonly subject: string;
1733
+ readonly taskId: string;
1734
+ readonly updatedAt: string;
1735
+ } | {
1736
+ readonly state: "cancelled";
1737
+ readonly askMessageId: string;
1738
+ readonly attemptId: string;
1739
+ readonly body: string;
1740
+ readonly createdAt: string;
1741
+ readonly dispatchId: string;
1742
+ readonly id: string;
1743
+ readonly revision: string;
1744
+ readonly runId: string;
1745
+ readonly schemaVersion: "maia.orchestration/v1";
1746
+ readonly subject: string;
1747
+ readonly taskId: string;
1748
+ readonly updatedAt: string;
1749
+ } | undefined;
1750
+ };
1751
+ readonly receipt: {
1752
+ readonly actorId: string;
1753
+ readonly aggregateRevision: string;
1754
+ readonly commandId: string;
1755
+ readonly createdAt: string;
1756
+ readonly eventCursor: string;
1757
+ readonly method: string;
1758
+ readonly receiptId: string;
1759
+ readonly schemaVersion: 1;
1760
+ readonly state: "succeeded";
1761
+ readonly target: {
1762
+ readonly id: string;
1763
+ readonly type: string;
1764
+ };
1765
+ readonly updatedAt: string;
1766
+ };
1767
+ }>, context: OutputContext) => number;
1768
+ export declare const writeDispatchSettleResult: (result: CliNodeResult<{
1769
+ readonly aggregate: {
1770
+ readonly run: {
1771
+ readonly coordinator: {
1772
+ readonly actorId: "actor_local_user";
1773
+ readonly epoch: 1;
1774
+ };
1775
+ readonly createdAt: string;
1776
+ readonly dispatchTaskId: string;
1777
+ readonly id: string;
1778
+ readonly revision: string;
1779
+ readonly rootTaskId: string;
1780
+ readonly schemaVersion: "maia.orchestration/v1";
1781
+ readonly state: "failed" | "active" | "waiting-question";
1782
+ readonly terminalId: string;
1783
+ readonly updatedAt: string;
1784
+ readonly workspaceId: string;
1785
+ };
1786
+ readonly dispatch: {
1787
+ readonly state: "active";
1788
+ readonly attemptId: string;
1789
+ readonly createdAt: string;
1790
+ readonly id: string;
1791
+ readonly revision: string;
1792
+ readonly runId: string;
1793
+ readonly schemaVersion: "maia.orchestration/v1";
1794
+ readonly taskId: string;
1795
+ readonly terminalId: string;
1796
+ readonly updatedAt: string;
1797
+ } | {
1798
+ readonly state: "waiting-question";
1799
+ readonly attemptId: string;
1800
+ readonly createdAt: string;
1801
+ readonly id: string;
1802
+ readonly revision: string;
1803
+ readonly runId: string;
1804
+ readonly schemaVersion: "maia.orchestration/v1";
1805
+ readonly taskId: string;
1806
+ readonly terminalId: string;
1807
+ readonly updatedAt: string;
1808
+ } | {
1809
+ readonly failure: {
1810
+ readonly code: "terminal_containment_unsupported";
1811
+ readonly platform: "darwin" | "linux";
1812
+ } | {
1813
+ readonly code: "platform_unsupported";
1814
+ readonly platform: "win32" | "other";
1815
+ };
1816
+ readonly state: "failed";
1817
+ readonly attemptId: string;
1818
+ readonly createdAt: string;
1819
+ readonly id: string;
1820
+ readonly revision: string;
1821
+ readonly runId: string;
1822
+ readonly schemaVersion: "maia.orchestration/v1";
1823
+ readonly taskId: string;
1824
+ readonly terminalId: string;
1825
+ readonly updatedAt: string;
1826
+ };
1827
+ readonly tasks: readonly {
1828
+ readonly objective: string;
1829
+ readonly clientKey: string;
1830
+ readonly createdAt: string;
1831
+ readonly dependencyTaskIds: readonly string[];
1832
+ readonly id: string;
1833
+ readonly revision: string;
1834
+ readonly runId: string;
1835
+ readonly schemaVersion: "maia.orchestration/v1";
1836
+ readonly state: "failed" | "active" | "pending" | "waiting-question";
1837
+ readonly updatedAt: string;
1838
+ readonly workspaceId: string;
1839
+ }[];
1840
+ readonly attempt: {
1841
+ readonly createdAt: string;
1842
+ readonly id: string;
1843
+ readonly ordinal: 1;
1844
+ readonly revision: string;
1845
+ readonly runId: string;
1846
+ readonly schemaVersion: "maia.orchestration/v1";
1847
+ readonly state: "failed" | "active" | "waiting-question";
1848
+ readonly taskId: string;
1849
+ readonly updatedAt: string;
1850
+ };
1851
+ readonly mailboxes: readonly {
1852
+ readonly contentBytes: string;
1853
+ readonly createdAt: string;
1854
+ readonly deliveryCount: string;
1855
+ readonly headSequence: string;
1856
+ readonly id: string;
1857
+ readonly owner: {
1858
+ readonly id: string;
1859
+ readonly kind: "run";
1860
+ } | {
1861
+ readonly id: string;
1862
+ readonly kind: "dispatch";
1863
+ };
1864
+ readonly revision: string;
1865
+ readonly runId: string;
1866
+ readonly schemaVersion: "maia.orchestration/v1";
1867
+ readonly updatedAt: string;
1868
+ }[];
1869
+ readonly question?: {
1870
+ readonly state: "open";
1871
+ readonly askMessageId: string;
1872
+ readonly attemptId: string;
1873
+ readonly body: string;
1874
+ readonly createdAt: string;
1875
+ readonly dispatchId: string;
1876
+ readonly id: string;
1877
+ readonly revision: string;
1878
+ readonly runId: string;
1879
+ readonly schemaVersion: "maia.orchestration/v1";
1880
+ readonly subject: string;
1881
+ readonly taskId: string;
1882
+ readonly updatedAt: string;
1883
+ } | {
1884
+ readonly answer: string;
1885
+ readonly replyMessageId: string;
1886
+ readonly state: "answered";
1887
+ readonly askMessageId: string;
1888
+ readonly attemptId: string;
1889
+ readonly body: string;
1890
+ readonly createdAt: string;
1891
+ readonly dispatchId: string;
1892
+ readonly id: string;
1893
+ readonly revision: string;
1894
+ readonly runId: string;
1895
+ readonly schemaVersion: "maia.orchestration/v1";
1896
+ readonly subject: string;
1897
+ readonly taskId: string;
1898
+ readonly updatedAt: string;
1899
+ } | {
1900
+ readonly state: "cancelled";
1901
+ readonly askMessageId: string;
1902
+ readonly attemptId: string;
1903
+ readonly body: string;
1904
+ readonly createdAt: string;
1905
+ readonly dispatchId: string;
1906
+ readonly id: string;
1907
+ readonly revision: string;
1908
+ readonly runId: string;
1909
+ readonly schemaVersion: "maia.orchestration/v1";
1910
+ readonly subject: string;
1911
+ readonly taskId: string;
1912
+ readonly updatedAt: string;
1913
+ } | undefined;
1914
+ };
1915
+ readonly delivery: {
1916
+ readonly message: {
1917
+ readonly recipient: {
1918
+ readonly id: string;
1919
+ readonly kind: "dispatch";
1920
+ };
1921
+ readonly type: "dispatch";
1922
+ readonly body: string;
1923
+ readonly createdAt: string;
1924
+ readonly digest: string;
1925
+ readonly id: string;
1926
+ readonly runId: string;
1927
+ readonly schemaVersion: "maia.orchestration-message/v1";
1928
+ readonly sender: {
1929
+ readonly actorId: "actor_local_user";
1930
+ readonly kind: "run-coordinator";
1931
+ readonly runId: string;
1932
+ };
1933
+ readonly subject: string;
1934
+ } | {
1935
+ readonly questionId: string;
1936
+ readonly recipient: {
1937
+ readonly id: string;
1938
+ readonly kind: "run";
1939
+ };
1940
+ readonly type: "question";
1941
+ readonly body: string;
1942
+ readonly createdAt: string;
1943
+ readonly digest: string;
1944
+ readonly id: string;
1945
+ readonly runId: string;
1946
+ readonly schemaVersion: "maia.orchestration-message/v1";
1947
+ readonly sender: {
1948
+ readonly actorId: "actor_local_user";
1949
+ readonly kind: "run-coordinator";
1950
+ readonly runId: string;
1951
+ };
1952
+ readonly subject: string;
1953
+ } | {
1954
+ readonly questionId: string;
1955
+ readonly recipient: {
1956
+ readonly id: string;
1957
+ readonly kind: "dispatch";
1958
+ };
1959
+ readonly type: "reply";
1960
+ readonly body: string;
1961
+ readonly createdAt: string;
1962
+ readonly digest: string;
1963
+ readonly id: string;
1964
+ readonly runId: string;
1965
+ readonly schemaVersion: "maia.orchestration-message/v1";
1966
+ readonly sender: {
1967
+ readonly actorId: "actor_local_user";
1968
+ readonly kind: "run-coordinator";
1969
+ readonly runId: string;
1970
+ };
1971
+ readonly subject: string;
1972
+ } | {
1973
+ readonly recipient: {
1974
+ readonly id: string;
1975
+ readonly kind: "run";
1976
+ };
1977
+ readonly type: "dispatch-settled";
1978
+ readonly body: string;
1979
+ readonly createdAt: string;
1980
+ readonly digest: string;
1981
+ readonly id: string;
1982
+ readonly runId: string;
1983
+ readonly schemaVersion: "maia.orchestration-message/v1";
1984
+ readonly sender: {
1985
+ readonly actorId: "actor_local_user";
1986
+ readonly kind: "run-coordinator";
1987
+ readonly runId: string;
1988
+ };
1989
+ readonly subject: string;
1990
+ };
1991
+ readonly state: "pending";
1992
+ readonly id: string;
1993
+ readonly createdAt: string;
1994
+ readonly mailboxId: string;
1995
+ readonly attemptCount: number;
1996
+ readonly sequence: string;
1997
+ readonly firstDeliveredAt?: string | undefined;
1998
+ readonly lastDeliveredAt?: string | undefined;
1999
+ } | {
2000
+ readonly message: {
2001
+ readonly recipient: {
2002
+ readonly id: string;
2003
+ readonly kind: "dispatch";
2004
+ };
2005
+ readonly type: "dispatch";
2006
+ readonly body: string;
2007
+ readonly createdAt: string;
2008
+ readonly digest: string;
2009
+ readonly id: string;
2010
+ readonly runId: string;
2011
+ readonly schemaVersion: "maia.orchestration-message/v1";
2012
+ readonly sender: {
2013
+ readonly actorId: "actor_local_user";
2014
+ readonly kind: "run-coordinator";
2015
+ readonly runId: string;
2016
+ };
2017
+ readonly subject: string;
2018
+ } | {
2019
+ readonly questionId: string;
2020
+ readonly recipient: {
2021
+ readonly id: string;
2022
+ readonly kind: "run";
2023
+ };
2024
+ readonly type: "question";
2025
+ readonly body: string;
2026
+ readonly createdAt: string;
2027
+ readonly digest: string;
2028
+ readonly id: string;
2029
+ readonly runId: string;
2030
+ readonly schemaVersion: "maia.orchestration-message/v1";
2031
+ readonly sender: {
2032
+ readonly actorId: "actor_local_user";
2033
+ readonly kind: "run-coordinator";
2034
+ readonly runId: string;
2035
+ };
2036
+ readonly subject: string;
2037
+ } | {
2038
+ readonly questionId: string;
2039
+ readonly recipient: {
2040
+ readonly id: string;
2041
+ readonly kind: "dispatch";
2042
+ };
2043
+ readonly type: "reply";
2044
+ readonly body: string;
2045
+ readonly createdAt: string;
2046
+ readonly digest: string;
2047
+ readonly id: string;
2048
+ readonly runId: string;
2049
+ readonly schemaVersion: "maia.orchestration-message/v1";
2050
+ readonly sender: {
2051
+ readonly actorId: "actor_local_user";
2052
+ readonly kind: "run-coordinator";
2053
+ readonly runId: string;
2054
+ };
2055
+ readonly subject: string;
2056
+ } | {
2057
+ readonly recipient: {
2058
+ readonly id: string;
2059
+ readonly kind: "run";
2060
+ };
2061
+ readonly type: "dispatch-settled";
2062
+ readonly body: string;
2063
+ readonly createdAt: string;
2064
+ readonly digest: string;
2065
+ readonly id: string;
2066
+ readonly runId: string;
2067
+ readonly schemaVersion: "maia.orchestration-message/v1";
2068
+ readonly sender: {
2069
+ readonly actorId: "actor_local_user";
2070
+ readonly kind: "run-coordinator";
2071
+ readonly runId: string;
2072
+ };
2073
+ readonly subject: string;
2074
+ };
2075
+ readonly state: "acknowledged";
2076
+ readonly id: string;
2077
+ readonly createdAt: string;
2078
+ readonly mailboxId: string;
2079
+ readonly attemptCount: number;
2080
+ readonly sequence: string;
2081
+ readonly acknowledgingActorId: "actor_local_user";
2082
+ readonly acknowledgedAt: string;
2083
+ readonly firstDeliveredAt?: string | undefined;
2084
+ readonly lastDeliveredAt?: string | undefined;
2085
+ };
2086
+ readonly method: "run.dispatch.settle-terminal";
2087
+ readonly receipt: {
2088
+ readonly actorId: string;
2089
+ readonly aggregateRevision: string;
2090
+ readonly commandId: string;
2091
+ readonly createdAt: string;
2092
+ readonly eventCursor: string;
2093
+ readonly method: string;
2094
+ readonly receiptId: string;
2095
+ readonly schemaVersion: 1;
2096
+ readonly state: "succeeded";
2097
+ readonly target: {
2098
+ readonly id: string;
2099
+ readonly type: string;
2100
+ };
2101
+ readonly updatedAt: string;
2102
+ };
2103
+ }>, context: OutputContext) => number;
2104
+ export declare const writeCurrentContextResult: (result: CliNodeResult<InvocationContextShowResult>, context: OutputContext) => number;
2105
+ export declare const writeIntegrationApplyResult: (result: CliNodeResult<IntegrationApplyCodexResult | IntegrationApplyPiRpcResult>, context: OutputContext) => number;
2106
+ export declare const writeIntegrationPlanResult: (result: CliNodeResult<IntegrationPlanCodexResult | IntegrationPlanPiRpcResult>, context: OutputContext) => number;
2107
+ export declare const writeIntegrationRemoveResult: (result: CliNodeResult<IntegrationRemoveCodexResult | IntegrationRemovePiRpcResult>, context: OutputContext) => number;
2108
+ export declare const writeIntegrationStatusResult: (result: CliNodeResult<IntegrationStatusCodexResult | IntegrationStatusPiRpcResult>, context: OutputContext) => number;
2109
+ export declare const writeRuntimeListResult: (result: CliNodeResult<InstalledHarnessListResult>, context: OutputContext) => number;
2110
+ export declare const writeRuntimeProbeResult: (result: CliNodeResult<RuntimeProbeResult>, context: OutputContext) => number;
2111
+ //# sourceMappingURL=output.d.ts.map