effect-durable-agent 0.1.0-alpha.29 → 0.1.0-alpha.30

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 (93) hide show
  1. package/dist/{compaction-ajHZ5l7f.js → compaction-63iEDHHl.js} +2 -2
  2. package/dist/{compaction-ajHZ5l7f.js.map → compaction-63iEDHHl.js.map} +1 -1
  3. package/dist/{delivery-Bb7pkQ9o.js → delivery-2ZILvoRD.js} +2 -2
  4. package/dist/{delivery-Bb7pkQ9o.js.map → delivery-2ZILvoRD.js.map} +1 -1
  5. package/dist/{delivery-C0aN3Oza.d.ts → delivery-RjM1_NAE.d.ts} +4 -3
  6. package/dist/domain/command-queues.d.ts +1 -1
  7. package/dist/domain/message-transcript.d.ts +1 -1
  8. package/dist/domain/reduced-state-schema.d.ts +1 -1
  9. package/dist/domain/reduced-state-schema.js +2 -1
  10. package/dist/domain/reduced-state-schema.js.map +1 -1
  11. package/dist/domain/reduced-state.d.ts +1 -1
  12. package/dist/domain/reduced-state.js +13 -4
  13. package/dist/domain/reduced-state.js.map +1 -1
  14. package/dist/domain/run-scheduling.d.ts +1 -1
  15. package/dist/{durable-CKdCCqhw.d.ts → durable-Cqv5ZRFA.d.ts} +14 -2
  16. package/dist/{durable-CD__3ztN.js → durable-D13w1Qr3.js} +11 -3
  17. package/dist/{durable-CD__3ztN.js.map → durable-D13w1Qr3.js.map} +1 -1
  18. package/dist/{event-factory-VAci3NJb.js → event-factory-_vF1bIJ7.js} +2 -2
  19. package/dist/{event-factory-VAci3NJb.js.map → event-factory-_vF1bIJ7.js.map} +1 -1
  20. package/dist/{events-BWuvzVml.d.ts → events-Dg0o5wWs.d.ts} +2 -2
  21. package/dist/{in-memory-IgxnTbGb.js → in-memory-CeODnZhE.js} +3 -3
  22. package/dist/{in-memory-IgxnTbGb.js.map → in-memory-CeODnZhE.js.map} +1 -1
  23. package/dist/index.d.ts +3 -3
  24. package/dist/index.js +1 -1
  25. package/dist/{interpreter-BdRoYrfL.js → interpreter-DKGJ1sSx.js} +4 -4
  26. package/dist/{interpreter-BdRoYrfL.js.map → interpreter-DKGJ1sSx.js.map} +1 -1
  27. package/dist/{model-resolver-DUms5p6X.d.ts → model-resolver-D0vcDZsU.d.ts} +2 -2
  28. package/dist/{records-DWKEjuqb.js → records--54mZEBx.js} +2 -2
  29. package/dist/{records-DWKEjuqb.js.map → records--54mZEBx.js.map} +1 -1
  30. package/dist/{reduced-state-D50SR0qM.d.ts → reduced-state-DU2ECOUp.d.ts} +1600 -1561
  31. package/dist/{reduced-state-schema-jyZWJ0QS.d.ts → reduced-state-schema-B2t3cobf.d.ts} +3 -1
  32. package/dist/{reducer-registry-CPObI3cs.d.ts → reducer-registry-JLU1yptN.d.ts} +4 -4
  33. package/dist/{run-scheduling-wakeup-B19JTeyq.d.ts → run-scheduling-wakeup-D_bGdicf.d.ts} +2 -2
  34. package/dist/services/compaction.d.ts +1 -1
  35. package/dist/services/compaction.js +1 -1
  36. package/dist/services/model-call.d.ts +1 -1
  37. package/dist/services/model-resolver.d.ts +1 -1
  38. package/dist/services/prompt-projector.d.ts +1 -1
  39. package/dist/services/reducer-registry.d.ts +1 -1
  40. package/dist/services/run-scheduler.d.ts +1 -1
  41. package/dist/services/run-scheduling-wakeup.d.ts +1 -1
  42. package/dist/services/runtime-layer.d.ts +8 -8
  43. package/dist/services/runtime-layer.js +4 -4
  44. package/dist/services/runtime.d.ts +1 -1
  45. package/dist/services/runtime.js +2 -2
  46. package/dist/services/session-event-observer.d.ts +1 -1
  47. package/dist/services/session-query.d.ts +1 -1
  48. package/dist/services/session-query.js +2 -2
  49. package/dist/services/session-state.d.ts +1 -1
  50. package/dist/services/session-state.js +1 -1
  51. package/dist/services/session-store.d.ts +1 -1
  52. package/dist/services/session-store.js +5 -5
  53. package/dist/services/sink-checkpoint-store.d.ts +1 -1
  54. package/dist/services/sink-registry.d.ts +1 -1
  55. package/dist/services/sink-registry.js +1 -1
  56. package/dist/services/span-names.d.ts +1 -1
  57. package/dist/services/span-names.js +1 -0
  58. package/dist/services/span-names.js.map +1 -1
  59. package/dist/services/tool-registry.d.ts +2 -2
  60. package/dist/services/tool-registry.js +10 -1
  61. package/dist/services/tool-registry.js.map +1 -1
  62. package/dist/services/tracing.d.ts +1 -1
  63. package/dist/{session-event-observer-BdZltdrK.d.ts → session-event-observer-HvrRckbC.d.ts} +2 -2
  64. package/dist/{session-state-BW0l2aNk.js → session-state-BQYsuBqi.js} +154 -59
  65. package/dist/session-state-BQYsuBqi.js.map +1 -0
  66. package/dist/{session-store-CWYZ29CV.d.ts → session-store-CQxg9U82.d.ts} +3 -3
  67. package/dist/{sink-checkpoint-store-B8Ky5nfW.d.ts → sink-checkpoint-store-DWGifxp0.d.ts} +2 -2
  68. package/dist/{sink-registry-D0MetcNq.js → sink-registry-DskRcyOS.js} +2 -2
  69. package/dist/{sink-registry-D0MetcNq.js.map → sink-registry-DskRcyOS.js.map} +1 -1
  70. package/dist/{subscription-hkD4M3xp.js → subscription-DmO3BcdT.js} +2 -2
  71. package/dist/{subscription-hkD4M3xp.js.map → subscription-DmO3BcdT.js.map} +1 -1
  72. package/dist/{subscription-DelB8L87.d.ts → subscription-rC35dAWn.d.ts} +2 -2
  73. package/dist/testkit/layers.d.ts +11 -9
  74. package/dist/testkit/layers.js +5 -5
  75. package/dist/testkit/layers.js.map +1 -1
  76. package/dist/testkit/transcript.d.ts +2 -2
  77. package/dist/testkit/transcript.js +4 -4
  78. package/dist/{tool-registry-B_WE2ZwK.d.ts → tool-registry-BzlMhwzj.d.ts} +35 -6
  79. package/dist/transcript.d.ts +4 -4
  80. package/dist/transcript.js +5 -5
  81. package/dist/types/events/durable.d.ts +1 -1
  82. package/dist/types/events/durable.js +1 -1
  83. package/dist/types/events.d.ts +2 -2
  84. package/dist/types/events.js +1 -1
  85. package/dist/websocket/events.d.ts +1 -1
  86. package/dist/websocket/events.js +1 -1
  87. package/dist/websocket.d.ts +3 -3
  88. package/dist/websocket.js +3 -3
  89. package/dist/{window-read-BG8lxMVB.d.ts → window-read-CBZEJ84M.d.ts} +2 -2
  90. package/dist/{window-read-C8anZVdl.js → window-read-DPFAA1hM.js} +2 -2
  91. package/dist/{window-read-C8anZVdl.js.map → window-read-DPFAA1hM.js.map} +1 -1
  92. package/package.json +1 -1
  93. package/dist/session-state-BW0l2aNk.js.map +0 -1
