perttool 0.5.0 → 0.5.2

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 (41) hide show
  1. package/CHANGELOG.md +39 -1
  2. package/README.md +66 -28
  3. package/dist/cli.js +41 -0
  4. package/dist/cli.js.map +1 -1
  5. package/dist/command/actuals-discovery.d.ts.map +1 -1
  6. package/dist/command/actuals-discovery.js +92 -13
  7. package/dist/command/actuals-discovery.js.map +1 -1
  8. package/dist/history/git-probe.d.ts +4 -0
  9. package/dist/history/git-probe.d.ts.map +1 -1
  10. package/dist/history/git-probe.js +23 -14
  11. package/dist/history/git-probe.js.map +1 -1
  12. package/dist/index.d.ts +2 -0
  13. package/dist/index.d.ts.map +1 -1
  14. package/dist/index.js +1 -0
  15. package/dist/index.js.map +1 -1
  16. package/dist/schema/registry.d.ts +53 -0
  17. package/dist/schema/registry.d.ts.map +1 -0
  18. package/dist/schema/registry.js +346 -0
  19. package/dist/schema/registry.js.map +1 -0
  20. package/dist/version.d.ts +1 -1
  21. package/dist/version.js +1 -1
  22. package/package.json +5 -2
  23. package/schemas/Perttool.AgentGuidanceResult.v1.schema.json +607 -0
  24. package/schemas/Perttool.AnalysisResult.v4.schema.json +790 -0
  25. package/schemas/Perttool.CheckResult.v3.schema.json +203 -0
  26. package/schemas/Perttool.CliError.v1.schema.json +119 -0
  27. package/schemas/Perttool.CommandHelpResult.v1.schema.json +377 -0
  28. package/schemas/Perttool.Common.v1.schema.json +1893 -0
  29. package/schemas/Perttool.ExportResult.v1.schema.json +96 -0
  30. package/schemas/Perttool.FormatResult.v1.schema.json +82 -0
  31. package/schemas/Perttool.GuideResult.v1.schema.json +138 -0
  32. package/schemas/Perttool.ImportResult.v1.schema.json +111 -0
  33. package/schemas/Perttool.InitResult.v1.schema.json +70 -0
  34. package/schemas/Perttool.MutationResult.v3.schema.json +194 -0
  35. package/schemas/Perttool.NextResult.v5.schema.json +1264 -0
  36. package/schemas/Perttool.OverrideDecision.v1.schema.json +402 -0
  37. package/schemas/Perttool.ProjectHistoryResult.v1.schema.json +283 -0
  38. package/schemas/Perttool.ProjectResult.v3.schema.json +217 -0
  39. package/schemas/Perttool.SchemaResult.v1.schema.json +137 -0
  40. package/schemas/Perttool.UnitMigrationResult.v3.schema.json +343 -0
  41. package/schemas/Perttool.VelocityObservationResult.v1.schema.json +301 -0
