@agentic-sdlc-kit/contracts 1.2.1 → 1.4.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/agent/capability.d.ts +12 -1
- package/dist/agent/capability.d.ts.map +1 -1
- package/dist/agent/errors.d.ts +29 -11
- package/dist/agent/errors.d.ts.map +1 -1
- package/dist/agent/events.d.ts +42 -153
- package/dist/agent/events.d.ts.map +1 -1
- package/dist/agent/execution.d.ts +151 -415
- package/dist/agent/execution.d.ts.map +1 -1
- package/dist/agent/policy.d.ts +30 -92
- package/dist/agent/policy.d.ts.map +1 -1
- package/dist/agent/session.d.ts +1 -7
- package/dist/agent/session.d.ts.map +1 -1
- package/dist/agent-tools/index.d.ts +20 -58
- package/dist/agent-tools/index.d.ts.map +1 -1
- package/dist/application/application-context.d.ts +80 -582
- package/dist/application/application-context.d.ts.map +1 -1
- package/dist/application/application-persistence.d.ts +161 -924
- package/dist/application/application-persistence.d.ts.map +1 -1
- package/dist/application/application-state.d.ts +94 -70
- package/dist/application/application-state.d.ts.map +1 -1
- package/dist/architecture/api-contract.d.ts +56 -208
- package/dist/architecture/api-contract.d.ts.map +1 -1
- package/dist/architecture/architecture-approval.d.ts +2 -26
- package/dist/architecture/architecture-approval.d.ts.map +1 -1
- package/dist/architecture/architecture-options.d.ts +30 -82
- package/dist/architecture/architecture-options.d.ts.map +1 -1
- package/dist/architecture/component-map.d.ts +34 -60
- package/dist/architecture/component-map.d.ts.map +1 -1
- package/dist/architecture/data-model.d.ts +91 -205
- package/dist/architecture/data-model.d.ts.map +1 -1
- package/dist/architecture/operational-design.d.ts +48 -115
- package/dist/architecture/operational-design.d.ts.map +1 -1
- package/dist/architecture/security-design.d.ts +40 -90
- package/dist/architecture/security-design.d.ts.map +1 -1
- package/dist/benchmark/bench.d.ts +44 -263
- package/dist/benchmark/bench.d.ts.map +1 -1
- package/dist/common/identifier.d.ts +1 -1
- package/dist/common/identifier.d.ts.map +1 -1
- package/dist/constitution/cli-output.d.ts +58 -618
- package/dist/constitution/cli-output.d.ts.map +1 -1
- package/dist/constitution/result.d.ts +31 -84
- package/dist/constitution/result.d.ts.map +1 -1
- package/dist/constitution/rule.d.ts +97 -408
- package/dist/constitution/rule.d.ts.map +1 -1
- package/dist/context/project-context.d.ts +57 -227
- package/dist/context/project-context.d.ts.map +1 -1
- package/dist/evaluation/benchmark.d.ts +26 -66
- package/dist/evaluation/benchmark.d.ts.map +1 -1
- package/dist/evaluation/metrics.d.ts +15 -120
- package/dist/evaluation/metrics.d.ts.map +1 -1
- package/dist/evolution/experiment.d.ts +29 -51
- package/dist/evolution/experiment.d.ts.map +1 -1
- package/dist/evolution/improvement-hypothesis.d.ts +56 -78
- package/dist/evolution/improvement-hypothesis.d.ts.map +1 -1
- package/dist/execution/execution-profile.d.ts +25 -111
- package/dist/execution/execution-profile.d.ts.map +1 -1
- package/dist/improvement/config.d.ts +3 -17
- package/dist/improvement/config.d.ts.map +1 -1
- package/dist/improvement/config.js +1 -1
- package/dist/improvement/config.js.map +1 -1
- package/dist/improvement/finding.d.ts +24 -71
- package/dist/improvement/finding.d.ts.map +1 -1
- package/dist/improvement/issue.d.ts +10 -39
- package/dist/improvement/issue.d.ts.map +1 -1
- package/dist/improvement/kit-feedback.d.ts +45 -29
- package/dist/improvement/kit-feedback.d.ts.map +1 -1
- package/dist/improvement/review.d.ts +22 -28
- package/dist/improvement/review.d.ts.map +1 -1
- package/dist/installer/install-plan.d.ts +52 -137
- package/dist/installer/install-plan.d.ts.map +1 -1
- package/dist/installer/ownership-manifest.d.ts +7 -62
- package/dist/installer/ownership-manifest.d.ts.map +1 -1
- package/dist/installer/package-manifest.d.ts +25 -40
- package/dist/installer/package-manifest.d.ts.map +1 -1
- package/dist/learning/engineering-lesson.d.ts +19 -65
- package/dist/learning/engineering-lesson.d.ts.map +1 -1
- package/dist/learning/engineering-memory.d.ts +32 -64
- package/dist/learning/engineering-memory.d.ts.map +1 -1
- package/dist/learning/experience-episode.d.ts +33 -141
- package/dist/learning/experience-episode.d.ts.map +1 -1
- package/dist/learning/experience.d.ts +16 -50
- package/dist/learning/experience.d.ts.map +1 -1
- package/dist/learning/hypothesis.d.ts +14 -39
- package/dist/learning/hypothesis.d.ts.map +1 -1
- package/dist/learning/learning-event.d.ts +32 -62
- package/dist/learning/learning-event.d.ts.map +1 -1
- package/dist/learning/memory.d.ts +12 -28
- package/dist/learning/memory.d.ts.map +1 -1
- package/dist/learning/promotion.d.ts +7 -20
- package/dist/learning/promotion.d.ts.map +1 -1
- package/dist/maintenance/bug-fix-workflow.d.ts +49 -30
- package/dist/maintenance/bug-fix-workflow.d.ts.map +1 -1
- package/dist/maintenance/bug-report.d.ts +39 -46
- package/dist/maintenance/bug-report.d.ts.map +1 -1
- package/dist/maintenance/performance-baseline.d.ts +18 -64
- package/dist/maintenance/performance-baseline.d.ts.map +1 -1
- package/dist/maintenance/refactor-contract.d.ts +47 -133
- package/dist/maintenance/refactor-contract.d.ts.map +1 -1
- package/dist/maintenance/refactor-workflow.d.ts +50 -51
- package/dist/maintenance/refactor-workflow.d.ts.map +1 -1
- package/dist/observer/event-schema.d.ts +31 -31
- package/dist/observer/event-schema.d.ts.map +1 -1
- package/dist/observer/journal.d.ts +32 -57
- package/dist/observer/journal.d.ts.map +1 -1
- package/dist/observer/journal.js +1 -1
- package/dist/observer/journal.js.map +1 -1
- package/dist/observer/retention.d.ts +2 -16
- package/dist/observer/retention.d.ts.map +1 -1
- package/dist/observer/run-summary.d.ts +45 -213
- package/dist/observer/run-summary.d.ts.map +1 -1
- package/dist/onboard/onboard-report.d.ts +85 -279
- package/dist/onboard/onboard-report.d.ts.map +1 -1
- package/dist/patterns/pattern.d.ts +28 -74
- package/dist/patterns/pattern.d.ts.map +1 -1
- package/dist/planning/task.d.ts +70 -149
- package/dist/planning/task.d.ts.map +1 -1
- package/dist/policy/policy.d.ts +61 -56
- package/dist/policy/policy.d.ts.map +1 -1
- package/dist/product/mvp-scope.d.ts +8 -18
- package/dist/product/mvp-scope.d.ts.map +1 -1
- package/dist/product/product-brief.d.ts +6 -74
- package/dist/product/product-brief.d.ts.map +1 -1
- package/dist/product/requirements.d.ts +99 -215
- package/dist/product/requirements.d.ts.map +1 -1
- package/dist/product/traceability.d.ts +7 -39
- package/dist/product/traceability.d.ts.map +1 -1
- package/dist/project/project-profile.d.ts +34 -146
- package/dist/project/project-profile.d.ts.map +1 -1
- package/dist/project/repository-scan.d.ts +8 -64
- package/dist/project/repository-scan.d.ts.map +1 -1
- package/dist/routing/capability-registry.d.ts +15 -67
- package/dist/routing/capability-registry.d.ts.map +1 -1
- package/dist/routing/escalation.d.ts +10 -17
- package/dist/routing/escalation.d.ts.map +1 -1
- package/dist/routing/measured-routing.d.ts +18 -28
- package/dist/routing/measured-routing.d.ts.map +1 -1
- package/dist/routing/routing-policy.d.ts +56 -84
- package/dist/routing/routing-policy.d.ts.map +1 -1
- package/dist/routing/routing-request.d.ts +50 -46
- package/dist/routing/routing-request.d.ts.map +1 -1
- package/dist/runtime-guard/action-classification.d.ts +66 -36
- package/dist/runtime-guard/action-classification.d.ts.map +1 -1
- package/dist/runtime-guard/action-classification.js +1 -1
- package/dist/runtime-guard/action-classification.js.map +1 -1
- package/dist/runtime-guard/audit-event.d.ts +45 -77
- package/dist/runtime-guard/audit-event.d.ts.map +1 -1
- package/dist/runtime-guard/policy-schema.d.ts +100 -116
- package/dist/runtime-guard/policy-schema.d.ts.map +1 -1
- package/dist/scaffolding/scaffold-contract.d.ts +46 -450
- package/dist/scaffolding/scaffold-contract.d.ts.map +1 -1
- package/dist/scaffolding/template-manifest.d.ts +5 -77
- package/dist/scaffolding/template-manifest.d.ts.map +1 -1
- package/dist/secret-guard/detection-rule.d.ts +25 -19
- package/dist/secret-guard/detection-rule.d.ts.map +1 -1
- package/dist/secret-guard/finding.d.ts +70 -69
- package/dist/secret-guard/finding.d.ts.map +1 -1
- package/dist/secret-guard/redaction-policy.d.ts +7 -17
- package/dist/secret-guard/redaction-policy.d.ts.map +1 -1
- package/dist/secret-guard/scanner-failure.d.ts +17 -45
- package/dist/secret-guard/scanner-failure.d.ts.map +1 -1
- package/dist/specification/specification.d.ts +48 -184
- package/dist/specification/specification.d.ts.map +1 -1
- package/dist/stack-pack/manifest.d.ts +19 -90
- package/dist/stack-pack/manifest.d.ts.map +1 -1
- package/dist/verification/report.d.ts +49 -164
- package/dist/verification/report.d.ts.map +1 -1
- package/dist/verification/strength.d.ts +62 -188
- package/dist/verification/strength.d.ts.map +1 -1
- package/dist/workflow/next-action.d.ts +55 -137
- package/dist/workflow/next-action.d.ts.map +1 -1
- package/dist/workflow/workflow.d.ts +50 -50
- package/dist/workflow/workflow.d.ts.map +1 -1
- package/package.json +4 -4
- package/src/improvement/config.ts +1 -1
- package/src/observer/journal.ts +1 -1
- package/src/runtime-guard/action-classification.ts +1 -1
- package/src/zod-defaults.test.ts +28 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"strength.d.ts","sourceRoot":"","sources":["../../src/verification/strength.ts"],"names":[],"mappings":"AAqBA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,gCAAgC,EAAG,CAAU,CAAC;AAE3D;;;;GAIG;AACH,eAAO,MAAM,kBAAkB,
|
|
1
|
+
{"version":3,"file":"strength.d.ts","sourceRoot":"","sources":["../../src/verification/strength.ts"],"names":[],"mappings":"AAqBA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,gCAAgC,EAAG,CAAU,CAAC;AAE3D;;;;GAIG;AACH,eAAO,MAAM,kBAAkB;;;;;;;;EAQ7B,CAAC;AACH,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAE9D;;;;;;;;GAQG;AACH,eAAO,MAAM,oBAAoB;;;;EAA6C,CAAC;AAC/E,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAElE,wEAAwE;AACxE,eAAO,MAAM,sBAAsB;;;EAA8B,CAAC;AAClE,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC;AAEtE,qEAAqE;AACrE,eAAO,MAAM,mBAAmB;;;EAA4B,CAAC;AAC7D,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAEhE;;;;;;;;;;GAUG;AACH,eAAO,MAAM,sBAAsB;;;;;;;;;;;;kBAQxB,CAAC;AACZ,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC;AAEtE,eAAO,MAAM,yBAAyB,EAAE,gBAMvC,CAAC;AAEF,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;kBAI5B,CAAC;AACZ,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,0BAA0B,CAAC,CAAC;AAE9E,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAiC/B,CAAC;AACL,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC;AAEtE;;;;;GAKG;AACH,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAGrF;AAED;;;;GAIG;AACH,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,EAAE,SAAS,EAAE,MAAM,GAAG,cAAc,CAG7F;AAED;;;;;;GAMG;AACH,wBAAgB,oBAAoB,CAClC,QAAQ,EAAE,IAAI,CAAC,gBAAgB,EAAE,QAAQ,GAAG,OAAO,CAAC,EACpD,QAAQ,EAAE,gBAAgB,GACzB;IAAE,KAAK,EAAE,OAAO,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAuBpC"}
|
|
@@ -1,7 +1,14 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
export declare const NEXT_ACTION_SCHEMA_VERSION: 1;
|
|
3
3
|
/** What the driver must do next to make progress on this run. */
|
|
4
|
-
export declare const NextRequiredActionSchema: z.ZodEnum<
|
|
4
|
+
export declare const NextRequiredActionSchema: z.ZodEnum<{
|
|
5
|
+
"feature.start": "feature.start";
|
|
6
|
+
"task.red": "task.red";
|
|
7
|
+
"task.green": "task.green";
|
|
8
|
+
"task.refactor": "task.refactor";
|
|
9
|
+
"feature.verify": "feature.verify";
|
|
10
|
+
"run.completed": "run.completed";
|
|
11
|
+
}>;
|
|
5
12
|
export type NextRequiredAction = z.infer<typeof NextRequiredActionSchema>;
|
|
6
13
|
/**
|
|
7
14
|
* A reference to an advisory lesson surfaced by the learning loop.
|
|
@@ -12,15 +19,7 @@ export declare const LessonRefSchema: z.ZodObject<{
|
|
|
12
19
|
lessonId: z.ZodString;
|
|
13
20
|
summary: z.ZodString;
|
|
14
21
|
advisory: z.ZodLiteral<true>;
|
|
15
|
-
},
|
|
16
|
-
summary: string;
|
|
17
|
-
advisory: true;
|
|
18
|
-
lessonId: string;
|
|
19
|
-
}, {
|
|
20
|
-
summary: string;
|
|
21
|
-
advisory: true;
|
|
22
|
-
lessonId: string;
|
|
23
|
-
}>;
|
|
22
|
+
}, z.core.$strip>;
|
|
24
23
|
export type LessonRef = z.infer<typeof LessonRefSchema>;
|
|
25
24
|
/**
|
|
26
25
|
* Execution constraints the kit will enforce on the next phase
|
|
@@ -29,17 +28,9 @@ export type LessonRef = z.infer<typeof LessonRefSchema>;
|
|
|
29
28
|
* ProcessVerificationRunner).
|
|
30
29
|
*/
|
|
31
30
|
export declare const NextActionConstraintsSchema: z.ZodObject<{
|
|
32
|
-
/** Phase verification timeout (default 60_000 ms, runTddPhase). */
|
|
33
31
|
timeoutMs: z.ZodNumber;
|
|
34
|
-
/** Output capture bound (default 10 MiB, ProcessVerificationRunner). */
|
|
35
32
|
maxOutputBytes: z.ZodNumber;
|
|
36
|
-
},
|
|
37
|
-
timeoutMs: number;
|
|
38
|
-
maxOutputBytes: number;
|
|
39
|
-
}, {
|
|
40
|
-
timeoutMs: number;
|
|
41
|
-
maxOutputBytes: number;
|
|
42
|
-
}>;
|
|
33
|
+
}, z.core.$strip>;
|
|
43
34
|
export type NextActionConstraints = z.infer<typeof NextActionConstraintsSchema>;
|
|
44
35
|
/**
|
|
45
36
|
* Feedback for an attempt the evidence gate rejected. Its text is fixed
|
|
@@ -47,145 +38,72 @@ export type NextActionConstraints = z.infer<typeof NextActionConstraintsSchema>;
|
|
|
47
38
|
* safe to place in an agent's instructions.
|
|
48
39
|
*/
|
|
49
40
|
export declare const RecoveryHintSchema: z.ZodObject<{
|
|
50
|
-
classification: z.ZodEnum<
|
|
41
|
+
classification: z.ZodEnum<{
|
|
42
|
+
assertion: "assertion";
|
|
43
|
+
compilation: "compilation";
|
|
44
|
+
dependency: "dependency";
|
|
45
|
+
discovery: "discovery";
|
|
46
|
+
environment: "environment";
|
|
47
|
+
timeout: "timeout";
|
|
48
|
+
unclassified: "unclassified";
|
|
49
|
+
}>;
|
|
51
50
|
action: z.ZodLiteral<"feedback">;
|
|
52
51
|
reason: z.ZodString;
|
|
53
|
-
/** The failed attempt this hint reports, counted within the current phase (1-based). */
|
|
54
52
|
attempt: z.ZodNumber;
|
|
55
53
|
maxAttempts: z.ZodNumber;
|
|
56
|
-
},
|
|
57
|
-
classification: "assertion" | "compilation" | "dependency" | "discovery" | "environment" | "timeout" | "unclassified";
|
|
58
|
-
action: "feedback";
|
|
59
|
-
reason: string;
|
|
60
|
-
attempt: number;
|
|
61
|
-
maxAttempts: number;
|
|
62
|
-
}, {
|
|
63
|
-
classification: "assertion" | "compilation" | "dependency" | "discovery" | "environment" | "timeout" | "unclassified";
|
|
64
|
-
action: "feedback";
|
|
65
|
-
reason: string;
|
|
66
|
-
attempt: number;
|
|
67
|
-
maxAttempts: number;
|
|
68
|
-
}>;
|
|
54
|
+
}, z.core.$strip>;
|
|
69
55
|
export type RecoveryHint = z.infer<typeof RecoveryHintSchema>;
|
|
70
56
|
export declare const NextActionSchema: z.ZodObject<{
|
|
71
57
|
schemaVersion: z.ZodLiteral<1>;
|
|
72
|
-
/** The feature run this action belongs to (one run per feature id). */
|
|
73
58
|
featureId: z.ZodString;
|
|
74
|
-
status: z.ZodEnum<
|
|
75
|
-
|
|
59
|
+
status: z.ZodEnum<{
|
|
60
|
+
failed: "failed";
|
|
61
|
+
blocked: "blocked";
|
|
62
|
+
pending: "pending";
|
|
63
|
+
in_progress: "in_progress";
|
|
64
|
+
completed: "completed";
|
|
65
|
+
}>;
|
|
76
66
|
taskId: z.ZodOptional<z.ZodString>;
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
67
|
+
phase: z.ZodOptional<z.ZodEnum<{
|
|
68
|
+
refactor: "refactor";
|
|
69
|
+
red: "red";
|
|
70
|
+
green: "green";
|
|
71
|
+
}>>;
|
|
72
|
+
requiredAction: z.ZodEnum<{
|
|
73
|
+
"feature.start": "feature.start";
|
|
74
|
+
"task.red": "task.red";
|
|
75
|
+
"task.green": "task.green";
|
|
76
|
+
"task.refactor": "task.refactor";
|
|
77
|
+
"feature.verify": "feature.verify";
|
|
78
|
+
"run.completed": "run.completed";
|
|
79
|
+
}>;
|
|
80
|
+
verificationCommand: z.ZodArray<z.ZodString>;
|
|
87
81
|
nextInvocation: z.ZodString;
|
|
88
|
-
|
|
89
|
-
blockingQuestions: z.ZodArray<z.ZodString, "many">;
|
|
90
|
-
/** Advisory lessons (ADVISORY ONLY — never authority; ADR-0021 §4). */
|
|
82
|
+
blockingQuestions: z.ZodArray<z.ZodString>;
|
|
91
83
|
advisoryLessons: z.ZodArray<z.ZodObject<{
|
|
92
84
|
lessonId: z.ZodString;
|
|
93
85
|
summary: z.ZodString;
|
|
94
86
|
advisory: z.ZodLiteral<true>;
|
|
95
|
-
},
|
|
96
|
-
summary: string;
|
|
97
|
-
advisory: true;
|
|
98
|
-
lessonId: string;
|
|
99
|
-
}, {
|
|
100
|
-
summary: string;
|
|
101
|
-
advisory: true;
|
|
102
|
-
lessonId: string;
|
|
103
|
-
}>, "many">;
|
|
104
|
-
/** Present only when the last attempt was rejected and feedback is still offered. */
|
|
87
|
+
}, z.core.$strip>>;
|
|
105
88
|
recoveryHint: z.ZodOptional<z.ZodObject<{
|
|
106
|
-
classification: z.ZodEnum<
|
|
89
|
+
classification: z.ZodEnum<{
|
|
90
|
+
assertion: "assertion";
|
|
91
|
+
compilation: "compilation";
|
|
92
|
+
dependency: "dependency";
|
|
93
|
+
discovery: "discovery";
|
|
94
|
+
environment: "environment";
|
|
95
|
+
timeout: "timeout";
|
|
96
|
+
unclassified: "unclassified";
|
|
97
|
+
}>;
|
|
107
98
|
action: z.ZodLiteral<"feedback">;
|
|
108
99
|
reason: z.ZodString;
|
|
109
|
-
/** The failed attempt this hint reports, counted within the current phase (1-based). */
|
|
110
100
|
attempt: z.ZodNumber;
|
|
111
101
|
maxAttempts: z.ZodNumber;
|
|
112
|
-
},
|
|
113
|
-
classification: "assertion" | "compilation" | "dependency" | "discovery" | "environment" | "timeout" | "unclassified";
|
|
114
|
-
action: "feedback";
|
|
115
|
-
reason: string;
|
|
116
|
-
attempt: number;
|
|
117
|
-
maxAttempts: number;
|
|
118
|
-
}, {
|
|
119
|
-
classification: "assertion" | "compilation" | "dependency" | "discovery" | "environment" | "timeout" | "unclassified";
|
|
120
|
-
action: "feedback";
|
|
121
|
-
reason: string;
|
|
122
|
-
attempt: number;
|
|
123
|
-
maxAttempts: number;
|
|
124
|
-
}>>;
|
|
102
|
+
}, z.core.$strip>>;
|
|
125
103
|
constraints: z.ZodObject<{
|
|
126
|
-
/** Phase verification timeout (default 60_000 ms, runTddPhase). */
|
|
127
104
|
timeoutMs: z.ZodNumber;
|
|
128
|
-
/** Output capture bound (default 10 MiB, ProcessVerificationRunner). */
|
|
129
105
|
maxOutputBytes: z.ZodNumber;
|
|
130
|
-
},
|
|
131
|
-
|
|
132
|
-
maxOutputBytes: number;
|
|
133
|
-
}, {
|
|
134
|
-
timeoutMs: number;
|
|
135
|
-
maxOutputBytes: number;
|
|
136
|
-
}>;
|
|
137
|
-
}, "strip", z.ZodTypeAny, {
|
|
138
|
-
status: "failed" | "blocked" | "pending" | "in_progress" | "completed";
|
|
139
|
-
schemaVersion: 1;
|
|
140
|
-
featureId: string;
|
|
141
|
-
requiredAction: "feature.start" | "task.red" | "task.green" | "task.refactor" | "feature.verify" | "run.completed";
|
|
142
|
-
verificationCommand: string[];
|
|
143
|
-
nextInvocation: string;
|
|
144
|
-
blockingQuestions: string[];
|
|
145
|
-
advisoryLessons: {
|
|
146
|
-
summary: string;
|
|
147
|
-
advisory: true;
|
|
148
|
-
lessonId: string;
|
|
149
|
-
}[];
|
|
150
|
-
constraints: {
|
|
151
|
-
timeoutMs: number;
|
|
152
|
-
maxOutputBytes: number;
|
|
153
|
-
};
|
|
154
|
-
taskId?: string | undefined;
|
|
155
|
-
phase?: "refactor" | "red" | "green" | undefined;
|
|
156
|
-
recoveryHint?: {
|
|
157
|
-
classification: "assertion" | "compilation" | "dependency" | "discovery" | "environment" | "timeout" | "unclassified";
|
|
158
|
-
action: "feedback";
|
|
159
|
-
reason: string;
|
|
160
|
-
attempt: number;
|
|
161
|
-
maxAttempts: number;
|
|
162
|
-
} | undefined;
|
|
163
|
-
}, {
|
|
164
|
-
status: "failed" | "blocked" | "pending" | "in_progress" | "completed";
|
|
165
|
-
schemaVersion: 1;
|
|
166
|
-
featureId: string;
|
|
167
|
-
requiredAction: "feature.start" | "task.red" | "task.green" | "task.refactor" | "feature.verify" | "run.completed";
|
|
168
|
-
verificationCommand: string[];
|
|
169
|
-
nextInvocation: string;
|
|
170
|
-
blockingQuestions: string[];
|
|
171
|
-
advisoryLessons: {
|
|
172
|
-
summary: string;
|
|
173
|
-
advisory: true;
|
|
174
|
-
lessonId: string;
|
|
175
|
-
}[];
|
|
176
|
-
constraints: {
|
|
177
|
-
timeoutMs: number;
|
|
178
|
-
maxOutputBytes: number;
|
|
179
|
-
};
|
|
180
|
-
taskId?: string | undefined;
|
|
181
|
-
phase?: "refactor" | "red" | "green" | undefined;
|
|
182
|
-
recoveryHint?: {
|
|
183
|
-
classification: "assertion" | "compilation" | "dependency" | "discovery" | "environment" | "timeout" | "unclassified";
|
|
184
|
-
action: "feedback";
|
|
185
|
-
reason: string;
|
|
186
|
-
attempt: number;
|
|
187
|
-
maxAttempts: number;
|
|
188
|
-
} | undefined;
|
|
189
|
-
}>;
|
|
106
|
+
}, z.core.$strip>;
|
|
107
|
+
}, z.core.$strip>;
|
|
190
108
|
export type NextAction = z.infer<typeof NextActionSchema>;
|
|
191
109
|
//# sourceMappingURL=next-action.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"next-action.d.ts","sourceRoot":"","sources":["../../src/workflow/next-action.ts"],"names":[],"mappings":"AA4BA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,eAAO,MAAM,0BAA0B,EAAG,CAAU,CAAC;AAErD,iEAAiE;AACjE,eAAO,MAAM,wBAAwB,
|
|
1
|
+
{"version":3,"file":"next-action.d.ts","sourceRoot":"","sources":["../../src/workflow/next-action.ts"],"names":[],"mappings":"AA4BA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,eAAO,MAAM,0BAA0B,EAAG,CAAU,CAAC;AAErD,iEAAiE;AACjE,eAAO,MAAM,wBAAwB;;;;;;;EAanC,CAAC;AACH,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAC;AAE1E;;;;GAIG;AACH,eAAO,MAAM,eAAe;;;;iBAI1B,CAAC;AACH,MAAM,MAAM,SAAS,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,eAAe,CAAC,CAAC;AAExD;;;;;GAKG;AACH,eAAO,MAAM,2BAA2B;;;iBAKtC,CAAC;AACH,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,2BAA2B,CAAC,CAAC;AAEhF;;;;GAIG;AACH,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;iBAe7B,CAAC;AACH,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAE9D,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAyB3B,CAAC;AACH,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAC"}
|
|
@@ -1,67 +1,67 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import type { RunId, TaskId } from '../common/identifier.js';
|
|
3
3
|
import type { CheckStatus } from '../verification/report.js';
|
|
4
|
-
export declare const WorkflowModeSchema: z.ZodEnum<
|
|
4
|
+
export declare const WorkflowModeSchema: z.ZodEnum<{
|
|
5
|
+
app: "app";
|
|
6
|
+
feature: "feature";
|
|
7
|
+
fix: "fix";
|
|
8
|
+
refactor: "refactor";
|
|
9
|
+
}>;
|
|
5
10
|
export type WorkflowMode = z.infer<typeof WorkflowModeSchema>;
|
|
6
|
-
export declare const WorkflowStatusSchema: z.ZodEnum<
|
|
11
|
+
export declare const WorkflowStatusSchema: z.ZodEnum<{
|
|
12
|
+
failed: "failed";
|
|
13
|
+
blocked: "blocked";
|
|
14
|
+
pending: "pending";
|
|
15
|
+
in_progress: "in_progress";
|
|
16
|
+
completed: "completed";
|
|
17
|
+
}>;
|
|
7
18
|
export type WorkflowStatus = z.infer<typeof WorkflowStatusSchema>;
|
|
8
|
-
export declare const WorkflowTransitionSchema: z.ZodEnum<
|
|
19
|
+
export declare const WorkflowTransitionSchema: z.ZodEnum<{
|
|
20
|
+
start: "start";
|
|
21
|
+
block: "block";
|
|
22
|
+
resume: "resume";
|
|
23
|
+
complete: "complete";
|
|
24
|
+
fail: "fail";
|
|
25
|
+
}>;
|
|
9
26
|
export type WorkflowTransition = z.infer<typeof WorkflowTransitionSchema>;
|
|
10
27
|
export declare const TaskHistoryEntrySchema: z.ZodObject<{
|
|
11
28
|
taskId: z.ZodString;
|
|
12
|
-
status: z.ZodEnum<
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
taskId: string;
|
|
21
|
-
evidence?: string[] | undefined;
|
|
22
|
-
}>;
|
|
29
|
+
status: z.ZodEnum<{
|
|
30
|
+
passed: "passed";
|
|
31
|
+
failed: "failed";
|
|
32
|
+
blocked: "blocked";
|
|
33
|
+
skipped: "skipped";
|
|
34
|
+
}>;
|
|
35
|
+
evidence: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
36
|
+
}, z.core.$strip>;
|
|
23
37
|
export declare const WorkflowStateSchema: z.ZodObject<{
|
|
24
38
|
runId: z.ZodString;
|
|
25
|
-
mode: z.ZodEnum<
|
|
26
|
-
|
|
39
|
+
mode: z.ZodEnum<{
|
|
40
|
+
app: "app";
|
|
41
|
+
feature: "feature";
|
|
42
|
+
fix: "fix";
|
|
43
|
+
refactor: "refactor";
|
|
44
|
+
}>;
|
|
45
|
+
status: z.ZodEnum<{
|
|
46
|
+
failed: "failed";
|
|
47
|
+
blocked: "blocked";
|
|
48
|
+
pending: "pending";
|
|
49
|
+
in_progress: "in_progress";
|
|
50
|
+
completed: "completed";
|
|
51
|
+
}>;
|
|
27
52
|
startedAt: z.ZodOptional<z.ZodString>;
|
|
28
53
|
currentTaskId: z.ZodOptional<z.ZodString>;
|
|
29
54
|
taskHistory: z.ZodArray<z.ZodObject<{
|
|
30
55
|
taskId: z.ZodString;
|
|
31
|
-
status: z.ZodEnum<
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
evidence?: string[] | undefined;
|
|
41
|
-
}>, "many">;
|
|
42
|
-
}, "strip", z.ZodTypeAny, {
|
|
43
|
-
status: "failed" | "blocked" | "pending" | "in_progress" | "completed";
|
|
44
|
-
mode: "app" | "feature" | "fix" | "refactor";
|
|
45
|
-
runId: string;
|
|
46
|
-
taskHistory: {
|
|
47
|
-
status: "passed" | "failed" | "blocked" | "skipped";
|
|
48
|
-
taskId: string;
|
|
49
|
-
evidence?: string[] | undefined;
|
|
50
|
-
}[];
|
|
51
|
-
startedAt?: string | undefined;
|
|
52
|
-
currentTaskId?: string | undefined;
|
|
53
|
-
}, {
|
|
54
|
-
status: "failed" | "blocked" | "pending" | "in_progress" | "completed";
|
|
55
|
-
mode: "app" | "feature" | "fix" | "refactor";
|
|
56
|
-
runId: string;
|
|
57
|
-
taskHistory: {
|
|
58
|
-
status: "passed" | "failed" | "blocked" | "skipped";
|
|
59
|
-
taskId: string;
|
|
60
|
-
evidence?: string[] | undefined;
|
|
61
|
-
}[];
|
|
62
|
-
startedAt?: string | undefined;
|
|
63
|
-
currentTaskId?: string | undefined;
|
|
64
|
-
}>;
|
|
56
|
+
status: z.ZodEnum<{
|
|
57
|
+
passed: "passed";
|
|
58
|
+
failed: "failed";
|
|
59
|
+
blocked: "blocked";
|
|
60
|
+
skipped: "skipped";
|
|
61
|
+
}>;
|
|
62
|
+
evidence: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
63
|
+
}, z.core.$strip>>;
|
|
64
|
+
}, z.core.$strip>;
|
|
65
65
|
export type WorkflowState = z.infer<typeof WorkflowStateSchema>;
|
|
66
66
|
export type WorkflowRun = WorkflowState;
|
|
67
67
|
export type TaskHistoryEntry = z.infer<typeof TaskHistoryEntrySchema>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"workflow.d.ts","sourceRoot":"","sources":["../../src/workflow/workflow.ts"],"names":[],"mappings":"AAUA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAC;AAC7D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AAE7D,eAAO,MAAM,kBAAkB,
|
|
1
|
+
{"version":3,"file":"workflow.d.ts","sourceRoot":"","sources":["../../src/workflow/workflow.ts"],"names":[],"mappings":"AAUA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAC;AAC7D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AAE7D,eAAO,MAAM,kBAAkB;;;;;EAAgD,CAAC;AAChF,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAE9D,eAAO,MAAM,oBAAoB;;;;;;EAM/B,CAAC;AACH,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAElE,eAAO,MAAM,wBAAwB;;;;;;EAA2D,CAAC;AACjG,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAC;AAE1E,eAAO,MAAM,sBAAsB;;;;;;;;;iBAIjC,CAAC;AAEH,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAO9B,CAAC;AAEH,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAChE,MAAM,MAAM,WAAW,GAAG,aAAa,CAAC;AACxC,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC;AAGtE,YAAY,EAAE,KAAK,EAAE,MAAM,EAAE,WAAW,EAAE,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agentic-sdlc-kit/contracts",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.4.0",
|
|
4
4
|
"description": "Shared contracts (types + zod schemas) for the Agentic SDLC Kit. Depends on nothing.",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -23,11 +23,11 @@
|
|
|
23
23
|
"src"
|
|
24
24
|
],
|
|
25
25
|
"dependencies": {
|
|
26
|
-
"zod": "^
|
|
26
|
+
"zod": "^4.6.7"
|
|
27
27
|
},
|
|
28
28
|
"devDependencies": {
|
|
29
|
-
"typescript": "^
|
|
30
|
-
"vitest": "^
|
|
29
|
+
"typescript": "^6.0.3",
|
|
30
|
+
"vitest": "^5.1.2"
|
|
31
31
|
},
|
|
32
32
|
"scripts": {
|
|
33
33
|
"build": "tsc -p tsconfig.json",
|
package/src/observer/journal.ts
CHANGED
|
@@ -82,7 +82,7 @@ export const JournalEventSchema = z.object({
|
|
|
82
82
|
kind: JournalEventKindSchema,
|
|
83
83
|
actor: JournalActorSchema,
|
|
84
84
|
/** Redacted, bounded event detail (evidence excerpts, statuses). */
|
|
85
|
-
payload: z.record(z.unknown()),
|
|
85
|
+
payload: z.record(z.string(), z.unknown()),
|
|
86
86
|
/** Hash of the previous event ('GENESIS' for seq 0). */
|
|
87
87
|
prevHash: HashSchema,
|
|
88
88
|
/** SHA-256 over the canonical serialization of this event without `hash`. */
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
// Pins how defaults behave under zod 4. zod 3 parsed a .default(value) through its schema; zod 4
|
|
2
|
+
// returns the default as-is. The two objects whose defaults depend on that behaviour are converted to
|
|
3
|
+
// .prefault(), which parses the default. These tests fail if a conversion is undone.
|
|
4
|
+
import { describe, expect, it } from 'vitest';
|
|
5
|
+
import { ImprovementConfigSchema } from './improvement/config.js';
|
|
6
|
+
import { ClassifiedActionSchema } from './runtime-guard/action-classification.js';
|
|
7
|
+
|
|
8
|
+
// A valid action without its scope, so the scope default is what gets exercised.
|
|
9
|
+
const ACTION = { category: 'file.read', impact: 'none' };
|
|
10
|
+
|
|
11
|
+
describe('zod 4 defaults that must still apply inner defaults', () => {
|
|
12
|
+
it('improvement config: an absent kitFeedback block parses to capture off', () => {
|
|
13
|
+
const parsed = ImprovementConfigSchema.parse({ version: 1 });
|
|
14
|
+
expect(parsed.kitFeedback).toEqual({ capture: false });
|
|
15
|
+
});
|
|
16
|
+
|
|
17
|
+
it('classified action: an absent scope parses to empty paths, not undefined', () => {
|
|
18
|
+
const parsed = ClassifiedActionSchema.parse(ACTION);
|
|
19
|
+
expect(parsed.scope).toEqual({ paths: [] });
|
|
20
|
+
});
|
|
21
|
+
|
|
22
|
+
it('each parse gets its own default, so a caller that mutates one cannot affect the next', () => {
|
|
23
|
+
const first = ClassifiedActionSchema.parse(ACTION);
|
|
24
|
+
first.scope.paths.push('leaked');
|
|
25
|
+
const second = ClassifiedActionSchema.parse(ACTION);
|
|
26
|
+
expect(second.scope.paths).toEqual([]);
|
|
27
|
+
});
|
|
28
|
+
});
|