effect-durable-agent 0.1.0-alpha.11 → 0.1.0-alpha.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (30) hide show
  1. package/dist/{compaction-DoTyQf6k.d.ts → compaction-CLCDOR1t.d.ts} +2 -2
  2. package/dist/index.d.ts +1 -1
  3. package/dist/{prompt-projector-BpRH-Ec-.d.ts → prompt-projector-CGo1TGyZ.d.ts} +2 -2
  4. package/dist/{reducer-registry-DjP1qqbs.d.ts → reducer-registry-DqljrD58.d.ts} +3 -1
  5. package/dist/{runtime-BFsU92E7.d.ts → runtime-j93ZOBnG.d.ts} +3 -3
  6. package/dist/services/compaction.d.ts +1 -1
  7. package/dist/services/prompt-projector.d.ts +1 -1
  8. package/dist/services/reducer-registry.d.ts +1 -1
  9. package/dist/services/reducer-registry.js.map +1 -1
  10. package/dist/services/runtime-layer.d.ts +6 -6
  11. package/dist/services/runtime-layer.js +2 -2
  12. package/dist/services/runtime.d.ts +1 -1
  13. package/dist/services/runtime.js +1 -1
  14. package/dist/services/session-query.d.ts +1 -1
  15. package/dist/services/session-query.js +2 -2
  16. package/dist/services/session-state.d.ts +1 -1
  17. package/dist/services/session-state.js +1 -1
  18. package/dist/services/sink-registry.d.ts +1 -1
  19. package/dist/services/sink-registry.js +1 -1
  20. package/dist/{session-query-Bo_wroPS.d.ts → session-query-DYuJXhMQ.d.ts} +4 -4
  21. package/dist/{session-state-5uD0FqQ8.d.ts → session-state-13z-3YaF.d.ts} +9 -9
  22. package/dist/{session-state-CN7DcLal.js → session-state-xXXyniwU.js} +3 -3
  23. package/dist/{session-state-CN7DcLal.js.map → session-state-xXXyniwU.js.map} +1 -1
  24. package/dist/{sink-registry-Bz4bBJaC.d.ts → sink-registry-C2t3DI_g.d.ts} +8 -4
  25. package/dist/{sink-registry-6CNeeRTt.js → sink-registry-CUIrrkXU.js} +13 -8
  26. package/dist/sink-registry-CUIrrkXU.js.map +1 -0
  27. package/dist/testkit/layers.d.ts +7 -7
  28. package/dist/testkit/layers.js +2 -2
  29. package/package.json +1 -1
  30. package/dist/sink-registry-6CNeeRTt.js.map +0 -1
