effect-durable-agent 0.1.0-alpha.3 → 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 (221) hide show
  1. package/README.md +43 -41
  2. package/dist/assert-never-CoyUpoRB.js +18 -0
  3. package/dist/assert-never-CoyUpoRB.js.map +1 -0
  4. package/dist/{commands-Ce1ec6kH.d.ts → commands-3OD-p8dD.d.ts} +16 -9
  5. package/dist/compaction-63iEDHHl.js +523 -0
  6. package/dist/compaction-63iEDHHl.js.map +1 -0
  7. package/dist/context-projection-D_uRtK3r.d.ts +139 -0
  8. package/dist/{core-Hv3cFydL.d.ts → core-BcimKMIv.d.ts} +6 -4
  9. package/dist/delivery-2ZILvoRD.js +507 -0
  10. package/dist/delivery-2ZILvoRD.js.map +1 -0
  11. package/dist/{websocket-wire-D3tLrhe2.d.ts → delivery-RjM1_NAE.d.ts} +1019 -200
  12. package/dist/domain/command-queues.d.ts +81 -2
  13. package/dist/domain/command-queues.js +1 -1
  14. package/dist/domain/command-queues.js.map +1 -1
  15. package/dist/domain/context-projection.d.ts +2 -0
  16. package/dist/domain/context-projection.js +32 -0
  17. package/dist/domain/context-projection.js.map +1 -0
  18. package/dist/domain/message-transcript.d.ts +36 -2
  19. package/dist/domain/message-transcript.js +10 -2
  20. package/dist/domain/message-transcript.js.map +1 -1
  21. package/dist/domain/model-usage.d.ts +2 -0
  22. package/dist/domain/model-usage.js +59 -0
  23. package/dist/domain/model-usage.js.map +1 -0
  24. package/dist/domain/reduced-state-schema.d.ts +3 -996
  25. package/dist/domain/reduced-state-schema.js +121 -12
  26. package/dist/domain/reduced-state-schema.js.map +1 -1
  27. package/dist/domain/reduced-state.d.ts +3 -2
  28. package/dist/domain/reduced-state.js +937 -2
  29. package/dist/domain/reduced-state.js.map +1 -0
  30. package/dist/domain/run-scheduling.d.ts +2 -0
  31. package/dist/domain/run-scheduling.js +127 -0
  32. package/dist/domain/run-scheduling.js.map +1 -0
  33. package/dist/{durable-DlScwmCy.d.ts → durable-Cqv5ZRFA.d.ts} +8505 -2497
  34. package/dist/{durable-C3Rz7kg3.js → durable-D13w1Qr3.js} +253 -91
  35. package/dist/durable-D13w1Qr3.js.map +1 -0
  36. package/dist/envelope-BCzKUq_z.js +91 -0
  37. package/dist/envelope-BCzKUq_z.js.map +1 -0
  38. package/dist/envelope-Che6KatU.d.ts +254 -0
  39. package/dist/{keep-alive-p8dIcSVy.js → event-factory-_vF1bIJ7.js} +8 -10
  40. package/dist/event-factory-_vF1bIJ7.js.map +1 -0
  41. package/dist/{events-Bb9-Cu-7.d.ts → events-Dg0o5wWs.d.ts} +140 -324
  42. package/dist/{id-generator-C2Q15uZM.d.ts → id-generator-BKGoKjt-.d.ts} +3 -3
  43. package/dist/in-memory-CeODnZhE.js +150 -0
  44. package/dist/in-memory-CeODnZhE.js.map +1 -0
  45. package/dist/index.d.ts +8 -7
  46. package/dist/index.js +6 -5
  47. package/dist/interpreter-DKGJ1sSx.js +1452 -0
  48. package/dist/interpreter-DKGJ1sSx.js.map +1 -0
  49. package/dist/keep-alive-_zFCUvt3.d.ts +28 -0
  50. package/dist/model-resolver-D0vcDZsU.d.ts +24 -0
  51. package/dist/model-usage-0GeHwaaU.d.ts +54 -0
  52. package/dist/records--54mZEBx.js +675 -0
  53. package/dist/records--54mZEBx.js.map +1 -0
  54. package/dist/reduced-state-DU2ECOUp.d.ts +47821 -0
  55. package/dist/reduced-state-schema-B2t3cobf.d.ts +2187 -0
  56. package/dist/{reducer-registry-C0svUa63.d.ts → reducer-registry-JLU1yptN.d.ts} +24 -8
  57. package/dist/run-scheduling-wakeup-D_bGdicf.d.ts +24 -0
  58. package/dist/services/compaction.d.ts +2 -2
  59. package/dist/services/compaction.js +2 -426
  60. package/dist/services/id-generator.d.ts +1 -1
  61. package/dist/services/id-generator.js +4 -2
  62. package/dist/services/id-generator.js.map +1 -1
  63. package/dist/services/keep-alive.d.ts +2 -0
  64. package/dist/services/keep-alive.js +13 -0
  65. package/dist/services/keep-alive.js.map +1 -0
  66. package/dist/services/model-call.d.ts +15 -0
  67. package/dist/services/model-call.js +15 -0
  68. package/dist/services/model-call.js.map +1 -0
  69. package/dist/services/model-resolver.d.ts +2 -0
  70. package/dist/services/model-resolver.js +17 -0
  71. package/dist/services/model-resolver.js.map +1 -0
  72. package/dist/services/prompt-projector.d.ts +2 -2
  73. package/dist/services/prompt-projector.js +49 -5
  74. package/dist/services/prompt-projector.js.map +1 -1
  75. package/dist/services/reducer-registry.d.ts +2 -2
  76. package/dist/services/reducer-registry.js +21 -4
  77. package/dist/services/reducer-registry.js.map +1 -1
  78. package/dist/services/run-scheduler.d.ts +2 -0
  79. package/dist/services/run-scheduler.js +25 -0
  80. package/dist/services/run-scheduler.js.map +1 -0
  81. package/dist/services/run-scheduling-wakeup.d.ts +2 -0
  82. package/dist/services/run-scheduling-wakeup.js +13 -0
  83. package/dist/services/run-scheduling-wakeup.js.map +1 -0
  84. package/dist/services/runtime-layer.d.ts +48 -0
  85. package/dist/services/runtime-layer.js +51 -0
  86. package/dist/services/runtime-layer.js.map +1 -0
  87. package/dist/services/runtime.d.ts +1 -1
  88. package/dist/services/runtime.js +34 -20
  89. package/dist/services/runtime.js.map +1 -1
  90. package/dist/services/session-event-observer.d.ts +2 -0
  91. package/dist/services/session-event-observer.js +13 -0
  92. package/dist/services/session-event-observer.js.map +1 -0
  93. package/dist/services/session-query.d.ts +2 -2
  94. package/dist/services/session-query.js +141 -2
  95. package/dist/services/session-query.js.map +1 -0
  96. package/dist/services/session-state.d.ts +2 -0
  97. package/dist/services/session-state.js +2 -0
  98. package/dist/services/session-store.d.ts +2 -2
  99. package/dist/services/session-store.js +272 -2
  100. package/dist/services/session-store.js.map +1 -0
  101. package/dist/services/sink-checkpoint-store.d.ts +2 -0
  102. package/dist/services/sink-checkpoint-store.js +50 -0
  103. package/dist/services/sink-checkpoint-store.js.map +1 -0
  104. package/dist/services/sink-registry.d.ts +2 -2
  105. package/dist/services/sink-registry.js +1 -1
  106. package/dist/services/span-names.d.ts +1 -1
  107. package/dist/services/span-names.js +7 -1
  108. package/dist/services/span-names.js.map +1 -1
  109. package/dist/services/tool-registry.d.ts +2 -2
  110. package/dist/services/tool-registry.js +12 -3
  111. package/dist/services/tool-registry.js.map +1 -1
  112. package/dist/services/tracing.d.ts +3 -3
  113. package/dist/services/tracing.js +25 -4
  114. package/dist/services/tracing.js.map +1 -1
  115. package/dist/session-event-observer-HvrRckbC.d.ts +24 -0
  116. package/dist/{session-query-Cbf-e0rG.js → session-state-BQYsuBqi.js} +693 -251
  117. package/dist/session-state-BQYsuBqi.js.map +1 -0
  118. package/dist/session-store-CQxg9U82.d.ts +3302 -0
  119. package/dist/sink-checkpoint-store-DWGifxp0.d.ts +39 -0
  120. package/dist/sink-registry-DskRcyOS.js +345 -0
  121. package/dist/sink-registry-DskRcyOS.js.map +1 -0
  122. package/dist/subscription-DmO3BcdT.js +505 -0
  123. package/dist/subscription-DmO3BcdT.js.map +1 -0
  124. package/dist/subscription-rC35dAWn.d.ts +958 -0
  125. package/dist/testkit/layers.d.ts +34 -19
  126. package/dist/testkit/layers.js +30 -16
  127. package/dist/testkit/layers.js.map +1 -1
  128. package/dist/testkit/transcript.d.ts +226 -0
  129. package/dist/testkit/transcript.js +1475 -0
  130. package/dist/testkit/transcript.js.map +1 -0
  131. package/dist/{tool-registry-CcnkAAQK.d.ts → tool-registry-BzlMhwzj.d.ts} +44 -8
  132. package/dist/{tracing-BXHAkxkx.d.ts → tracing-BwjbF285.d.ts} +1 -2
  133. package/dist/transcript.d.ts +101 -0
  134. package/dist/transcript.js +107 -0
  135. package/dist/transcript.js.map +1 -0
  136. package/dist/types/commands.d.ts +2 -2
  137. package/dist/types/commands.js +8 -3
  138. package/dist/types/commands.js.map +1 -1
  139. package/dist/types/core.d.ts +2 -2
  140. package/dist/types/core.js +4 -2
  141. package/dist/types/core.js.map +1 -1
  142. package/dist/types/events/durable.d.ts +2 -2
  143. package/dist/types/events/durable.js +2 -2
  144. package/dist/types/events.d.ts +5 -4
  145. package/dist/types/events.js +3 -2
  146. package/dist/types/events.js.map +1 -1
  147. package/dist/types/tracing.d.ts +1 -1
  148. package/dist/types/tracing.js.map +1 -1
  149. package/dist/websocket/events.d.ts +2 -0
  150. package/dist/websocket/events.js +2 -0
  151. package/dist/websocket.d.ts +2201 -0
  152. package/dist/websocket.js +684 -0
  153. package/dist/websocket.js.map +1 -0
  154. package/dist/window-read-CBZEJ84M.d.ts +113 -0
  155. package/dist/window-read-DPFAA1hM.js +264 -0
  156. package/dist/window-read-DPFAA1hM.js.map +1 -0
  157. package/package.json +87 -46
  158. package/testing/offline-trace/README.md +2 -1
  159. package/CHANGELOG.md +0 -25
  160. package/CONTRIBUTING.md +0 -26
  161. package/SECURITY.md +0 -7
  162. package/dist/command-queues-CQ9cwRP7.d.ts +0 -468
  163. package/dist/compaction-1LSZR944.d.ts +0 -144
  164. package/dist/durable-C3Rz7kg3.js.map +0 -1
  165. package/dist/durable-object-runtime-CiMKxGs6.d.ts +0 -257
  166. package/dist/durable-object-runtime-wKiqaAt2.js +0 -1494
  167. package/dist/durable-object-runtime-wKiqaAt2.js.map +0 -1
  168. package/dist/durable-object-storage-Czy7IPrh.d.ts +0 -41
  169. package/dist/host/durable-object-runtime.d.ts +0 -2
  170. package/dist/host/durable-object-runtime.js +0 -2
  171. package/dist/host/durable-object-storage.d.ts +0 -2
  172. package/dist/host/durable-object-storage.js +0 -0
  173. package/dist/host/durable-object.d.ts +0 -83
  174. package/dist/host/durable-object.js +0 -191
  175. package/dist/host/durable-object.js.map +0 -1
  176. package/dist/host/websocket-wire.d.ts +0 -2
  177. package/dist/host/websocket-wire.js +0 -105
  178. package/dist/host/websocket-wire.js.map +0 -1
  179. package/dist/index-BVVgDSdq.d.ts +0 -1
  180. package/dist/keep-alive-DYDsH6qN.d.ts +0 -111
  181. package/dist/keep-alive-p8dIcSVy.js.map +0 -1
  182. package/dist/message-transcript-BCHdHAe2.d.ts +0 -32
  183. package/dist/prompt-projector-DimXJPOJ.d.ts +0 -39
  184. package/dist/reduced-state-C4nVVzz9.js +0 -910
  185. package/dist/reduced-state-C4nVVzz9.js.map +0 -1
  186. package/dist/runtime-DcdPOEuE.d.ts +0 -60
  187. package/dist/services/compaction.js.map +0 -1
  188. package/dist/session-query-Cbf-e0rG.js.map +0 -1
  189. package/dist/session-query-hxfujxUH.d.ts +0 -769
  190. package/dist/session-store-D2Ore1QC.d.ts +0 -295
  191. package/dist/session-store-pYxQW9qh.js +0 -214
  192. package/dist/session-store-pYxQW9qh.js.map +0 -1
  193. package/dist/sink-registry-BziFpxoE.d.ts +0 -158
  194. package/dist/sink-registry-CFC6xjsN.js +0 -312
  195. package/dist/sink-registry-CFC6xjsN.js.map +0 -1
  196. package/docs/assets/architecture.svg +0 -216
  197. package/docs/assets/event-sequence.svg +0 -133
  198. package/docs/assets/gcp-trace.png +0 -0
  199. package/docs/assets/hero.svg +0 -33
  200. package/docs/message-steering.md +0 -831
  201. package/docs/releasing.md +0 -96
  202. package/docs/spec.md +0 -777
  203. package/docs/subagents.md +0 -725
  204. package/docs/testing.md +0 -64
  205. package/docs/ui-projection.md +0 -742
  206. package/docs/websocket-protocol.md +0 -639
  207. package/examples/001-no-tools/README.md +0 -65
  208. package/examples/001-no-tools/worker.ts +0 -79
  209. package/examples/002-slack-bridge/README.md +0 -134
  210. package/examples/002-slack-bridge/events.ts +0 -115
  211. package/examples/002-slack-bridge/reducer.ts +0 -216
  212. package/examples/002-slack-bridge/scenario.test.ts +0 -223
  213. package/examples/002-slack-bridge/sinks.ts +0 -109
  214. package/examples/002-slack-bridge/worker.ts +0 -140
  215. package/examples/003-sandbox-lifecycle/README.md +0 -78
  216. package/examples/003-sandbox-lifecycle/events.ts +0 -203
  217. package/examples/003-sandbox-lifecycle/reducer.ts +0 -305
  218. package/examples/003-sandbox-lifecycle/scenario.test.ts +0 -202
  219. package/examples/_shared/event-id.ts +0 -12
  220. package/examples/_shared/http.ts +0 -27
  221. package/examples/_shared/openai.ts +0 -33
