claude-flow 3.50.0 → 3.51.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 (68) hide show
  1. package/.claude/helpers/hook-handler.cjs +4 -3
  2. package/.claude/proven-config.json +1 -1
  3. package/.claude/settings.json +11 -2
  4. package/.claude-plugin/marketplace.json +5 -0
  5. package/README.md +3 -1
  6. package/package.json +1 -1
  7. package/v3/@claude-flow/cli/README.md +0 -2
  8. package/v3/@claude-flow/cli/catalog-manifest.json +4 -4
  9. package/v3/@claude-flow/cli/dist/src/commands/catalog.d.ts +18 -0
  10. package/v3/@claude-flow/cli/dist/src/commands/catalog.js +89 -0
  11. package/v3/@claude-flow/cli/dist/src/commands/doctor.js +8 -3
  12. package/v3/@claude-flow/cli/dist/src/commands/federation.js +2 -2
  13. package/v3/@claude-flow/cli/dist/src/commands/index.js +3 -0
  14. package/v3/@claude-flow/cli/dist/src/commands/init.js +50 -11
  15. package/v3/@claude-flow/cli/dist/src/commands/mission.d.ts +24 -0
  16. package/v3/@claude-flow/cli/dist/src/commands/mission.js +116 -0
  17. package/v3/@claude-flow/cli/dist/src/commands/mods.d.ts +1 -1
  18. package/v3/@claude-flow/cli/dist/src/commands/mods.js +67 -23
  19. package/v3/@claude-flow/cli/dist/src/init/helpers-generator.js +4 -2
  20. package/v3/@claude-flow/cli/dist/src/mcp-client.js +3 -0
  21. package/v3/@claude-flow/cli/dist/src/mcp-tools/capability-brain.js +1 -1
  22. package/v3/@claude-flow/cli/dist/src/mcp-tools/index.d.ts +1 -0
  23. package/v3/@claude-flow/cli/dist/src/mcp-tools/index.js +2 -0
  24. package/v3/@claude-flow/cli/dist/src/mcp-tools/mission-tools.d.ts +22 -0
  25. package/v3/@claude-flow/cli/dist/src/mcp-tools/mission-tools.js +75 -0
  26. package/v3/@claude-flow/cli/dist/src/mcp-tools/seraphina-tools.js +15 -12
  27. package/v3/@claude-flow/cli/dist/src/mcp-tools/service-url.d.ts +2 -0
  28. package/v3/@claude-flow/cli/dist/src/mcp-tools/service-url.js +34 -0
  29. package/v3/@claude-flow/cli/dist/src/mcp-tools/x-federation-tools.js +5 -4
  30. package/v3/@claude-flow/cli/dist/src/missions/fold.d.ts +19 -0
  31. package/v3/@claude-flow/cli/dist/src/missions/fold.js +238 -0
  32. package/v3/@claude-flow/cli/dist/src/missions/index.d.ts +10 -0
  33. package/v3/@claude-flow/cli/dist/src/missions/index.js +10 -0
  34. package/v3/@claude-flow/cli/dist/src/missions/observation.d.ts +70 -0
  35. package/v3/@claude-flow/cli/dist/src/missions/observation.js +77 -0
  36. package/v3/@claude-flow/cli/dist/src/missions/schemas.d.ts +735 -0
  37. package/v3/@claude-flow/cli/dist/src/missions/schemas.js +150 -0
  38. package/v3/@claude-flow/cli/dist/src/missions/service.d.ts +88 -0
  39. package/v3/@claude-flow/cli/dist/src/missions/service.js +278 -0
  40. package/v3/@claude-flow/cli/dist/src/missions/store.d.ts +68 -0
  41. package/v3/@claude-flow/cli/dist/src/missions/store.js +209 -0
  42. package/v3/@claude-flow/cli/dist/src/missions/transitions.d.ts +81 -0
  43. package/v3/@claude-flow/cli/dist/src/missions/transitions.js +178 -0
  44. package/v3/@claude-flow/cli/dist/src/mods/apply.d.ts +50 -0
  45. package/v3/@claude-flow/cli/dist/src/mods/apply.js +186 -0
  46. package/v3/@claude-flow/cli/dist/src/mods/command-registry/catalog.d.ts +45 -0
  47. package/v3/@claude-flow/cli/dist/src/mods/command-registry/catalog.js +234 -0
  48. package/v3/@claude-flow/cli/dist/src/mods/command-registry/engine-report.d.ts +66 -0
  49. package/v3/@claude-flow/cli/dist/src/mods/command-registry/engine-report.js +119 -0
  50. package/v3/@claude-flow/cli/dist/src/mods/command-registry/generate.d.ts +51 -0
  51. package/v3/@claude-flow/cli/dist/src/mods/command-registry/generate.js +166 -0
  52. package/v3/@claude-flow/cli/dist/src/mods/command-registry/index.d.ts +9 -0
  53. package/v3/@claude-flow/cli/dist/src/mods/command-registry/index.js +9 -0
  54. package/v3/@claude-flow/cli/dist/src/mods/command-registry/inventory.d.ts +63 -0
  55. package/v3/@claude-flow/cli/dist/src/mods/command-registry/inventory.js +230 -0
  56. package/v3/@claude-flow/cli/dist/src/mods/command-registry/schema.d.ts +836 -0
  57. package/v3/@claude-flow/cli/dist/src/mods/command-registry/schema.js +137 -0
  58. package/v3/@claude-flow/cli/dist/src/mods/install.d.ts +60 -22
  59. package/v3/@claude-flow/cli/dist/src/mods/install.js +91 -41
  60. package/v3/@claude-flow/cli/dist/src/mods/plugin-repair.d.ts +81 -0
  61. package/v3/@claude-flow/cli/dist/src/mods/plugin-repair.js +120 -0
  62. package/v3/@claude-flow/cli/dist/src/mods/plugin-resolve.d.ts +63 -0
  63. package/v3/@claude-flow/cli/dist/src/mods/plugin-resolve.js +182 -0
  64. package/v3/@claude-flow/cli/dist/src/mods/probe.d.ts +5 -0
  65. package/v3/@claude-flow/cli/dist/src/mods/probe.js +28 -3
  66. package/v3/@claude-flow/cli/dist/src/services/policy-runtime.d.ts +5 -0
  67. package/v3/@claude-flow/cli/dist/src/services/policy-runtime.js +5 -1
  68. package/v3/@claude-flow/cli/package.json +1 -1
