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
@@ -0,0 +1,37 @@
1
+ import { l as RunEvent } from "../RunEvent-DIrzkjLr.mjs";
2
+ import { Context, Effect, Layer, Schema } from "effect";
3
+ declare namespace Redaction_d_exports {
4
+ export { RedactedPreview, RedactionError, Redactor, StructuralRedactorLive, redactedTranscript };
5
+ }
6
+ /** Branded evidence that a preview passed through the configured structural Redactor. */
7
+ export declare const RedactedPreview: Schema.brand<Schema.refine<string, Schema.String>, "@effect-agent/capabilities/RedactedPreview">;
8
+ export type RedactedPreview = typeof RedactedPreview.Type;
9
+ declare const RedactionError_base: Schema.Class<RedactionError, Schema.TaggedStruct<"RedactionError", {
10
+ readonly reason: Schema.Literals<readonly ["input-too-deep", "input-too-large", "encoding-failed"]>;
11
+ readonly message: Schema.String;
12
+ }>, import("effect/Cause").YieldableError>;
13
+ /** Structural redaction failed closed rather than returning unreviewed caller text. */
14
+ export declare class RedactionError extends RedactionError_base {}
15
+ declare const Redactor_base: Context.ServiceClass<Redactor, "@effect-agent/capabilities/Redactor", {
16
+ readonly redact: (decodedValue: unknown) => Effect.Effect<RedactedPreview, RedactionError>;
17
+ }>;
18
+ /** Redaction owns the boundary from decoded Tool values to bounded audit/model previews. */
19
+ export declare class Redactor extends Redactor_base {}
20
+ /**
21
+ * One composed step from live Run Events to structurally redacted transcript lines
22
+ * (P7 WP7 friction fix; SEC-008/testing.md §12 "structurally redacted" live transcripts):
23
+ * Schema-encode each event through the canonical `RunEvent` union, then pass the encoded
24
+ * value through the configured `Redactor` — so the safe path is the short path and no live
25
+ * suite hand-assembles (or accidentally skips) the encode→redact pair. Engine-constructed
26
+ * events always encode, so an encode failure is a defect, never a silent omission.
27
+ */
28
+ export declare const redactedTranscript: (events: Iterable<RunEvent>) => Effect.Effect<ReadonlyArray<RedactedPreview>, RedactionError, Redactor>;
29
+ /**
30
+ * Default structural implementation. It exposes only collection shape and
31
+ * scalar types, so an ordinary field such as `note` cannot bypass redaction.
32
+ * Tool-specific Layers may expose explicitly reviewed fields instead.
33
+ */
34
+ export declare const StructuralRedactorLive: Layer.Layer<Redactor, never, never>;
35
+ //#endregion
36
+ export { Redaction_d_exports as t };
37
+ //# sourceMappingURL=Redaction.d.mts.map
@@ -0,0 +1,104 @@
1
+ import { t as __exportAll } from "../rolldown-runtime-D7D4PA-g.mjs";
2
+ import { n as utf8ByteLength } from "../utf8-DchGZRBd.mjs";
3
+ import { RunEvent } from "../core/RunEvent.mjs";
4
+ import { Context, Effect, Layer, Schema } from "effect";
5
+ //#region src/capabilities/Redaction.ts
6
+ var Redaction_exports = /* @__PURE__ */ __exportAll({
7
+ RedactedPreview: () => RedactedPreview,
8
+ RedactionError: () => RedactionError,
9
+ Redactor: () => Redactor,
10
+ StructuralRedactorLive: () => StructuralRedactorLive,
11
+ redactedTranscript: () => redactedTranscript
12
+ });
13
+ const MAX_REDACTED_PREVIEW_BYTES = 8192;
14
+ const MAX_REDACTION_NODES = 4096;
15
+ const MAX_REDACTION_DEPTH = 16;
16
+ /** Branded evidence that a preview passed through the configured structural Redactor. */
17
+ const RedactedPreview = Schema.String.pipe(Schema.refine((value) => utf8ByteLength(value) <= MAX_REDACTED_PREVIEW_BYTES, { expected: `redacted preview of at most ${MAX_REDACTED_PREVIEW_BYTES} UTF-8 bytes` }), Schema.brand("@effect-agent/capabilities/RedactedPreview"));
18
+ /** Structural redaction failed closed rather than returning unreviewed caller text. */
19
+ var RedactionError = class extends Schema.TaggedError()("RedactionError", {
20
+ reason: Schema.Literals([
21
+ "input-too-deep",
22
+ "input-too-large",
23
+ "encoding-failed"
24
+ ]),
25
+ message: Schema.String
26
+ }) {};
27
+ /** Redaction owns the boundary from decoded Tool values to bounded audit/model previews. */
28
+ var Redactor = class extends Context.Service()("@effect-agent/capabilities/Redactor") {};
29
+ const redactValue = (value, depth, counter) => {
30
+ if (depth > MAX_REDACTION_DEPTH) throw RedactionError.make({
31
+ reason: "input-too-deep",
32
+ message: `Decoded value exceeds redaction depth ${MAX_REDACTION_DEPTH}`
33
+ });
34
+ counter.nodes += 1;
35
+ if (counter.nodes > MAX_REDACTION_NODES) throw RedactionError.make({
36
+ reason: "input-too-large",
37
+ message: `Decoded value exceeds redaction node count ${MAX_REDACTION_NODES}`
38
+ });
39
+ if (Array.isArray(value)) return value.map((item) => redactValue(item, depth + 1, counter));
40
+ if (value !== null && typeof value === "object") {
41
+ const redacted = {};
42
+ for (const [key, item] of Object.entries(value)) redacted[key] = redactValue(item, depth + 1, counter);
43
+ return redacted;
44
+ }
45
+ if (value === null) return "[REDACTED:null]";
46
+ if (typeof value === "string") return "[REDACTED:string]";
47
+ if (typeof value === "number") return "[REDACTED:number]";
48
+ if (typeof value === "boolean") return "[REDACTED:boolean]";
49
+ return "[REDACTED:unsupported]";
50
+ };
51
+ const truncateUtf8 = (value, maxBytes) => {
52
+ if (utf8ByteLength(value) <= maxBytes) return value;
53
+ const suffix = "…";
54
+ const suffixBytes = utf8ByteLength(suffix);
55
+ let output = "";
56
+ let bytes = 0;
57
+ for (const character of value) {
58
+ const characterBytes = utf8ByteLength(character);
59
+ if (bytes + characterBytes + suffixBytes > maxBytes) break;
60
+ output += character;
61
+ bytes += characterBytes;
62
+ }
63
+ return `${output}${suffix}`;
64
+ };
65
+ const encodeRunEvent = Schema.encodeEffect(RunEvent);
66
+ /**
67
+ * One composed step from live Run Events to structurally redacted transcript lines
68
+ * (P7 WP7 friction fix; SEC-008/testing.md §12 "structurally redacted" live transcripts):
69
+ * Schema-encode each event through the canonical `RunEvent` union, then pass the encoded
70
+ * value through the configured `Redactor` — so the safe path is the short path and no live
71
+ * suite hand-assembles (or accidentally skips) the encode→redact pair. Engine-constructed
72
+ * events always encode, so an encode failure is a defect, never a silent omission.
73
+ */
74
+ const redactedTranscript = (events) => Effect.gen(function* () {
75
+ const redactor = yield* Redactor;
76
+ const lines = [];
77
+ for (const event of events) {
78
+ const encoded = yield* encodeRunEvent(event).pipe(Effect.orDie);
79
+ lines.push(yield* redactor.redact(encoded));
80
+ }
81
+ return lines;
82
+ });
83
+ /**
84
+ * Default structural implementation. It exposes only collection shape and
85
+ * scalar types, so an ordinary field such as `note` cannot bypass redaction.
86
+ * Tool-specific Layers may expose explicitly reviewed fields instead.
87
+ */
88
+ const StructuralRedactorLive = Layer.succeed(Redactor)({ redact: (decodedValue) => Effect.try({
89
+ try: () => {
90
+ const structurallyRedacted = redactValue(decodedValue, 0, { nodes: 0 });
91
+ return truncateUtf8(JSON.stringify(structurallyRedacted), MAX_REDACTED_PREVIEW_BYTES);
92
+ },
93
+ catch: (cause) => Schema.is(RedactionError)(cause) ? cause : RedactionError.make({
94
+ reason: "encoding-failed",
95
+ message: "Could not encode the structurally redacted preview"
96
+ })
97
+ }).pipe(Effect.flatMap((preview) => Schema.decodeEffect(RedactedPreview)(preview).pipe(Effect.mapError(() => RedactionError.make({
98
+ reason: "encoding-failed",
99
+ message: "Redacted preview did not satisfy its bounded schema"
100
+ }))))) });
101
+ //#endregion
102
+ export { RedactedPreview, RedactionError, Redactor, StructuralRedactorLive, redactedTranscript, Redaction_exports as t };
103
+
104
+ //# sourceMappingURL=Redaction.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Redaction.mjs","names":[],"sources":["../../src/capabilities/Redaction.ts"],"sourcesContent":["import { Context, Effect, Layer, Schema } from \"effect\";\n\nimport { utf8ByteLength } from \"../core/internal/utf8.ts\";\nimport { RunEvent } from \"../core/RunEvent.ts\";\n\nconst MAX_REDACTED_PREVIEW_BYTES = 8 * 1024;\nconst MAX_REDACTION_NODES = 4_096;\nconst MAX_REDACTION_DEPTH = 16;\n\n/** Branded evidence that a preview passed through the configured structural Redactor. */\nexport const RedactedPreview = Schema.String.pipe(\n Schema.refine((value): value is string => utf8ByteLength(value) <= MAX_REDACTED_PREVIEW_BYTES, {\n expected: `redacted preview of at most ${MAX_REDACTED_PREVIEW_BYTES} UTF-8 bytes`,\n }),\n Schema.brand(\"@effect-agent/capabilities/RedactedPreview\"),\n);\n\nexport type RedactedPreview = typeof RedactedPreview.Type;\n\n/** Structural redaction failed closed rather than returning unreviewed caller text. */\nexport class RedactionError extends Schema.TaggedError<RedactionError>()(\"RedactionError\", {\n reason: Schema.Literals([\"input-too-deep\", \"input-too-large\", \"encoding-failed\"]),\n message: Schema.String,\n}) {}\n\n/** Redaction owns the boundary from decoded Tool values to bounded audit/model previews. */\nexport class Redactor extends Context.Service<\n Redactor,\n {\n readonly redact: (decodedValue: unknown) => Effect.Effect<RedactedPreview, RedactionError>;\n }\n>()(\"@effect-agent/capabilities/Redactor\") {}\n\ninterface RedactionCounter {\n nodes: number;\n}\n\nconst redactValue = (value: unknown, depth: number, counter: RedactionCounter): Schema.Json => {\n if (depth > MAX_REDACTION_DEPTH) {\n throw RedactionError.make({\n reason: \"input-too-deep\",\n message: `Decoded value exceeds redaction depth ${MAX_REDACTION_DEPTH}`,\n });\n }\n counter.nodes += 1;\n if (counter.nodes > MAX_REDACTION_NODES) {\n throw RedactionError.make({\n reason: \"input-too-large\",\n message: `Decoded value exceeds redaction node count ${MAX_REDACTION_NODES}`,\n });\n }\n if (Array.isArray(value)) {\n return value.map((item) => redactValue(item, depth + 1, counter));\n }\n if (value !== null && typeof value === \"object\") {\n const redacted: Record<string, Schema.Json> = {};\n\n for (const [key, item] of Object.entries(value)) {\n redacted[key] = redactValue(item, depth + 1, counter);\n }\n\n return redacted;\n }\n // The default policy is deliberately type-aware and fail-closed: it preserves\n // object/array shape for reviewer context but never copies a decoded scalar,\n // regardless of its field name. Applications that need visible values provide\n // a Tool-specific Redactor after validating those values against that Tool's\n // input Schema.\n if (value === null) return \"[REDACTED:null]\";\n if (typeof value === \"string\") return \"[REDACTED:string]\";\n if (typeof value === \"number\") return \"[REDACTED:number]\";\n if (typeof value === \"boolean\") return \"[REDACTED:boolean]\";\n\n return \"[REDACTED:unsupported]\";\n};\n\nconst truncateUtf8 = (value: string, maxBytes: number): string => {\n if (utf8ByteLength(value) <= maxBytes) {\n return value;\n }\n const suffix = \"…\";\n const suffixBytes = utf8ByteLength(suffix);\n let output = \"\";\n let bytes = 0;\n\n for (const character of value) {\n const characterBytes = utf8ByteLength(character);\n\n if (bytes + characterBytes + suffixBytes > maxBytes) {\n break;\n }\n output += character;\n bytes += characterBytes;\n }\n\n return `${output}${suffix}`;\n};\n\nconst encodeRunEvent = Schema.encodeEffect(RunEvent);\n\n/**\n * One composed step from live Run Events to structurally redacted transcript lines\n * (P7 WP7 friction fix; SEC-008/testing.md §12 \"structurally redacted\" live transcripts):\n * Schema-encode each event through the canonical `RunEvent` union, then pass the encoded\n * value through the configured `Redactor` — so the safe path is the short path and no live\n * suite hand-assembles (or accidentally skips) the encode→redact pair. Engine-constructed\n * events always encode, so an encode failure is a defect, never a silent omission.\n */\nexport const redactedTranscript = (\n events: Iterable<RunEvent>,\n): Effect.Effect<ReadonlyArray<RedactedPreview>, RedactionError, Redactor> =>\n Effect.gen(function* () {\n const redactor = yield* Redactor;\n const lines: Array<RedactedPreview> = [];\n\n for (const event of events) {\n const encoded = yield* encodeRunEvent(event).pipe(Effect.orDie);\n\n lines.push(yield* redactor.redact(encoded));\n }\n\n return lines;\n });\n\n/**\n * Default structural implementation. It exposes only collection shape and\n * scalar types, so an ordinary field such as `note` cannot bypass redaction.\n * Tool-specific Layers may expose explicitly reviewed fields instead.\n */\nexport const StructuralRedactorLive = Layer.succeed(Redactor)({\n redact: (decodedValue) =>\n Effect.try({\n try: () => {\n const structurallyRedacted = redactValue(decodedValue, 0, { nodes: 0 });\n\n return truncateUtf8(JSON.stringify(structurallyRedacted), MAX_REDACTED_PREVIEW_BYTES);\n },\n catch: (cause) =>\n Schema.is(RedactionError)(cause)\n ? cause\n : RedactionError.make({\n reason: \"encoding-failed\",\n message: \"Could not encode the structurally redacted preview\",\n }),\n }).pipe(\n Effect.flatMap((preview) =>\n Schema.decodeEffect(RedactedPreview)(preview).pipe(\n Effect.mapError(() =>\n RedactionError.make({\n reason: \"encoding-failed\",\n message: \"Redacted preview did not satisfy its bounded schema\",\n }),\n ),\n ),\n ),\n ),\n});\n"],"mappings":";;;;;;;;;;;;AAKA,MAAM,6BAA6B;AACnC,MAAM,sBAAsB;AAC5B,MAAM,sBAAsB;;AAG5B,MAAa,kBAAkB,OAAO,OAAO,KAC3C,OAAO,QAAQ,UAA2B,eAAe,KAAK,KAAK,4BAA4B,EAC7F,UAAU,+BAA+B,2BAA2B,cACtE,CAAC,GACD,OAAO,MAAM,4CAA4C,CAC3D;;AAKA,IAAa,iBAAb,cAAoC,OAAO,YAA4B,CAAC,CAAC,kBAAkB;CACzF,QAAQ,OAAO,SAAS;EAAC;EAAkB;EAAmB;CAAiB,CAAC;CAChF,SAAS,OAAO;AAClB,CAAC,CAAC,CAAC,CAAC;;AAGJ,IAAa,WAAb,cAA8B,QAAQ,QAKpC,CAAC,CAAC,qCAAqC,CAAC,CAAC,CAAC;AAM5C,MAAM,eAAe,OAAgB,OAAe,YAA2C;CAC7F,IAAI,QAAQ,qBACV,MAAM,eAAe,KAAK;EACxB,QAAQ;EACR,SAAS,yCAAyC;CACpD,CAAC;CAEH,QAAQ,SAAS;CACjB,IAAI,QAAQ,QAAQ,qBAClB,MAAM,eAAe,KAAK;EACxB,QAAQ;EACR,SAAS,8CAA8C;CACzD,CAAC;CAEH,IAAI,MAAM,QAAQ,KAAK,GACrB,OAAO,MAAM,KAAK,SAAS,YAAY,MAAM,QAAQ,GAAG,OAAO,CAAC;CAElE,IAAI,UAAU,QAAQ,OAAO,UAAU,UAAU;EAC/C,MAAM,WAAwC,CAAC;EAE/C,KAAK,MAAM,CAAC,KAAK,SAAS,OAAO,QAAQ,KAAK,GAC5C,SAAS,OAAO,YAAY,MAAM,QAAQ,GAAG,OAAO;EAGtD,OAAO;CACT;CAMA,IAAI,UAAU,MAAM,OAAO;CAC3B,IAAI,OAAO,UAAU,UAAU,OAAO;CACtC,IAAI,OAAO,UAAU,UAAU,OAAO;CACtC,IAAI,OAAO,UAAU,WAAW,OAAO;CAEvC,OAAO;AACT;AAEA,MAAM,gBAAgB,OAAe,aAA6B;CAChE,IAAI,eAAe,KAAK,KAAK,UAC3B,OAAO;CAET,MAAM,SAAS;CACf,MAAM,cAAc,eAAe,MAAM;CACzC,IAAI,SAAS;CACb,IAAI,QAAQ;CAEZ,KAAK,MAAM,aAAa,OAAO;EAC7B,MAAM,iBAAiB,eAAe,SAAS;EAE/C,IAAI,QAAQ,iBAAiB,cAAc,UACzC;EAEF,UAAU;EACV,SAAS;CACX;CAEA,OAAO,GAAG,SAAS;AACrB;AAEA,MAAM,iBAAiB,OAAO,aAAa,QAAQ;;;;;;;;;AAUnD,MAAa,sBACX,WAEA,OAAO,IAAI,aAAa;CACtB,MAAM,WAAW,OAAO;CACxB,MAAM,QAAgC,CAAC;CAEvC,KAAK,MAAM,SAAS,QAAQ;EAC1B,MAAM,UAAU,OAAO,eAAe,KAAK,CAAC,CAAC,KAAK,OAAO,KAAK;EAE9D,MAAM,KAAK,OAAO,SAAS,OAAO,OAAO,CAAC;CAC5C;CAEA,OAAO;AACT,CAAC;;;;;;AAOH,MAAa,yBAAyB,MAAM,QAAQ,QAAQ,CAAC,CAAC,EAC5D,SAAS,iBACP,OAAO,IAAI;CACT,WAAW;EACT,MAAM,uBAAuB,YAAY,cAAc,GAAG,EAAE,OAAO,EAAE,CAAC;EAEtE,OAAO,aAAa,KAAK,UAAU,oBAAoB,GAAG,0BAA0B;CACtF;CACA,QAAQ,UACN,OAAO,GAAG,cAAc,CAAC,CAAC,KAAK,IAC3B,QACA,eAAe,KAAK;EAClB,QAAQ;EACR,SAAS;CACX,CAAC;AACT,CAAC,CAAC,CAAC,KACD,OAAO,SAAS,YACd,OAAO,aAAa,eAAe,CAAC,CAAC,OAAO,CAAC,CAAC,KAC5C,OAAO,eACL,eAAe,KAAK;CAClB,QAAQ;CACR,SAAS;AACX,CAAC,CACH,CACF,CACF,CACF,EACJ,CAAC"}
@@ -0,0 +1,434 @@
1
+ import { n as MemoryContent } from "../MemoryReference-B8Q3UJoJ.mjs";
2
+ import { i as MemoryNamespace_d_exports, t as Any } from "../MemoryNamespace-BbRW5p71.mjs";
3
+ import { MemoryDocument, MemoryMutationFailure, MemoryOperationConflict, MemoryReader, MemoryStorageError, MemoryWriter } from "../core/MemoryStore.mjs";
4
+ import { Admission, AdmissionError, BoundCheckpoint, CheckpointError, Extracted, Intent, Invalidation, InvalidationReceipt, MutationFailpoint, MutationFailure, ProcessingError, Store, t as RememberingStore_d_exports } from "../core/RememberingStore.mjs";
5
+ import { Effect, Schema } from "effect";
6
+ declare namespace Remembering_d_exports {
7
+ export { CleanupInput, Decision, Limits, MergeInput, SourceSnapshot, admit, invalidate, make };
8
+ }
9
+ declare const Limits_base: Schema.Class<Limits, Schema.Struct<{
10
+ readonly maxSourceBytes: Schema.Int;
11
+ readonly maxProposalBytes: Schema.Int;
12
+ readonly timeoutMillis: Schema.Int;
13
+ }>, {}>;
14
+ export declare class Limits extends Limits_base {}
15
+ declare const SourceSnapshot_base: Schema.Class<SourceSnapshot, Schema.Struct<{
16
+ readonly source: Schema.Struct<{
17
+ readonly key: {
18
+ new (props: {
19
+ readonly namespace: {
20
+ readonly address: string & import("effect/Brand").Brand<"@effect-agent/core/MemoryNamespaceAddress">;
21
+ };
22
+ readonly id: string;
23
+ }, options?: Schema.MakeOptions | undefined): {
24
+ readonly namespace: {
25
+ readonly address: string & import("effect/Brand").Brand<"@effect-agent/core/MemoryNamespaceAddress">;
26
+ };
27
+ readonly id: string;
28
+ };
29
+ pipe<A>(this: A): A;
30
+ pipe<A, B = never>(this: A, ab: (_: A) => B): B;
31
+ pipe<A, B = never, C = never>(this: A, ab: (_: A) => B, bc: (_: B) => C): C;
32
+ pipe<A, B = never, C = never, D = never>(this: A, ab: (_: A) => B, bc: (_: B) => C, cd: (_: C) => D): D;
33
+ pipe<A, B = never, C = never, D = never, E = never>(this: A, ab: (_: A) => B, bc: (_: B) => C, cd: (_: C) => D, de: (_: D) => E): E;
34
+ pipe<A, B = never, C = never, D = never, E = never, F = never>(this: A, ab: (_: A) => B, bc: (_: B) => C, cd: (_: C) => D, de: (_: D) => E, ef: (_: E) => F): F;
35
+ pipe<A, B = never, C = never, D = never, E = never, F = never, G = never>(this: A, ab: (_: A) => B, bc: (_: B) => C, cd: (_: C) => D, de: (_: D) => E, ef: (_: E) => F, fg: (_: F) => G): G;
36
+ pipe<A, B = never, C = never, D = never, E = never, F = never, G = never, H = never>(this: A, ab: (_: A) => B, bc: (_: B) => C, cd: (_: C) => D, de: (_: D) => E, ef: (_: E) => F, fg: (_: F) => G, gh: (_: G) => H): H;
37
+ pipe<A, B = never, C = never, D = never, E = never, F = never, G = never, H = never, I = never>(this: A, ab: (_: A) => B, bc: (_: B) => C, cd: (_: C) => D, de: (_: D) => E, ef: (_: E) => F, fg: (_: F) => G, gh: (_: G) => H, hi: (_: H) => I): I;
38
+ pipe<A, B = never, C = never, D = never, E = never, F = never, G = never, H = never, I = never, J = never>(this: A, ab: (_: A) => B, bc: (_: B) => C, cd: (_: C) => D, de: (_: D) => E, ef: (_: E) => F, fg: (_: F) => G, gh: (_: G) => H, hi: (_: H) => I, ij: (_: I) => J): J;
39
+ pipe<A, B = never, C = never, D = never, E = never, F = never, G = never, H = never, I = never, J = never, K = never>(this: A, ab: (_: A) => B, bc: (_: B) => C, cd: (_: C) => D, de: (_: D) => E, ef: (_: E) => F, fg: (_: F) => G, gh: (_: G) => H, hi: (_: H) => I, ij: (_: I) => J, jk: (_: J) => K): K;
40
+ pipe<A, B = never, C = never, D = never, E = never, F = never, G = never, H = never, I = never, J = never, K = never, L = never>(this: A, ab: (_: A) => B, bc: (_: B) => C, cd: (_: C) => D, de: (_: D) => E, ef: (_: E) => F, fg: (_: F) => G, gh: (_: G) => H, hi: (_: H) => I, ij: (_: I) => J, jk: (_: J) => K, kl: (_: K) => L): L;
41
+ pipe<A, B = never, C = never, D = never, E = never, F = never, G = never, H = never, I = never, J = never, K = never, L = never, M = never>(this: A, ab: (_: A) => B, bc: (_: B) => C, cd: (_: C) => D, de: (_: D) => E, ef: (_: E) => F, fg: (_: F) => G, gh: (_: G) => H, hi: (_: H) => I, ij: (_: I) => J, jk: (_: J) => K, kl: (_: K) => L, lm: (_: L) => M): M;
42
+ pipe<A, B = never, C = never, D = never, E = never, F = never, G = never, H = never, I = never, J = never, K = never, L = never, M = never, N = never>(this: A, ab: (_: A) => B, bc: (_: B) => C, cd: (_: C) => D, de: (_: D) => E, ef: (_: E) => F, fg: (_: F) => G, gh: (_: G) => H, hi: (_: H) => I, ij: (_: I) => J, jk: (_: J) => K, kl: (_: K) => L, lm: (_: L) => M, mn: (_: M) => N): N;
43
+ pipe<A, B = never, C = never, D = never, E = never, F = never, G = never, H = never, I = never, J = never, K = never, L = never, M = never, N = never, O = never>(this: A, ab: (_: A) => B, bc: (_: B) => C, cd: (_: C) => D, de: (_: D) => E, ef: (_: E) => F, fg: (_: F) => G, gh: (_: G) => H, hi: (_: H) => I, ij: (_: I) => J, jk: (_: J) => K, kl: (_: K) => L, lm: (_: L) => M, mn: (_: M) => N, no: (_: N) => O): O;
44
+ pipe<A, B = never, C = never, D = never, E = never, F = never, G = never, H = never, I = never, J = never, K = never, L = never, M = never, N = never, O = never, P = never>(this: A, ab: (_: A) => B, bc: (_: B) => C, cd: (_: C) => D, de: (_: D) => E, ef: (_: E) => F, fg: (_: F) => G, gh: (_: G) => H, hi: (_: H) => I, ij: (_: I) => J, jk: (_: J) => K, kl: (_: K) => L, lm: (_: L) => M, mn: (_: M) => N, no: (_: N) => O, op: (_: O) => P): P;
45
+ pipe<A, B = never, C = never, D = never, E = never, F = never, G = never, H = never, I = never, J = never, K = never, L = never, M = never, N = never, O = never, P = never, Q = never>(this: A, ab: (_: A) => B, bc: (_: B) => C, cd: (_: C) => D, de: (_: D) => E, ef: (_: E) => F, fg: (_: F) => G, gh: (_: G) => H, hi: (_: H) => I, ij: (_: I) => J, jk: (_: J) => K, kl: (_: K) => L, lm: (_: L) => M, mn: (_: M) => N, no: (_: N) => O, op: (_: O) => P, pq: (_: P) => Q): Q;
46
+ pipe<A, B = never, C = never, D = never, E = never, F = never, G = never, H = never, I = never, J = never, K = never, L = never, M = never, N = never, O = never, P = never, Q = never, R = never>(this: A, ab: (_: A) => B, bc: (_: B) => C, cd: (_: C) => D, de: (_: D) => E, ef: (_: E) => F, fg: (_: F) => G, gh: (_: G) => H, hi: (_: H) => I, ij: (_: I) => J, jk: (_: J) => K, kl: (_: K) => L, lm: (_: L) => M, mn: (_: M) => N, no: (_: N) => O, op: (_: O) => P, pq: (_: P) => Q, qr: (_: Q) => R): R;
47
+ pipe<A, B = never, C = never, D = never, E = never, F = never, G = never, H = never, I = never, J = never, K = never, L = never, M = never, N = never, O = never, P = never, Q = never, R = never, S = never>(this: A, ab: (_: A) => B, bc: (_: B) => C, cd: (_: C) => D, de: (_: D) => E, ef: (_: E) => F, fg: (_: F) => G, gh: (_: G) => H, hi: (_: H) => I, ij: (_: I) => J, jk: (_: J) => K, kl: (_: K) => L, lm: (_: L) => M, mn: (_: M) => N, no: (_: N) => O, op: (_: O) => P, pq: (_: P) => Q, qr: (_: Q) => R, rs: (_: R) => S): S;
48
+ pipe<A, B = never, C = never, D = never, E = never, F = never, G = never, H = never, I = never, J = never, K = never, L = never, M = never, N = never, O = never, P = never, Q = never, R = never, S = never, T = never>(this: A, ab: (_: A) => B, bc: (_: B) => C, cd: (_: C) => D, de: (_: D) => E, ef: (_: E) => F, fg: (_: F) => G, gh: (_: G) => H, hi: (_: H) => I, ij: (_: I) => J, jk: (_: J) => K, kl: (_: K) => L, lm: (_: L) => M, mn: (_: M) => N, no: (_: N) => O, op: (_: O) => P, pq: (_: P) => Q, qr: (_: Q) => R, rs: (_: R) => S, st: (_: S) => T): T;
49
+ pipe<A, B = never, C = never, D = never, E = never, F = never, G = never, H = never, I = never, J = never, K = never, L = never, M = never, N = never, O = never, P = never, Q = never, R = never, S = never, T = never, U = never>(this: A, ab: (_: A) => B, bc: (_: B) => C, cd: (_: C) => D, de: (_: D) => E, ef: (_: E) => F, fg: (_: F) => G, gh: (_: G) => H, hi: (_: H) => I, ij: (_: I) => J, jk: (_: J) => K, kl: (_: K) => L, lm: (_: L) => M, mn: (_: M) => N, no: (_: N) => O, op: (_: O) => P, pq: (_: P) => Q, qr: (_: Q) => R, rs: (_: R) => S, st: (_: S) => T, tu: (_: T) => U): U;
50
+ pipe<A, B = never, C = never, D = never, E = never, F = never, G = never, H = never, I = never, J = never, K = never, L = never, M = never, N = never, O = never, P = never, Q = never, R = never, S = never, T = never, U = never>(this: A, ab: (_: A) => B, bc: (_: B) => C, cd: (_: C) => D, de: (_: D) => E, ef: (_: E) => F, fg: (_: F) => G, gh: (_: G) => H, hi: (_: H) => I, ij: (_: I) => J, jk: (_: J) => K, kl: (_: K) => L, lm: (_: L) => M, mn: (_: M) => N, no: (_: N) => O, op: (_: O) => P, pq: (_: P) => Q, qr: (_: Q) => R, rs: (_: R) => S, st: (_: S) => T, tu: (_: T) => U): U;
51
+ readonly Rebuild: Schema.decodeTo<Schema.declareConstructor<{
52
+ readonly namespace: {
53
+ readonly address: string & import("effect/Brand").Brand<"@effect-agent/core/MemoryNamespaceAddress">;
54
+ };
55
+ readonly id: string;
56
+ }, {
57
+ readonly namespace: {
58
+ readonly address: string;
59
+ };
60
+ readonly id: string;
61
+ }, readonly [Schema.Struct<{
62
+ readonly namespace: Schema.Struct<{
63
+ readonly address: Schema.brand<Schema.String, "@effect-agent/core/MemoryNamespaceAddress">;
64
+ }>;
65
+ readonly id: Schema.NonEmptyString;
66
+ }>], {
67
+ readonly namespace: {
68
+ readonly address: string & import("effect/Brand").Brand<"@effect-agent/core/MemoryNamespaceAddress">;
69
+ };
70
+ readonly id: string;
71
+ }>, Schema.Struct<{
72
+ readonly namespace: Schema.Struct<{
73
+ readonly address: Schema.brand<Schema.String, "@effect-agent/core/MemoryNamespaceAddress">;
74
+ }>;
75
+ readonly id: Schema.NonEmptyString;
76
+ }>, never, never>;
77
+ readonly "~effect/Schema/Schema": "~effect/Schema/Schema";
78
+ readonly ast: import("effect/SchemaAST").Declaration;
79
+ readonly "~type.parameters": readonly [Schema.Struct<{
80
+ readonly namespace: Schema.Struct<{
81
+ readonly address: Schema.brand<Schema.String, "@effect-agent/core/MemoryNamespaceAddress">;
82
+ }>;
83
+ readonly id: Schema.NonEmptyString;
84
+ }>];
85
+ readonly "~type.constructor.default": "no-default";
86
+ readonly "~type.mutability": "readonly";
87
+ readonly "~type.optionality": "required";
88
+ readonly "~encoded.mutability": "readonly";
89
+ readonly "~encoded.optionality": "required";
90
+ annotate(annotations: Schema.Annotations.Bottom<{
91
+ readonly namespace: {
92
+ readonly address: string & import("effect/Brand").Brand<"@effect-agent/core/MemoryNamespaceAddress">;
93
+ };
94
+ readonly id: string;
95
+ }, readonly [Schema.Struct<{
96
+ readonly namespace: Schema.Struct<{
97
+ readonly address: Schema.brand<Schema.String, "@effect-agent/core/MemoryNamespaceAddress">;
98
+ }>;
99
+ readonly id: Schema.NonEmptyString;
100
+ }>]>): Schema.decodeTo<Schema.declareConstructor<{
101
+ readonly namespace: {
102
+ readonly address: string & import("effect/Brand").Brand<"@effect-agent/core/MemoryNamespaceAddress">;
103
+ };
104
+ readonly id: string;
105
+ }, {
106
+ readonly namespace: {
107
+ readonly address: string;
108
+ };
109
+ readonly id: string;
110
+ }, readonly [Schema.Struct<{
111
+ readonly namespace: Schema.Struct<{
112
+ readonly address: Schema.brand<Schema.String, "@effect-agent/core/MemoryNamespaceAddress">;
113
+ }>;
114
+ readonly id: Schema.NonEmptyString;
115
+ }>], {
116
+ readonly namespace: {
117
+ readonly address: string & import("effect/Brand").Brand<"@effect-agent/core/MemoryNamespaceAddress">;
118
+ };
119
+ readonly id: string;
120
+ }>, Schema.Struct<{
121
+ readonly namespace: Schema.Struct<{
122
+ readonly address: Schema.brand<Schema.String, "@effect-agent/core/MemoryNamespaceAddress">;
123
+ }>;
124
+ readonly id: Schema.NonEmptyString;
125
+ }>, never, never>;
126
+ annotateKey(annotations: Schema.Annotations.Key<{
127
+ readonly namespace: {
128
+ readonly address: string & import("effect/Brand").Brand<"@effect-agent/core/MemoryNamespaceAddress">;
129
+ };
130
+ readonly id: string;
131
+ }>): Schema.decodeTo<Schema.declareConstructor<{
132
+ readonly namespace: {
133
+ readonly address: string & import("effect/Brand").Brand<"@effect-agent/core/MemoryNamespaceAddress">;
134
+ };
135
+ readonly id: string;
136
+ }, {
137
+ readonly namespace: {
138
+ readonly address: string;
139
+ };
140
+ readonly id: string;
141
+ }, readonly [Schema.Struct<{
142
+ readonly namespace: Schema.Struct<{
143
+ readonly address: Schema.brand<Schema.String, "@effect-agent/core/MemoryNamespaceAddress">;
144
+ }>;
145
+ readonly id: Schema.NonEmptyString;
146
+ }>], {
147
+ readonly namespace: {
148
+ readonly address: string & import("effect/Brand").Brand<"@effect-agent/core/MemoryNamespaceAddress">;
149
+ };
150
+ readonly id: string;
151
+ }>, Schema.Struct<{
152
+ readonly namespace: Schema.Struct<{
153
+ readonly address: Schema.brand<Schema.String, "@effect-agent/core/MemoryNamespaceAddress">;
154
+ }>;
155
+ readonly id: Schema.NonEmptyString;
156
+ }>, never, never>;
157
+ check(checks_0: import("effect/SchemaAST").Check<{
158
+ readonly namespace: {
159
+ readonly address: string & import("effect/Brand").Brand<"@effect-agent/core/MemoryNamespaceAddress">;
160
+ };
161
+ readonly id: string;
162
+ }>, ...checks: import("effect/SchemaAST").Check<{
163
+ readonly namespace: {
164
+ readonly address: string & import("effect/Brand").Brand<"@effect-agent/core/MemoryNamespaceAddress">;
165
+ };
166
+ readonly id: string;
167
+ }>[]): Schema.decodeTo<Schema.declareConstructor<{
168
+ readonly namespace: {
169
+ readonly address: string & import("effect/Brand").Brand<"@effect-agent/core/MemoryNamespaceAddress">;
170
+ };
171
+ readonly id: string;
172
+ }, {
173
+ readonly namespace: {
174
+ readonly address: string;
175
+ };
176
+ readonly id: string;
177
+ }, readonly [Schema.Struct<{
178
+ readonly namespace: Schema.Struct<{
179
+ readonly address: Schema.brand<Schema.String, "@effect-agent/core/MemoryNamespaceAddress">;
180
+ }>;
181
+ readonly id: Schema.NonEmptyString;
182
+ }>], {
183
+ readonly namespace: {
184
+ readonly address: string & import("effect/Brand").Brand<"@effect-agent/core/MemoryNamespaceAddress">;
185
+ };
186
+ readonly id: string;
187
+ }>, Schema.Struct<{
188
+ readonly namespace: Schema.Struct<{
189
+ readonly address: Schema.brand<Schema.String, "@effect-agent/core/MemoryNamespaceAddress">;
190
+ }>;
191
+ readonly id: Schema.NonEmptyString;
192
+ }>, never, never>;
193
+ rebuild(ast: import("effect/SchemaAST").Declaration): Schema.decodeTo<Schema.declareConstructor<{
194
+ readonly namespace: {
195
+ readonly address: string & import("effect/Brand").Brand<"@effect-agent/core/MemoryNamespaceAddress">;
196
+ };
197
+ readonly id: string;
198
+ }, {
199
+ readonly namespace: {
200
+ readonly address: string;
201
+ };
202
+ readonly id: string;
203
+ }, readonly [Schema.Struct<{
204
+ readonly namespace: Schema.Struct<{
205
+ readonly address: Schema.brand<Schema.String, "@effect-agent/core/MemoryNamespaceAddress">;
206
+ }>;
207
+ readonly id: Schema.NonEmptyString;
208
+ }>], {
209
+ readonly namespace: {
210
+ readonly address: string & import("effect/Brand").Brand<"@effect-agent/core/MemoryNamespaceAddress">;
211
+ };
212
+ readonly id: string;
213
+ }>, Schema.Struct<{
214
+ readonly namespace: Schema.Struct<{
215
+ readonly address: Schema.brand<Schema.String, "@effect-agent/core/MemoryNamespaceAddress">;
216
+ }>;
217
+ readonly id: Schema.NonEmptyString;
218
+ }>, never, never>;
219
+ make(input: {
220
+ readonly namespace: {
221
+ readonly address: string & import("effect/Brand").Brand<"@effect-agent/core/MemoryNamespaceAddress">;
222
+ };
223
+ readonly id: string;
224
+ }, options?: Schema.MakeOptions): {
225
+ readonly namespace: {
226
+ readonly address: string & import("effect/Brand").Brand<"@effect-agent/core/MemoryNamespaceAddress">;
227
+ };
228
+ readonly id: string;
229
+ };
230
+ makeOption(input: {
231
+ readonly namespace: {
232
+ readonly address: string & import("effect/Brand").Brand<"@effect-agent/core/MemoryNamespaceAddress">;
233
+ };
234
+ readonly id: string;
235
+ }, options?: Schema.MakeOptions): import("effect/Option").Option<{
236
+ readonly namespace: {
237
+ readonly address: string & import("effect/Brand").Brand<"@effect-agent/core/MemoryNamespaceAddress">;
238
+ };
239
+ readonly id: string;
240
+ }>;
241
+ makeEffect(input: {
242
+ readonly namespace: {
243
+ readonly address: string & import("effect/Brand").Brand<"@effect-agent/core/MemoryNamespaceAddress">;
244
+ };
245
+ readonly id: string;
246
+ }, options?: Schema.MakeOptions): Effect.Effect<{
247
+ readonly namespace: {
248
+ readonly address: string & import("effect/Brand").Brand<"@effect-agent/core/MemoryNamespaceAddress">;
249
+ };
250
+ readonly id: string;
251
+ }, import("effect/SchemaIssue").Issue, never>;
252
+ readonly Type: {
253
+ readonly namespace: {
254
+ readonly address: string & import("effect/Brand").Brand<"@effect-agent/core/MemoryNamespaceAddress">;
255
+ };
256
+ readonly id: string;
257
+ };
258
+ readonly Encoded: {
259
+ readonly namespace: {
260
+ readonly address: string;
261
+ };
262
+ readonly id: string;
263
+ };
264
+ readonly DecodingServices: never;
265
+ readonly EncodingServices: never;
266
+ readonly "~type.make.in": {
267
+ readonly namespace: {
268
+ readonly address: string & import("effect/Brand").Brand<"@effect-agent/core/MemoryNamespaceAddress">;
269
+ };
270
+ readonly id: string;
271
+ };
272
+ readonly "~type.make": {
273
+ readonly namespace: {
274
+ readonly address: string & import("effect/Brand").Brand<"@effect-agent/core/MemoryNamespaceAddress">;
275
+ };
276
+ readonly id: string;
277
+ };
278
+ readonly Iso: {
279
+ readonly namespace: {
280
+ readonly address: string & import("effect/Brand").Brand<"@effect-agent/core/MemoryNamespaceAddress">;
281
+ };
282
+ readonly id: string;
283
+ };
284
+ readonly identifier: string;
285
+ readonly fields: {
286
+ readonly namespace: Schema.Struct<{
287
+ readonly address: Schema.brand<Schema.String, "@effect-agent/core/MemoryNamespaceAddress">;
288
+ }>;
289
+ readonly id: Schema.NonEmptyString;
290
+ };
291
+ mapFields<To extends Schema.Struct.Fields>(f: (fields: {
292
+ readonly namespace: Schema.Struct<{
293
+ readonly address: Schema.brand<Schema.String, "@effect-agent/core/MemoryNamespaceAddress">;
294
+ }>;
295
+ readonly id: Schema.NonEmptyString;
296
+ }) => To, options?: {
297
+ readonly unsafePreserveChecks?: boolean | undefined;
298
+ } | undefined): Schema.Struct<{ [K in keyof Readonly<To>]: Readonly<To>[K]; }>;
299
+ extend<Extended = never, Static = {}, Brand = {}>(identifier: string): {
300
+ <NewFields extends Schema.Struct.Fields>(fields: NewFields, annotations?: Schema.Annotations.Declaration<Extended, readonly [Schema.Struct<((("id" | "namespace") & keyof NewFields extends never ? {
301
+ readonly namespace: Schema.Struct<{
302
+ readonly address: Schema.brand<Schema.String, "@effect-agent/core/MemoryNamespaceAddress">;
303
+ }>;
304
+ readonly id: Schema.NonEmptyString;
305
+ } & NewFields : Omit<{
306
+ readonly namespace: Schema.Struct<{
307
+ readonly address: Schema.brand<Schema.String, "@effect-agent/core/MemoryNamespaceAddress">;
308
+ }>;
309
+ readonly id: Schema.NonEmptyString;
310
+ }, ("id" | "namespace") & keyof NewFields> & NewFields) extends (infer T_1) ? { [K in keyof T_1]: T_1[K]; } : never) extends (infer T) ? { [K in keyof T]: T[K]; } : never>]> | undefined): [Extended] extends [never] ? "Missing `Self` generic - use `class Self extends Base.extend<Self>(...)`" : Schema.Class<Extended, Schema.Struct<((("id" | "namespace") & keyof NewFields extends never ? {
311
+ readonly namespace: Schema.Struct<{
312
+ readonly address: Schema.brand<Schema.String, "@effect-agent/core/MemoryNamespaceAddress">;
313
+ }>;
314
+ readonly id: Schema.NonEmptyString;
315
+ } & NewFields : Omit<{
316
+ readonly namespace: Schema.Struct<{
317
+ readonly address: Schema.brand<Schema.String, "@effect-agent/core/MemoryNamespaceAddress">;
318
+ }>;
319
+ readonly id: Schema.NonEmptyString;
320
+ }, ("id" | "namespace") & keyof NewFields> & NewFields) extends (infer T_1) ? { [K in keyof T_1]: T_1[K]; } : never) extends (infer T) ? { [K in keyof T]: T[K]; } : never>, {
321
+ readonly namespace: {
322
+ readonly address: string & import("effect/Brand").Brand<"@effect-agent/core/MemoryNamespaceAddress">;
323
+ };
324
+ readonly id: string;
325
+ } & Brand> & Pick<Static, Exclude<keyof Static, keyof Schema.Class<Extended_1, Schema.Struct<((keyof S["fields"] & keyof NewFields_1 extends never ? S["fields"] & NewFields_1 : Omit<S["fields"], keyof S["fields"] & keyof NewFields_1> & NewFields_1) extends (infer T_3) ? { [K in keyof T_3]: T_3[K]; } : never) extends (infer T_2) ? { [K in keyof T_2]: T_2[K]; } : never>, Self & Brand_1>>>;
326
+ <Extension extends Schema.Struct<Schema.Struct.Fields>>(schema: Extension, annotations?: Schema.Annotations.Declaration<Extended, readonly [Schema.Struct<((("id" | "namespace") & keyof Extension["fields"] extends never ? {
327
+ readonly namespace: Schema.Struct<{
328
+ readonly address: Schema.brand<Schema.String, "@effect-agent/core/MemoryNamespaceAddress">;
329
+ }>;
330
+ readonly id: Schema.NonEmptyString;
331
+ } & Extension["fields"] : Omit<{
332
+ readonly namespace: Schema.Struct<{
333
+ readonly address: Schema.brand<Schema.String, "@effect-agent/core/MemoryNamespaceAddress">;
334
+ }>;
335
+ readonly id: Schema.NonEmptyString;
336
+ }, ("id" | "namespace") & keyof Extension["fields"]> & Extension["fields"]) extends (infer T_1) ? { [K in keyof T_1]: T_1[K]; } : never) extends (infer T) ? { [K in keyof T]: T[K]; } : never>]> | undefined): [Extended] extends [never] ? "Missing `Self` generic - use `class Self extends Base.extend<Self>(...)`" : Schema.Class<Extended, Schema.Struct<((("id" | "namespace") & keyof Extension["fields"] extends never ? {
337
+ readonly namespace: Schema.Struct<{
338
+ readonly address: Schema.brand<Schema.String, "@effect-agent/core/MemoryNamespaceAddress">;
339
+ }>;
340
+ readonly id: Schema.NonEmptyString;
341
+ } & Extension["fields"] : Omit<{
342
+ readonly namespace: Schema.Struct<{
343
+ readonly address: Schema.brand<Schema.String, "@effect-agent/core/MemoryNamespaceAddress">;
344
+ }>;
345
+ readonly id: Schema.NonEmptyString;
346
+ }, ("id" | "namespace") & keyof Extension["fields"]> & Extension["fields"]) extends (infer T_1) ? { [K in keyof T_1]: T_1[K]; } : never) extends (infer T) ? { [K in keyof T]: T[K]; } : never>, {
347
+ readonly namespace: {
348
+ readonly address: string & import("effect/Brand").Brand<"@effect-agent/core/MemoryNamespaceAddress">;
349
+ };
350
+ readonly id: string;
351
+ } & Brand> & Pick<Static, Exclude<keyof Static, keyof Schema.Class<Extended_1, Schema.Struct<((keyof S["fields"] & keyof Extension_1["fields"] extends never ? S["fields"] & Extension_1["fields"] : Omit<S["fields"], keyof S["fields"] & keyof Extension_1["fields"]> & Extension_1["fields"]) extends (infer T_3) ? { [K in keyof T_3]: T_3[K]; } : never) extends (infer T_2) ? { [K in keyof T_2]: T_2[K]; } : never>, Self & Brand_1>>>;
352
+ };
353
+ };
354
+ readonly locator: Schema.NonEmptyString;
355
+ readonly revision: Schema.NonEmptyString;
356
+ readonly position: Schema.Struct<{
357
+ readonly authorityGeneration: Schema.NonEmptyString;
358
+ readonly sequence: Schema.Int;
359
+ }>;
360
+ }>;
361
+ readonly text: Schema.String;
362
+ }>, {}>;
363
+ export declare class SourceSnapshot extends SourceSnapshot_base {}
364
+ /** Application-authorized output. The coordinator binds key, operation ID and expected revision.
365
+ * Fact acceptance, sharing scopes, profile schema and source-aware merging remain application code.
366
+ */
367
+ export declare const Decision: Schema.Union<readonly [Schema.TaggedStruct<"Put", {
368
+ readonly locator: Schema.NonEmptyString;
369
+ readonly content: typeof MemoryContent;
370
+ readonly scopes: Schema.$Array<Schema.brand<Schema.NonEmptyString, "@effect-agent/core/MemoryScope">>;
371
+ }>, Schema.TaggedStruct<"Withdraw", {
372
+ readonly reason: Schema.String;
373
+ }>, Schema.TaggedStruct<"NoChange", {}>, Schema.TaggedStruct<"Reject", {}>]>;
374
+ export type Decision = typeof Decision.Type;
375
+ export interface MergeInput<Value, S extends Any, T extends Any> {
376
+ readonly intent: Intent<S, T>;
377
+ readonly proposal: Extracted<Value>;
378
+ readonly current: MemoryDocument<T> | null;
379
+ }
380
+ export interface CleanupInput<Value, S extends Any, T extends Any> extends MergeInput<Value, S, T> {
381
+ readonly suppression: Invalidation;
382
+ readonly applied: MemoryDocument<T>;
383
+ }
384
+ /** Foreground admission performs only one durable port call. Bind authority and idempotency
385
+ * from the trusted invocation before calling; a queued receipt is returned only after commit.
386
+ */
387
+ export declare const admit: <E, R>(store: Store<E, R>, intent: Intent<{
388
+ readonly address: string & import("effect/Brand").Brand<"@effect-agent/core/MemoryNamespaceAddress">;
389
+ }, {
390
+ readonly address: string & import("effect/Brand").Brand<"@effect-agent/core/MemoryNamespaceAddress">;
391
+ }>) => Effect.Effect<Admission, E | AdmissionError | MutationFailure, R | MutationFailpoint>;
392
+ /** Source owners await this durable suppression receipt before acknowledging edit/deletion/Forget.
393
+ * Scheduling all affected retained references and conditional cleanup is the host's obligation.
394
+ */
395
+ export declare const invalidate: <E, R>(store: Store<E, R>, event: Invalidation) => Effect.Effect<InvalidationReceipt, E | AdmissionError | MutationFailure, R | MutationFailpoint>;
396
+ /** Define one application learner. Extraction may call native Effect AI LanguageModel directly;
397
+ * callback/model/schema requirements and errors remain in the returned Effect. No model owns
398
+ * authority, source loading, fact acceptance, profile representation or sharing policy.
399
+ * These are Effect-composition callbacks: they can yield application Context services, and advance
400
+ * retains every callback's E/R. The framework neither acquires nor provides application policy.
401
+ *
402
+ * advance is finite: it extracts, prepares, dispatches, or rebases at most once. The host calls it
403
+ * again when ready. A proposal is persisted before any target read; a complete command is saved
404
+ * before dispatch. Unknown outcomes leave that command untouched. Only MemoryConflict rebases.
405
+ * Cleanup receives the immutable proposal, original applied document and latest target so it can
406
+ * remove that contribution without overwriting intervening human corrections.
407
+ *
408
+ * loadSource returns an explicit Invalidation when source authority changed or was revoked; its
409
+ * suppression is committed before processing returns. null means absent on an initial load. A
410
+ * later null or a changed snapshot without an authority event fails source-changed and retains
411
+ * the obligation. Sources must keep revision content immutable. Evidence is checked again before
412
+ * preparing a new command. A saved Prepared command may already have executed, so it never calls
413
+ * loadSource and must reconcile even during a source outage. Source owners durably invalidate
414
+ * before acknowledging edits, and authoritative recall filters suppression while cleanup runs.
415
+ * No source text, proposal, authority identity, or extracted values are added to tracing spans.
416
+ */
417
+ export declare const make: <S extends Any, T extends Any, Value, Encoded extends Schema.Json, DecodeR, EncodeR, SourceE, SourceR, ExtractE, ExtractR, MergeE, MergeR, CleanupE, CleanupR>(options: {
418
+ readonly proposal: Schema.Codec<Value, Encoded, DecodeR, EncodeR>;
419
+ readonly loadSource: (intent: Intent<S, T>) => Effect.Effect<SourceSnapshot | Invalidation | null, SourceE, SourceR>;
420
+ readonly extract: (source: SourceSnapshot, intent: Intent<S, T>) => Effect.Effect<Extracted<Value> | null, ExtractE, ExtractR>;
421
+ readonly merge: (input: MergeInput<Value, S, T>) => Effect.Effect<Decision, MergeE, MergeR>;
422
+ readonly cleanup: (input: CleanupInput<Value, S, T>) => Effect.Effect<Decision, CleanupE, CleanupR>;
423
+ }) => {
424
+ advance: <StoreE, StoreR>(input: {
425
+ readonly intent: Intent<S, T>;
426
+ readonly store: Store<StoreE, StoreR>;
427
+ readonly limits: Limits;
428
+ /** Stops new extraction only. Saved commands, rebase and suppression cleanup still run. */
429
+ readonly extractionEnabled: boolean;
430
+ }) => Effect.Effect<BoundCheckpoint<S, T>, CleanupE | ExtractE | MergeE | SourceE | StoreE | AdmissionError | CheckpointError | MemoryMutationFailure | MemoryOperationConflict | MemoryStorageError | MutationFailure | ProcessingError | Schema.SchemaError, CleanupR | DecodeR | EncodeR | ExtractR | MergeR | SourceR | StoreR | MemoryReader | MemoryWriter | MutationFailpoint>;
431
+ };
432
+ //#endregion
433
+ export { Remembering_d_exports as t };
434
+ //# sourceMappingURL=Remembering.d.mts.map