@@ -1,191 +1,7 @@
1
+ import "./tracing-BwjbF285.js";
2
+ import "./envelope-Che6KatU.js";
3
+ import "./durable-Cqv5ZRFA.js";
1
4
  import * as Schema from "effect/Schema";
2
-
3
- //#region src/types/events/envelope.d.ts
4
- /** Event namespace, such as `effect-durable-agent`, `sandbox`, or `gia`. */
5
- declare const EventNamespace: Schema.NonEmptyString;
6
- type EventNamespace = typeof EventNamespace.Type;
7
- /** Event type within a namespace, such as `CommandAdmitted` or `TextDelta`. */
8
- declare const EventType: Schema.NonEmptyString;
9
- type EventType = typeof EventType.Type;
10
- /** Build a non-empty event type while preserving its string literal for exhaustive unions. */
11
- declare const makeEventType: <const Value extends string>(value: Value extends "" ? never : Value) => Value extends "" ? never : Value;
12
- /** Extract the literal name retained by `makeEventType`. */
13
- type EventTypeName<Type extends EventType> = Type;
14
- /** Provider-supplied stream part identity, preserved for correlation/debugging. */
15
- declare const ProviderPartId: Schema.brand<Schema.NonEmptyString, "ProviderPartId">;
16
- type ProviderPartId = typeof ProviderPartId.Type;
17
- /** Positive schema version for one namespace/type payload contract. */
18
- declare const SchemaVersion: Schema.Int;
19
- type SchemaVersion = typeof SchemaVersion.Type;
20
- /** Milliseconds since unix epoch, represented as a non-negative integer. */
21
- declare const UnixEpochMillis: Schema.brand<Schema.Int, "UnixEpochMillis">;
22
- type UnixEpochMillis = typeof UnixEpochMillis.Type;
23
- /** Whether an event is persisted or live-only. */
24
- declare const EventDurability: Schema.Literals<readonly ["durable", "ephemeral"]>;
25
- type EventDurability = typeof EventDurability.Type;
26
- /** Common event envelope decoded before payload-specific schemas. */
27
- declare const EventEnvelope: Schema.Struct<{
28
- readonly namespace: Schema.NonEmptyString;
29
- readonly type: Schema.NonEmptyString;
30
- readonly schemaVersion: Schema.Int;
31
- readonly durability: Schema.Literals<readonly ["durable", "ephemeral"]>;
32
- readonly eventId: Schema.brand<Schema.String, "EventId">;
33
- readonly sessionId: Schema.brand<Schema.String, "SessionId">;
34
- readonly correlationId: Schema.optionalKey<Schema.brand<Schema.String, "CorrelationId">>;
35
- readonly createdAtMs: Schema.brand<Schema.Int, "UnixEpochMillis">;
36
- readonly trace: Schema.withConstructorDefault<Schema.Struct<{
37
- readonly span: Schema.Struct<{
38
- readonly traceId: Schema.brand<Schema.String, "EDATraceId">;
39
- readonly spanId: Schema.brand<Schema.String, "EDASpanId">;
40
- readonly sampled: Schema.Boolean;
41
- readonly tracestate: Schema.NullOr<Schema.String>;
42
- }>;
43
- readonly links: Schema.$Array<Schema.Struct<{
44
- readonly context: Schema.Struct<{
45
- readonly traceId: Schema.brand<Schema.String, "EDATraceId">;
46
- readonly spanId: Schema.brand<Schema.String, "EDASpanId">;
47
- readonly sampled: Schema.Boolean;
48
- readonly tracestate: Schema.NullOr<Schema.String>;
49
- }>;
50
- readonly attributes: Schema.$Record<Schema.String, Schema.Union<readonly [Schema.String, Schema.Number, Schema.Boolean]>>;
51
- }>>;
52
- }>>;
53
- readonly payload: Schema.Unknown;
54
- }>;
55
- type EventEnvelope = typeof EventEnvelope.Type;
56
- /** Common envelope narrowed to committed durable events. */
57
- declare const DurableEventEnvelope: Schema.Struct<{
58
- readonly durability: Schema.Literal<"durable">;
59
- readonly namespace: Schema.NonEmptyString;
60
- readonly type: Schema.NonEmptyString;
61
- readonly schemaVersion: Schema.Int;
62
- readonly eventId: Schema.brand<Schema.String, "EventId">;
63
- readonly sessionId: Schema.brand<Schema.String, "SessionId">;
64
- readonly correlationId: Schema.optionalKey<Schema.brand<Schema.String, "CorrelationId">>;
65
- readonly createdAtMs: Schema.brand<Schema.Int, "UnixEpochMillis">;
66
- readonly trace: Schema.withConstructorDefault<Schema.Struct<{
67
- readonly span: Schema.Struct<{
68
- readonly traceId: Schema.brand<Schema.String, "EDATraceId">;
69
- readonly spanId: Schema.brand<Schema.String, "EDASpanId">;
70
- readonly sampled: Schema.Boolean;
71
- readonly tracestate: Schema.NullOr<Schema.String>;
72
- }>;
73
- readonly links: Schema.$Array<Schema.Struct<{
74
- readonly context: Schema.Struct<{
75
- readonly traceId: Schema.brand<Schema.String, "EDATraceId">;
76
- readonly spanId: Schema.brand<Schema.String, "EDASpanId">;
77
- readonly sampled: Schema.Boolean;
78
- readonly tracestate: Schema.NullOr<Schema.String>;
79
- }>;
80
- readonly attributes: Schema.$Record<Schema.String, Schema.Union<readonly [Schema.String, Schema.Number, Schema.Boolean]>>;
81
- }>>;
82
- }>>;
83
- readonly payload: Schema.Unknown;
84
- }>;
85
- type DurableEventEnvelope = typeof DurableEventEnvelope.Type;
86
- /** Common envelope narrowed to live-only ephemeral events. */
87
- declare const EphemeralEventEnvelope: Schema.Struct<{
88
- readonly durability: Schema.Literal<"ephemeral">;
89
- readonly namespace: Schema.NonEmptyString;
90
- readonly type: Schema.NonEmptyString;
91
- readonly schemaVersion: Schema.Int;
92
- readonly eventId: Schema.brand<Schema.String, "EventId">;
93
- readonly sessionId: Schema.brand<Schema.String, "SessionId">;
94
- readonly correlationId: Schema.optionalKey<Schema.brand<Schema.String, "CorrelationId">>;
95
- readonly createdAtMs: Schema.brand<Schema.Int, "UnixEpochMillis">;
96
- readonly trace: Schema.withConstructorDefault<Schema.Struct<{
97
- readonly span: Schema.Struct<{
98
- readonly traceId: Schema.brand<Schema.String, "EDATraceId">;
99
- readonly spanId: Schema.brand<Schema.String, "EDASpanId">;
100
- readonly sampled: Schema.Boolean;
101
- readonly tracestate: Schema.NullOr<Schema.String>;
102
- }>;
103
- readonly links: Schema.$Array<Schema.Struct<{
104
- readonly context: Schema.Struct<{
105
- readonly traceId: Schema.brand<Schema.String, "EDATraceId">;
106
- readonly spanId: Schema.brand<Schema.String, "EDASpanId">;
107
- readonly sampled: Schema.Boolean;
108
- readonly tracestate: Schema.NullOr<Schema.String>;
109
- }>;
110
- readonly attributes: Schema.$Record<Schema.String, Schema.Union<readonly [Schema.String, Schema.Number, Schema.Boolean]>>;
111
- }>>;
112
- }>>;
113
- readonly payload: Schema.Unknown;
114
- }>;
115
- type EphemeralEventEnvelope = typeof EphemeralEventEnvelope.Type;
116
- /** Event delivered to live subscribers with its durable/ephemeral position. */
117
- declare const PositionedEvent: Schema.Struct<{
118
- readonly position: Schema.Struct<{
119
- readonly seq: Schema.brand<Schema.Int, "SequenceNumber">;
120
- readonly subSeq: Schema.brand<Schema.Int, "SubSequenceNumber">;
121
- }>;
122
- readonly event: Schema.Struct<{
123
- readonly namespace: Schema.NonEmptyString;
124
- readonly type: Schema.NonEmptyString;
125
- readonly schemaVersion: Schema.Int;
126
- readonly durability: Schema.Literals<readonly ["durable", "ephemeral"]>;
127
- readonly eventId: Schema.brand<Schema.String, "EventId">;
128
- readonly sessionId: Schema.brand<Schema.String, "SessionId">;
129
- readonly correlationId: Schema.optionalKey<Schema.brand<Schema.String, "CorrelationId">>;
130
- readonly createdAtMs: Schema.brand<Schema.Int, "UnixEpochMillis">;
131
- readonly trace: Schema.withConstructorDefault<Schema.Struct<{
132
- readonly span: Schema.Struct<{
133
- readonly traceId: Schema.brand<Schema.String, "EDATraceId">;
134
- readonly spanId: Schema.brand<Schema.String, "EDASpanId">;
135
- readonly sampled: Schema.Boolean;
136
- readonly tracestate: Schema.NullOr<Schema.String>;
137
- }>;
138
- readonly links: Schema.$Array<Schema.Struct<{
139
- readonly context: Schema.Struct<{
140
- readonly traceId: Schema.brand<Schema.String, "EDATraceId">;
141
- readonly spanId: Schema.brand<Schema.String, "EDASpanId">;
142
- readonly sampled: Schema.Boolean;
143
- readonly tracestate: Schema.NullOr<Schema.String>;
144
- }>;
145
- readonly attributes: Schema.$Record<Schema.String, Schema.Union<readonly [Schema.String, Schema.Number, Schema.Boolean]>>;
146
- }>>;
147
- }>>;
148
- readonly payload: Schema.Unknown;
149
- }>;
150
- }>;
151
- type PositionedEvent = typeof PositionedEvent.Type;
152
- /** Built-in framework event namespace. */
153
- declare const effectDurableAgentNamespace: string;
154
- /** Initial schema version for built-in event payloads. */
155
- declare const schemaV1: number;
156
- /** Non-negative integer used by token counts and similar counters. */
157
- declare const NonNegativeInt: Schema.Int;
158
- type NonNegativeInt = typeof NonNegativeInt.Type;
159
- /** Registered tool name; plain non-empty text, not a lifecycle identity. */
160
- declare const ToolName: Schema.NonEmptyString;
161
- type ToolName = typeof ToolName.Type;
162
- /** Error details stored on failed lifecycle events. */
163
- declare const FailurePayload: Schema.Struct<{
164
- readonly message: Schema.String;
165
- readonly code: Schema.optionalKey<Schema.String>;
166
- readonly details: Schema.optionalKey<Schema.Unknown>;
167
- }>;
168
- type FailurePayload = typeof FailurePayload.Type;
169
- /** Token usage reported by a model provider when available. */
170
- declare const UsagePayload: Schema.Struct<{
171
- readonly inputTokens: Schema.optionalKey<Schema.Int>;
172
- readonly cachedInputTokens: Schema.optionalKey<Schema.Int>;
173
- readonly outputTokens: Schema.optionalKey<Schema.Int>;
174
- readonly textTokens: Schema.optionalKey<Schema.Int>;
175
- readonly reasoningTokens: Schema.optionalKey<Schema.Int>;
176
- }>;
177
- type UsagePayload = typeof UsagePayload.Type;
178
- /** Intended provider/model selection known before a model request starts. */
179
- declare const ModelSelectionPayload: Schema.Struct<{
180
- readonly provider: Schema.NonEmptyString;
181
- readonly modelId: Schema.NonEmptyString;
182
- readonly settings: Schema.optionalKey<Schema.Unknown>;
183
- }>;
184
- type ModelSelectionPayload = typeof ModelSelectionPayload.Type;
185
- /** App-owned instructions inserted into model context as a system message. */
186
- declare const SystemPromptText: Schema.NonEmptyString;
187
- type SystemPromptText = typeof SystemPromptText.Type;
188
- //#endregion
189
5
  //#region src/types/events/ephemeral.d.ts
