@osstack/protocol 0.15.0 → 0.20.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (40) hide show
  1. package/dist/generate.d.ts +1 -0
  2. package/dist/generate.d.ts.map +1 -1
  3. package/dist/generate.js +43 -1
  4. package/dist/generate.js.map +1 -1
  5. package/dist/graph-checkpoint.d.ts +409 -0
  6. package/dist/graph-checkpoint.d.ts.map +1 -0
  7. package/dist/graph-checkpoint.js +91 -0
  8. package/dist/graph-checkpoint.js.map +1 -0
  9. package/dist/graph-worker.d.ts +1663 -0
  10. package/dist/graph-worker.d.ts.map +1 -0
  11. package/dist/graph-worker.js +152 -0
  12. package/dist/graph-worker.js.map +1 -0
  13. package/dist/graph.d.ts +12875 -0
  14. package/dist/graph.d.ts.map +1 -0
  15. package/dist/graph.js +423 -0
  16. package/dist/graph.js.map +1 -0
  17. package/dist/index.d.ts +7 -0
  18. package/dist/index.d.ts.map +1 -1
  19. package/dist/index.js +7 -2
  20. package/dist/index.js.map +1 -1
  21. package/dist/run.d.ts +2 -2
  22. package/dist/session-continuation-grant.d.ts +414 -0
  23. package/dist/session-continuation-grant.d.ts.map +1 -0
  24. package/dist/session-continuation-grant.js +59 -0
  25. package/dist/session-continuation-grant.js.map +1 -0
  26. package/dist/session-continuation.d.ts +129 -0
  27. package/dist/session-continuation.d.ts.map +1 -0
  28. package/dist/session-continuation.js +30 -0
  29. package/dist/session-continuation.js.map +1 -0
  30. package/dist/task.d.ts +2 -2
  31. package/package.json +2 -2
  32. package/schemas/continuation-grant-body.schema.json +189 -0
  33. package/schemas/continuation-output-check.schema.json +65 -0
  34. package/schemas/graph-checkpoint-request.schema.json +222 -0
  35. package/schemas/graph-checkpoint-response.schema.json +258 -0
  36. package/schemas/graph-worker.schema.json +546 -0
  37. package/schemas/graph.schema.json +1768 -0
  38. package/schemas/session-continuation-request.schema.json +62 -0
  39. package/schemas/session-decision.schema.json +107 -0
  40. package/schemas/signed-continuation-grant.schema.json +209 -0
