@patronage/software-factory 0.30.0-beta.1 → 0.30.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{chunk-DrSxFLj_.js → chunk-pbuEa-1d.js} +0 -1
- package/dist/index.d.ts +17 -48
- package/dist/index.js +721 -1688
- package/dist/schemas.d.ts +407 -4
- package/dist/schemas.js +68 -15
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -525,20 +525,14 @@ type DiffClassification = (typeof DIFF_CLASSIFICATIONS)[number];
|
|
|
525
525
|
//#region src/profile.d.ts
|
|
526
526
|
declare const DEFAULT_FACTORY_REPOSITORY = "unknown/unknown";
|
|
527
527
|
/** The one profile shape this build accepts (ADR 0023, #318, #351). */
|
|
528
|
-
declare const PROFILE_SCHEMA_VERSION =
|
|
528
|
+
declare const PROFILE_SCHEMA_VERSION = 5;
|
|
529
529
|
declare const factoryProjectProfileSchema: z.ZodObject<{
|
|
530
530
|
$schema: z.ZodOptional<z.ZodString>;
|
|
531
|
-
env: z.ZodOptional<z.ZodObject<{
|
|
532
|
-
required: z.ZodArray<z.ZodString>;
|
|
533
|
-
}, z.core.$strict>>;
|
|
534
531
|
extensions: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
535
532
|
hq: z.ZodOptional<z.ZodObject<{
|
|
536
533
|
enabled: z.ZodBoolean;
|
|
537
534
|
endpoint: z.ZodIntersection<z.ZodString, z.ZodString>;
|
|
538
535
|
}, z.core.$strict>>;
|
|
539
|
-
project: z.ZodObject<{
|
|
540
|
-
key: z.ZodString;
|
|
541
|
-
}, z.core.$strict>;
|
|
542
536
|
proof: z.ZodObject<{
|
|
543
537
|
classificationPolicy: z.ZodObject<{
|
|
544
538
|
docsOnly: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
@@ -546,15 +540,10 @@ declare const factoryProjectProfileSchema: z.ZodObject<{
|
|
|
546
540
|
}, z.core.$strict>;
|
|
547
541
|
}, z.core.$strict>;
|
|
548
542
|
repository: z.ZodObject<{
|
|
549
|
-
defaultBranch: z.ZodString;
|
|
550
543
|
name: z.ZodString;
|
|
551
544
|
owner: z.ZodString;
|
|
552
545
|
}, z.core.$strict>;
|
|
553
546
|
requiredChecks: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
554
|
-
checkType: z.ZodEnum<{
|
|
555
|
-
review: "review";
|
|
556
|
-
verify: "verify";
|
|
557
|
-
}>;
|
|
558
547
|
name: z.ZodString;
|
|
559
548
|
scope: z.ZodOptional<z.ZodObject<{
|
|
560
549
|
classifications: z.ZodArray<z.ZodEnum<{
|
|
@@ -564,21 +553,12 @@ declare const factoryProjectProfileSchema: z.ZodObject<{
|
|
|
564
553
|
}>>;
|
|
565
554
|
}, z.core.$strict>>;
|
|
566
555
|
}, z.core.$strict>>>;
|
|
567
|
-
review: z.ZodObject<{
|
|
568
|
-
conditional: z.
|
|
569
|
-
modes: z.ZodArray<z.ZodEnum<{
|
|
570
|
-
correctness: "correctness";
|
|
571
|
-
security: "security";
|
|
572
|
-
}>>;
|
|
556
|
+
review: z.ZodOptional<z.ZodObject<{
|
|
557
|
+
conditional: z.ZodArray<z.ZodObject<{
|
|
573
558
|
paths: z.ZodArray<z.ZodString>;
|
|
574
|
-
}, z.core.$strict
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
correctness: "correctness";
|
|
578
|
-
security: "security";
|
|
579
|
-
}>>;
|
|
580
|
-
}, z.core.$strict>;
|
|
581
|
-
schemaVersion: z.ZodLiteral<4>;
|
|
559
|
+
}, z.core.$strict>>;
|
|
560
|
+
}, z.core.$strict>>;
|
|
561
|
+
schemaVersion: z.ZodLiteral<5>;
|
|
582
562
|
verification: z.ZodObject<{
|
|
583
563
|
commands: z.ZodArray<z.ZodObject<{
|
|
584
564
|
command: z.ZodString;
|
|
@@ -889,7 +869,7 @@ interface ReviewLadderPolicy {
|
|
|
889
869
|
cap: number;
|
|
890
870
|
};
|
|
891
871
|
}
|
|
892
|
-
declare const resolveReviewLadderPolicy: (
|
|
872
|
+
declare const resolveReviewLadderPolicy: () => ReviewLadderPolicy;
|
|
893
873
|
//#endregion
|
|
894
874
|
//#region src/review-rungs.d.ts
|
|
895
875
|
declare const EVIDENCE_REVIEW_RUNGS: readonly ["independent-model", "oracle", "human"];
|
|
@@ -1178,9 +1158,9 @@ declare const managedReadinessLedgerSchema: z.ZodObject<{
|
|
|
1178
1158
|
mergeable: z.ZodString;
|
|
1179
1159
|
requiredChecks: z.ZodEnum<{
|
|
1180
1160
|
unknown: "unknown";
|
|
1161
|
+
pending: "pending";
|
|
1181
1162
|
passed: "passed";
|
|
1182
1163
|
failed: "failed";
|
|
1183
|
-
pending: "pending";
|
|
1184
1164
|
none: "none";
|
|
1185
1165
|
}>;
|
|
1186
1166
|
reviewDecision: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
@@ -1264,8 +1244,8 @@ declare const managedReadinessLedgerSchema: z.ZodObject<{
|
|
|
1264
1244
|
reviewedPatchId: z.ZodOptional<z.ZodString>;
|
|
1265
1245
|
status: z.ZodEnum<{
|
|
1266
1246
|
blocked: "blocked";
|
|
1267
|
-
stale: "stale";
|
|
1268
1247
|
"not-required": "not-required";
|
|
1248
|
+
stale: "stale";
|
|
1269
1249
|
current: "current";
|
|
1270
1250
|
missing: "missing";
|
|
1271
1251
|
}>;
|
|
@@ -1276,8 +1256,8 @@ declare const managedReadinessLedgerSchema: z.ZodObject<{
|
|
|
1276
1256
|
reviewedPatchId: z.ZodOptional<z.ZodString>;
|
|
1277
1257
|
status: z.ZodEnum<{
|
|
1278
1258
|
blocked: "blocked";
|
|
1279
|
-
stale: "stale";
|
|
1280
1259
|
"not-required": "not-required";
|
|
1260
|
+
stale: "stale";
|
|
1281
1261
|
current: "current";
|
|
1282
1262
|
missing: "missing";
|
|
1283
1263
|
}>;
|
|
@@ -1700,8 +1680,8 @@ declare const loadEvidenceEnvelopes: (cwd: string) => LoadedEvidenceEnvelope[];
|
|
|
1700
1680
|
declare const REVIEW_STATUS_VALUES: readonly ["not-required", "current", "stale", "missing", "blocked"];
|
|
1701
1681
|
declare const reviewStatusSchema: z.ZodEnum<{
|
|
1702
1682
|
blocked: "blocked";
|
|
1703
|
-
stale: "stale";
|
|
1704
1683
|
"not-required": "not-required";
|
|
1684
|
+
stale: "stale";
|
|
1705
1685
|
current: "current";
|
|
1706
1686
|
missing: "missing";
|
|
1707
1687
|
}>;
|
|
@@ -2339,7 +2319,6 @@ interface PrReviewArgs extends LoadProjectProfileInput {
|
|
|
2339
2319
|
dispositions?: string;
|
|
2340
2320
|
findings?: string;
|
|
2341
2321
|
issue?: number;
|
|
2342
|
-
maxCycles?: number;
|
|
2343
2322
|
mode: PrReviewMode;
|
|
2344
2323
|
output?: string;
|
|
2345
2324
|
verifyProof?: string;
|
|
@@ -2648,11 +2627,11 @@ declare const LegacyWorkerCloseoutStatusTraceEventSchema: z.ZodObject<{
|
|
|
2648
2627
|
threadId: z.ZodOptional<z.ZodString>;
|
|
2649
2628
|
workerId: z.ZodOptional<z.ZodString>;
|
|
2650
2629
|
archiveStatus: z.ZodOptional<z.ZodEnum<{
|
|
2651
|
-
pending: "pending";
|
|
2652
2630
|
unavailable: "unavailable";
|
|
2653
2631
|
archived: "archived";
|
|
2654
2632
|
skipped: "skipped";
|
|
2655
2633
|
"not-applicable": "not-applicable";
|
|
2634
|
+
pending: "pending";
|
|
2656
2635
|
}>>;
|
|
2657
2636
|
closeoutReason: z.ZodOptional<z.ZodString>;
|
|
2658
2637
|
eventType: z.ZodLiteral<"worker-closeout-lessons">;
|
|
@@ -3043,11 +3022,11 @@ declare const FACTORY_TRACE_EVENT_DEFINITIONS: readonly [DefinedTraceEvent<"revi
|
|
|
3043
3022
|
threadId: z.ZodOptional<z.ZodString>;
|
|
3044
3023
|
workerId: z.ZodOptional<z.ZodString>;
|
|
3045
3024
|
archiveStatus: z.ZodOptional<z.ZodEnum<{
|
|
3046
|
-
pending: "pending";
|
|
3047
3025
|
unavailable: "unavailable";
|
|
3048
3026
|
archived: "archived";
|
|
3049
3027
|
skipped: "skipped";
|
|
3050
3028
|
"not-applicable": "not-applicable";
|
|
3029
|
+
pending: "pending";
|
|
3051
3030
|
}>>;
|
|
3052
3031
|
closeoutReason: z.ZodOptional<z.ZodString>;
|
|
3053
3032
|
eventType: z.ZodLiteral<"worker-closeout-lessons">;
|
|
@@ -3084,11 +3063,11 @@ declare const FACTORY_TRACE_EVENT_DEFINITIONS: readonly [DefinedTraceEvent<"revi
|
|
|
3084
3063
|
}, z.core.$strict>], "lessonStatus">;
|
|
3085
3064
|
readonly 2: z.ZodObject<{
|
|
3086
3065
|
archiveStatus: z.ZodOptional<z.ZodEnum<{
|
|
3087
|
-
pending: "pending";
|
|
3088
3066
|
unavailable: "unavailable";
|
|
3089
3067
|
archived: "archived";
|
|
3090
3068
|
skipped: "skipped";
|
|
3091
3069
|
"not-applicable": "not-applicable";
|
|
3070
|
+
pending: "pending";
|
|
3092
3071
|
}>>;
|
|
3093
3072
|
closeoutReason: z.ZodOptional<z.ZodString>;
|
|
3094
3073
|
lessonStatus: z.ZodOptional<z.ZodEnum<{
|
|
@@ -3686,7 +3665,6 @@ interface DoctorReport {
|
|
|
3686
3665
|
profilePath: string;
|
|
3687
3666
|
projectKey: string;
|
|
3688
3667
|
repository: {
|
|
3689
|
-
defaultBranch: string;
|
|
3690
3668
|
name: string;
|
|
3691
3669
|
owner: string;
|
|
3692
3670
|
};
|
|
@@ -3935,7 +3913,7 @@ declare const evaluateReadiness: (input: EvaluationInput) => {
|
|
|
3935
3913
|
draft: boolean;
|
|
3936
3914
|
mergeStateStatus: string;
|
|
3937
3915
|
mergeable: string;
|
|
3938
|
-
requiredChecks: "unknown" | "
|
|
3916
|
+
requiredChecks: "unknown" | "pending" | "passed" | "failed" | "none";
|
|
3939
3917
|
unresolvedReviewThreads: number;
|
|
3940
3918
|
reviewDecision?: string | null | undefined;
|
|
3941
3919
|
};
|
|
@@ -3950,13 +3928,13 @@ declare const evaluateReadiness: (input: EvaluationInput) => {
|
|
|
3950
3928
|
reviews: {
|
|
3951
3929
|
correctness: {
|
|
3952
3930
|
required: boolean;
|
|
3953
|
-
status: "blocked" | "
|
|
3931
|
+
status: "blocked" | "not-required" | "stale" | "current" | "missing";
|
|
3954
3932
|
reviewedHeadSha?: string | undefined;
|
|
3955
3933
|
reviewedPatchId?: string | undefined;
|
|
3956
3934
|
};
|
|
3957
3935
|
security?: {
|
|
3958
3936
|
required: boolean;
|
|
3959
|
-
status: "blocked" | "
|
|
3937
|
+
status: "blocked" | "not-required" | "stale" | "current" | "missing";
|
|
3960
3938
|
reviewedHeadSha?: string | undefined;
|
|
3961
3939
|
reviewedPatchId?: string | undefined;
|
|
3962
3940
|
} | undefined;
|
|
@@ -4032,18 +4010,15 @@ declare const evaluateReadiness: (input: EvaluationInput) => {
|
|
|
4032
4010
|
interface EvidenceEmitArgs {
|
|
4033
4011
|
base: string;
|
|
4034
4012
|
check: string;
|
|
4035
|
-
checkType: EvidenceCheckType;
|
|
4036
4013
|
cwd: string;
|
|
4037
4014
|
findingsPointer?: string;
|
|
4038
4015
|
json?: boolean;
|
|
4039
|
-
model?: string;
|
|
4040
4016
|
outcome: "pass" | "fail";
|
|
4041
4017
|
output?: string;
|
|
4042
4018
|
policyVersion?: string;
|
|
4043
4019
|
profilePath?: string;
|
|
4044
4020
|
producer: string;
|
|
4045
4021
|
requestId?: string;
|
|
4046
|
-
rung?: EvidenceReviewRung;
|
|
4047
4022
|
sessionId?: string;
|
|
4048
4023
|
}
|
|
4049
4024
|
interface EvidenceEmitDependencies {
|
|
@@ -4157,12 +4132,6 @@ interface EpicStructureEvent {
|
|
|
4157
4132
|
interface BuildEpicStructureEventInput {
|
|
4158
4133
|
/** Parsed dag.yml (or JSON) document. */
|
|
4159
4134
|
document: DagDocument;
|
|
4160
|
-
/** Boundary slug override (else `dag.boundary`, else `epic-<id>`). */
|
|
4161
|
-
boundary?: string;
|
|
4162
|
-
/** Epic display name override (else `dag.name`, else `Epic <id>`). */
|
|
4163
|
-
name?: string;
|
|
4164
|
-
/** Repo name override (else `dag.repo`). Required by one of the two. */
|
|
4165
|
-
repo?: string;
|
|
4166
4135
|
/** Event observedAt; NOT part of the eventId hash. Defaults to now. */
|
|
4167
4136
|
observedAt?: string;
|
|
4168
4137
|
}
|