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.
Files changed (89) hide show
  1. package/dist/{command-queues-C8muEqeQ.d.ts → command-queues-DdDB_aYM.d.ts} +11 -18
  2. package/dist/{compaction-F4HEWzuI.d.ts → compaction-BEor3jKv.d.ts} +27 -8
  3. package/dist/compaction-BgDr5VJy.js +473 -0
  4. package/dist/compaction-BgDr5VJy.js.map +1 -0
  5. package/dist/{context-projection-C43pyxn2.d.ts → context-projection-n6Rdup0N.d.ts} +2 -2
  6. package/dist/domain/command-queues.d.ts +1 -1
  7. package/dist/domain/context-projection.d.ts +1 -1
  8. package/dist/domain/message-transcript.d.ts +1 -1
  9. package/dist/domain/model-usage.d.ts +2 -0
  10. package/dist/domain/model-usage.js +59 -0
  11. package/dist/domain/model-usage.js.map +1 -0
  12. package/dist/domain/reduced-state-schema.d.ts +11 -17
  13. package/dist/domain/reduced-state-schema.js +6 -11
  14. package/dist/domain/reduced-state-schema.js.map +1 -1
  15. package/dist/domain/reduced-state.d.ts +3 -2
  16. package/dist/domain/reduced-state.js +3 -2
  17. package/dist/{durable-DsV9PxZC.js → durable-BGFvX7Mh.js} +17 -80
  18. package/dist/durable-BGFvX7Mh.js.map +1 -0
  19. package/dist/{durable-B7M6TD_0.d.ts → durable-br2C1bWK.d.ts} +247 -4
  20. package/dist/envelope-DkZyMIgp.d.ts +191 -0
  21. package/dist/envelope-DxQzo5rN.js +82 -0
  22. package/dist/envelope-DxQzo5rN.js.map +1 -0
  23. package/dist/{event-factory-tcpLgdMN.js → event-factory-DTFdy0Cb.js} +3 -2
  24. package/dist/{event-factory-tcpLgdMN.js.map → event-factory-DTFdy0Cb.js.map} +1 -1
  25. package/dist/{event-factory-CLJcyymV.d.ts → event-factory-pFzsPlDs.d.ts} +4 -4
  26. package/dist/{events-Bb9-Cu-7.d.ts → events-LZFNoESe.d.ts} +2 -188
  27. package/dist/index.d.ts +5 -4
  28. package/dist/index.js +4 -3
  29. package/dist/{message-transcript-DsKTT47f.d.ts → message-transcript-DQNlzxle.d.ts} +3 -3
  30. package/dist/model-resolver-BPPJAsuh.d.ts +18 -0
  31. package/dist/model-usage-CdBEkTwU.d.ts +55 -0
  32. package/dist/{prompt-projector-hqPh5-NI.d.ts → prompt-projector-f4ElyXCE.d.ts} +4 -4
  33. package/dist/{reduced-state-TMi7ISla.js → reduced-state-DF0-6mbR.js} +25 -30
  34. package/dist/reduced-state-DF0-6mbR.js.map +1 -0
  35. package/dist/{reducer-registry--vQFATXb.d.ts → reducer-registry-aFjz_ZLT.d.ts} +2 -2
  36. package/dist/{runtime-BO9KJq_Y.d.ts → runtime-DbTCb32-.d.ts} +5 -5
  37. package/dist/services/compaction.d.ts +1 -1
  38. package/dist/services/compaction.js +1 -426
  39. package/dist/services/model-resolver.d.ts +2 -0
  40. package/dist/services/model-resolver.js +17 -0
  41. package/dist/services/model-resolver.js.map +1 -0
  42. package/dist/services/prompt-projector.d.ts +1 -1
  43. package/dist/services/reducer-registry.d.ts +1 -1
  44. package/dist/services/runtime-layer.d.ts +14 -14
  45. package/dist/services/runtime-layer.js +8 -7
  46. package/dist/services/runtime-layer.js.map +1 -1
  47. package/dist/services/runtime.d.ts +1 -1
  48. package/dist/services/runtime.js +3 -2
  49. package/dist/services/runtime.js.map +1 -1
  50. package/dist/services/session-event-observer.d.ts +1 -1
  51. package/dist/services/session-query.d.ts +1 -1
  52. package/dist/services/session-query.js +3 -3
  53. package/dist/services/session-state.d.ts +1 -1
  54. package/dist/services/session-state.js +1 -1
  55. package/dist/services/session-store.d.ts +1 -1
  56. package/dist/services/session-store.js +2 -1
  57. package/dist/services/session-store.js.map +1 -1
  58. package/dist/services/sink-checkpoint-store.d.ts +1 -1
  59. package/dist/services/sink-registry.d.ts +1 -1
  60. package/dist/services/sink-registry.js +1 -1
  61. package/dist/services/tool-registry.d.ts +1 -1
  62. package/dist/services/tracing.d.ts +1 -1
  63. package/dist/{session-event-observer-D_aoFnQs.d.ts → session-event-observer-DaFMKKNc.d.ts} +2 -2
  64. package/dist/{session-query-_Z3Kw6jj.d.ts → session-query-l8xpJYp8.d.ts} +8 -8
  65. package/dist/{session-state-BfoXKafd.d.ts → session-state-YHFzOGDf.d.ts} +16 -16
  66. package/dist/{session-state-C4m0j6CJ.js → session-state-aIqe9CLa.js} +30 -39
  67. package/dist/session-state-aIqe9CLa.js.map +1 -0
  68. package/dist/{session-store-ofm8FFxs.d.ts → session-store-Cpi_NwTR.d.ts} +3 -3
  69. package/dist/{sink-checkpoint-store-BQVbI9DQ.d.ts → sink-checkpoint-store-M7qIxoSH.d.ts} +2 -2
  70. package/dist/{sink-registry-DH6uiEgP.js → sink-registry-NDgeyzO0.js} +4 -4
  71. package/dist/{sink-registry-DH6uiEgP.js.map → sink-registry-NDgeyzO0.js.map} +1 -1
  72. package/dist/{sink-registry-PRYbj6dp.d.ts → sink-registry-T1wOUuzq.d.ts} +9 -9
  73. package/dist/testkit/layers.d.ts +17 -14
  74. package/dist/testkit/layers.js +10 -8
  75. package/dist/testkit/layers.js.map +1 -1
  76. package/dist/{tool-registry-ClHdr_G5.d.ts → tool-registry-BJaVNtw4.d.ts} +3 -3
  77. package/dist/types/events/durable.d.ts +2 -2
  78. package/dist/types/events/durable.js +2 -2
  79. package/dist/types/events.d.ts +4 -3
  80. package/dist/types/events.js +3 -2
  81. package/dist/types/events.js.map +1 -1
  82. package/dist/websocket.d.ts +83 -4
  83. package/dist/websocket.js +82 -12
  84. package/dist/websocket.js.map +1 -1
  85. package/package.json +10 -1
  86. package/dist/durable-DsV9PxZC.js.map +0 -1
  87. package/dist/reduced-state-TMi7ISla.js.map +0 -1
  88. package/dist/services/compaction.js.map +0 -1
  89. package/dist/session-state-C4m0j6CJ.js.map +0 -1