@@ -2,20 +2,20 @@ import { c as StopTurnCommand, d as UserMessageContent, i as GrantRunCommand, l
2
2
  import { b as TurnId, c as EventId, g as SessionId, h as SequenceNumber, i as ContextVersion, l as InferenceId, m as RunRequestId, n as CommandId, p as RunId, r as CompactionId, u as MessageId, v as SummaryId, y as ToolCallId } from "./core-BcimKMIv.js";
3
3
  import { n as EDARunTrace, t as EDAEventTrace } from "./tracing-BwjbF285.js";
4
4
  import { c as FailurePayload, d as NonNegativeInt, f as PositionedEvent, g as ToolName, h as SystemPromptText, i as EventEnvelope, n as EphemeralEventEnvelope, p as ProviderPartId, t as DurableEventEnvelope, u as ModelSelectionPayload, v as UsagePayload } from "./envelope-Che6KatU.js";
5
- import { $t as ToolCallRejectedPayload, A as CompactionFailedEvent, B as ContextRebasedPayload, Bt as SummaryCreatedEvent, Cn as UserMessagePromotedEvent, Ct as RunSchedulingGrantedPayload, D as CommandStartedPayload, Dt as RunSchedulingRequestedPayload, E as CommandStartedEvent, En as UserMessageSubmittedPayload, Et as RunSchedulingRequestedEvent, F as CompactionStartedPayload, G as InferenceCompletedEvent, Gt as ToolCallCompletedPayload, H as DecodedDurableEvent, Ht as SystemMessageCommittedEvent, It as StopTurnAppliedEvent, J as InferenceFailedEvent, K as InferenceCompletedPayload, Kt as ToolCallCreatedEvent, Lt as StopTurnAppliedPayload, M as CompactionRequestedEvent, Mt as SteeringMessageCancelledPayload, N as CompactionRequestedPayload, Nt as SteeringMessageQueuedEvent, O as CompactionCompletedEvent, Ot as RunStartedEvent, P as CompactionStartedEvent, Pt as SteeringMessageQueuedPayload, Qt as ToolCallRejectedEvent, Rt as StopTurnRequestedEvent, S as CommandCompletedPayload, St as RunSchedulingGrantedEvent, T as CommandFailedPayload, Tn as UserMessageSubmittedEvent, Tt as RunSchedulingInvalidatedPayload, Ut as SystemMessageCommittedPayload, Vt as SummaryCreatedPayload, Wt as ToolCallCompletedEvent, X as InferenceStartedEvent, Xt as ToolCallFailedPayload, Y as InferenceFailedPayload, Yt as ToolCallFailedEvent, Z as InferenceStartedPayload, _ as CommandAdmittedEvent, _t as RunInterruptedEvent, b as CommandCancelledPayload, bn as UserMessageCommittedEvent, bt as RunSchedulingDeliveredPayload, cn as TurnCompletedEvent, ct as RecoveryCompletedEvent, dn as TurnFailedEvent, fn as TurnFailedPayload, ft as RunCompletedEvent, gn as TurnStoppedPayload, gt as RunFailedPayload, hn as TurnStoppedEvent, ht as RunFailedEvent, j as CompactionFailedPayload, jt as SteeringMessageCancelledEvent, k as CompactionCompletedPayload, kt as RunStartedPayload, ln as TurnCompletedPayload, lt as RecoveryCompletedPayload, mn as TurnStartedPayload, n as AssistantMessageCommittedPayload, nn as ToolCallStartedEvent, o as AssistantPartialCommittedEvent, ot as PendingMessagesPausedEvent, pn as TurnStartedEvent, pt as RunCompletedPayload, qt as ToolCallCreatedPayload, r as AssistantMessageContent, rn as ToolCallStartedPayload, s as AssistantPartialCommittedPayload, st as PendingMessagesPausedPayload, t as AssistantMessageCommittedEvent, ut as RecoveryContinuation, v as CommandAdmittedPayload, vn as UserMessageCancelledEvent, vt as RunInterruptedPayload, w as CommandFailedEvent, wn as UserMessagePromotedPayload, wt as RunSchedulingInvalidatedEvent, x as CommandCompletedEvent, xn as UserMessageCommittedPayload, y as CommandCancelledEvent, yn as UserMessageCancelledPayload, yt as RunSchedulingDeliveredEvent, z as ContextRebasedEvent, zt as StopTurnRequestedPayload } from "./durable-CKdCCqhw.js";
6
- import { d as ToolParamsDeltaEvent, f as ToolParamsDeltaPayload, g as ToolParamsStartPayload, h as ToolParamsStartEvent, i as ReasoningDeltaPayload, l as TextDeltaEvent, m as ToolParamsEndPayload, p as ToolParamsEndEvent, r as ReasoningDeltaEvent, u as TextDeltaPayload } from "./events-BWuvzVml.js";
5
+ import { $t as ToolCallRejectedPayload, A as CompactionFailedEvent, B as ContextRebasedPayload, Bt as SummaryCreatedEvent, Cn as UserMessagePromotedEvent, Ct as RunSchedulingGrantedPayload, D as CommandStartedPayload, Dt as RunSchedulingRequestedPayload, E as CommandStartedEvent, En as UserMessageSubmittedPayload, Et as RunSchedulingRequestedEvent, F as CompactionStartedPayload, G as InferenceCompletedEvent, Gt as ToolCallCompletedPayload, H as DecodedDurableEvent, Ht as SystemMessageCommittedEvent, It as StopTurnAppliedEvent, J as InferenceFailedEvent, K as InferenceCompletedPayload, Kt as ToolCallCreatedEvent, Lt as StopTurnAppliedPayload, M as CompactionRequestedEvent, Mt as SteeringMessageCancelledPayload, N as CompactionRequestedPayload, Nt as SteeringMessageQueuedEvent, O as CompactionCompletedEvent, Ot as RunStartedEvent, P as CompactionStartedEvent, Pt as SteeringMessageQueuedPayload, Qt as ToolCallRejectedEvent, Rt as StopTurnRequestedEvent, S as CommandCompletedPayload, St as RunSchedulingGrantedEvent, T as CommandFailedPayload, Tn as UserMessageSubmittedEvent, Tt as RunSchedulingInvalidatedPayload, Ut as SystemMessageCommittedPayload, Vt as SummaryCreatedPayload, Wt as ToolCallCompletedEvent, X as InferenceStartedEvent, Xt as ToolCallFailedPayload, Y as InferenceFailedPayload, Yt as ToolCallFailedEvent, Z as InferenceStartedPayload, _ as CommandAdmittedEvent, _t as RunInterruptedEvent, b as CommandCancelledPayload, bn as UserMessageCommittedEvent, bt as RunSchedulingDeliveredPayload, cn as TurnCompletedEvent, ct as RecoveryCompletedEvent, dn as TurnFailedEvent, fn as TurnFailedPayload, ft as RunCompletedEvent, gn as TurnStoppedPayload, gt as RunFailedPayload, hn as TurnStoppedEvent, ht as RunFailedEvent, j as CompactionFailedPayload, jt as SteeringMessageCancelledEvent, k as CompactionCompletedPayload, kt as RunStartedPayload, ln as TurnCompletedPayload, lt as RecoveryCompletedPayload, mn as TurnStartedPayload, n as AssistantMessageCommittedPayload, nn as ToolCallStartedEvent, o as AssistantPartialCommittedEvent, ot as PendingMessagesPausedEvent, pn as TurnStartedEvent, pt as RunCompletedPayload, qt as ToolCallCreatedPayload, r as AssistantMessageContent, rn as ToolCallStartedPayload, s as AssistantPartialCommittedPayload, st as PendingMessagesPausedPayload, t as AssistantMessageCommittedEvent, ut as RecoveryContinuation, v as CommandAdmittedPayload, vn as UserMessageCancelledEvent, vt as RunInterruptedPayload, w as CommandFailedEvent, wn as UserMessagePromotedPayload, wt as RunSchedulingInvalidatedEvent, x as CommandCompletedEvent, xn as UserMessageCommittedPayload, y as CommandCancelledEvent, yn as UserMessageCancelledPayload, yt as RunSchedulingDeliveredEvent, z as ContextRebasedEvent, zt as StopTurnRequestedPayload } from "./durable-Cqv5ZRFA.js";
6
+ import { d as ToolParamsDeltaEvent, f as ToolParamsDeltaPayload, g as ToolParamsStartPayload, h as ToolParamsStartEvent, i as ReasoningDeltaPayload, l as TextDeltaEvent, m as ToolParamsEndPayload, p as ToolParamsEndEvent, r as ReasoningDeltaEvent, u as TextDeltaPayload } from "./events-Dg0o5wWs.js";
7
7
  import { i as ContextProjection, n as CompactionPolicyId, t as CompactionExecutorId } from "./context-projection-D_uRtK3r.js";
8
- import { o as EDASessionStore, r as DurableAppendEntry, s as EDASessionStoreError, t as CommittedDurableEvent } from "./session-store-CWYZ29CV.js";
9
- import { t as ModelResolver } from "./model-resolver-DUms5p6X.js";
10
- import { a as EDAReducerStateSnapshot, r as EDAReducerRegistry } from "./reducer-registry-CPObI3cs.js";
11
- import { r as EDAToolRegistry, t as EDAModelToolkit } from "./tool-registry-B_WE2ZwK.js";
8
+ import { o as EDASessionStore, r as DurableAppendEntry, s as EDASessionStoreError, t as CommittedDurableEvent } from "./session-store-CQxg9U82.js";
9
+ import { t as ModelResolver } from "./model-resolver-D0vcDZsU.js";
10
+ import { a as EDAReducerStateSnapshot, r as EDAReducerRegistry } from "./reducer-registry-JLU1yptN.js";
11
+ import { n as EDAToolExecutionContext, r as EDAToolRegistry, s as ToolRecoveryPolicy, t as EDAModelToolkit } from "./tool-registry-BzlMhwzj.js";
12
12
  import { t as IdGenerator } from "./id-generator-BKGoKjt-.js";
13
13
  import { t as EDAKeepAlive } from "./keep-alive-_zFCUvt3.js";
14
- import { t as SessionEventObserver } from "./session-event-observer-BdZltdrK.js";
15
- import { n as SinkCheckpointStore } from "./sink-checkpoint-store-B8Ky5nfW.js";
16
- import { t as RunSchedulingWakeup } from "./run-scheduling-wakeup-B19JTeyq.js";
14
+ import { t as SessionEventObserver } from "./session-event-observer-HvrRckbC.js";
15
+ import { n as SinkCheckpointStore } from "./sink-checkpoint-store-DWGifxp0.js";
16
+ import { t as RunSchedulingWakeup } from "./run-scheduling-wakeup-D_bGdicf.js";
17
17
  import { n as TokenConsumptionState } from "./model-usage-0GeHwaaU.js";
18
- import { w as ReducedStateSchema } from "./reduced-state-schema-jyZWJ0QS.js";
18
+ import { w as ReducedStateSchema } from "./reduced-state-schema-B2t3cobf.js";
19
19
  import * as Context from "effect/Context";
20
20
  import * as Effect from "effect/Effect";
21
21
  import * as Layer from "effect/Layer";
@@ -648,10 +648,111 @@ type CommittedToolCallCreated = CommittedDurableEvent & {
648
648
  interface ExecuteToolCallInput {
649
649
  readonly created: CommittedDurableEvent;
650
650
  readonly eventSink: SessionEventSink;
651
+ /** Set by startup recovery to re-invoke a call whose first attempt was interrupted. */
652
+ readonly resume?: NonNullable<EDAToolExecutionContext["recovery"]>;
651
653
  }
652
654
  /** Result variant for one framework tool execution attempt. */
653
655
  declare const ToolExecutionOutcome: Schema.Union<readonly [Schema.TaggedStruct<"ToolExecutionCompleted", {
654
656
  readonly committed: Schema.Codec<CommittedDurableEvent<{
657
+ readonly eventId: string & import("effect/Brand").Brand<"EventId">;
658
+ readonly sessionId: string & import("effect/Brand").Brand<"SessionId">;
659
+ readonly correlationId?: (string & import("effect/Brand").Brand<"CorrelationId">) | undefined;
660
+ readonly createdAtMs: number & import("effect/Brand").Brand<"UnixEpochMillis">;
661
+ readonly trace: {
662
+ readonly span: {
663
+ readonly traceId: string & import("effect/Brand").Brand<"EDATraceId">;
664
+ readonly spanId: string & import("effect/Brand").Brand<"EDASpanId">;
665
+ readonly sampled: boolean;
666
+ readonly tracestate: string | null;
667
+ };
668
+ readonly links: readonly {
669
+ readonly context: {
670
+ readonly traceId: string & import("effect/Brand").Brand<"EDATraceId">;
671
+ readonly spanId: string & import("effect/Brand").Brand<"EDASpanId">;
672
+ readonly sampled: boolean;
673
+ readonly tracestate: string | null;
674
+ };
675
+ readonly attributes: {
676
+ readonly [x: string]: string | number | boolean;
677
+ };
678
+ }[];
679
+ };
680
+ readonly durability: "durable";
681
+ readonly namespace: "effect-durable-agent";
682
+ readonly type: "CommandCompleted";
683
+ readonly schemaVersion: number;
684
+ readonly payload: {
685
+ readonly commandId: string & import("effect/Brand").Brand<"CommandId">;
686
+ };
687
+ } | {
688
+ readonly eventId: string & import("effect/Brand").Brand<"EventId">;
689
+ readonly sessionId: string & import("effect/Brand").Brand<"SessionId">;
690
+ readonly correlationId?: (string & import("effect/Brand").Brand<"CorrelationId">) | undefined;
691
+ readonly createdAtMs: number & import("effect/Brand").Brand<"UnixEpochMillis">;
692
+ readonly trace: {
693
+ readonly span: {
694
+ readonly traceId: string & import("effect/Brand").Brand<"EDATraceId">;
695
+ readonly spanId: string & import("effect/Brand").Brand<"EDASpanId">;
696
+ readonly sampled: boolean;
697
+ readonly tracestate: string | null;
698
+ };
699
+ readonly links: readonly {
700
+ readonly context: {
701
+ readonly traceId: string & import("effect/Brand").Brand<"EDATraceId">;
702
+ readonly spanId: string & import("effect/Brand").Brand<"EDASpanId">;
703
+ readonly sampled: boolean;
704
+ readonly tracestate: string | null;
705
+ };
706
+ readonly attributes: {
707
+ readonly [x: string]: string | number | boolean;
708
+ };
709
+ }[];
710
+ };
711
+ readonly durability: "durable";
712
+ readonly namespace: "effect-durable-agent";
713
+ readonly type: "CommandFailed";
714
+ readonly schemaVersion: number;
715
+ readonly payload: {
716
+ readonly commandId: string & import("effect/Brand").Brand<"CommandId">;
717
+ readonly error: {
718
+ readonly message: string;
719
+ readonly code?: string | undefined;
720
+ readonly details?: unknown;
721
+ };
722
+ };
723
+ } | {
724
+ readonly eventId: string & import("effect/Brand").Brand<"EventId">;
725
+ readonly sessionId: string & import("effect/Brand").Brand<"SessionId">;
726
+ readonly correlationId?: (string & import("effect/Brand").Brand<"CorrelationId">) | undefined;
727
+ readonly createdAtMs: number & import("effect/Brand").Brand<"UnixEpochMillis">;
728
+ readonly trace: {
729
+ readonly span: {
730
+ readonly traceId: string & import("effect/Brand").Brand<"EDATraceId">;
731
+ readonly spanId: string & import("effect/Brand").Brand<"EDASpanId">;
732
+ readonly sampled: boolean;
733
+ readonly tracestate: string | null;
734
+ };
735
+ readonly links: readonly {
736
+ readonly context: {
737
+ readonly traceId: string & import("effect/Brand").Brand<"EDATraceId">;
738
+ readonly spanId: string & import("effect/Brand").Brand<"EDASpanId">;
739
+ readonly sampled: boolean;
740
+ readonly tracestate: string | null;
741
+ };
742
+ readonly attributes: {
743
+ readonly [x: string]: string | number | boolean;
744
+ };
745
+ }[];
746
+ };
747
+ readonly durability: "durable";
748
+ readonly namespace: "effect-durable-agent";
749
+ readonly type: "CommandCancelled";
750
+ readonly schemaVersion: number;
751
+ readonly payload: {
752
+ readonly commandId: string & import("effect/Brand").Brand<"CommandId">;
753
+ readonly reason: string;
754
+ };
755
+ } | {
655
756
  readonly eventId: string & import("effect/Brand").Brand<"EventId">;
656
757
  readonly sessionId: string & import("effect/Brand").Brand<"SessionId">;
657
758
  readonly correlationId?: (string & import("effect/Brand").Brand<"CorrelationId">) | undefined;
@@ -1144,105 +1245,6 @@ declare const ToolExecutionOutcome: Schema.Union<readonly [Schema.TaggedStruct<"
1144
1245
  readonly payload: {
1145
1246
  readonly commandId: string & import("effect/Brand").Brand<"CommandId">;
1146
1247
  };
1147
- } | {
1148
- readonly eventId: string & import("effect/Brand").Brand<"EventId">;
1149
- readonly sessionId: string & import("effect/Brand").Brand<"SessionId">;
1150
- readonly correlationId?: (string & import("effect/Brand").Brand<"CorrelationId">) | undefined;
1151
- readonly createdAtMs: number & import("effect/Brand").Brand<"UnixEpochMillis">;
1152
- readonly trace: {
1153
- readonly span: {
1154
- readonly traceId: string & import("effect/Brand").Brand<"EDATraceId">;
1155
- readonly spanId: string & import("effect/Brand").Brand<"EDASpanId">;
1156
- readonly sampled: boolean;
1157
- readonly tracestate: string | null;
1158
- };
1159
- readonly links: readonly {
1160
- readonly context: {
1161
- readonly traceId: string & import("effect/Brand").Brand<"EDATraceId">;
1162
- readonly spanId: string & import("effect/Brand").Brand<"EDASpanId">;
1163
- readonly sampled: boolean;
1164
- readonly tracestate: string | null;
1165
- };
1166
- readonly attributes: {
1167
- readonly [x: string]: string | number | boolean;
1168
- };
1169
- }[];
1170
- };
1171
- readonly durability: "durable";
1172
- readonly namespace: "effect-durable-agent";
1173
- readonly type: "CommandCompleted";
1174
- readonly schemaVersion: number;
1175
- readonly payload: {
1176
- readonly commandId: string & import("effect/Brand").Brand<"CommandId">;
1177
- };
1178
- } | {
1179
- readonly eventId: string & import("effect/Brand").Brand<"EventId">;
1180
- readonly sessionId: string & import("effect/Brand").Brand<"SessionId">;
1181
- readonly correlationId?: (string & import("effect/Brand").Brand<"CorrelationId">) | undefined;
1182
- readonly createdAtMs: number & import("effect/Brand").Brand<"UnixEpochMillis">;
1183
- readonly trace: {
1184
- readonly span: {
1185
- readonly traceId: string & import("effect/Brand").Brand<"EDATraceId">;
1186
- readonly spanId: string & import("effect/Brand").Brand<"EDASpanId">;
1187
- readonly sampled: boolean;
1188
- readonly tracestate: string | null;
1189
- };
1190
- readonly links: readonly {
1191
- readonly context: {
1192
- readonly traceId: string & import("effect/Brand").Brand<"EDATraceId">;
1193
- readonly spanId: string & import("effect/Brand").Brand<"EDASpanId">;
1194
- readonly sampled: boolean;
1195
- readonly tracestate: string | null;
1196
- };
1197
- readonly attributes: {
1198
- readonly [x: string]: string | number | boolean;
1199
- };
1200
- }[];
1201
- };
1202
- readonly durability: "durable";
1203
- readonly namespace: "effect-durable-agent";
1204
- readonly type: "CommandFailed";
1205
- readonly schemaVersion: number;
1206
- readonly payload: {
1207
- readonly commandId: string & import("effect/Brand").Brand<"CommandId">;
1208
- readonly error: {
1209
- readonly message: string;
1210
- readonly code?: string | undefined;
1211
- readonly details?: unknown;
1212
- };
1213
- };
1214
- } | {
1215
- readonly eventId: string & import("effect/Brand").Brand<"EventId">;
1216
- readonly sessionId: string & import("effect/Brand").Brand<"SessionId">;
1217
- readonly correlationId?: (string & import("effect/Brand").Brand<"CorrelationId">) | undefined;
1218
- readonly createdAtMs: number & import("effect/Brand").Brand<"UnixEpochMillis">;
1219
- readonly trace: {
1220
- readonly span: {
1221
- readonly traceId: string & import("effect/Brand").Brand<"EDATraceId">;
1222
- readonly spanId: string & import("effect/Brand").Brand<"EDASpanId">;
1223
- readonly sampled: boolean;
1224
- readonly tracestate: string | null;
1225
- };
1226
- readonly links: readonly {
1227
- readonly context: {
1228
- readonly traceId: string & import("effect/Brand").Brand<"EDATraceId">;
1229
- readonly spanId: string & import("effect/Brand").Brand<"EDASpanId">;
1230
- readonly sampled: boolean;
1231
- readonly tracestate: string | null;
1232
- };
1233
- readonly attributes: {
1234
- readonly [x: string]: string | number | boolean;
1235
- };
1236
- }[];
1237
- };
1238
- readonly durability: "durable";
1239
- readonly namespace: "effect-durable-agent";
1240
- readonly type: "CommandCancelled";
1241
- readonly schemaVersion: number;
1242
- readonly payload: {
1243
- readonly commandId: string & import("effect/Brand").Brand<"CommandId">;
1244
- readonly reason: string;
1245
- };
1246
1248
  } | {
1247
1249
  readonly eventId: string & import("effect/Brand").Brand<"EventId">;
1248
1250
  readonly sessionId: string & import("effect/Brand").Brand<"SessionId">;
@@ -2679,6 +2681,7 @@ declare const ToolExecutionOutcome: Schema.Union<readonly [Schema.TaggedStruct<"
2679
2681
  readonly schemaVersion: number;
2680
2682
  readonly payload: {
2681
2683
  readonly toolCallId: string & import("effect/Brand").Brand<"ToolCallId">;
2684
+ readonly attempt?: number | undefined;
2682
2685
  };
2683
2686
  } | {
2684
2687
  readonly eventId: string & import("effect/Brand").Brand<"EventId">;
@@ -3325,12 +3328,10 @@ declare const ToolExecutionOutcome: Schema.Union<readonly [Schema.TaggedStruct<"
3325
3328
  };
3326
3329
  readonly durability: "durable";
3327
3330
  readonly namespace: "effect-durable-agent";
3328
- readonly type: "TurnAttemptStarted";
3331
+ readonly type: "CommandCompleted";
3329
3332
  readonly schemaVersion: number;
3330
3333
  readonly payload: {
3331
- readonly runId: string & import("effect/Brand").Brand<"RunId">;
3332
- readonly turnId: string & import("effect/Brand").Brand<"TurnId">;
3333
- readonly attemptId: string & import("effect/Brand").Brand<"InferenceId">;
3334
+ readonly commandId: string & import("effect/Brand").Brand<"CommandId">;
3334
3335
  };
3335
3336
  } | {
3336
3337
  readonly eventId: string & import("effect/Brand").Brand<"EventId">;
@@ -3358,23 +3359,124 @@ declare const ToolExecutionOutcome: Schema.Union<readonly [Schema.TaggedStruct<"
3358
3359
  };
3359
3360
  readonly durability: "durable";
3360
3361
  readonly namespace: "effect-durable-agent";
3361
- readonly type: "TurnAttemptCompleted";
3362
+ readonly type: "CommandFailed";
3362
3363
  readonly schemaVersion: number;
3363
3364
  readonly payload: {
3364
- readonly runId: string & import("effect/Brand").Brand<"RunId">;
3365
- readonly turnId: string & import("effect/Brand").Brand<"TurnId">;
3366
- readonly attemptId: string & import("effect/Brand").Brand<"InferenceId">;
3367
- readonly finishReason?: string | undefined;
3368
- readonly usage?: {
3369
- readonly inputTokens?: number | undefined;
3370
- readonly cachedInputTokens?: number | undefined;
3371
- readonly cacheWriteInputTokens?: number | undefined;
3372
- readonly outputTokens?: number | undefined;
3373
- readonly textTokens?: number | undefined;
3374
- readonly reasoningTokens?: number | undefined;
3375
- } | undefined;
3376
- readonly responseMetadata?: unknown;
3377
- readonly finishMetadata?: unknown;
3365
+ readonly commandId: string & import("effect/Brand").Brand<"CommandId">;
3366
+ readonly error: {
3367
+ readonly message: string;
3368
+ readonly code?: string | undefined;
3369
+ readonly details?: unknown;
3370
+ };
3371
+ };
3372
+ } | {
3373
+ readonly eventId: string & import("effect/Brand").Brand<"EventId">;
3374
+ readonly sessionId: string & import("effect/Brand").Brand<"SessionId">;
3375
+ readonly correlationId?: (string & import("effect/Brand").Brand<"CorrelationId">) | undefined;
3376
+ readonly createdAtMs: number & import("effect/Brand").Brand<"UnixEpochMillis">;
3377
+ readonly trace: {
3378
+ readonly span: {
3379
+ readonly traceId: string & import("effect/Brand").Brand<"EDATraceId">;
3380
+ readonly spanId: string & import("effect/Brand").Brand<"EDASpanId">;
3381
+ readonly sampled: boolean;
3382
+ readonly tracestate: string | null;
3383
+ };
3384
+ readonly links: readonly {
3385
+ readonly context: {
3386
+ readonly traceId: string & import("effect/Brand").Brand<"EDATraceId">;
3387
+ readonly spanId: string & import("effect/Brand").Brand<"EDASpanId">;
3388
+ readonly sampled: boolean;
3389
+ readonly tracestate: string | null;
3390
+ };
3391
+ readonly attributes: {
3392
+ readonly [x: string]: string | number | boolean;
3393
+ };
3394
+ }[];
3395
+ };
3396
+ readonly durability: "durable";
3397
+ readonly namespace: "effect-durable-agent";
3398
+ readonly type: "CommandCancelled";
3399
+ readonly schemaVersion: number;
3400
+ readonly payload: {
3401
+ readonly commandId: string & import("effect/Brand").Brand<"CommandId">;
3402
+ readonly reason: string;
3403
+ };
3404
+ } | {
3405
+ readonly eventId: string & import("effect/Brand").Brand<"EventId">;
3406
+ readonly sessionId: string & import("effect/Brand").Brand<"SessionId">;
3407
+ readonly correlationId?: (string & import("effect/Brand").Brand<"CorrelationId">) | undefined;
3408
+ readonly createdAtMs: number & import("effect/Brand").Brand<"UnixEpochMillis">;
3409
+ readonly trace: {
3410
+ readonly span: {
3411
+ readonly traceId: string & import("effect/Brand").Brand<"EDATraceId">;
3412
+ readonly spanId: string & import("effect/Brand").Brand<"EDASpanId">;
3413
+ readonly sampled: boolean;
3414
+ readonly tracestate: string | null;
3415
+ };
3416
+ readonly links: readonly {
3417
+ readonly context: {
3418
+ readonly traceId: string & import("effect/Brand").Brand<"EDATraceId">;
3419
+ readonly spanId: string & import("effect/Brand").Brand<"EDASpanId">;
3420
+ readonly sampled: boolean;
3421
+ readonly tracestate: string | null;
3422
+ };
3423
+ readonly attributes: {
3424
+ readonly [x: string]: string | number | boolean;
3425
+ };
3426
+ }[];
3427
+ };
3428
+ readonly durability: "durable";
3429
+ readonly namespace: "effect-durable-agent";
3430
+ readonly type: "TurnAttemptStarted";
3431
+ readonly schemaVersion: number;
3432
+ readonly payload: {
3433
+ readonly runId: string & import("effect/Brand").Brand<"RunId">;
3434
+ readonly turnId: string & import("effect/Brand").Brand<"TurnId">;
3435
+ readonly attemptId: string & import("effect/Brand").Brand<"InferenceId">;
3436
+ };
3437
+ } | {
3438
+ readonly eventId: string & import("effect/Brand").Brand<"EventId">;
3439
+ readonly sessionId: string & import("effect/Brand").Brand<"SessionId">;
3440
+ readonly correlationId?: (string & import("effect/Brand").Brand<"CorrelationId">) | undefined;
3441
+ readonly createdAtMs: number & import("effect/Brand").Brand<"UnixEpochMillis">;
3442
+ readonly trace: {
3443
+ readonly span: {
3444
+ readonly traceId: string & import("effect/Brand").Brand<"EDATraceId">;
3445
+ readonly spanId: string & import("effect/Brand").Brand<"EDASpanId">;
3446
+ readonly sampled: boolean;
3447
+ readonly tracestate: string | null;
3448
+ };
3449
+ readonly links: readonly {
3450
+ readonly context: {
3451
+ readonly traceId: string & import("effect/Brand").Brand<"EDATraceId">;
3452
+ readonly spanId: string & import("effect/Brand").Brand<"EDASpanId">;
3453
+ readonly sampled: boolean;
3454
+ readonly tracestate: string | null;
3455
+ };
3456
+ readonly attributes: {
3457
+ readonly [x: string]: string | number | boolean;
3458
+ };
3459
+ }[];
3460
+ };
3461
+ readonly durability: "durable";
3462
+ readonly namespace: "effect-durable-agent";
3463
+ readonly type: "TurnAttemptCompleted";
3464
+ readonly schemaVersion: number;
3465
+ readonly payload: {
3466
+ readonly runId: string & import("effect/Brand").Brand<"RunId">;
3467
+ readonly turnId: string & import("effect/Brand").Brand<"TurnId">;
3468
+ readonly attemptId: string & import("effect/Brand").Brand<"InferenceId">;
3469
+ readonly finishReason?: string | undefined;
3470
+ readonly usage?: {
3471
+ readonly inputTokens?: number | undefined;
3472
+ readonly cachedInputTokens?: number | undefined;
3473
+ readonly cacheWriteInputTokens?: number | undefined;
3474
+ readonly outputTokens?: number | undefined;
3475
+ readonly textTokens?: number | undefined;
3476
+ readonly reasoningTokens?: number | undefined;
3477
+ } | undefined;
3478
+ readonly responseMetadata?: unknown;
3479
+ readonly finishMetadata?: unknown;
3378
3480
  };
3379
3481
  } | {
3380
3482
  readonly eventId: string & import("effect/Brand").Brand<"EventId">;
@@ -3818,10 +3920,11 @@ declare const ToolExecutionOutcome: Schema.Union<readonly [Schema.TaggedStruct<"
3818
3920
  };
3819
3921
  readonly durability: "durable";
3820
3922
  readonly namespace: "effect-durable-agent";
3821
- readonly type: "CommandCompleted";
3923
+ readonly type: "SystemMessageCommitted";
3822
3924
  readonly schemaVersion: number;
3823
3925
  readonly payload: {
3824
- readonly commandId: string & import("effect/Brand").Brand<"CommandId">;
3926
+ readonly messageId: string & import("effect/Brand").Brand<"MessageId">;
3927
+ readonly content: string;
3825
3928
  };
3826
3929
  } | {
3827
3930
  readonly eventId: string & import("effect/Brand").Brand<"EventId">;
@@ -3849,15 +3952,58 @@ declare const ToolExecutionOutcome: Schema.Union<readonly [Schema.TaggedStruct<"
3849
3952
  };
3850
3953
  readonly durability: "durable";
3851
3954
  readonly namespace: "effect-durable-agent";
3852
- readonly type: "CommandFailed";
3955
+ readonly type: "UserMessageCommitted";
3853
3956
  readonly schemaVersion: number;
3854
3957
  readonly payload: {
3855
3958
  readonly commandId: string & import("effect/Brand").Brand<"CommandId">;
3856
- readonly error: {
3857
- readonly message: string;
3858
- readonly code?: string | undefined;
3859
- readonly details?: unknown;
3860
- };
3959
+ readonly messageId: string & import("effect/Brand").Brand<"MessageId">;
3960
+ readonly content: readonly [{
3961
+ readonly type: "text";
3962
+ readonly text: string;
3963
+ readonly "~effect/ai/Prompt/Part": "~effect/ai/Prompt/Part";
3964
+ readonly options: {
3965
+ readonly [x: string]: Schema.Json;
3966
+ };
3967
+ }, ...{
3968
+ readonly type: "text";
3969
+ readonly text: string;
3970
+ readonly "~effect/ai/Prompt/Part": "~effect/ai/Prompt/Part";
3971
+ readonly options: {
3972
+ readonly [x: string]: Schema.Json;
3973
+ };
3974
+ }[]] | readonly [{
3975
+ readonly type: "text";
3976
+ readonly text: string;
3977
+ readonly "~effect/ai/Prompt/Part": "~effect/ai/Prompt/Part";
3978
+ readonly options: {
3979
+ readonly [x: string]: Schema.Json;
3980
+ };
3981
+ } | {
3982
+ readonly type: "file";
3983
+ readonly mediaType: string;
3984
+ readonly fileName?: string | undefined;
3985
+ readonly data: string | URL | Uint8Array<ArrayBufferLike>;
3986
+ readonly "~effect/ai/Prompt/Part": "~effect/ai/Prompt/Part";
3987
+ readonly options: {
3988
+ readonly [x: string]: Schema.Json;
3989
+ };
3990
+ }, ...({
3991
+ readonly type: "text";
3992
+ readonly text: string;
3993
+ readonly "~effect/ai/Prompt/Part": "~effect/ai/Prompt/Part";
3994
+ readonly options: {
3995
+ readonly [x: string]: Schema.Json;
3996
+ };
3997
+ } | {
3998
+ readonly type: "file";
3999
+ readonly mediaType: string;
4000
+ readonly fileName?: string | undefined;
4001
+ readonly data: string | URL | Uint8Array<ArrayBufferLike>;
4002
+ readonly "~effect/ai/Prompt/Part": "~effect/ai/Prompt/Part";
4003
+ readonly options: {
4004
+ readonly [x: string]: Schema.Json;
4005
+ };
4006
+ })[]];
3861
4007
  };
3862
4008
  } | {
3863
4009
  readonly eventId: string & import("effect/Brand").Brand<"EventId">;
@@ -3885,11 +4031,59 @@ declare const ToolExecutionOutcome: Schema.Union<readonly [Schema.TaggedStruct<"
3885
4031
  };
3886
4032
  readonly durability: "durable";
3887
4033
  readonly namespace: "effect-durable-agent";
3888
- readonly type: "CommandCancelled";
4034
+ readonly type: "SteeringMessageQueued";
3889
4035
  readonly schemaVersion: number;
3890
4036
  readonly payload: {
3891
4037
  readonly commandId: string & import("effect/Brand").Brand<"CommandId">;
3892
- readonly reason: string;
4038
+ readonly messageId: string & import("effect/Brand").Brand<"MessageId">;
4039
+ readonly runId: string & import("effect/Brand").Brand<"RunId">;
4040
+ readonly content: readonly [{
4041
+ readonly type: "text";
4042
+ readonly text: string;
4043
+ readonly "~effect/ai/Prompt/Part": "~effect/ai/Prompt/Part";
4044
+ readonly options: {
4045
+ readonly [x: string]: Schema.Json;
4046
+ };
4047
+ }, ...{
4048
+ readonly type: "text";
4049
+ readonly text: string;
4050
+ readonly "~effect/ai/Prompt/Part": "~effect/ai/Prompt/Part";
4051
+ readonly options: {
4052
+ readonly [x: string]: Schema.Json;
4053
+ };
4054
+ }[]] | readonly [{
4055
+ readonly type: "text";
4056
+ readonly text: string;
4057
+ readonly "~effect/ai/Prompt/Part": "~effect/ai/Prompt/Part";
4058
+ readonly options: {
4059
+ readonly [x: string]: Schema.Json;
4060
+ };
4061
+ } | {
4062
+ readonly type: "file";
4063
+ readonly mediaType: string;
4064
+ readonly fileName?: string | undefined;
4065
+ readonly data: string | URL | Uint8Array<ArrayBufferLike>;
4066
+ readonly "~effect/ai/Prompt/Part": "~effect/ai/Prompt/Part";
4067
+ readonly options: {
4068
+ readonly [x: string]: Schema.Json;
4069
+ };
4070
+ }, ...({
4071
+ readonly type: "text";
4072
+ readonly text: string;
4073
+ readonly "~effect/ai/Prompt/Part": "~effect/ai/Prompt/Part";
4074
+ readonly options: {
4075
+ readonly [x: string]: Schema.Json;
4076
+ };
4077
+ } | {
4078
+ readonly type: "file";
4079
+ readonly mediaType: string;
4080
+ readonly fileName?: string | undefined;
4081
+ readonly data: string | URL | Uint8Array<ArrayBufferLike>;
4082
+ readonly "~effect/ai/Prompt/Part": "~effect/ai/Prompt/Part";
4083
+ readonly options: {
4084
+ readonly [x: string]: Schema.Json;
4085
+ };
4086
+ })[]];
3893
4087
  };
3894
4088
  } | {
3895
4089
  readonly eventId: string & import("effect/Brand").Brand<"EventId">;
@@ -3917,11 +4111,12 @@ declare const ToolExecutionOutcome: Schema.Union<readonly [Schema.TaggedStruct<"
3917
4111
  };
3918
4112
  readonly durability: "durable";
3919
4113
  readonly namespace: "effect-durable-agent";
3920
- readonly type: "SystemMessageCommitted";
4114
+ readonly type: "SteeringMessageCancelled";
3921
4115
  readonly schemaVersion: number;
3922
4116
  readonly payload: {
3923
4117
  readonly messageId: string & import("effect/Brand").Brand<"MessageId">;
3924
- readonly content: string;
4118
+ readonly runId: string & import("effect/Brand").Brand<"RunId">;
4119
+ readonly reason: string;
3925
4120
  };
3926
4121
  } | {
3927
4122
  readonly eventId: string & import("effect/Brand").Brand<"EventId">;
@@ -3949,11 +4144,12 @@ declare const ToolExecutionOutcome: Schema.Union<readonly [Schema.TaggedStruct<"
3949
4144
  };
3950
4145
  readonly durability: "durable";
3951
4146
  readonly namespace: "effect-durable-agent";
3952
- readonly type: "UserMessageCommitted";
4147
+ readonly type: "UserMessageSubmitted";
3953
4148
  readonly schemaVersion: number;
3954
4149
  readonly payload: {
3955
4150
  readonly commandId: string & import("effect/Brand").Brand<"CommandId">;
3956
4151
  readonly messageId: string & import("effect/Brand").Brand<"MessageId">;
4152
+ readonly disposition: "queue" | "steer";
3957
4153
  readonly content: readonly [{
3958
4154
  readonly type: "text";
3959
4155
  readonly text: string;
@@ -4001,266 +4197,73 @@ declare const ToolExecutionOutcome: Schema.Union<readonly [Schema.TaggedStruct<"
4001
4197
  readonly [x: string]: Schema.Json;
4002
4198
  };
4003
4199
  })[]];
4004
- };
4005
- } | {
4006
- readonly eventId: string & import("effect/Brand").Brand<"EventId">;
4007
- readonly sessionId: string & import("effect/Brand").Brand<"SessionId">;
4008
- readonly correlationId?: (string & import("effect/Brand").Brand<"CorrelationId">) | undefined;
4009
- readonly createdAtMs: number & import("effect/Brand").Brand<"UnixEpochMillis">;
4010
- readonly trace: {
4011
- readonly span: {
4012
- readonly traceId: string & import("effect/Brand").Brand<"EDATraceId">;
4013
- readonly spanId: string & import("effect/Brand").Brand<"EDASpanId">;
4014
- readonly sampled: boolean;
4015
- readonly tracestate: string | null;
4016
- };
4017
- readonly links: readonly {
4018
- readonly context: {
4019
- readonly traceId: string & import("effect/Brand").Brand<"EDATraceId">;
4020
- readonly spanId: string & import("effect/Brand").Brand<"EDASpanId">;
4021
- readonly sampled: boolean;
4022
- readonly tracestate: string | null;
4023
- };
4024
- readonly attributes: {
4025
- readonly [x: string]: string | number | boolean;
4026
- };
4027
- }[];
4028
- };
4029
- readonly durability: "durable";
4030
- readonly namespace: "effect-durable-agent";
4031
- readonly type: "SteeringMessageQueued";
4032
- readonly schemaVersion: number;
4033
- readonly payload: {
4034
- readonly commandId: string & import("effect/Brand").Brand<"CommandId">;
4035
- readonly messageId: string & import("effect/Brand").Brand<"MessageId">;
4036
- readonly runId: string & import("effect/Brand").Brand<"RunId">;
4037
- readonly content: readonly [{
4038
- readonly type: "text";
4039
- readonly text: string;
4040
- readonly "~effect/ai/Prompt/Part": "~effect/ai/Prompt/Part";
4041
- readonly options: {
4042
- readonly [x: string]: Schema.Json;
4043
- };
4044
- }, ...{
4045
- readonly type: "text";
4046
- readonly text: string;
4047
- readonly "~effect/ai/Prompt/Part": "~effect/ai/Prompt/Part";
4048
- readonly options: {
4049
- readonly [x: string]: Schema.Json;
4050
- };
4051
- }[]] | readonly [{
4052
- readonly type: "text";
4053
- readonly text: string;
4054
- readonly "~effect/ai/Prompt/Part": "~effect/ai/Prompt/Part";
4055
- readonly options: {
4056
- readonly [x: string]: Schema.Json;
4057
- };
4058
- } | {
4059
- readonly type: "file";
4060
- readonly mediaType: string;
4061
- readonly fileName?: string | undefined;
4062
- readonly data: string | URL | Uint8Array<ArrayBufferLike>;
4063
- readonly "~effect/ai/Prompt/Part": "~effect/ai/Prompt/Part";
4064
- readonly options: {
4065
- readonly [x: string]: Schema.Json;
4066
- };
4067
- }, ...({
4068
- readonly type: "text";
4069
- readonly text: string;
4070
- readonly "~effect/ai/Prompt/Part": "~effect/ai/Prompt/Part";
4071
- readonly options: {
4072
- readonly [x: string]: Schema.Json;
4073
- };
4074
- } | {
4075
- readonly type: "file";
4076
- readonly mediaType: string;
4077
- readonly fileName?: string | undefined;
4078
- readonly data: string | URL | Uint8Array<ArrayBufferLike>;
4079
- readonly "~effect/ai/Prompt/Part": "~effect/ai/Prompt/Part";
4080
- readonly options: {
4081
- readonly [x: string]: Schema.Json;
4082
- };
4083
- })[]];
4084
- };
4085
- } | {
4086
- readonly eventId: string & import("effect/Brand").Brand<"EventId">;
4087
- readonly sessionId: string & import("effect/Brand").Brand<"SessionId">;
4088
- readonly correlationId?: (string & import("effect/Brand").Brand<"CorrelationId">) | undefined;
4089
- readonly createdAtMs: number & import("effect/Brand").Brand<"UnixEpochMillis">;
4090
- readonly trace: {
4091
- readonly span: {
4092
- readonly traceId: string & import("effect/Brand").Brand<"EDATraceId">;
4093
- readonly spanId: string & import("effect/Brand").Brand<"EDASpanId">;
4094
- readonly sampled: boolean;
4095
- readonly tracestate: string | null;
4096
- };
4097
- readonly links: readonly {
4098
- readonly context: {
4099
- readonly traceId: string & import("effect/Brand").Brand<"EDATraceId">;
4100
- readonly spanId: string & import("effect/Brand").Brand<"EDASpanId">;
4101
- readonly sampled: boolean;
4102
- readonly tracestate: string | null;
4103
- };
4104
- readonly attributes: {
4105
- readonly [x: string]: string | number | boolean;
4106
- };
4107
- }[];
4108
- };
4109
- readonly durability: "durable";
4110
- readonly namespace: "effect-durable-agent";
4111
- readonly type: "SteeringMessageCancelled";
4112
- readonly schemaVersion: number;
4113
- readonly payload: {
4114
- readonly messageId: string & import("effect/Brand").Brand<"MessageId">;
4115
- readonly runId: string & import("effect/Brand").Brand<"RunId">;
4116
- readonly reason: string;
4117
- };
4118
- } | {
4119
- readonly eventId: string & import("effect/Brand").Brand<"EventId">;
4120
- readonly sessionId: string & import("effect/Brand").Brand<"SessionId">;
4121
- readonly correlationId?: (string & import("effect/Brand").Brand<"CorrelationId">) | undefined;
4122
- readonly createdAtMs: number & import("effect/Brand").Brand<"UnixEpochMillis">;
4123
- readonly trace: {
4124
- readonly span: {
4125
- readonly traceId: string & import("effect/Brand").Brand<"EDATraceId">;
4126
- readonly spanId: string & import("effect/Brand").Brand<"EDASpanId">;
4127
- readonly sampled: boolean;
4128
- readonly tracestate: string | null;
4129
- };
4130
- readonly links: readonly {
4131
- readonly context: {
4132
- readonly traceId: string & import("effect/Brand").Brand<"EDATraceId">;
4133
- readonly spanId: string & import("effect/Brand").Brand<"EDASpanId">;
4134
- readonly sampled: boolean;
4135
- readonly tracestate: string | null;
4136
- };
4137
- readonly attributes: {
4138
- readonly [x: string]: string | number | boolean;
4139
- };
4140
- }[];
4141
- };
4142
- readonly durability: "durable";
4143
- readonly namespace: "effect-durable-agent";
4144
- readonly type: "UserMessageSubmitted";
4145
- readonly schemaVersion: number;
4146
- readonly payload: {
4147
- readonly commandId: string & import("effect/Brand").Brand<"CommandId">;
4148
- readonly messageId: string & import("effect/Brand").Brand<"MessageId">;
4149
- readonly disposition: "queue" | "steer";
4150
- readonly content: readonly [{
4151
- readonly type: "text";
4152
- readonly text: string;
4153
- readonly "~effect/ai/Prompt/Part": "~effect/ai/Prompt/Part";
4154
- readonly options: {
4155
- readonly [x: string]: Schema.Json;
4156
- };
4157
- }, ...{
4158
- readonly type: "text";
4159
- readonly text: string;
4160
- readonly "~effect/ai/Prompt/Part": "~effect/ai/Prompt/Part";
4161
- readonly options: {
4162
- readonly [x: string]: Schema.Json;
4163
- };
4164
- }[]] | readonly [{
4165
- readonly type: "text";
4166
- readonly text: string;
4167
- readonly "~effect/ai/Prompt/Part": "~effect/ai/Prompt/Part";
4168
- readonly options: {
4169
- readonly [x: string]: Schema.Json;
4170
- };
4171
- } | {
4172
- readonly type: "file";
4173
- readonly mediaType: string;
4174
- readonly fileName?: string | undefined;
4175
- readonly data: string | URL | Uint8Array<ArrayBufferLike>;
4176
- readonly "~effect/ai/Prompt/Part": "~effect/ai/Prompt/Part";
4177
- readonly options: {
4178
- readonly [x: string]: Schema.Json;
4179
- };
4180
- }, ...({
4181
- readonly type: "text";
4182
- readonly text: string;
4183
- readonly "~effect/ai/Prompt/Part": "~effect/ai/Prompt/Part";
4184
- readonly options: {
4185
- readonly [x: string]: Schema.Json;
4186
- };
4187
- } | {
4188
- readonly type: "file";
4189
- readonly mediaType: string;
4190
- readonly fileName?: string | undefined;
4191
- readonly data: string | URL | Uint8Array<ArrayBufferLike>;
4192
- readonly "~effect/ai/Prompt/Part": "~effect/ai/Prompt/Part";
4193
- readonly options: {
4194
- readonly [x: string]: Schema.Json;
4195
- };
4196
- })[]];
4197
- };
4198
- } | {
4199
- readonly eventId: string & import("effect/Brand").Brand<"EventId">;
4200
- readonly sessionId: string & import("effect/Brand").Brand<"SessionId">;
4201
- readonly correlationId?: (string & import("effect/Brand").Brand<"CorrelationId">) | undefined;
4202
- readonly createdAtMs: number & import("effect/Brand").Brand<"UnixEpochMillis">;
4203
- readonly trace: {
4204
- readonly span: {
4205
- readonly traceId: string & import("effect/Brand").Brand<"EDATraceId">;
4206
- readonly spanId: string & import("effect/Brand").Brand<"EDASpanId">;
4207
- readonly sampled: boolean;
4208
- readonly tracestate: string | null;
4209
- };
4210
- readonly links: readonly {
4211
- readonly context: {
4212
- readonly traceId: string & import("effect/Brand").Brand<"EDATraceId">;
4213
- readonly spanId: string & import("effect/Brand").Brand<"EDASpanId">;
4214
- readonly sampled: boolean;
4215
- readonly tracestate: string | null;
4216
- };
4217
- readonly attributes: {
4218
- readonly [x: string]: string | number | boolean;
4219
- };
4220
- }[];
4221
- };
4222
- readonly durability: "durable";
4223
- readonly namespace: "effect-durable-agent";
4224
- readonly type: "UserMessagePromoted";
4225
- readonly schemaVersion: number;
4226
- readonly payload: {
4227
- readonly commandId: string & import("effect/Brand").Brand<"CommandId">;
4228
- readonly messageId: string & import("effect/Brand").Brand<"MessageId">;
4229
- readonly from: "queue";
4230
- readonly to: "steer";
4231
- };
4232
- } | {
4233
- readonly eventId: string & import("effect/Brand").Brand<"EventId">;
4234
- readonly sessionId: string & import("effect/Brand").Brand<"SessionId">;
4235
- readonly correlationId?: (string & import("effect/Brand").Brand<"CorrelationId">) | undefined;
4236
- readonly createdAtMs: number & import("effect/Brand").Brand<"UnixEpochMillis">;
4237
- readonly trace: {
4238
- readonly span: {
4239
- readonly traceId: string & import("effect/Brand").Brand<"EDATraceId">;
4240
- readonly spanId: string & import("effect/Brand").Brand<"EDASpanId">;
4241
- readonly sampled: boolean;
4242
- readonly tracestate: string | null;
4243
- };
4244
- readonly links: readonly {
4245
- readonly context: {
4246
- readonly traceId: string & import("effect/Brand").Brand<"EDATraceId">;
4247
- readonly spanId: string & import("effect/Brand").Brand<"EDASpanId">;
4248
- readonly sampled: boolean;
4249
- readonly tracestate: string | null;
4250
- };
4251
- readonly attributes: {
4252
- readonly [x: string]: string | number | boolean;
4253
- };
4254
- }[];
4255
- };
4256
- readonly durability: "durable";
4257
- readonly namespace: "effect-durable-agent";
4258
- readonly type: "UserMessageCancelled";
4259
- readonly schemaVersion: number;
4260
- readonly payload: {
4261
- readonly commandId: string & import("effect/Brand").Brand<"CommandId">;
4262
- readonly messageId: string & import("effect/Brand").Brand<"MessageId">;
4263
- readonly reason: "clear-paused-queue" | "edit" | "user-cancel";
4200
+ };
4201
+ } | {
4202
+ readonly eventId: string & import("effect/Brand").Brand<"EventId">;
4203
+ readonly sessionId: string & import("effect/Brand").Brand<"SessionId">;
4204
+ readonly correlationId?: (string & import("effect/Brand").Brand<"CorrelationId">) | undefined;
4205
+ readonly createdAtMs: number & import("effect/Brand").Brand<"UnixEpochMillis">;
4206
+ readonly trace: {
4207
+ readonly span: {
4208
+ readonly traceId: string & import("effect/Brand").Brand<"EDATraceId">;
4209
+ readonly spanId: string & import("effect/Brand").Brand<"EDASpanId">;
4210
+ readonly sampled: boolean;
4211
+ readonly tracestate: string | null;
4212
+ };
4213
+ readonly links: readonly {
4214
+ readonly context: {
4215
+ readonly traceId: string & import("effect/Brand").Brand<"EDATraceId">;
4216
+ readonly spanId: string & import("effect/Brand").Brand<"EDASpanId">;
4217
+ readonly sampled: boolean;
4218
+ readonly tracestate: string | null;
4219
+ };
4220
+ readonly attributes: {
4221
+ readonly [x: string]: string | number | boolean;
4222
+ };
4223
+ }[];
4224
+ };
4225
+ readonly durability: "durable";
4226
+ readonly namespace: "effect-durable-agent";
4227
+ readonly type: "UserMessagePromoted";
4228
+ readonly schemaVersion: number;
4229
+ readonly payload: {
4230
+ readonly commandId: string & import("effect/Brand").Brand<"CommandId">;
4231
+ readonly messageId: string & import("effect/Brand").Brand<"MessageId">;
4232
+ readonly from: "queue";
4233
+ readonly to: "steer";
4234
+ };
4235
+ } | {
4236
+ readonly eventId: string & import("effect/Brand").Brand<"EventId">;
4237
+ readonly sessionId: string & import("effect/Brand").Brand<"SessionId">;
4238
+ readonly correlationId?: (string & import("effect/Brand").Brand<"CorrelationId">) | undefined;
4239
+ readonly createdAtMs: number & import("effect/Brand").Brand<"UnixEpochMillis">;
4240
+ readonly trace: {
4241
+ readonly span: {
4242
+ readonly traceId: string & import("effect/Brand").Brand<"EDATraceId">;
4243
+ readonly spanId: string & import("effect/Brand").Brand<"EDASpanId">;
4244
+ readonly sampled: boolean;
4245
+ readonly tracestate: string | null;
4246
+ };
4247
+ readonly links: readonly {
4248
+ readonly context: {
4249
+ readonly traceId: string & import("effect/Brand").Brand<"EDATraceId">;
4250
+ readonly spanId: string & import("effect/Brand").Brand<"EDASpanId">;
4251
+ readonly sampled: boolean;
4252
+ readonly tracestate: string | null;
4253
+ };
4254
+ readonly attributes: {
4255
+ readonly [x: string]: string | number | boolean;
4256
+ };
4257
+ }[];
4258
+ };
4259
+ readonly durability: "durable";
4260
+ readonly namespace: "effect-durable-agent";
4261
+ readonly type: "UserMessageCancelled";
4262
+ readonly schemaVersion: number;
4263
+ readonly payload: {
4264
+ readonly commandId: string & import("effect/Brand").Brand<"CommandId">;
4265
+ readonly messageId: string & import("effect/Brand").Brand<"MessageId">;
4266
+ readonly reason: "clear-paused-queue" | "edit" | "user-cancel";
4264
4267
  };
4265
4268
  } | {
4266
4269
  readonly eventId: string & import("effect/Brand").Brand<"EventId">;
@@ -5327,6 +5330,7 @@ declare const ToolExecutionOutcome: Schema.Union<readonly [Schema.TaggedStruct<"
5327
5330
  readonly schemaVersion: number;
5328
5331
  readonly payload: {
5329
5332
  readonly toolCallId: string & import("effect/Brand").Brand<"ToolCallId">;
5333
+ readonly attempt?: number | undefined;
5330
5334
  };
5331
5335
  } | {
5332
5336
  readonly eventId: string & import("effect/Brand").Brand<"EventId">;
@@ -8018,6 +8022,7 @@ declare const InferenceRunResult: Schema.Struct<{
8018
8022
  readonly schemaVersion: number;
8019
8023
  readonly payload: {
8020
8024
  readonly toolCallId: string & import("effect/Brand").Brand<"ToolCallId">;
8025
+ readonly attempt?: number | undefined;
8021
8026
  };
8022
8027
  } | {
8023
8028
  readonly eventId: string & import("effect/Brand").Brand<"EventId">;
@@ -10666,6 +10671,7 @@ declare const InferenceRunResult: Schema.Struct<{
10666
10671
  readonly schemaVersion: number;
10667
10672
  readonly payload: {
10668
10673
  readonly toolCallId: string & import("effect/Brand").Brand<"ToolCallId">;
10674
+ readonly attempt?: number | undefined;
10669
10675
  };
10670
10676
  } | {
10671
10677
  readonly eventId: string & import("effect/Brand").Brand<"EventId">;
@@ -13316,6 +13322,7 @@ declare const InferenceRunResult: Schema.Struct<{
13316
13322
  readonly schemaVersion: number;
13317
13323
  readonly payload: {
13318
13324
  readonly toolCallId: string & import("effect/Brand").Brand<"ToolCallId">;
13325
+ readonly attempt?: number | undefined;
13319
13326
  };
13320
13327
  } | {
13321
13328
  readonly eventId: string & import("effect/Brand").Brand<"EventId">;
@@ -16006,6 +16013,7 @@ declare const TurnRunResult: Schema.Struct<{
16006
16013
  readonly schemaVersion: number;
16007
16014
  readonly payload: {
16008
16015
  readonly toolCallId: string & import("effect/Brand").Brand<"ToolCallId">;
16016
+ readonly attempt?: number | undefined;
16009
16017
  };
16010
16018
  } | {
16011
16019
  readonly eventId: string & import("effect/Brand").Brand<"EventId">;
@@ -18653,6 +18661,7 @@ declare const TurnRunResult: Schema.Struct<{
18653
18661
  readonly schemaVersion: number;
18654
18662
  readonly payload: {
18655
18663
  readonly toolCallId: string & import("effect/Brand").Brand<"ToolCallId">;
18664
+ readonly attempt?: number | undefined;
18656
18665
  };
18657
18666
  } | {
18658
18667
  readonly eventId: string & import("effect/Brand").Brand<"EventId">;
@@ -21301,6 +21310,7 @@ declare const TurnRunResult: Schema.Struct<{
21301
21310
  readonly schemaVersion: number;
21302
21311
  readonly payload: {
21303
21312
  readonly toolCallId: string & import("effect/Brand").Brand<"ToolCallId">;
21313
+ readonly attempt?: number | undefined;
21304
21314
  };
21305
21315
  } | {
21306
21316
  readonly eventId: string & import("effect/Brand").Brand<"EventId">;
@@ -23951,6 +23961,7 @@ declare const TurnRunResult: Schema.Struct<{
23951
23961
  readonly schemaVersion: number;
23952
23962
  readonly payload: {
23953
23963
  readonly toolCallId: string & import("effect/Brand").Brand<"ToolCallId">;
23964
+ readonly attempt?: number | undefined;
23954
23965
  };
23955
23966
  } | {
23956
23967
  readonly eventId: string & import("effect/Brand").Brand<"EventId">;
@@ -26600,6 +26611,7 @@ declare const TurnRunResult: Schema.Struct<{
26600
26611
  readonly schemaVersion: number;
26601
26612
  readonly payload: {
26602
26613
  readonly toolCallId: string & import("effect/Brand").Brand<"ToolCallId">;
26614
+ readonly attempt?: number | undefined;
26603
26615
  };
26604
26616
  } | {
26605
26617
  readonly eventId: string & import("effect/Brand").Brand<"EventId">;
@@ -29247,6 +29259,7 @@ declare const TurnRunResult: Schema.Struct<{
29247
29259
  readonly schemaVersion: number;
29248
29260
  readonly payload: {
29249
29261
  readonly toolCallId: string & import("effect/Brand").Brand<"ToolCallId">;
29262
+ readonly attempt?: number | undefined;
29250
29263
  };
29251
29264
  } | {
29252
29265
  readonly eventId: string & import("effect/Brand").Brand<"EventId">;
@@ -29870,15 +29883,30 @@ declare const TurnRunResult: Schema.Struct<{
29870
29883
  type TurnRunResult = typeof TurnRunResult.Type;
29871
29884
  /** Error surface for the turn runner's inference and tool orchestration. */
29872
29885
  type TurnRunnerError = EDASessionStoreError | InferenceRunnerError | ToolExecutorError;
29886
+ /** One interrupted tool call startup recovery re-invokes. */
29887
+ interface ResumedToolCall {
29888
+ readonly created: CommittedDurableEvent;
29889
+ readonly resume: NonNullable<ExecuteToolCallInput["resume"]>;
29890
+ }
29873
29891
  /** Runtime service that owns inferences, tool execution, and turn terminalization. */
29874
29892
  interface TurnRunnerShape {
29875
29893
  /** Run one turn around a provider inference stream. */
29876
29894
  readonly runTurn: (input: RunTurnInput) => Effect.Effect<TurnRunResult, TurnRunnerError>;
29895
+ /** The recovery policy the registered toolkit declares for a tool. */
29896
+ readonly toolRecoveryPolicy: (toolName: string) => Effect.Effect<ToolRecoveryPolicy>;
29897
+ /**
29898
+ * Re-invoke interrupted tool calls (concurrently, bounded like a turn's tool batch), each
29899
+ * committing its next start, then its completion or failure.
29900
+ */
29901
+ readonly resumeToolCalls: (input: {
29902
+ readonly calls: ReadonlyArray<ResumedToolCall>;
29903
+ readonly eventSink: SessionEventSink;
29904
+ }) => Effect.Effect<void, ToolExecutorError>;
29877
29905
  }
29878
29906
  declare const TurnRunner_base: Context.ServiceClass<TurnRunner, "@effect-durable-agent/TurnRunner", TurnRunnerShape>;
29879
29907
  /** Owns one turn: turn boundaries, inferences, tool handoff, and terminal turn events. */
29880
29908
  declare class TurnRunner extends TurnRunner_base {
29881
- static readonly Live: Layer.Layer<TurnRunner, never, EventFactory | IdGenerator | InferenceRunner | ToolExecutor>;
29909
+ static readonly Live: Layer.Layer<TurnRunner, never, EDAToolRegistry | EventFactory | IdGenerator | InferenceRunner | ToolExecutor>;
29882
29910
  }
29883
29911
  //#endregion
29884
29912
  //#region src/services/session-state.d.ts
@@ -29901,6 +29929,105 @@ type SessionRunInput = typeof SessionRunInput.Type;
29901
29929
  /** Command outcome when the command's run completed and the command was completed. */
29902
29930
  declare const SessionCommandCompleted: Schema.TaggedStruct<"SessionCommandCompleted", {
29903
29931
  readonly committed: Schema.Codec<CommittedDurableEvent<{
29932
+ readonly eventId: string & import("effect/Brand").Brand<"EventId">;
29933
+ readonly sessionId: string & import("effect/Brand").Brand<"SessionId">;
29934
+ readonly correlationId?: (string & import("effect/Brand").Brand<"CorrelationId">) | undefined;
29935
+ readonly createdAtMs: number & import("effect/Brand").Brand<"UnixEpochMillis">;
29936
+ readonly trace: {
29937
+ readonly span: {
29938
+ readonly traceId: string & import("effect/Brand").Brand<"EDATraceId">;
29939
+ readonly spanId: string & import("effect/Brand").Brand<"EDASpanId">;
29940
+ readonly sampled: boolean;
29941
+ readonly tracestate: string | null;
29942
+ };
29943
+ readonly links: readonly {
29944
+ readonly context: {
29945
+ readonly traceId: string & import("effect/Brand").Brand<"EDATraceId">;
29946
+ readonly spanId: string & import("effect/Brand").Brand<"EDASpanId">;
29947
+ readonly sampled: boolean;
29948
+ readonly tracestate: string | null;
29949
+ };
29950
+ readonly attributes: {
29951
+ readonly [x: string]: string | number | boolean;
29952
+ };
29953
+ }[];
29954
+ };
29955
+ readonly durability: "durable";
29956
+ readonly namespace: "effect-durable-agent";
29957
+ readonly type: "CommandCompleted";
29958
+ readonly schemaVersion: number;
29959
+ readonly payload: {
29960
+ readonly commandId: string & import("effect/Brand").Brand<"CommandId">;
29961
+ };
29962
+ } | {
29963
+ readonly eventId: string & import("effect/Brand").Brand<"EventId">;
29964
+ readonly sessionId: string & import("effect/Brand").Brand<"SessionId">;
29965
+ readonly correlationId?: (string & import("effect/Brand").Brand<"CorrelationId">) | undefined;
29966
+ readonly createdAtMs: number & import("effect/Brand").Brand<"UnixEpochMillis">;
29967
+ readonly trace: {
29968
+ readonly span: {
29969
+ readonly traceId: string & import("effect/Brand").Brand<"EDATraceId">;
29970
+ readonly spanId: string & import("effect/Brand").Brand<"EDASpanId">;
29971
+ readonly sampled: boolean;
29972
+ readonly tracestate: string | null;
29973
+ };
29974
+ readonly links: readonly {
29975
+ readonly context: {
29976
+ readonly traceId: string & import("effect/Brand").Brand<"EDATraceId">;
29977
+ readonly spanId: string & import("effect/Brand").Brand<"EDASpanId">;
29978
+ readonly sampled: boolean;
29979
+ readonly tracestate: string | null;
29980
+ };
29981
+ readonly attributes: {
29982
+ readonly [x: string]: string | number | boolean;
29983
+ };
29984
+ }[];
29985
+ };
29986
+ readonly durability: "durable";
29987
+ readonly namespace: "effect-durable-agent";
29988
+ readonly type: "CommandFailed";
29989
+ readonly schemaVersion: number;
29990
+ readonly payload: {
29991
+ readonly commandId: string & import("effect/Brand").Brand<"CommandId">;
29992
+ readonly error: {
29993
+ readonly message: string;
29994
+ readonly code?: string | undefined;
29995
+ readonly details?: unknown;
29996
+ };
29997
+ };
29998
+ } | {
29999
+ readonly eventId: string & import("effect/Brand").Brand<"EventId">;
30000
+ readonly sessionId: string & import("effect/Brand").Brand<"SessionId">;
30001
+ readonly correlationId?: (string & import("effect/Brand").Brand<"CorrelationId">) | undefined;
30002
+ readonly createdAtMs: number & import("effect/Brand").Brand<"UnixEpochMillis">;
30003
+ readonly trace: {
30004
+ readonly span: {
30005
+ readonly traceId: string & import("effect/Brand").Brand<"EDATraceId">;
30006
+ readonly spanId: string & import("effect/Brand").Brand<"EDASpanId">;
30007
+ readonly sampled: boolean;
30008
+ readonly tracestate: string | null;
30009
+ };
30010
+ readonly links: readonly {
30011
+ readonly context: {
30012
+ readonly traceId: string & import("effect/Brand").Brand<"EDATraceId">;
30013
+ readonly spanId: string & import("effect/Brand").Brand<"EDASpanId">;
30014
+ readonly sampled: boolean;
30015
+ readonly tracestate: string | null;
30016
+ };
30017
+ readonly attributes: {
30018
+ readonly [x: string]: string | number | boolean;
30019
+ };
30020
+ }[];
30021
+ };
30022
+ readonly durability: "durable";
30023
+ readonly namespace: "effect-durable-agent";
30024
+ readonly type: "CommandCancelled";
30025
+ readonly schemaVersion: number;
30026
+ readonly payload: {
30027
+ readonly commandId: string & import("effect/Brand").Brand<"CommandId">;
30028
+ readonly reason: string;
30029
+ };
30030
+ } | {
29904
30031
  readonly eventId: string & import("effect/Brand").Brand<"EventId">;
29905
30032
  readonly sessionId: string & import("effect/Brand").Brand<"SessionId">;
29906
30033
  readonly correlationId?: (string & import("effect/Brand").Brand<"CorrelationId">) | undefined;
@@ -30393,105 +30520,6 @@ declare const SessionCommandCompleted: Schema.TaggedStruct<"SessionCommandComple
30393
30520
  readonly payload: {
30394
30521
  readonly commandId: string & import("effect/Brand").Brand<"CommandId">;
30395
30522
  };
30396
- } | {
30397
- readonly eventId: string & import("effect/Brand").Brand<"EventId">;
30398
- readonly sessionId: string & import("effect/Brand").Brand<"SessionId">;
30399
- readonly correlationId?: (string & import("effect/Brand").Brand<"CorrelationId">) | undefined;
30400
- readonly createdAtMs: number & import("effect/Brand").Brand<"UnixEpochMillis">;
30401
- readonly trace: {
30402
- readonly span: {
30403
- readonly traceId: string & import("effect/Brand").Brand<"EDATraceId">;
30404
- readonly spanId: string & import("effect/Brand").Brand<"EDASpanId">;
30405
- readonly sampled: boolean;
30406
- readonly tracestate: string | null;
30407
- };
30408
- readonly links: readonly {
30409
- readonly context: {
30410
- readonly traceId: string & import("effect/Brand").Brand<"EDATraceId">;
30411
- readonly spanId: string & import("effect/Brand").Brand<"EDASpanId">;
30412
- readonly sampled: boolean;
30413
- readonly tracestate: string | null;
30414
- };
30415
- readonly attributes: {
30416
- readonly [x: string]: string | number | boolean;
30417
- };
30418
- }[];
30419
- };
30420
- readonly durability: "durable";
30421
- readonly namespace: "effect-durable-agent";
30422
- readonly type: "CommandCompleted";
30423
- readonly schemaVersion: number;
30424
- readonly payload: {
30425
- readonly commandId: string & import("effect/Brand").Brand<"CommandId">;
30426
- };
30427
- } | {
30428
- readonly eventId: string & import("effect/Brand").Brand<"EventId">;
30429
- readonly sessionId: string & import("effect/Brand").Brand<"SessionId">;
30430
- readonly correlationId?: (string & import("effect/Brand").Brand<"CorrelationId">) | undefined;
30431
- readonly createdAtMs: number & import("effect/Brand").Brand<"UnixEpochMillis">;
30432
- readonly trace: {
30433
- readonly span: {
30434
- readonly traceId: string & import("effect/Brand").Brand<"EDATraceId">;
30435
- readonly spanId: string & import("effect/Brand").Brand<"EDASpanId">;
30436
- readonly sampled: boolean;
30437
- readonly tracestate: string | null;
30438
- };
30439
- readonly links: readonly {
30440
- readonly context: {
30441
- readonly traceId: string & import("effect/Brand").Brand<"EDATraceId">;
30442
- readonly spanId: string & import("effect/Brand").Brand<"EDASpanId">;
30443
- readonly sampled: boolean;
30444
- readonly tracestate: string | null;
30445
- };
30446
- readonly attributes: {
30447
- readonly [x: string]: string | number | boolean;
30448
- };
30449
- }[];
30450
- };
30451
- readonly durability: "durable";
30452
- readonly namespace: "effect-durable-agent";
30453
- readonly type: "CommandFailed";
30454
- readonly schemaVersion: number;
30455
- readonly payload: {
30456
- readonly commandId: string & import("effect/Brand").Brand<"CommandId">;
30457
- readonly error: {
30458
- readonly message: string;
30459
- readonly code?: string | undefined;
30460
- readonly details?: unknown;
30461
- };
30462
- };
30463
- } | {
30464
- readonly eventId: string & import("effect/Brand").Brand<"EventId">;
30465
- readonly sessionId: string & import("effect/Brand").Brand<"SessionId">;
30466
- readonly correlationId?: (string & import("effect/Brand").Brand<"CorrelationId">) | undefined;
30467
- readonly createdAtMs: number & import("effect/Brand").Brand<"UnixEpochMillis">;
30468
- readonly trace: {
30469
- readonly span: {
30470
- readonly traceId: string & import("effect/Brand").Brand<"EDATraceId">;
30471
- readonly spanId: string & import("effect/Brand").Brand<"EDASpanId">;
30472
- readonly sampled: boolean;
30473
- readonly tracestate: string | null;
30474
- };
30475
- readonly links: readonly {
30476
- readonly context: {
30477
- readonly traceId: string & import("effect/Brand").Brand<"EDATraceId">;
30478
- readonly spanId: string & import("effect/Brand").Brand<"EDASpanId">;
30479
- readonly sampled: boolean;
30480
- readonly tracestate: string | null;
30481
- };
30482
- readonly attributes: {
30483
- readonly [x: string]: string | number | boolean;
30484
- };
30485
- }[];
30486
- };
30487
- readonly durability: "durable";
30488
- readonly namespace: "effect-durable-agent";
30489
- readonly type: "CommandCancelled";
30490
- readonly schemaVersion: number;
30491
- readonly payload: {
30492
- readonly commandId: string & import("effect/Brand").Brand<"CommandId">;
30493
- readonly reason: string;
30494
- };
30495
30523
  } | {
30496
30524
  readonly eventId: string & import("effect/Brand").Brand<"EventId">;
30497
30525
  readonly sessionId: string & import("effect/Brand").Brand<"SessionId">;
@@ -31928,6 +31956,7 @@ declare const SessionCommandCompleted: Schema.TaggedStruct<"SessionCommandComple
31928
31956
  readonly schemaVersion: number;
31929
31957
  readonly payload: {
31930
31958
  readonly toolCallId: string & import("effect/Brand").Brand<"ToolCallId">;
31959
+ readonly attempt?: number | undefined;
31931
31960
  };
31932
31961
  } | {
31933
31962
  readonly eventId: string & import("effect/Brand").Brand<"EventId">;
@@ -32522,6 +32551,105 @@ type SessionCommandCompleted = typeof SessionCommandCompleted.Type;
32522
32551
  /** Command outcome when the command's run failed and the command was failed. */
32523
32552
  declare const SessionCommandFailed: Schema.TaggedStruct<"SessionCommandFailed", {
32524
32553
  readonly committed: Schema.Codec<CommittedDurableEvent<{
32554
+ readonly eventId: string & import("effect/Brand").Brand<"EventId">;
32555
+ readonly sessionId: string & import("effect/Brand").Brand<"SessionId">;
32556
+ readonly correlationId?: (string & import("effect/Brand").Brand<"CorrelationId">) | undefined;
32557
+ readonly createdAtMs: number & import("effect/Brand").Brand<"UnixEpochMillis">;
32558
+ readonly trace: {
32559
+ readonly span: {
32560
+ readonly traceId: string & import("effect/Brand").Brand<"EDATraceId">;
32561
+ readonly spanId: string & import("effect/Brand").Brand<"EDASpanId">;
32562
+ readonly sampled: boolean;
32563
+ readonly tracestate: string | null;
32564
+ };
32565
+ readonly links: readonly {
32566
+ readonly context: {
32567
+ readonly traceId: string & import("effect/Brand").Brand<"EDATraceId">;
32568
+ readonly spanId: string & import("effect/Brand").Brand<"EDASpanId">;
32569
+ readonly sampled: boolean;
32570
+ readonly tracestate: string | null;
32571
+ };
32572
+ readonly attributes: {
32573
+ readonly [x: string]: string | number | boolean;
32574
+ };
32575
+ }[];
32576
+ };
32577
+ readonly durability: "durable";
32578
+ readonly namespace: "effect-durable-agent";
32579
+ readonly type: "CommandCompleted";
32580
+ readonly schemaVersion: number;
32581
+ readonly payload: {
32582
+ readonly commandId: string & import("effect/Brand").Brand<"CommandId">;
32583
+ };
32584
+ } | {
32585
+ readonly eventId: string & import("effect/Brand").Brand<"EventId">;
32586
+ readonly sessionId: string & import("effect/Brand").Brand<"SessionId">;
32587
+ readonly correlationId?: (string & import("effect/Brand").Brand<"CorrelationId">) | undefined;
32588
+ readonly createdAtMs: number & import("effect/Brand").Brand<"UnixEpochMillis">;
32589
+ readonly trace: {
32590
+ readonly span: {
32591
+ readonly traceId: string & import("effect/Brand").Brand<"EDATraceId">;
32592
+ readonly spanId: string & import("effect/Brand").Brand<"EDASpanId">;
32593
+ readonly sampled: boolean;
32594
+ readonly tracestate: string | null;
32595
+ };
32596
+ readonly links: readonly {
32597
+ readonly context: {
32598
+ readonly traceId: string & import("effect/Brand").Brand<"EDATraceId">;
32599
+ readonly spanId: string & import("effect/Brand").Brand<"EDASpanId">;
32600
+ readonly sampled: boolean;
32601
+ readonly tracestate: string | null;
32602
+ };
32603
+ readonly attributes: {
32604
+ readonly [x: string]: string | number | boolean;
32605
+ };
32606
+ }[];
32607
+ };
32608
+ readonly durability: "durable";
32609
+ readonly namespace: "effect-durable-agent";
32610
+ readonly type: "CommandFailed";
32611
+ readonly schemaVersion: number;
32612
+ readonly payload: {
32613
+ readonly commandId: string & import("effect/Brand").Brand<"CommandId">;
32614
+ readonly error: {
32615
+ readonly message: string;
32616
+ readonly code?: string | undefined;
32617
+ readonly details?: unknown;
32618
+ };
32619
+ };
32620
+ } | {
32621
+ readonly eventId: string & import("effect/Brand").Brand<"EventId">;
32622
+ readonly sessionId: string & import("effect/Brand").Brand<"SessionId">;
32623
+ readonly correlationId?: (string & import("effect/Brand").Brand<"CorrelationId">) | undefined;
32624
+ readonly createdAtMs: number & import("effect/Brand").Brand<"UnixEpochMillis">;
32625
+ readonly trace: {
32626
+ readonly span: {
32627
+ readonly traceId: string & import("effect/Brand").Brand<"EDATraceId">;
32628
+ readonly spanId: string & import("effect/Brand").Brand<"EDASpanId">;
32629
+ readonly sampled: boolean;
32630
+ readonly tracestate: string | null;
32631
+ };
32632
+ readonly links: readonly {
32633
+ readonly context: {
32634
+ readonly traceId: string & import("effect/Brand").Brand<"EDATraceId">;
32635
+ readonly spanId: string & import("effect/Brand").Brand<"EDASpanId">;
32636
+ readonly sampled: boolean;
32637
+ readonly tracestate: string | null;
32638
+ };
32639
+ readonly attributes: {
32640
+ readonly [x: string]: string | number | boolean;
32641
+ };
32642
+ }[];
32643
+ };
32644
+ readonly durability: "durable";
32645
+ readonly namespace: "effect-durable-agent";
32646
+ readonly type: "CommandCancelled";
32647
+ readonly schemaVersion: number;
32648
+ readonly payload: {
32649
+ readonly commandId: string & import("effect/Brand").Brand<"CommandId">;
32650
+ readonly reason: string;
32651
+ };
32652
+ } | {
32525
32653
  readonly eventId: string & import("effect/Brand").Brand<"EventId">;
32526
32654
  readonly sessionId: string & import("effect/Brand").Brand<"SessionId">;
32527
32655
  readonly correlationId?: (string & import("effect/Brand").Brand<"CorrelationId">) | undefined;
@@ -32808,211 +32936,14 @@ declare const SessionCommandFailed: Schema.TaggedStruct<"SessionCommandFailed",
32808
32936
  };
32809
32937
  readonly durability: "durable";
32810
32938
  readonly namespace: "effect-durable-agent";
32811
- readonly type: "SessionConfigured";
32812
- readonly schemaVersion: number;
32813
- readonly payload: {
32814
- readonly modelSelection: {
32815
- readonly provider: string;
32816
- readonly modelId: string;
32817
- readonly settings?: unknown;
32818
- };
32819
- };
32820
- } | {
32821
- readonly eventId: string & import("effect/Brand").Brand<"EventId">;
32822
- readonly sessionId: string & import("effect/Brand").Brand<"SessionId">;
32823
- readonly correlationId?: (string & import("effect/Brand").Brand<"CorrelationId">) | undefined;
32824
- readonly createdAtMs: number & import("effect/Brand").Brand<"UnixEpochMillis">;
32825
- readonly trace: {
32826
- readonly span: {
32827
- readonly traceId: string & import("effect/Brand").Brand<"EDATraceId">;
32828
- readonly spanId: string & import("effect/Brand").Brand<"EDASpanId">;
32829
- readonly sampled: boolean;
32830
- readonly tracestate: string | null;
32831
- };
32832
- readonly links: readonly {
32833
- readonly context: {
32834
- readonly traceId: string & import("effect/Brand").Brand<"EDATraceId">;
32835
- readonly spanId: string & import("effect/Brand").Brand<"EDASpanId">;
32836
- readonly sampled: boolean;
32837
- readonly tracestate: string | null;
32838
- };
32839
- readonly attributes: {
32840
- readonly [x: string]: string | number | boolean;
32841
- };
32842
- }[];
32843
- };
32844
- readonly durability: "durable";
32845
- readonly namespace: "effect-durable-agent";
32846
- readonly type: "RunSchedulingRequested";
32847
- readonly schemaVersion: number;
32848
- readonly payload: {
32849
- readonly requestId: string & import("effect/Brand").Brand<"RunRequestId">;
32850
- readonly work: {
32851
- readonly _tag: "Command";
32852
- readonly commandId: string & import("effect/Brand").Brand<"CommandId">;
32853
- } | {
32854
- readonly _tag: "Recovery";
32855
- readonly commandId: string & import("effect/Brand").Brand<"CommandId">;
32856
- readonly interruptedRunId: string & import("effect/Brand").Brand<"RunId">;
32857
- readonly inputMessageIds: readonly (string & import("effect/Brand").Brand<"MessageId">)[];
32858
- };
32859
- };
32860
- } | {
32861
- readonly eventId: string & import("effect/Brand").Brand<"EventId">;
32862
- readonly sessionId: string & import("effect/Brand").Brand<"SessionId">;
32863
- readonly correlationId?: (string & import("effect/Brand").Brand<"CorrelationId">) | undefined;
32864
- readonly createdAtMs: number & import("effect/Brand").Brand<"UnixEpochMillis">;
32865
- readonly trace: {
32866
- readonly span: {
32867
- readonly traceId: string & import("effect/Brand").Brand<"EDATraceId">;
32868
- readonly spanId: string & import("effect/Brand").Brand<"EDASpanId">;
32869
- readonly sampled: boolean;
32870
- readonly tracestate: string | null;
32871
- };
32872
- readonly links: readonly {
32873
- readonly context: {
32874
- readonly traceId: string & import("effect/Brand").Brand<"EDATraceId">;
32875
- readonly spanId: string & import("effect/Brand").Brand<"EDASpanId">;
32876
- readonly sampled: boolean;
32877
- readonly tracestate: string | null;
32878
- };
32879
- readonly attributes: {
32880
- readonly [x: string]: string | number | boolean;
32881
- };
32882
- }[];
32883
- };
32884
- readonly durability: "durable";
32885
- readonly namespace: "effect-durable-agent";
32886
- readonly type: "RunSchedulingDelivered";
32887
- readonly schemaVersion: number;
32888
- readonly payload: {
32889
- readonly requestId: string & import("effect/Brand").Brand<"RunRequestId">;
32890
- };
32891
- } | {
32892
- readonly eventId: string & import("effect/Brand").Brand<"EventId">;
32893
- readonly sessionId: string & import("effect/Brand").Brand<"SessionId">;
32894
- readonly correlationId?: (string & import("effect/Brand").Brand<"CorrelationId">) | undefined;
32895
- readonly createdAtMs: number & import("effect/Brand").Brand<"UnixEpochMillis">;
32896
- readonly trace: {
32897
- readonly span: {
32898
- readonly traceId: string & import("effect/Brand").Brand<"EDATraceId">;
32899
- readonly spanId: string & import("effect/Brand").Brand<"EDASpanId">;
32900
- readonly sampled: boolean;
32901
- readonly tracestate: string | null;
32902
- };
32903
- readonly links: readonly {
32904
- readonly context: {
32905
- readonly traceId: string & import("effect/Brand").Brand<"EDATraceId">;
32906
- readonly spanId: string & import("effect/Brand").Brand<"EDASpanId">;
32907
- readonly sampled: boolean;
32908
- readonly tracestate: string | null;
32909
- };
32910
- readonly attributes: {
32911
- readonly [x: string]: string | number | boolean;
32912
- };
32913
- }[];
32914
- };
32915
- readonly durability: "durable";
32916
- readonly namespace: "effect-durable-agent";
32917
- readonly type: "RunSchedulingInvalidated";
32918
- readonly schemaVersion: number;
32919
- readonly payload: {
32920
- readonly requestId: string & import("effect/Brand").Brand<"RunRequestId">;
32921
- readonly reason: "ineligible" | "interrupted" | "message-cancelled" | "stopped";
32922
- };
32923
- } | {
32924
- readonly eventId: string & import("effect/Brand").Brand<"EventId">;
32925
- readonly sessionId: string & import("effect/Brand").Brand<"SessionId">;
32926
- readonly correlationId?: (string & import("effect/Brand").Brand<"CorrelationId">) | undefined;
32927
- readonly createdAtMs: number & import("effect/Brand").Brand<"UnixEpochMillis">;
32928
- readonly trace: {
32929
- readonly span: {
32930
- readonly traceId: string & import("effect/Brand").Brand<"EDATraceId">;
32931
- readonly spanId: string & import("effect/Brand").Brand<"EDASpanId">;
32932
- readonly sampled: boolean;
32933
- readonly tracestate: string | null;
32934
- };
32935
- readonly links: readonly {
32936
- readonly context: {
32937
- readonly traceId: string & import("effect/Brand").Brand<"EDATraceId">;
32938
- readonly spanId: string & import("effect/Brand").Brand<"EDASpanId">;
32939
- readonly sampled: boolean;
32940
- readonly tracestate: string | null;
32941
- };
32942
- readonly attributes: {
32943
- readonly [x: string]: string | number | boolean;
32944
- };
32945
- }[];
32946
- };
32947
- readonly durability: "durable";
32948
- readonly namespace: "effect-durable-agent";
32949
- readonly type: "RunSchedulingGranted";
32950
- readonly schemaVersion: number;
32951
- readonly payload: {
32952
- readonly requestId: string & import("effect/Brand").Brand<"RunRequestId">;
32953
- readonly runId: string & import("effect/Brand").Brand<"RunId">;
32954
- };
32955
- } | {
32956
- readonly eventId: string & import("effect/Brand").Brand<"EventId">;
32957
- readonly sessionId: string & import("effect/Brand").Brand<"SessionId">;
32958
- readonly correlationId?: (string & import("effect/Brand").Brand<"CorrelationId">) | undefined;
32959
- readonly createdAtMs: number & import("effect/Brand").Brand<"UnixEpochMillis">;
32960
- readonly trace: {
32961
- readonly span: {
32962
- readonly traceId: string & import("effect/Brand").Brand<"EDATraceId">;
32963
- readonly spanId: string & import("effect/Brand").Brand<"EDASpanId">;
32964
- readonly sampled: boolean;
32965
- readonly tracestate: string | null;
32966
- };
32967
- readonly links: readonly {
32968
- readonly context: {
32969
- readonly traceId: string & import("effect/Brand").Brand<"EDATraceId">;
32970
- readonly spanId: string & import("effect/Brand").Brand<"EDASpanId">;
32971
- readonly sampled: boolean;
32972
- readonly tracestate: string | null;
32973
- };
32974
- readonly attributes: {
32975
- readonly [x: string]: string | number | boolean;
32976
- };
32977
- }[];
32978
- };
32979
- readonly durability: "durable";
32980
- readonly namespace: "effect-durable-agent";
32981
- readonly type: "CommandAdmitted";
32982
- readonly schemaVersion: number;
32983
- readonly payload: {
32984
- readonly command: CancelPendingMessageCommand | PromotePendingMessageCommand | ResumePendingMessagesCommand | StopTurnCommand | SubmitMessageCommand;
32985
- };
32986
- } | {
32987
- readonly eventId: string & import("effect/Brand").Brand<"EventId">;
32988
- readonly sessionId: string & import("effect/Brand").Brand<"SessionId">;
32989
- readonly correlationId?: (string & import("effect/Brand").Brand<"CorrelationId">) | undefined;
32990
- readonly createdAtMs: number & import("effect/Brand").Brand<"UnixEpochMillis">;
32991
- readonly trace: {
32992
- readonly span: {
32993
- readonly traceId: string & import("effect/Brand").Brand<"EDATraceId">;
32994
- readonly spanId: string & import("effect/Brand").Brand<"EDASpanId">;
32995
- readonly sampled: boolean;
32996
- readonly tracestate: string | null;
32997
- };
32998
- readonly links: readonly {
32999
- readonly context: {
33000
- readonly traceId: string & import("effect/Brand").Brand<"EDATraceId">;
33001
- readonly spanId: string & import("effect/Brand").Brand<"EDASpanId">;
33002
- readonly sampled: boolean;
33003
- readonly tracestate: string | null;
33004
- };
33005
- readonly attributes: {
33006
- readonly [x: string]: string | number | boolean;
33007
- };
33008
- }[];
33009
- };
33010
- readonly durability: "durable";
33011
- readonly namespace: "effect-durable-agent";
33012
- readonly type: "CommandStarted";
32939
+ readonly type: "SessionConfigured";
33013
32940
  readonly schemaVersion: number;
33014
32941
  readonly payload: {
33015
- readonly commandId: string & import("effect/Brand").Brand<"CommandId">;
32942
+ readonly modelSelection: {
32943
+ readonly provider: string;
32944
+ readonly modelId: string;
32945
+ readonly settings?: unknown;
32946
+ };
33016
32947
  };
33017
32948
  } | {
33018
32949
  readonly eventId: string & import("effect/Brand").Brand<"EventId">;
@@ -33040,10 +32971,19 @@ declare const SessionCommandFailed: Schema.TaggedStruct<"SessionCommandFailed",
33040
32971
  };
33041
32972
  readonly durability: "durable";
33042
32973
  readonly namespace: "effect-durable-agent";
33043
- readonly type: "CommandCompleted";
32974
+ readonly type: "RunSchedulingRequested";
33044
32975
  readonly schemaVersion: number;
33045
32976
  readonly payload: {
33046
- readonly commandId: string & import("effect/Brand").Brand<"CommandId">;
32977
+ readonly requestId: string & import("effect/Brand").Brand<"RunRequestId">;
32978
+ readonly work: {
32979
+ readonly _tag: "Command";
32980
+ readonly commandId: string & import("effect/Brand").Brand<"CommandId">;
32981
+ } | {
32982
+ readonly _tag: "Recovery";
32983
+ readonly commandId: string & import("effect/Brand").Brand<"CommandId">;
32984
+ readonly interruptedRunId: string & import("effect/Brand").Brand<"RunId">;
32985
+ readonly inputMessageIds: readonly (string & import("effect/Brand").Brand<"MessageId">)[];
32986
+ };
33047
32987
  };
33048
32988
  } | {
33049
32989
  readonly eventId: string & import("effect/Brand").Brand<"EventId">;
@@ -33071,15 +33011,42 @@ declare const SessionCommandFailed: Schema.TaggedStruct<"SessionCommandFailed",
33071
33011
  };
33072
33012
  readonly durability: "durable";
33073
33013
  readonly namespace: "effect-durable-agent";
33074
- readonly type: "CommandFailed";
33014
+ readonly type: "RunSchedulingDelivered";
33075
33015
  readonly schemaVersion: number;
33076
33016
  readonly payload: {
33077
- readonly commandId: string & import("effect/Brand").Brand<"CommandId">;
33078
- readonly error: {
33079
- readonly message: string;
33080
- readonly code?: string | undefined;
33081
- readonly details?: unknown;
33017
+ readonly requestId: string & import("effect/Brand").Brand<"RunRequestId">;
33018
+ };
33019
+ } | {
33020
+ readonly eventId: string & import("effect/Brand").Brand<"EventId">;
33021
+ readonly sessionId: string & import("effect/Brand").Brand<"SessionId">;
33022
+ readonly correlationId?: (string & import("effect/Brand").Brand<"CorrelationId">) | undefined;
33023
+ readonly createdAtMs: number & import("effect/Brand").Brand<"UnixEpochMillis">;
33024
+ readonly trace: {
33025
+ readonly span: {
33026
+ readonly traceId: string & import("effect/Brand").Brand<"EDATraceId">;
33027
+ readonly spanId: string & import("effect/Brand").Brand<"EDASpanId">;
33028
+ readonly sampled: boolean;
33029
+ readonly tracestate: string | null;
33082
33030
  };
33031
+ readonly links: readonly {
33032
+ readonly context: {
33033
+ readonly traceId: string & import("effect/Brand").Brand<"EDATraceId">;
33034
+ readonly spanId: string & import("effect/Brand").Brand<"EDASpanId">;
33035
+ readonly sampled: boolean;
33036
+ readonly tracestate: string | null;
33037
+ };
33038
+ readonly attributes: {
33039
+ readonly [x: string]: string | number | boolean;
33040
+ };
33041
+ }[];
33042
+ };
33043
+ readonly durability: "durable";
33044
+ readonly namespace: "effect-durable-agent";
33045
+ readonly type: "RunSchedulingInvalidated";
33046
+ readonly schemaVersion: number;
33047
+ readonly payload: {
33048
+ readonly requestId: string & import("effect/Brand").Brand<"RunRequestId">;
33049
+ readonly reason: "ineligible" | "interrupted" | "message-cancelled" | "stopped";
33083
33050
  };
33084
33051
  } | {
33085
33052
  readonly eventId: string & import("effect/Brand").Brand<"EventId">;
@@ -33107,11 +33074,73 @@ declare const SessionCommandFailed: Schema.TaggedStruct<"SessionCommandFailed",
33107
33074
  };
33108
33075
  readonly durability: "durable";
33109
33076
  readonly namespace: "effect-durable-agent";
33110
- readonly type: "CommandCancelled";
33077
+ readonly type: "RunSchedulingGranted";
33078
+ readonly schemaVersion: number;
33079
+ readonly payload: {
33080
+ readonly requestId: string & import("effect/Brand").Brand<"RunRequestId">;
33081
+ readonly runId: string & import("effect/Brand").Brand<"RunId">;
33082
+ };
33083
+ } | {
33084
+ readonly eventId: string & import("effect/Brand").Brand<"EventId">;
33085
+ readonly sessionId: string & import("effect/Brand").Brand<"SessionId">;
33086
+ readonly correlationId?: (string & import("effect/Brand").Brand<"CorrelationId">) | undefined;
33087
+ readonly createdAtMs: number & import("effect/Brand").Brand<"UnixEpochMillis">;
33088
+ readonly trace: {
33089
+ readonly span: {
33090
+ readonly traceId: string & import("effect/Brand").Brand<"EDATraceId">;
33091
+ readonly spanId: string & import("effect/Brand").Brand<"EDASpanId">;
33092
+ readonly sampled: boolean;
33093
+ readonly tracestate: string | null;
33094
+ };
33095
+ readonly links: readonly {
33096
+ readonly context: {
33097
+ readonly traceId: string & import("effect/Brand").Brand<"EDATraceId">;
33098
+ readonly spanId: string & import("effect/Brand").Brand<"EDASpanId">;
33099
+ readonly sampled: boolean;
33100
+ readonly tracestate: string | null;
33101
+ };
33102
+ readonly attributes: {
33103
+ readonly [x: string]: string | number | boolean;
33104
+ };
33105
+ }[];
33106
+ };
33107
+ readonly durability: "durable";
33108
+ readonly namespace: "effect-durable-agent";
33109
+ readonly type: "CommandAdmitted";
33110
+ readonly schemaVersion: number;
33111
+ readonly payload: {
33112
+ readonly command: CancelPendingMessageCommand | PromotePendingMessageCommand | ResumePendingMessagesCommand | StopTurnCommand | SubmitMessageCommand;
33113
+ };
33114
+ } | {
33115
+ readonly eventId: string & import("effect/Brand").Brand<"EventId">;
33116
+ readonly sessionId: string & import("effect/Brand").Brand<"SessionId">;
33117
+ readonly correlationId?: (string & import("effect/Brand").Brand<"CorrelationId">) | undefined;
33118
+ readonly createdAtMs: number & import("effect/Brand").Brand<"UnixEpochMillis">;
33119
+ readonly trace: {
33120
+ readonly span: {
33121
+ readonly traceId: string & import("effect/Brand").Brand<"EDATraceId">;
33122
+ readonly spanId: string & import("effect/Brand").Brand<"EDASpanId">;
33123
+ readonly sampled: boolean;
33124
+ readonly tracestate: string | null;
33125
+ };
33126
+ readonly links: readonly {
33127
+ readonly context: {
33128
+ readonly traceId: string & import("effect/Brand").Brand<"EDATraceId">;
33129
+ readonly spanId: string & import("effect/Brand").Brand<"EDASpanId">;
33130
+ readonly sampled: boolean;
33131
+ readonly tracestate: string | null;
33132
+ };
33133
+ readonly attributes: {
33134
+ readonly [x: string]: string | number | boolean;
33135
+ };
33136
+ }[];
33137
+ };
33138
+ readonly durability: "durable";
33139
+ readonly namespace: "effect-durable-agent";
33140
+ readonly type: "CommandStarted";
33111
33141
  readonly schemaVersion: number;
33112
33142
  readonly payload: {
33113
33143
  readonly commandId: string & import("effect/Brand").Brand<"CommandId">;
33114
- readonly reason: string;
33115
33144
  };
33116
33145
  } | {
33117
33146
  readonly eventId: string & import("effect/Brand").Brand<"EventId">;
@@ -34088,15 +34117,156 @@ declare const SessionCommandFailed: Schema.TaggedStruct<"SessionCommandFailed",
34088
34117
  };
34089
34118
  readonly durability: "durable";
34090
34119
  readonly namespace: "effect-durable-agent";
34091
- readonly type: "RunFailed";
34120
+ readonly type: "RunFailed";
34121
+ readonly schemaVersion: number;
34122
+ readonly payload: {
34123
+ readonly runId: string & import("effect/Brand").Brand<"RunId">;
34124
+ readonly error: {
34125
+ readonly message: string;
34126
+ readonly code?: string | undefined;
34127
+ readonly details?: unknown;
34128
+ };
34129
+ };
34130
+ } | {
34131
+ readonly eventId: string & import("effect/Brand").Brand<"EventId">;
34132
+ readonly sessionId: string & import("effect/Brand").Brand<"SessionId">;
34133
+ readonly correlationId?: (string & import("effect/Brand").Brand<"CorrelationId">) | undefined;
34134
+ readonly createdAtMs: number & import("effect/Brand").Brand<"UnixEpochMillis">;
34135
+ readonly trace: {
34136
+ readonly span: {
34137
+ readonly traceId: string & import("effect/Brand").Brand<"EDATraceId">;
34138
+ readonly spanId: string & import("effect/Brand").Brand<"EDASpanId">;
34139
+ readonly sampled: boolean;
34140
+ readonly tracestate: string | null;
34141
+ };
34142
+ readonly links: readonly {
34143
+ readonly context: {
34144
+ readonly traceId: string & import("effect/Brand").Brand<"EDATraceId">;
34145
+ readonly spanId: string & import("effect/Brand").Brand<"EDASpanId">;
34146
+ readonly sampled: boolean;
34147
+ readonly tracestate: string | null;
34148
+ };
34149
+ readonly attributes: {
34150
+ readonly [x: string]: string | number | boolean;
34151
+ };
34152
+ }[];
34153
+ };
34154
+ readonly durability: "durable";
34155
+ readonly namespace: "effect-durable-agent";
34156
+ readonly type: "RunInterrupted";
34157
+ readonly schemaVersion: number;
34158
+ readonly payload: {
34159
+ readonly runId: string & import("effect/Brand").Brand<"RunId">;
34160
+ readonly reason: string;
34161
+ };
34162
+ } | {
34163
+ readonly eventId: string & import("effect/Brand").Brand<"EventId">;
34164
+ readonly sessionId: string & import("effect/Brand").Brand<"SessionId">;
34165
+ readonly correlationId?: (string & import("effect/Brand").Brand<"CorrelationId">) | undefined;
34166
+ readonly createdAtMs: number & import("effect/Brand").Brand<"UnixEpochMillis">;
34167
+ readonly trace: {
34168
+ readonly span: {
34169
+ readonly traceId: string & import("effect/Brand").Brand<"EDATraceId">;
34170
+ readonly spanId: string & import("effect/Brand").Brand<"EDASpanId">;
34171
+ readonly sampled: boolean;
34172
+ readonly tracestate: string | null;
34173
+ };
34174
+ readonly links: readonly {
34175
+ readonly context: {
34176
+ readonly traceId: string & import("effect/Brand").Brand<"EDATraceId">;
34177
+ readonly spanId: string & import("effect/Brand").Brand<"EDASpanId">;
34178
+ readonly sampled: boolean;
34179
+ readonly tracestate: string | null;
34180
+ };
34181
+ readonly attributes: {
34182
+ readonly [x: string]: string | number | boolean;
34183
+ };
34184
+ }[];
34185
+ };
34186
+ readonly durability: "durable";
34187
+ readonly namespace: "effect-durable-agent";
34188
+ readonly type: "RecoveryCompleted";
34189
+ readonly schemaVersion: number;
34190
+ readonly payload: {
34191
+ readonly trigger: "runtime-restart";
34192
+ readonly continuation?: {
34193
+ readonly commandId: string & import("effect/Brand").Brand<"CommandId">;
34194
+ readonly interruptedRunId: string & import("effect/Brand").Brand<"RunId">;
34195
+ readonly replacementRunId: string & import("effect/Brand").Brand<"RunId">;
34196
+ } | undefined;
34197
+ };
34198
+ } | {
34199
+ readonly eventId: string & import("effect/Brand").Brand<"EventId">;
34200
+ readonly sessionId: string & import("effect/Brand").Brand<"SessionId">;
34201
+ readonly correlationId?: (string & import("effect/Brand").Brand<"CorrelationId">) | undefined;
34202
+ readonly createdAtMs: number & import("effect/Brand").Brand<"UnixEpochMillis">;
34203
+ readonly trace: {
34204
+ readonly span: {
34205
+ readonly traceId: string & import("effect/Brand").Brand<"EDATraceId">;
34206
+ readonly spanId: string & import("effect/Brand").Brand<"EDASpanId">;
34207
+ readonly sampled: boolean;
34208
+ readonly tracestate: string | null;
34209
+ };
34210
+ readonly links: readonly {
34211
+ readonly context: {
34212
+ readonly traceId: string & import("effect/Brand").Brand<"EDATraceId">;
34213
+ readonly spanId: string & import("effect/Brand").Brand<"EDASpanId">;
34214
+ readonly sampled: boolean;
34215
+ readonly tracestate: string | null;
34216
+ };
34217
+ readonly attributes: {
34218
+ readonly [x: string]: string | number | boolean;
34219
+ };
34220
+ }[];
34221
+ };
34222
+ readonly durability: "durable";
34223
+ readonly namespace: "effect-durable-agent";
34224
+ readonly type: "TurnStarted";
34225
+ readonly schemaVersion: number;
34226
+ readonly payload: {
34227
+ readonly runId: string & import("effect/Brand").Brand<"RunId">;
34228
+ readonly turnId: string & import("effect/Brand").Brand<"TurnId">;
34229
+ readonly inputMessageIds?: readonly (string & import("effect/Brand").Brand<"MessageId">)[] | undefined;
34230
+ };
34231
+ } | {
34232
+ readonly eventId: string & import("effect/Brand").Brand<"EventId">;
34233
+ readonly sessionId: string & import("effect/Brand").Brand<"SessionId">;
34234
+ readonly correlationId?: (string & import("effect/Brand").Brand<"CorrelationId">) | undefined;
34235
+ readonly createdAtMs: number & import("effect/Brand").Brand<"UnixEpochMillis">;
34236
+ readonly trace: {
34237
+ readonly span: {
34238
+ readonly traceId: string & import("effect/Brand").Brand<"EDATraceId">;
34239
+ readonly spanId: string & import("effect/Brand").Brand<"EDASpanId">;
34240
+ readonly sampled: boolean;
34241
+ readonly tracestate: string | null;
34242
+ };
34243
+ readonly links: readonly {
34244
+ readonly context: {
34245
+ readonly traceId: string & import("effect/Brand").Brand<"EDATraceId">;
34246
+ readonly spanId: string & import("effect/Brand").Brand<"EDASpanId">;
34247
+ readonly sampled: boolean;
34248
+ readonly tracestate: string | null;
34249
+ };
34250
+ readonly attributes: {
34251
+ readonly [x: string]: string | number | boolean;
34252
+ };
34253
+ }[];
34254
+ };
34255
+ readonly durability: "durable";
34256
+ readonly namespace: "effect-durable-agent";
34257
+ readonly type: "TurnCompleted";
34092
34258
  readonly schemaVersion: number;
34093
34259
  readonly payload: {
34094
34260
  readonly runId: string & import("effect/Brand").Brand<"RunId">;
34095
- readonly error: {
34096
- readonly message: string;
34097
- readonly code?: string | undefined;
34098
- readonly details?: unknown;
34099
- };
34261
+ readonly turnId: string & import("effect/Brand").Brand<"TurnId">;
34262
+ readonly usage?: {
34263
+ readonly inputTokens?: number | undefined;
34264
+ readonly cachedInputTokens?: number | undefined;
34265
+ readonly cacheWriteInputTokens?: number | undefined;
34266
+ readonly outputTokens?: number | undefined;
34267
+ readonly textTokens?: number | undefined;
34268
+ readonly reasoningTokens?: number | undefined;
34269
+ } | undefined;
34100
34270
  };
34101
34271
  } | {
34102
34272
  readonly eventId: string & import("effect/Brand").Brand<"EventId">;
@@ -34124,11 +34294,16 @@ declare const SessionCommandFailed: Schema.TaggedStruct<"SessionCommandFailed",
34124
34294
  };
34125
34295
  readonly durability: "durable";
34126
34296
  readonly namespace: "effect-durable-agent";
34127
- readonly type: "RunInterrupted";
34297
+ readonly type: "TurnFailed";
34128
34298
  readonly schemaVersion: number;
34129
34299
  readonly payload: {
34130
34300
  readonly runId: string & import("effect/Brand").Brand<"RunId">;
34131
- readonly reason: string;
34301
+ readonly turnId: string & import("effect/Brand").Brand<"TurnId">;
34302
+ readonly error: {
34303
+ readonly message: string;
34304
+ readonly code?: string | undefined;
34305
+ readonly details?: unknown;
34306
+ };
34132
34307
  };
34133
34308
  } | {
34134
34309
  readonly eventId: string & import("effect/Brand").Brand<"EventId">;
@@ -34156,15 +34331,12 @@ declare const SessionCommandFailed: Schema.TaggedStruct<"SessionCommandFailed",
34156
34331
  };
34157
34332
  readonly durability: "durable";
34158
34333
  readonly namespace: "effect-durable-agent";
34159
- readonly type: "RecoveryCompleted";
34334
+ readonly type: "TurnStopped";
34160
34335
  readonly schemaVersion: number;
34161
34336
  readonly payload: {
34162
- readonly trigger: "runtime-restart";
34163
- readonly continuation?: {
34164
- readonly commandId: string & import("effect/Brand").Brand<"CommandId">;
34165
- readonly interruptedRunId: string & import("effect/Brand").Brand<"RunId">;
34166
- readonly replacementRunId: string & import("effect/Brand").Brand<"RunId">;
34167
- } | undefined;
34337
+ readonly runId: string & import("effect/Brand").Brand<"RunId">;
34338
+ readonly turnId: string & import("effect/Brand").Brand<"TurnId">;
34339
+ readonly reason: string;
34168
34340
  };
34169
34341
  } | {
34170
34342
  readonly eventId: string & import("effect/Brand").Brand<"EventId">;
@@ -34192,12 +34364,12 @@ declare const SessionCommandFailed: Schema.TaggedStruct<"SessionCommandFailed",
34192
34364
  };
34193
34365
  readonly durability: "durable";
34194
34366
  readonly namespace: "effect-durable-agent";
34195
- readonly type: "TurnStarted";
34367
+ readonly type: "InferenceStarted";
34196
34368
  readonly schemaVersion: number;
34197
34369
  readonly payload: {
34198
34370
  readonly runId: string & import("effect/Brand").Brand<"RunId">;
34199
34371
  readonly turnId: string & import("effect/Brand").Brand<"TurnId">;
34200
- readonly inputMessageIds?: readonly (string & import("effect/Brand").Brand<"MessageId">)[] | undefined;
34372
+ readonly inferenceId: string & import("effect/Brand").Brand<"InferenceId">;
34201
34373
  };
34202
34374
  } | {
34203
34375
  readonly eventId: string & import("effect/Brand").Brand<"EventId">;
@@ -34225,11 +34397,13 @@ declare const SessionCommandFailed: Schema.TaggedStruct<"SessionCommandFailed",
34225
34397
  };
34226
34398
  readonly durability: "durable";
34227
34399
  readonly namespace: "effect-durable-agent";
34228
- readonly type: "TurnCompleted";
34400
+ readonly type: "InferenceCompleted";
34229
34401
  readonly schemaVersion: number;
34230
34402
  readonly payload: {
34231
34403
  readonly runId: string & import("effect/Brand").Brand<"RunId">;
34232
34404
  readonly turnId: string & import("effect/Brand").Brand<"TurnId">;
34405
+ readonly inferenceId: string & import("effect/Brand").Brand<"InferenceId">;
34406
+ readonly finishReason?: string | undefined;
34233
34407
  readonly usage?: {
34234
34408
  readonly inputTokens?: number | undefined;
34235
34409
  readonly cachedInputTokens?: number | undefined;
@@ -34238,6 +34412,8 @@ declare const SessionCommandFailed: Schema.TaggedStruct<"SessionCommandFailed",
34238
34412
  readonly textTokens?: number | undefined;
34239
34413
  readonly reasoningTokens?: number | undefined;
34240
34414
  } | undefined;
34415
+ readonly responseMetadata?: unknown;
34416
+ readonly finishMetadata?: unknown;
34241
34417
  };
34242
34418
  } | {
34243
34419
  readonly eventId: string & import("effect/Brand").Brand<"EventId">;
@@ -34265,11 +34441,12 @@ declare const SessionCommandFailed: Schema.TaggedStruct<"SessionCommandFailed",
34265
34441
  };
34266
34442
  readonly durability: "durable";
34267
34443
  readonly namespace: "effect-durable-agent";
34268
- readonly type: "TurnFailed";
34444
+ readonly type: "InferenceFailed";
34269
34445
  readonly schemaVersion: number;
34270
34446
  readonly payload: {
34271
34447
  readonly runId: string & import("effect/Brand").Brand<"RunId">;
34272
34448
  readonly turnId: string & import("effect/Brand").Brand<"TurnId">;
34449
+ readonly inferenceId: string & import("effect/Brand").Brand<"InferenceId">;
34273
34450
  readonly error: {
34274
34451
  readonly message: string;
34275
34452
  readonly code?: string | undefined;
@@ -34302,12 +34479,24 @@ declare const SessionCommandFailed: Schema.TaggedStruct<"SessionCommandFailed",
34302
34479
  };
34303
34480
  readonly durability: "durable";
34304
34481
  readonly namespace: "effect-durable-agent";
34305
- readonly type: "TurnStopped";
34482
+ readonly type: "ToolCallCreated";
34306
34483
  readonly schemaVersion: number;
34307
34484
  readonly payload: {
34308
34485
  readonly runId: string & import("effect/Brand").Brand<"RunId">;
34309
34486
  readonly turnId: string & import("effect/Brand").Brand<"TurnId">;
34310
- readonly reason: string;
34487
+ readonly inferenceId: string & import("effect/Brand").Brand<"InferenceId">;
34488
+ readonly toolCallId: string & import("effect/Brand").Brand<"ToolCallId">;
34489
+ readonly promptPart: {
34490
+ readonly type: "tool-call";
34491
+ readonly params: unknown;
34492
+ readonly providerExecuted: boolean;
34493
+ readonly "~effect/ai/Prompt/Part": "~effect/ai/Prompt/Part";
34494
+ readonly options: {
34495
+ readonly [x: string]: Schema.Json;
34496
+ };
34497
+ readonly id: string & import("effect/Brand").Brand<"ProviderPartId">;
34498
+ readonly name: string;
34499
+ };
34311
34500
  };
34312
34501
  } | {
34313
34502
  readonly eventId: string & import("effect/Brand").Brand<"EventId">;
@@ -34335,12 +34524,29 @@ declare const SessionCommandFailed: Schema.TaggedStruct<"SessionCommandFailed",
34335
34524
  };
34336
34525
  readonly durability: "durable";
34337
34526
  readonly namespace: "effect-durable-agent";
34338
- readonly type: "InferenceStarted";
34527
+ readonly type: "ToolCallRejected";
34339
34528
  readonly schemaVersion: number;
34340
34529
  readonly payload: {
34341
34530
  readonly runId: string & import("effect/Brand").Brand<"RunId">;
34342
34531
  readonly turnId: string & import("effect/Brand").Brand<"TurnId">;
34343
34532
  readonly inferenceId: string & import("effect/Brand").Brand<"InferenceId">;
34533
+ readonly toolCallId: string & import("effect/Brand").Brand<"ToolCallId">;
34534
+ readonly promptPart: {
34535
+ readonly type: "tool-result";
34536
+ readonly providerExecuted: boolean;
34537
+ readonly "~effect/ai/Prompt/Part": "~effect/ai/Prompt/Part";
34538
+ readonly options: {
34539
+ readonly [x: string]: Schema.Json;
34540
+ };
34541
+ readonly id: string & import("effect/Brand").Brand<"ProviderPartId">;
34542
+ readonly name: string;
34543
+ readonly isFailure: true;
34544
+ readonly result: {
34545
+ readonly message: string;
34546
+ readonly reason: "invalid-params" | "unknown-tool";
34547
+ readonly modelFeedback: string;
34548
+ };
34549
+ };
34344
34550
  };
34345
34551
  } | {
34346
34552
  readonly eventId: string & import("effect/Brand").Brand<"EventId">;
@@ -34368,23 +34574,11 @@ declare const SessionCommandFailed: Schema.TaggedStruct<"SessionCommandFailed",
34368
34574
  };
34369
34575
  readonly durability: "durable";
34370
34576
  readonly namespace: "effect-durable-agent";
34371
- readonly type: "InferenceCompleted";
34577
+ readonly type: "ToolCallStarted";
34372
34578
  readonly schemaVersion: number;
34373
34579
  readonly payload: {
34374
- readonly runId: string & import("effect/Brand").Brand<"RunId">;
34375
- readonly turnId: string & import("effect/Brand").Brand<"TurnId">;
34376
- readonly inferenceId: string & import("effect/Brand").Brand<"InferenceId">;
34377
- readonly finishReason?: string | undefined;
34378
- readonly usage?: {
34379
- readonly inputTokens?: number | undefined;
34380
- readonly cachedInputTokens?: number | undefined;
34381
- readonly cacheWriteInputTokens?: number | undefined;
34382
- readonly outputTokens?: number | undefined;
34383
- readonly textTokens?: number | undefined;
34384
- readonly reasoningTokens?: number | undefined;
34385
- } | undefined;
34386
- readonly responseMetadata?: unknown;
34387
- readonly finishMetadata?: unknown;
34580
+ readonly toolCallId: string & import("effect/Brand").Brand<"ToolCallId">;
34581
+ readonly attempt?: number | undefined;
34388
34582
  };
34389
34583
  } | {
34390
34584
  readonly eventId: string & import("effect/Brand").Brand<"EventId">;
@@ -34412,16 +34606,21 @@ declare const SessionCommandFailed: Schema.TaggedStruct<"SessionCommandFailed",
34412
34606
  };
34413
34607
  readonly durability: "durable";
34414
34608
  readonly namespace: "effect-durable-agent";
34415
- readonly type: "InferenceFailed";
34609
+ readonly type: "ToolCallCompleted";
34416
34610
  readonly schemaVersion: number;
34417
34611
  readonly payload: {
34418
- readonly runId: string & import("effect/Brand").Brand<"RunId">;
34419
- readonly turnId: string & import("effect/Brand").Brand<"TurnId">;
34420
- readonly inferenceId: string & import("effect/Brand").Brand<"InferenceId">;
34421
- readonly error: {
34422
- readonly message: string;
34423
- readonly code?: string | undefined;
34424
- readonly details?: unknown;
34612
+ readonly toolCallId: string & import("effect/Brand").Brand<"ToolCallId">;
34613
+ readonly promptPart: {
34614
+ readonly type: "tool-result";
34615
+ readonly providerExecuted: boolean;
34616
+ readonly "~effect/ai/Prompt/Part": "~effect/ai/Prompt/Part";
34617
+ readonly options: {
34618
+ readonly [x: string]: Schema.Json;
34619
+ };
34620
+ readonly id: string & import("effect/Brand").Brand<"ProviderPartId">;
34621
+ readonly name: string;
34622
+ readonly isFailure: false;
34623
+ readonly result: unknown;
34425
34624
  };
34426
34625
  };
34427
34626
  } | {
@@ -34450,16 +34649,17 @@ declare const SessionCommandFailed: Schema.TaggedStruct<"SessionCommandFailed",
34450
34649
  };
34451
34650
  readonly durability: "durable";
34452
34651
  readonly namespace: "effect-durable-agent";
34453
- readonly type: "ToolCallCreated";
34652
+ readonly type: "ToolCallFailed";
34454
34653
  readonly schemaVersion: number;
34455
34654
  readonly payload: {
34456
- readonly runId: string & import("effect/Brand").Brand<"RunId">;
34457
- readonly turnId: string & import("effect/Brand").Brand<"TurnId">;
34458
- readonly inferenceId: string & import("effect/Brand").Brand<"InferenceId">;
34459
34655
  readonly toolCallId: string & import("effect/Brand").Brand<"ToolCallId">;
34656
+ readonly error?: {
34657
+ readonly message: string;
34658
+ readonly code?: string | undefined;
34659
+ readonly details?: unknown;
34660
+ } | undefined;
34460
34661
  readonly promptPart: {
34461
- readonly type: "tool-call";
34462
- readonly params: unknown;
34662
+ readonly type: "tool-result";
34463
34663
  readonly providerExecuted: boolean;
34464
34664
  readonly "~effect/ai/Prompt/Part": "~effect/ai/Prompt/Part";
34465
34665
  readonly options: {
@@ -34467,6 +34667,12 @@ declare const SessionCommandFailed: Schema.TaggedStruct<"SessionCommandFailed",
34467
34667
  };
34468
34668
  readonly id: string & import("effect/Brand").Brand<"ProviderPartId">;
34469
34669
  readonly name: string;
34670
+ readonly isFailure: true;
34671
+ readonly result: {
34672
+ readonly message: string;
34673
+ readonly code?: string | undefined;
34674
+ readonly details?: unknown;
34675
+ };
34470
34676
  };
34471
34677
  };
34472
34678
  } | {
@@ -34495,29 +34701,12 @@ declare const SessionCommandFailed: Schema.TaggedStruct<"SessionCommandFailed",
34495
34701
  };
34496
34702
  readonly durability: "durable";
34497
34703
  readonly namespace: "effect-durable-agent";
34498
- readonly type: "ToolCallRejected";
34704
+ readonly type: "StopTurnRequested";
34499
34705
  readonly schemaVersion: number;
34500
34706
  readonly payload: {
34501
- readonly runId: string & import("effect/Brand").Brand<"RunId">;
34502
- readonly turnId: string & import("effect/Brand").Brand<"TurnId">;
34503
- readonly inferenceId: string & import("effect/Brand").Brand<"InferenceId">;
34504
- readonly toolCallId: string & import("effect/Brand").Brand<"ToolCallId">;
34505
- readonly promptPart: {
34506
- readonly type: "tool-result";
34507
- readonly providerExecuted: boolean;
34508
- readonly "~effect/ai/Prompt/Part": "~effect/ai/Prompt/Part";
34509
- readonly options: {
34510
- readonly [x: string]: Schema.Json;
34511
- };
34512
- readonly id: string & import("effect/Brand").Brand<"ProviderPartId">;
34513
- readonly name: string;
34514
- readonly isFailure: true;
34515
- readonly result: {
34516
- readonly message: string;
34517
- readonly reason: "invalid-params" | "unknown-tool";
34518
- readonly modelFeedback: string;
34519
- };
34520
- };
34707
+ readonly commandId: string & import("effect/Brand").Brand<"CommandId">;
34708
+ readonly runId?: (string & import("effect/Brand").Brand<"RunId">) | undefined;
34709
+ readonly turnId?: (string & import("effect/Brand").Brand<"TurnId">) | undefined;
34521
34710
  };
34522
34711
  } | {
34523
34712
  readonly eventId: string & import("effect/Brand").Brand<"EventId">;
@@ -34545,10 +34734,13 @@ declare const SessionCommandFailed: Schema.TaggedStruct<"SessionCommandFailed",
34545
34734
  };
34546
34735
  readonly durability: "durable";
34547
34736
  readonly namespace: "effect-durable-agent";
34548
- readonly type: "ToolCallStarted";
34737
+ readonly type: "StopTurnApplied";
34549
34738
  readonly schemaVersion: number;
34550
34739
  readonly payload: {
34551
- readonly toolCallId: string & import("effect/Brand").Brand<"ToolCallId">;
34740
+ readonly commandId: string & import("effect/Brand").Brand<"CommandId">;
34741
+ readonly runId: string & import("effect/Brand").Brand<"RunId">;
34742
+ readonly turnId: string & import("effect/Brand").Brand<"TurnId">;
34743
+ readonly inferenceId?: (string & import("effect/Brand").Brand<"InferenceId">) | undefined;
34552
34744
  };
34553
34745
  } | {
34554
34746
  readonly eventId: string & import("effect/Brand").Brand<"EventId">;
@@ -34576,22 +34768,11 @@ declare const SessionCommandFailed: Schema.TaggedStruct<"SessionCommandFailed",
34576
34768
  };
34577
34769
  readonly durability: "durable";
34578
34770
  readonly namespace: "effect-durable-agent";
34579
- readonly type: "ToolCallCompleted";
34771
+ readonly type: "ContextProjected";
34580
34772
  readonly schemaVersion: number;
34581
34773
  readonly payload: {
34582
- readonly toolCallId: string & import("effect/Brand").Brand<"ToolCallId">;
34583
- readonly promptPart: {
34584
- readonly type: "tool-result";
34585
- readonly providerExecuted: boolean;
34586
- readonly "~effect/ai/Prompt/Part": "~effect/ai/Prompt/Part";
34587
- readonly options: {
34588
- readonly [x: string]: Schema.Json;
34589
- };
34590
- readonly id: string & import("effect/Brand").Brand<"ProviderPartId">;
34591
- readonly name: string;
34592
- readonly isFailure: false;
34593
- readonly result: unknown;
34594
- };
34774
+ readonly contextVersion: number & import("effect/Brand").Brand<"ContextVersion">;
34775
+ readonly throughSeq: number & import("effect/Brand").Brand<"SequenceNumber">;
34595
34776
  };
34596
34777
  } | {
34597
34778
  readonly eventId: string & import("effect/Brand").Brand<"EventId">;
@@ -34619,31 +34800,12 @@ declare const SessionCommandFailed: Schema.TaggedStruct<"SessionCommandFailed",
34619
34800
  };
34620
34801
  readonly durability: "durable";
34621
34802
  readonly namespace: "effect-durable-agent";
34622
- readonly type: "ToolCallFailed";
34803
+ readonly type: "CompactionRequested";
34623
34804
  readonly schemaVersion: number;
34624
34805
  readonly payload: {
34625
- readonly toolCallId: string & import("effect/Brand").Brand<"ToolCallId">;
34626
- readonly error?: {
34627
- readonly message: string;
34628
- readonly code?: string | undefined;
34629
- readonly details?: unknown;
34630
- } | undefined;
34631
- readonly promptPart: {
34632
- readonly type: "tool-result";
34633
- readonly providerExecuted: boolean;
34634
- readonly "~effect/ai/Prompt/Part": "~effect/ai/Prompt/Part";
34635
- readonly options: {
34636
- readonly [x: string]: Schema.Json;
34637
- };
34638
- readonly id: string & import("effect/Brand").Brand<"ProviderPartId">;
34639
- readonly name: string;
34640
- readonly isFailure: true;
34641
- readonly result: {
34642
- readonly message: string;
34643
- readonly code?: string | undefined;
34644
- readonly details?: unknown;
34645
- };
34646
- };
34806
+ readonly compactionId: string & import("effect/Brand").Brand<"CompactionId">;
34807
+ readonly sourceFromSeq: number & import("effect/Brand").Brand<"SequenceNumber">;
34808
+ readonly sourceToSeq: number & import("effect/Brand").Brand<"SequenceNumber">;
34647
34809
  };
34648
34810
  } | {
34649
34811
  readonly eventId: string & import("effect/Brand").Brand<"EventId">;
@@ -34671,12 +34833,10 @@ declare const SessionCommandFailed: Schema.TaggedStruct<"SessionCommandFailed",
34671
34833
  };
34672
34834
  readonly durability: "durable";
34673
34835
  readonly namespace: "effect-durable-agent";
34674
- readonly type: "StopTurnRequested";
34836
+ readonly type: "CompactionStarted";
34675
34837
  readonly schemaVersion: number;
34676
34838
  readonly payload: {
34677
- readonly commandId: string & import("effect/Brand").Brand<"CommandId">;
34678
- readonly runId?: (string & import("effect/Brand").Brand<"RunId">) | undefined;
34679
- readonly turnId?: (string & import("effect/Brand").Brand<"TurnId">) | undefined;
34839
+ readonly compactionId: string & import("effect/Brand").Brand<"CompactionId">;
34680
34840
  };
34681
34841
  } | {
34682
34842
  readonly eventId: string & import("effect/Brand").Brand<"EventId">;
@@ -34704,13 +34864,14 @@ declare const SessionCommandFailed: Schema.TaggedStruct<"SessionCommandFailed",
34704
34864
  };
34705
34865
  readonly durability: "durable";
34706
34866
  readonly namespace: "effect-durable-agent";
34707
- readonly type: "StopTurnApplied";
34867
+ readonly type: "SummaryCreated";
34708
34868
  readonly schemaVersion: number;
34709
34869
  readonly payload: {
34710
- readonly commandId: string & import("effect/Brand").Brand<"CommandId">;
34711
- readonly runId: string & import("effect/Brand").Brand<"RunId">;
34712
- readonly turnId: string & import("effect/Brand").Brand<"TurnId">;
34713
- readonly inferenceId?: (string & import("effect/Brand").Brand<"InferenceId">) | undefined;
34870
+ readonly compactionId: string & import("effect/Brand").Brand<"CompactionId">;
34871
+ readonly summaryId: string & import("effect/Brand").Brand<"SummaryId">;
34872
+ readonly sourceFromSeq: number & import("effect/Brand").Brand<"SequenceNumber">;
34873
+ readonly sourceToSeq: number & import("effect/Brand").Brand<"SequenceNumber">;
34874
+ readonly summary: unknown;
34714
34875
  };
34715
34876
  } | {
34716
34877
  readonly eventId: string & import("effect/Brand").Brand<"EventId">;
@@ -34738,11 +34899,23 @@ declare const SessionCommandFailed: Schema.TaggedStruct<"SessionCommandFailed",
34738
34899
  };
34739
34900
  readonly durability: "durable";
34740
34901
  readonly namespace: "effect-durable-agent";
34741
- readonly type: "ContextProjected";
34902
+ readonly type: "CompactionCompleted";
34742
34903
  readonly schemaVersion: number;
34743
34904
  readonly payload: {
34744
- readonly contextVersion: number & import("effect/Brand").Brand<"ContextVersion">;
34745
- readonly throughSeq: number & import("effect/Brand").Brand<"SequenceNumber">;
34905
+ readonly compactionId: string & import("effect/Brand").Brand<"CompactionId">;
34906
+ readonly modelSelection?: {
34907
+ readonly provider: string;
34908
+ readonly modelId: string;
34909
+ readonly settings?: unknown;
34910
+ } | undefined;
34911
+ readonly usage?: {
34912
+ readonly inputTokens?: number | undefined;
34913
+ readonly cachedInputTokens?: number | undefined;
34914
+ readonly cacheWriteInputTokens?: number | undefined;
34915
+ readonly outputTokens?: number | undefined;
34916
+ readonly textTokens?: number | undefined;
34917
+ readonly reasoningTokens?: number | undefined;
34918
+ } | undefined;
34746
34919
  };
34747
34920
  } | {
34748
34921
  readonly eventId: string & import("effect/Brand").Brand<"EventId">;
@@ -34770,12 +34943,13 @@ declare const SessionCommandFailed: Schema.TaggedStruct<"SessionCommandFailed",
34770
34943
  };
34771
34944
  readonly durability: "durable";
34772
34945
  readonly namespace: "effect-durable-agent";
34773
- readonly type: "CompactionRequested";
34946
+ readonly type: "ContextRebased";
34774
34947
  readonly schemaVersion: number;
34775
34948
  readonly payload: {
34776
34949
  readonly compactionId: string & import("effect/Brand").Brand<"CompactionId">;
34777
- readonly sourceFromSeq: number & import("effect/Brand").Brand<"SequenceNumber">;
34778
- readonly sourceToSeq: number & import("effect/Brand").Brand<"SequenceNumber">;
34950
+ readonly summaryId: string & import("effect/Brand").Brand<"SummaryId">;
34951
+ readonly contextVersion: number & import("effect/Brand").Brand<"ContextVersion">;
34952
+ readonly retainedFromContextSeq: number & import("effect/Brand").Brand<"SequenceNumber">;
34779
34953
  };
34780
34954
  } | {
34781
34955
  readonly eventId: string & import("effect/Brand").Brand<"EventId">;
@@ -34803,45 +34977,28 @@ declare const SessionCommandFailed: Schema.TaggedStruct<"SessionCommandFailed",
34803
34977
  };
34804
34978
  readonly durability: "durable";
34805
34979
  readonly namespace: "effect-durable-agent";
34806
- readonly type: "CompactionStarted";
34980
+ readonly type: "CompactionFailed";
34807
34981
  readonly schemaVersion: number;
34808
34982
  readonly payload: {
34809
34983
  readonly compactionId: string & import("effect/Brand").Brand<"CompactionId">;
34810
- };
34811
- } | {
34812
- readonly eventId: string & import("effect/Brand").Brand<"EventId">;
34813
- readonly sessionId: string & import("effect/Brand").Brand<"SessionId">;
34814
- readonly correlationId?: (string & import("effect/Brand").Brand<"CorrelationId">) | undefined;
34815
- readonly createdAtMs: number & import("effect/Brand").Brand<"UnixEpochMillis">;
34816
- readonly trace: {
34817
- readonly span: {
34818
- readonly traceId: string & import("effect/Brand").Brand<"EDATraceId">;
34819
- readonly spanId: string & import("effect/Brand").Brand<"EDASpanId">;
34820
- readonly sampled: boolean;
34821
- readonly tracestate: string | null;
34984
+ readonly error: {
34985
+ readonly message: string;
34986
+ readonly code?: string | undefined;
34987
+ readonly details?: unknown;
34822
34988
  };
34823
- readonly links: readonly {
34824
- readonly context: {
34825
- readonly traceId: string & import("effect/Brand").Brand<"EDATraceId">;
34826
- readonly spanId: string & import("effect/Brand").Brand<"EDASpanId">;
34827
- readonly sampled: boolean;
34828
- readonly tracestate: string | null;
34829
- };
34830
- readonly attributes: {
34831
- readonly [x: string]: string | number | boolean;
34832
- };
34833
- }[];
34834
- };
34835
- readonly durability: "durable";
34836
- readonly namespace: "effect-durable-agent";
34837
- readonly type: "SummaryCreated";
34838
- readonly schemaVersion: number;
34839
- readonly payload: {
34840
- readonly compactionId: string & import("effect/Brand").Brand<"CompactionId">;
34841
- readonly summaryId: string & import("effect/Brand").Brand<"SummaryId">;
34842
- readonly sourceFromSeq: number & import("effect/Brand").Brand<"SequenceNumber">;
34843
- readonly sourceToSeq: number & import("effect/Brand").Brand<"SequenceNumber">;
34844
- readonly summary: unknown;
34989
+ readonly modelSelection?: {
34990
+ readonly provider: string;
34991
+ readonly modelId: string;
34992
+ readonly settings?: unknown;
34993
+ } | undefined;
34994
+ readonly usage?: {
34995
+ readonly inputTokens?: number | undefined;
34996
+ readonly cachedInputTokens?: number | undefined;
34997
+ readonly cacheWriteInputTokens?: number | undefined;
34998
+ readonly outputTokens?: number | undefined;
34999
+ readonly textTokens?: number | undefined;
35000
+ readonly reasoningTokens?: number | undefined;
35001
+ } | undefined;
34845
35002
  };
34846
35003
  } | {
34847
35004
  readonly eventId: string & import("effect/Brand").Brand<"EventId">;
@@ -34869,23 +35026,11 @@ declare const SessionCommandFailed: Schema.TaggedStruct<"SessionCommandFailed",
34869
35026
  };
34870
35027
  readonly durability: "durable";
34871
35028
  readonly namespace: "effect-durable-agent";
34872
- readonly type: "CompactionCompleted";
35029
+ readonly type: "BaseStateRequested";
34873
35030
  readonly schemaVersion: number;
34874
35031
  readonly payload: {
34875
- readonly compactionId: string & import("effect/Brand").Brand<"CompactionId">;
34876
- readonly modelSelection?: {
34877
- readonly provider: string;
34878
- readonly modelId: string;
34879
- readonly settings?: unknown;
34880
- } | undefined;
34881
- readonly usage?: {
34882
- readonly inputTokens?: number | undefined;
34883
- readonly cachedInputTokens?: number | undefined;
34884
- readonly cacheWriteInputTokens?: number | undefined;
34885
- readonly outputTokens?: number | undefined;
34886
- readonly textTokens?: number | undefined;
34887
- readonly reasoningTokens?: number | undefined;
34888
- } | undefined;
35032
+ readonly baseStateId: string & import("effect/Brand").Brand<"BaseStateId">;
35033
+ readonly requestedThroughSeq: number & import("effect/Brand").Brand<"SequenceNumber">;
34889
35034
  };
34890
35035
  } | {
34891
35036
  readonly eventId: string & import("effect/Brand").Brand<"EventId">;
@@ -34913,13 +35058,11 @@ declare const SessionCommandFailed: Schema.TaggedStruct<"SessionCommandFailed",
34913
35058
  };
