effect-durable-agent 0.1.0-alpha.7 → 0.1.0-alpha.9

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 (94) hide show
  1. package/dist/{command-queues-C8muEqeQ.d.ts → command-queues-DdDB_aYM.d.ts} +11 -18
  2. package/dist/compaction-BgDr5VJy.js +473 -0
  3. package/dist/compaction-BgDr5VJy.js.map +1 -0
  4. package/dist/{compaction-D7W0-Ur1.d.ts → compaction-ch8z6G9x.d.ts} +26 -7
  5. package/dist/{context-projection-C43pyxn2.d.ts → context-projection-n6Rdup0N.d.ts} +2 -2
  6. package/dist/domain/command-queues.d.ts +1 -1
  7. package/dist/domain/context-projection.d.ts +1 -1
  8. package/dist/domain/message-transcript.d.ts +1 -1
  9. package/dist/domain/model-usage.d.ts +2 -0
  10. package/dist/domain/model-usage.js +59 -0
  11. package/dist/domain/model-usage.js.map +1 -0
  12. package/dist/domain/reduced-state-schema.d.ts +11 -17
  13. package/dist/domain/reduced-state-schema.js +6 -11
  14. package/dist/domain/reduced-state-schema.js.map +1 -1
  15. package/dist/domain/reduced-state.d.ts +3 -2
  16. package/dist/domain/reduced-state.js +3 -2
  17. package/dist/{durable-DsV9PxZC.js → durable-BGFvX7Mh.js} +17 -80
  18. package/dist/durable-BGFvX7Mh.js.map +1 -0
  19. package/dist/{durable-B7M6TD_0.d.ts → durable-br2C1bWK.d.ts} +247 -4
  20. package/dist/envelope-DkZyMIgp.d.ts +191 -0
  21. package/dist/envelope-DxQzo5rN.js +82 -0
  22. package/dist/envelope-DxQzo5rN.js.map +1 -0
  23. package/dist/{event-factory-tcpLgdMN.js → event-factory-DTFdy0Cb.js} +3 -2
  24. package/dist/{event-factory-tcpLgdMN.js.map → event-factory-DTFdy0Cb.js.map} +1 -1
  25. package/dist/{event-factory-CLJcyymV.d.ts → event-factory-Di1jwQvm.d.ts} +3 -3
  26. package/dist/{events-Bb9-Cu-7.d.ts → events-LZFNoESe.d.ts} +2 -188
  27. package/dist/index.d.ts +5 -4
  28. package/dist/index.js +4 -3
  29. package/dist/{message-transcript-DsKTT47f.d.ts → message-transcript-DQNlzxle.d.ts} +3 -3
  30. package/dist/model-resolver-BPPJAsuh.d.ts +18 -0
  31. package/dist/model-usage-CdBEkTwU.d.ts +55 -0
  32. package/dist/{prompt-projector-hqPh5-NI.d.ts → prompt-projector-f4ElyXCE.d.ts} +4 -4
  33. package/dist/{reduced-state-TMi7ISla.js → reduced-state-DF0-6mbR.js} +25 -30
  34. package/dist/reduced-state-DF0-6mbR.js.map +1 -0
  35. package/dist/{reducer-registry--vQFATXb.d.ts → reducer-registry-aFjz_ZLT.d.ts} +2 -2
  36. package/dist/run-scheduler-CAt7dF6C.js +21 -0
  37. package/dist/run-scheduler-CAt7dF6C.js.map +1 -0
  38. package/dist/run-scheduler-xkhZyto5.d.ts +44 -0
  39. package/dist/{runtime-DXvMCq-J.d.ts → runtime-DDSYP9jS.d.ts} +6 -6
  40. package/dist/services/compaction.d.ts +1 -1
  41. package/dist/services/compaction.js +1 -426
  42. package/dist/services/model-resolver.d.ts +2 -0
  43. package/dist/services/model-resolver.js +17 -0
  44. package/dist/services/model-resolver.js.map +1 -0
  45. package/dist/services/prompt-projector.d.ts +1 -1
  46. package/dist/services/reducer-registry.d.ts +1 -1
  47. package/dist/services/run-scheduler.d.ts +2 -0
  48. package/dist/services/run-scheduler.js +2 -0
  49. package/dist/services/runtime-layer.d.ts +17 -14
  50. package/dist/services/runtime-layer.js +10 -8
  51. package/dist/services/runtime-layer.js.map +1 -1
  52. package/dist/services/runtime.d.ts +1 -1
  53. package/dist/services/runtime.js +3 -2
  54. package/dist/services/runtime.js.map +1 -1
  55. package/dist/services/session-event-observer.d.ts +1 -1
  56. package/dist/services/session-query.d.ts +1 -1
  57. package/dist/services/session-query.js +3 -3
  58. package/dist/services/session-state.d.ts +1 -1
  59. package/dist/services/session-state.js +1 -1
  60. package/dist/services/session-store.d.ts +1 -1
  61. package/dist/services/session-store.js +2 -1
  62. package/dist/services/session-store.js.map +1 -1
  63. package/dist/services/sink-checkpoint-store.d.ts +1 -1
  64. package/dist/services/sink-registry.d.ts +1 -1
  65. package/dist/services/sink-registry.js +1 -1
  66. package/dist/services/tool-registry.d.ts +1 -1
  67. package/dist/services/tracing.d.ts +1 -1
  68. package/dist/{session-event-observer-D_aoFnQs.d.ts → session-event-observer-DaFMKKNc.d.ts} +2 -2
  69. package/dist/{session-query-lUZQpMvM.d.ts → session-query-B72HY_0L.d.ts} +9 -9
  70. package/dist/{session-state-C4m0j6CJ.js → session-state-Bkc6u-Wr.js} +44 -39
  71. package/dist/session-state-Bkc6u-Wr.js.map +1 -0
  72. package/dist/{session-state-Bi3oEbJU.d.ts → session-state-C9YLSAso.d.ts} +16 -15
  73. package/dist/{session-store-ofm8FFxs.d.ts → session-store-Cpi_NwTR.d.ts} +3 -3
  74. package/dist/{sink-checkpoint-store-BQVbI9DQ.d.ts → sink-checkpoint-store-M7qIxoSH.d.ts} +2 -2
  75. package/dist/{sink-registry-CE-hL7cB.d.ts → sink-registry-Bl-vQES6.d.ts} +9 -9
  76. package/dist/{sink-registry-DH6uiEgP.js → sink-registry-NDgeyzO0.js} +4 -4
  77. package/dist/{sink-registry-DH6uiEgP.js.map → sink-registry-NDgeyzO0.js.map} +1 -1
  78. package/dist/testkit/layers.d.ts +19 -14
  79. package/dist/testkit/layers.js +12 -9
  80. package/dist/testkit/layers.js.map +1 -1
  81. package/dist/{tool-registry-ClHdr_G5.d.ts → tool-registry-BJaVNtw4.d.ts} +3 -3
  82. package/dist/types/events/durable.d.ts +2 -2
  83. package/dist/types/events/durable.js +2 -2
  84. package/dist/types/events.d.ts +4 -3
  85. package/dist/types/events.js +3 -2
  86. package/dist/types/events.js.map +1 -1
  87. package/dist/websocket.d.ts +63 -2
  88. package/dist/websocket.js +2 -1
  89. package/dist/websocket.js.map +1 -1
  90. package/package.json +15 -2
  91. package/dist/durable-DsV9PxZC.js.map +0 -1
  92. package/dist/reduced-state-TMi7ISla.js.map +0 -1
  93. package/dist/services/compaction.js.map +0 -1
  94. package/dist/session-state-C4m0j6CJ.js.map +0 -1