190
6
  /** Event type values for ephemeral model stream events. */
191
7
  declare const textDeltaEventType: "TextDelta";
@@ -200,14 +16,6 @@ declare const TextDeltaPayload: Schema.Struct<{
200
16
  }>;
201
17
  type TextDeltaPayload = typeof TextDeltaPayload.Type;
202
18
  declare const TextDeltaEvent: Schema.Struct<{
203
- readonly namespace: Schema.Literal<string>;
204
- readonly type: Schema.Literal<"TextDelta">;
205
- readonly schemaVersion: Schema.Literal<number>;
206
- readonly payload: Schema.Struct<{
207
- readonly providerPartId: Schema.brand<Schema.NonEmptyString, "ProviderPartId">;
208
- readonly delta: Schema.String;
209
- }>;
210
- readonly durability: Schema.Literal<"ephemeral">;
211
19
  readonly eventId: Schema.brand<Schema.String, "EventId">;
212
20
  readonly sessionId: Schema.brand<Schema.String, "SessionId">;
213
21
  readonly correlationId: Schema.optionalKey<Schema.brand<Schema.String, "CorrelationId">>;
@@ -229,6 +37,14 @@ declare const TextDeltaEvent: Schema.Struct<{
229
37
  readonly attributes: Schema.$Record<Schema.String, Schema.Union<readonly [Schema.String, Schema.Number, Schema.Boolean]>>;
230
38
  }>>;
231
39
  }>>;