34914
35059
  readonly durability: "durable";
34915
35060
  readonly namespace: "effect-durable-agent";
34916
- readonly type: "ContextRebased";
35061
+ readonly type: "BaseStateCreated";
34917
35062
  readonly schemaVersion: number;
34918
35063
  readonly payload: {
34919
- readonly compactionId: string & import("effect/Brand").Brand<"CompactionId">;
34920
- readonly summaryId: string & import("effect/Brand").Brand<"SummaryId">;
34921
- readonly contextVersion: number & import("effect/Brand").Brand<"ContextVersion">;
34922
- readonly retainedFromContextSeq: number & import("effect/Brand").Brand<"SequenceNumber">;
35064
+ readonly baseStateId: string & import("effect/Brand").Brand<"BaseStateId">;
35065
+ readonly coversThroughSeq: number & import("effect/Brand").Brand<"SequenceNumber">;
34923
35066
  };
34924
35067
  } | {
34925
35068
  readonly eventId: string & import("effect/Brand").Brand<"EventId">;
@@ -34947,30 +35090,18 @@ declare const SessionCommandFailed: Schema.TaggedStruct<"SessionCommandFailed",
34947
35090
  };
34948
35091
  readonly durability: "durable";
34949
35092
  readonly namespace: "effect-durable-agent";
