perttool 0.5.1 → 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 (32) hide show
  1. package/CHANGELOG.md +20 -1
  2. package/README.md +40 -25
  3. package/dist/cli.js +18 -1
  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 +25 -3
  7. package/dist/command/actuals-discovery.js.map +1 -1
  8. package/dist/index.d.ts +1 -1
  9. package/dist/index.d.ts.map +1 -1
  10. package/dist/index.js.map +1 -1
  11. package/dist/schema/registry.d.ts +19 -2
  12. package/dist/schema/registry.d.ts.map +1 -1
  13. package/dist/schema/registry.js +194 -4
  14. package/dist/schema/registry.js.map +1 -1
  15. package/dist/version.d.ts +1 -1
  16. package/dist/version.js +1 -1
  17. package/package.json +1 -1
  18. package/schemas/Perttool.AgentGuidanceResult.v1.schema.json +461 -6
  19. package/schemas/Perttool.AnalysisResult.v4.schema.json +685 -19
  20. package/schemas/Perttool.CheckResult.v3.schema.json +46 -2
  21. package/schemas/Perttool.CliError.v1.schema.json +40 -4
  22. package/schemas/Perttool.CommandHelpResult.v1.schema.json +218 -6
  23. package/schemas/Perttool.Common.v1.schema.json +1460 -75
  24. package/schemas/Perttool.GuideResult.v1.schema.json +36 -2
  25. package/schemas/Perttool.MutationResult.v3.schema.json +57 -6
  26. package/schemas/Perttool.NextResult.v5.schema.json +1137 -12
  27. package/schemas/Perttool.OverrideDecision.v1.schema.json +236 -4
  28. package/schemas/Perttool.ProjectHistoryResult.v1.schema.json +204 -60
  29. package/schemas/Perttool.ProjectResult.v3.schema.json +74 -1
  30. package/schemas/Perttool.SchemaResult.v1.schema.json +56 -3
  31. package/schemas/Perttool.UnitMigrationResult.v3.schema.json +152 -14
  32. package/schemas/Perttool.VelocityObservationResult.v1.schema.json +201 -2
@@ -23,6 +23,37 @@
23
23
  "null"
24
24
  ]
