effect-durable-agent-cloudflare 0.1.0-alpha.18 → 0.1.0-alpha.20

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,10 +1,9 @@
1
- import { a as SessionOutcomeInput, i as SessionGrantRunInput, n as SessionBlockInput, o as SessionScopedInput, r as SessionCommandInput, s as edaSessionRpc, t as SessionBatchInput } from "./rpc-spec-DZjBBd0T.js";
2
- import { i as EDASessionControllerOptions, l as EDAWebSocketProjection } from "./session-controller-xdQPy0NX.js";
1
+ import { a as SessionOutcomeInput, i as SessionGrantRunInput, n as SessionBlockInput, o as SessionScopedInput, r as SessionCommandInput, s as edaSessionRpc, t as SessionBatchInput } from "./rpc-spec-C8wknrbN.js";
2
+ import { i as EDASessionControllerOptions, l as EDAWebSocketProjection } from "./session-controller-DCvQY3nj.js";
3
3
  import * as Schema from "effect/Schema";
4
4
  import { CommittedDurableEvent } from "effect-durable-agent/services/session-store";
5
5
  import { EDARuntimeConfig } from "effect-durable-agent/services/runtime";
6
6
  import { DurableObject } from "cloudflare:workers";
7
-
8
7
  //#region src/durable-object.d.ts
9
8
  /** Internal Worker-to-object header selecting an app-owned WebSocket projection. */
10
9
  declare const EDA_WEB_SOCKET_PROJECTION_HEADER = "x-eda-websocket-projection";
@@ -76,67 +75,280 @@ declare const encodeEdaRpcCommittedDurableEvent: (entry: CommittedDurableEvent)
76
75
  /** Encode query snapshots without asserting that encoded command values are decoded classes. */
