effect-agent 0.1.0-beta.12 → 0.1.0-beta.121

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 (553) hide show
  1. package/dist/Agent-1DMSO_Fl.mjs +86 -0
  2. package/dist/Agent-1DMSO_Fl.mjs.map +1 -0
  3. package/dist/Agent-D9cXqfF3.d.mts +252 -0
  4. package/dist/AgentError-Bn1ytXRD.d.mts +117 -0
  5. package/dist/AgentPolicy-BqDoSXO6.d.mts +96 -0
  6. package/dist/AgentRuntime-BUxDdLpw.d.mts +346 -0
  7. package/dist/AgentRuntime-Cp1hAb-W.mjs +4739 -0
  8. package/dist/AgentRuntime-Cp1hAb-W.mjs.map +1 -0
  9. package/dist/AgentUpdates-DMJ-_xow.d.mts +53 -0
  10. package/dist/ContextCompactor-WwSIG_Z2.d.mts +161 -0
  11. package/dist/ContextWindow-DRQ5Mbm2.d.mts +58 -0
  12. package/dist/DurableAgentRuntime-B-9w7jDt.mjs +7061 -0
  13. package/dist/DurableAgentRuntime-B-9w7jDt.mjs.map +1 -0
  14. package/dist/DurableFailpoint-Cnr3wx1L.d.mts +41 -0
  15. package/dist/DurableStep-Cry_iol4.d.mts +103 -0
  16. package/dist/EventSource-CnlZ3Kma.d.mts +51 -0
  17. package/dist/FailureDiagnostic-BElLOoED.mjs +274 -0
  18. package/dist/FailureDiagnostic-BElLOoED.mjs.map +1 -0
  19. package/dist/FailureDiagnostic-CaAkzGHL.d.mts +223 -0
  20. package/dist/Identifiers-CN2s30fF.d.mts +40 -0
  21. package/dist/InMemory.d.mts +24 -0
  22. package/dist/InMemory.mjs +24 -0
  23. package/dist/InMemory.mjs.map +1 -0
  24. package/dist/MemoryNamespace-BbRW5p71.d.mts +36 -0
  25. package/dist/MemoryReference-B8Q3UJoJ.d.mts +79 -0
  26. package/dist/Messaging-Dkg87ebg.d.mts +221 -0
  27. package/dist/Messaging-JYYN3oYS.d.mts +1067 -0
  28. package/dist/MessagingHost-CqzpxbGz.d.mts +74 -0
  29. package/dist/MessagingHost-DfsbMPvq.mjs +110 -0
  30. package/dist/MessagingHost-DfsbMPvq.mjs.map +1 -0
  31. package/dist/OperationAuthorizer-TzcQtpX5.d.mts +61 -0
  32. package/dist/Output-V-6YL1_Z.d.mts +25 -0
  33. package/dist/PageCapture-Df8Xwskw.d.mts +583 -0
  34. package/dist/PageScreenshot-BpgZKAxl.d.mts +48 -0
  35. package/dist/PreparedInputAdmission-BQLGldl-.d.mts +42 -0
  36. package/dist/Receipt-BAHyigAF.d.mts +33 -0
  37. package/dist/Records-D88mgvyS.d.mts +4214 -0
  38. package/dist/RunEvent-DIrzkjLr.d.mts +460 -0
  39. package/dist/RunEventSink-D5aVhISG.d.mts +108 -0
  40. package/dist/RunJournal-BXrq0VIK.mjs +931 -0
  41. package/dist/RunJournal-BXrq0VIK.mjs.map +1 -0
  42. package/dist/RunOptions-CSBsSj0X.d.mts +935 -0
  43. package/dist/RunPolicyUsage-ClZxyR46.d.mts +21 -0
  44. package/dist/Sandbox-CEsDWBLq.d.mts +173 -0
  45. package/dist/Schedule-BIOHA6RR.d.mts +847 -0
  46. package/dist/Scheduling-DPb2QyAK.mjs +691 -0
  47. package/dist/Scheduling-DPb2QyAK.mjs.map +1 -0
  48. package/dist/Subagent-CNik9RiA.d.mts +1635 -0
  49. package/dist/Subagent-DCrB7an7.mjs +1498 -0
  50. package/dist/Subagent-DCrB7an7.mjs.map +1 -0
  51. package/dist/SubagentContract-DdT7Cqe6.d.mts +116 -0
  52. package/dist/SubagentHost-4WB8Hj0C.d.mts +164 -0
  53. package/dist/Subscription-CRteOKRf.d.mts +948 -0
  54. package/dist/SubscriptionInput-oNcwTPti.d.mts +41 -0
  55. package/dist/Thread-DOBQ0QUY.d.mts +96 -0
  56. package/dist/ThreadHistory-tS1KwxHR.d.mts +60 -0
  57. package/dist/ToolBroker-DWs4tZra.d.mts +133 -0
  58. package/dist/ToolExposure-9uF_Yo0T.mjs +10 -0
  59. package/dist/ToolExposure-9uF_Yo0T.mjs.map +1 -0
  60. package/dist/ToolExposure-C93U1sPu.mjs +30 -0
  61. package/dist/ToolExposure-C93U1sPu.mjs.map +1 -0
  62. package/dist/ToolExposure-UCN12eCd.d.mts +39 -0
  63. package/dist/ToolExposure-r2eOWk4F.d.mts +46 -0
  64. package/dist/ToolExposure.d.mts +8 -0
  65. package/dist/ToolExposure.mjs +21 -0
  66. package/dist/ToolExposure.mjs.map +1 -0
  67. package/dist/ToolReconciler-BmVRAHKs.d.mts +80 -0
  68. package/dist/ToolResult-BKdqWRff.d.mts +78 -0
  69. package/dist/Usage-Dx0aknfk.d.mts +121 -0
  70. package/dist/WakeScheduler-EjUF-GhC.d.mts +56 -0
  71. package/dist/Worker-CfwzMZEK.mjs +271 -0
  72. package/dist/Worker-CfwzMZEK.mjs.map +1 -0
  73. package/dist/Worker-fwWkBg12.d.mts +472 -0
  74. package/dist/agent-registration-CKNsrpwo.mjs +201 -0
  75. package/dist/agent-registration-CKNsrpwo.mjs.map +1 -0
  76. package/dist/capabilities/Approval.d.mts +114 -0
  77. package/dist/capabilities/Approval.mjs +226 -0
  78. package/dist/capabilities/Approval.mjs.map +1 -0
  79. package/dist/capabilities/Budget.d.mts +112 -0
  80. package/dist/capabilities/Budget.mjs +346 -0
  81. package/dist/capabilities/Budget.mjs.map +1 -0
  82. package/dist/capabilities/CodeMode.d.mts +157 -0
  83. package/dist/capabilities/CodeMode.mjs +522 -0
  84. package/dist/capabilities/CodeMode.mjs.map +1 -0
  85. package/dist/capabilities/Commands.d.mts +55 -0
  86. package/dist/capabilities/Commands.mjs +57 -0
  87. package/dist/capabilities/Commands.mjs.map +1 -0
  88. package/dist/capabilities/ContextTools.d.mts +321 -0
  89. package/dist/capabilities/ContextTools.mjs +126 -0
  90. package/dist/capabilities/ContextTools.mjs.map +1 -0
  91. package/dist/capabilities/Mcp.d.mts +108 -0
  92. package/dist/capabilities/Mcp.mjs +259 -0
  93. package/dist/capabilities/Mcp.mjs.map +1 -0
  94. package/dist/capabilities/McpClient.d.mts +115 -0
  95. package/dist/capabilities/McpClient.mjs +506 -0
  96. package/dist/capabilities/McpClient.mjs.map +1 -0
  97. package/dist/capabilities/MemoryNotes.d.mts +424 -0
  98. package/dist/capabilities/MemoryNotes.mjs +128 -0
  99. package/dist/capabilities/MemoryNotes.mjs.map +1 -0
  100. package/dist/capabilities/Messaging.d.mts +3 -0
  101. package/dist/capabilities/Messaging.mjs +152 -0
  102. package/dist/capabilities/Messaging.mjs.map +1 -0
  103. package/dist/capabilities/ModelContext.d.mts +89 -0
  104. package/dist/capabilities/ModelContext.mjs +168 -0
  105. package/dist/capabilities/ModelContext.mjs.map +1 -0
  106. package/dist/capabilities/Redaction.d.mts +37 -0
  107. package/dist/capabilities/Redaction.mjs +104 -0
  108. package/dist/capabilities/Redaction.mjs.map +1 -0
  109. package/dist/capabilities/Remembering.d.mts +434 -0
  110. package/dist/capabilities/Remembering.mjs +290 -0
  111. package/dist/capabilities/Remembering.mjs.map +1 -0
  112. package/dist/capabilities/RunHooks.d.mts +82 -0
  113. package/dist/capabilities/RunHooks.mjs +144 -0
  114. package/dist/capabilities/RunHooks.mjs.map +1 -0
  115. package/dist/capabilities/SemanticMemory.d.mts +431 -0
  116. package/dist/capabilities/SemanticMemory.mjs +315 -0
  117. package/dist/capabilities/SemanticMemory.mjs.map +1 -0
  118. package/dist/capabilities/Subagent.d.mts +4 -0
  119. package/dist/capabilities/Subagent.mjs +5 -0
  120. package/dist/capabilities/SubagentReservations.d.mts +186 -0
  121. package/dist/capabilities/SubagentReservations.mjs +479 -0
  122. package/dist/capabilities/SubagentReservations.mjs.map +1 -0
  123. package/dist/capabilities/ToolDiscovery.d.mts +124 -0
  124. package/dist/capabilities/ToolDiscovery.mjs +230 -0
  125. package/dist/capabilities/ToolDiscovery.mjs.map +1 -0
  126. package/dist/capabilities/WebCapture.d.mts +163 -0
  127. package/dist/capabilities/WebCapture.mjs +335 -0
  128. package/dist/capabilities/WebCapture.mjs.map +1 -0
  129. package/dist/capabilities/WebSearch.d.mts +71 -0
  130. package/dist/capabilities/WebSearch.mjs +115 -0
  131. package/dist/capabilities/WebSearch.mjs.map +1 -0
  132. package/dist/compaction-C2OTceKw.mjs +505 -0
  133. package/dist/compaction-C2OTceKw.mjs.map +1 -0
  134. package/dist/core/Agent.d.mts +2 -0
  135. package/dist/core/Agent.mjs +2 -0
  136. package/dist/core/AgentError.d.mts +2 -0
  137. package/dist/core/AgentError.mjs +134 -0
  138. package/dist/core/AgentError.mjs.map +1 -0
  139. package/dist/core/AgentPolicy.d.mts +2 -0
  140. package/dist/core/AgentPolicy.mjs +94 -0
  141. package/dist/core/AgentPolicy.mjs.map +1 -0
  142. package/dist/core/AgentUpdates.d.mts +2 -0
  143. package/dist/core/AgentUpdates.mjs +63 -0
  144. package/dist/core/AgentUpdates.mjs.map +1 -0
  145. package/dist/core/FailureDiagnostic.d.mts +2 -0
  146. package/dist/core/FailureDiagnostic.mjs +2 -0
  147. package/dist/core/IdGenerator.d.mts +26 -0
  148. package/dist/core/IdGenerator.mjs +27 -0
  149. package/dist/core/IdGenerator.mjs.map +1 -0
  150. package/dist/core/Identifiers.d.mts +2 -0
  151. package/dist/core/Identifiers.mjs +43 -0
  152. package/dist/core/Identifiers.mjs.map +1 -0
  153. package/dist/core/Memory.d.mts +57 -0
  154. package/dist/core/Memory.mjs +203 -0
  155. package/dist/core/Memory.mjs.map +1 -0
  156. package/dist/core/MemoryNamespace.d.mts +2 -0
  157. package/dist/core/MemoryNamespace.mjs +116 -0
  158. package/dist/core/MemoryNamespace.mjs.map +1 -0
  159. package/dist/core/MemoryReference.d.mts +2 -0
  160. package/dist/core/MemoryReference.mjs +109 -0
  161. package/dist/core/MemoryReference.mjs.map +1 -0
  162. package/dist/core/MemoryRevalidation.d.mts +65 -0
  163. package/dist/core/MemoryRevalidation.mjs +126 -0
  164. package/dist/core/MemoryRevalidation.mjs.map +1 -0
  165. package/dist/core/MemoryStore.d.mts +186 -0
  166. package/dist/core/MemoryStore.mjs +243 -0
  167. package/dist/core/MemoryStore.mjs.map +1 -0
  168. package/dist/core/Receipt.d.mts +2 -0
  169. package/dist/core/Receipt.mjs +36 -0
  170. package/dist/core/Receipt.mjs.map +1 -0
  171. package/dist/core/RememberingStore.d.mts +1562 -0
  172. package/dist/core/RememberingStore.mjs +190 -0
  173. package/dist/core/RememberingStore.mjs.map +1 -0
  174. package/dist/core/RunEvent.d.mts +2 -0
  175. package/dist/core/RunEvent.mjs +337 -0
  176. package/dist/core/RunEvent.mjs.map +1 -0
  177. package/dist/core/RunPolicyUsage.d.mts +2 -0
  178. package/dist/core/RunPolicyUsage.mjs +21 -0
  179. package/dist/core/RunPolicyUsage.mjs.map +1 -0
  180. package/dist/core/SemanticMemoryIndex.d.mts +826 -0
  181. package/dist/core/SemanticMemoryIndex.mjs +185 -0
  182. package/dist/core/SemanticMemoryIndex.mjs.map +1 -0
  183. package/dist/core/SemanticMemoryRevalidation.d.mts +45 -0
  184. package/dist/core/SemanticMemoryRevalidation.mjs +191 -0
  185. package/dist/core/SemanticMemoryRevalidation.mjs.map +1 -0
  186. package/dist/core/SubagentContract.d.mts +2 -0
  187. package/dist/core/SubagentContract.mjs +148 -0
  188. package/dist/core/SubagentContract.mjs.map +1 -0
  189. package/dist/core/Thread.d.mts +2 -0
  190. package/dist/core/Thread.mjs +250 -0
  191. package/dist/core/Thread.mjs.map +1 -0
  192. package/dist/core/ToolResult.d.mts +2 -0
  193. package/dist/core/ToolResult.mjs +156 -0
  194. package/dist/core/ToolResult.mjs.map +1 -0
  195. package/dist/core/Usage.d.mts +2 -0
  196. package/dist/core/Usage.mjs +319 -0
  197. package/dist/core/Usage.mjs.map +1 -0
  198. package/dist/core/Worker.d.mts +3 -0
  199. package/dist/core/Worker.mjs +3 -0
  200. package/dist/durable/ActivityStore.d.mts +116 -0
  201. package/dist/durable/ActivityStore.mjs +131 -0
  202. package/dist/durable/ActivityStore.mjs.map +1 -0
  203. package/dist/durable/Admin.d.mts +2 -0
  204. package/dist/durable/Admin.mjs +330 -0
  205. package/dist/durable/Admin.mjs.map +1 -0
  206. package/dist/durable/AgentRegistration.d.mts +2 -0
  207. package/dist/durable/AgentRegistration.mjs +14 -0
  208. package/dist/durable/AgentRegistration.mjs.map +1 -0
  209. package/dist/durable/Certification.d.mts +110 -0
  210. package/dist/durable/Certification.mjs +159 -0
  211. package/dist/durable/Certification.mjs.map +1 -0
  212. package/dist/durable/CommittedActivity.d.mts +62 -0
  213. package/dist/durable/CommittedActivity.mjs +159 -0
  214. package/dist/durable/CommittedActivity.mjs.map +1 -0
  215. package/dist/durable/Digest.d.mts +2 -0
  216. package/dist/durable/Digest.mjs +50 -0
  217. package/dist/durable/Digest.mjs.map +1 -0
  218. package/dist/durable/DurableAgentRuntime.d.mts +3 -0
  219. package/dist/durable/DurableAgentRuntime.mjs +3 -0
  220. package/dist/durable/DurableFailpoint.d.mts +2 -0
  221. package/dist/durable/DurableFailpoint.mjs +102 -0
  222. package/dist/durable/DurableFailpoint.mjs.map +1 -0
  223. package/dist/durable/DurableFailpointTestControl.d.mts +14 -0
  224. package/dist/durable/DurableFailpointTestControl.mjs +19 -0
  225. package/dist/durable/DurableFailpointTestControl.mjs.map +1 -0
  226. package/dist/durable/EventSource.d.mts +2 -0
  227. package/dist/durable/EventSource.mjs +65 -0
  228. package/dist/durable/EventSource.mjs.map +1 -0
  229. package/dist/durable/GitHubWorkflowSource.d.mts +185 -0
  230. package/dist/durable/GitHubWorkflowSource.mjs +209 -0
  231. package/dist/durable/GitHubWorkflowSource.mjs.map +1 -0
  232. package/dist/durable/MessageDelivery.d.mts +893 -0
  233. package/dist/durable/MessageDelivery.mjs +557 -0
  234. package/dist/durable/MessageDelivery.mjs.map +1 -0
  235. package/dist/durable/MessageDeliveryStoreConformance.d.mts +378 -0
  236. package/dist/durable/MessageDeliveryStoreConformance.mjs +270 -0
  237. package/dist/durable/MessageDeliveryStoreConformance.mjs.map +1 -0
  238. package/dist/durable/OperationAuthorizer.d.mts +2 -0
  239. package/dist/durable/OperationAuthorizer.mjs +70 -0
  240. package/dist/durable/OperationAuthorizer.mjs.map +1 -0
  241. package/dist/durable/PersistentHistory.d.mts +16 -0
  242. package/dist/durable/PersistentHistory.mjs +125 -0
  243. package/dist/durable/PersistentHistory.mjs.map +1 -0
  244. package/dist/durable/PreparedInputAdmission.d.mts +2 -0
  245. package/dist/durable/PreparedInputAdmission.mjs +38 -0
  246. package/dist/durable/PreparedInputAdmission.mjs.map +1 -0
  247. package/dist/durable/Records.d.mts +2 -0
  248. package/dist/durable/Records.mjs +848 -0
  249. package/dist/durable/Records.mjs.map +1 -0
  250. package/dist/durable/Recovery.d.mts +2 -0
  251. package/dist/durable/Recovery.mjs +739 -0
  252. package/dist/durable/Recovery.mjs.map +1 -0
  253. package/dist/durable/RunJournal.d.mts +2 -0
  254. package/dist/durable/RunJournal.mjs +2 -0
  255. package/dist/durable/Schedule.d.mts +2 -0
  256. package/dist/durable/Schedule.mjs +391 -0
  257. package/dist/durable/Schedule.mjs.map +1 -0
  258. package/dist/durable/ScheduleStoreConformance.d.mts +17 -0
  259. package/dist/durable/ScheduleStoreConformance.mjs +420 -0
  260. package/dist/durable/ScheduleStoreConformance.mjs.map +1 -0
  261. package/dist/durable/ScheduleTransition.d.mts +24 -0
  262. package/dist/durable/ScheduleTransition.mjs +180 -0
  263. package/dist/durable/ScheduleTransition.mjs.map +1 -0
  264. package/dist/durable/Scheduling.d.mts +54 -0
  265. package/dist/durable/Scheduling.mjs +2 -0
  266. package/dist/durable/SqlMemoryStore.d.mts +29 -0
  267. package/dist/durable/SqlMemoryStore.mjs +436 -0
  268. package/dist/durable/SqlMemoryStore.mjs.map +1 -0
  269. package/dist/durable/SqlMessageDeliveryStore.d.mts +42 -0
  270. package/dist/durable/SqlMessageDeliveryStore.mjs +179 -0
  271. package/dist/durable/SqlMessageDeliveryStore.mjs.map +1 -0
  272. package/dist/durable/SqlStorageV2Upgrade.d.mts +21 -0
  273. package/dist/durable/SqlStorageV2Upgrade.mjs +459 -0
  274. package/dist/durable/SqlStorageV2Upgrade.mjs.map +1 -0
  275. package/dist/durable/SqlSubscriptionStore.d.mts +62 -0
  276. package/dist/durable/SqlSubscriptionStore.mjs +751 -0
  277. package/dist/durable/SqlSubscriptionStore.mjs.map +1 -0
  278. package/dist/durable/SqlThreadNativeReads.d.mts +53 -0
  279. package/dist/durable/SqlThreadNativeReads.mjs +159 -0
  280. package/dist/durable/SqlThreadNativeReads.mjs.map +1 -0
  281. package/dist/durable/SubmissionLedger.d.mts +3 -0
  282. package/dist/durable/SubmissionLedger.mjs +959 -0
  283. package/dist/durable/SubmissionLedger.mjs.map +1 -0
  284. package/dist/durable/SubmissionLedgerConformance.d.mts +29 -0
  285. package/dist/durable/SubmissionLedgerConformance.mjs +2187 -0
  286. package/dist/durable/SubmissionLedgerConformance.mjs.map +1 -0
  287. package/dist/durable/SubmissionStatus.d.mts +2 -0
  288. package/dist/durable/SubmissionStatus.mjs +18 -0
  289. package/dist/durable/SubmissionStatus.mjs.map +1 -0
  290. package/dist/durable/Subscription.d.mts +2 -0
  291. package/dist/durable/Subscription.mjs +360 -0
  292. package/dist/durable/Subscription.mjs.map +1 -0
  293. package/dist/durable/SubscriptionInput.d.mts +2 -0
  294. package/dist/durable/SubscriptionInput.mjs +52 -0
  295. package/dist/durable/SubscriptionInput.mjs.map +1 -0
  296. package/dist/durable/SubscriptionStoreConformance.d.mts +16 -0
  297. package/dist/durable/SubscriptionStoreConformance.mjs +625 -0
  298. package/dist/durable/SubscriptionStoreConformance.mjs.map +1 -0
  299. package/dist/durable/SubscriptionTools.d.mts +273 -0
  300. package/dist/durable/SubscriptionTools.mjs +190 -0
  301. package/dist/durable/SubscriptionTools.mjs.map +1 -0
  302. package/dist/durable/SubscriptionTransition.d.mts +21 -0
  303. package/dist/durable/SubscriptionTransition.mjs +148 -0
  304. package/dist/durable/SubscriptionTransition.mjs.map +1 -0
  305. package/dist/durable/Subscriptions.d.mts +73 -0
  306. package/dist/durable/Subscriptions.mjs +627 -0
  307. package/dist/durable/Subscriptions.mjs.map +1 -0
  308. package/dist/durable/ThreadContextHistory.d.mts +32 -0
  309. package/dist/durable/ThreadContextHistory.mjs +152 -0
  310. package/dist/durable/ThreadContextHistory.mjs.map +1 -0
  311. package/dist/durable/ThreadContextHistoryProjection.d.mts +60 -0
  312. package/dist/durable/ThreadContextHistoryProjection.mjs +149 -0
  313. package/dist/durable/ThreadContextHistoryProjection.mjs.map +1 -0
  314. package/dist/durable/ThreadInvariants.d.mts +76 -0
  315. package/dist/durable/ThreadInvariants.mjs +246 -0
  316. package/dist/durable/ThreadInvariants.mjs.map +1 -0
  317. package/dist/durable/ThreadProjection.d.mts +78 -0
  318. package/dist/durable/ThreadProjection.mjs +158 -0
  319. package/dist/durable/ThreadProjection.mjs.map +1 -0
  320. package/dist/durable/ThreadProjectionMaintenance.d.mts +49 -0
  321. package/dist/durable/ThreadProjectionMaintenance.mjs +33 -0
  322. package/dist/durable/ThreadProjectionMaintenance.mjs.map +1 -0
  323. package/dist/durable/ThreadStore.d.mts +2 -0
  324. package/dist/durable/ThreadStore.mjs +355 -0
  325. package/dist/durable/ThreadStore.mjs.map +1 -0
  326. package/dist/durable/ThreadStoreConformance.d.mts +28 -0
  327. package/dist/durable/ThreadStoreConformance.mjs +503 -0
  328. package/dist/durable/ThreadStoreConformance.mjs.map +1 -0
  329. package/dist/durable/ToolReconciler.d.mts +2 -0
  330. package/dist/durable/ToolReconciler.mjs +85 -0
  331. package/dist/durable/ToolReconciler.mjs.map +1 -0
  332. package/dist/durable/WakeScheduler.d.mts +2 -0
  333. package/dist/durable/WakeScheduler.mjs +85 -0
  334. package/dist/durable/WakeScheduler.mjs.map +1 -0
  335. package/dist/durable/WorkerHost.d.mts +129 -0
  336. package/dist/durable/WorkerHost.mjs +77 -0
  337. package/dist/durable/WorkerHost.mjs.map +1 -0
  338. package/dist/engine/AgentRuntime.d.mts +2 -0
  339. package/dist/engine/AgentRuntime.mjs +2 -0
  340. package/dist/engine/Compaction.d.mts +7 -0
  341. package/dist/engine/Compaction.mjs +16 -0
  342. package/dist/engine/Compaction.mjs.map +1 -0
  343. package/dist/engine/ContextCompactor.d.mts +2 -0
  344. package/dist/engine/ContextCompactor.mjs +119 -0
  345. package/dist/engine/ContextCompactor.mjs.map +1 -0
  346. package/dist/engine/ContextHistory.d.mts +65 -0
  347. package/dist/engine/ContextHistory.mjs +76 -0
  348. package/dist/engine/ContextHistory.mjs.map +1 -0
  349. package/dist/engine/ContextWindow.d.mts +2 -0
  350. package/dist/engine/ContextWindow.mjs +59 -0
  351. package/dist/engine/ContextWindow.mjs.map +1 -0
  352. package/dist/engine/DurableStep.d.mts +2 -0
  353. package/dist/engine/DurableStep.mjs +62 -0
  354. package/dist/engine/DurableStep.mjs.map +1 -0
  355. package/dist/engine/MessagingHost.d.mts +2 -0
  356. package/dist/engine/MessagingHost.mjs +2 -0
  357. package/dist/engine/Output.d.mts +2 -0
  358. package/dist/engine/Output.mjs +8 -0
  359. package/dist/engine/Output.mjs.map +1 -0
  360. package/dist/engine/RunEventSink.d.mts +2 -0
  361. package/dist/engine/RunEventSink.mjs +22 -0
  362. package/dist/engine/RunEventSink.mjs.map +1 -0
  363. package/dist/engine/RunOptions.d.mts +2 -0
  364. package/dist/engine/RunOptions.mjs +124 -0
  365. package/dist/engine/RunOptions.mjs.map +1 -0
  366. package/dist/engine/SubagentHost.d.mts +2 -0
  367. package/dist/engine/SubagentHost.mjs +76 -0
  368. package/dist/engine/SubagentHost.mjs.map +1 -0
  369. package/dist/engine/ThreadHistory.d.mts +2 -0
  370. package/dist/engine/ThreadHistory.mjs +67 -0
  371. package/dist/engine/ThreadHistory.mjs.map +1 -0
  372. package/dist/engine/ToolBroker.d.mts +2 -0
  373. package/dist/engine/ToolBroker.mjs +42 -0
  374. package/dist/engine/ToolBroker.mjs.map +1 -0
  375. package/dist/foreign-diagnostic-DBQ1XHKh.mjs +37 -0
  376. package/dist/foreign-diagnostic-DBQ1XHKh.mjs.map +1 -0
  377. package/dist/index.d.mts +91 -6
  378. package/dist/index.mjs +100 -6
  379. package/dist/output-contract-BC7tjlGw.mjs +84 -0
  380. package/dist/output-contract-BC7tjlGw.mjs.map +1 -0
  381. package/dist/rolldown-runtime-D7D4PA-g.mjs +13 -0
  382. package/dist/sandbox/CodeExecutor.d.mts +194 -0
  383. package/dist/sandbox/CodeExecutor.mjs +278 -0
  384. package/dist/sandbox/CodeExecutor.mjs.map +1 -0
  385. package/dist/sandbox/InteractiveBrowser.d.mts +257 -0
  386. package/dist/sandbox/InteractiveBrowser.mjs +236 -0
  387. package/dist/sandbox/InteractiveBrowser.mjs.map +1 -0
  388. package/dist/sandbox/PageCapture.d.mts +2 -0
  389. package/dist/sandbox/PageCapture.mjs +450 -0
  390. package/dist/sandbox/PageCapture.mjs.map +1 -0
  391. package/dist/sandbox/PageCrawl.d.mts +88 -0
  392. package/dist/sandbox/PageCrawl.mjs +124 -0
  393. package/dist/sandbox/PageCrawl.mjs.map +1 -0
  394. package/dist/sandbox/PageScreenshot.d.mts +2 -0
  395. package/dist/sandbox/PageScreenshot.mjs +53 -0
  396. package/dist/sandbox/PageScreenshot.mjs.map +1 -0
  397. package/dist/sandbox/ProtectedBrowser.d.mts +283 -0
  398. package/dist/sandbox/ProtectedBrowser.mjs +298 -0
  399. package/dist/sandbox/ProtectedBrowser.mjs.map +1 -0
  400. package/dist/sandbox/Sandbox.d.mts +2 -0
  401. package/dist/sandbox/Sandbox.mjs +208 -0
  402. package/dist/sandbox/Sandbox.mjs.map +1 -0
  403. package/dist/utf8-BYfhEkcj.mjs +11 -0
  404. package/dist/utf8-BYfhEkcj.mjs.map +1 -0
  405. package/dist/utf8-DchGZRBd.mjs +23 -0
  406. package/dist/utf8-DchGZRBd.mjs.map +1 -0
  407. package/package.json +1 -40
  408. package/src/InMemory.ts +19 -0
  409. package/src/ToolExposure.ts +2 -0
  410. package/src/capabilities/Approval.ts +352 -0
  411. package/src/capabilities/Budget.ts +536 -0
  412. package/src/capabilities/CodeMode.ts +1090 -0
  413. package/src/capabilities/Commands.ts +86 -0
  414. package/src/capabilities/ContextTools.ts +184 -0
  415. package/src/capabilities/Mcp.ts +426 -0
  416. package/src/capabilities/McpClient.ts +967 -0
  417. package/src/capabilities/MemoryNotes.ts +174 -0
  418. package/src/capabilities/Messaging.ts +261 -0
  419. package/src/capabilities/ModelContext.ts +354 -0
  420. package/src/capabilities/Redaction.ts +157 -0
  421. package/src/capabilities/Remembering.ts +550 -0
  422. package/src/capabilities/RunHooks.ts +280 -0
  423. package/src/capabilities/SemanticMemory.ts +447 -0
  424. package/src/capabilities/Subagent.ts +2489 -0
  425. package/src/capabilities/SubagentReservations.ts +850 -0
  426. package/src/capabilities/ToolDiscovery.ts +369 -0
  427. package/src/capabilities/WebCapture.ts +722 -0
  428. package/src/capabilities/WebSearch.ts +190 -0
  429. package/src/capabilities/internal/subagent-background.ts +1273 -0
  430. package/src/capabilities/internal/subagent-contract.ts +146 -0
  431. package/src/capabilities/internal/subagent-policy.ts +235 -0
  432. package/src/capabilities/internal/subagent-reporting.ts +136 -0
  433. package/src/capabilities/internal/utf8.ts +10 -0
  434. package/src/core/Agent.ts +602 -0
  435. package/src/core/AgentError.ts +172 -0
  436. package/src/core/AgentPolicy.ts +153 -0
  437. package/src/core/AgentUpdates.ts +100 -0
  438. package/src/core/FailureDiagnostic.ts +343 -0
  439. package/src/core/IdGenerator.ts +39 -0
  440. package/src/core/Identifiers.ts +48 -0
  441. package/src/core/Memory.ts +290 -0
  442. package/src/core/MemoryNamespace.ts +196 -0
  443. package/src/core/MemoryReference.ts +121 -0
  444. package/src/core/MemoryRevalidation.ts +185 -0
  445. package/src/core/MemoryStore.ts +368 -0
  446. package/src/core/Messaging.ts +72 -0
  447. package/src/core/Receipt.ts +42 -0
  448. package/src/core/RememberingStore.ts +300 -0
  449. package/src/core/RunEvent.ts +366 -0
  450. package/src/core/RunPolicyUsage.ts +17 -0
  451. package/src/core/SemanticMemoryIndex.ts +250 -0
  452. package/src/core/SemanticMemoryRevalidation.ts +254 -0
  453. package/src/core/SubagentContract.ts +196 -0
  454. package/src/core/Thread.ts +371 -0
  455. package/src/core/ToolExposure.ts +74 -0
  456. package/src/core/ToolResult.ts +190 -0
  457. package/src/core/Usage.ts +529 -0
  458. package/src/core/Worker.ts +240 -0
  459. package/src/core/internal/agent-updates.ts +34 -0
  460. package/src/core/internal/message-status.ts +60 -0
  461. package/src/core/internal/strict-schema.ts +14 -0
  462. package/src/core/internal/utf8.ts +23 -0
  463. package/src/durable/ActivityStore.ts +160 -0
  464. package/src/durable/Admin.ts +505 -0
  465. package/src/durable/AgentRegistration.ts +14 -0
  466. package/src/durable/Certification.ts +210 -0
  467. package/src/durable/CommittedActivity.ts +296 -0
  468. package/src/durable/Digest.ts +87 -0
  469. package/src/durable/DurableAgentRuntime.ts +11275 -0
  470. package/src/durable/DurableFailpoint.ts +111 -0
  471. package/src/durable/DurableFailpointTestControl.ts +39 -0
  472. package/src/durable/EventSource.ts +172 -0
  473. package/src/durable/GitHubWorkflowSource.ts +447 -0
  474. package/src/durable/MessageDelivery.ts +832 -0
  475. package/src/durable/MessageDeliveryStoreConformance.ts +410 -0
  476. package/src/durable/OperationAuthorizer.ts +85 -0
  477. package/src/durable/PersistentHistory.ts +260 -0
  478. package/src/durable/PreparedInputAdmission.ts +57 -0
  479. package/src/durable/Records.ts +1075 -0
  480. package/src/durable/Recovery.ts +1018 -0
  481. package/src/durable/RunJournal.ts +1631 -0
  482. package/src/durable/Schedule.ts +513 -0
  483. package/src/durable/ScheduleStoreConformance.ts +638 -0
  484. package/src/durable/ScheduleTransition.ts +265 -0
  485. package/src/durable/Scheduling.ts +1077 -0
  486. package/src/durable/SqlMemoryStore.ts +778 -0
  487. package/src/durable/SqlMessageDeliveryStore.ts +335 -0
  488. package/src/durable/SqlStorageV2Upgrade.ts +500 -0
  489. package/src/durable/SqlSubscriptionStore.ts +1440 -0
  490. package/src/durable/SqlThreadNativeReads.ts +270 -0
  491. package/src/durable/SubmissionLedger.ts +1265 -0
  492. package/src/durable/SubmissionLedgerConformance.ts +4820 -0
  493. package/src/durable/SubmissionStatus.ts +14 -0
  494. package/src/durable/Subscription.ts +544 -0
  495. package/src/durable/SubscriptionInput.ts +144 -0
  496. package/src/durable/SubscriptionStoreConformance.ts +945 -0
  497. package/src/durable/SubscriptionTools.ts +327 -0
  498. package/src/durable/SubscriptionTransition.ts +302 -0
  499. package/src/durable/Subscriptions.ts +1210 -0
  500. package/src/durable/ThreadContextHistory.ts +227 -0
  501. package/src/durable/ThreadContextHistoryProjection.ts +216 -0
  502. package/src/durable/ThreadInvariants.ts +507 -0
  503. package/src/durable/ThreadProjection.ts +269 -0
  504. package/src/durable/ThreadProjectionMaintenance.ts +67 -0
  505. package/src/durable/ThreadStore.ts +573 -0
  506. package/src/durable/ThreadStoreConformance.ts +1156 -0
  507. package/src/durable/ToolReconciler.ts +109 -0
  508. package/src/durable/WakeScheduler.ts +134 -0
  509. package/src/durable/WorkerHost.ts +171 -0
  510. package/src/durable/internal/agent-registration.ts +587 -0
  511. package/src/durable/internal/agent-updates.ts +302 -0
  512. package/src/durable/internal/foreign-diagnostic.ts +47 -0
  513. package/src/durable/internal/journal-checkpoint.ts +104 -0
  514. package/src/durable/internal/journal-metadata.ts +117 -0
  515. package/src/durable/internal/message-status.ts +20 -0
  516. package/src/durable/internal/messaging-host.ts +637 -0
  517. package/src/durable/internal/schedule-time.ts +303 -0
  518. package/src/durable/internal/storage-v2-layout.ts +163 -0
  519. package/src/durable/internal/storage-v2.ts +73 -0
  520. package/src/durable/internal/worker-host.ts +2885 -0
  521. package/src/durable/internal/worker-runtime.ts +9 -0
  522. package/src/engine/AgentRuntime.ts +37 -0
  523. package/src/engine/Compaction.ts +11 -0
  524. package/src/engine/ContextCompactor.ts +277 -0
  525. package/src/engine/ContextHistory.ts +73 -0
  526. package/src/engine/ContextWindow.ts +72 -0
  527. package/src/engine/DurableStep.ts +132 -0
  528. package/src/engine/MessagingHost.ts +110 -0
  529. package/src/engine/Output.ts +2 -0
  530. package/src/engine/RunEventSink.ts +132 -0
  531. package/src/engine/RunOptions.ts +1101 -0
  532. package/src/engine/SubagentHost.ts +230 -0
  533. package/src/engine/ThreadHistory.ts +120 -0
  534. package/src/engine/ToolBroker.ts +157 -0
  535. package/src/engine/ToolExposure.ts +48 -0
  536. package/src/engine/internal/agent-runtime.ts +10500 -0
  537. package/src/engine/internal/bounded-value.ts +315 -0
  538. package/src/engine/internal/compaction.ts +678 -0
  539. package/src/engine/internal/error-diagnostic.ts +39 -0
  540. package/src/engine/internal/output-contract.ts +173 -0
  541. package/src/engine/internal/primitive-delta.ts +80 -0
  542. package/src/engine/internal/provider-result-staging.ts +211 -0
  543. package/src/engine/internal/tool-derivative.ts +106 -0
  544. package/src/engine/internal/tool-exposure.ts +224 -0
  545. package/src/engine/internal/tool-telemetry.ts +484 -0
  546. package/src/index.ts +99 -21
  547. package/src/sandbox/CodeExecutor.ts +352 -0
  548. package/src/sandbox/InteractiveBrowser.ts +339 -0
  549. package/src/sandbox/PageCapture.ts +691 -0
  550. package/src/sandbox/PageCrawl.ts +148 -0
  551. package/src/sandbox/PageScreenshot.ts +81 -0
  552. package/src/sandbox/ProtectedBrowser.ts +452 -0
  553. package/src/sandbox/Sandbox.ts +241 -0
