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

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,5 +1,4 @@
1
1
  import { z } from "zod";
2
-
3
2
  //#region src/demand-waiver.d.ts
4
3
  /**
5
4
  * A demand that was in force, was NOT met, and was waived by the operator.
@@ -113,6 +112,33 @@ interface FollowUpAction {
113
112
  declare const DIFF_CLASSIFICATIONS: readonly ["docs/process-only", "trivial", "non-trivial"];
114
113
  type DiffClassification = (typeof DIFF_CLASSIFICATIONS)[number];
115
114
  //#endregion
115
+ //#region src/impact-stamp.d.ts
116
+ /**
117
+ * The recorded stamp. `targets` satisfies the completeness invariant: every
118
+ * target the profile declares is present, each with its exact basis — never
119
+ * silently absent. `basis: "conservative"` means an unmodelled or unprovable
120
+ * input widened every target to full impact.
121
+ */
122
+ declare const impactStampSchema: z.ZodObject<{
123
+ basis: z.ZodEnum<{
124
+ "target-scoped": "target-scoped";
125
+ conservative: "conservative";
126
+ }>;
127
+ inertPaths: z.ZodDefault<z.ZodArray<z.ZodString>>;
128
+ reasons: z.ZodArray<z.ZodString>;
129
+ stampVersion: z.ZodLiteral<3>;
130
+ targets: z.ZodArray<z.ZodObject<{
131
+ basis: z.ZodString;
132
+ impact: z.ZodEnum<{
133
+ affected: "affected";
134
+ "not-affected": "not-affected";
135
+ }>;
136
+ name: z.ZodString;
137
+ }, z.core.$strip>>;
138
+ unsubscribedPaths: z.ZodArray<z.ZodString>;
139
+ }, z.core.$strip>;
140
+ type ImpactStamp = z.infer<typeof impactStampSchema>;
141
+ //#endregion
116
142
  //#region src/pr-verify-mode.d.ts
117
143
  /**
118
144
  * The verification mode `pr:verify` resolved for a run.
@@ -242,7 +268,7 @@ interface PrReviewProof {
242
268
  cleanedPaths: string[];
243
269
  ladder?: PrReviewLadderState;
244
270
  reviewRequirement?: {
245
- reason: "no-applicable-mode";
271
+ reason: "no-applicable-mode" | "faithful-merge";
246
272
  status: "not-required";
247
273
  };
248
274
  reviews: PrReviewResult[];
@@ -417,6 +443,207 @@ type ReadinessRepair = z.infer<typeof readinessRepairSchema>;
417
443
  type ReadinessStatus = "ready" | "blocked";
418
444
  type ManagedReadinessLedger = z.infer<typeof managedReadinessLedgerSchema>;
419
445
  //#endregion
446
+ //#region src/catch-up-recognition-record.d.ts
447
+ interface CatchUpRecognition {
448
+ /** The ref the candidate targets, as the recognizing command resolved it. */
449
+ baseRef: string;
450
+ /** The live target tip at recognition time; the head's first parent. */
451
+ baseTipSha: string;
452
+ /** The head's second parent: the admitted base-side content merged in. */
453
+ mergedParentSha: string;
454
+ /**
455
+ * The tree `git merge-tree --write-tree` produced for the two parents. It
456
+ * equals the head's own tree; that equality is the faithfulness proof.
457
+ */
458
+ mergedTreeSha: string;
459
+ /** The ref that proves the second parent is admitted content. */
460
+ upstreamRef: string;
461
+ }
462
+ //#endregion
463
+ //#region src/pr-verify-proof-contract.d.ts
464
+ declare const SUPPORTED_PR_VERIFY_SCHEMA_VERSIONS: readonly [1, 2, 3, 4];
465
+ type PrVerifySchemaVersion = (typeof SUPPORTED_PR_VERIFY_SCHEMA_VERSIONS)[number];
466
+ interface PrVerifyCommandResult {
467
+ command: string;
468
+ description: string;
469
+ /**
470
+ * Epic #550 wave 3 (#430): the profile's declared impact target for this
471
+ * command, recorded from v4 on. It is the proof's own command→target
472
+ * mapping: a `notRequiredCommands` entry must name the target recorded HERE
473
+ * for the same command, so a withholding cannot point at whichever released
474
+ * target happens to be convenient. Absent for a command the profile does
475
+ * not scope, and for v1–v3 proofs, which predate the field.
476
+ */
477
+ impactTarget?: string;
478
+ name: string;
479
+ scope: "always" | "docs-only" | "trivial" | "full";
480
+ }
481
+ interface PrVerifyExecutedCommand {
482
+ command: string;
483
+ counts?: {
484
+ testFiles?: number;
485
+ tests?: number;
486
+ };
487
+ durationMs: number;
488
+ exitCode: number;
489
+ name: string;
490
+ scope: "always" | "docs-only" | "trivial" | "full";
491
+ }
492
+ /**
493
+ * Epic #550 wave 3 (#430): a verification command the impact stamp proved this
494
+ * candidate cannot reach, so the battery did not run it.
495
+ *
496
+ * The completeness invariant lives in the pairing: `verificationCommands`
497
+ * records every command the resolved mode selected, `executedCommands` records
498
+ * what ran, and this list records the rest WITH the stamp's own basis. A
499
+ * withheld stack is therefore never silently absent from the proof — it is
500
+ * present, named, and explained.
501
+ */
502
+ interface PrVerifyNotRequiredCommand {
503
+ basis: string;
504
+ impactTarget: string;
505
+ name: string;
506
+ }
507
+ /**
508
+ * Epic #758 (#762): a consumer package a stamp-scoped selection skipped, and
509
+ * why. Bound to the proof's stamp identity — the field is v4-only (the same
510
+ * window that can carry `impactStamp`) and refused when the proof records no
511
+ * stamp. The factory does not write this list; consumers do.
512
+ */
513
+ interface PrVerifyNotDemandedRecord {
514
+ basis: string;
515
+ name: string;
516
+ }
517
+ interface PrVerifyProof {
518
+ schemaVersion: PrVerifySchemaVersion;
519
+ authoringSession?: string;
520
+ base: string;
521
+ baselineFullProofs?: {
522
+ base: string;
523
+ changedFiles: string[];
524
+ headSha: string;
525
+ profilePath: string;
526
+ projectKey: string;
527
+ repository: string;
528
+ }[];
529
+ catchUpRecognition?: CatchUpRecognition;
530
+ changedFiles: string[];
531
+ classification: DiffClassification;
532
+ classificationReasons: string[];
533
+ command: "patronage-factory pr:verify";
534
+ durationMs: number;
535
+ endedAt: string;
536
+ executedCommands?: PrVerifyExecutedCommand[];
537
+ headSha: string;
538
+ impactStamp?: ImpactStamp;
539
+ mode: ResolvedPrVerifyMode;
540
+ mergeBaseSha?: string;
541
+ notDemandedRecords?: PrVerifyNotDemandedRecord[];
542
+ notRequiredCommands?: PrVerifyNotRequiredCommand[];
543
+ outcome?: "aborted" | "passed";
544
+ patchId?: string;
545
+ profilePath: string;
546
+ projectKey: string;
547
+ repository: string;
548
+ startedAt: string;
549
+ verificationCommands: PrVerifyCommandResult[];
550
+ }
551
+ declare const prVerifyProofSchema: z.ZodObject<{
552
+ authoringSession: z.ZodOptional<z.ZodString>;
553
+ base: z.ZodString;
554
+ baselineFullProofs: z.ZodOptional<z.ZodArray<z.ZodObject<{
555
+ base: z.ZodString;
556
+ changedFiles: z.ZodArray<z.ZodString>;
557
+ headSha: z.ZodString;
558
+ profilePath: z.ZodString;
559
+ projectKey: z.ZodString;
560
+ repository: z.ZodString;
561
+ }, z.core.$strip>>>;
562
+ catchUpRecognition: z.ZodOptional<z.ZodType<CatchUpRecognition, unknown, z.core.$ZodTypeInternals<CatchUpRecognition, unknown>>>;
563
+ changedFiles: z.ZodArray<z.ZodString>;
564
+ classification: z.ZodEnum<{
565
+ "docs/process-only": "docs/process-only";
566
+ trivial: "trivial";
567
+ "non-trivial": "non-trivial";
568
+ }>;
569
+ classificationReasons: z.ZodArray<z.ZodString>;
570
+ command: z.ZodLiteral<"patronage-factory pr:verify">;
571
+ durationMs: z.ZodNumber;
572
+ endedAt: z.ZodISODateTime;
573
+ executedCommands: z.ZodOptional<z.ZodArray<z.ZodObject<{
574
+ command: z.ZodString;
575
+ counts: z.ZodOptional<z.ZodObject<{
576
+ testFiles: z.ZodOptional<z.ZodNumber>;
577
+ tests: z.ZodOptional<z.ZodNumber>;
578
+ }, z.core.$strip>>;
579
+ durationMs: z.ZodNumber;
580
+ exitCode: z.ZodNumber;
581
+ name: z.ZodString;
582
+ scope: z.ZodEnum<{
583
+ trivial: "trivial";
584
+ always: "always";
585
+ "docs-only": "docs-only";
586
+ full: "full";
587
+ }>;
588
+ }, z.core.$strip>>>;
589
+ headSha: z.ZodString;
590
+ impactStamp: z.ZodOptional<z.ZodObject<{
591
+ basis: z.ZodEnum<{
592
+ "target-scoped": "target-scoped";
593
+ conservative: "conservative";
594
+ }>;
595
+ inertPaths: z.ZodDefault<z.ZodArray<z.ZodString>>;
596
+ reasons: z.ZodArray<z.ZodString>;
597
+ stampVersion: z.ZodLiteral<3>;
598
+ targets: z.ZodArray<z.ZodObject<{
599
+ basis: z.ZodString;
600
+ impact: z.ZodEnum<{
601
+ affected: "affected";
602
+ "not-affected": "not-affected";
603
+ }>;
604
+ name: z.ZodString;
605
+ }, z.core.$strip>>;
606
+ unsubscribedPaths: z.ZodArray<z.ZodString>;
607
+ }, z.core.$strip>>;
608
+ mergeBaseSha: z.ZodOptional<z.ZodString>;
609
+ mode: z.ZodEnum<{
610
+ trivial: "trivial";
611
+ "docs-only": "docs-only";
612
+ full: "full";
613
+ }>;
614
+ notDemandedRecords: z.ZodOptional<z.ZodArray<z.ZodObject<{
615
+ basis: z.ZodString;
616
+ name: z.ZodString;
617
+ }, z.core.$strip>>>;
618
+ notRequiredCommands: z.ZodOptional<z.ZodArray<z.ZodObject<{
619
+ basis: z.ZodString;
620
+ impactTarget: z.ZodString;
621
+ name: z.ZodString;
622
+ }, z.core.$strip>>>;
623
+ outcome: z.ZodOptional<z.ZodEnum<{
624
+ passed: "passed";
625
+ aborted: "aborted";
626
+ }>>;
627
+ patchId: z.ZodOptional<z.ZodString>;
628
+ profilePath: z.ZodString;
629
+ projectKey: z.ZodString;
630
+ repository: z.ZodString;
631
+ schemaVersion: z.ZodNumber & z.ZodType<1 | 2 | 3 | 4, number, z.core.$ZodTypeInternals<1 | 2 | 3 | 4, number>>;
632
+ startedAt: z.ZodISODateTime;
633
+ verificationCommands: z.ZodArray<z.ZodObject<{
634
+ command: z.ZodString;
635
+ description: z.ZodString;
636
+ impactTarget: z.ZodOptional<z.ZodString>;
637
+ name: z.ZodString;
638
+ scope: z.ZodEnum<{
639
+ trivial: "trivial";
640
+ always: "always";
641
+ "docs-only": "docs-only";
642
+ full: "full";
643
+ }>;
644
+ }, z.core.$strip>>;
645
+ }, z.core.$strip>;
646
+ //#endregion
420
647
  //#region src/pr-ready.d.ts
