@patronage/software-factory 1.0.0-alpha.21 → 1.0.0-alpha.23

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/dist/schemas.d.ts CHANGED
@@ -1,4 +1,138 @@
1
1
  import { z } from "zod";
2
+ //#region src/packages/review-prompt-sections/schema.d.ts
3
+ declare const reviewPromptSectionSchema: z.ZodObject<{
4
+ provenance: z.ZodEnum<{
5
+ "prior-review-ledger": "prior-review-ledger";
6
+ "issue-review-focus": "issue-review-focus";
7
+ }>;
8
+ source: z.ZodString;
9
+ text: z.ZodString;
10
+ }, z.core.$strict>;
11
+ type ReviewPromptSection = z.infer<typeof reviewPromptSectionSchema>;
12
+ type ReviewPromptSectionProvenance = ReviewPromptSection["provenance"];
13
+ declare const reviewPromptSectionsSchema: z.ZodArray<z.ZodObject<{
14
+ provenance: z.ZodEnum<{
15
+ "prior-review-ledger": "prior-review-ledger";
16
+ "issue-review-focus": "issue-review-focus";
17
+ }>;
18
+ source: z.ZodString;
19
+ text: z.ZodString;
20
+ }, z.core.$strict>>;
21
+ //#endregion
22
+ //#region src/review-ladder-policy.d.ts
23
+ type ReviewFindingCategory = "correctness" | "safety" | "coordination" | "maintainability" | "unknown";
24
+ declare const FINDING_DISPOSITIONS: readonly ["open", "fixed-in-thread", "follow-up-filed", "waived", "stale-repeat", "rerun-noise"];
25
+ type FindingDisposition = (typeof FINDING_DISPOSITIONS)[number];
26
+ interface ReviewFindingAttributes {
27
+ blockingAfterCap?: boolean;
28
+ category?: string;
29
+ citedSpan?: string;
30
+ file?: string;
31
+ prescribedAction?: string;
32
+ priority?: string;
33
+ supersedes?: {
34
+ file?: string;
35
+ title: string;
36
+ };
37
+ title: string;
38
+ }
39
+ //#endregion
40
+ //#region src/review-rungs.d.ts
41
+ declare const EVIDENCE_REVIEW_RUNGS: readonly ["independent-model", "oracle", "human"];
42
+ type EvidenceReviewRung = (typeof EVIDENCE_REVIEW_RUNGS)[number];
43
+ //#endregion
44
+ //#region src/review-ladder-ledger.d.ts
45
+ type LadderCycleStage = "interior" | "gate";
46
+ type LadderFindingReport = ReviewFindingAttributes;
47
+ type DeclarableFindingDisposition = Exclude<FindingDisposition, "open" | "stale-repeat" | "rerun-noise">;
48
+ interface LadderDispositionDeclaration {
49
+ disposition: DeclarableFindingDisposition;
50
+ finding: {
51
+ file?: string;
52
+ title: string;
53
+ };
54
+ findingReport?: LadderFindingReport;
55
+ reference?: string;
56
+ }
57
+ //#endregion
58
+ //#region src/review-ladder.d.ts
59
+ interface LadderSessionAttribution {
60
+ orchestrationMode?: "autonomous" | "manual";
61
+ resumedSession?: boolean;
62
+ runtime?: string;
63
+ sessionId?: string;
64
+ }
65
+ interface LadderUsageReport {
66
+ estimatedCostUsd?: number;
67
+ source?: string;
68
+ totalTokens?: number;
69
+ }
70
+ interface ReviewLadderCycle {
71
+ dispositions?: LadderDispositionDeclaration[];
72
+ engine?: string;
73
+ findings: LadderFindingReport[];
74
+ identity?: {
75
+ headSha: string;
76
+ patchId: string;
77
+ };
78
+ model?: string;
79
+ correlatedRerun?: boolean;
80
+ session?: LadderSessionAttribution;
81
+ stage: LadderCycleStage;
82
+ usage?: LadderUsageReport;
83
+ }
84
+ //#endregion
85
+ //#region src/pr-readiness/ladder-proof-state.d.ts
86
+ interface PrReviewLadderState {
87
+ cycles: ReviewLadderCycle[];
88
+ }
89
+ //#endregion
90
+ //#region src/pr-readiness/review-proof-types.d.ts
91
+ type PrReviewKind = "correctness" | "security";
92
+ type PrReviewOutcome = "passed" | "failed" | "error";
93
+ //#endregion
94
+ //#region src/pr-readiness/review-proof-shape.d.ts
95
+ interface PrReviewFinding extends ReviewFindingAttributes {
96
+ body: string;
97
+ category?: ReviewFindingCategory;
98
+ line?: number;
99
+ protocolFinding?: true;
100
+ }
101
+ interface PrReviewResult {
102
+ kind: PrReviewKind;
103
+ startedAt: string;
104
+ endedAt: string;
105
+ durationMs: number;
106
+ model?: string;
107
+ producer?: string;
108
+ rung?: EvidenceReviewRung;
109
+ sessionId?: string;
110
+ outcome: PrReviewOutcome;
111
+ issuesFlagged: number;
112
+ summary: string;
113
+ findings: PrReviewFinding[];
114
+ typedVerdict?: boolean;
115
+ verdictSource?: "footer" | "recovered";
116
+ promptSections?: ReviewPromptSection[];
117
+ }
118
+ interface PrReviewProof {
119
+ schemaVersion: 2;
120
+ findingProvenanceVersion: 1;
121
+ base: string;
122
+ headSha: string;
123
+ patchId: string;
124
+ reviewCycle?: number;
125
+ maxReviewCycles?: number;
126
+ changedFiles: string[];
127
+ cleanedPaths: string[];
128
+ ladder?: PrReviewLadderState;
129
+ reviewRequirement?: {
130
+ reason: "no-applicable-mode" | "faithful-merge";
131
+ status: "not-required";
132
+ };
133
+ reviews: PrReviewResult[];
134
+ }
135
+ //#endregion
2
136
  //#region src/demand-waiver.d.ts