34950
- readonly type: "CompactionFailed";
35093
+ readonly type: "BaseStateFailed";
34951
35094
  readonly schemaVersion: number;
34952
35095
  readonly payload: {
34953
- readonly compactionId: string & import("effect/Brand").Brand<"CompactionId">;
35096
+ readonly baseStateId: string & import("effect/Brand").Brand<"BaseStateId">;
34954
35097
  readonly error: {
34955
35098
  readonly message: string;
34956
35099
  readonly code?: string | undefined;
34957
35100
  readonly details?: unknown;
34958
35101
  };
34959
- readonly modelSelection?: {
34960
- readonly provider: string;
34961
- readonly modelId: string;
34962
- readonly settings?: unknown;
34963
- } | undefined;
34964
- readonly usage?: {
34965
- readonly inputTokens?: number | undefined;
34966
- readonly cachedInputTokens?: number | undefined;
34967
- readonly cacheWriteInputTokens?: number | undefined;
34968
- readonly outputTokens?: number | undefined;
34969
- readonly textTokens?: number | undefined;
34970
- readonly reasoningTokens?: number | undefined;
34971
- } | undefined;
34972
35102
  };
34973
35103
  } | {
35104
+ readonly schemaVersion: number;
34974
35105
  readonly eventId: string & import("effect/Brand").Brand<"EventId">;
34975
35106
  readonly sessionId: string & import("effect/Brand").Brand<"SessionId">;
34976
35107
  readonly correlationId?: (string & import("effect/Brand").Brand<"CorrelationId">) | undefined;
@@ -34994,15 +35125,54 @@ declare const SessionCommandFailed: Schema.TaggedStruct<"SessionCommandFailed",
34994
35125
  };
