opencode-plugin-flow 5.2.1 → 5.3.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/CHANGELOG.md +69 -0
- package/README.md +96 -19
- package/dist/cli.js +1928 -58
- package/dist/cli.js.map +7 -6
- package/dist/index.js +13440 -8946
- package/dist/index.js.map +37 -24
- package/package.json +14 -5
- package/dist/application/errors.d.ts +0 -10
- package/dist/application/flow-service.d.ts +0 -311
- package/dist/application/ports/evidence-artifact-store.d.ts +0 -28
- package/dist/application/ports/session-repository.d.ts +0 -22
- package/dist/application/ports/source-identity.d.ts +0 -61
- package/dist/application/replay/canonical-json.d.ts +0 -7
- package/dist/application/replay/contract.d.ts +0 -2130
- package/dist/application/replay/engine.d.ts +0 -101
- package/dist/application/replay/index.d.ts +0 -7
- package/dist/application/replay/privacy.d.ts +0 -14
- package/dist/application/schema.d.ts +0 -1813
- package/dist/cli.d.ts +0 -1
- package/dist/config-shared.d.ts +0 -287
- package/dist/config.d.ts +0 -1
- package/dist/distribution/legacy-cleanup.d.ts +0 -25
- package/dist/domain/feature-id.d.ts +0 -3
- package/dist/domain/limits.d.ts +0 -4
- package/dist/domain/orchestration-policy.d.ts +0 -27
- package/dist/domain/session-invariants.d.ts +0 -8
- package/dist/domain/session.d.ts +0 -356
- package/dist/domain/transitions.d.ts +0 -275
- package/dist/domain/validation-command.d.ts +0 -8
- package/dist/guidance/catalog.d.ts +0 -18
- package/dist/guidance/ids.d.ts +0 -4
- package/dist/infrastructure/fs/evidence-artifact-store.d.ts +0 -5
- package/dist/infrastructure/fs/session-repository.d.ts +0 -2
- package/dist/infrastructure/fs/source-identity.d.ts +0 -26
- package/dist/infrastructure/fs/strict-json-object.d.ts +0 -9
- package/dist/infrastructure/fs/workspace-flow-service.d.ts +0 -10
- package/dist/infrastructure/fs/workspace.d.ts +0 -63
- package/dist/infrastructure/system/transition-environment.d.ts +0 -2
- package/dist/platform/opencode/config.d.ts +0 -2
- package/dist/platform/opencode/logging.d.ts +0 -3
- package/dist/platform/opencode/tools.d.ts +0 -4
- package/dist/prompt-baseline-fixtures.d.ts +0 -20
- package/dist/prompt-model-evaluation.d.ts +0 -88
- package/dist/prompt-quality.d.ts +0 -80
- package/dist/prompt-surfaces.d.ts +0 -28
- package/dist/version.d.ts +0 -1
package/dist/domain/session.d.ts
DELETED
|
@@ -1,356 +0,0 @@
|
|
|
1
|
-
import type { ValidationCommandClass } from "./validation-command.js";
|
|
2
|
-
export type FeatureStatus = "pending" | "in_progress" | "completed" | "blocked";
|
|
3
|
-
export type SessionStatus = "planning" | "ready" | "running" | "blocked" | "completed";
|
|
4
|
-
export type FeatureReviewDepth = "quick" | "standard" | "detailed";
|
|
5
|
-
export type FinalReviewPolicy = "broad" | "detailed";
|
|
6
|
-
export type ValidationScope = "targeted" | "broad";
|
|
7
|
-
export type SnapshotId = string;
|
|
8
|
-
export type EvidenceId = string;
|
|
9
|
-
export type FeatureRunId = string;
|
|
10
|
-
export type ReviewAssignmentId = string;
|
|
11
|
-
export type EvidenceArtifactRef = {
|
|
12
|
-
kind: "restricted_evidence_v1";
|
|
13
|
-
digest: `sha256:${string}`;
|
|
14
|
-
byteLength: number;
|
|
15
|
-
};
|
|
16
|
-
export type CausalGuard = {
|
|
17
|
-
operationId: string;
|
|
18
|
-
expectedRevision: number;
|
|
19
|
-
expectedSnapshotId: SnapshotId;
|
|
20
|
-
};
|
|
21
|
-
declare const featureIdBrand: unique symbol;
|
|
22
|
-
declare const sessionIdBrand: unique symbol;
|
|
23
|
-
export type FeatureId = string & {
|
|
24
|
-
readonly [featureIdBrand]: "FeatureId";
|
|
25
|
-
};
|
|
26
|
-
export type SessionId = string & {
|
|
27
|
-
readonly [sessionIdBrand]: "SessionId";
|
|
28
|
-
};
|
|
29
|
-
export declare function toFeatureId(value: string): FeatureId;
|
|
30
|
-
export declare function toSessionId(value: string): SessionId;
|
|
31
|
-
export type OrchestrationPassRecord = {
|
|
32
|
-
id: string;
|
|
33
|
-
kind: "discovery" | "audit" | "review" | "validation" | "verification" | "candidate" | "implementation-decision";
|
|
34
|
-
decision?: "serial" | "parallel" | "candidate-exact-path" | "candidate-worktree" | "tournament" | "skipped" | undefined;
|
|
35
|
-
decisionReason?: string | undefined;
|
|
36
|
-
candidateEligibility: "eligible" | "not_eligible" | "unknown";
|
|
37
|
-
candidateDecision?: "used" | "skipped" | "serial_required" | undefined;
|
|
38
|
-
decisionFactors: Array<"shared_state" | "overlapping_files" | "small_slice" | "needs_manager_judgment" | "independent_surface" | "validation_available">;
|
|
39
|
-
modes: Array<"evidence" | "review" | "validation" | "audit" | "verifier" | "candidate-implementation">;
|
|
40
|
-
workerCount: number;
|
|
41
|
-
candidateWorkerCount: number;
|
|
42
|
-
verifierWorkerCount: number;
|
|
43
|
-
sliceIds: string[];
|
|
44
|
-
dependsOn: string[];
|
|
45
|
-
writeScope: "none" | "manager-serial" | "exact-path" | "isolated-worktree" | "mixed";
|
|
46
|
-
handoffRefs: string[];
|
|
47
|
-
verificationStatus: "not-needed" | "pending" | "passed" | "failed" | "mixed" | "downgraded";
|
|
48
|
-
outcome: "accepted" | "modified" | "rejected" | "partial" | "not-covered" | "superseded";
|
|
49
|
-
synthesisRef?: string | undefined;
|
|
50
|
-
};
|
|
51
|
-
export type OrchestrationTelemetry = {
|
|
52
|
-
passCount: number;
|
|
53
|
-
workerCount: number;
|
|
54
|
-
candidatePassCount: number;
|
|
55
|
-
verifierPassCount: number;
|
|
56
|
-
candidateEligibleCount: number;
|
|
57
|
-
candidateUsedDecisionCount: number;
|
|
58
|
-
candidateSerialRequiredDecisionCount: number;
|
|
59
|
-
skippedCandidateDecisionCount: number;
|
|
60
|
-
latestPasses: OrchestrationPassRecord[];
|
|
61
|
-
};
|
|
62
|
-
export type ReviewFindingTaxonomy = "implementation_defect" | "regression_coverage_gap" | "evidence_gap" | "advisory";
|
|
63
|
-
export type ReviewExecutionFindingInput = {
|
|
64
|
-
taxonomy: ReviewFindingTaxonomy;
|
|
65
|
-
subject: string;
|
|
66
|
-
requirementOrRisk: string;
|
|
67
|
-
evidenceLocator: string;
|
|
68
|
-
summary: string;
|
|
69
|
-
severity: "blocking" | "advisory";
|
|
70
|
-
};
|
|
71
|
-
export type ReviewExecutionFinding = ReviewExecutionFindingInput & {
|
|
72
|
-
fingerprint: string;
|
|
73
|
-
};
|
|
74
|
-
export type ReviewExecutionInput = {
|
|
75
|
-
assignmentId: ReviewAssignmentId;
|
|
76
|
-
featureRunId: FeatureRunId;
|
|
77
|
-
attemptId: string;
|
|
78
|
-
logicalPassId: string;
|
|
79
|
-
featureId: FeatureId;
|
|
80
|
-
reviewKind: "feature" | "final";
|
|
81
|
-
reviewSnapshotId: string;
|
|
82
|
-
verdict: "passed" | "failed";
|
|
83
|
-
findings: ReviewExecutionFindingInput[];
|
|
84
|
-
startedAt: string;
|
|
85
|
-
completedAt: string;
|
|
86
|
-
terminalDisposition: "submitted" | "observed_unsubmitted";
|
|
87
|
-
};
|
|
88
|
-
export type ReviewExecution = Omit<ReviewExecutionInput, "findings"> & {
|
|
89
|
-
findings: ReviewExecutionFinding[];
|
|
90
|
-
};
|
|
91
|
-
export type FeatureRun = {
|
|
92
|
-
id: FeatureRunId;
|
|
93
|
-
featureId: FeatureId;
|
|
94
|
-
sequence: number;
|
|
95
|
-
status: "active" | "completed" | "blocked" | "reset" | "deferred" | "abandoned";
|
|
96
|
-
startedAt: string;
|
|
97
|
-
endedAt: string | null;
|
|
98
|
-
};
|
|
99
|
-
export type BoundReviewPrerequisite = {
|
|
100
|
-
assignmentId: ReviewAssignmentId;
|
|
101
|
-
result: ReviewAssignmentResultInput;
|
|
102
|
-
resultDigest: string;
|
|
103
|
-
};
|
|
104
|
-
export type ReviewAssignment = {
|
|
105
|
-
id: ReviewAssignmentId;
|
|
106
|
-
operationId: string;
|
|
107
|
-
featureRunId: FeatureRunId;
|
|
108
|
-
featureId: FeatureId;
|
|
109
|
-
reviewKind: "feature" | "final";
|
|
110
|
-
validationScope: ValidationScope;
|
|
111
|
-
validationEvidenceRefs: EvidenceId[];
|
|
112
|
-
sourceDigest: string;
|
|
113
|
-
packetDigest: string;
|
|
114
|
-
packetSummary: string;
|
|
115
|
-
riskLenses: string[];
|
|
116
|
-
prerequisite: BoundReviewPrerequisite | null;
|
|
117
|
-
attemptId: string;
|
|
118
|
-
logicalPassId: string;
|
|
119
|
-
startedAt: string;
|
|
120
|
-
requiredDepth: FeatureReviewDepth | FinalReviewPolicy;
|
|
121
|
-
status: "pending" | "submitted" | "observed_unsubmitted" | "invalidated";
|
|
122
|
-
completedAt: string | null;
|
|
123
|
-
invalidatedAt: string | null;
|
|
124
|
-
invalidationReason: "feature_reset" | "source_changed" | "session_deferred" | "session_abandoned" | null;
|
|
125
|
-
};
|
|
126
|
-
export type ReviewAssignmentResultInput = {
|
|
127
|
-
assignmentId: ReviewAssignmentId;
|
|
128
|
-
verdict: "passed" | "failed";
|
|
129
|
-
findings: ReviewExecutionFindingInput[];
|
|
130
|
-
completedAt: string;
|
|
131
|
-
terminalDisposition: "submitted" | "observed_unsubmitted";
|
|
132
|
-
};
|
|
133
|
-
export type ReviewLifecycleTelemetry = {
|
|
134
|
-
featureAttemptCount: number;
|
|
135
|
-
finalAttemptCount: number;
|
|
136
|
-
passedVerdictCount: number;
|
|
137
|
-
failedVerdictCount: number;
|
|
138
|
-
retryConsumedCount: number;
|
|
139
|
-
};
|
|
140
|
-
export type ObservedReviewWorkerLedger = {
|
|
141
|
-
source: "unavailable";
|
|
142
|
-
reconciliationStatus: "unreconciled";
|
|
143
|
-
observedExecutionCount: null;
|
|
144
|
-
} | {
|
|
145
|
-
source: "host_observed";
|
|
146
|
-
reconciliationStatus: "reconciled";
|
|
147
|
-
observedExecutionCount: number;
|
|
148
|
-
};
|
|
149
|
-
export type ValidationEvidence = {
|
|
150
|
-
kind: "validation";
|
|
151
|
-
evidenceId: EvidenceId;
|
|
152
|
-
featureRunId: FeatureRunId;
|
|
153
|
-
capturedAtRevision: number;
|
|
154
|
-
capturedAtSnapshotId: SnapshotId;
|
|
155
|
-
snapshotId: SnapshotId;
|
|
156
|
-
sourceDigest: string;
|
|
157
|
-
commandDigest: string;
|
|
158
|
-
commandClass: ValidationCommandClass;
|
|
159
|
-
startedAt: string;
|
|
160
|
-
completedAt: string;
|
|
161
|
-
exitCode: number;
|
|
162
|
-
outputDigest: string;
|
|
163
|
-
artifactRef?: EvidenceArtifactRef | undefined;
|
|
164
|
-
environmentKeys: string[];
|
|
165
|
-
};
|
|
166
|
-
export type ReviewEvidence = {
|
|
167
|
-
kind: "review";
|
|
168
|
-
evidenceId: EvidenceId;
|
|
169
|
-
featureRunId: FeatureRunId;
|
|
170
|
-
assignmentId: ReviewAssignmentId;
|
|
171
|
-
capturedAtRevision: number;
|
|
172
|
-
capturedAtSnapshotId: SnapshotId;
|
|
173
|
-
snapshotId: SnapshotId;
|
|
174
|
-
sourceDigest: string;
|
|
175
|
-
attemptId: string;
|
|
176
|
-
packetDigest: string;
|
|
177
|
-
startedAt: string;
|
|
178
|
-
completedAt: string;
|
|
179
|
-
};
|
|
180
|
-
export type EvidenceRecord = ValidationEvidence | ReviewEvidence;
|
|
181
|
-
export type CausalMutationRecord = {
|
|
182
|
-
operationId: string;
|
|
183
|
-
operationKind: "plan_save" | "plan_approve" | "run_start" | "review_start" | "feature_complete" | "feature_reset" | "session_close";
|
|
184
|
-
requestDigest: string;
|
|
185
|
-
featureRunId: FeatureRunId | null;
|
|
186
|
-
priorMutationDigest: string | null;
|
|
187
|
-
mutationDigest: string;
|
|
188
|
-
priorRevision: number;
|
|
189
|
-
revision: number;
|
|
190
|
-
priorSnapshotId: SnapshotId;
|
|
191
|
-
currentSnapshotId: SnapshotId;
|
|
192
|
-
changedEntity: {
|
|
193
|
-
kind: "session" | "plan" | "feature" | "review" | "evidence" | "closure";
|
|
194
|
-
id: string;
|
|
195
|
-
};
|
|
196
|
-
changedFields: string[];
|
|
197
|
-
blockerDelta: {
|
|
198
|
-
added: string[];
|
|
199
|
-
removed: string[];
|
|
200
|
-
};
|
|
201
|
-
evidenceRefs: EvidenceId[];
|
|
202
|
-
recordedAt: string;
|
|
203
|
-
};
|
|
204
|
-
export type CausalState = {
|
|
205
|
-
revision: number;
|
|
206
|
-
genesisSnapshotId: SnapshotId;
|
|
207
|
-
snapshotId: SnapshotId;
|
|
208
|
-
mutations: CausalMutationRecord[];
|
|
209
|
-
evidence: EvidenceRecord[];
|
|
210
|
-
};
|
|
211
|
-
export type ReviewerProjectionRequest = {
|
|
212
|
-
assignmentId: ReviewAssignmentId;
|
|
213
|
-
};
|
|
214
|
-
export type AssignmentReviewerProjection = {
|
|
215
|
-
view: "reviewer";
|
|
216
|
-
assignmentId: ReviewAssignmentId;
|
|
217
|
-
assignmentStatus: ReviewAssignment["status"];
|
|
218
|
-
featureRunId: FeatureRunId;
|
|
219
|
-
featureId: FeatureId;
|
|
220
|
-
reviewKind: "feature" | "final";
|
|
221
|
-
assignedScope: string[];
|
|
222
|
-
requiredDepth: FeatureReviewDepth | FinalReviewPolicy;
|
|
223
|
-
packetSummary: string;
|
|
224
|
-
riskLenses: string[];
|
|
225
|
-
validationScope: ValidationScope;
|
|
226
|
-
validationEvidenceCount: number;
|
|
227
|
-
terminalDisposition: "submitted" | "observed_unsubmitted" | null;
|
|
228
|
-
};
|
|
229
|
-
export type ReviewerProjection = AssignmentReviewerProjection;
|
|
230
|
-
export type Artifact = {
|
|
231
|
-
path: string;
|
|
232
|
-
};
|
|
233
|
-
export type Feature = {
|
|
234
|
-
id: FeatureId;
|
|
235
|
-
title: string;
|
|
236
|
-
summary: string;
|
|
237
|
-
status: FeatureStatus;
|
|
238
|
-
reviewDepth: FeatureReviewDepth;
|
|
239
|
-
targets: string[];
|
|
240
|
-
validation: string[];
|
|
241
|
-
dependsOn: FeatureId[];
|
|
242
|
-
};
|
|
243
|
-
export type Plan = {
|
|
244
|
-
summary: string;
|
|
245
|
-
overview: string;
|
|
246
|
-
requirements: string[];
|
|
247
|
-
decisions: string[];
|
|
248
|
-
finalReviewPolicy: FinalReviewPolicy;
|
|
249
|
-
features: Feature[];
|
|
250
|
-
};
|
|
251
|
-
export type ExecutionProjection = {
|
|
252
|
-
view: "execution";
|
|
253
|
-
featureRunId?: FeatureRunId | undefined;
|
|
254
|
-
goal: string;
|
|
255
|
-
plan: {
|
|
256
|
-
summary: string;
|
|
257
|
-
overview: string;
|
|
258
|
-
requirements: string[];
|
|
259
|
-
decisions: string[];
|
|
260
|
-
finalReviewPolicy: FinalReviewPolicy;
|
|
261
|
-
};
|
|
262
|
-
feature: {
|
|
263
|
-
id: FeatureId;
|
|
264
|
-
title: string;
|
|
265
|
-
summary: string;
|
|
266
|
-
targets: string[];
|
|
267
|
-
validation: string[];
|
|
268
|
-
dependsOn: FeatureId[];
|
|
269
|
-
reviewDepth: FeatureReviewDepth;
|
|
270
|
-
};
|
|
271
|
-
isFinalFeature: boolean;
|
|
272
|
-
requiredValidationScope: ValidationScope;
|
|
273
|
-
expectedRevision: number;
|
|
274
|
-
expectedSnapshotId: SnapshotId;
|
|
275
|
-
};
|
|
276
|
-
export type PlanInput = {
|
|
277
|
-
summary: string;
|
|
278
|
-
overview: string;
|
|
279
|
-
requirements?: string[] | undefined;
|
|
280
|
-
decisions?: string[] | undefined;
|
|
281
|
-
finalReviewPolicy?: FinalReviewPolicy | undefined;
|
|
282
|
-
features: Array<{
|
|
283
|
-
id: FeatureId;
|
|
284
|
-
title: string;
|
|
285
|
-
summary: string;
|
|
286
|
-
status?: FeatureStatus | undefined;
|
|
287
|
-
reviewDepth?: FeatureReviewDepth | undefined;
|
|
288
|
-
targets?: string[] | undefined;
|
|
289
|
-
validation?: string[] | undefined;
|
|
290
|
-
dependsOn?: FeatureId[] | undefined;
|
|
291
|
-
}>;
|
|
292
|
-
};
|
|
293
|
-
export type ExecutionOutcome = {
|
|
294
|
-
kind: "blocked";
|
|
295
|
-
summary: string;
|
|
296
|
-
resolutionHint?: string | undefined;
|
|
297
|
-
} | {
|
|
298
|
-
kind: "completed";
|
|
299
|
-
summary?: string | undefined;
|
|
300
|
-
resolutionHint?: string | undefined;
|
|
301
|
-
};
|
|
302
|
-
export type ExecutionHistoryEntry = {
|
|
303
|
-
featureRunId: FeatureRunId;
|
|
304
|
-
featureId: FeatureId;
|
|
305
|
-
status: "completed" | "blocked";
|
|
306
|
-
summary: string;
|
|
307
|
-
recordedAt: string;
|
|
308
|
-
artifactsChanged: Artifact[];
|
|
309
|
-
validationScope: ValidationScope;
|
|
310
|
-
validationEvidenceRefs: EvidenceId[];
|
|
311
|
-
reviewAssignmentIds: ReviewAssignmentId[];
|
|
312
|
-
outcome: ExecutionOutcome;
|
|
313
|
-
orchestrationPasses: OrchestrationPassRecord[];
|
|
314
|
-
};
|
|
315
|
-
export type BudgetTelemetry = {
|
|
316
|
-
reviewCount: number;
|
|
317
|
-
failedReviewCount: number;
|
|
318
|
-
failedReviewAttemptsByFeatureRun: Record<string, number>;
|
|
319
|
-
reviewExecutions: ReviewExecution[];
|
|
320
|
-
reviewLifecycle: ReviewLifecycleTelemetry;
|
|
321
|
-
observedReviewWorkers: ObservedReviewWorkerLedger;
|
|
322
|
-
orchestration: OrchestrationTelemetry;
|
|
323
|
-
};
|
|
324
|
-
export type Session = {
|
|
325
|
-
version: 4;
|
|
326
|
-
id: SessionId;
|
|
327
|
-
goal: string;
|
|
328
|
-
status: SessionStatus;
|
|
329
|
-
approval: "pending" | "approved";
|
|
330
|
-
plan: Plan | null;
|
|
331
|
-
activeFeatureId: FeatureId | null;
|
|
332
|
-
activeFeatureRunId: FeatureRunId | null;
|
|
333
|
-
featureRuns: FeatureRun[];
|
|
334
|
-
reviewAssignments: ReviewAssignment[];
|
|
335
|
-
history: ExecutionHistoryEntry[];
|
|
336
|
-
budget: BudgetTelemetry;
|
|
337
|
-
causal: CausalState;
|
|
338
|
-
closure: {
|
|
339
|
-
kind: "completed" | "deferred" | "abandoned";
|
|
340
|
-
summary: string;
|
|
341
|
-
recordedAt: string;
|
|
342
|
-
retryOperationId: string;
|
|
343
|
-
} | null;
|
|
344
|
-
lastError: {
|
|
345
|
-
tool: string;
|
|
346
|
-
summary: string;
|
|
347
|
-
recovery?: string | undefined;
|
|
348
|
-
recordedAt: string;
|
|
349
|
-
} | null;
|
|
350
|
-
timestamps: {
|
|
351
|
-
createdAt: string;
|
|
352
|
-
updatedAt: string;
|
|
353
|
-
completedAt: string | null;
|
|
354
|
-
};
|
|
355
|
-
};
|
|
356
|
-
export {};
|
|
@@ -1,275 +0,0 @@
|
|
|
1
|
-
import type { CausalGuard, CausalMutationRecord, EvidenceRecord, ExecutionProjection, Feature, FeatureId, FeatureRunId, OrchestrationPassRecord, PlanInput, ReviewAssignment, ReviewAssignmentId, ReviewAssignmentResultInput, ReviewExecutionFindingInput, ReviewerProjection, ReviewerProjectionRequest, Session, SessionId, SnapshotId } from "./session.js";
|
|
2
|
-
export declare const MAX_EXECUTION_PROJECTION_BYTES: number;
|
|
3
|
-
export declare const MAX_REVIEWER_PROJECTION_BYTES = 3000;
|
|
4
|
-
export type TransitionEnvironment = {
|
|
5
|
-
now(): string;
|
|
6
|
-
newSessionId(): SessionId;
|
|
7
|
-
newOperationId?(revision: number): string;
|
|
8
|
-
newRuntimeId?(kind: "feature-run" | "review-assignment"): string;
|
|
9
|
-
};
|
|
10
|
-
export type TransitionResult<T> = {
|
|
11
|
-
ok: true;
|
|
12
|
-
value: T;
|
|
13
|
-
} | {
|
|
14
|
-
ok: false;
|
|
15
|
-
message: string;
|
|
16
|
-
recovery?: string;
|
|
17
|
-
session?: Session;
|
|
18
|
-
};
|
|
19
|
-
export type ReviewStartInput = CausalGuard & {
|
|
20
|
-
requestDigest: string;
|
|
21
|
-
featureId: FeatureId;
|
|
22
|
-
reviewKind: "feature" | "final";
|
|
23
|
-
validationScope: "targeted" | "broad";
|
|
24
|
-
packetSummary: string;
|
|
25
|
-
riskLenses: string[];
|
|
26
|
-
sourceDigest: string;
|
|
27
|
-
validationEvidence: Extract<EvidenceRecord, {
|
|
28
|
-
kind: "validation";
|
|
29
|
-
}>[];
|
|
30
|
-
featureReview?: ReviewAssignmentResultInput | undefined;
|
|
31
|
-
};
|
|
32
|
-
export type AssignedFeatureCompletionInput = CausalGuard & {
|
|
33
|
-
featureId: FeatureId;
|
|
34
|
-
sourceDigest: string;
|
|
35
|
-
result: {
|
|
36
|
-
kind: "completed";
|
|
37
|
-
summary: string;
|
|
38
|
-
artifactsChanged: Array<{
|
|
39
|
-
path: string;
|
|
40
|
-
}>;
|
|
41
|
-
validationScope: "targeted";
|
|
42
|
-
featureReview: ReviewAssignmentResultInput;
|
|
43
|
-
orchestrationPasses: OrchestrationPassRecord[];
|
|
44
|
-
} | {
|
|
45
|
-
kind: "completed";
|
|
46
|
-
summary: string;
|
|
47
|
-
artifactsChanged: Array<{
|
|
48
|
-
path: string;
|
|
49
|
-
}>;
|
|
50
|
-
validationScope: "broad";
|
|
51
|
-
finalReview: ReviewAssignmentResultInput;
|
|
52
|
-
orchestrationPasses: OrchestrationPassRecord[];
|
|
53
|
-
} | {
|
|
54
|
-
kind: "blocked";
|
|
55
|
-
summary: string;
|
|
56
|
-
review: ReviewAssignmentResultInput;
|
|
57
|
-
resolutionHint?: string | undefined;
|
|
58
|
-
orchestrationPasses: OrchestrationPassRecord[];
|
|
59
|
-
};
|
|
60
|
-
};
|
|
61
|
-
export type AssignedFeatureCompletionPreflightInput = Omit<AssignedFeatureCompletionInput, "sourceDigest">;
|
|
62
|
-
export declare function canonicalReviewAssignmentResultDigest(result: ReviewAssignmentResultInput): string;
|
|
63
|
-
export declare function canonicalReviewAttemptId(assignmentId: ReviewAssignmentId): string;
|
|
64
|
-
export declare function canonicalLogicalReviewPassId(featureRunId: FeatureRunId, reviewKind: ReviewAssignment["reviewKind"]): string;
|
|
65
|
-
export declare function canonicalReviewPacketDigest(assignment: Pick<ReviewAssignment, "featureRunId" | "featureId" | "reviewKind" | "validationScope" | "validationEvidenceRefs" | "sourceDigest" | "packetSummary" | "riskLenses" | "prerequisite">): string;
|
|
66
|
-
export declare function canonicalValidationCommandDigest(command: string): string;
|
|
67
|
-
export declare function canonicalOperationRequestDigest(kind: CausalMutationRecord["operationKind"], input: unknown): string;
|
|
68
|
-
export declare function canonicalSessionSnapshotId(session: Session): SnapshotId;
|
|
69
|
-
export declare function canonicalEvidenceId(evidence: EvidenceRecord): string;
|
|
70
|
-
export declare function validateCausalChain(session: Session): string | null;
|
|
71
|
-
export declare function stableReviewFindingFingerprint(finding: ReviewExecutionFindingInput): string;
|
|
72
|
-
export declare function createSession(goal: string, environment: TransitionEnvironment): Session;
|
|
73
|
-
export declare function applyPlan(session: Session, planInput: PlanInput, environment: TransitionEnvironment): TransitionResult<Session>;
|
|
74
|
-
export declare function approvePlan(session: Session, environment: TransitionEnvironment): TransitionResult<Session>;
|
|
75
|
-
export declare function startRun(session: Session, environment: TransitionEnvironment, featureId?: FeatureId): TransitionResult<{
|
|
76
|
-
session: Session;
|
|
77
|
-
feature: Feature;
|
|
78
|
-
}>;
|
|
79
|
-
export declare function startReviewAssignment(session: Session, input: ReviewStartInput, environment: TransitionEnvironment): TransitionResult<{
|
|
80
|
-
session: Session;
|
|
81
|
-
assignment: ReviewAssignment;
|
|
82
|
-
}>;
|
|
83
|
-
export declare function preflightAssignedFeatureCompletion(session: Session, input: AssignedFeatureCompletionPreflightInput, acceptedAt?: string): TransitionResult<"new" | "replay">;
|
|
84
|
-
export declare function completeAssignedFeature(session: Session, input: AssignedFeatureCompletionInput, environment: TransitionEnvironment): TransitionResult<Session>;
|
|
85
|
-
export declare function resetFeature(session: Session, featureId: FeatureId, environment: TransitionEnvironment, guard?: CausalGuard): TransitionResult<Session>;
|
|
86
|
-
export declare function closeSession(session: Session, kind: "completed" | "deferred" | "abandoned", environment: TransitionEnvironment, summary?: string, guard?: CausalGuard): TransitionResult<Session>;
|
|
87
|
-
export declare function serializedUtf8JsonBytes(value: unknown): number;
|
|
88
|
-
export declare function compactSessionProjection(session: Session): {
|
|
89
|
-
view: "compact";
|
|
90
|
-
sessionId: SessionId;
|
|
91
|
-
status: import("./session.js").SessionStatus;
|
|
92
|
-
approval: "approved" | "pending";
|
|
93
|
-
revision: number;
|
|
94
|
-
snapshotId: string;
|
|
95
|
-
featureRunId: string | null;
|
|
96
|
-
feature: {
|
|
97
|
-
id: FeatureId;
|
|
98
|
-
status: import("./session.js").FeatureStatus;
|
|
99
|
-
} | null;
|
|
100
|
-
progress: {
|
|
101
|
-
completed: number;
|
|
102
|
-
total: number;
|
|
103
|
-
remaining: number;
|
|
104
|
-
};
|
|
105
|
-
blockers: {
|
|
106
|
-
featureIds: string[];
|
|
107
|
-
summary: string | null;
|
|
108
|
-
};
|
|
109
|
-
closure: {
|
|
110
|
-
kind: "abandoned" | "completed" | "deferred";
|
|
111
|
-
retryOperationId: string;
|
|
112
|
-
} | null;
|
|
113
|
-
nextAction: string;
|
|
114
|
-
};
|
|
115
|
-
export declare function executionSessionProjection(session: Session): TransitionResult<ExecutionProjection>;
|
|
116
|
-
export declare function detailSessionProjection(session: Session): {
|
|
117
|
-
view: "detail";
|
|
118
|
-
compact: {
|
|
119
|
-
view: "compact";
|
|
120
|
-
sessionId: SessionId;
|
|
121
|
-
status: import("./session.js").SessionStatus;
|
|
122
|
-
approval: "approved" | "pending";
|
|
123
|
-
revision: number;
|
|
124
|
-
snapshotId: string;
|
|
125
|
-
featureRunId: string | null;
|
|
126
|
-
feature: {
|
|
127
|
-
id: FeatureId;
|
|
128
|
-
status: import("./session.js").FeatureStatus;
|
|
129
|
-
} | null;
|
|
130
|
-
progress: {
|
|
131
|
-
completed: number;
|
|
132
|
-
total: number;
|
|
133
|
-
remaining: number;
|
|
134
|
-
};
|
|
135
|
-
blockers: {
|
|
136
|
-
featureIds: string[];
|
|
137
|
-
summary: string | null;
|
|
138
|
-
};
|
|
139
|
-
closure: {
|
|
140
|
-
kind: "abandoned" | "completed" | "deferred";
|
|
141
|
-
retryOperationId: string;
|
|
142
|
-
} | null;
|
|
143
|
-
nextAction: string;
|
|
144
|
-
};
|
|
145
|
-
finalReviewRetry: {
|
|
146
|
-
finalReviewAssignmentId: string;
|
|
147
|
-
featureRunId: string;
|
|
148
|
-
sourceDigest: string;
|
|
149
|
-
prerequisite: {
|
|
150
|
-
assignmentId: string;
|
|
151
|
-
result: ReviewAssignmentResultInput;
|
|
152
|
-
resultDigest: string;
|
|
153
|
-
};
|
|
154
|
-
} | null;
|
|
155
|
-
plan: {
|
|
156
|
-
summary: string;
|
|
157
|
-
overview: string;
|
|
158
|
-
requirements: string[];
|
|
159
|
-
decisions: string[];
|
|
160
|
-
finalReviewPolicy: import("./session.js").FinalReviewPolicy;
|
|
161
|
-
features: {
|
|
162
|
-
id: FeatureId;
|
|
163
|
-
title: string;
|
|
164
|
-
summary: string;
|
|
165
|
-
status: import("./session.js").FeatureStatus;
|
|
166
|
-
reviewDepth: import("./session.js").FeatureReviewDepth;
|
|
167
|
-
targets: string[];
|
|
168
|
-
dependsOn: FeatureId[];
|
|
169
|
-
}[];
|
|
170
|
-
} | null;
|
|
171
|
-
history: {
|
|
172
|
-
featureRunId: string;
|
|
173
|
-
featureId: FeatureId;
|
|
174
|
-
status: "blocked" | "completed";
|
|
175
|
-
summary: string;
|
|
176
|
-
recordedAt: string;
|
|
177
|
-
validationScope: import("./session.js").ValidationScope;
|
|
178
|
-
validation: {
|
|
179
|
-
evidenceId: string;
|
|
180
|
-
commandClass: import("./validation-command.js").ValidationCommandClass;
|
|
181
|
-
status: string;
|
|
182
|
-
completedAt: string;
|
|
183
|
-
}[];
|
|
184
|
-
reviews: {
|
|
185
|
-
assignmentId: string;
|
|
186
|
-
reviewKind: "feature" | "final";
|
|
187
|
-
requiredDepth: "broad" | "detailed" | "quick" | "standard";
|
|
188
|
-
status: "invalidated" | "observed_unsubmitted" | "pending" | "submitted";
|
|
189
|
-
verdict: "failed" | "passed" | null;
|
|
190
|
-
blockingFindingCount: number;
|
|
191
|
-
}[];
|
|
192
|
-
}[];
|
|
193
|
-
featureRuns: {
|
|
194
|
-
id: FeatureRunId;
|
|
195
|
-
featureId: FeatureId;
|
|
196
|
-
sequence: number;
|
|
197
|
-
status: "active" | "completed" | "blocked" | "reset" | "deferred" | "abandoned";
|
|
198
|
-
startedAt: string;
|
|
199
|
-
endedAt: string | null;
|
|
200
|
-
}[];
|
|
201
|
-
reviewAssignments: {
|
|
202
|
-
id: string;
|
|
203
|
-
featureRunId: string;
|
|
204
|
-
featureId: FeatureId;
|
|
205
|
-
reviewKind: "feature" | "final";
|
|
206
|
-
status: "invalidated" | "observed_unsubmitted" | "pending" | "submitted";
|
|
207
|
-
startedAt: string;
|
|
208
|
-
completedAt: string | null;
|
|
209
|
-
invalidatedAt: string | null;
|
|
210
|
-
invalidationReason: "feature_reset" | "session_abandoned" | "session_deferred" | "source_changed" | null;
|
|
211
|
-
prerequisite: {
|
|
212
|
-
assignmentId: string;
|
|
213
|
-
resultDigest: string;
|
|
214
|
-
} | null;
|
|
215
|
-
}[];
|
|
216
|
-
causal: {
|
|
217
|
-
revision: number;
|
|
218
|
-
snapshotId: string;
|
|
219
|
-
mutations: CausalMutationRecord[];
|
|
220
|
-
evidence: EvidenceRecord[];
|
|
221
|
-
};
|
|
222
|
-
};
|
|
223
|
-
export declare function reviewerSessionProjection(session: Session, request: ReviewerProjectionRequest): TransitionResult<ReviewerProjection>;
|
|
224
|
-
export declare function mutationReceiptProjection(session: Session, warnings?: readonly string[], operationId?: string, operationKind?: CausalMutationRecord["operationKind"], acceptedWithoutMutation?: boolean): {
|
|
225
|
-
view: "mutation_receipt";
|
|
226
|
-
status: import("./session.js").SessionStatus;
|
|
227
|
-
operationAccepted: boolean;
|
|
228
|
-
operationIdConsumed: boolean;
|
|
229
|
-
operationId: string | null;
|
|
230
|
-
revision: number;
|
|
231
|
-
snapshotId: string;
|
|
232
|
-
featureRunId: string | null;
|
|
233
|
-
changedEntity: {
|
|
234
|
-
kind: "session" | "plan" | "feature" | "review" | "evidence" | "closure";
|
|
235
|
-
id: string;
|
|
236
|
-
} | null;
|
|
237
|
-
changedFields: string[];
|
|
238
|
-
blockerDelta: {
|
|
239
|
-
added: string[];
|
|
240
|
-
removed: string[];
|
|
241
|
-
};
|
|
242
|
-
evidenceRefs: string[];
|
|
243
|
-
warnings: string[];
|
|
244
|
-
nextAction: string;
|
|
245
|
-
};
|
|
246
|
-
export declare function rejectedMutationReceiptProjection(session: Session | null, warnings?: readonly string[], operationId?: string): {
|
|
247
|
-
view: "mutation_receipt";
|
|
248
|
-
status: import("./session.js").SessionStatus | null;
|
|
249
|
-
operationAccepted: boolean;
|
|
250
|
-
operationIdConsumed: boolean;
|
|
251
|
-
operationId: string | null;
|
|
252
|
-
revision: number | null;
|
|
253
|
-
snapshotId: string | null;
|
|
254
|
-
featureRunId: string | null;
|
|
255
|
-
changedEntity: null;
|
|
256
|
-
changedFields: never[];
|
|
257
|
-
blockerDelta: {
|
|
258
|
-
added: never[];
|
|
259
|
-
removed: never[];
|
|
260
|
-
};
|
|
261
|
-
evidenceRefs: never[];
|
|
262
|
-
warnings: string[];
|
|
263
|
-
nextAction: string;
|
|
264
|
-
};
|
|
265
|
-
export declare function causalDeltaProjection(session: Session, sinceRevision: number): TransitionResult<{
|
|
266
|
-
view: "delta";
|
|
267
|
-
changed: boolean;
|
|
268
|
-
fromRevision: number;
|
|
269
|
-
throughRevision: number;
|
|
270
|
-
currentRevision: number;
|
|
271
|
-
snapshotId: SnapshotId;
|
|
272
|
-
mutations: CausalMutationRecord[];
|
|
273
|
-
hasMore: boolean;
|
|
274
|
-
nextSinceRevision: number | null;
|
|
275
|
-
}>;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
export type ValidationCommandClass = "test" | "typecheck" | "lint" | "build" | "format" | "smoke" | "other";
|
|
2
|
-
/**
|
|
3
|
-
* Classify a validation command for evidence matching.
|
|
4
|
-
*
|
|
5
|
-
* Precedence is intentional and preserves the classifier contract previously
|
|
6
|
-
* exposed at the application boundary.
|
|
7
|
-
*/
|
|
8
|
-
export declare function validationCommandClass(command: string): ValidationCommandClass;
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { type FlowGuidanceId, type FlowGuidanceTopic } from "./ids.js";
|
|
2
|
-
export { FLOW_GUIDANCE_IDS, FLOW_GUIDANCE_TOPICS, type FlowGuidanceId, type FlowGuidanceTopic, } from "./ids.js";
|
|
3
|
-
export type FlowGuidanceFile = {
|
|
4
|
-
relativePath: string;
|
|
5
|
-
content: string;
|
|
6
|
-
};
|
|
7
|
-
export type FlowGuidanceDefinition = {
|
|
8
|
-
name: FlowGuidanceTopic;
|
|
9
|
-
files: FlowGuidanceFile[];
|
|
10
|
-
};
|
|
11
|
-
export declare const FLOW_GUIDANCE_DEFINITIONS: readonly FlowGuidanceDefinition[];
|
|
12
|
-
export type FlowGuidanceDocument = FlowGuidanceFile & {
|
|
13
|
-
id: FlowGuidanceId;
|
|
14
|
-
topic: FlowGuidanceTopic;
|
|
15
|
-
};
|
|
16
|
-
export declare const FLOW_GUIDANCE_DOCUMENTS: readonly FlowGuidanceDocument[];
|
|
17
|
-
export declare function getFlowGuidance(id: FlowGuidanceId): FlowGuidanceDocument;
|
|
18
|
-
export declare function findFlowGuidance(topic: string, relativePath: string): FlowGuidanceDocument | undefined;
|
package/dist/guidance/ids.d.ts
DELETED
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
export declare const FLOW_GUIDANCE_TOPICS: readonly ["flow", "flow-plan", "flow-run", "flow-test", "flow-review", "flow-deslop", "flow-ui-quality", "flow-commit"];
|
|
2
|
-
export type FlowGuidanceTopic = (typeof FLOW_GUIDANCE_TOPICS)[number];
|
|
3
|
-
export declare const FLOW_GUIDANCE_IDS: readonly ["flow", "flow/references/recovery-playbook.md", "flow/references/parallel-orchestration.md", "flow/references/parallel-decision.md", "flow/references/parallel-manifest.md", "flow/references/parallel-execution.md", "flow/references/parallel-synthesis.md", "flow/references/parallel-pass-example.md", "flow/references/handoff-format.md", "flow-plan", "flow-plan/references/planning-examples.md", "flow-plan/references/plan-quality-checklist.md", "flow-plan/references/parallel-discovery.md", "flow-run", "flow-run/references/validation-rubric.md", "flow-run/references/audit-rubric.md", "flow-test", "flow-review", "flow-review/references/hidden-reviewer-contract.md", "flow-review/references/review-rubric.md", "flow-deslop", "flow-deslop/references/smell-rubric.md", "flow-deslop/references/refactor-workflow.md", "flow-ui-quality", "flow-ui-quality/references/ui-rubric.md", "flow-ui-quality/references/visual-verification.md", "flow-commit"];
|
|
4
|
-
export type FlowGuidanceId = (typeof FLOW_GUIDANCE_IDS)[number];
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { type EvidenceArtifactRef, type EvidenceArtifactStore } from "../../application/ports/evidence-artifact-store.js";
|
|
2
|
-
export declare function evidenceArtifactDirectory(workspace: string): string;
|
|
3
|
-
export declare function evidenceArtifactPath(workspace: string, ref: EvidenceArtifactRef): string;
|
|
4
|
-
export declare function evidenceArtifactRefForBytes(bytes: Uint8Array): EvidenceArtifactRef;
|
|
5
|
-
export declare function createFileEvidenceArtifactStore(workspace: string): EvidenceArtifactStore;
|