@@ -0,0 +1,1768 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "title": "Osstack Graph v1 Contract Registry",
4
+ "$comment": "Registry of strict versioned JSON graph contracts. Zod additionally enforces finite JSON values, 65536-byte/16-depth/4096-value envelope bounds, plain data properties, response outcome/error consistency and effect/error location. Transport must cap raw bytes before JSON.parse. Authentication, current scope/run/generation/spec/epoch checks, request/response pairing, canonical digests, idempotency and scoped revision decisions require the protocol helpers. Trusted daemon integration must verify identity, authority, artifacts and leases and enforce durable atomic CAS/dedup. No checkpoint or graph data grants authority.",
5
+ "type": "object",
6
+ "properties": {
7
+ "spec": {
8
+ "type": "object",
9
+ "properties": {
10
+ "schemaVersion": {
11
+ "type": "number",
12
+ "const": 1
13
+ },
14
+ "template": {
15
+ "type": "string",
16
+ "const": "code-delivery-v1"
17
+ },
18
+ "input": {
19
+ "type": "object",
20
+ "properties": {
21
+ "taskRef": {
22
+ "type": "string",
23
+ "minLength": 1,
24
+ "maxLength": 256,
25
+ "pattern": "^[^\\s\\u0000-\\u001f\\u007f-\\u009f](?:[^\\u0000-\\u001f\\u007f-\\u009f]*[^\\s\\u0000-\\u001f\\u007f-\\u009f])?$"
26
+ },
27
+ "repositoryRef": {
28
+ "$ref": "#/properties/spec/properties/input/properties/taskRef"
29
+ },
30
+ "baseRevision": {
31
+ "type": "string",
32
+ "pattern": "^(?:[a-f0-9]{40}|[a-f0-9]{64})$"
33
+ },
34
+ "acceptanceRef": {
35
+ "$ref": "#/properties/spec/properties/input/properties/taskRef"
36
+ }
37
+ },
38
+ "required": [
39
+ "taskRef",
40
+ "repositoryRef",
41
+ "baseRevision",
42
+ "acceptanceRef"
43
+ ],
44
+ "additionalProperties": false
45
+ },
46
+ "limits": {
47
+ "type": "object",
48
+ "properties": {
49
+ "maxEpochs": {
50
+ "type": "integer",
51
+ "minimum": 1,
52
+ "maximum": 3
53
+ },
54
+ "maxBranchAttempts": {
55
+ "type": "integer",
56
+ "minimum": 1,
57
+ "maximum": 32
58
+ },
59
+ "maxConcurrentReaders": {
60
+ "type": "integer",
61
+ "minimum": 1,
62
+ "maximum": 64
63
+ },
64
+ "maxConcurrentWritersPerRepo": {
65
+ "type": "number",
66
+ "const": 1
67
+ },
68
+ "maxActionStarts": {
69
+ "type": "integer",
70
+ "minimum": 1,
71
+ "maximum": 100000
72
+ },
73
+ "deadlineSeconds": {
74
+ "type": "integer",
75
+ "minimum": 1,
76
+ "maximum": 604800
77
+ },
78
+ "tokenReservationLimit": {
79
+ "type": "integer",
80
+ "minimum": 0,
81
+ "maximum": 1000000000
82
+ }
83
+ },
84
+ "required": [
85
+ "maxEpochs",
86
+ "maxBranchAttempts",
87
+ "maxConcurrentReaders",
88
+ "maxConcurrentWritersPerRepo",
89
+ "maxActionStarts",
90
+ "deadlineSeconds",
91
+ "tokenReservationLimit"
92
+ ],
93
+ "additionalProperties": false
94
+ },
95
+ "publication": {
96
+ "type": "string",
97
+ "const": "artifact_only"
98
+ }
99
+ },
100
+ "required": [
101
+ "schemaVersion",
102
+ "template",
103
+ "input",
104
+ "limits",
105
+ "publication"
106
+ ],
107
+ "additionalProperties": false
108
+ },
109
+ "scope": {
110
+ "type": "object",
111
+ "properties": {
112
+ "schemaVersion": {
113
+ "$ref": "#/properties/spec/properties/schemaVersion"
114
+ },
115
+ "tenantId": {
116
+ "$ref": "#/properties/spec/properties/input/properties/taskRef"
117
+ },
118
+ "principalId": {
119
+ "$ref": "#/properties/spec/properties/input/properties/taskRef"
120
+ },
121
+ "workspaceId": {
122
+ "$ref": "#/properties/spec/properties/input/properties/taskRef"
123
+ }
124
+ },
125
+ "required": [
126
+ "schemaVersion",
127
+ "tenantId",
128
+ "principalId",
129
+ "workspaceId"
130
+ ],
131
+ "additionalProperties": false
132
+ },
133
+ "budget": {
134
+ "type": "object",
135
+ "properties": {
136
+ "schemaVersion": {
137
+ "$ref": "#/properties/spec/properties/schemaVersion"
138
+ },
139
+ "maxEpochs": {
140
+ "$ref": "#/properties/spec/properties/limits/properties/maxEpochs"
141
+ },
142
+ "maxBranchAttempts": {
143
+ "$ref": "#/properties/spec/properties/limits/properties/maxBranchAttempts"
144
+ },
145
+ "maxConcurrentReaders": {
146
+ "$ref": "#/properties/spec/properties/limits/properties/maxConcurrentReaders"
147
+ },
148
+ "maxConcurrentWritersPerRepo": {
149
+ "$ref": "#/properties/spec/properties/limits/properties/maxConcurrentWritersPerRepo"
150
+ },
151
+ "maxActionStarts": {
152
+ "$ref": "#/properties/spec/properties/limits/properties/maxActionStarts"
153
+ },
154
+ "deadlineSeconds": {
155
+ "$ref": "#/properties/spec/properties/limits/properties/deadlineSeconds"
156
+ },
157
+ "tokenReservationLimit": {
158
+ "$ref": "#/properties/spec/properties/limits/properties/tokenReservationLimit"
159
+ }
160
+ },
161
+ "required": [
162
+ "schemaVersion",
163
+ "maxEpochs",
164
+ "maxBranchAttempts",
165
+ "maxConcurrentReaders",
166
+ "maxConcurrentWritersPerRepo",
167
+ "maxActionStarts",
168
+ "deadlineSeconds",
169
+ "tokenReservationLimit"
170
+ ],
171
+ "additionalProperties": false
172
+ },
173
+ "error": {
174
+ "anyOf": [
175
+ {
176
+ "type": "object",
177
+ "properties": {
178
+ "schemaVersion": {
179
+ "$ref": "#/properties/spec/properties/schemaVersion"
180
+ },
181
+ "message": {
182
+ "type": "string",
183
+ "minLength": 1,
184
+ "maxLength": 4096
185
+ },
186
+ "nodeId": {
187
+ "$ref": "#/properties/spec/properties/input/properties/taskRef"
188
+ },
189
+ "epoch": {
190
+ "type": "integer",
191
+ "minimum": 0,
192
+ "maximum": 2
193
+ },
194
+ "actionId": {
195
+ "$ref": "#/properties/spec/properties/input/properties/taskRef"
196
+ },
197
+ "code": {
198
+ "type": "string",
199
+ "enum": [
200
+ "OUTPUT_CONTRACT_INVALID",
201
+ "INTERNAL_ERROR"
202
+ ]
203
+ },
204
+ "retryable": {
205
+ "type": "boolean",
206
+ "const": true
207
+ },
208
+ "nextAction": {
209
+ "type": "string",
210
+ "const": "retry"
211
+ }
212
+ },
213
+ "required": [
214
+ "schemaVersion",
215
+ "message",
216
+ "code",
217
+ "retryable",
218
+ "nextAction"
219
+ ],
220
+ "additionalProperties": false
221
+ },
222
+ {
223
+ "type": "object",
224
+ "properties": {
225
+ "schemaVersion": {
226
+ "$ref": "#/properties/spec/properties/schemaVersion"
227
+ },
228
+ "message": {
229
+ "$ref": "#/properties/error/anyOf/0/properties/message"
230
+ },
231
+ "nodeId": {
232
+ "$ref": "#/properties/error/anyOf/0/properties/nodeId"
233
+ },
234
+ "epoch": {
235
+ "$ref": "#/properties/error/anyOf/0/properties/epoch"
236
+ },
237
+ "actionId": {
238
+ "$ref": "#/properties/error/anyOf/0/properties/actionId"
239
+ },
240
+ "code": {
241
+ "type": "string",
242
+ "enum": [
243
+ "ACTION_OUTCOME_UNKNOWN",
244
+ "CANCEL_UNCONFIRMED"
245
+ ]
246
+ },
247
+ "retryable": {
248
+ "type": "boolean",
249
+ "const": false
250
+ },
251
+ "nextAction": {
252
+ "type": "string",
253
+ "const": "reconcile"
254
+ }
255
+ },
256
+ "required": [
257
+ "schemaVersion",
258
+ "message",
259
+ "code",
260
+ "retryable",
261
+ "nextAction"
262
+ ],
263
+ "additionalProperties": false
264
+ },
265
+ {
266
+ "type": "object",
267
+ "properties": {
268
+ "schemaVersion": {
269
+ "$ref": "#/properties/spec/properties/schemaVersion"
270
+ },
271
+ "message": {
272
+ "$ref": "#/properties/error/anyOf/0/properties/message"
273
+ },
274
+ "nodeId": {
275
+ "$ref": "#/properties/error/anyOf/0/properties/nodeId"
276
+ },
277
+ "epoch": {
278
+ "$ref": "#/properties/error/anyOf/0/properties/epoch"
279
+ },
280
+ "actionId": {
281
+ "$ref": "#/properties/error/anyOf/0/properties/actionId"
282
+ },
283
+ "code": {
284
+ "type": "string",
285
+ "enum": [
286
+ "SPEC_INVALID",
287
+ "INPUT_CONTRACT_INVALID",
288
+ "OUTPUT_CONTRACT_INVALID",
289
+ "JOIN_REVISION_MISMATCH",
290
+ "POLICY_DENIED",
291
+ "GRANT_EXPIRED",
292
+ "BUDGET_EXHAUSTED",
293
+ "STALE_GENERATION",
294
+ "CHECKPOINT_INCOMPATIBLE",
295
+ "UNAUTHENTICATED",
296
+ "SCOPE_MISMATCH",
297
+ "RUN_MISMATCH",
298
+ "IDEMPOTENCY_CONFLICT",
299
+ "REVISION_CONFLICT",
300
+ "INTERNAL_ERROR",
301
+ "SPEC_MISMATCH",
302
+ "EPOCH_MISMATCH",
303
+ "RESPONSE_MISMATCH",
304
+ "EXECUTOR_UNSUPPORTED",
305
+ "GRAPH_ADMISSION_DISABLED",
306
+ "GRAPH_DISTRIBUTION_UNSUPPORTED",
307
+ "GRAPH_NODE_VERSION_UNSUPPORTED"
308
+ ]
309
+ },
310
+ "retryable": {
311
+ "type": "boolean",
312
+ "const": false
313
+ },
314
+ "nextAction": {
315
+ "type": "string",
316
+ "enum": [
317
+ "fix_input",
318
+ "reauthorize",
319
+ "reconcile",
320
+ "refresh",
321
+ "stop"
322
+ ]
323
+ }
324
+ },
325
+ "required": [
326
+ "schemaVersion",
327
+ "message",
328
+ "code",
329
+ "retryable",
330
+ "nextAction"
331
+ ],
332
+ "additionalProperties": false
333
+ }
334
+ ]
335
+ },
336
+ "runState": {
337
+ "type": "string",
338
+ "enum": [
339
+ "queued",
340
+ "running",
341
+ "ready",
342
+ "failed",
343
+ "cancelled",
344
+ "waiting_input",
345
+ "cancel_pending",
346
+ "reconciliation_required"
347
+ ]
348
+ },
349
+ "nodeState": {
350
+ "type": "string",
351
+ "enum": [
352
+ "pending",
353
+ "running",
354
+ "succeeded",
355
+ "failed",
356
+ "skipped",
357
+ "cancelled",
358
+ "waiting_input"
359
+ ]
360
+ },
361
+ "actionState": {
362
+ "type": "string",
363
+ "enum": [
364
+ "intent",
365
+ "running",
366
+ "confirmed",
367
+ "failed",
368
+ "unknown",
369
+ "cancel_pending",
370
+ "reconciliation_required",
371
+ "cancelled"
372
+ ]
373
+ },
374
+ "result": {
375
+ "anyOf": [
376
+ {
377
+ "type": "object",
378
+ "properties": {
379
+ "schemaVersion": {
380
+ "$ref": "#/properties/spec/properties/schemaVersion"
381
+ },
382
+ "kind": {
383
+ "type": "string",
384
+ "const": "implementation_complete"
385
+ },
386
+ "workspaceLeaseRef": {
387
+ "$ref": "#/properties/spec/properties/input/properties/taskRef"
388
+ },
389
+ "receiptRef": {
390
+ "$ref": "#/properties/spec/properties/input/properties/taskRef"
391
+ }
392
+ },
393
+ "required": [
394
+ "schemaVersion",
395
+ "kind",
396
+ "workspaceLeaseRef",
397
+ "receiptRef"
398
+ ],
399
+ "additionalProperties": false
400
+ },
401
+ {
402
+ "type": "object",
403
+ "properties": {
404
+ "schemaVersion": {
405
+ "$ref": "#/properties/spec/properties/schemaVersion"
406
+ },
407
+ "kind": {
408
+ "type": "string",
409
+ "const": "candidate_ready"
410
+ },
411
+ "candidateRevision": {
412
+ "$ref": "#/properties/spec/properties/input/properties/baseRevision"
413
+ },
414
+ "artifactRefs": {
415
+ "type": "array",
416
+ "items": {
417
+ "$ref": "#/properties/spec/properties/input/properties/taskRef"
418
+ },
419
+ "minItems": 1,
420
+ "maxItems": 128
421
+ },
422
+ "artifactDigest": {
423
+ "type": "string",
424
+ "pattern": "^[a-f0-9]{64}$"
425
+ }
426
+ },
427
+ "required": [
428
+ "schemaVersion",
429
+ "kind",
430
+ "candidateRevision",
431
+ "artifactRefs",
432
+ "artifactDigest"
433
+ ],
434
+ "additionalProperties": false
435
+ },
436
+ {
437
+ "type": "object",
438
+ "properties": {
439
+ "schemaVersion": {
440
+ "$ref": "#/properties/spec/properties/schemaVersion"
441
+ },
442
+ "kind": {
443
+ "type": "string",
444
+ "const": "review"
445
+ },
446
+ "candidateRevision": {
447
+ "$ref": "#/properties/spec/properties/input/properties/baseRevision"
448
+ },
449
+ "evidenceRefs": {
450
+ "$ref": "#/properties/result/anyOf/1/properties/artifactRefs"
451
+ },
452
+ "evidenceDigest": {
453
+ "$ref": "#/properties/result/anyOf/1/properties/artifactDigest"
454
+ },
455
+ "verdict": {
456
+ "type": "string",
457
+ "enum": [
458
+ "accept",
459
+ "changes_requested"
460
+ ]
461
+ }
462
+ },
463
+ "required": [
464
+ "schemaVersion",
465
+ "kind",
466
+ "candidateRevision",
467
+ "evidenceRefs",
468
+ "evidenceDigest",
469
+ "verdict"
470
+ ],
471
+ "additionalProperties": false
472
+ },
473
+ {
474
+ "type": "object",
475
+ "properties": {
476
+ "schemaVersion": {
477
+ "$ref": "#/properties/spec/properties/schemaVersion"
478
+ },
479
+ "kind": {
480
+ "type": "string",
481
+ "const": "tests"
482
+ },
483
+ "candidateRevision": {
484
+ "$ref": "#/properties/spec/properties/input/properties/baseRevision"
485
+ },
486
+ "evidenceRefs": {
487
+ "$ref": "#/properties/result/anyOf/1/properties/artifactRefs"
488
+ },
489
+ "evidenceDigest": {
490
+ "$ref": "#/properties/result/anyOf/1/properties/artifactDigest"
491
+ },
492
+ "passed": {
493
+ "type": "boolean"
494
+ }
495
+ },
496
+ "required": [
497
+ "schemaVersion",
498
+ "kind",
499
+ "candidateRevision",
500
+ "evidenceRefs",
501
+ "evidenceDigest",
502
+ "passed"
503
+ ],
504
+ "additionalProperties": false
505
+ },
506
+ {
507
+ "type": "object",
508
+ "properties": {
509
+ "schemaVersion": {
510
+ "$ref": "#/properties/spec/properties/schemaVersion"
511
+ },
512
+ "kind": {
513
+ "type": "string",
514
+ "const": "ready"
515
+ },
516
+ "candidateRevision": {
517
+ "$ref": "#/properties/spec/properties/input/properties/baseRevision"
518
+ },
519
+ "evidenceRefs": {
520
+ "$ref": "#/properties/result/anyOf/1/properties/artifactRefs"
521
+ },
522
+ "evidenceDigest": {
523
+ "$ref": "#/properties/result/anyOf/1/properties/artifactDigest"
524
+ },
525
+ "artifactRefs": {
526
+ "$ref": "#/properties/result/anyOf/1/properties/artifactRefs"
527
+ },
528
+ "publication": {
529
+ "type": "string",
530
+ "const": "artifact_only"
531
+ }
532
+ },
533
+ "required": [
534
+ "schemaVersion",
535
+ "kind",
536
+ "candidateRevision",
537
+ "evidenceRefs",
538
+ "evidenceDigest",
539
+ "artifactRefs",
540
+ "publication"
541
+ ],
542
+ "additionalProperties": false
543
+ },
544
+ {
545
+ "type": "object",
546
+ "properties": {
547
+ "schemaVersion": {
548
+ "$ref": "#/properties/spec/properties/schemaVersion"
549
+ },
550
+ "kind": {
551
+ "type": "string",
552
+ "const": "workspace"
553
+ },
554
+ "workspaceLeaseRef": {
555
+ "$ref": "#/properties/spec/properties/input/properties/taskRef"
556
+ },
557
+ "receiptRef": {
558
+ "$ref": "#/properties/spec/properties/input/properties/taskRef"
559
+ }
560
+ },
561
+ "required": [
562
+ "schemaVersion",
563
+ "kind",
564
+ "workspaceLeaseRef",
565
+ "receiptRef"
566
+ ],
567
+ "additionalProperties": false
568
+ }
569
+ ]
570
+ },
571
+ "request": {
572
+ "anyOf": [
573
+ {
574
+ "type": "object",
575
+ "properties": {
576
+ "schemaVersion": {
577
+ "$ref": "#/properties/spec/properties/schemaVersion"
578
+ },
579
+ "scope": {
580
+ "$ref": "#/properties/scope"
581
+ },
582
+ "idempotencyKey": {
583
+ "$ref": "#/properties/spec/properties/input/properties/taskRef"
584
+ },
585
+ "metadata": {
586
+ "type": "object",
587
+ "properties": {
588
+ "trace": {
589
+ "type": "object",
590
+ "properties": {
591
+ "traceId": {
592
+ "$ref": "#/properties/spec/properties/input/properties/taskRef"
593
+ },
594
+ "spanId": {
595
+ "$ref": "#/properties/spec/properties/input/properties/taskRef"
596
+ }
597
+ },
598
+ "required": [
599
+ "traceId"
600
+ ],
601
+ "additionalProperties": false
602
+ },
603
+ "requestedAt": {
604
+ "type": "string",
605
+ "format": "date-time"
606
+ }
607
+ },
608
+ "additionalProperties": false
609
+ },
610
+ "kind": {
611
+ "type": "string",
612
+ "const": "start"
613
+ },
614
+ "spec": {
615
+ "$ref": "#/properties/spec"
616
+ },
617
+ "inputArtifactRef": {
618
+ "$ref": "#/properties/spec/properties/input/properties/taskRef"
619
+ },
620
+ "source": {
621
+ "type": "object",
622
+ "properties": {
623
+ "product": {
624
+ "type": "string",
625
+ "enum": [
626
+ "osstack",
627
+ "osbot",
628
+ "ostag"
629
+ ]
630
+ },
631
+ "requestId": {
632
+ "$ref": "#/properties/spec/properties/input/properties/taskRef"
633
+ },
634
+ "parentRunId": {
635
+ "$ref": "#/properties/spec/properties/input/properties/taskRef"
636
+ }
637
+ },
638
+ "required": [
639
+ "product",
640
+ "requestId"
641
+ ],
642
+ "additionalProperties": false
643
+ }
644
+ },
645
+ "required": [
646
+ "schemaVersion",
647
+ "scope",
648
+ "idempotencyKey",
649
+ "kind",
650
+ "spec",
651
+ "inputArtifactRef",
652
+ "source"
653
+ ],
654
+ "additionalProperties": false
655
+ },
656
+ {
657
+ "type": "object",
658
+ "properties": {
659
+ "schemaVersion": {
660
+ "$ref": "#/properties/spec/properties/schemaVersion"
661
+ },
662
+ "scope": {
663
+ "$ref": "#/properties/scope"
664
+ },
665
+ "idempotencyKey": {
666
+ "$ref": "#/properties/spec/properties/input/properties/taskRef"
667
+ },
668
+ "metadata": {
669
+ "$ref": "#/properties/request/anyOf/0/properties/metadata"
670
+ },
671
+ "kind": {
672
+ "type": "string",
673
+ "const": "resume"
674
+ },
675
+ "graphRunId": {
676
+ "$ref": "#/properties/spec/properties/input/properties/taskRef"
677
+ },
678
+ "expectedRevision": {
679
+ "type": "integer",
680
+ "minimum": 0,
681
+ "maximum": 9007199254740991
682
+ },
683
+ "interruptId": {
684
+ "$ref": "#/properties/spec/properties/input/properties/taskRef"
685
+ },
686
+ "input": {
687
+ "anyOf": [
688
+ {
689
+ "type": "object",
690
+ "properties": {
691
+ "kind": {
692
+ "type": "string",
693
+ "const": "data"
694
+ },
695
+ "value": {
696
+ "anyOf": [
697
+ {
698
+ "type": "null"
699
+ },
700
+ {
701
+ "type": "boolean"
702
+ },
703
+ {
704
+ "type": "number"
705
+ },
706
+ {
707
+ "type": "string",
708
+ "maxLength": 16384
709
+ },
710
+ {
711
+ "type": "array",
712
+ "items": {
713
+ "$ref": "#/properties/request/anyOf/1/properties/input/anyOf/0/properties/value"
714
+ },
715
+ "maxItems": 4096
716
+ },
717
+ {
718
+ "type": "object",
719
+ "additionalProperties": {
720
+ "$ref": "#/properties/request/anyOf/1/properties/input/anyOf/0/properties/value"
721
+ },
722
+ "propertyNames": {
723
+ "maxLength": 256,
724
+ "pattern": "^(?!__proto__$|constructor$|prototype$)"
725
+ }
726
+ }
727
+ ]
728
+ }
729
+ },
730
+ "required": [
731
+ "kind",
732
+ "value"
733
+ ],
734
+ "additionalProperties": false
735
+ },
736
+ {
737
+ "type": "object",
738
+ "properties": {
739
+ "kind": {
740
+ "type": "string",
741
+ "const": "reconciliation"
742
+ },
743
+ "outcome": {
744
+ "type": "string",
745
+ "enum": [
746
+ "applied",
747
+ "not_applied",
748
+ "unknown"
749
+ ]
750
+ },
751
+ "evidenceRefs": {
752
+ "$ref": "#/properties/result/anyOf/1/properties/artifactRefs"
753
+ }
754
+ },
755
+ "required": [
756
+ "kind",
757
+ "outcome",
758
+ "evidenceRefs"
759
+ ],
760
+ "additionalProperties": false
761
+ }
762
+ ]
763
+ }
764
+ },
765
+ "required": [
766
+ "schemaVersion",
767
+ "scope",
768
+ "idempotencyKey",
769
+ "kind",
770
+ "graphRunId",
771
+ "expectedRevision",
772
+ "interruptId",
773
+ "input"
774
+ ],
775
+ "additionalProperties": false
776
+ },
777
+ {
778
+ "type": "object",
779
+ "properties": {
780
+ "schemaVersion": {
781
+ "$ref": "#/properties/spec/properties/schemaVersion"
782
+ },
783
+ "scope": {
784
+ "$ref": "#/properties/scope"
785
+ },
786
+ "idempotencyKey": {
787
+ "$ref": "#/properties/spec/properties/input/properties/taskRef"
788
+ },
789
+ "metadata": {
790
+ "$ref": "#/properties/request/anyOf/0/properties/metadata"
791
+ },
792
+ "kind": {
793
+ "type": "string",
794
+ "const": "cancel"
795
+ },
796
+ "graphRunId": {
797
+ "$ref": "#/properties/spec/properties/input/properties/taskRef"
798
+ },
799
+ "expectedRevision": {
800
+ "$ref": "#/properties/request/anyOf/1/properties/expectedRevision"
801
+ }
802
+ },
803
+ "required": [
804
+ "schemaVersion",
805
+ "scope",
806
+ "idempotencyKey",
807
+ "kind",
808
+ "graphRunId",
809
+ "expectedRevision"
810
+ ],
811
+ "additionalProperties": false
812
+ }
813
+ ]
814
+ },
815
+ "effectIdentity": {
816
+ "type": "object",
817
+ "properties": {
818
+ "schemaVersion": {
819
+ "$ref": "#/properties/spec/properties/schemaVersion"
820
+ },
821
+ "scope": {
822
+ "$ref": "#/properties/scope"
823
+ },
824
+ "graphRunId": {
825
+ "$ref": "#/properties/spec/properties/input/properties/taskRef"
826
+ },
827
+ "specHash": {
828
+ "$ref": "#/properties/result/anyOf/1/properties/artifactDigest"
829
+ },
830
+ "epoch": {
831
+ "$ref": "#/properties/error/anyOf/0/properties/epoch"
832
+ },
833
+ "nodeId": {
834
+ "$ref": "#/properties/spec/properties/input/properties/taskRef"
835
+ },
836
+ "effectSlot": {
837
+ "$ref": "#/properties/spec/properties/input/properties/taskRef"
838
+ },
839
+ "logicalAttempt": {
840
+ "type": "integer",
841
+ "minimum": 1,
842
+ "maximum": 9007199254740991
843
+ }
844
+ },
845
+ "required": [
846
+ "schemaVersion",
847
+ "scope",
848
+ "graphRunId",
849
+ "specHash",
850
+ "epoch",
851
+ "nodeId",
852
+ "effectSlot",
853
+ "logicalAttempt"
854
+ ],
855
+ "additionalProperties": false
856
+ },
857
+ "workerActionRequest": {
858
+ "type": "object",
859
+ "properties": {
860
+ "schemaVersion": {
861
+ "$ref": "#/properties/spec/properties/schemaVersion"
862
+ },
863
+ "kind": {
864
+ "type": "string",
865
+ "const": "worker_action"
866
+ },
867
+ "requestId": {
868
+ "$ref": "#/properties/spec/properties/input/properties/taskRef"
869
+ },
870
+ "generation": {
871
+ "type": "integer",
872
+ "minimum": 1,
873
+ "maximum": 9007199254740991
874
+ },
875
+ "scope": {
876
+ "$ref": "#/properties/scope"
877
+ },
878
+ "graphRunId": {
879
+ "$ref": "#/properties/spec/properties/input/properties/taskRef"
880
+ },
881
+ "specHash": {
882
+ "$ref": "#/properties/result/anyOf/1/properties/artifactDigest"
883
+ },
884
+ "epoch": {
885
+ "$ref": "#/properties/error/anyOf/0/properties/epoch"
886
+ },
887
+ "nodeId": {
888
+ "$ref": "#/properties/spec/properties/input/properties/taskRef"
889
+ },
890
+ "effectSlot": {
891
+ "$ref": "#/properties/spec/properties/input/properties/taskRef"
892
+ },
893
+ "action": {
894
+ "anyOf": [
895
+ {
896
+ "type": "object",
897
+ "properties": {
898
+ "kind": {
899
+ "type": "string",
900
+ "const": "implement"
901
+ },
902
+ "inputArtifactRef": {
903
+ "$ref": "#/properties/spec/properties/input/properties/taskRef"
904
+ },
905
+ "workspaceLeaseRef": {
906
+ "$ref": "#/properties/spec/properties/input/properties/taskRef"
907
+ }
908
+ },
909
+ "required": [
910
+ "kind",
911
+ "inputArtifactRef",
912
+ "workspaceLeaseRef"
913
+ ],
914
+ "additionalProperties": false
915
+ },
916
+ {
917
+ "type": "object",
918
+ "properties": {
919
+ "kind": {
920
+ "type": "string",
921
+ "const": "repair"
922
+ },
923
+ "inputArtifactRef": {
924
+ "$ref": "#/properties/spec/properties/input/properties/taskRef"
925
+ },
926
+ "workspaceLeaseRef": {
927
+ "$ref": "#/properties/spec/properties/input/properties/taskRef"
928
+ },
929
+ "candidateRevision": {
930
+ "$ref": "#/properties/spec/properties/input/properties/baseRevision"
931
+ },
932
+ "feedbackRef": {
933
+ "$ref": "#/properties/spec/properties/input/properties/taskRef"
934
+ }
935
+ },
936
+ "required": [
937
+ "kind",
938
+ "inputArtifactRef",
939
+ "workspaceLeaseRef",
940
+ "candidateRevision",
941
+ "feedbackRef"
942
+ ],
943
+ "additionalProperties": false
944
+ },
945
+ {
946
+ "type": "object",
947
+ "properties": {
948
+ "kind": {
949
+ "type": "string",
950
+ "const": "freeze"
951
+ },
952
+ "workspaceLeaseRef": {
953
+ "$ref": "#/properties/spec/properties/input/properties/taskRef"
954
+ },
955
+ "receiptRef": {
956
+ "$ref": "#/properties/spec/properties/input/properties/taskRef"
957
+ }
958
+ },
959
+ "required": [
960
+ "kind",
961
+ "workspaceLeaseRef",
962
+ "receiptRef"
963
+ ],
964
+ "additionalProperties": false
965
+ },
966
+ {
967
+ "type": "object",
968
+ "properties": {
969
+ "kind": {
970
+ "type": "string",
971
+ "const": "review"
972
+ },
973
+ "candidateRevision": {
974
+ "$ref": "#/properties/spec/properties/input/properties/baseRevision"
975
+ },
976
+ "acceptanceRef": {
977
+ "$ref": "#/properties/spec/properties/input/properties/taskRef"
978
+ },
979
+ "workspaceLeaseRef": {
980
+ "$ref": "#/properties/spec/properties/input/properties/taskRef"
981
+ }
982
+ },
983
+ "required": [
984
+ "kind",
985
+ "candidateRevision",
986
+ "acceptanceRef",
987
+ "workspaceLeaseRef"
988
+ ],
989
+ "additionalProperties": false
990
+ },
991
+ {
992
+ "type": "object",
993
+ "properties": {
994
+ "kind": {
995
+ "type": "string",
996
+ "const": "tests"
997
+ },
998
+ "candidateRevision": {
999
+ "$ref": "#/properties/spec/properties/input/properties/baseRevision"
1000
+ },
1001
+ "commandSpecRef": {
1002
+ "$ref": "#/properties/spec/properties/input/properties/taskRef"
1003
+ },
1004
+ "workspaceLeaseRef": {
1005
+ "$ref": "#/properties/spec/properties/input/properties/taskRef"
1006
+ }
1007
+ },
1008
+ "required": [
1009
+ "kind",
1010
+ "candidateRevision",
1011
+ "commandSpecRef",
1012
+ "workspaceLeaseRef"
1013
+ ],
1014
+ "additionalProperties": false
1015
+ },
1016
+ {
1017
+ "type": "object",
1018
+ "properties": {
1019
+ "kind": {
1020
+ "type": "string",
1021
+ "const": "workspace_create"
1022
+ },
1023
+ "repositoryRef": {
1024
+ "$ref": "#/properties/spec/properties/input/properties/taskRef"
1025
+ },
1026
+ "baseRevision": {
1027
+ "$ref": "#/properties/spec/properties/input/properties/baseRevision"
1028
+ }
1029
+ },
1030
+ "required": [
1031
+ "kind",
1032
+ "repositoryRef",
1033
+ "baseRevision"
1034
+ ],
1035
+ "additionalProperties": false
1036
+ },
1037
+ {
1038
+ "type": "object",
1039
+ "properties": {
1040
+ "kind": {
1041
+ "type": "string",
1042
+ "const": "workspace_release"
1043
+ },
1044
+ "workspaceLeaseRef": {
1045
+ "$ref": "#/properties/spec/properties/input/properties/taskRef"
1046
+ }
1047
+ },
1048
+ "required": [
1049
+ "kind",
1050
+ "workspaceLeaseRef"
1051
+ ],
1052
+ "additionalProperties": false
1053
+ }
1054
+ ]
1055
+ },
1056
+ "metadata": {
1057
+ "$ref": "#/properties/request/anyOf/0/properties/metadata"
1058
+ }
1059
+ },
1060
+ "required": [
1061
+ "schemaVersion",
1062
+ "kind",
1063
+ "requestId",
1064
+ "generation",
1065
+ "scope",
1066
+ "graphRunId",
1067
+ "specHash",
1068
+ "epoch",
1069
+ "nodeId",
1070
+ "effectSlot",
1071
+ "action"
1072
+ ],
1073
+ "additionalProperties": false
1074
+ },
1075
+ "workerActionResponse": {
1076
+ "anyOf": [
1077
+ {
1078
+ "type": "object",
1079
+ "properties": {
1080
+ "schemaVersion": {
1081
+ "$ref": "#/properties/spec/properties/schemaVersion"
1082
+ },
1083
+ "kind": {
1084
+ "type": "string",
1085
+ "const": "worker_action_response"
1086
+ },
1087
+ "requestId": {
1088
+ "$ref": "#/properties/spec/properties/input/properties/taskRef"
1089
+ },
1090
+ "generation": {
1091
+ "type": "integer",
1092
+ "minimum": 1,
1093
+ "maximum": 9007199254740991
1094
+ },
1095
+ "effect": {
1096
+ "$ref": "#/properties/effectIdentity"
1097
+ },
1098
+ "outcome": {
1099
+ "anyOf": [
1100
+ {
1101
+ "type": "object",
1102
+ "properties": {
1103
+ "state": {
1104
+ "type": "string",
1105
+ "const": "confirmed"
1106
+ },
1107
+ "result": {
1108
+ "$ref": "#/properties/result"
1109
+ }
1110
+ },
1111
+ "required": [
1112
+ "state",
1113
+ "result"
1114
+ ],
1115
+ "additionalProperties": false
1116
+ },
1117
+ {
1118
+ "type": "object",
1119
+ "properties": {
1120
+ "state": {
1121
+ "type": "string",
1122
+ "const": "intent"
1123
+ }
1124
+ },
1125
+ "required": [
1126
+ "state"
1127
+ ],
1128
+ "additionalProperties": false
1129
+ },
1130
+ {
1131
+ "type": "object",
1132
+ "properties": {
1133
+ "state": {
1134
+ "type": "string",
1135
+ "const": "running"
1136
+ },
1137
+ "executionRef": {
1138
+ "$ref": "#/properties/spec/properties/input/properties/taskRef"
1139
+ }
1140
+ },
1141
+ "required": [
1142
+ "state",
1143
+ "executionRef"
1144
+ ],
1145
+ "additionalProperties": false
1146
+ },
1147
+ {
1148
+ "type": "object",
1149
+ "properties": {
1150
+ "state": {
1151
+ "type": "string",
1152
+ "const": "failed"
1153
+ },
1154
+ "error": {
1155
+ "anyOf": [
1156
+ {
1157
+ "$ref": "#/properties/error/anyOf/0"
1158
+ },
1159
+ {
1160
+ "$ref": "#/properties/error/anyOf/2"
1161
+ }
1162
+ ]
1163
+ }
1164
+ },
1165
+ "required": [
1166
+ "state",
1167
+ "error"
1168
+ ],
1169
+ "additionalProperties": false
1170
+ },
1171
+ {
1172
+ "type": "object",
1173
+ "properties": {
1174
+ "state": {
1175
+ "type": "string",
1176
+ "const": "unknown"
1177
+ },
1178
+ "error": {
1179
+ "$ref": "#/properties/error"
1180
+ },
1181
+ "reconciliationRef": {
1182
+ "$ref": "#/properties/spec/properties/input/properties/taskRef"
1183
+ }
1184
+ },
1185
+ "required": [
1186
+ "state",
1187
+ "error",
1188
+ "reconciliationRef"
1189
+ ],
1190
+ "additionalProperties": false
1191
+ },
1192
+ {
1193
+ "type": "object",
1194
+ "properties": {
1195
+ "state": {
1196
+ "type": "string",
1197
+ "const": "cancel_pending"
1198
+ },
1199
+ "error": {
1200
+ "$ref": "#/properties/error"
1201
+ },
1202
+ "executionRef": {
1203
+ "$ref": "#/properties/spec/properties/input/properties/taskRef"
1204
+ }
1205
+ },
1206
+ "required": [
1207
+ "state",
1208
+ "error",
1209
+ "executionRef"
1210
+ ],
1211
+ "additionalProperties": false
1212
+ },
1213
+ {
1214
+ "type": "object",
1215
+ "properties": {
1216
+ "state": {
1217
+ "type": "string",
1218
+ "const": "reconciliation_required"
1219
+ },
1220
+ "error": {
1221
+ "$ref": "#/properties/error"
1222
+ },
1223
+ "reconciliationRef": {
1224
+ "$ref": "#/properties/spec/properties/input/properties/taskRef"
1225
+ }
1226
+ },
1227
+ "required": [
1228
+ "state",
1229
+ "error",
1230
+ "reconciliationRef"
1231
+ ],
1232
+ "additionalProperties": false
1233
+ },
1234
+ {
1235
+ "type": "object",
1236
+ "properties": {
1237
+ "state": {
1238
+ "type": "string",
1239
+ "const": "cancelled"
1240
+ },
1241
+ "receiptRef": {
1242
+ "$ref": "#/properties/spec/properties/input/properties/taskRef"
1243
+ }
1244
+ },
1245
+ "required": [
1246
+ "state",
1247
+ "receiptRef"
1248
+ ],
1249
+ "additionalProperties": false
1250
+ }
1251
+ ]
1252
+ },
1253
+ "metadata": {
1254
+ "$ref": "#/properties/request/anyOf/0/properties/metadata"
1255
+ }
1256
+ },
1257
+ "required": [
1258
+ "schemaVersion",
1259
+ "kind",
1260
+ "requestId",
1261
+ "generation",
1262
+ "effect",
1263
+ "outcome"
1264
+ ],
1265
+ "additionalProperties": false
1266
+ },
1267
+ {
1268
+ "type": "object",
1269
+ "properties": {
1270
+ "schemaVersion": {
1271
+ "$ref": "#/properties/spec/properties/schemaVersion"
1272
+ },
1273
+ "kind": {
1274
+ "type": "string",
1275
+ "const": "worker_action_rejected"
1276
+ },
1277
+ "requestId": {
1278
+ "$ref": "#/properties/spec/properties/input/properties/taskRef"
1279
+ },
1280
+ "error": {
1281
+ "$ref": "#/properties/error"
1282
+ }
1283
+ },
1284
+ "required": [
1285
+ "schemaVersion",
1286
+ "kind",
1287
+ "requestId",
1288
+ "error"
1289
+ ],
1290
+ "additionalProperties": false
1291
+ }
1292
+ ]
1293
+ },
1294
+ "idempotencyRecord": {
1295
+ "type": "object",
1296
+ "properties": {
1297
+ "schemaVersion": {
1298
+ "$ref": "#/properties/spec/properties/schemaVersion"
1299
+ },
1300
+ "scope": {
1301
+ "$ref": "#/properties/scope"
1302
+ },
1303
+ "idempotencyKey": {
1304
+ "$ref": "#/properties/spec/properties/input/properties/taskRef"
1305
+ },
1306
+ "inputDigest": {
1307
+ "$ref": "#/properties/result/anyOf/1/properties/artifactDigest"
1308
+ }
1309
+ },
1310
+ "required": [
1311
+ "schemaVersion",
1312
+ "scope",
1313
+ "idempotencyKey",
1314
+ "inputDigest"
1315
+ ],
1316
+ "additionalProperties": false
1317
+ },
1318
+ "statusRequest": {
1319
+ "type": "object",
1320
+ "properties": {
1321
+ "schemaVersion": {
1322
+ "$ref": "#/properties/spec/properties/schemaVersion"
1323
+ },
1324
+ "scope": {
1325
+ "$ref": "#/properties/scope"
1326
+ },
1327
+ "graphRunId": {
1328
+ "$ref": "#/properties/spec/properties/input/properties/taskRef"
1329
+ }
1330
+ },
1331
+ "required": [
1332
+ "schemaVersion",
1333
+ "scope",
1334
+ "graphRunId"
1335
+ ],
1336
+ "additionalProperties": false
1337
+ },
1338
+ "delegationStatus": {
1339
+ "anyOf": [
1340
+ {
1341
+ "type": "object",
1342
+ "properties": {
1343
+ "schemaVersion": {
1344
+ "$ref": "#/properties/spec/properties/schemaVersion"
1345
+ },
1346
+ "scope": {
1347
+ "$ref": "#/properties/scope"
1348
+ },
1349
+ "graphRunId": {
1350
+ "$ref": "#/properties/spec/properties/input/properties/taskRef"
1351
+ },
1352
+ "source": {
1353
+ "$ref": "#/properties/request/anyOf/0/properties/source"
1354
+ },
1355
+ "status": {
1356
+ "type": "string",
1357
+ "const": "ready"
1358
+ },
1359
+ "revision": {
1360
+ "$ref": "#/properties/request/anyOf/1/properties/expectedRevision"
1361
+ },
1362
+ "generation": {
1363
+ "$ref": "#/properties/request/anyOf/1/properties/expectedRevision"
1364
+ },
1365
+ "inputDigest": {
1366
+ "$ref": "#/properties/result/anyOf/1/properties/artifactDigest"
1367
+ },
1368
+ "specHash": {
1369
+ "$ref": "#/properties/result/anyOf/1/properties/artifactDigest"
1370
+ },
1371
+ "createdAt": {
1372
+ "$ref": "#/properties/request/anyOf/1/properties/expectedRevision"
1373
+ },
1374
+ "updatedAt": {
1375
+ "$ref": "#/properties/request/anyOf/1/properties/expectedRevision"
1376
+ },
1377
+ "publication": {
1378
+ "type": "string",
1379
+ "const": "artifact_only"
1380
+ },
1381
+ "phase": {
1382
+ "$ref": "#/properties/spec/properties/input/properties/taskRef"
1383
+ },
1384
+ "budget": {
1385
+ "type": "object",
1386
+ "properties": {
1387
+ "limits": {
1388
+ "$ref": "#/properties/spec/properties/limits"
1389
+ },
1390
+ "actionStarts": {
1391
+ "$ref": "#/properties/request/anyOf/1/properties/expectedRevision"
1392
+ },
1393
+ "reservedTokens": {
1394
+ "type": "string",
1395
+ "pattern": "^(0|[1-9][0-9]{0,39})$"
1396
+ },
1397
+ "chargedTokens": {
1398
+ "type": "string",
1399
+ "pattern": "^(0|[1-9][0-9]{0,39})$"
1400
+ },
1401
+ "accountingBlocked": {
1402
+ "type": "boolean"
1403
+ }
1404
+ },
1405
+ "required": [
1406
+ "limits",
1407
+ "actionStarts",
1408
+ "reservedTokens",
1409
+ "chargedTokens",
1410
+ "accountingBlocked"
1411
+ ],
1412
+ "additionalProperties": false
1413
+ },
1414
+ "candidate": {
1415
+ "type": "object",
1416
+ "properties": {
1417
+ "candidateRevision": {
1418
+ "$ref": "#/properties/spec/properties/input/properties/baseRevision"
1419
+ },
1420
+ "artifactRefs": {
1421
+ "$ref": "#/properties/result/anyOf/1/properties/artifactRefs"
1422
+ },
1423
+ "artifactDigest": {
1424
+ "$ref": "#/properties/result/anyOf/1/properties/artifactDigest"
1425
+ }
1426
+ },
1427
+ "required": [
1428
+ "candidateRevision",
1429
+ "artifactRefs",
1430
+ "artifactDigest"
1431
+ ],
1432
+ "additionalProperties": false
1433
+ },
1434
+ "evidenceRefs": {
1435
+ "$ref": "#/properties/result/anyOf/1/properties/artifactRefs"
1436
+ },
1437
+ "resultRef": {
1438
+ "$ref": "#/properties/spec/properties/input/properties/taskRef"
1439
+ },
1440
+ "delivery": {
1441
+ "type": "string",
1442
+ "const": "available"
1443
+ },
1444
+ "interrupt": {
1445
+ "type": "object",
1446
+ "properties": {
1447
+ "interruptId": {
1448
+ "$ref": "#/properties/spec/properties/input/properties/taskRef"
1449
+ },
1450
+ "inputDigest": {
1451
+ "$ref": "#/properties/result/anyOf/1/properties/artifactDigest"
1452
+ },
1453
+ "kind": {
1454
+ "type": "string",
1455
+ "enum": [
1456
+ "quality",
1457
+ "authorization"
1458
+ ]
1459
+ }
1460
+ },
1461
+ "required": [
1462
+ "interruptId",
1463
+ "inputDigest",
1464
+ "kind"
1465
+ ],
1466
+ "additionalProperties": false
1467
+ },
1468
+ "authorization": {
1469
+ "type": "object",
1470
+ "properties": {
1471
+ "kind": {
1472
+ "type": "string",
1473
+ "const": "needs_authorization"
1474
+ },
1475
+ "scope": {
1476
+ "$ref": "#/properties/scope"
1477
+ },
1478
+ "requestRef": {
1479
+ "$ref": "#/properties/spec/properties/input/properties/taskRef"
1480
+ }
1481
+ },
1482
+ "required": [
1483
+ "kind",
1484
+ "scope",
1485
+ "requestRef"
1486
+ ],
1487
+ "additionalProperties": false
1488
+ },
1489
+ "error": {
1490
+ "$ref": "#/properties/error"
1491
+ }
1492
+ },
1493
+ "required": [
1494
+ "schemaVersion",
1495
+ "scope",
1496
+ "graphRunId",
1497
+ "source",
1498
+ "status",
1499
+ "revision",
1500
+ "generation",
1501
+ "inputDigest",
1502
+ "specHash",
1503
+ "createdAt",
1504
+ "updatedAt",
1505
+ "publication",
1506
+ "phase",
1507
+ "budget",
1508
+ "candidate",
1509
+ "evidenceRefs",
1510
+ "resultRef",
1511
+ "delivery"
1512
+ ],
1513
+ "additionalProperties": false
1514
+ },
1515
+ {
1516
+ "type": "object",
1517
+ "properties": {
1518
+ "schemaVersion": {
1519
+ "$ref": "#/properties/spec/properties/schemaVersion"
1520
+ },
1521
+ "scope": {
1522
+ "$ref": "#/properties/scope"
1523
+ },
1524
+ "graphRunId": {
1525
+ "$ref": "#/properties/spec/properties/input/properties/taskRef"
1526
+ },
1527
+ "source": {
1528
+ "$ref": "#/properties/request/anyOf/0/properties/source"
1529
+ },
1530
+ "status": {
1531
+ "type": "string",
1532
+ "enum": [
1533
+ "cancel_pending",
1534
+ "reconciliation_required"
1535
+ ]
1536
+ },
1537
+ "revision": {
1538
+ "$ref": "#/properties/request/anyOf/1/properties/expectedRevision"
1539
+ },
1540
+ "generation": {
1541
+ "$ref": "#/properties/request/anyOf/1/properties/expectedRevision"
1542
+ },
1543
+ "inputDigest": {
1544
+ "$ref": "#/properties/result/anyOf/1/properties/artifactDigest"
1545
+ },
1546
+ "specHash": {
1547
+ "$ref": "#/properties/result/anyOf/1/properties/artifactDigest"
1548
+ },
1549
+ "createdAt": {
1550
+ "$ref": "#/properties/request/anyOf/1/properties/expectedRevision"
1551
+ },
1552
+ "updatedAt": {
1553
+ "$ref": "#/properties/request/anyOf/1/properties/expectedRevision"
1554
+ },
1555
+ "publication": {
1556
+ "$ref": "#/properties/delegationStatus/anyOf/0/properties/publication"
1557
+ },
1558
+ "phase": {
1559
+ "$ref": "#/properties/spec/properties/input/properties/taskRef"
1560
+ },
1561
+ "budget": {
1562
+ "$ref": "#/properties/delegationStatus/anyOf/0/properties/budget"
1563
+ },
1564
+ "candidate": {
1565
+ "$ref": "#/properties/delegationStatus/anyOf/0/properties/candidate"
1566
+ },
1567
+ "evidenceRefs": {
1568
+ "type": "array",
1569
+ "items": {
1570
+ "$ref": "#/properties/spec/properties/input/properties/taskRef"
1571
+ },
1572
+ "maxItems": 100
1573
+ },
1574
+ "resultRef": {
1575
+ "$ref": "#/properties/spec/properties/input/properties/taskRef"
1576
+ },
1577
+ "delivery": {
1578
+ "type": "string",
1579
+ "const": "delivery_unknown"
1580
+ },
1581
+ "interrupt": {
1582
+ "$ref": "#/properties/delegationStatus/anyOf/0/properties/interrupt"
1583
+ },
1584
+ "authorization": {
1585
+ "$ref": "#/properties/delegationStatus/anyOf/0/properties/authorization"
1586
+ },
1587
+ "error": {
1588
+ "$ref": "#/properties/delegationStatus/anyOf/0/properties/error"
1589
+ }
1590
+ },
1591
+ "required": [
1592
+ "schemaVersion",
1593
+ "scope",
1594
+ "graphRunId",
1595
+ "source",
1596
+ "status",
1597
+ "revision",
1598
+ "generation",
1599
+ "inputDigest",
1600
+ "specHash",
1601
+ "createdAt",
1602
+ "updatedAt",
1603
+ "publication",
1604
+ "phase",
1605
+ "budget",
1606
+ "evidenceRefs",
1607
+ "delivery"
1608
+ ],
1609
+ "additionalProperties": false
1610
+ },
1611
+ {
1612
+ "type": "object",
1613
+ "properties": {
1614
+ "schemaVersion": {
1615
+ "$ref": "#/properties/spec/properties/schemaVersion"
1616
+ },
1617
+ "scope": {
1618
+ "$ref": "#/properties/scope"
1619
+ },
1620
+ "graphRunId": {
1621
+ "$ref": "#/properties/spec/properties/input/properties/taskRef"
1622
+ },
1623
+ "source": {
1624
+ "$ref": "#/properties/request/anyOf/0/properties/source"
1625
+ },
1626
+ "status": {
1627
+ "type": "string",
1628
+ "enum": [
1629
+ "queued",
1630
+ "running",
1631
+ "failed",
1632
+ "cancelled",
1633
+ "waiting_input"
1634
+ ]
1635
+ },
1636
+ "revision": {
1637
+ "$ref": "#/properties/request/anyOf/1/properties/expectedRevision"
1638
+ },
1639
+ "generation": {
1640
+ "$ref": "#/properties/request/anyOf/1/properties/expectedRevision"
1641
+ },
1642
+ "inputDigest": {
1643
+ "$ref": "#/properties/result/anyOf/1/properties/artifactDigest"
1644
+ },
1645
+ "specHash": {
1646
+ "$ref": "#/properties/result/anyOf/1/properties/artifactDigest"
1647
+ },
1648
+ "createdAt": {
1649
+ "$ref": "#/properties/request/anyOf/1/properties/expectedRevision"
1650
+ },
1651
+ "updatedAt": {
1652
+ "$ref": "#/properties/request/anyOf/1/properties/expectedRevision"
1653
+ },
1654
+ "publication": {
1655
+ "$ref": "#/properties/delegationStatus/anyOf/0/properties/publication"
1656
+ },
1657
+ "phase": {
1658
+ "$ref": "#/properties/spec/properties/input/properties/taskRef"
1659
+ },
1660
+ "budget": {
1661
+ "$ref": "#/properties/delegationStatus/anyOf/0/properties/budget"
1662
+ },
1663
+ "candidate": {
1664
+ "$ref": "#/properties/delegationStatus/anyOf/1/properties/candidate"
1665
+ },
1666
+ "evidenceRefs": {
1667
+ "$ref": "#/properties/delegationStatus/anyOf/1/properties/evidenceRefs"
1668
+ },
1669
+ "resultRef": {
1670
+ "$ref": "#/properties/delegationStatus/anyOf/1/properties/resultRef"
1671
+ },
1672
+ "delivery": {
1673
+ "type": "string",
1674
+ "enum": [
1675
+ "pending",
1676
+ "delivery_unknown"
1677
+ ]
1678
+ },
1679
+ "interrupt": {
1680
+ "$ref": "#/properties/delegationStatus/anyOf/0/properties/interrupt"
1681
+ },
1682
+ "authorization": {
1683
+ "$ref": "#/properties/delegationStatus/anyOf/0/properties/authorization"
1684
+ },
1685
+ "error": {
1686
+ "$ref": "#/properties/delegationStatus/anyOf/0/properties/error"
1687
+ }
1688
+ },
1689
+ "required": [
1690
+ "schemaVersion",
1691
+ "scope",
1692
+ "graphRunId",
1693
+ "source",
1694
+ "status",
1695
+ "revision",
1696
+ "generation",
1697
+ "inputDigest",
1698
+ "specHash",
1699
+ "createdAt",
1700
+ "updatedAt",
1701
+ "publication",
1702
+ "phase",
1703
+ "budget",
1704
+ "evidenceRefs",
1705
+ "delivery"
1706
+ ],
1707
+ "additionalProperties": false
1708
+ }
1709
+ ]
1710
+ },
1711
+ "deliveryUnknown": {
1712
+ "type": "object",
1713
+ "properties": {
1714
+ "schemaVersion": {
1715
+ "$ref": "#/properties/spec/properties/schemaVersion"
1716
+ },
1717
+ "kind": {
1718
+ "type": "string",
1719
+ "const": "delivery_unknown"
1720
+ },
1721
+ "scope": {
1722
+ "$ref": "#/properties/scope"
1723
+ },
1724
+ "idempotencyKey": {
1725
+ "$ref": "#/properties/spec/properties/input/properties/taskRef"
1726
+ },
1727
+ "inputDigest": {
1728
+ "$ref": "#/properties/result/anyOf/1/properties/artifactDigest"
1729
+ },
1730
+ "graphRunId": {
1731
+ "$ref": "#/properties/spec/properties/input/properties/taskRef"
1732
+ },
1733
+ "nextAction": {
1734
+ "type": "string",
1735
+ "const": "retry_same_request"
1736
+ }
1737
+ },
1738
+ "required": [
1739
+ "schemaVersion",
1740
+ "kind",
1741
+ "scope",
1742
+ "idempotencyKey",
1743
+ "inputDigest",
1744
+ "nextAction"
1745
+ ],
1746
+ "additionalProperties": false
1747
+ }
1748
+ },
1749
+ "required": [
1750
+ "spec",
1751
+ "scope",
1752
+ "budget",
1753
+ "error",
1754
+ "runState",
1755
+ "nodeState",
1756
+ "actionState",
1757
+ "result",
1758
+ "request",
1759
+ "effectIdentity",
1760
+ "workerActionRequest",
1761
+ "workerActionResponse",
1762
+ "idempotencyRecord",
1763
+ "statusRequest",
1764
+ "delegationStatus",
1765
+ "deliveryUnknown"
1766
+ ],
1767
+ "additionalProperties": false
1768
+ }