@skill-harness/adapters 0.10.0 → 0.12.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.
@@ -0,0 +1,961 @@
1
+ // GENERATED by scripts/vendor-pi-daddy-ledger-v3-contract.mjs — do not edit by hand.
2
+ // Separate from the frozen ledger-v2 module and legacy 0.17 dispatch.
3
+ export const PI_DADDY_LEDGER_V3_CONTRACT_COMMIT = "4a9524394ca995fd74ed9bbb836dc4e73cda3b8c";
4
+ export const PI_DADDY_LEDGER_V3_CONTRACT_TREE = "7c006bff213142634f0f911ba9bd6add363ecaae";
5
+ export const PI_DADDY_LEDGER_V3_SCHEMA_SHA256 = "64e3d875e74bc32fa43fb96892605548259cd16f6ed6678646d73cc56280c511";
6
+ export const PI_DADDY_LEDGER_V3_SCHEMA = {
7
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
8
+ "$id": "https://github.com/mojomanyana/pi-daddy/contracts/ledger/v3/ledger-event.schema.json",
9
+ "title": "pi-daddy ledgerVersion 3 event",
10
+ "description": "One JSON object per JSONL line. Version 3 adds unique execution identity and explicit parent execution identity; legacy and v2 lines are intentionally outside this schema.",
11
+ "oneOf": [
12
+ {
13
+ "$ref": "#/$defs/capabilityDecision"
14
+ },
15
+ {
16
+ "$ref": "#/$defs/workspaceLease"
17
+ },
18
+ {
19
+ "$ref": "#/$defs/childLifecycle"
20
+ },
21
+ {
22
+ "$ref": "#/$defs/checkReceipt"
23
+ },
24
+ {
25
+ "$ref": "#/$defs/workflowFact"
26
+ }
27
+ ],
28
+ "$defs": {
29
+ "timestamp": {
30
+ "type": "string",
31
+ "format": "date-time",
32
+ "pattern": ":[0-5][0-9](?:\\.[0-9]+)?(?:[Zz]|[+-][0-9]{2}:[0-9]{2})$"
33
+ },
34
+ "correlation": {
35
+ "type": "object",
36
+ "description": "Non-authoritative controller metadata under the pinned 1.0 contract. String and aggregate byte limits are additionally enforced by the runtime and cannot be represented exactly in JSON Schema.",
37
+ "properties": {
38
+ "schema_version": {
39
+ "const": "1.0"
40
+ },
41
+ "run_id": {
42
+ "$ref": "#/$defs/ledgerCorrelationIdentifier"
43
+ },
44
+ "task_id": {
45
+ "$ref": "#/$defs/ledgerCorrelationIdentifier"
46
+ },
47
+ "workspace_id": {
48
+ "$ref": "#/$defs/ledgerCorrelationIdentifier"
49
+ },
50
+ "context_id": {
51
+ "$ref": "#/$defs/ledgerCorrelationIdentifier"
52
+ },
53
+ "phase": {
54
+ "$ref": "#/$defs/ledgerCorrelationIdentifier"
55
+ },
56
+ "assurance": {
57
+ "$ref": "#/$defs/ledgerCorrelationIdentifier"
58
+ },
59
+ "assurance_effective": {
60
+ "$ref": "#/$defs/ledgerCorrelationIdentifier"
61
+ },
62
+ "policy_label": {
63
+ "$ref": "#/$defs/ledgerCorrelationIdentifier"
64
+ },
65
+ "assurance_source": {
66
+ "$ref": "#/$defs/ledgerCorrelationIdentifier"
67
+ },
68
+ "assurance_scope": {
69
+ "oneOf": [
70
+ {
71
+ "type": "object",
72
+ "properties": {
73
+ "type": {
74
+ "const": "entire-run"
75
+ },
76
+ "selectors": {
77
+ "type": "array",
78
+ "maxItems": 0
79
+ }
80
+ },
81
+ "required": [
82
+ "type",
83
+ "selectors"
84
+ ],
85
+ "additionalProperties": false
86
+ },
87
+ {
88
+ "type": "object",
89
+ "properties": {
90
+ "type": {
91
+ "const": "selectors"
92
+ },
93
+ "selectors": {
94
+ "type": "array",
95
+ "minItems": 1,
96
+ "items": {
97
+ "type": "string",
98
+ "minLength": 1
99
+ }
100
+ }
101
+ },
102
+ "required": [
103
+ "type",
104
+ "selectors"
105
+ ],
106
+ "additionalProperties": false
107
+ }
108
+ ]
109
+ },
110
+ "activated_at": {
111
+ "type": "string",
112
+ "maxLength": 512
113
+ },
114
+ "plan_digest": {
115
+ "type": "string",
116
+ "maxLength": 512
117
+ },
118
+ "definition_digest": {
119
+ "type": "string",
120
+ "maxLength": 512
121
+ },
122
+ "task_digest": {
123
+ "type": "string",
124
+ "maxLength": 512
125
+ },
126
+ "base_sha": {
127
+ "type": "string",
128
+ "maxLength": 512
129
+ },
130
+ "head_sha": {
131
+ "type": "string",
132
+ "maxLength": 512
133
+ },
134
+ "tree_sha": {
135
+ "type": "string",
136
+ "maxLength": 512
137
+ },
138
+ "event_seq": {
139
+ "type": "number"
140
+ },
141
+ "last_change_seq": {
142
+ "type": "number"
143
+ },
144
+ "last_authority_seq": {
145
+ "type": "number"
146
+ },
147
+ "check_receipt_id": {
148
+ "type": "string",
149
+ "maxLength": 512
150
+ }
151
+ },
152
+ "additionalProperties": false
153
+ },
154
+ "ledgerDisplayIdentifier": {
155
+ "type": "string",
156
+ "pattern": "^[A-Za-z0-9@*][A-Za-z0-9@*._:/-]{0,511}$"
157
+ },
158
+ "ledgerCorrelationIdentifier": {
159
+ "type": "string",
160
+ "pattern": "^[A-Za-z0-9@*][A-Za-z0-9@*._:/-]{0,127}$"
161
+ },
162
+ "ledgerCapabilityIdentifier": {
163
+ "type": "string",
164
+ "pattern": "^(tool|skill|agent|workspace|ext):[A-Za-z0-9@*][A-Za-z0-9@*._/-]{0,255}$"
165
+ },
166
+ "refusalCode": {
167
+ "type": "string",
168
+ "enum": [
169
+ "CAPABILITY_ESCALATION",
170
+ "GRANT_ID_MALFORMED",
171
+ "DEFINITION_NOT_AUTHORIZED",
172
+ "UNDECLARED_TOOLS",
173
+ "UNKNOWN_TOOL",
174
+ "GATED_UNAPPROVED",
175
+ "APPROVAL_EXPIRED",
176
+ "APPROVAL_SCOPE_MISMATCH",
177
+ "APPROVAL_FLOW_FAILED",
178
+ "DEPTH_EXCEEDED",
179
+ "FANOUT_EXCEEDED",
180
+ "EXECUTOR_UNAVAILABLE",
181
+ "MODEL_UNRESOLVED",
182
+ "GRANT_STORE_INVALID",
183
+ "CHILD_TIMED_OUT",
184
+ "CHILD_CANCELLED",
185
+ "CHILD_EXIT_NONZERO",
186
+ "TASK_MISSING",
187
+ "UNKNOWN_DEFINITION",
188
+ "CEILING_PATTERNS_UNRESOLVED",
189
+ "NARROWING_VIOLATED",
190
+ "DEFINITION_UNREADABLE",
191
+ "CORRELATION_TOO_LARGE",
192
+ "CORRELATION_INVALID",
193
+ "LEDGER_WRITE_FAILED",
194
+ "FANOUT_FAILED",
195
+ "WORKSPACE_NOT_REGISTERED",
196
+ "WORKSPACE_NOT_AUTHORIZED",
197
+ "WORKSPACE_WRITE_CONFLICT",
198
+ "WORKSPACE_LEASE_STALE",
199
+ "CHECK_NOT_CONFIGURED",
200
+ "CHECK_CONFIGURATION_INVALID",
201
+ "CHECK_IDENTITY_UNAVAILABLE",
202
+ "CHECK_IDENTITY_MISMATCH"
203
+ ]
204
+ },
205
+ "refusal": {
206
+ "type": "object",
207
+ "properties": {
208
+ "code": {
209
+ "$ref": "#/$defs/refusalCode"
210
+ },
211
+ "message": {
212
+ "type": "string"
213
+ },
214
+ "details": {
215
+ "type": "object",
216
+ "additionalProperties": {
217
+ "type": [
218
+ "string",
219
+ "number",
220
+ "boolean",
221
+ "null"
222
+ ]
223
+ }
224
+ }
225
+ },
226
+ "required": [
227
+ "code",
228
+ "message"
229
+ ],
230
+ "additionalProperties": false
231
+ },
232
+ "approvalSource": {
233
+ "type": "string",
234
+ "enum": [
235
+ "prompt",
236
+ "session",
237
+ "persisted",
238
+ "inherited"
239
+ ]
240
+ },
241
+ "approvalScope": {
242
+ "type": "string",
243
+ "enum": [
244
+ "once",
245
+ "session",
246
+ "always"
247
+ ]
248
+ },
249
+ "approvalUse": {
250
+ "type": "object",
251
+ "properties": {
252
+ "max": {
253
+ "type": "integer",
254
+ "minimum": 0
255
+ },
256
+ "remaining": {
257
+ "type": "integer",
258
+ "minimum": 0
259
+ }
260
+ },
261
+ "required": [
262
+ "max",
263
+ "remaining"
264
+ ],
265
+ "additionalProperties": false
266
+ },
267
+ "definitionDigest": {
268
+ "type": "object",
269
+ "properties": {
270
+ "name": {
271
+ "type": "string"
272
+ },
273
+ "source": {
274
+ "type": "string"
275
+ },
276
+ "sha256": {
277
+ "type": "string",
278
+ "pattern": "^[a-fA-F0-9]{64}$"
279
+ }
280
+ },
281
+ "required": [
282
+ "name",
283
+ "source",
284
+ "sha256"
285
+ ],
286
+ "additionalProperties": false
287
+ },
288
+ "capabilityDecision": {
289
+ "type": "object",
290
+ "properties": {
291
+ "ledgerVersion": {
292
+ "const": 3
293
+ },
294
+ "event": {
295
+ "const": "capability_decision"
296
+ },
297
+ "ts": {
298
+ "$ref": "#/$defs/timestamp"
299
+ },
300
+ "parentId": {
301
+ "$ref": "#/$defs/ledgerDisplayIdentifier"
302
+ },
303
+ "childId": {
304
+ "$ref": "#/$defs/ledgerDisplayIdentifier"
305
+ },
306
+ "depth": {
307
+ "type": "integer",
308
+ "minimum": 0
309
+ },
310
+ "agentType": {
311
+ "$ref": "#/$defs/ledgerDisplayIdentifier"
312
+ },
313
+ "requested": {
314
+ "type": "array",
315
+ "items": {
316
+ "$ref": "#/$defs/ledgerCapabilityIdentifier"
317
+ }
318
+ },
319
+ "parentGrant": {
320
+ "type": "array",
321
+ "items": {
322
+ "$ref": "#/$defs/ledgerCapabilityIdentifier"
323
+ }
324
+ },
325
+ "effective": {
326
+ "type": "array",
327
+ "items": {
328
+ "$ref": "#/$defs/ledgerCapabilityIdentifier"
329
+ }
330
+ },
331
+ "denied": {
332
+ "type": "array",
333
+ "items": {
334
+ "$ref": "#/$defs/ledgerCapabilityIdentifier"
335
+ }
336
+ },
337
+ "clipped": {
338
+ "type": "array",
339
+ "items": {
340
+ "$ref": "#/$defs/ledgerCapabilityIdentifier"
341
+ }
342
+ },
343
+ "gatedBlocked": {
344
+ "type": "array",
345
+ "items": {
346
+ "$ref": "#/$defs/ledgerCapabilityIdentifier"
347
+ }
348
+ },
349
+ "blocked": {
350
+ "type": "boolean"
351
+ },
352
+ "reason": {
353
+ "type": "string"
354
+ },
355
+ "approved": {
356
+ "type": "array",
357
+ "items": {
358
+ "$ref": "#/$defs/ledgerCapabilityIdentifier"
359
+ }
360
+ },
361
+ "approvalSource": {
362
+ "$ref": "#/$defs/approvalSource"
363
+ },
364
+ "approvalSources": {
365
+ "type": "object",
366
+ "propertyNames": {
367
+ "$ref": "#/$defs/ledgerCapabilityIdentifier"
368
+ },
369
+ "additionalProperties": {
370
+ "$ref": "#/$defs/approvalSource"
371
+ }
372
+ },
373
+ "approvalScopes": {
374
+ "type": "object",
375
+ "propertyNames": {
376
+ "$ref": "#/$defs/ledgerCapabilityIdentifier"
377
+ },
378
+ "additionalProperties": {
379
+ "$ref": "#/$defs/approvalScope"
380
+ }
381
+ },
382
+ "approvalExpiresAt": {
383
+ "type": "object",
384
+ "propertyNames": {
385
+ "$ref": "#/$defs/ledgerCapabilityIdentifier"
386
+ },
387
+ "additionalProperties": {
388
+ "$ref": "#/$defs/timestamp"
389
+ }
390
+ },
391
+ "approvalUses": {
392
+ "type": "object",
393
+ "propertyNames": {
394
+ "$ref": "#/$defs/ledgerCapabilityIdentifier"
395
+ },
396
+ "additionalProperties": {
397
+ "$ref": "#/$defs/approvalUse"
398
+ }
399
+ },
400
+ "approvalScope": {
401
+ "$ref": "#/$defs/approvalScope"
402
+ },
403
+ "humanDenied": {
404
+ "const": true
405
+ },
406
+ "gateOutcome": {
407
+ "type": "string",
408
+ "enum": [
409
+ "declined",
410
+ "dismissed",
411
+ "no-ui",
412
+ "error"
413
+ ]
414
+ },
415
+ "definitionDigest": {
416
+ "$ref": "#/$defs/definitionDigest"
417
+ },
418
+ "executor": {
419
+ "type": "string",
420
+ "enum": [
421
+ "process",
422
+ "herdr"
423
+ ]
424
+ },
425
+ "taskFrom": {
426
+ "$ref": "#/$defs/ledgerDisplayIdentifier"
427
+ },
428
+ "taskDigest": {
429
+ "type": "string",
430
+ "pattern": "^[a-fA-F0-9]{64}$"
431
+ },
432
+ "correlation": {
433
+ "$ref": "#/$defs/correlation"
434
+ },
435
+ "refusal": {
436
+ "$ref": "#/$defs/refusal"
437
+ },
438
+ "executionId": {
439
+ "$ref": "#/$defs/executionId"
440
+ },
441
+ "parentExecutionId": {
442
+ "oneOf": [
443
+ {
444
+ "$ref": "#/$defs/executionId"
445
+ },
446
+ {
447
+ "type": "null"
448
+ }
449
+ ]
450
+ },
451
+ "taskFromExecutionId": {
452
+ "$ref": "#/$defs/executionId"
453
+ }
454
+ },
455
+ "required": [
456
+ "ledgerVersion",
457
+ "event",
458
+ "ts",
459
+ "executionId",
460
+ "parentExecutionId",
461
+ "parentId",
462
+ "childId",
463
+ "depth",
464
+ "requested",
465
+ "parentGrant",
466
+ "effective",
467
+ "denied",
468
+ "clipped",
469
+ "gatedBlocked",
470
+ "blocked",
471
+ "executor",
472
+ "taskDigest"
473
+ ],
474
+ "additionalProperties": false
475
+ },
476
+ "workspaceLease": {
477
+ "type": "object",
478
+ "properties": {
479
+ "ledgerVersion": {
480
+ "const": 3
481
+ },
482
+ "event": {
483
+ "const": "workspace_lease"
484
+ },
485
+ "ts": {
486
+ "$ref": "#/$defs/timestamp"
487
+ },
488
+ "childId": {
489
+ "$ref": "#/$defs/ledgerDisplayIdentifier"
490
+ },
491
+ "workspaceId": {
492
+ "$ref": "#/$defs/ledgerDisplayIdentifier"
493
+ },
494
+ "root": {
495
+ "type": "string",
496
+ "minLength": 1
497
+ },
498
+ "access": {
499
+ "type": "string",
500
+ "enum": [
501
+ "read",
502
+ "write"
503
+ ]
504
+ },
505
+ "outcome": {
506
+ "type": "string",
507
+ "enum": [
508
+ "acquired",
509
+ "uncontended",
510
+ "refused",
511
+ "released",
512
+ "released-unrecorded",
513
+ "lost",
514
+ "retained",
515
+ "timeout",
516
+ "recovered"
517
+ ]
518
+ },
519
+ "recovered": {
520
+ "oneOf": [
521
+ {
522
+ "type": "boolean"
523
+ },
524
+ {
525
+ "const": "unknown"
526
+ }
527
+ ]
528
+ },
529
+ "releaseReason": {
530
+ "type": "string"
531
+ },
532
+ "refusal": {
533
+ "$ref": "#/$defs/refusal"
534
+ },
535
+ "correlation": {
536
+ "$ref": "#/$defs/correlation"
537
+ },
538
+ "executionId": {
539
+ "$ref": "#/$defs/executionId"
540
+ },
541
+ "parentExecutionId": {
542
+ "oneOf": [
543
+ {
544
+ "$ref": "#/$defs/executionId"
545
+ },
546
+ {
547
+ "type": "null"
548
+ }
549
+ ]
550
+ }
551
+ },
552
+ "required": [
553
+ "ledgerVersion",
554
+ "event",
555
+ "ts",
556
+ "executionId",
557
+ "parentExecutionId",
558
+ "childId",
559
+ "workspaceId",
560
+ "root",
561
+ "access",
562
+ "outcome"
563
+ ],
564
+ "additionalProperties": false
565
+ },
566
+ "childLifecycle": {
567
+ "type": "object",
568
+ "properties": {
569
+ "ledgerVersion": {
570
+ "const": 3
571
+ },
572
+ "event": {
573
+ "const": "child_lifecycle"
574
+ },
575
+ "ts": {
576
+ "$ref": "#/$defs/timestamp"
577
+ },
578
+ "childId": {
579
+ "$ref": "#/$defs/ledgerDisplayIdentifier"
580
+ },
581
+ "state": {
582
+ "type": "string",
583
+ "enum": [
584
+ "starting",
585
+ "running",
586
+ "completed",
587
+ "failed"
588
+ ]
589
+ },
590
+ "executor": {
591
+ "type": "string",
592
+ "enum": [
593
+ "process",
594
+ "herdr"
595
+ ]
596
+ },
597
+ "exitCode": {
598
+ "type": [
599
+ "integer",
600
+ "null"
601
+ ]
602
+ },
603
+ "signal": {
604
+ "oneOf": [
605
+ {
606
+ "type": "string",
607
+ "enum": [
608
+ "SIGABRT",
609
+ "SIGALRM",
610
+ "SIGBUS",
611
+ "SIGCHLD",
612
+ "SIGCONT",
613
+ "SIGFPE",
614
+ "SIGHUP",
615
+ "SIGILL",
616
+ "SIGINT",
617
+ "SIGIO",
618
+ "SIGIOT",
619
+ "SIGKILL",
620
+ "SIGPIPE",
621
+ "SIGPOLL",
622
+ "SIGPROF",
623
+ "SIGPWR",
624
+ "SIGQUIT",
625
+ "SIGSEGV",
626
+ "SIGSTKFLT",
627
+ "SIGSTOP",
628
+ "SIGSYS",
629
+ "SIGTERM",
630
+ "SIGTRAP",
631
+ "SIGTSTP",
632
+ "SIGTTIN",
633
+ "SIGTTOU",
634
+ "SIGUNUSED",
635
+ "SIGURG",
636
+ "SIGUSR1",
637
+ "SIGUSR2",
638
+ "SIGVTALRM",
639
+ "SIGWINCH",
640
+ "SIGXCPU",
641
+ "SIGXFSZ",
642
+ "SIGBREAK",
643
+ "SIGLOST",
644
+ "SIGINFO"
645
+ ]
646
+ },
647
+ {
648
+ "type": "null"
649
+ }
650
+ ]
651
+ },
652
+ "timedOut": {
653
+ "const": true
654
+ },
655
+ "aborted": {
656
+ "const": true
657
+ },
658
+ "truncated": {
659
+ "const": true
660
+ },
661
+ "reason": {
662
+ "type": "string"
663
+ },
664
+ "correlation": {
665
+ "$ref": "#/$defs/correlation"
666
+ },
667
+ "executionId": {
668
+ "$ref": "#/$defs/executionId"
669
+ },
670
+ "parentExecutionId": {
671
+ "oneOf": [
672
+ {
673
+ "$ref": "#/$defs/executionId"
674
+ },
675
+ {
676
+ "type": "null"
677
+ }
678
+ ]
679
+ },
680
+ "deadlineAt": {
681
+ "$ref": "#/$defs/timestamp"
682
+ },
683
+ "herdrPaneId": {
684
+ "$ref": "#/$defs/ledgerDisplayIdentifier"
685
+ },
686
+ "herdrAgentName": {
687
+ "$ref": "#/$defs/ledgerDisplayIdentifier"
688
+ }
689
+ },
690
+ "required": [
691
+ "ledgerVersion",
692
+ "event",
693
+ "ts",
694
+ "executionId",
695
+ "parentExecutionId",
696
+ "childId",
697
+ "state",
698
+ "executor"
699
+ ],
700
+ "additionalProperties": false,
701
+ "allOf": [
702
+ {
703
+ "if": {
704
+ "properties": {
705
+ "state": {
706
+ "enum": [
707
+ "starting",
708
+ "running"
709
+ ]
710
+ }
711
+ },
712
+ "required": [
713
+ "state"
714
+ ]
715
+ },
716
+ "then": {
717
+ "required": [
718
+ "deadlineAt"
719
+ ]
720
+ }
721
+ },
722
+ {
723
+ "if": {
724
+ "anyOf": [
725
+ {
726
+ "required": [
727
+ "herdrPaneId"
728
+ ]
729
+ },
730
+ {
731
+ "required": [
732
+ "herdrAgentName"
733
+ ]
734
+ }
735
+ ]
736
+ },
737
+ "then": {
738
+ "required": [
739
+ "herdrPaneId",
740
+ "herdrAgentName"
741
+ ],
742
+ "properties": {
743
+ "executor": {
744
+ "const": "herdr"
745
+ }
746
+ }
747
+ }
748
+ }
749
+ ]
750
+ },
751
+ "checkReceipt": {
752
+ "type": "object",
753
+ "properties": {
754
+ "ledgerVersion": {
755
+ "const": 3
756
+ },
757
+ "event": {
758
+ "const": "check_receipt"
759
+ },
760
+ "ts": {
761
+ "$ref": "#/$defs/timestamp"
762
+ },
763
+ "childId": {
764
+ "$ref": "#/$defs/ledgerDisplayIdentifier"
765
+ },
766
+ "receiptId": {
767
+ "type": "string",
768
+ "pattern": "^[a-fA-F0-9]{64}$"
769
+ },
770
+ "workspaceId": {
771
+ "$ref": "#/$defs/ledgerDisplayIdentifier"
772
+ },
773
+ "checkId": {
774
+ "$ref": "#/$defs/ledgerDisplayIdentifier"
775
+ },
776
+ "treeSha": {
777
+ "type": "string",
778
+ "minLength": 1
779
+ },
780
+ "correlation": {
781
+ "$ref": "#/$defs/correlation"
782
+ },
783
+ "executionId": {
784
+ "$ref": "#/$defs/executionId"
785
+ },
786
+ "parentExecutionId": {
787
+ "oneOf": [
788
+ {
789
+ "$ref": "#/$defs/executionId"
790
+ },
791
+ {
792
+ "type": "null"
793
+ }
794
+ ]
795
+ }
796
+ },
797
+ "required": [
798
+ "ledgerVersion",
799
+ "event",
800
+ "ts",
801
+ "executionId",
802
+ "parentExecutionId",
803
+ "childId",
804
+ "receiptId",
805
+ "workspaceId",
806
+ "checkId",
807
+ "treeSha"
808
+ ],
809
+ "additionalProperties": false
810
+ },
811
+ "executionId": {
812
+ "type": "string",
813
+ "pattern": "^exec:[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89aAbB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
814
+ },
815
+ "workflowFact": {
816
+ "type": "object",
817
+ "properties": {
818
+ "ledgerVersion": {
819
+ "const": 3
820
+ },
821
+ "event": {
822
+ "const": "workflow_fact"
823
+ },
824
+ "ts": {
825
+ "$ref": "#/$defs/timestamp"
826
+ },
827
+ "factId": {
828
+ "type": "string",
829
+ "pattern": "^fact:[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89aAbB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
830
+ },
831
+ "source": {
832
+ "type": "string",
833
+ "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]{0,127}$"
834
+ },
835
+ "provenance": {
836
+ "enum": [
837
+ "planned",
838
+ "observed",
839
+ "controller_validated"
840
+ ]
841
+ },
842
+ "kind": {
843
+ "enum": [
844
+ "workflow_phase",
845
+ "inline_skill",
846
+ "transition"
847
+ ]
848
+ },
849
+ "subject": {
850
+ "type": "string",
851
+ "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]{0,127}$"
852
+ },
853
+ "state": {
854
+ "enum": [
855
+ "pending",
856
+ "observed",
857
+ "started",
858
+ "completed",
859
+ "blocked"
860
+ ]
861
+ },
862
+ "correlation": {
863
+ "allOf": [
864
+ {
865
+ "$ref": "#/$defs/correlation"
866
+ },
867
+ {
868
+ "type": "object",
869
+ "properties": {
870
+ "run_id": {
871
+ "type": "string",
872
+ "minLength": 1
873
+ }
874
+ },
875
+ "required": [
876
+ "run_id"
877
+ ]
878
+ }
879
+ ]
880
+ }
881
+ },
882
+ "required": [
883
+ "ledgerVersion",
884
+ "event",
885
+ "ts",
886
+ "factId",
887
+ "source",
888
+ "provenance",
889
+ "kind",
890
+ "subject",
891
+ "state",
892
+ "correlation"
893
+ ],
894
+ "additionalProperties": false,
895
+ "allOf": [
896
+ {
897
+ "if": {
898
+ "properties": {
899
+ "provenance": {
900
+ "const": "planned"
901
+ }
902
+ },
903
+ "required": [
904
+ "provenance"
905
+ ]
906
+ },
907
+ "then": {
908
+ "properties": {
909
+ "state": {
910
+ "const": "pending"
911
+ }
912
+ }
913
+ }
914
+ },
915
+ {
916
+ "if": {
917
+ "properties": {
918
+ "provenance": {
919
+ "const": "observed"
920
+ }
921
+ },
922
+ "required": [
923
+ "provenance"
924
+ ]
925
+ },
926
+ "then": {
927
+ "properties": {
928
+ "state": {
929
+ "const": "observed"
930
+ }
931
+ }
932
+ }
933
+ },
934
+ {
935
+ "if": {
936
+ "properties": {
937
+ "provenance": {
938
+ "const": "controller_validated"
939
+ }
940
+ },
941
+ "required": [
942
+ "provenance"
943
+ ]
944
+ },
945
+ "then": {
946
+ "properties": {
947
+ "state": {
948
+ "enum": [
949
+ "started",
950
+ "completed",
951
+ "blocked"
952
+ ]
953
+ }
954
+ }
955
+ }
956
+ }
957
+ ]
958
+ }
959
+ }
960
+ };
961
+ //# sourceMappingURL=pi-daddy-ledger-v3.js.map