421
648
  interface PrReadyProof {
422
649
  schemaVersion: 3;
@@ -484,31 +711,6 @@ interface PrReadyProof {
484
711
  waivedDemands?: WaivedDemand[];
485
712
  }
486
713
  //#endregion
487
- //#region src/impact-stamp.d.ts
488
- /**
489
- * The recorded stamp. `targets` satisfies the completeness invariant: every
490
- * target the profile declares is present, each with its exact basis — never
491
- * silently absent. `basis: "conservative"` means an unmodelled or unprovable
492
- * input widened every target to full impact.
493
- */
494
- declare const impactStampSchema: z.ZodObject<{
495
- basis: z.ZodEnum<{
496
- "target-scoped": "target-scoped";
497
- conservative: "conservative";
498
- }>;
499
- reasons: z.ZodArray<z.ZodString>;
500
- stampVersion: z.ZodLiteral<2>;
501
- targets: z.ZodArray<z.ZodObject<{
502
- basis: z.ZodString;
503
- impact: z.ZodEnum<{
504
- affected: "affected";
505
- "not-affected": "not-affected";
506
- }>;
507
- name: z.ZodString;
508
- }, z.core.$strip>>;
509
- }, z.core.$strip>;
510
- type ImpactStamp = z.infer<typeof impactStampSchema>;
511
- //#endregion
512
714
  //#region src/pr-readiness/external-evidence.d.ts
513
715
  declare const evidenceEnvelopeBaseSchema: z.ZodObject<{
514
716
  check: z.ZodString;
@@ -539,112 +741,14 @@ declare const evidenceEnvelopeBaseSchema: z.ZodObject<{
539
741
  }, z.core.$loose>;
540
742
  type EvidenceEnvelope = z.infer<typeof evidenceEnvelopeBaseSchema>;
541
743
  //#endregion
542
- //#region src/pr-readiness/verification-proof.d.ts
543
- declare const SUPPORTED_PR_VERIFY_SCHEMA_VERSIONS$1: readonly [1, 2, 3, 4];
544
- type PrVerifySchemaVersion = (typeof SUPPORTED_PR_VERIFY_SCHEMA_VERSIONS$1)[number];
545
- interface PrVerifyCommandResult {
546
- command: string;
547
- description: string;
548
- /**
549
- * Epic #550 wave 3 (#430): the profile's declared impact target for this
550
- * command, recorded from v4 on. It is the proof's own command→target
551
- * mapping: a `notRequiredCommands` entry must name the target recorded HERE
552
- * for the same command, so a withholding cannot point at whichever released
553
- * target happens to be convenient. Absent for a command the profile does
554
- * not scope, and for v1–v3 proofs, which predate the field.
555
- */
556
- impactTarget?: string;
557
- name: string;
558
- scope: "always" | "docs-only" | "trivial" | "full";
559
- }
560
- interface PrVerifyExecutedCommand {
561
- command: string;
562
- counts?: {
563
- testFiles?: number;
564
- tests?: number;
565
- };
566
- durationMs: number;
567
- exitCode: number;
568
- name: string;
569
- scope: "always" | "docs-only" | "trivial" | "full";
570
- }
571
- /**
572
- * Epic #550 wave 3 (#430): a verification command the impact stamp proved this
573
- * candidate cannot reach, so the battery did not run it.
574
- *
575
- * The completeness invariant lives in the pairing: `verificationCommands`
576
- * records every command the resolved mode selected, `executedCommands` records
577
- * what ran, and this list records the rest WITH the stamp's own basis. A
578
- * withheld stack is therefore never silently absent from the proof — it is
579
- * present, named, and explained.
580
- */
581
- interface PrVerifyNotRequiredCommand {
582
- basis: string;
583
- impactTarget: string;
584
- name: string;
585
- }
586
- interface PrVerifyProof {
587
- schemaVersion: PrVerifySchemaVersion;
588
- authoringSession?: string;
589
- base: string;
590
- baselineFullProofs?: {
591
- base: string;
592
- changedFiles: string[];
593
- headSha: string;
594
- profilePath: string;
595
- projectKey: string;
596
- repository: string;
597
- }[];
598
- changedFiles: string[];
599
- classification: DiffClassification;
600
- classificationReasons: string[];
601
- command: "patronage-factory pr:verify";
602
- durationMs: number;
603
- endedAt: string;
604
- executedCommands?: PrVerifyExecutedCommand[];
605
- headSha: string;
606
- impactStamp?: ImpactStamp;
607
- mode: ResolvedPrVerifyMode;
608
- mergeBaseSha?: string;
609
- notRequiredCommands?: PrVerifyNotRequiredCommand[];
610
- outcome?: "aborted" | "passed";
611
- patchId?: string;
612
- profilePath: string;
613
- projectKey: string;
614
- repository: string;
615
- startedAt: string;
616
- verificationCommands: PrVerifyCommandResult[];
617
- }
618
- //#endregion
619
744
  //#region src/closeout-artifact.d.ts
620
- /** Current writer plus retained reader versions accepted at ingest. */
621
- declare const SUPPORTED_CLOSEOUT_SCHEMA_VERSIONS: readonly [3, 4];
745
+ /** Artifact versions accepted at ingest. */
746
+ declare const SUPPORTED_CLOSEOUT_SCHEMA_VERSIONS: readonly [5];
622
747
  /** Strict, bounded runtime transport contract emitted by factory:closeout. */
623
748
  declare const closeoutArtifactSchema: z.ZodObject<{
624
- boundaryThermo: z.ZodObject<{
625
- owner: z.ZodString;
626
- runs: z.ZodNumber;
627
- waived: z.ZodBoolean;
628
- waiverRationale: z.ZodOptional<z.ZodString>;
629
- }, z.core.$strict>;
630
749
  budget: z.ZodObject<{
631
750
  note: z.ZodString;
632
751
  tier: z.ZodLiteral<"overseer">;
633
- }, z.core.$strict> | z.ZodObject<{
634
- interiorSourcesConsumed: z.ZodNumber;
635
- note: z.ZodString;
636
- scoping: z.ZodOptional<z.ZodObject<{
637
- epic: z.ZodString;
638
- issueFilter: z.ZodOptional<z.ZodNumber>;
639
- prFilter: z.ZodOptional<z.ZodNumber>;
640
- repo: z.ZodString;
641
- scopedByEpicIssueSet: z.ZodBoolean;
642
- window: z.ZodObject<{
643
- from: z.ZodString;
644
- to: z.ZodString;
645
- }, z.core.$strict>;
646
- }, z.core.$strict>>;
647
- tier: z.ZodLiteral<"overseer">;
648
752
  }, z.core.$strict>;
649
753
  couldNotSee: z.ZodArray<z.ZodObject<{
650
754
  id: z.ZodString;
@@ -653,82 +757,12 @@ declare const closeoutArtifactSchema: z.ZodObject<{
653
757
  }, z.core.$strict>>;
654
758
  epic: z.ZodString;
655
759
  generatedAt: z.ZodISODateTime;
656
- ledgerRows: z.ZodArray<z.ZodObject<{
657
- detail: z.ZodOptional<z.ZodString>;
658
- epic: z.ZodString;
659
- generatedAt: z.ZodISODateTime;
660
- key: z.ZodString;
661
- landingSpot: z.ZodOptional<z.ZodEnum<{
662
- CLI: "CLI";
663
- profile: "profile";
664
- skill: "skill";
665
- ADR: "ADR";
666
- }>>;
667
- repo: z.ZodString;
668
- rowType: z.ZodEnum<{
669
- metric: "metric";
670
- lesson: "lesson";
671
- blindspot: "blindspot";
672
- }>;
673
- schemaVersion: z.ZodLiteral<3 | 4>;
674
- source: z.ZodString;
675
- unit: z.ZodOptional<z.ZodString>;
676
- value: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodNull]>;
677
- }, z.core.$strict>>;
678
- lessons: z.ZodArray<z.ZodObject<{
679
- id: z.ZodString;
680
- landingSpot: z.ZodEnum<{
681
- CLI: "CLI";
682
- profile: "profile";
683
- skill: "skill";
684
- ADR: "ADR";
685
- }>;
686
- lesson: z.ZodString;
687
- rationale: z.ZodOptional<z.ZodString>;
688
- source: z.ZodOptional<z.ZodObject<{
689
- detail: z.ZodString;
690
- kind: z.ZodLiteral<"boundary-thermo-attestation">;
691
- }, z.core.$strict>>;
692
- }, z.core.$strict> | z.ZodObject<{
693
- id: z.ZodString;
694
- landingSpot: z.ZodEnum<{
695
- CLI: "CLI";
696
- profile: "profile";
697
- skill: "skill";
698
- ADR: "ADR";
699
- }>;
700
- lesson: z.ZodString;
701
- rationale: z.ZodOptional<z.ZodString>;
702
- source: z.ZodOptional<z.ZodObject<{
703
- detail: z.ZodString;
704
- kind: z.ZodEnum<{
705
- "boundary-thermo-attestation": "boundary-thermo-attestation";
706
- "interior-telemetry": "interior-telemetry";
707
- }>;
708
- }, z.core.$strict>>;
709
- }, z.core.$strict>>;
710
760
  metrics: z.ZodArray<z.ZodObject<{
711
761
  label: z.ZodString;
712
762
  metric: z.ZodString;
713
763
  source: z.ZodObject<{
714
764
  detail: z.ZodString;
715
- kind: z.ZodLiteral<"boundary-thermo-attestation">;
716
- }, z.core.$strict>;
717
- unit: z.ZodEnum<{
718
- boolean: "boolean";
719
- text: "text";
720
- count: "count";
721
- }>;
722
- value: z.ZodUnion<readonly [z.ZodNumber, z.ZodString, z.ZodBoolean, z.ZodNull]>;
723
- }, z.core.$strict> | z.ZodObject<{
724
- label: z.ZodString;
725
- metric: z.ZodString;
726
- source: z.ZodObject<{
727
- detail: z.ZodString;
728
- kind: z.ZodEnum<{
729
- "boundary-thermo-attestation": "boundary-thermo-attestation";
730
- "interior-telemetry": "interior-telemetry";
731
- }>;
765
+ kind: z.ZodLiteral<"token-harvest">;
732
766
  }, z.core.$strict>;
733
767
  unit: z.ZodEnum<{
734
768
  boolean: "boolean";
@@ -736,561 +770,13 @@ declare const closeoutArtifactSchema: z.ZodObject<{
736
770
  count: "count";
737
771
  tokens: "tokens";
738
772
  usd: "usd";
739
- ratio: "ratio";
740
773
  }>;
741
774
  value: z.ZodUnion<readonly [z.ZodNumber, z.ZodString, z.ZodBoolean, z.ZodNull]>;
742
775
  }, z.core.$strict>>;
743
776
  repo: z.ZodString;
744
- schemaVersion: z.ZodLiteral<3 | 4>;
777
+ schemaVersion: z.ZodLiteral<5>;
745
778
  }, z.core.$strict>;
746
- /** Reader-only compatibility for closeout artifacts written before #554. */
747
- declare const legacyCloseoutArtifactSchema: z.ZodObject<{
748
- boundaryThermo: z.ZodObject<{
749
- owner: z.ZodString;
750
- runs: z.ZodNumber;
751
- waived: z.ZodBoolean;
752
- waiverRationale: z.ZodOptional<z.ZodString>;
753
- }, z.core.$strict>;
754
- budget: z.ZodObject<{
755
- note: z.ZodString;
756
- tier: z.ZodLiteral<"overseer">;
757
- }, z.core.$strict> | z.ZodObject<{
758
- interiorSourcesConsumed: z.ZodNumber;
759
- note: z.ZodString;
760
- scoping: z.ZodOptional<z.ZodObject<{
761
- epic: z.ZodString;
762
- issueFilter: z.ZodOptional<z.ZodNumber>;
763
- prFilter: z.ZodOptional<z.ZodNumber>;
764
- repo: z.ZodString;
765
- scopedByEpicIssueSet: z.ZodBoolean;
766
- window: z.ZodObject<{
767
- from: z.ZodString;
768
- to: z.ZodString;
769
- }, z.core.$strict>;
770
- }, z.core.$strict>>;
771
- tier: z.ZodLiteral<"overseer">;
772
- }, z.core.$strict>;
773
- couldNotSee: z.ZodArray<z.ZodObject<{
774
- id: z.ZodString;
775
- note: z.ZodString;
776
- reason: z.ZodOptional<z.ZodString>;
777
- }, z.core.$strict>>;
778
- epic: z.ZodString;
779
- generatedAt: z.ZodISODateTime;
780
- ledgerRows: z.ZodArray<z.ZodObject<{
781
- detail: z.ZodOptional<z.ZodString>;
782
- epic: z.ZodString;
783
- generatedAt: z.ZodISODateTime;
784
- key: z.ZodString;
785
- landingSpot: z.ZodOptional<z.ZodEnum<{
786
- CLI: "CLI";
787
- profile: "profile";
788
- skill: "skill";
789
- ADR: "ADR";
790
- }>>;
791
- repo: z.ZodString;
792
- rowType: z.ZodEnum<{
793
- metric: "metric";
794
- lesson: "lesson";
795
- blindspot: "blindspot";
796
- }>;
797
- schemaVersion: z.ZodLiteral<3 | 4>;
798
- source: z.ZodString;
799
- unit: z.ZodOptional<z.ZodString>;
800
- value: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodNull]>;
801
- }, z.core.$strict>>;
802
- lessons: z.ZodArray<z.ZodObject<{
803
- id: z.ZodString;
804
- landingSpot: z.ZodEnum<{
805
- CLI: "CLI";
806
- profile: "profile";
807
- skill: "skill";
808
- ADR: "ADR";
809
- }>;
810
- lesson: z.ZodString;
811
- rationale: z.ZodOptional<z.ZodString>;
812
- source: z.ZodOptional<z.ZodObject<{
813
- detail: z.ZodString;
814
- kind: z.ZodLiteral<"boundary-thermo-attestation">;
815
- }, z.core.$strict>>;
816
- }, z.core.$strict> | z.ZodObject<{
817
- id: z.ZodString;
818
- landingSpot: z.ZodEnum<{
819
- CLI: "CLI";
820
- profile: "profile";
821
- skill: "skill";
822
- ADR: "ADR";
823
- }>;
824
- lesson: z.ZodString;
825
- rationale: z.ZodOptional<z.ZodString>;
826
- source: z.ZodOptional<z.ZodObject<{
827
- detail: z.ZodString;
828
- kind: z.ZodEnum<{
829
- "boundary-thermo-attestation": "boundary-thermo-attestation";
830
- "interior-telemetry": "interior-telemetry";
831
- }>;
832
- }, z.core.$strict>>;
833
- }, z.core.$strict>>;
834
- metrics: z.ZodArray<z.ZodObject<{
835
- label: z.ZodString;
836
- metric: z.ZodString;
837
- source: z.ZodObject<{
838
- detail: z.ZodString;
839
- kind: z.ZodLiteral<"boundary-thermo-attestation">;
840
- }, z.core.$strict>;
841
- unit: z.ZodEnum<{
842
- boolean: "boolean";
843
- text: "text";
844
- count: "count";
845
- }>;
846
- value: z.ZodUnion<readonly [z.ZodNumber, z.ZodString, z.ZodBoolean, z.ZodNull]>;
847
- }, z.core.$strict> | z.ZodObject<{
848
- label: z.ZodString;
849
- metric: z.ZodString;
850
- source: z.ZodObject<{
851
- detail: z.ZodString;
852
- kind: z.ZodEnum<{
853
- "boundary-thermo-attestation": "boundary-thermo-attestation";
854
- "interior-telemetry": "interior-telemetry";
855
- }>;
856
- }, z.core.$strict>;
857
- unit: z.ZodEnum<{
858
- boolean: "boolean";
859
- text: "text";
860
- count: "count";
861
- tokens: "tokens";
862
- usd: "usd";
863
- ratio: "ratio";
864
- }>;
865
- value: z.ZodUnion<readonly [z.ZodNumber, z.ZodString, z.ZodBoolean, z.ZodNull]>;
866
- }, z.core.$strict>>;
867
- repo: z.ZodString;
868
- schemaVersion: z.ZodLiteral<3 | 4>;
869
- }, z.core.$strict>;
870
- /** Accept current output and retained v3 artifacts when reading or replaying. */
871
- declare const closeoutArtifactReadSchema: z.ZodUnion<readonly [z.ZodObject<{
872
- boundaryThermo: z.ZodObject<{
873
- owner: z.ZodString;
874
- runs: z.ZodNumber;
875
- waived: z.ZodBoolean;
876
- waiverRationale: z.ZodOptional<z.ZodString>;
877
- }, z.core.$strict>;
878
- budget: z.ZodObject<{
879
- note: z.ZodString;
880
- tier: z.ZodLiteral<"overseer">;
881
- }, z.core.$strict> | z.ZodObject<{
882
- interiorSourcesConsumed: z.ZodNumber;
883
- note: z.ZodString;
884
- scoping: z.ZodOptional<z.ZodObject<{
885
- epic: z.ZodString;
886
- issueFilter: z.ZodOptional<z.ZodNumber>;
887
- prFilter: z.ZodOptional<z.ZodNumber>;
888
- repo: z.ZodString;
889
- scopedByEpicIssueSet: z.ZodBoolean;
890
- window: z.ZodObject<{
891
- from: z.ZodString;
892
- to: z.ZodString;
893
- }, z.core.$strict>;
894
- }, z.core.$strict>>;
895
- tier: z.ZodLiteral<"overseer">;
896
- }, z.core.$strict>;
897
- couldNotSee: z.ZodArray<z.ZodObject<{
898
- id: z.ZodString;
899
- note: z.ZodString;
900
- reason: z.ZodOptional<z.ZodString>;
901
- }, z.core.$strict>>;
902
- epic: z.ZodString;
903
- generatedAt: z.ZodISODateTime;
904
- ledgerRows: z.ZodArray<z.ZodObject<{
905
- detail: z.ZodOptional<z.ZodString>;
906
- epic: z.ZodString;
907
- generatedAt: z.ZodISODateTime;
908
- key: z.ZodString;
909
- landingSpot: z.ZodOptional<z.ZodEnum<{
910
- CLI: "CLI";
911
- profile: "profile";
912
- skill: "skill";
913
- ADR: "ADR";
914
- }>>;
915
- repo: z.ZodString;
916
- rowType: z.ZodEnum<{
917
- metric: "metric";
918
- lesson: "lesson";
919
- blindspot: "blindspot";
920
- }>;
921
- schemaVersion: z.ZodLiteral<3 | 4>;
922
- source: z.ZodString;
923
- unit: z.ZodOptional<z.ZodString>;
924
- value: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodNull]>;
925
- }, z.core.$strict>>;
926
- lessons: z.ZodArray<z.ZodObject<{
927
- id: z.ZodString;
928
- landingSpot: z.ZodEnum<{
929
- CLI: "CLI";
930
- profile: "profile";
931
- skill: "skill";
932
- ADR: "ADR";
933
- }>;
934
- lesson: z.ZodString;
935
- rationale: z.ZodOptional<z.ZodString>;
936
- source: z.ZodOptional<z.ZodObject<{
937
- detail: z.ZodString;
938
- kind: z.ZodLiteral<"boundary-thermo-attestation">;
939
- }, z.core.$strict>>;
940
- }, z.core.$strict> | z.ZodObject<{
941
- id: z.ZodString;
942
- landingSpot: z.ZodEnum<{
943
- CLI: "CLI";
944
- profile: "profile";
945
- skill: "skill";
946
- ADR: "ADR";
947
- }>;
948
- lesson: z.ZodString;
949
- rationale: z.ZodOptional<z.ZodString>;
950
- source: z.ZodOptional<z.ZodObject<{
951
- detail: z.ZodString;
952
- kind: z.ZodEnum<{
953
- "boundary-thermo-attestation": "boundary-thermo-attestation";
954
- "interior-telemetry": "interior-telemetry";
955
- }>;
956
- }, z.core.$strict>>;
957
- }, z.core.$strict>>;
958
- metrics: z.ZodArray<z.ZodObject<{
959
- label: z.ZodString;
960
- metric: z.ZodString;
961
- source: z.ZodObject<{
962
- detail: z.ZodString;
963
- kind: z.ZodLiteral<"boundary-thermo-attestation">;
964
- }, z.core.$strict>;
965
- unit: z.ZodEnum<{
966
- boolean: "boolean";
967
- text: "text";
968
- count: "count";
969
- }>;
970
- value: z.ZodUnion<readonly [z.ZodNumber, z.ZodString, z.ZodBoolean, z.ZodNull]>;
971
- }, z.core.$strict> | z.ZodObject<{
972
- label: z.ZodString;
973
- metric: z.ZodString;
974
- source: z.ZodObject<{
975
- detail: z.ZodString;
976
- kind: z.ZodEnum<{
977
- "boundary-thermo-attestation": "boundary-thermo-attestation";
978
- "interior-telemetry": "interior-telemetry";
979
- }>;
980
- }, z.core.$strict>;
981
- unit: z.ZodEnum<{
982
- boolean: "boolean";
983
- text: "text";
984
- count: "count";
985
- tokens: "tokens";
986
- usd: "usd";
987
- ratio: "ratio";
988
- }>;
989
- value: z.ZodUnion<readonly [z.ZodNumber, z.ZodString, z.ZodBoolean, z.ZodNull]>;
990
- }, z.core.$strict>>;
991
- repo: z.ZodString;
992
- schemaVersion: z.ZodLiteral<3 | 4>;
993
- }, z.core.$strict>, z.ZodObject<{
994
- boundaryThermo: z.ZodObject<{
995
- owner: z.ZodString;
996
- runs: z.ZodNumber;
997
- waived: z.ZodBoolean;
998
- waiverRationale: z.ZodOptional<z.ZodString>;
999
- }, z.core.$strict>;
1000
- budget: z.ZodObject<{
1001
- note: z.ZodString;
1002
- tier: z.ZodLiteral<"overseer">;
1003
- }, z.core.$strict> | z.ZodObject<{
1004
- interiorSourcesConsumed: z.ZodNumber;
1005
- note: z.ZodString;
1006
- scoping: z.ZodOptional<z.ZodObject<{
1007
- epic: z.ZodString;
1008
- issueFilter: z.ZodOptional<z.ZodNumber>;
1009
- prFilter: z.ZodOptional<z.ZodNumber>;
1010
- repo: z.ZodString;
1011
- scopedByEpicIssueSet: z.ZodBoolean;
1012
- window: z.ZodObject<{
1013
- from: z.ZodString;
1014
- to: z.ZodString;
1015
- }, z.core.$strict>;
1016
- }, z.core.$strict>>;
1017
- tier: z.ZodLiteral<"overseer">;
1018
- }, z.core.$strict>;
1019
- couldNotSee: z.ZodArray<z.ZodObject<{
1020
- id: z.ZodString;
1021
- note: z.ZodString;
1022
- reason: z.ZodOptional<z.ZodString>;
1023
- }, z.core.$strict>>;
1024
- epic: z.ZodString;
1025
- generatedAt: z.ZodISODateTime;
1026
- ledgerRows: z.ZodArray<z.ZodObject<{
1027
- detail: z.ZodOptional<z.ZodString>;
1028
- epic: z.ZodString;
1029
- generatedAt: z.ZodISODateTime;
1030
- key: z.ZodString;
1031
- landingSpot: z.ZodOptional<z.ZodEnum<{
1032
- CLI: "CLI";
1033
- profile: "profile";
1034
- skill: "skill";
1035
- ADR: "ADR";
1036
- }>>;
1037
- repo: z.ZodString;
1038
- rowType: z.ZodEnum<{
1039
- metric: "metric";
1040
- lesson: "lesson";
1041
- blindspot: "blindspot";
1042
- }>;
1043
- schemaVersion: z.ZodLiteral<3 | 4>;
1044
- source: z.ZodString;
1045
- unit: z.ZodOptional<z.ZodString>;
1046
- value: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodNull]>;
1047
- }, z.core.$strict>>;
1048
- lessons: z.ZodArray<z.ZodObject<{
1049
- id: z.ZodString;
1050
- landingSpot: z.ZodEnum<{
1051
- CLI: "CLI";
1052
- profile: "profile";
1053
- skill: "skill";
1054
- ADR: "ADR";
1055
- }>;
1056
- lesson: z.ZodString;
1057
- rationale: z.ZodOptional<z.ZodString>;
1058
- source: z.ZodOptional<z.ZodObject<{
1059
- detail: z.ZodString;
1060
- kind: z.ZodLiteral<"boundary-thermo-attestation">;
1061
- }, z.core.$strict>>;
1062
- }, z.core.$strict> | z.ZodObject<{
1063
- id: z.ZodString;
1064
- landingSpot: z.ZodEnum<{
1065
- CLI: "CLI";
1066
- profile: "profile";
1067
- skill: "skill";
1068
- ADR: "ADR";
1069
- }>;
1070
- lesson: z.ZodString;
1071
- rationale: z.ZodOptional<z.ZodString>;
1072
- source: z.ZodOptional<z.ZodObject<{
1073
- detail: z.ZodString;
1074
- kind: z.ZodEnum<{
1075
- "boundary-thermo-attestation": "boundary-thermo-attestation";
1076
- "interior-telemetry": "interior-telemetry";
1077
- }>;
1078
- }, z.core.$strict>>;
1079
- }, z.core.$strict>>;
1080
- metrics: z.ZodArray<z.ZodObject<{
1081
- label: z.ZodString;
1082
- metric: z.ZodString;
1083
- source: z.ZodObject<{
1084
- detail: z.ZodString;
1085
- kind: z.ZodLiteral<"boundary-thermo-attestation">;
1086
- }, z.core.$strict>;
1087
- unit: z.ZodEnum<{
1088
- boolean: "boolean";
1089
- text: "text";
1090
- count: "count";
1091
- }>;
1092
- value: z.ZodUnion<readonly [z.ZodNumber, z.ZodString, z.ZodBoolean, z.ZodNull]>;
1093
- }, z.core.$strict> | z.ZodObject<{
1094
- label: z.ZodString;
1095
- metric: z.ZodString;
1096
- source: z.ZodObject<{
1097
- detail: z.ZodString;
1098
- kind: z.ZodEnum<{
1099
- "boundary-thermo-attestation": "boundary-thermo-attestation";
1100
- "interior-telemetry": "interior-telemetry";
1101
- }>;
1102
- }, z.core.$strict>;
1103
- unit: z.ZodEnum<{
1104
- boolean: "boolean";
1105
- text: "text";
1106
- count: "count";
1107
- tokens: "tokens";
1108
- usd: "usd";
1109
- ratio: "ratio";
1110
- }>;
1111
- value: z.ZodUnion<readonly [z.ZodNumber, z.ZodString, z.ZodBoolean, z.ZodNull]>;
1112
- }, z.core.$strict>>;
1113
- repo: z.ZodString;
1114
- schemaVersion: z.ZodLiteral<3 | 4>;
1115
- }, z.core.$strict>]>;
1116
779
  type CloseoutArtifact = z.infer<typeof closeoutArtifactSchema>;