@@ -3,6 +3,43 @@ import * as Effect from "effect/Effect";
3
3
  import * as Schema from "effect/Schema";
4
4
 
5
5
  //#region src/types/events/durable.d.ts
6
+ /** Establishes a session's execution policy before its first run; not a model-switch operation. */
7
+ declare const sessionConfiguredEventType: "SessionConfigured";
8
+ declare const SessionConfiguredEvent: Schema.Struct<{
9
+ readonly namespace: Schema.Literal<string>;
10
+ readonly type: Schema.Literal<"SessionConfigured">;
11
+ readonly schemaVersion: Schema.Literal<number>;
12
+ readonly payload: Schema.Struct<{
13
+ readonly modelSelection: Schema.Struct<{
14
+ readonly provider: Schema.NonEmptyString;
15
+ readonly modelId: Schema.NonEmptyString;
16
+ readonly settings: Schema.optionalKey<Schema.Unknown>;
17
+ }>;
18
+ }>;
19
+ readonly durability: Schema.Literal<"durable">;
20
+ readonly eventId: Schema.brand<Schema.String, "EventId">;
21
+ readonly sessionId: Schema.brand<Schema.String, "SessionId">;
22
+ readonly correlationId: Schema.optionalKey<Schema.brand<Schema.String, "CorrelationId">>;
23
+ readonly createdAtMs: Schema.brand<Schema.Int, "UnixEpochMillis">;
24
+ readonly trace: Schema.withConstructorDefault<Schema.Struct<{
25
+ readonly span: Schema.Struct<{
26
+ readonly traceId: Schema.brand<Schema.String, "EDATraceId">;
27
+ readonly spanId: Schema.brand<Schema.String, "EDASpanId">;
28
+ readonly sampled: Schema.Boolean;
29
+ readonly tracestate: Schema.NullOr<Schema.String>;
30
+ }>;
31
+ readonly links: Schema.$Array<Schema.Struct<{
32
+ readonly context: Schema.Struct<{
33
+ readonly traceId: Schema.brand<Schema.String, "EDATraceId">;
34
+ readonly spanId: Schema.brand<Schema.String, "EDASpanId">;
35
+ readonly sampled: Schema.Boolean;
36
+ readonly tracestate: Schema.NullOr<Schema.String>;
37
+ }>;
38
+ readonly attributes: Schema.$Record<Schema.String, Schema.Union<readonly [Schema.String, Schema.Number, Schema.Boolean]>>;
39
+ }>>;
40
+ }>>;
41
+ }>;
42
+ type SessionConfiguredEvent = typeof SessionConfiguredEvent.Type;
6
43
  /** Event type values for durable command lifecycle events. */
7
44
  declare const commandAdmittedEventType: "CommandAdmitted";
8
45
  declare const commandStartedEventType: "CommandStarted";