40
+ readonly durability: Schema.Literal<"ephemeral">;
41
+ readonly namespace: Schema.Literal<"effect-durable-agent">;
42
+ readonly type: Schema.Literal<"TextDelta">;
43
+ readonly schemaVersion: Schema.Literal<number>;
44
+ readonly payload: Schema.Struct<{
45
+ readonly providerPartId: Schema.brand<Schema.NonEmptyString, "ProviderPartId">;
46
+ readonly delta: Schema.String;
47
+ }>;
232
48
  }>;
233
49
  type TextDeltaEvent = typeof TextDeltaEvent.Type;
234
50
  /** Payload for live assistant reasoning deltas. */
@@ -238,14 +54,6 @@ declare const ReasoningDeltaPayload: Schema.Struct<{
238
54
  }>;
239
55
  type ReasoningDeltaPayload = typeof ReasoningDeltaPayload.Type;
240
56
  declare const ReasoningDeltaEvent: Schema.Struct<{
241
- readonly namespace: Schema.Literal<string>;
242
- readonly type: Schema.Literal<"ReasoningDelta">;
243
- readonly schemaVersion: Schema.Literal<number>;
244
- readonly payload: Schema.Struct<{
245
- readonly providerPartId: Schema.brand<Schema.NonEmptyString, "ProviderPartId">;
246
- readonly delta: Schema.String;
247
- }>;
248
- readonly durability: Schema.Literal<"ephemeral">;
249
57
  readonly eventId: Schema.brand<Schema.String, "EventId">;
250
58
  readonly sessionId: Schema.brand<Schema.String, "SessionId">;
251
59
  readonly correlationId: Schema.optionalKey<Schema.brand<Schema.String, "CorrelationId">>;
@@ -267,6 +75,14 @@ declare const ReasoningDeltaEvent: Schema.Struct<{
267
75
  readonly attributes: Schema.$Record<Schema.String, Schema.Union<readonly [Schema.String, Schema.Number, Schema.Boolean]>>;
268
76
  }>>;
269
77
  }>>;
78
+ readonly durability: Schema.Literal<"ephemeral">;
79
+ readonly namespace: Schema.Literal<"effect-durable-agent">;
80
+ readonly type: Schema.Literal<"ReasoningDelta">;
81
+ readonly schemaVersion: Schema.Literal<number>;
82
+ readonly payload: Schema.Struct<{
83
+ readonly providerPartId: Schema.brand<Schema.NonEmptyString, "ProviderPartId">;
84
+ readonly delta: Schema.String;
85
+ }>;
270
86
  }>;
271
87
  type ReasoningDeltaEvent = typeof ReasoningDeltaEvent.Type;
272
88
  /** Payload for the speculative start of streamed tool parameters. */
@@ -278,16 +94,6 @@ declare const ToolParamsStartPayload: Schema.Struct<{
278
94
  }>;
279
95
  type ToolParamsStartPayload = typeof ToolParamsStartPayload.Type;
280
96
  declare const ToolParamsStartEvent: Schema.Struct<{
281
- readonly namespace: Schema.Literal<string>;
282
- readonly type: Schema.Literal<"ToolParamsStart">;
283
- readonly schemaVersion: Schema.Literal<number>;
284
- readonly payload: Schema.Struct<{
285
- readonly providerPartId: Schema.brand<Schema.NonEmptyString, "ProviderPartId">;
286
- readonly toolCallId: Schema.brand<Schema.String, "ToolCallId">;
287
- readonly toolName: Schema.NonEmptyString;
288
- readonly providerExecuted: Schema.Boolean;
289
- }>;
290
- readonly durability: Schema.Literal<"ephemeral">;
291
97
  readonly eventId: Schema.brand<Schema.String, "EventId">;
292
98
  readonly sessionId: Schema.brand<Schema.String, "SessionId">;
293
99
  readonly correlationId: Schema.optionalKey<Schema.brand<Schema.String, "CorrelationId">>;
@@ -309,6 +115,16 @@ declare const ToolParamsStartEvent: Schema.Struct<{
309
115
  readonly attributes: Schema.$Record<Schema.String, Schema.Union<readonly [Schema.String, Schema.Number, Schema.Boolean]>>;
310
116
  }>>;
311
117
  }>>;
118
+ readonly durability: Schema.Literal<"ephemeral">;
119
+ readonly namespace: Schema.Literal<"effect-durable-agent">;
120
+ readonly type: Schema.Literal<"ToolParamsStart">;
121
+ readonly schemaVersion: Schema.Literal<number>;
122
+ readonly payload: Schema.Struct<{
123
+ readonly providerPartId: Schema.brand<Schema.NonEmptyString, "ProviderPartId">;
124
+ readonly toolCallId: Schema.brand<Schema.String, "ToolCallId">;
125
+ readonly toolName: Schema.NonEmptyString;
126
+ readonly providerExecuted: Schema.Boolean;
127
+ }>;
312
128
  }>;
313
129
  type ToolParamsStartEvent = typeof ToolParamsStartEvent.Type;
314
130
  /** Payload for one speculative streamed tool parameter chunk. */
@@ -319,15 +135,6 @@ declare const ToolParamsDeltaPayload: Schema.Struct<{
319
135
  }>;
320
136
  type ToolParamsDeltaPayload = typeof ToolParamsDeltaPayload.Type;
