effect-durable-agent 0.1.0-alpha.1 → 0.1.0-alpha.3

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 (43) hide show
  1. package/CHANGELOG.md +16 -1
  2. package/README.md +110 -108
  3. package/SECURITY.md +3 -4
  4. package/dist/{compaction-YayFKo_1.d.ts → compaction-1LSZR944.d.ts} +2 -2
  5. package/dist/{durable-object-runtime-pWv0ohlz.d.ts → durable-object-runtime-CiMKxGs6.d.ts} +7 -7
  6. package/dist/{durable-object-runtime-B7jwBY2R.js → durable-object-runtime-wKiqaAt2.js} +3 -3
  7. package/dist/durable-object-runtime-wKiqaAt2.js.map +1 -0
  8. package/dist/host/durable-object-runtime.d.ts +1 -1
  9. package/dist/host/durable-object-runtime.js +1 -1
  10. package/dist/host/durable-object.d.ts +3 -3
  11. package/dist/host/durable-object.js +1 -1
  12. package/dist/host/websocket-wire.d.ts +2 -2
  13. package/dist/host/websocket-wire.js +37 -20
  14. package/dist/host/websocket-wire.js.map +1 -1
  15. package/dist/index.d.ts +1 -1
  16. package/dist/{prompt-projector-9_02lk5-.d.ts → prompt-projector-DimXJPOJ.d.ts} +12 -13
  17. package/dist/{runtime-C56FQxiL.d.ts → runtime-DcdPOEuE.d.ts} +2 -2
  18. package/dist/services/compaction.d.ts +1 -1
  19. package/dist/services/prompt-projector.d.ts +2 -2
  20. package/dist/services/prompt-projector.js +20 -10
  21. package/dist/services/prompt-projector.js.map +1 -1
  22. package/dist/services/runtime.d.ts +1 -1
  23. package/dist/services/runtime.js +1 -1
  24. package/dist/services/session-query.d.ts +1 -1
  25. package/dist/services/session-query.js +1 -1
  26. package/dist/services/sink-registry.d.ts +1 -1
  27. package/dist/{session-query-DOc1KanA.js → session-query-Cbf-e0rG.js} +26 -70
  28. package/dist/session-query-Cbf-e0rG.js.map +1 -0
  29. package/dist/{session-query-DlRo5Ufc.d.ts → session-query-hxfujxUH.d.ts} +9 -9
  30. package/dist/{sink-registry-CIU0LD3m.d.ts → sink-registry-BziFpxoE.d.ts} +2 -2
  31. package/dist/testkit/layers.d.ts +5 -5
  32. package/dist/testkit/layers.js +1 -1
  33. package/dist/websocket-wire-D3tLrhe2.d.ts +2172 -0
  34. package/docs/assets/architecture.svg +170 -60
  35. package/docs/assets/event-sequence.svg +68 -78
  36. package/docs/assets/hero.svg +33 -0
  37. package/docs/releasing.md +78 -39
  38. package/docs/spec.md +4 -1
  39. package/docs/websocket-protocol.md +31 -5
  40. package/package.json +1 -1
  41. package/dist/durable-object-runtime-B7jwBY2R.js.map +0 -1
  42. package/dist/session-query-DOc1KanA.js.map +0 -1
  43. package/dist/websocket-wire-DvOu_6BJ.d.ts +0 -16773
package/CHANGELOG.md CHANGED
@@ -2,9 +2,24 @@
2
2
 
3
3
  All notable changes to Effect Durable Agent will be documented in this file.
4
4
 
5
+ ## Unreleased
6
+
7
+ ## 0.1.0-alpha.3
8
+
9
+ - Publish the state-projected prompt context and WebSocket schema changes from the unpublished `0.1.0-alpha.2` package
10
+ - Pin prerelease publication to the npm `alpha` dist-tag
11
+
12
+ ## 0.1.0-alpha.2
13
+
14
+ - Let applications project instruction and data messages from current reducer state into each model prompt
15
+ - Build prompts only after turn input selection is committed into durable reducer state
16
+ - Separate WebSocket protocol schemas into explicit domain and wire surfaces
17
+ - Add a typed domain-frame encoder, a host adapter for app-event narrowing, and transformation
18
+ round-trip coverage
19
+
5
20
  ## 0.1.0-alpha.1
