effect-durable-agent 0.1.0-alpha.1 → 0.1.0-alpha.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +140 -136
- package/dist/{command-queues-CQ9cwRP7.d.ts → command-queues-B45Xa1Dl.d.ts} +109 -21
- package/dist/{commands-Ce1ec6kH.d.ts → commands-p8venTWs.d.ts} +10 -2
- package/dist/compaction-0k8zCJgB.js +473 -0
- package/dist/compaction-0k8zCJgB.js.map +1 -0
- package/dist/{compaction-YayFKo_1.d.ts → compaction-DoTyQf6k.d.ts} +28 -7
- package/dist/context-projection-CCoN8m9W.d.ts +140 -0
- package/dist/{core-Hv3cFydL.d.ts → core-C-6xHzRx.d.ts} +6 -3
- package/dist/domain/command-queues.d.ts +1 -1
- package/dist/domain/command-queues.js +1 -1
- package/dist/domain/command-queues.js.map +1 -1
- package/dist/domain/context-projection.d.ts +2 -0
- package/dist/domain/context-projection.js +32 -0
- package/dist/domain/context-projection.js.map +1 -0
- package/dist/domain/message-transcript.d.ts +1 -1
- package/dist/domain/model-usage.d.ts +2 -0
- package/dist/domain/model-usage.js +59 -0
- package/dist/domain/model-usage.js.map +1 -0
- package/dist/domain/reduced-state-schema.d.ts +14 -18
- package/dist/domain/reduced-state-schema.js +7 -11
- package/dist/domain/reduced-state-schema.js.map +1 -1
- package/dist/domain/reduced-state.d.ts +3 -2
- package/dist/domain/reduced-state.js +3 -2
- package/dist/domain/run-scheduling.d.ts +2 -0
- package/dist/domain/run-scheduling.js +127 -0
- package/dist/domain/run-scheduling.js.map +1 -0
- package/dist/{durable-C3Rz7kg3.js → durable-BPHVFVvV.js} +74 -83
- package/dist/durable-BPHVFVvV.js.map +1 -0
- package/dist/{durable-DlScwmCy.d.ts → durable-DeLCAvbw.d.ts} +1256 -104
- package/dist/envelope-DkZyMIgp.d.ts +191 -0
- package/dist/envelope-DxQzo5rN.js +82 -0
- package/dist/envelope-DxQzo5rN.js.map +1 -0
- package/dist/{keep-alive-DYDsH6qN.d.ts → event-factory-EL4szNWm.d.ts} +10 -30
- package/dist/{keep-alive-p8dIcSVy.js → event-factory-QuC_UvyP.js} +8 -10
- package/dist/event-factory-QuC_UvyP.js.map +1 -0
- package/dist/{events-Bb9-Cu-7.d.ts → events-LZFNoESe.d.ts} +2 -188
- package/dist/{id-generator-C2Q15uZM.d.ts → id-generator--x6itQZ2.d.ts} +3 -2
- package/dist/index.d.ts +7 -6
- package/dist/index.js +5 -4
- package/dist/keep-alive-Chl5SJxy.d.ts +29 -0
- package/dist/{message-transcript-BCHdHAe2.d.ts → message-transcript-Dr6Rk-re.d.ts} +4 -4
- package/dist/model-resolver-BPPJAsuh.d.ts +18 -0
- package/dist/model-usage-CdBEkTwU.d.ts +55 -0
- package/dist/{prompt-projector-9_02lk5-.d.ts → prompt-projector-BpRH-Ec-.d.ts} +15 -16
- package/dist/{reduced-state-C4nVVzz9.js → reduced-state-Bz68V2H8.js} +65 -32
- package/dist/reduced-state-Bz68V2H8.js.map +1 -0
- package/dist/{reducer-registry-C0svUa63.d.ts → reducer-registry-DjP1qqbs.d.ts} +16 -6
- package/dist/run-scheduler-DvHWwWBJ.d.ts +43 -0
- package/dist/run-scheduling-wakeup-CGgJ7RNe.d.ts +25 -0
- package/dist/{runtime-C56FQxiL.d.ts → runtime-BFsU92E7.d.ts} +15 -6
- package/dist/services/compaction.d.ts +1 -1
- package/dist/services/compaction.js +1 -425
- package/dist/services/id-generator.d.ts +1 -1
- package/dist/services/id-generator.js +2 -1
- package/dist/services/id-generator.js.map +1 -1
- package/dist/services/keep-alive.d.ts +2 -0
- package/dist/services/keep-alive.js +13 -0
- package/dist/services/keep-alive.js.map +1 -0
- package/dist/services/model-resolver.d.ts +2 -0
- package/dist/services/model-resolver.js +17 -0
- package/dist/services/model-resolver.js.map +1 -0
- package/dist/services/prompt-projector.d.ts +2 -2
- package/dist/services/prompt-projector.js +20 -10
- package/dist/services/prompt-projector.js.map +1 -1
- package/dist/services/reducer-registry.d.ts +2 -2
- package/dist/services/reducer-registry.js +7 -3
- package/dist/services/reducer-registry.js.map +1 -1
- package/dist/services/run-scheduler.d.ts +3 -0
- package/dist/services/run-scheduler.js +25 -0
- package/dist/services/run-scheduler.js.map +1 -0
- package/dist/services/run-scheduling-wakeup.d.ts +2 -0
- package/dist/services/run-scheduling-wakeup.js +13 -0
- package/dist/services/run-scheduling-wakeup.js.map +1 -0
- package/dist/services/runtime-layer.d.ts +67 -0
- package/dist/services/runtime-layer.js +47 -0
- package/dist/services/runtime-layer.js.map +1 -0
- package/dist/services/runtime.d.ts +1 -1
- package/dist/services/runtime.js +21 -14
- package/dist/services/runtime.js.map +1 -1
- package/dist/services/session-event-observer.d.ts +2 -0
- package/dist/services/session-event-observer.js +13 -0
- package/dist/services/session-event-observer.js.map +1 -0
- package/dist/services/session-query.d.ts +2 -2
- package/dist/services/session-query.js +140 -1
- package/dist/services/session-query.js.map +1 -0
- package/dist/services/session-state.d.ts +2 -0
- package/dist/services/session-state.js +2 -0
- package/dist/services/session-store.d.ts +2 -2
- package/dist/services/session-store.js +182 -2
- package/dist/services/session-store.js.map +1 -0
- package/dist/services/sink-checkpoint-store.d.ts +2 -0
- package/dist/services/sink-checkpoint-store.js +49 -0
- package/dist/services/sink-checkpoint-store.js.map +1 -0
- package/dist/services/sink-registry.d.ts +1 -1
- package/dist/services/sink-registry.js +1 -1
- package/dist/services/span-names.d.ts +1 -1
- package/dist/services/span-names.js +3 -0
- package/dist/services/span-names.js.map +1 -1
- package/dist/services/tool-registry.d.ts +1 -1
- package/dist/services/tracing.d.ts +1 -1
- package/dist/services/tracing.js +23 -2
- package/dist/services/tracing.js.map +1 -1
- package/dist/session-event-observer-DaFMKKNc.d.ts +24 -0
- package/dist/session-query-Bo_wroPS.d.ts +47 -0
- package/dist/{session-query-DlRo5Ufc.d.ts → session-state-5uD0FqQ8.d.ts} +143 -45
- package/dist/{session-query-DOc1KanA.js → session-state-CN7DcLal.js} +353 -186
- package/dist/session-state-CN7DcLal.js.map +1 -0
- package/dist/{session-store-D2Ore1QC.d.ts → session-store-BIr-xfJ7.d.ts} +7 -96
- package/dist/sink-checkpoint-store-Cr9_GmOw.d.ts +40 -0
- package/dist/{sink-registry-CFC6xjsN.js → sink-registry-6CNeeRTt.js} +41 -82
- package/dist/sink-registry-6CNeeRTt.js.map +1 -0
- package/dist/{sink-registry-CIU0LD3m.d.ts → sink-registry-Bz4bBJaC.d.ts} +24 -49
- package/dist/testkit/layers.d.ts +24 -14
- package/dist/testkit/layers.js +18 -11
- package/dist/testkit/layers.js.map +1 -1
- package/dist/{tool-registry-CcnkAAQK.d.ts → tool-registry-Dhs2KmYK.d.ts} +4 -4
- package/dist/types/commands.d.ts +2 -2
- package/dist/types/commands.js +7 -2
- package/dist/types/commands.js.map +1 -1
- package/dist/types/core.d.ts +2 -2
- package/dist/types/core.js +4 -2
- package/dist/types/core.js.map +1 -1
- package/dist/types/events/durable.d.ts +2 -2
- package/dist/types/events/durable.js +2 -2
- package/dist/types/events.d.ts +4 -3
- package/dist/types/events.js +3 -2
- package/dist/types/events.js.map +1 -1
- package/dist/websocket.d.ts +2776 -0
- package/dist/websocket.js +498 -0
- package/dist/websocket.js.map +1 -0
- package/package.json +68 -43
- package/testing/offline-trace/README.md +2 -1
- package/CHANGELOG.md +0 -10
- package/CONTRIBUTING.md +0 -26
- package/SECURITY.md +0 -8
- package/dist/durable-C3Rz7kg3.js.map +0 -1
- package/dist/durable-object-runtime-B7jwBY2R.js +0 -1494
- package/dist/durable-object-runtime-B7jwBY2R.js.map +0 -1
- package/dist/durable-object-runtime-pWv0ohlz.d.ts +0 -257
- package/dist/durable-object-storage-Czy7IPrh.d.ts +0 -41
- package/dist/host/durable-object-runtime.d.ts +0 -2
- package/dist/host/durable-object-runtime.js +0 -2
- package/dist/host/durable-object-storage.d.ts +0 -2
- package/dist/host/durable-object-storage.js +0 -0
- package/dist/host/durable-object.d.ts +0 -83
- package/dist/host/durable-object.js +0 -191
- package/dist/host/durable-object.js.map +0 -1
- package/dist/host/websocket-wire.d.ts +0 -2
- package/dist/host/websocket-wire.js +0 -88
- package/dist/host/websocket-wire.js.map +0 -1
- package/dist/keep-alive-p8dIcSVy.js.map +0 -1
- package/dist/reduced-state-C4nVVzz9.js.map +0 -1
- package/dist/services/compaction.js.map +0 -1
- package/dist/session-query-DOc1KanA.js.map +0 -1
- package/dist/session-store-pYxQW9qh.js +0 -214
- package/dist/session-store-pYxQW9qh.js.map +0 -1
- package/dist/sink-registry-CFC6xjsN.js.map +0 -1
- package/dist/websocket-wire-DvOu_6BJ.d.ts +0 -16773
- package/docs/assets/architecture.svg +0 -106
- package/docs/assets/event-sequence.svg +0 -143
- package/docs/assets/gcp-trace.png +0 -0
- package/docs/message-steering.md +0 -831
- package/docs/releasing.md +0 -57
- package/docs/spec.md +0 -774
- package/docs/subagents.md +0 -725
- package/docs/testing.md +0 -64
- package/docs/ui-projection.md +0 -742
- package/docs/websocket-protocol.md +0 -613
- package/examples/001-no-tools/README.md +0 -65
- package/examples/001-no-tools/worker.ts +0 -79
- package/examples/002-slack-bridge/README.md +0 -134
- package/examples/002-slack-bridge/events.ts +0 -115
- package/examples/002-slack-bridge/reducer.ts +0 -216
- package/examples/002-slack-bridge/scenario.test.ts +0 -223
- package/examples/002-slack-bridge/sinks.ts +0 -109
- package/examples/002-slack-bridge/worker.ts +0 -140
- package/examples/003-sandbox-lifecycle/README.md +0 -78
- package/examples/003-sandbox-lifecycle/events.ts +0 -203
- package/examples/003-sandbox-lifecycle/reducer.ts +0 -305
- package/examples/003-sandbox-lifecycle/scenario.test.ts +0 -202
- package/examples/_shared/event-id.ts +0 -12
- package/examples/_shared/http.ts +0 -27
- package/examples/_shared/openai.ts +0 -33
package/README.md
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
# effect-durable-agent
|
|
2
2
|
|
|
3
|
-
> EDA is a
|
|
4
|
-
|
|
3
|
+
> ## EDA is a redux-inspired durable agent framework hosted on [Durable Objects](https://developers.cloudflare.com/durable-objects/) and [celld](https://celld.dev/)
|
|
4
|
+
|
|
5
|
+
[](https://www.npmjs.com/package/effect-durable-agent)
|
|
6
|
+
[](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
|
-
|
|
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
|
-
|
|
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
|
-

|
|
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,161 +36,165 @@ 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
|
|
|
41
|
-
|
|
39
|
+
Those events flow through the rest of the system as follows:
|
|
42
40
|
|
|
43
|
-
|
|
41
|
+

|
|
44
42
|
|
|
45
|
-
|
|
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
|
-
```
|
|
43
|
+
### 1. Session runtime: one state machine for the entire application
|
|
57
44
|
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
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.
|
|
61
48
|
|
|
62
|
-
|
|
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.
|
|
63
51
|
|
|
64
|
-
|
|
52
|
+
### 2. Ordered event log: the definitive history of the state machine
|
|
65
53
|
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
eventually. Each sink tracks its own persisted cursor, advances only after successful processing,
|
|
70
|
-
and retries failures with backoff.
|
|
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.
|
|
71
57
|
|
|
72
|
-
|
|
73
|
-
|
|
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.
|
|
74
60
|
|
|
75
|
-
|
|
76
|
-
and durable outbound delivery.
|
|
61
|
+
### 3. Live event stream: reconnect without losing the session
|
|
77
62
|
|
|
78
|
-
|
|
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.
|
|
79
65
|
|
|
80
|
-
|
|
66
|
+
When a slow or disconnected client returns, it provides that sequence, receives every committed
|
|
67
|
+
event after it, and then continues live.
|
|
81
68
|
|
|
82
|
-
|
|
69
|
+
### 4. Pure reducers: events become state
|
|
83
70
|
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
the recovery transitions before new live activity.
|
|
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.
|
|
88
74
|
|
|
89
|
-
|
|
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.
|
|
90
77
|
|
|
91
|
-
|
|
92
|
-
become a test fixture.
|
|
78
|
+
### 5. State: a cached view of durable history
|
|
93
79
|
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
test instead of a story in a bug report.
|
|
80
|
+
The reducers produce a complete snapshot of framework and application state through a known
|
|
81
|
+
sequence number. EDA caches that snapshot in host-provided durable storage so reads and restarts do
|
|
82
|
+
not need to replay the entire history from the beginning.
|
|
98
83
|
|
|
99
|
-
The
|
|
100
|
-
|
|
101
|
-
durable and live event artifacts.
|
|
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.
|
|
102
86
|
|
|
103
|
-
###
|
|
87
|
+
### 6. Pure projections: UI state is not model context
|
|
104
88
|
|
|
105
|
-
|
|
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.
|
|
106
91
|
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
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](https://github.com/advait/effect-durable-agent/blob/master/docs/ui-projection.md) for the projection contract.
|
|
111
96
|
|
|
112
|
-
|
|
97
|
+
### 7. Durable sinks: callbacks that survive failure
|
|
113
98
|
|
|
114
|
-
|
|
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.
|
|
115
102
|
|
|
116
|
-
EDA
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
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.
|
|
120
108
|
|
|
121
|
-
|
|
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.
|
|
122
111
|
|
|
123
|
-
|
|
124
|
-
- Per-object SQLite stores the ordered history beside the runtime that owns it
|
|
125
|
-
- WebSockets terminate at the same boundary that owns the state
|
|
126
|
-
- Alarms wake evicted sessions for recovery, keep-alive, and sink draining
|
|
112
|
+
## What this unlocks
|
|
127
113
|
|
|
128
|
-
|
|
129
|
-
storage, scheduling, identity, and live-delivery boundaries that another platform can implement
|
|
130
|
-
with equivalent semantics.
|
|
114
|
+
### Live state on every client
|
|
131
115
|
|
|
132
|
-
|
|
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.
|
|
133
119
|
|
|
134
|
-
|
|
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.
|
|
135
122
|
|
|
136
|
-
|
|
137
|
-
scoped resources, typed failures, retries, services, and tracing. The event history owns durable
|
|
138
|
-
truth.
|
|
123
|
+
### Durable side effects
|
|
139
124
|
|
|
140
|
-
|
|
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.
|
|
141
129
|
|
|
142
|
-
|
|
130
|
+
See the [Slack bridge example](https://github.com/advait/effect-durable-agent/tree/master/examples/002-slack-bridge) for idempotent
|
|
131
|
+
ingress, a custom reducer, and durable outbound delivery.
|
|
143
132
|
|
|
144
|
-
|
|
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
|
|
133
|
+
**Durable state. Durable side effects.**
|
|
148
134
|
|
|
149
|
-
|
|
135
|
+
### Agents survive deploys and failures
|
|
150
136
|
|
|
151
|
-
|
|
137
|
+
Deploys and failures restart the application—not the session.
|
|
152
138
|
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
139
|
+
EDA rebuilds framework and product state from durable history, repairs incomplete lifecycle
|
|
140
|
+
boundaries, and transparently continues eligible in-progress work in a replacement run. Completed
|
|
141
|
+
tool calls are not blindly repeated, queued commands remain durable, and reconnecting clients see
|
|
142
|
+
the recovery transitions before new live activity.
|
|
156
143
|
|
|
157
|
-
|
|
158
|
-
startup and snapshots; the event log remains the source of truth.
|
|
144
|
+
### Production sessions become UI fixtures
|
|
159
145
|
|
|
160
|
-
|
|
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.
|
|
161
149
|
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
150
|
+
A difficult production session becomes a reproducible UI test instead of a story in a bug report.
|
|
151
|
+
The package includes pure reducer tests, generated state-machine properties, canned-model journeys,
|
|
152
|
+
crash-prefix simulations, and an [offline trace harness](./testing/offline-trace) that writes durable
|
|
153
|
+
and live event artifacts.
|
|
165
154
|
|
|
166
|
-
###
|
|
155
|
+
### Tracing for every agent run
|
|
167
156
|
|
|
168
|
-
|
|
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.
|
|
157
|
+
See what happened, in what order, and where the time went.
|
|
171
158
|
|
|
172
|
-
|
|
159
|
+
EDA uses Effect spans across meaningful runtime boundaries, including command admission, runs,
|
|
160
|
+
turns, model inference, tools, event streaming, durable sinks, and recovery. Trace context survives
|
|
161
|
+
the durable boundaries that separate ingress, execution, and side effects, and Effect telemetry can
|
|
162
|
+
be exported through OpenTelemetry to Google Cloud Trace or another existing backend.
|
|
173
163
|
|
|
174
|
-
|
|
164
|
+

|
|
165
|
+
|
|
166
|
+
## Host-neutral core, pluggable deployment
|
|
167
|
+
|
|
168
|
+
EDA separates its state machine and Effect service graph from the platform that provides durable
|
|
169
|
+
storage, scheduling, identity, and live WebSockets. Applications select one host package:
|
|
170
|
+
|
|
171
|
+
| Package | Responsibility |
|
|
172
|
+
| --- | --- |
|
|
173
|
+
| `effect-durable-agent` | Host-independent commands, events, reducers, runtime, and adapter contracts. |
|
|
174
|
+
| `effect-durable-agent-cloudflare` | Cloudflare Durable Objects, SQLite, alarms, RPC, and hibernatable WebSockets. |
|
|
175
|
+
| `effect-durable-agent-celld` | [celld](https://celld.dev/) deployment of the Durable Objects contract on your infrastructure. |
|
|
175
176
|
|
|
176
|
-
|
|
177
|
-
|
|
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
|
|
177
|
+
All three packages are released together with the same version. A host and core from different
|
|
178
|
+
versions are not a supported combination; keep the versions identical when upgrading.
|
|
183
179
|
|
|
184
180
|
## Get started
|
|
185
181
|
|
|
186
|
-
Install
|
|
182
|
+
Install the core and one host from the public alpha channel:
|
|
187
183
|
|
|
188
184
|
```bash
|
|
189
|
-
pnpm add effect-durable-agent@alpha
|
|
185
|
+
pnpm add effect-durable-agent@alpha effect-durable-agent-cloudflare@alpha
|
|
190
186
|
```
|
|
191
187
|
|
|
192
|
-
|
|
188
|
+
For celld, select its host package at the same version instead:
|
|
189
|
+
|
|
190
|
+
```bash
|
|
191
|
+
pnpm add effect-durable-agent@alpha effect-durable-agent-celld@alpha
|
|
192
|
+
```
|
|
193
|
+
|
|
194
|
+
The smallest Cloudflare host is a concrete Durable Object subclass:
|
|
193
195
|
|
|
194
196
|
```ts
|
|
195
|
-
import { EDASessionDurableObject } from "effect-durable-agent
|
|
197
|
+
import { EDASessionDurableObject } from "effect-durable-agent-cloudflare"
|
|
196
198
|
|
|
197
199
|
export class MyAgentSession extends EDASessionDurableObject<MyEnv> {
|
|
198
200
|
constructor(ctx: DurableObjectState, env: MyEnv) {
|
|
@@ -208,19 +210,10 @@ Start with the executable examples:
|
|
|
208
210
|
|
|
209
211
|
| Example | What it demonstrates |
|
|
210
212
|
| --- | --- |
|
|
211
|
-
| [`001-no-tools`](
|
|
212
|
-
| [`002-slack-bridge`](
|
|
213
|
-
| [`003-sandbox-lifecycle`](
|
|
214
|
-
|
|
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.
|
|
213
|
+
| [`001-no-tools`](https://github.com/advait/effect-durable-agent/tree/master/examples/001-no-tools) | Minimal Durable Object session and durable command admission. |
|
|
214
|
+
| [`002-slack-bridge`](https://github.com/advait/effect-durable-agent/tree/master/examples/002-slack-bridge) | Idempotent ingress, application events and reducers, and a retrying durable sink. |
|
|
215
|
+
| [`003-sandbox-lifecycle`](https://github.com/advait/effect-durable-agent/tree/master/examples/003-sandbox-lifecycle) | Tool and product events reduced into one UI model, including snapshot-to-stream handoff. |
|
|
216
|
+
| [`004-celld-no-tools`](https://github.com/advait/effect-durable-agent/tree/master/examples/004-celld-no-tools) | Deployable celld cell with durable command admission. |
|
|
224
217
|
|
|
225
218
|
## Why EDA instead of another agent SDK or framework?
|
|
226
219
|
|
|
@@ -276,7 +269,7 @@ client catch-up, restart recovery, production-derived UI fixtures, and durable s
|
|
|
276
269
|
## Capabilities
|
|
277
270
|
|
|
278
271
|
- Effect-native agent runtime with command, run, turn, inference, message, and tool lifecycles
|
|
279
|
-
- Cloudflare Durable
|
|
272
|
+
- Pluggable Cloudflare Durable Objects and celld hosts with one session per object and SQLite event storage
|
|
280
273
|
- Typed custom durable application events and pure application reducers
|
|
281
274
|
- Reducer checkpoints and serialized snapshots
|
|
282
275
|
- Reconnect-safe event streaming with sequence resume and WebSocket ACK flow control
|
|
@@ -289,17 +282,28 @@ client catch-up, restart recovery, production-derived UI fixtures, and durable s
|
|
|
289
282
|
- Trace propagation and Effect span instrumentation across runtime boundaries
|
|
290
283
|
- Queue, steer, interrupt, stop, and idempotent command admission
|
|
291
284
|
|
|
285
|
+
## Why Effect?
|
|
286
|
+
|
|
287
|
+
Agent sessions combine long-running model streams, concurrent tools, interruption, cleanup, retries,
|
|
288
|
+
external services, and observability. EDA uses [Effect](https://effect.website/) so those concerns
|
|
289
|
+
share one structured execution model rather than a collection of detached promises and callbacks.
|
|
290
|
+
|
|
291
|
+
Effect is the implementation foundation, not the product pitch. The reason to use EDA is the
|
|
292
|
+
durable application model; Effect is what lets the runtime execute that model with scoped resources,
|
|
293
|
+
typed boundaries, structured concurrency, and first-class tracing.
|
|
294
|
+
|
|
292
295
|
## Documentation
|
|
293
296
|
|
|
294
|
-
- [Current implementation](
|
|
295
|
-
- [Testing strategy](
|
|
296
|
-
- [WebSocket live-event protocol](
|
|
297
|
-
- [Message steering](
|
|
298
|
-
- [UI projection proposal](
|
|
299
|
-
- [Subagents proposal](
|
|
297
|
+
- [Current implementation](https://github.com/advait/effect-durable-agent/blob/master/docs/spec.md)
|
|
298
|
+
- [Testing strategy](https://github.com/advait/effect-durable-agent/blob/master/docs/testing.md)
|
|
299
|
+
- [WebSocket live-event protocol](https://github.com/advait/effect-durable-agent/blob/master/docs/websocket-protocol.md)
|
|
300
|
+
- [Message steering](https://github.com/advait/effect-durable-agent/blob/master/docs/message-steering.md)
|
|
301
|
+
- [UI projection proposal](https://github.com/advait/effect-durable-agent/blob/master/docs/ui-projection.md)
|
|
302
|
+
- [Subagents proposal](https://github.com/advait/effect-durable-agent/blob/master/docs/subagents.md)
|
|
303
|
+
- [Maintainer release guide](https://github.com/advait/effect-durable-agent/blob/master/docs/releasing.md)
|
|
300
304
|
|
|
301
305
|
## Contributing and license
|
|
302
306
|
|
|
303
|
-
See [CONTRIBUTING.md](
|
|
307
|
+
See [CONTRIBUTING.md](https://github.com/advait/effect-durable-agent/blob/master/CONTRIBUTING.md) to run the project and validate the npm package. Effect
|
|
304
308
|
Durable Agent is available under the [MIT License](./LICENSE). Please report vulnerabilities
|
|
305
|
-
through the process in [SECURITY.md](
|
|
309
|
+
through the process in [SECURITY.md](https://github.com/advait/effect-durable-agent/blob/master/SECURITY.md).
|
|
@@ -1,11 +1,103 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { b as TurnId, g as SessionId, h as SequenceNumber, i as ContextVersion, l as InferenceId, m as RunRequestId, n as CommandId, p as RunId, r as CompactionId, u as MessageId, v as SummaryId, y as ToolCallId } from "./core-C-6xHzRx.js";
|
|
2
|
+
import { _ as UsagePayload, c as FailurePayload, f as ProviderPartId, h as ToolName, l as ModelSelectionPayload, m as SystemPromptText } from "./envelope-DkZyMIgp.js";
|
|
3
|
+
import { n as TokenConsumptionState } from "./model-usage-CdBEkTwU.js";
|
|
4
|
+
import { d as UserMessageContent, r as EDACommand } from "./commands-p8venTWs.js";
|
|
3
5
|
import { n as EDARunTrace, t as EDAEventTrace } from "./tracing-BXHAkxkx.js";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import
|
|
6
|
+
import { r as AssistantMessageContent, rt as RecoveryContinuation } from "./durable-DeLCAvbw.js";
|
|
7
|
+
import { t as CommittedDurableEvent } from "./session-store-BIr-xfJ7.js";
|
|
8
|
+
import * as Schema from "effect/Schema";
|
|
7
9
|
import * as Prompt from "effect/unstable/ai/Prompt";
|
|
8
10
|
|
|
11
|
+
//#region src/domain/run-scheduling.d.ts
|
|
12
|
+
/**
|
|
13
|
+
* Identity of the admitted work selected by dispatch or recovery for a new run.
|
|
14
|
+
* This is not a durable request identity: recovery can resolve the same command again.
|
|
15
|
+
*/
|
|
16
|
+
interface RunSchedulingInput {
|
|
17
|
+
readonly sessionId: SessionId;
|
|
18
|
+
readonly commandId: CommandId;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Permission to start the selected run in this session's current runtime.
|
|
22
|
+
* This value is never persisted and allocates no scheduling identity.
|
|
23
|
+
*/
|
|
24
|
+
declare const LocalRunResolution: Schema.TaggedStruct<"Local", {}>;
|
|
25
|
+
type LocalRunResolution = typeof LocalRunResolution.Type;
|
|
26
|
+
/** Intent to request external permission; resolution itself must perform no delivery. */
|
|
27
|
+
declare const DeferredRunResolution: Schema.TaggedStruct<"Deferred", {}>;
|
|
28
|
+
type DeferredRunResolution = typeof DeferredRunResolution.Type;
|
|
29
|
+
/** Prompt selection result interpreted by SessionState before any run is started. */
|
|
30
|
+
declare const RunResolution: Schema.Union<readonly [Schema.TaggedStruct<"Local", {}>, Schema.TaggedStruct<"Deferred", {}>]>;
|
|
31
|
+
type RunResolution = typeof RunResolution.Type;
|
|
32
|
+
/** Selected work and the durable predecessor needed to authorize a recovery replacement. */
|
|
33
|
+
declare const RunSchedulingWork: Schema.Union<readonly [Schema.TaggedStruct<"Command", {
|
|
34
|
+
readonly commandId: Schema.brand<Schema.String, "CommandId">;
|
|
35
|
+
}>, Schema.TaggedStruct<"Recovery", {
|
|
36
|
+
readonly commandId: Schema.brand<Schema.String, "CommandId">;
|
|
37
|
+
readonly interruptedRunId: Schema.brand<Schema.String, "RunId">;
|
|
38
|
+
readonly inputMessageIds: Schema.$Array<Schema.brand<Schema.String, "MessageId">>;
|
|
39
|
+
}>]>;
|
|
40
|
+
type RunSchedulingWork = typeof RunSchedulingWork.Type;
|
|
41
|
+
/** One run-slot reservation. External schedulers must deduplicate delivery by requestId. */
|
|
42
|
+
declare const RunSchedulingRequest: Schema.Struct<{
|
|
43
|
+
readonly requestId: Schema.brand<Schema.String, "RunRequestId">;
|
|
44
|
+
readonly work: Schema.Union<readonly [Schema.TaggedStruct<"Command", {
|
|
45
|
+
readonly commandId: Schema.brand<Schema.String, "CommandId">;
|
|
46
|
+
}>, Schema.TaggedStruct<"Recovery", {
|
|
47
|
+
readonly commandId: Schema.brand<Schema.String, "CommandId">;
|
|
48
|
+
readonly interruptedRunId: Schema.brand<Schema.String, "RunId">;
|
|
49
|
+
readonly inputMessageIds: Schema.$Array<Schema.brand<Schema.String, "MessageId">>;
|
|
50
|
+
}>]>;
|
|
51
|
+
}>;
|
|
52
|
+
type RunSchedulingRequest = typeof RunSchedulingRequest.Type;
|
|
53
|
+
/** Current reservation, folded solely from request and successful delivery facts. */
|
|
54
|
+
declare const RunSchedulingRequestRecord: Schema.Struct<{
|
|
55
|
+
readonly requestedSeq: Schema.brand<Schema.Int, "SequenceNumber">;
|
|
56
|
+
readonly deliveredSeq: Schema.optionalKey<Schema.brand<Schema.Int, "SequenceNumber">>;
|
|
57
|
+
readonly requestId: Schema.brand<Schema.String, "RunRequestId">;
|
|
58
|
+
readonly work: Schema.Union<readonly [Schema.TaggedStruct<"Command", {
|
|
59
|
+
readonly commandId: Schema.brand<Schema.String, "CommandId">;
|
|
60
|
+
}>, Schema.TaggedStruct<"Recovery", {
|
|
61
|
+
readonly commandId: Schema.brand<Schema.String, "CommandId">;
|
|
62
|
+
readonly interruptedRunId: Schema.brand<Schema.String, "RunId">;
|
|
63
|
+
readonly inputMessageIds: Schema.$Array<Schema.brand<Schema.String, "MessageId">>;
|
|
64
|
+
}>]>;
|
|
65
|
+
}>;
|
|
66
|
+
type RunSchedulingRequestRecord = typeof RunSchedulingRequestRecord.Type;
|
|
67
|
+
/** A stale/duplicate permission is harmless and cannot allocate another run. */
|
|
68
|
+
declare const RunGrantResult: Schema.Union<readonly [Schema.TaggedStruct<"Granted", {
|
|
69
|
+
readonly runId: Schema.brand<Schema.String, "RunId">;
|
|
70
|
+
}>, Schema.TaggedStruct<"Stale", {}>]>;
|
|
71
|
+
type RunGrantResult = typeof RunGrantResult.Type;
|
|
72
|
+
/** Durable answer for reconciling an ambiguous grant delivery. Unknown never authorizes replacement work. */
|
|
73
|
+
declare const RunRequestOutcome: Schema.Union<readonly [Schema.TaggedStruct<"Unknown", {}>, Schema.TaggedStruct<"Waiting", {}>, Schema.TaggedStruct<"Invalidated", {}>, Schema.TaggedStruct<"Granted", {
|
|
74
|
+
readonly runId: Schema.brand<Schema.String, "RunId">;
|
|
75
|
+
readonly status: Schema.Literals<readonly ["Running", "Completed", "Failed", "Interrupted"]>;
|
|
76
|
+
}>]>;
|
|
77
|
+
type RunRequestOutcome = typeof RunRequestOutcome.Type;
|
|
78
|
+
/** Canonical records consulted by authorization policy, without an Effect-layer snapshot. */
|
|
79
|
+
type SchedulingState = Pick<ReducedState, "commands" | "runs" | "messages" | "commandQueues" | "runSchedulingRequest">;
|
|
80
|
+
/** Still-unconsumed inputs owned by a reservation, derived from the existing message records. */
|
|
81
|
+
declare const runSchedulingInputMessageIds: (state: SchedulingState, work: RunSchedulingWork) => ReadonlyArray<MessageId>;
|
|
82
|
+
/** Revalidate durable ownership and pending controls immediately before granting permission. */
|
|
83
|
+
declare const canGrantRun: (state: SchedulingState, requestId: RunRequestId) => boolean;
|
|
84
|
+
/** Controls may change waiting work; later messages cannot take its reserved slot. */
|
|
85
|
+
declare const waitingRunControl: (state: SchedulingState) => PendingCommand | undefined;
|
|
86
|
+
/** Atomic request changes required when one of its selected messages is cancelled. */
|
|
87
|
+
interface RunSchedulingCancellationPlan {
|
|
88
|
+
readonly requestId: RunRequestId;
|
|
89
|
+
readonly cancelCommandId?: CommandId;
|
|
90
|
+
readonly replacementWork?: RunSchedulingWork;
|
|
91
|
+
}
|
|
92
|
+
/** Preserve a recovery predecessor when cancellation leaves other selected inputs eligible. */
|
|
93
|
+
declare const planRunSchedulingCancellation: (state: SchedulingState, messageId: MessageId) => RunSchedulingCancellationPlan | undefined;
|
|
94
|
+
/** Stop/interrupt facts that invalidate authorization and pause pending work before any run. */
|
|
95
|
+
declare const planWaitingRunInterruption: (state: SchedulingState, controlCommandId: CommandId) => {
|
|
96
|
+
requestId: string & import("effect/Brand").Brand<"RunRequestId">;
|
|
97
|
+
messageIds: (string & import("effect/Brand").Brand<"MessageId">)[];
|
|
98
|
+
cancelCommandId: string & import("effect/Brand").Brand<"CommandId">;
|
|
99
|
+
} | undefined;
|
|
100
|
+
//#endregion
|
|
9
101
|
//#region src/domain/reduced-state.d.ts
|
|
10
102
|
/** Failure payload paired with the durable sequence that recorded it. */
|
|
11
103
|
type LifecycleFailure = {
|
|
@@ -55,6 +147,7 @@ interface LifecycleTiming {
|
|
|
55
147
|
}
|
|
56
148
|
/** Durable run lifecycle projection tying one run to its owning command ids. */
|
|
57
149
|
interface RunRecord extends LifecycleTiming {
|
|
150
|
+
readonly modelSelection?: ModelSelectionPayload;
|
|
58
151
|
readonly runId: RunId;
|
|
59
152
|
readonly commandIds: ReadonlyArray<CommandId>;
|
|
60
153
|
readonly startedSeq: SequenceNumber;
|
|
@@ -188,7 +281,8 @@ type MessageRecord = {
|
|
|
188
281
|
readonly messageId: MessageId;
|
|
189
282
|
readonly runId: RunId;
|
|
190
283
|
readonly turnId: TurnId;
|
|
191
|
-
readonly inferenceId: InferenceId;
|
|
284
|
+
readonly inferenceId: InferenceId; /** True when the assistant message originated outside this EDA session. */
|
|
285
|
+
readonly imported?: true;
|
|
192
286
|
readonly content: AssistantMessageContent;
|
|
193
287
|
readonly createdAtMs?: number;
|
|
194
288
|
readonly promptParts?: ReadonlyArray<Prompt.AssistantMessagePart>;
|
|
@@ -243,18 +337,6 @@ interface StopRequestRecord {
|
|
|
243
337
|
readonly appliedTurnId?: TurnId;
|
|
244
338
|
readonly appliedInferenceId?: InferenceId;
|
|
245
339
|
}
|
|
246
|
-
/** Rolling session totals for provider-reported model token usage. */
|
|
247
|
-
interface TokenUsageTotals {
|
|
248
|
-
readonly inputTokens: number;
|
|
249
|
-
readonly cachedInputTokens: number;
|
|
250
|
-
readonly outputTokens: number;
|
|
251
|
-
readonly textTokens: number;
|
|
252
|
-
readonly reasoningTokens: number;
|
|
253
|
-
}
|
|
254
|
-
/** First-party token consumption metadata folded by the framework reducer. */
|
|
255
|
-
interface TokenConsumptionState {
|
|
256
|
-
readonly total: TokenUsageTotals;
|
|
257
|
-
}
|
|
258
340
|
/** Admitted command that has not yet crossed the `CommandStarted` boundary. */
|
|
259
341
|
interface PendingCommand {
|
|
260
342
|
/** Lifecycle ID for the admitted command. */
|
|
@@ -279,6 +361,10 @@ type ActiveTurnIdentity = {
|
|
|
279
361
|
};
|
|
280
362
|
/** Canonical durable replay product used by queries, recovery, and scheduling. */
|
|
281
363
|
interface ReducedState {
|
|
364
|
+
/** Single current authorization reservation; absent after grant or invalidation. */
|
|
365
|
+
readonly runSchedulingRequest?: RunSchedulingRequestRecord;
|
|
366
|
+
/** Session execution policy established by configuration or the first historical run. */
|
|
367
|
+
readonly modelSelection?: ModelSelectionPayload;
|
|
282
368
|
readonly lastSeq: SequenceNumber;
|
|
283
369
|
readonly commands: ReadonlyMap<CommandId, CommandRecord>;
|
|
284
370
|
readonly runs: ReadonlyMap<RunId, RunRecord>;
|
|
@@ -316,7 +402,7 @@ declare const initialReducedState: ReducedState;
|
|
|
316
402
|
/** Reserved reducer checkpoint name for the framework-owned `ReducedState`. */
|
|
317
403
|
declare const frameworkReducedStateReducerName = "_eda.framework.reduced-state";
|
|
318
404
|
/** Schema version for the framework-owned `ReducedState` checkpoint payload. */
|
|
319
|
-
declare const frameworkReducedStateReducerSchemaVersion =
|
|
405
|
+
declare const frameworkReducedStateReducerSchemaVersion = 7;
|
|
320
406
|
/** JSON payload stored for the framework-owned reduced-state reducer checkpoint. */
|
|
321
407
|
type ReducedStateCheckpointCommandRecord = Omit<CommandRecord, "command">;
|
|
322
408
|
type SystemMessageRecord = Extract<MessageRecord, {
|
|
@@ -354,6 +440,8 @@ interface ReducedStateCheckpointToolCallRecord extends Omit<ToolCallRecord, "dec
|
|
|
354
440
|
readonly terminal?: ReducedStateCheckpointToolTerminal;
|
|
355
441
|
}
|
|
356
442
|
interface ReducedStateCheckpointPayload {
|
|
443
|
+
readonly runSchedulingRequest?: RunSchedulingRequestRecord;
|
|
444
|
+
readonly modelSelection?: ModelSelectionPayload;
|
|
357
445
|
readonly lastSeq: SequenceNumber;
|
|
358
446
|
readonly commands: ReadonlyArray<readonly [CommandId, ReducedStateCheckpointCommandRecord]>;
|
|
359
447
|
readonly runs: ReadonlyArray<readonly [RunId, RunRecord]>;
|
|
@@ -464,5 +552,5 @@ declare const emptyCommandQueues: CommandQueues;
|
|
|
464
552
|
*/
|
|
465
553
|
declare const deriveCommandQueues: (state: CommandQueueSource) => CommandQueues;
|
|
466
554
|
//#endregion
|
|
467
|
-
export { RunTerminal as A,
|
|
468
|
-
//# sourceMappingURL=command-queues-
|
|
555
|
+
export { RunRequestOutcome as $, RunTerminal as A, decodeReducedStateCheckpoint as B, ReducedStateCheckpointCommandRecord as C, ReducedStateCheckpointToolDecision as D, ReducedStateCheckpointToolCallRecord as E, TurnRecord as F, initialReducedState as G, foldReducedState as H, TurnTerminal as I, reduceCommittedEvents as J, pendingCommands as K, activeCommand as L, ToolCallRecord as M, ToolDecision as N, ReducedStateCheckpointToolTerminal as O, ToolTerminal as P, RunGrantResult as Q, activeTurnIdentityForCommand as R, ReducedState as S, ReducedStateCheckpointPayload as T, frameworkReducedStateReducerName as U, encodeReducedStateCheckpoint as V, frameworkReducedStateReducerSchemaVersion as W, DeferredRunResolution as X, reducedStateCheckpointEventSeqs as Y, LocalRunResolution as Z, LifecycleTiming as _, deriveCommandQueues as a, RunSchedulingWork as at, RecoverableWork as b, ActiveTurnIdentity as c, planWaitingRunInterruption as ct, CompactionRecord as d, RunResolution as et, CompactionTerminal as f, LifecycleFailure as g, InferenceTerminal as h, PendingUserMessage as i, RunSchedulingRequestRecord as it, StopRequestRecord as j, RunRecord as k, CommandRecord as l, runSchedulingInputMessageIds as lt, InferenceRecord as m, CommandQueues as n, RunSchedulingInput as nt, emptyCommandQueues as o, canGrantRun as ot, ContextRecord as p, pendingStopCommand as q, PendingSteeringMessage as r, RunSchedulingRequest as rt, ActiveCommandEvidence as s, planRunSchedulingCancellation as st, CommandQueueSource as t, RunSchedulingCancellationPlan as tt, CommandTerminal as u, waitingRunControl as ut, MessageRecord as v, ReducedStateCheckpointMessageRecord as w, RecoveryContinuationRecord as x, PendingCommand as y, classifyRecoverableWork as z };
|
|
556
|
+
//# sourceMappingURL=command-queues-B45Xa1Dl.d.ts.map
|
|
@@ -99,6 +99,14 @@ declare class StopTurnCommand extends StopTurnCommand_base {}
|
|
|
99
99
|
/** Mutating input accepted by effect-durable-agent before runtime processing. */
|
|
100
100
|
declare const EDACommand: Schema.Union<readonly [typeof SubmitMessageCommand, typeof StopTurnCommand, typeof CancelPendingMessageCommand, typeof PromotePendingMessageCommand, typeof ResumePendingMessagesCommand]>;
|
|
101
101
|
type EDACommand = typeof EDACommand.Type;
|
|
102
|
+
declare const GrantRunCommand_base: Schema.Class<GrantRunCommand, Schema.TaggedStruct<"GrantRun", {
|
|
103
|
+
readonly requestId: Schema.brand<Schema.String, "RunRequestId">;
|
|
104
|
+
}>, {}>;
|
|
105
|
+
/**
|
|
106
|
+
* Trusted scheduler permission, accepted only through the separate grantRun API.
|
|
107
|
+
* Excluded from EDACommand so ordinary session ingress cannot authorize itself.
|
|
108
|
+
*/
|
|
109
|
+
declare class GrantRunCommand extends GrantRunCommand_base {}
|
|
102
110
|
//#endregion
|
|
103
|
-
export {
|
|
104
|
-
//# sourceMappingURL=commands-
|
|
111
|
+
export { PendingMessageCancellationReason as a, StopTurnCommand as c, UserMessageContent as d, UserMessagePart as f, GrantRunCommand as i, SubmitMessageCommand as l, CommandIdempotencyKey as n, PromotePendingMessageCommand as o, EDACommand as r, ResumePendingMessagesCommand as s, CancelPendingMessageCommand as t, SubmitMessageDisposition as u };
|
|
112
|
+
//# sourceMappingURL=commands-p8venTWs.d.ts.map
|