321
137
  declare const ToolParamsDeltaEvent: Schema.Struct<{
322
- readonly namespace: Schema.Literal<string>;
323
- readonly type: Schema.Literal<"ToolParamsDelta">;
324
- readonly schemaVersion: Schema.Literal<number>;
325
- readonly payload: Schema.Struct<{
326
- readonly providerPartId: Schema.brand<Schema.NonEmptyString, "ProviderPartId">;
327
- readonly toolCallId: Schema.brand<Schema.String, "ToolCallId">;
328
- readonly delta: Schema.String;
329
- }>;
330
- readonly durability: Schema.Literal<"ephemeral">;
331
138
  readonly eventId: Schema.brand<Schema.String, "EventId">;
332
139
  readonly sessionId: Schema.brand<Schema.String, "SessionId">;
333
140
  readonly correlationId: Schema.optionalKey<Schema.brand<Schema.String, "CorrelationId">>;
@@ -349,6 +156,15 @@ declare const ToolParamsDeltaEvent: Schema.Struct<{
349
156
  readonly attributes: Schema.$Record<Schema.String, Schema.Union<readonly [Schema.String, Schema.Number, Schema.Boolean]>>;
350
157
  }>>;
351
158
  }>>;
159
+ readonly durability: Schema.Literal<"ephemeral">;
160
+ readonly namespace: Schema.Literal<"effect-durable-agent">;
161
+ readonly type: Schema.Literal<"ToolParamsDelta">;
162
+ readonly schemaVersion: Schema.Literal<number>;
163
+ readonly payload: Schema.Struct<{
164
+ readonly providerPartId: Schema.brand<Schema.NonEmptyString, "ProviderPartId">;
165
+ readonly toolCallId: Schema.brand<Schema.String, "ToolCallId">;
166
+ readonly delta: Schema.String;
167
+ }>;
352
168
  }>;
353
169
  type ToolParamsDeltaEvent = typeof ToolParamsDeltaEvent.Type;
354
170
  /** Payload for the speculative end of streamed tool parameters. */
@@ -358,14 +174,6 @@ declare const ToolParamsEndPayload: Schema.Struct<{
358
174
  }>;
359
175
  type ToolParamsEndPayload = typeof ToolParamsEndPayload.Type;
360
176
  declare const ToolParamsEndEvent: Schema.Struct<{
361
- readonly namespace: Schema.Literal<string>;
362
- readonly type: Schema.Literal<"ToolParamsEnd">;
363
- readonly schemaVersion: Schema.Literal<number>;
364
- readonly payload: Schema.Struct<{
365
- readonly providerPartId: Schema.brand<Schema.NonEmptyString, "ProviderPartId">;
366
- readonly toolCallId: Schema.brand<Schema.String, "ToolCallId">;
367
- }>;
368
- readonly durability: Schema.Literal<"ephemeral">;
369
177
  readonly eventId: Schema.brand<Schema.String, "EventId">;
370
178
  readonly sessionId: Schema.brand<Schema.String, "SessionId">;
371
179
  readonly correlationId: Schema.optionalKey<Schema.brand<Schema.String, "CorrelationId">>;
@@ -387,18 +195,18 @@ declare const ToolParamsEndEvent: Schema.Struct<{
387
195
  readonly attributes: Schema.$Record<Schema.String, Schema.Union<readonly [Schema.String, Schema.Number, Schema.Boolean]>>;
388
196
  }>>;
389
197
  }>>;
