@yielded/agent 0.1.0-beta.173 → 0.1.0-beta.175

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 (266) hide show
  1. package/dist/{Admin-BX9ns28E.d.mts → Admin-Qa3I1oA5.d.mts} +61 -21
  2. package/dist/{Agent-9aBoIi74.d.mts → Agent-B39jRnFv.d.mts} +2 -2
  3. package/dist/{Agent-0WvBWWbM.mjs → Agent-BiRbr73L.mjs} +7 -6
  4. package/dist/Agent-BiRbr73L.mjs.map +1 -0
  5. package/dist/{AgentRuntime-BfP14534.d.mts → AgentRuntime-CHDyRbSf.d.mts} +12 -12
  6. package/dist/{AgentRuntime-CQ-qcETl.mjs → AgentRuntime-DaDKMasp.mjs} +290 -273
  7. package/dist/AgentRuntime-DaDKMasp.mjs.map +1 -0
  8. package/dist/{Digest-DCuPlhNk.mjs → Digest-C3EODOee.mjs} +42 -15
  9. package/dist/Digest-C3EODOee.mjs.map +1 -0
  10. package/dist/{DurableAgentRuntime-BAmSkWYr.mjs → DurableAgentRuntime-CPlw5_7e.mjs} +1557 -1458
  11. package/dist/DurableAgentRuntime-CPlw5_7e.mjs.map +1 -0
  12. package/dist/{EventSource-BwliwQz9.d.mts → EventSource-BTu68yDW.d.mts} +2 -2
  13. package/dist/InMemory.d.mts +2 -2
  14. package/dist/{MessageDelivery-B943ebI_.d.mts → MessageDelivery-DjAZJ4Fd.d.mts} +42 -42
  15. package/dist/{Messaging-C_6OOg_s.d.mts → Messaging-SVu6rWV8.d.mts} +12 -6
  16. package/dist/{MessagingHost-B8oKM7AC.d.mts → MessagingHost-C6SOAcoG.d.mts} +2 -2
  17. package/dist/{MessagingHost-CRUK4JBi.mjs → MessagingHost-CZCyrnvJ.mjs} +27 -26
  18. package/dist/MessagingHost-CZCyrnvJ.mjs.map +1 -0
  19. package/dist/{Output-Dsx6k52t.d.mts → Output-CRamN1Fy.d.mts} +2 -2
  20. package/dist/{PreparedInputAdmission-CxSJSiTl.d.mts → PreparedInputAdmission-wgY4JMZY.d.mts} +3 -3
  21. package/dist/{Records-BiuJDWNe.mjs → Records-DzL4Kbtw.mjs} +2 -2
  22. package/dist/{Records-BiuJDWNe.mjs.map → Records-DzL4Kbtw.mjs.map} +1 -1
  23. package/dist/{RunContinuation-FHM7XPjq.d.mts → RunContinuation-3jB5pULC.d.mts} +13 -7
  24. package/dist/{RunContinuation-DHYNAQFi.mjs → RunContinuation-BiyKJK32.mjs} +173 -82
  25. package/dist/RunContinuation-BiyKJK32.mjs.map +1 -0
  26. package/dist/{RunJournal-kfKVxJj7.mjs → RunJournal-CPMKcfd0.mjs} +106 -73
  27. package/dist/RunJournal-CPMKcfd0.mjs.map +1 -0
  28. package/dist/{RunOptions-D8zxFIrZ.d.mts → RunOptions-Be77lKVZ.d.mts} +2 -2
  29. package/dist/{RunStorage-uqPxps09.mjs → RunStorage-CzutHJBE.mjs} +10 -6
  30. package/dist/RunStorage-CzutHJBE.mjs.map +1 -0
  31. package/dist/{Scheduling-CVyfXlBR.mjs → Scheduling-07_dsGED.mjs} +12 -12
  32. package/dist/Scheduling-07_dsGED.mjs.map +1 -0
  33. package/dist/{Subagent-vpffemql.mjs → Subagent-CexndZSp.mjs} +53 -40
  34. package/dist/Subagent-CexndZSp.mjs.map +1 -0
  35. package/dist/{Subagent-E6tvd7-k.d.mts → Subagent-xhN_aD1r.d.mts} +20 -9
  36. package/dist/{SubagentHost-B6w2m-SI.d.mts → SubagentHost-D1xBgn9g.d.mts} +2 -2
  37. package/dist/{Subscription-DONig54Q.d.mts → Subscription-DmIHlOJK.d.mts} +2 -2
  38. package/dist/{SubscriptionInput-mJIRxWJM.d.mts → SubscriptionInput-DgcQhvbe.d.mts} +2 -2
  39. package/dist/{Thread-dk-QiNml.d.mts → Thread-DzdJAY4J.d.mts} +4 -3
  40. package/dist/{ThreadHistory-ByxS8HU1.d.mts → ThreadHistory-KPPBJLJb.d.mts} +12 -2
  41. package/dist/{ThreadImport-DckUMEqJ.mjs → ThreadImport-CjlG57vH.mjs} +9 -9
  42. package/dist/ThreadImport-CjlG57vH.mjs.map +1 -0
  43. package/dist/{ThreadImport-DpHxjBrA.d.mts → ThreadImport-DP-vOk2F.d.mts} +5 -5
  44. package/dist/{ThreadStore-CEekRa80.mjs → ThreadStore-EuUilthA.mjs} +162 -85
  45. package/dist/ThreadStore-EuUilthA.mjs.map +1 -0
  46. package/dist/{ThreadTransfer-B4gTQLIl.mjs → ThreadTransfer-DB_zsrtJ.mjs} +4 -4
  47. package/dist/{ThreadTransfer-B4gTQLIl.mjs.map → ThreadTransfer-DB_zsrtJ.mjs.map} +1 -1
  48. package/dist/{WorkerAdmission-DFVbbVh2.mjs → WorkerAdmission-eBeXt_mu.mjs} +5 -5
  49. package/dist/{WorkerAdmission-DFVbbVh2.mjs.map → WorkerAdmission-eBeXt_mu.mjs.map} +1 -1
  50. package/dist/{agent-registration-ByMZ_cK5.mjs → agent-registration-a6QYaG3h.mjs} +70 -57
  51. package/dist/agent-registration-a6QYaG3h.mjs.map +1 -0
  52. package/dist/capabilities/Approval.mjs +2 -2
  53. package/dist/capabilities/Approval.mjs.map +1 -1
  54. package/dist/capabilities/BrowserUse.d.mts +102 -1867
  55. package/dist/capabilities/BrowserUse.mjs +74 -798
  56. package/dist/capabilities/BrowserUse.mjs.map +1 -1
  57. package/dist/capabilities/Budget.mjs +3 -1
  58. package/dist/capabilities/Budget.mjs.map +1 -1
  59. package/dist/capabilities/CodeMode.d.mts +1 -1
  60. package/dist/capabilities/CodeMode.mjs +16 -9
  61. package/dist/capabilities/CodeMode.mjs.map +1 -1
  62. package/dist/capabilities/Commands.d.mts +1 -1
  63. package/dist/capabilities/McpClient.mjs +1 -1
  64. package/dist/capabilities/McpClient.mjs.map +1 -1
  65. package/dist/capabilities/Messaging.d.mts +1 -1
  66. package/dist/capabilities/Messaging.mjs +5 -5
  67. package/dist/capabilities/Messaging.mjs.map +1 -1
  68. package/dist/capabilities/ModelContext.d.mts +1 -1
  69. package/dist/capabilities/ModelContext.mjs +7 -5
  70. package/dist/capabilities/ModelContext.mjs.map +1 -1
  71. package/dist/capabilities/Redaction.mjs +49 -19
  72. package/dist/capabilities/Redaction.mjs.map +1 -1
  73. package/dist/capabilities/RunHooks.d.mts +2 -2
  74. package/dist/capabilities/RunHooks.mjs +1 -1
  75. package/dist/capabilities/RunHooks.mjs.map +1 -1
  76. package/dist/capabilities/Subagent.d.mts +1 -1
  77. package/dist/capabilities/Subagent.mjs +1 -1
  78. package/dist/capabilities/SubagentReservations.mjs +3 -1
  79. package/dist/capabilities/SubagentReservations.mjs.map +1 -1
  80. package/dist/capabilities/WebCapture.mjs.map +1 -1
  81. package/dist/capabilities/WebSearch.mjs +7 -7
  82. package/dist/capabilities/WebSearch.mjs.map +1 -1
  83. package/dist/core/Agent.d.mts +1 -1
  84. package/dist/core/Agent.mjs +1 -1
  85. package/dist/core/AgentUpdates.mjs +8 -8
  86. package/dist/core/AgentUpdates.mjs.map +1 -1
  87. package/dist/core/Thread.d.mts +2 -2
  88. package/dist/core/Thread.mjs +6 -4
  89. package/dist/core/Thread.mjs.map +1 -1
  90. package/dist/core/Usage.mjs +2 -2
  91. package/dist/core/Usage.mjs.map +1 -1
  92. package/dist/durable/ActivityStore.mjs +1 -1
  93. package/dist/durable/Admin.d.mts +1 -1
  94. package/dist/durable/Admin.mjs +1 -1
  95. package/dist/durable/AgentRegistration.d.mts +1 -1
  96. package/dist/durable/AgentRegistration.mjs +1 -1
  97. package/dist/durable/Certification.d.mts +1 -1
  98. package/dist/durable/CommittedActivity.d.mts +1 -1
  99. package/dist/durable/CommittedActivity.mjs +3 -3
  100. package/dist/durable/Digest.mjs +1 -1
  101. package/dist/durable/DurableAgentRuntime.d.mts +1 -1
  102. package/dist/durable/DurableAgentRuntime.mjs +2 -2
  103. package/dist/durable/EventSource.d.mts +1 -1
  104. package/dist/durable/EventSource.mjs +7 -7
  105. package/dist/durable/EventSource.mjs.map +1 -1
  106. package/dist/durable/GitHubWorkflowSource.d.mts +3 -3
  107. package/dist/durable/LifecyclePublication.d.mts +1 -1
  108. package/dist/durable/LifecyclePublication.mjs +2 -2
  109. package/dist/durable/MessageDelivery.d.mts +1 -1
  110. package/dist/durable/MessageDelivery.mjs +2 -2
  111. package/dist/durable/MessageDeliveryStoreConformance.d.mts +40 -40
  112. package/dist/durable/MessageDeliveryStoreConformance.mjs +2 -2
  113. package/dist/durable/PersistentHistory.d.mts +2 -2
  114. package/dist/durable/PersistentHistory.mjs +4 -4
  115. package/dist/durable/PreparedInputAdmission.d.mts +1 -1
  116. package/dist/durable/RecordFormat.mjs +3 -3
  117. package/dist/durable/RecordFormat.mjs.map +1 -1
  118. package/dist/durable/Records.mjs +1 -1
  119. package/dist/durable/Recovery.d.mts +1 -1
  120. package/dist/durable/Recovery.mjs +1 -1
  121. package/dist/durable/RunContinuation.d.mts +2 -2
  122. package/dist/durable/RunContinuation.mjs +3 -3
  123. package/dist/durable/RunJournal.d.mts +2 -2
  124. package/dist/durable/RunJournal.mjs +2 -2
  125. package/dist/durable/RunStorage.d.mts +1 -1
  126. package/dist/durable/RunStorage.mjs +1 -1
  127. package/dist/durable/Schedule.mjs +1 -1
  128. package/dist/durable/ScheduleStoreConformance.mjs +1 -1
  129. package/dist/durable/ScheduleTransition.mjs +1 -1
  130. package/dist/durable/Scheduling.d.mts +1 -1
  131. package/dist/durable/Scheduling.mjs +1 -1
  132. package/dist/durable/SettlementPublisher.d.mts +1 -1
  133. package/dist/durable/SettlementPublisher.mjs +3 -3
  134. package/dist/durable/SqlMemoryStore.mjs +5 -3
  135. package/dist/durable/SqlMemoryStore.mjs.map +1 -1
  136. package/dist/durable/SubmissionLedger.d.mts +1 -1
  137. package/dist/durable/SubmissionLedger.mjs +11 -3
  138. package/dist/durable/SubmissionLedger.mjs.map +1 -1
  139. package/dist/durable/SubmissionLedgerConformance.d.mts +1 -1
  140. package/dist/durable/SubmissionLedgerConformance.mjs +6 -6
  141. package/dist/durable/SubmissionStatus.d.mts +1 -1
  142. package/dist/durable/Subscription.d.mts +1 -1
  143. package/dist/durable/Subscription.mjs +2 -2
  144. package/dist/durable/SubscriptionInput.d.mts +1 -1
  145. package/dist/durable/SubscriptionInput.mjs +4 -4
  146. package/dist/durable/SubscriptionInput.mjs.map +1 -1
  147. package/dist/durable/SubscriptionStoreConformance.d.mts +1 -1
  148. package/dist/durable/SubscriptionStoreConformance.mjs +3 -3
  149. package/dist/durable/SubscriptionStoreConformance.mjs.map +1 -1
  150. package/dist/durable/SubscriptionTools.d.mts +2 -2
  151. package/dist/durable/SubscriptionTransition.d.mts +1 -1
  152. package/dist/durable/SubscriptionTransition.mjs +1 -1
  153. package/dist/durable/Subscriptions.d.mts +5 -5
  154. package/dist/durable/Subscriptions.mjs +3 -3
  155. package/dist/durable/Subscriptions.mjs.map +1 -1
  156. package/dist/durable/ThreadArchiveRange.d.mts +1 -1
  157. package/dist/durable/ThreadArchiveRange.mjs +1 -1
  158. package/dist/durable/ThreadContextHistory.d.mts +1 -1
  159. package/dist/durable/ThreadContextHistory.mjs +2 -2
  160. package/dist/durable/ThreadContextHistoryProjection.mjs +1 -1
  161. package/dist/durable/ThreadImport.d.mts +1 -1
  162. package/dist/durable/ThreadImport.mjs +1 -1
  163. package/dist/durable/ThreadInvariants.d.mts +3 -3
  164. package/dist/durable/ThreadInvariants.mjs +5 -5
  165. package/dist/durable/ThreadInvariants.mjs.map +1 -1
  166. package/dist/durable/ThreadProjection.mjs +1 -1
  167. package/dist/durable/ThreadProjectionMaintenance.d.mts +1 -1
  168. package/dist/durable/ThreadReader.d.mts +1 -1
  169. package/dist/durable/ThreadReader.mjs +1 -1
  170. package/dist/durable/ThreadStore.d.mts +1 -1
  171. package/dist/durable/ThreadStore.mjs +2 -2
  172. package/dist/durable/ThreadStoreConformance.d.mts +1 -1
  173. package/dist/durable/ThreadStoreConformance.mjs +4 -4
  174. package/dist/durable/ThreadTransfer.d.mts +1 -1
  175. package/dist/durable/ThreadTransfer.mjs +1 -1
  176. package/dist/durable/ThreadWork.d.mts +2 -2
  177. package/dist/durable/ThreadWork.mjs +12 -6
  178. package/dist/durable/ThreadWork.mjs.map +1 -1
  179. package/dist/durable/ToolReconciler.mjs +1 -1
  180. package/dist/durable/WakeScheduler.mjs +23 -39
  181. package/dist/durable/WakeScheduler.mjs.map +1 -1
  182. package/dist/durable/WorkerAdmission.d.mts +1 -1
  183. package/dist/durable/WorkerAdmission.mjs +1 -1
  184. package/dist/durable/WorkerHost.d.mts +2 -2
  185. package/dist/engine/AgentRuntime.d.mts +1 -1
  186. package/dist/engine/AgentRuntime.mjs +1 -1
  187. package/dist/engine/MessagingHost.d.mts +1 -1
  188. package/dist/engine/MessagingHost.mjs +1 -1
  189. package/dist/engine/Output.d.mts +1 -1
  190. package/dist/engine/Output.mjs +1 -1
  191. package/dist/engine/RunOptions.d.mts +1 -1
  192. package/dist/engine/SubagentHost.d.mts +1 -1
  193. package/dist/engine/ThreadHistory.d.mts +1 -1
  194. package/dist/engine/ThreadHistory.mjs +3 -2
  195. package/dist/engine/ThreadHistory.mjs.map +1 -1
  196. package/dist/index.d.mts +21 -21
  197. package/dist/index.mjs +16 -16
  198. package/dist/{output-contract-CMIhu4Cw.mjs → output-contract-DCnLYCdp.mjs} +12 -15
  199. package/dist/{output-contract-CMIhu4Cw.mjs.map → output-contract-DCnLYCdp.mjs.map} +1 -1
  200. package/dist/{run-context-reader-OcsZr4bk.d.mts → run-context-reader-DVhJZ1Qe.d.mts} +2 -2
  201. package/package.json +1 -1
  202. package/src/capabilities/Approval.ts +58 -60
  203. package/src/capabilities/BrowserUse.ts +89 -944
  204. package/src/capabilities/Budget.ts +8 -1
  205. package/src/capabilities/CodeMode.ts +57 -33
  206. package/src/capabilities/McpClient.ts +2 -2
  207. package/src/capabilities/Messaging.ts +51 -55
  208. package/src/capabilities/ModelContext.ts +5 -2
  209. package/src/capabilities/Redaction.ts +64 -34
  210. package/src/capabilities/RunHooks.ts +52 -55
  211. package/src/capabilities/Subagent.ts +33 -33
  212. package/src/capabilities/SubagentReservations.ts +9 -1
  213. package/src/capabilities/WebCapture.ts +6 -0
  214. package/src/capabilities/WebSearch.ts +10 -7
  215. package/src/capabilities/internal/subagent-background.ts +202 -158
  216. package/src/core/Agent.ts +11 -6
  217. package/src/core/AgentUpdates.ts +8 -8
  218. package/src/core/Thread.ts +142 -146
  219. package/src/core/Usage.ts +7 -8
  220. package/src/core/internal/agent-updates.ts +1 -0
  221. package/src/durable/DurableAgentRuntime.ts +1024 -829
  222. package/src/durable/EventSource.ts +15 -9
  223. package/src/durable/RecordFormat.ts +5 -3
  224. package/src/durable/RunContinuation.ts +316 -113
  225. package/src/durable/RunJournal.ts +106 -114
  226. package/src/durable/RunStorage.ts +129 -124
  227. package/src/durable/Scheduling.ts +639 -651
  228. package/src/durable/SqlMemoryStore.ts +8 -6
  229. package/src/durable/SubmissionLedger.ts +11 -0
  230. package/src/durable/SubscriptionInput.ts +5 -3
  231. package/src/durable/SubscriptionStoreConformance.ts +23 -23
  232. package/src/durable/Subscriptions.ts +18 -19
  233. package/src/durable/ThreadImport.ts +18 -19
  234. package/src/durable/ThreadInvariants.ts +2 -1
  235. package/src/durable/ThreadStore.ts +217 -111
  236. package/src/durable/ThreadWork.ts +11 -2
  237. package/src/durable/WakeScheduler.ts +34 -66
  238. package/src/durable/internal/StorageOwner.ts +10 -4
  239. package/src/durable/internal/agent-registration.ts +96 -89
  240. package/src/durable/internal/canonical-json.ts +61 -20
  241. package/src/durable/internal/prompt-history-cache.ts +13 -4
  242. package/src/durable/internal/record-encoding.ts +120 -64
  243. package/src/durable/internal/schedule-time.ts +6 -6
  244. package/src/durable/internal/usage-totals.ts +35 -0
  245. package/src/durable/internal/worker-host.ts +69 -74
  246. package/src/engine/MessagingHost.ts +4 -2
  247. package/src/engine/ThreadHistory.ts +47 -48
  248. package/src/engine/internal/agent-runtime.ts +1298 -1217
  249. package/src/engine/internal/output-contract.ts +15 -15
  250. package/src/engine/internal/primitive-delta.ts +2 -3
  251. package/src/engine/internal/provisional-text.ts +12 -10
  252. package/src/engine/internal/tool-exposure.ts +22 -18
  253. package/src/engine/internal/tool-telemetry.ts +15 -12
  254. package/dist/Agent-0WvBWWbM.mjs.map +0 -1
  255. package/dist/AgentRuntime-CQ-qcETl.mjs.map +0 -1
  256. package/dist/Digest-DCuPlhNk.mjs.map +0 -1
  257. package/dist/DurableAgentRuntime-BAmSkWYr.mjs.map +0 -1
  258. package/dist/MessagingHost-CRUK4JBi.mjs.map +0 -1
  259. package/dist/RunContinuation-DHYNAQFi.mjs.map +0 -1
  260. package/dist/RunJournal-kfKVxJj7.mjs.map +0 -1
  261. package/dist/RunStorage-uqPxps09.mjs.map +0 -1
  262. package/dist/Scheduling-CVyfXlBR.mjs.map +0 -1
  263. package/dist/Subagent-vpffemql.mjs.map +0 -1
  264. package/dist/ThreadImport-DckUMEqJ.mjs.map +0 -1
  265. package/dist/ThreadStore-CEekRa80.mjs.map +0 -1
  266. package/dist/agent-registration-ByMZ_cK5.mjs.map +0 -1
