effect-durable-agent 0.1.0-alpha.6 → 0.1.0-alpha.8
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/dist/{command-queues-C8muEqeQ.d.ts → command-queues-DdDB_aYM.d.ts} +11 -18
- package/dist/{compaction-F4HEWzuI.d.ts → compaction-BEor3jKv.d.ts} +27 -8
- package/dist/compaction-BgDr5VJy.js +473 -0
- package/dist/compaction-BgDr5VJy.js.map +1 -0
- package/dist/{context-projection-C43pyxn2.d.ts → context-projection-n6Rdup0N.d.ts} +2 -2
- package/dist/domain/command-queues.d.ts +1 -1
- package/dist/domain/context-projection.d.ts +1 -1
- 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 +11 -17
- package/dist/domain/reduced-state-schema.js +6 -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/{durable-DsV9PxZC.js → durable-BGFvX7Mh.js} +17 -80
- package/dist/durable-BGFvX7Mh.js.map +1 -0
- package/dist/{durable-B7M6TD_0.d.ts → durable-br2C1bWK.d.ts} +247 -4
- 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/{event-factory-tcpLgdMN.js → event-factory-DTFdy0Cb.js} +3 -2
- package/dist/{event-factory-tcpLgdMN.js.map → event-factory-DTFdy0Cb.js.map} +1 -1
- package/dist/{event-factory-CLJcyymV.d.ts → event-factory-pFzsPlDs.d.ts} +4 -4
- package/dist/{events-Bb9-Cu-7.d.ts → events-LZFNoESe.d.ts} +2 -188
- package/dist/index.d.ts +5 -4
- package/dist/index.js +4 -3
- package/dist/{message-transcript-DsKTT47f.d.ts → message-transcript-DQNlzxle.d.ts} +3 -3
- package/dist/model-resolver-BPPJAsuh.d.ts +18 -0
- package/dist/model-usage-CdBEkTwU.d.ts +55 -0
- package/dist/{prompt-projector-hqPh5-NI.d.ts → prompt-projector-f4ElyXCE.d.ts} +4 -4
- package/dist/{reduced-state-TMi7ISla.js → reduced-state-DF0-6mbR.js} +25 -30
- package/dist/reduced-state-DF0-6mbR.js.map +1 -0
- package/dist/{reducer-registry--vQFATXb.d.ts → reducer-registry-aFjz_ZLT.d.ts} +2 -2
- package/dist/{runtime-BO9KJq_Y.d.ts → runtime-DbTCb32-.d.ts} +5 -5
- package/dist/services/compaction.d.ts +1 -1
- package/dist/services/compaction.js +1 -426
- 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 +1 -1
- package/dist/services/reducer-registry.d.ts +1 -1
- package/dist/services/runtime-layer.d.ts +14 -14
- package/dist/services/runtime-layer.js +8 -7
- package/dist/services/runtime-layer.js.map +1 -1
- package/dist/services/runtime.d.ts +1 -1
- package/dist/services/runtime.js +3 -2
- package/dist/services/runtime.js.map +1 -1
- package/dist/services/session-event-observer.d.ts +1 -1
- package/dist/services/session-query.d.ts +1 -1
- package/dist/services/session-query.js +3 -3
- package/dist/services/session-state.d.ts +1 -1
- package/dist/services/session-state.js +1 -1
- package/dist/services/session-store.d.ts +1 -1
- package/dist/services/session-store.js +2 -1
- package/dist/services/session-store.js.map +1 -1
- package/dist/services/sink-checkpoint-store.d.ts +1 -1
- package/dist/services/sink-registry.d.ts +1 -1
- package/dist/services/sink-registry.js +1 -1
- package/dist/services/tool-registry.d.ts +1 -1
- package/dist/services/tracing.d.ts +1 -1
- package/dist/{session-event-observer-D_aoFnQs.d.ts → session-event-observer-DaFMKKNc.d.ts} +2 -2
- package/dist/{session-query-_Z3Kw6jj.d.ts → session-query-l8xpJYp8.d.ts} +8 -8
- package/dist/{session-state-BfoXKafd.d.ts → session-state-YHFzOGDf.d.ts} +16 -16
- package/dist/{session-state-C4m0j6CJ.js → session-state-aIqe9CLa.js} +30 -39
- package/dist/session-state-aIqe9CLa.js.map +1 -0
- package/dist/{session-store-ofm8FFxs.d.ts → session-store-Cpi_NwTR.d.ts} +3 -3
- package/dist/{sink-checkpoint-store-BQVbI9DQ.d.ts → sink-checkpoint-store-M7qIxoSH.d.ts} +2 -2
- package/dist/{sink-registry-DH6uiEgP.js → sink-registry-NDgeyzO0.js} +4 -4
- package/dist/{sink-registry-DH6uiEgP.js.map → sink-registry-NDgeyzO0.js.map} +1 -1
- package/dist/{sink-registry-PRYbj6dp.d.ts → sink-registry-T1wOUuzq.d.ts} +9 -9
- package/dist/testkit/layers.d.ts +17 -14
- package/dist/testkit/layers.js +10 -8
- package/dist/testkit/layers.js.map +1 -1
- package/dist/{tool-registry-ClHdr_G5.d.ts → tool-registry-BJaVNtw4.d.ts} +3 -3
- 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 +83 -4
- package/dist/websocket.js +82 -12
- package/dist/websocket.js.map +1 -1
- package/package.json +10 -1
- package/dist/durable-DsV9PxZC.js.map +0 -1
- package/dist/reduced-state-TMi7ISla.js.map +0 -1
- package/dist/services/compaction.js.map +0 -1
- package/dist/session-state-C4m0j6CJ.js.map +0 -1
|
@@ -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
|
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
|
+
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";
|
|
1
2
|
import { _ as SummaryId, a as CorrelationId, b as comparePosition, c as EventId, d as Position, f as PositionOrder, g as SubSequenceNumber, h as SessionId, i as ContextVersion, l as InferenceId, m as SequenceNumber, n as CommandId, o as DurablePosition, p as RunId, r as CompactionId, s as DurableSubSequenceNumber, t as BaseStateId, u as MessageId, v as ToolCallId, x as durablePosition, y as TurnId } from "./core-CYT6DBaS.js";
|
|
2
3
|
import { a as PromotePendingMessageCommand, c as SubmitMessageCommand, d as UserMessagePart, i as PendingMessageCancellationReason, l as SubmitMessageDisposition, n as CommandIdempotencyKey, o as ResumePendingMessagesCommand, r as EDACommand, s as StopTurnCommand, t as CancelPendingMessageCommand, u as UserMessageContent } from "./commands-Ce1ec6kH.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, 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, 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, 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, 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 turnFailedEventType, $t as TurnStoppedEvent, A as CompactionFailedEvent, An as inferenceCompletedEventType, At as ToolCallCreatedEvent, B as ContextRebasedPayload, Bn as sessionConfiguredEventType, Bt as ToolCallStartedEvent, C as CommandEvent, Cn as compactionFailedEventType, Ct as StopTurnRequestedPayload, D as CommandStartedPayload, Dn as contextRebasedEventType, Dt as SystemMessageCommittedPayload, E as CommandStartedEvent, En as contextProjectedEventType, Et as SystemMessageCommittedEvent, F as CompactionStartedPayload, Fn as recoveryCompletedEventType, Ft as ToolCallPromptPart, G as InferenceEvent, Gn as summaryCreatedEventType, Gt as ToolSuccessPromptPart, H as EDADurableEventV1, Hn as steeringMessageQueuedEventType, Ht as ToolFailurePromptPart, I as ContextAndCompactionEvent, In as runCompletedEventType, It as ToolCallRejectedEvent, J as InferenceStartedEvent, Jn as toolCallCreatedEventType, Jt as TurnEvent, K as InferenceFailedEvent, Kn as systemMessageCommittedEventType, Kt as TurnCompletedEvent, L as ContextProjectedEvent, Ln as runFailedEventType, Lt as ToolCallRejectedPayload, M as CompactionRequestedEvent, Mn as inferenceStartedEventType, Mt as ToolCallEvent, N as CompactionRequestedPayload, Nn as messageQueuePausedEventType, Nt as ToolCallFailedEvent, O as CompactionCompletedEvent, On as decodeUnknownEDADurableEvent, Ot as ToolCallCompletedEvent, P as CompactionStartedEvent, Pn as pendingMessagesPausedEventType, Pt as ToolCallFailedPayload, Q as MessageQueuePausedPayload, Qn as turnCompletedEventType, Qt as TurnStartedPayload, R as ContextProjectedPayload, Rn as runInterruptedEventType, Rt as ToolCallRejectionFeedback, S as CommandCompletedPayload, Sn as compactionCompletedEventType, St as StopTurnRequestedEvent, T as CommandFailedPayload, Tn as compactionStartedEventType, Tt as SummaryCreatedPayload, U as InferenceCompletedEvent, Un as stopTurnAppliedEventType, Ut as ToolPromptPart, V as EDADurableEvent, Vn as steeringMessageCancelledEventType, Vt as ToolCallStartedPayload, W as InferenceCompletedPayload, Wn as stopTurnRequestedEventType, Wt as ToolRejectionPromptPart, X as MessageEvent, Xn as toolCallRejectedEventType, Xt as TurnFailedPayload, Y as InferenceStartedPayload, Yn as toolCallFailedEventType, Yt as TurnFailedEvent, Z as MessageQueuePausedEvent, Zn as toolCallStartedEventType, Zt as TurnStartedEvent, _ as CommandAdmittedEvent, _n as commandAdmittedEventType, _t as SteeringMessageQueuedEvent, a as AssistantMessageImportedPayload, an as UserMessageCommittedPayload, ar as userMessageSubmittedEventType, at as RunCompletedEvent, b as CommandCancelledPayload, bn as commandFailedEventType, bt as StopTurnAppliedEvent, c as AssistantPromptPart, cn as UserMessagePromotedPayload, ct as RunFailedEvent, d as BaseStateCreatedPayload, dn as assistantMessageCommittedEventType, dt as RunInterruptedPayload, en as TurnStoppedPayload, er as turnStartedEventType, et as PendingMessagesPausedPayload, f as BaseStateEvent, fn as assistantMessageImportedEventType, ft as RunStartedEvent, g as BaseStateRequestedPayload, gn as baseStateRequestedEventType, gt as SteeringMessageCancelledPayload, h as BaseStateRequestedEvent, hn as baseStateFailedEventType, ht as SteeringMessageCancelledEvent, i as AssistantMessageImportedEvent, in as UserMessageCommittedEvent, ir as userMessagePromotedEventType, it as RecoveryEvent, j as CompactionFailedPayload, jn as inferenceFailedEventType, jt as ToolCallCreatedPayload, k as CompactionCompletedPayload, kn as decodeUnknownEDADurableEventSync, kt as ToolCallCompletedPayload, l as AssistantPromptParts, ln as UserMessageSubmittedEvent, lt as RunFailedPayload, m as BaseStateFailedPayload, mn as baseStateCreatedEventType, mt as SessionConfiguredEvent, n as AssistantMessageCommittedPayload, nn as UserMessageCancelledEvent, nr as userMessageCancelledEventType, nt as RecoveryCompletedPayload, o as AssistantPartialCommittedEvent, on as UserMessageDisposition, ot as RunCompletedPayload, p as BaseStateFailedEvent, pn as assistantPartialCommittedEventType, pt as RunStartedPayload, q as InferenceFailedPayload, qn as toolCallCompletedEventType, qt as TurnCompletedPayload, r as AssistantMessageContent, rn as UserMessageCancelledPayload, rr as userMessageCommittedEventType, rt as RecoveryContinuation, s as AssistantPartialCommittedPayload, sn as UserMessagePromotedEvent, st as RunEvent, t as AssistantMessageCommittedEvent, tn as UserMessageCancellationReason, tr as turnStoppedEventType, tt as RecoveryCompletedEvent, u as BaseStateCreatedEvent, un as UserMessageSubmittedPayload, ut as RunInterruptedEvent, v as CommandAdmittedPayload, vn as commandCancelledEventType, vt as SteeringMessageQueuedPayload, w as CommandFailedEvent, wn as compactionRequestedEventType, wt as SummaryCreatedEvent, x as CommandCompletedEvent, xn as commandStartedEventType, xt as StopTurnAppliedPayload, y as CommandCancelledEvent, yn as commandCompletedEventType, yt as StopControlEvent, z as ContextRebasedEvent, zn as runStartedEventType, zt as ToolCallRejectionReason } from "./durable-br2C1bWK.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-DbTCb32-.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, 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, 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, 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
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";
|
|
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, PendingMessageCancellationReason, PromotePendingMessageCommand, ResumePendingMessagesCommand, StopTurnCommand, SubmitMessageCommand, SubmitMessageDisposition, UserMessageContent, UserMessagePart } from "./types/commands.js";
|
|
5
|
+
import { $ as PendingMessagesPausedEvent, $n as turnFailedEventType, $t as TurnStoppedEvent, A as CompactionFailedEvent, An as inferenceCompletedEventType, At as ToolCallCreatedEvent, B as ContextRebasedPayload, Bn as sessionConfiguredEventType, Bt as ToolCallStartedEvent, C as CommandEvent, Cn as compactionFailedEventType, Ct as StopTurnRequestedPayload, D as CommandStartedPayload, Dn as contextRebasedEventType, Dt as SystemMessageCommittedPayload, E as CommandStartedEvent, En as contextProjectedEventType, Et as SystemMessageCommittedEvent, F as CompactionStartedPayload, Fn as recoveryCompletedEventType, Ft as ToolCallPromptPart, G as InferenceEvent, Gn as summaryCreatedEventType, Gt as ToolSuccessPromptPart, H as EDADurableEventV1, Hn as steeringMessageQueuedEventType, Ht as ToolFailurePromptPart, I as ContextAndCompactionEvent, In as runCompletedEventType, It as ToolCallRejectedEvent, J as InferenceStartedEvent, Jn as toolCallCreatedEventType, Jt as TurnEvent, K as InferenceFailedEvent, Kn as systemMessageCommittedEventType, Kt as TurnCompletedEvent, L as ContextProjectedEvent, Ln as runFailedEventType, Lt as ToolCallRejectedPayload, M as CompactionRequestedEvent, Mn as inferenceStartedEventType, Mt as ToolCallEvent, N as CompactionRequestedPayload, Nn as messageQueuePausedEventType, Nt as ToolCallFailedEvent, O as CompactionCompletedEvent, On as decodeUnknownEDADurableEvent, Ot as ToolCallCompletedEvent, P as CompactionStartedEvent, Pn as pendingMessagesPausedEventType, Pt as ToolCallFailedPayload, Q as MessageQueuePausedPayload, Qn as turnCompletedEventType, Qt as TurnStartedPayload, R as ContextProjectedPayload, Rn as runInterruptedEventType, Rt as ToolCallRejectionFeedback, S as CommandCompletedPayload, Sn as compactionCompletedEventType, St as StopTurnRequestedEvent, T as CommandFailedPayload, Tn as compactionStartedEventType, Tt as SummaryCreatedPayload, U as InferenceCompletedEvent, Un as stopTurnAppliedEventType, Ut as ToolPromptPart, V as EDADurableEvent, Vn as steeringMessageCancelledEventType, Vt as ToolCallStartedPayload, W as InferenceCompletedPayload, Wn as stopTurnRequestedEventType, Wt as ToolRejectionPromptPart, X as MessageEvent, Xn as toolCallRejectedEventType, Xt as TurnFailedPayload, Y as InferenceStartedPayload, Yn as toolCallFailedEventType, Yt as TurnFailedEvent, Z as MessageQueuePausedEvent, Zn as toolCallStartedEventType, Zt as TurnStartedEvent, _ as CommandAdmittedEvent, _n as commandAdmittedEventType, _t as SteeringMessageQueuedEvent, a as AssistantMessageImportedPayload, an as UserMessageCommittedPayload, ar as userMessageSubmittedEventType, at as RunCompletedEvent, b as CommandCancelledPayload, bn as commandFailedEventType, bt as StopTurnAppliedEvent, c as AssistantPromptPart, cn as UserMessagePromotedPayload, ct as RunFailedEvent, d as BaseStateCreatedPayload, dn as assistantMessageCommittedEventType, dt as RunInterruptedPayload, en as TurnStoppedPayload, er as turnStartedEventType, et as PendingMessagesPausedPayload, f as BaseStateEvent, fn as assistantMessageImportedEventType, ft as RunStartedEvent, g as BaseStateRequestedPayload, gn as baseStateRequestedEventType, gt as SteeringMessageCancelledPayload, h as BaseStateRequestedEvent, hn as baseStateFailedEventType, ht as SteeringMessageCancelledEvent, i as AssistantMessageImportedEvent, in as UserMessageCommittedEvent, ir as userMessagePromotedEventType, it as RecoveryEvent, j as CompactionFailedPayload, jn as inferenceFailedEventType, jt as ToolCallCreatedPayload, k as CompactionCompletedPayload, kn as decodeUnknownEDADurableEventSync, kt as ToolCallCompletedPayload, l as AssistantPromptParts, ln as UserMessageSubmittedEvent, lt as RunFailedPayload, m as BaseStateFailedPayload, mn as baseStateCreatedEventType, mt as SessionConfiguredEvent, n as AssistantMessageCommittedPayload, nn as UserMessageCancelledEvent, nr as userMessageCancelledEventType, nt as RecoveryCompletedPayload, o as AssistantPartialCommittedEvent, on as UserMessageDisposition, ot as RunCompletedPayload, p as BaseStateFailedEvent, pn as assistantPartialCommittedEventType, pt as RunStartedPayload, q as InferenceFailedPayload, qn as toolCallCompletedEventType, qt as TurnCompletedPayload, r as AssistantMessageContent, rn as UserMessageCancelledPayload, rr as userMessageCommittedEventType, rt as RecoveryContinuation, s as AssistantPartialCommittedPayload, sn as UserMessagePromotedEvent, st as RunEvent, t as AssistantMessageCommittedEvent, tn as UserMessageCancellationReason, tr as turnStoppedEventType, tt as RecoveryCompletedEvent, u as BaseStateCreatedEvent, un as UserMessageSubmittedPayload, ut as RunInterruptedEvent, v as CommandAdmittedPayload, vn as commandCancelledEventType, vt as SteeringMessageQueuedPayload, w as CommandFailedEvent, wn as compactionRequestedEventType, wt as SummaryCreatedEvent, x as CommandCompletedEvent, xn as commandStartedEventType, xt as StopTurnAppliedPayload, y as CommandCancelledEvent, yn as commandCompletedEventType, yt as StopControlEvent, z as ContextRebasedEvent, zn as runStartedEventType, zt as ToolCallRejectionReason } from "./durable-BGFvX7Mh.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, 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, 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, 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, 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, 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, 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, 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 };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { u as UserMessageContent } from "./commands-Ce1ec6kH.js";
|
|
2
|
-
import { i as ContextProjection } from "./context-projection-
|
|
3
|
-
import { S as ReducedState, v as MessageRecord } from "./command-queues-
|
|
2
|
+
import { i as ContextProjection } from "./context-projection-n6Rdup0N.js";
|
|
3
|
+
import { S as ReducedState, v as MessageRecord } from "./command-queues-DdDB_aYM.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-DQNlzxle.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,7 +1,7 @@
|
|
|
1
1
|
import { h as SessionId } from "./core-CYT6DBaS.js";
|
|
2
|
-
import { i as ContextProjection } from "./context-projection-
|
|
3
|
-
import { S as ReducedState } from "./command-queues-
|
|
4
|
-
import { a as EDAReducerStateSnapshot } from "./reducer-registry
|
|
2
|
+
import { i as ContextProjection } from "./context-projection-n6Rdup0N.js";
|
|
3
|
+
import { S as ReducedState } from "./command-queues-DdDB_aYM.js";
|
|
4
|
+
import { a as EDAReducerStateSnapshot } from "./reducer-registry-aFjz_ZLT.js";
|
|
5
5
|
import * as Context from "effect/Context";
|
|
6
6
|
import * as Effect from "effect/Effect";
|
|
7
7
|
import * as Layer from "effect/Layer";
|
|
@@ -36,4 +36,4 @@ declare class EDAPromptProjector extends EDAPromptProjector_base {
|
|
|
36
36
|
}
|
|
37
37
|
//#endregion
|
|
38
38
|
export { buildEDAPrompt as a, EDAPromptProjectorShape as i, EDAPromptProjectionInput as n, EDAPromptProjector as r, EDAProjectedPromptContext as t };
|
|
39
|
-
//# sourceMappingURL=prompt-projector-
|
|
39
|
+
//# sourceMappingURL=prompt-projector-f4ElyXCE.d.ts.map
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { ContextVersion, SequenceNumber } from "./types/core.js";
|
|
2
|
-
import {
|
|
2
|
+
import { _ as effectDurableAgentNamespace } from "./envelope-DxQzo5rN.js";
|
|
3
|
+
import { addModelUsage } from "./domain/model-usage.js";
|
|
4
|
+
import { $n as turnFailedEventType, An as inferenceCompletedEventType, Bn as sessionConfiguredEventType, Cn as compactionFailedEventType, Dn as contextRebasedEventType, En as contextProjectedEventType, Fn as recoveryCompletedEventType, Gn as summaryCreatedEventType, Hn as steeringMessageQueuedEventType, In as runCompletedEventType, Jn as toolCallCreatedEventType, Kn as systemMessageCommittedEventType, Ln as runFailedEventType, Mn as inferenceStartedEventType, Nn as messageQueuePausedEventType, Pn as pendingMessagesPausedEventType, Qn as turnCompletedEventType, Rn as runInterruptedEventType, Sn as compactionCompletedEventType, Tn as compactionStartedEventType, Un as stopTurnAppliedEventType, Vn as steeringMessageCancelledEventType, Wn as stopTurnRequestedEventType, Xn as toolCallRejectedEventType, Yn as toolCallFailedEventType, Zn as toolCallStartedEventType, _n as commandAdmittedEventType, ar as userMessageSubmittedEventType, bn as commandFailedEventType, dn as assistantMessageCommittedEventType, er as turnStartedEventType, fn as assistantMessageImportedEventType, gn as baseStateRequestedEventType, hn as baseStateFailedEventType, ir as userMessagePromotedEventType, jn as inferenceFailedEventType, mn as baseStateCreatedEventType, nr as userMessageCancelledEventType, pn as assistantPartialCommittedEventType, qn as toolCallCompletedEventType, rr as userMessageCommittedEventType, tr as turnStoppedEventType, vn as commandCancelledEventType, wn as compactionRequestedEventType, xn as commandStartedEventType, yn as commandCompletedEventType, zn as runStartedEventType } from "./durable-BGFvX7Mh.js";
|
|
3
5
|
import { deriveCommandQueues, emptyCommandQueues } from "./domain/command-queues.js";
|
|
4
6
|
//#region src/domain/assert-never.ts
|
|
5
7
|
const formatNeverValue = (value) => {
|
|
@@ -15,6 +17,9 @@ const assertNeverError = (value, context) => /* @__PURE__ */ new Error(`Unhandle
|
|
|
15
17
|
const assertNever = (value, context) => {
|
|
16
18
|
throw assertNeverError(value, context);
|
|
17
19
|
};
|
|
20
|
+
//#endregion
|
|
21
|
+
//#region src/domain/reduced-state.ts
|
|
22
|
+
const emptyTokenConsumptionState = { byModel: [] };
|
|
18
23
|
/** Empty durable replay state before any session event has committed. */
|
|
19
24
|
const initialReducedState = {
|
|
20
25
|
lastSeq: SequenceNumber.make(0),
|
|
@@ -28,22 +33,17 @@ const initialReducedState = {
|
|
|
28
33
|
stopRequests: /* @__PURE__ */ new Map(),
|
|
29
34
|
compactions: /* @__PURE__ */ new Map(),
|
|
30
35
|
context: { version: ContextVersion.make(0) },
|
|
31
|
-
tokenConsumption:
|
|
32
|
-
inputTokens: 0,
|
|
33
|
-
cachedInputTokens: 0,
|
|
34
|
-
outputTokens: 0,
|
|
35
|
-
textTokens: 0,
|
|
36
|
-
reasoningTokens: 0
|
|
37
|
-
} },
|
|
36
|
+
tokenConsumption: emptyTokenConsumptionState,
|
|
38
37
|
commandQueues: emptyCommandQueues
|
|
39
38
|
};
|
|
40
39
|
/** Reserved reducer checkpoint name for the framework-owned `ReducedState`. */
|
|
41
40
|
const frameworkReducedStateReducerName = "_eda.framework.reduced-state";
|
|
42
41
|
/** Schema version for the framework-owned `ReducedState` checkpoint payload. */
|
|
43
|
-
const frameworkReducedStateReducerSchemaVersion =
|
|
42
|
+
const frameworkReducedStateReducerSchemaVersion = 6;
|
|
44
43
|
/** Encode the framework reducer state into a pointer-based JSON-safe checkpoint payload. */
|
|
45
44
|
const encodeReducedStateCheckpoint = (state) => ({
|
|
46
45
|
lastSeq: state.lastSeq,
|
|
46
|
+
...state.modelSelection === void 0 ? {} : { modelSelection: state.modelSelection },
|
|
47
47
|
commands: Array.from(state.commands.entries()).map(([commandId, record]) => [commandId, encodeCheckpointCommandRecord(record)]),
|
|
48
48
|
runs: Array.from(state.runs.entries()),
|
|
49
49
|
recoveryContinuations: Array.from(state.recoveryContinuations.entries()),
|
|
@@ -77,6 +77,7 @@ const decodeReducedStateCheckpoint = (payload, referencedEvents) => {
|
|
|
77
77
|
const messages = decodeCheckpointMessageRecords(checkpoint.messages ?? [], eventsBySeq);
|
|
78
78
|
return {
|
|
79
79
|
lastSeq: SequenceNumber.make(Number(checkpoint.lastSeq ?? 0)),
|
|
80
|
+
...checkpoint.modelSelection === void 0 ? {} : { modelSelection: checkpoint.modelSelection },
|
|
80
81
|
commands,
|
|
81
82
|
runs,
|
|
82
83
|
recoveryContinuations: new Map(checkpoint.recoveryContinuations ?? []),
|
|
@@ -213,16 +214,11 @@ const reduceSingleCheckpointEvent = (eventsBySeq, seq, expectedType) => {
|
|
|
213
214
|
};
|
|
214
215
|
const committedEventMapBySeq = (events) => new Map(events.map((event) => [Number(event.position.seq), event]));
|
|
215
216
|
const uniqueSequenceNumbers = (seqs) => Array.from(new Set(seqs.map((seq) => Number(seq)))).sort((left, right) => left - right).map((seq) => SequenceNumber.make(seq));
|
|
216
|
-
const decodeTokenConsumptionState = (value) =>
|
|
217
|
-
inputTokens: nonNegativeNumber(value?.total?.inputTokens),
|
|
218
|
-
cachedInputTokens: nonNegativeNumber(value?.total?.cachedInputTokens),
|
|
219
|
-
outputTokens: nonNegativeNumber(value?.total?.outputTokens),
|
|
220
|
-
textTokens: nonNegativeNumber(value?.total?.textTokens),
|
|
221
|
-
reasoningTokens: nonNegativeNumber(value?.total?.reasoningTokens)
|
|
222
|
-
} });
|
|
217
|
+
const decodeTokenConsumptionState = (value) => value ?? emptyTokenConsumptionState;
|
|
223
218
|
/** Fold newly committed durable events into the canonical replay state. */
|
|
224
219
|
const foldReducedState = (state, committed) => {
|
|
225
220
|
let lastSeq = state.lastSeq;
|
|
221
|
+
let modelSelection = state.modelSelection;
|
|
226
222
|
const commands = new Map(state.commands);
|
|
227
223
|
const runs = new Map(state.runs);
|
|
228
224
|
const recoveryContinuations = new Map(state.recoveryContinuations);
|
|
@@ -298,6 +294,7 @@ const foldReducedState = (state, committed) => {
|
|
|
298
294
|
}
|
|
299
295
|
case runStartedEventType: {
|
|
300
296
|
const { runId, commandIds, trace } = payload;
|
|
297
|
+
modelSelection ??= payload.modelSelection;
|
|
301
298
|
const terminal = runs.get(runId)?.terminal;
|
|
302
299
|
runs.set(runId, {
|
|
303
300
|
runId,
|
|
@@ -305,6 +302,7 @@ const foldReducedState = (state, committed) => {
|
|
|
305
302
|
startedAtMs: eventCreatedAtMs,
|
|
306
303
|
startedSeq: seq,
|
|
307
304
|
trace,
|
|
305
|
+
modelSelection: payload.modelSelection,
|
|
308
306
|
...terminal === void 0 ? {} : { terminal }
|
|
309
307
|
});
|
|
310
308
|
break;
|
|
@@ -431,7 +429,10 @@ const foldReducedState = (state, committed) => {
|
|
|
431
429
|
...usage === void 0 ? {} : { usage }
|
|
432
430
|
}
|
|
433
431
|
}));
|
|
434
|
-
if (!previouslyCompleted && inferences.get(inferenceId)?.terminal?._tag === "Completed")
|
|
432
|
+
if (!previouslyCompleted && inferences.get(inferenceId)?.terminal?._tag === "Completed") {
|
|
433
|
+
const model = runs.get(payload.runId)?.modelSelection;
|
|
434
|
+
if (model !== void 0) tokenConsumption = addModelUsage(tokenConsumption, model, usage);
|
|
435
|
+
}
|
|
435
436
|
break;
|
|
436
437
|
}
|
|
437
438
|
case inferenceFailedEventType: {
|
|
@@ -758,6 +759,7 @@ const foldReducedState = (state, committed) => {
|
|
|
758
759
|
}
|
|
759
760
|
case compactionCompletedEventType: {
|
|
760
761
|
const { compactionId } = payload;
|
|
762
|
+
if (compactions.get(compactionId)?.terminal?._tag !== "Completed" && payload.modelSelection !== void 0) tokenConsumption = addModelUsage(tokenConsumption, payload.modelSelection, payload.usage);
|
|
761
763
|
upsert(compactions, compactionId, { compactionId }, (record) => ({
|
|
762
764
|
...record,
|
|
763
765
|
terminal: {
|
|
@@ -769,6 +771,7 @@ const foldReducedState = (state, committed) => {
|
|
|
769
771
|
}
|
|
770
772
|
case compactionFailedEventType: {
|
|
771
773
|
const { compactionId, error } = payload;
|
|
774
|
+
if (payload.modelSelection !== void 0) tokenConsumption = addModelUsage(tokenConsumption, payload.modelSelection, payload.usage);
|
|
772
775
|
upsert(compactions, compactionId, { compactionId }, (record) => ({
|
|
773
776
|
...record,
|
|
774
777
|
terminal: {
|
|
@@ -789,6 +792,9 @@ const foldReducedState = (state, committed) => {
|
|
|
789
792
|
});
|
|
790
793
|
break;
|
|
791
794
|
}
|
|
795
|
+
case sessionConfiguredEventType:
|
|
796
|
+
modelSelection ??= payload.modelSelection;
|
|
797
|
+
break;
|
|
792
798
|
case baseStateRequestedEventType:
|
|
793
799
|
case baseStateCreatedEventType:
|
|
794
800
|
case baseStateFailedEventType: break;
|
|
@@ -797,6 +803,7 @@ const foldReducedState = (state, committed) => {
|
|
|
797
803
|
}
|
|
798
804
|
return {
|
|
799
805
|
lastSeq,
|
|
806
|
+
...modelSelection === void 0 ? {} : { modelSelection },
|
|
800
807
|
commands,
|
|
801
808
|
runs,
|
|
802
809
|
recoveryContinuations,
|
|
@@ -817,18 +824,6 @@ const foldReducedState = (state, committed) => {
|
|
|
817
824
|
};
|
|
818
825
|
/** Fold committed events from genesis into a fresh `ReducedState`. */
|
|
819
826
|
const reduceCommittedEvents = (committed) => foldReducedState(initialReducedState, committed);
|
|
820
|
-
const addTokenUsage = (state, usage) => {
|
|
821
|
-
if (usage === void 0) return state;
|
|
822
|
-
return { total: {
|
|
823
|
-
inputTokens: state.total.inputTokens + tokenCount(usage.inputTokens),
|
|
824
|
-
cachedInputTokens: state.total.cachedInputTokens + tokenCount(usage.cachedInputTokens),
|
|
825
|
-
outputTokens: state.total.outputTokens + tokenCount(usage.outputTokens),
|
|
826
|
-
textTokens: state.total.textTokens + tokenCount(usage.textTokens),
|
|
827
|
-
reasoningTokens: state.total.reasoningTokens + tokenCount(usage.reasoningTokens)
|
|
828
|
-
} };
|
|
829
|
-
};
|
|
830
|
-
const tokenCount = (value) => nonNegativeNumber(value);
|
|
831
|
-
const nonNegativeNumber = (value) => value === void 0 || !Number.isFinite(value) ? 0 : Math.max(0, Math.trunc(value));
|
|
832
827
|
/** Drop runtime state made model-invisible by a context rebase; storage remains append-only. */
|
|
833
828
|
const pruneForContextRebase = (maps, retainedFromContextSeq, currentSummaryId) => {
|
|
834
829
|
for (const [messageId, message] of maps.messages) if (message._tag !== "System" && messagePruneSeq(message) < retainedFromContextSeq) maps.messages.delete(messageId);
|
|
@@ -923,4 +918,4 @@ const appliedFields = (record) => record?.appliedSeq === void 0 ? {} : {
|
|
|
923
918
|
//#endregion
|
|
924
919
|
export { encodeReducedStateCheckpoint as a, frameworkReducedStateReducerSchemaVersion as c, pendingStopCommand as d, reduceCommittedEvents as f, assertNeverError as h, decodeReducedStateCheckpoint as i, initialReducedState as l, assertNever as m, activeTurnIdentityForCommand as n, foldReducedState as o, reducedStateCheckpointEventSeqs as p, classifyRecoverableWork as r, frameworkReducedStateReducerName as s, activeCommand as t, pendingCommands as u };
|
|
925
920
|
|
|
926
|
-
//# sourceMappingURL=reduced-state-
|
|
921
|
+
//# sourceMappingURL=reduced-state-DF0-6mbR.js.map
|