effect-durable-agent-cloudflare 0.1.0-alpha.9 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (39) hide show
  1. package/README.md +5 -2
  2. package/dist/anthropic.d.ts +44 -0
  3. package/dist/anthropic.js +66 -0
  4. package/dist/anthropic.js.map +1 -0
  5. package/dist/durable-object-DIoz2TqE.js +633 -0
  6. package/dist/durable-object-DIoz2TqE.js.map +1 -0
  7. package/dist/durable-object-storage-Dec6HWQ9.d.ts +136 -0
  8. package/dist/durable-object-store-lJkqwvIj.js +1263 -0
  9. package/dist/durable-object-store-lJkqwvIj.js.map +1 -0
  10. package/dist/durable-object.d.ts +2356 -55
  11. package/dist/durable-object.js +2 -193
  12. package/dist/index.d.ts +227 -6
  13. package/dist/index.js +6 -5
  14. package/dist/openai.d.ts +10 -5
  15. package/dist/openai.js +20 -48
  16. package/dist/openai.js.map +1 -1
  17. package/dist/providers.d.ts +53 -0
  18. package/dist/providers.js +221 -0
  19. package/dist/providers.js.map +1 -0
  20. package/dist/rpc-codec-Nci-sCgQ.d.ts +68 -0
  21. package/dist/rpc-spec-BU5bGUWF.js +447 -0
  22. package/dist/rpc-spec-BU5bGUWF.js.map +1 -0
  23. package/dist/rpc-spec-NAf8Yjnd.d.ts +9139 -0
  24. package/dist/rpc.d.ts +3 -16
  25. package/dist/rpc.js +2 -26
  26. package/dist/{session-controller-Dp07FnPn.d.ts → session-controller-Cfd5Zjd5.d.ts} +140 -32
  27. package/dist/session-controller-UhUFR3i_.js +1517 -0
  28. package/dist/session-controller-UhUFR3i_.js.map +1 -0
  29. package/dist/session-controller.d.ts +2 -2
  30. package/dist/session-controller.js +1 -1
  31. package/dist/storage.d.ts +1 -1
  32. package/dist/transport-BzgK07l4.js +205 -0
  33. package/dist/transport-BzgK07l4.js.map +1 -0
  34. package/package.json +29 -11
  35. package/dist/durable-object-storage-DCL2IyUe.d.ts +0 -41
  36. package/dist/durable-object.js.map +0 -1
  37. package/dist/rpc.js.map +0 -1
  38. package/dist/session-controller-COHH8vA6.js +0 -1434
  39. package/dist/session-controller-COHH8vA6.js.map +0 -1
@@ -1,55 +1,93 @@
1
- import { i as EDASessionControllerOptions, l as EDAWebSocketProjection } from "./session-controller-Dp07FnPn.js";
2
- import { DurableObject } from "cloudflare:workers";
3
- import { CommittedCommandTerminalEvent, EDARuntimeConfig } from "effect-durable-agent/services/runtime";
1
+ import { a as DurableObjectTranscriptObserver, c as TranscriptAlert, s as DurableObjectTranscriptSliceLimits } from "./durable-object-storage-Dec6HWQ9.js";
2
+ import { a as SessionGrantRunInput, c as SessionTranscriptBodyInput, f as SessionTranscriptWindowInput, h as edaSessionRpc, i as SessionDecideInput, n as SessionBlockInput, o as SessionOutcomeInput, r as SessionCommandInput, s as SessionScopedInput, t as SessionBatchInput, u as SessionTranscriptSummaryInput } from "./rpc-spec-NAf8Yjnd.js";
3
+ import { d as EDATranscriptSocketOptions, i as EDASessionControllerOptions, p as EDAWebSocketProjection } from "./session-controller-Cfd5Zjd5.js";
4
+ import * as Schema from "effect/Schema";
5
+ import { SessionId } from "effect-durable-agent/types/core";
4
6
  import { CommittedDurableEvent } from "effect-durable-agent/services/session-store";
5
- import { DurableTranscriptMessage } from "effect-durable-agent/domain/message-transcript";
6
- import { EDASessionSnapshot } from "effect-durable-agent/services/session-query";
7
-
7
+ import { EDARuntimeConfig } from "effect-durable-agent/services/runtime";
8
+ import { TranscriptMaintenanceConfig } from "effect-durable-agent/transcript";
9
+ import { DurableObject } from "cloudflare:workers";
8
10
  //#region src/durable-object.d.ts
9
11
  /** Internal Worker-to-object header selecting an app-owned WebSocket projection. */
10
12
  declare const EDA_WEB_SOCKET_PROJECTION_HEADER = "x-eda-websocket-projection";
11
- /** Raw RPC shape decoded before admitting one session command. */
12
- interface EDASessionCommandRpcInput {
13
- readonly command: unknown;
14
- readonly sessionId: string;
15
- readonly trace: unknown;
16
- }
17
- /** Raw RPC shape decoded before admitting a durable command/app-event batch. */
18
- interface EDASessionSubmitBatchRpcInput {
19
- readonly items: ReadonlyArray<unknown>;
20
- readonly sessionId: string;
21
- readonly trace: unknown;
22
- }
23
- /** Raw RPC shape for read/destroy operations that only need a session id. */
24
- interface EDASessionScopedRpcInput {
25
- readonly sessionId: string;
26
- readonly trace: unknown;
27
- }
28
- /** Raw RPC shape for WebSocket event-stream upgrades with a resume cursor. */
29
- interface EDASessionEventsRpcInput {
30
- readonly afterSeq?: number;
31
- readonly sessionId: string;
32
- readonly trace: unknown;
33
- }
34
- /** Raw RPC shape decoded before blocking on one command terminal event. */
35
- interface EDASessionBlockOnCommandRpcInput {
13
+ /**
14
+ * Upgrade query parameter selecting the socket's stream: `transcript` selects the ordered
15
+ * transcript-window stream; anything else keeps the raw event stream.
16
+ */
17
+ declare const EDA_WEB_SOCKET_STREAM_PARAM = "stream";
18
+ /** Encoded session RPC inputs, decoded before invoking the controller. */
19
+ type EDASessionCommandRpcInput = typeof SessionCommandInput.Encoded;
20
+ type EDASessionGrantRunRpcInput = typeof SessionGrantRunInput.Encoded;
21
+ type EDASessionSubmitBatchRpcInput = typeof SessionBatchInput.Encoded;
22
+ type EDASessionDecideRpcInput = typeof SessionDecideInput.Encoded;
23
+ type EDASessionScopedRpcInput = typeof SessionScopedInput.Encoded;
24
+ type EDASessionEventsRpcInput = EDASessionScopedRpcInput & {
36
25
  readonly afterSeq?: number;
37
- readonly commandId: string;
38
- readonly sessionId: string;
39
- readonly trace: unknown;
40
- }
26
+ };
27
+ type EDASessionBlockOnCommandRpcInput = typeof SessionBlockInput.Encoded;
28
+ type EDASessionRunRequestOutcomeRpcInput = typeof SessionOutcomeInput.Encoded;
41
29
  /** EDA RPC methods required by the session namespace helper. */
42
30
  interface EDASessionRpcSurface {
43
- readonly submit: (input: EDASessionCommandRpcInput) => Promise<CommittedDurableEvent>;
44
- readonly submitBatch: (input: EDASessionSubmitBatchRpcInput) => Promise<ReadonlyArray<CommittedDurableEvent>>;
45
- readonly submitAndBlock: (input: EDASessionCommandRpcInput) => Promise<CommittedCommandTerminalEvent>;
46
- readonly blockOnCommand: (input: EDASessionBlockOnCommandRpcInput) => Promise<CommittedCommandTerminalEvent>;
47
- readonly snapshot: (input: EDASessionScopedRpcInput) => Promise<EDASessionSnapshot>;
48
- readonly messages: (input: EDASessionScopedRpcInput) => Promise<ReadonlyArray<DurableTranscriptMessage>>;
49
- readonly destroySession: (input: EDASessionScopedRpcInput) => Promise<void>;
31
+ readonly runRequestOutcome: (input: EDASessionRunRequestOutcomeRpcInput) => Promise<typeof edaSessionRpc.runRequestOutcome.output.Encoded>;
32
+ readonly grantRun: (input: EDASessionGrantRunRpcInput) => Promise<typeof edaSessionRpc.grantRun.output.Encoded>;
33
+ readonly submit: (input: EDASessionCommandRpcInput) => Promise<typeof edaSessionRpc.submit.output.Encoded>;
34
+ readonly submitBatch: (input: EDASessionSubmitBatchRpcInput) => Promise<typeof edaSessionRpc.submitBatch.output.Encoded>;
35
+ readonly decide: (input: EDASessionDecideRpcInput) => Promise<typeof edaSessionRpc.decide.output.Encoded>;
36
+ readonly submitAndBlock: (input: EDASessionCommandRpcInput) => Promise<typeof edaSessionRpc.submitAndBlock.output.Encoded>;
37
+ readonly blockOnCommand: (input: EDASessionBlockOnCommandRpcInput) => Promise<typeof edaSessionRpc.blockOnCommand.output.Encoded>;
38
+ readonly snapshot: (input: EDASessionScopedRpcInput) => Promise<typeof edaSessionRpc.snapshot.output.Encoded>;
39
+ readonly destroySession: (input: EDASessionScopedRpcInput) => Promise<typeof edaSessionRpc.destroySession.output.Encoded>;
40
+ readonly transcriptStatus: (input: EDASessionScopedRpcInput) => Promise<typeof edaSessionRpc.transcriptStatus.output.Encoded>;
41
+ readonly readTranscriptWindow: (input: typeof SessionTranscriptWindowInput.Encoded) => Promise<typeof edaSessionRpc.readTranscriptWindow.output.Encoded>;
42
+ readonly readTranscriptBody: (input: typeof SessionTranscriptBodyInput.Encoded) => Promise<typeof edaSessionRpc.readTranscriptBody.output.Encoded>;
43
+ readonly readTranscriptSummary: (input: typeof SessionTranscriptSummaryInput.Encoded) => Promise<typeof edaSessionRpc.readTranscriptSummary.output.Encoded>;
44
+ }
45
+ /** Host transcript configuration of a session Durable Object. */
46
+ interface EDASessionTranscriptOptions {
47
+ /**
48
+ * Which sessions maintain a transcript; default **off**. A disabled session gets no transcript
49
+ * writes, builder slices or wakeups: `readTranscriptWindow` answers `Disabled`,
50
+ * `transcriptStatus` reports `Disabled` without writing, and transcript sockets are
51
+ * refused. Enabling a session takes the first-introduction path (a build from the log, then
52
+ * activation). Rollout rings use a deterministic predicate (for example a hash of the session
53
+ * id under a percentage); disabling leaves a session's rows untouched, and re-enabling catches
54
+ * an active version up to the head before it is served as current. Evaluated once per object
55
+ * instance, so a change takes effect when the object next starts.
56
+ */
57
+ readonly enabled?: boolean | ((sessionId: SessionId) => boolean);
58
+ /**
59
+ * Builder bounds: events per slice, rows deleted per slice, and `maxSliceFailures` (default 5),
60
+ * the consecutive failures after which a build freezes as failed and a failing builder alarm
61
+ * stops scheduling itself.
62
+ */
63
+ readonly sliceLimits?: Partial<DurableObjectTranscriptSliceLimits>;
64
+ /**
65
+ * The transcript definitions this release carries. Defaults to the definition with no host
66
+ * mappings. A host changing its mappings ships `current` = new, `previous` = old, then runs
67
+ * its backfill through `transcriptStatus` (see `docs/transcript-history.md` §7).
68
+ */
69
+ readonly definitions?: TranscriptMaintenanceConfig;
70
+ /**
71
+ * Adopt the host's existing log incarnation from this `ctx.storage.kv` key (Gia:
72
+ * `gia.log_incarnation`). Without it the adapter mints its own.
73
+ */
74
+ readonly adoptIncarnationKey?: string;
75
+ /** Alerts (frozen versions, missed sessions). Defaults to `console.error`. */
76
+ readonly onAlert?: (alert: TranscriptAlert) => void;
77
+ /** A rebuilt version became active. */
78
+ readonly onActivated?: DurableObjectTranscriptObserver["onActivated"];
50
79
  }
51
80
  /** Constructor options for concrete app subclasses of the EDA Durable Object base. */
52
- type EDASessionDurableObjectOptions<ProjectionState extends object = never> = Omit<EDASessionControllerOptions<ProjectionState>, "background" | "getWebSockets" | "storage">;
81
+ type EDASessionDurableObjectOptions<ProjectionState extends object = never> = Omit<EDASessionControllerOptions<ProjectionState>, "alarmStorage" | "background" | "getWebSockets" | "storage" | "transcript" | "transcriptSockets"> & {
82
+ readonly transcript?: EDASessionTranscriptOptions;
83
+ /**
84
+ * Serve transcript-window sockets (`?stream=transcript`). `transcriptStore` defaults to this
85
+ * object's own runtime-free Durable Object transcript store.
86
+ */
87
+ readonly transcriptSockets?: Omit<EDATranscriptSocketOptions, "transcriptStore"> & {
88
+ readonly transcriptStore?: EDATranscriptSocketOptions["transcriptStore"];
89
+ };
90
+ };
53
91
  /** Resolve a concrete EDA session Durable Object binding by domain session id. */
54
92
  declare const getEDASessionDurableObjectByName: <T extends Rpc.DurableObjectBranded & EDASessionRpcSurface>(namespace: DurableObjectNamespace<T>, sessionId: string) => DurableObjectStub<T>;
55
93
  /**
@@ -64,17 +102,56 @@ declare abstract class EDASessionDurableObject<EnvType extends object = object,
64
102
  #private;
65
103
  protected constructor(ctx: DurableObjectState, env: EnvType, options: EDASessionDurableObjectOptions<ProjectionState>);
66
104
  fetch(request: Request): Promise<Response>;
67
- submit(input: EDASessionCommandRpcInput): Promise<CommittedDurableEvent>;
68
- submitBatch(input: EDASessionSubmitBatchRpcInput): Promise<ReadonlyArray<CommittedDurableEvent>>;
69
- submitAndBlock(input: EDASessionCommandRpcInput): Promise<CommittedCommandTerminalEvent>;
70
- blockOnCommand(input: EDASessionBlockOnCommandRpcInput): Promise<CommittedCommandTerminalEvent>;
71
- snapshot(input: EDASessionScopedRpcInput): Promise<EDASessionSnapshot>;
72
- messages(input: EDASessionScopedRpcInput): Promise<ReadonlyArray<DurableTranscriptMessage>>;
105
+ submit(raw: typeof SessionCommandInput.Encoded): Promise<typeof edaSessionRpc.submit.output.Encoded>;
106
+ /** Reconcile lost grant replies from durable request and run facts. */
107
+ runRequestOutcome(raw: typeof SessionOutcomeInput.Encoded): Promise<typeof edaSessionRpc.runRequestOutcome.output.Encoded>;
108
+ /** Trusted RPC only: the calling Worker owns scheduler authentication and authorization. */
109
+ grantRun(raw: typeof SessionGrantRunInput.Encoded): Promise<typeof edaSessionRpc.grantRun.output.Encoded>;
110
+ submitBatch(raw: typeof SessionBatchInput.Encoded): Promise<typeof edaSessionRpc.submitBatch.output.Encoded>;
111
+ /** Trusted RPC, like `submitBatch`: run a registered decider. The calling Worker authorizes. */
112
+ decide(raw: typeof SessionDecideInput.Encoded): Promise<typeof edaSessionRpc.decide.output.Encoded>;
113
+ submitAndBlock(raw: typeof SessionCommandInput.Encoded): Promise<typeof edaSessionRpc.submitAndBlock.output.Encoded>;
114
+ blockOnCommand(raw: typeof SessionBlockInput.Encoded): Promise<typeof edaSessionRpc.blockOnCommand.output.Encoded>;
115
+ snapshot(raw: typeof SessionScopedInput.Encoded): Promise<typeof edaSessionRpc.snapshot.output.Encoded>;
73
116
  webSocketMessage(webSocket: WebSocket, message: string | ArrayBuffer): Promise<void>;