@@ -5,8 +5,8 @@ import { r as Diagnostic } from "../FailureDiagnostic-DvHruCSJ.mjs";
5
5
  import { t as AgentPolicy } from "../AgentPolicy-B4lbCU2T.mjs";
6
6
  import { b as DefinitionDigests } from "../Records-BTnGRdcf.mjs";
7
7
  import { t as DigestError } from "../Digest-DjUgS5PG.mjs";
8
- import { sn as Settlement } from "../Admin-BX9ns28E.mjs";
9
- import { a as MessageDeliveryError, c as MessageDeliveryFailure, m as MessageDeliveryStore } from "../MessageDelivery-B943ebI_.mjs";
8
+ import { sn as Settlement } from "../Admin-Qa3I1oA5.mjs";
9
+ import { a as MessageDeliveryError, c as MessageDeliveryFailure, m as MessageDeliveryStore } from "../MessageDelivery-DjAZJ4Fd.mjs";
10
10
  import { Effect, Schema } from "effect";
11
11
  //#region src/durable/MessageDeliveryStoreConformance.d.ts
12
12
  declare const MessageDeliveryConformanceViolation_base: Schema.Class<MessageDeliveryConformanceViolation, Schema.TaggedStruct<"MessageDeliveryConformanceViolation", {
@@ -106,25 +106,6 @@ export declare const makeMessageDeliveryFixture: (messageId?: any, owner?: any,
106
106
  readonly reportKind?: "update" | undefined;
107
107
  } | undefined;
108
108
  readonly messageAdmission?: {
109
- readonly schemaVersion: 1;
110
- readonly message: {
111
- readonly ownerThreadId: string & import("effect/Brand").Brand<"@effect-agent/core/ThreadId">;
112
- readonly messageId: string & import("effect/Brand").Brand<"@effect-agent/thread/IdempotencyKey">;
113
- };
114
- readonly peerName: string;
115
- readonly sender: {
116
- readonly threadId: string & import("effect/Brand").Brand<"@effect-agent/core/ThreadId">;
117
- readonly agentId: string & import("effect/Brand").Brand<"@effect-agent/core/AgentId">;
118
- };
119
- readonly returnAddress: {
120
- readonly threadId: string & import("effect/Brand").Brand<"@effect-agent/core/ThreadId">;
121
- readonly agentId: string & import("effect/Brand").Brand<"@effect-agent/core/AgentId">;
122
- };
123
- readonly inReplyTo?: {
124
- readonly ownerThreadId: string & import("effect/Brand").Brand<"@effect-agent/core/ThreadId">;
125
- readonly messageId: string & import("effect/Brand").Brand<"@effect-agent/thread/IdempotencyKey">;
126
- } | undefined;
127
- } | {
128
109
  readonly _tag: "WorkerCompletion";
129
110
  readonly budgetExhausted: boolean;
130
111
  readonly schemaVersion: 1;
@@ -165,6 +146,25 @@ export declare const makeMessageDeliveryFixture: (messageId?: any, owner?: any,
165
146
  readonly threadId: string & import("effect/Brand").Brand<"@effect-agent/core/ThreadId">;
166
147
  };
167
148
  readonly update: Update;
149
+ } | {
150
+ readonly schemaVersion: 1;
151
+ readonly message: {
152
+ readonly ownerThreadId: string & import("effect/Brand").Brand<"@effect-agent/core/ThreadId">;
153
+ readonly messageId: string & import("effect/Brand").Brand<"@effect-agent/thread/IdempotencyKey">;
154
+ };
155
+ readonly peerName: string;
156
+ readonly sender: {
157
+ readonly threadId: string & import("effect/Brand").Brand<"@effect-agent/core/ThreadId">;
158
+ readonly agentId: string & import("effect/Brand").Brand<"@effect-agent/core/AgentId">;
159
+ };
160
+ readonly returnAddress: {
161
+ readonly threadId: string & import("effect/Brand").Brand<"@effect-agent/core/ThreadId">;
162
+ readonly agentId: string & import("effect/Brand").Brand<"@effect-agent/core/AgentId">;
163
+ };
164
+ readonly inReplyTo?: {
165
+ readonly ownerThreadId: string & import("effect/Brand").Brand<"@effect-agent/core/ThreadId">;
166
+ readonly messageId: string & import("effect/Brand").Brand<"@effect-agent/thread/IdempotencyKey">;
167
+ } | undefined;
168
168
  } | undefined;
169
169
  };