package/dist/index.mjs CHANGED
@@ -1,6 +1,100 @@
1
- import { CommandDrainPolicy, RunSchedulingOverride } from "@effect-agent/capabilities";
2
- import { delegationToolPrefix, isDelegationToolName } from "@effect-agent/core";
3
- export * from "@effect-agent/capabilities";
4
- export * from "@effect-agent/core";
5
- export * from "@effect-agent/engine";
6
- export { CommandDrainPolicy, RunSchedulingOverride, delegationToolPrefix, isDelegationToolName };
1
+ import { t as Identifiers_exports } from "./core/Identifiers.mjs";
2
+ import { t as ToolResult_exports } from "./core/ToolResult.mjs";
3
+ import { t as AgentPolicy_exports } from "./core/AgentPolicy.mjs";
4
+ import { t as Receipt_exports } from "./core/Receipt.mjs";
5
+ import { t as AgentUpdates_exports } from "./core/AgentUpdates.mjs";
6
+ import { t as Agent_exports } from "./Agent-1DMSO_Fl.mjs";
7
+ import { a as FailureDiagnostic_exports } from "./FailureDiagnostic-BElLOoED.mjs";
8
+ import { t as AgentError_exports } from "./core/AgentError.mjs";
9
+ import { t as IdGenerator_exports } from "./core/IdGenerator.mjs";
10
+ import { t as SubagentContract_exports } from "./core/SubagentContract.mjs";
11
+ import { t as Usage_exports } from "./core/Usage.mjs";
12
+ import { t as RunEvent_exports } from "./core/RunEvent.mjs";
13
+ import { x as Worker_exports } from "./Worker-CfwzMZEK.mjs";
14
+ import { n as MessagingHost_exports } from "./MessagingHost-DfsbMPvq.mjs";
15
+ import { t as SubagentHost_exports } from "./engine/SubagentHost.mjs";
16
+ import { t as Thread_exports } from "./core/Thread.mjs";
17
+ import { t as ThreadHistory_exports } from "./engine/ThreadHistory.mjs";
18
+ import { t as AgentRuntime_exports } from "./AgentRuntime-Cp1hAb-W.mjs";
19
+ import { t as ContextWindow_exports } from "./engine/ContextWindow.mjs";
20
+ import { t as DurableStep_exports } from "./engine/DurableStep.mjs";
21
+ import { t as ContextCompactor_exports } from "./engine/ContextCompactor.mjs";
22
+ import { t as RunEventSink_exports } from "./engine/RunEventSink.mjs";
23
+ import { t as MemoryReference_exports } from "./core/MemoryReference.mjs";
24
+ import { t as RunPolicyUsage_exports } from "./core/RunPolicyUsage.mjs";
25
+ import { t as RunOptions_exports } from "./engine/RunOptions.mjs";
26
+ import { t as ToolBroker_exports } from "./engine/ToolBroker.mjs";
27
+ import { t as Redaction_exports } from "./capabilities/Redaction.mjs";
28
+ import { t as Approval_exports } from "./capabilities/Approval.mjs";
29
+ import { t as Budget_exports } from "./capabilities/Budget.mjs";
30
+ import { t as Sandbox_exports } from "./sandbox/Sandbox.mjs";
31
+ import { t as CodeExecutor_exports } from "./sandbox/CodeExecutor.mjs";
32
+ import { t as CodeMode_exports } from "./capabilities/CodeMode.mjs";
33
+ import { t as Commands_exports } from "./capabilities/Commands.mjs";
34
+ import { t as Compaction_exports } from "./engine/Compaction.mjs";
35
+ import { t as ContextHistory_exports } from "./engine/ContextHistory.mjs";
36
+ import { t as ContextTools_exports } from "./capabilities/ContextTools.mjs";
37
+ import { t as SubagentReservations_exports } from "./capabilities/SubagentReservations.mjs";
38
+ import { t as InMemory_exports } from "./InMemory.mjs";
39
+ import { t as InteractiveBrowser_exports } from "./sandbox/InteractiveBrowser.mjs";
40
+ import { t as Mcp_exports } from "./capabilities/Mcp.mjs";
41
+ import { t as McpClient_exports } from "./capabilities/McpClient.mjs";
42
+ import { t as Memory_exports } from "./core/Memory.mjs";
43
+ import { t as MemoryNamespace_exports } from "./core/MemoryNamespace.mjs";
44
+ import { t as MemoryStore_exports } from "./core/MemoryStore.mjs";
45
+ import { t as MemoryNotes_exports } from "./capabilities/MemoryNotes.mjs";
46
+ import { t as MemoryRevalidation_exports } from "./core/MemoryRevalidation.mjs";
47
+ import { t as Messaging_exports } from "./capabilities/Messaging.mjs";
48
+ import { t as ModelContext_exports } from "./capabilities/ModelContext.mjs";
49
+ import { t as Output_exports } from "./engine/Output.mjs";
50
+ import { t as PageCapture_exports } from "./sandbox/PageCapture.mjs";
51
+ import { t as PageCrawl_exports } from "./sandbox/PageCrawl.mjs";
52
+ import { t as PageScreenshot_exports } from "./sandbox/PageScreenshot.mjs";
53
+ import { t as ProtectedBrowser_exports } from "./sandbox/ProtectedBrowser.mjs";
54
+ import { t as RememberingStore_exports } from "./core/RememberingStore.mjs";
55
+ import { t as Remembering_exports } from "./capabilities/Remembering.mjs";
56
+ import { t as RunHooks_exports } from "./capabilities/RunHooks.mjs";
57
+ import { t as SemanticMemoryIndex_exports } from "./core/SemanticMemoryIndex.mjs";
58
+ import { t as SemanticMemoryRevalidation_exports } from "./core/SemanticMemoryRevalidation.mjs";
59
+ import { t as SemanticMemory_exports } from "./capabilities/SemanticMemory.mjs";
60
+ import { r as Subagent_exports } from "./Subagent-DCrB7an7.mjs";
61
+ import { t as ToolDiscovery_exports } from "./capabilities/ToolDiscovery.mjs";
62
+ import { t as ToolExposure_exports } from "./ToolExposure.mjs";
63
+ import { t as WebCapture_exports } from "./capabilities/WebCapture.mjs";
64
+ import { t as WebSearch_exports } from "./capabilities/WebSearch.mjs";
65
+ import { t as Records_exports } from "./durable/Records.mjs";
66
+ import { t as ActivityStore_exports } from "./durable/ActivityStore.mjs";
67
+ import { t as SubmissionLedger_exports } from "./durable/SubmissionLedger.mjs";
68
+ import { t as Recovery_exports } from "./durable/Recovery.mjs";
69
+ import { t as Admin_exports } from "./durable/Admin.mjs";
70
+ import { t as Digest_exports } from "./durable/Digest.mjs";
71
+ import { t as AgentRegistration_exports } from "./durable/AgentRegistration.mjs";
72
+ import { r as DurableAgentRuntime_exports } from "./DurableAgentRuntime-B-9w7jDt.mjs";
73
+ import { n as RunJournal_exports } from "./RunJournal-BXrq0VIK.mjs";
74
+ import { t as ThreadStore_exports } from "./durable/ThreadStore.mjs";
75
+ import { t as CommittedActivity_exports } from "./durable/CommittedActivity.mjs";
76
+ import { t as DurableFailpoint_exports } from "./durable/DurableFailpoint.mjs";
77
+ import { t as Schedule_exports } from "./durable/Schedule.mjs";
78
+ import { t as PreparedInputAdmission_exports } from "./durable/PreparedInputAdmission.mjs";
79
+ import { t as Subscription_exports } from "./durable/Subscription.mjs";
80
+ import { t as MessageDelivery_exports } from "./durable/MessageDelivery.mjs";
81
+ import { t as WorkerHost_exports } from "./durable/WorkerHost.mjs";
82
+ import { t as OperationAuthorizer_exports } from "./durable/OperationAuthorizer.mjs";
83
+ import { t as SubmissionStatus_exports } from "./durable/SubmissionStatus.mjs";
84
+ import { t as ThreadInvariants_exports } from "./durable/ThreadInvariants.mjs";
85
+ import { t as ToolReconciler_exports } from "./durable/ToolReconciler.mjs";
86
+ import { t as WakeScheduler_exports } from "./durable/WakeScheduler.mjs";
87
+ import { t as EventSource_exports } from "./durable/EventSource.mjs";
88
+ import { t as PersistentHistory_exports } from "./durable/PersistentHistory.mjs";
89
+ import { t as ScheduleTransition_exports } from "./durable/ScheduleTransition.mjs";
90
+ import { i as Scheduling_exports } from "./Scheduling-DPb2QyAK.mjs";
91
+ import { t as SubscriptionInput_exports } from "./durable/SubscriptionInput.mjs";
92
+ import { t as Subscriptions_exports } from "./durable/Subscriptions.mjs";
93
+ import { t as SubscriptionTools_exports } from "./durable/SubscriptionTools.mjs";
94
+ import { t as SubscriptionTransition_exports } from "./durable/SubscriptionTransition.mjs";
95
+ import { t as ThreadProjection_exports } from "./durable/ThreadProjection.mjs";
96
+ import { t as ThreadProjectionMaintenance_exports } from "./durable/ThreadProjectionMaintenance.mjs";
97
+ import { t as ThreadContextHistoryProjection_exports } from "./durable/ThreadContextHistoryProjection.mjs";
98
+ import { t as ThreadContextHistory_exports } from "./durable/ThreadContextHistory.mjs";
99
+ import { t as SqlThreadNativeReads_exports } from "./durable/SqlThreadNativeReads.mjs";
100
+ export { ActivityStore_exports as ActivityStore, Admin_exports as Admin, Agent_exports as Agent, AgentError_exports as AgentError, AgentPolicy_exports as AgentPolicy, AgentRegistration_exports as AgentRegistration, AgentRuntime_exports as AgentRuntime, AgentUpdates_exports as AgentUpdates, Approval_exports as Approval, Budget_exports as Budget, CodeExecutor_exports as CodeExecutor, CodeMode_exports as CodeMode, Commands_exports as Commands, CommittedActivity_exports as CommittedActivity, Compaction_exports as Compaction, ContextCompactor_exports as ContextCompactor, ContextHistory_exports as ContextHistory, ContextTools_exports as ContextTools, ContextWindow_exports as ContextWindow, Digest_exports as Digest, DurableAgentRuntime_exports as DurableAgentRuntime, DurableFailpoint_exports as DurableFailpoint, DurableStep_exports as DurableStep, EventSource_exports as EventSource, FailureDiagnostic_exports as FailureDiagnostic, IdGenerator_exports as IdGenerator, Identifiers_exports as Identifiers, InMemory_exports as InMemory, InteractiveBrowser_exports as InteractiveBrowser, Mcp_exports as Mcp, McpClient_exports as McpClient, Memory_exports as Memory, MemoryNamespace_exports as MemoryNamespace, MemoryNotes_exports as MemoryNotes, MemoryReference_exports as MemoryReference, MemoryRevalidation_exports as MemoryRevalidation, MemoryStore_exports as MemoryStore, MessageDelivery_exports as MessageDelivery, Messaging_exports as Messaging, MessagingHost_exports as MessagingHost, ModelContext_exports as ModelContext, OperationAuthorizer_exports as OperationAuthorizer, Output_exports as Output, PageCapture_exports as PageCapture, PageCrawl_exports as PageCrawl, PageScreenshot_exports as PageScreenshot, PersistentHistory_exports as PersistentHistory, PreparedInputAdmission_exports as PreparedInputAdmission, ProtectedBrowser_exports as ProtectedBrowser, Receipt_exports as Receipt, Records_exports as Records, Recovery_exports as Recovery, Redaction_exports as Redaction, Remembering_exports as Remembering, RememberingStore_exports as RememberingStore, RunEvent_exports as RunEvent, RunEventSink_exports as RunEventSink, RunHooks_exports as RunHooks, RunJournal_exports as RunJournal, RunOptions_exports as RunOptions, RunPolicyUsage_exports as RunPolicyUsage, Sandbox_exports as Sandbox, Schedule_exports as Schedule, ScheduleTransition_exports as ScheduleTransition, Scheduling_exports as Scheduling, SemanticMemory_exports as SemanticMemory, SemanticMemoryIndex_exports as SemanticMemoryIndex, SemanticMemoryRevalidation_exports as SemanticMemoryRevalidation, SqlThreadNativeReads_exports as SqlThreadNativeReads, Subagent_exports as Subagent, SubagentContract_exports as SubagentContract, SubagentHost_exports as SubagentHost, SubagentReservations_exports as SubagentReservations, SubmissionLedger_exports as SubmissionLedger, SubmissionStatus_exports as SubmissionStatus, Subscription_exports as Subscription, SubscriptionInput_exports as SubscriptionInput, SubscriptionTools_exports as SubscriptionTools, SubscriptionTransition_exports as SubscriptionTransition, Subscriptions_exports as Subscriptions, Thread_exports as Thread, ThreadContextHistory_exports as ThreadContextHistory, ThreadContextHistoryProjection_exports as ThreadContextHistoryProjection, ThreadHistory_exports as ThreadHistory, ThreadInvariants_exports as ThreadInvariants, ThreadProjection_exports as ThreadProjection, ThreadProjectionMaintenance_exports as ThreadProjectionMaintenance, ThreadStore_exports as ThreadStore, ToolBroker_exports as ToolBroker, ToolDiscovery_exports as ToolDiscovery, ToolExposure_exports as ToolExposure, ToolReconciler_exports as ToolReconciler, ToolResult_exports as ToolResult, Usage_exports as Usage, WakeScheduler_exports as WakeScheduler, WebCapture_exports as WebCapture, WebSearch_exports as WebSearch, Worker_exports as Worker, WorkerHost_exports as WorkerHost };
@@ -0,0 +1,84 @@
1
+ import { Prompt, Tool } from "effect/unstable/ai";
2
+ import { Schema } from "effect";
3
+ //#region src/engine/internal/output-contract.ts
4
+ const outputFormatAnnotation = "@effect-agent/engine/Output/format";
5
+ /**
6
+ * Declare ordinary assistant text as an Agent's final-output wire format. Apply this to the
7
+ * complete output Schema after composing transformations. Its encoded type must be string;
8
+ * decoding, checks, transformations, and service requirements remain owned by that Schema.
9
+ * Text is preserved verbatim, including whitespace, quotes, and an empty reply when allowed.
10
+ * Required completion Tools still take precedence. Unmarked Schemas use JSON final output.
11
+ *
12
+ * @example
13
+ * ```ts
14
+ * output: Output.text(Schema.String.check(Schema.isMaxLength(20_000)))
15
+ * ```
16
+ */
17
+ const textOutput = (schema) => schema.annotate({ [outputFormatAnnotation]: "text" });
18
+ const isTextOutput = (schema) => Schema.resolveAnnotations(schema)?.[outputFormatAnnotation] === "text";
19
+ const contractDirective = (definition) => definition.completion === void 0 ? "Final output contract: when the task is complete, the final assistant message must be only JSON that is valid against this JSON Schema — no prose, no Markdown code fences, nothing before or after the JSON." : `Final output contract: when the task is complete without calling the "${definition.completion.tool}" completion Tool, the final assistant message must be only JSON that is valid against this JSON Schema — no prose, no Markdown code fences, nothing before or after the JSON. When calling the "${definition.completion.tool}" completion Tool, never place this private Agent output JSON in any Tool argument; follow the Tool's parameter schema instead. Call it as the sole application Tool Call, after receiving any other needed application Tool results. Completed provider Tool results may accompany it. The engine projects the successful completion Tool result into the Agent output.`;
20
+ const requiredCompletionDirective = (tool, hasAlternatives) => `Final output contract: ${hasAlternatives ? "otherwise complete" : "complete only"} by calling the required completion Tool ${JSON.stringify(tool)} as the sole application Tool Call in its batch. Completed provider Tool results may accompany it. Do not emit an ordinary final assistant text answer. The Tool's canonical parameters and successful result are projected and validated as the Agent output.`;
21
+ /**
22
+ * Render the model-visible final-output contract for one definition. The
23
+ * derivation and message identity are stable for an immutable definition.
24
+ * An output Schema the Effect AI derivation cannot represent is reported as
25
+ * `unrenderable`; the caller falls back to the prior behavior — the contract
26
+ * is guidance, and a Schema that decodes but does not render must not become
27
+ * a new failure mode.
28
+ */
29
+ const rendered = (message) => ({
30
+ _tag: "rendered",
31
+ message,
32
+ part: Prompt.makeMessage("system", { content: message })
33
+ });
34
+ const renderOutputSchemaContract = (definition) => {
35
+ if (definition.completion?.required === true) return rendered(requiredCompletionDirective(definition.completion.tool, (definition.completionFromTools?.length ?? 0) > 0));
36
+ if (isTextOutput(definition.output)) return rendered("Final output contract: write the final reply as ordinary assistant text, without JSON wrapping. An empty reply is valid only when allowed by the output Schema and the task instructions." + (definition.completion === void 0 ? "" : ` When calling the "${definition.completion.tool}" completion Tool, follow its parameter schema instead and call it as the sole application Tool Call, after receiving any other needed application Tool results; completed provider Tool results may accompany it; the engine projects its successful result into the Agent output.`));
37
+ try {
38
+ const jsonSchema = Tool.getJsonSchemaFromSchema(definition.output);
39
+ return rendered(`${contractDirective(definition)}\n\n${JSON.stringify(jsonSchema, void 0, 2)}`);
40
+ } catch (cause) {
41
+ return {
42
+ _tag: "unrenderable",
43
+ reason: cause instanceof Error ? cause.message : String(cause)
44
+ };
45
+ }
46
+ };
47
+ const outputContracts = /* @__PURE__ */ new WeakMap();
48
+ const outputSchemaContract = (definition) => {
49
+ const cached = outputContracts.get(definition);
50
+ if (cached !== void 0) return cached;
51
+ const base = renderOutputSchemaContract(definition);
52
+ const alternatives = definition.completionFromTools ?? [];
53
+ const contract = base._tag === "rendered" && alternatives.length > 0 ? rendered(`The following action Tools may complete the Run from their successful canonical result: ${alternatives.map((declaration) => JSON.stringify(declaration.tool)).join(", ")}. Call such a Tool as the sole application Tool Call, following its parameter schema. Completed provider Tool results may accompany it. It may complete the Run only when it satisfies the whole request. An incomplete or pending result continues the Run. These actions are unavailable during finalization after budget exhaustion.
54
+
55
+ ` + base.message) : base;
56
+ outputContracts.set(definition, contract);
57
+ return contract;
58
+ };
59
+ /**
60
+ * Insert the contract immediately after the request prompt's last system
61
+ * message (position 0 when none exists), extending the last contiguous
62
+ * system block. Placement is normative: the Anthropic provider replaces its
63
+ * top-level `system` parameter per contiguous system group, so only the last
64
+ * block survives there — an isolated trailing contract message would discard
65
+ * the author's instructions, and a contract inside an earlier block (for
66
+ * example a resumed Thread's original instructions ahead of this Run's
67
+ * evaluated instructions) would itself be discarded. Extending the last
68
+ * block keeps author content and contract together on every provider and
69
+ * preserves the author's per-message cache-control annotations.
70
+ */
71
+ const insertOutputContract = (prompt, message) => {
72
+ const content = prompt.content;
73
+ let insertAt = 0;
74
+ for (let index = 0; index < content.length; index += 1) if (content[index]?.role === "system") insertAt = index + 1;
75
+ return Prompt.fromMessages([
76
+ ...content.slice(0, insertAt),
77
+ message,
78
+ ...content.slice(insertAt)
79
+ ]);
80
+ };
81
+ //#endregion
82
+ export { textOutput as i, isTextOutput as n, outputSchemaContract as r, insertOutputContract as t };
83
+
84
+ //# sourceMappingURL=output-contract-BC7tjlGw.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"output-contract-BC7tjlGw.mjs","names":[],"sources":["../src/engine/internal/output-contract.ts"],"sourcesContent":["import { Schema } from \"effect\";\nimport { Prompt, Tool } from \"effect/unstable/ai\";\n\nimport type * as Agent from \"../../core/Agent.ts\";\n\nconst outputFormatAnnotation = \"@effect-agent/engine/Output/format\";\n\n/**\n * Declare ordinary assistant text as an Agent's final-output wire format. Apply this to the\n * complete output Schema after composing transformations. Its encoded type must be string;\n * decoding, checks, transformations, and service requirements remain owned by that Schema.\n * Text is preserved verbatim, including whitespace, quotes, and an empty reply when allowed.\n * Required completion Tools still take precedence. Unmarked Schemas use JSON final output.\n *\n * @example\n * ```ts\n * output: Output.text(Schema.String.check(Schema.isMaxLength(20_000)))\n * ```\n */\nexport const textOutput = <S extends Schema.Top & { readonly Encoded: string }>(\n schema: S,\n): S[\"Rebuild\"] => schema.annotate({ [outputFormatAnnotation]: \"text\" });\n\nexport const isTextOutput = (schema: Schema.Top): boolean =>\n Schema.resolveAnnotations(schema)?.[outputFormatAnnotation] === \"text\";\n\n/**\n * Model-visible final-output contract (RUN-028).\n *\n * For ordinary text completion, the interpreter's only output-conformance\n * point is `decodeFinalOutput`, which validates the final text after the\n * model has already finished. This module renders that Schema's wire contract\n * with the same Effect AI derivation the providers use for Tool parameters\n * and states it as one framework-owned system message on every model request.\n * A required completion Tool instead gets a native-tool directive: its Tool\n * parameter Schema is already carried by the provider request, and ordinary\n * final text is not an allowed completion path.\n *\n * The contract is a per-request projection of the immutable definition —\n * exactly like the Tool schemas the request already carries. It is inserted\n * at model-request materialization (after context preparation) and never\n * into official history, so canonical records, run events, and the committed\n * DN/DC golden are unchanged.\n *\n */\n\n/** Rendering outcome for one definition's output Schema. */\ntype OutputContract =\n | {\n readonly _tag: \"rendered\";\n /** The complete system-message text: directive plus the derived JSON Schema. */\n readonly message: string;\n readonly part: Prompt.SystemMessage;\n }\n | {\n readonly _tag: \"unrenderable\";\n /** Why Effect AI's JSON-Schema derivation rejected the output Schema. */\n readonly reason: string;\n };\n\nconst contractDirective = (definition: Agent.AnyDefinition): string =>\n definition.completion === undefined\n ? \"Final output contract: when the task is complete, the final assistant message must be only \" +\n \"JSON that is valid against this JSON Schema — no prose, no Markdown code fences, nothing \" +\n \"before or after the JSON.\"\n : `Final output contract: when the task is complete without calling the \"${definition.completion.tool}\" completion Tool, the final assistant message must be only ` +\n \"JSON that is valid against this JSON Schema — no prose, no Markdown code fences, nothing \" +\n `before or after the JSON. When calling the \"${definition.completion.tool}\" completion Tool, never place this private Agent output JSON in any Tool argument; follow the Tool's parameter schema instead. Call it as the sole application Tool Call, after receiving any other needed application Tool results. Completed provider Tool results may accompany it. The engine projects the successful completion Tool result into the Agent output.`;\n\nconst requiredCompletionDirective = (tool: string, hasAlternatives: boolean): string =>\n `Final output contract: ${hasAlternatives ? \"otherwise complete\" : \"complete only\"} by calling the required completion Tool ${JSON.stringify(tool)} ` +\n \"as the sole application Tool Call in its batch. Completed provider Tool results may accompany it. Do not emit an ordinary final assistant text answer. \" +\n \"The Tool's canonical parameters and successful result are projected and validated as the Agent output.\";\n\n/**\n * Render the model-visible final-output contract for one definition. The\n * derivation and message identity are stable for an immutable definition.\n * An output Schema the Effect AI derivation cannot represent is reported as\n * `unrenderable`; the caller falls back to the prior behavior — the contract\n * is guidance, and a Schema that decodes but does not render must not become\n * a new failure mode.\n */\nconst rendered = (message: string): OutputContract => ({\n _tag: \"rendered\",\n message,\n part: Prompt.makeMessage(\"system\", { content: message }),\n});\n\nconst renderOutputSchemaContract = (definition: Agent.AnyDefinition): OutputContract => {\n if (definition.completion?.required === true) {\n return rendered(\n requiredCompletionDirective(\n definition.completion.tool,\n (definition.completionFromTools?.length ?? 0) > 0,\n ),\n );\n }\n if (isTextOutput(definition.output)) {\n return rendered(\n \"Final output contract: write the final reply as ordinary assistant text, without JSON wrapping. \" +\n \"An empty reply is valid only when allowed by the output Schema and the task instructions.\" +\n (definition.completion === undefined\n ? \"\"\n : ` When calling the \"${definition.completion.tool}\" completion Tool, follow its parameter schema instead and call it as the sole application Tool Call, after receiving any other needed application Tool results; completed provider Tool results may accompany it; the engine projects its successful result into the Agent output.`),\n );\n }\n try {\n const jsonSchema = Tool.getJsonSchemaFromSchema(definition.output);\n\n return rendered(\n `${contractDirective(definition)}\\n\\n${JSON.stringify(jsonSchema, undefined, 2)}`,\n );\n } catch (cause) {\n return {\n _tag: \"unrenderable\",\n reason: cause instanceof Error ? cause.message : String(cause),\n };\n }\n};\n\n// Native incremental-response tracking recognizes message objects, not rendered text.\n// Weak keys retain neither discarded definitions nor their Schema graphs.\nconst outputContracts = new WeakMap<Agent.AnyDefinition, OutputContract>();\n\nexport const outputSchemaContract = (definition: Agent.AnyDefinition): OutputContract => {\n const cached = outputContracts.get(definition);\n\n if (cached !== undefined) return cached;\n const base = renderOutputSchemaContract(definition);\n const alternatives = definition.completionFromTools ?? [];\n\n const contract =\n base._tag === \"rendered\" && alternatives.length > 0\n ? rendered(\n `The following action Tools may complete the Run from their successful canonical result: ${alternatives.map((declaration) => JSON.stringify(declaration.tool)).join(\", \")}. ` +\n \"Call such a Tool as the sole application Tool Call, following its parameter schema. Completed provider Tool results may accompany it. It may complete the Run only when it satisfies the whole request. \" +\n \"An incomplete or pending result continues the Run. These actions are unavailable during finalization after budget exhaustion.\\n\\n\" +\n base.message,\n )\n : base;\n\n outputContracts.set(definition, contract);\n\n return contract;\n};\n\n/**\n * Insert the contract immediately after the request prompt's last system\n * message (position 0 when none exists), extending the last contiguous\n * system block. Placement is normative: the Anthropic provider replaces its\n * top-level `system` parameter per contiguous system group, so only the last\n * block survives there — an isolated trailing contract message would discard\n * the author's instructions, and a contract inside an earlier block (for\n * example a resumed Thread's original instructions ahead of this Run's\n * evaluated instructions) would itself be discarded. Extending the last\n * block keeps author content and contract together on every provider and\n * preserves the author's per-message cache-control annotations.\n */\nexport const insertOutputContract = (\n prompt: Prompt.Prompt,\n message: Prompt.SystemMessage,\n): Prompt.Prompt => {\n const content = prompt.content;\n let insertAt = 0;\n\n for (let index = 0; index < content.length; index += 1) {\n if (content[index]?.role === \"system\") {\n insertAt = index + 1;\n }\n }\n\n return Prompt.fromMessages([...content.slice(0, insertAt), message, ...content.slice(insertAt)]);\n};\n"],"mappings":";;;AAKA,MAAM,yBAAyB;;;;;;;;;;;;;AAc/B,MAAa,cACX,WACiB,OAAO,SAAS,GAAG,yBAAyB,OAAO,CAAC;AAEvE,MAAa,gBAAgB,WAC3B,OAAO,mBAAmB,MAAM,CAAC,GAAG,4BAA4B;AAoClE,MAAM,qBAAqB,eACzB,WAAW,eAAe,KAAA,IACtB,kNAGA,yEAAyE,WAAW,WAAW,KAAK,mMAErD,WAAW,WAAW,KAAK;AAEhF,MAAM,+BAA+B,MAAc,oBACjD,0BAA0B,kBAAkB,uBAAuB,gBAAgB,2CAA2C,KAAK,UAAU,IAAI,EAAE;;;;;;;;;AAYrJ,MAAM,YAAY,aAAqC;CACrD,MAAM;CACN;CACA,MAAM,OAAO,YAAY,UAAU,EAAE,SAAS,QAAQ,CAAC;AACzD;AAEA,MAAM,8BAA8B,eAAoD;CACtF,IAAI,WAAW,YAAY,aAAa,MACtC,OAAO,SACL,4BACE,WAAW,WAAW,OACrB,WAAW,qBAAqB,UAAU,KAAK,CAClD,CACF;CAEF,IAAI,aAAa,WAAW,MAAM,GAChC,OAAO,SACL,+LAEG,WAAW,eAAe,KAAA,IACvB,KACA,sBAAsB,WAAW,WAAW,KAAK,qRACzD;CAEF,IAAI;EACF,MAAM,aAAa,KAAK,wBAAwB,WAAW,MAAM;EAEjE,OAAO,SACL,GAAG,kBAAkB,UAAU,EAAE,MAAM,KAAK,UAAU,YAAY,KAAA,GAAW,CAAC,GAChF;CACF,SAAS,OAAO;EACd,OAAO;GACL,MAAM;GACN,QAAQ,iBAAiB,QAAQ,MAAM,UAAU,OAAO,KAAK;EAC/D;CACF;AACF;AAIA,MAAM,kCAAkB,IAAI,QAA6C;AAEzE,MAAa,wBAAwB,eAAoD;CACvF,MAAM,SAAS,gBAAgB,IAAI,UAAU;CAE7C,IAAI,WAAW,KAAA,GAAW,OAAO;CACjC,MAAM,OAAO,2BAA2B,UAAU;CAClD,MAAM,eAAe,WAAW,uBAAuB,CAAC;CAExD,MAAM,WACJ,KAAK,SAAS,cAAc,aAAa,SAAS,IAC9C,SACE,2FAA2F,aAAa,KAAK,gBAAgB,KAAK,UAAU,YAAY,IAAI,CAAC,CAAC,CAAC,KAAK,IAAI,EAAE;;IAGxK,KAAK,OACT,IACA;CAEN,gBAAgB,IAAI,YAAY,QAAQ;CAExC,OAAO;AACT;;;;;;;;;;;;;AAcA,MAAa,wBACX,QACA,YACkB;CAClB,MAAM,UAAU,OAAO;CACvB,IAAI,WAAW;CAEf,KAAK,IAAI,QAAQ,GAAG,QAAQ,QAAQ,QAAQ,SAAS,GACnD,IAAI,QAAQ,MAAM,EAAE,SAAS,UAC3B,WAAW,QAAQ;CAIvB,OAAO,OAAO,aAAa;EAAC,GAAG,QAAQ,MAAM,GAAG,QAAQ;EAAG;EAAS,GAAG,QAAQ,MAAM,QAAQ;CAAC,CAAC;AACjG"}
@@ -0,0 +1,13 @@
1
+ //#region \0rolldown/runtime.js
2
+ var __defProp = Object.defineProperty;
3
+ var __exportAll = (all, no_symbols) => {
4
+ let target = {};
5
+ for (var name in all) __defProp(target, name, {
6
+ get: all[name],
7
+ enumerable: true
8
+ });
9
+ if (!no_symbols) __defProp(target, Symbol.toStringTag, { value: "Module" });
10
+ return target;
11
+ };
12
+ //#endregion
13
+ export { __exportAll as t };
@@ -0,0 +1,194 @@
1
+ import { n as NetworkDisabled, p as SandboxImplementation, t as NetworkAllowlist } from "../Sandbox-CEsDWBLq.mjs";
2
+ import { Context, Duration, Effect, Schema, Scope } from "effect";
3
+ declare namespace CodeExecutor_d_exports {
4
+ export { CodeExecutionError, CodeExecutionHost, CodeExecutionLimits, CodeExecutionNamespace, CodeExecutionProtocolError, CodeExecutionRequest, CodeExecutionResourceUse, CodeExecutionResult, CodeExecutionTimeoutError, CodeExecutor, CodeExecutorExecute, CodeExecutorStartError, CodeExecutorTerminatedError, CodeExecutorUnsupportedError, CodeHostCall, CodeHostCallFailure, CodeHostCallLimitError, CodeHostCallResult, CodeHostCallSuccess, CodeOutputLimitError, CodeProgramFailedError, CodeSourceError, JsIdentifier };
5
+ }
6
+ /** A JavaScript identifier safe to bind as a sandbox global or method name. */
7
+ export declare const JsIdentifier: Schema.refine<string, Schema.NonEmptyString>;
8
+ export type JsIdentifier = typeof JsIdentifier.Type;
9
+ declare const CodeExecutionNamespace_base: Schema.Class<CodeExecutionNamespace, Schema.Struct<{
10
+ readonly name: Schema.refine<string, Schema.NonEmptyString>;
11
+ readonly methods: Schema.$Array<Schema.refine<string, Schema.NonEmptyString>>;
12
+ }>, {}>;
13
+ /** One callable namespace exposed to the generated program as a typed global. */
14
+ export declare class CodeExecutionNamespace extends CodeExecutionNamespace_base {}
15
+ declare const CodeExecutionLimits_base: Schema.Class<CodeExecutionLimits, Schema.Struct<{
16
+ readonly maxSourceBytes: Schema.Int;
17
+ readonly maxWallTime: Schema.refine<Duration.Duration, Schema.Duration>;
18
+ readonly cpuMillis: Schema.optionalKey<Schema.Int>;
19
+ readonly maxLogBytes: Schema.Int;
20
+ readonly maxResultBytes: Schema.Int;
21
+ readonly maxHostCalls: Schema.Natural;
22
+ /** Maximum active host calls per pass; defaults to four. Excess calls wait in Scope. */
23
+ readonly maxHostCallConcurrency: Schema.optionalKey<Schema.Int>;
24
+ readonly maxHostCallArgumentBytes: Schema.Int;
25
+ readonly maxHostCallResultBytes: Schema.Int;
26
+ }>, {}>;
27
+ /**
28
+ * Limits an executor must either enforce or reject (CAP-015). Byte bounds are
29
+ * measured on UTF-8 encoded JSON at the sandbox boundary.
30
+ */
31
+ export declare class CodeExecutionLimits extends CodeExecutionLimits_base {}
32
+ declare const CodeExecutionRequest_base: Schema.Class<CodeExecutionRequest, Schema.Struct<{
33
+ readonly language: Schema.Literals<readonly ["javascript"]>;
34
+ readonly source: Schema.String;
35
+ readonly namespaces: Schema.$Array<typeof CodeExecutionNamespace>;
36
+ readonly network: Schema.Union<readonly [typeof NetworkDisabled, typeof NetworkAllowlist]>;
37
+ readonly limits: typeof CodeExecutionLimits;
38
+ }>, {}>;
39
+ /**
40
+ * One isolated execution pass over bounded generated JavaScript. The source
41
+ * must be a single expression evaluating to one async function; the executor
42
+ * harness invokes it exactly once with no arguments (ADR-0017 decision 5).
43
+ */
44
+ export declare class CodeExecutionRequest extends CodeExecutionRequest_base {}
45
+ declare const CodeHostCall_base: Schema.Class<CodeHostCall, Schema.Struct<{
46
+ readonly namespace: Schema.refine<string, Schema.NonEmptyString>;
47
+ readonly method: Schema.refine<string, Schema.NonEmptyString>;
48
+ readonly argument: Schema.Codec<Schema.Json, Schema.Json, never, never>;
49
+ }>, {}>;
50
+ /** One host invocation from generated code. Data only: the broker owns identity. */
51
+ export declare class CodeHostCall extends CodeHostCall_base {}
52
+ declare const CodeHostCallSuccess_base: Schema.Class<CodeHostCallSuccess, Schema.TaggedStruct<"CodeHostCallSuccess", {
53
+ readonly value: Schema.Codec<Schema.Json, Schema.Json, never, never>;
54
+ }>, {}>;
55
+ /** A host call settled with the encoded Tool success value. */
56
+ export declare class CodeHostCallSuccess extends CodeHostCallSuccess_base {}
57
+ declare const CodeHostCallFailure_base: Schema.Class<CodeHostCallFailure, Schema.TaggedStruct<"CodeHostCallFailure", {
58
+ readonly error: Schema.Codec<Schema.Json, Schema.Json, never, never>;
59
+ }>, {}>;
60
+ /**
61
+ * A host call settled with a Schema-encoded typed failure envelope. Inside the
62
+ * generated program the call's Promise rejects with the envelope value, so a
63
+ * program can catch and branch on expected failures.
64
+ */
65
+ export declare class CodeHostCallFailure extends CodeHostCallFailure_base {}
66
+ /** Outcome of one host call as data; transport failures stay executor errors. */
67
+ export declare const CodeHostCallResult: Schema.Union<readonly [typeof CodeHostCallSuccess, typeof CodeHostCallFailure]>;
68
+ export type CodeHostCallResult = typeof CodeHostCallResult.Type;
69
+ declare const CodeExecutionHost_base: Context.ServiceClass<CodeExecutionHost, "@effect-agent/sandbox/CodeExecutionHost", {
70
+ readonly call: (call: CodeHostCall) => Effect.Effect<CodeHostCallResult>;
71
+ }>;
72
+ /**
73
+ * The per-pass host capability: the only authority generated code has over the
74
+ * host. It is provided at the pass edge by the capability layer, its live
75
+ * bindings are scoped resources, and it is never persisted (ADR-0017
76
+ * decision 2). Broker-level failures return as `CodeHostCallFailure` data;
77
+ * an unexpected host defect remains a defect.
78
+ */
79
+ export declare class CodeExecutionHost extends CodeExecutionHost_base {}
80
+ declare const CodeExecutionResourceUse_base: Schema.Class<CodeExecutionResourceUse, Schema.Struct<{
81
+ readonly wallTime: Schema.refine<Duration.Duration, Schema.Duration>;
82
+ readonly hostCalls: Schema.Natural;
83
+ readonly logBytes: Schema.Natural;
84
+ readonly resultBytes: Schema.Natural;
85
+ readonly cpuMillis: Schema.optionalKey<Schema.Natural>;
86
+ }>, {}>;
87
+ /** Accounting one executor observed for one pass. */
88
+ export declare class CodeExecutionResourceUse extends CodeExecutionResourceUse_base {}
89
+ declare const CodeExecutionResult_base: Schema.Class<CodeExecutionResult, Schema.Struct<{
90
+ readonly implementation: typeof SandboxImplementation;
91
+ readonly value: Schema.Codec<Schema.Json, Schema.Json, never, never>;
92
+ readonly logs: Schema.$Array<Schema.String>;
93
+ readonly resourceUse: typeof CodeExecutionResourceUse;
94
+ }>, {}>;
95
+ /**
96
+ * The bounded outcome of one successful pass. `value` and `logs` are the raw
97
+ * executor capture; the aggregate model-visible egress budget and redaction
98
+ * pass are owned by the Code Mode capability, not the executor (CAP-016).
99
+ */
100
+ export declare class CodeExecutionResult extends CodeExecutionResult_base {}
101
+ declare const CodeSourceError_base: Schema.Class<CodeSourceError, Schema.TaggedStruct<"CodeSourceError", {
102
+ readonly implementation: typeof SandboxImplementation;
103
+ readonly reason: Schema.Literals<readonly ["invalid", "oversized", "not-a-function"]>;
104
+ readonly message: Schema.String;
105
+ }>, import("effect/Cause").YieldableError>;
106
+ /** The source is not one async function expression the executor can run. */
107
+ export declare class CodeSourceError extends CodeSourceError_base {}
108
+ declare const CodeExecutorUnsupportedError_base: Schema.Class<CodeExecutorUnsupportedError, Schema.TaggedStruct<"CodeExecutorUnsupportedError", {
109
+ readonly implementation: typeof SandboxImplementation;
110
+ readonly feature: Schema.Literals<readonly ["language", "network", "cpu-limit", "namespaces", "wall-clock", "host-calls"]>;
111
+ readonly message: Schema.String;
112
+ }>, import("effect/Cause").YieldableError>;
113
+ /** The executor cannot honestly enforce one requested feature, limit, or policy. */
114
+ export declare class CodeExecutorUnsupportedError extends CodeExecutorUnsupportedError_base {}
115
+ declare const CodeExecutorStartError_base: Schema.Class<CodeExecutorStartError, Schema.TaggedStruct<"CodeExecutorStartError", {
116
+ readonly implementation: typeof SandboxImplementation;
117
+ readonly message: Schema.String;
118
+ readonly cause: Schema.optionalKey<Schema.Defect>;
119
+ }>, import("effect/Cause").YieldableError>;
120
+ /** The executor could not start the isolated pass. */
121
+ export declare class CodeExecutorStartError extends CodeExecutorStartError_base {}
122
+ declare const CodeExecutionTimeoutError_base: Schema.Class<CodeExecutionTimeoutError, Schema.TaggedStruct<"CodeExecutionTimeoutError", {
123
+ readonly implementation: typeof SandboxImplementation;
124
+ readonly kind: Schema.Literals<readonly ["cpu", "wall-clock"]>;
125
+ readonly maxWallTime: Schema.refine<Duration.Duration, Schema.Duration>;
126
+ readonly logs: Schema.$Array<Schema.String>;
127
+ }>, import("effect/Cause").YieldableError>;
128
+ /** The pass exceeded its CPU or wall-clock budget and was terminated. */
129
+ export declare class CodeExecutionTimeoutError extends CodeExecutionTimeoutError_base {}
130
+ declare const CodeOutputLimitError_base: Schema.Class<CodeOutputLimitError, Schema.TaggedStruct<"CodeOutputLimitError", {
131
+ readonly implementation: typeof SandboxImplementation;
132
+ readonly surface: Schema.Literals<readonly ["logs", "result", "host-call-argument", "host-call-result"]>;
133
+ readonly limit: Schema.Int;
134
+ readonly observed: Schema.Natural;
135
+ readonly logs: Schema.$Array<Schema.String>;
136
+ }>, import("effect/Cause").YieldableError>;
137
+ /** A bounded surface (logs, result, or a per-call byte bound) was exceeded. */
138
+ export declare class CodeOutputLimitError extends CodeOutputLimitError_base {}
139
+ declare const CodeHostCallLimitError_base: Schema.Class<CodeHostCallLimitError, Schema.TaggedStruct<"CodeHostCallLimitError", {
140
+ readonly implementation: typeof SandboxImplementation;
141
+ readonly limit: Schema.Natural;
142
+ readonly logs: Schema.$Array<Schema.String>;
143
+ }>, import("effect/Cause").YieldableError>;
144
+ /** The pass issued more host calls than its executor-owned cap allows. */
145
+ export declare class CodeHostCallLimitError extends CodeHostCallLimitError_base {}
146
+ declare const CodeProgramFailedError_base: Schema.Class<CodeProgramFailedError, Schema.TaggedStruct<"CodeProgramFailedError", {
147
+ readonly implementation: typeof SandboxImplementation;
148
+ readonly reason: Schema.Literals<readonly ["threw", "rejected", "non-json-result"]>;
149
+ readonly thrown: Schema.Codec<Schema.Json, Schema.Json, never, never>;
150
+ readonly message: Schema.String;
151
+ readonly logs: Schema.$Array<Schema.String>;
152
+ }>, import("effect/Cause").YieldableError>;
153
+ /**
154
+ * The generated program finished by failing: it threw, its promise rejected,
155
+ * or it returned a value that is not JSON. The bounded thrown value and log
156
+ * capture flow back so a model can correct the program without a blind retry.
157
+ */
158
+ export declare class CodeProgramFailedError extends CodeProgramFailedError_base {}
159
+ declare const CodeExecutionProtocolError_base: Schema.Class<CodeExecutionProtocolError, Schema.TaggedStruct<"CodeExecutionProtocolError", {
160
+ readonly implementation: typeof SandboxImplementation;
161
+ readonly message: Schema.String;
162
+ }>, import("effect/Cause").YieldableError>;
163
+ /** The executor or its transport produced a value outside the protocol Schemas. */
164
+ export declare class CodeExecutionProtocolError extends CodeExecutionProtocolError_base {}
165
+ declare const CodeExecutorTerminatedError_base: Schema.Class<CodeExecutorTerminatedError, Schema.TaggedStruct<"CodeExecutorTerminatedError", {
166
+ readonly implementation: typeof SandboxImplementation;
167
+ readonly message: Schema.String;
168
+ }>, import("effect/Cause").YieldableError>;
169
+ /**
170
+ * The pass was terminated externally — isolate eviction or a platform kill —
171
+ * with no terminal program result. No result is fabricated.
172
+ */
173
+ export declare class CodeExecutorTerminatedError extends CodeExecutorTerminatedError_base {}
174
+ /** Expected Code Mode execution failures. Interruption stays an Effect interruption. */
175
+ export declare const CodeExecutionError: Schema.Union<readonly [typeof CodeSourceError, typeof CodeExecutorUnsupportedError, typeof CodeExecutorStartError, typeof CodeExecutionTimeoutError, typeof CodeOutputLimitError, typeof CodeHostCallLimitError, typeof CodeProgramFailedError, typeof CodeExecutionProtocolError, typeof CodeExecutorTerminatedError]>;
176
+ export type CodeExecutionError = typeof CodeExecutionError.Type;
177
+ declare const CodeExecutor_base: Context.ServiceClass<CodeExecutor, "@effect-agent/sandbox/CodeExecutor", {
178
+ readonly execute: (request: CodeExecutionRequest) => Effect.Effect<CodeExecutionResult, CodeExecutionError, Scope.Scope | CodeExecutionHost>;
179
+ }>;
180
+ /**
181
+ * Callback-capable isolated execution port for Code Mode (ADR-0017), a sibling
182
+ * of the command-shaped `Sandbox` service. One `execute` is one stateless pass:
183
+ * the executor owns no approval, Tool, replay, or Thread semantics, holds
184
+ * every pass resource in the given Scope, and reaches the host only through the
185
+ * `CodeExecutionHost` service in its requirement channel. Implementations must
186
+ * identify their isolation posture honestly; an `unisolated` executor is never
187
+ * a security boundary (CAP-010, CAP-015).
188
+ */
189
+ export declare class CodeExecutor extends CodeExecutor_base {}
190
+ /** Type helper for implementations that preserve the public CodeExecutor contract. */
191
+ export type CodeExecutorExecute = (request: CodeExecutionRequest) => Effect.Effect<CodeExecutionResult, CodeExecutionError, Scope.Scope | CodeExecutionHost>;
192
+ //#endregion
193
+ export { CodeExecutor_d_exports as t };
194
+ //# sourceMappingURL=CodeExecutor.d.mts.map