390
- }>;
391
- type ToolParamsEndEvent = typeof ToolParamsEndEvent.Type;
392
- /** Ephemeral event union for live provider stream parts. */
393
- declare const ModelStreamEvent: Schema.Union<readonly [Schema.Struct<{
394
- readonly namespace: Schema.Literal<string>;
395
- readonly type: Schema.Literal<"TextDelta">;
198
+ readonly durability: Schema.Literal<"ephemeral">;
199
+ readonly namespace: Schema.Literal<"effect-durable-agent">;
200
+ readonly type: Schema.Literal<"ToolParamsEnd">;
396
201
  readonly schemaVersion: Schema.Literal<number>;
397
202
  readonly payload: Schema.Struct<{
398
203
  readonly providerPartId: Schema.brand<Schema.NonEmptyString, "ProviderPartId">;
399
- readonly delta: Schema.String;
204
+ readonly toolCallId: Schema.brand<Schema.String, "ToolCallId">;
400
205
  }>;
401
- readonly durability: Schema.Literal<"ephemeral">;
206
+ }>;
207
+ type ToolParamsEndEvent = typeof ToolParamsEndEvent.Type;
208
+ /** Ephemeral event union for live provider stream parts. */
209
+ declare const ModelStreamEvent: Schema.Union<readonly [Schema.Struct<{
402
210
  readonly eventId: Schema.brand<Schema.String, "EventId">;
403
211
  readonly sessionId: Schema.brand<Schema.String, "SessionId">;
404
212
  readonly correlationId: Schema.optionalKey<Schema.brand<Schema.String, "CorrelationId">>;
@@ -420,15 +228,15 @@ declare const ModelStreamEvent: Schema.Union<readonly [Schema.Struct<{
420
228
  readonly attributes: Schema.$Record<Schema.String, Schema.Union<readonly [Schema.String, Schema.Number, Schema.Boolean]>>;
421
229
  }>>;
422
230
  }>>;
423
- }>, Schema.Struct<{
424
- readonly namespace: Schema.Literal<string>;
425
- readonly type: Schema.Literal<"ReasoningDelta">;
231
+ readonly durability: Schema.Literal<"ephemeral">;
232
+ readonly namespace: Schema.Literal<"effect-durable-agent">;
233
+ readonly type: Schema.Literal<"TextDelta">;
426
234
  readonly schemaVersion: Schema.Literal<number>;
427
235
  readonly payload: Schema.Struct<{
428
236
  readonly providerPartId: Schema.brand<Schema.NonEmptyString, "ProviderPartId">;
429
237
  readonly delta: Schema.String;
430
238
  }>;
431
- readonly durability: Schema.Literal<"ephemeral">;
239
+ }>, Schema.Struct<{
432
240
  readonly eventId: Schema.brand<Schema.String, "EventId">;
433
241
  readonly sessionId: Schema.brand<Schema.String, "SessionId">;
434
242
  readonly correlationId: Schema.optionalKey<Schema.brand<Schema.String, "CorrelationId">>;
@@ -450,17 +258,15 @@ declare const ModelStreamEvent: Schema.Union<readonly [Schema.Struct<{
450
258
  readonly attributes: Schema.$Record<Schema.String, Schema.Union<readonly [Schema.String, Schema.Number, Schema.Boolean]>>;
451
259
  }>>;
452
260
  }>>;
453
- }>, Schema.Struct<{
454
- readonly namespace: Schema.Literal<string>;
455
- readonly type: Schema.Literal<"ToolParamsStart">;
261
+ readonly durability: Schema.Literal<"ephemeral">;
262
+ readonly namespace: Schema.Literal<"effect-durable-agent">;
263
+ readonly type: Schema.Literal<"ReasoningDelta">;
456
264
  readonly schemaVersion: Schema.Literal<number>;
457
265
  readonly payload: Schema.Struct<{
458
266
  readonly providerPartId: Schema.brand<Schema.NonEmptyString, "ProviderPartId">;
459
- readonly toolCallId: Schema.brand<Schema.String, "ToolCallId">;
460
- readonly toolName: Schema.NonEmptyString;
461
- readonly providerExecuted: Schema.Boolean;
267
+ readonly delta: Schema.String;
462
268
  }>;
463
- readonly durability: Schema.Literal<"ephemeral">;
269
+ }>, Schema.Struct<{
464
270
  readonly eventId: Schema.brand<Schema.String, "EventId">;
465
271
  readonly sessionId: Schema.brand<Schema.String, "SessionId">;
466
272
  readonly correlationId: Schema.optionalKey<Schema.brand<Schema.String, "CorrelationId">>;
@@ -482,16 +288,17 @@ declare const ModelStreamEvent: Schema.Union<readonly [Schema.Struct<{
482
288
  readonly attributes: Schema.$Record<Schema.String, Schema.Union<readonly [Schema.String, Schema.Number, Schema.Boolean]>>;
483
289
  }>>;
484
290
  }>>;
485
- }>, Schema.Struct<{
486
- readonly namespace: Schema.Literal<string>;
487
- readonly type: Schema.Literal<"ToolParamsDelta">;
291
+ readonly durability: Schema.Literal<"ephemeral">;
292
+ readonly namespace: Schema.Literal<"effect-durable-agent">;
293
+ readonly type: Schema.Literal<"ToolParamsStart">;
488
294
  readonly schemaVersion: Schema.Literal<number>;
489
295
  readonly payload: Schema.Struct<{
490
296
  readonly providerPartId: Schema.brand<Schema.NonEmptyString, "ProviderPartId">;
491
297
  readonly toolCallId: Schema.brand<Schema.String, "ToolCallId">;
492
- readonly delta: Schema.String;
298
+ readonly toolName: Schema.NonEmptyString;
299
+ readonly providerExecuted: Schema.Boolean;
493
300
  }>;
494
- readonly durability: Schema.Literal<"ephemeral">;
301
+ }>, Schema.Struct<{
495
302
  readonly eventId: Schema.brand<Schema.String, "EventId">;
496
303
  readonly sessionId: Schema.brand<Schema.String, "SessionId">;
497
304
  readonly correlationId: Schema.optionalKey<Schema.brand<Schema.String, "CorrelationId">>;
@@ -513,15 +320,16 @@ declare const ModelStreamEvent: Schema.Union<readonly [Schema.Struct<{
513
320
  readonly attributes: Schema.$Record<Schema.String, Schema.Union<readonly [Schema.String, Schema.Number, Schema.Boolean]>>;
514
321
  }>>;
515
322
  }>>;
516
- }>, Schema.Struct<{
517
- readonly namespace: Schema.Literal<string>;
518
- readonly type: Schema.Literal<"ToolParamsEnd">;
323
+ readonly durability: Schema.Literal<"ephemeral">;
324
+ readonly namespace: Schema.Literal<"effect-durable-agent">;
325
+ readonly type: Schema.Literal<"ToolParamsDelta">;
519
326
  readonly schemaVersion: Schema.Literal<number>;
520
327
  readonly payload: Schema.Struct<{
521
328
  readonly providerPartId: Schema.brand<Schema.NonEmptyString, "ProviderPartId">;
522
329
  readonly toolCallId: Schema.brand<Schema.String, "ToolCallId">;
330
+ readonly delta: Schema.String;
523
331
  }>;
524
- readonly durability: Schema.Literal<"ephemeral">;
332
+ }>, Schema.Struct<{
525
333
  readonly eventId: Schema.brand<Schema.String, "EventId">;
526
334
  readonly sessionId: Schema.brand<Schema.String, "SessionId">;
527
335
  readonly correlationId: Schema.optionalKey<Schema.brand<Schema.String, "CorrelationId">>;
@@ -543,6 +351,14 @@ declare const ModelStreamEvent: Schema.Union<readonly [Schema.Struct<{
543
351
  readonly attributes: Schema.$Record<Schema.String, Schema.Union<readonly [Schema.String, Schema.Number, Schema.Boolean]>>;
544
352
  }>>;
545
353
  }>>;
354
+ readonly durability: Schema.Literal<"ephemeral">;
355
+ readonly namespace: Schema.Literal<"effect-durable-agent">;
356
+ readonly type: Schema.Literal<"ToolParamsEnd">;
357
+ readonly schemaVersion: Schema.Literal<number>;
358
+ readonly payload: Schema.Struct<{
359
+ readonly providerPartId: Schema.brand<Schema.NonEmptyString, "ProviderPartId">;
360
+ readonly toolCallId: Schema.brand<Schema.String, "ToolCallId">;
361
+ }>;
546
362
  }>]>;
547
363
  type ModelStreamEvent = typeof ModelStreamEvent.Type;
548
364
  /** Event type values for ephemeral runtime status events. */
@@ -558,14 +374,6 @@ declare const SubscriberStatusPayload: Schema.Struct<{
558
374
  }>;
559
375
  type SubscriberStatusPayload = typeof SubscriberStatusPayload.Type;
560
376
  declare const SubscriberStatusEvent: Schema.Struct<{
561
- readonly namespace: Schema.Literal<string>;
562
- readonly type: Schema.Literal<"SubscriberStatus">;
563
- readonly schemaVersion: Schema.Literal<number>;
564
- readonly payload: Schema.Struct<{
565
- readonly status: Schema.Literals<readonly ["connected", "catching-up", "live", "lagging", "closed"]>;
566
- readonly reason: Schema.optionalKey<Schema.String>;
567
- }>;
568
- readonly durability: Schema.Literal<"ephemeral">;
569
377
  readonly eventId: Schema.brand<Schema.String, "EventId">;
570
378
  readonly sessionId: Schema.brand<Schema.String, "SessionId">;
571
379
  readonly correlationId: Schema.optionalKey<Schema.brand<Schema.String, "CorrelationId">>;
@@ -587,6 +395,14 @@ declare const SubscriberStatusEvent: Schema.Struct<{
587
395
  readonly attributes: Schema.$Record<Schema.String, Schema.Union<readonly [Schema.String, Schema.Number, Schema.Boolean]>>;
588
396
  }>>;
589
397
  }>>;
398
+ readonly durability: Schema.Literal<"ephemeral">;
399
+ readonly namespace: Schema.Literal<"effect-durable-agent">;
400
+ readonly type: Schema.Literal<"SubscriberStatus">;
401
+ readonly schemaVersion: Schema.Literal<number>;
402
+ readonly payload: Schema.Struct<{
403
+ readonly status: Schema.Literals<readonly ["connected", "catching-up", "live", "lagging", "closed"]>;
404
+ readonly reason: Schema.optionalKey<Schema.String>;
405
+ }>;
590
406
  }>;
591
407
  type SubscriberStatusEvent = typeof SubscriberStatusEvent.Type;
592
408
  /** Status values emitted by runtime tracing hooks. */
@@ -600,7 +416,29 @@ declare const TraceStatusPayload: Schema.Struct<{
600
416
  }>;
601
417
  type TraceStatusPayload = typeof TraceStatusPayload.Type;