34995
35126
  }[];
34996
35127
  };
35128
+ readonly payload: unknown;
34997
35129
  readonly durability: "durable";
34998
- readonly namespace: "effect-durable-agent";
34999
- readonly type: "BaseStateRequested";
35000
- readonly schemaVersion: number;
35001
- readonly payload: {
35002
- readonly baseStateId: string & import("effect/Brand").Brand<"BaseStateId">;
35003
- readonly requestedThroughSeq: number & import("effect/Brand").Brand<"SequenceNumber">;
35130
+ readonly namespace: "__foreign";
35131
+ readonly type: "Foreign";
35132
+ readonly _tag: "Foreign";
35133
+ readonly envelope: {
35134
+ readonly namespace: string;
35135
+ readonly type: string;
35136
+ readonly schemaVersion: number;
35137
+ readonly eventId: string & import("effect/Brand").Brand<"EventId">;
35138
+ readonly sessionId: string & import("effect/Brand").Brand<"SessionId">;
35139
+ readonly correlationId?: (string & import("effect/Brand").Brand<"CorrelationId">) | undefined;
35140
+ readonly createdAtMs: number & import("effect/Brand").Brand<"UnixEpochMillis">;
35141
+ readonly trace: {
35142
+ readonly span: {
35143
+ readonly traceId: string & import("effect/Brand").Brand<"EDATraceId">;
35144
+ readonly spanId: string & import("effect/Brand").Brand<"EDASpanId">;
35145
+ readonly sampled: boolean;
35146
+ readonly tracestate: string | null;
35147
+ };
35148
+ readonly links: readonly {
35149
+ readonly context: {
35150
+ readonly traceId: string & import("effect/Brand").Brand<"EDATraceId">;
35151
+ readonly spanId: string & import("effect/Brand").Brand<"EDASpanId">;
35152
+ readonly sampled: boolean;
35153
+ readonly tracestate: string | null;
35154
+ };
35155
+ readonly attributes: {
35156
+ readonly [x: string]: string | number | boolean;
35157
+ };
35158
+ }[];
35159
+ };
35160
+ readonly payload: unknown;
35161
+ readonly durability: "durable";
35004
35162
  };
35005
- } | {
35163
+ readonly decoded?: unknown;
35164
+ }>, {
35165
+ readonly position: {
35166
+ readonly seq: number;
35167
+ readonly subSeq: 0;
35168
+ };
35169
+ readonly event: typeof DurableEventEnvelope.Encoded;
35170
+ }, never, never>;
35171
+ }>;
35172
+ type SessionCommandFailed = typeof SessionCommandFailed.Type;
35173
+ /** Command outcome when command work was cancelled by stop, interrupt, or recovery. */
35174
+ declare const SessionCommandCancelled: Schema.TaggedStruct<"SessionCommandCancelled", {
35175
+ readonly committed: Schema.Codec<CommittedDurableEvent<{
35006
35176
  readonly eventId: string & import("effect/Brand").Brand<"EventId">;
35007
35177
  readonly sessionId: string & import("effect/Brand").Brand<"SessionId">;
35008
35178
  readonly correlationId?: (string & import("effect/Brand").Brand<"CorrelationId">) | undefined;
@@ -35028,11 +35198,10 @@ declare const SessionCommandFailed: Schema.TaggedStruct<"SessionCommandFailed",
35028
35198
  };
35029
35199
  readonly durability: "durable";
35030
35200
  readonly namespace: "effect-durable-agent";
35031
- readonly type: "BaseStateCreated";
35201
+ readonly type: "CommandCompleted";
35032
35202
  readonly schemaVersion: number;
35033
35203
  readonly payload: {
35034
- readonly baseStateId: string & import("effect/Brand").Brand<"BaseStateId">;
35035
- readonly coversThroughSeq: number & import("effect/Brand").Brand<"SequenceNumber">;
35204
+ readonly commandId: string & import("effect/Brand").Brand<"CommandId">;
35036
35205
  };
35037
35206
  } | {
35038
35207
  readonly eventId: string & import("effect/Brand").Brand<"EventId">;
@@ -35060,10 +35229,10 @@ declare const SessionCommandFailed: Schema.TaggedStruct<"SessionCommandFailed",
35060
35229
  };
