opencode-plugin-flow 4.4.0 → 5.1.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 +90 -0
- package/README.md +60 -43
- package/dist/application/errors.d.ts +5 -0
- package/dist/application/flow-service.d.ts +339 -0
- package/dist/application/ports/evidence-artifact-store.d.ts +28 -0
- package/dist/application/ports/session-repository.d.ts +18 -0
- package/dist/application/ports/source-identity.d.ts +61 -0
- package/dist/application/replay/canonical-json.d.ts +7 -0
- package/dist/application/replay/contract.d.ts +2007 -0
- package/dist/application/replay/engine.d.ts +101 -0
- package/dist/application/replay/index.d.ts +7 -0
- package/dist/application/replay/privacy.d.ts +14 -0
- package/dist/{runtime → application}/schema.d.ts +1176 -370
- package/dist/cli.js +295 -2721
- package/dist/cli.js.map +7 -6
- package/dist/config-shared.d.ts +28 -14
- package/dist/config.d.ts +1 -1
- package/dist/distribution/legacy-cleanup.d.ts +25 -0
- package/dist/domain/feature-id.d.ts +3 -0
- package/dist/domain/limits.d.ts +1 -0
- package/dist/domain/orchestration-policy.d.ts +27 -0
- package/dist/domain/session.d.ts +355 -0
- package/dist/domain/transitions.d.ts +163 -0
- package/dist/domain/validation-command.d.ts +8 -0
- package/dist/guidance/catalog.d.ts +18 -0
- package/dist/guidance/ids.d.ts +4 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.js +4495 -1817
- package/dist/index.js.map +30 -18
- package/dist/infrastructure/fs/evidence-artifact-store.d.ts +5 -0
- package/dist/infrastructure/fs/session-repository.d.ts +2 -0
- package/dist/infrastructure/fs/source-identity.d.ts +26 -0
- package/dist/infrastructure/fs/workspace-flow-service.d.ts +9 -0
- package/dist/{runtime → infrastructure/fs}/workspace.d.ts +12 -15
- package/dist/infrastructure/system/transition-environment.d.ts +2 -0
- package/dist/platform/opencode/config.d.ts +2 -0
- package/dist/{adapters → platform}/opencode/plugin.d.ts +1 -1
- package/dist/{adapters → platform}/opencode/sdk.d.ts +0 -1
- package/dist/platform/opencode/tools.d.ts +6 -0
- package/dist/prompt-model-evaluation.d.ts +19 -30
- package/dist/prompt-quality.d.ts +1 -1
- package/dist/version.d.ts +1 -0
- package/package.json +18 -11
- package/dist/adapters/opencode/config.d.ts +0 -3
- package/dist/adapters/opencode/tools.d.ts +0 -322
- package/dist/distribution/flow-skill-definitions.d.ts +0 -9
- package/dist/distribution/sync.d.ts +0 -69
- package/dist/runtime/api.d.ts +0 -211
- package/dist/runtime/time.d.ts +0 -2
- package/dist/runtime/transitions.d.ts +0 -230
- /package/dist/{runtime/json/strict-object.d.ts → infrastructure/fs/strict-json-object.d.ts} +0 -0
- /package/dist/{adapters → platform}/opencode/logging.d.ts +0 -0
|
@@ -0,0 +1,355 @@
|
|
|
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 EvidenceArtifactRef = {
|
|
10
|
+
kind: "restricted_evidence_v1";
|
|
11
|
+
digest: `sha256:${string}`;
|
|
12
|
+
byteLength: number;
|
|
13
|
+
};
|
|
14
|
+
export type CausalGuard = {
|
|
15
|
+
operationId: string;
|
|
16
|
+
expectedRevision: number;
|
|
17
|
+
expectedSnapshotId: SnapshotId;
|
|
18
|
+
};
|
|
19
|
+
declare const featureIdBrand: unique symbol;
|
|
20
|
+
declare const sessionIdBrand: unique symbol;
|
|
21
|
+
export type FeatureId = string & {
|
|
22
|
+
readonly [featureIdBrand]: "FeatureId";
|
|
23
|
+
};
|
|
24
|
+
export type SessionId = string & {
|
|
25
|
+
readonly [sessionIdBrand]: "SessionId";
|
|
26
|
+
};
|
|
27
|
+
export declare function toFeatureId(value: string): FeatureId;
|
|
28
|
+
export declare function toSessionId(value: string): SessionId;
|
|
29
|
+
export type OrchestrationPassRecord = {
|
|
30
|
+
id: string;
|
|
31
|
+
kind: "discovery" | "audit" | "review" | "validation" | "verification" | "candidate" | "implementation-decision";
|
|
32
|
+
decision?: "serial" | "parallel" | "candidate-exact-path" | "candidate-worktree" | "tournament" | "skipped" | undefined;
|
|
33
|
+
decisionReason?: string | undefined;
|
|
34
|
+
candidateEligibility: "eligible" | "not_eligible" | "unknown";
|
|
35
|
+
candidateDecision?: "used" | "skipped" | "serial_required" | undefined;
|
|
36
|
+
decisionFactors: Array<"shared_state" | "overlapping_files" | "small_slice" | "needs_manager_judgment" | "independent_surface" | "validation_available">;
|
|
37
|
+
modes: Array<"evidence" | "review" | "validation" | "audit" | "verifier" | "candidate-implementation">;
|
|
38
|
+
workerCount: number;
|
|
39
|
+
candidateWorkerCount: number;
|
|
40
|
+
verifierWorkerCount: number;
|
|
41
|
+
sliceIds: string[];
|
|
42
|
+
dependsOn: string[];
|
|
43
|
+
writeScope: "none" | "manager-serial" | "exact-path" | "isolated-worktree" | "mixed";
|
|
44
|
+
handoffRefs: string[];
|
|
45
|
+
verificationStatus: "not-needed" | "pending" | "passed" | "failed" | "mixed" | "downgraded";
|
|
46
|
+
outcome: "accepted" | "modified" | "rejected" | "partial" | "not-covered" | "superseded";
|
|
47
|
+
synthesisRef?: string | undefined;
|
|
48
|
+
};
|
|
49
|
+
export type OrchestrationTelemetry = {
|
|
50
|
+
passCount: number;
|
|
51
|
+
workerCount: number;
|
|
52
|
+
candidatePassCount: number;
|
|
53
|
+
verifierPassCount: number;
|
|
54
|
+
candidateEligibleCount: number;
|
|
55
|
+
candidateUsedDecisionCount: number;
|
|
56
|
+
candidateSerialRequiredDecisionCount: number;
|
|
57
|
+
skippedCandidateDecisionCount: number;
|
|
58
|
+
latestPasses: OrchestrationPassRecord[];
|
|
59
|
+
};
|
|
60
|
+
export type ReviewFinding = {
|
|
61
|
+
summary: string;
|
|
62
|
+
severity: "blocking" | "advisory";
|
|
63
|
+
};
|
|
64
|
+
export type ReviewFindingTaxonomy = "implementation_defect" | "regression_coverage_gap" | "evidence_gap" | "advisory";
|
|
65
|
+
export type ReviewExecutionFindingInput = {
|
|
66
|
+
taxonomy: ReviewFindingTaxonomy;
|
|
67
|
+
subject: string;
|
|
68
|
+
requirementOrRisk: string;
|
|
69
|
+
evidenceLocator: string;
|
|
70
|
+
summary: string;
|
|
71
|
+
severity: "blocking" | "advisory";
|
|
72
|
+
};
|
|
73
|
+
export type ReviewExecutionFinding = ReviewExecutionFindingInput & {
|
|
74
|
+
fingerprint: string;
|
|
75
|
+
};
|
|
76
|
+
export type ReviewExecutionInput = {
|
|
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 ReviewLifecycleTelemetry = {
|
|
92
|
+
featureAttemptCount: number;
|
|
93
|
+
finalAttemptCount: number;
|
|
94
|
+
passedVerdictCount: number;
|
|
95
|
+
failedVerdictCount: number;
|
|
96
|
+
retryConsumedCount: number;
|
|
97
|
+
};
|
|
98
|
+
export type ObservedReviewWorkerLedger = {
|
|
99
|
+
source: "unavailable";
|
|
100
|
+
reconciliationStatus: "unreconciled";
|
|
101
|
+
observedExecutionCount: null;
|
|
102
|
+
} | {
|
|
103
|
+
source: "host_observed";
|
|
104
|
+
reconciliationStatus: "reconciled";
|
|
105
|
+
observedExecutionCount: number;
|
|
106
|
+
};
|
|
107
|
+
export type Review = {
|
|
108
|
+
status: "passed" | "failed";
|
|
109
|
+
summary: string;
|
|
110
|
+
blockingFindings: ReviewFinding[];
|
|
111
|
+
};
|
|
112
|
+
export type FinalReview = Review & {
|
|
113
|
+
reviewDepth: FinalReviewPolicy;
|
|
114
|
+
};
|
|
115
|
+
export type ValidationRun = {
|
|
116
|
+
command: string;
|
|
117
|
+
status: "passed" | "failed";
|
|
118
|
+
summary: string;
|
|
119
|
+
};
|
|
120
|
+
export type ValidationEvidence = {
|
|
121
|
+
kind: "validation";
|
|
122
|
+
evidenceId: EvidenceId;
|
|
123
|
+
snapshotId: SnapshotId;
|
|
124
|
+
sourceDigest: string;
|
|
125
|
+
commandClass: ValidationCommandClass;
|
|
126
|
+
startedAt: string;
|
|
127
|
+
completedAt: string;
|
|
128
|
+
exitCode: number;
|
|
129
|
+
outputDigest: string;
|
|
130
|
+
artifactRef?: EvidenceArtifactRef | undefined;
|
|
131
|
+
environmentKeys: string[];
|
|
132
|
+
};
|
|
133
|
+
export type ReviewEvidence = {
|
|
134
|
+
kind: "review";
|
|
135
|
+
evidenceId: EvidenceId;
|
|
136
|
+
snapshotId: SnapshotId;
|
|
137
|
+
sourceDigest: string;
|
|
138
|
+
attemptId: string;
|
|
139
|
+
packetDigest: string;
|
|
140
|
+
startedAt: string;
|
|
141
|
+
completedAt: string;
|
|
142
|
+
};
|
|
143
|
+
export type EvidenceRecord = ValidationEvidence | ReviewEvidence;
|
|
144
|
+
export type CausalMutationRecord = {
|
|
145
|
+
operationId: string;
|
|
146
|
+
operationKind: "plan_save" | "plan_approve" | "run_start" | "review_record" | "evidence_record" | "feature_complete" | "feature_reset" | "session_close";
|
|
147
|
+
requestDigest: string;
|
|
148
|
+
priorMutationDigest: string | null;
|
|
149
|
+
mutationDigest: string;
|
|
150
|
+
priorRevision: number;
|
|
151
|
+
revision: number;
|
|
152
|
+
priorSnapshotId: SnapshotId;
|
|
153
|
+
currentSnapshotId: SnapshotId;
|
|
154
|
+
changedEntity: {
|
|
155
|
+
kind: "session" | "plan" | "feature" | "review" | "evidence" | "closure";
|
|
156
|
+
id: string;
|
|
157
|
+
};
|
|
158
|
+
changedFields: string[];
|
|
159
|
+
blockerDelta: {
|
|
160
|
+
added: string[];
|
|
161
|
+
removed: string[];
|
|
162
|
+
};
|
|
163
|
+
evidenceRefs: EvidenceId[];
|
|
164
|
+
recordedAt: string;
|
|
165
|
+
};
|
|
166
|
+
export type CausalState = {
|
|
167
|
+
revision: number;
|
|
168
|
+
genesisSnapshotId: SnapshotId;
|
|
169
|
+
snapshotId: SnapshotId;
|
|
170
|
+
mutations: CausalMutationRecord[];
|
|
171
|
+
evidence: EvidenceRecord[];
|
|
172
|
+
};
|
|
173
|
+
type ReviewerProjectionRequestBase = {
|
|
174
|
+
featureId: FeatureId;
|
|
175
|
+
packetHash: string;
|
|
176
|
+
evidenceRefs: string[];
|
|
177
|
+
expectedRevision?: number | undefined;
|
|
178
|
+
expectedSnapshotId?: SnapshotId | undefined;
|
|
179
|
+
};
|
|
180
|
+
export type ReviewerProjectionRequest = (ReviewerProjectionRequestBase & {
|
|
181
|
+
reviewKind: "feature";
|
|
182
|
+
}) | (ReviewerProjectionRequestBase & {
|
|
183
|
+
reviewKind: "final";
|
|
184
|
+
});
|
|
185
|
+
type ReviewerProjectionBase = {
|
|
186
|
+
view: "reviewer";
|
|
187
|
+
featureId: FeatureId;
|
|
188
|
+
assignedScope: string[];
|
|
189
|
+
packetHash: string;
|
|
190
|
+
evidenceRefs: string[];
|
|
191
|
+
expectedRevision: number;
|
|
192
|
+
expectedSnapshotId: SnapshotId;
|
|
193
|
+
};
|
|
194
|
+
export type ReviewerProjection = (ReviewerProjectionBase & {
|
|
195
|
+
reviewKind: "feature";
|
|
196
|
+
requiredDepth: FeatureReviewDepth;
|
|
197
|
+
}) | (ReviewerProjectionBase & {
|
|
198
|
+
reviewKind: "final";
|
|
199
|
+
requiredDepth: FinalReviewPolicy;
|
|
200
|
+
requirements: string[];
|
|
201
|
+
decisions: string[];
|
|
202
|
+
});
|
|
203
|
+
export type Artifact = {
|
|
204
|
+
path: string;
|
|
205
|
+
};
|
|
206
|
+
export type Feature = {
|
|
207
|
+
id: FeatureId;
|
|
208
|
+
title: string;
|
|
209
|
+
summary: string;
|
|
210
|
+
status: FeatureStatus;
|
|
211
|
+
reviewDepth: FeatureReviewDepth;
|
|
212
|
+
targets: string[];
|
|
213
|
+
validation: string[];
|
|
214
|
+
dependsOn: FeatureId[];
|
|
215
|
+
};
|
|
216
|
+
export type Plan = {
|
|
217
|
+
summary: string;
|
|
218
|
+
overview: string;
|
|
219
|
+
requirements: string[];
|
|
220
|
+
decisions: string[];
|
|
221
|
+
finalReviewPolicy: FinalReviewPolicy;
|
|
222
|
+
features: Feature[];
|
|
223
|
+
};
|
|
224
|
+
export type ExecutionProjection = {
|
|
225
|
+
view: "execution";
|
|
226
|
+
goal: string;
|
|
227
|
+
plan: {
|
|
228
|
+
summary: string;
|
|
229
|
+
overview: string;
|
|
230
|
+
requirements: string[];
|
|
231
|
+
decisions: string[];
|
|
232
|
+
finalReviewPolicy: FinalReviewPolicy;
|
|
233
|
+
};
|
|
234
|
+
feature: {
|
|
235
|
+
id: FeatureId;
|
|
236
|
+
title: string;
|
|
237
|
+
summary: string;
|
|
238
|
+
targets: string[];
|
|
239
|
+
validation: string[];
|
|
240
|
+
dependsOn: FeatureId[];
|
|
241
|
+
reviewDepth: FeatureReviewDepth;
|
|
242
|
+
};
|
|
243
|
+
isFinalFeature: boolean;
|
|
244
|
+
requiredValidationScope: ValidationScope;
|
|
245
|
+
expectedRevision: number;
|
|
246
|
+
expectedSnapshotId: SnapshotId;
|
|
247
|
+
};
|
|
248
|
+
export type PlanInput = {
|
|
249
|
+
summary: string;
|
|
250
|
+
overview: string;
|
|
251
|
+
requirements?: string[] | undefined;
|
|
252
|
+
decisions?: string[] | undefined;
|
|
253
|
+
finalReviewPolicy?: FinalReviewPolicy | undefined;
|
|
254
|
+
features: Array<{
|
|
255
|
+
id: FeatureId;
|
|
256
|
+
title: string;
|
|
257
|
+
summary: string;
|
|
258
|
+
status?: FeatureStatus | undefined;
|
|
259
|
+
reviewDepth?: FeatureReviewDepth | undefined;
|
|
260
|
+
targets?: string[] | undefined;
|
|
261
|
+
validation?: string[] | undefined;
|
|
262
|
+
dependsOn?: FeatureId[] | undefined;
|
|
263
|
+
}>;
|
|
264
|
+
};
|
|
265
|
+
export type CompletedWorkerOutcome = {
|
|
266
|
+
kind: "completed";
|
|
267
|
+
summary?: string | undefined;
|
|
268
|
+
resolutionHint?: string | undefined;
|
|
269
|
+
};
|
|
270
|
+
export type NeedsInputOutcome = {
|
|
271
|
+
kind: "blocked" | "needs_input" | "replan_required";
|
|
272
|
+
summary: string;
|
|
273
|
+
resolutionHint?: string | undefined;
|
|
274
|
+
};
|
|
275
|
+
export type WorkerOutcome = CompletedWorkerOutcome | NeedsInputOutcome;
|
|
276
|
+
type WorkerResultBase = {
|
|
277
|
+
operationId?: string | undefined;
|
|
278
|
+
expectedRevision?: number | undefined;
|
|
279
|
+
expectedSnapshotId?: SnapshotId | undefined;
|
|
280
|
+
/** Trusted application-boundary digest of the normalized public request. */
|
|
281
|
+
requestDigest?: string | undefined;
|
|
282
|
+
featureId: FeatureId;
|
|
283
|
+
summary: string;
|
|
284
|
+
artifactsChanged: Artifact[];
|
|
285
|
+
validationRun: ValidationRun[];
|
|
286
|
+
validationScope?: ValidationScope | undefined;
|
|
287
|
+
featureReviewDepth?: FeatureReviewDepth | undefined;
|
|
288
|
+
featureReview?: Review | undefined;
|
|
289
|
+
finalReview?: FinalReview | undefined;
|
|
290
|
+
reviewExecutions?: ReviewExecutionInput[] | undefined;
|
|
291
|
+
evidence?: EvidenceRecord[] | undefined;
|
|
292
|
+
orchestrationPasses: OrchestrationPassRecord[];
|
|
293
|
+
};
|
|
294
|
+
export type WorkerResult = (WorkerResultBase & {
|
|
295
|
+
status: "ok";
|
|
296
|
+
validationScope: ValidationScope;
|
|
297
|
+
featureReviewDepth: FeatureReviewDepth;
|
|
298
|
+
featureReview: Review;
|
|
299
|
+
outcome?: CompletedWorkerOutcome | undefined;
|
|
300
|
+
}) | (WorkerResultBase & {
|
|
301
|
+
status: "needs_input";
|
|
302
|
+
outcome: NeedsInputOutcome;
|
|
303
|
+
});
|
|
304
|
+
export type ExecutionHistoryEntry = {
|
|
305
|
+
featureId: FeatureId;
|
|
306
|
+
status: "completed" | "blocked" | "needs_input";
|
|
307
|
+
summary: string;
|
|
308
|
+
recordedAt: string;
|
|
309
|
+
artifactsChanged: Artifact[];
|
|
310
|
+
validationRun: ValidationRun[];
|
|
311
|
+
validationScope?: ValidationScope | undefined;
|
|
312
|
+
featureReviewDepth?: FeatureReviewDepth | undefined;
|
|
313
|
+
featureReview?: Review | undefined;
|
|
314
|
+
finalReview?: FinalReview | undefined;
|
|
315
|
+
outcome?: WorkerOutcome | undefined;
|
|
316
|
+
orchestrationPasses: OrchestrationPassRecord[];
|
|
317
|
+
};
|
|
318
|
+
export type BudgetTelemetry = {
|
|
319
|
+
reviewCount: number;
|
|
320
|
+
failedReviewCount: number;
|
|
321
|
+
failedReviewAttemptsByFeature: Record<string, number>;
|
|
322
|
+
reviewExecutions: ReviewExecution[];
|
|
323
|
+
reviewLifecycle: ReviewLifecycleTelemetry;
|
|
324
|
+
observedReviewWorkers: ObservedReviewWorkerLedger;
|
|
325
|
+
orchestration: OrchestrationTelemetry;
|
|
326
|
+
};
|
|
327
|
+
export type Session = {
|
|
328
|
+
version: 3;
|
|
329
|
+
id: SessionId;
|
|
330
|
+
goal: string;
|
|
331
|
+
status: SessionStatus;
|
|
332
|
+
approval: "pending" | "approved";
|
|
333
|
+
plan: Plan | null;
|
|
334
|
+
activeFeatureId: FeatureId | null;
|
|
335
|
+
history: ExecutionHistoryEntry[];
|
|
336
|
+
budget: BudgetTelemetry;
|
|
337
|
+
causal: CausalState;
|
|
338
|
+
closure: {
|
|
339
|
+
kind: "completed" | "deferred" | "abandoned";
|
|
340
|
+
summary: string;
|
|
341
|
+
recordedAt: string;
|
|
342
|
+
} | null;
|
|
343
|
+
lastError: {
|
|
344
|
+
tool: string;
|
|
345
|
+
summary: string;
|
|
346
|
+
recovery?: string | undefined;
|
|
347
|
+
recordedAt: string;
|
|
348
|
+
} | null;
|
|
349
|
+
timestamps: {
|
|
350
|
+
createdAt: string;
|
|
351
|
+
updatedAt: string;
|
|
352
|
+
completedAt: string | null;
|
|
353
|
+
};
|
|
354
|
+
};
|
|
355
|
+
export {};
|
|
@@ -0,0 +1,163 @@
|
|
|
1
|
+
import type { CausalGuard, CausalMutationRecord, EvidenceRecord, ExecutionProjection, Feature, FeatureId, FeatureReviewDepth, PlanInput, ReviewExecution, ReviewExecutionFindingInput, ReviewExecutionInput, ReviewerProjection, ReviewerProjectionRequest, Session, SessionId, SnapshotId, WorkerResult } from "./session.js";
|
|
2
|
+
export declare const MAX_EXECUTION_PROJECTION_BYTES: number;
|
|
3
|
+
export type TransitionEnvironment = {
|
|
4
|
+
now(): string;
|
|
5
|
+
newSessionId(): SessionId;
|
|
6
|
+
newOperationId?(revision: number): string;
|
|
7
|
+
};
|
|
8
|
+
export type TransitionResult<T> = {
|
|
9
|
+
ok: true;
|
|
10
|
+
value: T;
|
|
11
|
+
} | {
|
|
12
|
+
ok: false;
|
|
13
|
+
message: string;
|
|
14
|
+
recovery?: string;
|
|
15
|
+
session?: Session;
|
|
16
|
+
};
|
|
17
|
+
export declare function canonicalOperationRequestDigest(kind: CausalMutationRecord["operationKind"], input: unknown): string;
|
|
18
|
+
export declare function canonicalSessionSnapshotId(session: Session): SnapshotId;
|
|
19
|
+
export declare function canonicalEvidenceId(evidence: EvidenceRecord): string;
|
|
20
|
+
export declare function validateCausalChain(session: Session): string | null;
|
|
21
|
+
export declare function stableReviewFindingFingerprint(finding: ReviewExecutionFindingInput): string;
|
|
22
|
+
export type LogicalReviewPassProjection = {
|
|
23
|
+
logicalPassId: string;
|
|
24
|
+
featureId: FeatureId;
|
|
25
|
+
reviewKind: ReviewExecution["reviewKind"];
|
|
26
|
+
reviewSnapshotId: string;
|
|
27
|
+
latestAttemptId: string;
|
|
28
|
+
verdict: ReviewExecution["verdict"];
|
|
29
|
+
attemptCount: number;
|
|
30
|
+
};
|
|
31
|
+
export declare function projectLogicalReviewPasses(executions: readonly ReviewExecution[]): LogicalReviewPassProjection[];
|
|
32
|
+
export declare function recordReviewExecutions(session: Session, executions: readonly ReviewExecutionInput[], environment: TransitionEnvironment, operationId?: string, guard?: Pick<CausalGuard, "expectedRevision" | "expectedSnapshotId">): TransitionResult<Session>;
|
|
33
|
+
export declare function mergeReviewExecutionsForCompletion(session: Session, executions: readonly ReviewExecutionInput[]): TransitionResult<Session>;
|
|
34
|
+
export declare function mergeEvidenceForCompletion(session: Session, evidenceRecords: readonly EvidenceRecord[]): TransitionResult<Session>;
|
|
35
|
+
export declare function recordEvidence(session: Session, evidenceRecords: readonly EvidenceRecord[], environment: TransitionEnvironment, operationId?: string): TransitionResult<Session>;
|
|
36
|
+
export declare function createSession(goal: string, environment: TransitionEnvironment): Session;
|
|
37
|
+
export declare function applyPlan(session: Session, planInput: PlanInput, environment: TransitionEnvironment): TransitionResult<Session>;
|
|
38
|
+
export declare function approvePlan(session: Session, environment: TransitionEnvironment): TransitionResult<Session>;
|
|
39
|
+
export declare function startRun(session: Session, environment: TransitionEnvironment, featureId?: FeatureId): TransitionResult<{
|
|
40
|
+
session: Session;
|
|
41
|
+
feature: Feature;
|
|
42
|
+
}>;
|
|
43
|
+
export declare function completeFeature(session: Session, worker: WorkerResult, environment: TransitionEnvironment): TransitionResult<Session>;
|
|
44
|
+
export declare function resetFeature(session: Session, featureId: FeatureId, environment: TransitionEnvironment, guard?: CausalGuard): TransitionResult<Session>;
|
|
45
|
+
export declare function closeSession(session: Session, kind: "completed" | "deferred" | "abandoned", environment: TransitionEnvironment, summary?: string, guard?: CausalGuard): TransitionResult<Session>;
|
|
46
|
+
export declare function serializedUtf8JsonBytes(value: unknown): number;
|
|
47
|
+
export declare function compactSessionProjection(session: Session): {
|
|
48
|
+
view: "compact";
|
|
49
|
+
sessionId: SessionId;
|
|
50
|
+
status: import("./session.js").SessionStatus;
|
|
51
|
+
approval: "approved" | "pending";
|
|
52
|
+
revision: number;
|
|
53
|
+
snapshotId: string;
|
|
54
|
+
feature: {
|
|
55
|
+
id: FeatureId;
|
|
56
|
+
status: import("./session.js").FeatureStatus;
|
|
57
|
+
} | null;
|
|
58
|
+
progress: {
|
|
59
|
+
completed: number;
|
|
60
|
+
total: number;
|
|
61
|
+
remaining: number;
|
|
62
|
+
};
|
|
63
|
+
blockers: {
|
|
64
|
+
featureIds: string[];
|
|
65
|
+
summary: string | null;
|
|
66
|
+
};
|
|
67
|
+
closure: {
|
|
68
|
+
kind: "abandoned" | "completed" | "deferred";
|
|
69
|
+
} | null;
|
|
70
|
+
nextAction: string;
|
|
71
|
+
};
|
|
72
|
+
export declare function executionSessionProjection(session: Session): TransitionResult<ExecutionProjection>;
|
|
73
|
+
export declare function detailSessionProjection(session: Session): {
|
|
74
|
+
view: "detail";
|
|
75
|
+
compact: {
|
|
76
|
+
view: "compact";
|
|
77
|
+
sessionId: SessionId;
|
|
78
|
+
status: import("./session.js").SessionStatus;
|
|
79
|
+
approval: "approved" | "pending";
|
|
80
|
+
revision: number;
|
|
81
|
+
snapshotId: string;
|
|
82
|
+
feature: {
|
|
83
|
+
id: FeatureId;
|
|
84
|
+
status: import("./session.js").FeatureStatus;
|
|
85
|
+
} | null;
|
|
86
|
+
progress: {
|
|
87
|
+
completed: number;
|
|
88
|
+
total: number;
|
|
89
|
+
remaining: number;
|
|
90
|
+
};
|
|
91
|
+
blockers: {
|
|
92
|
+
featureIds: string[];
|
|
93
|
+
summary: string | null;
|
|
94
|
+
};
|
|
95
|
+
closure: {
|
|
96
|
+
kind: "abandoned" | "completed" | "deferred";
|
|
97
|
+
} | null;
|
|
98
|
+
nextAction: string;
|
|
99
|
+
};
|
|
100
|
+
plan: {
|
|
101
|
+
summary: string;
|
|
102
|
+
overview: string;
|
|
103
|
+
requirements: string[];
|
|
104
|
+
decisions: string[];
|
|
105
|
+
finalReviewPolicy: import("./session.js").FinalReviewPolicy;
|
|
106
|
+
features: {
|
|
107
|
+
id: FeatureId;
|
|
108
|
+
title: string;
|
|
109
|
+
summary: string;
|
|
110
|
+
status: import("./session.js").FeatureStatus;
|
|
111
|
+
reviewDepth: FeatureReviewDepth;
|
|
112
|
+
targets: string[];
|
|
113
|
+
dependsOn: FeatureId[];
|
|
114
|
+
}[];
|
|
115
|
+
} | null;
|
|
116
|
+
history: {
|
|
117
|
+
featureId: FeatureId;
|
|
118
|
+
status: "blocked" | "completed" | "needs_input";
|
|
119
|
+
summary: string;
|
|
120
|
+
recordedAt: string;
|
|
121
|
+
validation: {
|
|
122
|
+
status: "failed" | "passed";
|
|
123
|
+
summary: string;
|
|
124
|
+
}[];
|
|
125
|
+
}[];
|
|
126
|
+
causal: {
|
|
127
|
+
revision: number;
|
|
128
|
+
snapshotId: string;
|
|
129
|
+
mutations: CausalMutationRecord[];
|
|
130
|
+
evidence: EvidenceRecord[];
|
|
131
|
+
};
|
|
132
|
+
};
|
|
133
|
+
export declare function reviewerSessionProjection(session: Session, request: ReviewerProjectionRequest): TransitionResult<ReviewerProjection>;
|
|
134
|
+
export declare function mutationReceiptProjection(session: Session, warnings?: readonly string[], operationId?: string): {
|
|
135
|
+
view: "mutation_receipt";
|
|
136
|
+
status: import("./session.js").SessionStatus;
|
|
137
|
+
operationId: string | null;
|
|
138
|
+
revision: number;
|
|
139
|
+
snapshotId: string;
|
|
140
|
+
changedEntity: {
|
|
141
|
+
kind: "session" | "plan" | "feature" | "review" | "evidence" | "closure";
|
|
142
|
+
id: string;
|
|
143
|
+
} | null;
|
|
144
|
+
changedFields: string[];
|
|
145
|
+
blockerDelta: {
|
|
146
|
+
added: string[];
|
|
147
|
+
removed: string[];
|
|
148
|
+
};
|
|
149
|
+
evidenceRefs: string[];
|
|
150
|
+
warnings: string[];
|
|
151
|
+
nextAction: string;
|
|
152
|
+
};
|
|
153
|
+
export declare function causalDeltaProjection(session: Session, sinceRevision: number): TransitionResult<{
|
|
154
|
+
view: "delta";
|
|
155
|
+
changed: boolean;
|
|
156
|
+
fromRevision: number;
|
|
157
|
+
throughRevision: number;
|
|
158
|
+
currentRevision: number;
|
|
159
|
+
snapshotId: SnapshotId;
|
|
160
|
+
mutations: CausalMutationRecord[];
|
|
161
|
+
hasMore: boolean;
|
|
162
|
+
nextSinceRevision: number | null;
|
|
163
|
+
}>;
|
|
@@ -0,0 +1,8 @@
|
|
|
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;
|
|
@@ -0,0 +1,18 @@
|
|
|
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;
|
|
@@ -0,0 +1,4 @@
|
|
|
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];
|
package/dist/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { default } from "./
|
|
1
|
+
export { default } from "./platform/opencode/plugin.js";
|