@patronage/software-factory 1.0.0-alpha.17 → 1.0.0-alpha.19
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/index.d.ts +531 -342
- package/dist/index.js +845 -176
- package/dist/schemas.d.ts +97 -98
- package/package.json +2 -2
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.
|
|
@@ -444,103 +443,6 @@ type ReadinessRepair = z.infer<typeof readinessRepairSchema>;
|
|
|
444
443
|
type ReadinessStatus = "ready" | "blocked";
|
|
445
444
|
type ManagedReadinessLedger = z.infer<typeof managedReadinessLedgerSchema>;
|
|
446
445
|
//#endregion
|
|
447
|
-
//#region src/pr-ready.d.ts
|
|
448
|
-
interface PrReadyProof {
|
|
449
|
-
schemaVersion: 3;
|
|
450
|
-
/**
|
|
451
|
-
* What GitHub actually did when this run armed native auto-merge (#477).
|
|
452
|
-
* Present exactly when a ready wave authorizes machine merge and arming ran;
|
|
453
|
-
* read back from the PR rather than inferred from the invocation, because `gh pr merge
|
|
454
|
-
* --auto` arms, merges, or does nothing with the same exit code and the same
|
|
455
|
-
* empty output. `not-armed` means the candidate is admitted but nothing will
|
|
456
|
-
* merge it, and `followUp` carries the re-dispatch.
|
|
457
|
-
*/
|
|
458
|
-
arming?: {
|
|
459
|
-
detail?: string;
|
|
460
|
-
headSha: string;
|
|
461
|
-
outcome: "armed" | "merged" | "not-armed";
|
|
462
|
-
};
|
|
463
|
-
/**
|
|
464
|
-
* Why this run blocked, one entry per refusing demand (#391): `code` is the
|
|
465
|
-
* demand key from the resolver's vocabulary, `detail` the one-sentence
|
|
466
|
-
* refusal. Same refusals as `blockingReasons`, in the same order — the
|
|
467
|
-
* analyzable projection of a flat string list, so a wall of blocked proofs
|
|
468
|
-
* on one PR can be counted by cause. Absent when nothing blocked.
|
|
469
|
-
*/
|
|
470
|
-
blockedReasons?: BlockedReason[];
|
|
471
|
-
blockingReasons: string[];
|
|
472
|
-
humanBlockingReasons: string[];
|
|
473
|
-
command: "patronage-factory pr:ready";
|
|
474
|
-
/**
|
|
475
|
-
* Machine-safe arg array for the obvious next action (#523): when `ready`
|
|
476
|
-
* but arming did not take effect, a `pr:ready` re-dispatch (idempotent on
|
|
477
|
-
* an unchanged head); otherwise the `gh pr ready` undraft repair or the
|
|
478
|
-
* `pr:verify` re-run that the blocking reasons name (re-verify the head,
|
|
479
|
-
* then re-run pr:ready). Same `argv` shape `factory:delegate --print`
|
|
480
|
-
* emits. Optional and purely additive.
|
|
481
|
-
*/
|
|
482
|
-
followUp?: FollowUpAction;
|
|
483
|
-
/**
|
|
484
|
-
* `ledger.headSha` is the evaluated head SHA: the GitHub `pr.headRefOid`
|
|
485
|
-
* captured at evaluation time (not a local git read), recorded explicitly
|
|
486
|
-
* so merge-time identity checks are a pure comparison against the live
|
|
487
|
-
* pushed HEAD, not a re-derivation. See the ledger schema.
|
|
488
|
-
*/
|
|
489
|
-
ledger: ManagedReadinessLedger;
|
|
490
|
-
/**
|
|
491
|
-
* Actionable facts that did not block (#477): a settling merge-freeze
|
|
492
|
-
* generation that permitted readiness and any authorized arming with a
|
|
493
|
-
* notice, an admitted-but-unscheduled false boundary wave, and how each
|
|
494
|
-
* waived demand reads to a human. Absent when there are none.
|
|
495
|
-
*/
|
|
496
|
-
notices?: string[];
|
|
497
|
-
/** Committed profile blob evaluated by readiness. Required for merge. */
|
|
498
|
-
profileBlobSha?: string;
|
|
499
|
-
/** Checkout-relative committed profile path evaluated by readiness. */
|
|
500
|
-
profilePath?: string;
|
|
501
|
-
repairs: ReadinessRepair[];
|
|
502
|
-
/** Trusted checkout repository used for all GitHub reads and writes. */
|
|
503
|
-
repository?: string;
|
|
504
|
-
status: ReadinessStatus;
|
|
505
|
-
/**
|
|
506
|
-
* Demands that were in force, were NOT met, and were waived by the operator
|
|
507
|
-
* (#354, moved here from the merge-time proof by #477). Each entry carries
|
|
508
|
-
* the demand's refusals verbatim, so a waived demand can never read as a met
|
|
509
|
-
* one; readiness proceeds on the recorded operator act, not on evidence.
|
|
510
|
-
*/
|
|
511
|
-
waivedDemands?: WaivedDemand[];
|
|
512
|
-
}
|
|
513
|
-
//#endregion
|
|
514
|
-
//#region src/pr-readiness/external-evidence.d.ts
|
|
515
|
-
declare const evidenceEnvelopeBaseSchema: z.ZodObject<{
|
|
516
|
-
check: z.ZodString;
|
|
517
|
-
checkType: z.ZodEnum<{
|
|
518
|
-
review: "review";
|
|
519
|
-
verify: "verify";
|
|
520
|
-
}>;
|
|
521
|
-
findingsPointer: z.ZodOptional<z.ZodString>;
|
|
522
|
-
headSha: z.ZodString;
|
|
523
|
-
mergeBaseSha: z.ZodString;
|
|
524
|
-
model: z.ZodOptional<z.ZodString>;
|
|
525
|
-
outcome: z.ZodEnum<{
|
|
526
|
-
pass: "pass";
|
|
527
|
-
fail: "fail";
|
|
528
|
-
}>;
|
|
529
|
-
patchId: z.ZodString;
|
|
530
|
-
policyVersion: z.ZodOptional<z.ZodString>;
|
|
531
|
-
producer: z.ZodString;
|
|
532
|
-
requestId: z.ZodOptional<z.ZodString>;
|
|
533
|
-
rung: z.ZodOptional<z.ZodEnum<{
|
|
534
|
-
"independent-model": "independent-model";
|
|
535
|
-
oracle: "oracle";
|
|
536
|
-
human: "human";
|
|
537
|
-
}>>;
|
|
538
|
-
schemaVersion: z.ZodLiteral<1>;
|
|
539
|
-
sessionId: z.ZodOptional<z.ZodString>;
|
|
540
|
-
timestamp: z.ZodOptional<z.ZodISODateTime>;
|
|
541
|
-
}, z.core.$loose>;
|
|
542
|
-
type EvidenceEnvelope = z.infer<typeof evidenceEnvelopeBaseSchema>;
|
|
543
|
-
//#endregion
|
|
544
446
|
//#region src/pr-verify-proof-contract.d.ts
|
|
545
447
|
declare const SUPPORTED_PR_VERIFY_SCHEMA_VERSIONS: readonly [1, 2, 3, 4];
|
|
546
448
|
type PrVerifySchemaVersion = (typeof SUPPORTED_PR_VERIFY_SCHEMA_VERSIONS)[number];
|
|
@@ -723,6 +625,103 @@ declare const prVerifyProofSchema: z.ZodObject<{
|
|
|
723
625
|
}, z.core.$strip>>;
|
|
724
626
|
}, z.core.$strip>;
|
|
725
627
|
//#endregion
|
|
628
|
+
//#region src/pr-ready.d.ts
|
|
629
|
+
interface PrReadyProof {
|
|
630
|
+
schemaVersion: 3;
|
|
631
|
+
/**
|
|
632
|
+
* What GitHub actually did when this run armed native auto-merge (#477).
|
|
633
|
+
* Present exactly when a ready wave authorizes machine merge and arming ran;
|
|
634
|
+
* read back from the PR rather than inferred from the invocation, because `gh pr merge
|
|
635
|
+
* --auto` arms, merges, or does nothing with the same exit code and the same
|
|
636
|
+
* empty output. `not-armed` means the candidate is admitted but nothing will
|
|
637
|
+
* merge it, and `followUp` carries the re-dispatch.
|
|
638
|
+
*/
|
|
639
|
+
arming?: {
|
|
640
|
+
detail?: string;
|
|
641
|
+
headSha: string;
|
|
642
|
+
outcome: "armed" | "merged" | "not-armed";
|
|
643
|
+
};
|
|
644
|
+
/**
|
|
645
|
+
* Why this run blocked, one entry per refusing demand (#391): `code` is the
|
|
646
|
+
* demand key from the resolver's vocabulary, `detail` the one-sentence
|
|
647
|
+
* refusal. Same refusals as `blockingReasons`, in the same order — the
|
|
648
|
+
* analyzable projection of a flat string list, so a wall of blocked proofs
|
|
649
|
+
* on one PR can be counted by cause. Absent when nothing blocked.
|
|
650
|
+
*/
|
|
651
|
+
blockedReasons?: BlockedReason[];
|
|
652
|
+
blockingReasons: string[];
|
|
653
|
+
humanBlockingReasons: string[];
|
|
654
|
+
command: "patronage-factory pr:ready";
|
|
655
|
+
/**
|
|
656
|
+
* Machine-safe arg array for the obvious next action (#523): when `ready`
|
|
657
|
+
* but arming did not take effect, a `pr:ready` re-dispatch (idempotent on
|
|
658
|
+
* an unchanged head); otherwise the `gh pr ready` undraft repair or the
|
|
659
|
+
* `pr:verify` re-run that the blocking reasons name (re-verify the head,
|
|
660
|
+
* then re-run pr:ready). Same `argv` shape `factory:delegate --print`
|
|
661
|
+
* emits. Optional and purely additive.
|
|
662
|
+
*/
|
|
663
|
+
followUp?: FollowUpAction;
|
|
664
|
+
/**
|
|
665
|
+
* `ledger.headSha` is the evaluated head SHA: the GitHub `pr.headRefOid`
|
|
666
|
+
* captured at evaluation time (not a local git read), recorded explicitly
|
|
667
|
+
* so merge-time identity checks are a pure comparison against the live
|
|
668
|
+
* pushed HEAD, not a re-derivation. See the ledger schema.
|
|
669
|
+
*/
|
|
670
|
+
ledger: ManagedReadinessLedger;
|
|
671
|
+
/**
|
|
672
|
+
* Actionable facts that did not block (#477): a settling merge-freeze
|
|
673
|
+
* generation that permitted readiness and any authorized arming with a
|
|
674
|
+
* notice, an admitted-but-unscheduled false boundary wave, and how each
|
|
675
|
+
* waived demand reads to a human. Absent when there are none.
|
|
676
|
+
*/
|
|
677
|
+
notices?: string[];
|
|
678
|
+
/** Committed profile blob evaluated by readiness. Required for merge. */
|
|
679
|
+
profileBlobSha?: string;
|
|
680
|
+
/** Checkout-relative committed profile path evaluated by readiness. */
|
|
681
|
+
profilePath?: string;
|
|
682
|
+
repairs: ReadinessRepair[];
|
|
683
|
+
/** Trusted checkout repository used for all GitHub reads and writes. */
|
|
684
|
+
repository?: string;
|
|
685
|
+
status: ReadinessStatus;
|
|
686
|
+
/**
|
|
687
|
+
* Demands that were in force, were NOT met, and were waived by the operator
|
|
688
|
+
* (#354, moved here from the merge-time proof by #477). Each entry carries
|
|
689
|
+
* the demand's refusals verbatim, so a waived demand can never read as a met
|
|
690
|
+
* one; readiness proceeds on the recorded operator act, not on evidence.
|
|
691
|
+
*/
|
|
692
|
+
waivedDemands?: WaivedDemand[];
|
|
693
|
+
}
|
|
694
|
+
//#endregion
|
|
695
|
+
//#region src/pr-readiness/external-evidence.d.ts
|
|
696
|
+
declare const evidenceEnvelopeBaseSchema: z.ZodObject<{
|
|
697
|
+
check: z.ZodString;
|
|
698
|
+
checkType: z.ZodEnum<{
|
|
699
|
+
review: "review";
|
|
700
|
+
verify: "verify";
|
|
701
|
+
}>;
|
|
702
|
+
findingsPointer: z.ZodOptional<z.ZodString>;
|
|
703
|
+
headSha: z.ZodString;
|
|
704
|
+
mergeBaseSha: z.ZodString;
|
|
705
|
+
model: z.ZodOptional<z.ZodString>;
|
|
706
|
+
outcome: z.ZodEnum<{
|
|
707
|
+
pass: "pass";
|
|
708
|
+
fail: "fail";
|
|
709
|
+
}>;
|
|
710
|
+
patchId: z.ZodString;
|
|
711
|
+
policyVersion: z.ZodOptional<z.ZodString>;
|
|
712
|
+
producer: z.ZodString;
|
|
713
|
+
requestId: z.ZodOptional<z.ZodString>;
|
|
714
|
+
rung: z.ZodOptional<z.ZodEnum<{
|
|
715
|
+
"independent-model": "independent-model";
|
|
716
|
+
oracle: "oracle";
|
|
717
|
+
human: "human";
|
|
718
|
+
}>>;
|
|
719
|
+
schemaVersion: z.ZodLiteral<1>;
|
|
720
|
+
sessionId: z.ZodOptional<z.ZodString>;
|
|
721
|
+
timestamp: z.ZodOptional<z.ZodISODateTime>;
|
|
722
|
+
}, z.core.$loose>;
|
|
723
|
+
type EvidenceEnvelope = z.infer<typeof evidenceEnvelopeBaseSchema>;
|
|
724
|
+
//#endregion
|
|
726
725
|
//#region src/closeout-artifact.d.ts
|
|
727
726
|
/** Artifact versions accepted at ingest. */
|
|
728
727
|
declare const SUPPORTED_CLOSEOUT_SCHEMA_VERSIONS: readonly [5];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@patronage/software-factory",
|
|
3
|
-
"version": "1.0.0-alpha.
|
|
3
|
+
"version": "1.0.0-alpha.19",
|
|
4
4
|
"description": "Shared Patronage software factory CLI and project-profile validation tools",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"picomatch": "^4.0.5",
|
|
38
38
|
"yaml": "^2.9.0",
|
|
39
39
|
"zod": "4.4.3",
|
|
40
|
-
"@patronage/factory-ci": "1.0.0-alpha.
|
|
40
|
+
"@patronage/factory-ci": "1.0.0-alpha.19"
|
|
41
41
|
},
|
|
42
42
|
"devDependencies": {
|
|
43
43
|
"@types/node": "24.13.3",
|