1117
- type HistoricalCloseoutArtifact = z.infer<typeof legacyCloseoutArtifactSchema>;
1118
- //#endregion
1119
- //#region src/retro-envelope.d.ts
1120
- /**
1121
- * Versioned retro envelope schema (epic #27 wave 2, issue #34).
1122
- *
1123
- * One envelope per lane, built at `factory:closeout` and delivered through the
1124
- * typed gate-sink as the `retro-envelope` ingest kind. Re-derived in TypeScript
1125
- * from the `spike/telemetry-layer2` S5 scratch schema (reference-only, never
1126
- * merged). This module is the single source of truth for the v1 wire shape
1127
- * and its bounds ({@link RETRO_ENVELOPE_WIRE_BOUNDS}) — producer and consumer
1128
- * alike. HQ imports these exports directly from the Worker-safe
1129
- * `@patronage/software-factory/schemas` subpath
1130
- * (`software-factory-hq/src/contracts/retro-schemas.ts`) instead of
1131
- * maintaining a parallel hand-written copy, so there is exactly one wire
1132
- * contract and no drift-detection machinery is needed (issue #350; formerly
1133
- * a hand-written twin plus a 767-line parity test, #46).
1134
- *
1135
- * DESIGN INVARIANT: cross-family token sums must be UNREPRESENTABLE.
1136
- *
1137
- * The two model families use different tokenizers, prices, and accounting
1138
- * conventions, so any token total that spans Claude and GPT is a lie:
1139
- *
1140
- * 1. There is no combined/total token field anywhere in the envelope.
1141
- * 2. `tokenFamilies` is strict — its only keys are `claude` and `gpt`; data
1142
- * cannot smuggle in a third "all"/"combined" slot.
1143
- * 3. The family BLOCKS are structurally different shapes with DIFFERENT keys
1144
- * (claude is a single flat block keyed on freshInput/cacheReadInput/
1145
- * cacheCreationInput; gpt is `{ roles: [...] }`). The exclusive input-tier
1146
- * COUNTS share no key name across families. The residual names shared
1147
- * between the claude block and a gpt ROLE entry are pinned to exactly
1148
- * {costUsd, model, output} (PR #32 advisory): `costUsd` is deliberate —
1149
- * USD is the one cross-family summable unit (rule 4); `model` is an
1150
- * unsummable label; `output` is the same name at DIFFERENT depths (lane
1151
- * block vs per-role entry), frozen by a tripwire test in
1152
- * `retro-envelope.test.ts` so the overlap cannot grow. Renaming `output`
1153
- * is a schemaVersion-2 wire change, deliberately not spent in v1.
1154
- * 4. Cost is per-family USD and nullable. Combined totals are allowed in USD
1155
- * only, and only as a projection-time sum of per-family USD.
1156
- *
1157
- * Field names also encode the S2/S3 reader lessons: Claude `freshInput` alone
1158
- * is not prompt size (true input context = freshInput + cacheReadInput +
1159
- * cacheCreationInput, requestId-deduped), and codex `inputInclusiveOfCache`
1160
- * already includes `cachedInput`, so `freshInputDerived` (inclusive − cached)
1161
- * is the only value safe to feed a per-token pricer.
1162
- *
1163
- * COMPLETENESS POSTURE: harvest may have no usable native log for a lane, so
1164
- * `tokenFamilies` may legitimately be absent. The closeout build gate demands
1165
- * a valid envelope, not available telemetry. A families-absent envelope keeps
1166
- * its operator-visible data gaps and is a replayable advisory HQ event, so it
1167
- * never substitutes unavailable usage with zero. The wire shape (field names,
1168
- * types, structure) stays byte-parity with HQ v1.
1169
- */
1170
- declare const RETRO_ENVELOPE_SCHEMA_VERSION = 1;
1171
- /**
1172
- * v1 wire bounds — the single source the schemas below are built from and the
1173
- * builder's sanitization seam clamps to (`retro-envelope-builder.ts` imports
1174
- * these; it keeps no bound constants of its own). HQ imports this module
1175
- * directly (issue #350), so there is one set of bounds, not a second copy to
1176
- * keep in sync.
1177
- */
1178
- declare const RETRO_ENVELOPE_WIRE_BOUNDS: {
1179
- /** archiveRef pointer (key/URL) max characters. */readonly archiveRefMaxChars: 2048; /** refs.branch max characters (git ref length ceiling). */
1180
- readonly branchMaxChars: 255; /** gates[] wire cap — the builder keeps the most recent records. */
1181
- readonly gatesMax: 500; /** gpt roles[] cap (delegated roles per lane). */
1182
- readonly gptRolesMax: 20; /** Cap for list fields: joinKeys id arrays, phases, dataGaps. */
1183
- readonly listMax: 100; /** Bounded name fields: agentRunId, gate, phase name, refs, join-key ids. */
1184
- readonly nameMaxChars: 200; /** Short identifier fields: repo name/owner, model, role. */
1185
- readonly shortMaxChars: 100; /** Free-text fields: dataGaps entries, outcome.verdict. */
1186
- readonly textMaxChars: 500;
1187
- };
1188
- declare const retroEnvelopeV1Schema: z.ZodObject<{
1189
- agentRunId: z.ZodString;
1190
- archiveRef: z.ZodOptional<z.ZodString>;
1191
- cycles: z.ZodObject<{
1192
- gateRunsToFirstGreen: z.ZodNumber;
1193
- reviewerFixRounds: z.ZodNumber;
1194
- thermoFixRounds: z.ZodNumber;
1195
- }, z.core.$strict>;
1196
- dataGaps: z.ZodDefault<z.ZodArray<z.ZodString>>;
1197
- gates: z.ZodArray<z.ZodObject<{
1198
- cycle: z.ZodNumber;
1199
- duration: z.ZodNumber;
1200
- gate: z.ZodString;
1201
- outcome: z.ZodEnum<{
1202
- pass: "pass";
1203
- fail: "fail";
1204
- skip: "skip";
1205
- }>;
1206
- startedAt: z.ZodISODateTime;
1207
- }, z.core.$strict>>;
1208
- generatedAt: z.ZodISODateTime;
1209
- interventions: z.ZodObject<{
1210
- count: z.ZodNumber;
1211
- }, z.core.$strict>;
1212
- joinKeys: z.ZodObject<{
1213
- claudeSessionIds: z.ZodDefault<z.ZodArray<z.ZodString>>;
1214
- codexThreadIds: z.ZodDefault<z.ZodArray<z.ZodString>>;
1215
- }, z.core.$strict>;
1216
- kind: z.ZodLiteral<"retro-envelope">;
1217
- outcome: z.ZodOptional<z.ZodObject<{
1218
- status: z.ZodEnum<{
1219
- fail: "fail";
1220
- success: "success";
1221
- blocked: "blocked";
1222
- "ship-with-followups": "ship-with-followups";
1223
- }>;
1224
- verdict: z.ZodOptional<z.ZodString>;
1225
- }, z.core.$strict>>;
1226
- phases: z.ZodArray<z.ZodObject<{
1227
- at: z.ZodISODateTime;
1228
- deltaSec: z.ZodOptional<z.ZodNumber>;
1229
- name: z.ZodString;
1230
- }, z.core.$strict>>;
1231
- refs: z.ZodObject<{
1232
- branch: z.ZodOptional<z.ZodString>;
1233
- epic: z.ZodOptional<z.ZodString>;
1234
- headSha: z.ZodOptional<z.ZodString>;
1235
- issue: z.ZodOptional<z.ZodString>;
1236
- prNumber: z.ZodOptional<z.ZodNumber>;
1237
- }, z.core.$strict>;
1238
- repo: z.ZodObject<{
1239
- name: z.ZodString;
1240
- owner: z.ZodString;
1241
- }, z.core.$strict>;
1242
- schemaVersion: z.ZodLiteral<1>;
1243
- tokenFamilies: z.ZodObject<{
1244
- claude: z.ZodOptional<z.ZodObject<{
1245
- cacheCreationInput: z.ZodNumber;
1246
- cacheReadInput: z.ZodNumber;
1247
- costUsd: z.ZodNullable<z.ZodNumber>;
1248
- family: z.ZodLiteral<"claude">;
1249
- freshInput: z.ZodNumber;
1250
- model: z.ZodString;
1251
- output: z.ZodNumber;
1252
- requests: z.ZodNumber;
1253
- }, z.core.$strict>>;
1254
- gpt: z.ZodOptional<z.ZodObject<{
1255
- family: z.ZodLiteral<"gpt">;
1256
- roles: z.ZodArray<z.ZodObject<{
1257
- cachedInput: z.ZodNumber;
1258
- costUsd: z.ZodNullable<z.ZodNumber>;
1259
- freshInputDerived: z.ZodNumber;
1260
- inputInclusiveOfCache: z.ZodNumber;
1261
- model: z.ZodString;
1262
- output: z.ZodNumber;
1263
- reasoningOutput: z.ZodNumber;
1264
- role: z.ZodString;
1265
- threadId: z.ZodOptional<z.ZodString>;
1266
- }, z.core.$strict>>;
1267
- }, z.core.$strict>>;
1268
- }, z.core.$strict>;
1269
- wallClock: z.ZodObject<{
1270
- endTs: z.ZodISODateTime;
1271
- startTs: z.ZodISODateTime;
1272
- totalSec: z.ZodNumber;
1273
- }, z.core.$strict>;
1274
- }, z.core.$strict>;
1275
- type RetroEnvelope = z.infer<typeof retroEnvelopeV1Schema>;
1276
- /**
1277
- * Versioned payload validators, keyed by schema major. Unknown majors never
1278
- * reach these — {@link parseRetroEnvelope} returns them raw and marked
1279
- * degraded, mirroring HQ's ingest skew posture (stored raw, never dropped).
1280
- */
1281
- declare const RETRO_ENVELOPE_VALIDATORS: Record<number, z.ZodType<RetroEnvelope, unknown>>;
1282
- declare const SUPPORTED_RETRO_ENVELOPE_SCHEMA_VERSIONS: readonly number[];
1283
- type ParsedRetroEnvelope = {
1284
- disposition: "trusted";
1285
- envelope: RetroEnvelope;
1286
- schemaVersion: number;
1287
- } | {
1288
- disposition: "degraded";
1289
- raw: unknown;
1290
- schemaVersion: number | undefined;
1291
- };
1292
- /** Epic anchor for an envelope: refs.epic, else refs.issue, else the PR. */
1293
- declare const retroEpicReference: (refs: RetroEnvelope["refs"]) => string | undefined;
1294
780
  //#endregion