@@ -0,0 +1 @@
1
+ {"version":3,"file":"durable-BGFvX7Mh.js","names":[],"sources":["../src/types/events/internal.ts","../src/types/events/durable.ts"],"sourcesContent":["import * as Schema from \"effect/Schema\";\n\nimport {\n DurableEventEnvelope,\n EphemeralEventEnvelope,\n EventType,\n effectDurableAgentNamespace,\n schemaV1,\n} from \"./envelope\";\n\n/** Build a built-in durable event schema from its fixed event type and payload schema. */\nexport const durableEventSchema = <const Type extends EventType, Payload extends Schema.Top>(\n type: Type,\n payload: Payload,\n) =>\n Schema.Struct({\n ...DurableEventEnvelope.fields,\n namespace: Schema.Literal(effectDurableAgentNamespace),\n type: Schema.Literal(type),\n schemaVersion: Schema.Literal(schemaV1),\n payload,\n });\n\n/** Build a built-in ephemeral event schema from its fixed event type and payload schema. */\nexport const ephemeralEventSchema = <const Type extends EventType, Payload extends Schema.Top>(\n type: Type,\n payload: Payload,\n) =>\n Schema.Struct({\n ...EphemeralEventEnvelope.fields,\n namespace: Schema.Literal(effectDurableAgentNamespace),\n type: Schema.Literal(type),\n schemaVersion: Schema.Literal(schemaV1),\n payload,\n });\n","import * as Effect from \"effect/Effect\";\nimport * as Schema from \"effect/Schema\";\nimport * as Prompt from \"effect/unstable/ai/Prompt\";\n\nimport { EDACommand, UserMessageContent } from \"../commands\";\nimport {\n BaseStateId,\n CommandId,\n CompactionId,\n ContextVersion,\n InferenceId,\n MessageId,\n RunId,\n SequenceNumber,\n SummaryId,\n ToolCallId,\n TurnId,\n} from \"../core\";\nimport {\n DurableEventEnvelope,\n FailurePayload,\n ModelSelectionPayload,\n ProviderPartId,\n SystemPromptText,\n ToolName,\n UsagePayload,\n effectDurableAgentNamespace,\n makeEventType,\n schemaV1,\n} from \"./envelope\";\nimport { durableEventSchema } from \"./internal\";\nimport { EDARunTrace, makeEDARunTrace } from \"../tracing\";\n\n/** Establishes a session's execution policy before its first run; not a model-switch operation. */\nexport const sessionConfiguredEventType = makeEventType(\"SessionConfigured\");\nexport const SessionConfiguredEvent = durableEventSchema(\n sessionConfiguredEventType,\n Schema.Struct({ modelSelection: ModelSelectionPayload }),\n);\nexport type SessionConfiguredEvent = typeof SessionConfiguredEvent.Type;\n\n/** Event type values for durable command lifecycle events. */\nexport const commandAdmittedEventType = makeEventType(\"CommandAdmitted\");\nexport const commandStartedEventType = makeEventType(\"CommandStarted\");\nexport const commandCompletedEventType = makeEventType(\"CommandCompleted\");\nexport const commandFailedEventType = makeEventType(\"CommandFailed\");\nexport const commandCancelledEventType = makeEventType(\"CommandCancelled\");\n\n/** Payload recorded when a command enters the durable session log. */\nexport const CommandAdmittedPayload = Schema.Struct({ command: EDACommand });\nexport type CommandAdmittedPayload = typeof CommandAdmittedPayload.Type;\nexport const CommandAdmittedEvent = durableEventSchema(\n commandAdmittedEventType,\n CommandAdmittedPayload,\n);\nexport type CommandAdmittedEvent = typeof CommandAdmittedEvent.Type;\n\n/** Payload recorded when command execution starts. */\nexport const CommandStartedPayload = Schema.Struct({ commandId: CommandId });\nexport type CommandStartedPayload = typeof CommandStartedPayload.Type;\nexport const CommandStartedEvent = durableEventSchema(\n commandStartedEventType,\n CommandStartedPayload,\n);\nexport type CommandStartedEvent = typeof CommandStartedEvent.Type;\n\n/** Payload recorded when command execution completes normally. */\nexport const CommandCompletedPayload = Schema.Struct({ commandId: CommandId });\nexport type CommandCompletedPayload = typeof CommandCompletedPayload.Type;\nexport const CommandCompletedEvent = durableEventSchema(\n commandCompletedEventType,\n CommandCompletedPayload,\n);\nexport type CommandCompletedEvent = typeof CommandCompletedEvent.Type;\n\n/** Payload recorded when command execution fails. */\nexport const CommandFailedPayload = Schema.Struct({ commandId: CommandId, error: FailurePayload });\nexport type CommandFailedPayload = typeof CommandFailedPayload.Type;\nexport const CommandFailedEvent = durableEventSchema(commandFailedEventType, CommandFailedPayload);\nexport type CommandFailedEvent = typeof CommandFailedEvent.Type;\n\n/** Payload recorded when a command is cancelled before completion. */\nexport const CommandCancelledPayload = Schema.Struct({\n commandId: CommandId,\n reason: Schema.String,\n});\nexport type CommandCancelledPayload = typeof CommandCancelledPayload.Type;\nexport const CommandCancelledEvent = durableEventSchema(\n commandCancelledEventType,\n CommandCancelledPayload,\n);\nexport type CommandCancelledEvent = typeof CommandCancelledEvent.Type;\n\n/** Durable event union for the command lifecycle. */\nexport const CommandEvent = Schema.Union([\n CommandAdmittedEvent,\n CommandStartedEvent,\n CommandCompletedEvent,\n CommandFailedEvent,\n CommandCancelledEvent,\n]);\nexport type CommandEvent = typeof CommandEvent.Type;\n\n/** Event type values for durable message lifecycle events. */\nexport const systemMessageCommittedEventType = makeEventType(\"SystemMessageCommitted\");\nexport const userMessageCommittedEventType = makeEventType(\"UserMessageCommitted\");\nexport const steeringMessageQueuedEventType = makeEventType(\"SteeringMessageQueued\");\nexport const steeringMessageCancelledEventType = makeEventType(\"SteeringMessageCancelled\");\nexport const userMessageSubmittedEventType = makeEventType(\"UserMessageSubmitted\");\nexport const userMessagePromotedEventType = makeEventType(\"UserMessagePromoted\");\nexport const userMessageCancelledEventType = makeEventType(\"UserMessageCancelled\");\nexport const messageQueuePausedEventType = makeEventType(\"MessageQueuePaused\");\nexport const pendingMessagesPausedEventType = makeEventType(\"PendingMessagesPaused\");\nexport const assistantMessageCommittedEventType = makeEventType(\"AssistantMessageCommitted\");\nexport const assistantMessageImportedEventType = makeEventType(\"AssistantMessageImported\");\nexport const assistantPartialCommittedEventType = makeEventType(\"AssistantPartialCommitted\");\n\n/** Semantic assistant content derived from canonical prompt parts for query convenience. */\nexport const AssistantMessageContent = Schema.Struct({\n text: Schema.String,\n reasoning: Schema.optionalKey(Schema.String),\n});\nexport type AssistantMessageContent = typeof AssistantMessageContent.Type;\n\n/** Exact assistant-role prompt parts sent to the model for cache-faithful replay. */\nexport const AssistantPromptPart = Schema.Union([\n Prompt.TextPart,\n Prompt.FilePart,\n Prompt.ReasoningPart,\n Prompt.ToolCallPart,\n Prompt.ToolResultPart,\n Prompt.ToolApprovalRequestPart,\n]);\nexport type AssistantPromptPart = typeof AssistantPromptPart.Type;\n\n/** Exact non-empty assistant-role prompt content sent to the model. */\nexport const AssistantPromptParts = Schema.NonEmptyArray(AssistantPromptPart);\nexport type AssistantPromptParts = typeof AssistantPromptParts.Type;\n\n/** Exact assistant tool-call prompt part with EDA-branded provider identity. */\nexport const ToolCallPromptPart = Schema.Struct({\n ...Prompt.ToolCallPart.fields,\n id: ProviderPartId,\n name: ToolName,\n});\nexport type ToolCallPromptPart = typeof ToolCallPromptPart.Type;\n\n/** Exact tool-role prompt part sent to the model with EDA-branded provider identity. */\nexport const ToolPromptPart = Schema.Struct({\n ...Prompt.ToolResultPart.fields,\n id: ProviderPartId,\n name: ToolName,\n});\nexport type ToolPromptPart = typeof ToolPromptPart.Type;\n\n/** Payload recorded when app instructions become durable system-message context. */\nexport const SystemMessageCommittedPayload = Schema.Struct({\n messageId: MessageId,\n content: SystemPromptText,\n});\nexport type SystemMessageCommittedPayload = typeof SystemMessageCommittedPayload.Type;\nexport const SystemMessageCommittedEvent = durableEventSchema(\n systemMessageCommittedEventType,\n SystemMessageCommittedPayload,\n);\nexport type SystemMessageCommittedEvent = typeof SystemMessageCommittedEvent.Type;\n\n/** Payload recorded when a user message becomes durable session context. */\nexport const UserMessageCommittedPayload = Schema.Struct({\n commandId: CommandId,\n messageId: MessageId,\n content: UserMessageContent,\n});\nexport type UserMessageCommittedPayload = typeof UserMessageCommittedPayload.Type;\nexport const UserMessageCommittedEvent = durableEventSchema(\n userMessageCommittedEventType,\n UserMessageCommittedPayload,\n);\nexport type UserMessageCommittedEvent = typeof UserMessageCommittedEvent.Type;\n\n/** Payload recorded when steering context is queued for a future turn. */\nexport const SteeringMessageQueuedPayload = Schema.Struct({\n commandId: CommandId,\n messageId: MessageId,\n runId: RunId,\n content: UserMessageContent,\n});\nexport type SteeringMessageQueuedPayload = typeof SteeringMessageQueuedPayload.Type;\nexport const SteeringMessageQueuedEvent = durableEventSchema(\n steeringMessageQueuedEventType,\n SteeringMessageQueuedPayload,\n);\nexport type SteeringMessageQueuedEvent = typeof SteeringMessageQueuedEvent.Type;\n\n/** Payload recorded when queued steering will never be consumed by its target run. */\nexport const SteeringMessageCancelledPayload = Schema.Struct({\n messageId: MessageId,\n runId: RunId,\n reason: Schema.String,\n});\nexport type SteeringMessageCancelledPayload = typeof SteeringMessageCancelledPayload.Type;\nexport const SteeringMessageCancelledEvent = durableEventSchema(\n steeringMessageCancelledEventType,\n SteeringMessageCancelledPayload,\n);\nexport type SteeringMessageCancelledEvent = typeof SteeringMessageCancelledEvent.Type;\n\nexport const UserMessageDisposition = Schema.Literals([\"queue\", \"steer\"]);\nexport type UserMessageDisposition = typeof UserMessageDisposition.Type;\n\nexport const UserMessageSubmittedPayload = Schema.Struct({\n commandId: CommandId,\n messageId: MessageId,\n disposition: UserMessageDisposition,\n content: UserMessageContent,\n});\nexport type UserMessageSubmittedPayload = typeof UserMessageSubmittedPayload.Type;\nexport const UserMessageSubmittedEvent = durableEventSchema(\n userMessageSubmittedEventType,\n UserMessageSubmittedPayload,\n);\nexport type UserMessageSubmittedEvent = typeof UserMessageSubmittedEvent.Type;\n\nexport const UserMessagePromotedPayload = Schema.Struct({\n commandId: CommandId,\n messageId: MessageId,\n from: Schema.Literal(\"queue\"),\n to: Schema.Literal(\"steer\"),\n});\nexport type UserMessagePromotedPayload = typeof UserMessagePromotedPayload.Type;\nexport const UserMessagePromotedEvent = durableEventSchema(\n userMessagePromotedEventType,\n UserMessagePromotedPayload,\n);\nexport type UserMessagePromotedEvent = typeof UserMessagePromotedEvent.Type;\n\nexport const UserMessageCancellationReason = Schema.Literals([\n \"edit\",\n \"user-cancel\",\n \"clear-paused-queue\",\n]);\nexport type UserMessageCancellationReason = typeof UserMessageCancellationReason.Type;\nexport const UserMessageCancelledPayload = Schema.Struct({\n commandId: CommandId,\n messageId: MessageId,\n reason: UserMessageCancellationReason,\n});\nexport type UserMessageCancelledPayload = typeof UserMessageCancelledPayload.Type;\nexport const UserMessageCancelledEvent = durableEventSchema(\n userMessageCancelledEventType,\n UserMessageCancelledPayload,\n);\nexport type UserMessageCancelledEvent = typeof UserMessageCancelledEvent.Type;\n\n/** Legacy V1 pause fact retained for replay compatibility. */\nexport const MessageQueuePausedPayload = Schema.Struct({\n stopCommandId: CommandId,\n runId: RunId,\n messageIds: Schema.Array(MessageId),\n reason: Schema.Literal(\"user-interrupted\"),\n});\nexport type MessageQueuePausedPayload = typeof MessageQueuePausedPayload.Type;\nexport const MessageQueuePausedEvent = durableEventSchema(\n messageQueuePausedEventType,\n MessageQueuePausedPayload,\n);\nexport type MessageQueuePausedEvent = typeof MessageQueuePausedEvent.Type;\n\nexport const PendingMessagesPausedPayload = Schema.Struct({\n interruptionCommandId: CommandId,\n runId: RunId,\n messageIds: Schema.NonEmptyArray(MessageId),\n reason: Schema.Literal(\"user-interrupted\"),\n});\nexport type PendingMessagesPausedPayload = typeof PendingMessagesPausedPayload.Type;\nexport const PendingMessagesPausedEvent = durableEventSchema(\n pendingMessagesPausedEventType,\n PendingMessagesPausedPayload,\n);\nexport type PendingMessagesPausedEvent = typeof PendingMessagesPausedEvent.Type;\n\n/** Payload recorded when an assistant message is durably finalized. */\nexport const AssistantMessageCommittedPayload = Schema.Struct({\n messageId: MessageId,\n runId: RunId,\n turnId: TurnId,\n inferenceId: InferenceId,\n promptParts: AssistantPromptParts,\n});\nexport type AssistantMessageCommittedPayload = typeof AssistantMessageCommittedPayload.Type;\nexport const AssistantMessageCommittedEvent = durableEventSchema(\n assistantMessageCommittedEventType,\n AssistantMessageCommittedPayload,\n);\nexport type AssistantMessageCommittedEvent = typeof AssistantMessageCommittedEvent.Type;\n\n/** Payload recorded when pre-existing assistant context is imported from an external transport. */\nexport const AssistantMessageImportedPayload = Schema.Struct({\n messageId: MessageId,\n runId: RunId,\n turnId: TurnId,\n inferenceId: InferenceId,\n promptParts: AssistantPromptParts,\n});\nexport type AssistantMessageImportedPayload = typeof AssistantMessageImportedPayload.Type;\nexport const AssistantMessageImportedEvent = durableEventSchema(\n assistantMessageImportedEventType,\n AssistantMessageImportedPayload,\n);\nexport type AssistantMessageImportedEvent = typeof AssistantMessageImportedEvent.Type;\n\n/** Payload recorded when a partial assistant message is preserved durably. */\nexport const AssistantPartialCommittedPayload = Schema.Struct({\n messageId: MessageId,\n runId: RunId,\n turnId: TurnId,\n inferenceId: InferenceId,\n promptParts: AssistantPromptParts,\n reason: Schema.String,\n});\nexport type AssistantPartialCommittedPayload = typeof AssistantPartialCommittedPayload.Type;\nexport const AssistantPartialCommittedEvent = durableEventSchema(\n assistantPartialCommittedEventType,\n AssistantPartialCommittedPayload,\n);\nexport type AssistantPartialCommittedEvent = typeof AssistantPartialCommittedEvent.Type;\n\n/** Durable event union for message commit/queue boundaries. */\nexport const MessageEvent = Schema.Union([\n SystemMessageCommittedEvent,\n UserMessageCommittedEvent,\n SteeringMessageQueuedEvent,\n SteeringMessageCancelledEvent,\n UserMessageSubmittedEvent,\n UserMessagePromotedEvent,\n UserMessageCancelledEvent,\n MessageQueuePausedEvent,\n PendingMessagesPausedEvent,\n AssistantMessageCommittedEvent,\n AssistantMessageImportedEvent,\n AssistantPartialCommittedEvent,\n]);\nexport type MessageEvent = typeof MessageEvent.Type;\n\n/** Event type values for durable run lifecycle events. */\nexport const runStartedEventType = makeEventType(\"RunStarted\");\nexport const runCompletedEventType = makeEventType(\"RunCompleted\");\nexport const runFailedEventType = makeEventType(\"RunFailed\");\n/** @deprecated Legacy terminal retained for durable replay. Emit `RunFailed` with an interruption-coded `FailurePayload` instead. */\nexport const runInterruptedEventType = makeEventType(\"RunInterrupted\");\n\n/** Payload recorded when a run starts with its intended model selection. */\nexport const RunStartedPayload = Schema.Struct({\n runId: RunId,\n commandIds: Schema.Array(CommandId),\n modelSelection: ModelSelectionPayload,\n trace: EDARunTrace.pipe(Schema.withConstructorDefault(Effect.sync(() => makeEDARunTrace()))),\n});\nexport type RunStartedPayload = typeof RunStartedPayload.Type;\nexport const RunStartedEvent = durableEventSchema(runStartedEventType, RunStartedPayload);\nexport type RunStartedEvent = typeof RunStartedEvent.Type;\n\n/** Payload recorded when a run completes. */\nexport const RunCompletedPayload = Schema.Struct({ runId: RunId });\nexport type RunCompletedPayload = typeof RunCompletedPayload.Type;\nexport const RunCompletedEvent = durableEventSchema(runCompletedEventType, RunCompletedPayload);\nexport type RunCompletedEvent = typeof RunCompletedEvent.Type;\n\n/** Payload recorded when a run fails. */\nexport const RunFailedPayload = Schema.Struct({ runId: RunId, error: FailurePayload });\nexport type RunFailedPayload = typeof RunFailedPayload.Type;\nexport const RunFailedEvent = durableEventSchema(runFailedEventType, RunFailedPayload);\nexport type RunFailedEvent = typeof RunFailedEvent.Type;\n\n/** @deprecated Legacy payload retained for durable replay. New interruptions use `RunFailedPayload` with `error.code = \"run.interrupted\"`. */\nexport const RunInterruptedPayload = Schema.Struct({ runId: RunId, reason: Schema.String });\n/** @deprecated Use `RunFailedPayload` with interruption metadata. */\nexport type RunInterruptedPayload = typeof RunInterruptedPayload.Type;\n/** @deprecated Legacy event schema retained for durable replay; new producers emit `RunFailedEvent`. */\nexport const RunInterruptedEvent = durableEventSchema(\n runInterruptedEventType,\n RunInterruptedPayload,\n);\n/** @deprecated Use `RunFailedEvent` with interruption metadata. */\nexport type RunInterruptedEvent = typeof RunInterruptedEvent.Type;\n\n/** Durable event union for run lifecycle boundaries. */\nexport const RunEvent = Schema.Union([\n RunStartedEvent,\n RunCompletedEvent,\n RunFailedEvent,\n RunInterruptedEvent,\n]);\nexport type RunEvent = typeof RunEvent.Type;\n\n/** Event type value for the durable barrier written after real startup recovery work. */\nexport const recoveryCompletedEventType = makeEventType(\"RecoveryCompleted\");\n\n/** Explicit relationship between an interrupted run and its startup-recovery replacement. */\nexport const RecoveryContinuation = Schema.Struct({\n commandId: CommandId,\n interruptedRunId: RunId,\n replacementRunId: RunId,\n});\nexport type RecoveryContinuation = typeof RecoveryContinuation.Type;\n\n/**\n * Durable completion barrier for a startup recovery transaction that repaired\n * unfinished state. Idle runtime construction does not emit this event.\n */\nexport const RecoveryCompletedPayload = Schema.Struct({\n trigger: Schema.Literal(\"runtime-restart\"),\n continuation: Schema.optionalKey(RecoveryContinuation),\n});\nexport type RecoveryCompletedPayload = typeof RecoveryCompletedPayload.Type;\nexport const RecoveryCompletedEvent = durableEventSchema(\n recoveryCompletedEventType,\n RecoveryCompletedPayload,\n);\nexport type RecoveryCompletedEvent = typeof RecoveryCompletedEvent.Type;\n\n/** Durable facts written only by the framework startup-recovery transaction. */\nexport const RecoveryEvent = RecoveryCompletedEvent;\nexport type RecoveryEvent = typeof RecoveryEvent.Type;\n\n/** Event type values for durable turn lifecycle events. */\nexport const turnStartedEventType = makeEventType(\"TurnStarted\");\nexport const turnCompletedEventType = makeEventType(\"TurnCompleted\");\nexport const turnFailedEventType = makeEventType(\"TurnFailed\");\n/** @deprecated Legacy terminal retained for durable replay. Emit `TurnFailed` with an interruption-coded `FailurePayload` instead. */\nexport const turnStoppedEventType = makeEventType(\"TurnStopped\");\n\n/** Payload recorded when one turn starts inside a run. */\nexport const TurnStartedPayload = Schema.Struct({\n runId: RunId,\n turnId: TurnId,\n inputMessageIds: Schema.optionalKey(Schema.Array(MessageId)),\n});\nexport type TurnStartedPayload = typeof TurnStartedPayload.Type;\nexport const TurnStartedEvent = durableEventSchema(turnStartedEventType, TurnStartedPayload);\nexport type TurnStartedEvent = typeof TurnStartedEvent.Type;\n\n/** Payload recorded when one turn completes. */\nexport const TurnCompletedPayload = Schema.Struct({\n runId: RunId,\n turnId: TurnId,\n usage: Schema.optionalKey(UsagePayload),\n});\nexport type TurnCompletedPayload = typeof TurnCompletedPayload.Type;\nexport const TurnCompletedEvent = durableEventSchema(turnCompletedEventType, TurnCompletedPayload);\nexport type TurnCompletedEvent = typeof TurnCompletedEvent.Type;\n\n/** Payload recorded when one turn fails. */\nexport const TurnFailedPayload = Schema.Struct({\n runId: RunId,\n turnId: TurnId,\n error: FailurePayload,\n});\nexport type TurnFailedPayload = typeof TurnFailedPayload.Type;\nexport const TurnFailedEvent = durableEventSchema(turnFailedEventType, TurnFailedPayload);\nexport type TurnFailedEvent = typeof TurnFailedEvent.Type;\n\n/** @deprecated Legacy payload retained for durable replay. New stops use `TurnFailedPayload` with `error.code = \"turn.interrupted\"`. */\nexport const TurnStoppedPayload = Schema.Struct({\n runId: RunId,\n turnId: TurnId,\n reason: Schema.String,\n});\n/** @deprecated Use `TurnFailedPayload` with interruption metadata. */\nexport type TurnStoppedPayload = typeof TurnStoppedPayload.Type;\n/** @deprecated Legacy event schema retained for durable replay; new producers emit `TurnFailedEvent`. */\nexport const TurnStoppedEvent = durableEventSchema(turnStoppedEventType, TurnStoppedPayload);\n/** @deprecated Use `TurnFailedEvent` with interruption metadata. */\nexport type TurnStoppedEvent = typeof TurnStoppedEvent.Type;\n\n/** Durable event union for turn lifecycle boundaries. */\nexport const TurnEvent = Schema.Union([\n TurnStartedEvent,\n TurnCompletedEvent,\n TurnFailedEvent,\n TurnStoppedEvent,\n]);\nexport type TurnEvent = typeof TurnEvent.Type;\n\n/** Event type values for durable model-inference lifecycle events. */\nexport const inferenceStartedEventType = makeEventType(\"InferenceStarted\");\nexport const inferenceCompletedEventType = makeEventType(\"InferenceCompleted\");\nexport const inferenceFailedEventType = makeEventType(\"InferenceFailed\");\n\n/** Payload recorded when one model inference starts for a turn. */\nexport const InferenceStartedPayload = Schema.Struct({\n runId: RunId,\n turnId: TurnId,\n inferenceId: InferenceId,\n});\nexport type InferenceStartedPayload = typeof InferenceStartedPayload.Type;\nexport const InferenceStartedEvent = durableEventSchema(\n inferenceStartedEventType,\n InferenceStartedPayload,\n);\nexport type InferenceStartedEvent = typeof InferenceStartedEvent.Type;\n\n/** Payload recorded when one model inference completes. */\nexport const InferenceCompletedPayload = Schema.Struct({\n runId: RunId,\n turnId: TurnId,\n inferenceId: InferenceId,\n finishReason: Schema.optionalKey(Schema.String),\n usage: Schema.optionalKey(UsagePayload),\n responseMetadata: Schema.optionalKey(Schema.Unknown),\n finishMetadata: Schema.optionalKey(Schema.Unknown),\n});\nexport type InferenceCompletedPayload = typeof InferenceCompletedPayload.Type;\nexport const InferenceCompletedEvent = durableEventSchema(\n inferenceCompletedEventType,\n InferenceCompletedPayload,\n);\nexport type InferenceCompletedEvent = typeof InferenceCompletedEvent.Type;\n\n/** Payload recorded when one model inference fails or is interrupted. */\nexport const InferenceFailedPayload = Schema.Struct({\n runId: RunId,\n turnId: TurnId,\n inferenceId: InferenceId,\n error: FailurePayload,\n});\nexport type InferenceFailedPayload = typeof InferenceFailedPayload.Type;\nexport const InferenceFailedEvent = durableEventSchema(\n inferenceFailedEventType,\n InferenceFailedPayload,\n);\nexport type InferenceFailedEvent = typeof InferenceFailedEvent.Type;\n\n/** Durable event union for canonical model-inference lifecycle boundaries. */\nexport const InferenceEvent = Schema.Union([\n InferenceStartedEvent,\n InferenceCompletedEvent,\n InferenceFailedEvent,\n]);\nexport type InferenceEvent = typeof InferenceEvent.Type;\n\n/** Event type values for durable tool lifecycle events. */\nexport const toolCallCreatedEventType = makeEventType(\"ToolCallCreated\");\nexport const toolCallRejectedEventType = makeEventType(\"ToolCallRejected\");\nexport const toolCallStartedEventType = makeEventType(\"ToolCallStarted\");\nexport const toolCallCompletedEventType = makeEventType(\"ToolCallCompleted\");\nexport const toolCallFailedEventType = makeEventType(\"ToolCallFailed\");\n\n/** Reason a model-requested tool call was rejected before execution. */\nexport const ToolCallRejectionReason = Schema.Literals([\"unknown-tool\", \"invalid-params\"]);\nexport type ToolCallRejectionReason = typeof ToolCallRejectionReason.Type;\n\n/** Exact synthetic tool-result feedback for a rejected model-requested tool call. */\nexport const ToolCallRejectionFeedback = Schema.Struct({\n message: Schema.String,\n reason: ToolCallRejectionReason,\n modelFeedback: Schema.NonEmptyString,\n});\nexport type ToolCallRejectionFeedback = typeof ToolCallRejectionFeedback.Type;\n\n/** Exact prompt part for a rejected model-requested tool call. */\nexport const ToolRejectionPromptPart = Schema.Struct({\n ...ToolPromptPart.fields,\n isFailure: Schema.Literal(true),\n result: ToolCallRejectionFeedback,\n});\nexport type ToolRejectionPromptPart = typeof ToolRejectionPromptPart.Type;\n\n/** Exact prompt part for a successful framework-owned tool result. */\nexport const ToolSuccessPromptPart = Schema.Struct({\n ...ToolPromptPart.fields,\n isFailure: Schema.Literal(false),\n result: Schema.Unknown,\n});\nexport type ToolSuccessPromptPart = typeof ToolSuccessPromptPart.Type;\n\n/** Exact prompt part for a failed framework-owned tool result. */\nexport const ToolFailurePromptPart = Schema.Struct({\n ...ToolPromptPart.fields,\n isFailure: Schema.Literal(true),\n result: FailurePayload,\n});\nexport type ToolFailurePromptPart = typeof ToolFailurePromptPart.Type;\n\n/** Payload recorded once streamed tool parameters validate and become executable. */\nexport const ToolCallCreatedPayload = Schema.Struct({\n runId: RunId,\n turnId: TurnId,\n inferenceId: InferenceId,\n toolCallId: ToolCallId,\n promptPart: ToolCallPromptPart,\n});\nexport type ToolCallCreatedPayload = typeof ToolCallCreatedPayload.Type;\nexport const ToolCallCreatedEvent = durableEventSchema(\n toolCallCreatedEventType,\n ToolCallCreatedPayload,\n);\nexport type ToolCallCreatedEvent = typeof ToolCallCreatedEvent.Type;\n\n/** Payload recorded when a model-requested tool call is not executable. */\nexport const ToolCallRejectedPayload = Schema.Struct({\n runId: RunId,\n turnId: TurnId,\n inferenceId: InferenceId,\n toolCallId: ToolCallId,\n promptPart: ToolRejectionPromptPart,\n});\nexport type ToolCallRejectedPayload = typeof ToolCallRejectedPayload.Type;\nexport const ToolCallRejectedEvent = durableEventSchema(\n toolCallRejectedEventType,\n ToolCallRejectedPayload,\n);\nexport type ToolCallRejectedEvent = typeof ToolCallRejectedEvent.Type;\n\n/** Payload recorded when framework-owned tool execution starts. */\nexport const ToolCallStartedPayload = Schema.Struct({ toolCallId: ToolCallId });\nexport type ToolCallStartedPayload = typeof ToolCallStartedPayload.Type;\nexport const ToolCallStartedEvent = durableEventSchema(\n toolCallStartedEventType,\n ToolCallStartedPayload,\n);\nexport type ToolCallStartedEvent = typeof ToolCallStartedEvent.Type;\n\n/** Payload recorded when a tool call completes with a result. */\nexport const ToolCallCompletedPayload = Schema.Struct({\n toolCallId: ToolCallId,\n promptPart: ToolSuccessPromptPart,\n});\nexport type ToolCallCompletedPayload = typeof ToolCallCompletedPayload.Type;\nexport const ToolCallCompletedEvent = durableEventSchema(\n toolCallCompletedEventType,\n ToolCallCompletedPayload,\n);\nexport type ToolCallCompletedEvent = typeof ToolCallCompletedEvent.Type;\n\n/** Payload recorded when a tool call fails. */\nexport const ToolCallFailedPayload = Schema.Struct({\n toolCallId: ToolCallId,\n error: Schema.optionalKey(FailurePayload),\n promptPart: ToolFailurePromptPart,\n});\nexport type ToolCallFailedPayload = typeof ToolCallFailedPayload.Type;\nexport const ToolCallFailedEvent = durableEventSchema(\n toolCallFailedEventType,\n ToolCallFailedPayload,\n);\nexport type ToolCallFailedEvent = typeof ToolCallFailedEvent.Type;\n\n/** Durable event union for tool lifecycle boundaries. */\nexport const ToolCallEvent = Schema.Union([\n ToolCallCreatedEvent,\n ToolCallRejectedEvent,\n ToolCallStartedEvent,\n ToolCallCompletedEvent,\n ToolCallFailedEvent,\n]);\nexport type ToolCallEvent = typeof ToolCallEvent.Type;\n\n/** Event type values for durable stop-control events. */\nexport const stopTurnRequestedEventType = makeEventType(\"StopTurnRequested\");\nexport const stopTurnAppliedEventType = makeEventType(\"StopTurnApplied\");\n\n/** Payload recorded when a stop command targets active or future turn work. */\nexport const StopTurnRequestedPayload = Schema.Struct({\n commandId: CommandId,\n runId: Schema.optionalKey(RunId),\n turnId: Schema.optionalKey(TurnId),\n});\nexport type StopTurnRequestedPayload = typeof StopTurnRequestedPayload.Type;\nexport const StopTurnRequestedEvent = durableEventSchema(\n stopTurnRequestedEventType,\n StopTurnRequestedPayload,\n);\nexport type StopTurnRequestedEvent = typeof StopTurnRequestedEvent.Type;\n\n/** Payload recorded when a stop request has affected runtime work. */\nexport const StopTurnAppliedPayload = Schema.Struct({\n commandId: CommandId,\n runId: RunId,\n turnId: TurnId,\n inferenceId: Schema.optionalKey(InferenceId),\n});\nexport type StopTurnAppliedPayload = typeof StopTurnAppliedPayload.Type;\nexport const StopTurnAppliedEvent = durableEventSchema(\n stopTurnAppliedEventType,\n StopTurnAppliedPayload,\n);\nexport type StopTurnAppliedEvent = typeof StopTurnAppliedEvent.Type;\n\n/** Durable event union for stop-request lifecycle boundaries. */\nexport const StopControlEvent = Schema.Union([StopTurnRequestedEvent, StopTurnAppliedEvent]);\nexport type StopControlEvent = typeof StopControlEvent.Type;\n\n/** Event type values for durable context and compaction events. */\nexport const contextProjectedEventType = makeEventType(\"ContextProjected\");\nexport const compactionRequestedEventType = makeEventType(\"CompactionRequested\");\nexport const compactionStartedEventType = makeEventType(\"CompactionStarted\");\nexport const summaryCreatedEventType = makeEventType(\"SummaryCreated\");\nexport const compactionCompletedEventType = makeEventType(\"CompactionCompleted\");\nexport const contextRebasedEventType = makeEventType(\"ContextRebased\");\nexport const compactionFailedEventType = makeEventType(\"CompactionFailed\");\n\n/** Payload recorded when the prompt context projection advances. */\nexport const ContextProjectedPayload = Schema.Struct({\n contextVersion: ContextVersion,\n throughSeq: SequenceNumber,\n});\nexport type ContextProjectedPayload = typeof ContextProjectedPayload.Type;\nexport const ContextProjectedEvent = durableEventSchema(\n contextProjectedEventType,\n ContextProjectedPayload,\n);\nexport type ContextProjectedEvent = typeof ContextProjectedEvent.Type;\n\n/** Payload recorded when compaction is requested for a durable range. */\nexport const CompactionRequestedPayload = Schema.Struct({\n compactionId: CompactionId,\n sourceFromSeq: SequenceNumber,\n sourceToSeq: SequenceNumber,\n});\nexport type CompactionRequestedPayload = typeof CompactionRequestedPayload.Type;\nexport const CompactionRequestedEvent = durableEventSchema(\n compactionRequestedEventType,\n CompactionRequestedPayload,\n);\nexport type CompactionRequestedEvent = typeof CompactionRequestedEvent.Type;\n\n/** Payload recorded when compaction starts. */\nexport const CompactionStartedPayload = Schema.Struct({ compactionId: CompactionId });\nexport type CompactionStartedPayload = typeof CompactionStartedPayload.Type;\nexport const CompactionStartedEvent = durableEventSchema(\n compactionStartedEventType,\n CompactionStartedPayload,\n);\nexport type CompactionStartedEvent = typeof CompactionStartedEvent.Type;\n\n/** Payload recorded when a summary artifact is created. */\nexport const SummaryCreatedPayload = Schema.Struct({\n compactionId: CompactionId,\n summaryId: SummaryId,\n sourceFromSeq: SequenceNumber,\n sourceToSeq: SequenceNumber,\n summary: Schema.Unknown,\n});\nexport type SummaryCreatedPayload = typeof SummaryCreatedPayload.Type;\nexport const SummaryCreatedEvent = durableEventSchema(\n summaryCreatedEventType,\n SummaryCreatedPayload,\n);\nexport type SummaryCreatedEvent = typeof SummaryCreatedEvent.Type;\n\n/** Payload recorded when compaction completes. */\nexport const CompactionCompletedPayload = Schema.Struct({\n compactionId: CompactionId,\n modelSelection: Schema.optionalKey(ModelSelectionPayload),\n usage: Schema.optionalKey(UsagePayload),\n});\nexport type CompactionCompletedPayload = typeof CompactionCompletedPayload.Type;\nexport const CompactionCompletedEvent = durableEventSchema(\n compactionCompletedEventType,\n CompactionCompletedPayload,\n);\nexport type CompactionCompletedEvent = typeof CompactionCompletedEvent.Type;\n\n/** Payload recorded when durable context is rebased onto a summary. */\nexport const ContextRebasedPayload = Schema.Struct({\n compactionId: CompactionId,\n summaryId: SummaryId,\n contextVersion: ContextVersion,\n retainedFromContextSeq: SequenceNumber,\n});\nexport type ContextRebasedPayload = typeof ContextRebasedPayload.Type;\nexport const ContextRebasedEvent = durableEventSchema(\n contextRebasedEventType,\n ContextRebasedPayload,\n);\nexport type ContextRebasedEvent = typeof ContextRebasedEvent.Type;\n\n/** Payload recorded when compaction fails. */\nexport const CompactionFailedPayload = Schema.Struct({\n compactionId: CompactionId,\n error: FailurePayload,\n modelSelection: Schema.optionalKey(ModelSelectionPayload),\n usage: Schema.optionalKey(UsagePayload),\n});\nexport type CompactionFailedPayload = typeof CompactionFailedPayload.Type;\nexport const CompactionFailedEvent = durableEventSchema(\n compactionFailedEventType,\n CompactionFailedPayload,\n);\nexport type CompactionFailedEvent = typeof CompactionFailedEvent.Type;\n\n/** Durable event union for context projection and compaction boundaries. */\nexport const ContextAndCompactionEvent = Schema.Union([\n ContextProjectedEvent,\n CompactionRequestedEvent,\n CompactionStartedEvent,\n SummaryCreatedEvent,\n CompactionCompletedEvent,\n ContextRebasedEvent,\n CompactionFailedEvent,\n]);\nexport type ContextAndCompactionEvent = typeof ContextAndCompactionEvent.Type;\n\n/** Event type values for durable BaseState lifecycle events. */\nexport const baseStateRequestedEventType = makeEventType(\"BaseStateRequested\");\nexport const baseStateCreatedEventType = makeEventType(\"BaseStateCreated\");\nexport const baseStateFailedEventType = makeEventType(\"BaseStateFailed\");\n\n/** Payload recorded when durable BaseState generation is requested. */\nexport const BaseStateRequestedPayload = Schema.Struct({\n baseStateId: BaseStateId,\n requestedThroughSeq: SequenceNumber,\n});\nexport type BaseStateRequestedPayload = typeof BaseStateRequestedPayload.Type;\nexport const BaseStateRequestedEvent = durableEventSchema(\n baseStateRequestedEventType,\n BaseStateRequestedPayload,\n);\nexport type BaseStateRequestedEvent = typeof BaseStateRequestedEvent.Type;\n\n/** Payload recorded when a BaseState snapshot is created. */\nexport const BaseStateCreatedPayload = Schema.Struct({\n baseStateId: BaseStateId,\n coversThroughSeq: SequenceNumber,\n});\nexport type BaseStateCreatedPayload = typeof BaseStateCreatedPayload.Type;\nexport const BaseStateCreatedEvent = durableEventSchema(\n baseStateCreatedEventType,\n BaseStateCreatedPayload,\n);\nexport type BaseStateCreatedEvent = typeof BaseStateCreatedEvent.Type;\n\n/** Payload recorded when BaseState generation fails. */\nexport const BaseStateFailedPayload = Schema.Struct({\n baseStateId: BaseStateId,\n error: FailurePayload,\n});\nexport type BaseStateFailedPayload = typeof BaseStateFailedPayload.Type;\nexport const BaseStateFailedEvent = durableEventSchema(\n baseStateFailedEventType,\n BaseStateFailedPayload,\n);\nexport type BaseStateFailedEvent = typeof BaseStateFailedEvent.Type;\n\n/** Durable event union for BaseState lifecycle boundaries. */\nexport const BaseStateEvent = Schema.Union([\n BaseStateRequestedEvent,\n BaseStateCreatedEvent,\n BaseStateFailedEvent,\n]);\nexport type BaseStateEvent = typeof BaseStateEvent.Type;\n\n/** Built-in durable event union for framework-owned session facts. */\nexport const EDADurableEvent = Schema.Union([\n SessionConfiguredEvent,\n CommandEvent,\n MessageEvent,\n RunEvent,\n RecoveryEvent,\n TurnEvent,\n InferenceEvent,\n ToolCallEvent,\n StopControlEvent,\n ContextAndCompactionEvent,\n BaseStateEvent,\n]);\nexport type EDADurableEvent = typeof EDADurableEvent.Type;\n\n/** Current V1 framework durable event schema. Future versions route beside this alias. */\nexport const EDADurableEventV1 = EDADurableEvent;\nexport type EDADurableEventV1 = typeof EDADurableEventV1.Type;\n\n/** Decode one framework-owned durable event through the namespace/type/version router. */\nexport const decodeUnknownEDADurableEventSync = (input: unknown): EDADurableEvent => {\n const envelope = Schema.decodeUnknownSync(DurableEventEnvelope)(input);\n if (envelope.namespace !== effectDurableAgentNamespace) {\n throw new Error(\n `EDADurableEvent decoder only accepts namespace ${effectDurableAgentNamespace}; received ${envelope.namespace}`,\n );\n }\n\n switch (envelope.schemaVersion) {\n case schemaV1:\n return Schema.decodeUnknownSync(EDADurableEventV1)(envelope);\n default:\n throw new Error(\n `Unsupported EDA durable event schemaVersion ${envelope.schemaVersion} for ${envelope.type}`,\n );\n }\n};\n\n/** Effectful V1+ router for untrusted framework-owned durable event boundaries. */\nexport const decodeUnknownEDADurableEvent = (\n input: unknown,\n): Effect.Effect<EDADurableEvent, unknown> =>\n Effect.try({\n try: () => decodeUnknownEDADurableEventSync(input),\n catch: (error) => error,\n });\n"],"mappings":";;;;;;;;;AAWA,MAAa,sBACX,MACA,YAEA,OAAO,OAAO;CACZ,GAAG,qBAAqB;CACxB,WAAW,OAAO,QAAQ,2BAA2B;CACrD,MAAM,OAAO,QAAQ,IAAI;CACzB,eAAe,OAAO,QAAQ,QAAQ;CACtC;AACF,CAAC;;AAGH,MAAa,wBACX,MACA,YAEA,OAAO,OAAO;CACZ,GAAG,uBAAuB;CAC1B,WAAW,OAAO,QAAQ,2BAA2B;CACrD,MAAM,OAAO,QAAQ,IAAI;CACzB,eAAe,OAAO,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AAID,MAAa,oBAAoB;;AAIjC,MAAa,oCAAoC,UAAoC;CACnF,MAAM,WAAW,OAAO,kBAAkB,oBAAoB,EAAE,KAAK;CACrE,IAAI,SAAS,cAAc,6BACzB,MAAM,IAAI,MACR,kDAAkD,4BAA4B,aAAa,SAAS,WACtG;CAGF,QAAQ,SAAS,eAAjB;EACE,KAAK,UACH,OAAO,OAAO,kBAAkB,iBAAiB,EAAE,QAAQ;EAC7D,SACE,MAAM,IAAI,MACR,+CAA+C,SAAS,cAAc,OAAO,SAAS,MACxF;CACJ;AACF;;AAGA,MAAa,gCACX,UAEA,OAAO,IAAI;CACT,WAAW,iCAAiC,KAAK;CACjD,QAAQ,UAAU;AACpB,CAAC"}
@@ -3,6 +3,43 @@ import * as Effect from "effect/Effect";
3
3
  import * as Schema from "effect/Schema";