@@ -0,0 +1,1893 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://github.com/mako10k/perttool/schemas/Perttool.Common.v1.schema.json",
4
+ "title": "perttool shared JSON definitions",
5
+ "$defs": {
6
+ "digest": {
7
+ "type": "string",
8
+ "pattern": "^sha256:[0-9a-f]{64}$"
9
+ },
10
+ "nullableDigest": {
11
+ "oneOf": [
12
+ {
13
+ "$ref": "#/$defs/digest"
14
+ },
15
+ {
16
+ "type": "null"
17
+ }
18
+ ]
19
+ },
20
+ "nullableString": {
21
+ "type": [
22
+ "string",
23
+ "null"
24
+ ]
25
+ },
26
+ "jsonValue": {
27
+ "oneOf": [
28
+ {
29
+ "type": "null"
30
+ },
31
+ {
32
+ "type": "boolean"
33
+ },
34
+ {
35
+ "type": "number"
36
+ },
37
+ {
38
+ "type": "string"
39
+ },
40
+ {
41
+ "type": "array",
42
+ "items": {
43
+ "$ref": "#/$defs/jsonValue"
44
+ }
45
+ },
46
+ {
47
+ "$ref": "#/$defs/jsonObject"
48
+ }
49
+ ]
50
+ },
51
+ "jsonObject": {
52
+ "type": "object",
53
+ "additionalProperties": {
54
+ "$ref": "#/$defs/jsonValue"
55
+ }
56
+ },
57
+ "stringArray": {
58
+ "type": "array",
59
+ "items": {
60
+ "type": "string"
61
+ }
62
+ },
63
+ "position": {
64
+ "type": "object",
65
+ "required": [
66
+ "offset",
67
+ "line",
68
+ "column"
69
+ ],
70
+ "properties": {
71
+ "offset": {
72
+ "type": "integer",
73
+ "minimum": 0
74
+ },
75
+ "line": {
76
+ "type": "integer",
77
+ "minimum": 1
78
+ },
79
+ "column": {
80
+ "type": "integer",
81
+ "minimum": 1
82
+ }
83
+ },
84
+ "additionalProperties": false
85
+ },
86
+ "span": {
87
+ "type": "object",
88
+ "required": [
89
+ "start",
90
+ "end"
91
+ ],
92
+ "properties": {
93
+ "start": {
94
+ "$ref": "#/$defs/position"
95
+ },
96
+ "end": {
97
+ "$ref": "#/$defs/position"
98
+ }
99
+ },
100
+ "additionalProperties": false
101
+ },
102
+ "diagnostic": {
103
+ "type": "object",
104
+ "required": [
105
+ "code",
106
+ "severity",
107
+ "message"
108
+ ],
109
+ "properties": {
110
+ "code": {
111
+ "type": "string",
112
+ "minLength": 1
113
+ },
114
+ "severity": {
115
+ "enum": [
116
+ "error",
117
+ "warning",
118
+ "info"
119
+ ]
120
+ },
121
+ "message": {
122
+ "type": "string"
123
+ },
124
+ "entity_id": {
125
+ "$ref": "#/$defs/nullableString"
126
+ },
127
+ "span": {
128
+ "oneOf": [
129
+ {
130
+ "$ref": "#/$defs/span"
131
+ },
132
+ {
133
+ "type": "null"
134
+ }
135
+ ]
136
+ },
137
+ "related": {
138
+ "type": "array",
139
+ "items": {
140
+ "$ref": "#/$defs/relatedLocation"
141
+ }
142
+ },
143
+ "help_topic": {
144
+ "$ref": "#/$defs/nullableString"
145
+ },
146
+ "guide_topic": {
147
+ "$ref": "#/$defs/nullableString"
148
+ },
149
+ "expected_syntax": {
150
+ "$ref": "#/$defs/nullableString"
151
+ },
152
+ "fixes": {
153
+ "type": "array",
154
+ "maxItems": 0
155
+ },
156
+ "data": {
157
+ "$ref": "#/$defs/jsonObject"
158
+ },
159
+ "provider_id": {
160
+ "$ref": "#/$defs/nullableString"
161
+ },
162
+ "surface_id": {
163
+ "$ref": "#/$defs/nullableString"
164
+ }
165
+ },
166
+ "additionalProperties": false
167
+ },
168
+ "relatedLocation": {
169
+ "type": "object",
170
+ "required": [
171
+ "message",
172
+ "span"
173
+ ],
174
+ "properties": {
175
+ "message": {
176
+ "type": "string"
177
+ },
178
+ "span": {
179
+ "$ref": "#/$defs/span"
180
+ }
181
+ },
182
+ "additionalProperties": false
183
+ },
184
+ "diagnostics": {
185
+ "type": "array",
186
+ "items": {
187
+ "$ref": "#/$defs/diagnostic"
188
+ }
189
+ },
190
+ "edit": {
191
+ "type": "object",
192
+ "required": [
193
+ "start_offset",
194
+ "end_offset",
195
+ "replacement"
196
+ ],
197
+ "properties": {
198
+ "start_offset": {
199
+ "type": "integer",
200
+ "minimum": 0
201
+ },
202
+ "end_offset": {
203
+ "type": "integer",
204
+ "minimum": 0
205
+ },
206
+ "replacement": {
207
+ "type": "string"
208
+ }
209
+ },
210
+ "additionalProperties": false
211
+ },
212
+ "write": {
213
+ "type": "object",
214
+ "required": [
215
+ "mode",
216
+ "target",
217
+ "written"
218
+ ],
219
+ "properties": {
220
+ "mode": {
221
+ "enum": [
222
+ "preview",
223
+ "in_place",
224
+ "out"
225
+ ]
226
+ },
227
+ "target": {
228
+ "$ref": "#/$defs/nullableString"
229
+ },
230
+ "written": {
231
+ "type": "boolean"
232
+ }
233
+ },
234
+ "additionalProperties": false
235
+ },
236
+ "rational": {
237
+ "type": "object",
238
+ "required": [
239
+ "numerator",
240
+ "denominator"
241
+ ],
242
+ "properties": {
243
+ "numerator": {
244
+ "type": "string",
245
+ "pattern": "^-?[0-9]+$"
246
+ },
247
+ "denominator": {
248
+ "type": "string",
249
+ "pattern": "^[1-9][0-9]*$"
250
+ }
251
+ },
252
+ "additionalProperties": false
253
+ },
254
+ "quantity": {
255
+ "type": "object",
256
+ "required": [
257
+ "numerator",
258
+ "denominator",
259
+ "unit"
260
+ ],
261
+ "properties": {
262
+ "numerator": {
263
+ "type": "string",
264
+ "pattern": "^-?[0-9]+$"
265
+ },
266
+ "denominator": {
267
+ "type": "string",
268
+ "pattern": "^[1-9][0-9]*$"
269
+ },
270
+ "unit": {
271
+ "enum": [
272
+ "day",
273
+ "hour",
274
+ "point",
275
+ "person_hour"
276
+ ]
277
+ },
278
+ "display": {
279
+ "type": "string"
280
+ }
281
+ },
282
+ "additionalProperties": false
283
+ },
284
+ "displayedRational": {
285
+ "type": "object",
286
+ "required": [
287
+ "numerator",
288
+ "denominator",
289
+ "unit",
290
+ "display"
291
+ ],
292
+ "properties": {
293
+ "numerator": {
294
+ "type": "string",
295
+ "pattern": "^-?[0-9]+$"
296
+ },
297
+ "denominator": {
298
+ "type": "string",
299
+ "pattern": "^[1-9][0-9]*$"
300
+ },
301
+ "unit": {
302
+ "enum": [
303
+ "day",
304
+ "hour",
305
+ "point",
306
+ "day^2",
307
+ "hour^2",
308
+ "point^2",
309
+ "ratio"
310
+ ]
311
+ },
312
+ "display": {
313
+ "type": "string"
314
+ }
315
+ },
316
+ "additionalProperties": false
317
+ },
318
+ "nullableDisplayedRational": {
319
+ "oneOf": [
320
+ {
321
+ "$ref": "#/$defs/displayedRational"
322
+ },
323
+ {
324
+ "type": "null"
325
+ }
326
+ ]
327
+ },
328
+ "velocity": {
329
+ "type": "object",
330
+ "required": [
331
+ "points",
332
+ "period"
333
+ ],
334
+ "properties": {
335
+ "points": {
336
+ "$ref": "#/$defs/displayedRational"
337
+ },
338
+ "period": {
339
+ "$ref": "#/$defs/displayedRational"
340
+ }
341
+ },
342
+ "additionalProperties": false
343
+ },
344
+ "nullableVelocity": {
345
+ "oneOf": [
346
+ {
347
+ "$ref": "#/$defs/velocity"
348
+ },
349
+ {
350
+ "type": "null"
351
+ }
352
+ ]
353
+ },
354
+ "velocityForecast": {
355
+ "type": "object",
356
+ "required": [
357
+ "qualifier",
358
+ "source_unit",
359
+ "target_unit",
360
+ "precedence_makespan",
361
+ "resource_makespan"
362
+ ],
363
+ "properties": {
364
+ "qualifier": {
365
+ "const": "velocity_forecast"
366
+ },
367
+ "source_unit": {
368
+ "enum": [
369
+ "day",
370
+ "hour",
371
+ "point"
372
+ ]
373
+ },
374
+ "target_unit": {
375
+ "enum": [
376
+ "day",
377
+ "hour",
378
+ "point"
379
+ ]
380
+ },
381
+ "precedence_makespan": {
382
+ "$ref": "#/$defs/nullableDisplayedRational"
383
+ },
384
+ "resource_makespan": {
385
+ "$ref": "#/$defs/nullableDisplayedRational"
386
+ }
387
+ },
388
+ "additionalProperties": false
389
+ },
390
+ "nullableVelocityForecast": {
391
+ "oneOf": [
392
+ {
393
+ "$ref": "#/$defs/velocityForecast"
394
+ },
395
+ {
396
+ "type": "null"
397
+ }
398
+ ]
399
+ },
400
+ "calendarValue": {
401
+ "oneOf": [
402
+ {
403
+ "type": "object",
404
+ "required": [
405
+ "kind",
406
+ "source_text",
407
+ "year",
408
+ "month",
409
+ "day"
410
+ ],
411
+ "properties": {
412
+ "kind": {
413
+ "const": "date"
414
+ },
415
+ "source_text": {
416
+ "type": "string"
417
+ },
418
+ "year": {
419
+ "type": "integer"
420
+ },
421
+ "month": {
422
+ "type": "integer",
423
+ "minimum": 1,
424
+ "maximum": 12
425
+ },
426
+ "day": {
427
+ "type": "integer",
428
+ "minimum": 1,
429
+ "maximum": 31
430
+ }
431
+ },
432
+ "additionalProperties": false
433
+ },
434
+ {
435
+ "type": "object",
436
+ "required": [
437
+ "kind",
438
+ "source_text",
439
+ "year",
440
+ "month",
441
+ "day",
442
+ "hour",
443
+ "minute",
444
+ "second",
445
+ "offset_minutes"
446
+ ],
447
+ "properties": {
448
+ "kind": {
449
+ "const": "date_time"
450
+ },
451
+ "source_text": {
452
+ "type": "string"
453
+ },
454
+ "year": {
455
+ "type": "integer"
456
+ },
457
+ "month": {
458
+ "type": "integer",
459
+ "minimum": 1,
460
+ "maximum": 12
461
+ },
462
+ "day": {
463
+ "type": "integer",
464
+ "minimum": 1,
465
+ "maximum": 31
466
+ },
467
+ "hour": {
468
+ "type": "integer",
469
+ "minimum": 0,
470
+ "maximum": 23
471
+ },
472
+ "minute": {
473
+ "type": "integer",
474
+ "minimum": 0,
475
+ "maximum": 59
476
+ },
477
+ "second": {
478
+ "$ref": "#/$defs/rational"
479
+ },
480
+ "offset_minutes": {
481
+ "type": "integer",
482
+ "minimum": -1439,
483
+ "maximum": 1439
484
+ }
485
+ },
486
+ "additionalProperties": false
487
+ }
488
+ ]
489
+ },
490
+ "workEvent": {
491
+ "type": "object",
492
+ "required": [
493
+ "model_version",
494
+ "id",
495
+ "task_id",
496
+ "kind",
497
+ "occurred_at",
498
+ "planned_value",
499
+ "active_time",
500
+ "effort",
501
+ "reason"
502
+ ],
503
+ "properties": {
504
+ "model_version": {
505
+ "const": 1
506
+ },
507
+ "id": {
508
+ "type": "string"
509
+ },
510
+ "task_id": {
511
+ "type": "string"
512
+ },
513
+ "kind": {
514
+ "enum": [
515
+ "start",
516
+ "suspend",
517
+ "resume",
518
+ "finish"
519
+ ]
520
+ },
521
+ "occurred_at": {
522
+ "$ref": "#/$defs/calendarValue"
523
+ },
524
+ "planned_value": {
525
+ "oneOf": [
526
+ {
527
+ "$ref": "#/$defs/quantity"
528
+ },
529
+ {
530
+ "type": "null"
531
+ }
532
+ ]
533
+ },
534
+ "active_time": {
535
+ "oneOf": [
536
+ {
537
+ "$ref": "#/$defs/quantity"
538
+ },
539
+ {
540
+ "type": "null"
541
+ }
542
+ ]
543
+ },
544
+ "effort": {
545
+ "oneOf": [
546
+ {
547
+ "$ref": "#/$defs/quantity"
548
+ },
549
+ {
550
+ "type": "null"
551
+ }
552
+ ]
553
+ },
554
+ "reason": {
555
+ "$ref": "#/$defs/nullableString"
556
+ }
557
+ },
558
+ "additionalProperties": false
559
+ },
560
+ "nullableCalendarValue": {
561
+ "oneOf": [
562
+ {
563
+ "$ref": "#/$defs/calendarValue"
564
+ },
565
+ {
566
+ "type": "null"
567
+ }
568
+ ]
569
+ },
570
+ "nullableQuantity": {
571
+ "oneOf": [
572
+ {
573
+ "$ref": "#/$defs/quantity"
574
+ },
575
+ {
576
+ "type": "null"
577
+ }
578
+ ]
579
+ },
580
+ "temporalExact": {
581
+ "type": "object",
582
+ "required": [
583
+ "numerator",
584
+ "denominator",
585
+ "unit"
586
+ ],
587
+ "properties": {
588
+ "numerator": {
589
+ "type": "string",
590
+ "pattern": "^-?[0-9]+$"
591
+ },
592
+ "denominator": {
593
+ "type": "string",
594
+ "pattern": "^[1-9][0-9]*$"
595
+ },
596
+ "unit": {
597
+ "enum": [
598
+ "day",
599
+ "hour",
600
+ "point"
601
+ ]
602
+ }
603
+ },
604
+ "additionalProperties": false
605
+ },
606
+ "nullableTemporalExact": {
607
+ "oneOf": [
608
+ {
609
+ "$ref": "#/$defs/temporalExact"
610
+ },
611
+ {
612
+ "type": "null"
613
+ }
614
+ ]
615
+ },
616
+ "calendarDifference": {
617
+ "type": "object",
618
+ "required": [
619
+ "kind",
620
+ "exact"
621
+ ],
622
+ "properties": {
623
+ "kind": {
624
+ "enum": [
625
+ "calendar_days",
626
+ "si_seconds"
627
+ ]
628
+ },
629
+ "exact": {
630
+ "$ref": "#/$defs/rational"
631
+ }
632
+ },
633
+ "additionalProperties": false
634
+ },
635
+ "nullableCalendarDifference": {
636
+ "oneOf": [
637
+ {
638
+ "$ref": "#/$defs/calendarDifference"
639
+ },
640
+ {
641
+ "type": "null"
642
+ }
643
+ ]
644
+ },
645
+ "temporalCause": {
646
+ "type": "object",
647
+ "required": [
648
+ "cause",
649
+ "underlying_cause",
650
+ "subject_kind",
651
+ "subject_id",
652
+ "task_id"
653
+ ],
654
+ "properties": {
655
+ "cause": {
656
+ "enum": [
657
+ "missing_temporal_anchor",
658
+ "incomparable_temporal_kinds",
659
+ "date_anchor_has_no_clock",
660
+ "fractional_date_projection",
661
+ "calendar_range_overflow",
662
+ "exact_datetime_text_unavailable",
663
+ "complete_actual_time_unavailable",
664
+ "release_bound_unavailable",
665
+ "precedence_projection_unavailable",
666
+ "resource_projection_unavailable",
667
+ "margin_unit_unavailable"
668
+ ]
669
+ },
670
+ "underlying_cause": {
671
+ "$ref": "#/$defs/nullableString"
672
+ },
673
+ "subject_kind": {
674
+ "type": [
675
+ "string",
676
+ "null"
677
+ ],
678
+ "enum": [
679
+ "project",
680
+ "milestone",
681
+ "task",
682
+ null
683
+ ]
684
+ },
685
+ "subject_id": {
686
+ "$ref": "#/$defs/nullableString"
687
+ },
688
+ "task_id": {
689
+ "$ref": "#/$defs/nullableString"
690
+ }
691
+ },
692
+ "additionalProperties": false
693
+ },
694
+ "temporalCauses": {
695
+ "type": "array",
696
+ "items": {
697
+ "$ref": "#/$defs/temporalCause"
698
+ }
699
+ },
700
+ "temporalPoint": {
701
+ "type": "object",
702
+ "required": [
703
+ "state",
704
+ "relative",
705
+ "calendar",
706
+ "unavailable_causes"
707
+ ],
708
+ "properties": {
709
+ "state": {
710
+ "enum": [
711
+ "not_applicable",
712
+ "unavailable",
713
+ "available"
714
+ ]
715
+ },
716
+ "relative": {
717
+ "$ref": "#/$defs/nullableTemporalExact"
718
+ },
719
+ "calendar": {
720
+ "$ref": "#/$defs/nullableCalendarValue"
721
+ },
722
+ "unavailable_causes": {
723
+ "$ref": "#/$defs/temporalCauses"
724
+ }
725
+ },
726
+ "additionalProperties": false
727
+ },
728
+ "nullableTemporalPoint": {
729
+ "oneOf": [
730
+ {
731
+ "$ref": "#/$defs/temporalPoint"
732
+ },
733
+ {
734
+ "type": "null"
735
+ }
736
+ ]
737
+ },
738
+ "temporalSchedule": {
739
+ "type": "object",
740
+ "required": [
741
+ "state",
742
+ "view",
743
+ "algorithm",
744
+ "conditional_on_blocks_resolved",
745
+ "blocked_task_ids",
746
+ "unavailable_causes",
747
+ "tasks",
748
+ "milestones",
749
+ "conditional_on_suspensions_resumed",
750
+ "suspended_task_ids"
751
+ ],
752
+ "properties": {
753
+ "state": {
754
+ "enum": [
755
+ "absent",
756
+ "unavailable",
757
+ "available"
758
+ ]
759
+ },
760
+ "view": {
761
+ "enum": [
762
+ "precedence",
763
+ "resource"
764
+ ]
765
+ },
766
+ "algorithm": {
767
+ "oneOf": [
768
+ {
769
+ "type": "object",
770
+ "required": [
771
+ "id",
772
+ "version",
773
+ "optimal",
774
+ "scheduler_id",
775
+ "scheduler_version"
776
+ ],
777
+ "properties": {
778
+ "id": {
779
+ "type": "string"
780
+ },
781
+ "version": {
782
+ "type": "integer",
783
+ "minimum": 1
784
+ },
785
+ "optimal": {
786
+ "type": [
787
+ "boolean",
788
+ "null"
789
+ ]
790
+ },
791
+ "scheduler_id": {
792
+ "$ref": "#/$defs/nullableString"
793
+ },
794
+ "scheduler_version": {
795
+ "type": [
796
+ "integer",
797
+ "null"
798
+ ],
799
+ "minimum": 1
800
+ }
801
+ },
802
+ "additionalProperties": false
803
+ },
804
+ {
805
+ "type": "null"
806
+ }
807
+ ]
808
+ },
809
+ "conditional_on_blocks_resolved": {
810
+ "type": "boolean"
811
+ },
812
+ "blocked_task_ids": {
813
+ "$ref": "#/$defs/stringArray"
814
+ },
815
+ "unavailable_causes": {
816
+ "$ref": "#/$defs/temporalCauses"
817
+ },
818
+ "tasks": {
819
+ "type": "array",
820
+ "items": {
821
+ "type": "object",
822
+ "required": [
823
+ "task_id",
824
+ "declared_not_before",
825
+ "release_state",
826
+ "release_bound",
827
+ "start",
828
+ "finish",
829
+ "unavailable_causes"
830
+ ],
831
+ "properties": {
832
+ "task_id": {
833
+ "type": "string"
834
+ },
835
+ "declared_not_before": {
836
+ "$ref": "#/$defs/nullableCalendarValue"
837
+ },
838
+ "release_state": {
839
+ "enum": [
840
+ "not_applicable",
841
+ "unavailable",
842
+ "available"
843
+ ]
844
+ },
845
+ "release_bound": {
846
+ "$ref": "#/$defs/nullableTemporalExact"
847
+ },
848
+ "start": {
849
+ "$ref": "#/$defs/temporalPoint"
850
+ },
851
+ "finish": {
852
+ "$ref": "#/$defs/temporalPoint"
853
+ },
854
+ "unavailable_causes": {
855
+ "$ref": "#/$defs/temporalCauses"
856
+ }
857
+ },
858
+ "additionalProperties": false
859
+ }
860
+ },
861
+ "milestones": {
862
+ "type": "array",
863
+ "items": {
864
+ "type": "object",
865
+ "required": [
866
+ "milestone_id",
867
+ "reach",
868
+ "unavailable_causes"
869
+ ],
870
+ "properties": {
871
+ "milestone_id": {
872
+ "type": "string"
873
+ },
874
+ "reach": {
875
+ "$ref": "#/$defs/temporalPoint"
876
+ },
877
+ "unavailable_causes": {
878
+ "$ref": "#/$defs/temporalCauses"
879
+ }
880
+ },
881
+ "additionalProperties": false
882
+ }
883
+ },
884
+ "conditional_on_suspensions_resumed": {
885
+ "type": "boolean"
886
+ },
887
+ "suspended_task_ids": {
888
+ "$ref": "#/$defs/stringArray"
889
+ }
890
+ },
891
+ "additionalProperties": false
892
+ },
893
+ "deadlineView": {
894
+ "type": "object",
895
+ "required": [
896
+ "state",
897
+ "projected_completion",
898
+ "forecast_relation",
899
+ "signed_margin",
900
+ "base_unit_margin",
901
+ "remaining_margin",
902
+ "lateness",
903
+ "assessment",
904
+ "optimal",
905
+ "conditional_on_blocks_resolved",
906
+ "blocked_task_ids",
907
+ "unavailable_causes"
908
+ ],
909
+ "properties": {
910
+ "state": {
911
+ "enum": [
912
+ "not_applicable",
913
+ "unavailable",
914
+ "available"
915
+ ]
916
+ },
917
+ "projected_completion": {
918
+ "$ref": "#/$defs/nullableCalendarValue"
919
+ },
920
+ "forecast_relation": {
921
+ "type": [
922
+ "string",
923
+ "null"
924
+ ],
925
+ "enum": [
926
+ "before_deadline",
927
+ "on_deadline",
928
+ "after_deadline",
929
+ null
930
+ ]
931
+ },
932
+ "signed_margin": {
933
+ "$ref": "#/$defs/nullableCalendarDifference"
934
+ },
935
+ "base_unit_margin": {
936
+ "$ref": "#/$defs/nullableTemporalExact"
937
+ },
938
+ "remaining_margin": {
939
+ "$ref": "#/$defs/nullableTemporalExact"
940
+ },
941
+ "lateness": {
942
+ "$ref": "#/$defs/nullableTemporalExact"
943
+ },
944
+ "assessment": {
945
+ "type": [
946
+ "string",
947
+ "null"
948
+ ],
949
+ "enum": [
950
+ "lower_bound_on_time",
951
+ "lower_bound_late",
952
+ "heuristic_on_time",
953
+ "heuristic_late",
954
+ null
955
+ ]
956
+ },
957
+ "optimal": {
958
+ "type": [
959
+ "boolean",
960
+ "null"
961
+ ]
962
+ },
963
+ "conditional_on_blocks_resolved": {
964
+ "type": "boolean"
965
+ },
966
+ "blocked_task_ids": {
967
+ "$ref": "#/$defs/stringArray"
968
+ },
969
+ "unavailable_causes": {
970
+ "$ref": "#/$defs/temporalCauses"
971
+ }
972
+ },
973
+ "additionalProperties": false
974
+ },
975
+ "deadlineEvaluation": {
976
+ "type": "object",
977
+ "required": [
978
+ "subject",
979
+ "deadline",
980
+ "completion_state",
981
+ "current",
982
+ "precedence",
983
+ "resource",
984
+ "combined_assessment",
985
+ "conditional_on_blocks_resolved",
986
+ "blocked_task_ids",
987
+ "destination_relationship",
988
+ "conditional_on_suspensions_resumed",
989
+ "suspended_task_ids"
990
+ ],
991
+ "properties": {
992
+ "subject": {
993
+ "type": "object",
994
+ "required": [
995
+ "kind",
996
+ "id",
997
+ "roles"
998
+ ],
999
+ "properties": {
1000
+ "kind": {
1001
+ "enum": [
1002
+ "task",
1003
+ "milestone"
1004
+ ]
1005
+ },
1006
+ "id": {
1007
+ "type": "string"
1008
+ },
1009
+ "roles": {
1010
+ "type": "array",
1011
+ "items": {
1012
+ "enum": [
1013
+ "task",
1014
+ "milestone",
1015
+ "project_finish"
1016
+ ]
1017
+ }
1018
+ }
1019
+ },
1020
+ "additionalProperties": false
1021
+ },
1022
+ "deadline": {
1023
+ "$ref": "#/$defs/calendarValue"
1024
+ },
1025
+ "completion_state": {
1026
+ "enum": [
1027
+ "incomplete",
1028
+ "complete_actual_time_unavailable"
1029
+ ]
1030
+ },
1031
+ "current": {
1032
+ "type": "object",
1033
+ "required": [
1034
+ "state",
1035
+ "signed_window",
1036
+ "base_unit_window",
1037
+ "unavailable_causes"
1038
+ ],
1039
+ "properties": {
1040
+ "state": {
1041
+ "enum": [
1042
+ "not_due",
1043
+ "due_now",
1044
+ "overdue",
1045
+ "not_applicable",
1046
+ "unavailable"
1047
+ ]
1048
+ },
1049
+ "signed_window": {
1050
+ "$ref": "#/$defs/nullableCalendarDifference"
1051
+ },
1052
+ "base_unit_window": {
1053
+ "$ref": "#/$defs/nullableTemporalExact"
1054
+ },
1055
+ "unavailable_causes": {
1056
+ "$ref": "#/$defs/temporalCauses"
1057
+ }
1058
+ },
1059
+ "additionalProperties": false
1060
+ },
1061
+ "precedence": {
1062
+ "$ref": "#/$defs/deadlineView"
1063
+ },
1064
+ "resource": {
1065
+ "$ref": "#/$defs/deadlineView"
1066
+ },
1067
+ "combined_assessment": {
1068
+ "enum": [
1069
+ "overdue",
1070
+ "forecast_infeasible",
1071
+ "at_risk",
1072
+ "forecast_on_time",
1073
+ "not_proven_late",
1074
+ "not_applicable",
1075
+ "unavailable"
1076
+ ]
1077
+ },
1078
+ "conditional_on_blocks_resolved": {
1079
+ "type": "boolean"
1080
+ },
1081
+ "blocked_task_ids": {
1082
+ "$ref": "#/$defs/stringArray"
1083
+ },
1084
+ "destination_relationship": {
1085
+ "oneOf": [
1086
+ {
1087
+ "type": "object",
1088
+ "required": [
1089
+ "milestone_id",
1090
+ "relation"
1091
+ ],
1092
+ "properties": {
1093
+ "milestone_id": {
1094
+ "type": "string"
1095
+ },
1096
+ "relation": {
1097
+ "enum": [
1098
+ "task_deadline_before_milestone",
1099
+ "same_deadline",
1100
+ "task_deadline_after_milestone",
1101
+ "unavailable",
1102
+ "deadline_absent"
1103
+ ]
1104
+ }
1105
+ },
1106
+ "additionalProperties": false
1107
+ },
1108
+ {
1109
+ "type": "null"
1110
+ }
1111
+ ]
1112
+ },
1113
+ "conditional_on_suspensions_resumed": {
1114
+ "type": "boolean"
1115
+ },
1116
+ "suspended_task_ids": {
1117
+ "$ref": "#/$defs/stringArray"
1118
+ }
1119
+ },
1120
+ "additionalProperties": false
1121
+ },
1122
+ "temporalAnalysis": {
1123
+ "type": "object",
1124
+ "required": [
1125
+ "interface",
1126
+ "calendar",
1127
+ "deadline",
1128
+ "anchor",
1129
+ "precedence",
1130
+ "resource",
1131
+ "deadline_evaluations"
1132
+ ],
1133
+ "properties": {
1134
+ "interface": {
1135
+ "type": "object",
1136
+ "required": [
1137
+ "id",
1138
+ "version"
1139
+ ],
1140
+ "properties": {
1141
+ "id": {
1142
+ "const": "perttool.temporal-unit-interface"
1143
+ },
1144
+ "version": {
1145
+ "const": 2
1146
+ }
1147
+ },
1148
+ "additionalProperties": false
1149
+ },
1150
+ "calendar": {
1151
+ "type": "object",
1152
+ "required": [
1153
+ "id",
1154
+ "version",
1155
+ "profile_id",
1156
+ "profile_version"
1157
+ ],
1158
+ "properties": {
1159
+ "id": {
1160
+ "const": "perttool.calendar-projection"
1161
+ },
1162
+ "version": {
1163
+ "const": 1
1164
+ },
1165
+ "profile_id": {
1166
+ "const": "perttool.calendar.continuous-fixed-offset"
1167
+ },
1168
+ "profile_version": {
1169
+ "const": 1
1170
+ }
1171
+ },
1172
+ "additionalProperties": false
1173
+ },
1174
+ "deadline": {
1175
+ "type": "object",
1176
+ "required": [
1177
+ "id",
1178
+ "version"
1179
+ ],
1180
+ "properties": {
1181
+ "id": {
1182
+ "const": "perttool.deadline-evaluation"
1183
+ },
1184
+ "version": {
1185
+ "const": 1
1186
+ }
1187
+ },
1188
+ "additionalProperties": false
1189
+ },
1190
+ "anchor": {
1191
+ "$ref": "#/$defs/nullableCalendarValue"
1192
+ },
1193
+ "precedence": {
1194
+ "$ref": "#/$defs/temporalSchedule"
1195
+ },
1196
+ "resource": {
1197
+ "$ref": "#/$defs/temporalSchedule"
1198
+ },
1199
+ "deadline_evaluations": {
1200
+ "type": "array",
1201
+ "items": {
1202
+ "$ref": "#/$defs/deadlineEvaluation"
1203
+ }
1204
+ }
1205
+ },
1206
+ "additionalProperties": false
1207
+ },
1208
+ "historyCause": {
1209
+ "type": "object",
1210
+ "required": [
1211
+ "cause",
1212
+ "commit_id",
1213
+ "task_id",
1214
+ "event_id"
1215
+ ],
1216
+ "properties": {
1217
+ "cause": {
1218
+ "enum": [
1219
+ "no_repository",
1220
+ "no_head",
1221
+ "unknown_revision",
1222
+ "untracked_target",
1223
+ "ambiguous_path",
1224
+ "shallow_boundary",
1225
+ "unsupported_rename",
1226
+ "unsupported_source_version",
1227
+ "task_identity_replaced",
1228
+ "event_payload_changed",
1229
+ "duplicate_event_identity",
1230
+ "head_changed",
1231
+ "target_changed"
1232
+ ]
1233
+ },
1234
+ "commit_id": {
1235
+ "$ref": "#/$defs/nullableString"
1236
+ },
1237
+ "task_id": {
1238
+ "$ref": "#/$defs/nullableString"
1239
+ },
1240
+ "event_id": {
1241
+ "$ref": "#/$defs/nullableString"
1242
+ }
1243
+ },
1244
+ "additionalProperties": false
1245
+ },
1246
+ "actualsCause": {
1247
+ "type": "object",
1248
+ "required": [
1249
+ "cause",
1250
+ "commit_id",
1251
+ "task_id",
1252
+ "event_id"
1253
+ ],
1254
+ "properties": {
1255
+ "cause": {
1256
+ "enum": [
1257
+ "missing_start",
1258
+ "missing_finish",
1259
+ "open_suspension",
1260
+ "missing_baseline",
1261
+ "active_time_absent",
1262
+ "effort_absent",
1263
+ "history_incomplete",
1264
+ "history_unavailable"
1265
+ ]
1266
+ },
1267
+ "commit_id": {
1268
+ "$ref": "#/$defs/nullableString"
1269
+ },
1270
+ "task_id": {
1271
+ "$ref": "#/$defs/nullableString"
1272
+ },
1273
+ "event_id": {
1274
+ "$ref": "#/$defs/nullableString"
1275
+ }
1276
+ },
1277
+ "additionalProperties": false
1278
+ },
1279
+ "historyMetadata": {
1280
+ "type": "object",
1281
+ "required": [
1282
+ "id",
1283
+ "version",
1284
+ "status",
1285
+ "traversal",
1286
+ "repository_snapshot_id",
1287
+ "repository_relative_path",
1288
+ "requested_revision",
1289
+ "resolved_revision",
1290
+ "source_digest",
1291
+ "inspected_commit_ids",
1292
+ "unavailable_causes"
1293
+ ],
1294
+ "properties": {
1295
+ "id": {
1296
+ "const": "perttool.project-history"
1297
+ },
1298
+ "version": {
1299
+ "const": 1
1300
+ },
1301
+ "status": {
1302
+ "enum": [
1303
+ "complete",
1304
+ "incomplete",
1305
+ "unavailable"
1306
+ ]
1307
+ },
1308
+ "traversal": {
1309
+ "const": "first_parent"
1310
+ },
1311
+ "repository_snapshot_id": {
1312
+ "$ref": "#/$defs/nullableString"
1313
+ },
1314
+ "repository_relative_path": {
1315
+ "$ref": "#/$defs/nullableString"
1316
+ },
1317
+ "requested_revision": {
1318
+ "type": "string"
1319
+ },
1320
+ "resolved_revision": {
1321
+ "$ref": "#/$defs/nullableString"
1322
+ },
1323
+ "source_digest": {
1324
+ "$ref": "#/$defs/nullableDigest"
1325
+ },
1326
+ "inspected_commit_ids": {
1327
+ "$ref": "#/$defs/stringArray"
1328
+ },
1329
+ "unavailable_causes": {
1330
+ "type": "array",
1331
+ "items": {
1332
+ "$ref": "#/$defs/historyCause"
1333
+ }
1334
+ }
1335
+ },
1336
+ "additionalProperties": false
1337
+ },
1338
+ "recommendationEntity": {
1339
+ "type": "object",
1340
+ "required": [
1341
+ "kind",
1342
+ "id"
1343
+ ],
1344
+ "properties": {
1345
+ "kind": {
1346
+ "enum": [
1347
+ "project",
1348
+ "task",
1349
+ "milestone",
1350
+ "gate",
1351
+ "resource",
1352
+ "policy_rule",
1353
+ "ranking_factor",
1354
+ "negative_fact_kind",
1355
+ "derived_set"
1356
+ ]
1357
+ },
1358
+ "id": {
1359
+ "type": "string"
1360
+ }
1361
+ },
1362
+ "additionalProperties": false
1363
+ },
1364
+ "recommendationScalarValue": {
1365
+ "oneOf": [
1366
+ {
1367
+ "type": "object",
1368
+ "required": [
1369
+ "type",
1370
+ "value"
1371
+ ],
1372
+ "properties": {
1373
+ "type": {
1374
+ "const": "boolean"
1375
+ },
1376
+ "value": {
1377
+ "type": "boolean"
1378
+ }
1379
+ },
1380
+ "additionalProperties": false
1381
+ },
1382
+ {
1383
+ "type": "object",
1384
+ "required": [
1385
+ "type",
1386
+ "value"
1387
+ ],
1388
+ "properties": {
1389
+ "type": {
1390
+ "const": "integer"
1391
+ },
1392
+ "value": {
1393
+ "type": "string",
1394
+ "pattern": "^-?[0-9]+$"
1395
+ }
1396
+ },
1397
+ "additionalProperties": false
1398
+ },
1399
+ {
1400
+ "type": "object",
1401
+ "required": [
1402
+ "type",
1403
+ "numerator",
1404
+ "denominator"
1405
+ ],
1406
+ "properties": {
1407
+ "type": {
1408
+ "const": "rational"
1409
+ },
1410
+ "numerator": {
1411
+ "type": "string",
1412
+ "pattern": "^-?[0-9]+$"
1413
+ },
1414
+ "denominator": {
1415
+ "type": "string",
1416
+ "pattern": "^[1-9][0-9]*$"
1417
+ }
1418
+ },
1419
+ "additionalProperties": false
1420
+ },
1421
+ {
1422
+ "type": "object",
1423
+ "required": [
1424
+ "type",
1425
+ "enum_type",
1426
+ "value"
1427
+ ],
1428
+ "properties": {
1429
+ "type": {
1430
+ "const": "enum"
1431
+ },
1432
+ "enum_type": {
1433
+ "type": "string"
1434
+ },
1435
+ "value": {
1436
+ "type": "string"
1437
+ }
1438
+ },
1439
+ "additionalProperties": false
1440
+ },
1441
+ {
1442
+ "type": "object",
1443
+ "required": [
1444
+ "type",
1445
+ "value"
1446
+ ],
1447
+ "properties": {
1448
+ "type": {
1449
+ "const": "entity"
1450
+ },
1451
+ "value": {
1452
+ "$ref": "#/$defs/recommendationEntity"
1453
+ }
1454
+ },
1455
+ "additionalProperties": false
1456
+ }
1457
+ ]
1458
+ },
1459
+ "recommendationValue": {
1460
+ "oneOf": [
1461
+ {
1462
+ "$ref": "#/$defs/recommendationScalarValue"
1463
+ },
1464
+ {
1465
+ "type": "object",
1466
+ "required": [
1467
+ "type",
1468
+ "item_type",
1469
+ "items"
1470
+ ],
1471
+ "properties": {
1472
+ "type": {
1473
+ "enum": [
1474
+ "list",
1475
+ "set"
1476
+ ]
1477
+ },
1478
+ "item_type": {
1479
+ "type": "string"
1480
+ },
1481
+ "items": {
1482
+ "type": "array",
1483
+ "items": {
1484
+ "$ref": "#/$defs/recommendationScalarValue"
1485
+ }
1486
+ }
1487
+ },
1488
+ "additionalProperties": false
1489
+ },
1490
+ {
1491
+ "type": "object",
1492
+ "required": [
1493
+ "type",
1494
+ "key_type",
1495
+ "value_type",
1496
+ "entries"
1497
+ ],
1498
+ "properties": {
1499
+ "type": {
1500
+ "const": "map"
1501
+ },
1502
+ "key_type": {
1503
+ "type": "string"
1504
+ },
1505
+ "value_type": {
1506
+ "type": "string"
1507
+ },
1508
+ "entries": {
1509
+ "type": "array",
1510
+ "items": {
1511
+ "type": "object",
1512
+ "required": [
1513
+ "key",
1514
+ "value"
1515
+ ],
1516
+ "properties": {
1517
+ "key": {
1518
+ "$ref": "#/$defs/recommendationScalarValue"
1519
+ },
1520
+ "value": {
1521
+ "$ref": "#/$defs/recommendationScalarValue"
1522
+ }
1523
+ },
1524
+ "additionalProperties": false
1525
+ }
1526
+ }
1527
+ },
1528
+ "additionalProperties": false
1529
+ }
1530
+ ]
1531
+ },
1532
+ "recommendationUnit": {
1533
+ "oneOf": [
1534
+ {
1535
+ "type": "object",
1536
+ "required": [
1537
+ "kind",
1538
+ "value"
1539
+ ],
1540
+ "properties": {
1541
+ "kind": {
1542
+ "const": "duration"
1543
+ },
1544
+ "value": {
1545
+ "enum": [
1546
+ "day",
1547
+ "hour",
1548
+ "point"
1549
+ ]
1550
+ }
1551
+ },
1552
+ "additionalProperties": false
1553
+ },
1554
+ {
1555
+ "type": "object",
1556
+ "required": [
1557
+ "kind",
1558
+ "resource"
1559
+ ],
1560
+ "properties": {
1561
+ "kind": {
1562
+ "const": "resource"
1563
+ },
1564
+ "resource": {
1565
+ "$ref": "#/$defs/recommendationEntity"
1566
+ }
1567
+ },
1568
+ "additionalProperties": false
1569
+ },
1570
+ {
1571
+ "type": "object",
1572
+ "required": [
1573
+ "kind"
1574
+ ],
1575
+ "properties": {
1576
+ "kind": {
1577
+ "const": "ratio"
1578
+ }
1579
+ },
1580
+ "additionalProperties": false
1581
+ }
1582
+ ]
1583
+ },
1584
+ "nullableRecommendationUnit": {
1585
+ "oneOf": [
1586
+ {
1587
+ "$ref": "#/$defs/recommendationUnit"
1588
+ },
1589
+ {
1590
+ "type": "null"
1591
+ }
1592
+ ]
1593
+ },
1594
+ "recommendationExpressionTerm": {
1595
+ "oneOf": [
1596
+ {
1597
+ "type": "object",
1598
+ "required": [
1599
+ "kind",
1600
+ "fact_id"
1601
+ ],
1602
+ "properties": {
1603
+ "kind": {
1604
+ "const": "fact"
1605
+ },
1606
+ "fact_id": {
1607
+ "type": "string"
1608
+ }
1609
+ },
1610
+ "additionalProperties": false
1611
+ },
1612
+ {
1613
+ "type": "object",
1614
+ "required": [
1615
+ "kind",
1616
+ "value",
1617
+ "unit"
1618
+ ],
1619
+ "properties": {
1620
+ "kind": {
1621
+ "const": "literal"
1622
+ },
1623
+ "value": {
1624
+ "$ref": "#/$defs/recommendationValue"
1625
+ },
1626
+ "unit": {
1627
+ "$ref": "#/$defs/nullableRecommendationUnit"
1628
+ }
1629
+ },
1630
+ "additionalProperties": false
1631
+ }
1632
+ ]
1633
+ },
1634
+ "recommendationExpression": {
1635
+ "oneOf": [
1636
+ {
1637
+ "type": "object",
1638
+ "required": [
1639
+ "kind",
1640
+ "left",
1641
+ "relation",
1642
+ "right"
1643
+ ],
1644
+ "properties": {
1645
+ "kind": {
1646
+ "const": "compare"
1647
+ },
1648
+ "left": {
1649
+ "$ref": "#/$defs/recommendationExpressionTerm"
1650
+ },
1651
+ "relation": {
1652
+ "enum": [
1653
+ "equal",
1654
+ "not_equal",
1655
+ "less_than",
1656
+ "less_or_equal",
1657
+ "greater_than",
1658
+ "greater_or_equal",
1659
+ "contains"
1660
+ ]
1661
+ },
1662
+ "right": {
1663
+ "$ref": "#/$defs/recommendationExpressionTerm"
1664
+ }
1665
+ },
1666
+ "additionalProperties": false
1667
+ },
1668
+ {
1669
+ "type": "object",
1670
+ "required": [
1671
+ "kind",
1672
+ "children"
1673
+ ],
1674
+ "properties": {
1675
+ "kind": {
1676
+ "enum": [
1677
+ "all",
1678
+ "any"
1679
+ ]
1680
+ },
1681
+ "children": {
1682
+ "type": "array",
1683
+ "items": {
1684
+ "$ref": "#/$defs/recommendationExpression"
1685
+ }
1686
+ }
1687
+ },
1688
+ "additionalProperties": false
1689
+ }
1690
+ ]
1691
+ },
1692
+ "governanceDecision": {
1693
+ "type": "object",
1694
+ "required": [
1695
+ "schema_version",
1696
+ "governance_interface_version",
1697
+ "governance_source_contract_version",
1698
+ "governance_semantics_version",
1699
+ "source_digest",
1700
+ "intent",
1701
+ "applicable",
1702
+ "actor",
1703
+ "accepted_by_owner",
1704
+ "affected_scopes",
1705
+ "required_owner_confirmations",
1706
+ "owner_confirmation_required",
1707
+ "write_authorized",
1708
+ "scopes"
1709
+ ],
1710
+ "properties": {
1711
+ "schema_version": {
1712
+ "const": "Perttool.GovernanceDecision.v1"
1713
+ },
1714
+ "governance_interface_version": {
1715
+ "const": 1
1716
+ },
1717
+ "governance_source_contract_version": {
1718
+ "const": 1
1719
+ },
1720
+ "governance_semantics_version": {
1721
+ "const": 1
1722
+ },
1723
+ "source_digest": {
1724
+ "$ref": "#/$defs/digest"
1725
+ },
1726
+ "intent": {
1727
+ "enum": [
1728
+ "preview",
1729
+ "persist"
1730
+ ]
1731
+ },
1732
+ "applicable": {
1733
+ "type": "boolean"
1734
+ },
1735
+ "actor": {
1736
+ "$ref": "#/$defs/nullableString"
1737
+ },
1738
+ "accepted_by_owner": {
1739
+ "$ref": "#/$defs/stringArray"
1740
+ },
1741
+ "affected_scopes": {
1742
+ "$ref": "#/$defs/stringArray"
1743
+ },
1744
+ "required_owner_confirmations": {
1745
+ "$ref": "#/$defs/stringArray"
1746
+ },
1747
+ "owner_confirmation_required": {
1748
+ "type": "boolean"
1749
+ },
1750
+ "write_authorized": {
1751
+ "type": "boolean"
1752
+ },
1753
+ "scopes": {
1754
+ "type": "array",
1755
+ "items": {
1756
+ "$ref": "#/$defs/governanceScopeDecision"
1757
+ }
1758
+ }
1759
+ },
1760
+ "additionalProperties": false
1761
+ },
1762
+ "governanceScopeDecision": {
1763
+ "type": "object",
1764
+ "required": [
1765
+ "scope",
1766
+ "required_owner",
1767
+ "effective_delegates",
1768
+ "actor_direct",
1769
+ "owner_confirmation_required",
1770
+ "owner_confirmation_present",
1771
+ "scope_authorized",
1772
+ "denial_cause"
1773
+ ],
1774
+ "properties": {
1775
+ "scope": {
1776
+ "enum": [
1777
+ "goal",
1778
+ "dag"
1779
+ ]
1780
+ },
1781
+ "required_owner": {
1782
+ "type": "string"
1783
+ },
1784
+ "effective_delegates": {
1785
+ "$ref": "#/$defs/stringArray"
1786
+ },
1787
+ "actor_direct": {
1788
+ "type": "boolean"
1789
+ },
1790
+ "owner_confirmation_required": {
1791
+ "type": "boolean"
1792
+ },
1793
+ "owner_confirmation_present": {
1794
+ "type": "boolean"
1795
+ },
1796
+ "scope_authorized": {
1797
+ "type": "boolean"
1798
+ },
1799
+ "denial_cause": {
1800
+ "type": [
1801
+ "string",
1802
+ "null"
1803
+ ],
1804
+ "enum": [
1805
+ "actor_required",
1806
+ "owner_confirmation_required",
1807
+ "owner_confirmation_mismatch",
1808
+ null
1809
+ ]
1810
+ }
1811
+ },
1812
+ "additionalProperties": false
1813
+ },
1814
+ "capacityOverrides": {
1815
+ "type": "array",
1816
+ "items": {
1817
+ "type": "object",
1818
+ "required": [
1819
+ "resource_id",
1820
+ "capacity"
1821
+ ],
1822
+ "properties": {
1823
+ "resource_id": {
1824
+ "type": "string"
1825
+ },
1826
+ "capacity": {
1827
+ "type": "integer",
1828
+ "minimum": 1
1829
+ }
1830
+ },
1831
+ "additionalProperties": false
1832
+ }
1833
+ },
1834
+ "lossReport": {
1835
+ "type": "object",
1836
+ "required": [
1837
+ "lossless",
1838
+ "records"
1839
+ ],
1840
+ "properties": {
1841
+ "lossless": {
1842
+ "type": "boolean"
1843
+ },
1844
+ "records": {
1845
+ "type": "array",
1846
+ "items": {
1847
+ "$ref": "#/$defs/conversionLoss"
1848
+ }
1849
+ }
1850
+ },
1851
+ "additionalProperties": false
1852
+ },
1853
+ "conversionLoss": {
1854
+ "type": "object",
1855
+ "required": [
1856
+ "code",
1857
+ "severity",
1858
+ "message",
1859
+ "element_id",
1860
+ "span",
1861
+ "lossy"
1862
+ ],
1863
+ "properties": {
1864
+ "code": {
1865
+ "type": "string"
1866
+ },
1867
+ "severity": {
1868
+ "const": "warning"
1869
+ },
1870
+ "message": {
1871
+ "type": "string"
1872
+ },
1873
+ "element_id": {
1874
+ "$ref": "#/$defs/nullableString"
1875
+ },
1876
+ "span": {
1877
+ "oneOf": [
1878
+ {
1879
+ "$ref": "#/$defs/span"
1880
+ },
1881
+ {
1882
+ "type": "null"
1883
+ }
1884
+ ]
1885
+ },
1886
+ "lossy": {
1887
+ "type": "boolean"
1888
+ }
1889
+ },
1890
+ "additionalProperties": false
1891
+ }
1892
+ }
1893
+ }