1295
781
  //#region src/schemas.d.ts
1296
782
  declare const EVIDENCE_ENVELOPE_SCHEMA_VERSION = 1;
@@ -1321,95 +807,6 @@ declare const evidenceEnvelopeSchema: z.ZodObject<{
1321
807
  sessionId: z.ZodOptional<z.ZodString>;
1322
808
  timestamp: z.ZodOptional<z.ZodISODateTime>;
1323
809
  }, z.core.$loose>;
1324
- declare const SUPPORTED_PR_VERIFY_SCHEMA_VERSIONS: readonly [1, 2, 3, 4];
1325
- declare const prVerifyProofSchema: z.ZodObject<{
1326
- authoringSession: z.ZodOptional<z.ZodString>;
1327
- base: z.ZodString;
1328
- baselineFullProofs: z.ZodOptional<z.ZodArray<z.ZodObject<{
1329
- base: z.ZodString;
1330
- changedFiles: z.ZodArray<z.ZodString>;
1331
- headSha: z.ZodString;
1332
- profilePath: z.ZodString;
1333
- projectKey: z.ZodString;
1334
- repository: z.ZodString;
1335
- }, z.core.$strip>>>;
1336
- changedFiles: z.ZodArray<z.ZodString>;
1337
- classification: z.ZodEnum<{
1338
- "docs/process-only": "docs/process-only";
1339
- trivial: "trivial";
1340
- "non-trivial": "non-trivial";
1341
- }>;
1342
- classificationReasons: z.ZodArray<z.ZodString>;
1343
- command: z.ZodLiteral<"patronage-factory pr:verify">;
1344
- durationMs: z.ZodNumber;
1345
- endedAt: z.ZodISODateTime;
1346
- executedCommands: z.ZodOptional<z.ZodArray<z.ZodObject<{
1347
- command: z.ZodString;
1348
- counts: z.ZodOptional<z.ZodObject<{
1349
- testFiles: z.ZodOptional<z.ZodNumber>;
1350
- tests: z.ZodOptional<z.ZodNumber>;
1351
- }, z.core.$strip>>;
1352
- durationMs: z.ZodNumber;
1353
- exitCode: z.ZodNumber;
1354
- name: z.ZodString;
1355
- scope: z.ZodEnum<{
1356
- trivial: "trivial";
1357
- always: "always";
1358
- "docs-only": "docs-only";
1359
- full: "full";
1360
- }>;
1361
- }, z.core.$strip>>>;
1362
- headSha: z.ZodString;
1363
- impactStamp: z.ZodOptional<z.ZodObject<{
1364
- basis: z.ZodEnum<{
1365
- "target-scoped": "target-scoped";
1366
- conservative: "conservative";
1367
- }>;
1368
- reasons: z.ZodArray<z.ZodString>;
1369
- stampVersion: z.ZodLiteral<2>;
1370
- targets: z.ZodArray<z.ZodObject<{
1371
- basis: z.ZodString;
1372
- impact: z.ZodEnum<{
1373
- affected: "affected";
1374
- "not-affected": "not-affected";
1375
- }>;
1376
- name: z.ZodString;
1377
- }, z.core.$strip>>;
1378
- }, z.core.$strip>>;
1379
- mergeBaseSha: z.ZodOptional<z.ZodString>;
1380
- mode: z.ZodEnum<{
1381
- trivial: "trivial";
1382
- "docs-only": "docs-only";
1383
- full: "full";
1384
- }>;
1385
- notRequiredCommands: z.ZodOptional<z.ZodArray<z.ZodObject<{
1386
- basis: z.ZodString;
1387
- impactTarget: z.ZodString;
1388
- name: z.ZodString;
1389
- }, z.core.$strip>>>;
1390
- outcome: z.ZodOptional<z.ZodEnum<{
1391
- aborted: "aborted";
1392
- passed: "passed";
1393
- }>>;
1394
- patchId: z.ZodOptional<z.ZodString>;
1395
- profilePath: z.ZodString;
1396
- projectKey: z.ZodString;
1397
- repository: z.ZodString;
1398
- schemaVersion: z.ZodNumber & z.ZodType<1 | 2 | 3 | 4, number, z.core.$ZodTypeInternals<1 | 2 | 3 | 4, number>>;
1399
- startedAt: z.ZodISODateTime;
1400
- verificationCommands: z.ZodArray<z.ZodObject<{
1401
- command: z.ZodString;
1402
- description: z.ZodString;
1403
- impactTarget: z.ZodOptional<z.ZodString>;
1404
- name: z.ZodString;
1405
- scope: z.ZodEnum<{
1406
- trivial: "trivial";
1407
- always: "always";
1408
- "docs-only": "docs-only";
1409
- full: "full";
1410
- }>;
1411
- }, z.core.$strip>>;
1412
- }, z.core.$strip>;
1413
810
  declare const PR_REVIEW_SCHEMA_VERSION = 2;