@@ -158,8 +158,8 @@ interface CompactionRunnerShape {
158
158
  declare const CompactionRunner_base: Context.ServiceClass<CompactionRunner, "@effect-durable-agent/CompactionRunner", CompactionRunnerShape>;
159
159
  /** Framework-owned compaction lifecycle runner. */
160
160
  declare class CompactionRunner extends CompactionRunner_base {
161
- static readonly Live: Layer.Layer<CompactionRunner, never, ModelResolver | CompactionExecutor | CompactionPolicy | EDAKeepAlive | IdGenerator | EventFactory>;
161
+ static readonly Live: Layer.Layer<CompactionRunner, never, ModelResolver | CompactionPolicy | CompactionExecutor | EventFactory | IdGenerator | EDAKeepAlive>;
162
162
  }
163
163
  //#endregion
164
164
  export { defaultCompactionRetainTailTokens as _, CompactionExecutorShape as a, CompactionPolicy as c, CompactionRunner as d, CompactionRunnerInput as f, defaultCompactionMinSummarizableTokens as g, defaultCompactionCharsPerToken as h, CompactionExecutorInput as i, CompactionPolicyInput as l, LanguageModelSummaryCompactionExecutorOptions as m, CompactionError as n, CompactionOutput as o, CompactionRunnerShape as p, CompactionExecutor as r, CompactionPlan as s, ApproximateTokenThresholdCompactionPolicyOptions as t, CompactionPolicyShape as u, defaultCompactionThresholdTokens as v };
165
- //# sourceMappingURL=compaction-DoTyQf6k.d.ts.map
165
+ //# sourceMappingURL=compaction-CLCDOR1t.d.ts.map
package/dist/index.d.ts CHANGED
@@ -4,5 +4,5 @@ import { a as PendingMessageCancellationReason, c as StopTurnCommand, d as UserM
4
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";
5
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
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-BFsU92E7.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-j93ZOBnG.js";
8
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 };
@@ -1,7 +1,7 @@
1
1
  import { g as SessionId } from "./core-C-6xHzRx.js";
2
2
  import { S as ReducedState } from "./command-queues-B45Xa1Dl.js";
3
3
  import { i as ContextProjection } from "./context-projection-CCoN8m9W.js";
4
- import { a as EDAReducerStateSnapshot } from "./reducer-registry-DjP1qqbs.js";
4
+ import { a as EDAReducerStateSnapshot } from "./reducer-registry-DqljrD58.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-BpRH-Ec-.d.ts.map
39
+ //# sourceMappingURL=prompt-projector-CGo1TGyZ.d.ts.map
@@ -12,6 +12,7 @@ interface EDAReducerDefinition<State, Name extends string = string> {
12
12
  readonly schemaVersion?: number;
13
13
  readonly encode?: (state: State) => unknown;
14
14
  readonly decode?: (payload: unknown) => State;
15
+ /** Return the next state without mutating the input; projections may be shared across sinks. */
15
16
  reduce(state: State, event: CommittedDurableEvent): State;
16
17
  }
17
18
  /** App-specific pure reducer over the durable session event log. */
@@ -22,6 +23,7 @@ interface EDAReducer<State = unknown, Name extends string = string> {
22
23
  readonly schemaVersion?: number;
23
24
  encode(state: State): unknown;
24
25
  decode(payload: unknown): State;
26
+ /** Return the next state without mutating the input; projections may be shared across sinks. */
25
27
  reduce(state: State, event: CommittedDurableEvent): State;
26
28
  }
27
29
  /** Convenience constructor preserving a reducer's literal name and schema-derived state type. */
@@ -76,4 +78,4 @@ declare class EDAReducerRegistry extends EDAReducerRegistry_base {
76
78
  declare const getEDAReducerState: <State, Name extends string>(snapshot: EDAReducerStateSnapshot, reducer: EDAReducer<State, Name>) => State;
77
79
  //#endregion
78
80
  export { EDAReducerStateSnapshot as a, decodeReducerState as c, encodeReducerState as d, getEDAReducerState as f, EDAReducerRegistryShape as i, defineEDAReducerRegistry as l, EDAReducerDefinition as n, EDAReducersFor as o, reducerSchemaVersion as p, EDAReducerRegistry as r, EDATypedReducerRegistry as s, EDAReducer as t, edaReservedReducerNamePrefix as u };
79
- //# sourceMappingURL=reducer-registry-DjP1qqbs.d.ts.map
81
+ //# sourceMappingURL=reducer-registry-DqljrD58.d.ts.map
@@ -2,8 +2,8 @@ import { h as SequenceNumber, n as CommandId } from "./core-C-6xHzRx.js";
2
2
  import { i as GrantRunCommand, r as EDACommand } from "./commands-p8venTWs.js";
3
3
  import { w as CommandFailedEvent, x as CommandCompletedEvent, y as CommandCancelledEvent } from "./durable-DeLCAvbw.js";
4
4
  import { t as CommittedDurableEvent } from "./session-store-BIr-xfJ7.js";
5
- import { _ as SessionStateShape, h as SessionState, r as SessionCommandAdmissionError, t as EDASubmittable } from "./session-state-5uD0FqQ8.js";
6
- import { n as EDASessionQuery, r as EDASessionQueryShape } from "./session-query-Bo_wroPS.js";
5
+ import { _ as SessionStateShape, h as SessionState, r as SessionCommandAdmissionError, t as EDASubmittable } from "./session-state-13z-3YaF.js";
6
+ import { n as EDASessionQuery, r as EDASessionQueryShape } from "./session-query-DYuJXhMQ.js";
7
7
  import * as Context from "effect/Context";
8
8
  import * as Effect from "effect/Effect";
9
9
  import * as Layer from "effect/Layer";
@@ -66,4 +66,4 @@ declare class EDARuntime extends EDARuntime_base {
66
66
  }
67
67
  //#endregion
68
68
  export { EDARuntimeError as a, EDARuntimeConfig as i, EDACommandTerminalEvent as n, EDARuntimeShape as o, EDARuntime as r, EDARuntimeSubmit as s, CommittedCommandTerminalEvent as t };
69
- //# sourceMappingURL=runtime-BFsU92E7.d.ts.map
69
+ //# sourceMappingURL=runtime-j93ZOBnG.d.ts.map
@@ -1,2 +1,2 @@
1
- import { _ as defaultCompactionRetainTailTokens, a as CompactionExecutorShape, c as CompactionPolicy, d as CompactionRunner, f as CompactionRunnerInput, g as defaultCompactionMinSummarizableTokens, h as defaultCompactionCharsPerToken, i as CompactionExecutorInput, l as CompactionPolicyInput, m as LanguageModelSummaryCompactionExecutorOptions, n as CompactionError, o as CompactionOutput, p as CompactionRunnerShape, r as CompactionExecutor, s as CompactionPlan, t as ApproximateTokenThresholdCompactionPolicyOptions, u as CompactionPolicyShape, v as defaultCompactionThresholdTokens } from "../compaction-DoTyQf6k.js";
1
+ import { _ as defaultCompactionRetainTailTokens, a as CompactionExecutorShape, c as CompactionPolicy, d as CompactionRunner, f as CompactionRunnerInput, g as defaultCompactionMinSummarizableTokens, h as defaultCompactionCharsPerToken, i as CompactionExecutorInput, l as CompactionPolicyInput, m as LanguageModelSummaryCompactionExecutorOptions, n as CompactionError, o as CompactionOutput, p as CompactionRunnerShape, r as CompactionExecutor, s as CompactionPlan, t as ApproximateTokenThresholdCompactionPolicyOptions, u as CompactionPolicyShape, v as defaultCompactionThresholdTokens } from "../compaction-CLCDOR1t.js";
2
2
  export { ApproximateTokenThresholdCompactionPolicyOptions, CompactionError, CompactionExecutor, CompactionExecutorInput, CompactionExecutorShape, CompactionOutput, CompactionPlan, CompactionPolicy, CompactionPolicyInput, CompactionPolicyShape, CompactionRunner, CompactionRunnerInput, CompactionRunnerShape, LanguageModelSummaryCompactionExecutorOptions, defaultCompactionCharsPerToken, defaultCompactionMinSummarizableTokens, defaultCompactionRetainTailTokens, defaultCompactionThresholdTokens };
@@ -1,2 +1,2 @@
1
- import { a as buildEDAPrompt, i as EDAPromptProjectorShape, n as EDAPromptProjectionInput, r as EDAPromptProjector, t as EDAProjectedPromptContext } from "../prompt-projector-BpRH-Ec-.js";
1
+ import { a as buildEDAPrompt, i as EDAPromptProjectorShape, n as EDAPromptProjectionInput, r as EDAPromptProjector, t as EDAProjectedPromptContext } from "../prompt-projector-CGo1TGyZ.js";
2
2
  export { EDAProjectedPromptContext, EDAPromptProjectionInput, EDAPromptProjector, EDAPromptProjectorShape, buildEDAPrompt };
@@ -1,2 +1,2 @@
1
- import { a as EDAReducerStateSnapshot, c as decodeReducerState, d as encodeReducerState, f as getEDAReducerState, i as EDAReducerRegistryShape, l as defineEDAReducerRegistry, n as EDAReducerDefinition, o as EDAReducersFor, p as reducerSchemaVersion, r as EDAReducerRegistry, s as EDATypedReducerRegistry, t as EDAReducer, u as edaReservedReducerNamePrefix } from "../reducer-registry-DjP1qqbs.js";
1
+ import { a as EDAReducerStateSnapshot, c as decodeReducerState, d as encodeReducerState, f as getEDAReducerState, i as EDAReducerRegistryShape, l as defineEDAReducerRegistry, n as EDAReducerDefinition, o as EDAReducersFor, p as reducerSchemaVersion, r as EDAReducerRegistry, s as EDATypedReducerRegistry, t as EDAReducer, u as edaReservedReducerNamePrefix } from "../reducer-registry-DqljrD58.js";
2
2
  export { EDAReducer, EDAReducerDefinition, EDAReducerRegistry, EDAReducerRegistryShape, EDAReducerStateSnapshot, EDAReducersFor, EDATypedReducerRegistry, decodeReducerState, defineEDAReducerRegistry, edaReservedReducerNamePrefix, encodeReducerState, getEDAReducerState, reducerSchemaVersion };
@@ -1 +1 @@
1
- {"version":3,"file":"reducer-registry.js","names":[],"sources":["../../src/services/reducer-registry.ts"],"sourcesContent":["import * as Context from \"effect/Context\";\nimport * as Layer from \"effect/Layer\";\nimport * as Schema from \"effect/Schema\";\n\nimport type { CommittedDurableEvent } from \"./session-store\";\n\n/** Input accepted by the reducer constructor before schema codecs are materialized. */\nexport interface EDAReducerDefinition<State, Name extends string = string> {\n readonly name: Name;\n readonly initial: State;\n readonly stateSchema: Schema.Codec<State, unknown, never, never>;\n readonly schemaVersion?: number;\n readonly encode?: (state: State) => unknown;\n readonly decode?: (payload: unknown) => State;\n reduce(state: State, event: CommittedDurableEvent): State;\n}\n\n/** App-specific pure reducer over the durable session event log. */\nexport interface EDAReducer<State = unknown, Name extends string = string> {\n readonly name: Name;\n readonly initial: State;\n readonly stateSchema: Schema.Codec<State, unknown, never, never>;\n readonly schemaVersion?: number;\n encode(state: State): unknown;\n decode(payload: unknown): State;\n reduce(state: State, event: CommittedDurableEvent): State;\n}\n\n/** Convenience constructor preserving a reducer's literal name and schema-derived state type. */\nexport const EDAReducer = {\n make: <State, const Name extends string = string>(\n reducer: EDAReducerDefinition<State, Name>,\n ): EDAReducer<State, Name> => ({\n ...reducer,\n encode: reducer.encode ?? ((state) => Schema.encodeUnknownSync(reducer.stateSchema)(state)),\n decode: reducer.decode ?? ((payload) => Schema.decodeUnknownSync(reducer.stateSchema)(payload)),\n }),\n};\n\n/** Snapshot of all app reducer states, keyed by reducer name. */\nexport type EDAReducerStateSnapshot = ReadonlyMap<string, unknown>;\n\ninterface EDASerializedReducerState {\n readonly name: string;\n readonly state: unknown;\n}\n\ntype EDAReducerStateForName<\n Entry extends EDASerializedReducerState,\n Name extends Entry[\"name\"],\n> = Extract<Entry, { readonly name: Name }>[\"state\"];\n\n/** Exact reducer object required for every member of a serialized state union. */\nexport type EDAReducersFor<Entry extends EDASerializedReducerState> = {\n readonly [Name in Entry[\"name\"]]: EDAReducer<EDAReducerStateForName<Entry, Name>, Name>;\n};\n\n/** Schema-backed app reducer registry used by both runtime folding and snapshot serialization. */\nexport interface EDATypedReducerRegistry<\n EntrySchema extends Schema.Codec<EDASerializedReducerState, unknown, never, never>,\n> {\n readonly entrySchema: EntrySchema;\n readonly reducers: ReadonlyArray<EDAReducer>;\n readonly serialize: (snapshot: EDAReducerStateSnapshot) => ReadonlyArray<EntrySchema[\"Type\"]>;\n}\n\nconst reducerValues = (reducers: Readonly<Record<string, EDAReducer>>): ReadonlyArray<EDAReducer> =>\n Object.values(reducers);\n\n/**\n * Register an app's complete reducer set against its public serialized-state union.\n *\n * Missing reducers, extra reducers, reducer-name drift, and state-schema drift are\n * rejected by TypeScript at the registration site.\n */\nexport const defineEDAReducerRegistry = <\n EntrySchema extends Schema.Codec<EDASerializedReducerState, unknown, never, never>,\n>(\n entrySchema: EntrySchema,\n reducers: EDAReducersFor<EntrySchema[\"Type\"]>,\n): EDATypedReducerRegistry<EntrySchema> => {\n const values = reducerValues(reducers);\n const serializedStatesSchema = Schema.Array(entrySchema);\n return {\n entrySchema,\n reducers: values,\n serialize: (snapshot) =>\n Schema.decodeUnknownSync(serializedStatesSchema)(\n values.map((reducer) => ({\n name: reducer.name,\n state: snapshot.get(reducer.name) ?? reducer.initial,\n })),\n ),\n };\n};\n\n/** Registry that folds app-specific read-model state beside EDA reduced state. */\nexport interface EDAReducerRegistryShape {\n readonly reducers: ReadonlyArray<EDAReducer>;\n readonly initial: EDAReducerStateSnapshot;\n readonly reduce: (\n state: EDAReducerStateSnapshot,\n events: ReadonlyArray<CommittedDurableEvent>,\n ) => EDAReducerStateSnapshot;\n}\n\n/** Prefix reserved for framework-owned reducer checkpoints. */\nexport const edaReservedReducerNamePrefix = \"_eda.\";\n\n/** Return the persisted schema version for one reducer. */\nexport const reducerSchemaVersion = (reducer: EDAReducer): number => reducer.schemaVersion ?? 1;\n\n/** Encode one reducer state for durable checkpoint storage. */\nexport const encodeReducerState = <State, Name extends string>(\n reducer: EDAReducer<State, Name>,\n state: State,\n): unknown => reducer.encode(state);\n\n/** Decode one reducer state from durable checkpoint storage. */\nexport const decodeReducerState = <State, Name extends string>(\n reducer: EDAReducer<State, Name>,\n payload: unknown,\n): State => reducer.decode(payload);\n\n/** Registry for app-specific durable metadata reducers. */\nexport class EDAReducerRegistry extends Context.Service<\n EDAReducerRegistry,\n EDAReducerRegistryShape\n>()(\"@effect-durable-agent/EDAReducerRegistry\") {\n static readonly Empty = Layer.succeed(EDAReducerRegistry, makeReducerRegistry([]));\n\n static readonly Live = (reducers: ReadonlyArray<EDAReducer>) =>\n Layer.succeed(EDAReducerRegistry, makeReducerRegistry(reducers));\n}\n\n/** Read one typed reducer state from a snapshot. */\nexport const getEDAReducerState = <State, Name extends string>(\n snapshot: EDAReducerStateSnapshot,\n reducer: EDAReducer<State, Name>,\n): State => {\n const state = snapshot.get(reducer.name);\n return state === undefined\n ? reducer.initial\n : Schema.decodeUnknownSync(reducer.stateSchema)(state);\n};\n\nfunction makeReducerRegistry(reducers: ReadonlyArray<EDAReducer>): EDAReducerRegistryShape {\n validateReducerNames(reducers);\n const initial = new Map(reducers.map((reducer) => [reducer.name, reducer.initial]));\n return {\n reducers,\n initial,\n reduce: (state, events) => {\n if (events.length === 0 || reducers.length === 0) {\n return state;\n }\n const next = new Map(state);\n for (const event of events) {\n for (const reducer of reducers) {\n const current = next.get(reducer.name) ?? reducer.initial;\n next.set(reducer.name, reducer.reduce(current, event));\n }\n }\n return next;\n },\n };\n}\n\nfunction validateReducerNames(reducers: ReadonlyArray<EDAReducer>): void {\n const seen = new Set<string>();\n for (const reducer of reducers) {\n if (reducer.name.startsWith(edaReservedReducerNamePrefix)) {\n throw new Error(\n `Reducer name ${reducer.name} uses reserved EDA prefix ${edaReservedReducerNamePrefix}`,\n );\n }\n if (seen.has(reducer.name)) {\n throw new Error(`Duplicate EDA reducer name ${reducer.name}`);\n }\n seen.add(reducer.name);\n }\n}\n"],"mappings":";;;;;AA6BA,MAAa,aAAa,EACxB,OACE,aAC6B;CAC7B,GAAG;CACH,QAAQ,QAAQ,YAAY,UAAU,OAAO,kBAAkB,QAAQ,WAAW,EAAE,KAAK;CACzF,QAAQ,QAAQ,YAAY,YAAY,OAAO,kBAAkB,QAAQ,WAAW,EAAE,OAAO;AAC/F,GACF;AA6BA,MAAM,iBAAiB,aACrB,OAAO,OAAO,QAAQ;;;;;;;AAQxB,MAAa,4BAGX,aACA,aACyC;CACzC,MAAM,SAAS,cAAc,QAAQ;CACrC,MAAM,yBAAyB,OAAO,MAAM,WAAW;CACvD,OAAO;EACL;EACA,UAAU;EACV,YAAY,aACV,OAAO,kBAAkB,sBAAsB,EAC7C,OAAO,KAAK,aAAa;GACvB,MAAM,QAAQ;GACd,OAAO,SAAS,IAAI,QAAQ,IAAI,KAAK,QAAQ;EAC/C,EAAE,CACJ;CACJ;AACF;;AAaA,MAAa,+BAA+B;;AAG5C,MAAa,wBAAwB,YAAgC,QAAQ,iBAAiB;;AAG9F,MAAa,sBACX,SACA,UACY,QAAQ,OAAO,KAAK;;AAGlC,MAAa,sBACX,SACA,YACU,QAAQ,OAAO,OAAO;;AAGlC,IAAa,qBAAb,MAAa,2BAA2B,QAAQ,QAG9C,EAAE,0CAA0C,EAAE;CAC9C,OAAgB,QAAQ,MAAM,QAAQ,oBAAoB,oBAAoB,CAAC,CAAC,CAAC;CAEjF,OAAgB,QAAQ,aACtB,MAAM,QAAQ,oBAAoB,oBAAoB,QAAQ,CAAC;AACnE;;AAGA,MAAa,sBACX,UACA,YACU;CACV,MAAM,QAAQ,SAAS,IAAI,QAAQ,IAAI;CACvC,OAAO,UAAU,KAAA,IACb,QAAQ,UACR,OAAO,kBAAkB,QAAQ,WAAW,EAAE,KAAK;AACzD;AAEA,SAAS,oBAAoB,UAA8D;CACzF,qBAAqB,QAAQ;CAE7B,OAAO;EACL;EACA,SAAA,IAHkB,IAAI,SAAS,KAAK,YAAY,CAAC,QAAQ,MAAM,QAAQ,OAAO,CAAC,CAGzE;EACN,SAAS,OAAO,WAAW;GACzB,IAAI,OAAO,WAAW,KAAK,SAAS,WAAW,GAC7C,OAAO;GAET,MAAM,OAAO,IAAI,IAAI,KAAK;GAC1B,KAAK,MAAM,SAAS,QAClB,KAAK,MAAM,WAAW,UAAU;IAC9B,MAAM,UAAU,KAAK,IAAI,QAAQ,IAAI,KAAK,QAAQ;IAClD,KAAK,IAAI,QAAQ,MAAM,QAAQ,OAAO,SAAS,KAAK,CAAC;GACvD;GAEF,OAAO;EACT;CACF;AACF;AAEA,SAAS,qBAAqB,UAA2C;CACvE,MAAM,uBAAO,IAAI,IAAY;CAC7B,KAAK,MAAM,WAAW,UAAU;EAC9B,IAAI,QAAQ,KAAK,WAAA,OAAuC,GACtD,MAAM,IAAI,MACR,gBAAgB,QAAQ,KAAK,4BAA4B,8BAC3D;EAEF,IAAI,KAAK,IAAI,QAAQ,IAAI,GACvB,MAAM,IAAI,MAAM,8BAA8B,QAAQ,MAAM;EAE9D,KAAK,IAAI,QAAQ,IAAI;CACvB;AACF"}
1
+ {"version":3,"file":"reducer-registry.js","names":[],"sources":["../../src/services/reducer-registry.ts"],"sourcesContent":["import * as Context from \"effect/Context\";\nimport * as Layer from \"effect/Layer\";\nimport * as Schema from \"effect/Schema\";\n\nimport type { CommittedDurableEvent } from \"./session-store\";\n\n/** Input accepted by the reducer constructor before schema codecs are materialized. */\nexport interface EDAReducerDefinition<State, Name extends string = string> {\n readonly name: Name;\n readonly initial: State;\n readonly stateSchema: Schema.Codec<State, unknown, never, never>;\n readonly schemaVersion?: number;\n readonly encode?: (state: State) => unknown;\n readonly decode?: (payload: unknown) => State;\n /** Return the next state without mutating the input; projections may be shared across sinks. */\n reduce(state: State, event: CommittedDurableEvent): State;\n}\n\n/** App-specific pure reducer over the durable session event log. */\nexport interface EDAReducer<State = unknown, Name extends string = string> {\n readonly name: Name;\n readonly initial: State;\n readonly stateSchema: Schema.Codec<State, unknown, never, never>;\n readonly schemaVersion?: number;\n encode(state: State): unknown;\n decode(payload: unknown): State;\n /** Return the next state without mutating the input; projections may be shared across sinks. */\n reduce(state: State, event: CommittedDurableEvent): State;\n}\n\n/** Convenience constructor preserving a reducer's literal name and schema-derived state type. */\nexport const EDAReducer = {\n make: <State, const Name extends string = string>(\n reducer: EDAReducerDefinition<State, Name>,\n ): EDAReducer<State, Name> => ({\n ...reducer,\n encode: reducer.encode ?? ((state) => Schema.encodeUnknownSync(reducer.stateSchema)(state)),\n decode: reducer.decode ?? ((payload) => Schema.decodeUnknownSync(reducer.stateSchema)(payload)),\n }),\n};\n\n/** Snapshot of all app reducer states, keyed by reducer name. */\nexport type EDAReducerStateSnapshot = ReadonlyMap<string, unknown>;\n\ninterface EDASerializedReducerState {\n readonly name: string;\n readonly state: unknown;\n}\n\ntype EDAReducerStateForName<\n Entry extends EDASerializedReducerState,\n Name extends Entry[\"name\"],\n> = Extract<Entry, { readonly name: Name }>[\"state\"];\n\n/** Exact reducer object required for every member of a serialized state union. */\nexport type EDAReducersFor<Entry extends EDASerializedReducerState> = {\n readonly [Name in Entry[\"name\"]]: EDAReducer<EDAReducerStateForName<Entry, Name>, Name>;\n};\n\n/** Schema-backed app reducer registry used by both runtime folding and snapshot serialization. */\nexport interface EDATypedReducerRegistry<\n EntrySchema extends Schema.Codec<EDASerializedReducerState, unknown, never, never>,\n> {\n readonly entrySchema: EntrySchema;\n readonly reducers: ReadonlyArray<EDAReducer>;\n readonly serialize: (snapshot: EDAReducerStateSnapshot) => ReadonlyArray<EntrySchema[\"Type\"]>;\n}\n\nconst reducerValues = (reducers: Readonly<Record<string, EDAReducer>>): ReadonlyArray<EDAReducer> =>\n Object.values(reducers);\n\n/**\n * Register an app's complete reducer set against its public serialized-state union.\n *\n * Missing reducers, extra reducers, reducer-name drift, and state-schema drift are\n * rejected by TypeScript at the registration site.\n */\nexport const defineEDAReducerRegistry = <\n EntrySchema extends Schema.Codec<EDASerializedReducerState, unknown, never, never>,\n>(\n entrySchema: EntrySchema,\n reducers: EDAReducersFor<EntrySchema[\"Type\"]>,\n): EDATypedReducerRegistry<EntrySchema> => {\n const values = reducerValues(reducers);\n const serializedStatesSchema = Schema.Array(entrySchema);\n return {\n entrySchema,\n reducers: values,\n serialize: (snapshot) =>\n Schema.decodeUnknownSync(serializedStatesSchema)(\n values.map((reducer) => ({\n name: reducer.name,\n state: snapshot.get(reducer.name) ?? reducer.initial,\n })),\n ),\n };\n};\n\n/** Registry that folds app-specific read-model state beside EDA reduced state. */\nexport interface EDAReducerRegistryShape {\n readonly reducers: ReadonlyArray<EDAReducer>;\n readonly initial: EDAReducerStateSnapshot;\n readonly reduce: (\n state: EDAReducerStateSnapshot,\n events: ReadonlyArray<CommittedDurableEvent>,\n ) => EDAReducerStateSnapshot;\n}\n\n/** Prefix reserved for framework-owned reducer checkpoints. */\nexport const edaReservedReducerNamePrefix = \"_eda.\";\n\n/** Return the persisted schema version for one reducer. */\nexport const reducerSchemaVersion = (reducer: EDAReducer): number => reducer.schemaVersion ?? 1;\n\n/** Encode one reducer state for durable checkpoint storage. */\nexport const encodeReducerState = <State, Name extends string>(\n reducer: EDAReducer<State, Name>,\n state: State,\n): unknown => reducer.encode(state);\n\n/** Decode one reducer state from durable checkpoint storage. */\nexport const decodeReducerState = <State, Name extends string>(\n reducer: EDAReducer<State, Name>,\n payload: unknown,\n): State => reducer.decode(payload);\n\n/** Registry for app-specific durable metadata reducers. */\nexport class EDAReducerRegistry extends Context.Service<\n EDAReducerRegistry,\n EDAReducerRegistryShape\n>()(\"@effect-durable-agent/EDAReducerRegistry\") {\n static readonly Empty = Layer.succeed(EDAReducerRegistry, makeReducerRegistry([]));\n\n static readonly Live = (reducers: ReadonlyArray<EDAReducer>) =>\n Layer.succeed(EDAReducerRegistry, makeReducerRegistry(reducers));\n}\n\n/** Read one typed reducer state from a snapshot. */\nexport const getEDAReducerState = <State, Name extends string>(\n snapshot: EDAReducerStateSnapshot,\n reducer: EDAReducer<State, Name>,\n): State => {\n const state = snapshot.get(reducer.name);\n return state === undefined\n ? reducer.initial\n : Schema.decodeUnknownSync(reducer.stateSchema)(state);\n};\n\nfunction makeReducerRegistry(reducers: ReadonlyArray<EDAReducer>): EDAReducerRegistryShape {\n validateReducerNames(reducers);\n const initial = new Map(reducers.map((reducer) => [reducer.name, reducer.initial]));\n return {\n reducers,\n initial,\n reduce: (state, events) => {\n if (events.length === 0 || reducers.length === 0) {\n return state;\n }\n const next = new Map(state);\n for (const event of events) {\n for (const reducer of reducers) {\n const current = next.get(reducer.name) ?? reducer.initial;\n next.set(reducer.name, reducer.reduce(current, event));\n }\n }\n return next;\n },\n };\n}\n\nfunction validateReducerNames(reducers: ReadonlyArray<EDAReducer>): void {\n const seen = new Set<string>();\n for (const reducer of reducers) {\n if (reducer.name.startsWith(edaReservedReducerNamePrefix)) {\n throw new Error(\n `Reducer name ${reducer.name} uses reserved EDA prefix ${edaReservedReducerNamePrefix}`,\n );\n }\n if (seen.has(reducer.name)) {\n throw new Error(`Duplicate EDA reducer name ${reducer.name}`);\n }\n seen.add(reducer.name);\n }\n}\n"],"mappings":";;;;;AA+BA,MAAa,aAAa,EACxB,OACE,aAC6B;CAC7B,GAAG;CACH,QAAQ,QAAQ,YAAY,UAAU,OAAO,kBAAkB,QAAQ,WAAW,EAAE,KAAK;CACzF,QAAQ,QAAQ,YAAY,YAAY,OAAO,kBAAkB,QAAQ,WAAW,EAAE,OAAO;AAC/F,GACF;AA6BA,MAAM,iBAAiB,aACrB,OAAO,OAAO,QAAQ;;;;;;;AAQxB,MAAa,4BAGX,aACA,aACyC;CACzC,MAAM,SAAS,cAAc,QAAQ;CACrC,MAAM,yBAAyB,OAAO,MAAM,WAAW;CACvD,OAAO;EACL;EACA,UAAU;EACV,YAAY,aACV,OAAO,kBAAkB,sBAAsB,EAC7C,OAAO,KAAK,aAAa;GACvB,MAAM,QAAQ;GACd,OAAO,SAAS,IAAI,QAAQ,IAAI,KAAK,QAAQ;EAC/C,EAAE,CACJ;CACJ;AACF;;AAaA,MAAa,+BAA+B;;AAG5C,MAAa,wBAAwB,YAAgC,QAAQ,iBAAiB;;AAG9F,MAAa,sBACX,SACA,UACY,QAAQ,OAAO,KAAK;;AAGlC,MAAa,sBACX,SACA,YACU,QAAQ,OAAO,OAAO;;AAGlC,IAAa,qBAAb,MAAa,2BAA2B,QAAQ,QAG9C,EAAE,0CAA0C,EAAE;CAC9C,OAAgB,QAAQ,MAAM,QAAQ,oBAAoB,oBAAoB,CAAC,CAAC,CAAC;CAEjF,OAAgB,QAAQ,aACtB,MAAM,QAAQ,oBAAoB,oBAAoB,QAAQ,CAAC;AACnE;;AAGA,MAAa,sBACX,UACA,YACU;CACV,MAAM,QAAQ,SAAS,IAAI,QAAQ,IAAI;CACvC,OAAO,UAAU,KAAA,IACb,QAAQ,UACR,OAAO,kBAAkB,QAAQ,WAAW,EAAE,KAAK;AACzD;AAEA,SAAS,oBAAoB,UAA8D;CACzF,qBAAqB,QAAQ;CAE7B,OAAO;EACL;EACA,SAAA,IAHkB,IAAI,SAAS,KAAK,YAAY,CAAC,QAAQ,MAAM,QAAQ,OAAO,CAAC,CAGzE;EACN,SAAS,OAAO,WAAW;GACzB,IAAI,OAAO,WAAW,KAAK,SAAS,WAAW,GAC7C,OAAO;GAET,MAAM,OAAO,IAAI,IAAI,KAAK;GAC1B,KAAK,MAAM,SAAS,QAClB,KAAK,MAAM,WAAW,UAAU;IAC9B,MAAM,UAAU,KAAK,IAAI,QAAQ,IAAI,KAAK,QAAQ;IAClD,KAAK,IAAI,QAAQ,MAAM,QAAQ,OAAO,SAAS,KAAK,CAAC;GACvD;GAEF,OAAO;EACT;CACF;AACF;AAEA,SAAS,qBAAqB,UAA2C;CACvE,MAAM,uBAAO,IAAI,IAAY;CAC7B,KAAK,MAAM,WAAW,UAAU;EAC9B,IAAI,QAAQ,KAAK,WAAA,OAAuC,GACtD,MAAM,IAAI,MACR,gBAAgB,QAAQ,KAAK,4BAA4B,8BAC3D;EAEF,IAAI,KAAK,IAAI,QAAQ,IAAI,GACvB,MAAM,IAAI,MAAM,8BAA8B,QAAQ,MAAM;EAE9D,KAAK,IAAI,QAAQ,IAAI;CACvB;AACF"}
@@ -2,17 +2,17 @@ import { g as SessionId } from "../core-C-6xHzRx.js";
2
2
  import { a as EDASessionStore, o as EDASessionStoreError } from "../session-store-BIr-xfJ7.js";
3
3
  import { t as ModelResolver } from "../model-resolver-BPPJAsuh.js";
4
4
  import { t as EDAKeepAlive } from "../keep-alive-Chl5SJxy.js";
5
- import { c as CompactionPolicy, r as CompactionExecutor } from "../compaction-DoTyQf6k.js";
5
+ import { c as CompactionPolicy, r as CompactionExecutor } from "../compaction-CLCDOR1t.js";
6
6
  import { t as SessionEventObserver } from "../session-event-observer-DaFMKKNc.js";
7
- import { r as EDASink } from "../sink-registry-Bz4bBJaC.js";
8
- import { r as EDAReducerRegistry } from "../reducer-registry-DjP1qqbs.js";
9
- import { r as EDAPromptProjector } from "../prompt-projector-BpRH-Ec-.js";
7
+ import { r as EDASink } from "../sink-registry-C2t3DI_g.js";
8
+ import { r as EDAReducerRegistry } from "../reducer-registry-DqljrD58.js";
9
+ import { r as EDAPromptProjector } from "../prompt-projector-CGo1TGyZ.js";
10
10
  import { n as SinkCheckpointStore } from "../sink-checkpoint-store-Cr9_GmOw.js";
11
11
  import { t as RunScheduler } from "../run-scheduler-DvHWwWBJ.js";
12
12
  import { t as RunSchedulingWakeup } from "../run-scheduling-wakeup-CGgJ7RNe.js";
13
- import { r as SessionCommandAdmissionError } from "../session-state-5uD0FqQ8.js";
13
+ import { r as SessionCommandAdmissionError } from "../session-state-13z-3YaF.js";
14
14
  import { i as EDAToolRegistryShape, t as EDAModelToolkit } from "../tool-registry-Dhs2KmYK.js";
15
- import { i as EDARuntimeConfig, r as EDARuntime } from "../runtime-BFsU92E7.js";
15
+ import { i as EDARuntimeConfig, r as EDARuntime } from "../runtime-j93ZOBnG.js";
16
16
  import * as Layer from "effect/Layer";
17
17
  import * as Tracer from "effect/Tracer";
18
18
 
@@ -1,12 +1,12 @@
1
1
  import { RunSchedulingWakeup } from "./run-scheduling-wakeup.js";
2
2
  import { RunScheduler } from "./run-scheduler.js";
3
- import { d as TurnRunner, f as InferenceRunner, p as ToolExecutor, u as SessionState } from "../session-state-CN7DcLal.js";
3
+ import { d as TurnRunner, f as InferenceRunner, p as ToolExecutor, u as SessionState } from "../session-state-xXXyniwU.js";
4
4
  import { a as CompactionPolicy, n as CompactionExecutor, o as CompactionRunner } from "../compaction-0k8zCJgB.js";
5
5
  import { IdGenerator } from "./id-generator.js";
6
6
  import { n as SessionContext, t as EventFactory } from "../event-factory-QuC_UvyP.js";
7
7
  import { EDAKeepAlive } from "./keep-alive.js";
8
8
  import { SessionEventObserver } from "./session-event-observer.js";
9
- import { n as EDASinkRegistry, r as LiveEventBus } from "../sink-registry-6CNeeRTt.js";
9
+ import { n as EDASinkRegistry, r as LiveEventBus } from "../sink-registry-CUIrrkXU.js";
10
10
  import { EDAPromptProjector } from "./prompt-projector.js";
11
11
  import { EDAReducerRegistry } from "./reducer-registry.js";
12
12
  import { EDAToolRegistry } from "./tool-registry.js";
@@ -1,2 +1,2 @@
1
- import { a as EDARuntimeError, i as EDARuntimeConfig, n as EDACommandTerminalEvent, o as EDARuntimeShape, r as EDARuntime, s as EDARuntimeSubmit, t as CommittedCommandTerminalEvent } from "../runtime-BFsU92E7.js";
1
+ import { a as EDARuntimeError, i as EDARuntimeConfig, n as EDACommandTerminalEvent, o as EDARuntimeShape, r as EDARuntime, s as EDARuntimeSubmit, t as CommittedCommandTerminalEvent } from "../runtime-j93ZOBnG.js";
2
2
  export { CommittedCommandTerminalEvent, EDACommandTerminalEvent, EDARuntime, EDARuntimeConfig, EDARuntimeError, EDARuntimeShape, EDARuntimeSubmit };
@@ -1,7 +1,7 @@
1
1
  import { SequenceNumber, durablePosition } from "../types/core.js";
2
2
  import { c as ModelSelectionPayload, l as NonNegativeInt, p as SystemPromptText } from "../envelope-DxQzo5rN.js";
3
3
  import { Dn as commandCancelledEventType, On as commandCompletedEventType, kn as commandFailedEventType } from "../durable-BPHVFVvV.js";
4
- import { u as SessionState } from "../session-state-CN7DcLal.js";
4
+ import { u as SessionState } from "../session-state-xXXyniwU.js";
5
5
  import { CommittedDurableEvent } from "./session-store.js";
6
6
  import { annotateEdaSpan, committedBatchAttributes } from "./tracing.js";
7
7
  import { EDASessionQuery } from "./session-query.js";
@@ -1,2 +1,2 @@
1
- import { i as EDASessionSnapshot, n as EDASessionQuery, r as EDASessionQueryShape, t as EDASessionEventPage } from "../session-query-Bo_wroPS.js";
1
+ import { i as EDASessionSnapshot, n as EDASessionQuery, r as EDASessionQueryShape, t as EDASessionEventPage } from "../session-query-DYuJXhMQ.js";
2
2
  export { EDASessionEventPage, EDASessionQuery, EDASessionQueryShape, EDASessionSnapshot };
@@ -1,11 +1,11 @@
1
1
  import { SequenceNumber } from "../types/core.js";
2
2
  import { _ as effectDurableAgentNamespace, u as PositionedEvent } from "../envelope-DxQzo5rN.js";
3
3
  import { bt as RunSchedulingRequestedPayload, dt as RunInterruptedPayload, gt as RunSchedulingGrantedPayload, lt as RunFailedPayload, ot as RunCompletedPayload, vt as RunSchedulingInvalidatedPayload } from "../durable-BPHVFVvV.js";
4
- import { u as SessionState } from "../session-state-CN7DcLal.js";
4
+ import { u as SessionState } from "../session-state-xXXyniwU.js";
5
5
  import { EDASessionStore } from "./session-store.js";
6
6
  import { durableMessageTranscript } from "../domain/message-transcript.js";
7
7
  import { annotateEdaSpan } from "./tracing.js";
8
- import { r as LiveEventBus } from "../sink-registry-6CNeeRTt.js";
8
+ import { r as LiveEventBus } from "../sink-registry-CUIrrkXU.js";
9
9
  import * as Context from "effect/Context";
10
10
  import * as Effect from "effect/Effect";
11
11
  import * as Layer from "effect/Layer";
@@ -1,2 +1,2 @@
1
- import { _ as SessionStateShape, a as SessionCommandCompleted, c as SessionCommandResult, d as SessionForkedCommand, f as SessionNoRunnableCommand, g as SessionStateError, h as SessionState, i as SessionCommandCancelled, l as SessionDrainProcessed, m as SessionRunInput, n as SessionCommandAdmissionConflict, o as SessionCommandFailed, p as SessionNoRunnableReason, r as SessionCommandAdmissionError, s as SessionCommandOutcome, t as EDASubmittable, u as SessionDrainResult, v as SessionStateSnapshotData } from "../session-state-5uD0FqQ8.js";
1
+ import { _ as SessionStateShape, a as SessionCommandCompleted, c as SessionCommandResult, d as SessionForkedCommand, f as SessionNoRunnableCommand, g as SessionStateError, h as SessionState, i as SessionCommandCancelled, l as SessionDrainProcessed, m as SessionRunInput, n as SessionCommandAdmissionConflict, o as SessionCommandFailed, p as SessionNoRunnableReason, r as SessionCommandAdmissionError, s as SessionCommandOutcome, t as EDASubmittable, u as SessionDrainResult, v as SessionStateSnapshotData } from "../session-state-13z-3YaF.js";
2
2
  export { EDASubmittable, SessionCommandAdmissionConflict, SessionCommandAdmissionError, SessionCommandCancelled, SessionCommandCompleted, SessionCommandFailed, SessionCommandOutcome, SessionCommandResult, SessionDrainProcessed, SessionDrainResult, SessionForkedCommand, SessionNoRunnableCommand, SessionNoRunnableReason, SessionRunInput, SessionState, SessionStateError, SessionStateShape, SessionStateSnapshotData };
@@ -1,2 +1,2 @@
1
- import { a as SessionCommandOutcome, c as SessionNoRunnableReason, i as SessionCommandFailed, l as SessionRunInput, n as SessionCommandCancelled, o as SessionForkedCommand, r as SessionCommandCompleted, s as SessionNoRunnableCommand, t as SessionCommandAdmissionConflict, u as SessionState } from "../session-state-CN7DcLal.js";
1
+ import { a as SessionCommandOutcome, c as SessionNoRunnableReason, i as SessionCommandFailed, l as SessionRunInput, n as SessionCommandCancelled, o as SessionForkedCommand, r as SessionCommandCompleted, s as SessionNoRunnableCommand, t as SessionCommandAdmissionConflict, u as SessionState } from "../session-state-xXXyniwU.js";
2
2
  export { SessionCommandAdmissionConflict, SessionCommandCancelled, SessionCommandCompleted, SessionCommandFailed, SessionCommandOutcome, SessionForkedCommand, SessionNoRunnableCommand, SessionNoRunnableReason, SessionRunInput, SessionState };
@@ -1,2 +1,2 @@
1
- import { a as EDASinkContext, c as EDASinkRegistryShape, i as EDASinkCheckpoint, l as EDASinkRunnerStartInput, n as EDAEphemeralSinkDefinition, o as EDASinkDurableBatch, r as EDASink, s as EDASinkRegistry, t as EDADurableSinkDefinition } from "../sink-registry-Bz4bBJaC.js";
1
+ import { a as EDASinkContext, c as EDASinkRegistryShape, i as EDASinkCheckpoint, l as EDASinkRunnerStartInput, n as EDAEphemeralSinkDefinition, o as EDASinkDurableBatch, r as EDASink, s as EDASinkRegistry, t as EDADurableSinkDefinition } from "../sink-registry-C2t3DI_g.js";
2
2
  export { EDADurableSinkDefinition, EDAEphemeralSinkDefinition, EDASink, EDASinkCheckpoint, EDASinkContext, EDASinkDurableBatch, EDASinkRegistry, EDASinkRegistryShape, EDASinkRunnerStartInput };
@@ -1,2 +1,2 @@
1
- import { n as EDASinkRegistry, t as EDASink } from "../sink-registry-6CNeeRTt.js";
1
+ import { n as EDASinkRegistry, t as EDASink } from "../sink-registry-CUIrrkXU.js";
2
2
  export { EDASink, EDASinkRegistry };
@@ -3,9 +3,9 @@ import { $ as RunRequestOutcome, S as ReducedState } from "./command-queues-B45X
3
3
  import { d as PositionedEvent } from "./envelope-DkZyMIgp.js";
4
4
  import { a as EDASessionStore, o as EDASessionStoreError } from "./session-store-BIr-xfJ7.js";
5
5
  import { t as DurableTranscriptMessage } from "./message-transcript-Dr6Rk-re.js";
6
- import { u as LiveEventBus } from "./sink-registry-Bz4bBJaC.js";
7
- import { a as EDAReducerStateSnapshot } from "./reducer-registry-DjP1qqbs.js";
8
- import { h as SessionState } from "./session-state-5uD0FqQ8.js";
6
+ import { u as LiveEventBus } from "./sink-registry-C2t3DI_g.js";
7
+ import { a as EDAReducerStateSnapshot } from "./reducer-registry-DqljrD58.js";
8
+ import { h as SessionState } from "./session-state-13z-3YaF.js";
9
9
  import * as Context from "effect/Context";
10
10
  import * as Effect from "effect/Effect";
11
11
  import * as Layer from "effect/Layer";
@@ -44,4 +44,4 @@ declare class EDASessionQuery extends EDASessionQuery_base {
44
44
  }
45
45
  //#endregion
46
46
  export { EDASessionSnapshot as i, EDASessionQuery as n, EDASessionQueryShape as r, EDASessionEventPage as t };
47
- //# sourceMappingURL=session-query-Bo_wroPS.d.ts.map
47
+ //# sourceMappingURL=session-query-DYuJXhMQ.d.ts.map
@@ -7,10 +7,10 @@ import { t as ModelResolver } from "./model-resolver-BPPJAsuh.js";
7
7
  import { t as IdGenerator } from "./id-generator--x6itQZ2.js";
8
8
  import { r as SessionContext, t as EventFactory } from "./event-factory-EL4szNWm.js";
9
9
  import { t as EDAKeepAlive } from "./keep-alive-Chl5SJxy.js";
10
- import { d as CompactionRunner } from "./compaction-DoTyQf6k.js";
11
- import { s as EDASinkRegistry, u as LiveEventBus } from "./sink-registry-Bz4bBJaC.js";
12
- import { a as EDAReducerStateSnapshot, r as EDAReducerRegistry } from "./reducer-registry-DjP1qqbs.js";
13
- import { r as EDAPromptProjector } from "./prompt-projector-BpRH-Ec-.js";
10
+ import { d as CompactionRunner } from "./compaction-CLCDOR1t.js";
11
+ import { s as EDASinkRegistry, u as LiveEventBus } from "./sink-registry-C2t3DI_g.js";
12
+ import { a as EDAReducerStateSnapshot, r as EDAReducerRegistry } from "./reducer-registry-DqljrD58.js";
13
+ import { r as EDAPromptProjector } from "./prompt-projector-CGo1TGyZ.js";
14
14
  import { t as RunScheduler } from "./run-scheduler-DvHWwWBJ.js";
15
15
  import { t as RunSchedulingWakeup } from "./run-scheduling-wakeup-CGgJ7RNe.js";
16
16
  import { r as EDAToolRegistry } from "./tool-registry-Dhs2KmYK.js";
@@ -145,7 +145,7 @@ interface ToolExecutorShape {
145
145
  declare const ToolExecutor_base: Context.ServiceClass<ToolExecutor, "@effect-durable-agent/ToolExecutor", ToolExecutorShape>;
146
146
  /** Executes sealed framework-owned tool calls and commits tool lifecycle boundaries. */
147
147
  declare class ToolExecutor extends ToolExecutor_base {
148
- static readonly Live: Layer.Layer<ToolExecutor, never, EDAToolRegistry | IdGenerator | EventFactory | SessionContext>;
148
+ static readonly Live: Layer.Layer<ToolExecutor, never, EventFactory | IdGenerator | SessionContext | EDAToolRegistry>;
149
149
  }
150
150
  //#endregion
151
151
  //#region src/services/inference-runner.d.ts
@@ -293,7 +293,7 @@ interface InferenceRunnerShape {
293
293
  declare const InferenceRunner_base: Context.ServiceClass<InferenceRunner, "@effect-durable-agent/InferenceRunner", InferenceRunnerShape>;
294
294
  /** Owns provider inference streams and routes them into durable/live inference emissions. */
295
295
  declare class InferenceRunner extends InferenceRunner_base {
296
- static readonly Live: Layer.Layer<InferenceRunner, never, ModelResolver | EDAToolRegistry | IdGenerator | EventFactory>;
296
+ static readonly Live: Layer.Layer<InferenceRunner, never, ModelResolver | EventFactory | IdGenerator | EDAToolRegistry>;
297
297
  }
298
298
  //#endregion
299
299
  //#region src/services/turn-runner.d.ts
@@ -546,7 +546,7 @@ interface TurnRunnerShape {
546
546
  declare const TurnRunner_base: Context.ServiceClass<TurnRunner, "@effect-durable-agent/TurnRunner", TurnRunnerShape>;
547
547
  /** Owns one turn: turn boundaries, inferences, tool handoff, and terminal turn events. */
548
548
  declare class TurnRunner extends TurnRunner_base {
549
- static readonly Live: Layer.Layer<TurnRunner, never, IdGenerator | EventFactory | InferenceRunner | ToolExecutor>;
549
+ static readonly Live: Layer.Layer<TurnRunner, never, EventFactory | IdGenerator | InferenceRunner | ToolExecutor>;
550
550
  }
551
551
  //#endregion
552
552
  //#region src/services/session-state.d.ts
@@ -860,8 +860,8 @@ interface SessionStateShape extends SessionEventSink {
860
860
  declare const SessionState_base: Context.ServiceClass<SessionState, "@effect-durable-agent/SessionState", SessionStateShape>;
861
861
  /** Internal authoritative live state and root control loop for one session. */
862
862
  declare class SessionState extends SessionState_base {
863
- static readonly Live: Layer.Layer<SessionState, EDASessionStoreError, RunSchedulingWakeup | RunScheduler | EDAKeepAlive | EDAPromptProjector | EDAReducerRegistry | EDASessionStore | LiveEventBus | IdGenerator | EventFactory | TurnRunner | CompactionRunner | SessionContext | EDASinkRegistry>;
863
+ static readonly Live: Layer.Layer<SessionState, EDASessionStoreError, RunScheduler | RunSchedulingWakeup | EDASessionStore | LiveEventBus | EDAReducerRegistry | CompactionRunner | EventFactory | IdGenerator | EDAKeepAlive | TurnRunner | EDAPromptProjector | SessionContext | EDASinkRegistry>;
864
864
  }
865
865
  //#endregion
866
866
  export { ToolExecutor as S, SessionStateShape as _, SessionCommandCompleted as a, InferenceRunner as b, SessionCommandResult as c, SessionForkedCommand as d, SessionNoRunnableCommand as f, SessionStateError as g, SessionState as h, SessionCommandCancelled as i, SessionDrainProcessed as l, SessionRunInput as m, SessionCommandAdmissionConflict as n, SessionCommandFailed as o, SessionNoRunnableReason as p, SessionCommandAdmissionError as r, SessionCommandOutcome as s, EDASubmittable as t, SessionDrainResult as u, SessionStateSnapshotData as v, InferenceRunnerStreamPart as x, TurnRunner as y };
867
- //# sourceMappingURL=session-state-5uD0FqQ8.d.ts.map
867
+ //# sourceMappingURL=session-state-13z-3YaF.d.ts.map
@@ -15,7 +15,7 @@ import { IdGenerator } from "./services/id-generator.js";
15
15
  import { n as SessionContext, t as EventFactory } from "./event-factory-QuC_UvyP.js";
16
16
  import { annotateEdaSpan, committedBatchAttributes, edaTraceContextFromSpan, eventBatchAttributes, toEdaExternalSpan, usageAttributes } from "./services/tracing.js";
17
17
  import { EDAKeepAlive } from "./services/keep-alive.js";
18
- import { n as EDASinkRegistry, r as LiveEventBus } from "./sink-registry-6CNeeRTt.js";
18
+ import { n as EDASinkRegistry, r as LiveEventBus } from "./sink-registry-CUIrrkXU.js";
19
19
  import { EDAPromptProjector, buildEDAPrompt } from "./services/prompt-projector.js";
20
20
  import { EDAReducerRegistry, decodeReducerState, encodeReducerState, reducerSchemaVersion } from "./services/reducer-registry.js";
21
21
  import { EDAToolRegistry } from "./services/tool-registry.js";
@@ -2992,7 +2992,7 @@ const makeLiveSessionState = Effect.gen(function* () {
2992
2992
  });
2993
2993
  yield* sinkRegistry.startSinkRunners({
2994
2994
  appendDurableBatch,
2995
- initialHead: (yield* Ref.get(state)).reduced.lastSeq,
2995
+ initialProjection: yield* Ref.get(state),
2996
2996
  publishEphemeral: publishEphemeralCore,
2997
2997
  scope: runtimeScope
2998
2998
  });
@@ -3094,4 +3094,4 @@ const isSessionNoRunnableCommand = (result) => "_tag" in result && result._tag =
3094
3094
  //#endregion
3095
3095
  export { SessionCommandOutcome as a, SessionNoRunnableReason as c, TurnRunner as d, InferenceRunner as f, SessionCommandFailed as i, SessionRunInput as l, SessionCommandCancelled as n, SessionForkedCommand as o, ToolExecutor as p, SessionCommandCompleted as r, SessionNoRunnableCommand as s, SessionCommandAdmissionConflict as t, SessionState as u };
3096
3096
 
3097
- //# sourceMappingURL=session-state-CN7DcLal.js.map
3097
+ //# sourceMappingURL=session-state-xXXyniwU.js.map