effect-durable-agent 0.1.0-alpha.1 → 0.1.0-alpha.10
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-CQi4Xc7u.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-BhLSSXJ-.d.ts} +28 -7
- package/dist/context-projection-mCuvcO2W.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-KaeDSfeP.d.ts} +11 -31
- 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-6PEzaEGn.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-CNhqUsEr.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-CCSzc4h8.d.ts} +16 -6
- package/dist/run-scheduler-DcS_okUH.d.ts +43 -0
- package/dist/run-scheduling-wakeup-CeHrvXie.d.ts +25 -0
- package/dist/{runtime-C56FQxiL.d.ts → runtime-WL_gKqxn.d.ts} +16 -7
- 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-DfW_4KC0.d.ts +47 -0
- package/dist/{session-query-DOc1KanA.js → session-state-BIZ2SYaP.js} +350 -183
- package/dist/session-state-BIZ2SYaP.js.map +1 -0
- package/dist/{session-query-DlRo5Ufc.d.ts → session-state-BeR2rZRR.d.ts} +144 -46
- package/dist/{session-store-D2Ore1QC.d.ts → session-store-J_Un45kW.d.ts} +7 -96
- package/dist/sink-checkpoint-store-C9hUxfH0.d.ts +40 -0
- package/dist/{sink-registry-CFC6xjsN.js → sink-registry-Bbqhtdnx.js} +27 -67
- package/dist/sink-registry-Bbqhtdnx.js.map +1 -0
- package/dist/{sink-registry-CIU0LD3m.d.ts → sink-registry-DuDkNXjZ.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-BDmJe_Wr.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
|
@@ -1,191 +1,5 @@
|
|
|
1
1
|
import * as Schema from "effect/Schema";
|
|
2
2
|
|
|
3
|
-
//#region src/types/events/envelope.d.ts
|
|
4
|
-
/** Event namespace, such as `effect-durable-agent`, `sandbox`, or `gia`. */
|
|
5
|
-
declare const EventNamespace: Schema.NonEmptyString;
|
|
6
|
-
type EventNamespace = typeof EventNamespace.Type;
|
|
7
|
-
/** Event type within a namespace, such as `CommandAdmitted` or `TextDelta`. */
|
|
8
|
-
declare const EventType: Schema.NonEmptyString;
|
|
9
|
-
type EventType = typeof EventType.Type;
|
|
10
|
-
/** Build a non-empty event type while preserving its string literal for exhaustive unions. */
|
|
11
|
-
declare const makeEventType: <const Value extends string>(value: Value extends "" ? never : Value) => Value extends "" ? never : Value;
|
|
12
|
-
/** Extract the literal name retained by `makeEventType`. */
|
|
13
|
-
type EventTypeName<Type extends EventType> = Type;
|
|
14
|
-
/** Provider-supplied stream part identity, preserved for correlation/debugging. */
|
|
15
|
-
declare const ProviderPartId: Schema.brand<Schema.NonEmptyString, "ProviderPartId">;
|
|
16
|
-
type ProviderPartId = typeof ProviderPartId.Type;
|
|
17
|
-
/** Positive schema version for one namespace/type payload contract. */
|
|
18
|
-
declare const SchemaVersion: Schema.Int;
|
|
19
|
-
type SchemaVersion = typeof SchemaVersion.Type;
|
|
20
|
-
/** Milliseconds since unix epoch, represented as a non-negative integer. */
|
|
21
|
-
declare const UnixEpochMillis: Schema.brand<Schema.Int, "UnixEpochMillis">;
|
|
22
|
-
type UnixEpochMillis = typeof UnixEpochMillis.Type;
|
|
23
|
-
/** Whether an event is persisted or live-only. */
|
|
24
|
-
declare const EventDurability: Schema.Literals<readonly ["durable", "ephemeral"]>;
|
|
25
|
-
type EventDurability = typeof EventDurability.Type;
|
|
26
|
-
/** Common event envelope decoded before payload-specific schemas. */
|
|
27
|
-
declare const EventEnvelope: Schema.Struct<{
|
|
28
|
-
readonly namespace: Schema.NonEmptyString;
|
|
29
|
-
readonly type: Schema.NonEmptyString;
|
|
30
|
-
readonly schemaVersion: Schema.Int;
|
|
31
|
-
readonly durability: Schema.Literals<readonly ["durable", "ephemeral"]>;
|
|
32
|
-
readonly eventId: Schema.brand<Schema.String, "EventId">;
|
|
33
|
-
readonly sessionId: Schema.brand<Schema.String, "SessionId">;
|
|
34
|
-
readonly correlationId: Schema.optionalKey<Schema.brand<Schema.String, "CorrelationId">>;
|
|
35
|
-
readonly createdAtMs: Schema.brand<Schema.Int, "UnixEpochMillis">;
|
|
36
|
-
readonly trace: Schema.withConstructorDefault<Schema.Struct<{
|
|
37
|
-
readonly span: Schema.Struct<{
|
|
38
|
-
readonly traceId: Schema.brand<Schema.String, "EDATraceId">;
|
|
39
|
-
readonly spanId: Schema.brand<Schema.String, "EDASpanId">;
|
|
40
|
-
readonly sampled: Schema.Boolean;
|
|
41
|
-
readonly tracestate: Schema.NullOr<Schema.String>;
|
|
42
|
-
}>;
|
|
43
|
-
readonly links: Schema.$Array<Schema.Struct<{
|
|
44
|
-
readonly context: Schema.Struct<{
|
|
45
|
-
readonly traceId: Schema.brand<Schema.String, "EDATraceId">;
|
|
46
|
-
readonly spanId: Schema.brand<Schema.String, "EDASpanId">;
|
|
47
|
-
readonly sampled: Schema.Boolean;
|
|
48
|
-
readonly tracestate: Schema.NullOr<Schema.String>;
|
|
49
|
-
}>;
|
|
50
|
-
readonly attributes: Schema.$Record<Schema.String, Schema.Union<readonly [Schema.String, Schema.Number, Schema.Boolean]>>;
|
|
51
|
-
}>>;
|
|
52
|
-
}>>;
|
|
53
|
-
readonly payload: Schema.Unknown;
|
|
54
|
-
}>;
|
|
55
|
-
type EventEnvelope = typeof EventEnvelope.Type;
|
|
56
|
-
/** Common envelope narrowed to committed durable events. */
|
|
57
|
-
declare const DurableEventEnvelope: Schema.Struct<{
|
|
58
|
-
readonly durability: Schema.Literal<"durable">;
|
|
59
|
-
readonly namespace: Schema.NonEmptyString;
|
|
60
|
-
readonly type: Schema.NonEmptyString;
|
|
61
|
-
readonly schemaVersion: Schema.Int;
|
|
62
|
-
readonly eventId: Schema.brand<Schema.String, "EventId">;
|
|
63
|
-
readonly sessionId: Schema.brand<Schema.String, "SessionId">;
|
|
64
|
-
readonly correlationId: Schema.optionalKey<Schema.brand<Schema.String, "CorrelationId">>;
|
|
65
|
-
readonly createdAtMs: Schema.brand<Schema.Int, "UnixEpochMillis">;
|
|
66
|
-
readonly trace: Schema.withConstructorDefault<Schema.Struct<{
|
|
67
|
-
readonly span: Schema.Struct<{
|
|
68
|
-
readonly traceId: Schema.brand<Schema.String, "EDATraceId">;
|
|
69
|
-
readonly spanId: Schema.brand<Schema.String, "EDASpanId">;
|
|
70
|
-
readonly sampled: Schema.Boolean;
|
|
71
|
-
readonly tracestate: Schema.NullOr<Schema.String>;
|
|
72
|
-
}>;
|
|
73
|
-
readonly links: Schema.$Array<Schema.Struct<{
|
|
74
|
-
readonly context: Schema.Struct<{
|
|
75
|
-
readonly traceId: Schema.brand<Schema.String, "EDATraceId">;
|
|
76
|
-
readonly spanId: Schema.brand<Schema.String, "EDASpanId">;
|
|
77
|
-
readonly sampled: Schema.Boolean;
|
|
78
|
-
readonly tracestate: Schema.NullOr<Schema.String>;
|
|
79
|
-
}>;
|
|
80
|
-
readonly attributes: Schema.$Record<Schema.String, Schema.Union<readonly [Schema.String, Schema.Number, Schema.Boolean]>>;
|
|
81
|
-
}>>;
|
|
82
|
-
}>>;
|
|
83
|
-
readonly payload: Schema.Unknown;
|
|
84
|
-
}>;
|
|
85
|
-
type DurableEventEnvelope = typeof DurableEventEnvelope.Type;
|
|
86
|
-
/** Common envelope narrowed to live-only ephemeral events. */
|
|
87
|
-
declare const EphemeralEventEnvelope: Schema.Struct<{
|
|
88
|
-
readonly durability: Schema.Literal<"ephemeral">;
|
|
89
|
-
readonly namespace: Schema.NonEmptyString;
|
|
90
|
-
readonly type: Schema.NonEmptyString;
|
|
91
|
-
readonly schemaVersion: Schema.Int;
|
|
92
|
-
readonly eventId: Schema.brand<Schema.String, "EventId">;
|
|
93
|
-
readonly sessionId: Schema.brand<Schema.String, "SessionId">;
|
|
94
|
-
readonly correlationId: Schema.optionalKey<Schema.brand<Schema.String, "CorrelationId">>;
|
|
95
|
-
readonly createdAtMs: Schema.brand<Schema.Int, "UnixEpochMillis">;
|
|
96
|
-
readonly trace: Schema.withConstructorDefault<Schema.Struct<{
|
|
97
|
-
readonly span: Schema.Struct<{
|
|
98
|
-
readonly traceId: Schema.brand<Schema.String, "EDATraceId">;
|
|
99
|
-
readonly spanId: Schema.brand<Schema.String, "EDASpanId">;
|
|
100
|
-
readonly sampled: Schema.Boolean;
|
|
101
|
-
readonly tracestate: Schema.NullOr<Schema.String>;
|
|
102
|
-
}>;
|
|
103
|
-
readonly links: Schema.$Array<Schema.Struct<{
|
|
104
|
-
readonly context: Schema.Struct<{
|
|
105
|
-
readonly traceId: Schema.brand<Schema.String, "EDATraceId">;
|
|
106
|
-
readonly spanId: Schema.brand<Schema.String, "EDASpanId">;
|
|
107
|
-
readonly sampled: Schema.Boolean;
|
|
108
|
-
readonly tracestate: Schema.NullOr<Schema.String>;
|
|
109
|
-
}>;
|
|
110
|
-
readonly attributes: Schema.$Record<Schema.String, Schema.Union<readonly [Schema.String, Schema.Number, Schema.Boolean]>>;
|
|
111
|
-
}>>;
|
|
112
|
-
}>>;
|
|
113
|
-
readonly payload: Schema.Unknown;
|
|
114
|
-
}>;
|
|
115
|
-
type EphemeralEventEnvelope = typeof EphemeralEventEnvelope.Type;
|
|
116
|
-
/** Event delivered to live subscribers with its durable/ephemeral position. */
|
|
117
|
-
declare const PositionedEvent: Schema.Struct<{
|
|
118
|
-
readonly position: Schema.Struct<{
|
|
119
|
-
readonly seq: Schema.brand<Schema.Int, "SequenceNumber">;
|
|
120
|
-
readonly subSeq: Schema.brand<Schema.Int, "SubSequenceNumber">;
|
|
121
|
-
}>;
|
|
122
|
-
readonly event: Schema.Struct<{
|
|
123
|
-
readonly namespace: Schema.NonEmptyString;
|
|
124
|
-
readonly type: Schema.NonEmptyString;
|
|
125
|
-
readonly schemaVersion: Schema.Int;
|
|
126
|
-
readonly durability: Schema.Literals<readonly ["durable", "ephemeral"]>;
|
|
127
|
-
readonly eventId: Schema.brand<Schema.String, "EventId">;
|
|
128
|
-
readonly sessionId: Schema.brand<Schema.String, "SessionId">;
|
|
129
|
-
readonly correlationId: Schema.optionalKey<Schema.brand<Schema.String, "CorrelationId">>;
|
|
130
|
-
readonly createdAtMs: Schema.brand<Schema.Int, "UnixEpochMillis">;
|
|
131
|
-
readonly trace: Schema.withConstructorDefault<Schema.Struct<{
|
|
132
|
-
readonly span: Schema.Struct<{
|
|
133
|
-
readonly traceId: Schema.brand<Schema.String, "EDATraceId">;
|
|
134
|
-
readonly spanId: Schema.brand<Schema.String, "EDASpanId">;
|
|
135
|
-
readonly sampled: Schema.Boolean;
|
|
136
|
-
readonly tracestate: Schema.NullOr<Schema.String>;
|
|
137
|
-
}>;
|
|
138
|
-
readonly links: Schema.$Array<Schema.Struct<{
|
|
139
|
-
readonly context: Schema.Struct<{
|
|
140
|
-
readonly traceId: Schema.brand<Schema.String, "EDATraceId">;
|
|
141
|
-
readonly spanId: Schema.brand<Schema.String, "EDASpanId">;
|
|
142
|
-
readonly sampled: Schema.Boolean;
|
|
143
|
-
readonly tracestate: Schema.NullOr<Schema.String>;
|
|
144
|
-
}>;
|
|
145
|
-
readonly attributes: Schema.$Record<Schema.String, Schema.Union<readonly [Schema.String, Schema.Number, Schema.Boolean]>>;
|
|
146
|
-
}>>;
|
|
147
|
-
}>>;
|
|
148
|
-
readonly payload: Schema.Unknown;
|
|
149
|
-
}>;
|
|
150
|
-
}>;
|
|
151
|
-
type PositionedEvent = typeof PositionedEvent.Type;
|
|
152
|
-
/** Built-in framework event namespace. */
|
|
153
|
-
declare const effectDurableAgentNamespace: string;
|
|
154
|
-
/** Initial schema version for built-in event payloads. */
|
|
155
|
-
declare const schemaV1: number;
|
|
156
|
-
/** Non-negative integer used by token counts and similar counters. */
|
|
157
|
-
declare const NonNegativeInt: Schema.Int;
|
|
158
|
-
type NonNegativeInt = typeof NonNegativeInt.Type;
|
|
159
|
-
/** Registered tool name; plain non-empty text, not a lifecycle identity. */
|
|
160
|
-
declare const ToolName: Schema.NonEmptyString;
|
|
161
|
-
type ToolName = typeof ToolName.Type;
|
|
162
|
-
/** Error details stored on failed lifecycle events. */
|
|
163
|
-
declare const FailurePayload: Schema.Struct<{
|
|
164
|
-
readonly message: Schema.String;
|
|
165
|
-
readonly code: Schema.optionalKey<Schema.String>;
|
|
166
|
-
readonly details: Schema.optionalKey<Schema.Unknown>;
|
|
167
|
-
}>;
|
|
168
|
-
type FailurePayload = typeof FailurePayload.Type;
|
|
169
|
-
/** Token usage reported by a model provider when available. */
|
|
170
|
-
declare const UsagePayload: Schema.Struct<{
|
|
171
|
-
readonly inputTokens: Schema.optionalKey<Schema.Int>;
|
|
172
|
-
readonly cachedInputTokens: Schema.optionalKey<Schema.Int>;
|
|
173
|
-
readonly outputTokens: Schema.optionalKey<Schema.Int>;
|
|
174
|
-
readonly textTokens: Schema.optionalKey<Schema.Int>;
|
|
175
|
-
readonly reasoningTokens: Schema.optionalKey<Schema.Int>;
|
|
176
|
-
}>;
|
|
177
|
-
type UsagePayload = typeof UsagePayload.Type;
|
|
178
|
-
/** Intended provider/model selection known before a model request starts. */
|
|
179
|
-
declare const ModelSelectionPayload: Schema.Struct<{
|
|
180
|
-
readonly provider: Schema.NonEmptyString;
|
|
181
|
-
readonly modelId: Schema.NonEmptyString;
|
|
182
|
-
readonly settings: Schema.optionalKey<Schema.Unknown>;
|
|
183
|
-
}>;
|
|
184
|
-
type ModelSelectionPayload = typeof ModelSelectionPayload.Type;
|
|
185
|
-
/** App-owned instructions inserted into model context as a system message. */
|
|
186
|
-
declare const SystemPromptText: Schema.NonEmptyString;
|
|
187
|
-
type SystemPromptText = typeof SystemPromptText.Type;
|
|
188
|
-
//#endregion
|
|
189
3
|
//#region src/types/events/ephemeral.d.ts
|
|
190
4
|
/** Event type values for ephemeral model stream events. */
|
|
191
5
|
declare const textDeltaEventType: "TextDelta";
|
|
@@ -914,5 +728,5 @@ declare const EDAEphemeralEvent: Schema.Union<readonly [Schema.Union<readonly [S
|
|
|
914
728
|
}>]>]>;
|
|
915
729
|
type EDAEphemeralEvent = typeof EDAEphemeralEvent.Type;
|
|
916
730
|
//#endregion
|
|
917
|
-
export {
|
|
918
|
-
//# sourceMappingURL=events-
|
|
731
|
+
export { toolParamsDeltaEventType as C, traceStatusEventType as E, textDeltaEventType as S, toolParamsStartEventType as T, TraceStatusEvent as _, RuntimeStatusEvent as a, reasoningDeltaEventType as b, SubscriberStatusPayload as c, ToolParamsDeltaEvent as d, ToolParamsDeltaPayload as f, ToolParamsStartPayload as g, ToolParamsStartEvent as h, ReasoningDeltaPayload as i, TextDeltaEvent as l, ToolParamsEndPayload as m, ModelStreamEvent as n, SubscriberStatusEvent as o, ToolParamsEndEvent as p, ReasoningDeltaEvent as r, SubscriberStatusKind as s, EDAEphemeralEvent as t, TextDeltaPayload as u, TraceStatusKind as v, toolParamsEndEventType as w, subscriberStatusEventType as x, TraceStatusPayload as y };
|
|
732
|
+
//# sourceMappingURL=events-LZFNoESe.d.ts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { a as CorrelationId, b as TurnId, c as EventId, g as SessionId, 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
2
|
import * as Context from "effect/Context";
|
|
3
3
|
import * as Effect from "effect/Effect";
|
|
4
4
|
import * as Layer from "effect/Layer";
|
|
@@ -10,6 +10,7 @@ interface IdGeneratorShape {
|
|
|
10
10
|
readonly makeEventId: () => Effect.Effect<EventId>;
|
|
11
11
|
readonly makeCommandId: () => Effect.Effect<CommandId>;
|
|
12
12
|
readonly makeRunId: () => Effect.Effect<RunId>;
|
|
13
|
+
readonly makeRunRequestId: () => Effect.Effect<RunRequestId>;
|
|
13
14
|
readonly makeTurnId: () => Effect.Effect<TurnId>;
|
|
14
15
|
readonly makeInferenceId: () => Effect.Effect<InferenceId>;
|
|
15
16
|
readonly makeToolCallId: () => Effect.Effect<ToolCallId>;
|
|
@@ -30,4 +31,4 @@ declare class IdGenerator extends IdGenerator_base {
|
|
|
30
31
|
declare const sequentialUuidV7: (n: number) => string;
|
|
31
32
|
//#endregion
|
|
32
33
|
export { IdGeneratorShape as n, sequentialUuidV7 as r, IdGenerator as t };
|
|
33
|
-
//# sourceMappingURL=id-generator
|
|
34
|
+
//# sourceMappingURL=id-generator--x6itQZ2.d.ts.map
|
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { _ as
|
|
2
|
-
import { a as
|
|
1
|
+
import { S as durablePosition, _ as SubSequenceNumber, a as CorrelationId, b as TurnId, c as EventId, d as Position, f as PositionOrder, g as SessionId, h as SequenceNumber, i as ContextVersion, l as InferenceId, m as RunRequestId, n as CommandId, o as DurablePosition, p as RunId, r as CompactionId, s as DurableSubSequenceNumber, t as BaseStateId, u as MessageId, v as SummaryId, x as comparePosition, y as ToolCallId } from "./core-C-6xHzRx.js";
|
|
2
|
+
import { _ as UsagePayload, a as EventNamespace, b as schemaV1, c as FailurePayload, d as PositionedEvent, f as ProviderPartId, g as UnixEpochMillis, h as ToolName, i as EventEnvelope, l as ModelSelectionPayload, m as SystemPromptText, n as EphemeralEventEnvelope, o as EventType, p as SchemaVersion, r as EventDurability, s as EventTypeName, t as DurableEventEnvelope, u as NonNegativeInt, v as effectDurableAgentNamespace, y as makeEventType } from "./envelope-DkZyMIgp.js";
|
|
3
|
+
import { a as PendingMessageCancellationReason, c as StopTurnCommand, d as UserMessageContent, f as UserMessagePart, i as GrantRunCommand, l as SubmitMessageCommand, n as CommandIdempotencyKey, o as PromotePendingMessageCommand, r as EDACommand, s as ResumePendingMessagesCommand, t as CancelPendingMessageCommand, u as SubmitMessageDisposition } from "./commands-p8venTWs.js";
|
|
3
4
|
import { _ as parseEDATraceparent, a as EDATraceAttributes, c as EDATraceLink, d as makeEDAEventTrace, f as makeEDARunTrace, g as makeRootEDATraceMetadata, h as makeRootEDAEventTrace, i as EDATraceAttributeValue, l as EDATraceMetadata, m as makeEDATraceMetadataFromParent, n as EDARunTrace, o as EDATraceContext, p as makeEDATraceContext, r as EDASpanId, s as EDATraceId, t as EDAEventTrace, u as buildEDATraceparent } from "./tracing-BXHAkxkx.js";
|
|
4
|
-
import { A as
|
|
5
|
-
import {
|
|
6
|
-
import { a as EDARuntimeError, i as EDARuntimeConfig, n as EDACommandTerminalEvent, o as EDARuntimeShape, r as EDARuntime, s as EDARuntimeSubmit, t as CommittedCommandTerminalEvent } from "./runtime-
|
|
7
|
-
export { AssistantMessageCommittedEvent, AssistantMessageCommittedPayload, AssistantMessageContent, AssistantPartialCommittedEvent, AssistantPartialCommittedPayload, AssistantPromptPart, AssistantPromptParts, BaseStateCreatedEvent, BaseStateCreatedPayload, BaseStateEvent, BaseStateFailedEvent, BaseStateFailedPayload, BaseStateId, BaseStateRequestedEvent, BaseStateRequestedPayload, CancelPendingMessageCommand, CommandAdmittedEvent, CommandAdmittedPayload, CommandCancelledEvent, CommandCancelledPayload, CommandCompletedEvent, CommandCompletedPayload, CommandEvent, CommandFailedEvent, CommandFailedPayload, CommandId, CommandIdempotencyKey, CommandStartedEvent, CommandStartedPayload, CommittedCommandTerminalEvent, CompactionCompletedEvent, CompactionCompletedPayload, CompactionFailedEvent, CompactionFailedPayload, CompactionId, CompactionRequestedEvent, CompactionRequestedPayload, CompactionStartedEvent, CompactionStartedPayload, ContextAndCompactionEvent, ContextProjectedEvent, ContextProjectedPayload, ContextRebasedEvent, ContextRebasedPayload, ContextVersion, CorrelationId, DurableEventEnvelope, DurablePosition, DurableSubSequenceNumber, EDACommand, EDACommandTerminalEvent, EDADurableEvent, EDADurableEventV1, EDAEphemeralEvent, EDAEventTrace, EDARunTrace, EDARuntime, EDARuntimeConfig, EDARuntimeError, EDARuntimeShape, EDARuntimeSubmit, EDASpanId, EDATraceAttributeValue, EDATraceAttributes, EDATraceContext, EDATraceId, EDATraceLink, EDATraceMetadata, EphemeralEventEnvelope, EventDurability, EventEnvelope, EventId, EventNamespace, EventType, EventTypeName, FailurePayload, InferenceCompletedEvent, InferenceCompletedPayload, InferenceEvent, InferenceFailedEvent, InferenceFailedPayload, InferenceId, InferenceStartedEvent, InferenceStartedPayload, MessageEvent, MessageId, MessageQueuePausedEvent, MessageQueuePausedPayload, ModelSelectionPayload, ModelStreamEvent, NonNegativeInt, PendingMessageCancellationReason, PendingMessagesPausedEvent, PendingMessagesPausedPayload, Position, PositionOrder, PositionedEvent, PromotePendingMessageCommand, ProviderPartId, ReasoningDeltaEvent, ReasoningDeltaPayload, RecoveryCompletedEvent, RecoveryCompletedPayload, RecoveryContinuation, RecoveryEvent, ResumePendingMessagesCommand, RunCompletedEvent, RunCompletedPayload, RunEvent, RunFailedEvent, RunFailedPayload, RunId, RunInterruptedEvent, RunInterruptedPayload, RunStartedEvent, RunStartedPayload, RuntimeStatusEvent, SchemaVersion, SequenceNumber, SessionId, SteeringMessageCancelledEvent, SteeringMessageCancelledPayload, SteeringMessageQueuedEvent, SteeringMessageQueuedPayload, StopControlEvent, StopTurnAppliedEvent, StopTurnAppliedPayload, StopTurnCommand, StopTurnRequestedEvent, StopTurnRequestedPayload, SubSequenceNumber, SubmitMessageCommand, SubmitMessageDisposition, SubscriberStatusEvent, SubscriberStatusKind, SubscriberStatusPayload, SummaryCreatedEvent, SummaryCreatedPayload, SummaryId, SystemMessageCommittedEvent, SystemMessageCommittedPayload, SystemPromptText, TextDeltaEvent, TextDeltaPayload, ToolCallCompletedEvent, ToolCallCompletedPayload, ToolCallCreatedEvent, ToolCallCreatedPayload, ToolCallEvent, ToolCallFailedEvent, ToolCallFailedPayload, ToolCallId, ToolCallPromptPart, ToolCallRejectedEvent, ToolCallRejectedPayload, ToolCallRejectionFeedback, ToolCallRejectionReason, ToolCallStartedEvent, ToolCallStartedPayload, ToolFailurePromptPart, ToolName, ToolParamsDeltaEvent, ToolParamsDeltaPayload, ToolParamsEndEvent, ToolParamsEndPayload, ToolParamsStartEvent, ToolParamsStartPayload, ToolPromptPart, ToolRejectionPromptPart, ToolSuccessPromptPart, TraceStatusEvent, TraceStatusKind, TraceStatusPayload, TurnCompletedEvent, TurnCompletedPayload, TurnEvent, TurnFailedEvent, TurnFailedPayload, TurnId, TurnStartedEvent, TurnStartedPayload, TurnStoppedEvent, TurnStoppedPayload, UnixEpochMillis, UsagePayload, UserMessageCancellationReason, UserMessageCancelledEvent, UserMessageCancelledPayload, UserMessageCommittedEvent, UserMessageCommittedPayload, UserMessageContent, UserMessageDisposition, UserMessagePart, UserMessagePromotedEvent, UserMessagePromotedPayload, UserMessageSubmittedEvent, UserMessageSubmittedPayload, assistantMessageCommittedEventType, assistantPartialCommittedEventType, baseStateCreatedEventType, baseStateFailedEventType, baseStateRequestedEventType, buildEDATraceparent, commandAdmittedEventType, commandCancelledEventType, commandCompletedEventType, commandFailedEventType, commandStartedEventType, compactionCompletedEventType, compactionFailedEventType, compactionRequestedEventType, compactionStartedEventType, comparePosition, contextProjectedEventType, contextRebasedEventType, decodeUnknownEDADurableEvent, decodeUnknownEDADurableEventSync, durablePosition, effectDurableAgentNamespace, inferenceCompletedEventType, inferenceFailedEventType, inferenceStartedEventType, makeEDAEventTrace, makeEDARunTrace, makeEDATraceContext, makeEDATraceMetadataFromParent, makeEventType, makeRootEDAEventTrace, makeRootEDATraceMetadata, messageQueuePausedEventType, parseEDATraceparent, pendingMessagesPausedEventType, reasoningDeltaEventType, recoveryCompletedEventType, runCompletedEventType, runFailedEventType, runInterruptedEventType, runStartedEventType, schemaV1, steeringMessageCancelledEventType, steeringMessageQueuedEventType, stopTurnAppliedEventType, stopTurnRequestedEventType, subscriberStatusEventType, summaryCreatedEventType, systemMessageCommittedEventType, textDeltaEventType, toolCallCompletedEventType, toolCallCreatedEventType, toolCallFailedEventType, toolCallRejectedEventType, toolCallStartedEventType, toolParamsDeltaEventType, toolParamsEndEventType, toolParamsStartEventType, traceStatusEventType, turnCompletedEventType, turnFailedEventType, turnStartedEventType, turnStoppedEventType, userMessageCancelledEventType, userMessageCommittedEventType, userMessagePromotedEventType, userMessageSubmittedEventType };
|
|
5
|
+
import { $ as PendingMessagesPausedEvent, $n as sessionConfiguredEventType, $t as ToolRejectionPromptPart, A as CompactionFailedEvent, An as commandStartedEventType, At as StopTurnAppliedPayload, B as ContextRebasedPayload, Bn as inferenceFailedEventType, Bt as ToolCallCreatedPayload, C as CommandEvent, Cn as baseStateCreatedEventType, Ct as SessionConfiguredEvent, D as CommandStartedPayload, Dn as commandCancelledEventType, Dt as SteeringMessageQueuedPayload, E as CommandStartedEvent, En as commandAdmittedEventType, Et as SteeringMessageQueuedEvent, F as CompactionStartedPayload, Fn as contextProjectedEventType, Ft as SystemMessageCommittedEvent, G as InferenceEvent, Gn as runCompletedEventType, Gt as ToolCallRejectedEvent, H as EDADurableEventV1, Hn as messageQueuePausedEventType, Ht as ToolCallFailedEvent, I as ContextAndCompactionEvent, In as contextRebasedEventType, It as SystemMessageCommittedPayload, J as InferenceStartedEvent, Jn as runSchedulingDeliveredEventType, Jt as ToolCallRejectionReason, K as InferenceFailedEvent, Kn as runFailedEventType, Kt as ToolCallRejectedPayload, L as ContextProjectedEvent, Ln as decodeUnknownEDADurableEvent, Lt as ToolCallCompletedEvent, M as CompactionRequestedEvent, Mn as compactionFailedEventType, Mt as StopTurnRequestedPayload, N as CompactionRequestedPayload, Nn as compactionRequestedEventType, Nt as SummaryCreatedEvent, O as CompactionCompletedEvent, On as commandCompletedEventType, Ot as StopControlEvent, P as CompactionStartedEvent, Pn as compactionStartedEventType, Pt as SummaryCreatedPayload, Q as MessageQueuePausedPayload, Qn as runStartedEventType, Qt as ToolPromptPart, R as ContextProjectedPayload, Rn as decodeUnknownEDADurableEventSync, Rt as ToolCallCompletedPayload, S as CommandCompletedPayload, Sn as assistantPartialCommittedEventType, St as RunStartedPayload, T as CommandFailedPayload, Tn as baseStateRequestedEventType, Tt as SteeringMessageCancelledPayload, U as InferenceCompletedEvent, Un as pendingMessagesPausedEventType, Ut as ToolCallFailedPayload, V as EDADurableEvent, Vn as inferenceStartedEventType, Vt as ToolCallEvent, W as InferenceCompletedPayload, Wn as recoveryCompletedEventType, Wt as ToolCallPromptPart, X as MessageEvent, Xn as runSchedulingInvalidatedEventType, Xt as ToolCallStartedPayload, Y as InferenceStartedPayload, Yn as runSchedulingGrantedEventType, Yt as ToolCallStartedEvent, Z as MessageQueuePausedEvent, Zn as runSchedulingRequestedEventType, Zt as ToolFailurePromptPart, _ as CommandAdmittedEvent, _n as UserMessagePromotedPayload, _r as userMessagePromotedEventType, _t as RunSchedulingInvalidatedEvent, a as AssistantMessageImportedPayload, an as TurnFailedPayload, ar as systemMessageCommittedEventType, at as RunCompletedEvent, b as CommandCancelledPayload, bn as assistantMessageCommittedEventType, bt as RunSchedulingRequestedPayload, c as AssistantPromptPart, cn as TurnStoppedEvent, cr as toolCallFailedEventType, ct as RunFailedEvent, d as BaseStateCreatedPayload, dn as UserMessageCancelledEvent, dr as turnCompletedEventType, dt as RunInterruptedPayload, en as ToolSuccessPromptPart, er as steeringMessageCancelledEventType, et as PendingMessagesPausedPayload, f as BaseStateEvent, fn as UserMessageCancelledPayload, fr as turnFailedEventType, ft as RunSchedulingDeliveredEvent, g as BaseStateRequestedPayload, gn as UserMessagePromotedEvent, gr as userMessageCommittedEventType, gt as RunSchedulingGrantedPayload, h as BaseStateRequestedEvent, hn as UserMessageDisposition, hr as userMessageCancelledEventType, ht as RunSchedulingGrantedEvent, i as AssistantMessageImportedEvent, in as TurnFailedEvent, ir as summaryCreatedEventType, it as RecoveryEvent, j as CompactionFailedPayload, jn as compactionCompletedEventType, jt as StopTurnRequestedEvent, k as CompactionCompletedPayload, kn as commandFailedEventType, kt as StopTurnAppliedEvent, l as AssistantPromptParts, ln as TurnStoppedPayload, lr as toolCallRejectedEventType, lt as RunFailedPayload, m as BaseStateFailedPayload, mn as UserMessageCommittedPayload, mr as turnStoppedEventType, mt as RunSchedulingEvent, n as AssistantMessageCommittedPayload, nn as TurnCompletedPayload, nr as stopTurnAppliedEventType, nt as RecoveryCompletedPayload, o as AssistantPartialCommittedEvent, on as TurnStartedEvent, or as toolCallCompletedEventType, ot as RunCompletedPayload, p as BaseStateFailedEvent, pn as UserMessageCommittedEvent, pr as turnStartedEventType, pt as RunSchedulingDeliveredPayload, q as InferenceFailedPayload, qn as runInterruptedEventType, qt as ToolCallRejectionFeedback, r as AssistantMessageContent, rn as TurnEvent, rr as stopTurnRequestedEventType, rt as RecoveryContinuation, s as AssistantPartialCommittedPayload, sn as TurnStartedPayload, sr as toolCallCreatedEventType, st as RunEvent, t as AssistantMessageCommittedEvent, tn as TurnCompletedEvent, tr as steeringMessageQueuedEventType, tt as RecoveryCompletedEvent, u as BaseStateCreatedEvent, un as UserMessageCancellationReason, ur as toolCallStartedEventType, ut as RunInterruptedEvent, v as CommandAdmittedPayload, vn as UserMessageSubmittedEvent, vr as userMessageSubmittedEventType, vt as RunSchedulingInvalidatedPayload, w as CommandFailedEvent, wn as baseStateFailedEventType, wt as SteeringMessageCancelledEvent, x as CommandCompletedEvent, xn as assistantMessageImportedEventType, xt as RunStartedEvent, y as CommandCancelledEvent, yn as UserMessageSubmittedPayload, yt as RunSchedulingRequestedEvent, z as ContextRebasedEvent, zn as inferenceCompletedEventType, zt as ToolCallCreatedEvent } from "./durable-DeLCAvbw.js";
|
|
6
|
+
import { C as toolParamsDeltaEventType, E as traceStatusEventType, S as textDeltaEventType, T as toolParamsStartEventType, _ as TraceStatusEvent, a as RuntimeStatusEvent, b as reasoningDeltaEventType, c as SubscriberStatusPayload, d as ToolParamsDeltaEvent, f as ToolParamsDeltaPayload, g as ToolParamsStartPayload, h as ToolParamsStartEvent, i as ReasoningDeltaPayload, l as TextDeltaEvent, m as ToolParamsEndPayload, n as ModelStreamEvent, o as SubscriberStatusEvent, p as ToolParamsEndEvent, r as ReasoningDeltaEvent, s as SubscriberStatusKind, t as EDAEphemeralEvent, u as TextDeltaPayload, v as TraceStatusKind, w as toolParamsEndEventType, x as subscriberStatusEventType, y as TraceStatusPayload } from "./events-LZFNoESe.js";
|
|
7
|
+
import { a as EDARuntimeError, i as EDARuntimeConfig, n as EDACommandTerminalEvent, o as EDARuntimeShape, r as EDARuntime, s as EDARuntimeSubmit, t as CommittedCommandTerminalEvent } from "./runtime-WL_gKqxn.js";
|
|
8
|
+
export { AssistantMessageCommittedEvent, AssistantMessageCommittedPayload, AssistantMessageContent, AssistantMessageImportedEvent, AssistantMessageImportedPayload, AssistantPartialCommittedEvent, AssistantPartialCommittedPayload, AssistantPromptPart, AssistantPromptParts, BaseStateCreatedEvent, BaseStateCreatedPayload, BaseStateEvent, BaseStateFailedEvent, BaseStateFailedPayload, BaseStateId, BaseStateRequestedEvent, BaseStateRequestedPayload, CancelPendingMessageCommand, CommandAdmittedEvent, CommandAdmittedPayload, CommandCancelledEvent, CommandCancelledPayload, CommandCompletedEvent, CommandCompletedPayload, CommandEvent, CommandFailedEvent, CommandFailedPayload, CommandId, CommandIdempotencyKey, CommandStartedEvent, CommandStartedPayload, CommittedCommandTerminalEvent, CompactionCompletedEvent, CompactionCompletedPayload, CompactionFailedEvent, CompactionFailedPayload, CompactionId, CompactionRequestedEvent, CompactionRequestedPayload, CompactionStartedEvent, CompactionStartedPayload, ContextAndCompactionEvent, ContextProjectedEvent, ContextProjectedPayload, ContextRebasedEvent, ContextRebasedPayload, ContextVersion, CorrelationId, DurableEventEnvelope, DurablePosition, DurableSubSequenceNumber, EDACommand, EDACommandTerminalEvent, EDADurableEvent, EDADurableEventV1, EDAEphemeralEvent, EDAEventTrace, EDARunTrace, EDARuntime, EDARuntimeConfig, EDARuntimeError, EDARuntimeShape, EDARuntimeSubmit, EDASpanId, EDATraceAttributeValue, EDATraceAttributes, EDATraceContext, EDATraceId, EDATraceLink, EDATraceMetadata, EphemeralEventEnvelope, EventDurability, EventEnvelope, EventId, EventNamespace, EventType, EventTypeName, FailurePayload, GrantRunCommand, InferenceCompletedEvent, InferenceCompletedPayload, InferenceEvent, InferenceFailedEvent, InferenceFailedPayload, InferenceId, InferenceStartedEvent, InferenceStartedPayload, MessageEvent, MessageId, MessageQueuePausedEvent, MessageQueuePausedPayload, ModelSelectionPayload, ModelStreamEvent, NonNegativeInt, PendingMessageCancellationReason, PendingMessagesPausedEvent, PendingMessagesPausedPayload, Position, PositionOrder, PositionedEvent, PromotePendingMessageCommand, ProviderPartId, ReasoningDeltaEvent, ReasoningDeltaPayload, RecoveryCompletedEvent, RecoveryCompletedPayload, RecoveryContinuation, RecoveryEvent, ResumePendingMessagesCommand, RunCompletedEvent, RunCompletedPayload, RunEvent, RunFailedEvent, RunFailedPayload, RunId, RunInterruptedEvent, RunInterruptedPayload, RunRequestId, RunSchedulingDeliveredEvent, RunSchedulingDeliveredPayload, RunSchedulingEvent, RunSchedulingGrantedEvent, RunSchedulingGrantedPayload, RunSchedulingInvalidatedEvent, RunSchedulingInvalidatedPayload, RunSchedulingRequestedEvent, RunSchedulingRequestedPayload, RunStartedEvent, RunStartedPayload, RuntimeStatusEvent, SchemaVersion, SequenceNumber, SessionConfiguredEvent, SessionId, SteeringMessageCancelledEvent, SteeringMessageCancelledPayload, SteeringMessageQueuedEvent, SteeringMessageQueuedPayload, StopControlEvent, StopTurnAppliedEvent, StopTurnAppliedPayload, StopTurnCommand, StopTurnRequestedEvent, StopTurnRequestedPayload, SubSequenceNumber, SubmitMessageCommand, SubmitMessageDisposition, SubscriberStatusEvent, SubscriberStatusKind, SubscriberStatusPayload, SummaryCreatedEvent, SummaryCreatedPayload, SummaryId, SystemMessageCommittedEvent, SystemMessageCommittedPayload, SystemPromptText, TextDeltaEvent, TextDeltaPayload, ToolCallCompletedEvent, ToolCallCompletedPayload, ToolCallCreatedEvent, ToolCallCreatedPayload, ToolCallEvent, ToolCallFailedEvent, ToolCallFailedPayload, ToolCallId, ToolCallPromptPart, ToolCallRejectedEvent, ToolCallRejectedPayload, ToolCallRejectionFeedback, ToolCallRejectionReason, ToolCallStartedEvent, ToolCallStartedPayload, ToolFailurePromptPart, ToolName, ToolParamsDeltaEvent, ToolParamsDeltaPayload, ToolParamsEndEvent, ToolParamsEndPayload, ToolParamsStartEvent, ToolParamsStartPayload, ToolPromptPart, ToolRejectionPromptPart, ToolSuccessPromptPart, TraceStatusEvent, TraceStatusKind, TraceStatusPayload, TurnCompletedEvent, TurnCompletedPayload, TurnEvent, TurnFailedEvent, TurnFailedPayload, TurnId, TurnStartedEvent, TurnStartedPayload, TurnStoppedEvent, TurnStoppedPayload, UnixEpochMillis, UsagePayload, UserMessageCancellationReason, UserMessageCancelledEvent, UserMessageCancelledPayload, UserMessageCommittedEvent, UserMessageCommittedPayload, UserMessageContent, UserMessageDisposition, UserMessagePart, UserMessagePromotedEvent, UserMessagePromotedPayload, UserMessageSubmittedEvent, UserMessageSubmittedPayload, assistantMessageCommittedEventType, assistantMessageImportedEventType, assistantPartialCommittedEventType, baseStateCreatedEventType, baseStateFailedEventType, baseStateRequestedEventType, buildEDATraceparent, commandAdmittedEventType, commandCancelledEventType, commandCompletedEventType, commandFailedEventType, commandStartedEventType, compactionCompletedEventType, compactionFailedEventType, compactionRequestedEventType, compactionStartedEventType, comparePosition, contextProjectedEventType, contextRebasedEventType, decodeUnknownEDADurableEvent, decodeUnknownEDADurableEventSync, durablePosition, effectDurableAgentNamespace, inferenceCompletedEventType, inferenceFailedEventType, inferenceStartedEventType, makeEDAEventTrace, makeEDARunTrace, makeEDATraceContext, makeEDATraceMetadataFromParent, makeEventType, makeRootEDAEventTrace, makeRootEDATraceMetadata, messageQueuePausedEventType, parseEDATraceparent, pendingMessagesPausedEventType, reasoningDeltaEventType, recoveryCompletedEventType, runCompletedEventType, runFailedEventType, runInterruptedEventType, runSchedulingDeliveredEventType, runSchedulingGrantedEventType, runSchedulingInvalidatedEventType, runSchedulingRequestedEventType, runStartedEventType, schemaV1, sessionConfiguredEventType, steeringMessageCancelledEventType, steeringMessageQueuedEventType, stopTurnAppliedEventType, stopTurnRequestedEventType, subscriberStatusEventType, summaryCreatedEventType, systemMessageCommittedEventType, textDeltaEventType, toolCallCompletedEventType, toolCallCreatedEventType, toolCallFailedEventType, toolCallRejectedEventType, toolCallStartedEventType, toolParamsDeltaEventType, toolParamsEndEventType, toolParamsStartEventType, traceStatusEventType, turnCompletedEventType, turnFailedEventType, turnStartedEventType, turnStoppedEventType, userMessageCancelledEventType, userMessageCommittedEventType, userMessagePromotedEventType, userMessageSubmittedEventType };
|
package/dist/index.js
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { BaseStateId, CommandId, CompactionId, ContextVersion, CorrelationId, DurablePosition, DurableSubSequenceNumber, EventId, InferenceId, MessageId, Position, PositionOrder, RunId, SequenceNumber, SessionId, SubSequenceNumber, SummaryId, ToolCallId, TurnId, comparePosition, durablePosition } from "./types/core.js";
|
|
2
|
-
import { CancelPendingMessageCommand, CommandIdempotencyKey, EDACommand, PendingMessageCancellationReason, PromotePendingMessageCommand, ResumePendingMessagesCommand, StopTurnCommand, SubmitMessageCommand, SubmitMessageDisposition, UserMessageContent, UserMessagePart } from "./types/commands.js";
|
|
1
|
+
import { BaseStateId, CommandId, CompactionId, ContextVersion, CorrelationId, DurablePosition, DurableSubSequenceNumber, EventId, InferenceId, MessageId, Position, PositionOrder, RunId, RunRequestId, SequenceNumber, SessionId, SubSequenceNumber, SummaryId, ToolCallId, TurnId, comparePosition, durablePosition } from "./types/core.js";
|
|
3
2
|
import { EDAEventTrace, EDARunTrace, EDASpanId, EDATraceAttributeValue, EDATraceAttributes, EDATraceContext, EDATraceId, EDATraceLink, EDATraceMetadata, buildEDATraceparent, makeEDAEventTrace, makeEDARunTrace, makeEDATraceContext, makeEDATraceMetadataFromParent, makeRootEDAEventTrace, makeRootEDATraceMetadata, parseEDATraceparent } from "./types/tracing.js";
|
|
4
|
-
import {
|
|
3
|
+
import { _ as effectDurableAgentNamespace, a as EventNamespace, c as ModelSelectionPayload, d as ProviderPartId, f as SchemaVersion, g as UsagePayload, h as UnixEpochMillis, i as EventEnvelope, l as NonNegativeInt, m as ToolName, n as EphemeralEventEnvelope, o as EventType, p as SystemPromptText, r as EventDurability, s as FailurePayload, t as DurableEventEnvelope, u as PositionedEvent, v as makeEventType, y as schemaV1 } from "./envelope-DxQzo5rN.js";
|
|
4
|
+
import { CancelPendingMessageCommand, CommandIdempotencyKey, EDACommand, GrantRunCommand, PendingMessageCancellationReason, PromotePendingMessageCommand, ResumePendingMessagesCommand, StopTurnCommand, SubmitMessageCommand, SubmitMessageDisposition, UserMessageContent, UserMessagePart } from "./types/commands.js";
|
|
5
|
+
import { $ as PendingMessagesPausedEvent, $n as sessionConfiguredEventType, $t as ToolRejectionPromptPart, A as CompactionFailedEvent, An as commandStartedEventType, At as StopTurnAppliedPayload, B as ContextRebasedPayload, Bn as inferenceFailedEventType, Bt as ToolCallCreatedPayload, C as CommandEvent, Cn as baseStateCreatedEventType, Ct as SessionConfiguredEvent, D as CommandStartedPayload, Dn as commandCancelledEventType, Dt as SteeringMessageQueuedPayload, E as CommandStartedEvent, En as commandAdmittedEventType, Et as SteeringMessageQueuedEvent, F as CompactionStartedPayload, Fn as contextProjectedEventType, Ft as SystemMessageCommittedEvent, G as InferenceEvent, Gn as runCompletedEventType, Gt as ToolCallRejectedEvent, H as EDADurableEventV1, Hn as messageQueuePausedEventType, Ht as ToolCallFailedEvent, I as ContextAndCompactionEvent, In as contextRebasedEventType, It as SystemMessageCommittedPayload, J as InferenceStartedEvent, Jn as runSchedulingDeliveredEventType, Jt as ToolCallRejectionReason, K as InferenceFailedEvent, Kn as runFailedEventType, Kt as ToolCallRejectedPayload, L as ContextProjectedEvent, Ln as decodeUnknownEDADurableEvent, Lt as ToolCallCompletedEvent, M as CompactionRequestedEvent, Mn as compactionFailedEventType, Mt as StopTurnRequestedPayload, N as CompactionRequestedPayload, Nn as compactionRequestedEventType, Nt as SummaryCreatedEvent, O as CompactionCompletedEvent, On as commandCompletedEventType, Ot as StopControlEvent, P as CompactionStartedEvent, Pn as compactionStartedEventType, Pt as SummaryCreatedPayload, Q as MessageQueuePausedPayload, Qn as runStartedEventType, Qt as ToolPromptPart, R as ContextProjectedPayload, Rn as decodeUnknownEDADurableEventSync, Rt as ToolCallCompletedPayload, S as CommandCompletedPayload, Sn as assistantPartialCommittedEventType, St as RunStartedPayload, T as CommandFailedPayload, Tn as baseStateRequestedEventType, Tt as SteeringMessageCancelledPayload, U as InferenceCompletedEvent, Un as pendingMessagesPausedEventType, Ut as ToolCallFailedPayload, V as EDADurableEvent, Vn as inferenceStartedEventType, Vt as ToolCallEvent, W as InferenceCompletedPayload, Wn as recoveryCompletedEventType, Wt as ToolCallPromptPart, X as MessageEvent, Xn as runSchedulingInvalidatedEventType, Xt as ToolCallStartedPayload, Y as InferenceStartedPayload, Yn as runSchedulingGrantedEventType, Yt as ToolCallStartedEvent, Z as MessageQueuePausedEvent, Zn as runSchedulingRequestedEventType, Zt as ToolFailurePromptPart, _ as CommandAdmittedEvent, _n as UserMessagePromotedPayload, _r as userMessagePromotedEventType, _t as RunSchedulingInvalidatedEvent, a as AssistantMessageImportedPayload, an as TurnFailedPayload, ar as systemMessageCommittedEventType, at as RunCompletedEvent, b as CommandCancelledPayload, bn as assistantMessageCommittedEventType, bt as RunSchedulingRequestedPayload, c as AssistantPromptPart, cn as TurnStoppedEvent, cr as toolCallFailedEventType, ct as RunFailedEvent, d as BaseStateCreatedPayload, dn as UserMessageCancelledEvent, dr as turnCompletedEventType, dt as RunInterruptedPayload, en as ToolSuccessPromptPart, er as steeringMessageCancelledEventType, et as PendingMessagesPausedPayload, f as BaseStateEvent, fn as UserMessageCancelledPayload, fr as turnFailedEventType, ft as RunSchedulingDeliveredEvent, g as BaseStateRequestedPayload, gn as UserMessagePromotedEvent, gr as userMessageCommittedEventType, gt as RunSchedulingGrantedPayload, h as BaseStateRequestedEvent, hn as UserMessageDisposition, hr as userMessageCancelledEventType, ht as RunSchedulingGrantedEvent, i as AssistantMessageImportedEvent, in as TurnFailedEvent, ir as summaryCreatedEventType, it as RecoveryEvent, j as CompactionFailedPayload, jn as compactionCompletedEventType, jt as StopTurnRequestedEvent, k as CompactionCompletedPayload, kn as commandFailedEventType, kt as StopTurnAppliedEvent, l as AssistantPromptParts, ln as TurnStoppedPayload, lr as toolCallRejectedEventType, lt as RunFailedPayload, m as BaseStateFailedPayload, mn as UserMessageCommittedPayload, mr as turnStoppedEventType, mt as RunSchedulingEvent, n as AssistantMessageCommittedPayload, nn as TurnCompletedPayload, nr as stopTurnAppliedEventType, nt as RecoveryCompletedPayload, o as AssistantPartialCommittedEvent, on as TurnStartedEvent, or as toolCallCompletedEventType, ot as RunCompletedPayload, p as BaseStateFailedEvent, pn as UserMessageCommittedEvent, pr as turnStartedEventType, pt as RunSchedulingDeliveredPayload, q as InferenceFailedPayload, qn as runInterruptedEventType, qt as ToolCallRejectionFeedback, r as AssistantMessageContent, rn as TurnEvent, rr as stopTurnRequestedEventType, rt as RecoveryContinuation, s as AssistantPartialCommittedPayload, sn as TurnStartedPayload, sr as toolCallCreatedEventType, st as RunEvent, t as AssistantMessageCommittedEvent, tn as TurnCompletedEvent, tr as steeringMessageQueuedEventType, tt as RecoveryCompletedEvent, u as BaseStateCreatedEvent, un as UserMessageCancellationReason, ur as toolCallStartedEventType, ut as RunInterruptedEvent, v as CommandAdmittedPayload, vn as UserMessageSubmittedEvent, vr as userMessageSubmittedEventType, vt as RunSchedulingInvalidatedPayload, w as CommandFailedEvent, wn as baseStateFailedEventType, wt as SteeringMessageCancelledEvent, x as CommandCompletedEvent, xn as assistantMessageImportedEventType, xt as RunStartedEvent, y as CommandCancelledEvent, yn as UserMessageSubmittedPayload, yt as RunSchedulingRequestedEvent, z as ContextRebasedEvent, zn as inferenceCompletedEventType, zt as ToolCallCreatedEvent } from "./durable-BPHVFVvV.js";
|
|
5
6
|
import { EDAEphemeralEvent, ModelStreamEvent, ReasoningDeltaEvent, ReasoningDeltaPayload, RuntimeStatusEvent, SubscriberStatusEvent, SubscriberStatusKind, SubscriberStatusPayload, TextDeltaEvent, TextDeltaPayload, ToolParamsDeltaEvent, ToolParamsDeltaPayload, ToolParamsEndEvent, ToolParamsEndPayload, ToolParamsStartEvent, ToolParamsStartPayload, TraceStatusEvent, TraceStatusKind, TraceStatusPayload, reasoningDeltaEventType, subscriberStatusEventType, textDeltaEventType, toolParamsDeltaEventType, toolParamsEndEventType, toolParamsStartEventType, traceStatusEventType } from "./types/events.js";
|
|
6
7
|
import { EDARuntime, EDARuntimeConfig } from "./services/runtime.js";
|
|
7
|
-
export { AssistantMessageCommittedEvent, AssistantMessageCommittedPayload, AssistantMessageContent, AssistantPartialCommittedEvent, AssistantPartialCommittedPayload, AssistantPromptPart, AssistantPromptParts, BaseStateCreatedEvent, BaseStateCreatedPayload, BaseStateEvent, BaseStateFailedEvent, BaseStateFailedPayload, BaseStateId, BaseStateRequestedEvent, BaseStateRequestedPayload, CancelPendingMessageCommand, CommandAdmittedEvent, CommandAdmittedPayload, CommandCancelledEvent, CommandCancelledPayload, CommandCompletedEvent, CommandCompletedPayload, CommandEvent, CommandFailedEvent, CommandFailedPayload, CommandId, CommandIdempotencyKey, CommandStartedEvent, CommandStartedPayload, CompactionCompletedEvent, CompactionCompletedPayload, CompactionFailedEvent, CompactionFailedPayload, CompactionId, CompactionRequestedEvent, CompactionRequestedPayload, CompactionStartedEvent, CompactionStartedPayload, ContextAndCompactionEvent, ContextProjectedEvent, ContextProjectedPayload, ContextRebasedEvent, ContextRebasedPayload, ContextVersion, CorrelationId, DurableEventEnvelope, DurablePosition, DurableSubSequenceNumber, EDACommand, EDADurableEvent, EDADurableEventV1, EDAEphemeralEvent, EDAEventTrace, EDARunTrace, EDARuntime, EDARuntimeConfig, EDASpanId, EDATraceAttributeValue, EDATraceAttributes, EDATraceContext, EDATraceId, EDATraceLink, EDATraceMetadata, EphemeralEventEnvelope, EventDurability, EventEnvelope, EventId, EventNamespace, EventType, FailurePayload, InferenceCompletedEvent, InferenceCompletedPayload, InferenceEvent, InferenceFailedEvent, InferenceFailedPayload, InferenceId, InferenceStartedEvent, InferenceStartedPayload, MessageEvent, MessageId, MessageQueuePausedEvent, MessageQueuePausedPayload, ModelSelectionPayload, ModelStreamEvent, NonNegativeInt, PendingMessageCancellationReason, PendingMessagesPausedEvent, PendingMessagesPausedPayload, Position, PositionOrder, PositionedEvent, PromotePendingMessageCommand, ProviderPartId, ReasoningDeltaEvent, ReasoningDeltaPayload, RecoveryCompletedEvent, RecoveryCompletedPayload, RecoveryContinuation, RecoveryEvent, ResumePendingMessagesCommand, RunCompletedEvent, RunCompletedPayload, RunEvent, RunFailedEvent, RunFailedPayload, RunId, RunInterruptedEvent, RunInterruptedPayload, RunStartedEvent, RunStartedPayload, RuntimeStatusEvent, SchemaVersion, SequenceNumber, SessionId, SteeringMessageCancelledEvent, SteeringMessageCancelledPayload, SteeringMessageQueuedEvent, SteeringMessageQueuedPayload, StopControlEvent, StopTurnAppliedEvent, StopTurnAppliedPayload, StopTurnCommand, StopTurnRequestedEvent, StopTurnRequestedPayload, SubSequenceNumber, SubmitMessageCommand, SubmitMessageDisposition, SubscriberStatusEvent, SubscriberStatusKind, SubscriberStatusPayload, SummaryCreatedEvent, SummaryCreatedPayload, SummaryId, SystemMessageCommittedEvent, SystemMessageCommittedPayload, SystemPromptText, TextDeltaEvent, TextDeltaPayload, ToolCallCompletedEvent, ToolCallCompletedPayload, ToolCallCreatedEvent, ToolCallCreatedPayload, ToolCallEvent, ToolCallFailedEvent, ToolCallFailedPayload, ToolCallId, ToolCallPromptPart, ToolCallRejectedEvent, ToolCallRejectedPayload, ToolCallRejectionFeedback, ToolCallRejectionReason, ToolCallStartedEvent, ToolCallStartedPayload, ToolFailurePromptPart, ToolName, ToolParamsDeltaEvent, ToolParamsDeltaPayload, ToolParamsEndEvent, ToolParamsEndPayload, ToolParamsStartEvent, ToolParamsStartPayload, ToolPromptPart, ToolRejectionPromptPart, ToolSuccessPromptPart, TraceStatusEvent, TraceStatusKind, TraceStatusPayload, TurnCompletedEvent, TurnCompletedPayload, TurnEvent, TurnFailedEvent, TurnFailedPayload, TurnId, TurnStartedEvent, TurnStartedPayload, TurnStoppedEvent, TurnStoppedPayload, UnixEpochMillis, UsagePayload, UserMessageCancellationReason, UserMessageCancelledEvent, UserMessageCancelledPayload, UserMessageCommittedEvent, UserMessageCommittedPayload, UserMessageContent, UserMessageDisposition, UserMessagePart, UserMessagePromotedEvent, UserMessagePromotedPayload, UserMessageSubmittedEvent, UserMessageSubmittedPayload, assistantMessageCommittedEventType, assistantPartialCommittedEventType, baseStateCreatedEventType, baseStateFailedEventType, baseStateRequestedEventType, buildEDATraceparent, commandAdmittedEventType, commandCancelledEventType, commandCompletedEventType, commandFailedEventType, commandStartedEventType, compactionCompletedEventType, compactionFailedEventType, compactionRequestedEventType, compactionStartedEventType, comparePosition, contextProjectedEventType, contextRebasedEventType, decodeUnknownEDADurableEvent, decodeUnknownEDADurableEventSync, durablePosition, effectDurableAgentNamespace, inferenceCompletedEventType, inferenceFailedEventType, inferenceStartedEventType, makeEDAEventTrace, makeEDARunTrace, makeEDATraceContext, makeEDATraceMetadataFromParent, makeEventType, makeRootEDAEventTrace, makeRootEDATraceMetadata, messageQueuePausedEventType, parseEDATraceparent, pendingMessagesPausedEventType, reasoningDeltaEventType, recoveryCompletedEventType, runCompletedEventType, runFailedEventType, runInterruptedEventType, runStartedEventType, schemaV1, steeringMessageCancelledEventType, steeringMessageQueuedEventType, stopTurnAppliedEventType, stopTurnRequestedEventType, subscriberStatusEventType, summaryCreatedEventType, systemMessageCommittedEventType, textDeltaEventType, toolCallCompletedEventType, toolCallCreatedEventType, toolCallFailedEventType, toolCallRejectedEventType, toolCallStartedEventType, toolParamsDeltaEventType, toolParamsEndEventType, toolParamsStartEventType, traceStatusEventType, turnCompletedEventType, turnFailedEventType, turnStartedEventType, turnStoppedEventType, userMessageCancelledEventType, userMessageCommittedEventType, userMessagePromotedEventType, userMessageSubmittedEventType };
|
|
8
|
+
export { AssistantMessageCommittedEvent, AssistantMessageCommittedPayload, AssistantMessageContent, AssistantMessageImportedEvent, AssistantMessageImportedPayload, AssistantPartialCommittedEvent, AssistantPartialCommittedPayload, AssistantPromptPart, AssistantPromptParts, BaseStateCreatedEvent, BaseStateCreatedPayload, BaseStateEvent, BaseStateFailedEvent, BaseStateFailedPayload, BaseStateId, BaseStateRequestedEvent, BaseStateRequestedPayload, CancelPendingMessageCommand, CommandAdmittedEvent, CommandAdmittedPayload, CommandCancelledEvent, CommandCancelledPayload, CommandCompletedEvent, CommandCompletedPayload, CommandEvent, CommandFailedEvent, CommandFailedPayload, CommandId, CommandIdempotencyKey, CommandStartedEvent, CommandStartedPayload, CompactionCompletedEvent, CompactionCompletedPayload, CompactionFailedEvent, CompactionFailedPayload, CompactionId, CompactionRequestedEvent, CompactionRequestedPayload, CompactionStartedEvent, CompactionStartedPayload, ContextAndCompactionEvent, ContextProjectedEvent, ContextProjectedPayload, ContextRebasedEvent, ContextRebasedPayload, ContextVersion, CorrelationId, DurableEventEnvelope, DurablePosition, DurableSubSequenceNumber, EDACommand, EDADurableEvent, EDADurableEventV1, EDAEphemeralEvent, EDAEventTrace, EDARunTrace, EDARuntime, EDARuntimeConfig, EDASpanId, EDATraceAttributeValue, EDATraceAttributes, EDATraceContext, EDATraceId, EDATraceLink, EDATraceMetadata, EphemeralEventEnvelope, EventDurability, EventEnvelope, EventId, EventNamespace, EventType, FailurePayload, GrantRunCommand, InferenceCompletedEvent, InferenceCompletedPayload, InferenceEvent, InferenceFailedEvent, InferenceFailedPayload, InferenceId, InferenceStartedEvent, InferenceStartedPayload, MessageEvent, MessageId, MessageQueuePausedEvent, MessageQueuePausedPayload, ModelSelectionPayload, ModelStreamEvent, NonNegativeInt, PendingMessageCancellationReason, PendingMessagesPausedEvent, PendingMessagesPausedPayload, Position, PositionOrder, PositionedEvent, PromotePendingMessageCommand, ProviderPartId, ReasoningDeltaEvent, ReasoningDeltaPayload, RecoveryCompletedEvent, RecoveryCompletedPayload, RecoveryContinuation, RecoveryEvent, ResumePendingMessagesCommand, RunCompletedEvent, RunCompletedPayload, RunEvent, RunFailedEvent, RunFailedPayload, RunId, RunInterruptedEvent, RunInterruptedPayload, RunRequestId, RunSchedulingDeliveredEvent, RunSchedulingDeliveredPayload, RunSchedulingEvent, RunSchedulingGrantedEvent, RunSchedulingGrantedPayload, RunSchedulingInvalidatedEvent, RunSchedulingInvalidatedPayload, RunSchedulingRequestedEvent, RunSchedulingRequestedPayload, RunStartedEvent, RunStartedPayload, RuntimeStatusEvent, SchemaVersion, SequenceNumber, SessionConfiguredEvent, SessionId, SteeringMessageCancelledEvent, SteeringMessageCancelledPayload, SteeringMessageQueuedEvent, SteeringMessageQueuedPayload, StopControlEvent, StopTurnAppliedEvent, StopTurnAppliedPayload, StopTurnCommand, StopTurnRequestedEvent, StopTurnRequestedPayload, SubSequenceNumber, SubmitMessageCommand, SubmitMessageDisposition, SubscriberStatusEvent, SubscriberStatusKind, SubscriberStatusPayload, SummaryCreatedEvent, SummaryCreatedPayload, SummaryId, SystemMessageCommittedEvent, SystemMessageCommittedPayload, SystemPromptText, TextDeltaEvent, TextDeltaPayload, ToolCallCompletedEvent, ToolCallCompletedPayload, ToolCallCreatedEvent, ToolCallCreatedPayload, ToolCallEvent, ToolCallFailedEvent, ToolCallFailedPayload, ToolCallId, ToolCallPromptPart, ToolCallRejectedEvent, ToolCallRejectedPayload, ToolCallRejectionFeedback, ToolCallRejectionReason, ToolCallStartedEvent, ToolCallStartedPayload, ToolFailurePromptPart, ToolName, ToolParamsDeltaEvent, ToolParamsDeltaPayload, ToolParamsEndEvent, ToolParamsEndPayload, ToolParamsStartEvent, ToolParamsStartPayload, ToolPromptPart, ToolRejectionPromptPart, ToolSuccessPromptPart, TraceStatusEvent, TraceStatusKind, TraceStatusPayload, TurnCompletedEvent, TurnCompletedPayload, TurnEvent, TurnFailedEvent, TurnFailedPayload, TurnId, TurnStartedEvent, TurnStartedPayload, TurnStoppedEvent, TurnStoppedPayload, UnixEpochMillis, UsagePayload, UserMessageCancellationReason, UserMessageCancelledEvent, UserMessageCancelledPayload, UserMessageCommittedEvent, UserMessageCommittedPayload, UserMessageContent, UserMessageDisposition, UserMessagePart, UserMessagePromotedEvent, UserMessagePromotedPayload, UserMessageSubmittedEvent, UserMessageSubmittedPayload, assistantMessageCommittedEventType, assistantMessageImportedEventType, assistantPartialCommittedEventType, baseStateCreatedEventType, baseStateFailedEventType, baseStateRequestedEventType, buildEDATraceparent, commandAdmittedEventType, commandCancelledEventType, commandCompletedEventType, commandFailedEventType, commandStartedEventType, compactionCompletedEventType, compactionFailedEventType, compactionRequestedEventType, compactionStartedEventType, comparePosition, contextProjectedEventType, contextRebasedEventType, decodeUnknownEDADurableEvent, decodeUnknownEDADurableEventSync, durablePosition, effectDurableAgentNamespace, inferenceCompletedEventType, inferenceFailedEventType, inferenceStartedEventType, makeEDAEventTrace, makeEDARunTrace, makeEDATraceContext, makeEDATraceMetadataFromParent, makeEventType, makeRootEDAEventTrace, makeRootEDATraceMetadata, messageQueuePausedEventType, parseEDATraceparent, pendingMessagesPausedEventType, reasoningDeltaEventType, recoveryCompletedEventType, runCompletedEventType, runFailedEventType, runInterruptedEventType, runSchedulingDeliveredEventType, runSchedulingGrantedEventType, runSchedulingInvalidatedEventType, runSchedulingRequestedEventType, runStartedEventType, schemaV1, sessionConfiguredEventType, steeringMessageCancelledEventType, steeringMessageQueuedEventType, stopTurnAppliedEventType, stopTurnRequestedEventType, subscriberStatusEventType, summaryCreatedEventType, systemMessageCommittedEventType, textDeltaEventType, toolCallCompletedEventType, toolCallCreatedEventType, toolCallFailedEventType, toolCallRejectedEventType, toolCallStartedEventType, toolParamsDeltaEventType, toolParamsEndEventType, toolParamsStartEventType, traceStatusEventType, turnCompletedEventType, turnFailedEventType, turnStartedEventType, turnStoppedEventType, userMessageCancelledEventType, userMessageCommittedEventType, userMessagePromotedEventType, userMessageSubmittedEventType };
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import * as Context from "effect/Context";
|
|
2
|
+
import * as Effect from "effect/Effect";
|
|
3
|
+
import * as Layer from "effect/Layer";
|
|
4
|
+
|
|
5
|
+
//#region src/services/keep-alive.d.ts
|
|
6
|
+
/** Host lifecycle lease held while finite EDA work is actively running. */
|
|
7
|
+
interface EDAKeepAliveLease {
|
|
8
|
+
readonly release: () => Promise<void>;
|
|
9
|
+
}
|
|
10
|
+
/** Host-provided wrapper for keeping finite active work alive. */
|
|
11
|
+
interface EDAKeepAliveShape {
|
|
12
|
+
/**
|
|
13
|
+
* A host may suspend an idle session after ingress returns while model turns,
|
|
14
|
+
* recovery drains, and durable sink catch-up still run in Effect fibers. Wrap
|
|
15
|
+
* those finite active-work regions so the host can retain or schedule the
|
|
16
|
+
* session until work completes, parks durably, fails, or is interrupted.
|
|
17
|
+
* Long-lived fibers blocked on queues should not hold a lease.
|
|
18
|
+
*/
|
|
19
|
+
readonly withActiveWork: <A, E, R>(label: string, effect: Effect.Effect<A, E, R>) => Effect.Effect<A, E, R>;
|
|
20
|
+
}
|
|
21
|
+
declare const EDAKeepAlive_base: Context.ServiceClass<EDAKeepAlive, "@effect-durable-agent/EDAKeepAlive", EDAKeepAliveShape>;
|
|
22
|
+
/** Host keep-alive service for finite active EDA work roots. */
|
|
23
|
+
declare class EDAKeepAlive extends EDAKeepAlive_base {
|
|
24
|
+
static readonly Noop: Layer.Layer<EDAKeepAlive, never, never>;
|
|
25
|
+
static readonly FromAcquire: (acquire: (label: string) => Promise<EDAKeepAliveLease>) => Layer.Layer<EDAKeepAlive>;
|
|
26
|
+
}
|
|
27
|
+
//#endregion
|
|
28
|
+
export { EDAKeepAliveLease as n, EDAKeepAliveShape as r, EDAKeepAlive as t };
|
|
29
|
+
//# sourceMappingURL=keep-alive-Chl5SJxy.d.ts.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { S as ReducedState, v as MessageRecord } from "./command-queues-CQi4Xc7u.js";
|
|
2
|
+
import { d as UserMessageContent } from "./commands-p8venTWs.js";
|
|
3
|
+
import { i as ContextProjection } from "./context-projection-mCuvcO2W.js";
|
|
4
4
|
import * as Prompt from "effect/unstable/ai/Prompt";
|
|
5
5
|
|
|
6
6
|
//#region src/domain/message-transcript.d.ts
|
|
@@ -29,4 +29,4 @@ declare const contextProjectionPromptWithUserContent: (state: PromptProjectionSt
|
|
|
29
29
|
declare const contextProjectionPromptWithUserContents: (state: PromptProjectionState, context: ContextProjection | undefined, contents: ReadonlyArray<UserMessageContent>) => Prompt.Prompt;
|
|
30
30
|
//#endregion
|
|
31
31
|
export { durableMessageTranscript as a, contextProjectionPromptWithUserContents as i, contextProjectionPrompt as n, durableTranscriptPrompt as o, contextProjectionPromptWithUserContent as r, durableTranscriptPromptWithUserContent as s, DurableTranscriptMessage as t };
|
|
32
|
-
//# sourceMappingURL=message-transcript-
|
|
32
|
+
//# sourceMappingURL=message-transcript-6PEzaEGn.d.ts.map
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { l as ModelSelectionPayload } from "./envelope-DkZyMIgp.js";
|
|
2
|
+
import * as Context from "effect/Context";
|
|
3
|
+
import * as Effect from "effect/Effect";
|
|
4
|
+
import * as Layer from "effect/Layer";
|
|
5
|
+
import * as LanguageModel from "effect/unstable/ai/LanguageModel";
|
|
6
|
+
|
|
7
|
+
//#region src/services/model-resolver.d.ts
|
|
8
|
+
declare const ModelResolver_base: Context.ServiceClass<ModelResolver, "@effect-durable-agent/ModelResolver", {
|
|
9
|
+
readonly resolve: (selection: ModelSelectionPayload | undefined) => Effect.Effect<LanguageModel.Service>;
|
|
10
|
+
}>;
|
|
11
|
+
/** Resolves a recorded selection into an executable provider service at a model-call boundary. */
|
|
12
|
+
declare class ModelResolver extends ModelResolver_base {
|
|
13
|
+
/** Fixed provider implementation for deterministic tests and single-model hosts. */
|
|
14
|
+
static readonly Fixed: Layer.Layer<ModelResolver, never, LanguageModel.LanguageModel>;
|
|
15
|
+
}
|
|
16
|
+
//#endregion
|
|
17
|
+
export { ModelResolver as t };
|
|
18
|
+
//# sourceMappingURL=model-resolver-BPPJAsuh.d.ts.map
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { _ as UsagePayload } from "./envelope-DkZyMIgp.js";
|
|
2
|
+
import * as Schema from "effect/Schema";
|
|
3
|
+
|
|
4
|
+
//#region src/domain/model-usage.d.ts
|
|
5
|
+
/** Additive provider usage categories; reasoning and text are breakdowns of output. */
|
|
6
|
+
declare const TokenUsageTotals: Schema.Struct<{
|
|
7
|
+
readonly inputTokens: Schema.Int;
|
|
8
|
+
readonly cachedInputTokens: Schema.Int;
|
|
9
|
+
readonly cacheWriteInputTokens: Schema.Int;
|
|
10
|
+
readonly outputTokens: Schema.Int;
|
|
11
|
+
readonly textTokens: Schema.Int;
|
|
12
|
+
readonly reasoningTokens: Schema.Int;
|
|
13
|
+
}>;
|
|
14
|
+
type TokenUsageTotals = typeof TokenUsageTotals.Type;
|
|
15
|
+
/** Model attribution survives compaction. Plain records are required by Cloudflare RPC structured cloning. */
|
|
16
|
+
declare const ModelTokenUsage: Schema.Struct<{
|
|
17
|
+
readonly provider: Schema.NonEmptyString;
|
|
18
|
+
readonly modelId: Schema.NonEmptyString;
|
|
19
|
+
readonly usage: Schema.Struct<{
|
|
20
|
+
readonly inputTokens: Schema.Int;
|
|
21
|
+
readonly cachedInputTokens: Schema.Int;
|
|
22
|
+
readonly cacheWriteInputTokens: Schema.Int;
|
|
23
|
+
readonly outputTokens: Schema.Int;
|
|
24
|
+
readonly textTokens: Schema.Int;
|
|
25
|
+
readonly reasoningTokens: Schema.Int;
|
|
26
|
+
}>;
|
|
27
|
+
}>;
|
|
28
|
+
type ModelTokenUsage = typeof ModelTokenUsage.Type;
|
|
29
|
+
/** One bounded bucket per distinct model used by a session. Dollars belong to the host. */
|
|
30
|
+
declare const TokenConsumptionState: Schema.Struct<{
|
|
31
|
+
readonly byModel: Schema.$Array<Schema.Struct<{
|
|
32
|
+
readonly provider: Schema.NonEmptyString;
|
|
33
|
+
readonly modelId: Schema.NonEmptyString;
|
|
34
|
+
readonly usage: Schema.Struct<{
|
|
35
|
+
readonly inputTokens: Schema.Int;
|
|
36
|
+
readonly cachedInputTokens: Schema.Int;
|
|
37
|
+
readonly cacheWriteInputTokens: Schema.Int;
|
|
38
|
+
readonly outputTokens: Schema.Int;
|
|
39
|
+
readonly textTokens: Schema.Int;
|
|
40
|
+
readonly reasoningTokens: Schema.Int;
|
|
41
|
+
}>;
|
|
42
|
+
}>>;
|
|
43
|
+
}>;
|
|
44
|
+
type TokenConsumptionState = typeof TokenConsumptionState.Type;
|
|
45
|
+
declare const emptyTokenUsage: TokenUsageTotals;
|
|
46
|
+
/** Fold an observed call into its model bucket; omitted provider counters add no known usage. */
|
|
47
|
+
declare const addModelUsage: (state: TokenConsumptionState, model: {
|
|
48
|
+
readonly provider: string;
|
|
49
|
+
readonly modelId: string;
|
|
50
|
+
}, usage: UsagePayload | undefined) => TokenConsumptionState;
|
|
51
|
+
/** Totals are a derived display value, never an input to multi-model pricing. */
|
|
52
|
+
declare const totalTokenUsage: (state: TokenConsumptionState) => TokenUsageTotals;
|
|
53
|
+
//#endregion
|
|
54
|
+
export { emptyTokenUsage as a, addModelUsage as i, TokenConsumptionState as n, totalTokenUsage as o, TokenUsageTotals as r, ModelTokenUsage as t };
|
|
55
|
+
//# sourceMappingURL=model-usage-CdBEkTwU.d.ts.map
|
|
@@ -1,34 +1,33 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import { i as EDAReducerStateSnapshot } from "./reducer-registry-C0svUa63.js";
|
|
1
|
+
import { g as SessionId } from "./core-C-6xHzRx.js";
|
|
2
|
+
import { S as ReducedState } from "./command-queues-CQi4Xc7u.js";
|
|
3
|
+
import { i as ContextProjection } from "./context-projection-mCuvcO2W.js";
|
|
4
|
+
import { a as EDAReducerStateSnapshot } from "./reducer-registry-CCSzc4h8.js";
|
|
6
5
|
import * as Context from "effect/Context";
|
|
7
6
|
import * as Effect from "effect/Effect";
|
|
8
7
|
import * as Layer from "effect/Layer";
|
|
9
8
|
import * as Prompt from "effect/unstable/ai/Prompt";
|
|
10
9
|
|
|
11
10
|
//#region src/services/prompt-projector.d.ts
|
|
12
|
-
/** User content selected for a turn before its consuming TurnStarted event commits. */
|
|
13
|
-
interface SelectedPromptUserMessage {
|
|
14
|
-
readonly commandId: CommandId;
|
|
15
|
-
readonly content: UserMessageContent;
|
|
16
|
-
readonly messageId: MessageId;
|
|
17
|
-
}
|
|
18
11
|
/** Input for app-extensible state-to-LLM prompt projection. */
|
|
19
12
|
interface EDAPromptProjectionInput {
|
|
20
13
|
readonly sessionId: SessionId;
|
|
21
14
|
readonly state: ReducedState;
|
|
22
15
|
readonly reducerStates: EDAReducerStateSnapshot;
|
|
23
16
|
readonly context?: ContextProjection;
|
|
24
|
-
|
|
17
|
+
}
|
|
18
|
+
/** App-derived instructions and data inserted around the durable transcript. */
|
|
19
|
+
interface EDAProjectedPromptContext {
|
|
20
|
+
/** Instruction messages placed after durable system context and before transcript history. */
|
|
21
|
+
readonly instructions: ReadonlyArray<Prompt.SystemMessage>;
|
|
22
|
+
/** Data messages placed after transcript history and before scheduler-selected user messages. */
|
|
23
|
+
readonly messages: ReadonlyArray<Prompt.UserMessage>;
|
|
25
24
|
}
|
|
26
25
|
/** Host-extensible projection from durable state into provider prompt context. */
|
|
27
26
|
interface EDAPromptProjectorShape {
|
|
27
|
+
readonly projectContext: (input: EDAPromptProjectionInput) => Effect.Effect<EDAProjectedPromptContext>;
|
|
28
28
|
readonly projectState: (input: EDAPromptProjectionInput) => Effect.Effect<ReducedState>;
|
|
29
|
-
readonly projectUserMessageContent: (input: EDAPromptProjectionInput, message: SelectedPromptUserMessage) => Effect.Effect<UserMessageContent>;
|
|
30
29
|
}
|
|
31
|
-
/** Build a provider prompt
|
|
30
|
+
/** Build a provider prompt entirely from the current durable state projection. */
|
|
32
31
|
declare const buildEDAPrompt: (projector: EDAPromptProjectorShape, input: EDAPromptProjectionInput) => Effect.Effect<Prompt.Prompt>;
|
|
33
32
|
declare const EDAPromptProjector_base: Context.ServiceClass<EDAPromptProjector, "@effect-durable-agent/EDAPromptProjector", EDAPromptProjectorShape>;
|
|
34
33
|
/** Service that lets apps derive LLM context independently from UI projections. */
|
|
@@ -36,5 +35,5 @@ declare class EDAPromptProjector extends EDAPromptProjector_base {
|
|
|
36
35
|
static readonly Default: Layer.Layer<EDAPromptProjector, never, never>;
|
|
37
36
|
}
|
|
38
37
|
//#endregion
|
|
39
|
-
export { buildEDAPrompt as a,
|
|
40
|
-
//# sourceMappingURL=prompt-projector-
|
|
38
|
+
export { buildEDAPrompt as a, EDAPromptProjectorShape as i, EDAPromptProjectionInput as n, EDAPromptProjector as r, EDAProjectedPromptContext as t };
|
|
39
|
+
//# sourceMappingURL=prompt-projector-CNhqUsEr.d.ts.map
|