25
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
+ },
26
57
  "stringArray": {
27
58
  "type": "array",
28
59
  "items": {
@@ -83,7 +114,8 @@
83
114
  "severity": {
84
115
  "enum": [
85
116
  "error",
86
- "warning"
117
+ "warning",
118
+ "info"
87
119
  ]
88
120
  },
89
121
  "message": {
@@ -105,7 +137,7 @@
105
137
  "related": {
106
138
  "type": "array",
107
139
  "items": {
108
- "type": "object"
140
+ "$ref": "#/$defs/relatedLocation"
109
141
  }
110
142
  },
111
143
  "help_topic": {
@@ -119,12 +151,10 @@
119
151
  },
120
152
  "fixes": {
121
153
  "type": "array",
122
- "items": {
123
- "type": "object"
124
- }
154
+ "maxItems": 0
125
155
  },
126
156
  "data": {
127
- "type": "object"
157
+ "$ref": "#/$defs/jsonObject"
128
158
  },
129
159
  "provider_id": {
130
160
  "$ref": "#/$defs/nullableString"
@@ -135,6 +165,22 @@
135
165
  },
136
166
  "additionalProperties": false
137
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
+ },
138
184
  "diagnostics": {
139
185
  "type": "array",
140
186
  "items": {
@@ -235,6 +281,122 @@
235
281
  },
236
282
  "additionalProperties": false
237
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
+ },
238
400
  "calendarValue": {
239
401
  "oneOf": [
240
402
  {
@@ -395,100 +557,1284 @@
395
557
  },
396
558
  "additionalProperties": false
397
559
  },
398
- "governanceDecision": {
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": {
399
581
  "type": "object",
400
582
  "required": [
401
- "schema_version",
402
- "governance_interface_version",
403
- "governance_source_contract_version",
404
- "governance_semantics_version",
405
- "source_digest",
406
- "intent",
407
- "applicable",
408
- "actor",
409
- "accepted_by_owner",
410
- "affected_scopes",
411
- "required_owner_confirmations",
412
- "owner_confirmation_required",
413
- "write_authorized",
414
- "scopes"
583
+ "numerator",
584
+ "denominator",
585
+ "unit"
415
586
  ],
416
587
  "properties": {
417
- "schema_version": {
418
- "const": "Perttool.GovernanceDecision.v1"
588
+ "numerator": {
589
+ "type": "string",
590
+ "pattern": "^-?[0-9]+$"
419
591
  },
420
- "governance_interface_version": {
421
- "const": 1
592
+ "denominator": {
593
+ "type": "string",
594
+ "pattern": "^[1-9][0-9]*$"
422
595
  },
423
- "governance_source_contract_version": {
424
- "const": 1
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"
425
610
  },
426
- "governance_semantics_version": {
427
- "const": 1
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
+ ]
428
628
  },
429
- "source_digest": {
430
- "$ref": "#/$defs/digest"
629
+ "exact": {
630
+ "$ref": "#/$defs/rational"
631
+ }
632
+ },
633
+ "additionalProperties": false
634
+ },
635
+ "nullableCalendarDifference": {
636
+ "oneOf": [
637
+ {
638
+ "$ref": "#/$defs/calendarDifference"
431
639
  },
432
- "intent": {
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": {
433
656
  "enum": [
434
- "preview",
435
- "persist"
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"
436
668
  ]
437
669
  },
438
- "applicable": {
439
- "type": "boolean"
440
- },
441
- "actor": {
670
+ "underlying_cause": {
442
671
  "$ref": "#/$defs/nullableString"
443
672
  },
444
- "accepted_by_owner": {
445
- "$ref": "#/$defs/stringArray"
446
- },
447
- "affected_scopes": {
448
- "$ref": "#/$defs/stringArray"
449
- },
450
- "required_owner_confirmations": {
451
- "$ref": "#/$defs/stringArray"
452
- },
453
- "owner_confirmation_required": {
454
- "type": "boolean"
673
+ "subject_kind": {
674
+ "type": [
675
+ "string",
676
+ "null"
677
+ ],
678
+ "enum": [
679
+ "project",
680
+ "milestone",
681
+ "task",
682
+ null
683
+ ]
455
684
  },
456
- "write_authorized": {
457
- "type": "boolean"
685
+ "subject_id": {
686
+ "$ref": "#/$defs/nullableString"
458
687
  },
459
- "scopes": {
460
- "type": "array",
461
- "items": {
462
- "type": "object"
463
- }
688
+ "task_id": {
689
+ "$ref": "#/$defs/nullableString"
464
690
  }
465
691
  },
466
692
  "additionalProperties": false
467
693
  },
468
- "capacityOverrides": {
694
+ "temporalCauses": {
469
695
  "type": "array",
470
696
  "items": {
471
- "type": "object",
472
- "required": [
473
- "resource_id",
474
- "capacity"
475
- ],
476
- "properties": {
477
- "resource_id": {
478
- "type": "string"
479
- },
480
- "capacity": {
481
- "type": "integer",
482
- "minimum": 1
483
- }
484
- },
485
- "additionalProperties": false
697
+ "$ref": "#/$defs/temporalCause"
486
698
  }
487
699
  },
488
- "lossReport": {
700
+ "temporalPoint": {
489
701
  "type": "object",
490
702
  "required": [
491
- "lossless",
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",
492
1838
  "records"
493
1839
  ],
494
1840
  "properties": {
@@ -498,11 +1844,50 @@
498
1844
  "records": {
499
1845
  "type": "array",
500
1846
  "items": {
501
- "type": "object"
1847
+ "$ref": "#/$defs/conversionLoss"
502
1848
  }
503
1849
  }
504
1850
  },
505
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
506
1891
  }
507
1892
  }
508
1893
  }