@@ -2379,6 +2416,7 @@ declare const TurnCompletedPayload: Schema.Struct<{
2379
2416
  readonly usage: Schema.optionalKey<Schema.Struct<{
2380
2417
  readonly inputTokens: Schema.optionalKey<Schema.Int>;
2381
2418
  readonly cachedInputTokens: Schema.optionalKey<Schema.Int>;
2419
+ readonly cacheWriteInputTokens: Schema.optionalKey<Schema.Int>;
2382
2420
  readonly outputTokens: Schema.optionalKey<Schema.Int>;
2383
2421
  readonly textTokens: Schema.optionalKey<Schema.Int>;
2384
2422
  readonly reasoningTokens: Schema.optionalKey<Schema.Int>;
@@ -2395,6 +2433,7 @@ declare const TurnCompletedEvent: Schema.Struct<{
2395
2433
  readonly usage: Schema.optionalKey<Schema.Struct<{
2396
2434
  readonly inputTokens: Schema.optionalKey<Schema.Int>;
2397
2435
  readonly cachedInputTokens: Schema.optionalKey<Schema.Int>;
2436
+ readonly cacheWriteInputTokens: Schema.optionalKey<Schema.Int>;
2398
2437
  readonly outputTokens: Schema.optionalKey<Schema.Int>;
2399
2438
  readonly textTokens: Schema.optionalKey<Schema.Int>;
2400
2439
  readonly reasoningTokens: Schema.optionalKey<Schema.Int>;
@@ -2557,6 +2596,7 @@ declare const TurnEvent: Schema.Union<readonly [Schema.Struct<{
2557
2596
  readonly usage: Schema.optionalKey<Schema.Struct<{
2558
2597
  readonly inputTokens: Schema.optionalKey<Schema.Int>;
2559
2598
  readonly cachedInputTokens: Schema.optionalKey<Schema.Int>;
2599
+ readonly cacheWriteInputTokens: Schema.optionalKey<Schema.Int>;
2560
2600
  readonly outputTokens: Schema.optionalKey<Schema.Int>;
2561
2601
  readonly textTokens: Schema.optionalKey<Schema.Int>;
2562
2602
  readonly reasoningTokens: Schema.optionalKey<Schema.Int>;
@@ -2705,6 +2745,7 @@ declare const InferenceCompletedPayload: Schema.Struct<{
2705
2745
  readonly usage: Schema.optionalKey<Schema.Struct<{
2706
2746
  readonly inputTokens: Schema.optionalKey<Schema.Int>;
2707
2747
  readonly cachedInputTokens: Schema.optionalKey<Schema.Int>;
2748
+ readonly cacheWriteInputTokens: Schema.optionalKey<Schema.Int>;
2708
2749
  readonly outputTokens: Schema.optionalKey<Schema.Int>;
2709
2750
  readonly textTokens: Schema.optionalKey<Schema.Int>;
2710
2751
  readonly reasoningTokens: Schema.optionalKey<Schema.Int>;
@@ -2725,6 +2766,7 @@ declare const InferenceCompletedEvent: Schema.Struct<{
2725
2766
  readonly usage: Schema.optionalKey<Schema.Struct<{
2726
2767
  readonly inputTokens: Schema.optionalKey<Schema.Int>;
2727
2768
  readonly cachedInputTokens: Schema.optionalKey<Schema.Int>;
2769
+ readonly cacheWriteInputTokens: Schema.optionalKey<Schema.Int>;
2728
2770
  readonly outputTokens: Schema.optionalKey<Schema.Int>;
2729
2771
  readonly textTokens: Schema.optionalKey<Schema.Int>;
2730
2772
  readonly reasoningTokens: Schema.optionalKey<Schema.Int>;
@@ -2850,6 +2892,7 @@ declare const InferenceEvent: Schema.Union<readonly [Schema.Struct<{
2850
2892
  readonly usage: Schema.optionalKey<Schema.Struct<{
2851
2893
  readonly inputTokens: Schema.optionalKey<Schema.Int>;
2852
2894
  readonly cachedInputTokens: Schema.optionalKey<Schema.Int>;
2895
+ readonly cacheWriteInputTokens: Schema.optionalKey<Schema.Int>;
2853
2896
  readonly outputTokens: Schema.optionalKey<Schema.Int>;
2854
2897
  readonly textTokens: Schema.optionalKey<Schema.Int>;
2855
2898
  readonly reasoningTokens: Schema.optionalKey<Schema.Int>;
@@ -3787,6 +3830,19 @@ type SummaryCreatedEvent = typeof SummaryCreatedEvent.Type;
3787
3830
  /** Payload recorded when compaction completes. */
3788
3831
  declare const CompactionCompletedPayload: Schema.Struct<{
3789
3832
  readonly compactionId: Schema.brand<Schema.String, "CompactionId">;
3833
+ readonly modelSelection: Schema.optionalKey<Schema.Struct<{
3834
+ readonly provider: Schema.NonEmptyString;
3835
+ readonly modelId: Schema.NonEmptyString;
3836
+ readonly settings: Schema.optionalKey<Schema.Unknown>;
3837
+ }>>;
3838
+ readonly usage: Schema.optionalKey<Schema.Struct<{
3839
+ readonly inputTokens: Schema.optionalKey<Schema.Int>;
3840
+ readonly cachedInputTokens: Schema.optionalKey<Schema.Int>;
3841
+ readonly cacheWriteInputTokens: Schema.optionalKey<Schema.Int>;
3842
+ readonly outputTokens: Schema.optionalKey<Schema.Int>;
3843
+ readonly textTokens: Schema.optionalKey<Schema.Int>;
3844
+ readonly reasoningTokens: Schema.optionalKey<Schema.Int>;
3845
+ }>>;
3790
3846
  }>;
3791
3847
  type CompactionCompletedPayload = typeof CompactionCompletedPayload.Type;
3792
3848
  declare const CompactionCompletedEvent: Schema.Struct<{
@@ -3795,6 +3851,19 @@ declare const CompactionCompletedEvent: Schema.Struct<{
3795
3851
  readonly schemaVersion: Schema.Literal<number>;
3796
3852
  readonly payload: Schema.Struct<{
3797
3853
  readonly compactionId: Schema.brand<Schema.String, "CompactionId">;
3854
+ readonly modelSelection: Schema.optionalKey<Schema.Struct<{
3855
+ readonly provider: Schema.NonEmptyString;
3856
+ readonly modelId: Schema.NonEmptyString;
3857
+ readonly settings: Schema.optionalKey<Schema.Unknown>;
3858
+ }>>;
3859
+ readonly usage: Schema.optionalKey<Schema.Struct<{
3860
+ readonly inputTokens: Schema.optionalKey<Schema.Int>;
3861
+ readonly cachedInputTokens: Schema.optionalKey<Schema.Int>;
3862
+ readonly cacheWriteInputTokens: Schema.optionalKey<Schema.Int>;
3863
+ readonly outputTokens: Schema.optionalKey<Schema.Int>;
3864
+ readonly textTokens: Schema.optionalKey<Schema.Int>;
3865
+ readonly reasoningTokens: Schema.optionalKey<Schema.Int>;
3866
+ }>>;
3798
3867
  }>;
3799
3868
  readonly durability: Schema.Literal<"durable">;
3800
3869
  readonly eventId: Schema.brand<Schema.String, "EventId">;
@@ -3870,6 +3939,19 @@ declare const CompactionFailedPayload: Schema.Struct<{
3870
3939
  readonly code: Schema.optionalKey<Schema.String>;
3871
3940
  readonly details: Schema.optionalKey<Schema.Unknown>;
3872
3941
  }>;
3942
+ readonly modelSelection: Schema.optionalKey<Schema.Struct<{
3943
+ readonly provider: Schema.NonEmptyString;
3944
+ readonly modelId: Schema.NonEmptyString;
3945
+ readonly settings: Schema.optionalKey<Schema.Unknown>;
3946
+ }>>;
3947
+ readonly usage: Schema.optionalKey<Schema.Struct<{
3948
+ readonly inputTokens: Schema.optionalKey<Schema.Int>;
3949
+ readonly cachedInputTokens: Schema.optionalKey<Schema.Int>;
3950
+ readonly cacheWriteInputTokens: Schema.optionalKey<Schema.Int>;
3951
+ readonly outputTokens: Schema.optionalKey<Schema.Int>;
3952
+ readonly textTokens: Schema.optionalKey<Schema.Int>;
3953
+ readonly reasoningTokens: Schema.optionalKey<Schema.Int>;
3954
+ }>>;
3873
3955
  }>;
3874
3956
  type CompactionFailedPayload = typeof CompactionFailedPayload.Type;
3875
3957
  declare const CompactionFailedEvent: Schema.Struct<{
@@ -3883,6 +3965,19 @@ declare const CompactionFailedEvent: Schema.Struct<{
3883
3965
  readonly code: Schema.optionalKey<Schema.String>;
3884
3966
  readonly details: Schema.optionalKey<Schema.Unknown>;
3885
3967
  }>;
3968
+ readonly modelSelection: Schema.optionalKey<Schema.Struct<{
3969
+ readonly provider: Schema.NonEmptyString;
3970
+ readonly modelId: Schema.NonEmptyString;
3971
+ readonly settings: Schema.optionalKey<Schema.Unknown>;
3972
+ }>>;
3973
+ readonly usage: Schema.optionalKey<Schema.Struct<{
3974
+ readonly inputTokens: Schema.optionalKey<Schema.Int>;
3975
+ readonly cachedInputTokens: Schema.optionalKey<Schema.Int>;
3976
+ readonly cacheWriteInputTokens: Schema.optionalKey<Schema.Int>;
3977
+ readonly outputTokens: Schema.optionalKey<Schema.Int>;
3978
+ readonly textTokens: Schema.optionalKey<Schema.Int>;
3979
+ readonly reasoningTokens: Schema.optionalKey<Schema.Int>;
3980
+ }>>;
3886
3981
  }>;
3887
3982
  readonly durability: Schema.Literal<"durable">;
3888
3983
  readonly eventId: Schema.brand<Schema.String, "EventId">;
@@ -4038,6 +4133,19 @@ declare const ContextAndCompactionEvent: Schema.Union<readonly [Schema.Struct<{
4038
4133
  readonly schemaVersion: Schema.Literal<number>;
4039
4134
  readonly payload: Schema.Struct<{
4040
4135
  readonly compactionId: Schema.brand<Schema.String, "CompactionId">;
4136
+ readonly modelSelection: Schema.optionalKey<Schema.Struct<{
4137
+ readonly provider: Schema.NonEmptyString;
4138
+ readonly modelId: Schema.NonEmptyString;
4139
+ readonly settings: Schema.optionalKey<Schema.Unknown>;
4140
+ }>>;
4141
+ readonly usage: Schema.optionalKey<Schema.Struct<{
4142
+ readonly inputTokens: Schema.optionalKey<Schema.Int>;
4143
+ readonly cachedInputTokens: Schema.optionalKey<Schema.Int>;
4144
+ readonly cacheWriteInputTokens: Schema.optionalKey<Schema.Int>;
4145
+ readonly outputTokens: Schema.optionalKey<Schema.Int>;
4146
+ readonly textTokens: Schema.optionalKey<Schema.Int>;
4147
+ readonly reasoningTokens: Schema.optionalKey<Schema.Int>;
4148
+ }>>;
4041
4149
  }>;
4042
4150
  readonly durability: Schema.Literal<"durable">;
4043
4151
  readonly eventId: Schema.brand<Schema.String, "EventId">;
@@ -4104,6 +4212,19 @@ declare const ContextAndCompactionEvent: Schema.Union<readonly [Schema.Struct<{
4104
4212
  readonly code: Schema.optionalKey<Schema.String>;
4105
4213
  readonly details: Schema.optionalKey<Schema.Unknown>;
4106
4214
  }>;
4215
+ readonly modelSelection: Schema.optionalKey<Schema.Struct<{
4216
+ readonly provider: Schema.NonEmptyString;
4217
+ readonly modelId: Schema.NonEmptyString;
4218
+ readonly settings: Schema.optionalKey<Schema.Unknown>;
4219
+ }>>;
4220
+ readonly usage: Schema.optionalKey<Schema.Struct<{
4221
+ readonly inputTokens: Schema.optionalKey<Schema.Int>;
4222
+ readonly cachedInputTokens: Schema.optionalKey<Schema.Int>;
4223
+ readonly cacheWriteInputTokens: Schema.optionalKey<Schema.Int>;
4224
+ readonly outputTokens: Schema.optionalKey<Schema.Int>;
4225
+ readonly textTokens: Schema.optionalKey<Schema.Int>;
4226
+ readonly reasoningTokens: Schema.optionalKey<Schema.Int>;
4227
+ }>>;
4107
4228
  }>;
4108
4229
  readonly durability: Schema.Literal<"durable">;
4109
4230
  readonly eventId: Schema.brand<Schema.String, "EventId">;
@@ -4353,7 +4474,40 @@ declare const BaseStateEvent: Schema.Union<readonly [Schema.Struct<{
4353
4474
  }>]>;
4354
4475
  type BaseStateEvent = typeof BaseStateEvent.Type;
4355
4476
  /** Built-in durable event union for framework-owned session facts. */
4356
- declare const EDADurableEvent: Schema.Union<readonly [Schema.Union<readonly [Schema.Struct<{
4477
+ declare const EDADurableEvent: Schema.Union<readonly [Schema.Struct<{
4478
+ readonly namespace: Schema.Literal<string>;
4479
+ readonly type: Schema.Literal<"SessionConfigured">;
4480
+ readonly schemaVersion: Schema.Literal<number>;
4481
+ readonly payload: Schema.Struct<{
4482
+ readonly modelSelection: Schema.Struct<{
4483
+ readonly provider: Schema.NonEmptyString;
4484
+ readonly modelId: Schema.NonEmptyString;
4485
+ readonly settings: Schema.optionalKey<Schema.Unknown>;
4486
+ }>;
4487
+ }>;
4488
+ readonly durability: Schema.Literal<"durable">;
4489
+ readonly eventId: Schema.brand<Schema.String, "EventId">;
4490
+ readonly sessionId: Schema.brand<Schema.String, "SessionId">;
4491
+ readonly correlationId: Schema.optionalKey<Schema.brand<Schema.String, "CorrelationId">>;
4492
+ readonly createdAtMs: Schema.brand<Schema.Int, "UnixEpochMillis">;
4493
+ readonly trace: Schema.withConstructorDefault<Schema.Struct<{
4494
+ readonly span: Schema.Struct<{
4495
+ readonly traceId: Schema.brand<Schema.String, "EDATraceId">;
4496
+ readonly spanId: Schema.brand<Schema.String, "EDASpanId">;
4497
+ readonly sampled: Schema.Boolean;
4498
+ readonly tracestate: Schema.NullOr<Schema.String>;
4499
+ }>;
4500
+ readonly links: Schema.$Array<Schema.Struct<{
4501
+ readonly context: Schema.Struct<{
4502
+ readonly traceId: Schema.brand<Schema.String, "EDATraceId">;
4503
+ readonly spanId: Schema.brand<Schema.String, "EDASpanId">;
4504
+ readonly sampled: Schema.Boolean;
4505
+ readonly tracestate: Schema.NullOr<Schema.String>;
4506
+ }>;
4507
+ readonly attributes: Schema.$Record<Schema.String, Schema.Union<readonly [Schema.String, Schema.Number, Schema.Boolean]>>;
4508
+ }>>;
4509
+ }>>;
4510
+ }>, Schema.Union<readonly [Schema.Struct<{
4357
4511
  readonly namespace: Schema.Literal<string>;
4358
4512
  readonly type: Schema.Literal<"CommandAdmitted">;
4359
4513
  readonly schemaVersion: Schema.Literal<number>;
@@ -5275,6 +5429,7 @@ declare const EDADurableEvent: Schema.Union<readonly [Schema.Union<readonly [Sch
5275
5429
  readonly usage: Schema.optionalKey<Schema.Struct<{
5276
5430
  readonly inputTokens: Schema.optionalKey<Schema.Int>;
5277
5431
  readonly cachedInputTokens: Schema.optionalKey<Schema.Int>;
5432
+ readonly cacheWriteInputTokens: Schema.optionalKey<Schema.Int>;
5278
5433
  readonly outputTokens: Schema.optionalKey<Schema.Int>;
5279
5434
  readonly textTokens: Schema.optionalKey<Schema.Int>;
5280
5435
  readonly reasoningTokens: Schema.optionalKey<Schema.Int>;
@@ -5411,6 +5566,7 @@ declare const EDADurableEvent: Schema.Union<readonly [Schema.Union<readonly [Sch
5411
5566
  readonly usage: Schema.optionalKey<Schema.Struct<{
5412
5567
  readonly inputTokens: Schema.optionalKey<Schema.Int>;
5413
5568
  readonly cachedInputTokens: Schema.optionalKey<Schema.Int>;
5569
+ readonly cacheWriteInputTokens: Schema.optionalKey<Schema.Int>;
5414
5570
  readonly outputTokens: Schema.optionalKey<Schema.Int>;
5415
5571
  readonly textTokens: Schema.optionalKey<Schema.Int>;
5416
5572
  readonly reasoningTokens: Schema.optionalKey<Schema.Int>;
@@ -5868,6 +6024,19 @@ declare const EDADurableEvent: Schema.Union<readonly [Schema.Union<readonly [Sch
5868
6024
  readonly schemaVersion: Schema.Literal<number>;
5869
6025
  readonly payload: Schema.Struct<{
5870
6026
  readonly compactionId: Schema.brand<Schema.String, "CompactionId">;
6027
+ readonly modelSelection: Schema.optionalKey<Schema.Struct<{
6028
+ readonly provider: Schema.NonEmptyString;
6029
+ readonly modelId: Schema.NonEmptyString;
6030
+ readonly settings: Schema.optionalKey<Schema.Unknown>;
6031
+ }>>;
6032
+ readonly usage: Schema.optionalKey<Schema.Struct<{
6033
+ readonly inputTokens: Schema.optionalKey<Schema.Int>;
6034
+ readonly cachedInputTokens: Schema.optionalKey<Schema.Int>;
6035
+ readonly cacheWriteInputTokens: Schema.optionalKey<Schema.Int>;
6036
+ readonly outputTokens: Schema.optionalKey<Schema.Int>;
6037
+ readonly textTokens: Schema.optionalKey<Schema.Int>;
6038
+ readonly reasoningTokens: Schema.optionalKey<Schema.Int>;
6039
+ }>>;
5871
6040
  }>;
5872
6041
  readonly durability: Schema.Literal<"durable">;
5873
6042
  readonly eventId: Schema.brand<Schema.String, "EventId">;
@@ -5934,6 +6103,19 @@ declare const EDADurableEvent: Schema.Union<readonly [Schema.Union<readonly [Sch
5934
6103
  readonly code: Schema.optionalKey<Schema.String>;
5935
6104
  readonly details: Schema.optionalKey<Schema.Unknown>;
5936
6105
  }>;
6106
+ readonly modelSelection: Schema.optionalKey<Schema.Struct<{
6107
+ readonly provider: Schema.NonEmptyString;
6108
+ readonly modelId: Schema.NonEmptyString;
6109
+ readonly settings: Schema.optionalKey<Schema.Unknown>;
6110
+ }>>;
6111
+ readonly usage: Schema.optionalKey<Schema.Struct<{
6112
+ readonly inputTokens: Schema.optionalKey<Schema.Int>;
6113
+ readonly cachedInputTokens: Schema.optionalKey<Schema.Int>;
6114
+ readonly cacheWriteInputTokens: Schema.optionalKey<Schema.Int>;
6115
+ readonly outputTokens: Schema.optionalKey<Schema.Int>;
6116
+ readonly textTokens: Schema.optionalKey<Schema.Int>;
6117
+ readonly reasoningTokens: Schema.optionalKey<Schema.Int>;
6118
+ }>>;
5937
6119
  }>;
5938
6120
  readonly durability: Schema.Literal<"durable">;
5939
6121
  readonly eventId: Schema.brand<Schema.String, "EventId">;
@@ -6054,7 +6236,40 @@ declare const EDADurableEvent: Schema.Union<readonly [Schema.Union<readonly [Sch
6054
6236
  }>]>]>;
6055
6237
  type EDADurableEvent = typeof EDADurableEvent.Type;
6056
6238
  /** Current V1 framework durable event schema. Future versions route beside this alias. */
6057
- declare const EDADurableEventV1: Schema.Union<readonly [Schema.Union<readonly [Schema.Struct<{
6239
+ declare const EDADurableEventV1: Schema.Union<readonly [Schema.Struct<{
6240
+ readonly namespace: Schema.Literal<string>;
6241
+ readonly type: Schema.Literal<"SessionConfigured">;
6242
+ readonly schemaVersion: Schema.Literal<number>;
6243
+ readonly payload: Schema.Struct<{
6244
+ readonly modelSelection: Schema.Struct<{
6245
+ readonly provider: Schema.NonEmptyString;
6246
+ readonly modelId: Schema.NonEmptyString;
6247
+ readonly settings: Schema.optionalKey<Schema.Unknown>;
6248
+ }>;
6249
+ }>;
6250
+ readonly durability: Schema.Literal<"durable">;
6251
+ readonly eventId: Schema.brand<Schema.String, "EventId">;
6252
+ readonly sessionId: Schema.brand<Schema.String, "SessionId">;
6253
+ readonly correlationId: Schema.optionalKey<Schema.brand<Schema.String, "CorrelationId">>;
6254
+ readonly createdAtMs: Schema.brand<Schema.Int, "UnixEpochMillis">;
6255
+ readonly trace: Schema.withConstructorDefault<Schema.Struct<{
6256
+ readonly span: Schema.Struct<{
6257
+ readonly traceId: Schema.brand<Schema.String, "EDATraceId">;
6258
+ readonly spanId: Schema.brand<Schema.String, "EDASpanId">;
6259
+ readonly sampled: Schema.Boolean;
6260
+ readonly tracestate: Schema.NullOr<Schema.String>;
6261
+ }>;
6262
+ readonly links: Schema.$Array<Schema.Struct<{
6263
+ readonly context: Schema.Struct<{
6264
+ readonly traceId: Schema.brand<Schema.String, "EDATraceId">;
6265
+ readonly spanId: Schema.brand<Schema.String, "EDASpanId">;
6266
+ readonly sampled: Schema.Boolean;
6267
+ readonly tracestate: Schema.NullOr<Schema.String>;
6268
+ }>;
6269
+ readonly attributes: Schema.$Record<Schema.String, Schema.Union<readonly [Schema.String, Schema.Number, Schema.Boolean]>>;
6270
+ }>>;
6271
+ }>>;
6272
+ }>, Schema.Union<readonly [Schema.Struct<{
6058
6273
  readonly namespace: Schema.Literal<string>;
6059
6274
  readonly type: Schema.Literal<"CommandAdmitted">;
6060
6275
  readonly schemaVersion: Schema.Literal<number>;
@@ -6976,6 +7191,7 @@ declare const EDADurableEventV1: Schema.Union<readonly [Schema.Union<readonly [S
6976
7191
  readonly usage: Schema.optionalKey<Schema.Struct<{
6977
7192
  readonly inputTokens: Schema.optionalKey<Schema.Int>;
6978
7193
  readonly cachedInputTokens: Schema.optionalKey<Schema.Int>;
7194
+ readonly cacheWriteInputTokens: Schema.optionalKey<Schema.Int>;
6979
7195
  readonly outputTokens: Schema.optionalKey<Schema.Int>;
6980
7196
  readonly textTokens: Schema.optionalKey<Schema.Int>;
6981
7197
  readonly reasoningTokens: Schema.optionalKey<Schema.Int>;
@@ -7112,6 +7328,7 @@ declare const EDADurableEventV1: Schema.Union<readonly [Schema.Union<readonly [S
7112
7328
  readonly usage: Schema.optionalKey<Schema.Struct<{
7113
7329
  readonly inputTokens: Schema.optionalKey<Schema.Int>;
7114
7330
  readonly cachedInputTokens: Schema.optionalKey<Schema.Int>;
7331
+ readonly cacheWriteInputTokens: Schema.optionalKey<Schema.Int>;
7115
7332
  readonly outputTokens: Schema.optionalKey<Schema.Int>;
7116
7333
  readonly textTokens: Schema.optionalKey<Schema.Int>;
7117
7334
  readonly reasoningTokens: Schema.optionalKey<Schema.Int>;
@@ -7569,6 +7786,19 @@ declare const EDADurableEventV1: Schema.Union<readonly [Schema.Union<readonly [S
7569
7786
  readonly schemaVersion: Schema.Literal<number>;
7570
7787
  readonly payload: Schema.Struct<{
7571
7788
  readonly compactionId: Schema.brand<Schema.String, "CompactionId">;
7789
+ readonly modelSelection: Schema.optionalKey<Schema.Struct<{
7790
+ readonly provider: Schema.NonEmptyString;
7791
+ readonly modelId: Schema.NonEmptyString;
7792
+ readonly settings: Schema.optionalKey<Schema.Unknown>;
7793
+ }>>;
7794
+ readonly usage: Schema.optionalKey<Schema.Struct<{
7795
+ readonly inputTokens: Schema.optionalKey<Schema.Int>;
7796
+ readonly cachedInputTokens: Schema.optionalKey<Schema.Int>;
7797
+ readonly cacheWriteInputTokens: Schema.optionalKey<Schema.Int>;
7798
+ readonly outputTokens: Schema.optionalKey<Schema.Int>;
7799
+ readonly textTokens: Schema.optionalKey<Schema.Int>;
7800
+ readonly reasoningTokens: Schema.optionalKey<Schema.Int>;
7801
+ }>>;
7572
7802
  }>;
7573
7803
  readonly durability: Schema.Literal<"durable">;
7574
7804
  readonly eventId: Schema.brand<Schema.String, "EventId">;
@@ -7635,6 +7865,19 @@ declare const EDADurableEventV1: Schema.Union<readonly [Schema.Union<readonly [S
7635
7865
  readonly code: Schema.optionalKey<Schema.String>;
7636
7866
  readonly details: Schema.optionalKey<Schema.Unknown>;
7637
7867
  }>;
7868
+ readonly modelSelection: Schema.optionalKey<Schema.Struct<{
7869
+ readonly provider: Schema.NonEmptyString;
7870
+ readonly modelId: Schema.NonEmptyString;
7871
+ readonly settings: Schema.optionalKey<Schema.Unknown>;
7872
+ }>>;
7873
+ readonly usage: Schema.optionalKey<Schema.Struct<{
7874
+ readonly inputTokens: Schema.optionalKey<Schema.Int>;
7875
+ readonly cachedInputTokens: Schema.optionalKey<Schema.Int>;
7876
+ readonly cacheWriteInputTokens: Schema.optionalKey<Schema.Int>;
7877
+ readonly outputTokens: Schema.optionalKey<Schema.Int>;
7878
+ readonly textTokens: Schema.optionalKey<Schema.Int>;
7879
+ readonly reasoningTokens: Schema.optionalKey<Schema.Int>;
7880
+ }>>;
7638
7881
  }>;
7639
7882
  readonly durability: Schema.Literal<"durable">;
7640
7883
  readonly eventId: Schema.brand<Schema.String, "EventId">;
@@ -7759,5 +8002,5 @@ declare const decodeUnknownEDADurableEventSync: (input: unknown) => EDADurableEv
7759
8002
  /** Effectful V1+ router for untrusted framework-owned durable event boundaries. */
7760
8003
  declare const decodeUnknownEDADurableEvent: (input: unknown) => Effect.Effect<EDADurableEvent, unknown>;
7761
8004
  //#endregion
7762
- export { PendingMessagesPausedEvent as $, turnStoppedEventType as $n, TurnStoppedPayload as $t, CompactionFailedEvent as A, inferenceFailedEventType as An, ToolCallCreatedPayload as At, ContextRebasedPayload as B, steeringMessageQueuedEventType as Bn, ToolCallStartedPayload as Bt, CommandEvent as C, compactionRequestedEventType as Cn, SummaryCreatedEvent as Ct, CommandStartedPayload as D, decodeUnknownEDADurableEvent as Dn, ToolCallCompletedEvent as Dt, CommandStartedEvent as E, contextRebasedEventType as En, SystemMessageCommittedPayload as Et, CompactionStartedPayload as F, runCompletedEventType as Fn, ToolCallRejectedEvent as Ft, InferenceEvent as G, toolCallCompletedEventType as Gn, TurnCompletedEvent as Gt, EDADurableEventV1 as H, stopTurnRequestedEventType as Hn, ToolPromptPart as Ht, ContextAndCompactionEvent as I, runFailedEventType as In, ToolCallRejectedPayload as It, InferenceStartedEvent as J, toolCallRejectedEventType as Jn, TurnFailedEvent as Jt, InferenceFailedEvent as K, toolCallCreatedEventType as Kn, TurnCompletedPayload as Kt, ContextProjectedEvent as L, runInterruptedEventType as Ln, ToolCallRejectionFeedback as Lt, CompactionRequestedEvent as M, messageQueuePausedEventType as Mn, ToolCallFailedEvent as Mt, CompactionRequestedPayload as N, pendingMessagesPausedEventType as Nn, ToolCallFailedPayload as Nt, CompactionCompletedEvent as O, decodeUnknownEDADurableEventSync as On, ToolCallCompletedPayload as Ot, CompactionStartedEvent as P, recoveryCompletedEventType as Pn, ToolCallPromptPart as Pt, MessageQueuePausedPayload as Q, turnStartedEventType as Qn, TurnStoppedEvent as Qt, ContextProjectedPayload as R, runStartedEventType as Rn, ToolCallRejectionReason as Rt, CommandCompletedPayload as S, compactionFailedEventType as Sn, StopTurnRequestedPayload as St, CommandFailedPayload as T, contextProjectedEventType as Tn, SystemMessageCommittedEvent as Tt, InferenceCompletedEvent as U, summaryCreatedEventType as Un, ToolRejectionPromptPart as Ut, EDADurableEvent as V, stopTurnAppliedEventType as Vn, ToolFailurePromptPart as Vt, InferenceCompletedPayload as W, systemMessageCommittedEventType as Wn, ToolSuccessPromptPart as Wt, MessageEvent as X, turnCompletedEventType as Xn, TurnStartedEvent as Xt, InferenceStartedPayload as Y, toolCallStartedEventType as Yn, TurnFailedPayload as Yt, MessageQueuePausedEvent as Z, turnFailedEventType as Zn, TurnStartedPayload as Zt, CommandAdmittedEvent as _, commandCancelledEventType as _n, SteeringMessageQueuedPayload as _t, AssistantMessageImportedPayload as a, UserMessageDisposition as an, RunCompletedEvent as at, CommandCancelledPayload as b, commandStartedEventType as bn, StopTurnAppliedPayload as bt, AssistantPromptPart as c, UserMessageSubmittedEvent as cn, RunFailedEvent as ct, BaseStateCreatedPayload as d, assistantMessageImportedEventType as dn, RunInterruptedPayload as dt, UserMessageCancellationReason as en, userMessageCancelledEventType as er, PendingMessagesPausedPayload as et, BaseStateEvent as f, assistantPartialCommittedEventType as fn, RunStartedEvent as ft, BaseStateRequestedPayload as g, commandAdmittedEventType as gn, SteeringMessageQueuedEvent as gt, BaseStateRequestedEvent as h, baseStateRequestedEventType as hn, SteeringMessageCancelledPayload as ht, AssistantMessageImportedEvent as i, UserMessageCommittedPayload as in, RecoveryEvent as it, CompactionFailedPayload as j, inferenceStartedEventType as jn, ToolCallEvent as jt, CompactionCompletedPayload as k, inferenceCompletedEventType as kn, ToolCallCreatedEvent as kt, AssistantPromptParts as l, UserMessageSubmittedPayload as ln, RunFailedPayload as lt, BaseStateFailedPayload as m, baseStateFailedEventType as mn, SteeringMessageCancelledEvent as mt, AssistantMessageCommittedPayload as n, UserMessageCancelledPayload as nn, userMessagePromotedEventType as nr, RecoveryCompletedPayload as nt, AssistantPartialCommittedEvent as o, UserMessagePromotedEvent as on, RunCompletedPayload as ot, BaseStateFailedEvent as p, baseStateCreatedEventType as pn, RunStartedPayload as pt, InferenceFailedPayload as q, toolCallFailedEventType as qn, TurnEvent as qt, AssistantMessageContent as r, UserMessageCommittedEvent as rn, userMessageSubmittedEventType as rr, RecoveryContinuation as rt, AssistantPartialCommittedPayload as s, UserMessagePromotedPayload as sn, RunEvent as st, AssistantMessageCommittedEvent as t, UserMessageCancelledEvent as tn, userMessageCommittedEventType as tr, RecoveryCompletedEvent as tt, BaseStateCreatedEvent as u, assistantMessageCommittedEventType as un, RunInterruptedEvent as ut, CommandAdmittedPayload as v, commandCompletedEventType as vn, StopControlEvent as vt, CommandFailedEvent as w, compactionStartedEventType as wn, SummaryCreatedPayload as wt, CommandCompletedEvent as x, compactionCompletedEventType as xn, StopTurnRequestedEvent as xt, CommandCancelledEvent as y, commandFailedEventType as yn, StopTurnAppliedEvent as yt, ContextRebasedEvent as z, steeringMessageCancelledEventType as zn, ToolCallStartedEvent as zt };
7763
- //# sourceMappingURL=durable-B7M6TD_0.d.ts.map
8005
+ export { PendingMessagesPausedEvent as $, turnFailedEventType as $n, TurnStoppedEvent as $t, CompactionFailedEvent as A, inferenceCompletedEventType as An, ToolCallCreatedEvent as At, ContextRebasedPayload as B, sessionConfiguredEventType as Bn, ToolCallStartedEvent as Bt, CommandEvent as C, compactionFailedEventType as Cn, StopTurnRequestedPayload as Ct, CommandStartedPayload as D, contextRebasedEventType as Dn, SystemMessageCommittedPayload as Dt, CommandStartedEvent as E, contextProjectedEventType as En, SystemMessageCommittedEvent as Et, CompactionStartedPayload as F, recoveryCompletedEventType as Fn, ToolCallPromptPart as Ft, InferenceEvent as G, summaryCreatedEventType as Gn, ToolSuccessPromptPart as Gt, EDADurableEventV1 as H, steeringMessageQueuedEventType as Hn, ToolFailurePromptPart as Ht, ContextAndCompactionEvent as I, runCompletedEventType as In, ToolCallRejectedEvent as It, InferenceStartedEvent as J, toolCallCreatedEventType as Jn, TurnEvent as Jt, InferenceFailedEvent as K, systemMessageCommittedEventType as Kn, TurnCompletedEvent as Kt, ContextProjectedEvent as L, runFailedEventType as Ln, ToolCallRejectedPayload as Lt, CompactionRequestedEvent as M, inferenceStartedEventType as Mn, ToolCallEvent as Mt, CompactionRequestedPayload as N, messageQueuePausedEventType as Nn, ToolCallFailedEvent as Nt, CompactionCompletedEvent as O, decodeUnknownEDADurableEvent as On, ToolCallCompletedEvent as Ot, CompactionStartedEvent as P, pendingMessagesPausedEventType as Pn, ToolCallFailedPayload as Pt, MessageQueuePausedPayload as Q, turnCompletedEventType as Qn, TurnStartedPayload as Qt, ContextProjectedPayload as R, runInterruptedEventType as Rn, ToolCallRejectionFeedback as Rt, CommandCompletedPayload as S, compactionCompletedEventType as Sn, StopTurnRequestedEvent as St, CommandFailedPayload as T, compactionStartedEventType as Tn, SummaryCreatedPayload as Tt, InferenceCompletedEvent as U, stopTurnAppliedEventType as Un, ToolPromptPart as Ut, EDADurableEvent as V, steeringMessageCancelledEventType as Vn, ToolCallStartedPayload as Vt, InferenceCompletedPayload as W, stopTurnRequestedEventType as Wn, ToolRejectionPromptPart as Wt, MessageEvent as X, toolCallRejectedEventType as Xn, TurnFailedPayload as Xt, InferenceStartedPayload as Y, toolCallFailedEventType as Yn, TurnFailedEvent as Yt, MessageQueuePausedEvent as Z, toolCallStartedEventType as Zn, TurnStartedEvent as Zt, CommandAdmittedEvent as _, commandAdmittedEventType as _n, SteeringMessageQueuedEvent as _t, AssistantMessageImportedPayload as a, UserMessageCommittedPayload as an, userMessageSubmittedEventType as ar, RunCompletedEvent as at, CommandCancelledPayload as b, commandFailedEventType as bn, StopTurnAppliedEvent as bt, AssistantPromptPart as c, UserMessagePromotedPayload as cn, RunFailedEvent as ct, BaseStateCreatedPayload as d, assistantMessageCommittedEventType as dn, RunInterruptedPayload as dt, TurnStoppedPayload as en, turnStartedEventType as er, PendingMessagesPausedPayload as et, BaseStateEvent as f, assistantMessageImportedEventType as fn, RunStartedEvent as ft, BaseStateRequestedPayload as g, baseStateRequestedEventType as gn, SteeringMessageCancelledPayload as gt, BaseStateRequestedEvent as h, baseStateFailedEventType as hn, SteeringMessageCancelledEvent as ht, AssistantMessageImportedEvent as i, UserMessageCommittedEvent as in, userMessagePromotedEventType as ir, RecoveryEvent as it, CompactionFailedPayload as j, inferenceFailedEventType as jn, ToolCallCreatedPayload as jt, CompactionCompletedPayload as k, decodeUnknownEDADurableEventSync as kn, ToolCallCompletedPayload as kt, AssistantPromptParts as l, UserMessageSubmittedEvent as ln, RunFailedPayload as lt, BaseStateFailedPayload as m, baseStateCreatedEventType as mn, SessionConfiguredEvent as mt, AssistantMessageCommittedPayload as n, UserMessageCancelledEvent as nn, userMessageCancelledEventType as nr, RecoveryCompletedPayload as nt, AssistantPartialCommittedEvent as o, UserMessageDisposition as on, RunCompletedPayload as ot, BaseStateFailedEvent as p, assistantPartialCommittedEventType as pn, RunStartedPayload as pt, InferenceFailedPayload as q, toolCallCompletedEventType as qn, TurnCompletedPayload as qt, AssistantMessageContent as r, UserMessageCancelledPayload as rn, userMessageCommittedEventType as rr, RecoveryContinuation as rt, AssistantPartialCommittedPayload as s, UserMessagePromotedEvent as sn, RunEvent as st, AssistantMessageCommittedEvent as t, UserMessageCancellationReason as tn, turnStoppedEventType as tr, RecoveryCompletedEvent as tt, BaseStateCreatedEvent as u, UserMessageSubmittedPayload as un, RunInterruptedEvent as ut, CommandAdmittedPayload as v, commandCancelledEventType as vn, SteeringMessageQueuedPayload as vt, CommandFailedEvent as w, compactionRequestedEventType as wn, SummaryCreatedEvent as wt, CommandCompletedEvent as x, commandStartedEventType as xn, StopTurnAppliedPayload as xt, CommandCancelledEvent as y, commandCompletedEventType as yn, StopControlEvent as yt, ContextRebasedEvent as z, runStartedEventType as zn, ToolCallRejectionReason as zt };
8006
+ //# sourceMappingURL=durable-br2C1bWK.d.ts.map
@@ -0,0 +1,191 @@
1
+ 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 cacheWriteInputTokens: Schema.optionalKey<Schema.Int>;
174
+ readonly outputTokens: Schema.optionalKey<Schema.Int>;
175
+ readonly textTokens: Schema.optionalKey<Schema.Int>;
176
+ readonly reasoningTokens: Schema.optionalKey<Schema.Int>;
177
+ }>;
178
+ type UsagePayload = typeof UsagePayload.Type;
179
+ /** Intended provider/model selection known before a model request starts. */
180
+ declare const ModelSelectionPayload: Schema.Struct<{
181
+ readonly provider: Schema.NonEmptyString;
182
+ readonly modelId: Schema.NonEmptyString;
183
+ readonly settings: Schema.optionalKey<Schema.Unknown>;
184
+ }>;
185
+ type ModelSelectionPayload = typeof ModelSelectionPayload.Type;
186
+ /** App-owned instructions inserted into model context as a system message. */
187
+ declare const SystemPromptText: Schema.NonEmptyString;
188
+ type SystemPromptText = typeof SystemPromptText.Type;
189
+ //#endregion
190
+ export { UsagePayload as _, EventNamespace as a, schemaV1 as b, FailurePayload as c, PositionedEvent as d, ProviderPartId as f, UnixEpochMillis as g, ToolName as h, EventEnvelope as i, ModelSelectionPayload as l, SystemPromptText as m, EphemeralEventEnvelope as n, EventType as o, SchemaVersion as p, EventDurability as r, EventTypeName as s, DurableEventEnvelope as t, NonNegativeInt as u, effectDurableAgentNamespace as v, makeEventType as y };
191
+ //# sourceMappingURL=envelope-DkZyMIgp.d.ts.map