@@ -0,0 +1,735 @@
1
+ /**
2
+ * ADR-406 §19.3 — versioned mission schemas.
3
+ *
4
+ * `MissionRecord` is the §19.3 logical schema field for field (strict). The
5
+ * plan body, budget ledger, evidence index and executor observations are kept
6
+ * in a `MissionView` beside it, so the record itself stays exactly the ADR's.
7
+ *
8
+ * Every client input (CLI and MCP alike) is parsed here: strict objects,
9
+ * bounded strings and arrays, integer monetary units. Principal, tenant and
10
+ * workspace are never accepted from input; the service derives them.
11
+ */
12
+ import { z } from 'zod';
13
+ export declare const MISSION_SCHEMA_VERSION: 1;
14
+ export declare const MISSION_EVENT_CONTRACT: "ruflo.mission-event/1";
15
+ export declare const MISSION_LIMITS: Readonly<{
16
+ objective: 2000;
17
+ title: 200;
18
+ text: 500;
19
+ id: 64;
20
+ tasks: 100;
21
+ criteria: 50;
22
+ deps: 32;
23
+ capabilities: 32;
24
+ maxMinor: 1000000000000;
25
+ requestId: 128;
26
+ eventsPage: 500;
27
+ }>;
28
+ export declare const missionStateSchema: z.ZodEnum<["draft", "planned", "awaitingAuthorization", "queued", "running", "pauseRequested", "paused", "blocked", "verifying", "completed", "failed", "cancelRequested", "cancelled"]>;
29
+ export type MissionState = z.infer<typeof missionStateSchema>;
30
+ export declare const TERMINAL_STATES: ReadonlySet<MissionState>;
31
+ export declare const executionModeSchema: z.ZodEnum<["durable-executor", "session-bound"]>;
32
+ export type ExecutionMode = z.infer<typeof executionModeSchema>;
33
+ export declare const MISSION_ID: RegExp;
34
+ /** §19.3, exactly. */
35
+ export declare const missionRecordSchema: z.ZodObject<{
36
+ schemaVersion: z.ZodLiteral<1>;
37
+ missionId: z.ZodString;
38
+ tenantId: z.ZodString;
39
+ workspaceId: z.ZodString;
40
+ ownerPrincipalId: z.ZodString;
41
+ revision: z.ZodNumber;
42
+ objective: z.ZodString;
43
+ plan: z.ZodObject<{
44
+ revision: z.ZodNumber;
45
+ digest: z.ZodString;
46
+ taskGraphRef: z.ZodString;
47
+ }, "strict", z.ZodTypeAny, {
48
+ revision: number;
49
+ digest: string;
50
+ taskGraphRef: string;
51
+ }, {
52
+ revision: number;
53
+ digest: string;
54
+ taskGraphRef: string;
55
+ }>;
56
+ policyRef: z.ZodString;
57
+ authorizationRef: z.ZodOptional<z.ZodString>;
58
+ budgetRef: z.ZodString;
59
+ executionMode: z.ZodEnum<["durable-executor", "session-bound"]>;
60
+ state: z.ZodEnum<["draft", "planned", "awaitingAuthorization", "queued", "running", "pauseRequested", "paused", "blocked", "verifying", "completed", "failed", "cancelRequested", "cancelled"]>;
61
+ evidenceRefs: z.ZodArray<z.ZodString, "many">;
62
+ acceptance: z.ZodObject<{
63
+ revision: z.ZodNumber;
64
+ criteriaDigest: z.ZodString;
65
+ }, "strict", z.ZodTypeAny, {
66
+ revision: number;
67
+ criteriaDigest: string;
68
+ }, {
69
+ revision: number;
70
+ criteriaDigest: string;
71
+ }>;
72
+ lastEventSequence: z.ZodNumber;
73
+ createdAt: z.ZodString;
74
+ updatedAt: z.ZodString;
75
+ }, "strict", z.ZodTypeAny, {
76
+ createdAt: string;
77
+ updatedAt: string;
78
+ schemaVersion: 1;
79
+ state: "completed" | "cancelled" | "failed" | "blocked" | "running" | "paused" | "queued" | "draft" | "planned" | "awaitingAuthorization" | "pauseRequested" | "verifying" | "cancelRequested";
80
+ plan: {
81
+ revision: number;
82
+ digest: string;
83
+ taskGraphRef: string;
84
+ };
85
+ objective: string;
86
+ missionId: string;
87
+ tenantId: string;
88
+ workspaceId: string;
89
+ ownerPrincipalId: string;
90
+ revision: number;
91
+ policyRef: string;
92
+ budgetRef: string;
93
+ executionMode: "durable-executor" | "session-bound";
94
+ evidenceRefs: string[];
95
+ acceptance: {
96
+ revision: number;
97
+ criteriaDigest: string;
98
+ };
99
+ lastEventSequence: number;
100
+ authorizationRef?: string | undefined;
101
+ }, {
102
+ createdAt: string;
103
+ updatedAt: string;
104
+ schemaVersion: 1;
105
+ state: "completed" | "cancelled" | "failed" | "blocked" | "running" | "paused" | "queued" | "draft" | "planned" | "awaitingAuthorization" | "pauseRequested" | "verifying" | "cancelRequested";
106
+ plan: {
107
+ revision: number;
108
+ digest: string;
109
+ taskGraphRef: string;
110
+ };
111
+ objective: string;
112
+ missionId: string;
113
+ tenantId: string;
114
+ workspaceId: string;
115
+ ownerPrincipalId: string;
116
+ revision: number;
117
+ policyRef: string;
118
+ budgetRef: string;
119
+ executionMode: "durable-executor" | "session-bound";
120
+ evidenceRefs: string[];
121
+ acceptance: {
122
+ revision: number;
123
+ criteriaDigest: string;
124
+ };
125
+ lastEventSequence: number;
126
+ authorizationRef?: string | undefined;
127
+ }>;
128
+ export type MissionRecord = z.infer<typeof missionRecordSchema>;
129
+ export declare const taskSpecSchema: z.ZodObject<{
130
+ id: z.ZodString;
131
+ title: z.ZodString;
132
+ dependsOn: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
133
+ executor: z.ZodObject<{
134
+ mode: z.ZodEnum<["durable-executor", "session-bound"]>;
135
+ requirement: z.ZodString;
136
+ }, "strict", z.ZodTypeAny, {
137
+ mode: "durable-executor" | "session-bound";
138
+ requirement: string;
139
+ }, {
140
+ mode: "durable-executor" | "session-bound";
141
+ requirement: string;
142
+ }>;
143
+ capabilityCeiling: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
144
+ estimatedCostMinor: z.ZodDefault<z.ZodNumber>;
145
+ checkpoint: z.ZodOptional<z.ZodString>;
146
+ acceptanceEvidence: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
147
+ }, "strict", z.ZodTypeAny, {
148
+ id: string;
149
+ title: string;
150
+ dependsOn: string[];
151
+ executor: {
152
+ mode: "durable-executor" | "session-bound";
153
+ requirement: string;
154
+ };
155
+ capabilityCeiling: string[];
156
+ estimatedCostMinor: number;
157
+ acceptanceEvidence: string[];
158
+ checkpoint?: string | undefined;
159
+ }, {
160
+ id: string;
161
+ title: string;
162
+ executor: {
163
+ mode: "durable-executor" | "session-bound";
164
+ requirement: string;
165
+ };
166
+ checkpoint?: string | undefined;
167
+ dependsOn?: string[] | undefined;
168
+ capabilityCeiling?: string[] | undefined;
169
+ estimatedCostMinor?: number | undefined;
170
+ acceptanceEvidence?: string[] | undefined;
171
+ }>;
172
+ export declare const acceptanceCriterionSchema: z.ZodObject<{
173
+ id: z.ZodString;
174
+ check: z.ZodString;
175
+ inputs: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
176
+ baseline: z.ZodOptional<z.ZodString>;
177
+ threshold: z.ZodOptional<z.ZodString>;
178
+ producer: z.ZodString;
179
+ independent: z.ZodDefault<z.ZodBoolean>;
180
+ mandatory: z.ZodDefault<z.ZodBoolean>;
181
+ }, "strict", z.ZodTypeAny, {
182
+ id: string;
183
+ check: string;
184
+ inputs: string[];
185
+ producer: string;
186
+ independent: boolean;
187
+ mandatory: boolean;
188
+ threshold?: string | undefined;
189
+ baseline?: string | undefined;
190
+ }, {
191
+ id: string;
192
+ check: string;
193
+ producer: string;
194
+ threshold?: string | undefined;
195
+ baseline?: string | undefined;
196
+ inputs?: string[] | undefined;
197
+ independent?: boolean | undefined;
198
+ mandatory?: boolean | undefined;
199
+ }>;
200
+ export declare const budgetSpecSchema: z.ZodObject<{
201
+ currency: z.ZodString;
202
+ ceilingMinor: z.ZodEffects<z.ZodNumber, number, number>;
203
+ tokens: z.ZodOptional<z.ZodNumber>;
204
+ wallTimeSeconds: z.ZodOptional<z.ZodNumber>;
205
+ concurrency: z.ZodOptional<z.ZodNumber>;
206
+ retries: z.ZodOptional<z.ZodNumber>;
207
+ }, "strict", z.ZodTypeAny, {
208
+ currency: string;
209
+ ceilingMinor: number;
210
+ concurrency?: number | undefined;
211
+ tokens?: number | undefined;
212
+ wallTimeSeconds?: number | undefined;
213
+ retries?: number | undefined;
214
+ }, {
215
+ currency: string;
216
+ ceilingMinor: number;
217
+ concurrency?: number | undefined;
218
+ tokens?: number | undefined;
219
+ wallTimeSeconds?: number | undefined;
220
+ retries?: number | undefined;
221
+ }>;
222
+ export declare const planBodySchema: z.ZodObject<{
223
+ tasks: z.ZodArray<z.ZodObject<{
224
+ id: z.ZodString;
225
+ title: z.ZodString;
226
+ dependsOn: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
227
+ executor: z.ZodObject<{
228
+ mode: z.ZodEnum<["durable-executor", "session-bound"]>;
229
+ requirement: z.ZodString;
230
+ }, "strict", z.ZodTypeAny, {
231
+ mode: "durable-executor" | "session-bound";
232
+ requirement: string;
233
+ }, {
234
+ mode: "durable-executor" | "session-bound";
235
+ requirement: string;
236
+ }>;
237
+ capabilityCeiling: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
238
+ estimatedCostMinor: z.ZodDefault<z.ZodNumber>;
239
+ checkpoint: z.ZodOptional<z.ZodString>;
240
+ acceptanceEvidence: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
241
+ }, "strict", z.ZodTypeAny, {
242
+ id: string;
243
+ title: string;
244
+ dependsOn: string[];
245
+ executor: {
246
+ mode: "durable-executor" | "session-bound";
247
+ requirement: string;
248
+ };
249
+ capabilityCeiling: string[];
250
+ estimatedCostMinor: number;
251
+ acceptanceEvidence: string[];
252
+ checkpoint?: string | undefined;
253
+ }, {
254
+ id: string;
255
+ title: string;
256
+ executor: {
257
+ mode: "durable-executor" | "session-bound";
258
+ requirement: string;
259
+ };
260
+ checkpoint?: string | undefined;
261
+ dependsOn?: string[] | undefined;
262
+ capabilityCeiling?: string[] | undefined;
263
+ estimatedCostMinor?: number | undefined;
264
+ acceptanceEvidence?: string[] | undefined;
265
+ }>, "many">;
266
+ acceptance: z.ZodArray<z.ZodObject<{
267
+ id: z.ZodString;
268
+ check: z.ZodString;
269
+ inputs: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
270
+ baseline: z.ZodOptional<z.ZodString>;
271
+ threshold: z.ZodOptional<z.ZodString>;
272
+ producer: z.ZodString;
273
+ independent: z.ZodDefault<z.ZodBoolean>;
274
+ mandatory: z.ZodDefault<z.ZodBoolean>;
275
+ }, "strict", z.ZodTypeAny, {
276
+ id: string;
277
+ check: string;
278
+ inputs: string[];
279
+ producer: string;
280
+ independent: boolean;
281
+ mandatory: boolean;
282
+ threshold?: string | undefined;
283
+ baseline?: string | undefined;
284
+ }, {
285
+ id: string;
286
+ check: string;
287
+ producer: string;
288
+ threshold?: string | undefined;
289
+ baseline?: string | undefined;
290
+ inputs?: string[] | undefined;
291
+ independent?: boolean | undefined;
292
+ mandatory?: boolean | undefined;
293
+ }>, "many">;
294
+ budget: z.ZodObject<{
295
+ currency: z.ZodString;
296
+ ceilingMinor: z.ZodEffects<z.ZodNumber, number, number>;
297
+ tokens: z.ZodOptional<z.ZodNumber>;
298
+ wallTimeSeconds: z.ZodOptional<z.ZodNumber>;
299
+ concurrency: z.ZodOptional<z.ZodNumber>;
300
+ retries: z.ZodOptional<z.ZodNumber>;
301
+ }, "strict", z.ZodTypeAny, {
302
+ currency: string;
303
+ ceilingMinor: number;
304
+ concurrency?: number | undefined;
305
+ tokens?: number | undefined;
306
+ wallTimeSeconds?: number | undefined;
307
+ retries?: number | undefined;
308
+ }, {
309
+ currency: string;
310
+ ceilingMinor: number;
311
+ concurrency?: number | undefined;
312
+ tokens?: number | undefined;
313
+ wallTimeSeconds?: number | undefined;
314
+ retries?: number | undefined;
315
+ }>;
316
+ scope: z.ZodDefault<z.ZodObject<{
317
+ capabilities: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
318
+ }, "strict", z.ZodTypeAny, {
319
+ capabilities: string[];
320
+ }, {
321
+ capabilities?: string[] | undefined;
322
+ }>>;
323
+ }, "strict", z.ZodTypeAny, {
324
+ tasks: {
325
+ id: string;
326
+ title: string;
327
+ dependsOn: string[];
328
+ executor: {
329
+ mode: "durable-executor" | "session-bound";
330
+ requirement: string;
331
+ };
332
+ capabilityCeiling: string[];
333
+ estimatedCostMinor: number;
334
+ acceptanceEvidence: string[];
335
+ checkpoint?: string | undefined;
336
+ }[];
337
+ scope: {
338
+ capabilities: string[];
339
+ };
340
+ budget: {
341
+ currency: string;
342
+ ceilingMinor: number;
343
+ concurrency?: number | undefined;
344
+ tokens?: number | undefined;
345
+ wallTimeSeconds?: number | undefined;
346
+ retries?: number | undefined;
347
+ };
348
+ acceptance: {
349
+ id: string;
350
+ check: string;
351
+ inputs: string[];
352
+ producer: string;
353
+ independent: boolean;
354
+ mandatory: boolean;
355
+ threshold?: string | undefined;
356
+ baseline?: string | undefined;
357
+ }[];
358
+ }, {
359
+ tasks: {
360
+ id: string;
361
+ title: string;
362
+ executor: {
363
+ mode: "durable-executor" | "session-bound";
364
+ requirement: string;
365
+ };
366
+ checkpoint?: string | undefined;
367
+ dependsOn?: string[] | undefined;
368
+ capabilityCeiling?: string[] | undefined;
369
+ estimatedCostMinor?: number | undefined;
370
+ acceptanceEvidence?: string[] | undefined;
371
+ }[];
372
+ budget: {
373
+ currency: string;
374
+ ceilingMinor: number;
375
+ concurrency?: number | undefined;
376
+ tokens?: number | undefined;
377
+ wallTimeSeconds?: number | undefined;
378
+ retries?: number | undefined;
379
+ };
380
+ acceptance: {
381
+ id: string;
382
+ check: string;
383
+ producer: string;
384
+ threshold?: string | undefined;
385
+ baseline?: string | undefined;
386
+ inputs?: string[] | undefined;
387
+ independent?: boolean | undefined;
388
+ mandatory?: boolean | undefined;
389
+ }[];
390
+ scope?: {
391
+ capabilities?: string[] | undefined;
392
+ } | undefined;
393
+ }>;
394
+ export type PlanBody = z.infer<typeof planBodySchema>;
395
+ export type TaskSpec = z.infer<typeof taskSpecSchema>;
396
+ export declare const createInputSchema: z.ZodObject<{
397
+ requestId: z.ZodString;
398
+ objective: z.ZodString;
399
+ }, "strict", z.ZodTypeAny, {
400
+ objective: string;
401
+ requestId: string;
402
+ }, {
403
+ objective: string;
404
+ requestId: string;
405
+ }>;
406
+ export declare const planInputSchema: z.ZodObject<{
407
+ requestId: z.ZodString;
408
+ missionId: z.ZodString;
409
+ expectedRevision: z.ZodNumber;
410
+ plan: z.ZodObject<{
411
+ tasks: z.ZodArray<z.ZodObject<{
412
+ id: z.ZodString;
413
+ title: z.ZodString;
414
+ dependsOn: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
415
+ executor: z.ZodObject<{
416
+ mode: z.ZodEnum<["durable-executor", "session-bound"]>;
417
+ requirement: z.ZodString;
418
+ }, "strict", z.ZodTypeAny, {
419
+ mode: "durable-executor" | "session-bound";
420
+ requirement: string;
421
+ }, {
422
+ mode: "durable-executor" | "session-bound";
423
+ requirement: string;
424
+ }>;
425
+ capabilityCeiling: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
426
+ estimatedCostMinor: z.ZodDefault<z.ZodNumber>;
427
+ checkpoint: z.ZodOptional<z.ZodString>;
428
+ acceptanceEvidence: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
429
+ }, "strict", z.ZodTypeAny, {
430
+ id: string;
431
+ title: string;
432
+ dependsOn: string[];
433
+ executor: {
434
+ mode: "durable-executor" | "session-bound";
435
+ requirement: string;
436
+ };
437
+ capabilityCeiling: string[];
438
+ estimatedCostMinor: number;
439
+ acceptanceEvidence: string[];
440
+ checkpoint?: string | undefined;
441
+ }, {
442
+ id: string;
443
+ title: string;
444
+ executor: {
445
+ mode: "durable-executor" | "session-bound";
446
+ requirement: string;
447
+ };
448
+ checkpoint?: string | undefined;
449
+ dependsOn?: string[] | undefined;
450
+ capabilityCeiling?: string[] | undefined;
451
+ estimatedCostMinor?: number | undefined;
452
+ acceptanceEvidence?: string[] | undefined;
453
+ }>, "many">;
454
+ acceptance: z.ZodArray<z.ZodObject<{
455
+ id: z.ZodString;
456
+ check: z.ZodString;
457
+ inputs: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
458
+ baseline: z.ZodOptional<z.ZodString>;
459
+ threshold: z.ZodOptional<z.ZodString>;
460
+ producer: z.ZodString;
461
+ independent: z.ZodDefault<z.ZodBoolean>;
462
+ mandatory: z.ZodDefault<z.ZodBoolean>;
463
+ }, "strict", z.ZodTypeAny, {
464
+ id: string;
465
+ check: string;
466
+ inputs: string[];
467
+ producer: string;
468
+ independent: boolean;
469
+ mandatory: boolean;
470
+ threshold?: string | undefined;
471
+ baseline?: string | undefined;
472
+ }, {
473
+ id: string;
474
+ check: string;
475
+ producer: string;
476
+ threshold?: string | undefined;
477
+ baseline?: string | undefined;
478
+ inputs?: string[] | undefined;
479
+ independent?: boolean | undefined;
480
+ mandatory?: boolean | undefined;
481
+ }>, "many">;
482
+ budget: z.ZodObject<{
483
+ currency: z.ZodString;
484
+ ceilingMinor: z.ZodEffects<z.ZodNumber, number, number>;
485
+ tokens: z.ZodOptional<z.ZodNumber>;
486
+ wallTimeSeconds: z.ZodOptional<z.ZodNumber>;
487
+ concurrency: z.ZodOptional<z.ZodNumber>;
488
+ retries: z.ZodOptional<z.ZodNumber>;
489
+ }, "strict", z.ZodTypeAny, {
490
+ currency: string;
491
+ ceilingMinor: number;
492
+ concurrency?: number | undefined;
493
+ tokens?: number | undefined;
494
+ wallTimeSeconds?: number | undefined;
495
+ retries?: number | undefined;
496
+ }, {
497
+ currency: string;
498
+ ceilingMinor: number;
499
+ concurrency?: number | undefined;
500
+ tokens?: number | undefined;
501
+ wallTimeSeconds?: number | undefined;
502
+ retries?: number | undefined;
503
+ }>;
504
+ scope: z.ZodDefault<z.ZodObject<{
505
+ capabilities: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
506
+ }, "strict", z.ZodTypeAny, {
507
+ capabilities: string[];
508
+ }, {
509
+ capabilities?: string[] | undefined;
510
+ }>>;
511
+ }, "strict", z.ZodTypeAny, {
512
+ tasks: {
513
+ id: string;
514
+ title: string;
515
+ dependsOn: string[];
516
+ executor: {
517
+ mode: "durable-executor" | "session-bound";
518
+ requirement: string;
519
+ };
520
+ capabilityCeiling: string[];
521
+ estimatedCostMinor: number;
522
+ acceptanceEvidence: string[];
523
+ checkpoint?: string | undefined;
524
+ }[];
525
+ scope: {
526
+ capabilities: string[];
527
+ };
528
+ budget: {
529
+ currency: string;
530
+ ceilingMinor: number;
531
+ concurrency?: number | undefined;
532
+ tokens?: number | undefined;
533
+ wallTimeSeconds?: number | undefined;
534
+ retries?: number | undefined;
535
+ };
536
+ acceptance: {
537
+ id: string;
538
+ check: string;
539
+ inputs: string[];
540
+ producer: string;
541
+ independent: boolean;
542
+ mandatory: boolean;
543
+ threshold?: string | undefined;
544
+ baseline?: string | undefined;
545
+ }[];
546
+ }, {
547
+ tasks: {
548
+ id: string;
549
+ title: string;
550
+ executor: {
551
+ mode: "durable-executor" | "session-bound";
552
+ requirement: string;
553
+ };
554
+ checkpoint?: string | undefined;
555
+ dependsOn?: string[] | undefined;
556
+ capabilityCeiling?: string[] | undefined;
557
+ estimatedCostMinor?: number | undefined;
558
+ acceptanceEvidence?: string[] | undefined;
559
+ }[];
560
+ budget: {
561
+ currency: string;
562
+ ceilingMinor: number;
563
+ concurrency?: number | undefined;
564
+ tokens?: number | undefined;
565
+ wallTimeSeconds?: number | undefined;
566
+ retries?: number | undefined;
567
+ };
568
+ acceptance: {
569
+ id: string;
570
+ check: string;
571
+ producer: string;
572
+ threshold?: string | undefined;
573
+ baseline?: string | undefined;
574
+ inputs?: string[] | undefined;
575
+ independent?: boolean | undefined;
576
+ mandatory?: boolean | undefined;
577
+ }[];
578
+ scope?: {
579
+ capabilities?: string[] | undefined;
580
+ } | undefined;
581
+ }>;
582
+ }, "strict", z.ZodTypeAny, {
583
+ plan: {
584
+ tasks: {
585
+ id: string;
586
+ title: string;
587
+ dependsOn: string[];
588
+ executor: {
589
+ mode: "durable-executor" | "session-bound";
590
+ requirement: string;
591
+ };
592
+ capabilityCeiling: string[];
593
+ estimatedCostMinor: number;
594
+ acceptanceEvidence: string[];
595
+ checkpoint?: string | undefined;
596
+ }[];
597
+ scope: {
598
+ capabilities: string[];
599
+ };
600
+ budget: {
601
+ currency: string;
602
+ ceilingMinor: number;
603
+ concurrency?: number | undefined;
604
+ tokens?: number | undefined;
605
+ wallTimeSeconds?: number | undefined;
606
+ retries?: number | undefined;
607
+ };
608
+ acceptance: {
609
+ id: string;
610
+ check: string;
611
+ inputs: string[];
612
+ producer: string;
613
+ independent: boolean;
614
+ mandatory: boolean;
615
+ threshold?: string | undefined;
616
+ baseline?: string | undefined;
617
+ }[];
618
+ };
619
+ requestId: string;
620
+ missionId: string;
621
+ expectedRevision: number;
622
+ }, {
623
+ plan: {
624
+ tasks: {
625
+ id: string;
626
+ title: string;
627
+ executor: {
628
+ mode: "durable-executor" | "session-bound";
629
+ requirement: string;
630
+ };
631
+ checkpoint?: string | undefined;
632
+ dependsOn?: string[] | undefined;
633
+ capabilityCeiling?: string[] | undefined;
634
+ estimatedCostMinor?: number | undefined;
635
+ acceptanceEvidence?: string[] | undefined;
636
+ }[];
637
+ budget: {
638
+ currency: string;
639
+ ceilingMinor: number;
640
+ concurrency?: number | undefined;
641
+ tokens?: number | undefined;
642
+ wallTimeSeconds?: number | undefined;
643
+ retries?: number | undefined;
644
+ };
645
+ acceptance: {
646
+ id: string;
647
+ check: string;
648
+ producer: string;
649
+ threshold?: string | undefined;
650
+ baseline?: string | undefined;
651
+ inputs?: string[] | undefined;
652
+ independent?: boolean | undefined;
653
+ mandatory?: boolean | undefined;
654
+ }[];
655
+ scope?: {
656
+ capabilities?: string[] | undefined;
657
+ } | undefined;
658
+ };
659
+ requestId: string;
660
+ missionId: string;
661
+ expectedRevision: number;
662
+ }>;
663
+ export declare const getInputSchema: z.ZodObject<{
664
+ missionId: z.ZodOptional<z.ZodString>;
665
+ }, "strict", z.ZodTypeAny, {
666
+ missionId?: string | undefined;
667
+ }, {
668
+ missionId?: string | undefined;
669
+ }>;
670
+ export declare const eventsInputSchema: z.ZodObject<{
671
+ missionId: z.ZodString;
672
+ afterSequence: z.ZodDefault<z.ZodNumber>;
673
+ limit: z.ZodDefault<z.ZodNumber>;
674
+ }, "strict", z.ZodTypeAny, {
675
+ limit: number;
676
+ missionId: string;
677
+ afterSequence: number;
678
+ }, {
679
+ missionId: string;
680
+ limit?: number | undefined;
681
+ afterSequence?: number | undefined;
682
+ }>;
683
+ export declare const requestActionInputSchema: z.ZodObject<{
684
+ requestId: z.ZodString;
685
+ missionId: z.ZodString;
686
+ expectedRevision: z.ZodNumber;
687
+ action: z.ZodEnum<["pause", "resume", "cancel", "requestAuthorization", "admit"]>;
688
+ reason: z.ZodOptional<z.ZodString>;
689
+ }, "strict", z.ZodTypeAny, {
690
+ action: "pause" | "resume" | "cancel" | "requestAuthorization" | "admit";
691
+ requestId: string;
692
+ missionId: string;
693
+ expectedRevision: number;
694
+ reason?: string | undefined;
695
+ }, {
696
+ action: "pause" | "resume" | "cancel" | "requestAuthorization" | "admit";
697
+ requestId: string;
698
+ missionId: string;
699
+ expectedRevision: number;
700
+ reason?: string | undefined;
701
+ }>;
702
+ export type CreateInput = z.infer<typeof createInputSchema>;
703
+ export type PlanInput = z.infer<typeof planInputSchema>;
704
+ export type GetInput = z.infer<typeof getInputSchema>;
705
+ export type EventsInput = z.infer<typeof eventsInputSchema>;
706
+ export type RequestActionInput = z.infer<typeof requestActionInputSchema>;
707
+ /** Control events change mission state or authority and bump `revision`. */
708
+ export declare const CONTROL_EVENTS: readonly ["mission.created", "plan.validated", "plan.revised", "authorization.missing", "admission.accepted", "executor.acknowledged", "pause.accepted", "quiescence.confirmed", "blocked", "resume.admitted", "tasks.settled", "acceptance.passed", "acceptance.failed", "cancel.admitted", "cancel.settled", "failure.verified"];
709
+ /** Observations record what was seen; they never change state or revision. */
710
+ export declare const OBSERVATION_EVENTS: readonly ["executor.observed", "evidence.recorded", "task.observed"];
711
+ export type ControlEventType = typeof CONTROL_EVENTS[number];
712
+ export type ObservationEventType = typeof OBSERVATION_EVENTS[number];
713
+ export type MissionEventType = ControlEventType | ObservationEventType;
714
+ export interface MissionEvent {
715
+ readonly contract: typeof MISSION_EVENT_CONTRACT;
716
+ readonly seq: number;
717
+ readonly missionId: string;
718
+ readonly type: MissionEventType;
719
+ /** Revision the requester expected; `null` for observations. */
720
+ readonly expectedRevision: number | null;
721
+ /** Mission revision after this event. */
722
+ readonly revision: number;
723
+ readonly principalId: string;
724
+ readonly channel: 'cli' | 'mcp' | 'executor' | 'internal';
725
+ readonly requestId: string | null;
726
+ readonly requestDigest: string | null;
727
+ readonly policyDecisionRef: string | null;
728
+ readonly at: string;
729
+ readonly payload: Record<string, unknown>;
730
+ readonly prevHash: string;
731
+ readonly hash: string;
732
+ }
733
+ export declare const executorConnectionSchema: z.ZodEnum<["healthy", "stale", "disconnected", "unknown"]>;
734
+ export type ExecutorConnection = z.infer<typeof executorConnectionSchema>;
735
+ //# sourceMappingURL=schemas.d.ts.map