4
4
 
5
5
  //#region src/types/events/durable.d.ts
6
+ /** Establishes a session's execution policy before its first run; not a model-switch operation. */
7
+ declare const sessionConfiguredEventType: "SessionConfigured";
8
+ declare const SessionConfiguredEvent: Schema.Struct<{
9
+ readonly namespace: Schema.Literal<string>;
10
+ readonly type: Schema.Literal<"SessionConfigured">;
11
+ readonly schemaVersion: Schema.Literal<number>;
12
+ readonly payload: Schema.Struct<{
13
+ readonly modelSelection: Schema.Struct<{
14
+ readonly provider: Schema.NonEmptyString;
15
+ readonly modelId: Schema.NonEmptyString;
16
+ readonly settings: Schema.optionalKey<Schema.Unknown>;
17
+ }>;
18
+ }>;
19
+ readonly durability: Schema.Literal<"durable">;
20
+ readonly eventId: Schema.brand<Schema.String, "EventId">;
21
+ readonly sessionId: Schema.brand<Schema.String, "SessionId">;
22
+ readonly correlationId: Schema.optionalKey<Schema.brand<Schema.String, "CorrelationId">>;
23
+ readonly createdAtMs: Schema.brand<Schema.Int, "UnixEpochMillis">;
24
+ readonly trace: Schema.withConstructorDefault<Schema.Struct<{
25
+ readonly span: Schema.Struct<{
26
+ readonly traceId: Schema.brand<Schema.String, "EDATraceId">;
27
+ readonly spanId: Schema.brand<Schema.String, "EDASpanId">;
28
+ readonly sampled: Schema.Boolean;
29
+ readonly tracestate: Schema.NullOr<Schema.String>;
30
+ }>;
31
+ readonly links: Schema.$Array<Schema.Struct<{
32
+ readonly context: Schema.Struct<{
33
+ readonly traceId: Schema.brand<Schema.String, "EDATraceId">;
34
+ readonly spanId: Schema.brand<Schema.String, "EDASpanId">;
35
+ readonly sampled: Schema.Boolean;
36
+ readonly tracestate: Schema.NullOr<Schema.String>;
37
+ }>;
38
+ readonly attributes: Schema.$Record<Schema.String, Schema.Union<readonly [Schema.String, Schema.Number, Schema.Boolean]>>;
39
+ }>>;
40
+ }>>;
41
+ }>;
42
+ type SessionConfiguredEvent = typeof SessionConfiguredEvent.Type;
6
43
  /** Event type values for durable command lifecycle events. */