35061
35230
  readonly durability: "durable";
35062
35231
  readonly namespace: "effect-durable-agent";
35063
- readonly type: "BaseStateFailed";
35232
+ readonly type: "CommandFailed";
35064
35233
  readonly schemaVersion: number;
35065
35234
  readonly payload: {
35066
- readonly baseStateId: string & import("effect/Brand").Brand<"BaseStateId">;
35235
+ readonly commandId: string & import("effect/Brand").Brand<"CommandId">;
35067
35236
  readonly error: {
35068
35237
  readonly message: string;
35069
35238
  readonly code?: string | undefined;
@@ -35071,7 +35240,6 @@ declare const SessionCommandFailed: Schema.TaggedStruct<"SessionCommandFailed",
35071
35240
  };
35072
35241
  };
35073
35242
  } | {
35074
- readonly schemaVersion: number;
35075
35243
  readonly eventId: string & import("effect/Brand").Brand<"EventId">;
35076
35244
  readonly sessionId: string & import("effect/Brand").Brand<"SessionId">;
35077
35245
  readonly correlationId?: (string & import("effect/Brand").Brand<"CorrelationId">) | undefined;
@@ -35095,54 +35263,15 @@ declare const SessionCommandFailed: Schema.TaggedStruct<"SessionCommandFailed",
35095
35263
  };
35096
35264
  }[];
35097
35265
  };
35098
- readonly payload: unknown;
35099
35266
  readonly durability: "durable";
35100
- readonly namespace: "__foreign";
35101
- readonly type: "Foreign";
35102
- readonly _tag: "Foreign";
35103
- readonly envelope: {
35104
- readonly namespace: string;
35105
- readonly type: string;
35106
- readonly schemaVersion: number;
35107
- readonly eventId: string & import("effect/Brand").Brand<"EventId">;
35108
- readonly sessionId: string & import("effect/Brand").Brand<"SessionId">;
35109
- readonly correlationId?: (string & import("effect/Brand").Brand<"CorrelationId">) | undefined;
35110
- readonly createdAtMs: number & import("effect/Brand").Brand<"UnixEpochMillis">;
35111
- readonly trace: {
35112
- readonly span: {
35113
- readonly traceId: string & import("effect/Brand").Brand<"EDATraceId">;
35114
- readonly spanId: string & import("effect/Brand").Brand<"EDASpanId">;
35115
- readonly sampled: boolean;
35116
- readonly tracestate: string | null;
35117
- };
35118
- readonly links: readonly {
35119
- readonly context: {
35120
- readonly traceId: string & import("effect/Brand").Brand<"EDATraceId">;
35121
- readonly spanId: string & import("effect/Brand").Brand<"EDASpanId">;
35122
- readonly sampled: boolean;
35123
- readonly tracestate: string | null;
35124
- };
35125
- readonly attributes: {
35126
- readonly [x: string]: string | number | boolean;
35127
- };
35128
- }[];
35129
- };
35130
- readonly payload: unknown;
35131
- readonly durability: "durable";
35132
- };
35133
- readonly decoded?: unknown;
35134
- }>, {
35135
- readonly position: {
35136
- readonly seq: number;
35137
- readonly subSeq: 0;
35267
+ readonly namespace: "effect-durable-agent";
35268
+ readonly type: "CommandCancelled";
35269
+ readonly schemaVersion: number;
35270
+ readonly payload: {
35271
+ readonly commandId: string & import("effect/Brand").Brand<"CommandId">;
35272
+ readonly reason: string;
35138
35273
  };
35139
- readonly event: typeof DurableEventEnvelope.Encoded;
35140
- }, never, never>;
35141
- }>;
35142
- type SessionCommandFailed = typeof SessionCommandFailed.Type;
35143
- /** Command outcome when command work was cancelled by stop, interrupt, or recovery. */
35144
- declare const SessionCommandCancelled: Schema.TaggedStruct<"SessionCommandCancelled", {
35145
- readonly committed: Schema.Codec<CommittedDurableEvent<{
35274
+ } | {
35146
35275
  readonly eventId: string & import("effect/Brand").Brand<"EventId">;
35147
35276
  readonly sessionId: string & import("effect/Brand").Brand<"SessionId">;
35148
35277
  readonly correlationId?: (string & import("effect/Brand").Brand<"CorrelationId">) | undefined;
@@ -35384,58 +35513,23 @@ declare const SessionCommandCancelled: Schema.TaggedStruct<"SessionCommandCancel
35384
35513
  };
35385
35514
  readonly durability: "durable";
35386
35515
  readonly namespace: "effect-durable-agent";
35387
- readonly type: "ToolCallCreated";
35388
- readonly schemaVersion: number;
35389
- readonly payload: {
35390
- readonly runId: string & import("effect/Brand").Brand<"RunId">;
35391
- readonly turnId: string & import("effect/Brand").Brand<"TurnId">;
35392
- readonly attemptId: string & import("effect/Brand").Brand<"InferenceId">;
35393
- readonly toolCallId: string & import("effect/Brand").Brand<"ToolCallId">;
35394
- readonly promptPart: {
35395
- readonly type: "tool-call";
35396
- readonly params: unknown;
35397
- readonly providerExecuted: boolean;
35398
- readonly "~effect/ai/Prompt/Part": "~effect/ai/Prompt/Part";
35399
- readonly options: {
35400
- readonly [x: string]: Schema.Json;
35401
- };
35402
- readonly id: string & import("effect/Brand").Brand<"ProviderPartId">;
35403
- readonly name: string;
35404
- };
35405
- };
35406
- } | {
35407
- readonly eventId: string & import("effect/Brand").Brand<"EventId">;
35408
- readonly sessionId: string & import("effect/Brand").Brand<"SessionId">;
35409
- readonly correlationId?: (string & import("effect/Brand").Brand<"CorrelationId">) | undefined;
35410
- readonly createdAtMs: number & import("effect/Brand").Brand<"UnixEpochMillis">;
35411
- readonly trace: {
35412
- readonly span: {
35413
- readonly traceId: string & import("effect/Brand").Brand<"EDATraceId">;
35414
- readonly spanId: string & import("effect/Brand").Brand<"EDASpanId">;
35415
- readonly sampled: boolean;
35416
- readonly tracestate: string | null;
35417
- };
35418
- readonly links: readonly {
35419
- readonly context: {
35420
- readonly traceId: string & import("effect/Brand").Brand<"EDATraceId">;
35421
- readonly spanId: string & import("effect/Brand").Brand<"EDASpanId">;
35422
- readonly sampled: boolean;
35423
- readonly tracestate: string | null;
35424
- };
35425
- readonly attributes: {
35426
- readonly [x: string]: string | number | boolean;
35427
- };
35428
- }[];
35429
- };
35430
- readonly durability: "durable";
35431
- readonly namespace: "effect-durable-agent";
35432
- readonly type: "SessionConfigured";
35516
+ readonly type: "ToolCallCreated";
35433
35517
  readonly schemaVersion: number;
35434
35518
  readonly payload: {
35435
- readonly modelSelection: {
35436
- readonly provider: string;
35437
- readonly modelId: string;
35438
- readonly settings?: unknown;
35519
+ readonly runId: string & import("effect/Brand").Brand<"RunId">;
35520
+ readonly turnId: string & import("effect/Brand").Brand<"TurnId">;
35521
+ readonly attemptId: string & import("effect/Brand").Brand<"InferenceId">;
35522
+ readonly toolCallId: string & import("effect/Brand").Brand<"ToolCallId">;
35523
+ readonly promptPart: {
35524
+ readonly type: "tool-call";
35525
+ readonly params: unknown;
35526
+ readonly providerExecuted: boolean;
35527
+ readonly "~effect/ai/Prompt/Part": "~effect/ai/Prompt/Part";
35528
+ readonly options: {
35529
+ readonly [x: string]: Schema.Json;
35530
+ };
35531
+ readonly id: string & import("effect/Brand").Brand<"ProviderPartId">;
35532
+ readonly name: string;
35439
35533
  };
35440
35534
  };
35441
35535
  } | {
@@ -35464,18 +35558,13 @@ declare const SessionCommandCancelled: Schema.TaggedStruct<"SessionCommandCancel
35464
35558
  };
35465
35559
  readonly durability: "durable";
35466
35560
  readonly namespace: "effect-durable-agent";
35467
- readonly type: "RunSchedulingRequested";
35561
+ readonly type: "SessionConfigured";
35468
35562
  readonly schemaVersion: number;
35469
35563
  readonly payload: {
35470
- readonly requestId: string & import("effect/Brand").Brand<"RunRequestId">;
35471
- readonly work: {
35472
- readonly _tag: "Command";
35473
- readonly commandId: string & import("effect/Brand").Brand<"CommandId">;
35474
- } | {
35475
- readonly _tag: "Recovery";
35476
- readonly commandId: string & import("effect/Brand").Brand<"CommandId">;
35477
- readonly interruptedRunId: string & import("effect/Brand").Brand<"RunId">;
35478
- readonly inputMessageIds: readonly (string & import("effect/Brand").Brand<"MessageId">)[];
35564
+ readonly modelSelection: {
35565
+ readonly provider: string;
35566
+ readonly modelId: string;
35567
+ readonly settings?: unknown;
35479
35568
  };
35480
35569
  };
35481
35570
  } | {
@@ -35504,42 +35593,19 @@ declare const SessionCommandCancelled: Schema.TaggedStruct<"SessionCommandCancel
35504
35593
  };
35505
35594
  readonly durability: "durable";
35506
35595
  readonly namespace: "effect-durable-agent";
35507
- readonly type: "RunSchedulingDelivered";
35596
+ readonly type: "RunSchedulingRequested";
35508
35597
  readonly schemaVersion: number;
35509
35598
  readonly payload: {
35510
35599
  readonly requestId: string & import("effect/Brand").Brand<"RunRequestId">;
35511
- };
35512
- } | {
35513
- readonly eventId: string & import("effect/Brand").Brand<"EventId">;
35514
- readonly sessionId: string & import("effect/Brand").Brand<"SessionId">;
35515
- readonly correlationId?: (string & import("effect/Brand").Brand<"CorrelationId">) | undefined;
35516
- readonly createdAtMs: number & import("effect/Brand").Brand<"UnixEpochMillis">;
35517
- readonly trace: {
35518
- readonly span: {
35519
- readonly traceId: string & import("effect/Brand").Brand<"EDATraceId">;
35520
- readonly spanId: string & import("effect/Brand").Brand<"EDASpanId">;
35521
- readonly sampled: boolean;
35522
- readonly tracestate: string | null;
35600
+ readonly work: {
35601
+ readonly _tag: "Command";
35602
+ readonly commandId: string & import("effect/Brand").Brand<"CommandId">;
35603
+ } | {
35604
+ readonly _tag: "Recovery";
35605
+ readonly commandId: string & import("effect/Brand").Brand<"CommandId">;
35606
+ readonly interruptedRunId: string & import("effect/Brand").Brand<"RunId">;
35607
+ readonly inputMessageIds: readonly (string & import("effect/Brand").Brand<"MessageId">)[];
35523
35608
  };
35524
- readonly links: readonly {
35525
- readonly context: {
35526
- readonly traceId: string & import("effect/Brand").Brand<"EDATraceId">;
35527
- readonly spanId: string & import("effect/Brand").Brand<"EDASpanId">;
35528
- readonly sampled: boolean;
35529
- readonly tracestate: string | null;
35530
- };
35531
- readonly attributes: {
35532
- readonly [x: string]: string | number | boolean;
35533
- };
35534
- }[];
35535
- };
35536
- readonly durability: "durable";
35537
- readonly namespace: "effect-durable-agent";
35538
- readonly type: "RunSchedulingInvalidated";
35539
- readonly schemaVersion: number;
35540
- readonly payload: {
35541
- readonly requestId: string & import("effect/Brand").Brand<"RunRequestId">;
35542
- readonly reason: "ineligible" | "interrupted" | "message-cancelled" | "stopped";
35543
35609
  };
35544
35610
  } | {
35545
35611
  readonly eventId: string & import("effect/Brand").Brand<"EventId">;
@@ -35567,11 +35633,10 @@ declare const SessionCommandCancelled: Schema.TaggedStruct<"SessionCommandCancel
35567
35633
  };
35568
35634
  readonly durability: "durable";
35569
35635
  readonly namespace: "effect-durable-agent";
35570
- readonly type: "RunSchedulingGranted";
35636
+ readonly type: "RunSchedulingDelivered";
35571
35637
  readonly schemaVersion: number;
35572
35638
  readonly payload: {
35573
35639
  readonly requestId: string & import("effect/Brand").Brand<"RunRequestId">;
35574
- readonly runId: string & import("effect/Brand").Brand<"RunId">;
35575
35640
  };
35576
35641
  } | {
35577
35642
  readonly eventId: string & import("effect/Brand").Brand<"EventId">;
@@ -35599,41 +35664,11 @@ declare const SessionCommandCancelled: Schema.TaggedStruct<"SessionCommandCancel
35599
35664
  };
35600
35665
  readonly durability: "durable";
35601
35666
  readonly namespace: "effect-durable-agent";
35602
- readonly type: "CommandAdmitted";
35603
- readonly schemaVersion: number;
35604
- readonly payload: {
35605
- readonly command: CancelPendingMessageCommand | PromotePendingMessageCommand | ResumePendingMessagesCommand | StopTurnCommand | SubmitMessageCommand;
35606
- };
35607
- } | {
35608
- readonly eventId: string & import("effect/Brand").Brand<"EventId">;
35609
- readonly sessionId: string & import("effect/Brand").Brand<"SessionId">;
35610
- readonly correlationId?: (string & import("effect/Brand").Brand<"CorrelationId">) | undefined;
35611
- readonly createdAtMs: number & import("effect/Brand").Brand<"UnixEpochMillis">;
35612
- readonly trace: {
35613
- readonly span: {
35614
- readonly traceId: string & import("effect/Brand").Brand<"EDATraceId">;
35615
- readonly spanId: string & import("effect/Brand").Brand<"EDASpanId">;
35616
- readonly sampled: boolean;
35617
- readonly tracestate: string | null;
35618
- };
35619
- readonly links: readonly {
35620
- readonly context: {
35621
- readonly traceId: string & import("effect/Brand").Brand<"EDATraceId">;
35622
- readonly spanId: string & import("effect/Brand").Brand<"EDASpanId">;
35623
- readonly sampled: boolean;
35624
- readonly tracestate: string | null;
35625
- };
35626
- readonly attributes: {
35627
- readonly [x: string]: string | number | boolean;
35628
- };
35629
- }[];
35630
- };
35631
- readonly durability: "durable";
35632
- readonly namespace: "effect-durable-agent";
35633
- readonly type: "CommandStarted";
35667
+ readonly type: "RunSchedulingInvalidated";
35634
35668
  readonly schemaVersion: number;
35635
35669
  readonly payload: {
35636
- readonly commandId: string & import("effect/Brand").Brand<"CommandId">;
35670
+ readonly requestId: string & import("effect/Brand").Brand<"RunRequestId">;
35671
+ readonly reason: "ineligible" | "interrupted" | "message-cancelled" | "stopped";
35637
35672
  };
35638
35673
  } | {
35639
35674
  readonly eventId: string & import("effect/Brand").Brand<"EventId">;
@@ -35661,10 +35696,11 @@ declare const SessionCommandCancelled: Schema.TaggedStruct<"SessionCommandCancel
35661
35696
  };
35662
35697
  readonly durability: "durable";
35663
35698
  readonly namespace: "effect-durable-agent";
35664
- readonly type: "CommandCompleted";
35699
+ readonly type: "RunSchedulingGranted";
35665
35700
  readonly schemaVersion: number;
35666
35701
  readonly payload: {
35667
- readonly commandId: string & import("effect/Brand").Brand<"CommandId">;
35702
+ readonly requestId: string & import("effect/Brand").Brand<"RunRequestId">;
35703
+ readonly runId: string & import("effect/Brand").Brand<"RunId">;
35668
35704
  };
35669
35705
  } | {
35670
35706
  readonly eventId: string & import("effect/Brand").Brand<"EventId">;
@@ -35692,15 +35728,10 @@ declare const SessionCommandCancelled: Schema.TaggedStruct<"SessionCommandCancel
35692
35728
  };
35693
35729
  readonly durability: "durable";
35694
35730
  readonly namespace: "effect-durable-agent";
35695
- readonly type: "CommandFailed";
35731
+ readonly type: "CommandAdmitted";
35696
35732
  readonly schemaVersion: number;
35697
35733
  readonly payload: {
35698
- readonly commandId: string & import("effect/Brand").Brand<"CommandId">;
35699
- readonly error: {
35700
- readonly message: string;
35701
- readonly code?: string | undefined;
35702
- readonly details?: unknown;
35703
- };
35734
+ readonly command: CancelPendingMessageCommand | PromotePendingMessageCommand | ResumePendingMessagesCommand | StopTurnCommand | SubmitMessageCommand;
35704
35735
  };
35705
35736
  } | {
35706
35737
  readonly eventId: string & import("effect/Brand").Brand<"EventId">;
@@ -35728,11 +35759,10 @@ declare const SessionCommandCancelled: Schema.TaggedStruct<"SessionCommandCancel
35728
35759
  };
35729
35760
  readonly durability: "durable";
35730
35761
  readonly namespace: "effect-durable-agent";
35731
- readonly type: "CommandCancelled";
35762
+ readonly type: "CommandStarted";
35732
35763
  readonly schemaVersion: number;
35733
35764
  readonly payload: {
35734
35765
  readonly commandId: string & import("effect/Brand").Brand<"CommandId">;
35735
- readonly reason: string;
35736
35766
  };