74
117
  webSocketClose(webSocket: WebSocket, _code: number, _reason: string, _wasClean: boolean): Promise<void>;
75
118
  webSocketError(webSocket: WebSocket, _error: unknown): Promise<void>;
76
- destroySession(input: EDASessionScopedRpcInput): Promise<void>;
119
+ destroySession(raw: typeof SessionScopedInput.Encoded): Promise<typeof edaSessionRpc.destroySession.output.Encoded>;
120
+ /**
121
+ * Storage-only backfill entry point: advance pending transcript build work by bounded slices
122
+ * and return the transcript status. It never starts the model runtime, reducers or sinks.
123
+ */
124
+ transcriptStatus(raw: typeof SessionScopedInput.Encoded): Promise<typeof edaSessionRpc.transcriptStatus.output.Encoded>;
125
+ /** Runtime-free transcript window read for SSR and CLIs. Hosts authorize the caller. */
126
+ readTranscriptWindow(raw: typeof SessionTranscriptWindowInput.Encoded): Promise<typeof edaSessionRpc.readTranscriptWindow.output.Encoded>;
127
+ /**
128
+ * Runtime-free read of the body a transcript `Ref` names, resolved through the immutable log
129
+ * (so it stays valid after projection rows are rebuilt). Hosts authorize the caller.
130
+ */
131
+ readTranscriptBody(raw: typeof SessionTranscriptBodyInput.Encoded): Promise<typeof edaSessionRpc.readTranscriptBody.output.Encoded>;
132
+ /** Runtime-free read of a compaction summary's text. Hosts authorize the caller. */
133
+ readTranscriptSummary(raw: typeof SessionTranscriptSummaryInput.Encoded): Promise<typeof edaSessionRpc.readTranscriptSummary.output.Encoded>;
134
+ /**
135
+ * The alarm is shared by the runtime heartbeat and the transcript builder; see
136
+ * `runEDASessionAlarm`.
137
+ */
77
138
  alarm(): Promise<void>;
139
+ private transcriptOptions;
140
+ /** This object's transcript store as the port transcript sockets read, resolved per call. */
141
+ private transcriptPort;
142
+ /**
143
+ * The session and log a body or summary read may serve: pinned to the session this object's
144
+ * transcript serves, like window reads, and to the incarnation the caller's reference names.
145
+ */
146
+ private transcriptReadScope;
147
+ /** The transcript service of this object's session, created on first use. */
148
+ private transcriptFor;
149
+ /** The transcript service when this object's session is enabled for maintenance. */
150
+ private maintainedTranscript;
151
+ /** The transcript service when the object is named by a valid session id. */
152
+ private objectTranscript;
153
+ /** `parseSessionId` for request paths that answer a foreign session with a 400. */
154
+ private parseSessionIdOrUndefined;
78
155
  private parseSessionId;
79
156
  private sessionIdFromObjectName;
80
157
  }
@@ -85,10 +162,2234 @@ declare const edaRuntimeConfig: (input: {
85
162
  readonly provider: string;
86
163
  readonly systemPrompt?: string;
87
164
  }) => EDARuntimeConfig;
