opencode-plugin-flow 5.1.1 → 5.2.1
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/CHANGELOG.md +62 -0
- package/README.md +83 -30
- package/dist/application/errors.d.ts +5 -0
- package/dist/application/flow-service.d.ts +219 -247
- package/dist/application/ports/session-repository.d.ts +5 -1
- package/dist/application/replay/contract.d.ts +123 -0
- package/dist/application/schema.d.ts +376 -706
- package/dist/domain/limits.d.ts +3 -0
- package/dist/domain/session-invariants.d.ts +8 -0
- package/dist/domain/session.d.ts +88 -87
- package/dist/domain/transitions.d.ts +133 -21
- package/dist/index.js +3295 -1460
- package/dist/index.js.map +19 -18
- package/dist/infrastructure/fs/workspace-flow-service.d.ts +2 -1
- package/dist/infrastructure/fs/workspace.d.ts +32 -2
- package/dist/platform/opencode/tools.d.ts +0 -2
- package/dist/prompt-baseline-fixtures.d.ts +4 -3
- package/dist/prompt-quality.d.ts +7 -0
- package/package.json +5 -1
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
import type { Session, SessionId } from "../domain/session.js";
|
|
3
|
-
import { mutationReceiptProjection, type TransitionEnvironment } from "../domain/transitions.js";
|
|
3
|
+
import { mutationReceiptProjection, rejectedMutationReceiptProjection, type TransitionEnvironment } from "../domain/transitions.js";
|
|
4
4
|
import type { SessionRepository } from "./ports/session-repository.js";
|
|
5
5
|
type WorkflowData = {
|
|
6
6
|
projection?: unknown;
|
|
7
|
-
receipt?: ReturnType<typeof mutationReceiptProjection>;
|
|
7
|
+
receipt?: ReturnType<typeof mutationReceiptProjection> | ReturnType<typeof rejectedMutationReceiptProjection>;
|
|
8
8
|
failure?: {
|
|
9
9
|
summary: string;
|
|
10
10
|
recovery?: string;
|
|
@@ -31,39 +31,29 @@ export type FlowResponse = ResponseContext & {
|
|
|
31
31
|
summary: string;
|
|
32
32
|
};
|
|
33
33
|
export type FlowService = {
|
|
34
|
-
status(input
|
|
34
|
+
status(input: unknown): Promise<FlowResponse>;
|
|
35
35
|
planSave(input: unknown): Promise<FlowResponse>;
|
|
36
36
|
planApprove(): Promise<FlowResponse>;
|
|
37
37
|
runStart(input: unknown): Promise<FlowResponse>;
|
|
38
|
+
reviewStart(input: unknown): Promise<FlowResponse>;
|
|
38
39
|
featureComplete(input: unknown): Promise<FlowResponse>;
|
|
39
40
|
featureReset(input: unknown): Promise<FlowResponse>;
|
|
40
41
|
sessionClose(input: unknown): Promise<FlowResponse>;
|
|
41
42
|
};
|
|
42
|
-
export declare const FlowStatusSchema: z.
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
expectedSnapshotId: z.ZodPipe<z.ZodString, z.ZodTransform<`sha256:${string}`, string>>;
|
|
57
|
-
reviewKind: z.ZodLiteral<"final">;
|
|
58
|
-
}, z.core.$strict>], "reviewKind">, z.ZodObject<{
|
|
59
|
-
view: z.ZodLiteral<"execution">;
|
|
60
|
-
}, z.core.$strict>, z.ZodObject<{
|
|
61
|
-
view: z.ZodLiteral<"detail">;
|
|
62
|
-
sinceRevision: z.ZodOptional<z.ZodNumber>;
|
|
63
|
-
}, z.core.$strict>, z.ZodObject<{
|
|
64
|
-
view: z.ZodDefault<z.ZodLiteral<"compact">>;
|
|
65
|
-
sinceRevision: z.ZodOptional<z.ZodNumber>;
|
|
66
|
-
}, z.core.$strict>]>;
|
|
43
|
+
export declare const FlowStatusSchema: z.ZodObject<{
|
|
44
|
+
request: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
45
|
+
view: z.ZodLiteral<"reviewer">;
|
|
46
|
+
assignmentId: z.ZodString;
|
|
47
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
48
|
+
view: z.ZodLiteral<"execution">;
|
|
49
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
50
|
+
view: z.ZodLiteral<"detail">;
|
|
51
|
+
sinceRevision: z.ZodOptional<z.ZodNumber>;
|
|
52
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
53
|
+
view: z.ZodLiteral<"compact">;
|
|
54
|
+
sinceRevision: z.ZodOptional<z.ZodNumber>;
|
|
55
|
+
}, z.core.$strict>], "view">;
|
|
56
|
+
}, z.core.$strict>;
|
|
67
57
|
export declare const FlowPlanSaveSchema: z.ZodObject<{
|
|
68
58
|
goal: z.ZodOptional<z.ZodString>;
|
|
69
59
|
plan: z.ZodOptional<z.ZodObject<{
|
|
@@ -106,234 +96,216 @@ export declare const FlowFeatureResetSchema: z.ZodObject<{
|
|
|
106
96
|
featureId: z.ZodPipe<z.ZodString, z.ZodTransform<import("../domain/session.js").FeatureId, string>>;
|
|
107
97
|
}, z.core.$strict>;
|
|
108
98
|
export declare const FlowSessionCloseSchema: z.ZodObject<{
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
}, z.core.$strict>;
|
|
119
|
-
export declare const FlowFeatureCompleteToolSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
120
|
-
operationId: z.ZodString;
|
|
121
|
-
expectedRevision: z.ZodNumber;
|
|
122
|
-
expectedSnapshotId: z.ZodPipe<z.ZodString, z.ZodTransform<`sha256:${string}`, string>>;
|
|
123
|
-
featureId: z.ZodPipe<z.ZodString, z.ZodTransform<import("../domain/session.js").FeatureId, string>>;
|
|
124
|
-
summary: z.ZodString;
|
|
125
|
-
status: z.ZodLiteral<"ok">;
|
|
126
|
-
artifactsChanged: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
127
|
-
path: z.ZodString;
|
|
128
|
-
}, z.core.$strict>>>;
|
|
129
|
-
validations: z.ZodArray<z.ZodObject<{
|
|
130
|
-
startedAt: z.ZodString;
|
|
131
|
-
completedAt: z.ZodString;
|
|
132
|
-
command: z.ZodString;
|
|
133
|
-
summary: z.ZodString;
|
|
134
|
-
exitCode: z.ZodNumber;
|
|
135
|
-
outputDigest: z.ZodPipe<z.ZodString, z.ZodTransform<`sha256:${string}`, string>>;
|
|
136
|
-
artifactRef: z.ZodOptional<z.ZodObject<{
|
|
137
|
-
kind: z.ZodLiteral<"restricted_evidence_v1">;
|
|
138
|
-
digest: z.ZodPipe<z.ZodString, z.ZodTransform<`sha256:${string}`, string>>;
|
|
139
|
-
byteLength: z.ZodNumber;
|
|
140
|
-
}, z.core.$strict>>;
|
|
141
|
-
environmentKeys: z.ZodArray<z.ZodString>;
|
|
142
|
-
}, z.core.$strict>>;
|
|
143
|
-
validationScope: z.ZodEnum<{
|
|
144
|
-
broad: "broad";
|
|
145
|
-
targeted: "targeted";
|
|
146
|
-
}>;
|
|
147
|
-
featureReviewDepth: z.ZodEnum<{
|
|
148
|
-
detailed: "detailed";
|
|
149
|
-
quick: "quick";
|
|
150
|
-
standard: "standard";
|
|
151
|
-
}>;
|
|
152
|
-
featureReview: z.ZodObject<{
|
|
153
|
-
status: z.ZodEnum<{
|
|
154
|
-
failed: "failed";
|
|
155
|
-
passed: "passed";
|
|
99
|
+
request: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
100
|
+
mode: z.ZodLiteral<"start">;
|
|
101
|
+
operationId: z.ZodString;
|
|
102
|
+
expectedRevision: z.ZodNumber;
|
|
103
|
+
expectedSnapshotId: z.ZodPipe<z.ZodString, z.ZodTransform<`sha256:${string}`, string>>;
|
|
104
|
+
kind: z.ZodEnum<{
|
|
105
|
+
abandoned: "abandoned";
|
|
106
|
+
completed: "completed";
|
|
107
|
+
deferred: "deferred";
|
|
156
108
|
}>;
|
|
157
|
-
summary: z.ZodString
|
|
158
|
-
|
|
109
|
+
summary: z.ZodOptional<z.ZodString>;
|
|
110
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
111
|
+
mode: z.ZodLiteral<"retry">;
|
|
112
|
+
operationId: z.ZodString;
|
|
113
|
+
}, z.core.$strict>], "mode">;
|
|
114
|
+
}, z.core.$strict>;
|
|
115
|
+
export declare const FlowFeatureCompleteToolSchema: z.ZodObject<{
|
|
116
|
+
request: z.ZodObject<{
|
|
117
|
+
operationId: z.ZodString;
|
|
118
|
+
expectedRevision: z.ZodNumber;
|
|
119
|
+
expectedSnapshotId: z.ZodPipe<z.ZodString, z.ZodTransform<`sha256:${string}`, string>>;
|
|
120
|
+
featureId: z.ZodPipe<z.ZodString, z.ZodTransform<import("../domain/session.js").FeatureId, string>>;
|
|
121
|
+
result: z.ZodUnion<readonly [z.ZodObject<{
|
|
122
|
+
kind: z.ZodLiteral<"completed">;
|
|
159
123
|
summary: z.ZodString;
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
124
|
+
artifactsChanged: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
125
|
+
path: z.ZodString;
|
|
126
|
+
}, z.core.$strict>>>;
|
|
127
|
+
orchestrationPasses: z.ZodOptional<z.ZodUnknown>;
|
|
128
|
+
validationScope: z.ZodLiteral<"targeted">;
|
|
129
|
+
featureReview: z.ZodObject<{
|
|
130
|
+
assignmentId: z.ZodString;
|
|
131
|
+
verdict: z.ZodEnum<{
|
|
132
|
+
failed: "failed";
|
|
133
|
+
passed: "passed";
|
|
134
|
+
}>;
|
|
135
|
+
findings: z.ZodArray<z.ZodObject<{
|
|
136
|
+
taxonomy: z.ZodEnum<{
|
|
137
|
+
advisory: "advisory";
|
|
138
|
+
evidence_gap: "evidence_gap";
|
|
139
|
+
implementation_defect: "implementation_defect";
|
|
140
|
+
regression_coverage_gap: "regression_coverage_gap";
|
|
141
|
+
}>;
|
|
142
|
+
subject: z.ZodString;
|
|
143
|
+
requirementOrRisk: z.ZodString;
|
|
144
|
+
evidenceLocator: z.ZodString;
|
|
145
|
+
summary: z.ZodString;
|
|
146
|
+
severity: z.ZodEnum<{
|
|
147
|
+
advisory: "advisory";
|
|
148
|
+
blocking: "blocking";
|
|
149
|
+
}>;
|
|
150
|
+
}, z.core.$strict>>;
|
|
151
|
+
completedAt: z.ZodString;
|
|
152
|
+
terminalDisposition: z.ZodEnum<{
|
|
153
|
+
observed_unsubmitted: "observed_unsubmitted";
|
|
154
|
+
submitted: "submitted";
|
|
155
|
+
}>;
|
|
156
|
+
}, z.core.$strict>;
|
|
157
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
158
|
+
kind: z.ZodLiteral<"completed">;
|
|
173
159
|
summary: z.ZodString;
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
160
|
+
artifactsChanged: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
161
|
+
path: z.ZodString;
|
|
162
|
+
}, z.core.$strict>>>;
|
|
163
|
+
orchestrationPasses: z.ZodOptional<z.ZodUnknown>;
|
|
164
|
+
validationScope: z.ZodLiteral<"broad">;
|
|
165
|
+
finalReview: z.ZodObject<{
|
|
166
|
+
assignmentId: z.ZodString;
|
|
167
|
+
verdict: z.ZodEnum<{
|
|
168
|
+
failed: "failed";
|
|
169
|
+
passed: "passed";
|
|
170
|
+
}>;
|
|
171
|
+
findings: z.ZodArray<z.ZodObject<{
|
|
172
|
+
taxonomy: z.ZodEnum<{
|
|
173
|
+
advisory: "advisory";
|
|
174
|
+
evidence_gap: "evidence_gap";
|
|
175
|
+
implementation_defect: "implementation_defect";
|
|
176
|
+
regression_coverage_gap: "regression_coverage_gap";
|
|
177
|
+
}>;
|
|
178
|
+
subject: z.ZodString;
|
|
179
|
+
requirementOrRisk: z.ZodString;
|
|
180
|
+
evidenceLocator: z.ZodString;
|
|
181
|
+
summary: z.ZodString;
|
|
182
|
+
severity: z.ZodEnum<{
|
|
183
|
+
advisory: "advisory";
|
|
184
|
+
blocking: "blocking";
|
|
185
|
+
}>;
|
|
186
|
+
}, z.core.$strict>>;
|
|
187
|
+
completedAt: z.ZodString;
|
|
188
|
+
terminalDisposition: z.ZodEnum<{
|
|
189
|
+
observed_unsubmitted: "observed_unsubmitted";
|
|
190
|
+
submitted: "submitted";
|
|
191
|
+
}>;
|
|
192
|
+
}, z.core.$strict>;
|
|
193
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
194
|
+
kind: z.ZodLiteral<"blocked">;
|
|
195
|
+
summary: z.ZodString;
|
|
196
|
+
review: z.ZodObject<{
|
|
197
|
+
assignmentId: z.ZodString;
|
|
198
|
+
verdict: z.ZodEnum<{
|
|
199
|
+
failed: "failed";
|
|
200
|
+
passed: "passed";
|
|
201
|
+
}>;
|
|
202
|
+
findings: z.ZodArray<z.ZodObject<{
|
|
203
|
+
taxonomy: z.ZodEnum<{
|
|
204
|
+
advisory: "advisory";
|
|
205
|
+
evidence_gap: "evidence_gap";
|
|
206
|
+
implementation_defect: "implementation_defect";
|
|
207
|
+
regression_coverage_gap: "regression_coverage_gap";
|
|
208
|
+
}>;
|
|
209
|
+
subject: z.ZodString;
|
|
210
|
+
requirementOrRisk: z.ZodString;
|
|
211
|
+
evidenceLocator: z.ZodString;
|
|
212
|
+
summary: z.ZodString;
|
|
213
|
+
severity: z.ZodEnum<{
|
|
214
|
+
advisory: "advisory";
|
|
215
|
+
blocking: "blocking";
|
|
216
|
+
}>;
|
|
217
|
+
}, z.core.$strict>>;
|
|
218
|
+
completedAt: z.ZodString;
|
|
219
|
+
terminalDisposition: z.ZodEnum<{
|
|
220
|
+
observed_unsubmitted: "observed_unsubmitted";
|
|
221
|
+
submitted: "submitted";
|
|
222
|
+
}>;
|
|
223
|
+
}, z.core.$strict>;
|
|
224
|
+
resolutionHint: z.ZodOptional<z.ZodString>;
|
|
225
|
+
orchestrationPasses: z.ZodOptional<z.ZodUnknown>;
|
|
226
|
+
}, z.core.$strict>]>;
|
|
227
|
+
}, z.core.$strict>;
|
|
228
|
+
}, z.core.$strict>;
|
|
229
|
+
export declare const FlowReviewStartSchema: z.ZodObject<{
|
|
230
|
+
request: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
231
|
+
operationId: z.ZodString;
|
|
232
|
+
expectedRevision: z.ZodNumber;
|
|
233
|
+
expectedSnapshotId: z.ZodPipe<z.ZodString, z.ZodTransform<`sha256:${string}`, string>>;
|
|
187
234
|
featureId: z.ZodPipe<z.ZodString, z.ZodTransform<import("../domain/session.js").FeatureId, string>>;
|
|
188
|
-
|
|
189
|
-
feature: "feature";
|
|
190
|
-
final: "final";
|
|
191
|
-
}>;
|
|
192
|
-
reviewSnapshotId: z.ZodPipe<z.ZodString, z.ZodPipe<z.ZodString, z.ZodTransform<`sha256:${string}`, string>>>;
|
|
193
|
-
verdict: z.ZodEnum<{
|
|
194
|
-
failed: "failed";
|
|
195
|
-
passed: "passed";
|
|
196
|
-
}>;
|
|
197
|
-
startedAt: z.ZodString;
|
|
198
|
-
completedAt: z.ZodString;
|
|
199
|
-
terminalDisposition: z.ZodEnum<{
|
|
200
|
-
observed_unsubmitted: "observed_unsubmitted";
|
|
201
|
-
submitted: "submitted";
|
|
202
|
-
}>;
|
|
203
|
-
findings: z.ZodArray<z.ZodObject<{
|
|
204
|
-
taxonomy: z.ZodEnum<{
|
|
205
|
-
advisory: "advisory";
|
|
206
|
-
evidence_gap: "evidence_gap";
|
|
207
|
-
implementation_defect: "implementation_defect";
|
|
208
|
-
regression_coverage_gap: "regression_coverage_gap";
|
|
209
|
-
}>;
|
|
210
|
-
subject: z.ZodString;
|
|
211
|
-
requirementOrRisk: z.ZodString;
|
|
212
|
-
evidenceLocator: z.ZodString;
|
|
235
|
+
packet: z.ZodObject<{
|
|
213
236
|
summary: z.ZodString;
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
expectedSnapshotId: z.ZodPipe<z.ZodString, z.ZodTransform<`sha256:${string}`, string>>;
|
|
230
|
-
featureId: z.ZodPipe<z.ZodString, z.ZodTransform<import("../domain/session.js").FeatureId, string>>;
|
|
231
|
-
summary: z.ZodString;
|
|
232
|
-
status: z.ZodLiteral<"needs_input">;
|
|
233
|
-
artifactsChanged: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
234
|
-
path: z.ZodString;
|
|
235
|
-
}, z.core.$strict>>>;
|
|
236
|
-
validations: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
237
|
-
startedAt: z.ZodString;
|
|
238
|
-
completedAt: z.ZodString;
|
|
239
|
-
command: z.ZodString;
|
|
240
|
-
summary: z.ZodString;
|
|
241
|
-
exitCode: z.ZodNumber;
|
|
242
|
-
outputDigest: z.ZodPipe<z.ZodString, z.ZodTransform<`sha256:${string}`, string>>;
|
|
243
|
-
artifactRef: z.ZodOptional<z.ZodObject<{
|
|
244
|
-
kind: z.ZodLiteral<"restricted_evidence_v1">;
|
|
245
|
-
digest: z.ZodPipe<z.ZodString, z.ZodTransform<`sha256:${string}`, string>>;
|
|
246
|
-
byteLength: z.ZodNumber;
|
|
237
|
+
riskLenses: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
238
|
+
}, z.core.$strict>;
|
|
239
|
+
validations: z.ZodArray<z.ZodObject<{
|
|
240
|
+
startedAt: z.ZodString;
|
|
241
|
+
completedAt: z.ZodString;
|
|
242
|
+
command: z.ZodString;
|
|
243
|
+
summary: z.ZodString;
|
|
244
|
+
exitCode: z.ZodNumber;
|
|
245
|
+
outputDigest: z.ZodPipe<z.ZodString, z.ZodTransform<`sha256:${string}`, string>>;
|
|
246
|
+
artifactRef: z.ZodOptional<z.ZodObject<{
|
|
247
|
+
kind: z.ZodLiteral<"restricted_evidence_v1">;
|
|
248
|
+
digest: z.ZodPipe<z.ZodString, z.ZodTransform<`sha256:${string}`, string>>;
|
|
249
|
+
byteLength: z.ZodNumber;
|
|
250
|
+
}, z.core.$strict>>;
|
|
251
|
+
environmentKeys: z.ZodArray<z.ZodString>;
|
|
247
252
|
}, z.core.$strict>>;
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
quick: "quick";
|
|
257
|
-
standard: "standard";
|
|
258
|
-
}>>;
|
|
259
|
-
featureReview: z.ZodOptional<z.ZodObject<{
|
|
260
|
-
status: z.ZodEnum<{
|
|
261
|
-
failed: "failed";
|
|
262
|
-
passed: "passed";
|
|
263
|
-
}>;
|
|
264
|
-
summary: z.ZodString;
|
|
265
|
-
blockingFindings: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
253
|
+
reviewKind: z.ZodLiteral<"feature">;
|
|
254
|
+
validationScope: z.ZodLiteral<"targeted">;
|
|
255
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
256
|
+
operationId: z.ZodString;
|
|
257
|
+
expectedRevision: z.ZodNumber;
|
|
258
|
+
expectedSnapshotId: z.ZodPipe<z.ZodString, z.ZodTransform<`sha256:${string}`, string>>;
|
|
259
|
+
featureId: z.ZodPipe<z.ZodString, z.ZodTransform<import("../domain/session.js").FeatureId, string>>;
|
|
260
|
+
packet: z.ZodObject<{
|
|
266
261
|
summary: z.ZodString;
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
finalReview: z.ZodOptional<z.ZodObject<{
|
|
274
|
-
status: z.ZodEnum<{
|
|
275
|
-
failed: "failed";
|
|
276
|
-
passed: "passed";
|
|
277
|
-
}>;
|
|
278
|
-
summary: z.ZodString;
|
|
279
|
-
blockingFindings: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
262
|
+
riskLenses: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
263
|
+
}, z.core.$strict>;
|
|
264
|
+
validations: z.ZodArray<z.ZodObject<{
|
|
265
|
+
startedAt: z.ZodString;
|
|
266
|
+
completedAt: z.ZodString;
|
|
267
|
+
command: z.ZodString;
|
|
280
268
|
summary: z.ZodString;
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
}
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
final: "final";
|
|
298
|
-
}>;
|
|
299
|
-
reviewSnapshotId: z.ZodPipe<z.ZodString, z.ZodPipe<z.ZodString, z.ZodTransform<`sha256:${string}`, string>>>;
|
|
300
|
-
verdict: z.ZodEnum<{
|
|
301
|
-
failed: "failed";
|
|
302
|
-
passed: "passed";
|
|
303
|
-
}>;
|
|
304
|
-
startedAt: z.ZodString;
|
|
305
|
-
completedAt: z.ZodString;
|
|
306
|
-
terminalDisposition: z.ZodEnum<{
|
|
307
|
-
observed_unsubmitted: "observed_unsubmitted";
|
|
308
|
-
submitted: "submitted";
|
|
309
|
-
}>;
|
|
310
|
-
findings: z.ZodArray<z.ZodObject<{
|
|
311
|
-
taxonomy: z.ZodEnum<{
|
|
312
|
-
advisory: "advisory";
|
|
313
|
-
evidence_gap: "evidence_gap";
|
|
314
|
-
implementation_defect: "implementation_defect";
|
|
315
|
-
regression_coverage_gap: "regression_coverage_gap";
|
|
269
|
+
exitCode: z.ZodNumber;
|
|
270
|
+
outputDigest: z.ZodPipe<z.ZodString, z.ZodTransform<`sha256:${string}`, string>>;
|
|
271
|
+
artifactRef: z.ZodOptional<z.ZodObject<{
|
|
272
|
+
kind: z.ZodLiteral<"restricted_evidence_v1">;
|
|
273
|
+
digest: z.ZodPipe<z.ZodString, z.ZodTransform<`sha256:${string}`, string>>;
|
|
274
|
+
byteLength: z.ZodNumber;
|
|
275
|
+
}, z.core.$strict>>;
|
|
276
|
+
environmentKeys: z.ZodArray<z.ZodString>;
|
|
277
|
+
}, z.core.$strict>>;
|
|
278
|
+
reviewKind: z.ZodLiteral<"final">;
|
|
279
|
+
validationScope: z.ZodLiteral<"broad">;
|
|
280
|
+
featureReview: z.ZodObject<{
|
|
281
|
+
assignmentId: z.ZodString;
|
|
282
|
+
verdict: z.ZodEnum<{
|
|
283
|
+
failed: "failed";
|
|
284
|
+
passed: "passed";
|
|
316
285
|
}>;
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
286
|
+
findings: z.ZodArray<z.ZodObject<{
|
|
287
|
+
taxonomy: z.ZodEnum<{
|
|
288
|
+
advisory: "advisory";
|
|
289
|
+
evidence_gap: "evidence_gap";
|
|
290
|
+
implementation_defect: "implementation_defect";
|
|
291
|
+
regression_coverage_gap: "regression_coverage_gap";
|
|
292
|
+
}>;
|
|
293
|
+
subject: z.ZodString;
|
|
294
|
+
requirementOrRisk: z.ZodString;
|
|
295
|
+
evidenceLocator: z.ZodString;
|
|
296
|
+
summary: z.ZodString;
|
|
297
|
+
severity: z.ZodEnum<{
|
|
298
|
+
advisory: "advisory";
|
|
299
|
+
blocking: "blocking";
|
|
300
|
+
}>;
|
|
301
|
+
}, z.core.$strict>>;
|
|
302
|
+
completedAt: z.ZodString;
|
|
303
|
+
terminalDisposition: z.ZodEnum<{
|
|
304
|
+
observed_unsubmitted: "observed_unsubmitted";
|
|
305
|
+
submitted: "submitted";
|
|
324
306
|
}>;
|
|
325
|
-
}, z.core.$strict
|
|
326
|
-
}, z.core.$strict
|
|
327
|
-
|
|
328
|
-
kind: z.ZodEnum<{
|
|
329
|
-
blocked: "blocked";
|
|
330
|
-
needs_input: "needs_input";
|
|
331
|
-
replan_required: "replan_required";
|
|
332
|
-
}>;
|
|
333
|
-
summary: z.ZodString;
|
|
334
|
-
resolutionHint: z.ZodOptional<z.ZodString>;
|
|
335
|
-
}, z.core.$strict>;
|
|
336
|
-
orchestrationPasses: z.ZodOptional<z.ZodUnknown>;
|
|
337
|
-
}, z.core.$strict>], "status">;
|
|
307
|
+
}, z.core.$strict>;
|
|
308
|
+
}, z.core.$strict>], "reviewKind">;
|
|
309
|
+
}, z.core.$strict>;
|
|
338
310
|
export declare function createFlowService(repository: SessionRepository, environment: TransitionEnvironment): FlowService;
|
|
339
311
|
export {};
|
|
@@ -3,10 +3,14 @@ import type { EvidenceArtifactStore } from "./evidence-artifact-store.js";
|
|
|
3
3
|
import type { SourceIdentityProvider } from "./source-identity.js";
|
|
4
4
|
export declare class ArchivedSessionLookupError extends Error {
|
|
5
5
|
readonly code = "FLOW_ARCHIVE_LOOKUP_FAILED";
|
|
6
|
-
|
|
6
|
+
readonly failureKind: "history-integrity" | "helper-runtime";
|
|
7
|
+
constructor(message: string, options?: ErrorOptions & {
|
|
8
|
+
failureKind?: "history-integrity" | "helper-runtime";
|
|
9
|
+
});
|
|
7
10
|
}
|
|
8
11
|
export type SessionTransaction = EvidenceArtifactStore & SourceIdentityProvider & {
|
|
9
12
|
load(): Promise<Session | null>;
|
|
13
|
+
findArchivedByCloseRetryOperationId(operationId: string): Promise<Session | null>;
|
|
10
14
|
findArchivedByOperationId(operationId: string): Promise<Session | null>;
|
|
11
15
|
save(session: Session): Promise<Session>;
|
|
12
16
|
archiveAndClear(session: Session): Promise<void>;
|