602
418
  declare const TraceStatusEvent: Schema.Struct<{
603
- readonly namespace: Schema.Literal<string>;
419
+ readonly eventId: Schema.brand<Schema.String, "EventId">;
420
+ readonly sessionId: Schema.brand<Schema.String, "SessionId">;
421
+ readonly correlationId: Schema.optionalKey<Schema.brand<Schema.String, "CorrelationId">>;
422
+ readonly createdAtMs: Schema.brand<Schema.Int, "UnixEpochMillis">;
423
+ readonly trace: Schema.withConstructorDefault<Schema.Struct<{
424
+ readonly span: Schema.Struct<{
425
+ readonly traceId: Schema.brand<Schema.String, "EDATraceId">;
426
+ readonly spanId: Schema.brand<Schema.String, "EDASpanId">;
427
+ readonly sampled: Schema.Boolean;
428
+ readonly tracestate: Schema.NullOr<Schema.String>;
429
+ }>;
430
+ readonly links: Schema.$Array<Schema.Struct<{
431
+ readonly context: Schema.Struct<{
432
+ readonly traceId: Schema.brand<Schema.String, "EDATraceId">;
433
+ readonly spanId: Schema.brand<Schema.String, "EDASpanId">;
434
+ readonly sampled: Schema.Boolean;
435
+ readonly tracestate: Schema.NullOr<Schema.String>;
436
+ }>;
437
+ readonly attributes: Schema.$Record<Schema.String, Schema.Union<readonly [Schema.String, Schema.Number, Schema.Boolean]>>;
438
+ }>>;
439
+ }>>;
440
+ readonly durability: Schema.Literal<"ephemeral">;
441
+ readonly namespace: Schema.Literal<"effect-durable-agent">;
604
442
  readonly type: Schema.Literal<"TraceStatus">;
605
443
  readonly schemaVersion: Schema.Literal<number>;
606
444
  readonly payload: Schema.Struct<{
@@ -608,7 +446,10 @@ declare const TraceStatusEvent: Schema.Struct<{
608
446
  readonly spanName: Schema.NonEmptyString;
609
447
  readonly details: Schema.optionalKey<Schema.Unknown>;
610
448
  }>;
611
- readonly durability: Schema.Literal<"ephemeral">;
449
+ }>;
450
+ type TraceStatusEvent = typeof TraceStatusEvent.Type;
451
+ /** Ephemeral event union for live runtime status updates. */
452
+ declare const RuntimeStatusEvent: Schema.Union<readonly [Schema.Struct<{
612
453
  readonly eventId: Schema.brand<Schema.String, "EventId">;
613
454
  readonly sessionId: Schema.brand<Schema.String, "SessionId">;
614
455
  readonly correlationId: Schema.optionalKey<Schema.brand<Schema.String, "CorrelationId">>;
@@ -630,18 +471,15 @@ declare const TraceStatusEvent: Schema.Struct<{
630
471
  readonly attributes: Schema.$Record<Schema.String, Schema.Union<readonly [Schema.String, Schema.Number, Schema.Boolean]>>;
631
472
  }>>;
632
473
  }>>;
633
- }>;
634
- type TraceStatusEvent = typeof TraceStatusEvent.Type;
635
- /** Ephemeral event union for live runtime status updates. */
636
- declare const RuntimeStatusEvent: Schema.Union<readonly [Schema.Struct<{
637
- readonly namespace: Schema.Literal<string>;
474
+ readonly durability: Schema.Literal<"ephemeral">;
475
+ readonly namespace: Schema.Literal<"effect-durable-agent">;
638
476
  readonly type: Schema.Literal<"SubscriberStatus">;
639
477
  readonly schemaVersion: Schema.Literal<number>;
640
478
  readonly payload: Schema.Struct<{
641
479
  readonly status: Schema.Literals<readonly ["connected", "catching-up", "live", "lagging", "closed"]>;
642
480
  readonly reason: Schema.optionalKey<Schema.String>;
643
481
  }>;
644
- readonly durability: Schema.Literal<"ephemeral">;
482
+ }>, Schema.Struct<{
645
483
  readonly eventId: Schema.brand<Schema.String, "EventId">;
646
484
  readonly sessionId: Schema.brand<Schema.String, "SessionId">;
647
485
  readonly correlationId: Schema.optionalKey<Schema.brand<Schema.String, "CorrelationId">>;
@@ -663,8 +501,8 @@ declare const RuntimeStatusEvent: Schema.Union<readonly [Schema.Struct<{
663
501
  readonly attributes: Schema.$Record<Schema.String, Schema.Union<readonly [Schema.String, Schema.Number, Schema.Boolean]>>;
664
502
  }>>;
665
503
  }>>;
666
- }>, Schema.Struct<{
667
- readonly namespace: Schema.Literal<string>;
504
+ readonly durability: Schema.Literal<"ephemeral">;
505
+ readonly namespace: Schema.Literal<"effect-durable-agent">;
668
506
  readonly type: Schema.Literal<"TraceStatus">;
669
507
  readonly schemaVersion: Schema.Literal<number>;
670
508
  readonly payload: Schema.Struct<{
@@ -672,7 +510,10 @@ declare const RuntimeStatusEvent: Schema.Union<readonly [Schema.Struct<{
672
510
  readonly spanName: Schema.NonEmptyString;
673
511
  readonly details: Schema.optionalKey<Schema.Unknown>;
674
512
  }>;
675
- readonly durability: Schema.Literal<"ephemeral">;
513
+ }>]>;
514
+ type RuntimeStatusEvent = typeof RuntimeStatusEvent.Type;
515
+ /** Built-in ephemeral event union for framework-owned live-only updates. */
516
+ declare const EDAEphemeralEvent: Schema.Union<readonly [Schema.Union<readonly [Schema.Struct<{
676
517
  readonly eventId: Schema.brand<Schema.String, "EventId">;
677
518
  readonly sessionId: Schema.brand<Schema.String, "SessionId">;
678
519
  readonly correlationId: Schema.optionalKey<Schema.brand<Schema.String, "CorrelationId">>;
@@ -694,18 +535,15 @@ declare const RuntimeStatusEvent: Schema.Union<readonly [Schema.Struct<{
694
535
  readonly attributes: Schema.$Record<Schema.String, Schema.Union<readonly [Schema.String, Schema.Number, Schema.Boolean]>>;
695
536
  }>>;
696
537
  }>>;
697
- }>]>;
698
- type RuntimeStatusEvent = typeof RuntimeStatusEvent.Type;
699
- /** Built-in ephemeral event union for framework-owned live-only updates. */
700
- declare const EDAEphemeralEvent: Schema.Union<readonly [Schema.Union<readonly [Schema.Struct<{
701
- readonly namespace: Schema.Literal<string>;
538
+ readonly durability: Schema.Literal<"ephemeral">;
539
+ readonly namespace: Schema.Literal<"effect-durable-agent">;
702
540
  readonly type: Schema.Literal<"TextDelta">;
703
541
  readonly schemaVersion: Schema.Literal<number>;
704
542
  readonly payload: Schema.Struct<{
705
543
  readonly providerPartId: Schema.brand<Schema.NonEmptyString, "ProviderPartId">;
706
544
  readonly delta: Schema.String;
707
545
  }>;
708
- readonly durability: Schema.Literal<"ephemeral">;
546
+ }>, Schema.Struct<{
709
547
  readonly eventId: Schema.brand<Schema.String, "EventId">;
710
548
  readonly sessionId: Schema.brand<Schema.String, "SessionId">;
711
549
  readonly correlationId: Schema.optionalKey<Schema.brand<Schema.String, "CorrelationId">>;
@@ -727,15 +565,15 @@ declare const EDAEphemeralEvent: Schema.Union<readonly [Schema.Union<readonly [S
727
565
  readonly attributes: Schema.$Record<Schema.String, Schema.Union<readonly [Schema.String, Schema.Number, Schema.Boolean]>>;
728
566
  }>>;
729
567
  }>>;
730
- }>, Schema.Struct<{
731
- readonly namespace: Schema.Literal<string>;
568
+ readonly durability: Schema.Literal<"ephemeral">;
569
+ readonly namespace: Schema.Literal<"effect-durable-agent">;
732
570
  readonly type: Schema.Literal<"ReasoningDelta">;
733
571
  readonly schemaVersion: Schema.Literal<number>;
734
572
  readonly payload: Schema.Struct<{
735
573
  readonly providerPartId: Schema.brand<Schema.NonEmptyString, "ProviderPartId">;
736
574
  readonly delta: Schema.String;
737
575
  }>;
738
- readonly durability: Schema.Literal<"ephemeral">;
576
+ }>, Schema.Struct<{
739
577
  readonly eventId: Schema.brand<Schema.String, "EventId">;
740
578
  readonly sessionId: Schema.brand<Schema.String, "SessionId">;
741
579
  readonly correlationId: Schema.optionalKey<Schema.brand<Schema.String, "CorrelationId">>;
@@ -757,8 +595,8 @@ declare const EDAEphemeralEvent: Schema.Union<readonly [Schema.Union<readonly [S
757
595
  readonly attributes: Schema.$Record<Schema.String, Schema.Union<readonly [Schema.String, Schema.Number, Schema.Boolean]>>;
758
596
  }>>;
759
597
  }>>;
760
- }>, Schema.Struct<{
761
- readonly namespace: Schema.Literal<string>;
598
+ readonly durability: Schema.Literal<"ephemeral">;
599
+ readonly namespace: Schema.Literal<"effect-durable-agent">;
762
600
  readonly type: Schema.Literal<"ToolParamsStart">;
763
601
  readonly schemaVersion: Schema.Literal<number>;
764
602
  readonly payload: Schema.Struct<{
@@ -767,7 +605,7 @@ declare const EDAEphemeralEvent: Schema.Union<readonly [Schema.Union<readonly [S
767
605
  readonly toolName: Schema.NonEmptyString;
768
606
  readonly providerExecuted: Schema.Boolean;
769
607
  }>;
770
- readonly durability: Schema.Literal<"ephemeral">;
608
+ }>, Schema.Struct<{
771
609
  readonly eventId: Schema.brand<Schema.String, "EventId">;
772
610
  readonly sessionId: Schema.brand<Schema.String, "SessionId">;
773
611
  readonly correlationId: Schema.optionalKey<Schema.brand<Schema.String, "CorrelationId">>;
@@ -789,8 +627,8 @@ declare const EDAEphemeralEvent: Schema.Union<readonly [Schema.Union<readonly [S
789
627
  readonly attributes: Schema.$Record<Schema.String, Schema.Union<readonly [Schema.String, Schema.Number, Schema.Boolean]>>;
790
628
  }>>;
791
629
  }>>;
792
- }>, Schema.Struct<{
793
- readonly namespace: Schema.Literal<string>;
630
+ readonly durability: Schema.Literal<"ephemeral">;
631
+ readonly namespace: Schema.Literal<"effect-durable-agent">;
794
632
  readonly type: Schema.Literal<"ToolParamsDelta">;
795
633
  readonly schemaVersion: Schema.Literal<number>;
796
634
  readonly payload: Schema.Struct<{
@@ -798,7 +636,7 @@ declare const EDAEphemeralEvent: Schema.Union<readonly [Schema.Union<readonly [S
798
636
  readonly toolCallId: Schema.brand<Schema.String, "ToolCallId">;
799
637
  readonly delta: Schema.String;
800
638
  }>;
801
- readonly durability: Schema.Literal<"ephemeral">;
639
+ }>, Schema.Struct<{
802
640
  readonly eventId: Schema.brand<Schema.String, "EventId">;
803
641
  readonly sessionId: Schema.brand<Schema.String, "SessionId">;
804
642
  readonly correlationId: Schema.optionalKey<Schema.brand<Schema.String, "CorrelationId">>;
@@ -820,15 +658,15 @@ declare const EDAEphemeralEvent: Schema.Union<readonly [Schema.Union<readonly [S
820
658
  readonly attributes: Schema.$Record<Schema.String, Schema.Union<readonly [Schema.String, Schema.Number, Schema.Boolean]>>;
821
659
  }>>;
822
660
  }>>;
823
- }>, Schema.Struct<{
824
- readonly namespace: Schema.Literal<string>;
661
+ readonly durability: Schema.Literal<"ephemeral">;
662
+ readonly namespace: Schema.Literal<"effect-durable-agent">;
825
663
  readonly type: Schema.Literal<"ToolParamsEnd">;
826
664
  readonly schemaVersion: Schema.Literal<number>;
827
665
  readonly payload: Schema.Struct<{
828
666
  readonly providerPartId: Schema.brand<Schema.NonEmptyString, "ProviderPartId">;
829
667
  readonly toolCallId: Schema.brand<Schema.String, "ToolCallId">;
830
668
  }>;
831
- readonly durability: Schema.Literal<"ephemeral">;
669
+ }>]>, Schema.Union<readonly [Schema.Struct<{
832
670
  readonly eventId: Schema.brand<Schema.String, "EventId">;
833
671
  readonly sessionId: Schema.brand<Schema.String, "SessionId">;
834
672
  readonly correlationId: Schema.optionalKey<Schema.brand<Schema.String, "CorrelationId">>;
@@ -850,15 +688,15 @@ declare const EDAEphemeralEvent: Schema.Union<readonly [Schema.Union<readonly [S
850
688
  readonly attributes: Schema.$Record<Schema.String, Schema.Union<readonly [Schema.String, Schema.Number, Schema.Boolean]>>;
851
689
  }>>;
852
690
  }>>;
853
- }>]>, Schema.Union<readonly [Schema.Struct<{
854
- readonly namespace: Schema.Literal<string>;
691
+ readonly durability: Schema.Literal<"ephemeral">;
692
+ readonly namespace: Schema.Literal<"effect-durable-agent">;
855
693
  readonly type: Schema.Literal<"SubscriberStatus">;
856
694
  readonly schemaVersion: Schema.Literal<number>;
857
695
  readonly payload: Schema.Struct<{
858
696
  readonly status: Schema.Literals<readonly ["connected", "catching-up", "live", "lagging", "closed"]>;
859
697
  readonly reason: Schema.optionalKey<Schema.String>;
860
698
  }>;
861
- readonly durability: Schema.Literal<"ephemeral">;
699
+ }>, Schema.Struct<{
862
700
  readonly eventId: Schema.brand<Schema.String, "EventId">;
863
701
  readonly sessionId: Schema.brand<Schema.String, "SessionId">;
864
702
  readonly correlationId: Schema.optionalKey<Schema.brand<Schema.String, "CorrelationId">>;
@@ -880,8 +718,8 @@ declare const EDAEphemeralEvent: Schema.Union<readonly [Schema.Union<readonly [S
880
718
  readonly attributes: Schema.$Record<Schema.String, Schema.Union<readonly [Schema.String, Schema.Number, Schema.Boolean]>>;
881
719
  }>>;
882
720
  }>>;
883
- }>, Schema.Struct<{
884
- readonly namespace: Schema.Literal<string>;
721
+ readonly durability: Schema.Literal<"ephemeral">;
722
+ readonly namespace: Schema.Literal<"effect-durable-agent">;
885
723
  readonly type: Schema.Literal<"TraceStatus">;
886
724
  readonly schemaVersion: Schema.Literal<number>;
887
725
  readonly payload: Schema.Struct<{
@@ -889,30 +727,8 @@ declare const EDAEphemeralEvent: Schema.Union<readonly [Schema.Union<readonly [S
889
727
  readonly spanName: Schema.NonEmptyString;
890
728
  readonly details: Schema.optionalKey<Schema.Unknown>;
891
729
  }>;
892
- readonly durability: Schema.Literal<"ephemeral">;
893
- readonly eventId: Schema.brand<Schema.String, "EventId">;
894
- readonly sessionId: Schema.brand<Schema.String, "SessionId">;
895
- readonly correlationId: Schema.optionalKey<Schema.brand<Schema.String, "CorrelationId">>;
896
- readonly createdAtMs: Schema.brand<Schema.Int, "UnixEpochMillis">;
897
- readonly trace: Schema.withConstructorDefault<Schema.Struct<{
898
- readonly span: Schema.Struct<{
899
- readonly traceId: Schema.brand<Schema.String, "EDATraceId">;
900
- readonly spanId: Schema.brand<Schema.String, "EDASpanId">;
901
- readonly sampled: Schema.Boolean;
902
- readonly tracestate: Schema.NullOr<Schema.String>;
903
- }>;
904
- readonly links: Schema.$Array<Schema.Struct<{
905
- readonly context: Schema.Struct<{
906
- readonly traceId: Schema.brand<Schema.String, "EDATraceId">;
907
- readonly spanId: Schema.brand<Schema.String, "EDASpanId">;
908
- readonly sampled: Schema.Boolean;
909
- readonly tracestate: Schema.NullOr<Schema.String>;
910
- }>;
911
- readonly attributes: Schema.$Record<Schema.String, Schema.Union<readonly [Schema.String, Schema.Number, Schema.Boolean]>>;
912
- }>>;
913
- }>>;
914
730
  }>]>]>;
915
731
  type EDAEphemeralEvent = typeof EDAEphemeralEvent.Type;
916
732
  //#endregion
917
- export { EventEnvelope as A, SystemPromptText as B, toolParamsDeltaEventType as C, DurableEventEnvelope as D, traceStatusEventType as E, ModelSelectionPayload as F, makeEventType as G, UnixEpochMillis as H, NonNegativeInt as I, schemaV1 as K, PositionedEvent as L, EventType as M, EventTypeName as N, EphemeralEventEnvelope as O, FailurePayload as P, ProviderPartId as R, textDeltaEventType as S, toolParamsStartEventType as T, UsagePayload as U, ToolName as V, effectDurableAgentNamespace as W, TraceStatusEvent as _, RuntimeStatusEvent as a, reasoningDeltaEventType as b, SubscriberStatusPayload as c, ToolParamsDeltaEvent as d, ToolParamsDeltaPayload as f, ToolParamsStartPayload as g, ToolParamsStartEvent as h, ReasoningDeltaPayload as i, EventNamespace as j, EventDurability as k, TextDeltaEvent as l, ToolParamsEndPayload as m, ModelStreamEvent as n, SubscriberStatusEvent as o, ToolParamsEndEvent as p, ReasoningDeltaEvent as r, SubscriberStatusKind as s, EDAEphemeralEvent as t, TextDeltaPayload as u, TraceStatusKind as v, toolParamsEndEventType as w, subscriberStatusEventType as x, TraceStatusPayload as y, SchemaVersion as z };
918
- //# sourceMappingURL=events-Bb9-Cu-7.d.ts.map
733
+ export { toolParamsDeltaEventType as C, traceStatusEventType as E, textDeltaEventType as S, toolParamsStartEventType as T, TraceStatusEvent as _, RuntimeStatusEvent as a, reasoningDeltaEventType as b, SubscriberStatusPayload as c, ToolParamsDeltaEvent as d, ToolParamsDeltaPayload as f, ToolParamsStartPayload as g, ToolParamsStartEvent as h, ReasoningDeltaPayload as i, TextDeltaEvent as l, ToolParamsEndPayload as m, ModelStreamEvent as n, SubscriberStatusEvent as o, ToolParamsEndEvent as p, ReasoningDeltaEvent as r, SubscriberStatusKind as s, EDAEphemeralEvent as t, TextDeltaPayload as u, TraceStatusKind as v, toolParamsEndEventType as w, subscriberStatusEventType as x, TraceStatusPayload as y };
734
+ //# sourceMappingURL=events-Dg0o5wWs.d.ts.map