7
44
  declare const commandAdmittedEventType: "CommandAdmitted";
8
45
  declare const commandStartedEventType: "CommandStarted";
@@ -2379,6 +2416,7 @@ declare const TurnCompletedPayload: Schema.Struct<{
2379
2416
  readonly usage: Schema.optionalKey<Schema.Struct<{
2380
2417
  readonly inputTokens: Schema.optionalKey<Schema.Int>;
2381
2418
  readonly cachedInputTokens: Schema.optionalKey<Schema.Int>;
2419
+ readonly cacheWriteInputTokens: Schema.optionalKey<Schema.Int>;
2382
2420
  readonly outputTokens: Schema.optionalKey<Schema.Int>;
2383
2421
  readonly textTokens: Schema.optionalKey<Schema.Int>;
2384
2422
  readonly reasoningTokens: Schema.optionalKey<Schema.Int>;
@@ -2395,6 +2433,7 @@ declare const TurnCompletedEvent: Schema.Struct<{
2395
2433
  readonly usage: Schema.optionalKey<Schema.Struct<{
2396
2434
  readonly inputTokens: Schema.optionalKey<Schema.Int>;
2397
2435
  readonly cachedInputTokens: Schema.optionalKey<Schema.Int>;
2436
+ readonly cacheWriteInputTokens: Schema.optionalKey<Schema.Int>;
2398
2437
  readonly outputTokens: Schema.optionalKey<Schema.Int>;
2399
2438
  readonly textTokens: Schema.optionalKey<Schema.Int>;
2400
2439
  readonly reasoningTokens: Schema.optionalKey<Schema.Int>;
@@ -2557,6 +2596,7 @@ declare const TurnEvent: Schema.Union<readonly [Schema.Struct<{
2557
2596
  readonly usage: Schema.optionalKey<Schema.Struct<{
2558
2597
  readonly inputTokens: Schema.optionalKey<Schema.Int>;
2559
2598
  readonly cachedInputTokens: Schema.optionalKey<Schema.Int>;
2599
+ readonly cacheWriteInputTokens: Schema.optionalKey<Schema.Int>;
2560
2600
  readonly outputTokens: Schema.optionalKey<Schema.Int>;
2561
2601
  readonly textTokens: Schema.optionalKey<Schema.Int>;
2562
2602
  readonly reasoningTokens: Schema.optionalKey<Schema.Int>;
@@ -2705,6 +2745,7 @@ declare const InferenceCompletedPayload: Schema.Struct<{
2705
2745
  readonly usage: Schema.optionalKey<Schema.Struct<{
2706
2746
  readonly inputTokens: Schema.optionalKey<Schema.Int>;
2707
2747
  readonly cachedInputTokens: Schema.optionalKey<Schema.Int>;
2748
+ readonly cacheWriteInputTokens: Schema.optionalKey<Schema.Int>;
2708
2749
  readonly outputTokens: Schema.optionalKey<Schema.Int>;
2709
2750
  readonly textTokens: Schema.optionalKey<Schema.Int>;
2710
2751
  readonly reasoningTokens: Schema.optionalKey<Schema.Int>;
@@ -2725,6 +2766,7 @@ declare const InferenceCompletedEvent: Schema.Struct<{
2725
2766
  readonly usage: Schema.optionalKey<Schema.Struct<{
2726
2767
  readonly inputTokens: Schema.optionalKey<Schema.Int>;
2727
2768
  readonly cachedInputTokens: Schema.optionalKey<Schema.Int>;
2769
+ readonly cacheWriteInputTokens: Schema.optionalKey<Schema.Int>;
2728
2770
  readonly outputTokens: Schema.optionalKey<Schema.Int>;
2729
2771
  readonly textTokens: Schema.optionalKey<Schema.Int>;
2730
2772
  readonly reasoningTokens: Schema.optionalKey<Schema.Int>;
@@ -2850,6 +2892,7 @@ declare const InferenceEvent: Schema.Union<readonly [Schema.Struct<{
2850
2892
  readonly usage: Schema.optionalKey<Schema.Struct<{
2851
2893
  readonly inputTokens: Schema.optionalKey<Schema.Int>;
2852
2894
  readonly cachedInputTokens: Schema.optionalKey<Schema.Int>;
2895
+ readonly cacheWriteInputTokens: Schema.optionalKey<Schema.Int>;
2853
2896
  readonly outputTokens: Schema.optionalKey<Schema.Int>;
2854
2897
  readonly textTokens: Schema.optionalKey<Schema.Int>;
2855
2898
  readonly reasoningTokens: Schema.optionalKey<Schema.Int>;
@@ -3787,6 +3830,19 @@ type SummaryCreatedEvent = typeof SummaryCreatedEvent.Type;
3787
3830
  /** Payload recorded when compaction completes. */
3788
3831
  declare const CompactionCompletedPayload: Schema.Struct<{
3789
3832
  readonly compactionId: Schema.brand<Schema.String, "CompactionId">;
3833
+ readonly modelSelection: Schema.optionalKey<Schema.Struct<{
3834
+ readonly provider: Schema.NonEmptyString;
3835
+ readonly modelId: Schema.NonEmptyString;
3836
+ readonly settings: Schema.optionalKey<Schema.Unknown>;
3837
+ }>>;
3838
+ readonly usage: Schema.optionalKey<Schema.Struct<{
3839
+ readonly inputTokens: Schema.optionalKey<Schema.Int>;
3840
+ readonly cachedInputTokens: Schema.optionalKey<Schema.Int>;
3841
+ readonly cacheWriteInputTokens: Schema.optionalKey<Schema.Int>;
3842
+ readonly outputTokens: Schema.optionalKey<Schema.Int>;
3843
+ readonly textTokens: Schema.optionalKey<Schema.Int>;
3844
+ readonly reasoningTokens: Schema.optionalKey<Schema.Int>;
3845
+ }>>;
3790
3846
  }>;
3791
3847
  type CompactionCompletedPayload = typeof CompactionCompletedPayload.Type;
3792
3848
  declare const CompactionCompletedEvent: Schema.Struct<{
@@ -3795,6 +3851,19 @@ declare const CompactionCompletedEvent: Schema.Struct<{
3795
3851
  readonly schemaVersion: Schema.Literal<number>;
3796
3852
  readonly payload: Schema.Struct<{
3797
3853
  readonly compactionId: Schema.brand<Schema.String, "CompactionId">;
3854
+ readonly modelSelection: Schema.optionalKey<Schema.Struct<{
3855
+ readonly provider: Schema.NonEmptyString;
3856
+ readonly modelId: Schema.NonEmptyString;
3857
+ readonly settings: Schema.optionalKey<Schema.Unknown>;
3858
+ }>>;
3859
+ readonly usage: Schema.optionalKey<Schema.Struct<{
3860
+ readonly inputTokens: Schema.optionalKey<Schema.Int>;
3861
+ readonly cachedInputTokens: Schema.optionalKey<Schema.Int>;
3862
+ readonly cacheWriteInputTokens: Schema.optionalKey<Schema.Int>;
3863
+ readonly outputTokens: Schema.optionalKey<Schema.Int>;
3864
+ readonly textTokens: Schema.optionalKey<Schema.Int>;
3865
+ readonly reasoningTokens: Schema.optionalKey<Schema.Int>;
3866
+ }>>;
3798
3867
  }>;
3799
3868
  readonly durability: Schema.Literal<"durable">;
3800
3869
  readonly eventId: Schema.brand<Schema.String, "EventId">;
@@ -3870,6 +3939,19 @@ declare const CompactionFailedPayload: Schema.Struct<{
3870
3939
  readonly code: Schema.optionalKey<Schema.String>;
3871
3940
  readonly details: Schema.optionalKey<Schema.Unknown>;
3872
3941
  }>;
3942
+ readonly modelSelection: Schema.optionalKey<Schema.Struct<{
3943
+ readonly provider: Schema.NonEmptyString;
3944
+ readonly modelId: Schema.NonEmptyString;
3945
+ readonly settings: Schema.optionalKey<Schema.Unknown>;
3946
+ }>>;
3947
+ readonly usage: Schema.optionalKey<Schema.Struct<{
3948
+ readonly inputTokens: Schema.optionalKey<Schema.Int>;
3949
+ readonly cachedInputTokens: Schema.optionalKey<Schema.Int>;
3950
+ readonly cacheWriteInputTokens: Schema.optionalKey<Schema.Int>;
3951
+ readonly outputTokens: Schema.optionalKey<Schema.Int>;
3952
+ readonly textTokens: Schema.optionalKey<Schema.Int>;
3953
+ readonly reasoningTokens: Schema.optionalKey<Schema.Int>;
3954
+ }>>;
3873
3955
  }>;
3874
3956
  type CompactionFailedPayload = typeof CompactionFailedPayload.Type;
3875
3957
  declare const CompactionFailedEvent: Schema.Struct<{
@@ -3883,6 +3965,19 @@ declare const CompactionFailedEvent: Schema.Struct<{
3883
3965
  readonly code: Schema.optionalKey<Schema.String>;
3884
3966
  readonly details: Schema.optionalKey<Schema.Unknown>;
3885
3967
  }>;
3968
+ readonly modelSelection: Schema.optionalKey<Schema.Struct<{
3969
+ readonly provider: Schema.NonEmptyString;
3970
+ readonly modelId: Schema.NonEmptyString;
3971
+ readonly settings: Schema.optionalKey<Schema.Unknown>;
3972
+ }>>;
3973
+ readonly usage: Schema.optionalKey<Schema.Struct<{
3974
+ readonly inputTokens: Schema.optionalKey<Schema.Int>;
3975
+ readonly cachedInputTokens: Schema.optionalKey<Schema.Int>;
3976
+ readonly cacheWriteInputTokens: Schema.optionalKey<Schema.Int>;
3977
+ readonly outputTokens: Schema.optionalKey<Schema.Int>;
3978
+ readonly textTokens: Schema.optionalKey<Schema.Int>;
3979
+ readonly reasoningTokens: Schema.optionalKey<Schema.Int>;
3980
+ }>>;
3886
3981
  }>;
3887
3982
  readonly durability: Schema.Literal<"durable">;
3888
3983
  readonly eventId: Schema.brand<Schema.String, "EventId">;
@@ -4038,6 +4133,19 @@ declare const ContextAndCompactionEvent: Schema.Union<readonly [Schema.Struct<{
4038
4133
  readonly schemaVersion: Schema.Literal<number>;
4039
4134
  readonly payload: Schema.Struct<{
4040
4135
  readonly compactionId: Schema.brand<Schema.String, "CompactionId">;
4136
+ readonly modelSelection: Schema.optionalKey<Schema.Struct<{
4137
+ readonly provider: Schema.NonEmptyString;
4138
+ readonly modelId: Schema.NonEmptyString;
4139
+ readonly settings: Schema.optionalKey<Schema.Unknown>;
4140
+ }>>;
4141
+ readonly usage: Schema.optionalKey<Schema.Struct<{
4142
+ readonly inputTokens: Schema.optionalKey<Schema.Int>;
4143
+ readonly cachedInputTokens: Schema.optionalKey<Schema.Int>;
4144
+ readonly cacheWriteInputTokens: Schema.optionalKey<Schema.Int>;
4145
+ readonly outputTokens: Schema.optionalKey<Schema.Int>;
4146
+ readonly textTokens: Schema.optionalKey<Schema.Int>;
4147
+ readonly reasoningTokens: Schema.optionalKey<Schema.Int>;
4148
+ }>>;
4041
4149
  }>;
4042
4150
  readonly durability: Schema.Literal<"durable">;
4043
4151
  readonly eventId: Schema.brand<Schema.String, "EventId">;
@@ -4104,6 +4212,19 @@ declare const ContextAndCompactionEvent: Schema.Union<readonly [Schema.Struct<{
4104
4212
  readonly code: Schema.optionalKey<Schema.String>;
4105
4213
  readonly details: Schema.optionalKey<Schema.Unknown>;
4106
4214
  }>;
4215
+ readonly modelSelection: Schema.optionalKey<Schema.Struct<{
4216
+ readonly provider: Schema.NonEmptyString;
4217
+ readonly modelId: Schema.NonEmptyString;
4218
+ readonly settings: Schema.optionalKey<Schema.Unknown>;
4219
+ }>>;
4220
+ readonly usage: Schema.optionalKey<Schema.Struct<{
4221
+ readonly inputTokens: Schema.optionalKey<Schema.Int>;
4222
+ readonly cachedInputTokens: Schema.optionalKey<Schema.Int>;
4223
+ readonly cacheWriteInputTokens: Schema.optionalKey<Schema.Int>;
4224
+ readonly outputTokens: Schema.optionalKey<Schema.Int>;
4225
+ readonly textTokens: Schema.optionalKey<Schema.Int>;
4226
+ readonly reasoningTokens: Schema.optionalKey<Schema.Int>;
4227
+ }>>;
4107
4228
  }>;
4108
4229
  readonly durability: Schema.Literal<"durable">;
4109
4230
  readonly eventId: Schema.brand<Schema.String, "EventId">;
@@ -4353,7 +4474,40 @@ declare const BaseStateEvent: Schema.Union<readonly [Schema.Struct<{
4353
4474
  }>]>;
4354
4475
  type BaseStateEvent = typeof BaseStateEvent.Type;
4355
4476
  /** Built-in durable event union for framework-owned session facts. */
4356
- declare const EDADurableEvent: Schema.Union<readonly [Schema.Union<readonly [Schema.Struct<{
4477
+ declare const EDADurableEvent: Schema.Union<readonly [Schema.Struct<{
4478
+ readonly namespace: Schema.Literal<string>;
4479
+ readonly type: Schema.Literal<"SessionConfigured">;
4480
+ readonly schemaVersion: Schema.Literal<number>;
4481
+ readonly payload: Schema.Struct<{
4482
+ readonly modelSelection: Schema.Struct<{
4483
+ readonly provider: Schema.NonEmptyString;
4484
+ readonly modelId: Schema.NonEmptyString;
4485
+ readonly settings: Schema.optionalKey<Schema.Unknown>;
4486
+ }>;
4487
+ }>;
4488
+ readonly durability: Schema.Literal<"durable">;
4489
+ readonly eventId: Schema.brand<Schema.String, "EventId">;
4490
+ readonly sessionId: Schema.brand<Schema.String, "SessionId">;
4491
+ readonly correlationId: Schema.optionalKey<Schema.brand<Schema.String, "CorrelationId">>;
4492
+ readonly createdAtMs: Schema.brand<Schema.Int, "UnixEpochMillis">;
4493
+ readonly trace: Schema.withConstructorDefault<Schema.Struct<{
4494
+ readonly span: Schema.Struct<{
4495
+ readonly traceId: Schema.brand<Schema.String, "EDATraceId">;
4496
+ readonly spanId: Schema.brand<Schema.String, "EDASpanId">;
4497
+ readonly sampled: Schema.Boolean;
4498
+ readonly tracestate: Schema.NullOr<Schema.String>;
4499
+ }>;
4500
+ readonly links: Schema.$Array<Schema.Struct<{
4501
+ readonly context: Schema.Struct<{
4502
+ readonly traceId: Schema.brand<Schema.String, "EDATraceId">;
4503
+ readonly spanId: Schema.brand<Schema.String, "EDASpanId">;
4504
+ readonly sampled: Schema.Boolean;
4505
+ readonly tracestate: Schema.NullOr<Schema.String>;
4506
+ }>;
4507
+ readonly attributes: Schema.$Record<Schema.String, Schema.Union<readonly [Schema.String, Schema.Number, Schema.Boolean]>>;
4508
+ }>>;
4509
+ }>>;
4510
+ }>, Schema.Union<readonly [Schema.Struct<{
4357
4511
  readonly namespace: Schema.Literal<string>;
4358
4512
  readonly type: Schema.Literal<"CommandAdmitted">;
4359
4513
  readonly schemaVersion: Schema.Literal<number>;
@@ -5275,6 +5429,7 @@ declare const EDADurableEvent: Schema.Union<readonly [Schema.Union<readonly [Sch
5275
5429
  readonly usage: Schema.optionalKey<Schema.Struct<{
5276
5430
  readonly inputTokens: Schema.optionalKey<Schema.Int>;
5277
5431
  readonly cachedInputTokens: Schema.optionalKey<Schema.Int>;
5432
+ readonly cacheWriteInputTokens: Schema.optionalKey<Schema.Int>;
5278
5433
  readonly outputTokens: Schema.optionalKey<Schema.Int>;
5279
5434
  readonly textTokens: Schema.optionalKey<Schema.Int>;
5280
5435
  readonly reasoningTokens: Schema.optionalKey<Schema.Int>;
@@ -5411,6 +5566,7 @@ declare const EDADurableEvent: Schema.Union<readonly [Schema.Union<readonly [Sch
5411
5566
  readonly usage: Schema.optionalKey<Schema.Struct<{
5412
5567
  readonly inputTokens: Schema.optionalKey<Schema.Int>;
5413
5568
  readonly cachedInputTokens: Schema.optionalKey<Schema.Int>;
5569
+ readonly cacheWriteInputTokens: Schema.optionalKey<Schema.Int>;
5414
5570
  readonly outputTokens: Schema.optionalKey<Schema.Int>;
5415
5571
  readonly textTokens: Schema.optionalKey<Schema.Int>;
5416
5572
  readonly reasoningTokens: Schema.optionalKey<Schema.Int>;
@@ -5868,6 +6024,19 @@ declare const EDADurableEvent: Schema.Union<readonly [Schema.Union<readonly [Sch
5868
6024
  readonly schemaVersion: Schema.Literal<number>;
5869
6025
  readonly payload: Schema.Struct<{
5870
6026
  readonly compactionId: Schema.brand<Schema.String, "CompactionId">;
6027
+ readonly modelSelection: Schema.optionalKey<Schema.Struct<{
6028
+ readonly provider: Schema.NonEmptyString;
6029
+ readonly modelId: Schema.NonEmptyString;
6030
+ readonly settings: Schema.optionalKey<Schema.Unknown>;
6031
+ }>>;
6032
+ readonly usage: Schema.optionalKey<Schema.Struct<{
6033
+ readonly inputTokens: Schema.optionalKey<Schema.Int>;
6034
+ readonly cachedInputTokens: Schema.optionalKey<Schema.Int>;
6035
+ readonly cacheWriteInputTokens: Schema.optionalKey<Schema.Int>;
6036
+ readonly outputTokens: Schema.optionalKey<Schema.Int>;
6037
+ readonly textTokens: Schema.optionalKey<Schema.Int>;
6038
+ readonly reasoningTokens: Schema.optionalKey<Schema.Int>;
6039
+ }>>;
5871
6040
  }>;
5872
6041
  readonly durability: Schema.Literal<"durable">;
5873
6042
  readonly eventId: Schema.brand<Schema.String, "EventId">;
@@ -5934,6 +6103,19 @@ declare const EDADurableEvent: Schema.Union<readonly [Schema.Union<readonly [Sch
5934
6103
  readonly code: Schema.optionalKey<Schema.String>;
5935
6104
  readonly details: Schema.optionalKey<Schema.Unknown>;
5936
6105
  }>;
6106
+ readonly modelSelection: Schema.optionalKey<Schema.Struct<{
6107
+ readonly provider: Schema.NonEmptyString;
6108
+ readonly modelId: Schema.NonEmptyString;
6109
+ readonly settings: Schema.optionalKey<Schema.Unknown>;
6110
+ }>>;
6111
+ readonly usage: Schema.optionalKey<Schema.Struct<{
6112
+ readonly inputTokens: Schema.optionalKey<Schema.Int>;
6113
+ readonly cachedInputTokens: Schema.optionalKey<Schema.Int>;
6114
+ readonly cacheWriteInputTokens: Schema.optionalKey<Schema.Int>;
6115
+ readonly outputTokens: Schema.optionalKey<Schema.Int>;
6116
+ readonly textTokens: Schema.optionalKey<Schema.Int>;
6117
+ readonly reasoningTokens: Schema.optionalKey<Schema.Int>;
6118
+ }>>;
5937
6119
  }>;
5938
6120
  readonly durability: Schema.Literal<"durable">;
5939
6121
  readonly eventId: Schema.brand<Schema.String, "EventId">;
@@ -6054,7 +6236,40 @@ declare const EDADurableEvent: Schema.Union<readonly [Schema.Union<readonly [Sch
6054
6236
  }>]>]>;
6055
6237
  type EDADurableEvent = typeof EDADurableEvent.Type;
6056
6238
  /** Current V1 framework durable event schema. Future versions route beside this alias. */
6057
- declare const EDADurableEventV1: Schema.Union<readonly [Schema.Union<readonly [Schema.Struct<{
6239
+ declare const EDADurableEventV1: Schema.Union<readonly [Schema.Struct<{
6240
+ readonly namespace: Schema.Literal<string>;
6241
+ readonly type: Schema.Literal<"SessionConfigured">;
6242
+ readonly schemaVersion: Schema.Literal<number>;
6243
+ readonly payload: Schema.Struct<{
6244
+ readonly modelSelection: Schema.Struct<{
6245
+ readonly provider: Schema.NonEmptyString;
6246
+ readonly modelId: Schema.NonEmptyString;
6247
+ readonly settings: Schema.optionalKey<Schema.Unknown>;
6248
+ }>;
6249
+ }>;
6250
+ readonly durability: Schema.Literal<"durable">;
6251
+ readonly eventId: Schema.brand<Schema.String, "EventId">;
6252
+ readonly sessionId: Schema.brand<Schema.String, "SessionId">;
6253
+ readonly correlationId: Schema.optionalKey<Schema.brand<Schema.String, "CorrelationId">>;
6254
+ readonly createdAtMs: Schema.brand<Schema.Int, "UnixEpochMillis">;
6255
+ readonly trace: Schema.withConstructorDefault<Schema.Struct<{
6256
+ readonly span: Schema.Struct<{
6257
+ readonly traceId: Schema.brand<Schema.String, "EDATraceId">;
6258
+ readonly spanId: Schema.brand<Schema.String, "EDASpanId">;
6259
+ readonly sampled: Schema.Boolean;
6260
+ readonly tracestate: Schema.NullOr<Schema.String>;
6261
+ }>;
6262
+ readonly links: Schema.$Array<Schema.Struct<{
6263
+ readonly context: Schema.Struct<{
6264
+ readonly traceId: Schema.brand<Schema.String, "EDATraceId">;
6265
+ readonly spanId: Schema.brand<Schema.String, "EDASpanId">;
6266
+ readonly sampled: Schema.Boolean;
6267
+ readonly tracestate: Schema.NullOr<Schema.String>;
6268
+ }>;
6269
+ readonly attributes: Schema.$Record<Schema.String, Schema.Union<readonly [Schema.String, Schema.Number, Schema.Boolean]>>;
6270
+ }>>;
6271
+ }>>;
6272
+ }>, Schema.Union<readonly [Schema.Struct<{
6058
6273
  readonly namespace: Schema.Literal<string>;
6059
6274
  readonly type: Schema.Literal<"CommandAdmitted">;
6060
6275
  readonly schemaVersion: Schema.Literal<number>;
@@ -6976,6 +7191,7 @@ declare const EDADurableEventV1: Schema.Union<readonly [Schema.Union<readonly [S
6976
7191
  readonly usage: Schema.optionalKey<Schema.Struct<{
6977
7192
  readonly inputTokens: Schema.optionalKey<Schema.Int>;
6978
7193
  readonly cachedInputTokens: Schema.optionalKey<Schema.Int>;
7194
+ readonly cacheWriteInputTokens: Schema.optionalKey<Schema.Int>;
6979
7195
  readonly outputTokens: Schema.optionalKey<Schema.Int>;
6980
7196
  readonly textTokens: Schema.optionalKey<Schema.Int>;
6981
7197
  readonly reasoningTokens: Schema.optionalKey<Schema.Int>;
@@ -7112,6 +7328,7 @@ declare const EDADurableEventV1: Schema.Union<readonly [Schema.Union<readonly [S
7112
7328
  readonly usage: Schema.optionalKey<Schema.Struct<{
7113
7329
  readonly inputTokens: Schema.optionalKey<Schema.Int>;
7114
7330
  readonly cachedInputTokens: Schema.optionalKey<Schema.Int>;
7331
+ readonly cacheWriteInputTokens: Schema.optionalKey<Schema.Int>;
7115
7332
  readonly outputTokens: Schema.optionalKey<Schema.Int>;
7116
7333
  readonly textTokens: Schema.optionalKey<Schema.Int>;
7117
7334
  readonly reasoningTokens: Schema.optionalKey<Schema.Int>;
@@ -7569,6 +7786,19 @@ declare const EDADurableEventV1: Schema.Union<readonly [Schema.Union<readonly [S
7569
7786
  readonly schemaVersion: Schema.Literal<number>;
7570
7787
  readonly payload: Schema.Struct<{
7571
7788
  readonly compactionId: Schema.brand<Schema.String, "CompactionId">;
7789
+ readonly modelSelection: Schema.optionalKey<Schema.Struct<{
7790
+ readonly provider: Schema.NonEmptyString;
7791
+ readonly modelId: Schema.NonEmptyString;
7792
+ readonly settings: Schema.optionalKey<Schema.Unknown>;
7793
+ }>>;
7794
+ readonly usage: Schema.optionalKey<Schema.Struct<{
7795
+ readonly inputTokens: Schema.optionalKey<Schema.Int>;
7796
+ readonly cachedInputTokens: Schema.optionalKey<Schema.Int>;
7797
+ readonly cacheWriteInputTokens: Schema.optionalKey<Schema.Int>;
7798
+ readonly outputTokens: Schema.optionalKey<Schema.Int>;
7799
+ readonly textTokens: Schema.optionalKey<Schema.Int>;
7800
+ readonly reasoningTokens: Schema.optionalKey<Schema.Int>;
7801
+ }>>;
7572
7802
  }>;
7573
7803
  readonly durability: Schema.Literal<"durable">;
7574
7804
  readonly eventId: Schema.brand<Schema.String, "EventId">;
@@ -7635,6 +7865,19 @@ declare const EDADurableEventV1: Schema.Union<readonly [Schema.Union<readonly [S
7635
7865
  readonly code: Schema.optionalKey<Schema.String>;
7636
7866
  readonly details: Schema.optionalKey<Schema.Unknown>;
7637
7867
  }>;
7868
+ readonly modelSelection: Schema.optionalKey<Schema.Struct<{
7869
+ readonly provider: Schema.NonEmptyString;
7870
+ readonly modelId: Schema.NonEmptyString;
7871
+ readonly settings: Schema.optionalKey<Schema.Unknown>;
7872
+ }>>;
7873
+ readonly usage: Schema.optionalKey<Schema.Struct<{
7874
+ readonly inputTokens: Schema.optionalKey<Schema.Int>;
7875
+ readonly cachedInputTokens: Schema.optionalKey<Schema.Int>;
7876
+ readonly cacheWriteInputTokens: Schema.optionalKey<Schema.Int>;
7877
+ readonly outputTokens: Schema.optionalKey<Schema.Int>;
7878
+ readonly textTokens: Schema.optionalKey<Schema.Int>;
7879
+ readonly reasoningTokens: Schema.optionalKey<Schema.Int>;
7880
+ }>>;
7638
7881
  }>;
7639
7882
  readonly durability: Schema.Literal<"durable">;
7640
7883
  readonly eventId: Schema.brand<Schema.String, "EventId">;
@@ -7759,5 +8002,5 @@ declare const decodeUnknownEDADurableEventSync: (input: unknown) => EDADurableEv
7759
8002
  /** Effectful V1+ router for untrusted framework-owned durable event boundaries. */
7760
8003
  declare const decodeUnknownEDADurableEvent: (input: unknown) => Effect.Effect<EDADurableEvent, unknown>;
7761
8004
  //#endregion
7762
- export { PendingMessagesPausedEvent as $, turnStoppedEventType as $n, TurnStoppedPayload as $t, CompactionFailedEvent as A, inferenceFailedEventType as An, ToolCallCreatedPayload as At, ContextRebasedPayload as B, steeringMessageQueuedEventType as Bn, ToolCallStartedPayload as Bt, CommandEvent as C, compactionRequestedEventType as Cn, SummaryCreatedEvent as Ct, CommandStartedPayload as D, decodeUnknownEDADurableEvent as Dn, ToolCallCompletedEvent as Dt, CommandStartedEvent as E, contextRebasedEventType as En, SystemMessageCommittedPayload as Et, CompactionStartedPayload as F, runCompletedEventType as Fn, ToolCallRejectedEvent as Ft, InferenceEvent as G, toolCallCompletedEventType as Gn, TurnCompletedEvent as Gt, EDADurableEventV1 as H, stopTurnRequestedEventType as Hn, ToolPromptPart as Ht, ContextAndCompactionEvent as I, runFailedEventType as In, ToolCallRejectedPayload as It, InferenceStartedEvent as J, toolCallRejectedEventType as Jn, TurnFailedEvent as Jt, InferenceFailedEvent as K, toolCallCreatedEventType as Kn, TurnCompletedPayload as Kt, ContextProjectedEvent as L, runInterruptedEventType as Ln, ToolCallRejectionFeedback as Lt, CompactionRequestedEvent as M, messageQueuePausedEventType as Mn, ToolCallFailedEvent as Mt, CompactionRequestedPayload as N, pendingMessagesPausedEventType as Nn, ToolCallFailedPayload as Nt, CompactionCompletedEvent as O, decodeUnknownEDADurableEventSync as On, ToolCallCompletedPayload as Ot, CompactionStartedEvent as P, recoveryCompletedEventType as Pn, ToolCallPromptPart as Pt, MessageQueuePausedPayload as Q, turnStartedEventType as Qn, TurnStoppedEvent as Qt, ContextProjectedPayload as R, runStartedEventType as Rn, ToolCallRejectionReason as Rt, CommandCompletedPayload as S, compactionFailedEventType as Sn, StopTurnRequestedPayload as St, CommandFailedPayload as T, contextProjectedEventType as Tn, SystemMessageCommittedEvent as Tt, InferenceCompletedEvent as U, summaryCreatedEventType as Un, ToolRejectionPromptPart as Ut, EDADurableEvent as V, stopTurnAppliedEventType as Vn, ToolFailurePromptPart as Vt, InferenceCompletedPayload as W, systemMessageCommittedEventType as Wn, ToolSuccessPromptPart as Wt, MessageEvent as X, turnCompletedEventType as Xn, TurnStartedEvent as Xt, InferenceStartedPayload as Y, toolCallStartedEventType as Yn, TurnFailedPayload as Yt, MessageQueuePausedEvent as Z, turnFailedEventType as Zn, TurnStartedPayload as Zt, CommandAdmittedEvent as _, commandCancelledEventType as _n, SteeringMessageQueuedPayload as _t, AssistantMessageImportedPayload as a, UserMessageDisposition as an, RunCompletedEvent as at, CommandCancelledPayload as b, commandStartedEventType as bn, StopTurnAppliedPayload as bt, AssistantPromptPart as c, UserMessageSubmittedEvent as cn, RunFailedEvent as ct, BaseStateCreatedPayload as d, assistantMessageImportedEventType as dn, RunInterruptedPayload as dt, UserMessageCancellationReason as en, userMessageCancelledEventType as er, PendingMessagesPausedPayload as et, BaseStateEvent as f, assistantPartialCommittedEventType as fn, RunStartedEvent as ft, BaseStateRequestedPayload as g, commandAdmittedEventType as gn, SteeringMessageQueuedEvent as gt, BaseStateRequestedEvent as h, baseStateRequestedEventType as hn, SteeringMessageCancelledPayload as ht, AssistantMessageImportedEvent as i, UserMessageCommittedPayload as in, RecoveryEvent as it, CompactionFailedPayload as j, inferenceStartedEventType as jn, ToolCallEvent as jt, CompactionCompletedPayload as k, inferenceCompletedEventType as kn, ToolCallCreatedEvent as kt, AssistantPromptParts as l, UserMessageSubmittedPayload as ln, RunFailedPayload as lt, BaseStateFailedPayload as m, baseStateFailedEventType as mn, SteeringMessageCancelledEvent as mt, AssistantMessageCommittedPayload as n, UserMessageCancelledPayload as nn, userMessagePromotedEventType as nr, RecoveryCompletedPayload as nt, AssistantPartialCommittedEvent as o, UserMessagePromotedEvent as on, RunCompletedPayload as ot, BaseStateFailedEvent as p, baseStateCreatedEventType as pn, RunStartedPayload as pt, InferenceFailedPayload as q, toolCallFailedEventType as qn, TurnEvent as qt, AssistantMessageContent as r, UserMessageCommittedEvent as rn, userMessageSubmittedEventType as rr, RecoveryContinuation as rt, AssistantPartialCommittedPayload as s, UserMessagePromotedPayload as sn, RunEvent as st, AssistantMessageCommittedEvent as t, UserMessageCancelledEvent as tn, userMessageCommittedEventType as tr, RecoveryCompletedEvent as tt, BaseStateCreatedEvent as u, assistantMessageCommittedEventType as un, RunInterruptedEvent as ut, CommandAdmittedPayload as v, commandCompletedEventType as vn, StopControlEvent as vt, CommandFailedEvent as w, compactionStartedEventType as wn, SummaryCreatedPayload as wt, CommandCompletedEvent as x, compactionCompletedEventType as xn, StopTurnRequestedEvent as xt, CommandCancelledEvent as y, commandFailedEventType as yn, StopTurnAppliedEvent as yt, ContextRebasedEvent as z, steeringMessageCancelledEventType as zn, ToolCallStartedEvent as zt };
7763
- //# sourceMappingURL=durable-B7M6TD_0.d.ts.map
8005
+ export { PendingMessagesPausedEvent as $, turnFailedEventType as $n, TurnStoppedEvent as $t, CompactionFailedEvent as A, inferenceCompletedEventType as An, ToolCallCreatedEvent as At, ContextRebasedPayload as B, sessionConfiguredEventType as Bn, ToolCallStartedEvent as Bt, CommandEvent as C, compactionFailedEventType as Cn, StopTurnRequestedPayload as Ct, CommandStartedPayload as D, contextRebasedEventType as Dn, SystemMessageCommittedPayload as Dt, CommandStartedEvent as E, contextProjectedEventType as En, SystemMessageCommittedEvent as Et, CompactionStartedPayload as F, recoveryCompletedEventType as Fn, ToolCallPromptPart as Ft, InferenceEvent as G, summaryCreatedEventType as Gn, ToolSuccessPromptPart as Gt, EDADurableEventV1 as H, steeringMessageQueuedEventType as Hn, ToolFailurePromptPart as Ht, ContextAndCompactionEvent as I, runCompletedEventType as In, ToolCallRejectedEvent as It, InferenceStartedEvent as J, toolCallCreatedEventType as Jn, TurnEvent as Jt, InferenceFailedEvent as K, systemMessageCommittedEventType as Kn, TurnCompletedEvent as Kt, ContextProjectedEvent as L, runFailedEventType as Ln, ToolCallRejectedPayload as Lt, CompactionRequestedEvent as M, inferenceStartedEventType as Mn, ToolCallEvent as Mt, CompactionRequestedPayload as N, messageQueuePausedEventType as Nn, ToolCallFailedEvent as Nt, CompactionCompletedEvent as O, decodeUnknownEDADurableEvent as On, ToolCallCompletedEvent as Ot, CompactionStartedEvent as P, pendingMessagesPausedEventType as Pn, ToolCallFailedPayload as Pt, MessageQueuePausedPayload as Q, turnCompletedEventType as Qn, TurnStartedPayload as Qt, ContextProjectedPayload as R, runInterruptedEventType as Rn, ToolCallRejectionFeedback as Rt, CommandCompletedPayload as S, compactionCompletedEventType as Sn, StopTurnRequestedEvent as St, CommandFailedPayload as T, compactionStartedEventType as Tn, SummaryCreatedPayload as Tt, InferenceCompletedEvent as U, stopTurnAppliedEventType as Un, ToolPromptPart as Ut, EDADurableEvent as V, steeringMessageCancelledEventType as Vn, ToolCallStartedPayload as Vt, InferenceCompletedPayload as W, stopTurnRequestedEventType as Wn, ToolRejectionPromptPart as Wt, MessageEvent as X, toolCallRejectedEventType as Xn, TurnFailedPayload as Xt, InferenceStartedPayload as Y, toolCallFailedEventType as Yn, TurnFailedEvent as Yt, MessageQueuePausedEvent as Z, toolCallStartedEventType as Zn, TurnStartedEvent as Zt, CommandAdmittedEvent as _, commandAdmittedEventType as _n, SteeringMessageQueuedEvent as _t, AssistantMessageImportedPayload as a, UserMessageCommittedPayload as an, userMessageSubmittedEventType as ar, RunCompletedEvent as at, CommandCancelledPayload as b, commandFailedEventType as bn, StopTurnAppliedEvent as bt, AssistantPromptPart as c, UserMessagePromotedPayload as cn, RunFailedEvent as ct, BaseStateCreatedPayload as d, assistantMessageCommittedEventType as dn, RunInterruptedPayload as dt, TurnStoppedPayload as en, turnStartedEventType as er, PendingMessagesPausedPayload as et, BaseStateEvent as f, assistantMessageImportedEventType as fn, RunStartedEvent as ft, BaseStateRequestedPayload as g, baseStateRequestedEventType as gn, SteeringMessageCancelledPayload as gt, BaseStateRequestedEvent as h, baseStateFailedEventType as hn, SteeringMessageCancelledEvent as ht, AssistantMessageImportedEvent as i, UserMessageCommittedEvent as in, userMessagePromotedEventType as ir, RecoveryEvent as it, CompactionFailedPayload as j, inferenceFailedEventType as jn, ToolCallCreatedPayload as jt, CompactionCompletedPayload as k, decodeUnknownEDADurableEventSync as kn, ToolCallCompletedPayload as kt, AssistantPromptParts as l, UserMessageSubmittedEvent as ln, RunFailedPayload as lt, BaseStateFailedPayload as m, baseStateCreatedEventType as mn, SessionConfiguredEvent as mt, AssistantMessageCommittedPayload as n, UserMessageCancelledEvent as nn, userMessageCancelledEventType as nr, RecoveryCompletedPayload as nt, AssistantPartialCommittedEvent as o, UserMessageDisposition as on, RunCompletedPayload as ot, BaseStateFailedEvent as p, assistantPartialCommittedEventType as pn, RunStartedPayload as pt, InferenceFailedPayload as q, toolCallCompletedEventType as qn, TurnCompletedPayload as qt, AssistantMessageContent as r, UserMessageCancelledPayload as rn, userMessageCommittedEventType as rr, RecoveryContinuation as rt, AssistantPartialCommittedPayload as s, UserMessagePromotedEvent as sn, RunEvent as st, AssistantMessageCommittedEvent as t, UserMessageCancellationReason as tn, turnStoppedEventType as tr, RecoveryCompletedEvent as tt, BaseStateCreatedEvent as u, UserMessageSubmittedPayload as un, RunInterruptedEvent as ut, CommandAdmittedPayload as v, commandCancelledEventType as vn, SteeringMessageQueuedPayload as vt, CommandFailedEvent as w, compactionRequestedEventType as wn, SummaryCreatedEvent as wt, CommandCompletedEvent as x, commandStartedEventType as xn, StopTurnAppliedPayload as xt, CommandCancelledEvent as y, commandCompletedEventType as yn, StopControlEvent as yt, ContextRebasedEvent as z, runStartedEventType as zn, ToolCallRejectionReason as zt };
8006
+ //# sourceMappingURL=durable-br2C1bWK.d.ts.map