3
137
  /**
4
138
  * A demand that was in force, was NOT met, and was waived by the operator.
@@ -126,7 +260,7 @@ declare const impactStampSchema: z.ZodObject<{
126
260
  }>;
127
261
  inertPaths: z.ZodDefault<z.ZodArray<z.ZodString>>;
128
262
  reasons: z.ZodArray<z.ZodString>;
129
- stampVersion: z.ZodLiteral<3>;
263
+ stampVersion: z.ZodLiteral<4>;
130
264
  targets: z.ZodArray<z.ZodObject<{
131
265
  basis: z.ZodString;
132
266
  impact: z.ZodEnum<{
@@ -134,6 +268,7 @@ declare const impactStampSchema: z.ZodObject<{
134
268
  "not-affected": "not-affected";
135
269
  }>;
136
270
  name: z.ZodString;
271
+ subscribedPaths: z.ZodArray<z.ZodString>;
137
272
  }, z.core.$strip>>;
138
273
  unsubscribedPaths: z.ZodArray<z.ZodString>;
139
274
  }, z.core.$strip>;
@@ -149,131 +284,6 @@ type ImpactStamp = z.infer<typeof impactStampSchema>;
149
284
  */
150
285
  type ResolvedPrVerifyMode = "docs-only" | "trivial" | "full";
151
286
  //#endregion
152
- //#region src/packages/review-prompt-sections/schema.d.ts
153
- declare const reviewPromptSectionSchema: z.ZodObject<{
154
- provenance: z.ZodEnum<{
155
- "prior-review-ledger": "prior-review-ledger";
156
- "issue-review-focus": "issue-review-focus";
157
- }>;
158
- source: z.ZodString;
159
- text: z.ZodString;
160
- }, z.core.$strict>;
161
- type ReviewPromptSection = z.infer<typeof reviewPromptSectionSchema>;
162
- //#endregion
163
- //#region src/review-ladder-policy.d.ts
164
- type ReviewFindingCategory = "correctness" | "safety" | "coordination" | "maintainability" | "unknown";
165
- declare const FINDING_DISPOSITIONS: readonly ["open", "fixed-in-thread", "follow-up-filed", "waived", "stale-repeat", "rerun-noise"];
166
- type FindingDisposition = (typeof FINDING_DISPOSITIONS)[number];
167
- interface ReviewFindingAttributes {
168
- blockingAfterCap?: boolean;
169
- category?: string;
170
- citedSpan?: string;
171
- file?: string;
172
- prescribedAction?: string;
173
- priority?: string;
174
- supersedes?: {
175
- file?: string;
176
- title: string;
177
- };
178
- title: string;
179
- }
180
- //#endregion
181
- //#region src/review-rungs.d.ts
182
- declare const EVIDENCE_REVIEW_RUNGS: readonly ["independent-model", "oracle", "human"];
183
- type EvidenceReviewRung = (typeof EVIDENCE_REVIEW_RUNGS)[number];
184
- //#endregion
185
- //#region src/review-ladder-ledger.d.ts
186
- type LadderCycleStage = "interior" | "gate";
187
- type LadderFindingReport = ReviewFindingAttributes;
188
- type DeclarableFindingDisposition = Exclude<FindingDisposition, "open" | "stale-repeat" | "rerun-noise">;
189
- interface LadderDispositionDeclaration {
190
- disposition: DeclarableFindingDisposition;
191
- finding: {
192
- file?: string;
193
- title: string;
194
- };
195
- findingReport?: LadderFindingReport;
196
- reference?: string;
197
- }
198
- //#endregion
199
- //#region src/review-ladder.d.ts
200
- interface LadderSessionAttribution {
201
- orchestrationMode?: "autonomous" | "manual";
202
- resumedSession?: boolean;
203
- runtime?: string;
204
- sessionId?: string;
205
- }
206
- interface LadderUsageReport {
207
- estimatedCostUsd?: number;
208
- source?: string;
209
- totalTokens?: number;
210
- }
211
- interface ReviewLadderCycle {
212
- dispositions?: LadderDispositionDeclaration[];
213
- engine?: string;
214
- findings: LadderFindingReport[];
215
- identity?: {
216
- headSha: string;
217
- patchId: string;
218
- };
219
- model?: string;
220
- correlatedRerun?: boolean;
221
- session?: LadderSessionAttribution;
222
- stage: LadderCycleStage;
223
- usage?: LadderUsageReport;
224
- }
225
- //#endregion
226
- //#region src/pr-readiness/ladder-proof-state.d.ts
227
- interface PrReviewLadderState {
228
- cycles: ReviewLadderCycle[];
229
- }
230
- //#endregion
231
- //#region src/pr-readiness/review-proof-types.d.ts
232
- type PrReviewKind = "correctness" | "security";
233
- type PrReviewOutcome = "passed" | "failed" | "error";
234
- //#endregion
235
- //#region src/pr-readiness/review-proof-shape.d.ts
236
- interface PrReviewFinding extends ReviewFindingAttributes {
237
- body: string;
238
- category?: ReviewFindingCategory;
239
- line?: number;
240
- protocolFinding?: true;
241
- }
242
- interface PrReviewResult {
243
- kind: PrReviewKind;
244
- startedAt: string;
245
- endedAt: string;
246
- durationMs: number;
247
- model?: string;
248
- producer?: string;
249
- rung?: EvidenceReviewRung;
250
- sessionId?: string;
251
- outcome: PrReviewOutcome;
252
- issuesFlagged: number;
253
- summary: string;
254
- findings: PrReviewFinding[];
255
- typedVerdict?: boolean;
256
- verdictSource?: "footer" | "recovered";
257
- promptSections?: ReviewPromptSection[];
258
- }
259
- interface PrReviewProof {
260
- schemaVersion: 2;
261
- findingProvenanceVersion: 1;
262
- base: string;
263
- headSha: string;
264
- patchId: string;
265
- reviewCycle?: number;
266
- maxReviewCycles?: number;
267
- changedFiles: string[];
268
- cleanedPaths: string[];
269
- ladder?: PrReviewLadderState;
270
- reviewRequirement?: {
271
- reason: "no-applicable-mode" | "faithful-merge";
272
- status: "not-required";
273
- };
274
- reviews: PrReviewResult[];
275
- }
276
- //#endregion
277
287
  //#region src/pr-readiness/readiness-ledger.d.ts