88
- /** Encode committed events into structured-clone-safe Durable Object RPC payloads. */
89
- declare const encodeEdaRpcCommittedDurableEvent: (event: CommittedDurableEvent) => CommittedDurableEvent;
90
- /** Encode runtime snapshots into structured-clone-safe Durable Object RPC payloads. */
91
- declare const encodeEdaRpcSessionSnapshot: (snapshot: EDASessionSnapshot) => EDASessionSnapshot;
165
+ /** Encode committed events into the existing structured-clone envelope. */
166
+ declare const encodeEdaRpcCommittedDurableEvent: (entry: CommittedDurableEvent) => typeof edaSessionRpc.submit.output.Encoded;
167
+ /** Encode query snapshots without asserting that encoded command values are decoded classes. */
168
+ declare const encodeEdaRpcSessionSnapshot: (input: {
169
+ readonly state: {
170
+ readonly runSchedulingRequest?: {
171
+ readonly requestId: string & import("effect/Brand").Brand<"RunRequestId">;
172
+ readonly work: {
173
+ readonly _tag: "Command";
174
+ readonly commandId: string & import("effect/Brand").Brand<"CommandId">;
175
+ } | {
176
+ readonly _tag: "Recovery";
177
+ readonly commandId: string & import("effect/Brand").Brand<"CommandId">;
178
+ readonly interruptedRunId: string & import("effect/Brand").Brand<"RunId">;
179
+ readonly inputMessageIds: readonly (string & import("effect/Brand").Brand<"MessageId">)[];
180
+ };
181
+ readonly requestedSeq: number & import("effect/Brand").Brand<"SequenceNumber">;
182
+ readonly deliveredSeq?: (number & import("effect/Brand").Brand<"SequenceNumber">) | undefined;
183
+ } | undefined;
184
+ readonly modelSelection?: {
185
+ readonly provider: string;
186
+ readonly modelId: string;
187
+ readonly settings?: unknown;
188
+ } | undefined;
189
+ readonly lastSeq: number & import("effect/Brand").Brand<"SequenceNumber">;
190
+ readonly commands: ReadonlyMap<string & import("effect/Brand").Brand<"CommandId">, {
191
+ readonly admittedSeq?: (number & import("effect/Brand").Brand<"SequenceNumber">) | undefined;
192
+ readonly admissionTrace?: {
193
+ readonly span: {
194
+ readonly traceId: string & import("effect/Brand").Brand<"EDATraceId">;
195
+ readonly spanId: string & import("effect/Brand").Brand<"EDASpanId">;
196
+ readonly sampled: boolean;
197
+ readonly tracestate: string | null;
198
+ };
199
+ readonly links: readonly {
200
+ readonly context: {
201
+ readonly traceId: string & import("effect/Brand").Brand<"EDATraceId">;
202
+ readonly spanId: string & import("effect/Brand").Brand<"EDASpanId">;
203
+ readonly sampled: boolean;
204
+ readonly tracestate: string | null;
205
+ };
206
+ readonly attributes: {
207
+ readonly [x: string]: string | number | boolean;
208
+ };
209
+ }[];
210
+ } | undefined;
211
+ 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;
212
+ readonly commandId: string & import("effect/Brand").Brand<"CommandId">;
213
+ readonly startedSeq?: (number & import("effect/Brand").Brand<"SequenceNumber">) | undefined;
214
+ readonly terminal?: {
215
+ readonly _tag: "Completed";
216
+ readonly seq: number & import("effect/Brand").Brand<"SequenceNumber">;
217
+ } | {
218
+ readonly _tag: "Failed";
219
+ readonly error: {
220
+ readonly message: string;
221
+ readonly code?: string | undefined;
222
+ readonly details?: unknown;
223
+ };
224
+ readonly seq: number & import("effect/Brand").Brand<"SequenceNumber">;
225
+ } | {
226
+ readonly _tag: "Cancelled";
227
+ readonly reason: string;
228
+ readonly seq: number & import("effect/Brand").Brand<"SequenceNumber">;
229
+ } | undefined;
230
+ }>;
231
+ readonly runs: ReadonlyMap<string & import("effect/Brand").Brand<"RunId">, {
232
+ readonly durationMs?: number | undefined;
233
+ readonly startedAtMs?: number | undefined;
234
+ readonly terminalAtMs?: number | undefined;
235
+ readonly modelSelection?: {
236
+ readonly provider: string;
237
+ readonly modelId: string;
238
+ readonly settings?: unknown;
239
+ } | undefined;
240
+ readonly commandIds: readonly (string & import("effect/Brand").Brand<"CommandId">)[];
241
+ readonly runId: string & import("effect/Brand").Brand<"RunId">;
242
+ readonly startedSeq: number & import("effect/Brand").Brand<"SequenceNumber">;
243
+ readonly terminal?: {
244
+ readonly _tag: "Completed";
245
+ readonly seq: number & import("effect/Brand").Brand<"SequenceNumber">;
246
+ } | {
247
+ readonly _tag: "Failed";
248
+ readonly error: {
249
+ readonly message: string;
250
+ readonly code?: string | undefined;
251
+ readonly details?: unknown;
252
+ };
253
+ readonly seq: number & import("effect/Brand").Brand<"SequenceNumber">;
254
+ } | {
255
+ readonly _tag: "Interrupted";
256
+ readonly reason: string;
257
+ readonly seq: number & import("effect/Brand").Brand<"SequenceNumber">;
258
+ } | undefined;
259
+ readonly trace: {
260
+ readonly root: {
261
+ readonly traceId: string & import("effect/Brand").Brand<"EDATraceId">;
262
+ readonly spanId: string & import("effect/Brand").Brand<"EDASpanId">;
263
+ readonly sampled: boolean;
264
+ readonly tracestate: string | null;
265
+ };
266
+ readonly links: readonly {
267
+ readonly context: {
268
+ readonly traceId: string & import("effect/Brand").Brand<"EDATraceId">;
269
+ readonly spanId: string & import("effect/Brand").Brand<"EDASpanId">;
270
+ readonly sampled: boolean;
271
+ readonly tracestate: string | null;
272
+ };
273
+ readonly attributes: {
274
+ readonly [x: string]: string | number | boolean;
275
+ };
276
+ }[];
277
+ };
278
+ }>;
279
+ readonly recoveryContinuations: ReadonlyMap<string & import("effect/Brand").Brand<"RunId">, {
280
+ readonly seq: number & import("effect/Brand").Brand<"SequenceNumber">;
281
+ readonly commandId: string & import("effect/Brand").Brand<"CommandId">;
282
+ readonly interruptedRunId: string & import("effect/Brand").Brand<"RunId">;
283
+ readonly replacementRunId: string & import("effect/Brand").Brand<"RunId">;
284
+ }>;
285
+ readonly turns: ReadonlyMap<string & import("effect/Brand").Brand<"TurnId">, {
286
+ readonly durationMs?: number | undefined;
287
+ readonly startedAtMs?: number | undefined;
288
+ readonly terminalAtMs?: number | undefined;
289
+ readonly runId: string & import("effect/Brand").Brand<"RunId">;
290
+ readonly startedSeq: number & import("effect/Brand").Brand<"SequenceNumber">;
291
+ readonly terminal?: {
292
+ readonly _tag: "Completed";
293
+ readonly seq: number & import("effect/Brand").Brand<"SequenceNumber">;
294
+ readonly usage?: {
295
+ readonly inputTokens?: number | undefined;
296
+ readonly cachedInputTokens?: number | undefined;
297
+ readonly cacheWriteInputTokens?: number | undefined;
298
+ readonly outputTokens?: number | undefined;
299
+ readonly textTokens?: number | undefined;
300
+ readonly reasoningTokens?: number | undefined;
301
+ } | undefined;
302
+ } | {
303
+ readonly _tag: "Failed";
304
+ readonly error: {
305
+ readonly message: string;
306
+ readonly code?: string | undefined;
307
+ readonly details?: unknown;
308
+ };
309
+ readonly seq: number & import("effect/Brand").Brand<"SequenceNumber">;
310
+ } | {
311
+ readonly _tag: "Stopped";
312
+ readonly reason: string;
313
+ readonly seq: number & import("effect/Brand").Brand<"SequenceNumber">;
314
+ } | undefined;
315
+ readonly turnId: string & import("effect/Brand").Brand<"TurnId">;
316
+ }>;
317
+ readonly inferences: ReadonlyMap<string & import("effect/Brand").Brand<"InferenceId">, {
318
+ readonly durationMs?: number | undefined;
319
+ readonly startedAtMs?: number | undefined;
320
+ readonly terminalAtMs?: number | undefined;
321
+ readonly inferenceId: string & import("effect/Brand").Brand<"InferenceId">;
322
+ readonly runId: string & import("effect/Brand").Brand<"RunId">;
323
+ readonly startedSeq: number & import("effect/Brand").Brand<"SequenceNumber">;
324
+ readonly terminal?: {
325
+ readonly _tag: "Completed";
326
+ readonly seq: number & import("effect/Brand").Brand<"SequenceNumber">;
327
+ readonly usage?: {
328
+ readonly inputTokens?: number | undefined;
329
+ readonly cachedInputTokens?: number | undefined;
330
+ readonly cacheWriteInputTokens?: number | undefined;
331
+ readonly outputTokens?: number | undefined;
332
+ readonly textTokens?: number | undefined;
333
+ readonly reasoningTokens?: number | undefined;
334
+ } | undefined;
335
+ } | {
336
+ readonly _tag: "Failed";
337
+ readonly error: {
338
+ readonly message: string;
339
+ readonly code?: string | undefined;
340
+ readonly details?: unknown;
341
+ };
342
+ readonly seq: number & import("effect/Brand").Brand<"SequenceNumber">;
343
+ } | undefined;
344
+ readonly turnId: string & import("effect/Brand").Brand<"TurnId">;
345
+ }>;
346
+ readonly toolCalls: ReadonlyMap<string & import("effect/Brand").Brand<"ToolCallId">, {
347
+ readonly durationMs?: number | undefined;
348
+ readonly startedAtMs?: number | undefined;
349
+ readonly terminalAtMs?: number | undefined;
350
+ readonly decision?: {
351
+ readonly _tag: "Created";
352
+ readonly inferenceId: string & import("effect/Brand").Brand<"InferenceId">;
353
+ readonly params: unknown;
354
+ readonly promptPart?: {
355
+ readonly type: "tool-call";
356
+ readonly id: string;
357
+ readonly name: string;
358
+ readonly params: unknown;
359
+ readonly providerExecuted: boolean;
360
+ readonly "~effect/ai/Prompt/Part": "~effect/ai/Prompt/Part";
361
+ readonly options: {
362
+ readonly [x: string]: Schema.Json;
363
+ };
364
+ } | undefined;
365
+ readonly providerExecuted: boolean;
366
+ readonly providerPartId: string & import("effect/Brand").Brand<"ProviderPartId">;
367
+ readonly runId: string & import("effect/Brand").Brand<"RunId">;
368
+ readonly seq: number & import("effect/Brand").Brand<"SequenceNumber">;
369
+ readonly toolName: string;
370
+ readonly turnId: string & import("effect/Brand").Brand<"TurnId">;
371
+ } | {
372
+ readonly _tag: "Rejected";
373
+ readonly inferenceId: string & import("effect/Brand").Brand<"InferenceId">;
374
+ readonly modelFeedback: string;
375
+ readonly promptPart?: {
376
+ readonly type: "tool-result";
377
+ readonly id: string;
378
+ readonly name: string;
379
+ readonly isFailure: boolean;
380
+ readonly result: unknown;
381
+ readonly modelOutput?: readonly ({
382
+ readonly type: "text";
383
+ readonly text: string;
384
+ readonly "~effect/ai/Prompt/Part": "~effect/ai/Prompt/Part";
385
+ readonly options: {
386
+ readonly [x: string]: Schema.Json;
387
+ };
388
+ } | {
389
+ readonly type: "file";
390
+ readonly mediaType: string;
391
+ readonly fileName?: string | undefined;
392
+ readonly data: string | URL | Uint8Array<ArrayBufferLike>;
393
+ readonly "~effect/ai/Prompt/Part": "~effect/ai/Prompt/Part";
394
+ readonly options: {
395
+ readonly [x: string]: Schema.Json;
396
+ };
397
+ })[] | undefined;
398
+ readonly providerExecuted: boolean;
399
+ readonly "~effect/ai/Prompt/Part": "~effect/ai/Prompt/Part";
400
+ readonly options: {
401
+ readonly [x: string]: Schema.Json;
402
+ };
403
+ } | undefined;
404
+ readonly providerPartId: string & import("effect/Brand").Brand<"ProviderPartId">;
405
+ readonly reason: "invalid-params" | "unknown-tool";
406
+ readonly runId: string & import("effect/Brand").Brand<"RunId">;
407
+ readonly seq: number & import("effect/Brand").Brand<"SequenceNumber">;
408
+ readonly toolName: string;
409
+ readonly turnId: string & import("effect/Brand").Brand<"TurnId">;
410
+ } | undefined;
411
+ readonly startedSeq?: (number & import("effect/Brand").Brand<"SequenceNumber">) | undefined;
412
+ readonly attempt?: number | undefined;
413
+ readonly terminal?: {
414
+ readonly _tag: "Completed";
415
+ readonly promptPart?: {
416
+ readonly type: "tool-result";
417
+ readonly id: string;
418
+ readonly name: string;
419
+ readonly isFailure: boolean;
420
+ readonly result: unknown;
421
+ readonly modelOutput?: readonly ({
422
+ readonly type: "text";
423
+ readonly text: string;
424
+ readonly "~effect/ai/Prompt/Part": "~effect/ai/Prompt/Part";
425
+ readonly options: {
426
+ readonly [x: string]: Schema.Json;
427
+ };
428
+ } | {
429
+ readonly type: "file";
430
+ readonly mediaType: string;
431
+ readonly fileName?: string | undefined;
432
+ readonly data: string | URL | Uint8Array<ArrayBufferLike>;
433
+ readonly "~effect/ai/Prompt/Part": "~effect/ai/Prompt/Part";
434
+ readonly options: {
435
+ readonly [x: string]: Schema.Json;
436
+ };
437
+ })[] | undefined;
438
+ readonly providerExecuted: boolean;
439
+ readonly "~effect/ai/Prompt/Part": "~effect/ai/Prompt/Part";
440
+ readonly options: {
441
+ readonly [x: string]: Schema.Json;
442
+ };
443
+ } | undefined;
444
+ readonly result: unknown;
445
+ readonly seq: number & import("effect/Brand").Brand<"SequenceNumber">;
446
+ } | {
447
+ readonly _tag: "Failed";
448
+ readonly error: {
449
+ readonly message: string;
450
+ readonly code?: string | undefined;
451
+ readonly details?: unknown;
452
+ };
453
+ readonly promptPart?: {
454
+ readonly type: "tool-result";
455
+ readonly id: string;
456
+ readonly name: string;
457
+ readonly isFailure: boolean;
458
+ readonly result: unknown;
459
+ readonly modelOutput?: readonly ({
460
+ readonly type: "text";
461
+ readonly text: string;
462
+ readonly "~effect/ai/Prompt/Part": "~effect/ai/Prompt/Part";
463
+ readonly options: {
464
+ readonly [x: string]: Schema.Json;
465
+ };
466
+ } | {
467
+ readonly type: "file";
468
+ readonly mediaType: string;
469
+ readonly fileName?: string | undefined;
470
+ readonly data: string | URL | Uint8Array<ArrayBufferLike>;
471
+ readonly "~effect/ai/Prompt/Part": "~effect/ai/Prompt/Part";
472
+ readonly options: {
473
+ readonly [x: string]: Schema.Json;
474
+ };
475
+ })[] | undefined;
476
+ readonly providerExecuted: boolean;
477
+ readonly "~effect/ai/Prompt/Part": "~effect/ai/Prompt/Part";
478
+ readonly options: {
479
+ readonly [x: string]: Schema.Json;
480
+ };
481
+ } | undefined;
482
+ readonly seq: number & import("effect/Brand").Brand<"SequenceNumber">;
483
+ } | undefined;
484
+ readonly toolCallId: string & import("effect/Brand").Brand<"ToolCallId">;
485
+ }>;
486
+ readonly messages: ReadonlyMap<string & import("effect/Brand").Brand<"MessageId">, {
487
+ readonly createdAtMs?: number | undefined;
488
+ readonly messageId: string & import("effect/Brand").Brand<"MessageId">;
489
+ readonly seq: number & import("effect/Brand").Brand<"SequenceNumber">;
490
+ readonly _tag: "System";
491
+ readonly content: string;
492
+ } | {
493
+ readonly createdAtMs?: number | undefined;
494
+ readonly messageId: string & import("effect/Brand").Brand<"MessageId">;
495
+ readonly seq: number & import("effect/Brand").Brand<"SequenceNumber">;
496
+ readonly cancellationReason?: string | undefined;
497
+ readonly cancelledByCommandId?: (string & import("effect/Brand").Brand<"CommandId">) | undefined;
498
+ readonly cancelledSeq?: (number & import("effect/Brand").Brand<"SequenceNumber">) | undefined;
499
+ readonly consumedSeq?: (number & import("effect/Brand").Brand<"SequenceNumber">) | undefined;
500
+ readonly consumedTurnId?: (string & import("effect/Brand").Brand<"TurnId">) | undefined;
501
+ readonly pausedByCommandId?: (string & import("effect/Brand").Brand<"CommandId">) | undefined;
502
+ readonly pausedSeq?: (number & import("effect/Brand").Brand<"SequenceNumber">) | undefined;
503
+ readonly promotedSeq?: (number & import("effect/Brand").Brand<"SequenceNumber">) | undefined;
504
+ readonly _tag: "User";
505
+ readonly commandId: string & import("effect/Brand").Brand<"CommandId">;
506
+ readonly content: readonly [{
507
+ readonly type: "text";
508
+ readonly text: string;
509
+ readonly "~effect/ai/Prompt/Part": "~effect/ai/Prompt/Part";
510
+ readonly options: {
511
+ readonly [x: string]: Schema.Json;
512
+ };
513
+ }, ...{
514
+ readonly type: "text";
515
+ readonly text: string;
516
+ readonly "~effect/ai/Prompt/Part": "~effect/ai/Prompt/Part";
517
+ readonly options: {
518
+ readonly [x: string]: Schema.Json;
519
+ };
520
+ }[]] | readonly [{
521
+ readonly type: "text";
522
+ readonly text: string;
523
+ readonly "~effect/ai/Prompt/Part": "~effect/ai/Prompt/Part";
524
+ readonly options: {
525
+ readonly [x: string]: Schema.Json;
526
+ };
527
+ } | {
528
+ readonly type: "file";
529
+ readonly mediaType: string;
530
+ readonly fileName?: string | undefined;
531
+ readonly data: string | URL | Uint8Array<ArrayBufferLike>;
532
+ readonly "~effect/ai/Prompt/Part": "~effect/ai/Prompt/Part";
533
+ readonly options: {
534
+ readonly [x: string]: Schema.Json;
535
+ };
536
+ }, ...({
537
+ readonly type: "text";
538
+ readonly text: string;
539
+ readonly "~effect/ai/Prompt/Part": "~effect/ai/Prompt/Part";
540
+ readonly options: {
541
+ readonly [x: string]: Schema.Json;
542
+ };
543
+ } | {
544
+ readonly type: "file";
545
+ readonly mediaType: string;
546
+ readonly fileName?: string | undefined;
547
+ readonly data: string | URL | Uint8Array<ArrayBufferLike>;
548
+ readonly "~effect/ai/Prompt/Part": "~effect/ai/Prompt/Part";
549
+ readonly options: {
550
+ readonly [x: string]: Schema.Json;
551
+ };
552
+ })[]];
553
+ readonly disposition?: "queue" | "steer" | undefined;
554
+ readonly requestedDisposition?: "queue" | "steer" | undefined;
555
+ } | {
556
+ readonly createdAtMs?: number | undefined;
557
+ readonly messageId: string & import("effect/Brand").Brand<"MessageId">;
558
+ readonly seq: number & import("effect/Brand").Brand<"SequenceNumber">;
559
+ readonly cancellationReason?: string | undefined;
560
+ readonly cancelledByCommandId?: (string & import("effect/Brand").Brand<"CommandId">) | undefined;
561
+ readonly cancelledSeq?: (number & import("effect/Brand").Brand<"SequenceNumber">) | undefined;
562
+ readonly consumedSeq?: (number & import("effect/Brand").Brand<"SequenceNumber">) | undefined;
563
+ readonly consumedTurnId?: (string & import("effect/Brand").Brand<"TurnId">) | undefined;
564
+ readonly pausedByCommandId?: (string & import("effect/Brand").Brand<"CommandId">) | undefined;
565
+ readonly pausedSeq?: (number & import("effect/Brand").Brand<"SequenceNumber">) | undefined;
566
+ readonly promotedSeq?: (number & import("effect/Brand").Brand<"SequenceNumber">) | undefined;
567
+ readonly _tag: "Steering";
568
+ readonly commandId: string & import("effect/Brand").Brand<"CommandId">;
569
+ readonly content: readonly [{
570
+ readonly type: "text";
571
+ readonly text: string;
572
+ readonly "~effect/ai/Prompt/Part": "~effect/ai/Prompt/Part";
573
+ readonly options: {
574
+ readonly [x: string]: Schema.Json;
575
+ };
576
+ }, ...{
577
+ readonly type: "text";
578
+ readonly text: string;
579
+ readonly "~effect/ai/Prompt/Part": "~effect/ai/Prompt/Part";
580
+ readonly options: {
581
+ readonly [x: string]: Schema.Json;
582
+ };
583
+ }[]] | readonly [{
584
+ readonly type: "text";
585
+ readonly text: string;
586
+ readonly "~effect/ai/Prompt/Part": "~effect/ai/Prompt/Part";
587
+ readonly options: {
588
+ readonly [x: string]: Schema.Json;
589
+ };
590
+ } | {
591
+ readonly type: "file";
592
+ readonly mediaType: string;
593
+ readonly fileName?: string | undefined;
594
+ readonly data: string | URL | Uint8Array<ArrayBufferLike>;
595
+ readonly "~effect/ai/Prompt/Part": "~effect/ai/Prompt/Part";
596
+ readonly options: {
597
+ readonly [x: string]: Schema.Json;
598
+ };
599
+ }, ...({
600
+ readonly type: "text";
601
+ readonly text: string;
602
+ readonly "~effect/ai/Prompt/Part": "~effect/ai/Prompt/Part";
603
+ readonly options: {
604
+ readonly [x: string]: Schema.Json;
605
+ };
606
+ } | {
607
+ readonly type: "file";
608
+ readonly mediaType: string;
609
+ readonly fileName?: string | undefined;
610
+ readonly data: string | URL | Uint8Array<ArrayBufferLike>;
611
+ readonly "~effect/ai/Prompt/Part": "~effect/ai/Prompt/Part";
612
+ readonly options: {
613
+ readonly [x: string]: Schema.Json;
614
+ };
615
+ })[]];
616
+ readonly runId: string & import("effect/Brand").Brand<"RunId">;
617
+ } | {
618
+ readonly createdAtMs?: number | undefined;
619
+ readonly messageId: string & import("effect/Brand").Brand<"MessageId">;
620
+ readonly seq: number & import("effect/Brand").Brand<"SequenceNumber">;
621
+ readonly _tag: "Assistant";
622
+ readonly content: {
623
+ readonly text: string;
624
+ readonly reasoning?: string | undefined;
625
+ };
626
+ readonly imported?: true | undefined;
627
+ readonly inferenceId: string & import("effect/Brand").Brand<"InferenceId">;
628
+ readonly promptParts?: readonly ({
629
+ readonly type: "text";
630
+ readonly text: string;
631
+ readonly "~effect/ai/Prompt/Part": "~effect/ai/Prompt/Part";
632
+ readonly options: {
633
+ readonly [x: string]: Schema.Json;
634
+ };
635
+ } | {
636
+ readonly type: "file";
637
+ readonly mediaType: string;
638
+ readonly fileName?: string | undefined;
639
+ readonly data: string | URL | Uint8Array<ArrayBufferLike>;
640
+ readonly "~effect/ai/Prompt/Part": "~effect/ai/Prompt/Part";
641
+ readonly options: {
642
+ readonly [x: string]: Schema.Json;
643
+ };
644
+ } | {
645
+ readonly type: "reasoning";
646
+ readonly text: string;
647
+ readonly "~effect/ai/Prompt/Part": "~effect/ai/Prompt/Part";
648
+ readonly options: {
649
+ readonly [x: string]: Schema.Json;
650
+ };
651
+ } | {
652
+ readonly type: "tool-call";
653
+ readonly id: string;
654
+ readonly name: string;
655
+ readonly params: unknown;
656
+ readonly providerExecuted: boolean;
657
+ readonly "~effect/ai/Prompt/Part": "~effect/ai/Prompt/Part";
658
+ readonly options: {
659
+ readonly [x: string]: Schema.Json;
660
+ };
661
+ } | {
662
+ readonly type: "tool-result";
663
+ readonly id: string;
664
+ readonly name: string;
665
+ readonly isFailure: boolean;
666
+ readonly result: unknown;
667
+ readonly modelOutput?: readonly ({
668
+ readonly type: "text";
669
+ readonly text: string;
670
+ readonly "~effect/ai/Prompt/Part": "~effect/ai/Prompt/Part";
671
+ readonly options: {
672
+ readonly [x: string]: Schema.Json;
673
+ };
674
+ } | {
675
+ readonly type: "file";
676
+ readonly mediaType: string;
677
+ readonly fileName?: string | undefined;
678
+ readonly data: string | URL | Uint8Array<ArrayBufferLike>;
679
+ readonly "~effect/ai/Prompt/Part": "~effect/ai/Prompt/Part";
680
+ readonly options: {
681
+ readonly [x: string]: Schema.Json;
682
+ };
683
+ })[] | undefined;
684
+ readonly providerExecuted: boolean;
685
+ readonly "~effect/ai/Prompt/Part": "~effect/ai/Prompt/Part";
686
+ readonly options: {
687
+ readonly [x: string]: Schema.Json;
688
+ };
689
+ } | {
690
+ readonly type: "tool-approval-request";
691
+ readonly approvalId: string;
692
+ readonly toolCallId: string;
693
+ readonly "~effect/ai/Prompt/Part": "~effect/ai/Prompt/Part";
694
+ readonly options: {
695
+ readonly [x: string]: Schema.Json;
696
+ };
697
+ })[] | undefined;
698
+ readonly runId: string & import("effect/Brand").Brand<"RunId">;
699
+ readonly turnId: string & import("effect/Brand").Brand<"TurnId">;
700
+ } | {
701
+ readonly createdAtMs?: number | undefined;
702
+ readonly messageId: string & import("effect/Brand").Brand<"MessageId">;
703
+ readonly seq: number & import("effect/Brand").Brand<"SequenceNumber">;
704
+ readonly _tag: "AssistantPartial";
705
+ readonly content: {
706
+ readonly text: string;
707
+ readonly reasoning?: string | undefined;
708
+ };
709
+ readonly inferenceId: string & import("effect/Brand").Brand<"InferenceId">;
710
+ readonly promptParts?: readonly ({
711
+ readonly type: "text";
712
+ readonly text: string;
713
+ readonly "~effect/ai/Prompt/Part": "~effect/ai/Prompt/Part";
714
+ readonly options: {
715
+ readonly [x: string]: Schema.Json;
716
+ };
717
+ } | {
718
+ readonly type: "file";
719
+ readonly mediaType: string;
720
+ readonly fileName?: string | undefined;
721
+ readonly data: string | URL | Uint8Array<ArrayBufferLike>;
722
+ readonly "~effect/ai/Prompt/Part": "~effect/ai/Prompt/Part";
723
+ readonly options: {
724
+ readonly [x: string]: Schema.Json;
725
+ };
726
+ } | {
727
+ readonly type: "reasoning";
728
+ readonly text: string;
729
+ readonly "~effect/ai/Prompt/Part": "~effect/ai/Prompt/Part";
730
+ readonly options: {
731
+ readonly [x: string]: Schema.Json;
732
+ };
733
+ } | {
734
+ readonly type: "tool-call";
735
+ readonly id: string;
736
+ readonly name: string;
737
+ readonly params: unknown;
738
+ readonly providerExecuted: boolean;
739
+ readonly "~effect/ai/Prompt/Part": "~effect/ai/Prompt/Part";
740
+ readonly options: {
741
+ readonly [x: string]: Schema.Json;
742
+ };
743
+ } | {
744
+ readonly type: "tool-result";
745
+ readonly id: string;
746
+ readonly name: string;
747
+ readonly isFailure: boolean;
748
+ readonly result: unknown;
749
+ readonly modelOutput?: readonly ({
750
+ readonly type: "text";
751
+ readonly text: string;
752
+ readonly "~effect/ai/Prompt/Part": "~effect/ai/Prompt/Part";
753
+ readonly options: {
754
+ readonly [x: string]: Schema.Json;
755
+ };
756
+ } | {
757
+ readonly type: "file";
758
+ readonly mediaType: string;
759
+ readonly fileName?: string | undefined;
760
+ readonly data: string | URL | Uint8Array<ArrayBufferLike>;
761
+ readonly "~effect/ai/Prompt/Part": "~effect/ai/Prompt/Part";
762
+ readonly options: {
763
+ readonly [x: string]: Schema.Json;
764
+ };
765
+ })[] | undefined;
766
+ readonly providerExecuted: boolean;
767
+ readonly "~effect/ai/Prompt/Part": "~effect/ai/Prompt/Part";
768
+ readonly options: {
769
+ readonly [x: string]: Schema.Json;
770
+ };
771
+ } | {
772
+ readonly type: "tool-approval-request";
773
+ readonly approvalId: string;
774
+ readonly toolCallId: string;
775
+ readonly "~effect/ai/Prompt/Part": "~effect/ai/Prompt/Part";
776
+ readonly options: {
777
+ readonly [x: string]: Schema.Json;
778
+ };
779
+ })[] | undefined;
780
+ readonly reason: string;
781
+ readonly runId: string & import("effect/Brand").Brand<"RunId">;
782
+ readonly turnId: string & import("effect/Brand").Brand<"TurnId">;
783
+ }>;
784
+ readonly stopRequests: ReadonlyMap<string & import("effect/Brand").Brand<"CommandId">, {
785
+ readonly commandId: string & import("effect/Brand").Brand<"CommandId">;
786
+ readonly requestedSeq: number & import("effect/Brand").Brand<"SequenceNumber">;
787
+ readonly requestedRunId?: (string & import("effect/Brand").Brand<"RunId">) | undefined;
788
+ readonly requestedTurnId?: (string & import("effect/Brand").Brand<"TurnId">) | undefined;
789
+ readonly appliedSeq?: (number & import("effect/Brand").Brand<"SequenceNumber">) | undefined;
790
+ readonly appliedRunId?: (string & import("effect/Brand").Brand<"RunId">) | undefined;
791
+ readonly appliedTurnId?: (string & import("effect/Brand").Brand<"TurnId">) | undefined;
792
+ readonly appliedInferenceId?: (string & import("effect/Brand").Brand<"InferenceId">) | undefined;
793
+ }>;
794
+ readonly compactions: ReadonlyMap<string & import("effect/Brand").Brand<"CompactionId">, {
795
+ readonly compactionId: string & import("effect/Brand").Brand<"CompactionId">;
796
+ readonly requestedSeq?: (number & import("effect/Brand").Brand<"SequenceNumber">) | undefined;
797
+ readonly startedSeq?: (number & import("effect/Brand").Brand<"SequenceNumber">) | undefined;
798
+ readonly summaryCreatedSeq?: (number & import("effect/Brand").Brand<"SequenceNumber">) | undefined;
799
+ readonly summaryId?: (string & import("effect/Brand").Brand<"SummaryId">) | undefined;
800
+ readonly sourceFromSeq?: (number & import("effect/Brand").Brand<"SequenceNumber">) | undefined;
801
+ readonly sourceToSeq?: (number & import("effect/Brand").Brand<"SequenceNumber">) | undefined;
802
+ readonly rebasedSeq?: (number & import("effect/Brand").Brand<"SequenceNumber">) | undefined;
803
+ readonly contextVersion?: (number & import("effect/Brand").Brand<"ContextVersion">) | undefined;
804
+ readonly terminal?: {
805
+ readonly _tag: "Completed";
806
+ readonly seq: number & import("effect/Brand").Brand<"SequenceNumber">;
807
+ } | {
808
+ readonly _tag: "Failed";
809
+ readonly seq: number & import("effect/Brand").Brand<"SequenceNumber">;
810
+ readonly error: {
811
+ readonly message: string;
812
+ readonly code?: string | undefined;
813
+ readonly details?: unknown;
814
+ };
815
+ } | undefined;
816
+ }>;
817
+ readonly context: {
818
+ readonly version: number & import("effect/Brand").Brand<"ContextVersion">;
819
+ readonly currentSummaryId?: (string & import("effect/Brand").Brand<"SummaryId">) | undefined;
820
+ };
821
+ readonly tokenConsumption: {
822
+ readonly byModel: readonly {
823
+ readonly provider: string;
824
+ readonly modelId: string;
825
+ readonly usage: {
826
+ readonly inputTokens: number;
827
+ readonly cachedInputTokens: number;
828
+ readonly cacheWriteInputTokens: number;
829
+ readonly outputTokens: number;
830
+ readonly textTokens: number;
831
+ readonly reasoningTokens: number;
832
+ };
833
+ }[];
834
+ };
835
+ readonly commandQueues: {
836
+ readonly active?: {
837
+ readonly commandId: string & import("effect/Brand").Brand<"CommandId">;
838
+ readonly runId?: (string & import("effect/Brand").Brand<"RunId">) | undefined;
839
+ } | undefined;
840
+ readonly pendingCommands: readonly {
841
+ readonly commandId: string & import("effect/Brand").Brand<"CommandId">;
842
+ 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;
843
+ readonly admittedSeq: number & import("effect/Brand").Brand<"SequenceNumber">;
844
+ readonly admissionTrace?: {
845
+ readonly span: {
846
+ readonly traceId: string & import("effect/Brand").Brand<"EDATraceId">;
847
+ readonly spanId: string & import("effect/Brand").Brand<"EDASpanId">;
848
+ readonly sampled: boolean;
849
+ readonly tracestate: string | null;
850
+ };
851
+ readonly links: readonly {
852
+ readonly context: {
853
+ readonly traceId: string & import("effect/Brand").Brand<"EDATraceId">;
854
+ readonly spanId: string & import("effect/Brand").Brand<"EDASpanId">;
855
+ readonly sampled: boolean;
856
+ readonly tracestate: string | null;
857
+ };
858
+ readonly attributes: {
859
+ readonly [x: string]: string | number | boolean;
860
+ };
861
+ }[];
862
+ } | undefined;
863
+ }[];
864
+ readonly queuedCommands: readonly {
865
+ readonly commandId: string & import("effect/Brand").Brand<"CommandId">;
866
+ 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;
867
+ readonly admittedSeq: number & import("effect/Brand").Brand<"SequenceNumber">;
868
+ readonly admissionTrace?: {
869
+ readonly span: {
870
+ readonly traceId: string & import("effect/Brand").Brand<"EDATraceId">;
871
+ readonly spanId: string & import("effect/Brand").Brand<"EDASpanId">;
872
+ readonly sampled: boolean;
873
+ readonly tracestate: string | null;
874
+ };
875
+ readonly links: readonly {
876
+ readonly context: {
877
+ readonly traceId: string & import("effect/Brand").Brand<"EDATraceId">;
878
+ readonly spanId: string & import("effect/Brand").Brand<"EDASpanId">;
879
+ readonly sampled: boolean;
880
+ readonly tracestate: string | null;
881
+ };
882
+ readonly attributes: {
883
+ readonly [x: string]: string | number | boolean;
884
+ };
885
+ }[];
886
+ } | undefined;
887
+ }[];
888
+ readonly activeControlCommands: readonly {
889
+ readonly commandId: string & import("effect/Brand").Brand<"CommandId">;
890
+ 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;
891
+ readonly admittedSeq: number & import("effect/Brand").Brand<"SequenceNumber">;
892
+ readonly admissionTrace?: {
893
+ readonly span: {
894
+ readonly traceId: string & import("effect/Brand").Brand<"EDATraceId">;
895
+ readonly spanId: string & import("effect/Brand").Brand<"EDASpanId">;
896
+ readonly sampled: boolean;
897
+ readonly tracestate: string | null;
898
+ };
899
+ readonly links: readonly {
900
+ readonly context: {
901
+ readonly traceId: string & import("effect/Brand").Brand<"EDATraceId">;
902
+ readonly spanId: string & import("effect/Brand").Brand<"EDASpanId">;
903
+ readonly sampled: boolean;
904
+ readonly tracestate: string | null;
905
+ };
906
+ readonly attributes: {
907
+ readonly [x: string]: string | number | boolean;
908
+ };
909
+ }[];
910
+ } | undefined;
911
+ }[];
912
+ readonly steeringByRun: ReadonlyMap<string & import("effect/Brand").Brand<"RunId">, readonly {
913
+ readonly messageId: string & import("effect/Brand").Brand<"MessageId">;
914
+ readonly commandId: string & import("effect/Brand").Brand<"CommandId">;
915
+ readonly runId: string & import("effect/Brand").Brand<"RunId">;
916
+ readonly content: readonly [{
917
+ readonly type: "text";
918
+ readonly text: string;
919
+ readonly "~effect/ai/Prompt/Part": "~effect/ai/Prompt/Part";
920
+ readonly options: {
921
+ readonly [x: string]: Schema.Json;
922
+ };
923
+ }, ...{
924
+ readonly type: "text";
925
+ readonly text: string;
926
+ readonly "~effect/ai/Prompt/Part": "~effect/ai/Prompt/Part";
927
+ readonly options: {
928
+ readonly [x: string]: Schema.Json;
929
+ };
930
+ }[]] | readonly [{
931
+ readonly type: "text";
932
+ readonly text: string;
933
+ readonly "~effect/ai/Prompt/Part": "~effect/ai/Prompt/Part";
934
+ readonly options: {
935
+ readonly [x: string]: Schema.Json;
936
+ };
937
+ } | {
938
+ readonly type: "file";
939
+ readonly mediaType: string;
940
+ readonly fileName?: string | undefined;
941
+ readonly data: string | URL | Uint8Array<ArrayBufferLike>;
942
+ readonly "~effect/ai/Prompt/Part": "~effect/ai/Prompt/Part";
943
+ readonly options: {
944
+ readonly [x: string]: Schema.Json;
945
+ };
946
+ }, ...({
947
+ readonly type: "text";
948
+ readonly text: string;
949
+ readonly "~effect/ai/Prompt/Part": "~effect/ai/Prompt/Part";
950
+ readonly options: {
951
+ readonly [x: string]: Schema.Json;
952
+ };
953
+ } | {
954
+ readonly type: "file";
955
+ readonly mediaType: string;
956
+ readonly fileName?: string | undefined;
957
+ readonly data: string | URL | Uint8Array<ArrayBufferLike>;
958
+ readonly "~effect/ai/Prompt/Part": "~effect/ai/Prompt/Part";
959
+ readonly options: {
960
+ readonly [x: string]: Schema.Json;
961
+ };
962
+ })[]];
963
+ readonly queuedSeq: number & import("effect/Brand").Brand<"SequenceNumber">;
964
+ readonly consumedSeq?: (number & import("effect/Brand").Brand<"SequenceNumber">) | undefined;
965
+ readonly consumedTurnId?: (string & import("effect/Brand").Brand<"TurnId">) | undefined;
966
+ }[]>;
967
+ readonly pendingQueue: readonly {
968
+ readonly messageId: string & import("effect/Brand").Brand<"MessageId">;
969
+ readonly commandId: string & import("effect/Brand").Brand<"CommandId">;
970
+ readonly content: readonly [{
971
+ readonly type: "text";
972
+ readonly text: string;
973
+ readonly "~effect/ai/Prompt/Part": "~effect/ai/Prompt/Part";
974
+ readonly options: {
975
+ readonly [x: string]: Schema.Json;
976
+ };
977
+ }, ...{
978
+ readonly type: "text";
979
+ readonly text: string;
980
+ readonly "~effect/ai/Prompt/Part": "~effect/ai/Prompt/Part";
981
+ readonly options: {
982
+ readonly [x: string]: Schema.Json;
983
+ };
984
+ }[]] | readonly [{
985
+ readonly type: "text";
986
+ readonly text: string;
987
+ readonly "~effect/ai/Prompt/Part": "~effect/ai/Prompt/Part";
988
+ readonly options: {
989
+ readonly [x: string]: Schema.Json;
990
+ };
991
+ } | {
992
+ readonly type: "file";
993
+ readonly mediaType: string;
994
+ readonly fileName?: string | undefined;
995
+ readonly data: string | URL | Uint8Array<ArrayBufferLike>;
996
+ readonly "~effect/ai/Prompt/Part": "~effect/ai/Prompt/Part";
997
+ readonly options: {
998
+ readonly [x: string]: Schema.Json;
999
+ };
1000
+ }, ...({
1001
+ readonly type: "text";
1002
+ readonly text: string;
1003
+ readonly "~effect/ai/Prompt/Part": "~effect/ai/Prompt/Part";
1004
+ readonly options: {
1005
+ readonly [x: string]: Schema.Json;
1006
+ };
1007
+ } | {
1008
+ readonly type: "file";
1009
+ readonly mediaType: string;
1010
+ readonly fileName?: string | undefined;
1011
+ readonly data: string | URL | Uint8Array<ArrayBufferLike>;
1012
+ readonly "~effect/ai/Prompt/Part": "~effect/ai/Prompt/Part";
1013
+ readonly options: {
1014
+ readonly [x: string]: Schema.Json;
1015
+ };
1016
+ })[]];
1017
+ readonly submittedSeq: number & import("effect/Brand").Brand<"SequenceNumber">;
1018
+ readonly effectiveSeq: number & import("effect/Brand").Brand<"SequenceNumber">;
1019
+ readonly disposition: "queue" | "steer";
1020
+ readonly targetRunId?: (string & import("effect/Brand").Brand<"RunId">) | undefined;
1021
+ readonly pausedByCommandId?: (string & import("effect/Brand").Brand<"CommandId">) | undefined;
1022
+ }[];
1023
+ readonly pendingSteers: readonly {
1024
+ readonly messageId: string & import("effect/Brand").Brand<"MessageId">;
1025
+ readonly commandId: string & import("effect/Brand").Brand<"CommandId">;
1026
+ readonly content: readonly [{
1027
+ readonly type: "text";
1028
+ readonly text: string;
1029
+ readonly "~effect/ai/Prompt/Part": "~effect/ai/Prompt/Part";
1030
+ readonly options: {
1031
+ readonly [x: string]: Schema.Json;
1032
+ };
1033
+ }, ...{
1034
+ readonly type: "text";
1035
+ readonly text: string;
1036
+ readonly "~effect/ai/Prompt/Part": "~effect/ai/Prompt/Part";
1037
+ readonly options: {
1038
+ readonly [x: string]: Schema.Json;
1039
+ };
1040
+ }[]] | readonly [{
1041
+ readonly type: "text";
1042
+ readonly text: string;
1043
+ readonly "~effect/ai/Prompt/Part": "~effect/ai/Prompt/Part";
1044
+ readonly options: {
1045
+ readonly [x: string]: Schema.Json;
1046
+ };
1047
+ } | {
1048
+ readonly type: "file";
1049
+ readonly mediaType: string;
1050
+ readonly fileName?: string | undefined;
1051
+ readonly data: string | URL | Uint8Array<ArrayBufferLike>;
1052
+ readonly "~effect/ai/Prompt/Part": "~effect/ai/Prompt/Part";
1053
+ readonly options: {
1054
+ readonly [x: string]: Schema.Json;
1055
+ };
1056
+ }, ...({
1057
+ readonly type: "text";
1058
+ readonly text: string;
1059
+ readonly "~effect/ai/Prompt/Part": "~effect/ai/Prompt/Part";
1060
+ readonly options: {
1061
+ readonly [x: string]: Schema.Json;
1062
+ };
1063
+ } | {
1064
+ readonly type: "file";
1065
+ readonly mediaType: string;
1066
+ readonly fileName?: string | undefined;
1067
+ readonly data: string | URL | Uint8Array<ArrayBufferLike>;
1068
+ readonly "~effect/ai/Prompt/Part": "~effect/ai/Prompt/Part";
1069
+ readonly options: {
1070
+ readonly [x: string]: Schema.Json;
1071
+ };
1072
+ })[]];
1073
+ readonly submittedSeq: number & import("effect/Brand").Brand<"SequenceNumber">;
1074
+ readonly effectiveSeq: number & import("effect/Brand").Brand<"SequenceNumber">;
1075
+ readonly disposition: "queue" | "steer";
1076
+ readonly targetRunId?: (string & import("effect/Brand").Brand<"RunId">) | undefined;
1077
+ readonly pausedByCommandId?: (string & import("effect/Brand").Brand<"CommandId">) | undefined;
1078
+ }[];
1079
+ readonly pausedQueue: readonly {
1080
+ readonly messageId: string & import("effect/Brand").Brand<"MessageId">;
1081
+ readonly commandId: string & import("effect/Brand").Brand<"CommandId">;
1082
+ readonly content: readonly [{
1083
+ readonly type: "text";
1084
+ readonly text: string;
1085
+ readonly "~effect/ai/Prompt/Part": "~effect/ai/Prompt/Part";
1086
+ readonly options: {
1087
+ readonly [x: string]: Schema.Json;
1088
+ };
1089
+ }, ...{
1090
+ readonly type: "text";
1091
+ readonly text: string;
1092
+ readonly "~effect/ai/Prompt/Part": "~effect/ai/Prompt/Part";
1093
+ readonly options: {
1094
+ readonly [x: string]: Schema.Json;
1095
+ };
1096
+ }[]] | readonly [{
1097
+ readonly type: "text";
1098
+ readonly text: string;
1099
+ readonly "~effect/ai/Prompt/Part": "~effect/ai/Prompt/Part";
1100
+ readonly options: {
1101
+ readonly [x: string]: Schema.Json;
1102
+ };
1103
+ } | {
1104
+ readonly type: "file";
1105
+ readonly mediaType: string;
1106
+ readonly fileName?: string | undefined;
1107
+ readonly data: string | URL | Uint8Array<ArrayBufferLike>;
1108
+ readonly "~effect/ai/Prompt/Part": "~effect/ai/Prompt/Part";
1109
+ readonly options: {
1110
+ readonly [x: string]: Schema.Json;
1111
+ };
1112
+ }, ...({
1113
+ readonly type: "text";
1114
+ readonly text: string;
1115
+ readonly "~effect/ai/Prompt/Part": "~effect/ai/Prompt/Part";
1116
+ readonly options: {
1117
+ readonly [x: string]: Schema.Json;
1118
+ };
1119
+ } | {
1120
+ readonly type: "file";
1121
+ readonly mediaType: string;
1122
+ readonly fileName?: string | undefined;
1123
+ readonly data: string | URL | Uint8Array<ArrayBufferLike>;
1124
+ readonly "~effect/ai/Prompt/Part": "~effect/ai/Prompt/Part";
1125
+ readonly options: {
1126
+ readonly [x: string]: Schema.Json;
1127
+ };
1128
+ })[]];
1129
+ readonly submittedSeq: number & import("effect/Brand").Brand<"SequenceNumber">;
1130
+ readonly effectiveSeq: number & import("effect/Brand").Brand<"SequenceNumber">;
1131
+ readonly disposition: "queue" | "steer";
1132
+ readonly targetRunId?: (string & import("effect/Brand").Brand<"RunId">) | undefined;
1133
+ readonly pausedByCommandId?: (string & import("effect/Brand").Brand<"CommandId">) | undefined;
1134
+ }[];
1135
+ };
1136
+ };
1137
+ readonly reducerStates: ReadonlyMap<string, unknown>;
1138
+ }, options?: import("effect/SchemaAST").ParseOptions) => {
1139
+ readonly state: {
1140
+ readonly runSchedulingRequest?: {
1141
+ readonly requestId: string;
1142
+ readonly work: {
1143
+ readonly _tag: "Command";
1144
+ readonly commandId: string;
1145
+ } | {
1146
+ readonly _tag: "Recovery";
1147
+ readonly commandId: string;
1148
+ readonly interruptedRunId: string;
1149
+ readonly inputMessageIds: readonly string[];
1150
+ };
1151
+ readonly requestedSeq: number;
1152
+ readonly deliveredSeq?: number | undefined;
1153
+ } | undefined;
1154
+ readonly modelSelection?: {
1155
+ readonly provider: string;
1156
+ readonly modelId: string;
1157
+ readonly settings?: unknown;
1158
+ } | undefined;
1159
+ readonly lastSeq: number;
1160
+ readonly commands: ReadonlyMap<string, {
1161
+ readonly admittedSeq?: number | undefined;
1162
+ readonly admissionTrace?: {
1163
+ readonly span: {
1164
+ readonly traceId: string;
1165
+ readonly spanId: string;
1166
+ readonly sampled: boolean;
1167
+ readonly tracestate: string | null;
1168
+ };
1169
+ readonly links: readonly {
1170
+ readonly context: {
1171
+ readonly traceId: string;
1172
+ readonly spanId: string;
1173
+ readonly sampled: boolean;
1174
+ readonly tracestate: string | null;
1175
+ };
1176
+ readonly attributes: {
1177
+ readonly [x: string]: string | number | boolean;
1178
+ };
1179
+ }[];
1180
+ } | undefined;
1181
+ readonly command?: {
1182
+ readonly _tag: "SubmitMessage";
1183
+ readonly commandId?: string | undefined;
1184
+ readonly idempotencyKey?: string | undefined;
1185
+ readonly disposition: "interrupt" | "queue" | "steer";
1186
+ readonly content: string | readonly [{
1187
+ readonly type: "text";
1188
+ readonly text: string;
1189
+ readonly "~effect/ai/Prompt/Part"?: "~effect/ai/Prompt/Part" | undefined;
1190
+ readonly options?: {
1191
+ readonly [x: string]: Schema.Json;
1192
+ } | undefined;
1193
+ } | {
1194
+ readonly type: "file";
1195
+ readonly mediaType: string;
1196
+ readonly fileName?: string | undefined;
1197
+ readonly data: string | URL | Uint8Array<ArrayBufferLike> | {
1198
+ readonly _tag: "Uint8Array";
1199
+ readonly base64: string;
1200
+ } | {
1201
+ readonly _tag: "URL";
1202
+ readonly href: string;
1203
+ };
1204
+ readonly "~effect/ai/Prompt/Part"?: "~effect/ai/Prompt/Part" | undefined;
1205
+ readonly options?: {
1206
+ readonly [x: string]: Schema.Json;
1207
+ } | undefined;
1208
+ }, ...({
1209
+ readonly type: "text";
1210
+ readonly text: string;
1211
+ readonly "~effect/ai/Prompt/Part"?: "~effect/ai/Prompt/Part" | undefined;
1212
+ readonly options?: {
1213
+ readonly [x: string]: Schema.Json;
1214
+ } | undefined;
1215
+ } | {
1216
+ readonly type: "file";
1217
+ readonly mediaType: string;
1218
+ readonly fileName?: string | undefined;
1219
+ readonly data: string | URL | Uint8Array<ArrayBufferLike> | {
1220
+ readonly _tag: "Uint8Array";
1221
+ readonly base64: string;
1222
+ } | {
1223
+ readonly _tag: "URL";
1224
+ readonly href: string;
1225
+ };
1226
+ readonly "~effect/ai/Prompt/Part"?: "~effect/ai/Prompt/Part" | undefined;
1227
+ readonly options?: {
1228
+ readonly [x: string]: Schema.Json;
1229
+ } | undefined;
1230
+ })[]];
1231
+ readonly expectedPausedMessageIdsToCancel?: readonly string[] | undefined;
1232
+ } | {
1233
+ readonly _tag: "StopTurn";
1234
+ readonly commandId?: string | undefined;
1235
+ readonly idempotencyKey?: string | undefined;
1236
+ } | {
1237
+ readonly _tag: "CancelPendingMessage";
1238
+ readonly commandId?: string | undefined;
1239
+ readonly idempotencyKey?: string | undefined;
1240
+ readonly messageId: string;
1241
+ readonly reason: "edit" | "user-cancel";
1242
+ } | {
1243
+ readonly _tag: "PromotePendingMessage";
1244
+ readonly commandId?: string | undefined;
1245
+ readonly idempotencyKey?: string | undefined;
1246
+ readonly messageId: string;
1247
+ } | {
1248
+ readonly _tag: "ResumePendingMessages";
1249
+ readonly commandId?: string | undefined;
1250
+ readonly idempotencyKey?: string | undefined;
1251
+ readonly messageIds: readonly [string, ...string[]];
1252
+ } | undefined;
1253
+ readonly commandId: string;
1254
+ readonly startedSeq?: number | undefined;
1255
+ readonly terminal?: {
1256
+ readonly _tag: "Completed";
1257
+ readonly seq: number;
1258
+ } | {
1259
+ readonly _tag: "Failed";
1260
+ readonly error: {
1261
+ readonly message: string;
1262
+ readonly code?: string | undefined;
1263
+ readonly details?: unknown;
1264
+ };
1265
+ readonly seq: number;
1266
+ } | {
1267
+ readonly _tag: "Cancelled";
1268
+ readonly reason: string;
1269
+ readonly seq: number;
1270
+ } | undefined;
1271
+ }>;
1272
+ readonly runs: ReadonlyMap<string, {
1273
+ readonly durationMs?: number | undefined;
1274
+ readonly startedAtMs?: number | undefined;
1275
+ readonly terminalAtMs?: number | undefined;
1276
+ readonly modelSelection?: {
1277
+ readonly provider: string;
1278
+ readonly modelId: string;
1279
+ readonly settings?: unknown;
1280
+ } | undefined;
1281
+ readonly commandIds: readonly string[];
1282
+ readonly runId: string;
1283
+ readonly startedSeq: number;
1284
+ readonly terminal?: {
1285
+ readonly _tag: "Completed";
1286
+ readonly seq: number;
1287
+ } | {
1288
+ readonly _tag: "Failed";
1289
+ readonly error: {
1290
+ readonly message: string;
1291
+ readonly code?: string | undefined;
1292
+ readonly details?: unknown;
1293
+ };
1294
+ readonly seq: number;
1295
+ } | {
1296
+ readonly _tag: "Interrupted";
1297
+ readonly reason: string;
1298
+ readonly seq: number;
1299
+ } | undefined;
1300
+ readonly trace: {
1301
+ readonly root: {
1302
+ readonly traceId: string;
1303
+ readonly spanId: string;
1304
+ readonly sampled: boolean;
1305
+ readonly tracestate: string | null;
1306
+ };
1307
+ readonly links: readonly {
1308
+ readonly context: {
1309
+ readonly traceId: string;
1310
+ readonly spanId: string;
1311
+ readonly sampled: boolean;
1312
+ readonly tracestate: string | null;
1313
+ };
1314
+ readonly attributes: {
1315
+ readonly [x: string]: string | number | boolean;
1316
+ };
1317
+ }[];
1318
+ };
1319
+ }>;
1320
+ readonly recoveryContinuations: ReadonlyMap<string, {
1321
+ readonly seq: number;
1322
+ readonly commandId: string;
1323
+ readonly interruptedRunId: string;
1324
+ readonly replacementRunId: string;
1325
+ }>;
1326
+ readonly turns: ReadonlyMap<string, {
1327
+ readonly durationMs?: number | undefined;
1328
+ readonly startedAtMs?: number | undefined;
1329
+ readonly terminalAtMs?: number | undefined;
1330
+ readonly runId: string;
1331
+ readonly startedSeq: number;
1332
+ readonly terminal?: {
1333
+ readonly _tag: "Completed";
1334
+ readonly seq: number;
1335
+ readonly usage?: {
1336
+ readonly inputTokens?: number | undefined;
1337
+ readonly cachedInputTokens?: number | undefined;
1338
+ readonly cacheWriteInputTokens?: number | undefined;
1339
+ readonly outputTokens?: number | undefined;
1340
+ readonly textTokens?: number | undefined;
1341
+ readonly reasoningTokens?: number | undefined;
1342
+ } | undefined;
1343
+ } | {
1344
+ readonly _tag: "Failed";
1345
+ readonly error: {
1346
+ readonly message: string;
1347
+ readonly code?: string | undefined;
1348
+ readonly details?: unknown;
1349
+ };
1350
+ readonly seq: number;
1351
+ } | {
1352
+ readonly _tag: "Stopped";
1353
+ readonly reason: string;
1354
+ readonly seq: number;
1355
+ } | undefined;
1356
+ readonly turnId: string;
1357
+ }>;
1358
+ readonly inferences: ReadonlyMap<string, {
1359
+ readonly durationMs?: number | undefined;
1360
+ readonly startedAtMs?: number | undefined;
1361
+ readonly terminalAtMs?: number | undefined;
1362
+ readonly inferenceId: string;
1363
+ readonly runId: string;
1364
+ readonly startedSeq: number;
1365
+ readonly terminal?: {
1366
+ readonly _tag: "Completed";
1367
+ readonly seq: number;
1368
+ readonly usage?: {
1369
+ readonly inputTokens?: number | undefined;
1370
+ readonly cachedInputTokens?: number | undefined;
1371
+ readonly cacheWriteInputTokens?: number | undefined;
1372
+ readonly outputTokens?: number | undefined;
1373
+ readonly textTokens?: number | undefined;
1374
+ readonly reasoningTokens?: number | undefined;
1375
+ } | undefined;
1376
+ } | {
1377
+ readonly _tag: "Failed";
1378
+ readonly error: {
1379
+ readonly message: string;
1380
+ readonly code?: string | undefined;
1381
+ readonly details?: unknown;
1382
+ };
1383
+ readonly seq: number;
1384
+ } | undefined;
1385
+ readonly turnId: string;
1386
+ }>;
1387
+ readonly toolCalls: ReadonlyMap<string, {
1388
+ readonly durationMs?: number | undefined;
1389
+ readonly startedAtMs?: number | undefined;
1390
+ readonly terminalAtMs?: number | undefined;
1391
+ readonly decision?: {
1392
+ readonly _tag: "Created";
1393
+ readonly inferenceId: string & import("effect/Brand").Brand<"InferenceId">;
1394
+ readonly params: unknown;
1395
+ readonly promptPart?: {
1396
+ readonly type: "tool-call";
1397
+ readonly id: string;
1398
+ readonly name: string;
1399
+ readonly params: unknown;
1400
+ readonly providerExecuted: boolean;
1401
+ readonly "~effect/ai/Prompt/Part": "~effect/ai/Prompt/Part";
1402
+ readonly options: {
1403
+ readonly [x: string]: Schema.Json;
1404
+ };
1405
+ } | undefined;
1406
+ readonly providerExecuted: boolean;
1407
+ readonly providerPartId: string & import("effect/Brand").Brand<"ProviderPartId">;
1408
+ readonly runId: string & import("effect/Brand").Brand<"RunId">;
1409
+ readonly seq: number & import("effect/Brand").Brand<"SequenceNumber">;
1410
+ readonly toolName: string;
1411
+ readonly turnId: string & import("effect/Brand").Brand<"TurnId">;
1412
+ } | {
1413
+ readonly _tag: "Rejected";
1414
+ readonly inferenceId: string & import("effect/Brand").Brand<"InferenceId">;
1415
+ readonly modelFeedback: string;
1416
+ readonly promptPart?: {
1417
+ readonly type: "tool-result";
1418
+ readonly id: string;
1419
+ readonly name: string;
1420
+ readonly isFailure: boolean;
1421
+ readonly result: unknown;
1422
+ readonly modelOutput?: readonly ({
1423
+ readonly type: "text";
1424
+ readonly text: string;
1425
+ readonly "~effect/ai/Prompt/Part": "~effect/ai/Prompt/Part";
1426
+ readonly options: {
1427
+ readonly [x: string]: Schema.Json;
1428
+ };
1429
+ } | {
1430
+ readonly type: "file";
1431
+ readonly mediaType: string;
1432
+ readonly fileName?: string | undefined;
1433
+ readonly data: string | URL | Uint8Array<ArrayBufferLike>;
1434
+ readonly "~effect/ai/Prompt/Part": "~effect/ai/Prompt/Part";
1435
+ readonly options: {
1436
+ readonly [x: string]: Schema.Json;
1437
+ };
1438
+ })[] | undefined;
1439
+ readonly providerExecuted: boolean;
1440
+ readonly "~effect/ai/Prompt/Part": "~effect/ai/Prompt/Part";
1441
+ readonly options: {
1442
+ readonly [x: string]: Schema.Json;
1443
+ };
1444
+ } | undefined;
1445
+ readonly providerPartId: string & import("effect/Brand").Brand<"ProviderPartId">;
1446
+ readonly reason: "invalid-params" | "unknown-tool";
1447
+ readonly runId: string & import("effect/Brand").Brand<"RunId">;
1448
+ readonly seq: number & import("effect/Brand").Brand<"SequenceNumber">;
1449
+ readonly toolName: string;
1450
+ readonly turnId: string & import("effect/Brand").Brand<"TurnId">;
1451
+ } | undefined;
1452
+ readonly startedSeq?: (number & import("effect/Brand").Brand<"SequenceNumber">) | undefined;
1453
+ readonly attempt?: number | undefined;
1454
+ readonly terminal?: {
1455
+ readonly _tag: "Completed";
1456
+ readonly promptPart?: {
1457
+ readonly type: "tool-result";
1458
+ readonly id: string;
1459
+ readonly name: string;
1460
+ readonly isFailure: boolean;
1461
+ readonly result: unknown;
1462
+ readonly modelOutput?: readonly ({
1463
+ readonly type: "text";
1464
+ readonly text: string;
1465
+ readonly "~effect/ai/Prompt/Part": "~effect/ai/Prompt/Part";
1466
+ readonly options: {
1467
+ readonly [x: string]: Schema.Json;
1468
+ };
1469
+ } | {
1470
+ readonly type: "file";
1471
+ readonly mediaType: string;
1472
+ readonly fileName?: string | undefined;
1473
+ readonly data: string | URL | Uint8Array<ArrayBufferLike>;
1474
+ readonly "~effect/ai/Prompt/Part": "~effect/ai/Prompt/Part";
1475
+ readonly options: {
1476
+ readonly [x: string]: Schema.Json;
1477
+ };
1478
+ })[] | undefined;
1479
+ readonly providerExecuted: boolean;
1480
+ readonly "~effect/ai/Prompt/Part": "~effect/ai/Prompt/Part";
1481
+ readonly options: {
1482
+ readonly [x: string]: Schema.Json;
1483
+ };
1484
+ } | undefined;
1485
+ readonly result: unknown;
1486
+ readonly seq: number & import("effect/Brand").Brand<"SequenceNumber">;
1487
+ } | {
1488
+ readonly _tag: "Failed";
1489
+ readonly error: {
1490
+ readonly message: string;
1491
+ readonly code?: string | undefined;
1492
+ readonly details?: unknown;
1493
+ };
1494
+ readonly promptPart?: {
1495
+ readonly type: "tool-result";
1496
+ readonly id: string;
1497
+ readonly name: string;
1498
+ readonly isFailure: boolean;
1499
+ readonly result: unknown;
1500
+ readonly modelOutput?: readonly ({
1501
+ readonly type: "text";
1502
+ readonly text: string;
1503
+ readonly "~effect/ai/Prompt/Part": "~effect/ai/Prompt/Part";
1504
+ readonly options: {
1505
+ readonly [x: string]: Schema.Json;
1506
+ };
1507
+ } | {
1508
+ readonly type: "file";
1509
+ readonly mediaType: string;
1510
+ readonly fileName?: string | undefined;
1511
+ readonly data: string | URL | Uint8Array<ArrayBufferLike>;
1512
+ readonly "~effect/ai/Prompt/Part": "~effect/ai/Prompt/Part";
1513
+ readonly options: {
1514
+ readonly [x: string]: Schema.Json;
1515
+ };
1516
+ })[] | undefined;
1517
+ readonly providerExecuted: boolean;
1518
+ readonly "~effect/ai/Prompt/Part": "~effect/ai/Prompt/Part";
1519
+ readonly options: {
1520
+ readonly [x: string]: Schema.Json;
1521
+ };
1522
+ } | undefined;
1523
+ readonly seq: number & import("effect/Brand").Brand<"SequenceNumber">;
1524
+ } | undefined;
1525
+ readonly toolCallId: string & import("effect/Brand").Brand<"ToolCallId">;
1526
+ }>;
1527
+ readonly messages: ReadonlyMap<string, {
1528
+ readonly createdAtMs?: number | undefined;
1529
+ readonly messageId: string;
1530
+ readonly seq: number;
1531
+ readonly _tag: "System";
1532
+ readonly content: string;
1533
+ } | {
1534
+ readonly createdAtMs?: number | undefined;
1535
+ readonly messageId: string;
1536
+ readonly seq: number;
1537
+ readonly cancellationReason?: string | undefined;
1538
+ readonly cancelledByCommandId?: string | undefined;
1539
+ readonly cancelledSeq?: number | undefined;
1540
+ readonly consumedSeq?: number | undefined;
1541
+ readonly consumedTurnId?: string | undefined;
1542
+ readonly pausedByCommandId?: string | undefined;
1543
+ readonly pausedSeq?: number | undefined;
1544
+ readonly promotedSeq?: number | undefined;
1545
+ readonly _tag: "User";
1546
+ readonly commandId: string;
1547
+ readonly content: readonly [{
1548
+ readonly type: "text";
1549
+ readonly text: string;
1550
+ readonly "~effect/ai/Prompt/Part": "~effect/ai/Prompt/Part";
1551
+ readonly options: {
1552
+ readonly [x: string]: Schema.Json;
1553
+ };
1554
+ }, ...{
1555
+ readonly type: "text";
1556
+ readonly text: string;
1557
+ readonly "~effect/ai/Prompt/Part": "~effect/ai/Prompt/Part";
1558
+ readonly options: {
1559
+ readonly [x: string]: Schema.Json;
1560
+ };
1561
+ }[]] | readonly [{
1562
+ readonly type: "text";
1563
+ readonly text: string;
1564
+ readonly "~effect/ai/Prompt/Part": "~effect/ai/Prompt/Part";
1565
+ readonly options: {
1566
+ readonly [x: string]: Schema.Json;
1567
+ };
1568
+ } | {
1569
+ readonly type: "file";
1570
+ readonly mediaType: string;
1571
+ readonly fileName?: string | undefined;
1572
+ readonly data: string | URL | Uint8Array<ArrayBufferLike>;
1573
+ readonly "~effect/ai/Prompt/Part": "~effect/ai/Prompt/Part";
1574
+ readonly options: {
1575
+ readonly [x: string]: Schema.Json;
1576
+ };
1577
+ }, ...({
1578
+ readonly type: "text";
1579
+ readonly text: string;
1580
+ readonly "~effect/ai/Prompt/Part": "~effect/ai/Prompt/Part";
1581
+ readonly options: {
1582
+ readonly [x: string]: Schema.Json;
1583
+ };
1584
+ } | {
1585
+ readonly type: "file";
1586
+ readonly mediaType: string;
1587
+ readonly fileName?: string | undefined;
1588
+ readonly data: string | URL | Uint8Array<ArrayBufferLike>;
1589
+ readonly "~effect/ai/Prompt/Part": "~effect/ai/Prompt/Part";
1590
+ readonly options: {
1591
+ readonly [x: string]: Schema.Json;
1592
+ };
1593
+ })[]];
1594
+ readonly disposition?: "queue" | "steer" | undefined;
1595
+ readonly requestedDisposition?: "queue" | "steer" | undefined;
1596
+ } | {
1597
+ readonly createdAtMs?: number | undefined;
1598
+ readonly messageId: string;
1599
+ readonly seq: number;
1600
+ readonly cancellationReason?: string | undefined;
1601
+ readonly cancelledByCommandId?: string | undefined;
1602
+ readonly cancelledSeq?: number | undefined;
1603
+ readonly consumedSeq?: number | undefined;
1604
+ readonly consumedTurnId?: string | undefined;
1605
+ readonly pausedByCommandId?: string | undefined;
1606
+ readonly pausedSeq?: number | undefined;
1607
+ readonly promotedSeq?: number | undefined;
1608
+ readonly _tag: "Steering";
1609
+ readonly commandId: string;
1610
+ readonly content: readonly [{
1611
+ readonly type: "text";
1612
+ readonly text: string;
1613
+ readonly "~effect/ai/Prompt/Part": "~effect/ai/Prompt/Part";
1614
+ readonly options: {
1615
+ readonly [x: string]: Schema.Json;
1616
+ };
1617
+ }, ...{
1618
+ readonly type: "text";
1619
+ readonly text: string;
1620
+ readonly "~effect/ai/Prompt/Part": "~effect/ai/Prompt/Part";
1621
+ readonly options: {
1622
+ readonly [x: string]: Schema.Json;
1623
+ };
1624
+ }[]] | readonly [{
1625
+ readonly type: "text";
1626
+ readonly text: string;
1627
+ readonly "~effect/ai/Prompt/Part": "~effect/ai/Prompt/Part";
1628
+ readonly options: {
1629
+ readonly [x: string]: Schema.Json;
1630
+ };
1631
+ } | {
1632
+ readonly type: "file";
1633
+ readonly mediaType: string;
1634
+ readonly fileName?: string | undefined;
1635
+ readonly data: string | URL | Uint8Array<ArrayBufferLike>;
1636
+ readonly "~effect/ai/Prompt/Part": "~effect/ai/Prompt/Part";
1637
+ readonly options: {
1638
+ readonly [x: string]: Schema.Json;
1639
+ };
1640
+ }, ...({
1641
+ readonly type: "text";
1642
+ readonly text: string;
1643
+ readonly "~effect/ai/Prompt/Part": "~effect/ai/Prompt/Part";
1644
+ readonly options: {
1645
+ readonly [x: string]: Schema.Json;
1646
+ };
1647
+ } | {
1648
+ readonly type: "file";
1649
+ readonly mediaType: string;
1650
+ readonly fileName?: string | undefined;
1651
+ readonly data: string | URL | Uint8Array<ArrayBufferLike>;
1652
+ readonly "~effect/ai/Prompt/Part": "~effect/ai/Prompt/Part";
1653
+ readonly options: {
1654
+ readonly [x: string]: Schema.Json;
1655
+ };
1656
+ })[]];
1657
+ readonly runId: string;
1658
+ } | {
1659
+ readonly createdAtMs?: number | undefined;
1660
+ readonly messageId: string;
1661
+ readonly seq: number;
1662
+ readonly _tag: "Assistant";
1663
+ readonly content: {
1664
+ readonly text: string;
1665
+ readonly reasoning?: string | undefined;
1666
+ };
1667
+ readonly imported?: true | undefined;
1668
+ readonly inferenceId: string;
1669
+ readonly promptParts?: readonly ({
1670
+ readonly type: "text";
1671
+ readonly text: string;
1672
+ readonly "~effect/ai/Prompt/Part": "~effect/ai/Prompt/Part";
1673
+ readonly options: {
1674
+ readonly [x: string]: Schema.Json;
1675
+ };
1676
+ } | {
1677
+ readonly type: "file";
1678
+ readonly mediaType: string;
1679
+ readonly fileName?: string | undefined;
1680
+ readonly data: string | URL | Uint8Array<ArrayBufferLike>;
1681
+ readonly "~effect/ai/Prompt/Part": "~effect/ai/Prompt/Part";
1682
+ readonly options: {
1683
+ readonly [x: string]: Schema.Json;
1684
+ };
1685
+ } | {
1686
+ readonly type: "reasoning";
1687
+ readonly text: string;
1688
+ readonly "~effect/ai/Prompt/Part": "~effect/ai/Prompt/Part";
1689
+ readonly options: {
1690
+ readonly [x: string]: Schema.Json;
1691
+ };
1692
+ } | {
1693
+ readonly type: "tool-call";
1694
+ readonly id: string;
1695
+ readonly name: string;
1696
+ readonly params: unknown;
1697
+ readonly providerExecuted: boolean;
1698
+ readonly "~effect/ai/Prompt/Part": "~effect/ai/Prompt/Part";
1699
+ readonly options: {
1700
+ readonly [x: string]: Schema.Json;
1701
+ };
1702
+ } | {
1703
+ readonly type: "tool-result";
1704
+ readonly id: string;
1705
+ readonly name: string;
1706
+ readonly isFailure: boolean;
1707
+ readonly result: unknown;
1708
+ readonly modelOutput?: readonly ({
1709
+ readonly type: "text";
1710
+ readonly text: string;
1711
+ readonly "~effect/ai/Prompt/Part": "~effect/ai/Prompt/Part";
1712
+ readonly options: {
1713
+ readonly [x: string]: Schema.Json;
1714
+ };
1715
+ } | {
1716
+ readonly type: "file";
1717
+ readonly mediaType: string;
1718
+ readonly fileName?: string | undefined;
1719
+ readonly data: string | URL | Uint8Array<ArrayBufferLike>;
1720
+ readonly "~effect/ai/Prompt/Part": "~effect/ai/Prompt/Part";
1721
+ readonly options: {
1722
+ readonly [x: string]: Schema.Json;
1723
+ };
1724
+ })[] | undefined;
1725
+ readonly providerExecuted: boolean;
1726
+ readonly "~effect/ai/Prompt/Part": "~effect/ai/Prompt/Part";
1727
+ readonly options: {
1728
+ readonly [x: string]: Schema.Json;
1729
+ };
1730
+ } | {
1731
+ readonly type: "tool-approval-request";
1732
+ readonly approvalId: string;
1733
+ readonly toolCallId: string;
1734
+ readonly "~effect/ai/Prompt/Part": "~effect/ai/Prompt/Part";
1735
+ readonly options: {
1736
+ readonly [x: string]: Schema.Json;
1737
+ };
1738
+ })[] | undefined;
1739
+ readonly runId: string;
1740
+ readonly turnId: string;
1741
+ } | {
1742
+ readonly createdAtMs?: number | undefined;
1743
+ readonly messageId: string;
1744
+ readonly seq: number;
1745
+ readonly _tag: "AssistantPartial";
1746
+ readonly content: {
1747
+ readonly text: string;
1748
+ readonly reasoning?: string | undefined;
1749
+ };
1750
+ readonly inferenceId: string;
1751
+ readonly promptParts?: readonly ({
1752
+ readonly type: "text";
1753
+ readonly text: string;
1754
+ readonly "~effect/ai/Prompt/Part": "~effect/ai/Prompt/Part";
1755
+ readonly options: {
1756
+ readonly [x: string]: Schema.Json;
1757
+ };
1758
+ } | {
1759
+ readonly type: "file";
1760
+ readonly mediaType: string;
1761
+ readonly fileName?: string | undefined;
1762
+ readonly data: string | URL | Uint8Array<ArrayBufferLike>;
1763
+ readonly "~effect/ai/Prompt/Part": "~effect/ai/Prompt/Part";
1764
+ readonly options: {
1765
+ readonly [x: string]: Schema.Json;
1766
+ };
1767
+ } | {
1768
+ readonly type: "reasoning";
1769
+ readonly text: string;
1770
+ readonly "~effect/ai/Prompt/Part": "~effect/ai/Prompt/Part";
1771
+ readonly options: {
1772
+ readonly [x: string]: Schema.Json;
1773
+ };
1774
+ } | {
1775
+ readonly type: "tool-call";
1776
+ readonly id: string;
1777
+ readonly name: string;
1778
+ readonly params: unknown;
1779
+ readonly providerExecuted: boolean;
1780
+ readonly "~effect/ai/Prompt/Part": "~effect/ai/Prompt/Part";
1781
+ readonly options: {
1782
+ readonly [x: string]: Schema.Json;
1783
+ };
1784
+ } | {
1785
+ readonly type: "tool-result";
1786
+ readonly id: string;
1787
+ readonly name: string;
1788
+ readonly isFailure: boolean;
1789
+ readonly result: unknown;
1790
+ readonly modelOutput?: readonly ({
1791
+ readonly type: "text";
1792
+ readonly text: string;
1793
+ readonly "~effect/ai/Prompt/Part": "~effect/ai/Prompt/Part";
1794
+ readonly options: {
1795
+ readonly [x: string]: Schema.Json;
1796
+ };
1797
+ } | {
1798
+ readonly type: "file";
1799
+ readonly mediaType: string;
1800
+ readonly fileName?: string | undefined;
1801
+ readonly data: string | URL | Uint8Array<ArrayBufferLike>;
1802
+ readonly "~effect/ai/Prompt/Part": "~effect/ai/Prompt/Part";
1803
+ readonly options: {
1804
+ readonly [x: string]: Schema.Json;
1805
+ };
1806
+ })[] | undefined;
1807
+ readonly providerExecuted: boolean;
1808
+ readonly "~effect/ai/Prompt/Part": "~effect/ai/Prompt/Part";
1809
+ readonly options: {
1810
+ readonly [x: string]: Schema.Json;
1811
+ };
1812
+ } | {
1813
+ readonly type: "tool-approval-request";
1814
+ readonly approvalId: string;
1815
+ readonly toolCallId: string;
1816
+ readonly "~effect/ai/Prompt/Part": "~effect/ai/Prompt/Part";
1817
+ readonly options: {
1818
+ readonly [x: string]: Schema.Json;
1819
+ };
1820
+ })[] | undefined;
1821
+ readonly reason: string;
1822
+ readonly runId: string;
1823
+ readonly turnId: string;
1824
+ }>;
1825
+ readonly stopRequests: ReadonlyMap<string, {
1826
+ readonly commandId: string;
1827
+ readonly requestedSeq: number;
1828
+ readonly requestedRunId?: string | undefined;
1829
+ readonly requestedTurnId?: string | undefined;
1830
+ readonly appliedSeq?: number | undefined;
1831
+ readonly appliedRunId?: string | undefined;
1832
+ readonly appliedTurnId?: string | undefined;
1833
+ readonly appliedInferenceId?: string | undefined;
1834
+ }>;
1835
+ readonly compactions: ReadonlyMap<string, {
1836
+ readonly compactionId: string;
1837
+ readonly requestedSeq?: number | undefined;
1838
+ readonly startedSeq?: number | undefined;
1839
+ readonly summaryCreatedSeq?: number | undefined;
1840
+ readonly summaryId?: string | undefined;
1841
+ readonly sourceFromSeq?: number | undefined;
1842
+ readonly sourceToSeq?: number | undefined;
1843
+ readonly rebasedSeq?: number | undefined;
1844
+ readonly contextVersion?: number | undefined;
1845
+ readonly terminal?: {
1846
+ readonly _tag: "Completed";
1847
+ readonly seq: number;
1848
+ } | {
1849
+ readonly _tag: "Failed";
1850
+ readonly seq: number;
1851
+ readonly error: {
1852
+ readonly message: string;
1853
+ readonly code?: string | undefined;
1854
+ readonly details?: unknown;
1855
+ };
1856
+ } | undefined;
1857
+ }>;
1858
+ readonly context: {
1859
+ readonly version: number;
1860
+ readonly currentSummaryId?: string | undefined;
1861
+ };
1862
+ readonly tokenConsumption: {
1863
+ readonly byModel: readonly {
1864
+ readonly provider: string;
1865
+ readonly modelId: string;
1866
+ readonly usage: {
1867
+ readonly inputTokens: number;
1868
+ readonly cachedInputTokens: number;
1869
+ readonly cacheWriteInputTokens: number;
1870
+ readonly outputTokens: number;
1871
+ readonly textTokens: number;
1872
+ readonly reasoningTokens: number;
1873
+ };
1874
+ }[];
1875
+ };
1876
+ readonly commandQueues: {
1877
+ readonly active?: {
1878
+ readonly commandId: string;
1879
+ readonly runId?: string | undefined;
1880
+ } | undefined;
1881
+ readonly pendingCommands: readonly {
1882
+ readonly commandId: string;
1883
+ readonly command: {
1884
+ readonly _tag: "SubmitMessage";
1885
+ readonly commandId?: string | undefined;
1886
+ readonly idempotencyKey?: string | undefined;
1887
+ readonly disposition: "interrupt" | "queue" | "steer";
1888
+ readonly content: string | readonly [{
1889
+ readonly type: "text";
1890
+ readonly text: string;
1891
+ readonly "~effect/ai/Prompt/Part"?: "~effect/ai/Prompt/Part" | undefined;
1892
+ readonly options?: {
1893
+ readonly [x: string]: Schema.Json;
1894
+ } | undefined;
1895
+ } | {
1896
+ readonly type: "file";
1897
+ readonly mediaType: string;
1898
+ readonly fileName?: string | undefined;
1899
+ readonly data: string | URL | Uint8Array<ArrayBufferLike> | {
1900
+ readonly _tag: "Uint8Array";
1901
+ readonly base64: string;
1902
+ } | {
1903
+ readonly _tag: "URL";
1904
+ readonly href: string;
1905
+ };
1906
+ readonly "~effect/ai/Prompt/Part"?: "~effect/ai/Prompt/Part" | undefined;
1907
+ readonly options?: {
1908
+ readonly [x: string]: Schema.Json;
1909
+ } | undefined;
1910
+ }, ...({
1911
+ readonly type: "text";
1912
+ readonly text: string;
1913
+ readonly "~effect/ai/Prompt/Part"?: "~effect/ai/Prompt/Part" | undefined;
1914
+ readonly options?: {
1915
+ readonly [x: string]: Schema.Json;
1916
+ } | undefined;
1917
+ } | {
1918
+ readonly type: "file";
1919
+ readonly mediaType: string;
1920
+ readonly fileName?: string | undefined;
1921
+ readonly data: string | URL | Uint8Array<ArrayBufferLike> | {
1922
+ readonly _tag: "Uint8Array";
1923
+ readonly base64: string;
1924
+ } | {
1925
+ readonly _tag: "URL";
1926
+ readonly href: string;
1927
+ };
1928
+ readonly "~effect/ai/Prompt/Part"?: "~effect/ai/Prompt/Part" | undefined;
1929
+ readonly options?: {
1930
+ readonly [x: string]: Schema.Json;
1931
+ } | undefined;
1932
+ })[]];
1933
+ readonly expectedPausedMessageIdsToCancel?: readonly string[] | undefined;
1934
+ } | {
1935
+ readonly _tag: "StopTurn";
1936
+ readonly commandId?: string | undefined;
1937
+ readonly idempotencyKey?: string | undefined;
1938
+ } | {
1939
+ readonly _tag: "CancelPendingMessage";
1940
+ readonly commandId?: string | undefined;
1941
+ readonly idempotencyKey?: string | undefined;
1942
+ readonly messageId: string;
1943
+ readonly reason: "edit" | "user-cancel";
1944
+ } | {
1945
+ readonly _tag: "PromotePendingMessage";
1946
+ readonly commandId?: string | undefined;
1947
+ readonly idempotencyKey?: string | undefined;
1948
+ readonly messageId: string;
1949
+ } | {
1950
+ readonly _tag: "ResumePendingMessages";
1951
+ readonly commandId?: string | undefined;
1952
+ readonly idempotencyKey?: string | undefined;
1953
+ readonly messageIds: readonly [string, ...string[]];
1954
+ };
1955
+ readonly admittedSeq: number;
1956
+ readonly admissionTrace?: {
1957
+ readonly span: {
1958
+ readonly traceId: string;
1959
+ readonly spanId: string;
1960
+ readonly sampled: boolean;
1961
+ readonly tracestate: string | null;
1962
+ };
1963
+ readonly links: readonly {
1964
+ readonly context: {
1965
+ readonly traceId: string;
1966
+ readonly spanId: string;
1967
+ readonly sampled: boolean;
1968
+ readonly tracestate: string | null;
1969
+ };
1970
+ readonly attributes: {
1971
+ readonly [x: string]: string | number | boolean;
1972
+ };
1973
+ }[];
1974
+ } | undefined;
1975
+ }[];
1976
+ readonly queuedCommands: readonly {
1977
+ readonly commandId: string;
1978
+ readonly command: {
1979
+ readonly _tag: "SubmitMessage";
1980
+ readonly commandId?: string | undefined;
1981
+ readonly idempotencyKey?: string | undefined;
1982
+ readonly disposition: "interrupt" | "queue" | "steer";
1983
+ readonly content: string | readonly [{
1984
+ readonly type: "text";
1985
+ readonly text: string;
1986
+ readonly "~effect/ai/Prompt/Part"?: "~effect/ai/Prompt/Part" | undefined;
1987
+ readonly options?: {
1988
+ readonly [x: string]: Schema.Json;
1989
+ } | undefined;
1990
+ } | {
1991
+ readonly type: "file";
1992
+ readonly mediaType: string;
1993
+ readonly fileName?: string | undefined;
1994
+ readonly data: string | URL | Uint8Array<ArrayBufferLike> | {
1995
+ readonly _tag: "Uint8Array";
1996
+ readonly base64: string;
1997
+ } | {
1998
+ readonly _tag: "URL";
1999
+ readonly href: string;
2000
+ };
2001
+ readonly "~effect/ai/Prompt/Part"?: "~effect/ai/Prompt/Part" | undefined;
2002
+ readonly options?: {
2003
+ readonly [x: string]: Schema.Json;
2004
+ } | undefined;
2005
+ }, ...({
2006
+ readonly type: "text";
2007
+ readonly text: string;
2008
+ readonly "~effect/ai/Prompt/Part"?: "~effect/ai/Prompt/Part" | undefined;
2009
+ readonly options?: {
2010
+ readonly [x: string]: Schema.Json;
2011
+ } | undefined;
2012
+ } | {
2013
+ readonly type: "file";
2014
+ readonly mediaType: string;
2015
+ readonly fileName?: string | undefined;
2016
+ readonly data: string | URL | Uint8Array<ArrayBufferLike> | {
2017
+ readonly _tag: "Uint8Array";
2018
+ readonly base64: string;
2019
+ } | {
2020
+ readonly _tag: "URL";
2021
+ readonly href: string;
2022
+ };
2023
+ readonly "~effect/ai/Prompt/Part"?: "~effect/ai/Prompt/Part" | undefined;
2024
+ readonly options?: {
2025
+ readonly [x: string]: Schema.Json;
2026
+ } | undefined;
2027
+ })[]];
2028
+ readonly expectedPausedMessageIdsToCancel?: readonly string[] | undefined;
2029
+ } | {
2030
+ readonly _tag: "StopTurn";
2031
+ readonly commandId?: string | undefined;
2032
+ readonly idempotencyKey?: string | undefined;
2033
+ } | {
2034
+ readonly _tag: "CancelPendingMessage";
2035
+ readonly commandId?: string | undefined;
2036
+ readonly idempotencyKey?: string | undefined;
2037
+ readonly messageId: string;
2038
+ readonly reason: "edit" | "user-cancel";
2039
+ } | {
2040
+ readonly _tag: "PromotePendingMessage";
2041
+ readonly commandId?: string | undefined;
2042
+ readonly idempotencyKey?: string | undefined;
2043
+ readonly messageId: string;
2044
+ } | {
2045
+ readonly _tag: "ResumePendingMessages";
2046
+ readonly commandId?: string | undefined;
2047
+ readonly idempotencyKey?: string | undefined;
2048
+ readonly messageIds: readonly [string, ...string[]];
2049
+ };
2050
+ readonly admittedSeq: number;
2051
+ readonly admissionTrace?: {
2052
+ readonly span: {
2053
+ readonly traceId: string;
2054
+ readonly spanId: string;
2055
+ readonly sampled: boolean;
2056
+ readonly tracestate: string | null;
2057
+ };
2058
+ readonly links: readonly {
2059
+ readonly context: {
2060
+ readonly traceId: string;
2061
+ readonly spanId: string;
2062
+ readonly sampled: boolean;
2063
+ readonly tracestate: string | null;
2064
+ };
2065
+ readonly attributes: {
2066
+ readonly [x: string]: string | number | boolean;
2067
+ };
2068
+ }[];
2069
+ } | undefined;
2070
+ }[];
2071
+ readonly activeControlCommands: readonly {
2072
+ readonly commandId: string;
2073
+ readonly command: {
2074
+ readonly _tag: "SubmitMessage";
2075
+ readonly commandId?: string | undefined;
2076
+ readonly idempotencyKey?: string | undefined;
2077
+ readonly disposition: "interrupt" | "queue" | "steer";
2078
+ readonly content: string | readonly [{
2079
+ readonly type: "text";
2080
+ readonly text: string;
2081
+ readonly "~effect/ai/Prompt/Part"?: "~effect/ai/Prompt/Part" | undefined;
2082
+ readonly options?: {
2083
+ readonly [x: string]: Schema.Json;
2084
+ } | undefined;
2085
+ } | {
2086
+ readonly type: "file";
2087
+ readonly mediaType: string;
2088
+ readonly fileName?: string | undefined;
2089
+ readonly data: string | URL | Uint8Array<ArrayBufferLike> | {
2090
+ readonly _tag: "Uint8Array";
2091
+ readonly base64: string;
2092
+ } | {
2093
+ readonly _tag: "URL";
2094
+ readonly href: string;
2095
+ };
2096
+ readonly "~effect/ai/Prompt/Part"?: "~effect/ai/Prompt/Part" | undefined;
2097
+ readonly options?: {
2098
+ readonly [x: string]: Schema.Json;
2099
+ } | undefined;
2100
+ }, ...({
2101
+ readonly type: "text";
2102
+ readonly text: string;
2103
+ readonly "~effect/ai/Prompt/Part"?: "~effect/ai/Prompt/Part" | undefined;
2104
+ readonly options?: {
2105
+ readonly [x: string]: Schema.Json;
2106
+ } | undefined;
2107
+ } | {
2108
+ readonly type: "file";
2109
+ readonly mediaType: string;
2110
+ readonly fileName?: string | undefined;
2111
+ readonly data: string | URL | Uint8Array<ArrayBufferLike> | {
2112
+ readonly _tag: "Uint8Array";
2113
+ readonly base64: string;
2114
+ } | {
2115
+ readonly _tag: "URL";
2116
+ readonly href: string;
2117
+ };
2118
+ readonly "~effect/ai/Prompt/Part"?: "~effect/ai/Prompt/Part" | undefined;
2119
+ readonly options?: {
2120
+ readonly [x: string]: Schema.Json;
2121
+ } | undefined;
2122
+ })[]];
2123
+ readonly expectedPausedMessageIdsToCancel?: readonly string[] | undefined;
2124
+ } | {
2125
+ readonly _tag: "StopTurn";
2126
+ readonly commandId?: string | undefined;
2127
+ readonly idempotencyKey?: string | undefined;
2128
+ } | {
2129
+ readonly _tag: "CancelPendingMessage";
2130
+ readonly commandId?: string | undefined;
2131
+ readonly idempotencyKey?: string | undefined;
2132
+ readonly messageId: string;
2133
+ readonly reason: "edit" | "user-cancel";
2134
+ } | {
2135
+ readonly _tag: "PromotePendingMessage";
2136
+ readonly commandId?: string | undefined;
2137
+ readonly idempotencyKey?: string | undefined;
2138
+ readonly messageId: string;
2139
+ } | {
2140
+ readonly _tag: "ResumePendingMessages";
2141
+ readonly commandId?: string | undefined;
2142
+ readonly idempotencyKey?: string | undefined;
2143
+ readonly messageIds: readonly [string, ...string[]];
2144
+ };
2145
+ readonly admittedSeq: number;
2146
+ readonly admissionTrace?: {
2147
+ readonly span: {
2148
+ readonly traceId: string;
2149
+ readonly spanId: string;
2150
+ readonly sampled: boolean;
2151
+ readonly tracestate: string | null;
2152
+ };
2153
+ readonly links: readonly {
2154
+ readonly context: {
2155
+ readonly traceId: string;
2156
+ readonly spanId: string;
2157
+ readonly sampled: boolean;
2158
+ readonly tracestate: string | null;
2159
+ };
2160
+ readonly attributes: {
2161
+ readonly [x: string]: string | number | boolean;
2162
+ };
2163
+ }[];
2164
+ } | undefined;
2165
+ }[];
2166
+ readonly steeringByRun: ReadonlyMap<string, readonly {
2167
+ readonly messageId: string;
2168
+ readonly commandId: string;
2169
+ readonly runId: string;
2170
+ readonly content: readonly [{
2171
+ readonly type: "text";
2172
+ readonly text: string;
2173
+ readonly "~effect/ai/Prompt/Part": "~effect/ai/Prompt/Part";
2174
+ readonly options: {
2175
+ readonly [x: string]: Schema.Json;
2176
+ };
2177
+ }, ...{
2178
+ readonly type: "text";
2179
+ readonly text: string;
2180
+ readonly "~effect/ai/Prompt/Part": "~effect/ai/Prompt/Part";
2181
+ readonly options: {
2182
+ readonly [x: string]: Schema.Json;
2183
+ };
2184
+ }[]] | readonly [{
2185
+ readonly type: "text";
2186
+ readonly text: string;
2187
+ readonly "~effect/ai/Prompt/Part": "~effect/ai/Prompt/Part";
2188
+ readonly options: {
2189
+ readonly [x: string]: Schema.Json;
2190
+ };
2191
+ } | {
2192
+ readonly type: "file";
2193
+ readonly mediaType: string;
2194
+ readonly fileName?: string | undefined;
2195
+ readonly data: string | URL | Uint8Array<ArrayBufferLike>;
2196
+ readonly "~effect/ai/Prompt/Part": "~effect/ai/Prompt/Part";
2197
+ readonly options: {
2198
+ readonly [x: string]: Schema.Json;
2199
+ };
2200
+ }, ...({
2201
+ readonly type: "text";
2202
+ readonly text: string;
2203
+ readonly "~effect/ai/Prompt/Part": "~effect/ai/Prompt/Part";
2204
+ readonly options: {
2205
+ readonly [x: string]: Schema.Json;
2206
+ };
2207
+ } | {
2208
+ readonly type: "file";
2209
+ readonly mediaType: string;
2210
+ readonly fileName?: string | undefined;
2211
+ readonly data: string | URL | Uint8Array<ArrayBufferLike>;
2212
+ readonly "~effect/ai/Prompt/Part": "~effect/ai/Prompt/Part";
2213
+ readonly options: {
2214
+ readonly [x: string]: Schema.Json;
2215
+ };
2216
+ })[]];
2217
+ readonly queuedSeq: number;
2218
+ readonly consumedSeq?: number | undefined;
2219
+ readonly consumedTurnId?: string | undefined;
2220
+ }[]>;
2221
+ readonly pendingQueue: readonly {
2222
+ readonly messageId: string;
2223
+ readonly commandId: string;
2224
+ readonly content: readonly [{
2225
+ readonly type: "text";
2226
+ readonly text: string;
2227
+ readonly "~effect/ai/Prompt/Part": "~effect/ai/Prompt/Part";
2228
+ readonly options: {
2229
+ readonly [x: string]: Schema.Json;
2230
+ };
2231
+ }, ...{
2232
+ readonly type: "text";
2233
+ readonly text: string;
2234
+ readonly "~effect/ai/Prompt/Part": "~effect/ai/Prompt/Part";
2235
+ readonly options: {
2236
+ readonly [x: string]: Schema.Json;
2237
+ };
2238
+ }[]] | readonly [{
2239
+ readonly type: "text";
2240
+ readonly text: string;
2241
+ readonly "~effect/ai/Prompt/Part": "~effect/ai/Prompt/Part";
2242
+ readonly options: {
2243
+ readonly [x: string]: Schema.Json;
2244
+ };
2245
+ } | {
2246
+ readonly type: "file";
2247
+ readonly mediaType: string;
2248
+ readonly fileName?: string | undefined;
2249
+ readonly data: string | URL | Uint8Array<ArrayBufferLike>;
2250
+ readonly "~effect/ai/Prompt/Part": "~effect/ai/Prompt/Part";
2251
+ readonly options: {
2252
+ readonly [x: string]: Schema.Json;
2253
+ };
2254
+ }, ...({
2255
+ readonly type: "text";
2256
+ readonly text: string;
2257
+ readonly "~effect/ai/Prompt/Part": "~effect/ai/Prompt/Part";
2258
+ readonly options: {
2259
+ readonly [x: string]: Schema.Json;
2260
+ };
2261
+ } | {
2262
+ readonly type: "file";
2263
+ readonly mediaType: string;
2264
+ readonly fileName?: string | undefined;
2265
+ readonly data: string | URL | Uint8Array<ArrayBufferLike>;
2266
+ readonly "~effect/ai/Prompt/Part": "~effect/ai/Prompt/Part";
2267
+ readonly options: {
2268
+ readonly [x: string]: Schema.Json;
2269
+ };
2270
+ })[]];
2271
+ readonly submittedSeq: number;
2272
+ readonly effectiveSeq: number;
2273
+ readonly disposition: "queue" | "steer";
2274
+ readonly targetRunId?: string | undefined;
2275
+ readonly pausedByCommandId?: string | undefined;
2276
+ }[];
2277
+ readonly pendingSteers: readonly {
2278
+ readonly messageId: string;
2279
+ readonly commandId: string;
2280
+ readonly content: readonly [{
2281
+ readonly type: "text";
2282
+ readonly text: string;
2283
+ readonly "~effect/ai/Prompt/Part": "~effect/ai/Prompt/Part";
2284
+ readonly options: {
2285
+ readonly [x: string]: Schema.Json;
2286
+ };
2287
+ }, ...{
2288
+ readonly type: "text";
2289
+ readonly text: string;
2290
+ readonly "~effect/ai/Prompt/Part": "~effect/ai/Prompt/Part";
2291
+ readonly options: {
2292
+ readonly [x: string]: Schema.Json;
2293
+ };
2294
+ }[]] | readonly [{
2295
+ readonly type: "text";
2296
+ readonly text: string;
2297
+ readonly "~effect/ai/Prompt/Part": "~effect/ai/Prompt/Part";
2298
+ readonly options: {
2299
+ readonly [x: string]: Schema.Json;
2300
+ };
2301
+ } | {
2302
+ readonly type: "file";
2303
+ readonly mediaType: string;
2304
+ readonly fileName?: string | undefined;
2305
+ readonly data: string | URL | Uint8Array<ArrayBufferLike>;
2306
+ readonly "~effect/ai/Prompt/Part": "~effect/ai/Prompt/Part";
2307
+ readonly options: {
2308
+ readonly [x: string]: Schema.Json;
2309
+ };
2310
+ }, ...({
2311
+ readonly type: "text";
2312
+ readonly text: string;
2313
+ readonly "~effect/ai/Prompt/Part": "~effect/ai/Prompt/Part";
2314
+ readonly options: {
2315
+ readonly [x: string]: Schema.Json;
2316
+ };
2317
+ } | {
2318
+ readonly type: "file";
2319
+ readonly mediaType: string;
2320
+ readonly fileName?: string | undefined;
2321
+ readonly data: string | URL | Uint8Array<ArrayBufferLike>;
2322
+ readonly "~effect/ai/Prompt/Part": "~effect/ai/Prompt/Part";
2323
+ readonly options: {
2324
+ readonly [x: string]: Schema.Json;
2325
+ };
2326
+ })[]];
2327
+ readonly submittedSeq: number;
2328
+ readonly effectiveSeq: number;
2329
+ readonly disposition: "queue" | "steer";
2330
+ readonly targetRunId?: string | undefined;
2331
+ readonly pausedByCommandId?: string | undefined;
2332
+ }[];
2333
+ readonly pausedQueue: readonly {
2334
+ readonly messageId: string;
2335
+ readonly commandId: string;
2336
+ readonly content: readonly [{
2337
+ readonly type: "text";
2338
+ readonly text: string;
2339
+ readonly "~effect/ai/Prompt/Part": "~effect/ai/Prompt/Part";
2340
+ readonly options: {
2341
+ readonly [x: string]: Schema.Json;
2342
+ };
2343
+ }, ...{
2344
+ readonly type: "text";
2345
+ readonly text: string;
2346
+ readonly "~effect/ai/Prompt/Part": "~effect/ai/Prompt/Part";
2347
+ readonly options: {
2348
+ readonly [x: string]: Schema.Json;
2349
+ };
2350
+ }[]] | readonly [{
2351
+ readonly type: "text";
2352
+ readonly text: string;
2353
+ readonly "~effect/ai/Prompt/Part": "~effect/ai/Prompt/Part";
2354
+ readonly options: {
2355
+ readonly [x: string]: Schema.Json;
2356
+ };
2357
+ } | {
2358
+ readonly type: "file";
2359
+ readonly mediaType: string;
2360
+ readonly fileName?: string | undefined;
2361
+ readonly data: string | URL | Uint8Array<ArrayBufferLike>;
2362
+ readonly "~effect/ai/Prompt/Part": "~effect/ai/Prompt/Part";
2363
+ readonly options: {
2364
+ readonly [x: string]: Schema.Json;
2365
+ };
2366
+ }, ...({
2367
+ readonly type: "text";
2368
+ readonly text: string;
2369
+ readonly "~effect/ai/Prompt/Part": "~effect/ai/Prompt/Part";
2370
+ readonly options: {
2371
+ readonly [x: string]: Schema.Json;
2372
+ };
2373
+ } | {
2374
+ readonly type: "file";
2375
+ readonly mediaType: string;
2376
+ readonly fileName?: string | undefined;
2377
+ readonly data: string | URL | Uint8Array<ArrayBufferLike>;
2378
+ readonly "~effect/ai/Prompt/Part": "~effect/ai/Prompt/Part";
2379
+ readonly options: {
2380
+ readonly [x: string]: Schema.Json;
2381
+ };
2382
+ })[]];
2383
+ readonly submittedSeq: number;
2384
+ readonly effectiveSeq: number;
2385
+ readonly disposition: "queue" | "steer";
2386
+ readonly targetRunId?: string | undefined;
2387
+ readonly pausedByCommandId?: string | undefined;
2388
+ }[];
2389
+ };
2390
+ };
2391
+ readonly reducerStates: ReadonlyMap<string, unknown>;
2392
+ };
92
2393
  //#endregion
