@patronage/software-factory 1.0.0-alpha.18 → 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 +539 -354
- package/dist/index.js +840 -176
- package/dist/schemas.d.ts +97 -98
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { existsSync, readFileSync, rmSync } from "node:fs";
|
|
2
2
|
import { Command } from "commander";
|
|
3
3
|
import { z } from "zod";
|
|
4
|
+
import { PreviewProofRegistration } from "@patronage/factory-ci";
|
|
4
5
|
|
|
5
6
|
//#region src/review-rungs.d.ts
|
|
6
7
|
declare const EVIDENCE_REVIEW_RUNGS: readonly ["independent-model", "oracle", "human"];
|
|
@@ -926,8 +927,8 @@ declare const mergeFreezeStateSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
926
927
|
generationId: z.ZodNumber;
|
|
927
928
|
headSha: z.ZodString;
|
|
928
929
|
outcome: z.ZodEnum<{
|
|
929
|
-
active: "active";
|
|
930
930
|
stale: "stale";
|
|
931
|
+
active: "active";
|
|
931
932
|
}>;
|
|
932
933
|
reason: z.ZodString;
|
|
933
934
|
recordedAt: z.ZodISODateTime;
|
|
@@ -1335,9 +1336,9 @@ declare const managedReadinessLedgerSchema: z.ZodObject<{
|
|
|
1335
1336
|
mergeable: z.ZodString;
|
|
1336
1337
|
requiredChecks: z.ZodEnum<{
|
|
1337
1338
|
unknown: "unknown";
|
|
1338
|
-
pending: "pending";
|
|
1339
1339
|
passed: "passed";
|
|
1340
1340
|
failed: "failed";
|
|
1341
|
+
pending: "pending";
|
|
1341
1342
|
none: "none";
|
|
1342
1343
|
}>;
|
|
1343
1344
|
reviewDecision: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
@@ -1403,8 +1404,8 @@ declare const managedReadinessLedgerSchema: z.ZodObject<{
|
|
|
1403
1404
|
"run-interior-cycle": "run-interior-cycle";
|
|
1404
1405
|
}>;
|
|
1405
1406
|
stage: z.ZodEnum<{
|
|
1406
|
-
interior: "interior";
|
|
1407
1407
|
gate: "gate";
|
|
1408
|
+
interior: "interior";
|
|
1408
1409
|
"interior-complete": "interior-complete";
|
|
1409
1410
|
}>;
|
|
1410
1411
|
}, z.core.$strip>>;
|
|
@@ -1420,10 +1421,10 @@ declare const managedReadinessLedgerSchema: z.ZodObject<{
|
|
|
1420
1421
|
reviewedHeadSha: z.ZodOptional<z.ZodString>;
|
|
1421
1422
|
reviewedPatchId: z.ZodOptional<z.ZodString>;
|
|
1422
1423
|
status: z.ZodEnum<{
|
|
1423
|
-
"not-required": "not-required";
|
|
1424
|
-
stale: "stale";
|
|
1425
1424
|
blocked: "blocked";
|
|
1425
|
+
"not-required": "not-required";
|
|
1426
1426
|
current: "current";
|
|
1427
|
+
stale: "stale";
|
|
1427
1428
|
missing: "missing";
|
|
1428
1429
|
}>;
|
|
1429
1430
|
}, z.core.$strip>;
|
|
@@ -1432,10 +1433,10 @@ declare const managedReadinessLedgerSchema: z.ZodObject<{
|
|
|
1432
1433
|
reviewedHeadSha: z.ZodOptional<z.ZodString>;
|
|
1433
1434
|
reviewedPatchId: z.ZodOptional<z.ZodString>;
|
|
1434
1435
|
status: z.ZodEnum<{
|
|
1435
|
-
"not-required": "not-required";
|
|
1436
|
-
stale: "stale";
|
|
1437
1436
|
blocked: "blocked";
|
|
1437
|
+
"not-required": "not-required";
|
|
1438
1438
|
current: "current";
|
|
1439
|
+
stale: "stale";
|
|
1439
1440
|
missing: "missing";
|
|
1440
1441
|
}>;
|
|
1441
1442
|
}, z.core.$strip>>;
|
|
@@ -1446,8 +1447,8 @@ declare const managedReadinessLedgerSchema: z.ZodObject<{
|
|
|
1446
1447
|
docsOnlyDeltaAccepted: z.ZodOptional<z.ZodBoolean>;
|
|
1447
1448
|
docsOnlyVerifiedHeadSha: z.ZodOptional<z.ZodString>;
|
|
1448
1449
|
prVerify: z.ZodEnum<{
|
|
1449
|
-
stale: "stale";
|
|
1450
1450
|
passed: "passed";
|
|
1451
|
+
stale: "stale";
|
|
1451
1452
|
missing: "missing";
|
|
1452
1453
|
}>;
|
|
1453
1454
|
trivialDeltaAccepted: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -1509,6 +1510,490 @@ declare const isHostedVerifyCheck: (check: StatusCheckRollup) => boolean;
|
|
|
1509
1510
|
declare const hostedVerifyCheckState: (rollup: StatusCheckRollup[] | undefined) => CheckState;
|
|
1510
1511
|
declare const statusCheckState: (rollup: StatusCheckRollup[] | undefined, exclude?: (check: StatusCheckRollup) => boolean) => CheckState;
|
|
1511
1512
|
//#endregion
|
|
1513
|
+
//#region src/github-app-client.d.ts
|
|
1514
|
+
interface FactoryAppRequest {
|
|
1515
|
+
body?: unknown;
|
|
1516
|
+
headers?: Readonly<Record<string, string>>;
|
|
1517
|
+
method: "DELETE" | "GET" | "PATCH" | "POST";
|
|
1518
|
+
owner: string;
|
|
1519
|
+
path: string;
|
|
1520
|
+
repo: string;
|
|
1521
|
+
}
|
|
1522
|
+
interface FactoryAppExchange<T = unknown> {
|
|
1523
|
+
readonly etag?: string;
|
|
1524
|
+
readonly json: T;
|
|
1525
|
+
readonly status: number;
|
|
1526
|
+
}
|
|
1527
|
+
//#endregion
|
|
1528
|
+
//#region src/github-pr-status-comment.d.ts
|
|
1529
|
+
interface UpsertFactoryPrStatusCommentInput {
|
|
1530
|
+
body: string;
|
|
1531
|
+
/** ISO instant at which this presentation was observed. */
|
|
1532
|
+
observedAt?: string;
|
|
1533
|
+
owner: string;
|
|
1534
|
+
pr: number;
|
|
1535
|
+
repo: string;
|
|
1536
|
+
}
|
|
1537
|
+
interface UpsertFactoryPrStatusCommentDependencies {
|
|
1538
|
+
request?: (input: FactoryAppRequest) => Promise<FactoryAppExchange>;
|
|
1539
|
+
requestJson?: (input: FactoryAppRequest) => Promise<unknown>;
|
|
1540
|
+
}
|
|
1541
|
+
interface UpsertFactoryPrStatusCommentResult {
|
|
1542
|
+
action: "created" | "updated";
|
|
1543
|
+
commentId: number;
|
|
1544
|
+
url: string;
|
|
1545
|
+
}
|
|
1546
|
+
declare function upsertFactoryPrStatusComment(input: UpsertFactoryPrStatusCommentInput, dependencies?: UpsertFactoryPrStatusCommentDependencies): Promise<UpsertFactoryPrStatusCommentResult>;
|
|
1547
|
+
//#endregion
|
|
1548
|
+
//#region src/pr-verify-proof-contract.d.ts
|
|
1549
|
+
declare const SUPPORTED_PR_VERIFY_SCHEMA_VERSIONS: readonly [1, 2, 3, 4];
|
|
1550
|
+
type PrVerifySchemaVersion = (typeof SUPPORTED_PR_VERIFY_SCHEMA_VERSIONS)[number];
|
|
1551
|
+
interface PrVerifyCommandResult {
|
|
1552
|
+
command: string;
|
|
1553
|
+
description: string;
|
|
1554
|
+
/**
|
|
1555
|
+
* Epic #550 wave 3 (#430): the profile's declared impact target for this
|
|
1556
|
+
* command, recorded from v4 on. It is the proof's own command→target
|
|
1557
|
+
* mapping: a `notRequiredCommands` entry must name the target recorded HERE
|
|
1558
|
+
* for the same command, so a withholding cannot point at whichever released
|
|
1559
|
+
* target happens to be convenient. Absent for a command the profile does
|
|
1560
|
+
* not scope, and for v1–v3 proofs, which predate the field.
|
|
1561
|
+
*/
|
|
1562
|
+
impactTarget?: string;
|
|
1563
|
+
name: string;
|
|
1564
|
+
scope: "always" | "docs-only" | "trivial" | "full";
|
|
1565
|
+
}
|
|
1566
|
+
interface PrVerifyExecutedCommand {
|
|
1567
|
+
command: string;
|
|
1568
|
+
counts?: {
|
|
1569
|
+
testFiles?: number;
|
|
1570
|
+
tests?: number;
|
|
1571
|
+
};
|
|
1572
|
+
durationMs: number;
|
|
1573
|
+
exitCode: number;
|
|
1574
|
+
name: string;
|
|
1575
|
+
scope: "always" | "docs-only" | "trivial" | "full";
|
|
1576
|
+
}
|
|
1577
|
+
/**
|
|
1578
|
+
* Epic #550 wave 3 (#430): a verification command the impact stamp proved this
|
|
1579
|
+
* candidate cannot reach, so the battery did not run it.
|
|
1580
|
+
*
|
|
1581
|
+
* The completeness invariant lives in the pairing: `verificationCommands`
|
|
1582
|
+
* records every command the resolved mode selected, `executedCommands` records
|
|
1583
|
+
* what ran, and this list records the rest WITH the stamp's own basis. A
|
|
1584
|
+
* withheld stack is therefore never silently absent from the proof — it is
|
|
1585
|
+
* present, named, and explained.
|
|
1586
|
+
*/
|
|
1587
|
+
interface PrVerifyNotRequiredCommand {
|
|
1588
|
+
basis: string;
|
|
1589
|
+
impactTarget: string;
|
|
1590
|
+
name: string;
|
|
1591
|
+
}
|
|
1592
|
+
/**
|
|
1593
|
+
* Epic #758 (#762): a consumer package a stamp-scoped selection skipped, and
|
|
1594
|
+
* why. Bound to the proof's stamp identity — the field is v4-only (the same
|
|
1595
|
+
* window that can carry `impactStamp`) and refused when the proof records no
|
|
1596
|
+
* stamp. The factory does not write this list; consumers do.
|
|
1597
|
+
*/
|
|
1598
|
+
interface PrVerifyNotDemandedRecord {
|
|
1599
|
+
basis: string;
|
|
1600
|
+
name: string;
|
|
1601
|
+
}
|
|
1602
|
+
interface PrVerifyProof {
|
|
1603
|
+
schemaVersion: PrVerifySchemaVersion;
|
|
1604
|
+
authoringSession?: string;
|
|
1605
|
+
base: string;
|
|
1606
|
+
baselineFullProofs?: {
|
|
1607
|
+
base: string;
|
|
1608
|
+
changedFiles: string[];
|
|
1609
|
+
headSha: string;
|
|
1610
|
+
profilePath: string;
|
|
1611
|
+
projectKey: string;
|
|
1612
|
+
repository: string;
|
|
1613
|
+
}[];
|
|
1614
|
+
changedFiles: string[];
|
|
1615
|
+
classification: DiffClassification;
|
|
1616
|
+
classificationReasons: string[];
|
|
1617
|
+
command: "patronage-factory pr:verify";
|
|
1618
|
+
durationMs: number;
|
|
1619
|
+
endedAt: string;
|
|
1620
|
+
executedCommands?: PrVerifyExecutedCommand[];
|
|
1621
|
+
headSha: string;
|
|
1622
|
+
impactStamp?: ImpactStamp;
|
|
1623
|
+
mode: ResolvedPrVerifyMode;
|
|
1624
|
+
mergeBaseSha?: string;
|
|
1625
|
+
notDemandedRecords?: PrVerifyNotDemandedRecord[];
|
|
1626
|
+
notRequiredCommands?: PrVerifyNotRequiredCommand[];
|
|
1627
|
+
outcome?: "aborted" | "passed";
|
|
1628
|
+
patchId?: string;
|
|
1629
|
+
profilePath: string;
|
|
1630
|
+
projectKey: string;
|
|
1631
|
+
repository: string;
|
|
1632
|
+
startedAt: string;
|
|
1633
|
+
verificationCommands: PrVerifyCommandResult[];
|
|
1634
|
+
}
|
|
1635
|
+
type PrVerifyBaselineFullProof = NonNullable<PrVerifyProof["baselineFullProofs"]>[number];
|
|
1636
|
+
declare function validatePrVerifyProof(value: unknown): PrVerifyProof;
|
|
1637
|
+
declare namespace verification_proof_d_exports {
|
|
1638
|
+
export { PrVerifyBaselineFullProof, PrVerifyCommandResult, PrVerifyExecutedCommand, PrVerifyNotDemandedRecord, PrVerifyNotRequiredCommand, PrVerifyProof, PrVerifySchemaVersion, ResolvedPrVerifyMode, SUPPORTED_PR_VERIFY_SCHEMA_VERSIONS, VerificationHeadShas, VerificationProofState, VerifiedHeadShas, prVerifyFullHeadShasForDiff, prVerifyProofHeadShas, readPrVerifyProof, resolveVerifyProofApplicability, trustedImpactStamp, validatePrVerifyProof, verificationProofApplicabilityFor, verificationProofBlockingReason, verificationProofForReadiness, verificationProofStateFor, verifyProofIdentityMatches, verifyProofPassed };
|
|
1639
|
+
}
|
|
1640
|
+
interface VerifiedHeadShas {
|
|
1641
|
+
docsOnlyVerifiedHeadShas: string[];
|
|
1642
|
+
trivialVerifiedHeadShas: string[];
|
|
1643
|
+
verifiedHeadShas: string[];
|
|
1644
|
+
}
|
|
1645
|
+
type VerificationHeadShas = {
|
|
1646
|
+
explicitFailure: true;
|
|
1647
|
+
} | VerifiedHeadShas;
|
|
1648
|
+
declare function readPrVerifyProof(filePath: string): PrVerifyProof;
|
|
1649
|
+
declare const verifyProofPassed: (proof: PrVerifyProof) => boolean;
|
|
1650
|
+
declare const prVerifyProofHeadShas: (proof: PrVerifyProof | undefined, creditedHeadSha?: string) => VerifiedHeadShas;
|
|
1651
|
+
declare const verifyProofIdentityMatches: ({
|
|
1652
|
+
currentIdentity,
|
|
1653
|
+
proof
|
|
1654
|
+
}: {
|
|
1655
|
+
currentIdentity?: {
|
|
1656
|
+
patchId: string;
|
|
1657
|
+
mergeBaseSha?: string;
|
|
1658
|
+
};
|
|
1659
|
+
proof?: PrVerifyProof;
|
|
1660
|
+
}) => boolean;
|
|
1661
|
+
/**
|
|
1662
|
+
* Wave-2 consumption (#542): the recorded impact stamp, released for demand
|
|
1663
|
+
* resolution ONLY when it is identity-bound to the current candidate — the
|
|
1664
|
+
* proof passed, and its recorded headSha AND patchId both name exactly this
|
|
1665
|
+
* candidate (the same identities the proof already binds). Everything else —
|
|
1666
|
+
* no proof, an aborted run, a stale head, a moved patch id, a pre-stamp proof
|
|
1667
|
+
* — returns `undefined`, and the consumer keeps today's full-demand floor.
|
|
1668
|
+
*
|
|
1669
|
+
* Deliberately stricter than verify-once applicability (which tolerates a
|
|
1670
|
+
* head-only or patch-id-only match): a stamp narrows external demands, so it
|
|
1671
|
+
* is trusted only on an exact double binding, fail closed.
|
|
1672
|
+
*/
|
|
1673
|
+
declare const trustedImpactStamp: ({
|
|
1674
|
+
candidate,
|
|
1675
|
+
proof
|
|
1676
|
+
}: {
|
|
1677
|
+
candidate: {
|
|
1678
|
+
headSha: string;
|
|
1679
|
+
patchId: string;
|
|
1680
|
+
};
|
|
1681
|
+
proof: PrVerifyProof | undefined;
|
|
1682
|
+
}) => ImpactStamp | undefined;
|
|
1683
|
+
declare const prVerifyFullHeadShasForDiff: ({
|
|
1684
|
+
docsOnlyDeltaAcceptedSince,
|
|
1685
|
+
files,
|
|
1686
|
+
proof
|
|
1687
|
+
}: {
|
|
1688
|
+
docsOnlyDeltaAcceptedSince?: (baselineHeadSha: string) => boolean;
|
|
1689
|
+
files: string[];
|
|
1690
|
+
proof: PrVerifyProof;
|
|
1691
|
+
}) => string[];
|
|
1692
|
+
type VerificationProofState = {
|
|
1693
|
+
kind: "typed-aborted";
|
|
1694
|
+
proof: PrVerifyProof;
|
|
1695
|
+
} | {
|
|
1696
|
+
kind: "typed-missing";
|
|
1697
|
+
path: string;
|
|
1698
|
+
reason: "enoent" | "invalid";
|
|
1699
|
+
message?: string;
|
|
1700
|
+
} | {
|
|
1701
|
+
kind: "typed";
|
|
1702
|
+
headShas: VerifiedHeadShas;
|
|
1703
|
+
proof: PrVerifyProof;
|
|
1704
|
+
} | {
|
|
1705
|
+
kind: "typed-diff-mismatch";
|
|
1706
|
+
mode: ResolvedPrVerifyMode;
|
|
1707
|
+
};
|
|
1708
|
+
declare const verificationProofStateFor: ({
|
|
1709
|
+
proof,
|
|
1710
|
+
proofMatchesCurrentDiff,
|
|
1711
|
+
proofPath
|
|
1712
|
+
}: {
|
|
1713
|
+
proof?: PrVerifyProof;
|
|
1714
|
+
proofMatchesCurrentDiff?: boolean;
|
|
1715
|
+
proofPath?: string;
|
|
1716
|
+
}) => VerificationProofState;
|
|
1717
|
+
declare const verificationProofApplicabilityFor: ({
|
|
1718
|
+
docsOnlyDeltaAcceptedSince,
|
|
1719
|
+
explicitProof,
|
|
1720
|
+
files,
|
|
1721
|
+
headSha,
|
|
1722
|
+
currentIdentity,
|
|
1723
|
+
proof,
|
|
1724
|
+
proofPath,
|
|
1725
|
+
proofReadError
|
|
1726
|
+
}: {
|
|
1727
|
+
docsOnlyDeltaAcceptedSince?: (baselineHeadSha: string) => boolean;
|
|
1728
|
+
explicitProof: boolean;
|
|
1729
|
+
files: string[];
|
|
1730
|
+
headSha: string;
|
|
1731
|
+
currentIdentity?: {
|
|
1732
|
+
patchId: string;
|
|
1733
|
+
mergeBaseSha?: string;
|
|
1734
|
+
};
|
|
1735
|
+
proof?: PrVerifyProof;
|
|
1736
|
+
proofPath?: string;
|
|
1737
|
+
proofReadError?: unknown;
|
|
1738
|
+
}) => {
|
|
1739
|
+
fullVerifiedHeadShas: never[];
|
|
1740
|
+
verificationProof: VerificationProofState;
|
|
1741
|
+
} | {
|
|
1742
|
+
fullVerifiedHeadShas: string[];
|
|
1743
|
+
verificationProof: {
|
|
1744
|
+
headShas: VerifiedHeadShas;
|
|
1745
|
+
kind: "typed";
|
|
1746
|
+
proof: PrVerifyProof;
|
|
1747
|
+
};
|
|
1748
|
+
};
|
|
1749
|
+
declare const resolveVerifyProofApplicability: ({
|
|
1750
|
+
proofPath,
|
|
1751
|
+
explicitProof,
|
|
1752
|
+
docsOnlyDeltaAcceptedSince,
|
|
1753
|
+
files,
|
|
1754
|
+
headSha,
|
|
1755
|
+
currentVerifyIdentityForBase,
|
|
1756
|
+
preread
|
|
1757
|
+
}: {
|
|
1758
|
+
proofPath: string;
|
|
1759
|
+
explicitProof: boolean;
|
|
1760
|
+
docsOnlyDeltaAcceptedSince?: (baselineHeadSha: string) => boolean;
|
|
1761
|
+
files: string[];
|
|
1762
|
+
headSha: string;
|
|
1763
|
+
currentVerifyIdentityForBase?: (base: string) => {
|
|
1764
|
+
patchId: string;
|
|
1765
|
+
mergeBaseSha?: string;
|
|
1766
|
+
};
|
|
1767
|
+
preread?: {
|
|
1768
|
+
proof?: PrVerifyProof;
|
|
1769
|
+
error?: unknown;
|
|
1770
|
+
};
|
|
1771
|
+
}) => {
|
|
1772
|
+
fullVerifiedHeadShas: never[];
|
|
1773
|
+
verificationProof: VerificationProofState;
|
|
1774
|
+
} | {
|
|
1775
|
+
fullVerifiedHeadShas: string[];
|
|
1776
|
+
verificationProof: {
|
|
1777
|
+
headShas: VerifiedHeadShas;
|
|
1778
|
+
kind: "typed";
|
|
1779
|
+
proof: PrVerifyProof;
|
|
1780
|
+
};
|
|
1781
|
+
};
|
|
1782
|
+
declare const verificationProofForReadiness: (state: VerificationProofState) => VerificationHeadShas;
|
|
1783
|
+
declare const verificationProofBlockingReason: (state: VerificationProofState) => string | undefined;
|
|
1784
|
+
//#endregion
|
|
1785
|
+
//#region src/preview-lifecycle.d.ts
|
|
1786
|
+
type PreviewDisposition = "deploy" | "not-required";
|
|
1787
|
+
interface PreviewTargetPlan {
|
|
1788
|
+
basis: string;
|
|
1789
|
+
disposition: PreviewDisposition;
|
|
1790
|
+
name: string;
|
|
1791
|
+
}
|
|
1792
|
+
interface PreviewLifecyclePlan {
|
|
1793
|
+
/** The declared preview stacks to deploy, in declaration order. */
|
|
1794
|
+
deploy: string[];
|
|
1795
|
+
/** The withheld stacks, in declaration order. */
|
|
1796
|
+
notRequired: PreviewTargetPlan[];
|
|
1797
|
+
/** Whether a trusted, identity-bound stamp was available at all. */
|
|
1798
|
+
stampTrusted: boolean;
|
|
1799
|
+
/** Every declared preview target with its disposition, in declaration order. */
|
|
1800
|
+
targets: PreviewTargetPlan[];
|
|
1801
|
+
}
|
|
1802
|
+
/** Validate a serialized plan without deriving or changing its dispositions. */
|
|
1803
|
+
declare const validatePreviewLifecyclePlan: (value: unknown) => PreviewLifecyclePlan;
|
|
1804
|
+
/**
|
|
1805
|
+
* Structural subset of the profile: the impact declarations plus the external
|
|
1806
|
+
* demand list. Structural rather than a `Pick` so this module does not import
|
|
1807
|
+
* `profile.ts`.
|
|
1808
|
+
*/
|
|
1809
|
+
interface PreviewLifecycleProfile {
|
|
1810
|
+
impact?: {
|
|
1811
|
+
targets: {
|
|
1812
|
+
name: string;
|
|
1813
|
+
}[];
|
|
1814
|
+
};
|
|
1815
|
+
requiredChecks?: {
|
|
1816
|
+
name: string;
|
|
1817
|
+
}[];
|
|
1818
|
+
}
|
|
1819
|
+
/**
|
|
1820
|
+
* The declared preview stacks: impact targets that are ALSO declared required
|
|
1821
|
+
* checks — i.e. targets whose proof is produced externally, which is exactly
|
|
1822
|
+
* what a preview producer is.
|
|
1823
|
+
*
|
|
1824
|
+
* Deriving the list from the two existing declarations rather than adding a
|
|
1825
|
+
* third is what makes lifecycle and demand unable to disagree: the stacks this
|
|
1826
|
+
* plan can withhold are precisely the demands wave 2 can release, so a stack
|
|
1827
|
+
* can never be skipped while its proof stays demanded.
|
|
1828
|
+
*/
|
|
1829
|
+
declare const previewLifecycleTargets: (profile: PreviewLifecycleProfile) => string[];
|
|
1830
|
+
/**
|
|
1831
|
+
* Plan the preview lifecycle for one candidate.
|
|
1832
|
+
*
|
|
1833
|
+
* Trust is resolved here through the SAME identity gate demand release uses
|
|
1834
|
+
* (`trustedImpactStamp`): the proof must have passed and must bind both the
|
|
1835
|
+
* candidate's headSha and its patchId. A stale, aborted, absent, or
|
|
1836
|
+
* differently-bound proof yields no stamp, and every declared stack is planned
|
|
1837
|
+
* for deploy. Total over its INPUTS — no proof, stamp, or profile can make it
|
|
1838
|
+
* throw. A malformed CALL is the deliberate exception: omitting
|
|
1839
|
+
* `vetoedTargets` is API misuse, not data doubt, and throws.
|
|
1840
|
+
*/
|
|
1841
|
+
declare const planPreviewLifecycle: ({
|
|
1842
|
+
candidate,
|
|
1843
|
+
profile,
|
|
1844
|
+
proof,
|
|
1845
|
+
vetoedTargets
|
|
1846
|
+
}: {
|
|
1847
|
+
candidate: {
|
|
1848
|
+
headSha: string;
|
|
1849
|
+
patchId: string;
|
|
1850
|
+
};
|
|
1851
|
+
profile: PreviewLifecycleProfile;
|
|
1852
|
+
proof: PrVerifyProof | undefined;
|
|
1853
|
+
/**
|
|
1854
|
+
* Stack names with a current, candidate-bound FAILING envelope. Scoping is
|
|
1855
|
+
* withheld for these whatever the stamp says — the same veto demand release
|
|
1856
|
+
* applies, and for the same reason: a withheld stack is a stack that can
|
|
1857
|
+
* never re-emit the envelope its standing demand needs. Callers hold the
|
|
1858
|
+
* checkout context, so they resolve the set with `boundFailingCheckNames`
|
|
1859
|
+
* and pass it in; this module stays pure.
|
|
1860
|
+
*
|
|
1861
|
+
* REQUIRED, with no default, on purpose: a defaulted `[]` reads the same
|
|
1862
|
+
* whether the caller inspected the envelopes or never looked, and this seam
|
|
1863
|
+
* exists precisely for EXTERNAL preview producers — the callers most likely
|
|
1864
|
+
* to skip the lookup. Pass the result of `boundFailingCheckNames`; pass `[]`
|
|
1865
|
+
* only to mean "inspected the envelopes and found no bound failure".
|
|
1866
|
+
*
|
|
1867
|
+
* Deliberately visible to `api:check` as a breaking signature change
|
|
1868
|
+
* (pre-1.0, no external callers yet).
|
|
1869
|
+
*/
|
|
1870
|
+
vetoedTargets: readonly string[];
|
|
1871
|
+
}) => PreviewLifecyclePlan;
|
|
1872
|
+
//#endregion
|
|
1873
|
+
//#region src/pr-status-hud.d.ts
|
|
1874
|
+
type FactoryPrStatusCheckName = "patronage-factory/merge-freeze" | "patronage-factory/pr-ready" | "patronage-factory/pr-verify";
|
|
1875
|
+
interface CompletedFactoryCheckSnapshot {
|
|
1876
|
+
readonly completedAt: string;
|
|
1877
|
+
readonly conclusion: string;
|
|
1878
|
+
readonly detailsUrl?: string;
|
|
1879
|
+
readonly headSha: string;
|
|
1880
|
+
readonly name: FactoryPrStatusCheckName;
|
|
1881
|
+
}
|
|
1882
|
+
interface FailedPreviewSnapshot {
|
|
1883
|
+
readonly completedAt: string;
|
|
1884
|
+
readonly conclusion: string;
|
|
1885
|
+
readonly detailsUrl?: string;
|
|
1886
|
+
readonly headSha: string;
|
|
1887
|
+
readonly name: string;
|
|
1888
|
+
}
|
|
1889
|
+
interface FactoryPrStatusSources {
|
|
1890
|
+
readonly baseSha: string;
|
|
1891
|
+
readonly checks: Readonly<Partial<Record<FactoryPrStatusCheckName, CompletedFactoryCheckSnapshot>>>;
|
|
1892
|
+
readonly previewFailures?: Readonly<Partial<Record<string, FailedPreviewSnapshot>>>;
|
|
1893
|
+
readonly previewRegistrations: readonly PreviewProofRegistration[];
|
|
1894
|
+
}
|
|
1895
|
+
interface RenderFactoryPrStatusHudInput extends FactoryPrStatusSources {
|
|
1896
|
+
readonly headSha: string;
|
|
1897
|
+
readonly plan: PreviewLifecyclePlan;
|
|
1898
|
+
readonly planHeadSha: string;
|
|
1899
|
+
readonly pr: number;
|
|
1900
|
+
/** ISO instant at which the presentation sources were observed. */
|
|
1901
|
+
readonly renderedAt: string;
|
|
1902
|
+
}
|
|
1903
|
+
interface PresentFactoryPrStatusHudInput {
|
|
1904
|
+
readonly headSha: string;
|
|
1905
|
+
readonly owner: string;
|
|
1906
|
+
readonly plan: PreviewLifecyclePlan;
|
|
1907
|
+
readonly planHeadSha: string;
|
|
1908
|
+
readonly pr: number;
|
|
1909
|
+
readonly renderedAt?: string;
|
|
1910
|
+
readonly repo: string;
|
|
1911
|
+
}
|
|
1912
|
+
interface PresentFactoryPrStatusHudDependencies {
|
|
1913
|
+
/**
|
|
1914
|
+
* Read only `previewProofInventory.list` registrations and completed,
|
|
1915
|
+
* Factory-App-owned check snapshots. PR comment bodies are not an evidence
|
|
1916
|
+
* source and are deliberately absent from this contract.
|
|
1917
|
+
*/
|
|
1918
|
+
readonly readSources: (input: {
|
|
1919
|
+
headSha: string;
|
|
1920
|
+
owner: string;
|
|
1921
|
+
pr: number;
|
|
1922
|
+
previewTargets?: readonly string[];
|
|
1923
|
+
repo: string;
|
|
1924
|
+
}) => Promise<FactoryPrStatusSources>;
|
|
1925
|
+
/** Recheck both PR endpoints immediately before mutating the sticky HUD. */
|
|
1926
|
+
readonly assertCurrentIdentity: (input: {
|
|
1927
|
+
baseSha: string;
|
|
1928
|
+
headSha: string;
|
|
1929
|
+
owner: string;
|
|
1930
|
+
pr: number;
|
|
1931
|
+
repo: string;
|
|
1932
|
+
}) => Promise<void>;
|
|
1933
|
+
readonly upsert?: typeof upsertFactoryPrStatusComment;
|
|
1934
|
+
}
|
|
1935
|
+
interface ReadFactoryPrStatusSourcesInput {
|
|
1936
|
+
readonly headSha: string;
|
|
1937
|
+
readonly owner: string;
|
|
1938
|
+
readonly pr: number;
|
|
1939
|
+
/**
|
|
1940
|
+
* Demanded preview stack names from the lifecycle plan. Used only to look up
|
|
1941
|
+
* a completed unsuccessful check run when inventory has no registration.
|
|
1942
|
+
*/
|
|
1943
|
+
readonly previewTargets?: readonly string[];
|
|
1944
|
+
readonly repo: string;
|
|
1945
|
+
/** Factory App installation token, normally minted by the presentation job. */
|
|
1946
|
+
readonly token: string;
|
|
1947
|
+
}
|
|
1948
|
+
interface ReadFactoryPrStatusSourcesDependencies {
|
|
1949
|
+
readonly fetch?: typeof fetch;
|
|
1950
|
+
readonly listPreviewRegistrations?: (input: {
|
|
1951
|
+
owner: string;
|
|
1952
|
+
pr: number;
|
|
1953
|
+
repo: string;
|
|
1954
|
+
token: string;
|
|
1955
|
+
}) => Promise<readonly PreviewProofRegistration[]>;
|
|
1956
|
+
readonly timeoutMs?: number;
|
|
1957
|
+
}
|
|
1958
|
+
declare function renderFactoryPrStatusHud(input: RenderFactoryPrStatusHudInput): string;
|
|
1959
|
+
declare function presentFactoryPrStatusHud(input: PresentFactoryPrStatusHudInput, dependencies: PresentFactoryPrStatusHudDependencies): Promise<UpsertFactoryPrStatusCommentResult>;
|
|
1960
|
+
declare function assertFactoryPrStatusIdentity(input: ReadFactoryPrStatusSourcesInput & {
|
|
1961
|
+
readonly baseSha: string;
|
|
1962
|
+
}, dependencies?: ReadFactoryPrStatusSourcesDependencies): Promise<void>;
|
|
1963
|
+
declare function readFactoryPrStatusSources(input: ReadFactoryPrStatusSourcesInput, dependencies?: ReadFactoryPrStatusSourcesDependencies): Promise<FactoryPrStatusSources>;
|
|
1964
|
+
interface PlanFactoryPrStatusHudInput {
|
|
1965
|
+
readonly cwd: string;
|
|
1966
|
+
readonly headSha: string;
|
|
1967
|
+
readonly mergeBaseSha?: string;
|
|
1968
|
+
readonly patchId?: string;
|
|
1969
|
+
readonly profilePath?: string;
|
|
1970
|
+
}
|
|
1971
|
+
/**
|
|
1972
|
+
* Consume `planPreviewLifecycle` for the current checkout. No second plan is
|
|
1973
|
+
* invented: dispositions are Ready/Skipped from `deploy` vs `not-required`.
|
|
1974
|
+
* Candidate identity is never copied from the proof. Absent independent
|
|
1975
|
+
* identity or an unbound verify proof is the planner's conservative path.
|
|
1976
|
+
*/
|
|
1977
|
+
declare function planFactoryPrStatusHud(input: PlanFactoryPrStatusHudInput): PreviewLifecyclePlan;
|
|
1978
|
+
interface RefreshFactoryPrStatusHudInput {
|
|
1979
|
+
readonly cwd: string;
|
|
1980
|
+
readonly headSha: string;
|
|
1981
|
+
readonly mergeBaseSha?: string;
|
|
1982
|
+
readonly owner: string;
|
|
1983
|
+
readonly patchId?: string;
|
|
1984
|
+
readonly pr: number;
|
|
1985
|
+
readonly profilePath?: string;
|
|
1986
|
+
readonly repo: string;
|
|
1987
|
+
readonly token?: string;
|
|
1988
|
+
}
|
|
1989
|
+
/** Plan from the checkout and present the App-owned HUD. */
|
|
1990
|
+
declare function refreshFactoryPrStatusHud(input: RefreshFactoryPrStatusHudInput): Promise<UpsertFactoryPrStatusCommentResult>;
|
|
1991
|
+
/**
|
|
1992
|
+
* Presentation must not fail an admission gate. Used after pr:ready publishes
|
|
1993
|
+
* its check so the table is not stuck at first-write.
|
|
1994
|
+
*/
|
|
1995
|
+
declare function refreshFactoryPrStatusHudSafely(input: RefreshFactoryPrStatusHudInput, onNotice?: (message: string) => void): Promise<void>;
|
|
1996
|
+
//#endregion
|
|
1512
1997
|
//#region src/pr-ready.d.ts
|
|
1513
1998
|
interface PrReadyArgs extends LoadProjectProfileInput {
|
|
1514
1999
|
authoringSessionIds?: string[];
|
|
@@ -1666,6 +2151,12 @@ interface PrReadyDependencies {
|
|
|
1666
2151
|
publishFinalCheckRun?: (input: Omit<PublishFactoryCheckInput, "status"> & {
|
|
1667
2152
|
conclusion: "failure" | "success";
|
|
1668
2153
|
}) => Promise<boolean> | boolean;
|
|
2154
|
+
/**
|
|
2155
|
+
* Re-present the App-owned HUD after this run's ready check is published
|
|
2156
|
+
* so the table is not stuck at first-write. Defaults to a safe refresh
|
|
2157
|
+
* that never fails the gate.
|
|
2158
|
+
*/
|
|
2159
|
+
presentStatusHud?: (input: RefreshFactoryPrStatusHudInput) => Promise<void> | void;
|
|
1669
2160
|
/** Injectable delay for the UNKNOWN-mergeable brief poll (tests). */
|
|
1670
2161
|
sleep?: (ms: number) => Promise<void>;
|
|
1671
2162
|
}
|
|
@@ -1878,10 +2369,10 @@ declare const loadEvidenceEnvelopes: (cwd: string) => LoadedEvidenceEnvelope[];
|
|
|
1878
2369
|
//#region src/review-proof-applicability.d.ts
|
|
1879
2370
|
declare const REVIEW_STATUS_VALUES: readonly ["not-required", "current", "stale", "missing", "blocked"];
|
|
1880
2371
|
declare const reviewStatusSchema: z.ZodEnum<{
|
|
1881
|
-
"not-required": "not-required";
|
|
1882
|
-
stale: "stale";
|
|
1883
2372
|
blocked: "blocked";
|
|
2373
|
+
"not-required": "not-required";
|
|
1884
2374
|
current: "current";
|
|
2375
|
+
stale: "stale";
|
|
1885
2376
|
missing: "missing";
|
|
1886
2377
|
}>;
|
|
1887
2378
|
type ReviewStatus = z.infer<typeof reviewStatusSchema>;
|
|
@@ -1977,98 +2468,8 @@ declare const prReviewResultSchema: z.ZodType<PrReviewResult>;
|
|
|
1977
2468
|
declare const prReviewProofSchema: z.ZodType<PrReviewProof>;
|
|
1978
2469
|
declare const validatePrReviewResult: (value: unknown) => PrReviewResult;
|
|
1979
2470
|
declare const validatePrReviewProof: (value: unknown) => PrReviewProof;
|
|
1980
|
-
declare const readPrReviewProof: (filePath: string) => PrReviewProof;
|
|
1981
|
-
declare const PR_REVIEW_PROOF_DESCRIPTOR: ProofDescriptor<PrReviewProof>;
|
|
1982
|
-
//#endregion
|
|
1983
|
-
//#region src/pr-verify-proof-contract.d.ts
|
|
1984
|
-
declare const SUPPORTED_PR_VERIFY_SCHEMA_VERSIONS: readonly [1, 2, 3, 4];
|
|
1985
|
-
type PrVerifySchemaVersion = (typeof SUPPORTED_PR_VERIFY_SCHEMA_VERSIONS)[number];
|
|
1986
|
-
interface PrVerifyCommandResult {
|
|
1987
|
-
command: string;
|
|
1988
|
-
description: string;
|
|
1989
|
-
/**
|
|
1990
|
-
* Epic #550 wave 3 (#430): the profile's declared impact target for this
|
|
1991
|
-
* command, recorded from v4 on. It is the proof's own command→target
|
|
1992
|
-
* mapping: a `notRequiredCommands` entry must name the target recorded HERE
|
|
1993
|
-
* for the same command, so a withholding cannot point at whichever released
|
|
1994
|
-
* target happens to be convenient. Absent for a command the profile does
|
|
1995
|
-
* not scope, and for v1–v3 proofs, which predate the field.
|
|
1996
|
-
*/
|
|
1997
|
-
impactTarget?: string;
|
|
1998
|
-
name: string;
|
|
1999
|
-
scope: "always" | "docs-only" | "trivial" | "full";
|
|
2000
|
-
}
|
|
2001
|
-
interface PrVerifyExecutedCommand {
|
|
2002
|
-
command: string;
|
|
2003
|
-
counts?: {
|
|
2004
|
-
testFiles?: number;
|
|
2005
|
-
tests?: number;
|
|
2006
|
-
};
|
|
2007
|
-
durationMs: number;
|
|
2008
|
-
exitCode: number;
|
|
2009
|
-
name: string;
|
|
2010
|
-
scope: "always" | "docs-only" | "trivial" | "full";
|
|
2011
|
-
}
|
|
2012
|
-
/**
|
|
2013
|
-
* Epic #550 wave 3 (#430): a verification command the impact stamp proved this
|
|
2014
|
-
* candidate cannot reach, so the battery did not run it.
|
|
2015
|
-
*
|
|
2016
|
-
* The completeness invariant lives in the pairing: `verificationCommands`
|
|
2017
|
-
* records every command the resolved mode selected, `executedCommands` records
|
|
2018
|
-
* what ran, and this list records the rest WITH the stamp's own basis. A
|
|
2019
|
-
* withheld stack is therefore never silently absent from the proof — it is
|
|
2020
|
-
* present, named, and explained.
|
|
2021
|
-
*/
|
|
2022
|
-
interface PrVerifyNotRequiredCommand {
|
|
2023
|
-
basis: string;
|
|
2024
|
-
impactTarget: string;
|
|
2025
|
-
name: string;
|
|
2026
|
-
}
|
|
2027
|
-
/**
|
|
2028
|
-
* Epic #758 (#762): a consumer package a stamp-scoped selection skipped, and
|
|
2029
|
-
* why. Bound to the proof's stamp identity — the field is v4-only (the same
|
|
2030
|
-
* window that can carry `impactStamp`) and refused when the proof records no
|
|
2031
|
-
* stamp. The factory does not write this list; consumers do.
|
|
2032
|
-
*/
|
|
2033
|
-
interface PrVerifyNotDemandedRecord {
|
|
2034
|
-
basis: string;
|
|
2035
|
-
name: string;
|
|
2036
|
-
}
|
|
2037
|
-
interface PrVerifyProof {
|
|
2038
|
-
schemaVersion: PrVerifySchemaVersion;
|
|
2039
|
-
authoringSession?: string;
|
|
2040
|
-
base: string;
|
|
2041
|
-
baselineFullProofs?: {
|
|
2042
|
-
base: string;
|
|
2043
|
-
changedFiles: string[];
|
|
2044
|
-
headSha: string;
|
|
2045
|
-
profilePath: string;
|
|
2046
|
-
projectKey: string;
|
|
2047
|
-
repository: string;
|
|
2048
|
-
}[];
|
|
2049
|
-
changedFiles: string[];
|
|
2050
|
-
classification: DiffClassification;
|
|
2051
|
-
classificationReasons: string[];
|
|
2052
|
-
command: "patronage-factory pr:verify";
|
|
2053
|
-
durationMs: number;
|
|
2054
|
-
endedAt: string;
|
|
2055
|
-
executedCommands?: PrVerifyExecutedCommand[];
|
|
2056
|
-
headSha: string;
|
|
2057
|
-
impactStamp?: ImpactStamp;
|
|
2058
|
-
mode: ResolvedPrVerifyMode;
|
|
2059
|
-
mergeBaseSha?: string;
|
|
2060
|
-
notDemandedRecords?: PrVerifyNotDemandedRecord[];
|
|
2061
|
-
notRequiredCommands?: PrVerifyNotRequiredCommand[];
|
|
2062
|
-
outcome?: "aborted" | "passed";
|
|
2063
|
-
patchId?: string;
|
|
2064
|
-
profilePath: string;
|
|
2065
|
-
projectKey: string;
|
|
2066
|
-
repository: string;
|
|
2067
|
-
startedAt: string;
|
|
2068
|
-
verificationCommands: PrVerifyCommandResult[];
|
|
2069
|
-
}
|
|
2070
|
-
type PrVerifyBaselineFullProof = NonNullable<PrVerifyProof["baselineFullProofs"]>[number];
|
|
2071
|
-
declare function validatePrVerifyProof(value: unknown): PrVerifyProof;
|
|
2471
|
+
declare const readPrReviewProof: (filePath: string) => PrReviewProof;
|
|
2472
|
+
declare const PR_REVIEW_PROOF_DESCRIPTOR: ProofDescriptor<PrReviewProof>;
|
|
2072
2473
|
//#endregion
|
|
2073
2474
|
//#region src/schemas.d.ts
|
|
2074
2475
|
declare const boundaryCheckProofSchema: z.ZodObject<{
|
|
@@ -2147,7 +2548,7 @@ interface BoundaryCheckDependencies {
|
|
|
2147
2548
|
declare function runBoundaryCheck(args: BoundaryCheckArgs, dependencies?: BoundaryCheckDependencies): BoundaryCheckProofRecord;
|
|
2148
2549
|
declare function validateBoundaryCheckProof(value: unknown): BoundaryCheckProofRecord;
|
|
2149
2550
|
//#endregion
|
|
2150
|
-
//#region src/
|
|
2551
|
+
//#region src/cli-output.d.ts
|
|
2151
2552
|
interface CliOutput {
|
|
2152
2553
|
stderr: Pick<NodeJS.WriteStream, "write">;
|
|
2153
2554
|
stdout: Pick<NodeJS.WriteStream, "write">;
|
|
@@ -2241,153 +2642,6 @@ interface PrReviewDependencies {
|
|
|
2241
2642
|
hq?: HqIngestDependencies;
|
|
2242
2643
|
}
|
|
2243
2644
|
declare function runPrReview(args: PrReviewArgs, dependencies?: PrReviewDependencies): Promise<PrReviewProof>;
|
|
2244
|
-
declare namespace verification_proof_d_exports {
|
|
2245
|
-
export { PrVerifyBaselineFullProof, PrVerifyCommandResult, PrVerifyExecutedCommand, PrVerifyNotDemandedRecord, PrVerifyNotRequiredCommand, PrVerifyProof, PrVerifySchemaVersion, ResolvedPrVerifyMode, SUPPORTED_PR_VERIFY_SCHEMA_VERSIONS, VerificationHeadShas, VerificationProofState, VerifiedHeadShas, prVerifyFullHeadShasForDiff, prVerifyProofHeadShas, readPrVerifyProof, resolveVerifyProofApplicability, trustedImpactStamp, validatePrVerifyProof, verificationProofApplicabilityFor, verificationProofBlockingReason, verificationProofForReadiness, verificationProofStateFor, verifyProofIdentityMatches, verifyProofPassed };
|
|
2246
|
-
}
|
|
2247
|
-
interface VerifiedHeadShas {
|
|
2248
|
-
docsOnlyVerifiedHeadShas: string[];
|
|
2249
|
-
trivialVerifiedHeadShas: string[];
|
|
2250
|
-
verifiedHeadShas: string[];
|
|
2251
|
-
}
|
|
2252
|
-
type VerificationHeadShas = {
|
|
2253
|
-
explicitFailure: true;
|
|
2254
|
-
} | VerifiedHeadShas;
|
|
2255
|
-
declare function readPrVerifyProof(filePath: string): PrVerifyProof;
|
|
2256
|
-
declare const verifyProofPassed: (proof: PrVerifyProof) => boolean;
|
|
2257
|
-
declare const prVerifyProofHeadShas: (proof: PrVerifyProof | undefined, creditedHeadSha?: string) => VerifiedHeadShas;
|
|
2258
|
-
declare const verifyProofIdentityMatches: ({
|
|
2259
|
-
currentIdentity,
|
|
2260
|
-
proof
|
|
2261
|
-
}: {
|
|
2262
|
-
currentIdentity?: {
|
|
2263
|
-
patchId: string;
|
|
2264
|
-
mergeBaseSha?: string;
|
|
2265
|
-
};
|
|
2266
|
-
proof?: PrVerifyProof;
|
|
2267
|
-
}) => boolean;
|
|
2268
|
-
/**
|
|
2269
|
-
* Wave-2 consumption (#542): the recorded impact stamp, released for demand
|
|
2270
|
-
* resolution ONLY when it is identity-bound to the current candidate — the
|
|
2271
|
-
* proof passed, and its recorded headSha AND patchId both name exactly this
|
|
2272
|
-
* candidate (the same identities the proof already binds). Everything else —
|
|
2273
|
-
* no proof, an aborted run, a stale head, a moved patch id, a pre-stamp proof
|
|
2274
|
-
* — returns `undefined`, and the consumer keeps today's full-demand floor.
|
|
2275
|
-
*
|
|
2276
|
-
* Deliberately stricter than verify-once applicability (which tolerates a
|
|
2277
|
-
* head-only or patch-id-only match): a stamp narrows external demands, so it
|
|
2278
|
-
* is trusted only on an exact double binding, fail closed.
|
|
2279
|
-
*/
|
|
2280
|
-
declare const trustedImpactStamp: ({
|
|
2281
|
-
candidate,
|
|
2282
|
-
proof
|
|
2283
|
-
}: {
|
|
2284
|
-
candidate: {
|
|
2285
|
-
headSha: string;
|
|
2286
|
-
patchId: string;
|
|
2287
|
-
};
|
|
2288
|
-
proof: PrVerifyProof | undefined;
|
|
2289
|
-
}) => ImpactStamp | undefined;
|
|
2290
|
-
declare const prVerifyFullHeadShasForDiff: ({
|
|
2291
|
-
docsOnlyDeltaAcceptedSince,
|
|
2292
|
-
files,
|
|
2293
|
-
proof
|
|
2294
|
-
}: {
|
|
2295
|
-
docsOnlyDeltaAcceptedSince?: (baselineHeadSha: string) => boolean;
|
|
2296
|
-
files: string[];
|
|
2297
|
-
proof: PrVerifyProof;
|
|
2298
|
-
}) => string[];
|
|
2299
|
-
type VerificationProofState = {
|
|
2300
|
-
kind: "typed-aborted";
|
|
2301
|
-
proof: PrVerifyProof;
|
|
2302
|
-
} | {
|
|
2303
|
-
kind: "typed-missing";
|
|
2304
|
-
path: string;
|
|
2305
|
-
reason: "enoent" | "invalid";
|
|
2306
|
-
message?: string;
|
|
2307
|
-
} | {
|
|
2308
|
-
kind: "typed";
|
|
2309
|
-
headShas: VerifiedHeadShas;
|
|
2310
|
-
proof: PrVerifyProof;
|
|
2311
|
-
} | {
|
|
2312
|
-
kind: "typed-diff-mismatch";
|
|
2313
|
-
mode: ResolvedPrVerifyMode;
|
|
2314
|
-
};
|
|
2315
|
-
declare const verificationProofStateFor: ({
|
|
2316
|
-
proof,
|
|
2317
|
-
proofMatchesCurrentDiff,
|
|
2318
|
-
proofPath
|
|
2319
|
-
}: {
|
|
2320
|
-
proof?: PrVerifyProof;
|
|
2321
|
-
proofMatchesCurrentDiff?: boolean;
|
|
2322
|
-
proofPath?: string;
|
|
2323
|
-
}) => VerificationProofState;
|
|
2324
|
-
declare const verificationProofApplicabilityFor: ({
|
|
2325
|
-
docsOnlyDeltaAcceptedSince,
|
|
2326
|
-
explicitProof,
|
|
2327
|
-
files,
|
|
2328
|
-
headSha,
|
|
2329
|
-
currentIdentity,
|
|
2330
|
-
proof,
|
|
2331
|
-
proofPath,
|
|
2332
|
-
proofReadError
|
|
2333
|
-
}: {
|
|
2334
|
-
docsOnlyDeltaAcceptedSince?: (baselineHeadSha: string) => boolean;
|
|
2335
|
-
explicitProof: boolean;
|
|
2336
|
-
files: string[];
|
|
2337
|
-
headSha: string;
|
|
2338
|
-
currentIdentity?: {
|
|
2339
|
-
patchId: string;
|
|
2340
|
-
mergeBaseSha?: string;
|
|
2341
|
-
};
|
|
2342
|
-
proof?: PrVerifyProof;
|
|
2343
|
-
proofPath?: string;
|
|
2344
|
-
proofReadError?: unknown;
|
|
2345
|
-
}) => {
|
|
2346
|
-
fullVerifiedHeadShas: never[];
|
|
2347
|
-
verificationProof: VerificationProofState;
|
|
2348
|
-
} | {
|
|
2349
|
-
fullVerifiedHeadShas: string[];
|
|
2350
|
-
verificationProof: {
|
|
2351
|
-
headShas: VerifiedHeadShas;
|
|
2352
|
-
kind: "typed";
|
|
2353
|
-
proof: PrVerifyProof;
|
|
2354
|
-
};
|
|
2355
|
-
};
|
|
2356
|
-
declare const resolveVerifyProofApplicability: ({
|
|
2357
|
-
proofPath,
|
|
2358
|
-
explicitProof,
|
|
2359
|
-
docsOnlyDeltaAcceptedSince,
|
|
2360
|
-
files,
|
|
2361
|
-
headSha,
|
|
2362
|
-
currentVerifyIdentityForBase,
|
|
2363
|
-
preread
|
|
2364
|
-
}: {
|
|
2365
|
-
proofPath: string;
|
|
2366
|
-
explicitProof: boolean;
|
|
2367
|
-
docsOnlyDeltaAcceptedSince?: (baselineHeadSha: string) => boolean;
|
|
2368
|
-
files: string[];
|
|
2369
|
-
headSha: string;
|
|
2370
|
-
currentVerifyIdentityForBase?: (base: string) => {
|
|
2371
|
-
patchId: string;
|
|
2372
|
-
mergeBaseSha?: string;
|
|
2373
|
-
};
|
|
2374
|
-
preread?: {
|
|
2375
|
-
proof?: PrVerifyProof;
|
|
2376
|
-
error?: unknown;
|
|
2377
|
-
};
|
|
2378
|
-
}) => {
|
|
2379
|
-
fullVerifiedHeadShas: never[];
|
|
2380
|
-
verificationProof: VerificationProofState;
|
|
2381
|
-
} | {
|
|
2382
|
-
fullVerifiedHeadShas: string[];
|
|
2383
|
-
verificationProof: {
|
|
2384
|
-
headShas: VerifiedHeadShas;
|
|
2385
|
-
kind: "typed";
|
|
2386
|
-
proof: PrVerifyProof;
|
|
2387
|
-
};
|
|
2388
|
-
};
|
|
2389
|
-
declare const verificationProofForReadiness: (state: VerificationProofState) => VerificationHeadShas;
|
|
2390
|
-
declare const verificationProofBlockingReason: (state: VerificationProofState) => string | undefined;
|
|
2391
2645
|
//#endregion
|
|
2392
2646
|
//#region src/workspace-install-resolution.d.ts
|
|
2393
2647
|
interface CleanInstallResolutionDependencies {
|
|
@@ -2607,6 +2861,22 @@ type PrReadyAction = (args: PrReadyArgs) => Promise<unknown>;
|
|
|
2607
2861
|
//#region src/commands/pr-review.d.ts
|
|
2608
2862
|
type PrReviewAction = (args: PrReviewArgs) => Promise<unknown>;
|
|
2609
2863
|
//#endregion
|
|
2864
|
+
//#region src/pr-status-hud-command.d.ts
|
|
2865
|
+
interface PrStatusHudArgs {
|
|
2866
|
+
readonly cwd: string;
|
|
2867
|
+
readonly headSha: string;
|
|
2868
|
+
readonly owner: string;
|
|
2869
|
+
readonly planPath?: string;
|
|
2870
|
+
readonly pr: number;
|
|
2871
|
+
readonly repo: string;
|
|
2872
|
+
readonly token: string;
|
|
2873
|
+
}
|
|
2874
|
+
type PrStatusHudAction = (args: PrStatusHudArgs) => Promise<{
|
|
2875
|
+
action: string;
|
|
2876
|
+
commentId: number;
|
|
2877
|
+
url: string;
|
|
2878
|
+
}>;
|
|
2879
|
+
//#endregion
|
|
2610
2880
|
//#region src/packages/trace/implementation/core.d.ts
|
|
2611
2881
|
declare const FactoryTraceEnvelopeCoreSchema: z.ZodObject<{
|
|
2612
2882
|
createdAt: z.ZodString;
|
|
@@ -2680,11 +2950,11 @@ declare const LegacyWorkerCloseoutStatusTraceEventSchema: z.ZodObject<{
|
|
|
2680
2950
|
threadId: z.ZodOptional<z.ZodString>;
|
|
2681
2951
|
workerId: z.ZodOptional<z.ZodString>;
|
|
2682
2952
|
archiveStatus: z.ZodOptional<z.ZodEnum<{
|
|
2953
|
+
pending: "pending";
|
|
2683
2954
|
unavailable: "unavailable";
|
|
2684
2955
|
archived: "archived";
|
|
2685
2956
|
skipped: "skipped";
|
|
2686
2957
|
"not-applicable": "not-applicable";
|
|
2687
|
-
pending: "pending";
|
|
2688
2958
|
}>>;
|
|
2689
2959
|
closeoutReason: z.ZodOptional<z.ZodString>;
|
|
2690
2960
|
eventType: z.ZodLiteral<"worker-closeout-lessons">;
|
|
@@ -2854,8 +3124,8 @@ declare const FACTORY_TRACE_EVENT_DEFINITIONS: readonly [DefinedTraceEvent<"revi
|
|
|
2854
3124
|
sessionId: z.ZodOptional<z.ZodString>;
|
|
2855
3125
|
}, z.core.$strict>>;
|
|
2856
3126
|
stage: z.ZodEnum<{
|
|
2857
|
-
interior: "interior";
|
|
2858
3127
|
gate: "gate";
|
|
3128
|
+
interior: "interior";
|
|
2859
3129
|
}>;
|
|
2860
3130
|
usage: z.ZodOptional<z.ZodObject<{
|
|
2861
3131
|
estimatedCostUsd: z.ZodOptional<z.ZodNumber>;
|
|
@@ -2907,8 +3177,8 @@ declare const FACTORY_TRACE_EVENT_DEFINITIONS: readonly [DefinedTraceEvent<"revi
|
|
|
2907
3177
|
sessionId: z.ZodOptional<z.ZodString>;
|
|
2908
3178
|
}, z.core.$strict>>;
|
|
2909
3179
|
stage: z.ZodEnum<{
|
|
2910
|
-
interior: "interior";
|
|
2911
3180
|
gate: "gate";
|
|
3181
|
+
interior: "interior";
|
|
2912
3182
|
}>;
|
|
2913
3183
|
usage: z.ZodOptional<z.ZodObject<{
|
|
2914
3184
|
estimatedCostUsd: z.ZodOptional<z.ZodNumber>;
|
|
@@ -2951,8 +3221,8 @@ declare const FACTORY_TRACE_EVENT_DEFINITIONS: readonly [DefinedTraceEvent<"revi
|
|
|
2951
3221
|
sessionId: z.ZodOptional<z.ZodString>;
|
|
2952
3222
|
}, z.core.$strict>>;
|
|
2953
3223
|
stage: z.ZodEnum<{
|
|
2954
|
-
interior: "interior";
|
|
2955
3224
|
gate: "gate";
|
|
3225
|
+
interior: "interior";
|
|
2956
3226
|
}>;
|
|
2957
3227
|
usage: z.ZodOptional<z.ZodObject<{
|
|
2958
3228
|
estimatedCostUsd: z.ZodOptional<z.ZodNumber>;
|
|
@@ -2982,7 +3252,7 @@ declare const FACTORY_TRACE_EVENT_DEFINITIONS: readonly [DefinedTraceEvent<"revi
|
|
|
2982
3252
|
staleRepeats: number;
|
|
2983
3253
|
};
|
|
2984
3254
|
observedAt: string;
|
|
2985
|
-
stage: "
|
|
3255
|
+
stage: "gate" | "interior";
|
|
2986
3256
|
issue?: number | undefined;
|
|
2987
3257
|
pr?: number | undefined;
|
|
2988
3258
|
threadId?: string | undefined;
|
|
@@ -3075,11 +3345,11 @@ declare const FACTORY_TRACE_EVENT_DEFINITIONS: readonly [DefinedTraceEvent<"revi
|
|
|
3075
3345
|
threadId: z.ZodOptional<z.ZodString>;
|
|
3076
3346
|
workerId: z.ZodOptional<z.ZodString>;
|
|
3077
3347
|
archiveStatus: z.ZodOptional<z.ZodEnum<{
|
|
3348
|
+
pending: "pending";
|
|
3078
3349
|
unavailable: "unavailable";
|
|
3079
3350
|
archived: "archived";
|
|
3080
3351
|
skipped: "skipped";
|
|
3081
3352
|
"not-applicable": "not-applicable";
|
|
3082
|
-
pending: "pending";
|
|
3083
3353
|
}>>;
|
|
3084
3354
|
closeoutReason: z.ZodOptional<z.ZodString>;
|
|
3085
3355
|
eventType: z.ZodLiteral<"worker-closeout-lessons">;
|
|
@@ -3116,11 +3386,11 @@ declare const FACTORY_TRACE_EVENT_DEFINITIONS: readonly [DefinedTraceEvent<"revi
|
|
|
3116
3386
|
}, z.core.$strict>], "lessonStatus">;
|
|
3117
3387
|
readonly 2: z.ZodObject<{
|
|
3118
3388
|
archiveStatus: z.ZodOptional<z.ZodEnum<{
|
|
3389
|
+
pending: "pending";
|
|
3119
3390
|
unavailable: "unavailable";
|
|
3120
3391
|
archived: "archived";
|
|
3121
3392
|
skipped: "skipped";
|
|
3122
3393
|
"not-applicable": "not-applicable";
|
|
3123
|
-
pending: "pending";
|
|
3124
3394
|
}>>;
|
|
3125
3395
|
closeoutReason: z.ZodOptional<z.ZodString>;
|
|
3126
3396
|
lessonStatus: z.ZodOptional<z.ZodEnum<{
|
|
@@ -3238,8 +3508,8 @@ declare const FACTORY_TRACE_EVENT_DEFINITIONS: readonly [DefinedTraceEvent<"revi
|
|
|
3238
3508
|
interiorCycle: z.ZodOptional<z.ZodNumber>;
|
|
3239
3509
|
observedAt: z.ZodString;
|
|
3240
3510
|
purpose: z.ZodEnum<{
|
|
3241
|
-
review: "review";
|
|
3242
3511
|
code: "code";
|
|
3512
|
+
review: "review";
|
|
3243
3513
|
}>;
|
|
3244
3514
|
slotResolution: z.ZodObject<{
|
|
3245
3515
|
effort: z.ZodEnum<{
|
|
@@ -3317,8 +3587,8 @@ declare const FACTORY_TRACE_EVENT_DEFINITIONS: readonly [DefinedTraceEvent<"revi
|
|
|
3317
3587
|
interiorCycle: z.ZodOptional<z.ZodNumber>;
|
|
3318
3588
|
observedAt: z.ZodString;
|
|
3319
3589
|
purpose: z.ZodEnum<{
|
|
3320
|
-
review: "review";
|
|
3321
3590
|
code: "code";
|
|
3591
|
+
review: "review";
|
|
3322
3592
|
}>;
|
|
3323
3593
|
slotResolution: z.ZodObject<{
|
|
3324
3594
|
effort: z.ZodEnum<{
|
|
@@ -3387,8 +3657,8 @@ declare const FACTORY_TRACE_EVENT_DEFINITIONS: readonly [DefinedTraceEvent<"revi
|
|
|
3387
3657
|
interiorCycle: z.ZodOptional<z.ZodNumber>;
|
|
3388
3658
|
observedAt: z.ZodString;
|
|
3389
3659
|
purpose: z.ZodEnum<{
|
|
3390
|
-
review: "review";
|
|
3391
3660
|
code: "code";
|
|
3661
|
+
review: "review";
|
|
3392
3662
|
}>;
|
|
3393
3663
|
slotResolution: z.ZodObject<{
|
|
3394
3664
|
effort: z.ZodEnum<{
|
|
@@ -3460,7 +3730,7 @@ declare const FACTORY_TRACE_EVENT_DEFINITIONS: readonly [DefinedTraceEvent<"revi
|
|
|
3460
3730
|
exitCode: number | null;
|
|
3461
3731
|
harness: string;
|
|
3462
3732
|
observedAt: string;
|
|
3463
|
-
purpose: "
|
|
3733
|
+
purpose: "code" | "review";
|
|
3464
3734
|
slotResolution: {
|
|
3465
3735
|
effort: "high" | "low" | "medium" | "xhigh";
|
|
3466
3736
|
engine: string;
|
|
@@ -3743,7 +4013,7 @@ declare const CORRECTNESS_UNTYPED_REVIEW_BLOCKER_REASON = "Correctness review pr
|
|
|
3743
4013
|
declare const SECURITY_UNTYPED_REVIEW_BLOCKER_REASON = "Security review proof is not a head-bound typed findings verdict; re-run pr:review with a valid findings file.";
|
|
3744
4014
|
declare const DRAFT_BLOCKER_REASON = "PR is still marked draft.";
|
|
3745
4015
|
declare const PENDING_CHECKS_BLOCKER_REASON_PREFIX = "Required/current checks are";
|
|
3746
|
-
declare const readinessExitCode: (status: ReadinessStatus) =>
|
|
4016
|
+
declare const readinessExitCode: (status: ReadinessStatus) => 0 | 1;
|
|
3747
4017
|
interface EvaluationInput {
|
|
3748
4018
|
pr: number;
|
|
3749
4019
|
prTitle?: string;
|
|
@@ -3792,7 +4062,7 @@ declare const evaluateReadiness: (input: EvaluationInput) => {
|
|
|
3792
4062
|
draft: boolean;
|
|
3793
4063
|
mergeStateStatus: string;
|
|
3794
4064
|
mergeable: string;
|
|
3795
|
-
requiredChecks: "unknown" | "
|
|
4065
|
+
requiredChecks: "unknown" | "passed" | "failed" | "pending" | "none";
|
|
3796
4066
|
unresolvedReviewThreads: number;
|
|
3797
4067
|
reviewDecision?: string | null | undefined;
|
|
3798
4068
|
};
|
|
@@ -3807,13 +4077,13 @@ declare const evaluateReadiness: (input: EvaluationInput) => {
|
|
|
3807
4077
|
reviews: {
|
|
3808
4078
|
correctness: {
|
|
3809
4079
|
required: boolean;
|
|
3810
|
-
status: "
|
|
4080
|
+
status: "blocked" | "not-required" | "current" | "stale" | "missing";
|
|
3811
4081
|
reviewedHeadSha?: string | undefined;
|
|
3812
4082
|
reviewedPatchId?: string | undefined;
|
|
3813
4083
|
};
|
|
3814
4084
|
security?: {
|
|
3815
4085
|
required: boolean;
|
|
3816
|
-
status: "
|
|
4086
|
+
status: "blocked" | "not-required" | "current" | "stale" | "missing";
|
|
3817
4087
|
reviewedHeadSha?: string | undefined;
|
|
3818
4088
|
reviewedPatchId?: string | undefined;
|
|
3819
4089
|
} | undefined;
|
|
@@ -3821,7 +4091,7 @@ declare const evaluateReadiness: (input: EvaluationInput) => {
|
|
|
3821
4091
|
schemaVersion: 1;
|
|
3822
4092
|
verification: {
|
|
3823
4093
|
command: "patronage-factory pr:verify";
|
|
3824
|
-
prVerify: "
|
|
4094
|
+
prVerify: "passed" | "stale" | "missing";
|
|
3825
4095
|
docsOnlyDeltaAccepted?: boolean | undefined;
|
|
3826
4096
|
docsOnlyVerifiedHeadSha?: string | undefined;
|
|
3827
4097
|
trivialDeltaAccepted?: boolean | undefined;
|
|
@@ -3864,7 +4134,7 @@ declare const evaluateReadiness: (input: EvaluationInput) => {
|
|
|
3864
4134
|
interior: number;
|
|
3865
4135
|
};
|
|
3866
4136
|
nextAction: "run-gate-cycle" | "accept-nonblocking-findings" | "escalate-to-triage" | "ready-for-human" | "advance-to-gate" | "run-interior-cycle";
|
|
3867
|
-
stage: "
|
|
4137
|
+
stage: "gate" | "interior" | "interior-complete";
|
|
3868
4138
|
forcedTransition?: "gate-cap-exhausted" | "interior-cap-reached" | undefined;
|
|
3869
4139
|
} | undefined;
|
|
3870
4140
|
reviewRuns?: PrReviewResult[] | undefined;
|
|
@@ -4294,92 +4564,6 @@ declare const planVerificationBattery: <Command extends BatteryCandidateCommand>
|
|
|
4294
4564
|
/** Console lines naming every withheld command and why. Never silent. */
|
|
4295
4565
|
declare const batteryScopeSummaryLines: (plan: VerificationBatteryPlan<BatteryCandidateCommand>) => string[];
|
|
4296
4566
|
//#endregion
|
|
4297
|
-
//#region src/preview-lifecycle.d.ts
|
|
4298
|
-
type PreviewDisposition = "deploy" | "not-required";
|
|
4299
|
-
interface PreviewTargetPlan {
|
|
4300
|
-
basis: string;
|
|
4301
|
-
disposition: PreviewDisposition;
|
|
4302
|
-
name: string;
|
|
4303
|
-
}
|
|
4304
|
-
interface PreviewLifecyclePlan {
|
|
4305
|
-
/** The declared preview stacks to deploy, in declaration order. */
|
|
4306
|
-
deploy: string[];
|
|
4307
|
-
/** The withheld stacks, in declaration order. */
|
|
4308
|
-
notRequired: PreviewTargetPlan[];
|
|
4309
|
-
/** Whether a trusted, identity-bound stamp was available at all. */
|
|
4310
|
-
stampTrusted: boolean;
|
|
4311
|
-
/** Every declared preview target with its disposition, in declaration order. */
|
|
4312
|
-
targets: PreviewTargetPlan[];
|
|
4313
|
-
}
|
|
4314
|
-
/**
|
|
4315
|
-
* Structural subset of the profile: the impact declarations plus the external
|
|
4316
|
-
* demand list. Structural rather than a `Pick` so this module does not import
|
|
4317
|
-
* `profile.ts`.
|
|
4318
|
-
*/
|
|
4319
|
-
interface PreviewLifecycleProfile {
|
|
4320
|
-
impact?: {
|
|
4321
|
-
targets: {
|
|
4322
|
-
name: string;
|
|
4323
|
-
}[];
|
|
4324
|
-
};
|
|
4325
|
-
requiredChecks?: {
|
|
4326
|
-
name: string;
|
|
4327
|
-
}[];
|
|
4328
|
-
}
|
|
4329
|
-
/**
|
|
4330
|
-
* The declared preview stacks: impact targets that are ALSO declared required
|
|
4331
|
-
* checks — i.e. targets whose proof is produced externally, which is exactly
|
|
4332
|
-
* what a preview producer is.
|
|
4333
|
-
*
|
|
4334
|
-
* Deriving the list from the two existing declarations rather than adding a
|
|
4335
|
-
* third is what makes lifecycle and demand unable to disagree: the stacks this
|
|
4336
|
-
* plan can withhold are precisely the demands wave 2 can release, so a stack
|
|
4337
|
-
* can never be skipped while its proof stays demanded.
|
|
4338
|
-
*/
|
|
4339
|
-
declare const previewLifecycleTargets: (profile: PreviewLifecycleProfile) => string[];
|
|
4340
|
-
/**
|
|
4341
|
-
* Plan the preview lifecycle for one candidate.
|
|
4342
|
-
*
|
|
4343
|
-
* Trust is resolved here through the SAME identity gate demand release uses
|
|
4344
|
-
* (`trustedImpactStamp`): the proof must have passed and must bind both the
|
|
4345
|
-
* candidate's headSha and its patchId. A stale, aborted, absent, or
|
|
4346
|
-
* differently-bound proof yields no stamp, and every declared stack is planned
|
|
4347
|
-
* for deploy. Total over its INPUTS — no proof, stamp, or profile can make it
|
|
4348
|
-
* throw. A malformed CALL is the deliberate exception: omitting
|
|
4349
|
-
* `vetoedTargets` is API misuse, not data doubt, and throws.
|
|
4350
|
-
*/
|
|
4351
|
-
declare const planPreviewLifecycle: ({
|
|
4352
|
-
candidate,
|
|
4353
|
-
profile,
|
|
4354
|
-
proof,
|
|
4355
|
-
vetoedTargets
|
|
4356
|
-
}: {
|
|
4357
|
-
candidate: {
|
|
4358
|
-
headSha: string;
|
|
4359
|
-
patchId: string;
|
|
4360
|
-
};
|
|
4361
|
-
profile: PreviewLifecycleProfile;
|
|
4362
|
-
proof: PrVerifyProof | undefined;
|
|
4363
|
-
/**
|
|
4364
|
-
* Stack names with a current, candidate-bound FAILING envelope. Scoping is
|
|
4365
|
-
* withheld for these whatever the stamp says — the same veto demand release
|
|
4366
|
-
* applies, and for the same reason: a withheld stack is a stack that can
|
|
4367
|
-
* never re-emit the envelope its standing demand needs. Callers hold the
|
|
4368
|
-
* checkout context, so they resolve the set with `boundFailingCheckNames`
|
|
4369
|
-
* and pass it in; this module stays pure.
|
|
4370
|
-
*
|
|
4371
|
-
* REQUIRED, with no default, on purpose: a defaulted `[]` reads the same
|
|
4372
|
-
* whether the caller inspected the envelopes or never looked, and this seam
|
|
4373
|
-
* exists precisely for EXTERNAL preview producers — the callers most likely
|
|
4374
|
-
* to skip the lookup. Pass the result of `boundFailingCheckNames`; pass `[]`
|
|
4375
|
-
* only to mean "inspected the envelopes and found no bound failure".
|
|
4376
|
-
*
|
|
4377
|
-
* Deliberately visible to `api:check` as a breaking signature change
|
|
4378
|
-
* (pre-1.0, no external callers yet).
|
|
4379
|
-
*/
|
|
4380
|
-
vetoedTargets: readonly string[];
|
|
4381
|
-
}) => PreviewLifecyclePlan;
|
|
4382
|
-
//#endregion
|
|
4383
4567
|
//#region src/worker-checkout-guard.d.ts
|
|
4384
4568
|
type CheckoutDirsProbe = (cwd: string) => {
|
|
4385
4569
|
gitCommonDir: string;
|
|
@@ -4406,6 +4590,7 @@ interface CreateProgramOptions {
|
|
|
4406
4590
|
prPublish?: PrPublishAction;
|
|
4407
4591
|
prReady?: PrReadyAction;
|
|
4408
4592
|
prReview?: PrReviewAction;
|
|
4593
|
+
prStatusHud?: PrStatusHudAction;
|
|
4409
4594
|
};
|
|
4410
4595
|
factoryCliInvocation?: FactoryCliInvocation;
|
|
4411
4596
|
output?: CliOutput;
|
|
@@ -4413,4 +4598,4 @@ interface CreateProgramOptions {
|
|
|
4413
4598
|
declare function createProgram(options?: CreateProgramOptions): Command;
|
|
4414
4599
|
declare function run(argv?: string[]): Promise<void>;
|
|
4415
4600
|
//#endregion
|
|
4416
|
-
export { type AppendFactoryTraceEventResult, type AssembledReviewPrompt, type BatteryCommandDisposition, type BatteryDisposition, type BoundaryCheckArgs, type BoundaryCheckDependencies, type BoundaryCheckProofRecord, type BuildEpicStructureEventInput, type CloudflareAccessServiceToken, CreateProgramOptions, DEFAULT_DEMAND_WAIVER_PATH, DEFAULT_FACTORY_REPOSITORY, DEFAULT_ROOT_SHARED_GLOBS, type DagDocument, type DemandWaiveArgs, type DemandWaiveDependencies, DemandWaiveRefusalError, type DemandWaiver, type DemandWaiverStore, EMPTY_TREE_OBJECT_HASH, EPIC_STRUCTURE_NODE_STATUSES, EPIC_STRUCTURE_SCHEMA_VERSION, type EpicStructureEvent, type EpicStructureGraphPayload, type EpicStructureNodeStatus, EpicStructureValidationError, type EvidenceEmitArgs, type EvidenceEmitDependencies, type EvidenceEmitResult, FACTORY_BASE_REF_ENV, FACTORY_CHANGED_FILES_ENV, FACTORY_CHANGED_FILES_FILE_ENV, type FactoryCliInvocation, FactoryCliInvocationSchema, type FactoryProjectProfile, type FactoryTraceDiagnostic, type FactoryTraceEnvelope, type FactoryTraceEvent, type FindingDisposition, type FindingLedgerEntry, type FollowUpAction, FollowUpActionSchema, type ImpactScopeDecision, type ImpactScopeSurface, type IssueReviewFocus, type LadderDispositionDeclaration, MERGE_FREEZE_APP_SLUG, MERGE_FREEZE_CHECK_NAME, type MergeFreezeState, type PrPublishArgs, type PrPublishDependencies, PrPublishFollowUpError, type PrPublishFollowUpOutcome, type PrPublishHandoff, type PrPublishResult, type PrReadyArgs, type PrReadyProof, type PreviewDisposition, type PreviewLifecyclePlan, type PreviewTargetPlan, type PublishEpicStructureArgs, type PublishEpicStructureResult, type PublishFollowUpPlan, REVIEW_FOCUS_SECTION, type ReviewGateNotRequiredProof, type ReviewGateTraceIdentity, type ReviewLadderCycle, type ReviewLadderEvaluation, type ReviewLadderPolicy, type ReviewLadderStageEvent, type ReviewLadderTraceIdentity, type ReviewPromptSection, type ReviewPromptSectionProvenance, type ScanFactoryTraceDiagnosticsOptions, type ScanFactoryTraceOptions, type ScanFactoryTraceResult, type ScopedOutCommand, type TraceMirrorDiagnostic, type TraceSink, type TraceWriteResult, type TraceWriteSinks, type VerificationBatteryPlan, type VerificationReuse, type VerificationRunContext, type VerificationRunContextInput, type WaivedDemand, WorkerCheckoutGuardError, type WorkerCloseoutLessonsTraceEvent, appendReviewLadderStageTraceEvent, appendWithTraceSinks, applyDemandWaiver, assembleReviewPrompt, assertWorkerCheckoutAllowed, authorizeDemandWaiver, batteryScopeSummaryLines, blockingLadderFindings, boundary_manifest_d_exports as boundaryManifest, boundary_review_proof_d_exports as boundaryReviewProof, buildEpicStructureEvent, buildEpicStructurePayload, buildEvidenceEnvelope, buildReviewGateNotRequiredTraceEvent, buildReviewLadderStageTraceEvent, comment_provenance_d_exports as commentProvenance, createLocalJsonlTraceSink, createProgram, createVerificationRunContext, doctorProjectProfile, epicStructureEventId, evaluateReviewLadder, evidenceEnvelopeFilename, findingKey, followUpFromArgv, impactStampScopeDecision, inferFixedInThreadDispositions, isProductionHqUrl, loadProjectProfile, normalizeIssueComments, openLadderFindings, planPreviewLifecycle, planPublishFollowUp, planVerificationBattery, readiness_evaluation_d_exports as prReadinessEvaluation, external_evidence_d_exports as prReadinessExternalEvidence, pr_body_renderer_d_exports as prReadinessPrBodyRenderer, proof_identity_d_exports as prReadinessProofIdentity, review_proof_d_exports as prReadinessReviewProof, status_check_rollup_d_exports as prReadinessStatusChecks, verification_proof_d_exports as prReadinessVerificationProof, previewLifecycleTargets, publishEpicStructure, readDemandWaivers, readPrReadyProof, readPrReviewProof, resolveFactoryRepository, resolveFindingBlocking, resolveReviewFindingCategory, resolveReviewFindingSeverity, resolveReviewLadderPolicy, resolveTraceWriteSinks, reviewCycleStateFor, reviewFocusFromIssueBody, reviewPromptSectionSchema, reviewPromptSectionsSchema, run, runBoundaryCheck, runDemandWaive, runEvidenceEmit, runPrPublish, runPrReady, runPrReview, runPrVerify, scanFactoryTraceDiagnostics, scanFactoryTraceEvents, selectWaiversForCandidate, staleRepeatLadderFindings, toFactoryTraceEnvelope, tryAppendReviewGateNotRequiredTraceEvent, tryAppendReviewLadderStageTraceEvent, validateBoundaryCheckProof, validateDagDocument, validateDemandWaiverStore, validateFactoryTraceEvent, validateMergeFreezeState, validatePrReadyProof, validatePrReviewProof, validatePrVerifyProof, waivedDemandNotice, waivedDemandSchema, worktree_scratch_files_d_exports as worktreeScratchFiles };
|
|
4601
|
+
export { type AppendFactoryTraceEventResult, type AssembledReviewPrompt, type BatteryCommandDisposition, type BatteryDisposition, type BoundaryCheckArgs, type BoundaryCheckDependencies, type BoundaryCheckProofRecord, type BuildEpicStructureEventInput, type CloudflareAccessServiceToken, type CompletedFactoryCheckSnapshot, CreateProgramOptions, DEFAULT_DEMAND_WAIVER_PATH, DEFAULT_FACTORY_REPOSITORY, DEFAULT_ROOT_SHARED_GLOBS, type DagDocument, type DemandWaiveArgs, type DemandWaiveDependencies, DemandWaiveRefusalError, type DemandWaiver, type DemandWaiverStore, EMPTY_TREE_OBJECT_HASH, EPIC_STRUCTURE_NODE_STATUSES, EPIC_STRUCTURE_SCHEMA_VERSION, type EpicStructureEvent, type EpicStructureGraphPayload, type EpicStructureNodeStatus, EpicStructureValidationError, type EvidenceEmitArgs, type EvidenceEmitDependencies, type EvidenceEmitResult, FACTORY_BASE_REF_ENV, FACTORY_CHANGED_FILES_ENV, FACTORY_CHANGED_FILES_FILE_ENV, type FactoryCliInvocation, FactoryCliInvocationSchema, type FactoryPrStatusCheckName, type FactoryPrStatusSources, type FactoryProjectProfile, type FactoryTraceDiagnostic, type FactoryTraceEnvelope, type FactoryTraceEvent, type FindingDisposition, type FindingLedgerEntry, type FollowUpAction, FollowUpActionSchema, type ImpactScopeDecision, type ImpactScopeSurface, type IssueReviewFocus, type LadderDispositionDeclaration, MERGE_FREEZE_APP_SLUG, MERGE_FREEZE_CHECK_NAME, type MergeFreezeState, type PlanFactoryPrStatusHudInput, type PrPublishArgs, type PrPublishDependencies, PrPublishFollowUpError, type PrPublishFollowUpOutcome, type PrPublishHandoff, type PrPublishResult, type PrReadyArgs, type PrReadyProof, type PresentFactoryPrStatusHudDependencies, type PresentFactoryPrStatusHudInput, type PreviewDisposition, type PreviewLifecyclePlan, type PreviewTargetPlan, type PublishEpicStructureArgs, type PublishEpicStructureResult, type PublishFollowUpPlan, REVIEW_FOCUS_SECTION, type ReadFactoryPrStatusSourcesDependencies, type ReadFactoryPrStatusSourcesInput, type RefreshFactoryPrStatusHudInput, type RenderFactoryPrStatusHudInput, type ReviewGateNotRequiredProof, type ReviewGateTraceIdentity, type ReviewLadderCycle, type ReviewLadderEvaluation, type ReviewLadderPolicy, type ReviewLadderStageEvent, type ReviewLadderTraceIdentity, type ReviewPromptSection, type ReviewPromptSectionProvenance, type ScanFactoryTraceDiagnosticsOptions, type ScanFactoryTraceOptions, type ScanFactoryTraceResult, type ScopedOutCommand, type TraceMirrorDiagnostic, type TraceSink, type TraceWriteResult, type TraceWriteSinks, type VerificationBatteryPlan, type VerificationReuse, type VerificationRunContext, type VerificationRunContextInput, type WaivedDemand, WorkerCheckoutGuardError, type WorkerCloseoutLessonsTraceEvent, appendReviewLadderStageTraceEvent, appendWithTraceSinks, applyDemandWaiver, assembleReviewPrompt, assertFactoryPrStatusIdentity, assertWorkerCheckoutAllowed, authorizeDemandWaiver, batteryScopeSummaryLines, blockingLadderFindings, boundary_manifest_d_exports as boundaryManifest, boundary_review_proof_d_exports as boundaryReviewProof, buildEpicStructureEvent, buildEpicStructurePayload, buildEvidenceEnvelope, buildReviewGateNotRequiredTraceEvent, buildReviewLadderStageTraceEvent, comment_provenance_d_exports as commentProvenance, createLocalJsonlTraceSink, createProgram, createVerificationRunContext, doctorProjectProfile, epicStructureEventId, evaluateReviewLadder, evidenceEnvelopeFilename, findingKey, followUpFromArgv, impactStampScopeDecision, inferFixedInThreadDispositions, isProductionHqUrl, loadProjectProfile, normalizeIssueComments, openLadderFindings, planFactoryPrStatusHud, planPreviewLifecycle, planPublishFollowUp, planVerificationBattery, readiness_evaluation_d_exports as prReadinessEvaluation, external_evidence_d_exports as prReadinessExternalEvidence, pr_body_renderer_d_exports as prReadinessPrBodyRenderer, proof_identity_d_exports as prReadinessProofIdentity, review_proof_d_exports as prReadinessReviewProof, status_check_rollup_d_exports as prReadinessStatusChecks, verification_proof_d_exports as prReadinessVerificationProof, presentFactoryPrStatusHud, previewLifecycleTargets, publishEpicStructure, readDemandWaivers, readFactoryPrStatusSources, readPrReadyProof, readPrReviewProof, refreshFactoryPrStatusHud, refreshFactoryPrStatusHudSafely, renderFactoryPrStatusHud, resolveFactoryRepository, resolveFindingBlocking, resolveReviewFindingCategory, resolveReviewFindingSeverity, resolveReviewLadderPolicy, resolveTraceWriteSinks, reviewCycleStateFor, reviewFocusFromIssueBody, reviewPromptSectionSchema, reviewPromptSectionsSchema, run, runBoundaryCheck, runDemandWaive, runEvidenceEmit, runPrPublish, runPrReady, runPrReview, runPrVerify, scanFactoryTraceDiagnostics, scanFactoryTraceEvents, selectWaiversForCandidate, staleRepeatLadderFindings, toFactoryTraceEnvelope, tryAppendReviewGateNotRequiredTraceEvent, tryAppendReviewLadderStageTraceEvent, validateBoundaryCheckProof, validateDagDocument, validateDemandWaiverStore, validateFactoryTraceEvent, validateMergeFreezeState, validatePrReadyProof, validatePrReviewProof, validatePrVerifyProof, validatePreviewLifecyclePlan, waivedDemandNotice, waivedDemandSchema, worktree_scratch_files_d_exports as worktreeScratchFiles };
|