6
21
 
7
- - Prepare the first public prerelease as `effect-durable-agent`
22
+ - Publish the first public prerelease as `effect-durable-agent`
8
23
  - Ship compiled ESM and TypeScript declarations for every supported subpath
9
24
  - Add isolated package-consumer validation for Cloudflare Workers
10
25
  - Add MIT licensing and trusted-publishing release automation
package/README.md CHANGED
@@ -1,7 +1,9 @@
1
1
  # effect-durable-agent
2
2
 
3
- > EDA is a Redux-inspired durable state-management layer for agentic applications, hosted on
4
- [Cloudflare Durable Objects](https://developers.cloudflare.com/durable-objects/).
3
+ ![EDA is a redux-inspired durable state management layer for agentic applications](./docs/assets/hero.svg)
4
+
5
+ [![npm version](https://img.shields.io/npm/v/effect-durable-agent)](https://www.npmjs.com/package/effect-durable-agent)
6
+ [![CI](https://github.com/advait/effect-durable-agent/actions/workflows/ci.yml/badge.svg)](https://github.com/advait/effect-durable-agent/actions/workflows/ci.yml)
5
7
 
6
8
  ## Why?
7
9
 
@@ -14,16 +16,12 @@ Tool execution constantly changes what that application needs to represent: `San
14
16
  event that transitions the application's state machine**. Product state and agent state coexist in
15
17
  the same event sequence.
16
18
 
17
- Your application describes how events like `SandboxStarted` and `ApprovalRequested` change its
18
- state. EDA records them in one durable history, giving agent state and product state a shared source
19
- of truth. It streams those same events to clients. Each client uses them to update its local state,
20
- so every view converges on the durable session state—even across tabs and reconnects.
21
-
22
- ## One state machine for the whole application
19
+ ## How EDA works
23
20
 
24
- For example, a coding-agent session might record:
21
+ EDA models the agent and the surrounding product as one application state machine. For example, a
22
+ coding-agent session might record:
25
23
 
26
- ![An ordered EDA session history. Blue events belong to the EDA framework; orange events belong to the application.](./docs/assets/event-sequence.svg)
24
+ ![An ordered EDA session history where framework and application events share one sequence.](./docs/assets/event-sequence.svg)
27
25
 
28
26
  Framework events and product events are not separate channels. They form the same history and
29
27
  transition the same application state.
@@ -38,39 +36,96 @@ EDA supplies the framework events and reducers for commands, runs, turns, messag
38
36
  tool calls. Applications add their own typed events and reducers for sandboxes, approvals, billing,
39
37
  external conversations, delivery state, or anything else the product needs to represent.
40
38
 
39
+ Those events flow through the rest of the system as follows:
40
+
41
+ ![A numbered guide to EDA architecture: 1, commands enter the session runtime; 2, durable transitions form an ordered event log; 3, clients follow the live event stream; 4, pure reducers derive state; 5, state captures agent and product lifecycles; 6, pure UI and LLM context projections shape state for different consumers; 7, durable sinks deliver events to external systems.](./docs/assets/architecture.svg)
42
+
43
+ ### 1. Session runtime: one state machine for the entire application
44
+
45
+ User commands and application events enter one centralized session runtime. It manages the entire
46
+ application state machine: agent lifecycles such as runs, inference, and tool calls coexist with
47
+ product lifecycles such as sandboxes, approvals, and external delivery.
48
+
49
+ Every transition therefore has one owner and one place to be recorded, rather than leaving session
50
+ state scattered across callbacks, workers, and unrelated stores.
51
+
52
+ ### 2. Ordered event log: the definitive history of the state machine
53
+
54
+ When the state machine transitions, EDA records an event durably and assigns it the next sequence
55
+ number for that session. Read in order, those events definitively describe how the application
56
+ evolved.
57
+
58
+ The event log—not an in-memory object or cached snapshot—is the source of truth. Current state,
59
+ client updates, recovery, tests, and external delivery are all derived from that ordered history.
60
+
61
+ ### 3. Live event stream: reconnect without losing the session
62
+
63
+ Live clients subscribe to the event stream over a reconnect-safe WebSocket protocol. Each client
64
+ tracks the last durable sequence it has applied.
65
+
66
+ When a slow or disconnected client returns, it provides that sequence, receives every committed
67
+ event after it, and then continues live.
68
+
69
+ ### 4. Pure reducers: events become state
70
+
71
+ Framework and application reducers fold the ordered event history to produce current state.
72
+ Framework events update agent lifecycles; application events update product lifecycles; both
73
+ contribute to the same state model.
74
+
75
+ Reducers are pure: given the same starting state and event, they produce the same next state. That
76
+ makes every state transition explicit, replayable, and testable.
77
+
78
+ ### 5. State: a cached view of durable history
79
+
80
+ The reducers produce a complete snapshot of framework and application state through a known
81
+ sequence number. EDA caches that snapshot in Durable Object SQLite so reads and restarts do not
82
+ need to replay the entire history from the beginning.
83
+
84
+ The cache is an optimization, not a second source of truth. If it is missing or incompatible, EDA
85
+ can rebuild it from the event log; the application is ultimately defined by its ordered events.
86
+
87
+ ### 6. Pure projections: UI state is not model context
88
+
89
+ State is not the final representation consumed by either people or models. The UI is a pure
90
+ projection of state, and the LLM context is a separate pure projection of that same state.
91
+
92
+ The UI can preserve tool progress, approvals, sandbox status, and rich product history while the
93
+ LLM context selects and compacts only what the model should see. Applications can model each
94
+ consumer honestly instead of collapsing both into one constrained representation. See the
95
+ [UI projection guide](./docs/ui-projection.md) for the projection contract.
96
+
97
+ ### 7. Durable sinks: callbacks that survive failure
98
+
99
+ Framework and application events often need to trigger side effects in external systems: post to
100
+ Slack, write to a database, or notify another service. Handling them in ordinary callbacks makes
101
+ delivery depend on the health of the current process.
102
+
103
+ EDA handles this with durable sinks, which behave like durable callbacks over committed session
104
+ history. EDA delivers events to each sink in sequence order, persists its progress, retries
105
+ failures, and resumes after application restarts. Sinks run independently of the application loop,
106
+ so external delivery does not block application progress. Durable retries let external systems
107
+ converge on committed session history with eventual-consistency guarantees.
108
+
109
+ Delivery is at-least-once, so external operations must be idempotent. Each durable event carries a
110
+ stable event ID that, together with its session ID, provides the operation's idempotency key.
111
+
41
112
  ## What this unlocks
42
113
 
43
114
  ### Live state on every client
44
115
 
45
- EDA exposes serialized reducer snapshots and streams the ordered session history over a
46
- reconnect-safe WebSocket protocol. In a server-side rendering (SSR) flow, the server renders state
47
- through sequence `N`; the browser hydrates from that snapshot, follows events after `N`, and applies
48
- its application projection as they arrive.
49
-
50
- ```text
51
- server snapshot through N
52
- +
53
- streamed events after N
54
- =
55
- current client state
56
- ```
116
+ Every tab, embedded surface, and admin view follows the same durable session. If one client loses
117
+ its connection or falls behind, it returns to the current state instead of resetting the session or
118
+ guessing which updates it missed.
57
119
 
58
- Every tab, embedded surface, or admin view follows the same durable session. Slow and disconnected
59
- clients catch up from their last acknowledged sequence instead of guessing which updates they
60
- missed.
120
+ Server-side rendering does not require a second state model. The server can render a durable
121
+ snapshot, and the browser can continue from that exact point as new events arrive.
61
122
 
62
123
  ### Durable side effects
63
124
 
64
- EDA makes side effects durable.
65
-
66
- If `AssistantMessageCommitted` should post a result to Slack and Slack is temporarily unavailable,
67
- EDA retains the event and retries the delivery instead of losing it inside a failed callback.
68
- Durable sinks run independently of the main agent loop, preserve event order, and converge
69
- eventually. Each sink tracks its own persisted cursor, advances only after successful processing,
70
- and retries failures with backoff.
71
-
72
- Delivery is at-least-once, so external operations still need stable idempotency keys. The important
73
- guarantee is that a transient process or network failure does not silently erase the work.
125
+ If `AssistantMessageCommitted` should post a result to Slack and Slack is unavailable, the agent
126
+ keeps moving. When Slack recovers, it receives the committed events and converges with the session
127
+ history. External availability stays off the application's critical path without sacrificing
128
+ reliable delivery.
74
129
 
75
130
  See the [Slack bridge example](./examples/002-slack-bridge) for idempotent ingress, a custom reducer,
76
131
  and durable outbound delivery.
@@ -88,17 +143,14 @@ the recovery transitions before new live activity.
88
143
 
89
144
  ### Production sessions become UI fixtures
90
145
 
91
- Because application state is a pure projection of durable events, a production event sequence can
92
- become a test fixture.
93
-
94
- Replay it one event at a time through the same reducers, stop at any sequence, and assert exactly
95
- what the UI should show: the running tool card, the active sandbox, the pending approval, the
96
- completed delivery, or the recovered run. A difficult production session becomes a reproducible UI
97
- test instead of a story in a bug report.
146
+ A production event sequence can become a test fixture. Replay it one event at a time, stop at any
147
+ sequence, and assert exactly what the UI should show: the running tool card, the active sandbox, the
148
+ pending approval, the completed delivery, or the recovered run.
98
149
 
150
+ A difficult production session becomes a reproducible UI test instead of a story in a bug report.
99
151
  The package includes pure reducer tests, generated state-machine properties, canned-model journeys,
100
- crash-prefix simulations, and an [offline trace harness](./testing/offline-trace) that writes
101
- durable and live event artifacts.
152
+ crash-prefix simulations, and an [offline trace harness](./testing/offline-trace) that writes durable
153
+ and live event artifacts.
102
154
 
103
155
  ### Tracing for every agent run
104
156
 
@@ -111,7 +163,7 @@ be exported through OpenTelemetry to Google Cloud Trace or another existing back
111
163
 
112
164
  ![Google Cloud Trace view of an EDA session, showing agent turns, model inference, tool calls, sandbox execution, and an external integration in one timeline.](./docs/assets/gcp-trace.png)
113
165
 
114
- ### Built for Cloudflare Durable Objects
166
+ ## Built for Cloudflare Durable Objects
115
167
 
116
168
  EDA's first host maps one session to one
117
169
  [Cloudflare Durable Object](https://developers.cloudflare.com/durable-objects/). The object is the
@@ -129,61 +181,10 @@ Durable Objects are the first host, not the whole architecture. EDA's runtime de
129
181
  storage, scheduling, identity, and live-delivery boundaries that another platform can implement
130
182
  with equivalent semantics.
131
183
 
132
- ## Core concepts
133
-
134
- ![EDA architecture. Commands and application events enter a session runtime and durable event log, which feed reducers, reconnecting clients, durable sinks, recovery, replay, tests, and model context.](./docs/assets/architecture.svg)
135
-
136
- Effect owns the execution around this state machine: structured concurrency, streams, interruption,
137
- scoped resources, typed failures, retries, services, and tracing. The event history owns durable
138
- truth.
139
-
140
- ### Durable and ephemeral events
141
-
142
- EDA's ordered event stream carries two types of events:
143
-
144
- - **Durable events** are persisted facts with a monotonically increasing per-session `seq`. They
145
- drive reducers, recovery, reconnect, tests, and durable sinks
146
- - **Ephemeral events** carry live-only details such as text deltas, reasoning deltas, and speculative
147
- tool parameters. They are positioned against the current durable head but are not durable truth
148
-
149
- A durable event is published live only after storage commits it.
150
-
151
- ### Pure reducers
152
-
153
- Reducers turn durable events into current state. EDA's framework reducer derives commands, runs,
154
- turns, messages, inference, and tool state. Applications register their own reducers for product
155
- state such as sandboxes, approvals, billing, or external delivery.
156
-
157
- Framework and application reducers fold the same ordered history. Their checkpoints accelerate
158
- startup and snapshots; the event log remains the source of truth.
159
-
160
- ### Live event stream
161
-
162
- Clients begin with a reducer snapshot through sequence `N`, replay durable events after `N`, and
163
- then follow new durable and ephemeral events live. Sequence-based catch-up lets every connected
164
- view converge without coupling a slow client to agent execution.
165
-
166
- ### Durable sinks
167
-
168
- Durable sinks process committed events outside the main agent loop. Each sink preserves event
169
- ordering, tracks an independent durable cursor, and advances only after successful processing.
170
- Failures retry with backoff, so external systems converge eventually without blocking the agent.
171
-
172
- ### Session runtime
173
-
174
- One session has at most one active run and turn. The runtime:
175
-
176
- 1. Durably admits a command
177
- 2. Starts and traces the run, turn, and inference
178
- 3. Commits message and tool lifecycle facts
179
- 4. Folds framework and application reducers
180
- 5. Publishes positioned events to live clients
181
- 6. Drains durable sinks
182
- 7. Recovers from the durable history after a restart
183
-
184
184
  ## Get started
185
185
 
186
- Install EDA from npm:
186
+ Install the public alpha from npm. Using the `alpha` tag keeps prerelease consumers on the current
187
+ alpha channel:
187
188
 
188
189
  ```bash
189
190
  pnpm add effect-durable-agent@alpha
@@ -212,16 +213,6 @@ Start with the executable examples:
212
213
  | [`002-slack-bridge`](./examples/002-slack-bridge) | Idempotent ingress, application events and reducers, and a retrying durable sink. |
213
214
  | [`003-sandbox-lifecycle`](./examples/003-sandbox-lifecycle) | Tool and product events reduced into one UI model, including snapshot-to-stream handoff. |
214
215
 
215
- ## Why Effect?
216
-
217
- Agent sessions combine long-running model streams, concurrent tools, interruption, cleanup, retries,
218
- external services, and observability. EDA uses [Effect](https://effect.website/) so those concerns
219
- share one structured execution model rather than a collection of detached promises and callbacks.
220
-
221
- Effect is the implementation foundation, not the product pitch. The reason to use EDA is the
222
- durable application model; Effect is what lets the runtime execute that model with scoped resources,
223
- typed boundaries, structured concurrency, and first-class tracing.
224
-
225
216
  ## Why EDA instead of another agent SDK or framework?
226
217
 
227
218
  Consider a coding agent that:
@@ -289,6 +280,16 @@ client catch-up, restart recovery, production-derived UI fixtures, and durable s
289
280
  - Trace propagation and Effect span instrumentation across runtime boundaries
290
281
  - Queue, steer, interrupt, stop, and idempotent command admission
291
282
 
283
+ ## Why Effect?
284
+
285
+ Agent sessions combine long-running model streams, concurrent tools, interruption, cleanup, retries,
286
+ external services, and observability. EDA uses [Effect](https://effect.website/) so those concerns
287
+ share one structured execution model rather than a collection of detached promises and callbacks.
288
+
289
+ Effect is the implementation foundation, not the product pitch. The reason to use EDA is the
290
+ durable application model; Effect is what lets the runtime execute that model with scoped resources,
291
+ typed boundaries, structured concurrency, and first-class tracing.
292
+
292
293
  ## Documentation
293
294
 
294
295
  - [Current implementation](./docs/spec.md)
@@ -297,6 +298,7 @@ client catch-up, restart recovery, production-derived UI fixtures, and durable s
297
298
  - [Message steering](./docs/message-steering.md)
298
299
  - [UI projection proposal](./docs/ui-projection.md)
299
300
  - [Subagents proposal](./docs/subagents.md)
301
+ - [Maintainer release guide](./docs/releasing.md)
300
302
 
301
303
  ## Contributing and license
302
304
 
package/SECURITY.md CHANGED
@@ -2,7 +2,6 @@
2
2
 
3
3
  Please do not report security vulnerabilities in public issues.
4
4
 
5
- After the standalone repository is public, use GitHub's private vulnerability reporting for
6
- `advait/effect-durable-agent`. Include the affected version, impact, reproduction steps, and any
7
- known mitigations. Maintainers will acknowledge the report and coordinate disclosure through that
8
- private thread.
5
+ Use [GitHub's private vulnerability reporting](https://github.com/advait/effect-durable-agent/security/advisories/new).
6
+ Include the affected package version, impact, reproduction steps, and any known mitigations.
7
+ Maintainers will acknowledge the report and coordinate disclosure through that private thread.
@@ -137,8 +137,8 @@ interface CompactionRunnerShape {
137
137
  declare const CompactionRunner_base: Context.ServiceClass<CompactionRunner, "@effect-durable-agent/CompactionRunner", CompactionRunnerShape>;
138
138
  /** Framework-owned compaction lifecycle runner. */
139
139
  declare class CompactionRunner extends CompactionRunner_base {
140
- static readonly Live: Layer.Layer<CompactionRunner, never, IdGenerator | CompactionPolicy | CompactionExecutor | EventFactory | EDAKeepAlive>;
140
+ static readonly Live: Layer.Layer<CompactionRunner, never, CompactionPolicy | CompactionExecutor | EventFactory | IdGenerator | EDAKeepAlive>;
141
141
  }
142
142
  //#endregion
143
143
  export { defaultCompactionRetainTailTokens as _, CompactionExecutorShape as a, CompactionPolicy as c, CompactionRunner as d, CompactionRunnerInput as f, defaultCompactionMinSummarizableTokens as g, defaultCompactionCharsPerToken as h, CompactionExecutorInput as i, CompactionPolicyInput as l, LanguageModelSummaryCompactionExecutorOptions as m, CompactionError as n, CompactionOutput as o, CompactionRunnerShape as p, CompactionExecutor as r, CompactionPlan as s, ApproximateTokenThresholdCompactionPolicyOptions as t, CompactionPolicyShape as u, defaultCompactionThresholdTokens as v };
144
- //# sourceMappingURL=compaction-YayFKo_1.d.ts.map
144
+ //# sourceMappingURL=compaction-1LSZR944.d.ts.map
@@ -4,14 +4,14 @@ import { l as EDATraceMetadata } from "./tracing-BXHAkxkx.js";
4
4
  import { o as EDASessionStoreError, t as CommittedDurableEvent } from "./session-store-D2Ore1QC.js";
5
5
  import { t as DurableTranscriptMessage } from "./message-transcript-BCHdHAe2.js";
6
6
  import { t as EDAReducer } from "./reducer-registry-C0svUa63.js";
7
- import { r as EDASink } from "./sink-registry-CIU0LD3m.js";
8
- import { c as CompactionPolicy, r as CompactionExecutor } from "./compaction-YayFKo_1.js";
9
- import { n as EDAPromptProjector } from "./prompt-projector-9_02lk5-.js";
10
- import { a as SessionCommandAdmissionError, i as EDASubmittable, r as EDASessionSnapshot } from "./session-query-DlRo5Ufc.js";
7
+ import { r as EDASink } from "./sink-registry-BziFpxoE.js";
8
+ import { c as CompactionPolicy, r as CompactionExecutor } from "./compaction-1LSZR944.js";
9
+ import { r as EDAPromptProjector } from "./prompt-projector-DimXJPOJ.js";
10
+ import { a as SessionCommandAdmissionError, i as EDASubmittable, r as EDASessionSnapshot } from "./session-query-hxfujxUH.js";
11
11
  import { i as EDAToolRegistryShape, t as EDAModelToolkit } from "./tool-registry-CcnkAAQK.js";
12
- import { i as EDARuntimeConfig, r as EDARuntime, t as CommittedCommandTerminalEvent } from "./runtime-C56FQxiL.js";
12
+ import { i as EDARuntimeConfig, r as EDARuntime, t as CommittedCommandTerminalEvent } from "./runtime-DcdPOEuE.js";
13
13
  import { t as DurableObjectSessionStorage } from "./durable-object-storage-Czy7IPrh.js";
14
- import { r as EDAWebSocketServerFrameEncoder } from "./websocket-wire-DvOu_6BJ.js";
14
+ import { r as EDAWebSocketServerFrameEncoder } from "./websocket-wire-D3tLrhe2.js";
15
15
  import * as Effect from "effect/Effect";
16
16
  import * as Layer from "effect/Layer";
17
17
  import * as Schema from "effect/Schema";
@@ -254,4 +254,4 @@ declare const decodeEdaRpcSubmittable: (input: unknown) => Effect.Effect<EDASubm
254
254
  declare const decodeEdaRpcSubmittables: (input: ReadonlyArray<unknown>) => Effect.Effect<ReadonlyArray<EDASubmittable>, Schema.SchemaError>;
255
255
  //#endregion
256
256
  export { makeEDADurableObjectOpenAiModelLayer as _, EDASessionDurableObjectHostOptions as a, EDASessionScopedInput as c, EDAToolRegistryFactory as d, EDAToolkitFactory as f, decodeEdaRpcSubmittables as g, decodeEdaRpcSubmittable as h, EDASessionDurableObjectHost as i, EDASessionSubmitBatchInput as l, decodeEdaRpcCommand as m, EDAOpenAiModelConfig as n, EDASessionDurableObjectStorage as o, EDATracerFactory as p, EDASessionBlockOnCommandInput as r, EDASessionEventsInput as s, EDADurableObjectRuntimeLayerOptions as t, EDASessionSubmitInput as u, makeEDADurableObjectRuntimeLayer as v };
257
- //# sourceMappingURL=durable-object-runtime-pWv0ohlz.d.ts.map
257
+ //# sourceMappingURL=durable-object-runtime-CiMKxGs6.d.ts.map
@@ -2,7 +2,7 @@ import { SequenceNumber, SessionId, SummaryId, durablePosition } from "./types/c
2
2
  import { EDACommand } from "./types/commands.js";
3
3
  import { EDATraceMetadata, makeRootEDATraceMetadata } from "./types/tracing.js";
4
4
  import { Bn as summaryCreatedEventType, Cn as contextRebasedEventType, Ln as steeringMessageQueuedEventType, Qn as userMessageCommittedEventType, Tn as decodeUnknownEDADurableEventSync, Vn as systemMessageCommittedEventType, _n as commandStartedEventType, cn as assistantMessageCommittedEventType, dr as PositionedEvent, gn as commandFailedEventType, gr as UnixEpochMillis, hn as commandCompletedEventType, ln as assistantPartialCommittedEventType, mn as commandCancelledEventType, nr as DurableEventEnvelope, pn as commandAdmittedEventType, vr as effectDurableAgentNamespace } from "./durable-C3Rz7kg3.js";
5
- import { a as ToolExecutor, i as InferenceRunner, n as SessionState, r as TurnRunner, t as EDASessionQuery } from "./session-query-DOc1KanA.js";
5
+ import { a as ToolExecutor, i as InferenceRunner, n as SessionState, r as TurnRunner, t as EDASessionQuery } from "./session-query-Cbf-e0rG.js";
6
6
  import { a as EDASessionStoreError, d as CompactionSummaryArtifact, i as EDASessionStore, s as durableObjectSerializedJsonHardCapBytes, t as CommittedDurableEvent } from "./session-store-pYxQW9qh.js";
7
7
  import { IdGenerator } from "./services/id-generator.js";
8
8
  import { n as EventFactory, r as SessionContext, t as EDAKeepAlive } from "./keep-alive-p8dIcSVy.js";
@@ -107,7 +107,7 @@ const EDAWebSocketAttachment = Schema.Struct({
107
107
  trace: EDATraceMetadata
108
108
  });
109
109
  /** Serialize a server frame for a text WebSocket message. */
110
- const encodeEDAWebSocketServerFrame = (frame, protocol) => (protocol ?? edaFrameworkWebSocketWireProtocol).encodeServerFrame(frame);
110
+ const encodeEDAWebSocketServerFrame = (frame, protocol) => (protocol ?? edaFrameworkWebSocketWireProtocol.host).encodeServerFrame(frame);
111
111
  /** Decode an unknown attachment value from Cloudflare WebSocket hibernation storage. */
112
112
  const decodeEDAWebSocketAttachment = (input) => Schema.decodeUnknownEffect(EDAWebSocketAttachment)(input);
113
113
  /** Decode an inbound text WebSocket message at the host boundary. */
@@ -1491,4 +1491,4 @@ const decodeEdaRpcSubmittables = (input) => Effect.forEach(input, decodeEdaRpcSu
1491
1491
  //#endregion
1492
1492
  export { makeEDADurableObjectOpenAiModelLayer as a, decodeEdaRpcSubmittables as i, decodeEdaRpcCommand as n, makeEDADurableObjectRuntimeLayer as o, decodeEdaRpcSubmittable as r, EDASessionDurableObjectHost as t };
1493
1493
 
1494
- //# sourceMappingURL=durable-object-runtime-B7jwBY2R.js.map
1494
+ //# sourceMappingURL=durable-object-runtime-wKiqaAt2.js.map