93
- export { EDASessionBlockOnCommandRpcInput, EDASessionCommandRpcInput, EDASessionDurableObject, EDASessionDurableObjectOptions, EDASessionEventsRpcInput, EDASessionRpcSurface, EDASessionScopedRpcInput, EDASessionSubmitBatchRpcInput, type EDAWebSocketProjection, EDA_WEB_SOCKET_PROJECTION_HEADER, edaRuntimeConfig, encodeEdaRpcCommittedDurableEvent, encodeEdaRpcSessionSnapshot, getEDASessionDurableObjectByName };
2394
+ export { EDASessionBlockOnCommandRpcInput, EDASessionCommandRpcInput, EDASessionDecideRpcInput, EDASessionDurableObject, EDASessionDurableObjectOptions, EDASessionEventsRpcInput, EDASessionGrantRunRpcInput, EDASessionRpcSurface, EDASessionRunRequestOutcomeRpcInput, EDASessionScopedRpcInput, EDASessionSubmitBatchRpcInput, EDASessionTranscriptOptions, type EDAWebSocketProjection, EDA_WEB_SOCKET_PROJECTION_HEADER, EDA_WEB_SOCKET_STREAM_PARAM, edaRuntimeConfig, encodeEdaRpcCommittedDurableEvent, encodeEdaRpcSessionSnapshot, getEDASessionDurableObjectByName };
94
2395
  //# sourceMappingURL=durable-object.d.ts.map