278
288
  declare const readinessRepairSchema: z.ZodObject<{
279
289
  action: z.ZodString;
@@ -296,7 +306,6 @@ declare const managedReadinessLedgerSchema: z.ZodObject<{
296
306
  review: "review";
297
307
  verify: "verify";
298
308
  }>;
299
- inScope: z.ZodBoolean;
300
309
  name: z.ZodString;
301
310
  reason: z.ZodOptional<z.ZodString>;
302
311
  scope: z.ZodOptional<z.ZodObject<{
@@ -350,17 +359,17 @@ declare const managedReadinessLedgerSchema: z.ZodObject<{
350
359
  }, z.core.$strip>;
351
360
  highestBlockingSeverity: z.ZodOptional<z.ZodEnum<{
352
361
  unknown: "unknown";
362
+ critical: "critical";
363
+ high: "high";
353
364
  low: "low";
354
365
  medium: "medium";
355
- high: "high";
356
- critical: "critical";
357
366
  }>>;
358
367
  highestOpenSeverity: z.ZodOptional<z.ZodEnum<{
359
368
  unknown: "unknown";
369
+ critical: "critical";
370
+ high: "high";
360
371
  low: "low";
361
372
  medium: "medium";
362
- high: "high";
363
- critical: "critical";
364
373
  }>>;
365
374
  maxReviewCycles: z.ZodOptional<z.ZodNumber>;
366
375
  nonBlockingFindings: z.ZodNumber;
@@ -404,8 +413,8 @@ declare const managedReadinessLedgerSchema: z.ZodObject<{
404
413
  reviewedHeadSha: z.ZodOptional<z.ZodString>;
405
414
  reviewedPatchId: z.ZodOptional<z.ZodString>;
406
415
  status: z.ZodEnum<{
407
- "not-required": "not-required";
408
416
  blocked: "blocked";
417
+ "not-required": "not-required";
409
418
  current: "current";
410
419
  stale: "stale";
411
420
  missing: "missing";
@@ -416,28 +425,37 @@ declare const managedReadinessLedgerSchema: z.ZodObject<{
416
425
  reviewedHeadSha: z.ZodOptional<z.ZodString>;
417
426
  reviewedPatchId: z.ZodOptional<z.ZodString>;
418
427
  status: z.ZodEnum<{
419
- "not-required": "not-required";
420
428
  blocked: "blocked";
429
+ "not-required": "not-required";
421
430
  current: "current";
422
431
  stale: "stale";
423
432
  missing: "missing";
424
433
  }>;
425
434
  }, z.core.$strip>>;
426
435
  }, z.core.$strip>;
427
- schemaVersion: z.ZodLiteral<1>;
428
- verification: z.ZodObject<{
436
+ schemaVersion: z.ZodLiteral<2>;
437
+ verification: z.ZodDiscriminatedUnion<[z.ZodObject<{
429
438
  command: z.ZodLiteral<"patronage-factory pr:verify">;
430
- docsOnlyDeltaAccepted: z.ZodOptional<z.ZodBoolean>;
431
- docsOnlyVerifiedHeadSha: z.ZodOptional<z.ZodString>;
432
- prVerify: z.ZodEnum<{
433
- passed: "passed";
434
- stale: "stale";
435
- missing: "missing";
436
- }>;
437
- trivialDeltaAccepted: z.ZodOptional<z.ZodBoolean>;
438
- trivialVerifiedHeadSha: z.ZodOptional<z.ZodString>;
439
+ prVerify: z.ZodLiteral<"missing">;
440
+ }, z.core.$strict>, z.ZodObject<{
441
+ command: z.ZodLiteral<"patronage-factory pr:verify">;
442
+ prVerify: z.ZodLiteral<"stale">;
443
+ verifiedHeadSha: z.ZodString;
444
+ }, z.core.$strict>, z.ZodObject<{
445
+ command: z.ZodLiteral<"patronage-factory pr:verify">;
446
+ prVerify: z.ZodLiteral<"passed-via-head">;
447
+ verifiedHeadSha: z.ZodString;
448
+ }, z.core.$strict>, z.ZodObject<{
449
+ command: z.ZodLiteral<"patronage-factory pr:verify">;
450
+ docsOnlyVerifiedHeadSha: z.ZodString;
451
+ prVerify: z.ZodLiteral<"docs-only-delta">;
439
452
  verifiedHeadSha: z.ZodOptional<z.ZodString>;
440
- }, z.core.$strip>;
453
+ }, z.core.$strict>, z.ZodObject<{
454
+ command: z.ZodLiteral<"patronage-factory pr:verify">;
455
+ prVerify: z.ZodLiteral<"trivial-delta">;
456
+ trivialVerifiedHeadSha: z.ZodString;
457
+ verifiedHeadSha: z.ZodOptional<z.ZodString>;
458
+ }, z.core.$strict>], "prVerify">;
441
459
  }, z.core.$strip>;
442
460
  type ReadinessRepair = z.infer<typeof readinessRepairSchema>;
443
461
  type ReadinessStatus = "ready" | "blocked";
@@ -594,7 +612,7 @@ declare const prVerifyProofSchema: z.ZodObject<{
594
612
  }>;
595
613
  inertPaths: z.ZodDefault<z.ZodArray<z.ZodString>>;
596
614
  reasons: z.ZodArray<z.ZodString>;
597
- stampVersion: z.ZodLiteral<3>;
615
+ stampVersion: z.ZodLiteral<4>;
598
616
  targets: z.ZodArray<z.ZodObject<{
599
617
  basis: z.ZodString;
600
618
  impact: z.ZodEnum<{
@@ -602,6 +620,7 @@ declare const prVerifyProofSchema: z.ZodObject<{
602
620
  "not-affected": "not-affected";
603
621
  }>;
604
622
  name: z.ZodString;
623
+ subscribedPaths: z.ZodArray<z.ZodString>;
605
624
  }, z.core.$strip>>;
606
625
  unsubscribedPaths: z.ZodArray<z.ZodString>;
607
626
  }, z.core.$strip>>;
@@ -741,6 +760,12 @@ declare const evidenceEnvelopeBaseSchema: z.ZodObject<{
741
760
  }, z.core.$loose>;
742
761
  type EvidenceEnvelope = z.infer<typeof evidenceEnvelopeBaseSchema>;
743
762
  //#endregion
763
+ //#region src/pr-readiness/review-proof.d.ts
764
+ declare const PR_REVIEW_SCHEMA_VERSION = 2;
765
+ declare const prReviewFindingSchema: z.ZodType<PrReviewFinding>;
766
+ declare const prReviewResultSchema: z.ZodType<PrReviewResult>;
767
+ declare const prReviewProofSchema: z.ZodType<PrReviewProof>;
768
+ //#endregion
744
769
  //#region src/closeout-artifact.d.ts
745
770
  /** Artifact versions accepted at ingest. */
746
771
  declare const SUPPORTED_CLOSEOUT_SCHEMA_VERSIONS: readonly [5];
@@ -766,8 +791,8 @@ declare const closeoutArtifactSchema: z.ZodObject<{
766
791
  }, z.core.$strict>;
767
792
  unit: z.ZodEnum<{
768
793
  boolean: "boolean";
769
- text: "text";
770
794
  count: "count";
795
+ text: "text";
771
796
  tokens: "tokens";
772
797
  usd: "usd";
773
798
  }>;
@@ -807,134 +832,6 @@ declare const evidenceEnvelopeSchema: z.ZodObject<{
807
832
  sessionId: z.ZodOptional<z.ZodString>;
808
833
  timestamp: z.ZodOptional<z.ZodISODateTime>;
809
834
  }, z.core.$loose>;
810
- declare const PR_REVIEW_SCHEMA_VERSION = 2;
811
- declare const prReviewProofSchema: z.ZodObject<{
812
- base: z.ZodString;
813
- changedFiles: z.ZodArray<z.ZodString>;
814
- cleanedPaths: z.ZodArray<z.ZodString>;
815
- findingProvenanceVersion: z.ZodLiteral<1>;
816
- headSha: z.ZodString;
817
- ladder: z.ZodOptional<z.ZodObject<{
818
- cycles: z.ZodArray<z.ZodObject<{
819
- dispositions: z.ZodOptional<z.ZodArray<z.ZodObject<{
820
- disposition: z.ZodEnum<{
821
- "fixed-in-thread": "fixed-in-thread";
822
- "follow-up-filed": "follow-up-filed";
823
- waived: "waived";
824
- }>;
825
- finding: z.ZodObject<{
826
- file: z.ZodOptional<z.ZodString>;
827
- title: z.ZodString;
828
- }, z.core.$strip>;
829
- reference: z.ZodOptional<z.ZodString>;
830
- }, z.core.$loose>>>;
831
- findings: z.ZodArray<z.ZodObject<{
832
- citedSpan: z.ZodOptional<z.ZodString>;
833
- file: z.ZodOptional<z.ZodString>;
834
- prescribedAction: z.ZodOptional<z.ZodString>;
835
- supersedes: z.ZodOptional<z.ZodObject<{
836
- file: z.ZodOptional<z.ZodString>;
837
- title: z.ZodString;
838
- }, z.core.$strip>>;
839
- title: z.ZodString;
840
- }, z.core.$loose>>;
841
- }, z.core.$loose>>;
842
- }, z.core.$strip>>;
843
- maxReviewCycles: z.ZodOptional<z.ZodNumber>;
844
- patchId: z.ZodString;
845
- reviewCycle: z.ZodOptional<z.ZodNumber>;
846
- reviewRequirement: z.ZodOptional<z.ZodObject<{
847
- reason: z.ZodEnum<{
848
- "no-applicable-mode": "no-applicable-mode";
849
- "faithful-merge": "faithful-merge";
850
- }>;
851
- status: z.ZodLiteral<"not-required">;
852
- }, z.core.$strict>>;
853
- reviews: z.ZodArray<z.ZodObject<{
854
- command: z.ZodOptional<z.ZodString>;
855
- durationMs: z.ZodNumber;
856
- endedAt: z.ZodString;
857
- exitCode: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
858
- findings: z.ZodArray<z.ZodObject<{
859
- blockingAfterCap: z.ZodOptional<z.ZodBoolean>;
860
- body: z.ZodString;
861
- category: z.ZodOptional<z.ZodEnum<{
862
- unknown: "unknown";
863
- correctness: "correctness";
864
- safety: "safety";
865
- coordination: "coordination";
866
- maintainability: "maintainability";
867
- }>>;
868
- citedSpan: z.ZodOptional<z.ZodString>;
869
- file: z.ZodOptional<z.ZodString>;
870
- line: z.ZodOptional<z.ZodNumber>;
871
- prescribedAction: z.ZodOptional<z.ZodString>;
872
- priority: z.ZodOptional<z.ZodString>;
873
- protocolFinding: z.ZodOptional<z.ZodLiteral<true>>;
874
- supersedes: z.ZodOptional<z.ZodObject<{
875
- file: z.ZodOptional<z.ZodString>;
876
- title: z.ZodString;
877
- }, z.core.$strip>>;
878
- title: z.ZodString;
879
- }, z.core.$strip>>;
880
- issuesFlagged: z.ZodNumber;
881
- kind: z.ZodEnum<{
882
- correctness: "correctness";
883
- security: "security";
884
- }>;
885
- model: z.ZodOptional<z.ZodString>;
886
- outcome: z.ZodEnum<{
887
- error: "error";
888
- passed: "passed";
889
- failed: "failed";
890
- }>;
891
- producer: z.ZodOptional<z.ZodString>;
892
- promptSections: z.ZodOptional<z.ZodArray<z.ZodObject<{
893
- provenance: z.ZodEnum<{
894
- "prior-review-ledger": "prior-review-ledger";
895
- "issue-review-focus": "issue-review-focus";
896
- }>;
897
- source: z.ZodString;
898
- text: z.ZodString;
899
- }, z.core.$strict>>>;
900
- rung: z.ZodOptional<z.ZodEnum<{
901
- "independent-model": "independent-model";
902
- oracle: "oracle";
903
- human: "human";
904
- }>>;
905
- sessionId: z.ZodOptional<z.ZodString>;
906
- stageResolution: z.ZodOptional<z.ZodObject<{
907
- effort: z.ZodOptional<z.ZodEnum<{
908
- low: "low";
909
- medium: "medium";
910
- high: "high";
911
- xhigh: "xhigh";
912
- }>>;
913
- engine: z.ZodString;
914
- layerSource: z.ZodEnum<{
915
- cli: "cli";
916
- operatorSessionGlobal: "operatorSessionGlobal";
917
- operatorSessionKind: "operatorSessionKind";
918
- profilePin: "profilePin";
919
- stageConfig: "stageConfig";
920
- userConfig: "userConfig";
921
- }>;
922
- model: z.ZodString;
923
- rung: z.ZodOptional<z.ZodEnum<{
924
- oracle: "oracle";
925
- independentModel: "independentModel";
926
- }>>;
927
- }, z.core.$strip>>;
928
- startedAt: z.ZodString;
929
- summary: z.ZodString;
930
- typedVerdict: z.ZodOptional<z.ZodBoolean>;
931
- verdictSource: z.ZodOptional<z.ZodEnum<{
932
- footer: "footer";
933
- recovered: "recovered";
934
- }>>;
935
- }, z.core.$strip>>;
936
- schemaVersion: z.ZodLiteral<2>;
937
- }, z.core.$loose>;
938
835
  declare const BOUNDARY_REVIEW_PROOF_KIND = "boundary-review-proof";
939
836
  declare const boundaryReviewProofSchema: z.ZodObject<{
940
837
  boundary: z.ZodString;
@@ -1036,12 +933,15 @@ declare const boundaryCheckProofSchema: z.ZodObject<{
1036
933
  type BoundaryCheckProofRecord = z.infer<typeof boundaryCheckProofSchema>;
1037
934
  declare const PR_READY_SCHEMA_VERSION = 3;
1038
935
  /**
1039
- * The pr:ready proof versions a reader still accepts. `pr:ready` emits v3 only
1040
- * (#477) one current contract but v1 and v2 events were spooled before the
1041
- * bumps and HQ must ingest them without degrading, so the wire schema parses
1042
- * all three.
936
+ * The pr:ready proof versions a reader accepts: the current one only (#917
937
+ * item 1). #894 narrowed the nested readiness ledger to `schemaVersion: 2` and
938
+ * the `prVerify` tagged union, which no v1 or v2 pr:ready proof can satisfy.
939
+ * Advertising 1 and 2 here therefore promised an acceptance the nested schema
940
+ * already refused. Pre-1.0 posture applies: one current contract, no compat
941
+ * reader. An alpha.22 consumer must adopt alpha.23 before HQ ingests its
942
+ * pr:ready proofs.
1043
943
  */
1044
- declare const SUPPORTED_PR_READY_SCHEMA_VERSIONS: readonly [1, 2, 3];
944
+ declare const SUPPORTED_PR_READY_SCHEMA_VERSIONS: readonly [3];
1045
945
  declare const prReadyProofSchema: z.ZodObject<{
1046
946
  arming: z.ZodOptional<z.ZodObject<{
1047
947
  detail: z.ZodOptional<z.ZodString>;
@@ -1076,7 +976,6 @@ declare const prReadyProofSchema: z.ZodObject<{
1076
976
  review: "review";
1077
977
  verify: "verify";
1078
978
  }>;
1079
- inScope: z.ZodBoolean;
1080
979
  name: z.ZodString;
1081
980
  reason: z.ZodOptional<z.ZodString>;
1082
981
  scope: z.ZodOptional<z.ZodObject<{
@@ -1119,8 +1018,8 @@ declare const prReadyProofSchema: z.ZodObject<{
1119
1018
  clearedAt: z.ZodOptional<z.ZodString>;
1120
1019
  sessionId: z.ZodOptional<z.ZodString>;
1121
1020
  source: z.ZodEnum<{
1122
- cli: "cli";
1123
1021
  "check-run": "check-run";
1022
+ cli: "cli";
1124
1023
  }>;
1125
1024
  url: z.ZodString;
1126
1025
  }, z.core.$strip>>>;
@@ -1160,17 +1059,17 @@ declare const prReadyProofSchema: z.ZodObject<{
1160
1059
  }, z.core.$strip>;
1161
1060
  highestBlockingSeverity: z.ZodOptional<z.ZodEnum<{
1162
1061
  unknown: "unknown";
1062
+ critical: "critical";
1063
+ high: "high";
1163
1064
  low: "low";
1164
1065
  medium: "medium";
1165
- high: "high";
1166
- critical: "critical";
1167
1066
  }>>;
1168
1067
  highestOpenSeverity: z.ZodOptional<z.ZodEnum<{
1169
1068
  unknown: "unknown";
1069
+ critical: "critical";
1070
+ high: "high";
1170
1071
  low: "low";
1171
1072
  medium: "medium";
1172
- high: "high";
1173
- critical: "critical";
1174
1073
  }>>;
1175
1074
  maxReviewCycles: z.ZodOptional<z.ZodNumber>;
1176
1075
  nonBlockingFindings: z.ZodNumber;
@@ -1204,89 +1103,7 @@ declare const prReadyProofSchema: z.ZodObject<{
1204
1103
  "interior-complete": "interior-complete";
1205
1104
  }>;
1206
1105
  }, z.core.$strip>>;
1207
- reviewRuns: z.ZodOptional<z.ZodArray<z.ZodObject<{
1208
- command: z.ZodOptional<z.ZodString>;
1209
- durationMs: z.ZodNumber;
1210
- endedAt: z.ZodString;
1211
- exitCode: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
1212
- findings: z.ZodArray<z.ZodObject<{
1213
- blockingAfterCap: z.ZodOptional<z.ZodBoolean>;
1214
- body: z.ZodString;
1215
- category: z.ZodOptional<z.ZodEnum<{
1216
- unknown: "unknown";
1217
- correctness: "correctness";
1218
- safety: "safety";
1219
- coordination: "coordination";
1220
- maintainability: "maintainability";
1221
- }>>;
1222
- citedSpan: z.ZodOptional<z.ZodString>;
1223
- file: z.ZodOptional<z.ZodString>;
1224
- line: z.ZodOptional<z.ZodNumber>;
1225
- prescribedAction: z.ZodOptional<z.ZodString>;
1226
- priority: z.ZodOptional<z.ZodString>;
1227
- protocolFinding: z.ZodOptional<z.ZodLiteral<true>>;
1228
- supersedes: z.ZodOptional<z.ZodObject<{
1229
- file: z.ZodOptional<z.ZodString>;
1230
- title: z.ZodString;
1231
- }, z.core.$strip>>;
1232
- title: z.ZodString;
1233
- }, z.core.$strip>>;
1234
- issuesFlagged: z.ZodNumber;
1235
- kind: z.ZodEnum<{
1236
- correctness: "correctness";
1237
- security: "security";
1238
- }>;
1239
- model: z.ZodOptional<z.ZodString>;
1240
- outcome: z.ZodEnum<{
1241
- error: "error";
1242
- passed: "passed";
1243
- failed: "failed";
1244
- }>;
1245
- producer: z.ZodOptional<z.ZodString>;
1246
- promptSections: z.ZodOptional<z.ZodArray<z.ZodObject<{
1247
- provenance: z.ZodEnum<{
1248
- "prior-review-ledger": "prior-review-ledger";
1249
- "issue-review-focus": "issue-review-focus";
1250
- }>;
1251
- source: z.ZodString;
1252
- text: z.ZodString;
1253
- }, z.core.$strict>>>;
1254
- rung: z.ZodOptional<z.ZodEnum<{
1255
- "independent-model": "independent-model";
1256
- oracle: "oracle";
1257
- human: "human";
1258
- }>>;
1259
- sessionId: z.ZodOptional<z.ZodString>;
1260
- stageResolution: z.ZodOptional<z.ZodObject<{
1261
- effort: z.ZodOptional<z.ZodEnum<{
1262
- low: "low";
1263
- medium: "medium";
1264
- high: "high";
1265
- xhigh: "xhigh";
1266
- }>>;
1267
- engine: z.ZodString;
1268
- layerSource: z.ZodEnum<{
1269
- cli: "cli";
1270
- operatorSessionGlobal: "operatorSessionGlobal";
1271
- operatorSessionKind: "operatorSessionKind";
1272
- profilePin: "profilePin";
1273
- stageConfig: "stageConfig";
1274
- userConfig: "userConfig";
1275
- }>;
1276
- model: z.ZodString;
1277
- rung: z.ZodOptional<z.ZodEnum<{
1278
- oracle: "oracle";
1279
- independentModel: "independentModel";
1280
- }>>;
1281
- }, z.core.$strip>>;
1282
- startedAt: z.ZodString;
1283
- summary: z.ZodString;
1284
- typedVerdict: z.ZodOptional<z.ZodBoolean>;
1285
- verdictSource: z.ZodOptional<z.ZodEnum<{
1286
- footer: "footer";
1287
- recovered: "recovered";
1288
- }>>;
1289
- }, z.core.$strip>>>;
1106
+ reviewRuns: z.ZodOptional<z.ZodArray<z.ZodType<PrReviewResult, unknown, z.core.$ZodTypeInternals<PrReviewResult, unknown>>>>;
1290
1107
  reviewTerminalState: z.ZodOptional<z.ZodEnum<{
1291
1108
  blocked: "blocked";
1292
1109
  "accepted-with-findings": "accepted-with-findings";
@@ -1294,52 +1111,59 @@ declare const prReadyProofSchema: z.ZodObject<{
1294
1111
  }>>;
1295
1112
  reviews: z.ZodObject<{
1296
1113
  correctness: z.ZodObject<{
1297
- docsOnlyDeltaAccepted: z.ZodOptional<z.ZodBoolean>;
1298
1114
  required: z.ZodBoolean;
1299
1115
  reviewedHeadSha: z.ZodOptional<z.ZodString>;
1300
1116
  reviewedPatchId: z.ZodOptional<z.ZodString>;
1301
1117
  status: z.ZodEnum<{
1302
- "not-required": "not-required";
1303
1118
  blocked: "blocked";
1119
+ "not-required": "not-required";
1304
1120
  current: "current";
1305
1121
  stale: "stale";
1306
1122
  missing: "missing";
1307
1123
  }>;
1308
- }, z.core.$strip>;
1124
+ }, z.core.$strict>;
1309
1125
  security: z.ZodOptional<z.ZodObject<{
1310
- docsOnlyDeltaAccepted: z.ZodOptional<z.ZodBoolean>;
1311
1126
  required: z.ZodBoolean;
1312
1127
  reviewedHeadSha: z.ZodOptional<z.ZodString>;
1313
1128
  reviewedPatchId: z.ZodOptional<z.ZodString>;
1314
1129
  status: z.ZodEnum<{
1315
- "not-required": "not-required";
1316
1130
  blocked: "blocked";
1131
+ "not-required": "not-required";
1317
1132
  current: "current";
1318
1133
  stale: "stale";
1319
1134
  missing: "missing";
1320
1135
  }>;
1321
- }, z.core.$strip>>;
1136
+ }, z.core.$strict>>;
1322
1137
  }, z.core.$strip>;
1323
- schemaVersion: z.ZodLiteral<1>;
1138
+ schemaVersion: z.ZodLiteral<2>;
1324
1139
  stackRole: z.ZodOptional<z.ZodEnum<{
1325
1140
  single: "single";
1326
1141
  slice: "slice";
1327
1142
  rollup: "rollup";
1328
1143
  "merge-gate prerequisite": "merge-gate prerequisite";
1329
1144
  }>>;
1330
- verification: z.ZodObject<{
1145
+ verification: z.ZodDiscriminatedUnion<[z.ZodObject<{
1331
1146
  command: z.ZodLiteral<"patronage-factory pr:verify">;
1332
- docsOnlyDeltaAccepted: z.ZodOptional<z.ZodBoolean>;
1333
- docsOnlyVerifiedHeadSha: z.ZodOptional<z.ZodString>;
1334
- prVerify: z.ZodEnum<{
1335
- passed: "passed";
1336
- stale: "stale";
1337
- missing: "missing";
1338
- }>;
1339
- trivialDeltaAccepted: z.ZodOptional<z.ZodBoolean>;
1340
- trivialVerifiedHeadSha: z.ZodOptional<z.ZodString>;
1147
+ prVerify: z.ZodLiteral<"missing">;
1148
+ }, z.core.$strict>, z.ZodObject<{
1149
+ command: z.ZodLiteral<"patronage-factory pr:verify">;
1150
+ prVerify: z.ZodLiteral<"stale">;
1151
+ verifiedHeadSha: z.ZodString;
1152
+ }, z.core.$strict>, z.ZodObject<{
1153
+ command: z.ZodLiteral<"patronage-factory pr:verify">;
1154
+ prVerify: z.ZodLiteral<"passed-via-head">;
1155
+ verifiedHeadSha: z.ZodString;
1156
+ }, z.core.$strict>, z.ZodObject<{
1157
+ command: z.ZodLiteral<"patronage-factory pr:verify">;
1158
+ docsOnlyVerifiedHeadSha: z.ZodString;
1159
+ prVerify: z.ZodLiteral<"docs-only-delta">;
1341
1160
  verifiedHeadSha: z.ZodOptional<z.ZodString>;
1342
- }, z.core.$strip>;
1161
+ }, z.core.$strict>, z.ZodObject<{
1162
+ command: z.ZodLiteral<"patronage-factory pr:verify">;
1163
+ prVerify: z.ZodLiteral<"trivial-delta">;
1164
+ trivialVerifiedHeadSha: z.ZodString;
1165
+ verifiedHeadSha: z.ZodOptional<z.ZodString>;
1166
+ }, z.core.$strict>], "prVerify">;
1343
1167
  }, z.core.$strip>;
1344
1168
  notices: z.ZodOptional<z.ZodArray<z.ZodString>>;
1345
1169
  profileBlobSha: z.ZodOptional<z.ZodString>;
@@ -1354,7 +1178,7 @@ declare const prReadyProofSchema: z.ZodObject<{
1354
1178
  command: z.ZodString;
1355
1179
  }, z.core.$strip>>>;
1356
1180
  repository: z.ZodOptional<z.ZodString>;
1357
- schemaVersion: z.ZodNumber & z.ZodType<1 | 2 | 3, number, z.core.$ZodTypeInternals<1 | 2 | 3, number>>;
1181
+ schemaVersion: z.ZodLiteral<3>;
1358
1182
  status: z.ZodEnum<{
1359
1183
  ready: "ready";
1360
1184
  blocked: "blocked";
@@ -1363,4 +1187,4 @@ declare const prReadyProofSchema: z.ZodObject<{
1363
1187
  waivedDemands: z.ZodOptional<z.ZodArray<z.ZodType<WaivedDemand, unknown, z.core.$ZodTypeInternals<WaivedDemand, unknown>>>>;
1364
1188
  }, z.core.$strip>;
1365
1189
  //#endregion
1366
- export { BLOCKED_REASONS_MAX, BLOCKED_REASON_DETAIL_MAX, BOUNDARY_CHECK_SCHEMA_VERSION, BOUNDARY_REVIEW_PROOF_KIND, type BlockedReason, BoundaryCheckProofRecord, type BoundaryReviewProof, type CloseoutArtifact, EVIDENCE_ENVELOPE_SCHEMA_VERSION, type EvidenceEnvelope, PR_READY_SCHEMA_VERSION, PR_REVIEW_SCHEMA_VERSION, type PrReadyProof, type PrReviewProof, type PrVerifyProof, SUPPORTED_CLOSEOUT_SCHEMA_VERSIONS, SUPPORTED_PR_READY_SCHEMA_VERSIONS, SUPPORTED_PR_VERIFY_SCHEMA_VERSIONS, type WaivedDemand, blockedReasonSchema, blockedReasonsSchema, boundaryCheckProofSchema, boundaryReviewProofSchema, closeoutArtifactSchema, evidenceEnvelopeSchema, prReadyProofSchema, prReviewProofSchema, prVerifyProofSchema, waivedDemandSchema };
1190
+ export { BLOCKED_REASONS_MAX, BLOCKED_REASON_DETAIL_MAX, BOUNDARY_CHECK_SCHEMA_VERSION, BOUNDARY_REVIEW_PROOF_KIND, type BlockedReason, BoundaryCheckProofRecord, type BoundaryReviewProof, type CloseoutArtifact, EVIDENCE_ENVELOPE_SCHEMA_VERSION, type EvidenceEnvelope, PR_READY_SCHEMA_VERSION, PR_REVIEW_SCHEMA_VERSION, type PrReadyProof, type PrReviewProof, type PrVerifyProof, type ReviewPromptSection, type ReviewPromptSectionProvenance, SUPPORTED_CLOSEOUT_SCHEMA_VERSIONS, SUPPORTED_PR_READY_SCHEMA_VERSIONS, SUPPORTED_PR_VERIFY_SCHEMA_VERSIONS, type WaivedDemand, blockedReasonSchema, blockedReasonsSchema, boundaryCheckProofSchema, boundaryReviewProofSchema, closeoutArtifactSchema, evidenceEnvelopeSchema, prReadyProofSchema, prReviewFindingSchema, prReviewProofSchema, prReviewResultSchema, prVerifyProofSchema, reviewPromptSectionSchema, reviewPromptSectionsSchema, waivedDemandSchema };