170
170
  readonly envelopeDigest: string & import("effect/Brand").Brand<"@effect-agent/thread/Digest">;
@@ -290,25 +290,6 @@ export declare const makeWorkerUpdateDeliveryFixture: (id: string) => Effect.Eff
290
290
  readonly reportKind?: "update" | undefined;
291
291
  } | undefined;
292
292
  readonly messageAdmission?: {
293
- readonly schemaVersion: 1;
294
- readonly message: {
295
- readonly ownerThreadId: string & import("effect/Brand").Brand<"@effect-agent/core/ThreadId">;
296
- readonly messageId: string & import("effect/Brand").Brand<"@effect-agent/thread/IdempotencyKey">;
297
- };
298
- readonly peerName: string;
299
- readonly sender: {
300
- readonly threadId: string & import("effect/Brand").Brand<"@effect-agent/core/ThreadId">;
301
- readonly agentId: string & import("effect/Brand").Brand<"@effect-agent/core/AgentId">;
302
- };
303
- readonly returnAddress: {
304
- readonly threadId: string & import("effect/Brand").Brand<"@effect-agent/core/ThreadId">;
305
- readonly agentId: string & import("effect/Brand").Brand<"@effect-agent/core/AgentId">;
306
- };
307
- readonly inReplyTo?: {
308
- readonly ownerThreadId: string & import("effect/Brand").Brand<"@effect-agent/core/ThreadId">;
309
- readonly messageId: string & import("effect/Brand").Brand<"@effect-agent/thread/IdempotencyKey">;
310
- } | undefined;
311
- } | {
312
293
  readonly _tag: "WorkerCompletion";
313
294
  readonly budgetExhausted: boolean;
314
295
  readonly schemaVersion: 1;
@@ -349,6 +330,25 @@ export declare const makeWorkerUpdateDeliveryFixture: (id: string) => Effect.Eff
349
330
  readonly threadId: string & import("effect/Brand").Brand<"@effect-agent/core/ThreadId">;
350
331
  };
351
332
  readonly update: Update;
333
+ } | {
334
+ readonly schemaVersion: 1;
335
+ readonly message: {
336
+ readonly ownerThreadId: string & import("effect/Brand").Brand<"@effect-agent/core/ThreadId">;
337
+ readonly messageId: string & import("effect/Brand").Brand<"@effect-agent/thread/IdempotencyKey">;
338
+ };
339
+ readonly peerName: string;
340
+ readonly sender: {
341
+ readonly threadId: string & import("effect/Brand").Brand<"@effect-agent/core/ThreadId">;
342
+ readonly agentId: string & import("effect/Brand").Brand<"@effect-agent/core/AgentId">;
343
+ };
344
+ readonly returnAddress: {
345
+ readonly threadId: string & import("effect/Brand").Brand<"@effect-agent/core/ThreadId">;
346
+ readonly agentId: string & import("effect/Brand").Brand<"@effect-agent/core/AgentId">;
347
+ };
348
+ readonly inReplyTo?: {
349
+ readonly ownerThreadId: string & import("effect/Brand").Brand<"@effect-agent/core/ThreadId">;
350
+ readonly messageId: string & import("effect/Brand").Brand<"@effect-agent/thread/IdempotencyKey">;
351
+ } | undefined;
352
352
  } | undefined;
353
353
  };
354
354
  readonly envelopeDigest: string & import("effect/Brand").Brand<"@effect-agent/thread/Digest">;