35737
35767
  } | {
35738
35768
  readonly eventId: string & import("effect/Brand").Brand<"EventId">;
@@ -37170,6 +37200,7 @@ declare const SessionCommandCancelled: Schema.TaggedStruct<"SessionCommandCancel
37170
37200
  readonly schemaVersion: number;
37171
37201
  readonly payload: {
37172
37202
  readonly toolCallId: string & import("effect/Brand").Brand<"ToolCallId">;
37203
+ readonly attempt?: number | undefined;
37173
37204
  };
37174
37205
  } | {
37175
37206
  readonly eventId: string & import("effect/Brand").Brand<"EventId">;
@@ -37764,6 +37795,105 @@ type SessionCommandCancelled = typeof SessionCommandCancelled.Type;
37764
37795
  /** Terminal command-processing variants returned from one control action. */
37765
37796
  declare const SessionCommandOutcome: Schema.Union<readonly [Schema.TaggedStruct<"SessionCommandCompleted", {
37766
37797
  readonly committed: Schema.Codec<CommittedDurableEvent<{
37798
+ readonly eventId: string & import("effect/Brand").Brand<"EventId">;
37799
+ readonly sessionId: string & import("effect/Brand").Brand<"SessionId">;
37800
+ readonly correlationId?: (string & import("effect/Brand").Brand<"CorrelationId">) | undefined;
37801
+ readonly createdAtMs: number & import("effect/Brand").Brand<"UnixEpochMillis">;
37802
+ readonly trace: {
37803
+ readonly span: {
37804
+ readonly traceId: string & import("effect/Brand").Brand<"EDATraceId">;
37805
+ readonly spanId: string & import("effect/Brand").Brand<"EDASpanId">;
37806
+ readonly sampled: boolean;
37807
+ readonly tracestate: string | null;
37808
+ };
37809
+ readonly links: readonly {
37810
+ readonly context: {
37811
+ readonly traceId: string & import("effect/Brand").Brand<"EDATraceId">;
37812
+ readonly spanId: string & import("effect/Brand").Brand<"EDASpanId">;
37813
+ readonly sampled: boolean;
37814
+ readonly tracestate: string | null;
37815
+ };
37816
+ readonly attributes: {
37817
+ readonly [x: string]: string | number | boolean;
37818
+ };
37819
+ }[];
37820
+ };
37821
+ readonly durability: "durable";
37822
+ readonly namespace: "effect-durable-agent";
37823
+ readonly type: "CommandCompleted";
37824
+ readonly schemaVersion: number;
37825
+ readonly payload: {
37826
+ readonly commandId: string & import("effect/Brand").Brand<"CommandId">;
37827
+ };
37828
+ } | {
37829
+ readonly eventId: string & import("effect/Brand").Brand<"EventId">;
37830
+ readonly sessionId: string & import("effect/Brand").Brand<"SessionId">;
37831
+ readonly correlationId?: (string & import("effect/Brand").Brand<"CorrelationId">) | undefined;
37832
+ readonly createdAtMs: number & import("effect/Brand").Brand<"UnixEpochMillis">;
37833
+ readonly trace: {
37834
+ readonly span: {
37835
+ readonly traceId: string & import("effect/Brand").Brand<"EDATraceId">;
37836
+ readonly spanId: string & import("effect/Brand").Brand<"EDASpanId">;
37837
+ readonly sampled: boolean;
37838
+ readonly tracestate: string | null;
37839
+ };
37840
+ readonly links: readonly {
37841
+ readonly context: {
37842
+ readonly traceId: string & import("effect/Brand").Brand<"EDATraceId">;
37843
+ readonly spanId: string & import("effect/Brand").Brand<"EDASpanId">;
37844
+ readonly sampled: boolean;
37845
+ readonly tracestate: string | null;
37846
+ };
37847
+ readonly attributes: {
37848
+ readonly [x: string]: string | number | boolean;
37849
+ };
37850
+ }[];
37851
+ };
37852
+ readonly durability: "durable";
37853
+ readonly namespace: "effect-durable-agent";
37854
+ readonly type: "CommandFailed";
37855
+ readonly schemaVersion: number;
37856
+ readonly payload: {
37857
+ readonly commandId: string & import("effect/Brand").Brand<"CommandId">;
37858
+ readonly error: {
37859
+ readonly message: string;
37860
+ readonly code?: string | undefined;
37861
+ readonly details?: unknown;
37862
+ };
37863
+ };
37864
+ } | {
37865
+ readonly eventId: string & import("effect/Brand").Brand<"EventId">;
37866
+ readonly sessionId: string & import("effect/Brand").Brand<"SessionId">;
37867
+ readonly correlationId?: (string & import("effect/Brand").Brand<"CorrelationId">) | undefined;
37868
+ readonly createdAtMs: number & import("effect/Brand").Brand<"UnixEpochMillis">;
37869
+ readonly trace: {
37870
+ readonly span: {
37871
+ readonly traceId: string & import("effect/Brand").Brand<"EDATraceId">;
37872
+ readonly spanId: string & import("effect/Brand").Brand<"EDASpanId">;
37873
+ readonly sampled: boolean;
37874
+ readonly tracestate: string | null;
37875
+ };
37876
+ readonly links: readonly {
37877
+ readonly context: {
37878
+ readonly traceId: string & import("effect/Brand").Brand<"EDATraceId">;
37879
+ readonly spanId: string & import("effect/Brand").Brand<"EDASpanId">;
37880
+ readonly sampled: boolean;
37881
+ readonly tracestate: string | null;
37882
+ };
37883
+ readonly attributes: {
37884
+ readonly [x: string]: string | number | boolean;
37885
+ };
37886
+ }[];
37887
+ };
37888
+ readonly durability: "durable";
37889
+ readonly namespace: "effect-durable-agent";
37890
+ readonly type: "CommandCancelled";
37891
+ readonly schemaVersion: number;
37892
+ readonly payload: {
37893
+ readonly commandId: string & import("effect/Brand").Brand<"CommandId">;
37894
+ readonly reason: string;
37895
+ };
37896
+ } | {
37767
37897
  readonly eventId: string & import("effect/Brand").Brand<"EventId">;
37768
37898
  readonly sessionId: string & import("effect/Brand").Brand<"SessionId">;
37769
37899
  readonly correlationId?: (string & import("effect/Brand").Brand<"CorrelationId">) | undefined;
@@ -38125,42 +38255,10 @@ declare const SessionCommandOutcome: Schema.Union<readonly [Schema.TaggedStruct<
38125
38255
  };
38126
38256
  readonly durability: "durable";
38127
38257
  readonly namespace: "effect-durable-agent";
38128
- readonly type: "RunSchedulingDelivered";
38129
- readonly schemaVersion: number;
38130
- readonly payload: {
38131
- readonly requestId: string & import("effect/Brand").Brand<"RunRequestId">;
38132
- };
38133
- } | {
38134
- readonly eventId: string & import("effect/Brand").Brand<"EventId">;
38135
- readonly sessionId: string & import("effect/Brand").Brand<"SessionId">;
38136
- readonly correlationId?: (string & import("effect/Brand").Brand<"CorrelationId">) | undefined;
38137
- readonly createdAtMs: number & import("effect/Brand").Brand<"UnixEpochMillis">;
38138
- readonly trace: {
38139
- readonly span: {
38140
- readonly traceId: string & import("effect/Brand").Brand<"EDATraceId">;
38141
- readonly spanId: string & import("effect/Brand").Brand<"EDASpanId">;
38142
- readonly sampled: boolean;
38143
- readonly tracestate: string | null;
38144
- };
38145
- readonly links: readonly {
38146
- readonly context: {
38147
- readonly traceId: string & import("effect/Brand").Brand<"EDATraceId">;
38148
- readonly spanId: string & import("effect/Brand").Brand<"EDASpanId">;
38149
- readonly sampled: boolean;
38150
- readonly tracestate: string | null;
38151
- };
38152
- readonly attributes: {
38153
- readonly [x: string]: string | number | boolean;
38154
- };
38155
- }[];
38156
- };
38157
- readonly durability: "durable";
38158
- readonly namespace: "effect-durable-agent";
38159
- readonly type: "RunSchedulingInvalidated";
38258
+ readonly type: "RunSchedulingDelivered";
38160
38259
  readonly schemaVersion: number;
38161
38260
  readonly payload: {
38162
38261
  readonly requestId: string & import("effect/Brand").Brand<"RunRequestId">;
38163
- readonly reason: "ineligible" | "interrupted" | "message-cancelled" | "stopped";
38164
38262
  };
38165
38263
  } | {
38166
38264
  readonly eventId: string & import("effect/Brand").Brand<"EventId">;
@@ -38188,73 +38286,11 @@ declare const SessionCommandOutcome: Schema.Union<readonly [Schema.TaggedStruct<
38188
38286
  };
38189
38287
  readonly durability: "durable";
38190
38288
  readonly namespace: "effect-durable-agent";
38191
- readonly type: "RunSchedulingGranted";
38289
+ readonly type: "RunSchedulingInvalidated";
38192
38290
  readonly schemaVersion: number;
38193
38291
  readonly payload: {
38194
38292
  readonly requestId: string & import("effect/Brand").Brand<"RunRequestId">;
38195
- readonly runId: string & import("effect/Brand").Brand<"RunId">;
38196
- };
38197
- } | {
38198
- readonly eventId: string & import("effect/Brand").Brand<"EventId">;
38199
- readonly sessionId: string & import("effect/Brand").Brand<"SessionId">;
38200
- readonly correlationId?: (string & import("effect/Brand").Brand<"CorrelationId">) | undefined;
38201
- readonly createdAtMs: number & import("effect/Brand").Brand<"UnixEpochMillis">;
38202
- readonly trace: {
38203
- readonly span: {
38204
- readonly traceId: string & import("effect/Brand").Brand<"EDATraceId">;
38205
- readonly spanId: string & import("effect/Brand").Brand<"EDASpanId">;
38206
- readonly sampled: boolean;
38207
- readonly tracestate: string | null;
38208
- };
38209
- readonly links: readonly {
38210
- readonly context: {
38211
- readonly traceId: string & import("effect/Brand").Brand<"EDATraceId">;
38212
- readonly spanId: string & import("effect/Brand").Brand<"EDASpanId">;
38213
- readonly sampled: boolean;
38214
- readonly tracestate: string | null;
38215
- };
38216
- readonly attributes: {
38217
- readonly [x: string]: string | number | boolean;
38218
- };
38219
- }[];
38220
- };
38221
- readonly durability: "durable";
38222
- readonly namespace: "effect-durable-agent";
38223
- readonly type: "CommandAdmitted";
38224
- readonly schemaVersion: number;
38225
- readonly payload: {
38226
- readonly command: CancelPendingMessageCommand | PromotePendingMessageCommand | ResumePendingMessagesCommand | StopTurnCommand | SubmitMessageCommand;
38227
- };
38228
- } | {
38229
- readonly eventId: string & import("effect/Brand").Brand<"EventId">;
38230
- readonly sessionId: string & import("effect/Brand").Brand<"SessionId">;
38231
- readonly correlationId?: (string & import("effect/Brand").Brand<"CorrelationId">) | undefined;
38232
- readonly createdAtMs: number & import("effect/Brand").Brand<"UnixEpochMillis">;
38233
- readonly trace: {
38234
- readonly span: {
38235
- readonly traceId: string & import("effect/Brand").Brand<"EDATraceId">;
38236
- readonly spanId: string & import("effect/Brand").Brand<"EDASpanId">;
38237
- readonly sampled: boolean;
38238
- readonly tracestate: string | null;
38239
- };
38240
- readonly links: readonly {
38241
- readonly context: {
38242
- readonly traceId: string & import("effect/Brand").Brand<"EDATraceId">;
38243
- readonly spanId: string & import("effect/Brand").Brand<"EDASpanId">;
38244
- readonly sampled: boolean;
38245
- readonly tracestate: string | null;
38246
- };
38247
- readonly attributes: {
38248
- readonly [x: string]: string | number | boolean;
38249
- };
38250
- }[];
38251
- };
38252
- readonly durability: "durable";
38253
- readonly namespace: "effect-durable-agent";
38254
- readonly type: "CommandStarted";
38255
- readonly schemaVersion: number;
38256
- readonly payload: {
38257
- readonly commandId: string & import("effect/Brand").Brand<"CommandId">;
38293
+ readonly reason: "ineligible" | "interrupted" | "message-cancelled" | "stopped";
38258
38294
  };
38259
38295
  } | {
38260
38296
  readonly eventId: string & import("effect/Brand").Brand<"EventId">;
@@ -38282,10 +38318,11 @@ declare const SessionCommandOutcome: Schema.Union<readonly [Schema.TaggedStruct<
38282
38318
  };
38283
38319
  readonly durability: "durable";
38284
38320
  readonly namespace: "effect-durable-agent";
38285
- readonly type: "CommandCompleted";
38321
+ readonly type: "RunSchedulingGranted";
38286
38322
  readonly schemaVersion: number;
38287
38323
  readonly payload: {
38288
- readonly commandId: string & import("effect/Brand").Brand<"CommandId">;
38324
+ readonly requestId: string & import("effect/Brand").Brand<"RunRequestId">;
38325
+ readonly runId: string & import("effect/Brand").Brand<"RunId">;
38289
38326
  };
38290
38327
  } | {
38291
38328
  readonly eventId: string & import("effect/Brand").Brand<"EventId">;
@@ -38313,15 +38350,10 @@ declare const SessionCommandOutcome: Schema.Union<readonly [Schema.TaggedStruct<
38313
38350
  };
38314
38351
  readonly durability: "durable";
38315
38352
  readonly namespace: "effect-durable-agent";
38316
- readonly type: "CommandFailed";
38353
+ readonly type: "CommandAdmitted";
38317
38354
  readonly schemaVersion: number;
38318
38355
  readonly payload: {
38319
- readonly commandId: string & import("effect/Brand").Brand<"CommandId">;
38320
- readonly error: {
38321
- readonly message: string;
38322
- readonly code?: string | undefined;
38323
- readonly details?: unknown;
38324
- };
38356
+ readonly command: CancelPendingMessageCommand | PromotePendingMessageCommand | ResumePendingMessagesCommand | StopTurnCommand | SubmitMessageCommand;
38325
38357
  };
38326
38358
  } | {
38327
38359
  readonly eventId: string & import("effect/Brand").Brand<"EventId">;
@@ -38349,11 +38381,10 @@ declare const SessionCommandOutcome: Schema.Union<readonly [Schema.TaggedStruct<
38349
38381
  };
38350
38382
  readonly durability: "durable";
38351
38383
  readonly namespace: "effect-durable-agent";
38352
- readonly type: "CommandCancelled";
38384
+ readonly type: "CommandStarted";
38353
38385
  readonly schemaVersion: number;
38354
38386
  readonly payload: {
38355
38387
  readonly commandId: string & import("effect/Brand").Brand<"CommandId">;
38356
- readonly reason: string;
38357
38388
  };
38358
38389
  } | {
38359
38390
  readonly eventId: string & import("effect/Brand").Brand<"EventId">;
@@ -39791,6 +39822,7 @@ declare const SessionCommandOutcome: Schema.Union<readonly [Schema.TaggedStruct<
39791
39822
  readonly schemaVersion: number;
39792
39823
  readonly payload: {
39793
39824
  readonly toolCallId: string & import("effect/Brand").Brand<"ToolCallId">;
39825
+ readonly attempt?: number | undefined;
39794
39826
  };
39795
39827
  } | {
39796
39828
  readonly eventId: string & import("effect/Brand").Brand<"EventId">;
@@ -40302,86 +40334,185 @@ declare const SessionCommandOutcome: Schema.Union<readonly [Schema.TaggedStruct<
40302
40334
  };
40303
40335
  readonly durability: "durable";
40304
40336
  readonly namespace: "effect-durable-agent";
40305
- readonly type: "BaseStateFailed";
40337
+ readonly type: "BaseStateFailed";
40338
+ readonly schemaVersion: number;
40339
+ readonly payload: {
40340
+ readonly baseStateId: string & import("effect/Brand").Brand<"BaseStateId">;
40341
+ readonly error: {
40342
+ readonly message: string;
40343
+ readonly code?: string | undefined;
40344
+ readonly details?: unknown;
40345
+ };
40346
+ };
40347
+ } | {
40348
+ readonly schemaVersion: number;
40349
+ readonly eventId: string & import("effect/Brand").Brand<"EventId">;
40350
+ readonly sessionId: string & import("effect/Brand").Brand<"SessionId">;
40351
+ readonly correlationId?: (string & import("effect/Brand").Brand<"CorrelationId">) | undefined;
40352
+ readonly createdAtMs: number & import("effect/Brand").Brand<"UnixEpochMillis">;
40353
+ readonly trace: {
40354
+ readonly span: {
40355
+ readonly traceId: string & import("effect/Brand").Brand<"EDATraceId">;
40356
+ readonly spanId: string & import("effect/Brand").Brand<"EDASpanId">;
40357
+ readonly sampled: boolean;
40358
+ readonly tracestate: string | null;
40359
+ };
40360
+ readonly links: readonly {
40361
+ readonly context: {
40362
+ readonly traceId: string & import("effect/Brand").Brand<"EDATraceId">;
40363
+ readonly spanId: string & import("effect/Brand").Brand<"EDASpanId">;
40364
+ readonly sampled: boolean;
40365
+ readonly tracestate: string | null;
40366
+ };
40367
+ readonly attributes: {
40368
+ readonly [x: string]: string | number | boolean;
40369
+ };
40370
+ }[];
40371
+ };
40372
+ readonly payload: unknown;
40373
+ readonly durability: "durable";
40374
+ readonly namespace: "__foreign";
40375
+ readonly type: "Foreign";
40376
+ readonly _tag: "Foreign";
40377
+ readonly envelope: {
40378
+ readonly namespace: string;
40379
+ readonly type: string;
40380
+ readonly schemaVersion: number;
40381
+ readonly eventId: string & import("effect/Brand").Brand<"EventId">;
40382
+ readonly sessionId: string & import("effect/Brand").Brand<"SessionId">;
40383
+ readonly correlationId?: (string & import("effect/Brand").Brand<"CorrelationId">) | undefined;
40384
+ readonly createdAtMs: number & import("effect/Brand").Brand<"UnixEpochMillis">;
40385
+ readonly trace: {
40386
+ readonly span: {
40387
+ readonly traceId: string & import("effect/Brand").Brand<"EDATraceId">;
40388
+ readonly spanId: string & import("effect/Brand").Brand<"EDASpanId">;
40389
+ readonly sampled: boolean;
40390
+ readonly tracestate: string | null;
40391
+ };
40392
+ readonly links: readonly {
40393
+ readonly context: {
40394
+ readonly traceId: string & import("effect/Brand").Brand<"EDATraceId">;
40395
+ readonly spanId: string & import("effect/Brand").Brand<"EDASpanId">;
40396
+ readonly sampled: boolean;
40397
+ readonly tracestate: string | null;
40398
+ };
40399
+ readonly attributes: {
40400
+ readonly [x: string]: string | number | boolean;
40401
+ };
40402
+ }[];
40403
+ };
40404
+ readonly payload: unknown;
40405
+ readonly durability: "durable";
40406
+ };
40407
+ readonly decoded?: unknown;
40408
+ }>, {
40409
+ readonly position: {
40410
+ readonly seq: number;
40411
+ readonly subSeq: 0;
40412
+ };
40413
+ readonly event: typeof DurableEventEnvelope.Encoded;
40414
+ }, never, never>;
40415
+ }>, Schema.TaggedStruct<"SessionCommandFailed", {
40416
+ readonly committed: Schema.Codec<CommittedDurableEvent<{
40417
+ readonly eventId: string & import("effect/Brand").Brand<"EventId">;
40418
+ readonly sessionId: string & import("effect/Brand").Brand<"SessionId">;
40419
+ readonly correlationId?: (string & import("effect/Brand").Brand<"CorrelationId">) | undefined;
40420
+ readonly createdAtMs: number & import("effect/Brand").Brand<"UnixEpochMillis">;
40421
+ readonly trace: {
40422
+ readonly span: {
40423
+ readonly traceId: string & import("effect/Brand").Brand<"EDATraceId">;
40424
+ readonly spanId: string & import("effect/Brand").Brand<"EDASpanId">;
40425
+ readonly sampled: boolean;
40426
+ readonly tracestate: string | null;
40427
+ };
40428
+ readonly links: readonly {
40429
+ readonly context: {
40430
+ readonly traceId: string & import("effect/Brand").Brand<"EDATraceId">;
40431
+ readonly spanId: string & import("effect/Brand").Brand<"EDASpanId">;
40432
+ readonly sampled: boolean;
40433
+ readonly tracestate: string | null;
40434
+ };
40435
+ readonly attributes: {
40436
+ readonly [x: string]: string | number | boolean;
40437
+ };
40438
+ }[];
40439
+ };
40440
+ readonly durability: "durable";
40441
+ readonly namespace: "effect-durable-agent";
40442
+ readonly type: "CommandCompleted";
40443
+ readonly schemaVersion: number;
40444
+ readonly payload: {
40445
+ readonly commandId: string & import("effect/Brand").Brand<"CommandId">;
40446
+ };
40447
+ } | {
40448
+ readonly eventId: string & import("effect/Brand").Brand<"EventId">;
40449
+ readonly sessionId: string & import("effect/Brand").Brand<"SessionId">;
40450
+ readonly correlationId?: (string & import("effect/Brand").Brand<"CorrelationId">) | undefined;
40451
+ readonly createdAtMs: number & import("effect/Brand").Brand<"UnixEpochMillis">;
40452
+ readonly trace: {
40453
+ readonly span: {
40454
+ readonly traceId: string & import("effect/Brand").Brand<"EDATraceId">;
40455
+ readonly spanId: string & import("effect/Brand").Brand<"EDASpanId">;
40456
+ readonly sampled: boolean;
40457
+ readonly tracestate: string | null;
40458
+ };
40459
+ readonly links: readonly {
40460
+ readonly context: {
40461
+ readonly traceId: string & import("effect/Brand").Brand<"EDATraceId">;
40462
+ readonly spanId: string & import("effect/Brand").Brand<"EDASpanId">;
40463
+ readonly sampled: boolean;
40464
+ readonly tracestate: string | null;
40465
+ };
40466
+ readonly attributes: {
40467
+ readonly [x: string]: string | number | boolean;
40468
+ };
40469
+ }[];
40470
+ };
40471
+ readonly durability: "durable";
40472
+ readonly namespace: "effect-durable-agent";
40473
+ readonly type: "CommandFailed";
40474
+ readonly schemaVersion: number;
40475
+ readonly payload: {
40476
+ readonly commandId: string & import("effect/Brand").Brand<"CommandId">;
40477
+ readonly error: {
40478
+ readonly message: string;
40479
+ readonly code?: string | undefined;
40480
+ readonly details?: unknown;
40481
+ };
40482
+ };
40483
+ } | {
40484
+ readonly eventId: string & import("effect/Brand").Brand<"EventId">;
40485
+ readonly sessionId: string & import("effect/Brand").Brand<"SessionId">;
40486
+ readonly correlationId?: (string & import("effect/Brand").Brand<"CorrelationId">) | undefined;
40487
+ readonly createdAtMs: number & import("effect/Brand").Brand<"UnixEpochMillis">;
40488
+ readonly trace: {
40489
+ readonly span: {
40490
+ readonly traceId: string & import("effect/Brand").Brand<"EDATraceId">;
40491
+ readonly spanId: string & import("effect/Brand").Brand<"EDASpanId">;
40492
+ readonly sampled: boolean;
40493
+ readonly tracestate: string | null;
40494
+ };
40495
+ readonly links: readonly {
40496
+ readonly context: {
40497
+ readonly traceId: string & import("effect/Brand").Brand<"EDATraceId">;
40498
+ readonly spanId: string & import("effect/Brand").Brand<"EDASpanId">;
40499
+ readonly sampled: boolean;
40500
+ readonly tracestate: string | null;
40501
+ };
40502
+ readonly attributes: {
40503
+ readonly [x: string]: string | number | boolean;
40504
+ };
40505
+ }[];
40506
+ };
40507
+ readonly durability: "durable";
40508
+ readonly namespace: "effect-durable-agent";
40509
+ readonly type: "CommandCancelled";
40306
40510
  readonly schemaVersion: number;
40307
40511
  readonly payload: {
40308
- readonly baseStateId: string & import("effect/Brand").Brand<"BaseStateId">;
40309
- readonly error: {
40310
- readonly message: string;
40311
- readonly code?: string | undefined;
40312
- readonly details?: unknown;
40313
- };
40512
+ readonly commandId: string & import("effect/Brand").Brand<"CommandId">;
40513
+ readonly reason: string;
40314
40514
  };
40315
40515
  } | {
40316
- readonly schemaVersion: number;
40317
- readonly eventId: string & import("effect/Brand").Brand<"EventId">;
40318
- readonly sessionId: string & import("effect/Brand").Brand<"SessionId">;
40319
- readonly correlationId?: (string & import("effect/Brand").Brand<"CorrelationId">) | undefined;
40320
- readonly createdAtMs: number & import("effect/Brand").Brand<"UnixEpochMillis">;
40321
- readonly trace: {
40322
- readonly span: {
40323
- readonly traceId: string & import("effect/Brand").Brand<"EDATraceId">;
40324
- readonly spanId: string & import("effect/Brand").Brand<"EDASpanId">;
40325
- readonly sampled: boolean;
40326
- readonly tracestate: string | null;
40327
- };
40328
- readonly links: readonly {
40329
- readonly context: {
40330
- readonly traceId: string & import("effect/Brand").Brand<"EDATraceId">;
40331
- readonly spanId: string & import("effect/Brand").Brand<"EDASpanId">;
40332
- readonly sampled: boolean;
40333
- readonly tracestate: string | null;
40334
- };
40335
- readonly attributes: {
40336
- readonly [x: string]: string | number | boolean;
40337
- };
40338
- }[];
40339
- };
40340
- readonly payload: unknown;
40341
- readonly durability: "durable";
40342
- readonly namespace: "__foreign";
40343
- readonly type: "Foreign";
40344
- readonly _tag: "Foreign";
40345
- readonly envelope: {
40346
- readonly namespace: string;
40347
- readonly type: string;
40348
- readonly schemaVersion: number;
40349
- readonly eventId: string & import("effect/Brand").Brand<"EventId">;
40350
- readonly sessionId: string & import("effect/Brand").Brand<"SessionId">;
40351
- readonly correlationId?: (string & import("effect/Brand").Brand<"CorrelationId">) | undefined;
40352
- readonly createdAtMs: number & import("effect/Brand").Brand<"UnixEpochMillis">;
40353
- readonly trace: {
40354
- readonly span: {
40355
- readonly traceId: string & import("effect/Brand").Brand<"EDATraceId">;
40356
- readonly spanId: string & import("effect/Brand").Brand<"EDASpanId">;
40357
- readonly sampled: boolean;
40358
- readonly tracestate: string | null;
40359
- };
40360
- readonly links: readonly {
40361
- readonly context: {
40362
- readonly traceId: string & import("effect/Brand").Brand<"EDATraceId">;
40363
- readonly spanId: string & import("effect/Brand").Brand<"EDASpanId">;
40364
- readonly sampled: boolean;
40365
- readonly tracestate: string | null;
40366
- };
40367
- readonly attributes: {
40368
- readonly [x: string]: string | number | boolean;
40369
- };
40370
- }[];
40371
- };
40372
- readonly payload: unknown;
40373
- readonly durability: "durable";
40374
- };
40375
- readonly decoded?: unknown;
40376
- }>, {
40377
- readonly position: {
40378
- readonly seq: number;
40379
- readonly subSeq: 0;
40380
- };
40381
- readonly event: typeof DurableEventEnvelope.Encoded;
40382
- }, never, never>;
40383
- }>, Schema.TaggedStruct<"SessionCommandFailed", {
40384
- readonly committed: Schema.Codec<CommittedDurableEvent<{
40385
40516
  readonly eventId: string & import("effect/Brand").Brand<"EventId">;
40386
40517
  readonly sessionId: string & import("effect/Brand").Brand<"SessionId">;
40387
40518
  readonly correlationId?: (string & import("effect/Brand").Brand<"CorrelationId">) | undefined;
@@ -40874,105 +41005,6 @@ declare const SessionCommandOutcome: Schema.Union<readonly [Schema.TaggedStruct<
40874
41005
  readonly payload: {
40875
41006
  readonly commandId: string & import("effect/Brand").Brand<"CommandId">;
40876
41007
  };
40877
- } | {
40878
- readonly eventId: string & import("effect/Brand").Brand<"EventId">;
40879
- readonly sessionId: string & import("effect/Brand").Brand<"SessionId">;
40880
- readonly correlationId?: (string & import("effect/Brand").Brand<"CorrelationId">) | undefined;
40881
- readonly createdAtMs: number & import("effect/Brand").Brand<"UnixEpochMillis">;
40882
- readonly trace: {
40883
- readonly span: {
40884
- readonly traceId: string & import("effect/Brand").Brand<"EDATraceId">;
40885
- readonly spanId: string & import("effect/Brand").Brand<"EDASpanId">;
40886
- readonly sampled: boolean;
40887
- readonly tracestate: string | null;
40888
- };
40889
- readonly links: readonly {
40890
- readonly context: {
40891
- readonly traceId: string & import("effect/Brand").Brand<"EDATraceId">;
40892
- readonly spanId: string & import("effect/Brand").Brand<"EDASpanId">;
40893
- readonly sampled: boolean;
40894
- readonly tracestate: string | null;
40895
- };
40896
- readonly attributes: {
40897
- readonly [x: string]: string | number | boolean;
40898
- };
40899
- }[];
40900
- };
40901
- readonly durability: "durable";
40902
- readonly namespace: "effect-durable-agent";
40903
- readonly type: "CommandCompleted";
40904
- readonly schemaVersion: number;
40905
- readonly payload: {
40906
- readonly commandId: string & import("effect/Brand").Brand<"CommandId">;
40907
- };
40908
- } | {
40909
- readonly eventId: string & import("effect/Brand").Brand<"EventId">;
40910
- readonly sessionId: string & import("effect/Brand").Brand<"SessionId">;
40911
- readonly correlationId?: (string & import("effect/Brand").Brand<"CorrelationId">) | undefined;
40912
- readonly createdAtMs: number & import("effect/Brand").Brand<"UnixEpochMillis">;
40913
- readonly trace: {
40914
- readonly span: {
40915
- readonly traceId: string & import("effect/Brand").Brand<"EDATraceId">;
40916
- readonly spanId: string & import("effect/Brand").Brand<"EDASpanId">;
40917
- readonly sampled: boolean;
40918
- readonly tracestate: string | null;
40919
- };
40920
- readonly links: readonly {
40921
- readonly context: {
40922
- readonly traceId: string & import("effect/Brand").Brand<"EDATraceId">;
40923
- readonly spanId: string & import("effect/Brand").Brand<"EDASpanId">;
40924
- readonly sampled: boolean;
40925
- readonly tracestate: string | null;
40926
- };
40927
- readonly attributes: {
40928
- readonly [x: string]: string | number | boolean;
40929
- };
40930
- }[];
40931
- };
40932
- readonly durability: "durable";
40933
- readonly namespace: "effect-durable-agent";
40934
- readonly type: "CommandFailed";
40935
- readonly schemaVersion: number;
40936
- readonly payload: {
40937
- readonly commandId: string & import("effect/Brand").Brand<"CommandId">;
40938
- readonly error: {
40939
- readonly message: string;
40940
- readonly code?: string | undefined;
40941
- readonly details?: unknown;
40942
- };
40943
- };
40944
- } | {
40945
- readonly eventId: string & import("effect/Brand").Brand<"EventId">;
40946
- readonly sessionId: string & import("effect/Brand").Brand<"SessionId">;
40947
- readonly correlationId?: (string & import("effect/Brand").Brand<"CorrelationId">) | undefined;
40948
- readonly createdAtMs: number & import("effect/Brand").Brand<"UnixEpochMillis">;
40949
- readonly trace: {
40950
- readonly span: {
40951
- readonly traceId: string & import("effect/Brand").Brand<"EDATraceId">;
40952
- readonly spanId: string & import("effect/Brand").Brand<"EDASpanId">;
40953
- readonly sampled: boolean;
40954
- readonly tracestate: string | null;
40955
- };
40956
- readonly links: readonly {
40957
- readonly context: {
40958
- readonly traceId: string & import("effect/Brand").Brand<"EDATraceId">;
40959
- readonly spanId: string & import("effect/Brand").Brand<"EDASpanId">;
40960
- readonly sampled: boolean;
40961
- readonly tracestate: string | null;
40962
- };
40963
- readonly attributes: {
40964
- readonly [x: string]: string | number | boolean;
40965
- };
40966
- }[];
40967
- };
40968
- readonly durability: "durable";
40969
- readonly namespace: "effect-durable-agent";
40970
- readonly type: "CommandCancelled";
40971
- readonly schemaVersion: number;
40972
- readonly payload: {
40973
- readonly commandId: string & import("effect/Brand").Brand<"CommandId">;
40974
- readonly reason: string;
40975
- };
40976
41008
  } | {
40977
41009
  readonly eventId: string & import("effect/Brand").Brand<"EventId">;
40978
41010
  readonly sessionId: string & import("effect/Brand").Brand<"SessionId">;
@@ -42409,6 +42441,7 @@ declare const SessionCommandOutcome: Schema.Union<readonly [Schema.TaggedStruct<
42409
42441
  readonly schemaVersion: number;
42410
42442
  readonly payload: {
42411
42443
  readonly toolCallId: string & import("effect/Brand").Brand<"ToolCallId">;
42444
+ readonly attempt?: number | undefined;
42412
42445
  };
42413
42446
  } | {
42414
42447
  readonly eventId: string & import("effect/Brand").Brand<"EventId">;
@@ -42807,28 +42840,92 @@ declare const SessionCommandOutcome: Schema.Union<readonly [Schema.TaggedStruct<
42807
42840
  };
42808
42841
  readonly durability: "durable";
42809
42842
  readonly namespace: "effect-durable-agent";
42810
- readonly type: "CompactionFailed";
42843
+ readonly type: "CompactionFailed";
42844
+ readonly schemaVersion: number;
42845
+ readonly payload: {
42846
+ readonly compactionId: string & import("effect/Brand").Brand<"CompactionId">;
42847
+ readonly error: {
42848
+ readonly message: string;
42849
+ readonly code?: string | undefined;
42850
+ readonly details?: unknown;
42851
+ };
42852
+ readonly modelSelection?: {
42853
+ readonly provider: string;
42854
+ readonly modelId: string;
42855
+ readonly settings?: unknown;
42856
+ } | undefined;
42857
+ readonly usage?: {
42858
+ readonly inputTokens?: number | undefined;
42859
+ readonly cachedInputTokens?: number | undefined;
42860
+ readonly cacheWriteInputTokens?: number | undefined;
42861
+ readonly outputTokens?: number | undefined;
42862
+ readonly textTokens?: number | undefined;
42863
+ readonly reasoningTokens?: number | undefined;
42864
+ } | undefined;
42865
+ };
42866
+ } | {
42867
+ readonly eventId: string & import("effect/Brand").Brand<"EventId">;
42868
+ readonly sessionId: string & import("effect/Brand").Brand<"SessionId">;
42869
+ readonly correlationId?: (string & import("effect/Brand").Brand<"CorrelationId">) | undefined;
42870
+ readonly createdAtMs: number & import("effect/Brand").Brand<"UnixEpochMillis">;
42871
+ readonly trace: {
42872
+ readonly span: {
42873
+ readonly traceId: string & import("effect/Brand").Brand<"EDATraceId">;
42874
+ readonly spanId: string & import("effect/Brand").Brand<"EDASpanId">;
42875
+ readonly sampled: boolean;
42876
+ readonly tracestate: string | null;
42877
+ };
42878
+ readonly links: readonly {
42879
+ readonly context: {
42880
+ readonly traceId: string & import("effect/Brand").Brand<"EDATraceId">;
42881
+ readonly spanId: string & import("effect/Brand").Brand<"EDASpanId">;
42882
+ readonly sampled: boolean;
42883
+ readonly tracestate: string | null;
42884
+ };
42885
+ readonly attributes: {
42886
+ readonly [x: string]: string | number | boolean;
42887
+ };
42888
+ }[];
42889
+ };
42890
+ readonly durability: "durable";
42891
+ readonly namespace: "effect-durable-agent";
42892
+ readonly type: "BaseStateRequested";
42893
+ readonly schemaVersion: number;
42894
+ readonly payload: {
42895
+ readonly baseStateId: string & import("effect/Brand").Brand<"BaseStateId">;
42896
+ readonly requestedThroughSeq: number & import("effect/Brand").Brand<"SequenceNumber">;
42897
+ };
42898
+ } | {
42899
+ readonly eventId: string & import("effect/Brand").Brand<"EventId">;
42900
+ readonly sessionId: string & import("effect/Brand").Brand<"SessionId">;
42901
+ readonly correlationId?: (string & import("effect/Brand").Brand<"CorrelationId">) | undefined;
42902
+ readonly createdAtMs: number & import("effect/Brand").Brand<"UnixEpochMillis">;
42903
+ readonly trace: {
42904
+ readonly span: {
42905
+ readonly traceId: string & import("effect/Brand").Brand<"EDATraceId">;
42906
+ readonly spanId: string & import("effect/Brand").Brand<"EDASpanId">;
42907
+ readonly sampled: boolean;
42908
+ readonly tracestate: string | null;
42909
+ };
42910
+ readonly links: readonly {
42911
+ readonly context: {
42912
+ readonly traceId: string & import("effect/Brand").Brand<"EDATraceId">;
42913
+ readonly spanId: string & import("effect/Brand").Brand<"EDASpanId">;
42914
+ readonly sampled: boolean;
42915
+ readonly tracestate: string | null;
42916
+ };
42917
+ readonly attributes: {
42918
+ readonly [x: string]: string | number | boolean;
42919
+ };
42920
+ }[];
42921
+ };
42922
+ readonly durability: "durable";
42923
+ readonly namespace: "effect-durable-agent";
42924
+ readonly type: "BaseStateCreated";
42811
42925
  readonly schemaVersion: number;
42812
42926
  readonly payload: {
42813
- readonly compactionId: string & import("effect/Brand").Brand<"CompactionId">;
42814
- readonly error: {
42815
- readonly message: string;
42816
- readonly code?: string | undefined;
42817
- readonly details?: unknown;
42818
- };
42819
- readonly modelSelection?: {
42820
- readonly provider: string;
42821
- readonly modelId: string;
42822
- readonly settings?: unknown;
42823
- } | undefined;
42824
- readonly usage?: {
42825
- readonly inputTokens?: number | undefined;
42826
- readonly cachedInputTokens?: number | undefined;
42827
- readonly cacheWriteInputTokens?: number | undefined;
42828
- readonly outputTokens?: number | undefined;
42829
- readonly textTokens?: number | undefined;
42830
- readonly reasoningTokens?: number | undefined;
42831
- } | undefined;
42927
+ readonly baseStateId: string & import("effect/Brand").Brand<"BaseStateId">;
42928
+ readonly coversThroughSeq: number & import("effect/Brand").Brand<"SequenceNumber">;
42832
42929
  };
42833
42930
  } | {
42834
42931
  readonly eventId: string & import("effect/Brand").Brand<"EventId">;
@@ -42856,13 +42953,86 @@ declare const SessionCommandOutcome: Schema.Union<readonly [Schema.TaggedStruct<
42856
42953
  };
42857
42954
  readonly durability: "durable";
42858
42955
  readonly namespace: "effect-durable-agent";
42859
- readonly type: "BaseStateRequested";
42956
+ readonly type: "BaseStateFailed";
42860
42957
  readonly schemaVersion: number;
42861
42958
  readonly payload: {
42862
42959
  readonly baseStateId: string & import("effect/Brand").Brand<"BaseStateId">;
42863
- readonly requestedThroughSeq: number & import("effect/Brand").Brand<"SequenceNumber">;
42960
+ readonly error: {
42961
+ readonly message: string;
42962
+ readonly code?: string | undefined;
42963
+ readonly details?: unknown;
42964
+ };
42864
42965
  };
42865
42966
  } | {
42967
+ readonly schemaVersion: number;
42968
+ readonly eventId: string & import("effect/Brand").Brand<"EventId">;
42969
+ readonly sessionId: string & import("effect/Brand").Brand<"SessionId">;
42970
+ readonly correlationId?: (string & import("effect/Brand").Brand<"CorrelationId">) | undefined;
42971
+ readonly createdAtMs: number & import("effect/Brand").Brand<"UnixEpochMillis">;
42972
+ readonly trace: {
42973
+ readonly span: {
42974
+ readonly traceId: string & import("effect/Brand").Brand<"EDATraceId">;
42975
+ readonly spanId: string & import("effect/Brand").Brand<"EDASpanId">;
42976
+ readonly sampled: boolean;
42977
+ readonly tracestate: string | null;
42978
+ };
42979
+ readonly links: readonly {
42980
+ readonly context: {
42981
+ readonly traceId: string & import("effect/Brand").Brand<"EDATraceId">;
42982
+ readonly spanId: string & import("effect/Brand").Brand<"EDASpanId">;
42983
+ readonly sampled: boolean;
42984
+ readonly tracestate: string | null;
42985
+ };
42986
+ readonly attributes: {
42987
+ readonly [x: string]: string | number | boolean;
42988
+ };
42989
+ }[];
42990
+ };
42991
+ readonly payload: unknown;
42992
+ readonly durability: "durable";
42993
+ readonly namespace: "__foreign";
42994
+ readonly type: "Foreign";
42995
+ readonly _tag: "Foreign";
42996
+ readonly envelope: {
42997
+ readonly namespace: string;
42998
+ readonly type: string;
42999
+ readonly schemaVersion: number;
43000
+ readonly eventId: string & import("effect/Brand").Brand<"EventId">;
43001
+ readonly sessionId: string & import("effect/Brand").Brand<"SessionId">;
43002
+ readonly correlationId?: (string & import("effect/Brand").Brand<"CorrelationId">) | undefined;
43003
+ readonly createdAtMs: number & import("effect/Brand").Brand<"UnixEpochMillis">;
43004
+ readonly trace: {
43005
+ readonly span: {
43006
+ readonly traceId: string & import("effect/Brand").Brand<"EDATraceId">;
43007
+ readonly spanId: string & import("effect/Brand").Brand<"EDASpanId">;
43008
+ readonly sampled: boolean;
43009
+ readonly tracestate: string | null;
43010
+ };
43011
+ readonly links: readonly {
43012
+ readonly context: {
43013
+ readonly traceId: string & import("effect/Brand").Brand<"EDATraceId">;
43014
+ readonly spanId: string & import("effect/Brand").Brand<"EDASpanId">;
43015
+ readonly sampled: boolean;
43016
+ readonly tracestate: string | null;
43017
+ };
43018
+ readonly attributes: {
43019
+ readonly [x: string]: string | number | boolean;
43020
+ };
43021
+ }[];
43022
+ };
43023
+ readonly payload: unknown;
43024
+ readonly durability: "durable";
43025
+ };
43026
+ readonly decoded?: unknown;
43027
+ }>, {
43028
+ readonly position: {
43029
+ readonly seq: number;
43030
+ readonly subSeq: 0;
43031
+ };
43032
+ readonly event: typeof DurableEventEnvelope.Encoded;
43033
+ }, never, never>;
43034
+ }>, Schema.TaggedStruct<"SessionCommandCancelled", {
43035
+ readonly committed: Schema.Codec<CommittedDurableEvent<{
42866
43036
  readonly eventId: string & import("effect/Brand").Brand<"EventId">;
42867
43037
  readonly sessionId: string & import("effect/Brand").Brand<"SessionId">;
42868
43038
  readonly correlationId?: (string & import("effect/Brand").Brand<"CorrelationId">) | undefined;
@@ -42888,11 +43058,10 @@ declare const SessionCommandOutcome: Schema.Union<readonly [Schema.TaggedStruct<
42888
43058
  };
42889
43059
  readonly durability: "durable";
42890
43060
  readonly namespace: "effect-durable-agent";
42891
- readonly type: "BaseStateCreated";
43061
+ readonly type: "CommandCompleted";
42892
43062
  readonly schemaVersion: number;
42893
43063
  readonly payload: {
42894
- readonly baseStateId: string & import("effect/Brand").Brand<"BaseStateId">;
42895
- readonly coversThroughSeq: number & import("effect/Brand").Brand<"SequenceNumber">;
43064
+ readonly commandId: string & import("effect/Brand").Brand<"CommandId">;
42896
43065
  };
42897
43066
  } | {
42898
43067
  readonly eventId: string & import("effect/Brand").Brand<"EventId">;
@@ -42920,10 +43089,10 @@ declare const SessionCommandOutcome: Schema.Union<readonly [Schema.TaggedStruct<
42920
43089
  };
42921
43090
  readonly durability: "durable";
42922
43091
  readonly namespace: "effect-durable-agent";
42923
- readonly type: "BaseStateFailed";
43092
+ readonly type: "CommandFailed";
42924
43093
  readonly schemaVersion: number;
42925
43094
  readonly payload: {
42926
- readonly baseStateId: string & import("effect/Brand").Brand<"BaseStateId">;
43095
+ readonly commandId: string & import("effect/Brand").Brand<"CommandId">;
42927
43096
  readonly error: {
42928
43097
  readonly message: string;
42929
43098
  readonly code?: string | undefined;
@@ -42931,7 +43100,6 @@ declare const SessionCommandOutcome: Schema.Union<readonly [Schema.TaggedStruct<
42931
43100
  };
42932
43101
  };
42933
43102
  } | {
42934
- readonly schemaVersion: number;
42935
43103
  readonly eventId: string & import("effect/Brand").Brand<"EventId">;
42936
43104
  readonly sessionId: string & import("effect/Brand").Brand<"SessionId">;
42937
43105
  readonly correlationId?: (string & import("effect/Brand").Brand<"CorrelationId">) | undefined;
@@ -42955,51 +43123,15 @@ declare const SessionCommandOutcome: Schema.Union<readonly [Schema.TaggedStruct<
42955
43123
  };
42956
43124
  }[];
42957
43125
  };
42958
- readonly payload: unknown;
42959
43126
  readonly durability: "durable";
42960
- readonly namespace: "__foreign";
42961
- readonly type: "Foreign";
42962
- readonly _tag: "Foreign";
42963
- readonly envelope: {
42964
- readonly namespace: string;
42965
- readonly type: string;
42966
- readonly schemaVersion: number;
42967
- readonly eventId: string & import("effect/Brand").Brand<"EventId">;
42968
- readonly sessionId: string & import("effect/Brand").Brand<"SessionId">;
42969
- readonly correlationId?: (string & import("effect/Brand").Brand<"CorrelationId">) | undefined;
42970
- readonly createdAtMs: number & import("effect/Brand").Brand<"UnixEpochMillis">;
42971
- readonly trace: {
42972
- readonly span: {
42973
- readonly traceId: string & import("effect/Brand").Brand<"EDATraceId">;
42974
- readonly spanId: string & import("effect/Brand").Brand<"EDASpanId">;
42975
- readonly sampled: boolean;
42976
- readonly tracestate: string | null;
42977
- };
42978
- readonly links: readonly {
42979
- readonly context: {
42980
- readonly traceId: string & import("effect/Brand").Brand<"EDATraceId">;
42981
- readonly spanId: string & import("effect/Brand").Brand<"EDASpanId">;
42982
- readonly sampled: boolean;
42983
- readonly tracestate: string | null;
42984
- };
42985
- readonly attributes: {
42986
- readonly [x: string]: string | number | boolean;
42987
- };
42988
- }[];
42989
- };
42990
- readonly payload: unknown;
42991
- readonly durability: "durable";
42992
- };
42993
- readonly decoded?: unknown;
42994
- }>, {
42995
- readonly position: {
42996
- readonly seq: number;
42997
- readonly subSeq: 0;
43127
+ readonly namespace: "effect-durable-agent";
43128
+ readonly type: "CommandCancelled";
43129
+ readonly schemaVersion: number;
43130
+ readonly payload: {
43131
+ readonly commandId: string & import("effect/Brand").Brand<"CommandId">;
43132
+ readonly reason: string;
42998
43133
  };
42999
- readonly event: typeof DurableEventEnvelope.Encoded;
43000
- }, never, never>;
43001
- }>, Schema.TaggedStruct<"SessionCommandCancelled", {
43002
- readonly committed: Schema.Codec<CommittedDurableEvent<{
43134
+ } | {
43003
43135
  readonly eventId: string & import("effect/Brand").Brand<"EventId">;
43004
43136
  readonly sessionId: string & import("effect/Brand").Brand<"SessionId">;
43005
43137
  readonly correlationId?: (string & import("effect/Brand").Brand<"CorrelationId">) | undefined;
@@ -43492,105 +43624,6 @@ declare const SessionCommandOutcome: Schema.Union<readonly [Schema.TaggedStruct<
43492
43624
  readonly payload: {
43493
43625
  readonly commandId: string & import("effect/Brand").Brand<"CommandId">;
43494
43626
  };
43495
- } | {
43496
- readonly eventId: string & import("effect/Brand").Brand<"EventId">;
43497
- readonly sessionId: string & import("effect/Brand").Brand<"SessionId">;
43498
- readonly correlationId?: (string & import("effect/Brand").Brand<"CorrelationId">) | undefined;
43499
- readonly createdAtMs: number & import("effect/Brand").Brand<"UnixEpochMillis">;
43500
- readonly trace: {
43501
- readonly span: {
43502
- readonly traceId: string & import("effect/Brand").Brand<"EDATraceId">;
43503
- readonly spanId: string & import("effect/Brand").Brand<"EDASpanId">;
43504
- readonly sampled: boolean;
43505
- readonly tracestate: string | null;
43506
- };
43507
- readonly links: readonly {
43508
- readonly context: {
43509
- readonly traceId: string & import("effect/Brand").Brand<"EDATraceId">;
43510
- readonly spanId: string & import("effect/Brand").Brand<"EDASpanId">;
43511
- readonly sampled: boolean;
43512
- readonly tracestate: string | null;
43513
- };
43514
- readonly attributes: {
43515
- readonly [x: string]: string | number | boolean;
43516
- };
43517
- }[];
43518
- };
43519
- readonly durability: "durable";
43520
- readonly namespace: "effect-durable-agent";
43521
- readonly type: "CommandCompleted";
43522
- readonly schemaVersion: number;
43523
- readonly payload: {
43524
- readonly commandId: string & import("effect/Brand").Brand<"CommandId">;
43525
- };
43526
- } | {
43527
- readonly eventId: string & import("effect/Brand").Brand<"EventId">;
43528
- readonly sessionId: string & import("effect/Brand").Brand<"SessionId">;
43529
- readonly correlationId?: (string & import("effect/Brand").Brand<"CorrelationId">) | undefined;
43530
- readonly createdAtMs: number & import("effect/Brand").Brand<"UnixEpochMillis">;
43531
- readonly trace: {
43532
- readonly span: {
43533
- readonly traceId: string & import("effect/Brand").Brand<"EDATraceId">;
43534
- readonly spanId: string & import("effect/Brand").Brand<"EDASpanId">;
43535
- readonly sampled: boolean;
43536
- readonly tracestate: string | null;
43537
- };
43538
- readonly links: readonly {
43539
- readonly context: {
43540
- readonly traceId: string & import("effect/Brand").Brand<"EDATraceId">;
43541
- readonly spanId: string & import("effect/Brand").Brand<"EDASpanId">;
43542
- readonly sampled: boolean;
43543
- readonly tracestate: string | null;
43544
- };
43545
- readonly attributes: {
43546
- readonly [x: string]: string | number | boolean;
43547
- };
43548
- }[];
43549
- };
43550
- readonly durability: "durable";
43551
- readonly namespace: "effect-durable-agent";
43552
- readonly type: "CommandFailed";
43553
- readonly schemaVersion: number;
43554
- readonly payload: {
43555
- readonly commandId: string & import("effect/Brand").Brand<"CommandId">;
43556
- readonly error: {
43557
- readonly message: string;
43558
- readonly code?: string | undefined;
43559
- readonly details?: unknown;
43560
- };
43561
- };
43562
- } | {
43563
- readonly eventId: string & import("effect/Brand").Brand<"EventId">;
43564
- readonly sessionId: string & import("effect/Brand").Brand<"SessionId">;
43565
- readonly correlationId?: (string & import("effect/Brand").Brand<"CorrelationId">) | undefined;
43566
- readonly createdAtMs: number & import("effect/Brand").Brand<"UnixEpochMillis">;
43567
- readonly trace: {
43568
- readonly span: {
43569
- readonly traceId: string & import("effect/Brand").Brand<"EDATraceId">;
43570
- readonly spanId: string & import("effect/Brand").Brand<"EDASpanId">;
43571
- readonly sampled: boolean;
43572
- readonly tracestate: string | null;
43573
- };
43574
- readonly links: readonly {
43575
- readonly context: {
43576
- readonly traceId: string & import("effect/Brand").Brand<"EDATraceId">;
43577
- readonly spanId: string & import("effect/Brand").Brand<"EDASpanId">;
43578
- readonly sampled: boolean;
43579
- readonly tracestate: string | null;
43580
- };
43581
- readonly attributes: {
43582
- readonly [x: string]: string | number | boolean;
43583
- };
43584
- }[];
43585
- };
43586
- readonly durability: "durable";
43587
- readonly namespace: "effect-durable-agent";
43588
- readonly type: "CommandCancelled";
43589
- readonly schemaVersion: number;
43590
- readonly payload: {
43591
- readonly commandId: string & import("effect/Brand").Brand<"CommandId">;
43592
- readonly reason: string;
43593
- };
43594
43627
  } | {
43595
43628
  readonly eventId: string & import("effect/Brand").Brand<"EventId">;
43596
43629
  readonly sessionId: string & import("effect/Brand").Brand<"SessionId">;
@@ -45027,6 +45060,7 @@ declare const SessionCommandOutcome: Schema.Union<readonly [Schema.TaggedStruct<
45027
45060
  readonly schemaVersion: number;
45028
45061
  readonly payload: {
45029
45062
  readonly toolCallId: string & import("effect/Brand").Brand<"ToolCallId">;
45063
+ readonly attempt?: number | undefined;
45030
45064
  };
45031
45065
  } | {
45032
45066
  readonly eventId: string & import("effect/Brand").Brand<"EventId">;
@@ -45912,6 +45946,7 @@ declare const EDASessionSnapshot: Schema.Struct<{
45912
45946
  readonly turnId: Schema.brand<Schema.String, "TurnId">;
45913
45947
  }>]>>;
45914
45948
  readonly startedSeq: Schema.optionalKey<Schema.brand<Schema.Int, "SequenceNumber">>;
45949
+ readonly attempt: Schema.optionalKey<Schema.Int>;
45915
45950
  readonly terminal: Schema.optionalKey<Schema.Union<readonly [Schema.Struct<{
45916
45951
  readonly _tag: Schema.Literal<"Completed">;
45917
45952
  readonly promptPart: Schema.optionalKey<Schema.Struct<{
@@ -46673,7 +46708,10 @@ type ToolTerminal = {
46673
46708
  interface ToolCallRecord extends LifecycleTiming {
46674
46709
  readonly toolCallId: ToolCallId;
46675
46710
  readonly decision?: ToolDecision;
46711
+ /** First start; `startedAtMs` is its time. Later attempts keep both. */
46676
46712
  readonly startedSeq?: SequenceNumber;
46713
+ /** Latest execution attempt (1 when only the first start is recorded). */
46714
+ readonly attempt?: number;
46677
46715
  readonly terminal?: ToolTerminal;
46678
46716
  }
46679
46717
  /** Durable message-like facts folded from the event log. */
@@ -47111,6 +47149,7 @@ declare const reduceCommittedEvents: (committed: ReadonlyArray<CommittedDurableE
47111
47149
  readonly turnId: string & import("effect/Brand").Brand<"TurnId">;
47112
47150
  } | undefined;
47113
47151
  readonly startedSeq?: (number & import("effect/Brand").Brand<"SequenceNumber">) | undefined;
47152
+ readonly attempt?: number | undefined;
47114
47153
  readonly terminal?: {
47115
47154
  readonly _tag: "Completed";
47116
47155
  readonly promptPart?: {
@@ -47779,4 +47818,4 @@ declare const activeTurnIdentityForCommand: (state: ReducedState, commandId: Com
47779
47818
  declare const classifyRecoverableWork: (state: ReducedState) => RecoverableWork;
47780
47819
  //#endregion
47781
47820
  export { EDASessionQueryShape as $, EDASinkRawDurableBatch as $t, TurnTerminal as A, EDAPromptProjector as An, RunRequestOutcome as At, pendingCommands as B, runSchedulingInputMessageIds as Bt, RunRecord as C, defaultCompactionThresholdTokens as Cn, RunScheduler as Ct, ToolDecision as D, EDANativeCompaction as Dn, DeferredRunResolution as Dt, ToolCallRecord as E, SessionContext as En, RunSchedulingDeliveryError as Et, encodeReducedStateCheckpoint as F, isEDACacheBreakpoint as Fn, RunSchedulingRequestRecord as Ft, EDACommandTerminalEvent as G, EDAProjectedSink as Gt, reduceCommittedEvents as H, EDADurableSinkDefinition as Ht, foldReducedState as I, nativeCompactionSummaryMessage as In, RunSchedulingWork as It, EDARuntimeError as J, EDASink as Jt, EDARuntime as K, EDARawDurableSinkDefinition as Kt, frameworkReducedStateReducerName as L, canGrantRun as Lt, activeTurnIdentityForCommand as M, EDA_PROMPT_OPTIONS_KEY as Mn, RunSchedulingCancellationPlan as Mt, classifyRecoverableWork as N, buildEDAPrompt as Nn, RunSchedulingInput as Nt, ToolTerminal as O, EDAProjectedPromptContext as On, LocalRunResolution as Ot, decodeReducedStateCheckpoint as P, getNativeCompaction as Pn, RunSchedulingRequest as Pt, EDASessionQuery as Q, EDASinkInterests as Qt, frameworkReducedStateReducerSchemaVersion as R, planRunSchedulingCancellation as Rt, ReducedStateCheckpointToolTerminal as S, defaultCompactionSummaryInstructions as Sn, ToolExecutor as St, StopRequestRecord as T, EventFactory as Tn, RunSchedulingDelivery as Tt, reducedStateCheckpointEventSeqs as U, EDAEphemeralSinkDefinition as Ut, pendingStopCommand as V, waitingRunControl as Vt, CommittedCommandTerminalEvent as W, EDAProjectedDurableSinkDefinition as Wt, EDARuntimeSubmit as X, EDASinkContext as Xt, EDARuntimeShape as Y, EDASinkCheckpoint as Yt, EDASessionEventPage as Z, EDASinkDurableBatch as Zt, ReducedStateCheckpointCommandRecord as _, LanguageModelSummaryCompactionExecutorOptions as _n, SessionStateShape as _t, CompactionRecord as a, CompactionError as an, SessionCommandCompleted as at, ReducedStateCheckpointToolCallRecord as b, defaultCompactionMinSummarizableTokens as bn, InferenceRunner as bt, InferenceRecord as c, CompactionExecutorShape as cn, SessionCommandResult as ct, LifecycleTiming as d, CompactionPolicy as dn, SessionForkedCommand as dt, EDASinkRegistry as en, EDASessionSnapshot as et, MessageRecord as f, CompactionPolicyInput as fn, SessionNoRunnableCommand as ft, ReducedState as g, CompactionRunnerShape as gn, SessionStateError as gt, RecoveryContinuationRecord as h, CompactionRunnerInput as hn, SessionState as ht, CommandTerminal as i, ApproximateTokenThresholdCompactionPolicyOptions as in, SessionCommandCancelled as it, activeCommand as j, EDAPromptProjectorShape as jn, RunResolution as jt, TurnRecord as k, EDAPromptProjectionInput as kn, RunGrantResult as kt, InferenceTerminal as l, CompactionOutput as ln, SessionDrainProcessed as lt, RecoverableWork as m, CompactionRunner as mn, SessionRunInput as mt, ActiveTurnIdentity as n, EDASinkRunnerStartInput as nn, SessionCommandAdmissionConflict as nt, CompactionTerminal as o, CompactionExecutor as on, SessionCommandFailed as ot, PendingCommand as p, CompactionPolicyShape as pn, SessionNoRunnableReason as pt, EDARuntimeConfig as q, EDARawSink as qt, CommandRecord as r, LiveEventBus as rn, SessionCommandAdmissionError as rt, ContextRecord as s, CompactionExecutorInput as sn, SessionCommandOutcome as st, ActiveCommandEvidence as t, EDASinkRegistryShape as tn, EDASubmittable as tt, LifecycleFailure as u, CompactionPlan as un, SessionDrainResult as ut, ReducedStateCheckpointMessageRecord as v, PromptPrefixSummaryCompactionExecutorOptions as vn, SessionStateSnapshotData as vt, RunTerminal as w, promptPrefixSummaryCompactionExecutor as wn, RunSchedulerShape as wt, ReducedStateCheckpointToolDecision as x, defaultCompactionRetainTailTokens as xn, InferenceRunnerStreamPart as xt, ReducedStateCheckpointPayload as y, defaultCompactionCharsPerToken as yn, TurnRunner as yt, initialReducedState as z, planWaitingRunInterruption as zt };
47782
- //# sourceMappingURL=reduced-state-D50SR0qM.d.ts.map
47821
+ //# sourceMappingURL=reduced-state-DU2ECOUp.d.ts.map