opencode-plugin-flow 5.1.1 → 5.2.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.
@@ -1 +1,4 @@
1
1
  export declare const MAX_ORCHESTRATION_PASSES = 50;
2
+ export declare const MAX_HISTORY_ENTRIES = 500;
3
+ export declare const MAX_SESSION_ID_LENGTH = 128;
4
+ export declare const MAX_REVIEW_ASSIGNMENT_RESULT_BYTES: number;
@@ -0,0 +1,8 @@
1
+ import type { Session } from "./session.js";
2
+ /**
3
+ * Validate relationships that cannot be expressed by the local Session v4
4
+ * object schemas. The first returned error is stable, curated recovery
5
+ * evidence; callers must treat any error as corruption and never partially
6
+ * hydrate the graph.
7
+ */
8
+ export declare function validateSessionInvariants(session: Session): string | null;
@@ -6,6 +6,8 @@ export type FinalReviewPolicy = "broad" | "detailed";
6
6
  export type ValidationScope = "targeted" | "broad";
7
7
  export type SnapshotId = string;
8
8
  export type EvidenceId = string;
9
+ export type FeatureRunId = string;
10
+ export type ReviewAssignmentId = string;
9
11
  export type EvidenceArtifactRef = {
10
12
  kind: "restricted_evidence_v1";
11
13
  digest: `sha256:${string}`;
@@ -57,10 +59,6 @@ export type OrchestrationTelemetry = {
57
59
  skippedCandidateDecisionCount: number;
58
60
  latestPasses: OrchestrationPassRecord[];
59
61
  };
60
- export type ReviewFinding = {
61
- summary: string;
62
- severity: "blocking" | "advisory";
63
- };
64
62
  export type ReviewFindingTaxonomy = "implementation_defect" | "regression_coverage_gap" | "evidence_gap" | "advisory";
65
63
  export type ReviewExecutionFindingInput = {
66
64
  taxonomy: ReviewFindingTaxonomy;
@@ -74,6 +72,8 @@ export type ReviewExecutionFinding = ReviewExecutionFindingInput & {
74
72
  fingerprint: string;
75
73
  };
76
74
  export type ReviewExecutionInput = {
75
+ assignmentId: ReviewAssignmentId;
76
+ featureRunId: FeatureRunId;
77
77
  attemptId: string;
78
78
  logicalPassId: string;
79
79
  featureId: FeatureId;
@@ -88,6 +88,48 @@ export type ReviewExecutionInput = {
88
88
  export type ReviewExecution = Omit<ReviewExecutionInput, "findings"> & {
89
89
  findings: ReviewExecutionFinding[];
90
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
+ };
91
133
  export type ReviewLifecycleTelemetry = {
92
134
  featureAttemptCount: number;
93
135
  finalAttemptCount: number;
@@ -104,24 +146,15 @@ export type ObservedReviewWorkerLedger = {
104
146
  reconciliationStatus: "reconciled";
105
147
  observedExecutionCount: number;
106
148
  };
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
149
  export type ValidationEvidence = {
121
150
  kind: "validation";
122
151
  evidenceId: EvidenceId;
152
+ featureRunId: FeatureRunId;
153
+ capturedAtRevision: number;
154
+ capturedAtSnapshotId: SnapshotId;
123
155
  snapshotId: SnapshotId;
124
156
  sourceDigest: string;
157
+ commandDigest: string;
125
158
  commandClass: ValidationCommandClass;
126
159
  startedAt: string;
127
160
  completedAt: string;
@@ -133,6 +166,10 @@ export type ValidationEvidence = {
133
166
  export type ReviewEvidence = {
134
167
  kind: "review";
135
168
  evidenceId: EvidenceId;
169
+ featureRunId: FeatureRunId;
170
+ assignmentId: ReviewAssignmentId;
171
+ capturedAtRevision: number;
172
+ capturedAtSnapshotId: SnapshotId;
136
173
  snapshotId: SnapshotId;
137
174
  sourceDigest: string;
138
175
  attemptId: string;
@@ -143,8 +180,9 @@ export type ReviewEvidence = {
143
180
  export type EvidenceRecord = ValidationEvidence | ReviewEvidence;
144
181
  export type CausalMutationRecord = {
145
182
  operationId: string;
146
- operationKind: "plan_save" | "plan_approve" | "run_start" | "review_record" | "evidence_record" | "feature_complete" | "feature_reset" | "session_close";
183
+ operationKind: "plan_save" | "plan_approve" | "run_start" | "review_start" | "feature_complete" | "feature_reset" | "session_close";
147
184
  requestDigest: string;
185
+ featureRunId: FeatureRunId | null;
148
186
  priorMutationDigest: string | null;
149
187
  mutationDigest: string;
150
188
  priorRevision: number;
@@ -170,36 +208,25 @@ export type CausalState = {
170
208
  mutations: CausalMutationRecord[];
171
209
  evidence: EvidenceRecord[];
172
210
  };
173
- type ReviewerProjectionRequestBase = {
174
- featureId: FeatureId;
175
- packetHash: string;
176
- evidenceRefs: string[];
177
- expectedRevision?: number | undefined;
178
- expectedSnapshotId?: SnapshotId | undefined;
211
+ export type ReviewerProjectionRequest = {
212
+ assignmentId: ReviewAssignmentId;
179
213
  };
180
- export type ReviewerProjectionRequest = (ReviewerProjectionRequestBase & {
181
- reviewKind: "feature";
182
- }) | (ReviewerProjectionRequestBase & {
183
- reviewKind: "final";
184
- });
185
- type ReviewerProjectionBase = {
214
+ export type AssignmentReviewerProjection = {
186
215
  view: "reviewer";
216
+ assignmentId: ReviewAssignmentId;
217
+ assignmentStatus: ReviewAssignment["status"];
218
+ featureRunId: FeatureRunId;
187
219
  featureId: FeatureId;
220
+ reviewKind: "feature" | "final";
188
221
  assignedScope: string[];
189
- packetHash: string;
190
- evidenceRefs: string[];
191
- expectedRevision: number;
192
- expectedSnapshotId: SnapshotId;
222
+ requiredDepth: FeatureReviewDepth | FinalReviewPolicy;
223
+ packetSummary: string;
224
+ riskLenses: string[];
225
+ validationScope: ValidationScope;
226
+ validationEvidenceCount: number;
227
+ terminalDisposition: "submitted" | "observed_unsubmitted" | null;
193
228
  };
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
- });
229
+ export type ReviewerProjection = AssignmentReviewerProjection;
203
230
  export type Artifact = {
204
231
  path: string;
205
232
  };
@@ -223,6 +250,7 @@ export type Plan = {
223
250
  };
224
251
  export type ExecutionProjection = {
225
252
  view: "execution";
253
+ featureRunId?: FeatureRunId | undefined;
226
254
  goal: string;
227
255
  plan: {
228
256
  summary: string;
@@ -262,76 +290,48 @@ export type PlanInput = {
262
290
  dependsOn?: FeatureId[] | undefined;
263
291
  }>;
264
292
  };
265
- export type CompletedWorkerOutcome = {
293
+ export type ExecutionOutcome = {
294
+ kind: "blocked";
295
+ summary: string;
296
+ resolutionHint?: string | undefined;
297
+ } | {
266
298
  kind: "completed";
267
299
  summary?: string | undefined;
268
300
  resolutionHint?: string | undefined;
269
301
  };
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
302
  export type ExecutionHistoryEntry = {
303
+ featureRunId: FeatureRunId;
305
304
  featureId: FeatureId;
306
- status: "completed" | "blocked" | "needs_input";
305
+ status: "completed" | "blocked";
307
306
  summary: string;
308
307
  recordedAt: string;
309
308
  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;
309
+ validationScope: ValidationScope;
310
+ validationEvidenceRefs: EvidenceId[];
311
+ reviewAssignmentIds: ReviewAssignmentId[];
312
+ outcome: ExecutionOutcome;
316
313
  orchestrationPasses: OrchestrationPassRecord[];
317
314
  };
318
315
  export type BudgetTelemetry = {
319
316
  reviewCount: number;
320
317
  failedReviewCount: number;
321
- failedReviewAttemptsByFeature: Record<string, number>;
318
+ failedReviewAttemptsByFeatureRun: Record<string, number>;
322
319
  reviewExecutions: ReviewExecution[];
323
320
  reviewLifecycle: ReviewLifecycleTelemetry;
324
321
  observedReviewWorkers: ObservedReviewWorkerLedger;
325
322
  orchestration: OrchestrationTelemetry;
326
323
  };
327
324
  export type Session = {
328
- version: 3;
325
+ version: 4;
329
326
  id: SessionId;
330
327
  goal: string;
331
328
  status: SessionStatus;
332
329
  approval: "pending" | "approved";
333
330
  plan: Plan | null;
334
331
  activeFeatureId: FeatureId | null;
332
+ activeFeatureRunId: FeatureRunId | null;
333
+ featureRuns: FeatureRun[];
334
+ reviewAssignments: ReviewAssignment[];
335
335
  history: ExecutionHistoryEntry[];
336
336
  budget: BudgetTelemetry;
337
337
  causal: CausalState;
@@ -339,6 +339,7 @@ export type Session = {
339
339
  kind: "completed" | "deferred" | "abandoned";
340
340
  summary: string;
341
341
  recordedAt: string;
342
+ retryOperationId: string;
342
343
  } | null;
343
344
  lastError: {
344
345
  tool: string;
@@ -1,9 +1,11 @@
1
- import type { CausalGuard, CausalMutationRecord, EvidenceRecord, ExecutionProjection, Feature, FeatureId, FeatureReviewDepth, PlanInput, ReviewExecution, ReviewExecutionFindingInput, ReviewExecutionInput, ReviewerProjection, ReviewerProjectionRequest, Session, SessionId, SnapshotId, WorkerResult } from "./session.js";
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
2
  export declare const MAX_EXECUTION_PROJECTION_BYTES: number;
3
+ export declare const MAX_REVIEWER_PROJECTION_BYTES = 3000;
3
4
  export type TransitionEnvironment = {
4
5
  now(): string;
5
6
  newSessionId(): SessionId;
6
7
  newOperationId?(revision: number): string;
8
+ newRuntimeId?(kind: "feature-run" | "review-assignment"): string;
7
9
  };
8
10
  export type TransitionResult<T> = {
9
11
  ok: true;
@@ -14,25 +16,59 @@ export type TransitionResult<T> = {
14
16
  recovery?: string;
15
17
  session?: Session;
16
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;
17
67
  export declare function canonicalOperationRequestDigest(kind: CausalMutationRecord["operationKind"], input: unknown): string;
18
68
  export declare function canonicalSessionSnapshotId(session: Session): SnapshotId;
19
69
  export declare function canonicalEvidenceId(evidence: EvidenceRecord): string;
20
70
  export declare function validateCausalChain(session: Session): string | null;
21
71
  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
72
  export declare function createSession(goal: string, environment: TransitionEnvironment): Session;
37
73
  export declare function applyPlan(session: Session, planInput: PlanInput, environment: TransitionEnvironment): TransitionResult<Session>;
38
74
  export declare function approvePlan(session: Session, environment: TransitionEnvironment): TransitionResult<Session>;
@@ -40,7 +76,12 @@ export declare function startRun(session: Session, environment: TransitionEnviro
40
76
  session: Session;
41
77
  feature: Feature;
42
78
  }>;
43
- export declare function completeFeature(session: Session, worker: WorkerResult, environment: TransitionEnvironment): TransitionResult<Session>;
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>;
44
85
  export declare function resetFeature(session: Session, featureId: FeatureId, environment: TransitionEnvironment, guard?: CausalGuard): TransitionResult<Session>;
45
86
  export declare function closeSession(session: Session, kind: "completed" | "deferred" | "abandoned", environment: TransitionEnvironment, summary?: string, guard?: CausalGuard): TransitionResult<Session>;
46
87
  export declare function serializedUtf8JsonBytes(value: unknown): number;
@@ -51,6 +92,7 @@ export declare function compactSessionProjection(session: Session): {
51
92
  approval: "approved" | "pending";
52
93
  revision: number;
53
94
  snapshotId: string;
95
+ featureRunId: string | null;
54
96
  feature: {
55
97
  id: FeatureId;
56
98
  status: import("./session.js").FeatureStatus;
@@ -66,6 +108,7 @@ export declare function compactSessionProjection(session: Session): {
66
108
  };
67
109
  closure: {
68
110
  kind: "abandoned" | "completed" | "deferred";
111
+ retryOperationId: string;
69
112
  } | null;
70
113
  nextAction: string;
71
114
  };
@@ -79,6 +122,7 @@ export declare function detailSessionProjection(session: Session): {
79
122
  approval: "approved" | "pending";
80
123
  revision: number;
81
124
  snapshotId: string;
125
+ featureRunId: string | null;
82
126
  feature: {
83
127
  id: FeatureId;
84
128
  status: import("./session.js").FeatureStatus;
@@ -94,9 +138,20 @@ export declare function detailSessionProjection(session: Session): {
94
138
  };
95
139
  closure: {
96
140
  kind: "abandoned" | "completed" | "deferred";
141
+ retryOperationId: string;
97
142
  } | null;
98
143
  nextAction: string;
99
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;
100
155
  plan: {
101
156
  summary: string;
102
157
  overview: string;
@@ -108,20 +163,55 @@ export declare function detailSessionProjection(session: Session): {
108
163
  title: string;
109
164
  summary: string;
110
165
  status: import("./session.js").FeatureStatus;
111
- reviewDepth: FeatureReviewDepth;
166
+ reviewDepth: import("./session.js").FeatureReviewDepth;
112
167
  targets: string[];
113
168
  dependsOn: FeatureId[];
114
169
  }[];
115
170
  } | null;
116
171
  history: {
172
+ featureRunId: string;
117
173
  featureId: FeatureId;
118
- status: "blocked" | "completed" | "needs_input";
174
+ status: "blocked" | "completed";
119
175
  summary: string;
120
176
  recordedAt: string;
177
+ validationScope: import("./session.js").ValidationScope;
121
178
  validation: {
122
- status: "failed" | "passed";
123
- summary: string;
179
+ evidenceId: string;
180
+ commandClass: import("./validation-command.js").ValidationCommandClass;
181
+ status: string;
182
+ completedAt: string;
124
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;
125
215
  }[];
126
216
  causal: {
127
217
  revision: number;
@@ -131,12 +221,15 @@ export declare function detailSessionProjection(session: Session): {
131
221
  };
132
222
  };
133
223
  export declare function reviewerSessionProjection(session: Session, request: ReviewerProjectionRequest): TransitionResult<ReviewerProjection>;
134
- export declare function mutationReceiptProjection(session: Session, warnings?: readonly string[], operationId?: string): {
224
+ export declare function mutationReceiptProjection(session: Session, warnings?: readonly string[], operationId?: string, operationKind?: CausalMutationRecord["operationKind"], acceptedWithoutMutation?: boolean): {
135
225
  view: "mutation_receipt";
136
226
  status: import("./session.js").SessionStatus;
227
+ operationAccepted: boolean;
228
+ operationIdConsumed: boolean;
137
229
  operationId: string | null;
138
230
  revision: number;
139
231
  snapshotId: string;
232
+ featureRunId: string | null;
140
233
  changedEntity: {
141
234
  kind: "session" | "plan" | "feature" | "review" | "evidence" | "closure";
142
235
  id: string;
@@ -150,6 +243,25 @@ export declare function mutationReceiptProjection(session: Session, warnings?: r
150
243
  warnings: string[];
151
244
  nextAction: string;
152
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
+ };
153
265
  export declare function causalDeltaProjection(session: Session, sinceRevision: number): TransitionResult<{
154
266
  view: "delta";
155
267
  changed: boolean;