1414
811
  declare const prReviewProofSchema: z.ZodObject<{
1415
812
  base: z.ZodString;
@@ -1449,6 +846,7 @@ declare const prReviewProofSchema: z.ZodObject<{
1449
846
  reviewRequirement: z.ZodOptional<z.ZodObject<{
1450
847
  reason: z.ZodEnum<{
1451
848
  "no-applicable-mode": "no-applicable-mode";
849
+ "faithful-merge": "faithful-merge";
1452
850
  }>;
1453
851
  status: z.ZodLiteral<"not-required">;
1454
852
  }, z.core.$strict>>;
@@ -1965,4 +1363,4 @@ declare const prReadyProofSchema: z.ZodObject<{
1965
1363
  waivedDemands: z.ZodOptional<z.ZodArray<z.ZodType<WaivedDemand, unknown, z.core.$ZodTypeInternals<WaivedDemand, unknown>>>>;
1966
1364
  }, z.core.$strip>;
1967
1365
  //#endregion
1968
- 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, type HistoricalCloseoutArtifact, PR_READY_SCHEMA_VERSION, PR_REVIEW_SCHEMA_VERSION, type ParsedRetroEnvelope, type PrReadyProof, type PrReviewProof, type PrVerifyProof, RETRO_ENVELOPE_SCHEMA_VERSION, RETRO_ENVELOPE_VALIDATORS, RETRO_ENVELOPE_WIRE_BOUNDS, type RetroEnvelope, SUPPORTED_CLOSEOUT_SCHEMA_VERSIONS, SUPPORTED_PR_READY_SCHEMA_VERSIONS, SUPPORTED_PR_VERIFY_SCHEMA_VERSIONS, SUPPORTED_RETRO_ENVELOPE_SCHEMA_VERSIONS, type WaivedDemand, blockedReasonSchema, blockedReasonsSchema, boundaryCheckProofSchema, boundaryReviewProofSchema, closeoutArtifactReadSchema, closeoutArtifactSchema, evidenceEnvelopeSchema, legacyCloseoutArtifactSchema, prReadyProofSchema, prReviewProofSchema, prVerifyProofSchema, retroEnvelopeV1Schema, retroEpicReference, waivedDemandSchema };
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 };