jg-agent-hq 0.1.0 → 0.3.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.
- package/CHANGELOG.md +11 -0
- package/README.md +6 -3
- package/api/README.md +12 -6
- package/dist/contracts/actions/types.d.ts +11 -11
- package/dist/contracts/actions/types.js +1 -1
- package/dist/contracts/handoffs/types.d.ts +14 -14
- package/dist/contracts/index.d.ts +2 -2
- package/dist/contracts/index.js +1 -1
- package/dist/contracts/plans/index.d.ts +2 -2
- package/dist/contracts/plans/index.js +1 -1
- package/dist/contracts/plans/types.d.ts +83 -25
- package/dist/contracts/plans/types.js +27 -10
- package/dist/contracts/types.d.ts +72 -66
- package/dist/handoffs/types.d.ts +14 -14
- package/dist/plans/admission.d.ts +4 -4
- package/dist/plans/admission.js +24 -16
- package/dist/plans/authority.d.ts +6 -0
- package/dist/plans/authority.js +40 -8
- package/dist/plans/files.js +1 -0
- package/dist/plans/finalization.d.ts +1 -1
- package/dist/plans/finalization.js +4 -3
- package/dist/plans/plans.d.ts +5 -5
- package/dist/plans/plans.js +9 -11
- package/dist/plans/reconciliation.js +3 -3
- package/dist/plans/revisions.d.ts +2 -2
- package/dist/plans/revisions.js +21 -3
- package/dist/plans/types.d.ts +4 -4
- package/dist/providers/claude/control/control.d.ts +1 -1
- package/dist/providers/claude/history/types.d.ts +24 -21
- package/dist/store/control/types.d.ts +22 -22
- package/dist/store/plans/plans.model.d.ts +2 -2
- package/dist/store/plans/plans.model.js +1 -1
- package/dist/store/schema.sql +5 -2
- package/dist/store/types.d.ts +80 -80
- package/errors/README.md +9 -1
- package/package.json +1 -1
|
@@ -81,7 +81,7 @@ export declare const PlanCompletionSchema: z.ZodObject<{
|
|
|
81
81
|
reference: z.ZodString;
|
|
82
82
|
}, z.core.$strict>;
|
|
83
83
|
}, z.core.$strict>;
|
|
84
|
-
milestoneId: z.ZodUUID
|
|
84
|
+
milestoneId: z.ZodNullable<z.ZodUUID>;
|
|
85
85
|
revision: z.ZodObject<{
|
|
86
86
|
planDigest: z.ZodString;
|
|
87
87
|
breakdownDigest: z.ZodNullable<z.ZodString>;
|
|
@@ -89,7 +89,7 @@ export declare const PlanCompletionSchema: z.ZodObject<{
|
|
|
89
89
|
contractDigest: z.ZodString;
|
|
90
90
|
title: z.ZodString;
|
|
91
91
|
contract: z.ZodString;
|
|
92
|
-
sharedDigest: z.ZodString
|
|
92
|
+
sharedDigest: z.ZodNullable<z.ZodString>;
|
|
93
93
|
checkouts: z.ZodArray<z.ZodObject<{
|
|
94
94
|
repository: z.ZodString;
|
|
95
95
|
directory: z.ZodString;
|
|
@@ -128,7 +128,7 @@ export declare const PlanCheckpointSchema: z.ZodObject<{
|
|
|
128
128
|
breakdownDigest: z.ZodNullable<z.ZodString>;
|
|
129
129
|
}, z.core.$strict>;
|
|
130
130
|
plan: z.ZodString;
|
|
131
|
-
milestones: z.ZodString
|
|
131
|
+
milestones: z.ZodNullable<z.ZodString>;
|
|
132
132
|
entries: z.ZodArray<z.ZodObject<{
|
|
133
133
|
ordinal: z.ZodNumber;
|
|
134
134
|
title: z.ZodString;
|
|
@@ -192,7 +192,7 @@ export declare const PlanProposalSchema: z.ZodObject<{
|
|
|
192
192
|
planDigest: z.ZodString;
|
|
193
193
|
breakdownDigest: z.ZodNullable<z.ZodString>;
|
|
194
194
|
}, z.core.$strict>;
|
|
195
|
-
inspectionHash: z.ZodString
|
|
195
|
+
inspectionHash: z.ZodNullable<z.ZodString>;
|
|
196
196
|
drafts: z.ZodArray<z.ZodObject<{
|
|
197
197
|
ordinal: z.ZodNumber;
|
|
198
198
|
title: z.ZodString;
|
|
@@ -285,7 +285,7 @@ export declare const PlanRevisionWorkflowSchema: z.ZodObject<{
|
|
|
285
285
|
breakdownDigest: z.ZodNullable<z.ZodString>;
|
|
286
286
|
}, z.core.$strict>;
|
|
287
287
|
plan: z.ZodString;
|
|
288
|
-
milestones: z.ZodString
|
|
288
|
+
milestones: z.ZodNullable<z.ZodString>;
|
|
289
289
|
entries: z.ZodArray<z.ZodObject<{
|
|
290
290
|
ordinal: z.ZodNumber;
|
|
291
291
|
title: z.ZodString;
|
|
@@ -335,7 +335,7 @@ export declare const PlanRevisionWorkflowSchema: z.ZodObject<{
|
|
|
335
335
|
planDigest: z.ZodString;
|
|
336
336
|
breakdownDigest: z.ZodNullable<z.ZodString>;
|
|
337
337
|
}, z.core.$strict>;
|
|
338
|
-
inspectionHash: z.ZodString
|
|
338
|
+
inspectionHash: z.ZodNullable<z.ZodString>;
|
|
339
339
|
drafts: z.ZodArray<z.ZodObject<{
|
|
340
340
|
ordinal: z.ZodNumber;
|
|
341
341
|
title: z.ZodString;
|
|
@@ -482,7 +482,7 @@ export declare const PlanCommandSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
482
482
|
}, z.core.$strict>;
|
|
483
483
|
kind: z.ZodLiteral<"finalize">;
|
|
484
484
|
}, z.core.$strict>, z.ZodObject<{
|
|
485
|
-
milestoneId: z.ZodUUID
|
|
485
|
+
milestoneId: z.ZodNullable<z.ZodUUID>;
|
|
486
486
|
checks: z.ZodArray<z.ZodObject<{
|
|
487
487
|
command: z.ZodString;
|
|
488
488
|
outcome: z.ZodLiteral<"passed">;
|
|
@@ -668,7 +668,7 @@ export declare const PlanCommandSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
668
668
|
breakdownDigest: z.ZodNullable<z.ZodString>;
|
|
669
669
|
}, z.core.$strict>;
|
|
670
670
|
authorizationId: z.ZodUUID;
|
|
671
|
-
milestoneId: z.ZodUUID
|
|
671
|
+
milestoneId: z.ZodNullable<z.ZodUUID>;
|
|
672
672
|
mode: z.ZodEnum<{
|
|
673
673
|
supervised: "supervised";
|
|
674
674
|
auto: "auto";
|
|
@@ -757,11 +757,64 @@ export declare const PlanFinalizationSchema: z.ZodObject<{
|
|
|
757
757
|
planDigest: z.ZodString;
|
|
758
758
|
breakdownDigest: z.ZodNullable<z.ZodString>;
|
|
759
759
|
}, z.core.$strict>;
|
|
760
|
-
fileHash: z.ZodString
|
|
760
|
+
fileHash: z.ZodNullable<z.ZodString>;
|
|
761
761
|
createdAt: z.ZodNumber;
|
|
762
762
|
}, z.core.$strict>;
|
|
763
|
+
export declare const PlanComparisonSchema: z.ZodObject<{
|
|
764
|
+
sourceRevision: z.ZodObject<{
|
|
765
|
+
planDigest: z.ZodString;
|
|
766
|
+
breakdownDigest: z.ZodNullable<z.ZodString>;
|
|
767
|
+
}, z.core.$strict>;
|
|
768
|
+
targetDirectory: z.ZodString;
|
|
769
|
+
targetRevision: z.ZodObject<{
|
|
770
|
+
planDigest: z.ZodString;
|
|
771
|
+
breakdownDigest: z.ZodNullable<z.ZodString>;
|
|
772
|
+
}, z.core.$strict>;
|
|
773
|
+
verdict: z.ZodEnum<{
|
|
774
|
+
compatible: "compatible";
|
|
775
|
+
contradiction: "contradiction";
|
|
776
|
+
}>;
|
|
777
|
+
reason: z.ZodString;
|
|
778
|
+
reviewer: z.ZodObject<{
|
|
779
|
+
provider: z.ZodEnum<{
|
|
780
|
+
claude: "claude";
|
|
781
|
+
codex: "codex";
|
|
782
|
+
}>;
|
|
783
|
+
cliVersion: z.ZodString;
|
|
784
|
+
model: z.ZodNullable<z.ZodString>;
|
|
785
|
+
reference: z.ZodString;
|
|
786
|
+
}, z.core.$strict>;
|
|
787
|
+
reviewedAt: z.ZodNumber;
|
|
788
|
+
}, z.core.$strict>;
|
|
789
|
+
export type IPlanComparison = z.infer<typeof PlanComparisonSchema>;
|
|
763
790
|
export declare const PlanCoordinationSchema: z.ZodObject<{
|
|
764
791
|
schemaVersion: z.ZodLiteral<1>;
|
|
792
|
+
comparisons: z.ZodArray<z.ZodObject<{
|
|
793
|
+
sourceRevision: z.ZodObject<{
|
|
794
|
+
planDigest: z.ZodString;
|
|
795
|
+
breakdownDigest: z.ZodNullable<z.ZodString>;
|
|
796
|
+
}, z.core.$strict>;
|
|
797
|
+
targetDirectory: z.ZodString;
|
|
798
|
+
targetRevision: z.ZodObject<{
|
|
799
|
+
planDigest: z.ZodString;
|
|
800
|
+
breakdownDigest: z.ZodNullable<z.ZodString>;
|
|
801
|
+
}, z.core.$strict>;
|
|
802
|
+
verdict: z.ZodEnum<{
|
|
803
|
+
compatible: "compatible";
|
|
804
|
+
contradiction: "contradiction";
|
|
805
|
+
}>;
|
|
806
|
+
reason: z.ZodString;
|
|
807
|
+
reviewer: z.ZodObject<{
|
|
808
|
+
provider: z.ZodEnum<{
|
|
809
|
+
claude: "claude";
|
|
810
|
+
codex: "codex";
|
|
811
|
+
}>;
|
|
812
|
+
cliVersion: z.ZodString;
|
|
813
|
+
model: z.ZodNullable<z.ZodString>;
|
|
814
|
+
reference: z.ZodString;
|
|
815
|
+
}, z.core.$strict>;
|
|
816
|
+
reviewedAt: z.ZodNumber;
|
|
817
|
+
}, z.core.$strict>>;
|
|
765
818
|
finalized: z.ZodNullable<z.ZodObject<{
|
|
766
819
|
action: z.ZodObject<{
|
|
767
820
|
id: z.ZodUUID;
|
|
@@ -778,7 +831,7 @@ export declare const PlanCoordinationSchema: z.ZodObject<{
|
|
|
778
831
|
planDigest: z.ZodString;
|
|
779
832
|
breakdownDigest: z.ZodNullable<z.ZodString>;
|
|
780
833
|
}, z.core.$strict>;
|
|
781
|
-
fileHash: z.ZodString
|
|
834
|
+
fileHash: z.ZodNullable<z.ZodString>;
|
|
782
835
|
createdAt: z.ZodNumber;
|
|
783
836
|
}, z.core.$strict>>;
|
|
784
837
|
planApproval: z.ZodNullable<z.ZodObject<{
|
|
@@ -890,7 +943,7 @@ export declare const PlanCoordinationSchema: z.ZodObject<{
|
|
|
890
943
|
reference: z.ZodString;
|
|
891
944
|
}, z.core.$strict>;
|
|
892
945
|
}, z.core.$strict>;
|
|
893
|
-
milestoneId: z.ZodUUID
|
|
946
|
+
milestoneId: z.ZodNullable<z.ZodUUID>;
|
|
894
947
|
revision: z.ZodObject<{
|
|
895
948
|
planDigest: z.ZodString;
|
|
896
949
|
breakdownDigest: z.ZodNullable<z.ZodString>;
|
|
@@ -898,7 +951,7 @@ export declare const PlanCoordinationSchema: z.ZodObject<{
|
|
|
898
951
|
contractDigest: z.ZodString;
|
|
899
952
|
title: z.ZodString;
|
|
900
953
|
contract: z.ZodString;
|
|
901
|
-
sharedDigest: z.ZodString
|
|
954
|
+
sharedDigest: z.ZodNullable<z.ZodString>;
|
|
902
955
|
checkouts: z.ZodArray<z.ZodObject<{
|
|
903
956
|
repository: z.ZodString;
|
|
904
957
|
directory: z.ZodString;
|
|
@@ -1012,7 +1065,7 @@ export declare const PlanCoordinationSchema: z.ZodObject<{
|
|
|
1012
1065
|
breakdownDigest: z.ZodNullable<z.ZodString>;
|
|
1013
1066
|
}, z.core.$strict>;
|
|
1014
1067
|
plan: z.ZodString;
|
|
1015
|
-
milestones: z.ZodString
|
|
1068
|
+
milestones: z.ZodNullable<z.ZodString>;
|
|
1016
1069
|
entries: z.ZodArray<z.ZodObject<{
|
|
1017
1070
|
ordinal: z.ZodNumber;
|
|
1018
1071
|
title: z.ZodString;
|
|
@@ -1062,7 +1115,7 @@ export declare const PlanCoordinationSchema: z.ZodObject<{
|
|
|
1062
1115
|
planDigest: z.ZodString;
|
|
1063
1116
|
breakdownDigest: z.ZodNullable<z.ZodString>;
|
|
1064
1117
|
}, z.core.$strict>;
|
|
1065
|
-
inspectionHash: z.ZodString
|
|
1118
|
+
inspectionHash: z.ZodNullable<z.ZodString>;
|
|
1066
1119
|
drafts: z.ZodArray<z.ZodObject<{
|
|
1067
1120
|
ordinal: z.ZodNumber;
|
|
1068
1121
|
title: z.ZodString;
|
|
@@ -1115,7 +1168,7 @@ export declare const PlanCoordinationSchema: z.ZodObject<{
|
|
|
1115
1168
|
breakdownDigest: z.ZodNullable<z.ZodString>;
|
|
1116
1169
|
}, z.core.$strict>;
|
|
1117
1170
|
plan: z.ZodString;
|
|
1118
|
-
milestones: z.ZodString
|
|
1171
|
+
milestones: z.ZodNullable<z.ZodString>;
|
|
1119
1172
|
entries: z.ZodArray<z.ZodObject<{
|
|
1120
1173
|
ordinal: z.ZodNumber;
|
|
1121
1174
|
title: z.ZodString;
|
|
@@ -1216,7 +1269,7 @@ export declare const PlanCoordinationSummarySchema: z.ZodObject<{
|
|
|
1216
1269
|
planDigest: z.ZodString;
|
|
1217
1270
|
breakdownDigest: z.ZodNullable<z.ZodString>;
|
|
1218
1271
|
}, z.core.$strict>;
|
|
1219
|
-
fileHash: z.ZodString
|
|
1272
|
+
fileHash: z.ZodNullable<z.ZodString>;
|
|
1220
1273
|
createdAt: z.ZodNumber;
|
|
1221
1274
|
}, z.core.$strict>>;
|
|
1222
1275
|
planApproval: z.ZodNullable<z.ZodObject<{
|
|
@@ -1299,6 +1352,7 @@ export declare const PlanCoordinationSummarySchema: z.ZodObject<{
|
|
|
1299
1352
|
closeActionId: z.ZodUUID;
|
|
1300
1353
|
}, z.core.$strict>>;
|
|
1301
1354
|
}, z.core.$strict>>;
|
|
1355
|
+
comparisonCount: z.ZodNumber;
|
|
1302
1356
|
completionCount: z.ZodNumber;
|
|
1303
1357
|
revision: z.ZodNullable<z.ZodObject<{
|
|
1304
1358
|
createdAt: z.ZodNumber;
|
|
@@ -1432,7 +1486,7 @@ export declare const PlanStatusSchema: z.ZodObject<{
|
|
|
1432
1486
|
planDigest: z.ZodString;
|
|
1433
1487
|
breakdownDigest: z.ZodNullable<z.ZodString>;
|
|
1434
1488
|
}, z.core.$strict>;
|
|
1435
|
-
fileHash: z.ZodString
|
|
1489
|
+
fileHash: z.ZodNullable<z.ZodString>;
|
|
1436
1490
|
createdAt: z.ZodNumber;
|
|
1437
1491
|
}, z.core.$strict>>;
|
|
1438
1492
|
planApproval: z.ZodNullable<z.ZodObject<{
|
|
@@ -1515,6 +1569,7 @@ export declare const PlanStatusSchema: z.ZodObject<{
|
|
|
1515
1569
|
closeActionId: z.ZodUUID;
|
|
1516
1570
|
}, z.core.$strict>>;
|
|
1517
1571
|
}, z.core.$strict>>;
|
|
1572
|
+
comparisonCount: z.ZodNumber;
|
|
1518
1573
|
completionCount: z.ZodNumber;
|
|
1519
1574
|
revision: z.ZodNullable<z.ZodObject<{
|
|
1520
1575
|
createdAt: z.ZodNumber;
|
|
@@ -1661,7 +1716,7 @@ export declare const PlanReconciliationEntrySchema: z.ZodDiscriminatedUnion<[z.Z
|
|
|
1661
1716
|
reference: z.ZodString;
|
|
1662
1717
|
}, z.core.$strict>;
|
|
1663
1718
|
}, z.core.$strict>;
|
|
1664
|
-
milestoneId: z.ZodUUID
|
|
1719
|
+
milestoneId: z.ZodNullable<z.ZodUUID>;
|
|
1665
1720
|
revision: z.ZodObject<{
|
|
1666
1721
|
planDigest: z.ZodString;
|
|
1667
1722
|
breakdownDigest: z.ZodNullable<z.ZodString>;
|
|
@@ -1669,7 +1724,7 @@ export declare const PlanReconciliationEntrySchema: z.ZodDiscriminatedUnion<[z.Z
|
|
|
1669
1724
|
contractDigest: z.ZodString;
|
|
1670
1725
|
title: z.ZodString;
|
|
1671
1726
|
contract: z.ZodString;
|
|
1672
|
-
sharedDigest: z.ZodString
|
|
1727
|
+
sharedDigest: z.ZodNullable<z.ZodString>;
|
|
1673
1728
|
checkouts: z.ZodArray<z.ZodObject<{
|
|
1674
1729
|
repository: z.ZodString;
|
|
1675
1730
|
directory: z.ZodString;
|
|
@@ -1816,7 +1871,7 @@ export declare const PlanResultSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
1816
1871
|
planDigest: z.ZodString;
|
|
1817
1872
|
breakdownDigest: z.ZodNullable<z.ZodString>;
|
|
1818
1873
|
}, z.core.$strict>;
|
|
1819
|
-
fileHash: z.ZodString
|
|
1874
|
+
fileHash: z.ZodNullable<z.ZodString>;
|
|
1820
1875
|
createdAt: z.ZodNumber;
|
|
1821
1876
|
}, z.core.$strict>>;
|
|
1822
1877
|
planApproval: z.ZodNullable<z.ZodObject<{
|
|
@@ -1899,6 +1954,7 @@ export declare const PlanResultSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
1899
1954
|
closeActionId: z.ZodUUID;
|
|
1900
1955
|
}, z.core.$strict>>;
|
|
1901
1956
|
}, z.core.$strict>>;
|
|
1957
|
+
comparisonCount: z.ZodNumber;
|
|
1902
1958
|
completionCount: z.ZodNumber;
|
|
1903
1959
|
revision: z.ZodNullable<z.ZodObject<{
|
|
1904
1960
|
createdAt: z.ZodNumber;
|
|
@@ -2035,7 +2091,7 @@ export declare const PlanResultSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
2035
2091
|
planDigest: z.ZodString;
|
|
2036
2092
|
breakdownDigest: z.ZodNullable<z.ZodString>;
|
|
2037
2093
|
}, z.core.$strict>;
|
|
2038
|
-
fileHash: z.ZodString
|
|
2094
|
+
fileHash: z.ZodNullable<z.ZodString>;
|
|
2039
2095
|
createdAt: z.ZodNumber;
|
|
2040
2096
|
}, z.core.$strict>>;
|
|
2041
2097
|
planApproval: z.ZodNullable<z.ZodObject<{
|
|
@@ -2118,6 +2174,7 @@ export declare const PlanResultSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
2118
2174
|
closeActionId: z.ZodUUID;
|
|
2119
2175
|
}, z.core.$strict>>;
|
|
2120
2176
|
}, z.core.$strict>>;
|
|
2177
|
+
comparisonCount: z.ZodNumber;
|
|
2121
2178
|
completionCount: z.ZodNumber;
|
|
2122
2179
|
revision: z.ZodNullable<z.ZodObject<{
|
|
2123
2180
|
createdAt: z.ZodNumber;
|
|
@@ -2222,7 +2279,7 @@ export declare const PlanResultSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
2222
2279
|
reference: z.ZodString;
|
|
2223
2280
|
}, z.core.$strict>;
|
|
2224
2281
|
}, z.core.$strict>;
|
|
2225
|
-
milestoneId: z.ZodUUID
|
|
2282
|
+
milestoneId: z.ZodNullable<z.ZodUUID>;
|
|
2226
2283
|
revision: z.ZodObject<{
|
|
2227
2284
|
planDigest: z.ZodString;
|
|
2228
2285
|
breakdownDigest: z.ZodNullable<z.ZodString>;
|
|
@@ -2230,7 +2287,7 @@ export declare const PlanResultSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
2230
2287
|
contractDigest: z.ZodString;
|
|
2231
2288
|
title: z.ZodString;
|
|
2232
2289
|
contract: z.ZodString;
|
|
2233
|
-
sharedDigest: z.ZodString
|
|
2290
|
+
sharedDigest: z.ZodNullable<z.ZodString>;
|
|
2234
2291
|
checkouts: z.ZodArray<z.ZodObject<{
|
|
2235
2292
|
repository: z.ZodString;
|
|
2236
2293
|
directory: z.ZodString;
|
|
@@ -2378,7 +2435,7 @@ export declare const PlanResultSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
2378
2435
|
planDigest: z.ZodString;
|
|
2379
2436
|
breakdownDigest: z.ZodNullable<z.ZodString>;
|
|
2380
2437
|
}, z.core.$strict>;
|
|
2381
|
-
fileHash: z.ZodString
|
|
2438
|
+
fileHash: z.ZodNullable<z.ZodString>;
|
|
2382
2439
|
createdAt: z.ZodNumber;
|
|
2383
2440
|
}, z.core.$strict>>;
|
|
2384
2441
|
planApproval: z.ZodNullable<z.ZodObject<{
|
|
@@ -2461,6 +2518,7 @@ export declare const PlanResultSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
2461
2518
|
closeActionId: z.ZodUUID;
|
|
2462
2519
|
}, z.core.$strict>>;
|
|
2463
2520
|
}, z.core.$strict>>;
|
|
2521
|
+
comparisonCount: z.ZodNumber;
|
|
2464
2522
|
completionCount: z.ZodNumber;
|
|
2465
2523
|
revision: z.ZodNullable<z.ZodObject<{
|
|
2466
2524
|
createdAt: z.ZodNumber;
|
|
@@ -2516,7 +2574,7 @@ export declare const PlanResultSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
2516
2574
|
}, z.core.$strict>>;
|
|
2517
2575
|
}, z.core.$strict>;
|
|
2518
2576
|
}, z.core.$strip>;
|
|
2519
|
-
content: z.ZodString
|
|
2577
|
+
content: z.ZodNullable<z.ZodString>;
|
|
2520
2578
|
}, z.core.$strip>, z.ZodObject<{
|
|
2521
2579
|
kind: z.ZodLiteral<"milestones">;
|
|
2522
2580
|
result: z.ZodObject<{
|
|
@@ -64,12 +64,12 @@ export const PlanWorktreeProofSchema = PlanCheckoutSchema.extend({
|
|
|
64
64
|
export const PlanCompletionSchema = z.strictObject({
|
|
65
65
|
id: z.uuid(),
|
|
66
66
|
action: PlanOperatorActionSchema,
|
|
67
|
-
milestoneId: z.uuid(),
|
|
67
|
+
milestoneId: z.uuid().nullable(),
|
|
68
68
|
revision: PlanRevisionSchema,
|
|
69
69
|
contractDigest: PlanDigestSchema,
|
|
70
70
|
title: z.string().min(1).max(4096),
|
|
71
71
|
contract: z.string().max(1_048_576),
|
|
72
|
-
sharedDigest: PlanDigestSchema,
|
|
72
|
+
sharedDigest: PlanDigestSchema.nullable(),
|
|
73
73
|
checkouts: z.array(PlanWorktreeProofSchema).max(128),
|
|
74
74
|
checks: z.array(PlanCheckSchema).min(1).max(32),
|
|
75
75
|
completedAt: z.number().int(),
|
|
@@ -84,7 +84,7 @@ export const PlanSnapshotMilestoneSchema = PlanMilestoneSchema.extend({
|
|
|
84
84
|
export const PlanCheckpointSchema = z.strictObject({
|
|
85
85
|
revision: PlanRevisionSchema,
|
|
86
86
|
plan: z.string().max(1_048_576),
|
|
87
|
-
milestones: z.string().max(1_048_576),
|
|
87
|
+
milestones: z.string().max(1_048_576).nullable(),
|
|
88
88
|
entries: z.array(PlanSnapshotMilestoneSchema).max(1024),
|
|
89
89
|
checkouts: z.array(PlanWorktreeProofSchema).max(128),
|
|
90
90
|
threadIds: z.array(z.uuid()).max(32),
|
|
@@ -111,7 +111,7 @@ export const PlanDraftMilestoneSchema = PlanSnapshotMilestoneSchema.extend({
|
|
|
111
111
|
export const PlanProposalSchema = z.strictObject({
|
|
112
112
|
id: z.uuid(),
|
|
113
113
|
revision: PlanRevisionSchema,
|
|
114
|
-
inspectionHash: PlanDigestSchema,
|
|
114
|
+
inspectionHash: PlanDigestSchema.nullable(),
|
|
115
115
|
drafts: z.array(PlanDraftMilestoneSchema).max(1024),
|
|
116
116
|
unmatchedSourceIds: z.array(z.uuid()).max(1024),
|
|
117
117
|
confirmation: z
|
|
@@ -193,7 +193,7 @@ export const PlanCommandSchema = z.discriminatedUnion('kind', [
|
|
|
193
193
|
z.strictObject({
|
|
194
194
|
kind: z.literal('complete'),
|
|
195
195
|
...MutationFields,
|
|
196
|
-
milestoneId: z.uuid(),
|
|
196
|
+
milestoneId: z.uuid().nullable(),
|
|
197
197
|
checks: z.array(PlanCheckSchema).min(1).max(32),
|
|
198
198
|
checkouts: z.array(PlanCheckoutSchema).max(128),
|
|
199
199
|
}),
|
|
@@ -234,7 +234,6 @@ export const PlanCommandSchema = z.discriminatedUnion('kind', [
|
|
|
234
234
|
mode: z.enum(['supervised', 'auto']),
|
|
235
235
|
milestoneIds: z
|
|
236
236
|
.array(z.uuid())
|
|
237
|
-
.min(1)
|
|
238
237
|
.max(1024)
|
|
239
238
|
.refine((ids) => new Set(ids).size === ids.length),
|
|
240
239
|
}),
|
|
@@ -243,7 +242,7 @@ export const PlanCommandSchema = z.discriminatedUnion('kind', [
|
|
|
243
242
|
target: PlanTargetSchema,
|
|
244
243
|
expected: PlanRevisionSchema,
|
|
245
244
|
authorizationId: z.uuid(),
|
|
246
|
-
milestoneId: z.uuid(),
|
|
245
|
+
milestoneId: z.uuid().nullable(),
|
|
247
246
|
mode: z.enum(['supervised', 'auto']),
|
|
248
247
|
}),
|
|
249
248
|
]);
|
|
@@ -259,7 +258,7 @@ export const PlanExecutionSchema = z.strictObject({
|
|
|
259
258
|
action: PlanOperatorActionSchema,
|
|
260
259
|
revision: PlanRevisionSchema,
|
|
261
260
|
mode: z.enum(['supervised', 'auto']),
|
|
262
|
-
milestoneIds: z.array(z.uuid()).
|
|
261
|
+
milestoneIds: z.array(z.uuid()).max(1024),
|
|
263
262
|
createdAt: z.number().int(),
|
|
264
263
|
revokedBy: PlanOperatorActionSchema.nullable(),
|
|
265
264
|
});
|
|
@@ -267,11 +266,27 @@ export const PlanExecutionSchema = z.strictObject({
|
|
|
267
266
|
export const PlanFinalizationSchema = z.strictObject({
|
|
268
267
|
action: PlanOperatorActionSchema,
|
|
269
268
|
revision: PlanRevisionSchema,
|
|
270
|
-
fileHash: PlanDigestSchema,
|
|
269
|
+
fileHash: PlanDigestSchema.nullable(),
|
|
271
270
|
createdAt: z.number().int(),
|
|
272
271
|
});
|
|
272
|
+
// coordinators own semantic review; the core preserves its exact revision-bound evidence
|
|
273
|
+
export const PlanComparisonSchema = z.strictObject({
|
|
274
|
+
sourceRevision: PlanRevisionSchema,
|
|
275
|
+
targetDirectory: z.string().min(1).max(4096),
|
|
276
|
+
targetRevision: PlanRevisionSchema,
|
|
277
|
+
verdict: z.enum(['compatible', 'contradiction']),
|
|
278
|
+
reason: z.string().min(1).max(4096),
|
|
279
|
+
reviewer: z.strictObject({
|
|
280
|
+
provider: z.enum(['claude', 'codex']),
|
|
281
|
+
cliVersion: z.string().min(1).max(128),
|
|
282
|
+
model: z.string().min(1).max(256).nullable(),
|
|
283
|
+
reference: z.string().min(1).max(4096),
|
|
284
|
+
}),
|
|
285
|
+
reviewedAt: z.number().int().nonnegative(),
|
|
286
|
+
});
|
|
273
287
|
export const PlanCoordinationSchema = z.strictObject({
|
|
274
288
|
schemaVersion: z.literal(1),
|
|
289
|
+
comparisons: z.array(PlanComparisonSchema).max(1024),
|
|
275
290
|
finalized: PlanFinalizationSchema.nullable(),
|
|
276
291
|
planApproval: PlanApprovalSchema.nullable(),
|
|
277
292
|
sequenceApproval: PlanApprovalSchema.nullable(),
|
|
@@ -294,11 +309,13 @@ export const PlanCoordinationSchema = z.strictObject({
|
|
|
294
309
|
});
|
|
295
310
|
// collection bodies remain in the file owner and paged SQLite projections
|
|
296
311
|
export const PlanCoordinationSummarySchema = PlanCoordinationSchema.omit({
|
|
312
|
+
comparisons: true,
|
|
297
313
|
completions: true,
|
|
298
314
|
correspondences: true,
|
|
299
315
|
revision: true,
|
|
300
316
|
baseline: true,
|
|
301
317
|
}).extend({
|
|
318
|
+
comparisonCount: z.number().int().nonnegative(),
|
|
302
319
|
completionCount: z.number().int().nonnegative(),
|
|
303
320
|
revision: PlanRevisionWorkflowSchema.omit({
|
|
304
321
|
checkpoint: true,
|
|
@@ -367,7 +384,7 @@ export const PlanResultSchema = z.discriminatedUnion('kind', [
|
|
|
367
384
|
z.object({
|
|
368
385
|
kind: z.literal('finalized'),
|
|
369
386
|
result: PlanStatusSchema,
|
|
370
|
-
content: z.string().max(1_048_576),
|
|
387
|
+
content: z.string().max(1_048_576).nullable(),
|
|
371
388
|
}),
|
|
372
389
|
z.object({
|
|
373
390
|
kind: z.literal('milestones'),
|