77
76
  declare const encodeEdaRpcSessionSnapshot: (input: {
78
77
  readonly state: {
79
- readonly messages: ReadonlyMap<string & import("effect/Brand").Brand<"MessageId">, {
80
- readonly _tag: "System";
81
- readonly content: string;
82
- readonly messageId: string & import("effect/Brand").Brand<"MessageId">;
83
- readonly seq: number & import("effect/Brand").Brand<"SequenceNumber">;
84
- readonly createdAtMs?: number | undefined;
85
- } | {
86
- readonly _tag: "User";
87
- readonly content: readonly [{
88
- readonly type: "text";
89
- readonly text: string;
90
- readonly "~effect/ai/Prompt/Part": "~effect/ai/Prompt/Part";
91
- readonly options: {
92
- readonly [x: string]: Schema.Json;
78
+ readonly runSchedulingRequest?: {
79
+ readonly requestId: string & import("effect/Brand").Brand<"RunRequestId">;
80
+ readonly work: {
81
+ readonly _tag: "Command";
82
+ readonly commandId: string & import("effect/Brand").Brand<"CommandId">;
83
+ } | {
84
+ readonly _tag: "Recovery";
85
+ readonly commandId: string & import("effect/Brand").Brand<"CommandId">;
86
+ readonly interruptedRunId: string & import("effect/Brand").Brand<"RunId">;
87
+ readonly inputMessageIds: readonly (string & import("effect/Brand").Brand<"MessageId">)[];
88
+ };
89
+ readonly requestedSeq: number & import("effect/Brand").Brand<"SequenceNumber">;
90
+ readonly deliveredSeq?: (number & import("effect/Brand").Brand<"SequenceNumber">) | undefined;
91
+ } | undefined;
92
+ readonly modelSelection?: {
93
+ readonly provider: string;
94
+ readonly modelId: string;
95
+ readonly settings?: unknown;
96
+ } | undefined;
97
+ readonly lastSeq: number & import("effect/Brand").Brand<"SequenceNumber">;
98
+ readonly commands: ReadonlyMap<string & import("effect/Brand").Brand<"CommandId">, {
99
+ readonly admittedSeq?: (number & import("effect/Brand").Brand<"SequenceNumber">) | undefined;
100
+ readonly admissionTrace?: {
101
+ readonly span: {
102
+ readonly traceId: string & import("effect/Brand").Brand<"EDATraceId">;
103
+ readonly spanId: string & import("effect/Brand").Brand<"EDASpanId">;
104
+ readonly sampled: boolean;
105
+ readonly tracestate: string | null;
93
106
  };
94
- }, ...{
95
- readonly type: "text";
96
- readonly text: string;
97
- readonly "~effect/ai/Prompt/Part": "~effect/ai/Prompt/Part";
98
- readonly options: {
99
- readonly [x: string]: Schema.Json;
107
+ readonly links: readonly {
108
+ readonly context: {
109
+ readonly traceId: string & import("effect/Brand").Brand<"EDATraceId">;
110
+ readonly spanId: string & import("effect/Brand").Brand<"EDASpanId">;
111
+ readonly sampled: boolean;
112
+ readonly tracestate: string | null;
113
+ };
114
+ readonly attributes: {
115
+ readonly [x: string]: string | number | boolean;
116
+ };
117
+ }[];
118
+ } | undefined;
119
+ readonly command?: import("effect-durable-agent/types/commands").CancelPendingMessageCommand | import("effect-durable-agent/types/commands").PromotePendingMessageCommand | import("effect-durable-agent/types/commands").ResumePendingMessagesCommand | import("effect-durable-agent/types/commands").StopTurnCommand | import("effect-durable-agent/types/commands").SubmitMessageCommand | undefined;
120
+ readonly commandId: string & import("effect/Brand").Brand<"CommandId">;
121
+ readonly startedSeq?: (number & import("effect/Brand").Brand<"SequenceNumber">) | undefined;
122
+ readonly terminal?: {
123
+ readonly _tag: "Completed";
124
+ readonly seq: number & import("effect/Brand").Brand<"SequenceNumber">;
125
+ } | {
126
+ readonly _tag: "Failed";
127
+ readonly error: {
128
+ readonly message: string;
129
+ readonly code?: string | undefined;
130
+ readonly details?: unknown;
100
131
  };
101
- }[]] | readonly [{
102
- readonly type: "text";
103
- readonly text: string;
104
- readonly "~effect/ai/Prompt/Part": "~effect/ai/Prompt/Part";
105
- readonly options: {
106
- readonly [x: string]: Schema.Json;
132
+ readonly seq: number & import("effect/Brand").Brand<"SequenceNumber">;
133
+ } | {
134
+ readonly _tag: "Cancelled";
135
+ readonly reason: string;
136
+ readonly seq: number & import("effect/Brand").Brand<"SequenceNumber">;
137
+ } | undefined;
138
+ }>;
139
+ readonly runs: ReadonlyMap<string & import("effect/Brand").Brand<"RunId">, {
140
+ readonly durationMs?: number | undefined;
141
+ readonly startedAtMs?: number | undefined;
142
+ readonly terminalAtMs?: number | undefined;
143
+ readonly modelSelection?: {
144
+ readonly provider: string;
145
+ readonly modelId: string;
146
+ readonly settings?: unknown;
147
+ } | undefined;
148
+ readonly commandIds: readonly (string & import("effect/Brand").Brand<"CommandId">)[];
149
+ readonly runId: string & import("effect/Brand").Brand<"RunId">;
150
+ readonly startedSeq: number & import("effect/Brand").Brand<"SequenceNumber">;
151
+ readonly terminal?: {
152
+ readonly _tag: "Completed";
153
+ readonly seq: number & import("effect/Brand").Brand<"SequenceNumber">;
154
+ } | {
155
+ readonly _tag: "Failed";
156
+ readonly error: {
157
+ readonly message: string;
158
+ readonly code?: string | undefined;
159
+ readonly details?: unknown;
107
160
  };
161
+ readonly seq: number & import("effect/Brand").Brand<"SequenceNumber">;
108
162
  } | {
109
- readonly type: "file";
110
- readonly "~effect/ai/Prompt/Part": "~effect/ai/Prompt/Part";
111
- readonly options: {
112
- readonly [x: string]: Schema.Json;
163
+ readonly _tag: "Interrupted";
164
+ readonly reason: string;
165
+ readonly seq: number & import("effect/Brand").Brand<"SequenceNumber">;
166
+ } | undefined;
167
+ readonly trace: {
168
+ readonly root: {
169
+ readonly traceId: string & import("effect/Brand").Brand<"EDATraceId">;
170
+ readonly spanId: string & import("effect/Brand").Brand<"EDASpanId">;
171
+ readonly sampled: boolean;
172
+ readonly tracestate: string | null;
113
173
  };
114
- readonly mediaType: string;
115
- readonly data: string | URL | Uint8Array<ArrayBufferLike>;
116
- readonly fileName?: string | undefined;
117
- }, ...({
118
- readonly type: "text";
119
- readonly text: string;
120
- readonly "~effect/ai/Prompt/Part": "~effect/ai/Prompt/Part";
121
- readonly options: {
122
- readonly [x: string]: Schema.Json;
174
+ readonly links: readonly {
175
+ readonly context: {
176
+ readonly traceId: string & import("effect/Brand").Brand<"EDATraceId">;
177
+ readonly spanId: string & import("effect/Brand").Brand<"EDASpanId">;
178
+ readonly sampled: boolean;
179
+ readonly tracestate: string | null;
180
+ };
181
+ readonly attributes: {
182
+ readonly [x: string]: string | number | boolean;
183
+ };
184
+ }[];
185
+ };
186
+ }>;
187
+ readonly recoveryContinuations: ReadonlyMap<string & import("effect/Brand").Brand<"RunId">, {
188
+ readonly seq: number & import("effect/Brand").Brand<"SequenceNumber">;
189
+ readonly commandId: string & import("effect/Brand").Brand<"CommandId">;
190
+ readonly interruptedRunId: string & import("effect/Brand").Brand<"RunId">;
191
+ readonly replacementRunId: string & import("effect/Brand").Brand<"RunId">;
192
+ }>;
193
+ readonly turns: ReadonlyMap<string & import("effect/Brand").Brand<"TurnId">, {
194
+ readonly durationMs?: number | undefined;
195
+ readonly startedAtMs?: number | undefined;
196
+ readonly terminalAtMs?: number | undefined;
197
+ readonly runId: string & import("effect/Brand").Brand<"RunId">;
198
+ readonly startedSeq: number & import("effect/Brand").Brand<"SequenceNumber">;
199
+ readonly terminal?: {
200
+ readonly _tag: "Completed";
201
+ readonly seq: number & import("effect/Brand").Brand<"SequenceNumber">;
202
+ readonly usage?: {
203
+ readonly inputTokens?: number | undefined;
204
+ readonly cachedInputTokens?: number | undefined;
205
+ readonly cacheWriteInputTokens?: number | undefined;
206
+ readonly outputTokens?: number | undefined;
207
+ readonly textTokens?: number | undefined;
208
+ readonly reasoningTokens?: number | undefined;
209
+ } | undefined;
210
+ } | {
211
+ readonly _tag: "Failed";
212
+ readonly error: {
213
+ readonly message: string;
214
+ readonly code?: string | undefined;
215
+ readonly details?: unknown;
123
216
  };
217
+ readonly seq: number & import("effect/Brand").Brand<"SequenceNumber">;
124
218
  } | {
125
- readonly type: "file";
126
- readonly "~effect/ai/Prompt/Part": "~effect/ai/Prompt/Part";
127
- readonly options: {
128
- readonly [x: string]: Schema.Json;
219
+ readonly _tag: "Stopped";
220
+ readonly reason: string;
221
+ readonly seq: number & import("effect/Brand").Brand<"SequenceNumber">;
222
+ } | undefined;
223
+ readonly turnId: string & import("effect/Brand").Brand<"TurnId">;
224
+ }>;
225
+ readonly inferences: ReadonlyMap<string & import("effect/Brand").Brand<"InferenceId">, {
226
+ readonly durationMs?: number | undefined;
227
+ readonly startedAtMs?: number | undefined;
228
+ readonly terminalAtMs?: number | undefined;
229
+ readonly inferenceId: string & import("effect/Brand").Brand<"InferenceId">;
230
+ readonly runId: string & import("effect/Brand").Brand<"RunId">;
231
+ readonly startedSeq: number & import("effect/Brand").Brand<"SequenceNumber">;
232
+ readonly terminal?: {
233
+ readonly _tag: "Completed";
234
+ readonly seq: number & import("effect/Brand").Brand<"SequenceNumber">;
235
+ readonly usage?: {
236
+ readonly inputTokens?: number | undefined;
237
+ readonly cachedInputTokens?: number | undefined;
238
+ readonly cacheWriteInputTokens?: number | undefined;
239
+ readonly outputTokens?: number | undefined;
240
+ readonly textTokens?: number | undefined;
241
+ readonly reasoningTokens?: number | undefined;
242
+ } | undefined;
243
+ } | {
244
+ readonly _tag: "Failed";
245
+ readonly error: {
246
+ readonly message: string;
247
+ readonly code?: string | undefined;
248
+ readonly details?: unknown;
129
249
  };
130
- readonly mediaType: string;
131
- readonly data: string | URL | Uint8Array<ArrayBufferLike>;
132
- readonly fileName?: string | undefined;
133
- })[]];
134
- readonly commandId: string & import("effect/Brand").Brand<"CommandId">;
250
+ readonly seq: number & import("effect/Brand").Brand<"SequenceNumber">;
251
+ } | undefined;
252
+ readonly turnId: string & import("effect/Brand").Brand<"TurnId">;
253
+ }>;
254
+ readonly toolCalls: ReadonlyMap<string & import("effect/Brand").Brand<"ToolCallId">, {
255
+ readonly durationMs?: number | undefined;
256
+ readonly startedAtMs?: number | undefined;
257
+ readonly terminalAtMs?: number | undefined;
258
+ readonly decision?: {
259
+ readonly _tag: "Created";
260
+ readonly inferenceId: string & import("effect/Brand").Brand<"InferenceId">;
261
+ readonly params: unknown;
262
+ readonly promptPart?: {
263
+ readonly type: "tool-call";
264
+ readonly id: string;
265
+ readonly name: string;
266
+ readonly params: unknown;
267
+ readonly providerExecuted: boolean;
268
+ readonly "~effect/ai/Prompt/Part": "~effect/ai/Prompt/Part";
269
+ readonly options: {
270
+ readonly [x: string]: Schema.Json;
271
+ };
272
+ } | undefined;
273
+ readonly providerExecuted: boolean;
274
+ readonly providerPartId: string & import("effect/Brand").Brand<"ProviderPartId">;
275
+ readonly runId: string & import("effect/Brand").Brand<"RunId">;
276
+ readonly seq: number & import("effect/Brand").Brand<"SequenceNumber">;
277
+ readonly toolName: string;
278
+ readonly turnId: string & import("effect/Brand").Brand<"TurnId">;
279
+ } | {
280
+ readonly _tag: "Rejected";
281
+ readonly inferenceId: string & import("effect/Brand").Brand<"InferenceId">;
282
+ readonly modelFeedback: string;
283
+ readonly promptPart?: {
284
+ readonly type: "tool-result";
285
+ readonly id: string;
286
+ readonly name: string;
287
+ readonly isFailure: boolean;
288
+ readonly result: unknown;
289
+ readonly providerExecuted: boolean;
290
+ readonly "~effect/ai/Prompt/Part": "~effect/ai/Prompt/Part";
291
+ readonly options: {
292
+ readonly [x: string]: Schema.Json;
293
+ };
294
+ } | undefined;
295
+ readonly providerPartId: string & import("effect/Brand").Brand<"ProviderPartId">;
296
+ readonly reason: "invalid-params" | "unknown-tool";
297
+ readonly runId: string & import("effect/Brand").Brand<"RunId">;
298
+ readonly seq: number & import("effect/Brand").Brand<"SequenceNumber">;
299
+ readonly toolName: string;
300
+ readonly turnId: string & import("effect/Brand").Brand<"TurnId">;
301
+ } | undefined;
302
+ readonly startedSeq?: (number & import("effect/Brand").Brand<"SequenceNumber">) | undefined;
303
+ readonly terminal?: {
304
+ readonly _tag: "Completed";
305
+ readonly promptPart?: {
306
+ readonly type: "tool-result";
307
+ readonly id: string;
308
+ readonly name: string;
309
+ readonly isFailure: boolean;
310
+ readonly result: unknown;
311
+ readonly providerExecuted: boolean;
312
+ readonly "~effect/ai/Prompt/Part": "~effect/ai/Prompt/Part";
313
+ readonly options: {
314
+ readonly [x: string]: Schema.Json;
315
+ };
316
+ } | undefined;
317
+ readonly result: unknown;
318
+ readonly seq: number & import("effect/Brand").Brand<"SequenceNumber">;
319
+ } | {
320
+ readonly _tag: "Failed";
321
+ readonly error: {
322
+ readonly message: string;
323
+ readonly code?: string | undefined;
324
+ readonly details?: unknown;
325
+ };
326
+ readonly promptPart?: {
327
+ readonly type: "tool-result";
328
+ readonly id: string;
329
+ readonly name: string;
330
+ readonly isFailure: boolean;
331
+ readonly result: unknown;
332
+ readonly providerExecuted: boolean;
333
+ readonly "~effect/ai/Prompt/Part": "~effect/ai/Prompt/Part";
334
+ readonly options: {
335
+ readonly [x: string]: Schema.Json;
336
+ };
337
+ } | undefined;
338
+ readonly seq: number & import("effect/Brand").Brand<"SequenceNumber">;
339
+ } | undefined;
340
+ readonly toolCallId: string & import("effect/Brand").Brand<"ToolCallId">;
341
+ }>;
342
+ readonly messages: ReadonlyMap<string & import("effect/Brand").Brand<"MessageId">, {
343
+ readonly createdAtMs?: number | undefined;
135
344
  readonly messageId: string & import("effect/Brand").Brand<"MessageId">;
136
345
  readonly seq: number & import("effect/Brand").Brand<"SequenceNumber">;
346
+ readonly _tag: "System";
347
+ readonly content: string;
348
+ } | {
137
349
  readonly createdAtMs?: number | undefined;
138
- readonly disposition?: "queue" | "steer" | undefined;
139
- readonly requestedDisposition?: "queue" | "steer" | undefined;
350
+ readonly messageId: string & import("effect/Brand").Brand<"MessageId">;
351
+ readonly seq: number & import("effect/Brand").Brand<"SequenceNumber">;
140
352
  readonly cancellationReason?: string | undefined;
141
353
  readonly cancelledByCommandId?: (string & import("effect/Brand").Brand<"CommandId">) | undefined;
142
354
  readonly cancelledSeq?: (number & import("effect/Brand").Brand<"SequenceNumber">) | undefined;
@@ -145,8 +357,8 @@ declare const encodeEdaRpcSessionSnapshot: (input: {
145
357
  readonly pausedByCommandId?: (string & import("effect/Brand").Brand<"CommandId">) | undefined;
146
358
  readonly pausedSeq?: (number & import("effect/Brand").Brand<"SequenceNumber">) | undefined;
147
359
  readonly promotedSeq?: (number & import("effect/Brand").Brand<"SequenceNumber">) | undefined;
148
- } | {
149
- readonly _tag: "Steering";
360
+ readonly _tag: "User";
361
+ readonly commandId: string & import("effect/Brand").Brand<"CommandId">;
150
362
  readonly content: readonly [{
151
363
  readonly type: "text";
152
364
  readonly text: string;
@@ -170,13 +382,13 @@ declare const encodeEdaRpcSessionSnapshot: (input: {
170
382
  };
171
383
  } | {
172
384
  readonly type: "file";
385
+ readonly mediaType: string;
386
+ readonly fileName?: string | undefined;
387
+ readonly data: string | URL | Uint8Array<ArrayBufferLike>;
173
388
  readonly "~effect/ai/Prompt/Part": "~effect/ai/Prompt/Part";
174
389
  readonly options: {
175
390
  readonly [x: string]: Schema.Json;
176
391
  };
177
- readonly mediaType: string;
178
- readonly data: string | URL | Uint8Array<ArrayBufferLike>;
179
- readonly fileName?: string | undefined;
180
392
  }, ...({
181
393
  readonly type: "text";
182
394
  readonly text: string;
@@ -186,19 +398,20 @@ declare const encodeEdaRpcSessionSnapshot: (input: {
186
398
  };
187
399
  } | {
188
400
  readonly type: "file";
401
+ readonly mediaType: string;
402
+ readonly fileName?: string | undefined;
403
+ readonly data: string | URL | Uint8Array<ArrayBufferLike>;
189
404
  readonly "~effect/ai/Prompt/Part": "~effect/ai/Prompt/Part";
190
405
  readonly options: {
191
406
  readonly [x: string]: Schema.Json;
192
407
  };
193
- readonly mediaType: string;
194
- readonly data: string | URL | Uint8Array<ArrayBufferLike>;
195
- readonly fileName?: string | undefined;
196
408
  })[]];
197
- readonly commandId: string & import("effect/Brand").Brand<"CommandId">;
409
+ readonly disposition?: "queue" | "steer" | undefined;
410
+ readonly requestedDisposition?: "queue" | "steer" | undefined;
411
+ } | {
412
+ readonly createdAtMs?: number | undefined;
198
413
  readonly messageId: string & import("effect/Brand").Brand<"MessageId">;
199
414
  readonly seq: number & import("effect/Brand").Brand<"SequenceNumber">;
200
- readonly runId: string & import("effect/Brand").Brand<"RunId">;
201
- readonly createdAtMs?: number | undefined;
202
415
  readonly cancellationReason?: string | undefined;
203
416
  readonly cancelledByCommandId?: (string & import("effect/Brand").Brand<"CommandId">) | undefined;
204
417
  readonly cancelledSeq?: (number & import("effect/Brand").Brand<"SequenceNumber">) | undefined;
@@ -207,84 +420,67 @@ declare const encodeEdaRpcSessionSnapshot: (input: {
207
420
  readonly pausedByCommandId?: (string & import("effect/Brand").Brand<"CommandId">) | undefined;
208
421
  readonly pausedSeq?: (number & import("effect/Brand").Brand<"SequenceNumber">) | undefined;
209
422
  readonly promotedSeq?: (number & import("effect/Brand").Brand<"SequenceNumber">) | undefined;
210
- } | {
211
- readonly _tag: "Assistant";
212
- readonly content: {
213
- readonly text: string;
214
- readonly reasoning?: string | undefined;
215
- };
216
- readonly messageId: string & import("effect/Brand").Brand<"MessageId">;
217
- readonly seq: number & import("effect/Brand").Brand<"SequenceNumber">;
218
- readonly runId: string & import("effect/Brand").Brand<"RunId">;
219
- readonly inferenceId: string & import("effect/Brand").Brand<"InferenceId">;
220
- readonly turnId: string & import("effect/Brand").Brand<"TurnId">;
221
- readonly createdAtMs?: number | undefined;
222
- readonly imported?: true | undefined;
223
- readonly promptParts?: readonly ({
423
+ readonly _tag: "Steering";
424
+ readonly commandId: string & import("effect/Brand").Brand<"CommandId">;
425
+ readonly content: readonly [{
224
426
  readonly type: "text";
225
427
  readonly text: string;
226
428
  readonly "~effect/ai/Prompt/Part": "~effect/ai/Prompt/Part";
227
429
  readonly options: {
228
430
  readonly [x: string]: Schema.Json;
229
431
  };
230
- } | {
231
- readonly type: "file";
432
+ }, ...{
433
+ readonly type: "text";
434
+ readonly text: string;
232
435
  readonly "~effect/ai/Prompt/Part": "~effect/ai/Prompt/Part";
233
436
  readonly options: {
234
437
  readonly [x: string]: Schema.Json;
235
438
  };
236
- readonly mediaType: string;
237
- readonly data: string | URL | Uint8Array<ArrayBufferLike>;
238
- readonly fileName?: string | undefined;
239
- } | {
240
- readonly type: "reasoning";
439
+ }[]] | readonly [{
440
+ readonly type: "text";
241
441
  readonly text: string;
242
442
  readonly "~effect/ai/Prompt/Part": "~effect/ai/Prompt/Part";
243
443
  readonly options: {
244
444
  readonly [x: string]: Schema.Json;
245
445
  };
246
446
  } | {
247
- readonly type: "tool-call";
248
- readonly id: string;
249
- readonly name: string;
250
- readonly params: unknown;
251
- readonly providerExecuted: boolean;
447
+ readonly type: "file";
448
+ readonly mediaType: string;
449
+ readonly fileName?: string | undefined;
450
+ readonly data: string | URL | Uint8Array<ArrayBufferLike>;
252
451
  readonly "~effect/ai/Prompt/Part": "~effect/ai/Prompt/Part";
253
452
  readonly options: {
254
453
  readonly [x: string]: Schema.Json;
255
454
  };
256
- } | {
257
- readonly type: "tool-result";
258
- readonly id: string;
259
- readonly name: string;
260
- readonly isFailure: boolean;
261
- readonly result: unknown;
455
+ }, ...({
456
+ readonly type: "text";
457
+ readonly text: string;
262
458
  readonly "~effect/ai/Prompt/Part": "~effect/ai/Prompt/Part";
263
459
  readonly options: {
264
460
  readonly [x: string]: Schema.Json;
265
461
  };
266
462
  } | {
267
- readonly type: "tool-approval-request";
268
- readonly approvalId: string;
269
- readonly toolCallId: string;
463
+ readonly type: "file";
464
+ readonly mediaType: string;
465
+ readonly fileName?: string | undefined;
466
+ readonly data: string | URL | Uint8Array<ArrayBufferLike>;
270
467
  readonly "~effect/ai/Prompt/Part": "~effect/ai/Prompt/Part";
271
468
  readonly options: {
272
469
  readonly [x: string]: Schema.Json;
273
470
  };
274
- })[] | undefined;
471
+ })[]];
472
+ readonly runId: string & import("effect/Brand").Brand<"RunId">;
275
473
  } | {
276
- readonly _tag: "AssistantPartial";
474
+ readonly createdAtMs?: number | undefined;
475
+ readonly messageId: string & import("effect/Brand").Brand<"MessageId">;
476
+ readonly seq: number & import("effect/Brand").Brand<"SequenceNumber">;
477
+ readonly _tag: "Assistant";
277
478
  readonly content: {
278
479
  readonly text: string;
279
480
  readonly reasoning?: string | undefined;
280
481
  };
281
- readonly messageId: string & import("effect/Brand").Brand<"MessageId">;
282
- readonly reason: string;
283
- readonly seq: number & import("effect/Brand").Brand<"SequenceNumber">;
284
- readonly runId: string & import("effect/Brand").Brand<"RunId">;
482
+ readonly imported?: true | undefined;
285
483
  readonly inferenceId: string & import("effect/Brand").Brand<"InferenceId">;
286
- readonly turnId: string & import("effect/Brand").Brand<"TurnId">;
287
- readonly createdAtMs?: number | undefined;
288
484
  readonly promptParts?: readonly ({
289
485
  readonly type: "text";
290
486
  readonly text: string;
@@ -294,13 +490,13 @@ declare const encodeEdaRpcSessionSnapshot: (input: {
294
490
  };
295
491
  } | {
296
492
  readonly type: "file";
493
+ readonly mediaType: string;
494
+ readonly fileName?: string | undefined;
495
+ readonly data: string | URL | Uint8Array<ArrayBufferLike>;
297
496
  readonly "~effect/ai/Prompt/Part": "~effect/ai/Prompt/Part";
298
497
  readonly options: {
299
498
  readonly [x: string]: Schema.Json;
300
499
  };
301
- readonly mediaType: string;
302
- readonly data: string | URL | Uint8Array<ArrayBufferLike>;
303
- readonly fileName?: string | undefined;
304
500
  } | {
305
501
  readonly type: "reasoning";
306
502
  readonly text: string;
@@ -324,6 +520,7 @@ declare const encodeEdaRpcSessionSnapshot: (input: {
324
520
  readonly name: string;
325
521
  readonly isFailure: boolean;
326
522
  readonly result: unknown;
523
+ readonly providerExecuted: boolean;
327
524
  readonly "~effect/ai/Prompt/Part": "~effect/ai/Prompt/Part";
328
525
  readonly options: {
329
526
  readonly [x: string]: Schema.Json;
@@ -332,253 +529,79 @@ declare const encodeEdaRpcSessionSnapshot: (input: {
332
529
  readonly type: "tool-approval-request";
333
530
  readonly approvalId: string;
334
531
  readonly toolCallId: string;
335
- readonly "~effect/ai/Prompt/Part": "~effect/ai/Prompt/Part";
336
- readonly options: {
337
- readonly [x: string]: Schema.Json;
338
- };
339
- })[] | undefined;
340
- }>;
341
- readonly lastSeq: number & import("effect/Brand").Brand<"SequenceNumber">;
342
- readonly commands: ReadonlyMap<string & import("effect/Brand").Brand<"CommandId">, {
343
- readonly commandId: string & import("effect/Brand").Brand<"CommandId">;
344
- readonly command?: import("effect-durable-agent/types/commands").SubmitMessageCommand | import("effect-durable-agent/types/commands").StopTurnCommand | import("effect-durable-agent/types/commands").CancelPendingMessageCommand | import("effect-durable-agent/types/commands").PromotePendingMessageCommand | import("effect-durable-agent/types/commands").ResumePendingMessagesCommand | undefined;
345
- readonly admittedSeq?: (number & import("effect/Brand").Brand<"SequenceNumber">) | undefined;
346
- readonly admissionTrace?: {
347
- readonly span: {
348
- readonly traceId: string & import("effect/Brand").Brand<"EDATraceId">;
349
- readonly spanId: string & import("effect/Brand").Brand<"EDASpanId">;
350
- readonly sampled: boolean;
351
- readonly tracestate: string | null;
352
- };
353
- readonly links: readonly {
354
- readonly context: {
355
- readonly traceId: string & import("effect/Brand").Brand<"EDATraceId">;
356
- readonly spanId: string & import("effect/Brand").Brand<"EDASpanId">;
357
- readonly sampled: boolean;
358
- readonly tracestate: string | null;
359
- };
360
- readonly attributes: {
361
- readonly [x: string]: string | number | boolean;
362
- };
363
- }[];
364
- } | undefined;
365
- readonly startedSeq?: (number & import("effect/Brand").Brand<"SequenceNumber">) | undefined;
366
- readonly terminal?: {
367
- readonly _tag: "Completed";
368
- readonly seq: number & import("effect/Brand").Brand<"SequenceNumber">;
369
- } | {
370
- readonly _tag: "Failed";
371
- readonly error: {
372
- readonly message: string;
373
- readonly code?: string | undefined;
374
- readonly details?: unknown;
375
- };
376
- readonly seq: number & import("effect/Brand").Brand<"SequenceNumber">;
377
- } | {
378
- readonly _tag: "Cancelled";
379
- readonly reason: string;
380
- readonly seq: number & import("effect/Brand").Brand<"SequenceNumber">;
381
- } | undefined;
382
- }>;
383
- readonly runs: ReadonlyMap<string & import("effect/Brand").Brand<"RunId">, {
384
- readonly trace: {
385
- readonly root: {
386
- readonly traceId: string & import("effect/Brand").Brand<"EDATraceId">;
387
- readonly spanId: string & import("effect/Brand").Brand<"EDASpanId">;
388
- readonly sampled: boolean;
389
- readonly tracestate: string | null;
390
- };
391
- readonly links: readonly {
392
- readonly context: {
393
- readonly traceId: string & import("effect/Brand").Brand<"EDATraceId">;
394
- readonly spanId: string & import("effect/Brand").Brand<"EDASpanId">;
395
- readonly sampled: boolean;
396
- readonly tracestate: string | null;
397
- };
398
- readonly attributes: {
399
- readonly [x: string]: string | number | boolean;
400
- };
401
- }[];
402
- };
403
- readonly runId: string & import("effect/Brand").Brand<"RunId">;
404
- readonly startedSeq: number & import("effect/Brand").Brand<"SequenceNumber">;
405
- readonly commandIds: readonly (string & import("effect/Brand").Brand<"CommandId">)[];
406
- readonly modelSelection?: {
407
- readonly provider: string;
408
- readonly modelId: string;
409
- readonly settings?: unknown;
410
- } | undefined;
411
- readonly terminal?: {
412
- readonly _tag: "Completed";
413
- readonly seq: number & import("effect/Brand").Brand<"SequenceNumber">;
414
- } | {
415
- readonly _tag: "Failed";
416
- readonly error: {
417
- readonly message: string;
418
- readonly code?: string | undefined;
419
- readonly details?: unknown;
420
- };
421
- readonly seq: number & import("effect/Brand").Brand<"SequenceNumber">;
422
- } | {
423
- readonly _tag: "Interrupted";
424
- readonly reason: string;
425
- readonly seq: number & import("effect/Brand").Brand<"SequenceNumber">;
426
- } | undefined;
427
- readonly durationMs?: number | undefined;
428
- readonly startedAtMs?: number | undefined;
429
- readonly terminalAtMs?: number | undefined;
430
- }>;
431
- readonly recoveryContinuations: ReadonlyMap<string & import("effect/Brand").Brand<"RunId">, {
432
- readonly seq: number & import("effect/Brand").Brand<"SequenceNumber">;
433
- readonly commandId: string & import("effect/Brand").Brand<"CommandId">;
434
- readonly interruptedRunId: string & import("effect/Brand").Brand<"RunId">;
435
- readonly replacementRunId: string & import("effect/Brand").Brand<"RunId">;
436
- }>;
437
- readonly turns: ReadonlyMap<string & import("effect/Brand").Brand<"TurnId">, {
438
- readonly runId: string & import("effect/Brand").Brand<"RunId">;
439
- readonly turnId: string & import("effect/Brand").Brand<"TurnId">;
440
- readonly startedSeq: number & import("effect/Brand").Brand<"SequenceNumber">;
441
- readonly terminal?: {
442
- readonly _tag: "Completed";
443
- readonly seq: number & import("effect/Brand").Brand<"SequenceNumber">;
444
- readonly usage?: {
445
- readonly inputTokens?: number | undefined;
446
- readonly cachedInputTokens?: number | undefined;
447
- readonly cacheWriteInputTokens?: number | undefined;
448
- readonly outputTokens?: number | undefined;
449
- readonly textTokens?: number | undefined;
450
- readonly reasoningTokens?: number | undefined;
451
- } | undefined;
452
- } | {
453
- readonly _tag: "Failed";
454
- readonly error: {
455
- readonly message: string;
456
- readonly code?: string | undefined;
457
- readonly details?: unknown;
458
- };
459
- readonly seq: number & import("effect/Brand").Brand<"SequenceNumber">;
460
- } | {
461
- readonly _tag: "Stopped";
462
- readonly reason: string;
463
- readonly seq: number & import("effect/Brand").Brand<"SequenceNumber">;
464
- } | undefined;
465
- readonly durationMs?: number | undefined;
466
- readonly startedAtMs?: number | undefined;
467
- readonly terminalAtMs?: number | undefined;
468
- }>;
469
- readonly inferences: ReadonlyMap<string & import("effect/Brand").Brand<"InferenceId">, {
532
+ readonly "~effect/ai/Prompt/Part": "~effect/ai/Prompt/Part";
533
+ readonly options: {
534
+ readonly [x: string]: Schema.Json;
535
+ };
536
+ })[] | undefined;
470
537
  readonly runId: string & import("effect/Brand").Brand<"RunId">;
471
- readonly inferenceId: string & import("effect/Brand").Brand<"InferenceId">;
472
538
  readonly turnId: string & import("effect/Brand").Brand<"TurnId">;
473
- readonly startedSeq: number & import("effect/Brand").Brand<"SequenceNumber">;
474
- readonly terminal?: {
475
- readonly _tag: "Completed";
476
- readonly seq: number & import("effect/Brand").Brand<"SequenceNumber">;
477
- readonly usage?: {
478
- readonly inputTokens?: number | undefined;
479
- readonly cachedInputTokens?: number | undefined;
480
- readonly cacheWriteInputTokens?: number | undefined;
481
- readonly outputTokens?: number | undefined;
482
- readonly textTokens?: number | undefined;
483
- readonly reasoningTokens?: number | undefined;
484
- } | undefined;
539
+ } | {
540
+ readonly createdAtMs?: number | undefined;
541
+ readonly messageId: string & import("effect/Brand").Brand<"MessageId">;
542
+ readonly seq: number & import("effect/Brand").Brand<"SequenceNumber">;
543
+ readonly _tag: "AssistantPartial";
544
+ readonly content: {
545
+ readonly text: string;
546
+ readonly reasoning?: string | undefined;
547
+ };
548
+ readonly inferenceId: string & import("effect/Brand").Brand<"InferenceId">;
549
+ readonly promptParts?: readonly ({
550
+ readonly type: "text";
551
+ readonly text: string;
552
+ readonly "~effect/ai/Prompt/Part": "~effect/ai/Prompt/Part";
553
+ readonly options: {
554
+ readonly [x: string]: Schema.Json;
555
+ };
485
556
  } | {
486
- readonly _tag: "Failed";
487
- readonly error: {
488
- readonly message: string;
489
- readonly code?: string | undefined;
490
- readonly details?: unknown;
557
+ readonly type: "file";
558
+ readonly mediaType: string;
559
+ readonly fileName?: string | undefined;
560
+ readonly data: string | URL | Uint8Array<ArrayBufferLike>;
561
+ readonly "~effect/ai/Prompt/Part": "~effect/ai/Prompt/Part";
562
+ readonly options: {
563
+ readonly [x: string]: Schema.Json;
491
564
  };
492
- readonly seq: number & import("effect/Brand").Brand<"SequenceNumber">;
493
- } | undefined;
494
- readonly durationMs?: number | undefined;
495
- readonly startedAtMs?: number | undefined;
496
- readonly terminalAtMs?: number | undefined;
497
- }>;
498
- readonly toolCalls: ReadonlyMap<string & import("effect/Brand").Brand<"ToolCallId">, {
499
- readonly toolCallId: string & import("effect/Brand").Brand<"ToolCallId">;
500
- readonly startedSeq?: (number & import("effect/Brand").Brand<"SequenceNumber">) | undefined;
501
- readonly terminal?: {
502
- readonly _tag: "Completed";
503
- readonly seq: number & import("effect/Brand").Brand<"SequenceNumber">;
504
- readonly result: unknown;
505
- readonly promptPart?: {
506
- readonly type: "tool-result";
507
- readonly id: string;
508
- readonly name: string;
509
- readonly isFailure: boolean;
510
- readonly result: unknown;
511
- readonly "~effect/ai/Prompt/Part": "~effect/ai/Prompt/Part";
512
- readonly options: {
513
- readonly [x: string]: Schema.Json;
514
- };
515
- } | undefined;
516
565
  } | {
517
- readonly _tag: "Failed";
518
- readonly seq: number & import("effect/Brand").Brand<"SequenceNumber">;
519
- readonly error: {
520
- readonly message: string;
521
- readonly code?: string | undefined;
522
- readonly details?: unknown;
566
+ readonly type: "reasoning";
567
+ readonly text: string;
568
+ readonly "~effect/ai/Prompt/Part": "~effect/ai/Prompt/Part";
569
+ readonly options: {
570
+ readonly [x: string]: Schema.Json;
523
571
  };
524
- readonly promptPart?: {
525
- readonly type: "tool-result";
526
- readonly id: string;
527
- readonly name: string;
528
- readonly isFailure: boolean;
529
- readonly result: unknown;
530
- readonly "~effect/ai/Prompt/Part": "~effect/ai/Prompt/Part";
531
- readonly options: {
532
- readonly [x: string]: Schema.Json;
533
- };
534
- } | undefined;
535
- } | undefined;
536
- readonly durationMs?: number | undefined;
537
- readonly startedAtMs?: number | undefined;
538
- readonly terminalAtMs?: number | undefined;
539
- readonly decision?: {
540
- readonly _tag: "Created";
541
- readonly seq: number & import("effect/Brand").Brand<"SequenceNumber">;
542
- readonly runId: string & import("effect/Brand").Brand<"RunId">;
543
- readonly inferenceId: string & import("effect/Brand").Brand<"InferenceId">;
544
- readonly turnId: string & import("effect/Brand").Brand<"TurnId">;
572
+ } | {
573
+ readonly type: "tool-call";
574
+ readonly id: string;
575
+ readonly name: string;
545
576
  readonly params: unknown;
546
577
  readonly providerExecuted: boolean;
547
- readonly providerPartId: string & import("effect/Brand").Brand<"ProviderPartId">;
548
- readonly toolName: string;
549
- readonly promptPart?: {
550
- readonly type: "tool-call";
551
- readonly id: string;
552
- readonly name: string;
553
- readonly params: unknown;
554
- readonly providerExecuted: boolean;
555
- readonly "~effect/ai/Prompt/Part": "~effect/ai/Prompt/Part";
556
- readonly options: {
557
- readonly [x: string]: Schema.Json;
558
- };
559
- } | undefined;
578
+ readonly "~effect/ai/Prompt/Part": "~effect/ai/Prompt/Part";
579
+ readonly options: {
580
+ readonly [x: string]: Schema.Json;
581
+ };
560
582
  } | {
561
- readonly _tag: "Rejected";
562
- readonly reason: "unknown-tool" | "invalid-params";
563
- readonly seq: number & import("effect/Brand").Brand<"SequenceNumber">;
564
- readonly runId: string & import("effect/Brand").Brand<"RunId">;
565
- readonly inferenceId: string & import("effect/Brand").Brand<"InferenceId">;
566
- readonly turnId: string & import("effect/Brand").Brand<"TurnId">;
567
- readonly providerPartId: string & import("effect/Brand").Brand<"ProviderPartId">;
568
- readonly toolName: string;
569
- readonly modelFeedback: string;
570
- readonly promptPart?: {
571
- readonly type: "tool-result";
572
- readonly id: string;
573
- readonly name: string;
574
- readonly isFailure: boolean;
575
- readonly result: unknown;
576
- readonly "~effect/ai/Prompt/Part": "~effect/ai/Prompt/Part";
577
- readonly options: {
578
- readonly [x: string]: Schema.Json;
579
- };
580
- } | undefined;
581
- } | undefined;
583
+ readonly type: "tool-result";
584
+ readonly id: string;
585
+ readonly name: string;
586
+ readonly isFailure: boolean;
587
+ readonly result: unknown;
588
+ readonly providerExecuted: boolean;
589
+ readonly "~effect/ai/Prompt/Part": "~effect/ai/Prompt/Part";
590
+ readonly options: {
591
+ readonly [x: string]: Schema.Json;
592
+ };
593
+ } | {
594
+ readonly type: "tool-approval-request";
595
+ readonly approvalId: string;
596
+ readonly toolCallId: string;
597
+ readonly "~effect/ai/Prompt/Part": "~effect/ai/Prompt/Part";
598
+ readonly options: {
599
+ readonly [x: string]: Schema.Json;
600
+ };
601
+ })[] | undefined;
602
+ readonly reason: string;
603
+ readonly runId: string & import("effect/Brand").Brand<"RunId">;
604
+ readonly turnId: string & import("effect/Brand").Brand<"TurnId">;
582
605
  }>;
583
606
  readonly stopRequests: ReadonlyMap<string & import("effect/Brand").Brand<"CommandId">, {
584
607
  readonly commandId: string & import("effect/Brand").Brand<"CommandId">;
@@ -594,6 +617,12 @@ declare const encodeEdaRpcSessionSnapshot: (input: {
594
617
  readonly compactionId: string & import("effect/Brand").Brand<"CompactionId">;
595
618
  readonly requestedSeq?: (number & import("effect/Brand").Brand<"SequenceNumber">) | undefined;
596
619
  readonly startedSeq?: (number & import("effect/Brand").Brand<"SequenceNumber">) | undefined;
620
+ readonly summaryCreatedSeq?: (number & import("effect/Brand").Brand<"SequenceNumber">) | undefined;
621
+ readonly summaryId?: (string & import("effect/Brand").Brand<"SummaryId">) | undefined;
622
+ readonly sourceFromSeq?: (number & import("effect/Brand").Brand<"SequenceNumber">) | undefined;
623
+ readonly sourceToSeq?: (number & import("effect/Brand").Brand<"SequenceNumber">) | undefined;
624
+ readonly rebasedSeq?: (number & import("effect/Brand").Brand<"SequenceNumber">) | undefined;
625
+ readonly contextVersion?: (number & import("effect/Brand").Brand<"ContextVersion">) | undefined;
597
626
  readonly terminal?: {
598
627
  readonly _tag: "Completed";
599
628
  readonly seq: number & import("effect/Brand").Brand<"SequenceNumber">;
@@ -606,12 +635,6 @@ declare const encodeEdaRpcSessionSnapshot: (input: {
606
635
  readonly details?: unknown;
607
636
  };
608
637
  } | undefined;
609
- readonly summaryCreatedSeq?: (number & import("effect/Brand").Brand<"SequenceNumber">) | undefined;
610
- readonly summaryId?: (string & import("effect/Brand").Brand<"SummaryId">) | undefined;
611
- readonly sourceFromSeq?: (number & import("effect/Brand").Brand<"SequenceNumber">) | undefined;
612
- readonly sourceToSeq?: (number & import("effect/Brand").Brand<"SequenceNumber">) | undefined;
613
- readonly rebasedSeq?: (number & import("effect/Brand").Brand<"SequenceNumber">) | undefined;
614
- readonly contextVersion?: (number & import("effect/Brand").Brand<"ContextVersion">) | undefined;
615
638
  }>;
616
639
  readonly context: {
617
640
  readonly version: number & import("effect/Brand").Brand<"ContextVersion">;
@@ -632,9 +655,13 @@ declare const encodeEdaRpcSessionSnapshot: (input: {
632
655
  }[];
633
656
  };
634
657
  readonly commandQueues: {
658
+ readonly active?: {
659
+ readonly commandId: string & import("effect/Brand").Brand<"CommandId">;
660
+ readonly runId?: (string & import("effect/Brand").Brand<"RunId">) | undefined;
661
+ } | undefined;
635
662
  readonly pendingCommands: readonly {
636
663
  readonly commandId: string & import("effect/Brand").Brand<"CommandId">;
637
- readonly command: import("effect-durable-agent/types/commands").SubmitMessageCommand | import("effect-durable-agent/types/commands").StopTurnCommand | import("effect-durable-agent/types/commands").CancelPendingMessageCommand | import("effect-durable-agent/types/commands").PromotePendingMessageCommand | import("effect-durable-agent/types/commands").ResumePendingMessagesCommand;
664
+ readonly command: import("effect-durable-agent/types/commands").CancelPendingMessageCommand | import("effect-durable-agent/types/commands").PromotePendingMessageCommand | import("effect-durable-agent/types/commands").ResumePendingMessagesCommand | import("effect-durable-agent/types/commands").StopTurnCommand | import("effect-durable-agent/types/commands").SubmitMessageCommand;
638
665
  readonly admittedSeq: number & import("effect/Brand").Brand<"SequenceNumber">;
639
666
  readonly admissionTrace?: {
640
667
  readonly span: {
@@ -658,7 +685,7 @@ declare const encodeEdaRpcSessionSnapshot: (input: {
658
685
  }[];
659
686
  readonly queuedCommands: readonly {
660
687
  readonly commandId: string & import("effect/Brand").Brand<"CommandId">;
661
- readonly command: import("effect-durable-agent/types/commands").SubmitMessageCommand | import("effect-durable-agent/types/commands").StopTurnCommand | import("effect-durable-agent/types/commands").CancelPendingMessageCommand | import("effect-durable-agent/types/commands").PromotePendingMessageCommand | import("effect-durable-agent/types/commands").ResumePendingMessagesCommand;
688
+ readonly command: import("effect-durable-agent/types/commands").CancelPendingMessageCommand | import("effect-durable-agent/types/commands").PromotePendingMessageCommand | import("effect-durable-agent/types/commands").ResumePendingMessagesCommand | import("effect-durable-agent/types/commands").StopTurnCommand | import("effect-durable-agent/types/commands").SubmitMessageCommand;
662
689
  readonly admittedSeq: number & import("effect/Brand").Brand<"SequenceNumber">;
663
690
  readonly admissionTrace?: {
664
691
  readonly span: {
@@ -682,7 +709,7 @@ declare const encodeEdaRpcSessionSnapshot: (input: {
682
709
  }[];
683
710
  readonly activeControlCommands: readonly {
684
711
  readonly commandId: string & import("effect/Brand").Brand<"CommandId">;
685
- readonly command: import("effect-durable-agent/types/commands").SubmitMessageCommand | import("effect-durable-agent/types/commands").StopTurnCommand | import("effect-durable-agent/types/commands").CancelPendingMessageCommand | import("effect-durable-agent/types/commands").PromotePendingMessageCommand | import("effect-durable-agent/types/commands").ResumePendingMessagesCommand;
712
+ readonly command: import("effect-durable-agent/types/commands").CancelPendingMessageCommand | import("effect-durable-agent/types/commands").PromotePendingMessageCommand | import("effect-durable-agent/types/commands").ResumePendingMessagesCommand | import("effect-durable-agent/types/commands").StopTurnCommand | import("effect-durable-agent/types/commands").SubmitMessageCommand;
686
713
  readonly admittedSeq: number & import("effect/Brand").Brand<"SequenceNumber">;
687
714
  readonly admissionTrace?: {
688
715
  readonly span: {
@@ -705,6 +732,9 @@ declare const encodeEdaRpcSessionSnapshot: (input: {
705
732
  } | undefined;
706
733
  }[];
707
734
  readonly steeringByRun: ReadonlyMap<string & import("effect/Brand").Brand<"RunId">, readonly {
735
+ readonly messageId: string & import("effect/Brand").Brand<"MessageId">;
736
+ readonly commandId: string & import("effect/Brand").Brand<"CommandId">;
737
+ readonly runId: string & import("effect/Brand").Brand<"RunId">;
708
738
  readonly content: readonly [{
709
739
  readonly type: "text";
710
740
  readonly text: string;
@@ -728,13 +758,13 @@ declare const encodeEdaRpcSessionSnapshot: (input: {
728
758
  };
729
759
  } | {
730
760
  readonly type: "file";
761
+ readonly mediaType: string;
762
+ readonly fileName?: string | undefined;
763
+ readonly data: string | URL | Uint8Array<ArrayBufferLike>;
731
764
  readonly "~effect/ai/Prompt/Part": "~effect/ai/Prompt/Part";
732
765
  readonly options: {
733
766
  readonly [x: string]: Schema.Json;
734
767
  };
735
- readonly mediaType: string;
736
- readonly data: string | URL | Uint8Array<ArrayBufferLike>;
737
- readonly fileName?: string | undefined;
738
768
  }, ...({
739
769
  readonly type: "text";
740
770
  readonly text: string;
@@ -744,23 +774,21 @@ declare const encodeEdaRpcSessionSnapshot: (input: {
744
774
  };
745
775
  } | {
746
776
  readonly type: "file";
777
+ readonly mediaType: string;
778
+ readonly fileName?: string | undefined;
779
+ readonly data: string | URL | Uint8Array<ArrayBufferLike>;
747
780
  readonly "~effect/ai/Prompt/Part": "~effect/ai/Prompt/Part";
748
781
  readonly options: {
749
782
  readonly [x: string]: Schema.Json;
750
783
  };
751
- readonly mediaType: string;
752
- readonly data: string | URL | Uint8Array<ArrayBufferLike>;
753
- readonly fileName?: string | undefined;
754
784
  })[]];
755
- readonly commandId: string & import("effect/Brand").Brand<"CommandId">;
756
- readonly messageId: string & import("effect/Brand").Brand<"MessageId">;
757
- readonly runId: string & import("effect/Brand").Brand<"RunId">;
758
785
  readonly queuedSeq: number & import("effect/Brand").Brand<"SequenceNumber">;
759
786
  readonly consumedSeq?: (number & import("effect/Brand").Brand<"SequenceNumber">) | undefined;
760
787
  readonly consumedTurnId?: (string & import("effect/Brand").Brand<"TurnId">) | undefined;
761
788
  }[]>;
762
789
  readonly pendingQueue: readonly {
763
- readonly disposition: "queue" | "steer";
790
+ readonly messageId: string & import("effect/Brand").Brand<"MessageId">;
791
+ readonly commandId: string & import("effect/Brand").Brand<"CommandId">;
764
792
  readonly content: readonly [{
765
793
  readonly type: "text";
766
794
  readonly text: string;
@@ -784,13 +812,13 @@ declare const encodeEdaRpcSessionSnapshot: (input: {
784
812
  };
785
813
  } | {
786
814
  readonly type: "file";
815
+ readonly mediaType: string;
816
+ readonly fileName?: string | undefined;
817
+ readonly data: string | URL | Uint8Array<ArrayBufferLike>;
787
818
  readonly "~effect/ai/Prompt/Part": "~effect/ai/Prompt/Part";
788
819
  readonly options: {
789
820
  readonly [x: string]: Schema.Json;
790
821
  };
791
- readonly mediaType: string;
792
- readonly data: string | URL | Uint8Array<ArrayBufferLike>;
793
- readonly fileName?: string | undefined;
794
822
  }, ...({
795
823
  readonly type: "text";
796
824
  readonly text: string;
@@ -800,23 +828,23 @@ declare const encodeEdaRpcSessionSnapshot: (input: {
800
828
  };
801
829
  } | {
802
830
  readonly type: "file";
831
+ readonly mediaType: string;
832
+ readonly fileName?: string | undefined;
833
+ readonly data: string | URL | Uint8Array<ArrayBufferLike>;
803
834
  readonly "~effect/ai/Prompt/Part": "~effect/ai/Prompt/Part";
804
835
  readonly options: {
805
836
  readonly [x: string]: Schema.Json;
806
837
  };
807
- readonly mediaType: string;
808
- readonly data: string | URL | Uint8Array<ArrayBufferLike>;
809
- readonly fileName?: string | undefined;
810
838
  })[]];
811
- readonly commandId: string & import("effect/Brand").Brand<"CommandId">;
812
- readonly messageId: string & import("effect/Brand").Brand<"MessageId">;
813
839
  readonly submittedSeq: number & import("effect/Brand").Brand<"SequenceNumber">;
814
840
  readonly effectiveSeq: number & import("effect/Brand").Brand<"SequenceNumber">;
815
- readonly pausedByCommandId?: (string & import("effect/Brand").Brand<"CommandId">) | undefined;
841
+ readonly disposition: "queue" | "steer";
816
842
  readonly targetRunId?: (string & import("effect/Brand").Brand<"RunId">) | undefined;
843
+ readonly pausedByCommandId?: (string & import("effect/Brand").Brand<"CommandId">) | undefined;
817
844
  }[];
818
845
  readonly pendingSteers: readonly {
819
- readonly disposition: "queue" | "steer";
846
+ readonly messageId: string & import("effect/Brand").Brand<"MessageId">;
847
+ readonly commandId: string & import("effect/Brand").Brand<"CommandId">;
820
848
  readonly content: readonly [{
821
849
  readonly type: "text";
822
850
  readonly text: string;
@@ -840,13 +868,13 @@ declare const encodeEdaRpcSessionSnapshot: (input: {
840
868
  };
841
869
  } | {
842
870
  readonly type: "file";
871
+ readonly mediaType: string;
872
+ readonly fileName?: string | undefined;
873
+ readonly data: string | URL | Uint8Array<ArrayBufferLike>;
843
874
  readonly "~effect/ai/Prompt/Part": "~effect/ai/Prompt/Part";
844
875
  readonly options: {
845
876
  readonly [x: string]: Schema.Json;
846
877
  };
847
- readonly mediaType: string;
848
- readonly data: string | URL | Uint8Array<ArrayBufferLike>;
849
- readonly fileName?: string | undefined;
850
878
  }, ...({
851
879
  readonly type: "text";
852
880
  readonly text: string;
@@ -856,23 +884,23 @@ declare const encodeEdaRpcSessionSnapshot: (input: {
856
884
  };
857
885
  } | {
858
886
  readonly type: "file";
887
+ readonly mediaType: string;
888
+ readonly fileName?: string | undefined;
889
+ readonly data: string | URL | Uint8Array<ArrayBufferLike>;
859
890
  readonly "~effect/ai/Prompt/Part": "~effect/ai/Prompt/Part";
860
891
  readonly options: {
861
892
  readonly [x: string]: Schema.Json;
862
893
  };
863
- readonly mediaType: string;
864
- readonly data: string | URL | Uint8Array<ArrayBufferLike>;
865
- readonly fileName?: string | undefined;
866
894
  })[]];
867
- readonly commandId: string & import("effect/Brand").Brand<"CommandId">;
868
- readonly messageId: string & import("effect/Brand").Brand<"MessageId">;
869
895
  readonly submittedSeq: number & import("effect/Brand").Brand<"SequenceNumber">;
870
896
  readonly effectiveSeq: number & import("effect/Brand").Brand<"SequenceNumber">;
871
- readonly pausedByCommandId?: (string & import("effect/Brand").Brand<"CommandId">) | undefined;
897
+ readonly disposition: "queue" | "steer";
872
898
  readonly targetRunId?: (string & import("effect/Brand").Brand<"RunId">) | undefined;
899
+ readonly pausedByCommandId?: (string & import("effect/Brand").Brand<"CommandId">) | undefined;
873
900
  }[];
874
901
  readonly pausedQueue: readonly {
875
- readonly disposition: "queue" | "steer";
902
+ readonly messageId: string & import("effect/Brand").Brand<"MessageId">;
903
+ readonly commandId: string & import("effect/Brand").Brand<"CommandId">;
876
904
  readonly content: readonly [{
877
905
  readonly type: "text";
878
906
  readonly text: string;
@@ -896,13 +924,13 @@ declare const encodeEdaRpcSessionSnapshot: (input: {
896
924
  };
897
925
  } | {
898
926
  readonly type: "file";
927
+ readonly mediaType: string;
928
+ readonly fileName?: string | undefined;
929
+ readonly data: string | URL | Uint8Array<ArrayBufferLike>;
899
930
  readonly "~effect/ai/Prompt/Part": "~effect/ai/Prompt/Part";
900
931
  readonly options: {
901
932
  readonly [x: string]: Schema.Json;
902
933
  };
903
- readonly mediaType: string;
904
- readonly data: string | URL | Uint8Array<ArrayBufferLike>;
905
- readonly fileName?: string | undefined;
906
934
  }, ...({
907
935
  readonly type: "text";
908
936
  readonly text: string;
@@ -912,49 +940,37 @@ declare const encodeEdaRpcSessionSnapshot: (input: {
912
940
  };
913
941
  } | {
914
942
  readonly type: "file";
943
+ readonly mediaType: string;
944
+ readonly fileName?: string | undefined;
945
+ readonly data: string | URL | Uint8Array<ArrayBufferLike>;
915
946
  readonly "~effect/ai/Prompt/Part": "~effect/ai/Prompt/Part";
916
947
  readonly options: {
917
948
  readonly [x: string]: Schema.Json;
918
- };
919
- readonly mediaType: string;
920
- readonly data: string | URL | Uint8Array<ArrayBufferLike>;
921
- readonly fileName?: string | undefined;
949
+ };
922
950
  })[]];
923
- readonly commandId: string & import("effect/Brand").Brand<"CommandId">;
924
- readonly messageId: string & import("effect/Brand").Brand<"MessageId">;
925
951
  readonly submittedSeq: number & import("effect/Brand").Brand<"SequenceNumber">;
926
952
  readonly effectiveSeq: number & import("effect/Brand").Brand<"SequenceNumber">;
927
- readonly pausedByCommandId?: (string & import("effect/Brand").Brand<"CommandId">) | undefined;
953
+ readonly disposition: "queue" | "steer";
928
954
  readonly targetRunId?: (string & import("effect/Brand").Brand<"RunId">) | undefined;
955
+ readonly pausedByCommandId?: (string & import("effect/Brand").Brand<"CommandId">) | undefined;
929
956
  }[];
930
- readonly active?: {
931
- readonly commandId: string & import("effect/Brand").Brand<"CommandId">;
932
- readonly runId?: (string & import("effect/Brand").Brand<"RunId">) | undefined;
933
- } | undefined;
934
957
  };
935
- readonly modelSelection?: {
936
- readonly provider: string;
937
- readonly modelId: string;
938
- readonly settings?: unknown;
939
- } | undefined;
940
- readonly runSchedulingRequest?: {
941
- readonly requestId: string & import("effect/Brand").Brand<"RunRequestId">;
942
- readonly requestedSeq: number & import("effect/Brand").Brand<"SequenceNumber">;
943
- readonly work: {
944
- readonly _tag: "Command";
945
- readonly commandId: string & import("effect/Brand").Brand<"CommandId">;
946
- } | {
947
- readonly _tag: "Recovery";
948
- readonly commandId: string & import("effect/Brand").Brand<"CommandId">;
949
- readonly interruptedRunId: string & import("effect/Brand").Brand<"RunId">;
950
- readonly inputMessageIds: readonly (string & import("effect/Brand").Brand<"MessageId">)[];
951
- };
952
- readonly deliveredSeq?: (number & import("effect/Brand").Brand<"SequenceNumber">) | undefined;
953
- } | undefined;
954
958
  };
955
959
  readonly reducerStates: ReadonlyMap<string, unknown>;
956
960
  readonly messages: readonly ({
961
+ readonly createdAtMs?: number | undefined;
962
+ readonly messageId: string & import("effect/Brand").Brand<"MessageId">;
963
+ readonly seq: number & import("effect/Brand").Brand<"SequenceNumber">;
964
+ readonly cancellationReason?: string | undefined;
965
+ readonly cancelledByCommandId?: (string & import("effect/Brand").Brand<"CommandId">) | undefined;
966
+ readonly cancelledSeq?: (number & import("effect/Brand").Brand<"SequenceNumber">) | undefined;
967
+ readonly consumedSeq?: (number & import("effect/Brand").Brand<"SequenceNumber">) | undefined;
968
+ readonly consumedTurnId?: (string & import("effect/Brand").Brand<"TurnId">) | undefined;
969
+ readonly pausedByCommandId?: (string & import("effect/Brand").Brand<"CommandId">) | undefined;
970
+ readonly pausedSeq?: (number & import("effect/Brand").Brand<"SequenceNumber">) | undefined;
971
+ readonly promotedSeq?: (number & import("effect/Brand").Brand<"SequenceNumber">) | undefined;
957
972
  readonly _tag: "User";
973
+ readonly commandId: string & import("effect/Brand").Brand<"CommandId">;
958
974
  readonly content: readonly [{
959
975
  readonly type: "text";
960
976
  readonly text: string;
@@ -978,13 +994,13 @@ declare const encodeEdaRpcSessionSnapshot: (input: {
978
994
  };
979
995
  } | {
980
996
  readonly type: "file";
997
+ readonly mediaType: string;
998
+ readonly fileName?: string | undefined;
999
+ readonly data: string | URL | Uint8Array<ArrayBufferLike>;
981
1000
  readonly "~effect/ai/Prompt/Part": "~effect/ai/Prompt/Part";
982
1001
  readonly options: {
983
1002
  readonly [x: string]: Schema.Json;
984
1003
  };
985
- readonly mediaType: string;
986
- readonly data: string | URL | Uint8Array<ArrayBufferLike>;
987
- readonly fileName?: string | undefined;
988
1004
  }, ...({
989
1005
  readonly type: "text";
990
1006
  readonly text: string;
@@ -994,41 +1010,27 @@ declare const encodeEdaRpcSessionSnapshot: (input: {
994
1010
  };
995
1011
  } | {
996
1012
  readonly type: "file";
1013
+ readonly mediaType: string;
1014
+ readonly fileName?: string | undefined;
1015
+ readonly data: string | URL | Uint8Array<ArrayBufferLike>;
997
1016
  readonly "~effect/ai/Prompt/Part": "~effect/ai/Prompt/Part";
998
1017
  readonly options: {
999
1018
  readonly [x: string]: Schema.Json;
1000
1019
  };
1001
- readonly mediaType: string;
1002
- readonly data: string | URL | Uint8Array<ArrayBufferLike>;
1003
- readonly fileName?: string | undefined;
1004
1020
  })[]];
1005
- readonly commandId: string & import("effect/Brand").Brand<"CommandId">;
1006
- readonly messageId: string & import("effect/Brand").Brand<"MessageId">;
1007
- readonly seq: number & import("effect/Brand").Brand<"SequenceNumber">;
1008
- readonly createdAtMs?: number | undefined;
1009
1021
  readonly disposition?: "queue" | "steer" | undefined;
1010
1022
  readonly requestedDisposition?: "queue" | "steer" | undefined;
1011
- readonly cancellationReason?: string | undefined;
1012
- readonly cancelledByCommandId?: (string & import("effect/Brand").Brand<"CommandId">) | undefined;
1013
- readonly cancelledSeq?: (number & import("effect/Brand").Brand<"SequenceNumber">) | undefined;
1014
- readonly consumedSeq?: (number & import("effect/Brand").Brand<"SequenceNumber">) | undefined;
1015
- readonly consumedTurnId?: (string & import("effect/Brand").Brand<"TurnId">) | undefined;
1016
- readonly pausedByCommandId?: (string & import("effect/Brand").Brand<"CommandId">) | undefined;
1017
- readonly pausedSeq?: (number & import("effect/Brand").Brand<"SequenceNumber">) | undefined;
1018
- readonly promotedSeq?: (number & import("effect/Brand").Brand<"SequenceNumber">) | undefined;
1019
1023
  } | {
1024
+ readonly createdAtMs?: number | undefined;
1025
+ readonly messageId: string & import("effect/Brand").Brand<"MessageId">;
1026
+ readonly seq: number & import("effect/Brand").Brand<"SequenceNumber">;
1020
1027
  readonly _tag: "Assistant";
1021
1028
  readonly content: {
1022
1029
  readonly text: string;
1023
1030
  readonly reasoning?: string | undefined;
1024
1031
  };
1025
- readonly messageId: string & import("effect/Brand").Brand<"MessageId">;
1026
- readonly seq: number & import("effect/Brand").Brand<"SequenceNumber">;
1027
- readonly runId: string & import("effect/Brand").Brand<"RunId">;
1028
- readonly inferenceId: string & import("effect/Brand").Brand<"InferenceId">;
1029
- readonly turnId: string & import("effect/Brand").Brand<"TurnId">;
1030
- readonly createdAtMs?: number | undefined;
1031
1032
  readonly imported?: true | undefined;
1033
+ readonly inferenceId: string & import("effect/Brand").Brand<"InferenceId">;
1032
1034
  readonly promptParts?: readonly ({
1033
1035
  readonly type: "text";
1034
1036
  readonly text: string;
@@ -1038,13 +1040,13 @@ declare const encodeEdaRpcSessionSnapshot: (input: {
1038
1040
  };
1039
1041
  } | {
1040
1042
  readonly type: "file";
1043
+ readonly mediaType: string;
1044
+ readonly fileName?: string | undefined;
1045
+ readonly data: string | URL | Uint8Array<ArrayBufferLike>;
1041
1046
  readonly "~effect/ai/Prompt/Part": "~effect/ai/Prompt/Part";
1042
1047
  readonly options: {
1043
1048
  readonly [x: string]: Schema.Json;
1044
1049
  };
1045
- readonly mediaType: string;
1046
- readonly data: string | URL | Uint8Array<ArrayBufferLike>;
1047
- readonly fileName?: string | undefined;
1048
1050
  } | {
1049
1051
  readonly type: "reasoning";
1050
1052
  readonly text: string;
@@ -1068,6 +1070,7 @@ declare const encodeEdaRpcSessionSnapshot: (input: {
1068
1070
  readonly name: string;
1069
1071
  readonly isFailure: boolean;
1070
1072
  readonly result: unknown;
1073
+ readonly providerExecuted: boolean;
1071
1074
  readonly "~effect/ai/Prompt/Part": "~effect/ai/Prompt/Part";
1072
1075
  readonly options: {
1073
1076
  readonly [x: string]: Schema.Json;
@@ -1081,19 +1084,18 @@ declare const encodeEdaRpcSessionSnapshot: (input: {
1081
1084
  readonly [x: string]: Schema.Json;
1082
1085
  };
1083
1086
  })[] | undefined;
1087
+ readonly runId: string & import("effect/Brand").Brand<"RunId">;
1088
+ readonly turnId: string & import("effect/Brand").Brand<"TurnId">;
1084
1089
  } | {
1090
+ readonly createdAtMs?: number | undefined;
1091
+ readonly messageId: string & import("effect/Brand").Brand<"MessageId">;
1092
+ readonly seq: number & import("effect/Brand").Brand<"SequenceNumber">;
1085
1093
  readonly _tag: "AssistantPartial";
1086
1094
  readonly content: {
1087
1095
  readonly text: string;
1088
1096
  readonly reasoning?: string | undefined;
1089
1097
  };
1090
- readonly messageId: string & import("effect/Brand").Brand<"MessageId">;
1091
- readonly reason: string;
1092
- readonly seq: number & import("effect/Brand").Brand<"SequenceNumber">;
1093
- readonly runId: string & import("effect/Brand").Brand<"RunId">;
1094
1098
  readonly inferenceId: string & import("effect/Brand").Brand<"InferenceId">;
1095
- readonly turnId: string & import("effect/Brand").Brand<"TurnId">;
1096
- readonly createdAtMs?: number | undefined;
1097
1099
  readonly promptParts?: readonly ({
1098
1100
  readonly type: "text";
1099
1101
  readonly text: string;
@@ -1103,13 +1105,13 @@ declare const encodeEdaRpcSessionSnapshot: (input: {
1103
1105
  };
1104
1106
  } | {
1105
1107
  readonly type: "file";
1108
+ readonly mediaType: string;
1109
+ readonly fileName?: string | undefined;
1110
+ readonly data: string | URL | Uint8Array<ArrayBufferLike>;
1106
1111
  readonly "~effect/ai/Prompt/Part": "~effect/ai/Prompt/Part";
1107
1112
  readonly options: {
1108
1113
  readonly [x: string]: Schema.Json;
1109
1114
  };
1110
- readonly mediaType: string;
1111
- readonly data: string | URL | Uint8Array<ArrayBufferLike>;
1112
- readonly fileName?: string | undefined;
1113
1115
  } | {
1114
1116
  readonly type: "reasoning";
1115
1117
  readonly text: string;
@@ -1133,6 +1135,7 @@ declare const encodeEdaRpcSessionSnapshot: (input: {
1133
1135
  readonly name: string;
1134
1136
  readonly isFailure: boolean;
1135
1137
  readonly result: unknown;
1138
+ readonly providerExecuted: boolean;
1136
1139
  readonly "~effect/ai/Prompt/Part": "~effect/ai/Prompt/Part";
1137
1140
  readonly options: {
1138
1141
  readonly [x: string]: Schema.Json;
@@ -1146,8 +1149,22 @@ declare const encodeEdaRpcSessionSnapshot: (input: {
1146
1149
  readonly [x: string]: Schema.Json;
1147
1150
  };
1148
1151
  })[] | undefined;
1152
+ readonly reason: string;
1153
+ readonly runId: string & import("effect/Brand").Brand<"RunId">;
1154
+ readonly turnId: string & import("effect/Brand").Brand<"TurnId">;
1149
1155
  } | {
1156
+ readonly createdAtMs?: number | undefined;
1157
+ readonly messageId: string & import("effect/Brand").Brand<"MessageId">;
1158
+ readonly seq: number & import("effect/Brand").Brand<"SequenceNumber">;
1159
+ readonly cancellationReason?: string | undefined;
1160
+ readonly cancelledByCommandId?: (string & import("effect/Brand").Brand<"CommandId">) | undefined;
1161
+ readonly cancelledSeq?: (number & import("effect/Brand").Brand<"SequenceNumber">) | undefined;
1162
+ readonly consumedTurnId?: (string & import("effect/Brand").Brand<"TurnId">) | undefined;
1163
+ readonly pausedByCommandId?: (string & import("effect/Brand").Brand<"CommandId">) | undefined;
1164
+ readonly pausedSeq?: (number & import("effect/Brand").Brand<"SequenceNumber">) | undefined;
1165
+ readonly promotedSeq?: (number & import("effect/Brand").Brand<"SequenceNumber">) | undefined;
1150
1166
  readonly _tag: "Steering";
1167
+ readonly commandId: string & import("effect/Brand").Brand<"CommandId">;
1151
1168
  readonly content: readonly [{
1152
1169
  readonly type: "text";
1153
1170
  readonly text: string;
@@ -1171,13 +1188,13 @@ declare const encodeEdaRpcSessionSnapshot: (input: {
1171
1188
  };
1172
1189
  } | {
1173
1190
  readonly type: "file";
1191
+ readonly mediaType: string;
1192
+ readonly fileName?: string | undefined;
1193
+ readonly data: string | URL | Uint8Array<ArrayBufferLike>;
1174
1194
  readonly "~effect/ai/Prompt/Part": "~effect/ai/Prompt/Part";
1175
1195
  readonly options: {
1176
1196
  readonly [x: string]: Schema.Json;
1177
1197
  };
1178
- readonly mediaType: string;
1179
- readonly data: string | URL | Uint8Array<ArrayBufferLike>;
1180
- readonly fileName?: string | undefined;
1181
1198
  }, ...({
1182
1199
  readonly type: "text";
1183
1200
  readonly text: string;
@@ -1187,91 +1204,352 @@ declare const encodeEdaRpcSessionSnapshot: (input: {
1187
1204
  };
1188
1205
  } | {
1189
1206
  readonly type: "file";
1207
+ readonly mediaType: string;
1208
+ readonly fileName?: string | undefined;
1209
+ readonly data: string | URL | Uint8Array<ArrayBufferLike>;
1190
1210
  readonly "~effect/ai/Prompt/Part": "~effect/ai/Prompt/Part";
1191
1211
  readonly options: {
1192
1212
  readonly [x: string]: Schema.Json;
1193
1213
  };
1194
- readonly mediaType: string;
1195
- readonly data: string | URL | Uint8Array<ArrayBufferLike>;
1196
- readonly fileName?: string | undefined;
1197
1214
  })[]];
1198
- readonly commandId: string & import("effect/Brand").Brand<"CommandId">;
1199
- readonly messageId: string & import("effect/Brand").Brand<"MessageId">;
1200
- readonly seq: number & import("effect/Brand").Brand<"SequenceNumber">;
1201
- readonly consumedSeq: number & import("effect/Brand").Brand<"SequenceNumber">;
1202
1215
  readonly runId: string & import("effect/Brand").Brand<"RunId">;
1203
- readonly createdAtMs?: number | undefined;
1204
- readonly cancellationReason?: string | undefined;
1205
- readonly cancelledByCommandId?: (string & import("effect/Brand").Brand<"CommandId">) | undefined;
1206
- readonly cancelledSeq?: (number & import("effect/Brand").Brand<"SequenceNumber">) | undefined;
1207
- readonly consumedTurnId?: (string & import("effect/Brand").Brand<"TurnId">) | undefined;
1208
- readonly pausedByCommandId?: (string & import("effect/Brand").Brand<"CommandId">) | undefined;
1209
- readonly pausedSeq?: (number & import("effect/Brand").Brand<"SequenceNumber">) | undefined;
1210
- readonly promotedSeq?: (number & import("effect/Brand").Brand<"SequenceNumber">) | undefined;
1216
+ readonly consumedSeq: number & import("effect/Brand").Brand<"SequenceNumber">;
1211
1217
  })[];
1212
1218
  }, options?: import("effect/SchemaAST").ParseOptions) => {
1213
1219
  readonly state: {
1214
- readonly messages: ReadonlyMap<string, {
1215
- readonly _tag: "System";
1216
- readonly content: string;
1217
- readonly messageId: string;
1218
- readonly seq: number;
1219
- readonly createdAtMs?: number | undefined;
1220
- } | {
1221
- readonly _tag: "User";
1222
- readonly content: readonly [{
1223
- readonly type: "text";
1224
- readonly text: string;
1225
- readonly "~effect/ai/Prompt/Part": "~effect/ai/Prompt/Part";
1226
- readonly options: {
1227
- readonly [x: string]: Schema.Json;
1220
+ readonly runSchedulingRequest?: {
1221
+ readonly requestId: string;
1222
+ readonly work: {
1223
+ readonly _tag: "Command";
1224
+ readonly commandId: string;
1225
+ } | {
1226
+ readonly _tag: "Recovery";
1227
+ readonly commandId: string;
1228
+ readonly interruptedRunId: string;
1229
+ readonly inputMessageIds: readonly string[];
1230
+ };
1231
+ readonly requestedSeq: number;
1232
+ readonly deliveredSeq?: number | undefined;
1233
+ } | undefined;
1234
+ readonly modelSelection?: {
1235
+ readonly provider: string;
1236
+ readonly modelId: string;
1237
+ readonly settings?: unknown;
1238
+ } | undefined;
1239
+ readonly lastSeq: number;
1240
+ readonly commands: ReadonlyMap<string, {
1241
+ readonly admittedSeq?: number | undefined;
1242
+ readonly admissionTrace?: {
1243
+ readonly span: {
1244
+ readonly traceId: string;
1245
+ readonly spanId: string;
1246
+ readonly sampled: boolean;
1247
+ readonly tracestate: string | null;
1248
+ };
1249
+ readonly links: readonly {
1250
+ readonly context: {
1251
+ readonly traceId: string;
1252
+ readonly spanId: string;
1253
+ readonly sampled: boolean;
1254
+ readonly tracestate: string | null;
1255
+ };
1256
+ readonly attributes: {
1257
+ readonly [x: string]: string | number | boolean;
1258
+ };
1259
+ }[];
1260
+ } | undefined;
1261
+ readonly command?: {
1262
+ readonly _tag: "SubmitMessage";
1263
+ readonly commandId?: string | undefined;
1264
+ readonly idempotencyKey?: string | undefined;
1265
+ readonly disposition: "interrupt" | "queue" | "steer";
1266
+ readonly content: string | readonly [{
1267
+ readonly type: "text";
1268
+ readonly text: string;
1269
+ readonly "~effect/ai/Prompt/Part"?: "~effect/ai/Prompt/Part" | undefined;
1270
+ readonly options?: {
1271
+ readonly [x: string]: Schema.Json;
1272
+ } | undefined;
1273
+ } | {
1274
+ readonly type: "file";
1275
+ readonly mediaType: string;
1276
+ readonly fileName?: string | undefined;
1277
+ readonly data: string | URL | Uint8Array<ArrayBufferLike>;
1278
+ readonly "~effect/ai/Prompt/Part"?: "~effect/ai/Prompt/Part" | undefined;
1279
+ readonly options?: {
1280
+ readonly [x: string]: Schema.Json;
1281
+ } | undefined;
1282
+ }, ...({
1283
+ readonly type: "text";
1284
+ readonly text: string;
1285
+ readonly "~effect/ai/Prompt/Part"?: "~effect/ai/Prompt/Part" | undefined;
1286
+ readonly options?: {
1287
+ readonly [x: string]: Schema.Json;
1288
+ } | undefined;
1289
+ } | {
1290
+ readonly type: "file";
1291
+ readonly mediaType: string;
1292
+ readonly fileName?: string | undefined;
1293
+ readonly data: string | URL | Uint8Array<ArrayBufferLike>;
1294
+ readonly "~effect/ai/Prompt/Part"?: "~effect/ai/Prompt/Part" | undefined;
1295
+ readonly options?: {
1296
+ readonly [x: string]: Schema.Json;
1297
+ } | undefined;
1298
+ })[]];
1299
+ readonly expectedPausedMessageIdsToCancel?: readonly string[] | undefined;
1300
+ } | {
1301
+ readonly _tag: "StopTurn";
1302
+ readonly commandId?: string | undefined;
1303
+ readonly idempotencyKey?: string | undefined;
1304
+ } | {
1305
+ readonly _tag: "CancelPendingMessage";
1306
+ readonly commandId?: string | undefined;
1307
+ readonly idempotencyKey?: string | undefined;
1308
+ readonly messageId: string;
1309
+ readonly reason: "edit" | "user-cancel";
1310
+ } | {
1311
+ readonly _tag: "PromotePendingMessage";
1312
+ readonly commandId?: string | undefined;
1313
+ readonly idempotencyKey?: string | undefined;
1314
+ readonly messageId: string;
1315
+ } | {
1316
+ readonly _tag: "ResumePendingMessages";
1317
+ readonly commandId?: string | undefined;
1318
+ readonly idempotencyKey?: string | undefined;
1319
+ readonly messageIds: readonly [string, ...string[]];
1320
+ } | undefined;
1321
+ readonly commandId: string;
1322
+ readonly startedSeq?: number | undefined;
1323
+ readonly terminal?: {
1324
+ readonly _tag: "Completed";
1325
+ readonly seq: number;
1326
+ } | {
1327
+ readonly _tag: "Failed";
1328
+ readonly error: {
1329
+ readonly message: string;
1330
+ readonly code?: string | undefined;
1331
+ readonly details?: unknown;
1228
1332
  };
1229
- }, ...{
1230
- readonly type: "text";
1231
- readonly text: string;
1232
- readonly "~effect/ai/Prompt/Part": "~effect/ai/Prompt/Part";
1233
- readonly options: {
1234
- readonly [x: string]: Schema.Json;
1333
+ readonly seq: number;
1334
+ } | {
1335
+ readonly _tag: "Cancelled";
1336
+ readonly reason: string;
1337
+ readonly seq: number;
1338
+ } | undefined;
1339
+ }>;
1340
+ readonly runs: ReadonlyMap<string, {
1341
+ readonly durationMs?: number | undefined;
1342
+ readonly startedAtMs?: number | undefined;
1343
+ readonly terminalAtMs?: number | undefined;
1344
+ readonly modelSelection?: {
1345
+ readonly provider: string;
1346
+ readonly modelId: string;
1347
+ readonly settings?: unknown;
1348
+ } | undefined;
1349
+ readonly commandIds: readonly string[];
1350
+ readonly runId: string;
1351
+ readonly startedSeq: number;
1352
+ readonly terminal?: {
1353
+ readonly _tag: "Completed";
1354
+ readonly seq: number;
1355
+ } | {
1356
+ readonly _tag: "Failed";
1357
+ readonly error: {
1358
+ readonly message: string;
1359
+ readonly code?: string | undefined;
1360
+ readonly details?: unknown;
1235
1361
  };
1236
- }[]] | readonly [{
1237
- readonly type: "text";
1238
- readonly text: string;
1239
- readonly "~effect/ai/Prompt/Part": "~effect/ai/Prompt/Part";
1240
- readonly options: {
1241
- readonly [x: string]: Schema.Json;
1362
+ readonly seq: number;
1363
+ } | {
1364
+ readonly _tag: "Interrupted";
1365
+ readonly reason: string;
1366
+ readonly seq: number;
1367
+ } | undefined;
1368
+ readonly trace: {
1369
+ readonly root: {
1370
+ readonly traceId: string;
1371
+ readonly spanId: string;
1372
+ readonly sampled: boolean;
1373
+ readonly tracestate: string | null;
1242
1374
  };
1375
+ readonly links: readonly {
1376
+ readonly context: {
1377
+ readonly traceId: string;
1378
+ readonly spanId: string;
1379
+ readonly sampled: boolean;
1380
+ readonly tracestate: string | null;
1381
+ };
1382
+ readonly attributes: {
1383
+ readonly [x: string]: string | number | boolean;
1384
+ };
1385
+ }[];
1386
+ };
1387
+ }>;
1388
+ readonly recoveryContinuations: ReadonlyMap<string, {
1389
+ readonly seq: number;
1390
+ readonly commandId: string;
1391
+ readonly interruptedRunId: string;
1392
+ readonly replacementRunId: string;
1393
+ }>;
1394
+ readonly turns: ReadonlyMap<string, {
1395
+ readonly durationMs?: number | undefined;
1396
+ readonly startedAtMs?: number | undefined;
1397
+ readonly terminalAtMs?: number | undefined;
1398
+ readonly runId: string;
1399
+ readonly startedSeq: number;
1400
+ readonly terminal?: {
1401
+ readonly _tag: "Completed";
1402
+ readonly seq: number;
1403
+ readonly usage?: {
1404
+ readonly inputTokens?: number | undefined;
1405
+ readonly cachedInputTokens?: number | undefined;
1406
+ readonly cacheWriteInputTokens?: number | undefined;
1407
+ readonly outputTokens?: number | undefined;
1408
+ readonly textTokens?: number | undefined;
1409
+ readonly reasoningTokens?: number | undefined;
1410
+ } | undefined;
1243
1411
  } | {
1244
- readonly type: "file";
1245
- readonly "~effect/ai/Prompt/Part": "~effect/ai/Prompt/Part";
1246
- readonly options: {
1247
- readonly [x: string]: Schema.Json;
1412
+ readonly _tag: "Failed";
1413
+ readonly error: {
1414
+ readonly message: string;
1415
+ readonly code?: string | undefined;
1416
+ readonly details?: unknown;
1248
1417
  };
1249
- readonly mediaType: string;
1250
- readonly data: string | URL | Uint8Array<ArrayBufferLike>;
1251
- readonly fileName?: string | undefined;
1252
- }, ...({
1253
- readonly type: "text";
1254
- readonly text: string;
1255
- readonly "~effect/ai/Prompt/Part": "~effect/ai/Prompt/Part";
1256
- readonly options: {
1257
- readonly [x: string]: Schema.Json;
1418
+ readonly seq: number;
1419
+ } | {
1420
+ readonly _tag: "Stopped";
1421
+ readonly reason: string;
1422
+ readonly seq: number;
1423
+ } | undefined;
1424
+ readonly turnId: string;
1425
+ }>;
1426
+ readonly inferences: ReadonlyMap<string, {
1427
+ readonly durationMs?: number | undefined;
1428
+ readonly startedAtMs?: number | undefined;
1429
+ readonly terminalAtMs?: number | undefined;
1430
+ readonly inferenceId: string;
1431
+ readonly runId: string;
1432
+ readonly startedSeq: number;
1433
+ readonly terminal?: {
1434
+ readonly _tag: "Completed";
1435
+ readonly seq: number;
1436
+ readonly usage?: {
1437
+ readonly inputTokens?: number | undefined;
1438
+ readonly cachedInputTokens?: number | undefined;
1439
+ readonly cacheWriteInputTokens?: number | undefined;
1440
+ readonly outputTokens?: number | undefined;
1441
+ readonly textTokens?: number | undefined;
1442
+ readonly reasoningTokens?: number | undefined;
1443
+ } | undefined;
1444
+ } | {
1445
+ readonly _tag: "Failed";
1446
+ readonly error: {
1447
+ readonly message: string;
1448
+ readonly code?: string | undefined;
1449
+ readonly details?: unknown;
1258
1450
  };
1451
+ readonly seq: number;
1452
+ } | undefined;
1453
+ readonly turnId: string;
1454
+ }>;
1455
+ readonly toolCalls: ReadonlyMap<string, {
1456
+ readonly durationMs?: number | undefined;
1457
+ readonly startedAtMs?: number | undefined;
1458
+ readonly terminalAtMs?: number | undefined;
1459
+ readonly decision?: {
1460
+ readonly _tag: "Created";
1461
+ readonly inferenceId: string & import("effect/Brand").Brand<"InferenceId">;
1462
+ readonly params: unknown;
1463
+ readonly promptPart?: {
1464
+ readonly type: "tool-call";
1465
+ readonly id: string;
1466
+ readonly name: string;
1467
+ readonly params: unknown;
1468
+ readonly providerExecuted: boolean;
1469
+ readonly "~effect/ai/Prompt/Part": "~effect/ai/Prompt/Part";
1470
+ readonly options: {
1471
+ readonly [x: string]: Schema.Json;
1472
+ };
1473
+ } | undefined;
1474
+ readonly providerExecuted: boolean;
1475
+ readonly providerPartId: string & import("effect/Brand").Brand<"ProviderPartId">;
1476
+ readonly runId: string & import("effect/Brand").Brand<"RunId">;
1477
+ readonly seq: number & import("effect/Brand").Brand<"SequenceNumber">;
1478
+ readonly toolName: string;
1479
+ readonly turnId: string & import("effect/Brand").Brand<"TurnId">;
1259
1480
  } | {
1260
- readonly type: "file";
1261
- readonly "~effect/ai/Prompt/Part": "~effect/ai/Prompt/Part";
1262
- readonly options: {
1263
- readonly [x: string]: Schema.Json;
1481
+ readonly _tag: "Rejected";
1482
+ readonly inferenceId: string & import("effect/Brand").Brand<"InferenceId">;
1483
+ readonly modelFeedback: string;
1484
+ readonly promptPart?: {
1485
+ readonly type: "tool-result";
1486
+ readonly id: string;
1487
+ readonly name: string;
1488
+ readonly isFailure: boolean;
1489
+ readonly result: unknown;
1490
+ readonly providerExecuted: boolean;
1491
+ readonly "~effect/ai/Prompt/Part": "~effect/ai/Prompt/Part";
1492
+ readonly options: {
1493
+ readonly [x: string]: Schema.Json;
1494
+ };
1495
+ } | undefined;
1496
+ readonly providerPartId: string & import("effect/Brand").Brand<"ProviderPartId">;
1497
+ readonly reason: "invalid-params" | "unknown-tool";
1498
+ readonly runId: string & import("effect/Brand").Brand<"RunId">;
1499
+ readonly seq: number & import("effect/Brand").Brand<"SequenceNumber">;
1500
+ readonly toolName: string;
1501
+ readonly turnId: string & import("effect/Brand").Brand<"TurnId">;
1502
+ } | undefined;
1503
+ readonly startedSeq?: (number & import("effect/Brand").Brand<"SequenceNumber">) | undefined;
1504
+ readonly terminal?: {
1505
+ readonly _tag: "Completed";
1506
+ readonly promptPart?: {
1507
+ readonly type: "tool-result";
1508
+ readonly id: string;
1509
+ readonly name: string;
1510
+ readonly isFailure: boolean;
1511
+ readonly result: unknown;
1512
+ readonly providerExecuted: boolean;
1513
+ readonly "~effect/ai/Prompt/Part": "~effect/ai/Prompt/Part";
1514
+ readonly options: {
1515
+ readonly [x: string]: Schema.Json;
1516
+ };
1517
+ } | undefined;
1518
+ readonly result: unknown;
1519
+ readonly seq: number & import("effect/Brand").Brand<"SequenceNumber">;
1520
+ } | {
1521
+ readonly _tag: "Failed";
1522
+ readonly error: {
1523
+ readonly message: string;
1524
+ readonly code?: string | undefined;
1525
+ readonly details?: unknown;
1264
1526
  };
1265
- readonly mediaType: string;
1266
- readonly data: string | URL | Uint8Array<ArrayBufferLike>;
1267
- readonly fileName?: string | undefined;
1268
- })[]];
1269
- readonly commandId: string;
1527
+ readonly promptPart?: {
1528
+ readonly type: "tool-result";
1529
+ readonly id: string;
1530
+ readonly name: string;
1531
+ readonly isFailure: boolean;
1532
+ readonly result: unknown;
1533
+ readonly providerExecuted: boolean;
1534
+ readonly "~effect/ai/Prompt/Part": "~effect/ai/Prompt/Part";
1535
+ readonly options: {
1536
+ readonly [x: string]: Schema.Json;
1537
+ };
1538
+ } | undefined;
1539
+ readonly seq: number & import("effect/Brand").Brand<"SequenceNumber">;
1540
+ } | undefined;
1541
+ readonly toolCallId: string & import("effect/Brand").Brand<"ToolCallId">;
1542
+ }>;
1543
+ readonly messages: ReadonlyMap<string, {
1544
+ readonly createdAtMs?: number | undefined;
1270
1545
  readonly messageId: string;
1271
1546
  readonly seq: number;
1547
+ readonly _tag: "System";
1548
+ readonly content: string;
1549
+ } | {
1272
1550
  readonly createdAtMs?: number | undefined;
1273
- readonly disposition?: "queue" | "steer" | undefined;
1274
- readonly requestedDisposition?: "queue" | "steer" | undefined;
1551
+ readonly messageId: string;
1552
+ readonly seq: number;
1275
1553
  readonly cancellationReason?: string | undefined;
1276
1554
  readonly cancelledByCommandId?: string | undefined;
1277
1555
  readonly cancelledSeq?: number | undefined;
@@ -1279,9 +1557,9 @@ declare const encodeEdaRpcSessionSnapshot: (input: {
1279
1557
  readonly consumedTurnId?: string | undefined;
1280
1558
  readonly pausedByCommandId?: string | undefined;
1281
1559
  readonly pausedSeq?: number | undefined;
1282
- readonly promotedSeq?: number | undefined;
1283
- } | {
1284
- readonly _tag: "Steering";
1560
+ readonly promotedSeq?: number | undefined;
1561
+ readonly _tag: "User";
1562
+ readonly commandId: string;
1285
1563
  readonly content: readonly [{
1286
1564
  readonly type: "text";
1287
1565
  readonly text: string;
@@ -1305,13 +1583,13 @@ declare const encodeEdaRpcSessionSnapshot: (input: {
1305
1583
  };
1306
1584
  } | {
1307
1585
  readonly type: "file";
1586
+ readonly mediaType: string;
1587
+ readonly fileName?: string | undefined;
1588
+ readonly data: string | URL | Uint8Array<ArrayBufferLike>;
1308
1589
  readonly "~effect/ai/Prompt/Part": "~effect/ai/Prompt/Part";
1309
1590
  readonly options: {
1310
1591
  readonly [x: string]: Schema.Json;
1311
1592
  };
1312
- readonly mediaType: string;
1313
- readonly data: string | URL | Uint8Array<ArrayBufferLike>;
1314
- readonly fileName?: string | undefined;
1315
1593
  }, ...({
1316
1594
  readonly type: "text";
1317
1595
  readonly text: string;
@@ -1321,19 +1599,20 @@ declare const encodeEdaRpcSessionSnapshot: (input: {
1321
1599
  };
1322
1600
  } | {
1323
1601
  readonly type: "file";
1602
+ readonly mediaType: string;
1603
+ readonly fileName?: string | undefined;
1604
+ readonly data: string | URL | Uint8Array<ArrayBufferLike>;
1324
1605
  readonly "~effect/ai/Prompt/Part": "~effect/ai/Prompt/Part";
1325
1606
  readonly options: {
1326
1607
  readonly [x: string]: Schema.Json;
1327
1608
  };
1328
- readonly mediaType: string;
1329
- readonly data: string | URL | Uint8Array<ArrayBufferLike>;
1330
- readonly fileName?: string | undefined;
1331
1609
  })[]];
1332
- readonly commandId: string;
1610
+ readonly disposition?: "queue" | "steer" | undefined;
1611
+ readonly requestedDisposition?: "queue" | "steer" | undefined;
1612
+ } | {
1613
+ readonly createdAtMs?: number | undefined;
1333
1614
  readonly messageId: string;
1334
1615
  readonly seq: number;
1335
- readonly runId: string;
1336
- readonly createdAtMs?: number | undefined;
1337
1616
  readonly cancellationReason?: string | undefined;
1338
1617
  readonly cancelledByCommandId?: string | undefined;
1339
1618
  readonly cancelledSeq?: number | undefined;
@@ -1342,84 +1621,67 @@ declare const encodeEdaRpcSessionSnapshot: (input: {
1342
1621
  readonly pausedByCommandId?: string | undefined;
1343
1622
  readonly pausedSeq?: number | undefined;
1344
1623
  readonly promotedSeq?: number | undefined;
1345
- } | {
1346
- readonly _tag: "Assistant";
1347
- readonly content: {
1348
- readonly text: string;
1349
- readonly reasoning?: string | undefined;
1350
- };
1351
- readonly messageId: string;
1352
- readonly seq: number;
1353
- readonly runId: string;
1354
- readonly inferenceId: string;
1355
- readonly turnId: string;
1356
- readonly createdAtMs?: number | undefined;
1357
- readonly imported?: true | undefined;
1358
- readonly promptParts?: readonly ({
1624
+ readonly _tag: "Steering";
1625
+ readonly commandId: string;
1626
+ readonly content: readonly [{
1359
1627
  readonly type: "text";
1360
1628
  readonly text: string;
1361
1629
  readonly "~effect/ai/Prompt/Part": "~effect/ai/Prompt/Part";
1362
1630
  readonly options: {
1363
1631
  readonly [x: string]: Schema.Json;
1364
1632
  };
1365
- } | {
1366
- readonly type: "file";
1633
+ }, ...{
1634
+ readonly type: "text";
1635
+ readonly text: string;
1367
1636
  readonly "~effect/ai/Prompt/Part": "~effect/ai/Prompt/Part";
1368
1637
  readonly options: {
1369
1638
  readonly [x: string]: Schema.Json;
1370
1639
  };
1371
- readonly mediaType: string;
1372
- readonly data: string | URL | Uint8Array<ArrayBufferLike>;
1373
- readonly fileName?: string | undefined;
1374
- } | {
1375
- readonly type: "reasoning";
1640
+ }[]] | readonly [{
1641
+ readonly type: "text";
1376
1642
  readonly text: string;
1377
1643
  readonly "~effect/ai/Prompt/Part": "~effect/ai/Prompt/Part";
1378
1644
  readonly options: {
1379
1645
  readonly [x: string]: Schema.Json;
1380
1646
  };
1381
1647
  } | {
1382
- readonly type: "tool-call";
1383
- readonly id: string;
1384
- readonly name: string;
1385
- readonly params: unknown;
1386
- readonly providerExecuted: boolean;
1648
+ readonly type: "file";
1649
+ readonly mediaType: string;
1650
+ readonly fileName?: string | undefined;
1651
+ readonly data: string | URL | Uint8Array<ArrayBufferLike>;
1387
1652
  readonly "~effect/ai/Prompt/Part": "~effect/ai/Prompt/Part";
1388
1653
  readonly options: {
1389
1654
  readonly [x: string]: Schema.Json;
1390
1655
  };
1391
- } | {
1392
- readonly type: "tool-result";
1393
- readonly id: string;
1394
- readonly name: string;
1395
- readonly isFailure: boolean;
1396
- readonly result: unknown;
1656
+ }, ...({
1657
+ readonly type: "text";
1658
+ readonly text: string;
1397
1659
  readonly "~effect/ai/Prompt/Part": "~effect/ai/Prompt/Part";
1398
1660
  readonly options: {
1399
1661
  readonly [x: string]: Schema.Json;
1400
1662
  };
1401
1663
  } | {
1402
- readonly type: "tool-approval-request";
1403
- readonly approvalId: string;
1404
- readonly toolCallId: string;
1664
+ readonly type: "file";
1665
+ readonly mediaType: string;
1666
+ readonly fileName?: string | undefined;
1667
+ readonly data: string | URL | Uint8Array<ArrayBufferLike>;
1405
1668
  readonly "~effect/ai/Prompt/Part": "~effect/ai/Prompt/Part";
1406
1669
  readonly options: {
1407
1670
  readonly [x: string]: Schema.Json;
1408
1671
  };
1409
- })[] | undefined;
1672
+ })[]];
1673
+ readonly runId: string;
1410
1674
  } | {
1411
- readonly _tag: "AssistantPartial";
1675
+ readonly createdAtMs?: number | undefined;
1676
+ readonly messageId: string;
1677
+ readonly seq: number;
1678
+ readonly _tag: "Assistant";
1412
1679
  readonly content: {
1413
1680
  readonly text: string;
1414
1681
  readonly reasoning?: string | undefined;
1415
1682
  };
1416
- readonly messageId: string;
1417
- readonly reason: string;
1418
- readonly seq: number;
1419
- readonly runId: string;
1683
+ readonly imported?: true | undefined;
1420
1684
  readonly inferenceId: string;
1421
- readonly turnId: string;
1422
- readonly createdAtMs?: number | undefined;
1423
1685
  readonly promptParts?: readonly ({
1424
1686
  readonly type: "text";
1425
1687
  readonly text: string;
@@ -1429,13 +1691,13 @@ declare const encodeEdaRpcSessionSnapshot: (input: {
1429
1691
  };
1430
1692
  } | {
1431
1693
  readonly type: "file";
1694
+ readonly mediaType: string;
1695
+ readonly fileName?: string | undefined;
1696
+ readonly data: string | URL | Uint8Array<ArrayBufferLike>;
1432
1697
  readonly "~effect/ai/Prompt/Part": "~effect/ai/Prompt/Part";
1433
1698
  readonly options: {
1434
1699
  readonly [x: string]: Schema.Json;
1435
1700
  };
1436
- readonly mediaType: string;
1437
- readonly data: string | URL | Uint8Array<ArrayBufferLike>;
1438
- readonly fileName?: string | undefined;
1439
1701
  } | {
1440
1702
  readonly type: "reasoning";
1441
1703
  readonly text: string;
@@ -1451,328 +1713,96 @@ declare const encodeEdaRpcSessionSnapshot: (input: {
1451
1713
  readonly providerExecuted: boolean;
1452
1714
  readonly "~effect/ai/Prompt/Part": "~effect/ai/Prompt/Part";
1453
1715
  readonly options: {
1454
- readonly [x: string]: Schema.Json;
1455
- };
1456
- } | {
1457
- readonly type: "tool-result";
1458
- readonly id: string;
1459
- readonly name: string;
1460
- readonly isFailure: boolean;
1461
- readonly result: unknown;
1462
- readonly "~effect/ai/Prompt/Part": "~effect/ai/Prompt/Part";
1463
- readonly options: {
1464
- readonly [x: string]: Schema.Json;
1465
- };
1466
- } | {
1467
- readonly type: "tool-approval-request";
1468
- readonly approvalId: string;
1469
- readonly toolCallId: string;
1470
- readonly "~effect/ai/Prompt/Part": "~effect/ai/Prompt/Part";
1471
- readonly options: {
1472
- readonly [x: string]: Schema.Json;
1473
- };
1474
- })[] | undefined;
1475
- }>;
1476
- readonly lastSeq: number;
1477
- readonly commands: ReadonlyMap<string, {
1478
- readonly commandId: string;
1479
- readonly command?: {
1480
- readonly _tag: "SubmitMessage";
1481
- readonly disposition: "queue" | "steer" | "interrupt";
1482
- readonly content: string | readonly [{
1483
- readonly text: string;
1484
- readonly type: "text";
1485
- readonly "~effect/ai/Prompt/Part"?: "~effect/ai/Prompt/Part" | undefined;
1486
- readonly options?: {
1487
- readonly [x: string]: Schema.Json;
1488
- } | undefined;
1489
- } | {
1490
- readonly type: "file";
1491
- readonly mediaType: string;
1492
- readonly data: string | URL | Uint8Array<ArrayBufferLike>;
1493
- readonly "~effect/ai/Prompt/Part"?: "~effect/ai/Prompt/Part" | undefined;
1494
- readonly options?: {
1495
- readonly [x: string]: Schema.Json;
1496
- } | undefined;
1497
- readonly fileName?: string | undefined;
1498
- }, ...({
1499
- readonly text: string;
1500
- readonly type: "text";
1501
- readonly "~effect/ai/Prompt/Part"?: "~effect/ai/Prompt/Part" | undefined;
1502
- readonly options?: {
1503
- readonly [x: string]: Schema.Json;
1504
- } | undefined;
1505
- } | {
1506
- readonly type: "file";
1507
- readonly mediaType: string;
1508
- readonly data: string | URL | Uint8Array<ArrayBufferLike>;
1509
- readonly "~effect/ai/Prompt/Part"?: "~effect/ai/Prompt/Part" | undefined;
1510
- readonly options?: {
1511
- readonly [x: string]: Schema.Json;
1512
- } | undefined;
1513
- readonly fileName?: string | undefined;
1514
- })[]];
1515
- readonly expectedPausedMessageIdsToCancel?: readonly string[] | undefined;
1516
- readonly commandId?: string | undefined;
1517
- readonly idempotencyKey?: string | undefined;
1518
- } | {
1519
- readonly _tag: "StopTurn";
1520
- readonly commandId?: string | undefined;
1521
- readonly idempotencyKey?: string | undefined;
1522
- } | {
1523
- readonly _tag: "CancelPendingMessage";
1524
- readonly messageId: string;
1525
- readonly reason: "edit" | "user-cancel";
1526
- readonly commandId?: string | undefined;
1527
- readonly idempotencyKey?: string | undefined;
1528
- } | {
1529
- readonly _tag: "PromotePendingMessage";
1530
- readonly messageId: string;
1531
- readonly commandId?: string | undefined;
1532
- readonly idempotencyKey?: string | undefined;
1533
- } | {
1534
- readonly _tag: "ResumePendingMessages";
1535
- readonly messageIds: readonly [string, ...string[]];
1536
- readonly commandId?: string | undefined;
1537
- readonly idempotencyKey?: string | undefined;
1538
- } | undefined;
1539
- readonly admittedSeq?: number | undefined;
1540
- readonly admissionTrace?: {
1541
- readonly span: {
1542
- readonly traceId: string;
1543
- readonly spanId: string;
1544
- readonly sampled: boolean;
1545
- readonly tracestate: string | null;
1546
- };
1547
- readonly links: readonly {
1548
- readonly context: {
1549
- readonly traceId: string;
1550
- readonly spanId: string;
1551
- readonly sampled: boolean;
1552
- readonly tracestate: string | null;
1553
- };
1554
- readonly attributes: {
1555
- readonly [x: string]: string | number | boolean;
1556
- };
1557
- }[];
1558
- } | undefined;
1559
- readonly startedSeq?: number | undefined;
1560
- readonly terminal?: {
1561
- readonly _tag: "Completed";
1562
- readonly seq: number;
1563
- } | {
1564
- readonly _tag: "Failed";
1565
- readonly error: {
1566
- readonly message: string;
1567
- readonly code?: string | undefined;
1568
- readonly details?: unknown;
1569
- };
1570
- readonly seq: number;
1571
- } | {
1572
- readonly _tag: "Cancelled";
1573
- readonly reason: string;
1574
- readonly seq: number;
1575
- } | undefined;
1576
- }>;
1577
- readonly runs: ReadonlyMap<string, {
1578
- readonly trace: {
1579
- readonly root: {
1580
- readonly traceId: string;
1581
- readonly spanId: string;
1582
- readonly sampled: boolean;
1583
- readonly tracestate: string | null;
1584
- };
1585
- readonly links: readonly {
1586
- readonly context: {
1587
- readonly traceId: string;
1588
- readonly spanId: string;
1589
- readonly sampled: boolean;
1590
- readonly tracestate: string | null;
1591
- };
1592
- readonly attributes: {
1593
- readonly [x: string]: string | number | boolean;
1594
- };
1595
- }[];
1596
- };
1597
- readonly runId: string;
1598
- readonly startedSeq: number;
1599
- readonly commandIds: readonly string[];
1600
- readonly modelSelection?: {
1601
- readonly provider: string;
1602
- readonly modelId: string;
1603
- readonly settings?: unknown;
1604
- } | undefined;
1605
- readonly terminal?: {
1606
- readonly _tag: "Completed";
1607
- readonly seq: number;
1608
- } | {
1609
- readonly _tag: "Failed";
1610
- readonly error: {
1611
- readonly message: string;
1612
- readonly code?: string | undefined;
1613
- readonly details?: unknown;
1716
+ readonly [x: string]: Schema.Json;
1614
1717
  };
1615
- readonly seq: number;
1616
- } | {
1617
- readonly _tag: "Interrupted";
1618
- readonly reason: string;
1619
- readonly seq: number;
1620
- } | undefined;
1621
- readonly durationMs?: number | undefined;
1622
- readonly startedAtMs?: number | undefined;
1623
- readonly terminalAtMs?: number | undefined;
1624
- }>;
1625
- readonly recoveryContinuations: ReadonlyMap<string, {
1626
- readonly seq: number;
1627
- readonly commandId: string;
1628
- readonly interruptedRunId: string;
1629
- readonly replacementRunId: string;
1630
- }>;
1631
- readonly turns: ReadonlyMap<string, {
1632
- readonly runId: string;
1633
- readonly turnId: string;
1634
- readonly startedSeq: number;
1635
- readonly terminal?: {
1636
- readonly _tag: "Completed";
1637
- readonly seq: number;
1638
- readonly usage?: {
1639
- readonly inputTokens?: number | undefined;
1640
- readonly cachedInputTokens?: number | undefined;
1641
- readonly cacheWriteInputTokens?: number | undefined;
1642
- readonly outputTokens?: number | undefined;
1643
- readonly textTokens?: number | undefined;
1644
- readonly reasoningTokens?: number | undefined;
1645
- } | undefined;
1646
1718
  } | {
1647
- readonly _tag: "Failed";
1648
- readonly error: {
1649
- readonly message: string;
1650
- readonly code?: string | undefined;
1651
- readonly details?: unknown;
1719
+ readonly type: "tool-result";
1720
+ readonly id: string;
1721
+ readonly name: string;
1722
+ readonly isFailure: boolean;
1723
+ readonly result: unknown;
1724
+ readonly providerExecuted: boolean;
1725
+ readonly "~effect/ai/Prompt/Part": "~effect/ai/Prompt/Part";
1726
+ readonly options: {
1727
+ readonly [x: string]: Schema.Json;
1652
1728
  };
1653
- readonly seq: number;
1654
1729
  } | {
1655
- readonly _tag: "Stopped";
1656
- readonly reason: string;
1657
- readonly seq: number;
1658
- } | undefined;
1659
- readonly durationMs?: number | undefined;
1660
- readonly startedAtMs?: number | undefined;
1661
- readonly terminalAtMs?: number | undefined;
1662
- }>;
1663
- readonly inferences: ReadonlyMap<string, {
1730
+ readonly type: "tool-approval-request";
1731
+ readonly approvalId: string;
1732
+ readonly toolCallId: string;
1733
+ readonly "~effect/ai/Prompt/Part": "~effect/ai/Prompt/Part";
1734
+ readonly options: {
1735
+ readonly [x: string]: Schema.Json;
1736
+ };
1737
+ })[] | undefined;
1664
1738
  readonly runId: string;
1665
- readonly inferenceId: string;
1666
1739
  readonly turnId: string;
1667
- readonly startedSeq: number;
1668
- readonly terminal?: {
1669
- readonly _tag: "Completed";
1670
- readonly seq: number;
1671
- readonly usage?: {
1672
- readonly inputTokens?: number | undefined;
1673
- readonly cachedInputTokens?: number | undefined;
1674
- readonly cacheWriteInputTokens?: number | undefined;
1675
- readonly outputTokens?: number | undefined;
1676
- readonly textTokens?: number | undefined;
1677
- readonly reasoningTokens?: number | undefined;
1678
- } | undefined;
1740
+ } | {
1741
+ readonly createdAtMs?: number | undefined;
1742
+ readonly messageId: string;
1743
+ readonly seq: number;
1744
+ readonly _tag: "AssistantPartial";
1745
+ readonly content: {
1746
+ readonly text: string;
1747
+ readonly reasoning?: string | undefined;
1748
+ };
1749
+ readonly inferenceId: string;
1750
+ readonly promptParts?: readonly ({
1751
+ readonly type: "text";
1752
+ readonly text: string;
1753
+ readonly "~effect/ai/Prompt/Part": "~effect/ai/Prompt/Part";
1754
+ readonly options: {
1755
+ readonly [x: string]: Schema.Json;
1756
+ };
1679
1757
  } | {
1680
- readonly _tag: "Failed";
1681
- readonly error: {
1682
- readonly message: string;
1683
- readonly code?: string | undefined;
1684
- readonly details?: unknown;
1758
+ readonly type: "file";
1759
+ readonly mediaType: string;
1760
+ readonly fileName?: string | undefined;
1761
+ readonly data: string | URL | Uint8Array<ArrayBufferLike>;
1762
+ readonly "~effect/ai/Prompt/Part": "~effect/ai/Prompt/Part";
1763
+ readonly options: {
1764
+ readonly [x: string]: Schema.Json;
1685
1765
  };
1686
- readonly seq: number;
1687
- } | undefined;
1688
- readonly durationMs?: number | undefined;
1689
- readonly startedAtMs?: number | undefined;
1690
- readonly terminalAtMs?: number | undefined;
1691
- }>;
1692
- readonly toolCalls: ReadonlyMap<string, {
1693
- readonly toolCallId: string & import("effect/Brand").Brand<"ToolCallId">;
1694
- readonly startedSeq?: (number & import("effect/Brand").Brand<"SequenceNumber">) | undefined;
1695
- readonly terminal?: {
1696
- readonly _tag: "Completed";
1697
- readonly seq: number & import("effect/Brand").Brand<"SequenceNumber">;
1698
- readonly result: unknown;
1699
- readonly promptPart?: {
1700
- readonly type: "tool-result";
1701
- readonly id: string;
1702
- readonly name: string;
1703
- readonly isFailure: boolean;
1704
- readonly result: unknown;
1705
- readonly "~effect/ai/Prompt/Part": "~effect/ai/Prompt/Part";
1706
- readonly options: {
1707
- readonly [x: string]: Schema.Json;
1708
- };
1709
- } | undefined;
1710
1766
  } | {
1711
- readonly _tag: "Failed";
1712
- readonly seq: number & import("effect/Brand").Brand<"SequenceNumber">;
1713
- readonly error: {
1714
- readonly message: string;
1715
- readonly code?: string | undefined;
1716
- readonly details?: unknown;
1767
+ readonly type: "reasoning";
1768
+ readonly text: string;
1769
+ readonly "~effect/ai/Prompt/Part": "~effect/ai/Prompt/Part";
1770
+ readonly options: {
1771
+ readonly [x: string]: Schema.Json;
1717
1772
  };
1718
- readonly promptPart?: {
1719
- readonly type: "tool-result";
1720
- readonly id: string;
1721
- readonly name: string;
1722
- readonly isFailure: boolean;
1723
- readonly result: unknown;
1724
- readonly "~effect/ai/Prompt/Part": "~effect/ai/Prompt/Part";
1725
- readonly options: {
1726
- readonly [x: string]: Schema.Json;
1727
- };
1728
- } | undefined;
1729
- } | undefined;
1730
- readonly durationMs?: number | undefined;
1731
- readonly startedAtMs?: number | undefined;
1732
- readonly terminalAtMs?: number | undefined;
1733
- readonly decision?: {
1734
- readonly _tag: "Created";
1735
- readonly seq: number & import("effect/Brand").Brand<"SequenceNumber">;
1736
- readonly runId: string & import("effect/Brand").Brand<"RunId">;
1737
- readonly inferenceId: string & import("effect/Brand").Brand<"InferenceId">;
1738
- readonly turnId: string & import("effect/Brand").Brand<"TurnId">;
1773
+ } | {
1774
+ readonly type: "tool-call";
1775
+ readonly id: string;
1776
+ readonly name: string;
1739
1777
  readonly params: unknown;
1740
1778
  readonly providerExecuted: boolean;
1741
- readonly providerPartId: string & import("effect/Brand").Brand<"ProviderPartId">;
1742
- readonly toolName: string;
1743
- readonly promptPart?: {
1744
- readonly type: "tool-call";
1745
- readonly id: string;
1746
- readonly name: string;
1747
- readonly params: unknown;
1748
- readonly providerExecuted: boolean;
1749
- readonly "~effect/ai/Prompt/Part": "~effect/ai/Prompt/Part";
1750
- readonly options: {
1751
- readonly [x: string]: Schema.Json;
1752
- };
1753
- } | undefined;
1779
+ readonly "~effect/ai/Prompt/Part": "~effect/ai/Prompt/Part";
1780
+ readonly options: {
1781
+ readonly [x: string]: Schema.Json;
1782
+ };
1754
1783
  } | {
1755
- readonly _tag: "Rejected";
1756
- readonly reason: "unknown-tool" | "invalid-params";
1757
- readonly seq: number & import("effect/Brand").Brand<"SequenceNumber">;
1758
- readonly runId: string & import("effect/Brand").Brand<"RunId">;
1759
- readonly inferenceId: string & import("effect/Brand").Brand<"InferenceId">;
1760
- readonly turnId: string & import("effect/Brand").Brand<"TurnId">;
1761
- readonly providerPartId: string & import("effect/Brand").Brand<"ProviderPartId">;
1762
- readonly toolName: string;
1763
- readonly modelFeedback: string;
1764
- readonly promptPart?: {
1765
- readonly type: "tool-result";
1766
- readonly id: string;
1767
- readonly name: string;
1768
- readonly isFailure: boolean;
1769
- readonly result: unknown;
1770
- readonly "~effect/ai/Prompt/Part": "~effect/ai/Prompt/Part";
1771
- readonly options: {
1772
- readonly [x: string]: Schema.Json;
1773
- };
1774
- } | undefined;
1775
- } | undefined;
1784
+ readonly type: "tool-result";
1785
+ readonly id: string;
1786
+ readonly name: string;
1787
+ readonly isFailure: boolean;
1788
+ readonly result: unknown;
1789
+ readonly providerExecuted: boolean;
1790
+ readonly "~effect/ai/Prompt/Part": "~effect/ai/Prompt/Part";
1791
+ readonly options: {
1792
+ readonly [x: string]: Schema.Json;
1793
+ };
1794
+ } | {
1795
+ readonly type: "tool-approval-request";
1796
+ readonly approvalId: string;
1797
+ readonly toolCallId: string;
1798
+ readonly "~effect/ai/Prompt/Part": "~effect/ai/Prompt/Part";
1799
+ readonly options: {
1800
+ readonly [x: string]: Schema.Json;
1801
+ };
1802
+ })[] | undefined;
1803
+ readonly reason: string;
1804
+ readonly runId: string;
1805
+ readonly turnId: string;
1776
1806
  }>;
1777
1807
  readonly stopRequests: ReadonlyMap<string, {
1778
1808
  readonly commandId: string;
@@ -1788,6 +1818,12 @@ declare const encodeEdaRpcSessionSnapshot: (input: {
1788
1818
  readonly compactionId: string;
1789
1819
  readonly requestedSeq?: number | undefined;
1790
1820
  readonly startedSeq?: number | undefined;
1821
+ readonly summaryCreatedSeq?: number | undefined;
1822
+ readonly summaryId?: string | undefined;
1823
+ readonly sourceFromSeq?: number | undefined;
1824
+ readonly sourceToSeq?: number | undefined;
1825
+ readonly rebasedSeq?: number | undefined;
1826
+ readonly contextVersion?: number | undefined;
1791
1827
  readonly terminal?: {
1792
1828
  readonly _tag: "Completed";
1793
1829
  readonly seq: number;
@@ -1800,12 +1836,6 @@ declare const encodeEdaRpcSessionSnapshot: (input: {
1800
1836
  readonly details?: unknown;
1801
1837
  };
1802
1838
  } | undefined;
1803
- readonly summaryCreatedSeq?: number | undefined;
1804
- readonly summaryId?: string | undefined;
1805
- readonly sourceFromSeq?: number | undefined;
1806
- readonly sourceToSeq?: number | undefined;
1807
- readonly rebasedSeq?: number | undefined;
1808
- readonly contextVersion?: number | undefined;
1809
1839
  }>;
1810
1840
  readonly context: {
1811
1841
  readonly version: number;
@@ -1826,14 +1856,20 @@ declare const encodeEdaRpcSessionSnapshot: (input: {
1826
1856
  }[];
1827
1857
  };
1828
1858
  readonly commandQueues: {
1859
+ readonly active?: {
1860
+ readonly commandId: string;
1861
+ readonly runId?: string | undefined;
1862
+ } | undefined;
1829
1863
  readonly pendingCommands: readonly {
1830
1864
  readonly commandId: string;
1831
1865
  readonly command: {
1832
1866
  readonly _tag: "SubmitMessage";
1833
- readonly disposition: "queue" | "steer" | "interrupt";
1867
+ readonly commandId?: string | undefined;
1868
+ readonly idempotencyKey?: string | undefined;
1869
+ readonly disposition: "interrupt" | "queue" | "steer";
1834
1870
  readonly content: string | readonly [{
1835
- readonly text: string;
1836
1871
  readonly type: "text";
1872
+ readonly text: string;
1837
1873
  readonly "~effect/ai/Prompt/Part"?: "~effect/ai/Prompt/Part" | undefined;
1838
1874
  readonly options?: {
1839
1875
  readonly [x: string]: Schema.Json;
@@ -1841,15 +1877,15 @@ declare const encodeEdaRpcSessionSnapshot: (input: {
1841
1877
  } | {
1842
1878
  readonly type: "file";
1843
1879
  readonly mediaType: string;
1880
+ readonly fileName?: string | undefined;
1844
1881
  readonly data: string | URL | Uint8Array<ArrayBufferLike>;
1845
1882
  readonly "~effect/ai/Prompt/Part"?: "~effect/ai/Prompt/Part" | undefined;
1846
1883
  readonly options?: {
1847
1884
  readonly [x: string]: Schema.Json;
1848
1885
  } | undefined;
1849
- readonly fileName?: string | undefined;
1850
1886
  }, ...({
1851
- readonly text: string;
1852
1887
  readonly type: "text";
1888
+ readonly text: string;
1853
1889
  readonly "~effect/ai/Prompt/Part"?: "~effect/ai/Prompt/Part" | undefined;
1854
1890
  readonly options?: {
1855
1891
  readonly [x: string]: Schema.Json;
@@ -1857,36 +1893,34 @@ declare const encodeEdaRpcSessionSnapshot: (input: {
1857
1893
  } | {
1858
1894
  readonly type: "file";
1859
1895
  readonly mediaType: string;
1896
+ readonly fileName?: string | undefined;
1860
1897
  readonly data: string | URL | Uint8Array<ArrayBufferLike>;
1861
1898
  readonly "~effect/ai/Prompt/Part"?: "~effect/ai/Prompt/Part" | undefined;
1862
1899
  readonly options?: {
1863
1900
  readonly [x: string]: Schema.Json;
1864
1901
  } | undefined;
1865
- readonly fileName?: string | undefined;
1866
1902
  })[]];
1867
1903
  readonly expectedPausedMessageIdsToCancel?: readonly string[] | undefined;
1868
- readonly commandId?: string | undefined;
1869
- readonly idempotencyKey?: string | undefined;
1870
1904
  } | {
1871
1905
  readonly _tag: "StopTurn";
1872
1906
  readonly commandId?: string | undefined;
1873
1907
  readonly idempotencyKey?: string | undefined;
1874
1908
  } | {
1875
1909
  readonly _tag: "CancelPendingMessage";
1876
- readonly messageId: string;
1877
- readonly reason: "edit" | "user-cancel";
1878
1910
  readonly commandId?: string | undefined;
1879
1911
  readonly idempotencyKey?: string | undefined;
1912
+ readonly messageId: string;
1913
+ readonly reason: "edit" | "user-cancel";
1880
1914
  } | {
1881
1915
  readonly _tag: "PromotePendingMessage";
1882
- readonly messageId: string;
1883
1916
  readonly commandId?: string | undefined;
1884
1917
  readonly idempotencyKey?: string | undefined;
1918
+ readonly messageId: string;
1885
1919
  } | {
1886
1920
  readonly _tag: "ResumePendingMessages";
1887
- readonly messageIds: readonly [string, ...string[]];
1888
1921
  readonly commandId?: string | undefined;
1889
1922
  readonly idempotencyKey?: string | undefined;
1923
+ readonly messageIds: readonly [string, ...string[]];
1890
1924
  };
1891
1925
  readonly admittedSeq: number;
1892
1926
  readonly admissionTrace?: {
@@ -1913,10 +1947,12 @@ declare const encodeEdaRpcSessionSnapshot: (input: {
1913
1947
  readonly commandId: string;
1914
1948
  readonly command: {
1915
1949
  readonly _tag: "SubmitMessage";
1916
- readonly disposition: "queue" | "steer" | "interrupt";
1950
+ readonly commandId?: string | undefined;
1951
+ readonly idempotencyKey?: string | undefined;
1952
+ readonly disposition: "interrupt" | "queue" | "steer";
1917
1953
  readonly content: string | readonly [{
1918
- readonly text: string;
1919
1954
  readonly type: "text";
1955
+ readonly text: string;
1920
1956
  readonly "~effect/ai/Prompt/Part"?: "~effect/ai/Prompt/Part" | undefined;
1921
1957
  readonly options?: {
1922
1958
  readonly [x: string]: Schema.Json;
@@ -1924,15 +1960,15 @@ declare const encodeEdaRpcSessionSnapshot: (input: {
1924
1960
  } | {
1925
1961
  readonly type: "file";
1926
1962
  readonly mediaType: string;
1963
+ readonly fileName?: string | undefined;
1927
1964
  readonly data: string | URL | Uint8Array<ArrayBufferLike>;
1928
1965
  readonly "~effect/ai/Prompt/Part"?: "~effect/ai/Prompt/Part" | undefined;
1929
1966
  readonly options?: {
1930
1967
  readonly [x: string]: Schema.Json;
1931
1968
  } | undefined;
1932
- readonly fileName?: string | undefined;
1933
1969
  }, ...({
1934
- readonly text: string;
1935
1970
  readonly type: "text";
1971
+ readonly text: string;
1936
1972
  readonly "~effect/ai/Prompt/Part"?: "~effect/ai/Prompt/Part" | undefined;
1937
1973
  readonly options?: {
1938
1974
  readonly [x: string]: Schema.Json;
@@ -1940,36 +1976,34 @@ declare const encodeEdaRpcSessionSnapshot: (input: {
1940
1976
  } | {
1941
1977
  readonly type: "file";
1942
1978
  readonly mediaType: string;
1979
+ readonly fileName?: string | undefined;
1943
1980
  readonly data: string | URL | Uint8Array<ArrayBufferLike>;
1944
1981
  readonly "~effect/ai/Prompt/Part"?: "~effect/ai/Prompt/Part" | undefined;
1945
1982
  readonly options?: {
1946
1983
  readonly [x: string]: Schema.Json;
1947
1984
  } | undefined;
1948
- readonly fileName?: string | undefined;
1949
1985
  })[]];
1950
1986
  readonly expectedPausedMessageIdsToCancel?: readonly string[] | undefined;
1951
- readonly commandId?: string | undefined;
1952
- readonly idempotencyKey?: string | undefined;
1953
1987
  } | {
1954
1988
  readonly _tag: "StopTurn";
1955
1989
  readonly commandId?: string | undefined;
1956
1990
  readonly idempotencyKey?: string | undefined;
1957
1991
  } | {
1958
1992
  readonly _tag: "CancelPendingMessage";
1959
- readonly messageId: string;
1960
- readonly reason: "edit" | "user-cancel";
1961
1993
  readonly commandId?: string | undefined;
1962
1994
  readonly idempotencyKey?: string | undefined;
1995
+ readonly messageId: string;
1996
+ readonly reason: "edit" | "user-cancel";
1963
1997
  } | {
1964
1998
  readonly _tag: "PromotePendingMessage";
1965
- readonly messageId: string;
1966
1999
  readonly commandId?: string | undefined;
1967
2000
  readonly idempotencyKey?: string | undefined;
2001
+ readonly messageId: string;
1968
2002
  } | {
1969
2003
  readonly _tag: "ResumePendingMessages";
1970
- readonly messageIds: readonly [string, ...string[]];
1971
2004
  readonly commandId?: string | undefined;
1972
2005
  readonly idempotencyKey?: string | undefined;
2006
+ readonly messageIds: readonly [string, ...string[]];
1973
2007
  };
1974
2008
  readonly admittedSeq: number;
1975
2009
  readonly admissionTrace?: {
@@ -1996,10 +2030,12 @@ declare const encodeEdaRpcSessionSnapshot: (input: {
1996
2030
  readonly commandId: string;
1997
2031
  readonly command: {
1998
2032
  readonly _tag: "SubmitMessage";
1999
- readonly disposition: "queue" | "steer" | "interrupt";
2033
+ readonly commandId?: string | undefined;
2034
+ readonly idempotencyKey?: string | undefined;
2035
+ readonly disposition: "interrupt" | "queue" | "steer";
2000
2036
  readonly content: string | readonly [{
2001
- readonly text: string;
2002
2037
  readonly type: "text";
2038
+ readonly text: string;
2003
2039
  readonly "~effect/ai/Prompt/Part"?: "~effect/ai/Prompt/Part" | undefined;
2004
2040
  readonly options?: {
2005
2041
  readonly [x: string]: Schema.Json;
@@ -2007,15 +2043,15 @@ declare const encodeEdaRpcSessionSnapshot: (input: {
2007
2043
  } | {
2008
2044
  readonly type: "file";
2009
2045
  readonly mediaType: string;
2046
+ readonly fileName?: string | undefined;
2010
2047
  readonly data: string | URL | Uint8Array<ArrayBufferLike>;
2011
2048
  readonly "~effect/ai/Prompt/Part"?: "~effect/ai/Prompt/Part" | undefined;
2012
2049
  readonly options?: {
2013
2050
  readonly [x: string]: Schema.Json;
2014
2051
  } | undefined;
2015
- readonly fileName?: string | undefined;
2016
2052
  }, ...({
2017
- readonly text: string;
2018
2053
  readonly type: "text";
2054
+ readonly text: string;
2019
2055
  readonly "~effect/ai/Prompt/Part"?: "~effect/ai/Prompt/Part" | undefined;
2020
2056
  readonly options?: {
2021
2057
  readonly [x: string]: Schema.Json;
@@ -2023,36 +2059,34 @@ declare const encodeEdaRpcSessionSnapshot: (input: {
2023
2059
  } | {
2024
2060
  readonly type: "file";
2025
2061
  readonly mediaType: string;
2062
+ readonly fileName?: string | undefined;
2026
2063
  readonly data: string | URL | Uint8Array<ArrayBufferLike>;
2027
2064
  readonly "~effect/ai/Prompt/Part"?: "~effect/ai/Prompt/Part" | undefined;
2028
2065
  readonly options?: {
2029
2066
  readonly [x: string]: Schema.Json;
2030
2067
  } | undefined;
2031
- readonly fileName?: string | undefined;
2032
2068
  })[]];
2033
2069
  readonly expectedPausedMessageIdsToCancel?: readonly string[] | undefined;
2034
- readonly commandId?: string | undefined;
2035
- readonly idempotencyKey?: string | undefined;
2036
2070
  } | {
2037
2071
  readonly _tag: "StopTurn";
2038
2072
  readonly commandId?: string | undefined;
2039
2073
  readonly idempotencyKey?: string | undefined;
2040
2074
  } | {
2041
2075
  readonly _tag: "CancelPendingMessage";
2042
- readonly messageId: string;
2043
- readonly reason: "edit" | "user-cancel";
2044
2076
  readonly commandId?: string | undefined;
2045
2077
  readonly idempotencyKey?: string | undefined;
2078
+ readonly messageId: string;
2079
+ readonly reason: "edit" | "user-cancel";
2046
2080
  } | {
2047
2081
  readonly _tag: "PromotePendingMessage";
2048
- readonly messageId: string;
2049
2082
  readonly commandId?: string | undefined;
2050
2083
  readonly idempotencyKey?: string | undefined;
2084
+ readonly messageId: string;
2051
2085
  } | {
2052
2086
  readonly _tag: "ResumePendingMessages";
2053
- readonly messageIds: readonly [string, ...string[]];
2054
2087
  readonly commandId?: string | undefined;
2055
2088
  readonly idempotencyKey?: string | undefined;
2089
+ readonly messageIds: readonly [string, ...string[]];
2056
2090
  };
2057
2091
  readonly admittedSeq: number;
2058
2092
  readonly admissionTrace?: {
@@ -2076,6 +2110,9 @@ declare const encodeEdaRpcSessionSnapshot: (input: {
2076
2110
  } | undefined;
2077
2111
  }[];
2078
2112
  readonly steeringByRun: ReadonlyMap<string, readonly {
2113
+ readonly messageId: string;
2114
+ readonly commandId: string;
2115
+ readonly runId: string;
2079
2116
  readonly content: readonly [{
2080
2117
  readonly type: "text";
2081
2118
  readonly text: string;
@@ -2099,13 +2136,13 @@ declare const encodeEdaRpcSessionSnapshot: (input: {
2099
2136
  };
2100
2137
  } | {
2101
2138
  readonly type: "file";
2139
+ readonly mediaType: string;
2140
+ readonly fileName?: string | undefined;
2141
+ readonly data: string | URL | Uint8Array<ArrayBufferLike>;
2102
2142
  readonly "~effect/ai/Prompt/Part": "~effect/ai/Prompt/Part";
2103
2143
  readonly options: {
2104
2144
  readonly [x: string]: Schema.Json;
2105
2145
  };
2106
- readonly mediaType: string;
2107
- readonly data: string | URL | Uint8Array<ArrayBufferLike>;
2108
- readonly fileName?: string | undefined;
2109
2146
  }, ...({
2110
2147
  readonly type: "text";
2111
2148
  readonly text: string;
@@ -2115,23 +2152,21 @@ declare const encodeEdaRpcSessionSnapshot: (input: {
2115
2152
  };
2116
2153
  } | {
2117
2154
  readonly type: "file";
2155
+ readonly mediaType: string;
2156
+ readonly fileName?: string | undefined;
2157
+ readonly data: string | URL | Uint8Array<ArrayBufferLike>;
2118
2158
  readonly "~effect/ai/Prompt/Part": "~effect/ai/Prompt/Part";
2119
2159
  readonly options: {
2120
2160
  readonly [x: string]: Schema.Json;
2121
2161
  };
2122
- readonly mediaType: string;
2123
- readonly data: string | URL | Uint8Array<ArrayBufferLike>;
2124
- readonly fileName?: string | undefined;
2125
2162
  })[]];
2126
- readonly commandId: string;
2127
- readonly messageId: string;
2128
- readonly runId: string;
2129
2163
  readonly queuedSeq: number;
2130
2164
  readonly consumedSeq?: number | undefined;
2131
2165
  readonly consumedTurnId?: string | undefined;
2132
2166
  }[]>;
2133
2167
  readonly pendingQueue: readonly {
2134
- readonly disposition: "queue" | "steer";
2168
+ readonly messageId: string;
2169
+ readonly commandId: string;
2135
2170
  readonly content: readonly [{
2136
2171
  readonly type: "text";
2137
2172
  readonly text: string;
@@ -2155,13 +2190,13 @@ declare const encodeEdaRpcSessionSnapshot: (input: {
2155
2190
  };
2156
2191
  } | {
2157
2192
  readonly type: "file";
2193
+ readonly mediaType: string;
2194
+ readonly fileName?: string | undefined;
2195
+ readonly data: string | URL | Uint8Array<ArrayBufferLike>;
2158
2196
  readonly "~effect/ai/Prompt/Part": "~effect/ai/Prompt/Part";
2159
2197
  readonly options: {
2160
2198
  readonly [x: string]: Schema.Json;
2161
2199
  };
2162
- readonly mediaType: string;
2163
- readonly data: string | URL | Uint8Array<ArrayBufferLike>;
2164
- readonly fileName?: string | undefined;
2165
2200
  }, ...({
2166
2201
  readonly type: "text";
2167
2202
  readonly text: string;
@@ -2171,23 +2206,23 @@ declare const encodeEdaRpcSessionSnapshot: (input: {
2171
2206
  };
2172
2207
  } | {
2173
2208
  readonly type: "file";
2209
+ readonly mediaType: string;
2210
+ readonly fileName?: string | undefined;
2211
+ readonly data: string | URL | Uint8Array<ArrayBufferLike>;
2174
2212
  readonly "~effect/ai/Prompt/Part": "~effect/ai/Prompt/Part";
2175
2213
  readonly options: {
2176
2214
  readonly [x: string]: Schema.Json;
2177
2215
  };
2178
- readonly mediaType: string;
2179
- readonly data: string | URL | Uint8Array<ArrayBufferLike>;
2180
- readonly fileName?: string | undefined;
2181
2216
  })[]];
2182
- readonly commandId: string;
2183
- readonly messageId: string;
2184
2217
  readonly submittedSeq: number;
2185
2218
  readonly effectiveSeq: number;
2186
- readonly pausedByCommandId?: string | undefined;
2219
+ readonly disposition: "queue" | "steer";
2187
2220
  readonly targetRunId?: string | undefined;
2221
+ readonly pausedByCommandId?: string | undefined;
2188
2222
  }[];
2189
2223
  readonly pendingSteers: readonly {
2190
- readonly disposition: "queue" | "steer";
2224
+ readonly messageId: string;
2225
+ readonly commandId: string;
2191
2226
  readonly content: readonly [{
2192
2227
  readonly type: "text";
2193
2228
  readonly text: string;
@@ -2211,13 +2246,13 @@ declare const encodeEdaRpcSessionSnapshot: (input: {
2211
2246
  };
2212
2247
  } | {
2213
2248
  readonly type: "file";
2249
+ readonly mediaType: string;
2250
+ readonly fileName?: string | undefined;
2251
+ readonly data: string | URL | Uint8Array<ArrayBufferLike>;
2214
2252
  readonly "~effect/ai/Prompt/Part": "~effect/ai/Prompt/Part";
2215
2253
  readonly options: {
2216
2254
  readonly [x: string]: Schema.Json;
2217
2255
  };
2218
- readonly mediaType: string;
2219
- readonly data: string | URL | Uint8Array<ArrayBufferLike>;
2220
- readonly fileName?: string | undefined;
2221
2256
  }, ...({
2222
2257
  readonly type: "text";
2223
2258
  readonly text: string;
@@ -2227,23 +2262,23 @@ declare const encodeEdaRpcSessionSnapshot: (input: {
2227
2262
  };
2228
2263
  } | {
2229
2264
  readonly type: "file";
2265
+ readonly mediaType: string;
2266
+ readonly fileName?: string | undefined;
2267
+ readonly data: string | URL | Uint8Array<ArrayBufferLike>;
2230
2268
  readonly "~effect/ai/Prompt/Part": "~effect/ai/Prompt/Part";
2231
2269
  readonly options: {
2232
2270
  readonly [x: string]: Schema.Json;
2233
2271
  };
2234
- readonly mediaType: string;
2235
- readonly data: string | URL | Uint8Array<ArrayBufferLike>;
2236
- readonly fileName?: string | undefined;
2237
2272
  })[]];
2238
- readonly commandId: string;
2239
- readonly messageId: string;
2240
2273
  readonly submittedSeq: number;
2241
2274
  readonly effectiveSeq: number;
2242
- readonly pausedByCommandId?: string | undefined;
2275
+ readonly disposition: "queue" | "steer";
2243
2276
  readonly targetRunId?: string | undefined;
2277
+ readonly pausedByCommandId?: string | undefined;
2244
2278
  }[];
2245
2279
  readonly pausedQueue: readonly {
2246
- readonly disposition: "queue" | "steer";
2280
+ readonly messageId: string;
2281
+ readonly commandId: string;
2247
2282
  readonly content: readonly [{
2248
2283
  readonly type: "text";
2249
2284
  readonly text: string;
@@ -2267,13 +2302,13 @@ declare const encodeEdaRpcSessionSnapshot: (input: {
2267
2302
  };
2268
2303
  } | {
2269
2304
  readonly type: "file";
2305
+ readonly mediaType: string;
2306
+ readonly fileName?: string | undefined;
2307
+ readonly data: string | URL | Uint8Array<ArrayBufferLike>;
2270
2308
  readonly "~effect/ai/Prompt/Part": "~effect/ai/Prompt/Part";
2271
2309
  readonly options: {
2272
2310
  readonly [x: string]: Schema.Json;
2273
2311
  };
2274
- readonly mediaType: string;
2275
- readonly data: string | URL | Uint8Array<ArrayBufferLike>;
2276
- readonly fileName?: string | undefined;
2277
2312
  }, ...({
2278
2313
  readonly type: "text";
2279
2314
  readonly text: string;
@@ -2283,49 +2318,37 @@ declare const encodeEdaRpcSessionSnapshot: (input: {
2283
2318
  };
2284
2319
  } | {
2285
2320
  readonly type: "file";
2321
+ readonly mediaType: string;
2322
+ readonly fileName?: string | undefined;
2323
+ readonly data: string | URL | Uint8Array<ArrayBufferLike>;
2286
2324
  readonly "~effect/ai/Prompt/Part": "~effect/ai/Prompt/Part";
2287
2325
  readonly options: {
2288
2326
  readonly [x: string]: Schema.Json;
2289
2327
  };
2290
- readonly mediaType: string;
2291
- readonly data: string | URL | Uint8Array<ArrayBufferLike>;
2292
- readonly fileName?: string | undefined;
2293
2328
  })[]];
2294
- readonly commandId: string;
2295
- readonly messageId: string;
2296
2329
  readonly submittedSeq: number;
2297
2330
  readonly effectiveSeq: number;
2298
- readonly pausedByCommandId?: string | undefined;
2331
+ readonly disposition: "queue" | "steer";
2299
2332
  readonly targetRunId?: string | undefined;
2333
+ readonly pausedByCommandId?: string | undefined;
2300
2334
  }[];
2301
- readonly active?: {
2302
- readonly commandId: string;
2303
- readonly runId?: string | undefined;
2304
- } | undefined;
2305
2335
  };
2306
- readonly modelSelection?: {
2307
- readonly provider: string;
2308
- readonly modelId: string;
2309
- readonly settings?: unknown;
2310
- } | undefined;
2311
- readonly runSchedulingRequest?: {
2312
- readonly requestId: string;
2313
- readonly requestedSeq: number;
2314
- readonly work: {
2315
- readonly _tag: "Command";
2316
- readonly commandId: string;
2317
- } | {
2318
- readonly _tag: "Recovery";
2319
- readonly commandId: string;
2320
- readonly interruptedRunId: string;
2321
- readonly inputMessageIds: readonly string[];
2322
- };
2323
- readonly deliveredSeq?: number | undefined;
2324
- } | undefined;
2325
2336
  };
2326
2337
  readonly reducerStates: ReadonlyMap<string, unknown>;
2327
2338
  readonly messages: readonly ({
2339
+ readonly createdAtMs?: number | undefined;
2340
+ readonly messageId: string;
2341
+ readonly seq: number;
2342
+ readonly cancellationReason?: string | undefined;
2343
+ readonly cancelledByCommandId?: string | undefined;
2344
+ readonly cancelledSeq?: number | undefined;
2345
+ readonly consumedSeq?: number | undefined;
2346
+ readonly consumedTurnId?: string | undefined;
2347
+ readonly pausedByCommandId?: string | undefined;
2348
+ readonly pausedSeq?: number | undefined;
2349
+ readonly promotedSeq?: number | undefined;
2328
2350
  readonly _tag: "User";
2351
+ readonly commandId: string;
2329
2352
  readonly content: readonly [{
2330
2353
  readonly type: "text";
2331
2354
  readonly text: string;
@@ -2349,13 +2372,13 @@ declare const encodeEdaRpcSessionSnapshot: (input: {
2349
2372
  };
2350
2373
  } | {
2351
2374
  readonly type: "file";
2375
+ readonly mediaType: string;
2376
+ readonly fileName?: string | undefined;
2377
+ readonly data: string | URL | Uint8Array<ArrayBufferLike>;
2352
2378
  readonly "~effect/ai/Prompt/Part": "~effect/ai/Prompt/Part";
2353
2379
  readonly options: {
2354
2380
  readonly [x: string]: Schema.Json;
2355
2381
  };
2356
- readonly mediaType: string;
2357
- readonly data: string | URL | Uint8Array<ArrayBufferLike>;
2358
- readonly fileName?: string | undefined;
2359
2382
  }, ...({
2360
2383
  readonly type: "text";
2361
2384
  readonly text: string;
@@ -2365,41 +2388,27 @@ declare const encodeEdaRpcSessionSnapshot: (input: {
2365
2388
  };
2366
2389
  } | {
2367
2390
  readonly type: "file";
2391
+ readonly mediaType: string;
2392
+ readonly fileName?: string | undefined;
2393
+ readonly data: string | URL | Uint8Array<ArrayBufferLike>;
2368
2394
  readonly "~effect/ai/Prompt/Part": "~effect/ai/Prompt/Part";
2369
2395
  readonly options: {
2370
2396
  readonly [x: string]: Schema.Json;
2371
2397
  };
2372
- readonly mediaType: string;
2373
- readonly data: string | URL | Uint8Array<ArrayBufferLike>;
2374
- readonly fileName?: string | undefined;
2375
2398
  })[]];
2376
- readonly commandId: string;
2377
- readonly messageId: string;
2378
- readonly seq: number;
2379
- readonly createdAtMs?: number | undefined;
2380
2399
  readonly disposition?: "queue" | "steer" | undefined;
2381
2400
  readonly requestedDisposition?: "queue" | "steer" | undefined;
2382
- readonly cancellationReason?: string | undefined;
2383
- readonly cancelledByCommandId?: string | undefined;
2384
- readonly cancelledSeq?: number | undefined;
2385
- readonly consumedSeq?: number | undefined;
2386
- readonly consumedTurnId?: string | undefined;
2387
- readonly pausedByCommandId?: string | undefined;
2388
- readonly pausedSeq?: number | undefined;
2389
- readonly promotedSeq?: number | undefined;
2390
2401
  } | {
2402
+ readonly createdAtMs?: number | undefined;
2403
+ readonly messageId: string;
2404
+ readonly seq: number;
2391
2405
  readonly _tag: "Assistant";
2392
2406
  readonly content: {
2393
2407
  readonly text: string;
2394
2408
  readonly reasoning?: string | undefined;
2395
2409
  };
2396
- readonly messageId: string;
2397
- readonly seq: number;
2398
- readonly runId: string;
2399
- readonly inferenceId: string;
2400
- readonly turnId: string;
2401
- readonly createdAtMs?: number | undefined;
2402
2410
  readonly imported?: true | undefined;
2411
+ readonly inferenceId: string;
2403
2412
  readonly promptParts?: readonly ({
2404
2413
  readonly type: "text";
2405
2414
  readonly text: string;
@@ -2409,13 +2418,13 @@ declare const encodeEdaRpcSessionSnapshot: (input: {
2409
2418
  };
2410
2419
  } | {
2411
2420
  readonly type: "file";
2421
+ readonly mediaType: string;
2422
+ readonly fileName?: string | undefined;
2423
+ readonly data: string | URL | Uint8Array<ArrayBufferLike>;
2412
2424
  readonly "~effect/ai/Prompt/Part": "~effect/ai/Prompt/Part";
2413
2425
  readonly options: {
2414
2426
  readonly [x: string]: Schema.Json;
2415
2427
  };
2416
- readonly mediaType: string;
2417
- readonly data: string | URL | Uint8Array<ArrayBufferLike>;
2418
- readonly fileName?: string | undefined;
2419
2428
  } | {
2420
2429
  readonly type: "reasoning";
2421
2430
  readonly text: string;
@@ -2439,6 +2448,7 @@ declare const encodeEdaRpcSessionSnapshot: (input: {
2439
2448
  readonly name: string;
2440
2449
  readonly isFailure: boolean;
2441
2450
  readonly result: unknown;
2451
+ readonly providerExecuted: boolean;
2442
2452
  readonly "~effect/ai/Prompt/Part": "~effect/ai/Prompt/Part";
2443
2453
  readonly options: {
2444
2454
  readonly [x: string]: Schema.Json;
@@ -2452,19 +2462,18 @@ declare const encodeEdaRpcSessionSnapshot: (input: {
2452
2462
  readonly [x: string]: Schema.Json;
2453
2463
  };
2454
2464
  })[] | undefined;
2465
+ readonly runId: string;
2466
+ readonly turnId: string;
2455
2467
  } | {
2468
+ readonly createdAtMs?: number | undefined;
2469
+ readonly messageId: string;
2470
+ readonly seq: number;
2456
2471
  readonly _tag: "AssistantPartial";
2457
2472
  readonly content: {
2458
2473
  readonly text: string;
2459
2474
  readonly reasoning?: string | undefined;
2460
2475
  };
2461
- readonly messageId: string;
2462
- readonly reason: string;
2463
- readonly seq: number;
2464
- readonly runId: string;
2465
2476
  readonly inferenceId: string;
2466
- readonly turnId: string;
2467
- readonly createdAtMs?: number | undefined;
2468
2477
  readonly promptParts?: readonly ({
2469
2478
  readonly type: "text";
2470
2479
  readonly text: string;
@@ -2474,13 +2483,13 @@ declare const encodeEdaRpcSessionSnapshot: (input: {
2474
2483
  };
2475
2484
  } | {
2476
2485
  readonly type: "file";
2486
+ readonly mediaType: string;
2487
+ readonly fileName?: string | undefined;
2488
+ readonly data: string | URL | Uint8Array<ArrayBufferLike>;
2477
2489
  readonly "~effect/ai/Prompt/Part": "~effect/ai/Prompt/Part";
2478
2490
  readonly options: {
2479
2491
  readonly [x: string]: Schema.Json;
2480
2492
  };
2481
- readonly mediaType: string;
2482
- readonly data: string | URL | Uint8Array<ArrayBufferLike>;
2483
- readonly fileName?: string | undefined;
2484
2493
  } | {
2485
2494
  readonly type: "reasoning";
2486
2495
  readonly text: string;
@@ -2504,6 +2513,7 @@ declare const encodeEdaRpcSessionSnapshot: (input: {
2504
2513
  readonly name: string;
2505
2514
  readonly isFailure: boolean;
2506
2515
  readonly result: unknown;
2516
+ readonly providerExecuted: boolean;
2507
2517
  readonly "~effect/ai/Prompt/Part": "~effect/ai/Prompt/Part";
2508
2518
  readonly options: {
2509
2519
  readonly [x: string]: Schema.Json;
@@ -2517,8 +2527,22 @@ declare const encodeEdaRpcSessionSnapshot: (input: {
2517
2527
  readonly [x: string]: Schema.Json;
2518
2528
  };
2519
2529
  })[] | undefined;
2530
+ readonly reason: string;
2531
+ readonly runId: string;
2532
+ readonly turnId: string;
2520
2533
  } | {
2534
+ readonly createdAtMs?: number | undefined;
2535
+ readonly messageId: string;
2536
+ readonly seq: number;
2537
+ readonly cancellationReason?: string | undefined;
2538
+ readonly cancelledByCommandId?: string | undefined;
2539
+ readonly cancelledSeq?: number | undefined;
2540
+ readonly consumedTurnId?: string | undefined;
2541
+ readonly pausedByCommandId?: string | undefined;
2542
+ readonly pausedSeq?: number | undefined;
2543
+ readonly promotedSeq?: number | undefined;
2521
2544
  readonly _tag: "Steering";
2545
+ readonly commandId: string;
2522
2546
  readonly content: readonly [{
2523
2547
  readonly type: "text";
2524
2548
  readonly text: string;
@@ -2542,13 +2566,13 @@ declare const encodeEdaRpcSessionSnapshot: (input: {
2542
2566
  };
2543
2567
  } | {
2544
2568
  readonly type: "file";
2569
+ readonly mediaType: string;
2570
+ readonly fileName?: string | undefined;
2571
+ readonly data: string | URL | Uint8Array<ArrayBufferLike>;
2545
2572
  readonly "~effect/ai/Prompt/Part": "~effect/ai/Prompt/Part";
2546
2573
  readonly options: {
2547
2574
  readonly [x: string]: Schema.Json;
2548
2575
  };
2549
- readonly mediaType: string;
2550
- readonly data: string | URL | Uint8Array<ArrayBufferLike>;
2551
- readonly fileName?: string | undefined;
2552
2576
  }, ...({
2553
2577
  readonly type: "text";
2554
2578
  readonly text: string;
@@ -2558,27 +2582,16 @@ declare const encodeEdaRpcSessionSnapshot: (input: {
2558
2582
  };
2559
2583
  } | {
2560
2584
  readonly type: "file";
2585
+ readonly mediaType: string;
2586
+ readonly fileName?: string | undefined;
2587
+ readonly data: string | URL | Uint8Array<ArrayBufferLike>;
2561
2588
  readonly "~effect/ai/Prompt/Part": "~effect/ai/Prompt/Part";
2562
2589
  readonly options: {
2563
2590
  readonly [x: string]: Schema.Json;
2564
2591
  };
2565
- readonly mediaType: string;
2566
- readonly data: string | URL | Uint8Array<ArrayBufferLike>;
2567
- readonly fileName?: string | undefined;
2568
2592
  })[]];
2569
- readonly commandId: string;
2570
- readonly messageId: string;
2571
- readonly seq: number;
2572
- readonly consumedSeq: number;
2573
2593
  readonly runId: string;
2574
- readonly createdAtMs?: number | undefined;
2575
- readonly cancellationReason?: string | undefined;
2576
- readonly cancelledByCommandId?: string | undefined;
2577
- readonly cancelledSeq?: number | undefined;
2578
- readonly consumedTurnId?: string | undefined;
2579
- readonly pausedByCommandId?: string | undefined;
2580
- readonly pausedSeq?: number | undefined;
2581
- readonly promotedSeq?: number | undefined;
2594
+ readonly consumedSeq: number;
2582
2595
  })[];
2583
2596
  };
2584
2597
  //#endregion