@@ -2,8 +2,8 @@ import { AgentId, DelegationId, ReceiptId, RunId, SettlementId, SubmissionId, Th
2
2
  import { IdempotencyKey, Principal, QueueSequence, Receipt } from "../core/Receipt.mjs";
3
3
  import { Update } from "../core/AgentUpdates.mjs";
4
4
  import { b as WorkerUpdate } from "../Worker-DZjdMjZn.mjs";
5
- import { b as Digest, v as DefinitionDigests } from "../Records-BiuJDWNe.mjs";
6
- import { s as digestJson } from "../Digest-DCuPlhNk.mjs";
5
+ import { b as Digest, v as DefinitionDigests } from "../Records-DzL4Kbtw.mjs";
6
+ import { s as digestJson } from "../Digest-C3EODOee.mjs";
7
7
  import { Settlement } from "./SubmissionLedger.mjs";
8
8
  import { MessageDeliveryStore, messageDeliveryCapacity, prepareMessageDelivery, readPending } from "./MessageDelivery.mjs";
9
9
  import { DateTime, Effect, Equal, Result, Schema } from "effect";
@@ -1,5 +1,5 @@
1
- import { t as ThreadHistory } from "../ThreadHistory-ByxS8HU1.mjs";
2
- import { Ui as ThreadStore, vo as StorageOwner } from "../Admin-BX9ns28E.mjs";
1
+ import { t as ThreadHistory } from "../ThreadHistory-KPPBJLJb.mjs";
2
+ import { Ui as ThreadStore, yo as StorageOwner } from "../Admin-Qa3I1oA5.mjs";
3
3
  import { Layer } from "effect";
4
4
  declare namespace PersistentHistory_d_exports {
5
5
  export { layer };
@@ -1,9 +1,9 @@
1
1
  import { t as __exportAll } from "../rolldown-runtime-D7D4PA-g.mjs";
2
2
  import { ThreadHistory, ThreadHistoryError } from "../engine/ThreadHistory.mjs";
3
- import { L as ModelCompleted, U as PersistedJson, W as ProducerId, X as RecordEnvelope, Z as RecordId, c as CanonicalBatch, i as BatchId, kt as UserInputRecorded, nt as RunCompleted, y as DeploymentId } from "../Records-BiuJDWNe.mjs";
4
- import { _ as promptFromCanonicalRecords } from "../RunJournal-kfKVxJj7.mjs";
5
- import { F as ThreadIdentityRequest, I as ThreadMaterialization, J as ThreadStore, b as SelectedThreadRead, n as AppendRequest } from "../ThreadStore-CEekRa80.mjs";
6
- import { s as StorageOwner } from "../RunStorage-uqPxps09.mjs";
3
+ import { L as ModelCompleted, U as PersistedJson, W as ProducerId, X as RecordEnvelope, Z as RecordId, c as CanonicalBatch, i as BatchId, kt as UserInputRecorded, nt as RunCompleted, y as DeploymentId } from "../Records-DzL4Kbtw.mjs";
4
+ import { v as promptFromCanonicalRecords } from "../RunJournal-CPMKcfd0.mjs";
5
+ import { F as ThreadIdentityRequest, I as ThreadMaterialization, J as ThreadStore, b as SelectedThreadRead, n as AppendRequest } from "../ThreadStore-EuUilthA.mjs";
6
+ import { s as StorageOwner } from "../RunStorage-CzutHJBE.mjs";
7
7
  import { DateTime, Effect, Layer, Schema, Stream } from "effect";
8
8
  import { Prompt } from "effect/ai";
9
9
  //#region src/durable/PersistentHistory.ts
@@ -1,2 +1,2 @@
1
- import { r as admitPreparedInput, t as PreparedInputAdmission } from "../PreparedInputAdmission-CxSJSiTl.mjs";
1
+ import { r as admitPreparedInput, t as PreparedInputAdmission } from "../PreparedInputAdmission-wgY4JMZY.mjs";
2
2
  export { PreparedInputAdmission, admitPreparedInput };
@@ -1,5 +1,5 @@
1
1
  import { t as __exportAll } from "../rolldown-runtime-D7D4PA-g.mjs";
2
- import { Q as RecordJson, X as RecordEnvelope, c as CanonicalBatch, u as CanonicalRecordEnvelope } from "../Records-BiuJDWNe.mjs";
2
+ import { Q as RecordJson, X as RecordEnvelope, c as CanonicalBatch, u as CanonicalRecordEnvelope } from "../Records-DzL4Kbtw.mjs";
3
3
  import { Effect, Schema, SchemaGetter, SchemaIssue } from "effect";
4
4
  //#region src/durable/RecordFormat.ts
5
5
  var RecordFormat_exports = /* @__PURE__ */ __exportAll({
@@ -31,7 +31,7 @@ const decodeExportRecordJson = (encoded) => parseRecordObject(encoded).pipe(Effe
31
31
  ...wire,
32
32
  wire
33
33
  })));
34
- const decodeView = SchemaGetter.transformEffect((value) => decodeRecord(value).pipe(Effect.map((record) => new ExportedRecord({
34
+ const decodeView = SchemaGetter.transformEffect((value) => decodeRecord(value).pipe(Effect.map((record) => ExportedRecord.make({
35
35
  ...record,
36
36
  wire: value
37
37
  }, { disableChecks: true })), Effect.mapError((error) => error.issue)));
@@ -64,7 +64,7 @@ const ReadEnvelope = Schema.Struct({
64
64
  ...CanonicalRecordEnvelope.fields,
65
65
  record: ReadRecord
66
66
  }).pipe(Schema.decodeTo(Schema.toType(CanonicalRecordEnvelope), {
67
- decode: SchemaGetter.transform((fields) => new CanonicalRecordEnvelope(fields, { disableChecks: true })),
67
+ decode: SchemaGetter.transform((fields) => CanonicalRecordEnvelope.make(fields, { disableChecks: true })),
68
68
  encode: SchemaGetter.transform((envelope) => envelope)
69
69
  }));
70
70
  /** Batch identity plus lossless record wire, used when checking a complete immutable log. */
@@ -1 +1 @@
1
- {"version":3,"file":"RecordFormat.mjs","names":[],"sources":["../../src/durable/RecordFormat.ts"],"sourcesContent":["import { Effect, Schema, SchemaGetter, SchemaIssue } from \"effect\";\n\nimport {\n CanonicalBatch,\n CanonicalRecordEnvelope,\n CURRENT_RECORD_FORMAT,\n RecordEnvelope,\n RecordJson,\n} from \"./Records.ts\";\n\nexport class RecordFormatError extends Schema.TaggedError<RecordFormatError>()(\n \"RecordFormatError\",\n {\n format: Schema.String,\n message: Schema.String,\n },\n) {}\n\n/** An archive owns its wire JSON explicitly; the typed fields are only a read view. */\nexport class ExportedRecord extends RecordEnvelope.extend<ExportedRecord>(\n \"@effect-agent/thread/ExportedRecord\",\n)({ wire: RecordJson }) {}\n\nconst decodeRecord = Schema.decodeUnknownEffect(RecordEnvelope);\nconst sameRecord = Schema.toEquivalence(RecordEnvelope);\n\nconst parseRecordObject = Schema.decodeEffect(\n Schema.fromJsonString(Schema.Record(Schema.String, Schema.Unknown)),\n);\n\nconst decodeExportedRecord = Schema.decodeUnknownEffect(ExportedRecord);\n\n/**\n * Decode stored text directly into its final record, retaining additive wire.\n * Parsing owns the object; the final schema checks the wire bounds and supported fields once.\n * Object-input codecs still validate caller-owned wire when constructing the read view.\n */\nexport const decodeExportRecordJson = (\n encoded: string,\n): Effect.Effect<ExportedRecord, Schema.SchemaError> =>\n parseRecordObject(encoded).pipe(\n Effect.flatMap((wire) => decodeExportedRecord({ ...wire, wire })),\n );\n\n// Both codecs validate RecordJson before this getter; decode the supported view once.\nconst decodeView = SchemaGetter.transformEffect((value: RecordJson) =>\n decodeRecord(value).pipe(\n Effect.map((record) => new ExportedRecord({ ...record, wire: value }, { disableChecks: true })),\n Effect.mapError((error) => error.issue),\n ),\n);\n\n/** Decode at the archive boundary, retaining unknown additive fields for a lossless backup. */\nexport const decodeExportRecord = Effect.fnUntraced(function* (format: string, input: RecordJson) {\n if (format !== CURRENT_RECORD_FORMAT)\n return yield* RecordFormatError.make({ format, message: \"Unsupported record format\" });\n\n return yield* Schema.decodeEffect(ExportRecord)(input).pipe(\n Effect.mapError(() => RecordFormatError.make({ format, message: \"Invalid canonical record\" })),\n );\n});\n\n/**\n * Preserve additive fields without process-local side state. Copy with ExportedRecord.make\n * or this codec. Normalizing through RecordEnvelope discards the wire and cannot be encoded\n * as an archive record. Editing the typed view also fails rather than silently changing a log.\n */\nexport const ExportRecord = RecordJson.pipe(\n Schema.decodeTo(Schema.toType(ExportedRecord), {\n decode: decodeView,\n encode: SchemaGetter.transformEffect((record) =>\n decodeRecord(record.wire).pipe(\n Effect.mapError((error) => error.issue),\n Effect.flatMap((view) =>\n sameRecord(view, record)\n ? Effect.succeed(record.wire)\n : Effect.fail(\n new SchemaIssue.InvalidValue({\n message:\n \"Archive record view differs from its wire JSON; export the source again\",\n }),\n ),\n ),\n ),\n ),\n }),\n);\n\n/** Canonical read transport preserves exact evidence while exposing the supported typed view. */\nexport const ReadRecord = RecordJson.pipe(\n Schema.decodeTo(Schema.toType(RecordEnvelope), {\n decode: decodeView,\n encode: SchemaGetter.transformEffect((record) =>\n (record instanceof ExportedRecord\n ? Schema.encodeEffect(ExportRecord)(record)\n : Schema.encodeEffect(RecordEnvelope)(record)\n ).pipe(Effect.mapError((error) => error.issue)),\n ),\n }),\n);\n\nexport const ReadEnvelope = Schema.Struct({\n ...CanonicalRecordEnvelope.fields,\n record: ReadRecord,\n}).pipe(\n Schema.decodeTo(Schema.toType(CanonicalRecordEnvelope), {\n decode: SchemaGetter.transform(\n (fields) => new CanonicalRecordEnvelope(fields, { disableChecks: true }),\n ),\n encode: SchemaGetter.transform((envelope) => envelope),\n }),\n);\n\n/** Batch identity plus lossless record wire, used when checking a complete immutable log. */\nexport const ExportBatch = Schema.Struct({\n ...CanonicalBatch.fields,\n records: Schema.NonEmptyArray(ExportRecord).check(Schema.isMaxLength(256)),\n});\n"],"mappings":";;;;;;;;;;;;;;AAUA,IAAa,oBAAb,cAAuC,OAAO,YAA+B,CAAC,CAC5E,qBACA;CACE,QAAQ,OAAO;CACf,SAAS,OAAO;AAClB,CACF,CAAC,CAAC,CAAC;;AAGH,IAAa,iBAAb,cAAoC,eAAe,OACjD,qCACF,CAAC,CAAC,EAAE,MAAM,WAAW,CAAC,CAAC,CAAC,CAAC;AAEzB,MAAM,eAAe,OAAO,oBAAoB,cAAc;AAC9D,MAAM,aAAa,OAAO,cAAc,cAAc;AAEtD,MAAM,oBAAoB,OAAO,aAC/B,OAAO,eAAe,OAAO,OAAO,OAAO,QAAQ,OAAO,OAAO,CAAC,CACpE;AAEA,MAAM,uBAAuB,OAAO,oBAAoB,cAAc;;;;;;AAOtE,MAAa,0BACX,YAEA,kBAAkB,OAAO,CAAC,CAAC,KACzB,OAAO,SAAS,SAAS,qBAAqB;CAAE,GAAG;CAAM;AAAK,CAAC,CAAC,CAClE;AAGF,MAAM,aAAa,aAAa,iBAAiB,UAC/C,aAAa,KAAK,CAAC,CAAC,KAClB,OAAO,KAAK,WAAW,IAAI,eAAe;CAAE,GAAG;CAAQ,MAAM;AAAM,GAAG,EAAE,eAAe,KAAK,CAAC,CAAC,GAC9F,OAAO,UAAU,UAAU,MAAM,KAAK,CACxC,CACF;;AAGA,MAAa,qBAAqB,OAAO,WAAW,WAAW,QAAgB,OAAmB;CAChG,IAAI,WAAA,yBACF,OAAO,OAAO,kBAAkB,KAAK;EAAE;EAAQ,SAAS;CAA4B,CAAC;CAEvF,OAAO,OAAO,OAAO,aAAa,YAAY,CAAC,CAAC,KAAK,CAAC,CAAC,KACrD,OAAO,eAAe,kBAAkB,KAAK;EAAE;EAAQ,SAAS;CAA2B,CAAC,CAAC,CAC/F;AACF,CAAC;;;;;;AAOD,MAAa,eAAe,WAAW,KACrC,OAAO,SAAS,OAAO,OAAO,cAAc,GAAG;CAC7C,QAAQ;CACR,QAAQ,aAAa,iBAAiB,WACpC,aAAa,OAAO,IAAI,CAAC,CAAC,KACxB,OAAO,UAAU,UAAU,MAAM,KAAK,GACtC,OAAO,SAAS,SACd,WAAW,MAAM,MAAM,IACnB,OAAO,QAAQ,OAAO,IAAI,IAC1B,OAAO,KACL,IAAI,YAAY,aAAa,EAC3B,SACE,0EACJ,CAAC,CACH,CACN,CACF,CACF;AACF,CAAC,CACH;;AAGA,MAAa,aAAa,WAAW,KACnC,OAAO,SAAS,OAAO,OAAO,cAAc,GAAG;CAC7C,QAAQ;CACR,QAAQ,aAAa,iBAAiB,YACnC,kBAAkB,iBACf,OAAO,aAAa,YAAY,CAAC,CAAC,MAAM,IACxC,OAAO,aAAa,cAAc,CAAC,CAAC,MAAM,EAAA,CAC5C,KAAK,OAAO,UAAU,UAAU,MAAM,KAAK,CAAC,CAChD;AACF,CAAC,CACH;AAEA,MAAa,eAAe,OAAO,OAAO;CACxC,GAAG,wBAAwB;CAC3B,QAAQ;AACV,CAAC,CAAC,CAAC,KACD,OAAO,SAAS,OAAO,OAAO,uBAAuB,GAAG;CACtD,QAAQ,aAAa,WAClB,WAAW,IAAI,wBAAwB,QAAQ,EAAE,eAAe,KAAK,CAAC,CACzE;CACA,QAAQ,aAAa,WAAW,aAAa,QAAQ;AACvD,CAAC,CACH;;AAGA,MAAa,cAAc,OAAO,OAAO;CACvC,GAAG,eAAe;CAClB,SAAS,OAAO,cAAc,YAAY,CAAC,CAAC,MAAM,OAAO,YAAY,GAAG,CAAC;AAC3E,CAAC"}
1
+ {"version":3,"file":"RecordFormat.mjs","names":[],"sources":["../../src/durable/RecordFormat.ts"],"sourcesContent":["import { Effect, Schema, SchemaGetter, SchemaIssue } from \"effect\";\n\nimport {\n CanonicalBatch,\n CanonicalRecordEnvelope,\n CURRENT_RECORD_FORMAT,\n RecordEnvelope,\n RecordJson,\n} from \"./Records.ts\";\n\nexport class RecordFormatError extends Schema.TaggedError<RecordFormatError>()(\n \"RecordFormatError\",\n {\n format: Schema.String,\n message: Schema.String,\n },\n) {}\n\n/** An archive owns its wire JSON explicitly; the typed fields are only a read view. */\nexport class ExportedRecord extends RecordEnvelope.extend<ExportedRecord>(\n \"@effect-agent/thread/ExportedRecord\",\n)({ wire: RecordJson }) {}\n\nconst decodeRecord = Schema.decodeUnknownEffect(RecordEnvelope);\nconst sameRecord = Schema.toEquivalence(RecordEnvelope);\n\nconst parseRecordObject = Schema.decodeEffect(\n Schema.fromJsonString(Schema.Record(Schema.String, Schema.Unknown)),\n);\n\nconst decodeExportedRecord = Schema.decodeUnknownEffect(ExportedRecord);\n\n/**\n * Decode stored text directly into its final record, retaining additive wire.\n * Parsing owns the object; the final schema checks the wire bounds and supported fields once.\n * Object-input codecs still validate caller-owned wire when constructing the read view.\n */\nexport const decodeExportRecordJson = (\n encoded: string,\n): Effect.Effect<ExportedRecord, Schema.SchemaError> =>\n parseRecordObject(encoded).pipe(\n Effect.flatMap((wire) => decodeExportedRecord({ ...wire, wire })),\n );\n\n// Both codecs validate RecordJson before this getter; decode the supported view once.\nconst decodeView = SchemaGetter.transformEffect((value: RecordJson) =>\n decodeRecord(value).pipe(\n Effect.map((record) =>\n ExportedRecord.make({ ...record, wire: value }, { disableChecks: true }),\n ),\n Effect.mapError((error) => error.issue),\n ),\n);\n\n/** Decode at the archive boundary, retaining unknown additive fields for a lossless backup. */\nexport const decodeExportRecord = Effect.fnUntraced(function* (format: string, input: RecordJson) {\n if (format !== CURRENT_RECORD_FORMAT)\n return yield* RecordFormatError.make({ format, message: \"Unsupported record format\" });\n\n return yield* Schema.decodeEffect(ExportRecord)(input).pipe(\n Effect.mapError(() => RecordFormatError.make({ format, message: \"Invalid canonical record\" })),\n );\n});\n\n/**\n * Preserve additive fields without process-local side state. Copy with ExportedRecord.make\n * or this codec. Normalizing through RecordEnvelope discards the wire and cannot be encoded\n * as an archive record. Editing the typed view also fails rather than silently changing a log.\n */\nexport const ExportRecord = RecordJson.pipe(\n Schema.decodeTo(Schema.toType(ExportedRecord), {\n decode: decodeView,\n encode: SchemaGetter.transformEffect((record) =>\n decodeRecord(record.wire).pipe(\n Effect.mapError((error) => error.issue),\n Effect.flatMap((view) =>\n sameRecord(view, record)\n ? Effect.succeed(record.wire)\n : Effect.fail(\n new SchemaIssue.InvalidValue({\n message:\n \"Archive record view differs from its wire JSON; export the source again\",\n }),\n ),\n ),\n ),\n ),\n }),\n);\n\n/** Canonical read transport preserves exact evidence while exposing the supported typed view. */\nexport const ReadRecord = RecordJson.pipe(\n Schema.decodeTo(Schema.toType(RecordEnvelope), {\n decode: decodeView,\n encode: SchemaGetter.transformEffect((record) =>\n (record instanceof ExportedRecord\n ? Schema.encodeEffect(ExportRecord)(record)\n : Schema.encodeEffect(RecordEnvelope)(record)\n ).pipe(Effect.mapError((error) => error.issue)),\n ),\n }),\n);\n\nexport const ReadEnvelope = Schema.Struct({\n ...CanonicalRecordEnvelope.fields,\n record: ReadRecord,\n}).pipe(\n Schema.decodeTo(Schema.toType(CanonicalRecordEnvelope), {\n decode: SchemaGetter.transform((fields) =>\n CanonicalRecordEnvelope.make(fields, { disableChecks: true }),\n ),\n encode: SchemaGetter.transform((envelope) => envelope),\n }),\n);\n\n/** Batch identity plus lossless record wire, used when checking a complete immutable log. */\nexport const ExportBatch = Schema.Struct({\n ...CanonicalBatch.fields,\n records: Schema.NonEmptyArray(ExportRecord).check(Schema.isMaxLength(256)),\n});\n"],"mappings":";;;;;;;;;;;;;;AAUA,IAAa,oBAAb,cAAuC,OAAO,YAA+B,CAAC,CAC5E,qBACA;CACE,QAAQ,OAAO;CACf,SAAS,OAAO;AAClB,CACF,CAAC,CAAC,CAAC;;AAGH,IAAa,iBAAb,cAAoC,eAAe,OACjD,qCACF,CAAC,CAAC,EAAE,MAAM,WAAW,CAAC,CAAC,CAAC,CAAC;AAEzB,MAAM,eAAe,OAAO,oBAAoB,cAAc;AAC9D,MAAM,aAAa,OAAO,cAAc,cAAc;AAEtD,MAAM,oBAAoB,OAAO,aAC/B,OAAO,eAAe,OAAO,OAAO,OAAO,QAAQ,OAAO,OAAO,CAAC,CACpE;AAEA,MAAM,uBAAuB,OAAO,oBAAoB,cAAc;;;;;;AAOtE,MAAa,0BACX,YAEA,kBAAkB,OAAO,CAAC,CAAC,KACzB,OAAO,SAAS,SAAS,qBAAqB;CAAE,GAAG;CAAM;AAAK,CAAC,CAAC,CAClE;AAGF,MAAM,aAAa,aAAa,iBAAiB,UAC/C,aAAa,KAAK,CAAC,CAAC,KAClB,OAAO,KAAK,WACV,eAAe,KAAK;CAAE,GAAG;CAAQ,MAAM;AAAM,GAAG,EAAE,eAAe,KAAK,CAAC,CACzE,GACA,OAAO,UAAU,UAAU,MAAM,KAAK,CACxC,CACF;;AAGA,MAAa,qBAAqB,OAAO,WAAW,WAAW,QAAgB,OAAmB;CAChG,IAAI,WAAA,yBACF,OAAO,OAAO,kBAAkB,KAAK;EAAE;EAAQ,SAAS;CAA4B,CAAC;CAEvF,OAAO,OAAO,OAAO,aAAa,YAAY,CAAC,CAAC,KAAK,CAAC,CAAC,KACrD,OAAO,eAAe,kBAAkB,KAAK;EAAE;EAAQ,SAAS;CAA2B,CAAC,CAAC,CAC/F;AACF,CAAC;;;;;;AAOD,MAAa,eAAe,WAAW,KACrC,OAAO,SAAS,OAAO,OAAO,cAAc,GAAG;CAC7C,QAAQ;CACR,QAAQ,aAAa,iBAAiB,WACpC,aAAa,OAAO,IAAI,CAAC,CAAC,KACxB,OAAO,UAAU,UAAU,MAAM,KAAK,GACtC,OAAO,SAAS,SACd,WAAW,MAAM,MAAM,IACnB,OAAO,QAAQ,OAAO,IAAI,IAC1B,OAAO,KACL,IAAI,YAAY,aAAa,EAC3B,SACE,0EACJ,CAAC,CACH,CACN,CACF,CACF;AACF,CAAC,CACH;;AAGA,MAAa,aAAa,WAAW,KACnC,OAAO,SAAS,OAAO,OAAO,cAAc,GAAG;CAC7C,QAAQ;CACR,QAAQ,aAAa,iBAAiB,YACnC,kBAAkB,iBACf,OAAO,aAAa,YAAY,CAAC,CAAC,MAAM,IACxC,OAAO,aAAa,cAAc,CAAC,CAAC,MAAM,EAAA,CAC5C,KAAK,OAAO,UAAU,UAAU,MAAM,KAAK,CAAC,CAChD;AACF,CAAC,CACH;AAEA,MAAa,eAAe,OAAO,OAAO;CACxC,GAAG,wBAAwB;CAC3B,QAAQ;AACV,CAAC,CAAC,CAAC,KACD,OAAO,SAAS,OAAO,OAAO,uBAAuB,GAAG;CACtD,QAAQ,aAAa,WAAW,WAC9B,wBAAwB,KAAK,QAAQ,EAAE,eAAe,KAAK,CAAC,CAC9D;CACA,QAAQ,aAAa,WAAW,aAAa,QAAQ;AACvD,CAAC,CACH;;AAGA,MAAa,cAAc,OAAO,OAAO;CACvC,GAAG,eAAe;CAClB,SAAS,OAAO,cAAc,YAAY,CAAC,CAAC,MAAM,OAAO,YAAY,GAAG,CAAC;AAC3E,CAAC"}
@@ -1,2 +1,2 @@
1
- import { A as MAX_RUN_EVIDENCE_RECORDS, At as WorkHandoffCompleted, B as ObservationOffset, Bt as WorkerReportingIntent, C as MAX_CANONICAL_RECORD_BYTES, Ct as ToolCallResolved, D as MAX_PERSISTED_JSON_NODES, Dt as ToolStepSettled, E as MAX_PERSISTED_JSON_DEPTH, Et as ToolOperation, F as MAX_TURN_CANONICAL_BYTES, Ft as WorkerInputRequested, G as PromptRecord, H as PeerMessagePrepared, I as ModelCallAborted, It as WorkerOrigin, J as RUN_TERMINAL_RESERVE_BYTES, K as PromptRecordEnvelope, L as ModelCompleted, Lt as WorkerOriginRecorded, M as MAX_RUN_RECOVERY_SUFFIX_RECORDS, Mt as WorkerContinuation, N as MAX_RUN_TERMINAL_BYTES, Nt as WorkerInputCompleted, O as MAX_RUN_CONTINUATION_BYTES, Ot as ToolUnavailable, P as MAX_RUN_TOOL_CALL_IDENTITIES, Pt as WorkerInputRefused, Q as RecordJson, R as ModelResponseInterrupted, Rt as WorkerReportPrepared, S as KnownRecordPayload, St as ToolCallResolution, T as MAX_PERSISTED_JSON_COLLECTION_LENGTH, Tt as ToolCallUnknown, U as PersistedJson, V as PROMPT_EVIDENCE_TAGS, Vt as WorkerStopRequested, W as ProducerId, X as RecordEnvelope, Y as RUN_TERMINAL_RESERVE_RECORDS, Z as RecordId, _ as DefinitionDigestInput, _t as SubmissionSettledRecord, a as CURRENT_CANONICAL_SCHEMA_VERSION, at as RunDurationExhausted, b as Digest, bt as ToolApprovalDecided, c as CanonicalBatch, ct as RunPosition, d as CanonicalRecordPayload, dt as SettlementOutcome, et as RepairAnnotated, f as CanonicalSequence, ft as SubagentJoined, g as DeclaredToolCall, gt as SubmissionSettled, h as ContinuationAccounting, ht as SubagentStarted, i as BatchId, it as RunContinuation, j as MAX_RUN_RECOVERY_SUFFIX_BYTES, jt as WorkerAdmission, k as MAX_RUN_EVIDENCE_BYTES, kt as UserInputRecorded, l as CanonicalRecord, lt as RunStartedRecord, m as ContextEvidenceReference, mt as SubagentRequested, n as AgentUpdateEmitted, nt as RunCompleted, o as CURRENT_RECORD_FORMAT, ot as RunFailed, p as CompactionCreated, pt as SubagentLineageRecorded, q as PromptRecordPayload, r as ApprovalDecision, rt as RunContextRecorded, s as CURRENT_RECORD_VERSION, st as RunPolicyUsageReserved, t as AbortRequested, tt as ReplayContract, u as CanonicalRecordEnvelope, ut as SettlementFailureDiagnostic, v as DefinitionDigests, vt as SubtreeBudgetReserved, w as MAX_PERSISTED_JSON_BYTES, wt as ToolCallSettled, x as EvidenceReference, xt as ToolApprovalRequested, y as DeploymentId, yt as ThreadCreated, z as ModelResponseRecorded, zt as WorkerReportRefused } from "../Records-BiuJDWNe.mjs";
1
+ import { A as MAX_RUN_EVIDENCE_RECORDS, At as WorkHandoffCompleted, B as ObservationOffset, Bt as WorkerReportingIntent, C as MAX_CANONICAL_RECORD_BYTES, Ct as ToolCallResolved, D as MAX_PERSISTED_JSON_NODES, Dt as ToolStepSettled, E as MAX_PERSISTED_JSON_DEPTH, Et as ToolOperation, F as MAX_TURN_CANONICAL_BYTES, Ft as WorkerInputRequested, G as PromptRecord, H as PeerMessagePrepared, I as ModelCallAborted, It as WorkerOrigin, J as RUN_TERMINAL_RESERVE_BYTES, K as PromptRecordEnvelope, L as ModelCompleted, Lt as WorkerOriginRecorded, M as MAX_RUN_RECOVERY_SUFFIX_RECORDS, Mt as WorkerContinuation, N as MAX_RUN_TERMINAL_BYTES, Nt as WorkerInputCompleted, O as MAX_RUN_CONTINUATION_BYTES, Ot as ToolUnavailable, P as MAX_RUN_TOOL_CALL_IDENTITIES, Pt as WorkerInputRefused, Q as RecordJson, R as ModelResponseInterrupted, Rt as WorkerReportPrepared, S as KnownRecordPayload, St as ToolCallResolution, T as MAX_PERSISTED_JSON_COLLECTION_LENGTH, Tt as ToolCallUnknown, U as PersistedJson, V as PROMPT_EVIDENCE_TAGS, Vt as WorkerStopRequested, W as ProducerId, X as RecordEnvelope, Y as RUN_TERMINAL_RESERVE_RECORDS, Z as RecordId, _ as DefinitionDigestInput, _t as SubmissionSettledRecord, a as CURRENT_CANONICAL_SCHEMA_VERSION, at as RunDurationExhausted, b as Digest, bt as ToolApprovalDecided, c as CanonicalBatch, ct as RunPosition, d as CanonicalRecordPayload, dt as SettlementOutcome, et as RepairAnnotated, f as CanonicalSequence, ft as SubagentJoined, g as DeclaredToolCall, gt as SubmissionSettled, h as ContinuationAccounting, ht as SubagentStarted, i as BatchId, it as RunContinuation, j as MAX_RUN_RECOVERY_SUFFIX_BYTES, jt as WorkerAdmission, k as MAX_RUN_EVIDENCE_BYTES, kt as UserInputRecorded, l as CanonicalRecord, lt as RunStartedRecord, m as ContextEvidenceReference, mt as SubagentRequested, n as AgentUpdateEmitted, nt as RunCompleted, o as CURRENT_RECORD_FORMAT, ot as RunFailed, p as CompactionCreated, pt as SubagentLineageRecorded, q as PromptRecordPayload, r as ApprovalDecision, rt as RunContextRecorded, s as CURRENT_RECORD_VERSION, st as RunPolicyUsageReserved, t as AbortRequested, tt as ReplayContract, u as CanonicalRecordEnvelope, ut as SettlementFailureDiagnostic, v as DefinitionDigests, vt as SubtreeBudgetReserved, w as MAX_PERSISTED_JSON_BYTES, wt as ToolCallSettled, x as EvidenceReference, xt as ToolApprovalRequested, y as DeploymentId, yt as ThreadCreated, z as ModelResponseRecorded, zt as WorkerReportRefused } from "../Records-DzL4Kbtw.mjs";
2
2
  export { AbortRequested, AgentUpdateEmitted, ApprovalDecision, BatchId, CURRENT_CANONICAL_SCHEMA_VERSION, CURRENT_RECORD_FORMAT, CURRENT_RECORD_VERSION, CanonicalBatch, CanonicalRecord, CanonicalRecordEnvelope, CanonicalRecordPayload, CanonicalSequence, CompactionCreated, ContextEvidenceReference, ContinuationAccounting, DeclaredToolCall, DefinitionDigestInput, DefinitionDigests, DeploymentId, Digest, EvidenceReference, KnownRecordPayload, MAX_CANONICAL_RECORD_BYTES, MAX_PERSISTED_JSON_BYTES, MAX_PERSISTED_JSON_COLLECTION_LENGTH, MAX_PERSISTED_JSON_DEPTH, MAX_PERSISTED_JSON_NODES, MAX_RUN_CONTINUATION_BYTES, MAX_RUN_EVIDENCE_BYTES, MAX_RUN_EVIDENCE_RECORDS, MAX_RUN_RECOVERY_SUFFIX_BYTES, MAX_RUN_RECOVERY_SUFFIX_RECORDS, MAX_RUN_TERMINAL_BYTES, MAX_RUN_TOOL_CALL_IDENTITIES, MAX_TURN_CANONICAL_BYTES, ModelCallAborted, ModelCompleted, ModelResponseInterrupted, ModelResponseRecorded, ObservationOffset, PROMPT_EVIDENCE_TAGS, PeerMessagePrepared, PersistedJson, ProducerId, PromptRecord, PromptRecordEnvelope, PromptRecordPayload, RUN_TERMINAL_RESERVE_BYTES, RUN_TERMINAL_RESERVE_RECORDS, RecordEnvelope, RecordId, RecordJson, RepairAnnotated, ReplayContract, RunCompleted, RunContextRecorded, RunContinuation, RunDurationExhausted, RunFailed, RunPolicyUsageReserved, RunPosition, RunStartedRecord, SettlementFailureDiagnostic, SettlementOutcome, SubagentJoined, SubagentLineageRecorded, SubagentRequested, SubagentStarted, SubmissionSettled, SubmissionSettledRecord, SubtreeBudgetReserved, ThreadCreated, ToolApprovalDecided, ToolApprovalRequested, ToolCallResolution, ToolCallResolved, ToolCallSettled, ToolCallUnknown, ToolOperation, ToolStepSettled, ToolUnavailable, UserInputRecorded, WorkHandoffCompleted, WorkerAdmission, WorkerContinuation, WorkerInputCompleted, WorkerInputRefused, WorkerInputRequested, WorkerOrigin, WorkerOriginRecorded, WorkerReportPrepared, WorkerReportRefused, WorkerReportingIntent, WorkerStopRequested };
@@ -1,2 +1,2 @@
1
- import { $ as ResumeFromTurnBoundary, A as AwaitHostSettlement, B as NoAction, D as AwaitApprovalDecision, E as ApplyUnknownResolutions, F as DeclaredPendingBatchEvidence, G as RecoveryDecision, H as OpenToolCallEvidence, I as DelegationAdmissionEvidence, J as ReleaseOrphanChildReservation, K as RecoveryEvidence, L as EnsureWaitingForChild, M as AwaitUnknownResolution, N as CompleteChildAdmission, O as AwaitChildAdmissionResolution, P as CompleteMaterialization, Q as RepairSubagentStartLink, R as FinalizeLedgerFromHistory, T as ApplyJoinAccounting, U as PendingApprovalEvidence, V as OpenDelegationCallEvidence, W as PropagateChildAbort, X as RepairJoinMarker, Y as RepairInputMarker, Z as RepairReadiness, at as SettleJoinedWithHost, et as ResumePendingToolBatch, it as SettleAborted, j as AwaitParentEstablishment, k as AwaitChildSettlement, nt as ResumeWaitingParent, ot as classifyRecovery, rt as RevertJoining, st as pendingApprovalForRecovery, tt as ResumeSuspended, w as ApplyInput, z as MarkUnknown } from "../Admin-BX9ns28E.mjs";
1
+ import { $ as ResumeFromTurnBoundary, A as AwaitHostSettlement, B as NoAction, D as AwaitApprovalDecision, E as ApplyUnknownResolutions, F as DeclaredPendingBatchEvidence, G as RecoveryDecision, H as OpenToolCallEvidence, I as DelegationAdmissionEvidence, J as ReleaseOrphanChildReservation, K as RecoveryEvidence, L as EnsureWaitingForChild, M as AwaitUnknownResolution, N as CompleteChildAdmission, O as AwaitChildAdmissionResolution, P as CompleteMaterialization, Q as RepairSubagentStartLink, R as FinalizeLedgerFromHistory, T as ApplyJoinAccounting, U as PendingApprovalEvidence, V as OpenDelegationCallEvidence, W as PropagateChildAbort, X as RepairJoinMarker, Y as RepairInputMarker, Z as RepairReadiness, at as SettleJoinedWithHost, et as ResumePendingToolBatch, it as SettleAborted, j as AwaitParentEstablishment, k as AwaitChildSettlement, nt as ResumeWaitingParent, ot as classifyRecovery, rt as RevertJoining, st as pendingApprovalForRecovery, tt as ResumeSuspended, w as ApplyInput, z as MarkUnknown } from "../Admin-Qa3I1oA5.mjs";
2
2
  export { ApplyInput, ApplyJoinAccounting, ApplyUnknownResolutions, AwaitApprovalDecision, AwaitChildAdmissionResolution, AwaitChildSettlement, AwaitHostSettlement, AwaitParentEstablishment, AwaitUnknownResolution, CompleteChildAdmission, CompleteMaterialization, DeclaredPendingBatchEvidence, DelegationAdmissionEvidence, EnsureWaitingForChild, FinalizeLedgerFromHistory, MarkUnknown, NoAction, OpenDelegationCallEvidence, OpenToolCallEvidence, PendingApprovalEvidence, PropagateChildAbort, RecoveryDecision, RecoveryEvidence, ReleaseOrphanChildReservation, RepairInputMarker, RepairJoinMarker, RepairReadiness, RepairSubagentStartLink, ResumeFromTurnBoundary, ResumePendingToolBatch, ResumeSuspended, ResumeWaitingParent, RevertJoining, SettleAborted, SettleJoinedWithHost, classifyRecovery, pendingApprovalForRecovery };
@@ -1,6 +1,6 @@
1
1
  import { t as __exportAll } from "../rolldown-runtime-D7D4PA-g.mjs";
2
2
  import { SettlementId, SubmissionId, ThreadId, ToolCallId } from "../core/Identifiers.mjs";
3
- import { dt as SettlementOutcome, g as DeclaredToolCall, r as ApprovalDecision } from "../Records-BiuJDWNe.mjs";
3
+ import { dt as SettlementOutcome, g as DeclaredToolCall, r as ApprovalDecision } from "../Records-DzL4Kbtw.mjs";
4
4
  import { ChildReservationId, WaitingChild, submissionSettlementId } from "./SubmissionLedger.mjs";
5
5
  import { Effect, Schema } from "effect";
6
6
  //#region src/durable/Recovery.ts
@@ -1,4 +1,4 @@
1
1
  import { C as EvidenceReference, ot as RunContextRecorded, st as RunContinuation } from "../Records-BTnGRdcf.mjs";
2
- import { ho as ProgressAppendRecord } from "../Admin-BX9ns28E.mjs";
3
- import { S as resolveEvidence, _ as executionRunIds, a as canonicalRecordBytes, b as terminalUsageCharge, c as prepareProgressAppend, d as resolveExecutionEvidence, f as runEvidence, g as canonicalRunIds, h as verifyRunContinuations, l as readContinuation, m as validateSuffix, n as CurrentRunWriter, o as isOperationalRecord, p as validateProgressAppend, r as ProgressAppendReader, s as makeProgressWriter, t as CurrentRunSettlement, u as readRunEvidenceSnapshot, v as isPreContinuationFact, x as reference, y as isWorkHandoff } from "../RunContinuation-FHM7XPjq.mjs";
2
+ import { go as ProgressAppendRecord } from "../Admin-Qa3I1oA5.mjs";
3
+ import { S as resolveEvidence, _ as executionRunIds, a as canonicalRecordBytes, b as terminalUsageCharge, c as prepareProgressAppend, d as resolveExecutionEvidence, f as runEvidence, g as canonicalRunIds, h as verifyRunContinuations, l as readContinuation, m as validateSuffix, n as CurrentRunWriter, o as isOperationalRecord, p as validateProgressAppend, r as ProgressAppendReader, s as makeProgressWriter, t as CurrentRunSettlement, u as readRunEvidenceSnapshot, v as isPreContinuationFact, x as reference, y as isWorkHandoff } from "../RunContinuation-3jB5pULC.mjs";
4
4
  export { CurrentRunSettlement, CurrentRunWriter, EvidenceReference, ProgressAppendReader, type ProgressAppendRecord, RunContextRecorded, RunContinuation, canonicalRecordBytes, canonicalRunIds, executionRunIds, isOperationalRecord, isPreContinuationFact, isWorkHandoff, makeProgressWriter, prepareProgressAppend, readContinuation, readRunEvidenceSnapshot, reference, resolveEvidence, resolveExecutionEvidence, runEvidence, terminalUsageCharge, validateProgressAppend, validateSuffix, verifyRunContinuations };
@@ -1,4 +1,4 @@
1
- import { it as RunContinuation, rt as RunContextRecorded, x as EvidenceReference } from "../Records-BiuJDWNe.mjs";
2
- import { _t as isPreContinuationFact, bt as terminalUsageCharge, gt as executionRunIds, ht as canonicalRunIds, yt as isWorkHandoff } from "../ThreadStore-CEekRa80.mjs";
3
- import { a as canonicalRecordBytes, b as reference, c as prepareProgressAppend, d as resolveExecutionEvidence, f as runEvidence, h as verifyRunContinuations, l as readContinuation, m as validateSuffix, n as CurrentRunWriter, o as isOperationalRecord, p as validateProgressAppend, r as ProgressAppendReader, s as makeProgressWriter, t as CurrentRunSettlement, u as readRunEvidenceSnapshot, x as resolveEvidence } from "../RunContinuation-DHYNAQFi.mjs";
1
+ import { it as RunContinuation, rt as RunContextRecorded, x as EvidenceReference } from "../Records-DzL4Kbtw.mjs";
2
+ import { _t as isPreContinuationFact, bt as terminalUsageCharge, gt as executionRunIds, ht as canonicalRunIds, yt as isWorkHandoff } from "../ThreadStore-EuUilthA.mjs";
3
+ import { a as canonicalRecordBytes, b as reference, c as prepareProgressAppend, d as resolveExecutionEvidence, f as runEvidence, h as verifyRunContinuations, l as readContinuation, m as validateSuffix, n as CurrentRunWriter, o as isOperationalRecord, p as validateProgressAppend, r as ProgressAppendReader, s as makeProgressWriter, t as CurrentRunSettlement, u as readRunEvidenceSnapshot, x as resolveEvidence } from "../RunContinuation-BiyKJK32.mjs";
4
4
  export { CurrentRunSettlement, CurrentRunWriter, EvidenceReference, ProgressAppendReader, RunContextRecorded, RunContinuation, canonicalRecordBytes, canonicalRunIds, executionRunIds, isOperationalRecord, isPreContinuationFact, isWorkHandoff, makeProgressWriter, prepareProgressAppend, readContinuation, readRunEvidenceSnapshot, reference, resolveEvidence, resolveExecutionEvidence, runEvidence, terminalUsageCharge, validateProgressAppend, validateSuffix, verifyRunContinuations };
@@ -1,2 +1,2 @@
1
- import { $o as subagentRequestedBatchId, Ao as childIdempotencyKeyFor, Bo as projectRunJournal, Co as RunJournalError, Cs as toolCallSettledRecordId, Do as TurnCommitInput, Fo as markUnknownBatchId, Go as runDurationRecordId, Ho as promptFromCanonicalRecords, Io as modelResponseInterruptedBatchId, Jo as runStartedRecordId, Ko as runIdForSubmission, Lo as modelResponseInterruptedRecordId, Mo as compactionBatchId, No as compactionRecordId, Oo as agentUpdateRecordId, Po as firstWorkerInputRecordId, Qo as subagentLineageRecordId, Ro as modelResponseRecordId, So as RunJournalContext, To as RunJournalUsage, Uo as runCompletedRecordId, Vo as projectRunJournalStream, Wo as runDurationBatchId, Xo as subagentJoinedRecordId, Yo as subagentJoinBatchId, Zo as subagentLineageBatchId, _s as turnResultsBatch, as as toolCallResolutionBatchId, bs as workerOriginRecordId, cs as toolCallUnknownRecordId, ds as turnApprovalsBatchId, es as subagentRequestedRecordId, fs as turnBatchId, gs as turnResponseBatchId, hs as turnResponseBatch, is as toolApprovalRequestRecordId, jo as childThreadIdFor, ko as approvalDecisionBatchId, ls as toolStepSettledBatchId, ms as turnIdForRun, ns as subagentStartedRecordId, os as toolCallResolvedRecordId, ps as turnCanonicalBatch, qo as runStartedBatchId, rs as toolApprovalDecisionRecordId, ss as toolCallResultBatchId, ts as subagentStartedBatchId, us as toolStepSettledRecordId, vs as turnResultsBatchId, wo as RunJournalProjection, xo as JournalBoundary, xs as workerReportRecordId, ys as workerInputRecordId, zo as peerMessageRecordId } from "../Admin-BX9ns28E.mjs";
2
- export { JournalBoundary, RunJournalContext, RunJournalError, RunJournalProjection, RunJournalUsage, TurnCommitInput, agentUpdateRecordId, approvalDecisionBatchId, childIdempotencyKeyFor, childThreadIdFor, compactionBatchId, compactionRecordId, firstWorkerInputRecordId, markUnknownBatchId, modelResponseInterruptedBatchId, modelResponseInterruptedRecordId, modelResponseRecordId, peerMessageRecordId, projectRunJournal, projectRunJournalStream, promptFromCanonicalRecords, runCompletedRecordId, runDurationBatchId, runDurationRecordId, runIdForSubmission, runStartedBatchId, runStartedRecordId, subagentJoinBatchId, subagentJoinedRecordId, subagentLineageBatchId, subagentLineageRecordId, subagentRequestedBatchId, subagentRequestedRecordId, subagentStartedBatchId, subagentStartedRecordId, toolApprovalDecisionRecordId, toolApprovalRequestRecordId, toolCallResolutionBatchId, toolCallResolvedRecordId, toolCallResultBatchId, toolCallSettledRecordId, toolCallUnknownRecordId, toolStepSettledBatchId, toolStepSettledRecordId, turnApprovalsBatchId, turnBatchId, turnCanonicalBatch, turnIdForRun, turnResponseBatch, turnResponseBatchId, turnResultsBatch, turnResultsBatchId, workerInputRecordId, workerOriginRecordId, workerReportRecordId };
1
+ import { $o as subagentLineageBatchId, Ao as approvalDecisionBatchId, Bo as modelResponseRecordId, Co as RunJournalContext, Cs as workerReportRecordId, Eo as RunJournalUsage, Fo as firstWorkerInputRecordId, Go as runCompletedRecordId, Ho as projectRunJournal, Io as initialRunJournal, Jo as runIdForSubmission, Ko as runDurationBatchId, Lo as markUnknownBatchId, Mo as childThreadIdFor, No as compactionBatchId, Oo as TurnCommitInput, Po as compactionRecordId, Qo as subagentJoinedRecordId, Ro as modelResponseInterruptedBatchId, So as JournalBoundary, Ss as workerOriginRecordId, To as RunJournalProjection, Ts as toolCallSettledRecordId, Uo as projectRunJournalStream, Vo as peerMessageRecordId, Wo as promptFromCanonicalRecords, Xo as runStartedRecordId, Yo as runStartedBatchId, Zo as subagentJoinBatchId, _s as turnResponseBatch, as as toolApprovalDecisionRecordId, bs as turnResultsBatchId, cs as toolCallResolvedRecordId, ds as toolStepSettledBatchId, es as subagentLineageRecordId, fs as toolStepSettledRecordId, gs as turnIdForRun, hs as turnCanonicalBatch, is as subagentStartedRecordId, jo as childIdempotencyKeyFor, ko as agentUpdateRecordId, ls as toolCallResultBatchId, ms as turnBatchId, ns as subagentRequestedRecordId, os as toolApprovalRequestRecordId, ps as turnApprovalsBatchId, qo as runDurationRecordId, rs as subagentStartedBatchId, ss as toolCallResolutionBatchId, ts as subagentRequestedBatchId, us as toolCallUnknownRecordId, vs as turnResponseBatchId, wo as RunJournalError, xs as workerInputRecordId, ys as turnResultsBatch, zo as modelResponseInterruptedRecordId } from "../Admin-Qa3I1oA5.mjs";
2
+ export { JournalBoundary, RunJournalContext, RunJournalError, RunJournalProjection, RunJournalUsage, TurnCommitInput, agentUpdateRecordId, approvalDecisionBatchId, childIdempotencyKeyFor, childThreadIdFor, compactionBatchId, compactionRecordId, firstWorkerInputRecordId, initialRunJournal, markUnknownBatchId, modelResponseInterruptedBatchId, modelResponseInterruptedRecordId, modelResponseRecordId, peerMessageRecordId, projectRunJournal, projectRunJournalStream, promptFromCanonicalRecords, runCompletedRecordId, runDurationBatchId, runDurationRecordId, runIdForSubmission, runStartedBatchId, runStartedRecordId, subagentJoinBatchId, subagentJoinedRecordId, subagentLineageBatchId, subagentLineageRecordId, subagentRequestedBatchId, subagentRequestedRecordId, subagentStartedBatchId, subagentStartedRecordId, toolApprovalDecisionRecordId, toolApprovalRequestRecordId, toolCallResolutionBatchId, toolCallResolvedRecordId, toolCallResultBatchId, toolCallSettledRecordId, toolCallUnknownRecordId, toolStepSettledBatchId, toolStepSettledRecordId, turnApprovalsBatchId, turnBatchId, turnCanonicalBatch, turnIdForRun, turnResponseBatch, turnResponseBatchId, turnResultsBatch, turnResultsBatchId, workerInputRecordId, workerOriginRecordId, workerReportRecordId };
@@ -1,2 +1,2 @@
1
- import { A as subagentStartedBatchId, B as turnApprovalsBatchId, C as runStartedRecordId, D as subagentLineageRecordId, E as subagentLineageBatchId, F as toolCallResolvedRecordId, G as turnResponseBatchId, H as turnCanonicalBatch, I as toolCallResultBatchId, J as workerInputRecordId, K as turnResultsBatch, L as toolCallUnknownRecordId, M as toolApprovalDecisionRecordId, N as toolApprovalRequestRecordId, O as subagentRequestedBatchId, P as toolCallResolutionBatchId, Q as toolCallSettledRecordId, R as toolStepSettledBatchId, S as runStartedBatchId, T as subagentJoinedRecordId, U as turnIdForRun, V as turnBatchId, W as turnResponseBatch, X as workerReportRecordId, Y as workerOriginRecordId, _ as promptFromCanonicalRecords, a as childIdempotencyKeyFor, b as runDurationRecordId, c as compactionRecordId, d as modelResponseInterruptedBatchId, f as modelResponseInterruptedRecordId, g as projectRunJournalStream, h as projectRunJournal, i as approvalDecisionBatchId, j as subagentStartedRecordId, k as subagentRequestedRecordId, l as firstWorkerInputRecordId, m as peerMessageRecordId, o as childThreadIdFor, p as modelResponseRecordId, q as turnResultsBatchId, r as agentUpdateRecordId, s as compactionBatchId, t as RunJournalError, u as markUnknownBatchId, v as runCompletedRecordId, w as subagentJoinBatchId, x as runIdForSubmission, y as runDurationBatchId, z as toolStepSettledRecordId } from "../RunJournal-kfKVxJj7.mjs";
2
- export { RunJournalError, agentUpdateRecordId, approvalDecisionBatchId, childIdempotencyKeyFor, childThreadIdFor, compactionBatchId, compactionRecordId, firstWorkerInputRecordId, markUnknownBatchId, modelResponseInterruptedBatchId, modelResponseInterruptedRecordId, modelResponseRecordId, peerMessageRecordId, projectRunJournal, projectRunJournalStream, promptFromCanonicalRecords, runCompletedRecordId, runDurationBatchId, runDurationRecordId, runIdForSubmission, runStartedBatchId, runStartedRecordId, subagentJoinBatchId, subagentJoinedRecordId, subagentLineageBatchId, subagentLineageRecordId, subagentRequestedBatchId, subagentRequestedRecordId, subagentStartedBatchId, subagentStartedRecordId, toolApprovalDecisionRecordId, toolApprovalRequestRecordId, toolCallResolutionBatchId, toolCallResolvedRecordId, toolCallResultBatchId, toolCallSettledRecordId, toolCallUnknownRecordId, toolStepSettledBatchId, toolStepSettledRecordId, turnApprovalsBatchId, turnBatchId, turnCanonicalBatch, turnIdForRun, turnResponseBatch, turnResponseBatchId, turnResultsBatch, turnResultsBatchId, workerInputRecordId, workerOriginRecordId, workerReportRecordId };
1
+ import { A as subagentRequestedRecordId, B as toolStepSettledRecordId, C as runStartedBatchId, D as subagentLineageBatchId, E as subagentJoinedRecordId, F as toolCallResolutionBatchId, G as turnResponseBatch, H as turnBatchId, I as toolCallResolvedRecordId, J as turnResultsBatchId, K as turnResponseBatchId, L as toolCallResultBatchId, M as subagentStartedRecordId, N as toolApprovalDecisionRecordId, O as subagentLineageRecordId, P as toolApprovalRequestRecordId, R as toolCallUnknownRecordId, S as runIdForSubmission, T as subagentJoinBatchId, U as turnCanonicalBatch, V as turnApprovalsBatchId, W as turnIdForRun, X as workerOriginRecordId, Y as workerInputRecordId, Z as workerReportRecordId, _ as projectRunJournalStream, a as childIdempotencyKeyFor, b as runDurationBatchId, c as compactionRecordId, d as markUnknownBatchId, et as toolCallSettledRecordId, f as modelResponseInterruptedBatchId, g as projectRunJournal, h as peerMessageRecordId, i as approvalDecisionBatchId, j as subagentStartedBatchId, k as subagentRequestedBatchId, l as firstWorkerInputRecordId, m as modelResponseRecordId, o as childThreadIdFor, p as modelResponseInterruptedRecordId, q as turnResultsBatch, r as agentUpdateRecordId, s as compactionBatchId, t as RunJournalError, u as initialRunJournal, v as promptFromCanonicalRecords, w as runStartedRecordId, x as runDurationRecordId, y as runCompletedRecordId, z as toolStepSettledBatchId } from "../RunJournal-CPMKcfd0.mjs";
2
+ export { RunJournalError, agentUpdateRecordId, approvalDecisionBatchId, childIdempotencyKeyFor, childThreadIdFor, compactionBatchId, compactionRecordId, firstWorkerInputRecordId, initialRunJournal, markUnknownBatchId, modelResponseInterruptedBatchId, modelResponseInterruptedRecordId, modelResponseRecordId, peerMessageRecordId, projectRunJournal, projectRunJournalStream, promptFromCanonicalRecords, runCompletedRecordId, runDurationBatchId, runDurationRecordId, runIdForSubmission, runStartedBatchId, runStartedRecordId, subagentJoinBatchId, subagentJoinedRecordId, subagentLineageBatchId, subagentLineageRecordId, subagentRequestedBatchId, subagentRequestedRecordId, subagentStartedBatchId, subagentStartedRecordId, toolApprovalDecisionRecordId, toolApprovalRequestRecordId, toolCallResolutionBatchId, toolCallResolvedRecordId, toolCallResultBatchId, toolCallSettledRecordId, toolCallUnknownRecordId, toolStepSettledBatchId, toolStepSettledRecordId, turnApprovalsBatchId, turnBatchId, turnCanonicalBatch, turnIdForRun, turnResponseBatch, turnResponseBatchId, turnResultsBatch, turnResultsBatchId, workerInputRecordId, workerOriginRecordId, workerReportRecordId };
@@ -1,2 +1,2 @@
1
- import { Fr as RunStorageSession, Ir as RunWriter, Lr as layer, Mr as RunChildBudgetReservation, Nr as RunOwnership, Pr as RunStorage, Rr as make, _o as OwnerGeneration, bo as makeStorageOwner, go as MutationGate, jr as RunChildAttachment, vo as StorageOwner, yo as StorageOwnerService, zr as makeRunWriter } from "../Admin-BX9ns28E.mjs";
1
+ import { Fr as RunStorageSession, Ir as RunWriter, Lr as layer, Mr as RunChildBudgetReservation, Nr as RunOwnership, Pr as RunStorage, Rr as make, _o as MutationGate, bo as StorageOwnerService, jr as RunChildAttachment, vo as OwnerGeneration, xo as makeStorageOwner, yo as StorageOwner, zr as makeRunWriter } from "../Admin-Qa3I1oA5.mjs";
2
2
  export { type MutationGate, type OwnerGeneration, RunChildAttachment, RunChildBudgetReservation, RunOwnership, RunStorage, RunStorageSession, RunWriter, StorageOwner, type StorageOwnerService, layer, make, makeRunWriter, makeStorageOwner };
@@ -1,2 +1,2 @@
1
- import { a as make, c as makeStorageOwner, i as layer, n as RunChildBudgetReservation, o as makeRunWriter, r as RunStorage, s as StorageOwner, t as RunChildAttachment } from "../RunStorage-uqPxps09.mjs";
1
+ import { a as make, c as makeStorageOwner, i as layer, n as RunChildBudgetReservation, o as makeRunWriter, r as RunStorage, s as StorageOwner, t as RunChildAttachment } from "../RunStorage-CzutHJBE.mjs";
2
2
  export { RunChildAttachment, RunChildBudgetReservation, RunStorage, StorageOwner, layer, make, makeRunWriter, makeStorageOwner };
@@ -2,7 +2,7 @@ import { t as __exportAll } from "../rolldown-runtime-D7D4PA-g.mjs";
2
2
  import { AgentId, ThreadId } from "../core/Identifiers.mjs";
3
3
  import { IdempotencyKey, Principal, Receipt } from "../core/Receipt.mjs";
4
4
  import { o as Value } from "../FailureDiagnostic-D9oW23Cn.mjs";
5
- import { U as PersistedJson, b as Digest, v as DefinitionDigests } from "../Records-BiuJDWNe.mjs";
5
+ import { U as PersistedJson, b as Digest, v as DefinitionDigests } from "../Records-DzL4Kbtw.mjs";
6
6
  import { AdmissionFence, AdmissionGroup } from "./SubmissionLedger.mjs";
7
7
  import { Context, Effect, Schema } from "effect";
8
8
  //#region src/durable/Schedule.ts
@@ -1,6 +1,6 @@
1
1
  import { AgentId, ReceiptId, SubmissionId, ThreadId } from "../core/Identifiers.mjs";
2
2
  import { IdempotencyKey, Principal, QueueSequence, Receipt } from "../core/Receipt.mjs";
3
- import { b as Digest, v as DefinitionDigests } from "../Records-BiuJDWNe.mjs";
3
+ import { b as Digest, v as DefinitionDigests } from "../Records-DzL4Kbtw.mjs";
4
4
  import { ScheduleCapacityError, ScheduleId, ScheduleStore } from "./Schedule.mjs";
5
5
  import { Effect, Result, Schema } from "effect";
6
6
  //#region src/durable/ScheduleStoreConformance.ts
@@ -1,5 +1,5 @@
1
1
  import { t as __exportAll } from "../rolldown-runtime-D7D4PA-g.mjs";
2
- import { U as PersistedJson, v as DefinitionDigests } from "../Records-BiuJDWNe.mjs";
2
+ import { U as PersistedJson, v as DefinitionDigests } from "../Records-DzL4Kbtw.mjs";
3
3
  import { AdmissionFence } from "./SubmissionLedger.mjs";
4
4
  import { ScheduleConflict } from "./Schedule.mjs";
5
5
  import { Result, Schema } from "effect";
@@ -1,6 +1,6 @@
1
1
  import { r as Principal } from "../Receipt-BkM21Qiu.mjs";
2
2
  import { b as DefinitionDigests } from "../Records-BTnGRdcf.mjs";
3
- import { cr as DurableSubmitAgent, pt as AdmissionFence } from "../Admin-BX9ns28E.mjs";
3
+ import { cr as DurableSubmitAgent, pt as AdmissionFence } from "../Admin-Qa3I1oA5.mjs";
4
4
  import { A as ScheduleSnapshotPage, B as ScheduledInputAdmission, C as ScheduleRecord, D as ScheduleScope, F as ScheduleTimingRequest, I as ScheduleValidationError, L as ScheduleWake, M as ScheduleStore, N as ScheduleStoreFailure, W as SchedulingLimits, c as ScheduleDestination, f as ScheduleId, j as ScheduleStorageError, k as ScheduleSnapshot, m as ScheduleKey, n as ScheduleAuthorizationError, r as ScheduleAuthorizer, y as ScheduleOwner } from "../Schedule-CDgTz0vj.mjs";
5
5
  import { Context, Crypto, Effect, Layer, Schema } from "effect";
6
6
  declare namespace Scheduling_d_exports {
@@ -1,2 +1,2 @@
1
- import { n as ScheduleWakeNoop, r as Scheduling, t as ScheduleDriver } from "../Scheduling-CVyfXlBR.mjs";
1
+ import { n as ScheduleWakeNoop, r as Scheduling, t as ScheduleDriver } from "../Scheduling-07_dsGED.mjs";
2
2
  export { ScheduleDriver, ScheduleWakeNoop, Scheduling };
@@ -1,2 +1,2 @@
1
- import { Br as SettlementPublication, Gr as validateCanonicalSettlement, Hr as SettlementPublicationFailure, Kr as validateJoinedSettlement, Ur as SettlementPublicationResult, Vr as SettlementPublicationAuthority, Wr as SettlementPublisher, qr as validatePublication } from "../Admin-BX9ns28E.mjs";
1
+ import { Br as SettlementPublication, Gr as validateCanonicalSettlement, Hr as SettlementPublicationFailure, Kr as validateJoinedSettlement, Ur as SettlementPublicationResult, Vr as SettlementPublicationAuthority, Wr as SettlementPublisher, qr as validatePublication } from "../Admin-Qa3I1oA5.mjs";
2
2
  export { SettlementPublication, SettlementPublicationAuthority, SettlementPublicationFailure, SettlementPublicationResult, SettlementPublisher, validateCanonicalSettlement, validateJoinedSettlement, validatePublication };
@@ -1,8 +1,8 @@
1
1
  import { SubmissionId } from "../core/Identifiers.mjs";
2
- import { X as RecordEnvelope, f as CanonicalSequence, gt as SubmissionSettled } from "../Records-BiuJDWNe.mjs";
2
+ import { X as RecordEnvelope, f as CanonicalSequence, gt as SubmissionSettled } from "../Records-DzL4Kbtw.mjs";
3
3
  import { LedgerError, submissionSettlementBatchId, submissionSettlementId, submissionSettlementRecordId } from "./SubmissionLedger.mjs";
4
- import { x as runIdForSubmission } from "../RunJournal-kfKVxJj7.mjs";
5
- import { h as PreparedAppend, n as AppendRequest } from "../ThreadStore-CEekRa80.mjs";
4
+ import { S as runIdForSubmission } from "../RunJournal-CPMKcfd0.mjs";
5
+ import { h as PreparedAppend, n as AppendRequest } from "../ThreadStore-EuUilthA.mjs";
6
6
  import { Context, Effect, Schema } from "effect";
7
7
  //#region src/durable/SettlementPublisher.ts
8
8
  /** Authority rechecked atomically on every publication attempt, including canonical replay. */
@@ -16,8 +16,10 @@ const EncodedMemoryChange = Schema.Struct({
16
16
  documentJson: StoredJson,
17
17
  resultJson: StoredJson
18
18
  });
19
- const equivalentContent = Schema.toEquivalence(Schema.toEncoded(MemoryWrite.Wire.members[0].fields.content));
20
- const equivalentScopes = Schema.toEquivalence(MemoryWrite.Wire.members[0].fields.scopes);
19
+ const makeEquivalentContent = () => Schema.toEquivalence(Schema.toEncoded(MemoryWrite.Wire.members[0].fields.content));
20
+ let equivalentContent;
21
+ const makeEquivalentScopes = () => Schema.toEquivalence(MemoryWrite.Wire.members[0].fields.scopes);
22
+ let equivalentScopes;
21
23
  /** Ordered commands committed atomically by the SQL memory adapter. */
22
24
  const SqlMemoryWriteBatch = Schema.Array(MemoryWrite.Wire).check(Schema.isMaxLength(128));
23
25
  /**
@@ -190,7 +192,7 @@ const validateReceiptResult = Effect.fnUntraced(function* (command, result, oper
190
192
  if ((result.predecessor?.revision ?? null) !== command.expectedRevision) return yield* storageError(operation, "corrupt");
191
193
  if (command._tag === "Put") {
192
194
  if (result._tag !== "ActiveMemoryDocument" || result.source.locator !== command.locator) return yield* storageError(operation, "corrupt");
193
- if (!equivalentContent(command.content, result.content) || !equivalentScopes(command.scopes, result.scopes)) return yield* storageError(operation, "corrupt");
195
+ if (!(equivalentContent ??= makeEquivalentContent())(command.content, result.content) || !(equivalentScopes ??= makeEquivalentScopes())(command.scopes, result.scopes)) return yield* storageError(operation, "corrupt");
194
196
  return;
195
197
  }
196
198
  if (result._tag !== "WithdrawnMemoryDocument" || result.reason !== command.reason || result.predecessor === null || result.source.locator !== result.predecessor.locator) return yield* storageError(operation, "corrupt");