@systemfsoftware/agent 0.0.0-stage → 0.1.0-beta.192
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.
- package/LICENSE +21 -0
- package/dist/ActivityStore-CEy3oY41.mjs +90 -0
- package/dist/ActivityStore-CEy3oY41.mjs.map +1 -0
- package/dist/ActivityStore-CPXWRHGz.d.mts +91 -0
- package/dist/Admin-BcQDrWKY.mjs +329 -0
- package/dist/Admin-BcQDrWKY.mjs.map +1 -0
- package/dist/Admin-BfolLkHj.d.mts +5678 -0
- package/dist/Agent-Bn3zMhDH.mjs +60 -0
- package/dist/Agent-Bn3zMhDH.mjs.map +1 -0
- package/dist/Agent-DSVEpq4e.d.mts +219 -0
- package/dist/AgentError-RkUaetX8.d.mts +128 -0
- package/dist/AgentError-yFdnS9bl.mjs +141 -0
- package/dist/AgentError-yFdnS9bl.mjs.map +1 -0
- package/dist/AgentPolicy-CI7LRBQa.mjs +116 -0
- package/dist/AgentPolicy-CI7LRBQa.mjs.map +1 -0
- package/dist/AgentPolicy-D-GmZQex.d.mts +128 -0
- package/dist/AgentRegistration-Dg53p6du.mjs +14 -0
- package/dist/AgentRegistration-Dg53p6du.mjs.map +1 -0
- package/dist/AgentRuntime-CoGy_5dm.d.mts +751 -0
- package/dist/AgentRuntime-CzP4I4RB.mjs +5249 -0
- package/dist/AgentRuntime-CzP4I4RB.mjs.map +1 -0
- package/dist/AgentUpdates-7xT0It_R.d.mts +54 -0
- package/dist/AgentUpdates-BS_6gR5K.mjs +66 -0
- package/dist/AgentUpdates-BS_6gR5K.mjs.map +1 -0
- package/dist/BrowserUse-C9vict2M.d.mts +196 -0
- package/dist/BrowserUse-DjEyFDLZ.mjs +156 -0
- package/dist/BrowserUse-DjEyFDLZ.mjs.map +1 -0
- package/dist/Budget-CXh_ChFJ.d.mts +112 -0
- package/dist/Budget-j1UkthgY.mjs +351 -0
- package/dist/Budget-j1UkthgY.mjs.map +1 -0
- package/dist/CodeExecutor-B_Vt1Ghy.mjs +281 -0
- package/dist/CodeExecutor-B_Vt1Ghy.mjs.map +1 -0
- package/dist/CodeExecutor-D5-Rda75.d.mts +198 -0
- package/dist/CodeMode-B7JvfKAD.d.mts +159 -0
- package/dist/CodeMode-BI7WhUkr.mjs +555 -0
- package/dist/CodeMode-BI7WhUkr.mjs.map +1 -0
- package/dist/CommittedActivity-DXyCKCtX.mjs +146 -0
- package/dist/CommittedActivity-DXyCKCtX.mjs.map +1 -0
- package/dist/CommittedActivity-LWOKXqdi.d.mts +62 -0
- package/dist/Compaction-C0hWAmOG.mjs +15 -0
- package/dist/Compaction-C0hWAmOG.mjs.map +1 -0
- package/dist/Compaction-e5cNeFmY.d.mts +5 -0
- package/dist/ContextCompactor-Chm9BLrD.d.mts +165 -0
- package/dist/ContextCompactor-DV4NOQvg.mjs +134 -0
- package/dist/ContextCompactor-DV4NOQvg.mjs.map +1 -0
- package/dist/ContextHistory-C80rW5M7.mjs +76 -0
- package/dist/ContextHistory-C80rW5M7.mjs.map +1 -0
- package/dist/ContextHistory-akQ1Td7a.d.mts +65 -0
- package/dist/ContextTools-917r7gpv.d.mts +186 -0
- package/dist/ContextTools-p8JDPo-W.mjs +88 -0
- package/dist/ContextTools-p8JDPo-W.mjs.map +1 -0
- package/dist/ContextWindow-BJZI4MMt.d.mts +61 -0
- package/dist/ContextWindow-kbFcs1IF.mjs +63 -0
- package/dist/ContextWindow-kbFcs1IF.mjs.map +1 -0
- package/dist/Digest-BDToAbaX.d.mts +25 -0
- package/dist/Digest-CU6IWj-2.mjs +106 -0
- package/dist/Digest-CU6IWj-2.mjs.map +1 -0
- package/dist/DurableAgentRuntime-BHXo8GPJ.mjs +8432 -0
- package/dist/DurableAgentRuntime-BHXo8GPJ.mjs.map +1 -0
- package/dist/DurableFailpoint-BD5nowNl.mjs +98 -0
- package/dist/DurableFailpoint-BD5nowNl.mjs.map +1 -0
- package/dist/DurableFailpoint-Cqi5tyof.d.mts +42 -0
- package/dist/DurableStep-CzVIho7y.mjs +54 -0
- package/dist/DurableStep-CzVIho7y.mjs.map +1 -0
- package/dist/DurableStep-cI_Ho_rU.d.mts +109 -0
- package/dist/EventSource-BwZVkEQi.mjs +66 -0
- package/dist/EventSource-BwZVkEQi.mjs.map +1 -0
- package/dist/EventSource-C0TCBeIf.d.mts +52 -0
- package/dist/FailureDiagnostic-DdHV2eFs.mjs +304 -0
- package/dist/FailureDiagnostic-DdHV2eFs.mjs.map +1 -0
- package/dist/FailureDiagnostic-DpzYNI8f.d.mts +232 -0
- package/dist/IdGenerator-BCzwV0ZI.mjs +29 -0
- package/dist/IdGenerator-BCzwV0ZI.mjs.map +1 -0
- package/dist/IdGenerator-BY8NH74o.d.mts +26 -0
- package/dist/Identifiers-LWd4837I.mjs +41 -0
- package/dist/Identifiers-LWd4837I.mjs.map +1 -0
- package/dist/Identifiers-qafW4EP0.d.mts +38 -0
- package/dist/InMemory-BrTm6XEO.mjs +57 -0
- package/dist/InMemory-BrTm6XEO.mjs.map +1 -0
- package/dist/InMemory-C3qXFT5k.d.mts +46 -0
- package/dist/InMemory.d.mts +2 -0
- package/dist/InMemory.mjs +1 -0
- package/dist/InteractiveBrowser-B-hlNJy5.mjs +237 -0
- package/dist/InteractiveBrowser-B-hlNJy5.mjs.map +1 -0
- package/dist/InteractiveBrowser-nnML0r7w.d.mts +258 -0
- package/dist/LifecyclePublication-BDc_ug5v.mjs +204 -0
- package/dist/LifecyclePublication-BDc_ug5v.mjs.map +1 -0
- package/dist/Memory-CT5bDZqi.d.mts +57 -0
- package/dist/Memory-Dl9ecPpm.mjs +204 -0
- package/dist/Memory-Dl9ecPpm.mjs.map +1 -0
- package/dist/MemoryNamespace-BtnlH_E6.d.mts +35 -0
- package/dist/MemoryNamespace-DZSpjLj9.mjs +116 -0
- package/dist/MemoryNamespace-DZSpjLj9.mjs.map +1 -0
- package/dist/MemoryNotes-4CRzkPBD.d.mts +425 -0
- package/dist/MemoryNotes-i41TsH11.mjs +132 -0
- package/dist/MemoryNotes-i41TsH11.mjs.map +1 -0
- package/dist/MemoryReference-Dd3KSMa7.d.mts +77 -0
- package/dist/MemoryReference-RFU0HQJG.mjs +108 -0
- package/dist/MemoryReference-RFU0HQJG.mjs.map +1 -0
- package/dist/MemoryRevalidation--aAh_Pfq.mjs +136 -0
- package/dist/MemoryRevalidation--aAh_Pfq.mjs.map +1 -0
- package/dist/MemoryRevalidation-FsJ8E61W.d.mts +64 -0
- package/dist/MemoryStore-Bg5RunTk.d.mts +187 -0
- package/dist/MemoryStore-E0J99hb2.mjs +245 -0
- package/dist/MemoryStore-E0J99hb2.mjs.map +1 -0
- package/dist/MessageDelivery-BE2Yf3FC.mjs +615 -0
- package/dist/MessageDelivery-BE2Yf3FC.mjs.map +1 -0
- package/dist/MessageDelivery-Dh6GZBt_.d.mts +1129 -0
- package/dist/Messaging-BqWHYf93.d.mts +216 -0
- package/dist/Messaging-DgSiv4f4.mjs +154 -0
- package/dist/Messaging-DgSiv4f4.mjs.map +1 -0
- package/dist/Messaging-DhM-APnP.d.mts +1074 -0
- package/dist/MessagingHost-Bm5e-kAX.mjs +117 -0
- package/dist/MessagingHost-Bm5e-kAX.mjs.map +1 -0
- package/dist/MessagingHost-CubWeYKN.d.mts +80 -0
- package/dist/OperationAuthorizer-VSiHCC2S.mjs +72 -0
- package/dist/OperationAuthorizer-VSiHCC2S.mjs.map +1 -0
- package/dist/OperationAuthorizer-y-F-Ox_Q.d.mts +62 -0
- package/dist/Output-DQ8mWcgf.mjs +7 -0
- package/dist/Output-DQ8mWcgf.mjs.map +1 -0
- package/dist/Output-SbOdlBFL.d.mts +22 -0
- package/dist/PageCapture-BfRURUOA.mjs +275 -0
- package/dist/PageCapture-BfRURUOA.mjs.map +1 -0
- package/dist/PageCapture-C_mE72Sd.d.mts +216 -0
- package/dist/PageScreenshot-BJTASs4o.mjs +53 -0
- package/dist/PageScreenshot-BJTASs4o.mjs.map +1 -0
- package/dist/PageScreenshot-CaoaH7mc.d.mts +48 -0
- package/dist/PersistentHistory-BrtZ0g2j.d.mts +14 -0
- package/dist/PersistentHistory-CTAVhHKH.mjs +147 -0
- package/dist/PersistentHistory-CTAVhHKH.mjs.map +1 -0
- package/dist/PreparedInputAdmission-Ci18uY4s.d.mts +973 -0
- package/dist/PreparedInputAdmission-adqVJJa6.mjs +95 -0
- package/dist/PreparedInputAdmission-adqVJJa6.mjs.map +1 -0
- package/dist/ProvisionalText-BcKpPYKQ.d.mts +70 -0
- package/dist/ProvisionalText-DXddTK4c.mjs +47 -0
- package/dist/ProvisionalText-DXddTK4c.mjs.map +1 -0
- package/dist/Receipt-B-FlCaNH.mjs +35 -0
- package/dist/Receipt-B-FlCaNH.mjs.map +1 -0
- package/dist/Receipt-B4feBxMY.d.mts +31 -0
- package/dist/RecordFormat-DoNh-AFe.mjs +79 -0
- package/dist/RecordFormat-DoNh-AFe.mjs.map +1 -0
- package/dist/RecordFormat-ZMus8Dx8.d.mts +52 -0
- package/dist/Records-C645aQks.mjs +1145 -0
- package/dist/Records-C645aQks.mjs.map +1 -0
- package/dist/Records-C9I1nCL9.d.mts +1423 -0
- package/dist/Recovery-zWy_kmZq.mjs +736 -0
- package/dist/Recovery-zWy_kmZq.mjs.map +1 -0
- package/dist/Redaction-C0zLBAn6.d.mts +28 -0
- package/dist/Redaction-CtyCBMEj.mjs +116 -0
- package/dist/Redaction-CtyCBMEj.mjs.map +1 -0
- package/dist/RememberingStore-BO-OnCgP.mjs +23 -0
- package/dist/RememberingStore-BO-OnCgP.mjs.map +1 -0
- package/dist/RememberingStore-DgqXmILx.d.mts +14 -0
- package/dist/RunContinuation-BVAHoYlN.d.mts +127 -0
- package/dist/RunContinuation-Bpfp087i.mjs +1060 -0
- package/dist/RunContinuation-Bpfp087i.mjs.map +1 -0
- package/dist/RunEvent-CwgDzXcH.d.mts +465 -0
- package/dist/RunEvent-DJxENnJi.mjs +345 -0
- package/dist/RunEvent-DJxENnJi.mjs.map +1 -0
- package/dist/RunEventSink-B8uM8bw2.mjs +22 -0
- package/dist/RunEventSink-B8uM8bw2.mjs.map +1 -0
- package/dist/RunEventSink-f-T4jbNB.d.mts +105 -0
- package/dist/RunHooks-Bob22Bcj.d.mts +40 -0
- package/dist/RunHooks-DWuLBVdU.mjs +60 -0
- package/dist/RunHooks-DWuLBVdU.mjs.map +1 -0
- package/dist/RunJournal-C_1eqQdr.mjs +1107 -0
- package/dist/RunJournal-C_1eqQdr.mjs.map +1 -0
- package/dist/RunOptions-BVSa3BO2.d.mts +560 -0
- package/dist/RunOptions-COEUCrx4.mjs +61 -0
- package/dist/RunOptions-COEUCrx4.mjs.map +1 -0
- package/dist/RunPolicyUsage-B-JXRZYO.mjs +25 -0
- package/dist/RunPolicyUsage-B-JXRZYO.mjs.map +1 -0
- package/dist/RunPolicyUsage-jvJo0vJp.d.mts +21 -0
- package/dist/RunStorage-CsQQ0Y5u.mjs +304 -0
- package/dist/RunStorage-CsQQ0Y5u.mjs.map +1 -0
- package/dist/Sandbox-37vXP0BV.d.mts +24 -0
- package/dist/Sandbox-Bze6pHYc.mjs +30 -0
- package/dist/Sandbox-Bze6pHYc.mjs.map +1 -0
- package/dist/Schedule-BY0lzbij.mjs +336 -0
- package/dist/Schedule-BY0lzbij.mjs.map +1 -0
- package/dist/ScheduleTransition-CjVP48I8.d.mts +22 -0
- package/dist/ScheduleTransition-DtNzlN9k.mjs +180 -0
- package/dist/ScheduleTransition-DtNzlN9k.mjs.map +1 -0
- package/dist/Scheduling-BpJN9E1j.mjs +699 -0
- package/dist/Scheduling-BpJN9E1j.mjs.map +1 -0
- package/dist/Scheduling-DYTM29s9.d.mts +57 -0
- package/dist/SemanticMemory-BRV0cuWg.mjs +300 -0
- package/dist/SemanticMemory-BRV0cuWg.mjs.map +1 -0
- package/dist/SemanticMemory-rgWlhW87.d.mts +431 -0
- package/dist/SemanticMemoryIndex-D7yNEWpt.d.mts +826 -0
- package/dist/SemanticMemoryIndex-godQDjNx.mjs +186 -0
- package/dist/SemanticMemoryIndex-godQDjNx.mjs.map +1 -0
- package/dist/SemanticMemoryRevalidation-Bm3_pfsI.d.mts +44 -0
- package/dist/SemanticMemoryRevalidation-D8VV-eU6.mjs +179 -0
- package/dist/SemanticMemoryRevalidation-D8VV-eU6.mjs.map +1 -0
- package/dist/Subagent-CSIRUgUo.mjs +1315 -0
- package/dist/Subagent-CSIRUgUo.mjs.map +1 -0
- package/dist/Subagent-CXEI5YZ8.d.mts +2368 -0
- package/dist/SubagentContract-B7vQPueI.d.mts +176 -0
- package/dist/SubagentContract-C-7AxTm_.mjs +187 -0
- package/dist/SubagentContract-C-7AxTm_.mjs.map +1 -0
- package/dist/SubagentHost-BEnICu7g.mjs +70 -0
- package/dist/SubagentHost-BEnICu7g.mjs.map +1 -0
- package/dist/SubagentHost-CKhz1vbH.d.mts +167 -0
- package/dist/SubagentReservations-BYNAHPpm.mjs +465 -0
- package/dist/SubagentReservations-BYNAHPpm.mjs.map +1 -0
- package/dist/SubagentReservations-WrmIVzO5.d.mts +185 -0
- package/dist/SubmissionLedger-WG0beEyt.mjs +921 -0
- package/dist/SubmissionLedger-WG0beEyt.mjs.map +1 -0
- package/dist/SubmissionStatus-CPZsOM5a.mjs +17 -0
- package/dist/SubmissionStatus-CPZsOM5a.mjs.map +1 -0
- package/dist/Subscription-BhQbmUD-.mjs +340 -0
- package/dist/Subscription-BhQbmUD-.mjs.map +1 -0
- package/dist/Subscription-CC--_OnU.d.mts +815 -0
- package/dist/SubscriptionInput-BEeB0Cj8.d.mts +42 -0
- package/dist/SubscriptionInput-Xcd4JjEs.mjs +53 -0
- package/dist/SubscriptionInput-Xcd4JjEs.mjs.map +1 -0
- package/dist/SubscriptionTransition-CWt9UVH0.d.mts +23 -0
- package/dist/SubscriptionTransition-lrf733c8.mjs +154 -0
- package/dist/SubscriptionTransition-lrf733c8.mjs.map +1 -0
- package/dist/Subscriptions-4K_qu_2f.mjs +638 -0
- package/dist/Subscriptions-4K_qu_2f.mjs.map +1 -0
- package/dist/Subscriptions-BF3aSf8X.d.mts +75 -0
- package/dist/Thread-B8JApGHa.mjs +283 -0
- package/dist/Thread-B8JApGHa.mjs.map +1 -0
- package/dist/Thread-BnAtkJl4.d.mts +116 -0
- package/dist/ThreadArchiveRange-1PMdjpdJ.mjs +64 -0
- package/dist/ThreadArchiveRange-1PMdjpdJ.mjs.map +1 -0
- package/dist/ThreadContextHistory-BSStMOLX.mjs +211 -0
- package/dist/ThreadContextHistory-BSStMOLX.mjs.map +1 -0
- package/dist/ThreadContextHistory-lTZ8Ftq1.d.mts +33 -0
- package/dist/ThreadContextHistoryProjection-Cp7_RR6V.d.mts +59 -0
- package/dist/ThreadContextHistoryProjection-_8uNz-h1.mjs +149 -0
- package/dist/ThreadContextHistoryProjection-_8uNz-h1.mjs.map +1 -0
- package/dist/ThreadHistory-BkyGfv5E.d.mts +76 -0
- package/dist/ThreadHistory-Blt_W31N.mjs +69 -0
- package/dist/ThreadHistory-Blt_W31N.mjs.map +1 -0
- package/dist/ThreadImport-C8Tqiezd.mjs +491 -0
- package/dist/ThreadImport-C8Tqiezd.mjs.map +1 -0
- package/dist/ThreadImport-DaSmrlRi.d.mts +843 -0
- package/dist/ThreadInvariants-DyPhMeo-.d.mts +23 -0
- package/dist/ThreadInvariants-fniroLRY.mjs +154 -0
- package/dist/ThreadInvariants-fniroLRY.mjs.map +1 -0
- package/dist/ThreadProjectionMaintenance-D6fBjr1q.mjs +37 -0
- package/dist/ThreadProjectionMaintenance-D6fBjr1q.mjs.map +1 -0
- package/dist/ThreadProjectionMaintenance-DjUy7kCa.d.mts +51 -0
- package/dist/ThreadStore-BMUAp5Ta.mjs +937 -0
- package/dist/ThreadStore-BMUAp5Ta.mjs.map +1 -0
- package/dist/ThreadTransfer-B3NkyO_y.mjs +154 -0
- package/dist/ThreadTransfer-B3NkyO_y.mjs.map +1 -0
- package/dist/ThreadTransfer-BM02cbOo.d.mts +63 -0
- package/dist/ThreadWork-C-xa2Boi.mjs +484 -0
- package/dist/ThreadWork-C-xa2Boi.mjs.map +1 -0
- package/dist/ToolBroker-DkoVyx6T.mjs +42 -0
- package/dist/ToolBroker-DkoVyx6T.mjs.map +1 -0
- package/dist/ToolBroker-Dy2xM6ht.d.mts +134 -0
- package/dist/ToolDiscovery-DHySvLQd.mjs +211 -0
- package/dist/ToolDiscovery-DHySvLQd.mjs.map +1 -0
- package/dist/ToolDiscovery-VjamzX3q.d.mts +119 -0
- package/dist/ToolExposure-Cn7xETn5.d.mts +6 -0
- package/dist/ToolExposure-D7id9Gt5.d.mts +37 -0
- package/dist/ToolExposure-DCvQWFIa.mjs +9 -0
- package/dist/ToolExposure-DCvQWFIa.mjs.map +1 -0
- package/dist/ToolExposure-DNME8BkG.d.mts +44 -0
- package/dist/ToolExposure-DPnq8Won.mjs +30 -0
- package/dist/ToolExposure-DPnq8Won.mjs.map +1 -0
- package/dist/ToolExposure-DaGaF5tj.mjs +20 -0
- package/dist/ToolExposure-DaGaF5tj.mjs.map +1 -0
- package/dist/ToolExposure.d.mts +4 -0
- package/dist/ToolExposure.mjs +4 -0
- package/dist/ToolReconciler-6bb7xlip.d.mts +81 -0
- package/dist/ToolReconciler-DJQd3SZA.mjs +87 -0
- package/dist/ToolReconciler-DJQd3SZA.mjs.map +1 -0
- package/dist/ToolResult-By5KAje4.d.mts +79 -0
- package/dist/ToolResult-DwZxjlHw.mjs +160 -0
- package/dist/ToolResult-DwZxjlHw.mjs.map +1 -0
- package/dist/ToolResultStorage-BmoRewhh.mjs +46 -0
- package/dist/ToolResultStorage-BmoRewhh.mjs.map +1 -0
- package/dist/ToolResultStorage-Bp5fm0do.d.mts +49 -0
- package/dist/ToolResults-C4-HsMCp.d.mts +33 -0
- package/dist/ToolResults-nCgBlTp2.mjs +45 -0
- package/dist/ToolResults-nCgBlTp2.mjs.map +1 -0
- package/dist/Usage-B0xgME5f.mjs +340 -0
- package/dist/Usage-B0xgME5f.mjs.map +1 -0
- package/dist/Usage-Bc-jXe_9.d.mts +128 -0
- package/dist/WakeScheduler-DVYj66C-.mjs +74 -0
- package/dist/WakeScheduler-DVYj66C-.mjs.map +1 -0
- package/dist/WakeScheduler-SFqj67Sk.d.mts +74 -0
- package/dist/WebCapture-CA4ZarW2.mjs +64 -0
- package/dist/WebCapture-CA4ZarW2.mjs.map +1 -0
- package/dist/WebCapture-pzIeUJ5W.d.mts +49 -0
- package/dist/WebSearch-CD0V--qh.d.mts +18 -0
- package/dist/WebSearch-DnbOzRL_.mjs +30 -0
- package/dist/WebSearch-DnbOzRL_.mjs.map +1 -0
- package/dist/Worker-CQu8Qp1j.mjs +267 -0
- package/dist/Worker-CQu8Qp1j.mjs.map +1 -0
- package/dist/Worker-xxucY_0b.d.mts +468 -0
- package/dist/WorkerAdmission-BhFjx86s.mjs +162 -0
- package/dist/WorkerAdmission-BhFjx86s.mjs.map +1 -0
- package/dist/WorkerAdmission-BnRuXLWF.d.mts +171 -0
- package/dist/WorkerHost-DtYzi54D.d.mts +150 -0
- package/dist/WorkerHost-DuQug9Bq.mjs +73 -0
- package/dist/WorkerHost-DuQug9Bq.mjs.map +1 -0
- package/dist/agent-registration-CNs2twrr.mjs +262 -0
- package/dist/agent-registration-CNs2twrr.mjs.map +1 -0
- package/dist/capabilities/BrowserUse.d.mts +2 -0
- package/dist/capabilities/BrowserUse.mjs +1 -0
- package/dist/capabilities/Budget.d.mts +2 -0
- package/dist/capabilities/Budget.mjs +1 -0
- package/dist/capabilities/CodeMode.d.mts +2 -0
- package/dist/capabilities/CodeMode.mjs +1 -0
- package/dist/capabilities/ContextTools.d.mts +2 -0
- package/dist/capabilities/ContextTools.mjs +1 -0
- package/dist/capabilities/MemoryNotes.d.mts +2 -0
- package/dist/capabilities/MemoryNotes.mjs +1 -0
- package/dist/capabilities/Messaging.d.mts +3 -0
- package/dist/capabilities/Messaging.mjs +4 -0
- package/dist/capabilities/Redaction.d.mts +2 -0
- package/dist/capabilities/Redaction.mjs +1 -0
- package/dist/capabilities/RunHooks.d.mts +2 -0
- package/dist/capabilities/RunHooks.mjs +1 -0
- package/dist/capabilities/SemanticMemory.d.mts +2 -0
- package/dist/capabilities/SemanticMemory.mjs +1 -0
- package/dist/capabilities/Subagent.d.mts +4 -0
- package/dist/capabilities/Subagent.mjs +6 -0
- package/dist/capabilities/SubagentReservations.d.mts +2 -0
- package/dist/capabilities/SubagentReservations.mjs +1 -0
- package/dist/capabilities/ToolDiscovery.d.mts +2 -0
- package/dist/capabilities/ToolDiscovery.mjs +1 -0
- package/dist/capabilities/ToolResults.d.mts +2 -0
- package/dist/capabilities/ToolResults.mjs +1 -0
- package/dist/capabilities/WebCapture.d.mts +2 -0
- package/dist/capabilities/WebCapture.mjs +1 -0
- package/dist/capabilities/WebSearch.d.mts +2 -0
- package/dist/capabilities/WebSearch.mjs +1 -0
- package/dist/compaction-C3hXuO4Z.mjs +539 -0
- package/dist/compaction-C3hXuO4Z.mjs.map +1 -0
- package/dist/completion-B_WDnSg-.d.mts +11 -0
- package/dist/core/Agent.d.mts +2 -0
- package/dist/core/Agent.mjs +1 -0
- package/dist/core/AgentError.d.mts +2 -0
- package/dist/core/AgentError.mjs +1 -0
- package/dist/core/AgentPolicy.d.mts +2 -0
- package/dist/core/AgentPolicy.mjs +1 -0
- package/dist/core/AgentUpdates.d.mts +2 -0
- package/dist/core/AgentUpdates.mjs +1 -0
- package/dist/core/FailureDiagnostic.d.mts +2 -0
- package/dist/core/FailureDiagnostic.mjs +1 -0
- package/dist/core/IdGenerator.d.mts +2 -0
- package/dist/core/IdGenerator.mjs +1 -0
- package/dist/core/Identifiers.d.mts +2 -0
- package/dist/core/Identifiers.mjs +1 -0
- package/dist/core/Memory.d.mts +2 -0
- package/dist/core/Memory.mjs +1 -0
- package/dist/core/MemoryNamespace.d.mts +2 -0
- package/dist/core/MemoryNamespace.mjs +1 -0
- package/dist/core/MemoryReference.d.mts +2 -0
- package/dist/core/MemoryReference.mjs +1 -0
- package/dist/core/MemoryRevalidation.d.mts +2 -0
- package/dist/core/MemoryRevalidation.mjs +1 -0
- package/dist/core/MemoryStore.d.mts +2 -0
- package/dist/core/MemoryStore.mjs +1 -0
- package/dist/core/ProvisionalText.d.mts +2 -0
- package/dist/core/ProvisionalText.mjs +1 -0
- package/dist/core/Receipt.d.mts +2 -0
- package/dist/core/Receipt.mjs +1 -0
- package/dist/core/RememberingStore.d.mts +2 -0
- package/dist/core/RememberingStore.mjs +1 -0
- package/dist/core/RunEvent.d.mts +3 -0
- package/dist/core/RunEvent.mjs +1 -0
- package/dist/core/RunPolicyUsage.d.mts +2 -0
- package/dist/core/RunPolicyUsage.mjs +1 -0
- package/dist/core/SemanticMemoryIndex.d.mts +2 -0
- package/dist/core/SemanticMemoryIndex.mjs +1 -0
- package/dist/core/SemanticMemoryRevalidation.d.mts +2 -0
- package/dist/core/SemanticMemoryRevalidation.mjs +1 -0
- package/dist/core/SubagentContract.d.mts +2 -0
- package/dist/core/SubagentContract.mjs +1 -0
- package/dist/core/Thread.d.mts +2 -0
- package/dist/core/Thread.mjs +1 -0
- package/dist/core/ToolResult.d.mts +2 -0
- package/dist/core/ToolResult.mjs +1 -0
- package/dist/core/ToolResultStorage.d.mts +2 -0
- package/dist/core/ToolResultStorage.mjs +1 -0
- package/dist/core/Usage.d.mts +2 -0
- package/dist/core/Usage.mjs +1 -0
- package/dist/core/Worker.d.mts +3 -0
- package/dist/core/Worker.mjs +3 -0
- package/dist/durable/ActivityStore.d.mts +2 -0
- package/dist/durable/ActivityStore.mjs +1 -0
- package/dist/durable/Admin.d.mts +2 -0
- package/dist/durable/Admin.mjs +1 -0
- package/dist/durable/AgentRegistration.d.mts +3 -0
- package/dist/durable/AgentRegistration.mjs +2 -0
- package/dist/durable/CommittedActivity.d.mts +2 -0
- package/dist/durable/CommittedActivity.mjs +1 -0
- package/dist/durable/Digest.d.mts +2 -0
- package/dist/durable/Digest.mjs +3 -0
- package/dist/durable/DurableAgentRuntime.d.mts +3 -0
- package/dist/durable/DurableAgentRuntime.mjs +4 -0
- package/dist/durable/DurableFailpoint.d.mts +2 -0
- package/dist/durable/DurableFailpoint.mjs +1 -0
- package/dist/durable/DurableFailpointTestControl.d.mts +14 -0
- package/dist/durable/DurableFailpointTestControl.mjs +21 -0
- package/dist/durable/DurableFailpointTestControl.mjs.map +1 -0
- package/dist/durable/EventSource.d.mts +2 -0
- package/dist/durable/EventSource.mjs +1 -0
- package/dist/durable/LifecyclePublication.d.mts +2 -0
- package/dist/durable/LifecyclePublication.mjs +1 -0
- package/dist/durable/MessageDelivery.d.mts +2 -0
- package/dist/durable/MessageDelivery.mjs +1 -0
- package/dist/durable/MessageDeliveryStoreConformance.d.mts +401 -0
- package/dist/durable/MessageDeliveryStoreConformance.mjs +273 -0
- package/dist/durable/MessageDeliveryStoreConformance.mjs.map +1 -0
- package/dist/durable/OperationAuthorizer.d.mts +2 -0
- package/dist/durable/OperationAuthorizer.mjs +1 -0
- package/dist/durable/PersistentHistory.d.mts +2 -0
- package/dist/durable/PersistentHistory.mjs +1 -0
- package/dist/durable/PreparedInputAdmission.d.mts +2 -0
- package/dist/durable/PreparedInputAdmission.mjs +1 -0
- package/dist/durable/RecordFormat.d.mts +2 -0
- package/dist/durable/RecordFormat.mjs +1 -0
- package/dist/durable/Records.d.mts +2 -0
- package/dist/durable/Records.mjs +1 -0
- package/dist/durable/Recovery.d.mts +2 -0
- package/dist/durable/Recovery.mjs +1 -0
- package/dist/durable/RunContinuation.d.mts +4 -0
- package/dist/durable/RunContinuation.mjs +4 -0
- package/dist/durable/RunJournal.d.mts +2 -0
- package/dist/durable/RunJournal.mjs +1 -0
- package/dist/durable/RunStorage.d.mts +2 -0
- package/dist/durable/RunStorage.mjs +1 -0
- package/dist/durable/Schedule.d.mts +2 -0
- package/dist/durable/Schedule.mjs +1 -0
- package/dist/durable/ScheduleStoreConformance.d.mts +16 -0
- package/dist/durable/ScheduleStoreConformance.mjs +421 -0
- package/dist/durable/ScheduleStoreConformance.mjs.map +1 -0
- package/dist/durable/ScheduleTransition.d.mts +2 -0
- package/dist/durable/ScheduleTransition.mjs +1 -0
- package/dist/durable/Scheduling.d.mts +2 -0
- package/dist/durable/Scheduling.mjs +1 -0
- package/dist/durable/SettlementPublisher.d.mts +2 -0
- package/dist/durable/SettlementPublisher.mjs +99 -0
- package/dist/durable/SettlementPublisher.mjs.map +1 -0
- package/dist/durable/SqlMemoryStore.d.mts +729 -0
- package/dist/durable/SqlMemoryStore.mjs +626 -0
- package/dist/durable/SqlMemoryStore.mjs.map +1 -0
- package/dist/durable/SqlStorageOwner.d.mts +18 -0
- package/dist/durable/SqlStorageOwner.mjs +6 -0
- package/dist/durable/SqlStorageOwner.mjs.map +1 -0
- package/dist/durable/SubmissionLedger.d.mts +3 -0
- package/dist/durable/SubmissionLedger.mjs +3 -0
- package/dist/durable/SubmissionLedgerConformance.d.mts +31 -0
- package/dist/durable/SubmissionLedgerConformance.mjs +2090 -0
- package/dist/durable/SubmissionLedgerConformance.mjs.map +1 -0
- package/dist/durable/SubmissionStatus.d.mts +2 -0
- package/dist/durable/SubmissionStatus.mjs +1 -0
- package/dist/durable/Subscription.d.mts +2 -0
- package/dist/durable/Subscription.mjs +1 -0
- package/dist/durable/SubscriptionInput.d.mts +2 -0
- package/dist/durable/SubscriptionInput.mjs +1 -0
- package/dist/durable/SubscriptionStoreConformance.d.mts +15 -0
- package/dist/durable/SubscriptionStoreConformance.mjs +816 -0
- package/dist/durable/SubscriptionStoreConformance.mjs.map +1 -0
- package/dist/durable/SubscriptionTransition.d.mts +2 -0
- package/dist/durable/SubscriptionTransition.mjs +1 -0
- package/dist/durable/Subscriptions.d.mts +2 -0
- package/dist/durable/Subscriptions.mjs +1 -0
- package/dist/durable/ThreadArchiveRange.d.mts +2 -0
- package/dist/durable/ThreadArchiveRange.mjs +1 -0
- package/dist/durable/ThreadContextHistory.d.mts +2 -0
- package/dist/durable/ThreadContextHistory.mjs +1 -0
- package/dist/durable/ThreadContextHistoryProjection.d.mts +2 -0
- package/dist/durable/ThreadContextHistoryProjection.mjs +1 -0
- package/dist/durable/ThreadImport.d.mts +2 -0
- package/dist/durable/ThreadImport.mjs +1 -0
- package/dist/durable/ThreadInvariants.d.mts +2 -0
- package/dist/durable/ThreadInvariants.mjs +1 -0
- package/dist/durable/ThreadProjectionMaintenance.d.mts +2 -0
- package/dist/durable/ThreadProjectionMaintenance.mjs +1 -0
- package/dist/durable/ThreadReader.d.mts +2 -0
- package/dist/durable/ThreadReader.mjs +1 -0
- package/dist/durable/ThreadStore.d.mts +3 -0
- package/dist/durable/ThreadStore.mjs +3 -0
- package/dist/durable/ThreadStoreConformance.d.mts +53 -0
- package/dist/durable/ThreadStoreConformance.mjs +402 -0
- package/dist/durable/ThreadStoreConformance.mjs.map +1 -0
- package/dist/durable/ThreadTransfer.d.mts +2 -0
- package/dist/durable/ThreadTransfer.mjs +1 -0
- package/dist/durable/ThreadWork.d.mts +2 -0
- package/dist/durable/ThreadWork.mjs +1 -0
- package/dist/durable/ToolReconciler.d.mts +2 -0
- package/dist/durable/ToolReconciler.mjs +1 -0
- package/dist/durable/WakeScheduler.d.mts +2 -0
- package/dist/durable/WakeScheduler.mjs +1 -0
- package/dist/durable/WorkerAdmission.d.mts +2 -0
- package/dist/durable/WorkerAdmission.mjs +1 -0
- package/dist/durable/WorkerHost.d.mts +2 -0
- package/dist/durable/WorkerHost.mjs +1 -0
- package/dist/engine/AgentRuntime.d.mts +2 -0
- package/dist/engine/AgentRuntime.mjs +1 -0
- package/dist/engine/Compaction.d.mts +4 -0
- package/dist/engine/Compaction.mjs +2 -0
- package/dist/engine/ContextCompactor.d.mts +2 -0
- package/dist/engine/ContextCompactor.mjs +1 -0
- package/dist/engine/ContextHistory.d.mts +2 -0
- package/dist/engine/ContextHistory.mjs +1 -0
- package/dist/engine/ContextWindow.d.mts +2 -0
- package/dist/engine/ContextWindow.mjs +1 -0
- package/dist/engine/DurableStep.d.mts +2 -0
- package/dist/engine/DurableStep.mjs +3 -0
- package/dist/engine/MessagingHost.d.mts +2 -0
- package/dist/engine/MessagingHost.mjs +1 -0
- package/dist/engine/Output.d.mts +3 -0
- package/dist/engine/Output.mjs +2 -0
- package/dist/engine/RunEventSink.d.mts +2 -0
- package/dist/engine/RunEventSink.mjs +1 -0
- package/dist/engine/RunOptions.d.mts +2 -0
- package/dist/engine/RunOptions.mjs +1 -0
- package/dist/engine/SubagentHost.d.mts +2 -0
- package/dist/engine/SubagentHost.mjs +1 -0
- package/dist/engine/ThreadHistory.d.mts +2 -0
- package/dist/engine/ThreadHistory.mjs +1 -0
- package/dist/engine/ToolBroker.d.mts +2 -0
- package/dist/engine/ToolBroker.mjs +1 -0
- package/dist/index.d.mts +90 -0
- package/dist/index.mjs +101 -0
- package/dist/output-contract-CYA4oBhe.mjs +128 -0
- package/dist/output-contract-CYA4oBhe.mjs.map +1 -0
- package/dist/rolldown-runtime-D3KUYPsf.mjs +12 -0
- package/dist/run-context-reader-CHox63hg.d.mts +17 -0
- package/dist/sandbox/CodeExecutor.d.mts +2 -0
- package/dist/sandbox/CodeExecutor.mjs +1 -0
- package/dist/sandbox/InteractiveBrowser.d.mts +2 -0
- package/dist/sandbox/InteractiveBrowser.mjs +1 -0
- package/dist/sandbox/PageCapture.d.mts +2 -0
- package/dist/sandbox/PageCapture.mjs +1 -0
- package/dist/sandbox/PageScreenshot.d.mts +2 -0
- package/dist/sandbox/PageScreenshot.mjs +1 -0
- package/dist/sandbox/Sandbox.d.mts +2 -0
- package/dist/sandbox/Sandbox.mjs +1 -0
- package/dist/subagent-policy-xRJhrc0a.mjs +133 -0
- package/dist/subagent-policy-xRJhrc0a.mjs.map +1 -0
- package/dist/tool-execution-Cl7v8fXU.mjs +16 -0
- package/dist/tool-execution-Cl7v8fXU.mjs.map +1 -0
- package/dist/tool-operations-CauPonM8.mjs +84 -0
- package/dist/tool-operations-CauPonM8.mjs.map +1 -0
- package/dist/utf8-Bl0ZhhGe.mjs +27 -0
- package/dist/utf8-Bl0ZhhGe.mjs.map +1 -0
- package/package.json +491 -3
- package/src/InMemory.ts +79 -0
- package/src/ToolExposure.ts +2 -0
- package/src/capabilities/BrowserUse.ts +212 -0
- package/src/capabilities/Budget.ts +544 -0
- package/src/capabilities/CodeMode.ts +1129 -0
- package/src/capabilities/ContextTools.ts +131 -0
- package/src/capabilities/MemoryNotes.ts +177 -0
- package/src/capabilities/Messaging.ts +260 -0
- package/src/capabilities/Redaction.ts +163 -0
- package/src/capabilities/RunHooks.ts +116 -0
- package/src/capabilities/SemanticMemory.ts +402 -0
- package/src/capabilities/Subagent.ts +2343 -0
- package/src/capabilities/SubagentReservations.ts +807 -0
- package/src/capabilities/ToolDiscovery.ts +291 -0
- package/src/capabilities/ToolResults.ts +50 -0
- package/src/capabilities/WebCapture.ts +64 -0
- package/src/capabilities/WebSearch.ts +45 -0
- package/src/capabilities/internal/subagent-background.ts +1137 -0
- package/src/capabilities/internal/subagent-contract.ts +92 -0
- package/src/capabilities/internal/subagent-policy.ts +205 -0
- package/src/capabilities/internal/subagent-reporting.ts +152 -0
- package/src/core/Agent.ts +528 -0
- package/src/core/AgentError.ts +189 -0
- package/src/core/AgentPolicy.ts +194 -0
- package/src/core/AgentUpdates.ts +104 -0
- package/src/core/FailureDiagnostic.ts +392 -0
- package/src/core/IdGenerator.ts +42 -0
- package/src/core/Identifiers.ts +64 -0
- package/src/core/Memory.ts +283 -0
- package/src/core/MemoryNamespace.ts +202 -0
- package/src/core/MemoryReference.ts +120 -0
- package/src/core/MemoryRevalidation.ts +151 -0
- package/src/core/MemoryStore.ts +371 -0
- package/src/core/Messaging.ts +72 -0
- package/src/core/ProvisionalText.ts +53 -0
- package/src/core/Receipt.ts +42 -0
- package/src/core/RememberingStore.ts +22 -0
- package/src/core/RunEvent.ts +345 -0
- package/src/core/RunPolicyUsage.ts +19 -0
- package/src/core/SemanticMemoryIndex.ts +259 -0
- package/src/core/SemanticMemoryRevalidation.ts +220 -0
- package/src/core/SubagentContract.ts +263 -0
- package/src/core/Thread.ts +447 -0
- package/src/core/ToolExposure.ts +75 -0
- package/src/core/ToolResult.ts +204 -0
- package/src/core/ToolResultStorage.ts +56 -0
- package/src/core/Usage.ts +562 -0
- package/src/core/Worker.ts +236 -0
- package/src/core/internal/agent-updates.ts +42 -0
- package/src/core/internal/completion.ts +33 -0
- package/src/core/internal/json.ts +17 -0
- package/src/core/internal/memory-document.ts +39 -0
- package/src/core/internal/message-status.ts +60 -0
- package/src/core/internal/strict-schema.ts +14 -0
- package/src/core/internal/tool-execution.ts +33 -0
- package/src/core/internal/utf8.ts +32 -0
- package/src/durable/ActivityStore.ts +131 -0
- package/src/durable/Admin.ts +504 -0
- package/src/durable/AgentRegistration.ts +16 -0
- package/src/durable/CommittedActivity.ts +262 -0
- package/src/durable/Digest.ts +57 -0
- package/src/durable/DurableAgentRuntime.ts +12758 -0
- package/src/durable/DurableFailpoint.ts +108 -0
- package/src/durable/DurableFailpointTestControl.ts +39 -0
- package/src/durable/EventSource.ts +179 -0
- package/src/durable/LifecyclePublication.ts +343 -0
- package/src/durable/MessageDelivery.ts +949 -0
- package/src/durable/MessageDeliveryStoreConformance.ts +407 -0
- package/src/durable/OperationAuthorizer.ts +89 -0
- package/src/durable/PersistentHistory.ts +322 -0
- package/src/durable/PreparedInputAdmission.ts +128 -0
- package/src/durable/RecordFormat.ts +113 -0
- package/src/durable/Records.ts +1396 -0
- package/src/durable/Recovery.ts +1022 -0
- package/src/durable/RunContinuation.ts +1946 -0
- package/src/durable/RunJournal.ts +1926 -0
- package/src/durable/RunStorage.ts +533 -0
- package/src/durable/Schedule.ts +445 -0
- package/src/durable/ScheduleStoreConformance.ts +642 -0
- package/src/durable/ScheduleTransition.ts +267 -0
- package/src/durable/Scheduling.ts +1031 -0
- package/src/durable/SettlementPublisher.ts +172 -0
- package/src/durable/SqlMemoryStore.ts +1042 -0
- package/src/durable/SqlStorageOwner.ts +25 -0
- package/src/durable/SubmissionLedger.ts +1247 -0
- package/src/durable/SubmissionLedgerConformance.ts +4695 -0
- package/src/durable/SubmissionStatus.ts +14 -0
- package/src/durable/Subscription.ts +527 -0
- package/src/durable/SubscriptionInput.ts +145 -0
- package/src/durable/SubscriptionStoreConformance.ts +1275 -0
- package/src/durable/SubscriptionTransition.ts +330 -0
- package/src/durable/Subscriptions.ts +1245 -0
- package/src/durable/ThreadArchiveRange.ts +91 -0
- package/src/durable/ThreadContextHistory.ts +338 -0
- package/src/durable/ThreadContextHistoryProjection.ts +219 -0
- package/src/durable/ThreadImport.ts +1199 -0
- package/src/durable/ThreadInvariants.ts +312 -0
- package/src/durable/ThreadProjectionMaintenance.ts +72 -0
- package/src/durable/ThreadReader.ts +21 -0
- package/src/durable/ThreadStore.ts +1258 -0
- package/src/durable/ThreadStoreConformance.ts +877 -0
- package/src/durable/ThreadTransfer.ts +263 -0
- package/src/durable/ThreadWork.ts +713 -0
- package/src/durable/ToolReconciler.ts +112 -0
- package/src/durable/WakeScheduler.ts +125 -0
- package/src/durable/WorkerAdmission.ts +98 -0
- package/src/durable/WorkerHost.ts +204 -0
- package/src/durable/internal/StorageOwner.ts +181 -0
- package/src/durable/internal/agent-registration.ts +713 -0
- package/src/durable/internal/agent-updates.ts +338 -0
- package/src/durable/internal/canonical-json.ts +110 -0
- package/src/durable/internal/evidence.ts +29 -0
- package/src/durable/internal/foreign-diagnostic.ts +48 -0
- package/src/durable/internal/history-prompt.ts +87 -0
- package/src/durable/internal/initial-context.ts +215 -0
- package/src/durable/internal/journal-metadata.ts +188 -0
- package/src/durable/internal/message-status.ts +18 -0
- package/src/durable/internal/messaging-host.ts +615 -0
- package/src/durable/internal/prompt-footprint.ts +47 -0
- package/src/durable/internal/prompt-history-cache.ts +604 -0
- package/src/durable/internal/record-encoding.ts +258 -0
- package/src/durable/internal/record-ownership.ts +68 -0
- package/src/durable/internal/run-context-reader.ts +51 -0
- package/src/durable/internal/run-context.ts +211 -0
- package/src/durable/internal/schedule-time.ts +304 -0
- package/src/durable/internal/thread-import-reader.ts +85 -0
- package/src/durable/internal/thread-initialization.ts +181 -0
- package/src/durable/internal/thread-transfer-source.ts +7 -0
- package/src/durable/internal/tool-operations.ts +138 -0
- package/src/durable/internal/transfer-dependencies.ts +40 -0
- package/src/durable/internal/usage-totals.ts +36 -0
- package/src/durable/internal/worker-host.ts +4041 -0
- package/src/durable/internal/worker-runtime.ts +10 -0
- package/src/engine/AgentRuntime.ts +100 -0
- package/src/engine/Compaction.ts +11 -0
- package/src/engine/ContextCompactor.ts +302 -0
- package/src/engine/ContextHistory.ts +75 -0
- package/src/engine/ContextWindow.ts +81 -0
- package/src/engine/DurableStep.ts +115 -0
- package/src/engine/MessagingHost.ts +118 -0
- package/src/engine/Output.ts +2 -0
- package/src/engine/RunEventSink.ts +124 -0
- package/src/engine/RunOptions.ts +664 -0
- package/src/engine/SubagentHost.ts +231 -0
- package/src/engine/ThreadHistory.ts +125 -0
- package/src/engine/ToolBroker.ts +159 -0
- package/src/engine/ToolExposure.ts +49 -0
- package/src/engine/internal/agent-runtime.ts +11137 -0
- package/src/engine/internal/bounded-value.ts +312 -0
- package/src/engine/internal/compaction.ts +673 -0
- package/src/engine/internal/error-diagnostic.ts +39 -0
- package/src/engine/internal/image-tokens.ts +61 -0
- package/src/engine/internal/interpreter-options.ts +569 -0
- package/src/engine/internal/output-contract.ts +226 -0
- package/src/engine/internal/primitive-delta.ts +103 -0
- package/src/engine/internal/provider-result-staging.ts +211 -0
- package/src/engine/internal/provisional-text.ts +107 -0
- package/src/engine/internal/tool-derivative.ts +47 -0
- package/src/engine/internal/tool-exposure.ts +228 -0
- package/src/engine/internal/tool-telemetry.ts +488 -0
- package/src/index.ts +100 -0
- package/src/sandbox/CodeExecutor.ts +352 -0
- package/src/sandbox/InteractiveBrowser.ts +343 -0
- package/src/sandbox/PageCapture.ts +391 -0
- package/src/sandbox/PageScreenshot.ts +83 -0
- package/src/sandbox/Sandbox.ts +29 -0
- package/README.md +0 -3
|
@@ -0,0 +1,488 @@
|
|
|
1
|
+
import * as AiError from 'effect/ai/AiError'
|
|
2
|
+
import type * as Tool from 'effect/ai/Tool'
|
|
3
|
+
import * as Cause from 'effect/Cause'
|
|
4
|
+
import * as Context from 'effect/Context'
|
|
5
|
+
import * as Effect from 'effect/Effect'
|
|
6
|
+
import * as ErrorReporter from 'effect/ErrorReporter'
|
|
7
|
+
import * as Exit from 'effect/Exit'
|
|
8
|
+
import type * as Fiber from 'effect/Fiber'
|
|
9
|
+
import * as Option from 'effect/Option'
|
|
10
|
+
import * as Schema from 'effect/Schema'
|
|
11
|
+
import * as Stream from 'effect/Stream'
|
|
12
|
+
import * as Tracer from 'effect/Tracer'
|
|
13
|
+
|
|
14
|
+
import type { ToolFailureHandling } from '../../core/RunEvent'
|
|
15
|
+
import { isolateToolDerivative } from './tool-derivative'
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* @internal Payload-free control signal used only to close the canonical Tool span with a failed
|
|
19
|
+
* Exit. It is removed immediately outside that span and never enters the public error channel.
|
|
20
|
+
*/
|
|
21
|
+
export class ToolSpanFailure extends AiError.AiError.extend<ToolSpanFailure>(
|
|
22
|
+
'@effect-agent/engine/ToolSpanFailure',
|
|
23
|
+
)({}) {
|
|
24
|
+
override readonly name = 'ToolCallFailed'
|
|
25
|
+
|
|
26
|
+
/** Schema-safe factory retaining the generated constructor required by Effect Schema. */
|
|
27
|
+
static marker(): ToolSpanFailure {
|
|
28
|
+
return ToolSpanFailure.make({
|
|
29
|
+
module: 'effect-agent',
|
|
30
|
+
method: 'execute_tool',
|
|
31
|
+
reason: AiError.UnknownError.make({
|
|
32
|
+
description: 'Tool execution reached a failed terminal state',
|
|
33
|
+
}),
|
|
34
|
+
})
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
const TOOL_SPAN_FAILURE_MARKER_ATTRIBUTE = '@effect-agent/engine/ToolSpanFailureMarker'
|
|
39
|
+
|
|
40
|
+
const terminalOutcomeTokens = new WeakMap<
|
|
41
|
+
object,
|
|
42
|
+
{
|
|
43
|
+
readonly outcome: 'success' | 'failure'
|
|
44
|
+
readonly failureMarker: ToolSpanFailure | undefined
|
|
45
|
+
readonly failureHandling: ToolFailureHandling | undefined
|
|
46
|
+
readonly failureMode: Tool.FailureMode | undefined
|
|
47
|
+
}
|
|
48
|
+
>()
|
|
49
|
+
|
|
50
|
+
/** @internal Annotate one completed attempt and hand its existing marker to the isolated span. */
|
|
51
|
+
export const annotateToolSpanTerminalOutcome = (
|
|
52
|
+
outcome: 'success' | 'failure',
|
|
53
|
+
failureMarker?: ToolSpanFailure,
|
|
54
|
+
failureHandling?: ToolFailureHandling,
|
|
55
|
+
failureMode?: Tool.FailureMode,
|
|
56
|
+
): Effect.Effect<void> => {
|
|
57
|
+
const token = {}
|
|
58
|
+
|
|
59
|
+
terminalOutcomeTokens.set(token, { outcome, failureMarker, failureHandling, failureMode })
|
|
60
|
+
|
|
61
|
+
return Effect.annotateCurrentSpan({
|
|
62
|
+
'effect_agent.tool.outcome': outcome,
|
|
63
|
+
[TOOL_SPAN_FAILURE_MARKER_ATTRIBUTE]: token,
|
|
64
|
+
})
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
export const stripToolSpanFailures = <E>(
|
|
68
|
+
cause: Cause.Cause<E | ToolSpanFailure>,
|
|
69
|
+
marker: ToolSpanFailure | undefined,
|
|
70
|
+
): { readonly found: boolean; readonly residual: Cause.Cause<E | ToolSpanFailure> } => {
|
|
71
|
+
if (marker === undefined) return { found: false, residual: cause }
|
|
72
|
+
|
|
73
|
+
const found = cause.reasons.some(
|
|
74
|
+
(reason) => Cause.isFailReason(reason) && reason.error === marker,
|
|
75
|
+
)
|
|
76
|
+
|
|
77
|
+
if (!found) {
|
|
78
|
+
// Effect v4 Cause is a flat collection of Reasons. Object-identity absence proves only that
|
|
79
|
+
// this invocation's marker is absent: another ToolSpanFailure may still be a genuine handler
|
|
80
|
+
// failure, so retain both the exact Cause object and its complete error union.
|
|
81
|
+
return { found: false, residual: cause }
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
const reasons = cause.reasons.filter((reason) => {
|
|
85
|
+
if (Cause.isFailReason(reason) && reason.error === marker) {
|
|
86
|
+
return false
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
return true
|
|
90
|
+
})
|
|
91
|
+
|
|
92
|
+
return { found: true, residual: Cause.fromReasons(reasons) }
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
/** @internal Remove only the private marker and restore the saved Cause plus every residual. */
|
|
96
|
+
export const restoreToolSpanFailureCause = <E, Original>(
|
|
97
|
+
cause: Cause.Cause<E | ToolSpanFailure>,
|
|
98
|
+
marker: ToolSpanFailure | undefined,
|
|
99
|
+
original: Cause.Cause<Original> | undefined,
|
|
100
|
+
): {
|
|
101
|
+
readonly found: boolean
|
|
102
|
+
readonly restored: Cause.Cause<E | Original | ToolSpanFailure>
|
|
103
|
+
} => {
|
|
104
|
+
const { found, residual } = stripToolSpanFailures(cause, marker)
|
|
105
|
+
|
|
106
|
+
return {
|
|
107
|
+
found,
|
|
108
|
+
restored: original === undefined ? residual : Cause.combine(original, residual),
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
const MAX_REPORTED_SPAN_LIFECYCLE_DEFECTS = 16
|
|
113
|
+
|
|
114
|
+
/** Content-free marker used only to close a delegate that cannot be wrapped safely. */
|
|
115
|
+
class ToolSpanLifecycleFailure extends Schema.TaggedError<ToolSpanLifecycleFailure>()(
|
|
116
|
+
'ToolSpanLifecycleFailure',
|
|
117
|
+
{},
|
|
118
|
+
) {
|
|
119
|
+
override readonly name = 'ToolSpanLifecycleFailure'
|
|
120
|
+
override readonly message = 'Tool span lifecycle failed'
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
/**
|
|
124
|
+
* @internal Guard one host span so synchronous exporter defects cannot alter Tool execution.
|
|
125
|
+
* The wrapper retains the span contract for Effect while forwarding every measurement to the host.
|
|
126
|
+
*/
|
|
127
|
+
class IsolatedToolSpan implements Tracer.Span {
|
|
128
|
+
readonly _tag = 'Span'
|
|
129
|
+
readonly name: string
|
|
130
|
+
readonly spanId: string
|
|
131
|
+
readonly traceId: string
|
|
132
|
+
readonly parent: Tracer.Span['parent']
|
|
133
|
+
readonly annotations: Tracer.Span['annotations']
|
|
134
|
+
readonly attributes = new Map<string, unknown>()
|
|
135
|
+
readonly links: Array<Tracer.SpanLink>
|
|
136
|
+
readonly sampled: boolean
|
|
137
|
+
readonly kind: Tracer.SpanKind
|
|
138
|
+
status: Tracer.SpanStatus
|
|
139
|
+
|
|
140
|
+
readonly #delegate: Tracer.Span
|
|
141
|
+
readonly #recordDefect: (defect: unknown) => void
|
|
142
|
+
#terminalOutcome: 'success' | 'failure' | undefined
|
|
143
|
+
#terminalFailure: ToolSpanFailure | undefined
|
|
144
|
+
#terminalFailureHandling: ToolFailureHandling | undefined
|
|
145
|
+
#terminalFailureMode: Tool.FailureMode | undefined
|
|
146
|
+
|
|
147
|
+
constructor(
|
|
148
|
+
delegate: Tracer.Span,
|
|
149
|
+
options: Parameters<Tracer.Tracer['span']>[0],
|
|
150
|
+
recordDefect: (defect: unknown) => void,
|
|
151
|
+
) {
|
|
152
|
+
this.#delegate = delegate
|
|
153
|
+
this.#recordDefect = recordDefect
|
|
154
|
+
this.name = options.name
|
|
155
|
+
this.spanId = delegate.spanId
|
|
156
|
+
this.traceId = delegate.traceId
|
|
157
|
+
this.parent = options.parent
|
|
158
|
+
this.annotations = options.annotations
|
|
159
|
+
this.links = [...options.links]
|
|
160
|
+
// The host tracer owns the final sampling decision. Reading it here keeps that access inside
|
|
161
|
+
// the caller's existing creation try/fallback together with span allocation and identifiers.
|
|
162
|
+
this.sampled = delegate.sampled
|
|
163
|
+
this.kind = options.kind
|
|
164
|
+
this.status = { _tag: 'Started', startTime: options.startTime }
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
end(endTime: bigint, exit: Exit.Exit<unknown, unknown>): void {
|
|
168
|
+
if (this.status._tag === 'Ended') return
|
|
169
|
+
|
|
170
|
+
// Early downstream closure can own terminal telemetry from a no-fail stream finalizer, where
|
|
171
|
+
// the private typed marker is intentionally captured because there is no consumer left to
|
|
172
|
+
// observe it. Once present, the bounded outcome annotation is authoritative for this completed
|
|
173
|
+
// attempt even if downstream cancellation or telemetry interruption determines the channel Exit.
|
|
174
|
+
const exportedExit = this.#terminalOutcome === 'failure'
|
|
175
|
+
? Exit.fail(this.#terminalFailure ?? ToolSpanLifecycleFailure.make({}))
|
|
176
|
+
: this.#terminalOutcome === 'success'
|
|
177
|
+
? Exit.succeed(undefined)
|
|
178
|
+
: exit
|
|
179
|
+
|
|
180
|
+
this.status = {
|
|
181
|
+
_tag: 'Ended',
|
|
182
|
+
startTime: this.status.startTime,
|
|
183
|
+
endTime,
|
|
184
|
+
exit: exportedExit,
|
|
185
|
+
}
|
|
186
|
+
if (this.#terminalOutcome !== undefined) {
|
|
187
|
+
// The public attribute map is intentionally mutable for ordinary instrumentation. Restore
|
|
188
|
+
// this framework-owned value from the authenticated private token at the export boundary so
|
|
189
|
+
// handler or telemetry code cannot forge the canonical terminal classification.
|
|
190
|
+
this.attributes.set('effect_agent.tool.outcome', this.#terminalOutcome)
|
|
191
|
+
try {
|
|
192
|
+
this.#delegate.attribute('effect_agent.tool.outcome', this.#terminalOutcome)
|
|
193
|
+
} catch (defect) {
|
|
194
|
+
this.#recordDefect(defect)
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
for (
|
|
198
|
+
const [key, value] of [
|
|
199
|
+
['effect_agent.tool.failure_mode', this.#terminalFailureMode],
|
|
200
|
+
['effect_agent.tool.failure_handling', this.#terminalFailureHandling],
|
|
201
|
+
] as const
|
|
202
|
+
) {
|
|
203
|
+
if (value !== undefined) {
|
|
204
|
+
this.attributes.set(key, value)
|
|
205
|
+
try {
|
|
206
|
+
this.#delegate.attribute(key, value)
|
|
207
|
+
} catch (defect) {
|
|
208
|
+
this.#recordDefect(defect)
|
|
209
|
+
}
|
|
210
|
+
} else if (key === 'effect_agent.tool.failure_handling') {
|
|
211
|
+
this.attributes.delete(key)
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
try {
|
|
215
|
+
this.#delegate.end(endTime, exportedExit)
|
|
216
|
+
} catch (defect) {
|
|
217
|
+
this.#recordDefect(defect)
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
attribute(key: string, value: unknown): void {
|
|
222
|
+
if (key === TOOL_SPAN_FAILURE_MARKER_ATTRIBUTE) {
|
|
223
|
+
if (typeof value === 'object' && value !== null) {
|
|
224
|
+
const terminal = terminalOutcomeTokens.get(value)
|
|
225
|
+
|
|
226
|
+
if (terminal !== undefined) {
|
|
227
|
+
this.#terminalOutcome = terminal.outcome
|
|
228
|
+
this.#terminalFailure = terminal.failureMarker
|
|
229
|
+
this.#terminalFailureHandling = terminal.failureHandling
|
|
230
|
+
this.#terminalFailureMode = terminal.failureMode
|
|
231
|
+
}
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
return
|
|
235
|
+
}
|
|
236
|
+
// Only the authenticated terminal token may classify a failure's route.
|
|
237
|
+
if (key === 'effect_agent.tool.failure_handling') return
|
|
238
|
+
this.attributes.set(key, value)
|
|
239
|
+
try {
|
|
240
|
+
this.#delegate.attribute(key, value)
|
|
241
|
+
} catch (defect) {
|
|
242
|
+
this.#recordDefect(defect)
|
|
243
|
+
}
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
event(name: string, startTime: bigint, attributes?: Record<string, unknown>): void {
|
|
247
|
+
try {
|
|
248
|
+
this.#delegate.event(name, startTime, attributes)
|
|
249
|
+
} catch (defect) {
|
|
250
|
+
this.#recordDefect(defect)
|
|
251
|
+
}
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
addLinks(links: ReadonlyArray<Tracer.SpanLink>): void {
|
|
255
|
+
this.links.push(...links)
|
|
256
|
+
try {
|
|
257
|
+
this.#delegate.addLinks(links)
|
|
258
|
+
} catch (defect) {
|
|
259
|
+
this.#recordDefect(defect)
|
|
260
|
+
}
|
|
261
|
+
}
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
interface IsolatedToolTracer {
|
|
265
|
+
readonly tracer: Tracer.Tracer
|
|
266
|
+
readonly reportLifecycleDefects: Effect.Effect<void>
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
/**
|
|
270
|
+
* @internal Isolate the complete canonical span lifecycle. A creation defect receives a local,
|
|
271
|
+
* non-exported span so the handler still runs; delegate method/finalization defects are retained
|
|
272
|
+
* as bounded reporter diagnostics and never enter the handler stream Cause.
|
|
273
|
+
*/
|
|
274
|
+
export const makeIsolatedToolTracer = (delegate: Tracer.Tracer): IsolatedToolTracer => {
|
|
275
|
+
const defects: Array<unknown> = []
|
|
276
|
+
|
|
277
|
+
const recordDefect = (defect: unknown): void => {
|
|
278
|
+
if (defects.length < MAX_REPORTED_SPAN_LIFECYCLE_DEFECTS) defects.push(defect)
|
|
279
|
+
}
|
|
280
|
+
|
|
281
|
+
let delegateContext: Tracer.Tracer['context']
|
|
282
|
+
|
|
283
|
+
try {
|
|
284
|
+
delegateContext = delegate.context?.bind(delegate)
|
|
285
|
+
} catch (defect) {
|
|
286
|
+
recordDefect(defect)
|
|
287
|
+
delegateContext = undefined
|
|
288
|
+
}
|
|
289
|
+
|
|
290
|
+
const context: Tracer.Tracer['context'] = delegateContext === undefined
|
|
291
|
+
? undefined
|
|
292
|
+
: <X>(primitive: Tracer.EffectPrimitive<X>, fiber: Fiber.Fiber<unknown, unknown>): X => {
|
|
293
|
+
type Evaluation =
|
|
294
|
+
| { readonly _tag: 'Pending' }
|
|
295
|
+
| { readonly _tag: 'Succeeded'; readonly value: X }
|
|
296
|
+
| { readonly _tag: 'Failed'; readonly error: unknown }
|
|
297
|
+
let evaluation: Evaluation = { _tag: 'Pending' }
|
|
298
|
+
const currentEvaluation = (): Evaluation => evaluation
|
|
299
|
+
|
|
300
|
+
const evaluate = (currentFiber: Fiber.Fiber<unknown, unknown>): X => {
|
|
301
|
+
switch (evaluation._tag) {
|
|
302
|
+
case 'Succeeded':
|
|
303
|
+
return evaluation.value
|
|
304
|
+
case 'Failed':
|
|
305
|
+
// oxlint-disable-next-line effect/no-untyped-throw -- The synchronous foreign tracer hook must rethrow the original primitive failure for the Effect evaluator.
|
|
306
|
+
throw evaluation.error
|
|
307
|
+
case 'Pending': {
|
|
308
|
+
try {
|
|
309
|
+
const value = primitive['~effect/Effect/evaluate'](currentFiber)
|
|
310
|
+
|
|
311
|
+
evaluation = { _tag: 'Succeeded', value }
|
|
312
|
+
|
|
313
|
+
return value
|
|
314
|
+
} catch (error) {
|
|
315
|
+
evaluation = { _tag: 'Failed', error }
|
|
316
|
+
// oxlint-disable-next-line effect/no-untyped-throw -- The synchronous foreign tracer hook must rethrow the original primitive failure for the Effect evaluator.
|
|
317
|
+
throw error
|
|
318
|
+
}
|
|
319
|
+
}
|
|
320
|
+
}
|
|
321
|
+
}
|
|
322
|
+
|
|
323
|
+
const guardedPrimitive: Tracer.EffectPrimitive<X> = {
|
|
324
|
+
['~effect/Effect/evaluate']: evaluate,
|
|
325
|
+
}
|
|
326
|
+
|
|
327
|
+
try {
|
|
328
|
+
delegateContext(guardedPrimitive, fiber)
|
|
329
|
+
} catch (defect) {
|
|
330
|
+
const observed = currentEvaluation()
|
|
331
|
+
|
|
332
|
+
switch (observed._tag) {
|
|
333
|
+
case 'Failed':
|
|
334
|
+
// oxlint-disable-next-line effect/no-untyped-throw -- The synchronous foreign tracer hook must rethrow the original primitive failure for the Effect evaluator.
|
|
335
|
+
throw observed.error
|
|
336
|
+
case 'Succeeded':
|
|
337
|
+
recordDefect(defect)
|
|
338
|
+
|
|
339
|
+
return observed.value
|
|
340
|
+
case 'Pending':
|
|
341
|
+
recordDefect(defect)
|
|
342
|
+
|
|
343
|
+
return evaluate(fiber)
|
|
344
|
+
}
|
|
345
|
+
}
|
|
346
|
+
const observed = currentEvaluation()
|
|
347
|
+
|
|
348
|
+
switch (observed._tag) {
|
|
349
|
+
case 'Failed':
|
|
350
|
+
// oxlint-disable-next-line effect/no-untyped-throw -- The synchronous foreign tracer hook must rethrow the original primitive failure for the Effect evaluator.
|
|
351
|
+
throw observed.error
|
|
352
|
+
case 'Succeeded':
|
|
353
|
+
return observed.value
|
|
354
|
+
case 'Pending':
|
|
355
|
+
return evaluate(fiber)
|
|
356
|
+
}
|
|
357
|
+
}
|
|
358
|
+
|
|
359
|
+
const tracer = Tracer.make({
|
|
360
|
+
context,
|
|
361
|
+
span(options) {
|
|
362
|
+
let delegateSpan: Tracer.Span
|
|
363
|
+
|
|
364
|
+
try {
|
|
365
|
+
delegateSpan = delegate.span(options)
|
|
366
|
+
} catch (defect) {
|
|
367
|
+
recordDefect(defect)
|
|
368
|
+
|
|
369
|
+
// This native span is deliberately not handed to the host exporter. It only preserves
|
|
370
|
+
// Effect's current-span contract so Tool behavior continues without observable tracing.
|
|
371
|
+
return new Tracer.NativeSpan(options)
|
|
372
|
+
}
|
|
373
|
+
try {
|
|
374
|
+
return new IsolatedToolSpan(delegateSpan, options, recordDefect)
|
|
375
|
+
} catch (defect) {
|
|
376
|
+
recordDefect(defect)
|
|
377
|
+
try {
|
|
378
|
+
// Allocation succeeded, so best-effort close the host span without attaching the raw
|
|
379
|
+
// wrapper defect. The start time gives this abandoned measurement a bounded duration.
|
|
380
|
+
delegateSpan.end(options.startTime, Exit.fail(ToolSpanLifecycleFailure.make({})))
|
|
381
|
+
} catch (closeDefect) {
|
|
382
|
+
recordDefect(closeDefect)
|
|
383
|
+
}
|
|
384
|
+
|
|
385
|
+
return new Tracer.NativeSpan(options)
|
|
386
|
+
}
|
|
387
|
+
},
|
|
388
|
+
})
|
|
389
|
+
|
|
390
|
+
const reportLifecycleDefects = Effect.suspend(() => {
|
|
391
|
+
const pending = defects.splice(0)
|
|
392
|
+
|
|
393
|
+
return Effect.forEach(
|
|
394
|
+
pending,
|
|
395
|
+
(defect) => isolateToolDerivative(ErrorReporter.report(Cause.die(defect))),
|
|
396
|
+
{ discard: true },
|
|
397
|
+
)
|
|
398
|
+
})
|
|
399
|
+
|
|
400
|
+
return { tracer, reportLifecycleDefects }
|
|
401
|
+
}
|
|
402
|
+
|
|
403
|
+
export interface ToolSpanTelemetryService {
|
|
404
|
+
/** Measure one Tool handler attempt while isolating every host span-lifecycle defect. */
|
|
405
|
+
readonly isolateSpanLifecycle: <A, E, R>(
|
|
406
|
+
stream: Stream.Stream<A, E, R>,
|
|
407
|
+
) => Stream.Stream<A, E, R>
|
|
408
|
+
/** Effect counterpart used by programmatic Tool handlers nested inside an outer Tool stream. */
|
|
409
|
+
readonly isolateEffectSpanLifecycle: <A, E, R>(
|
|
410
|
+
effect: Effect.Effect<A, E, R>,
|
|
411
|
+
) => Effect.Effect<A, E, R>
|
|
412
|
+
/** Keep Effect AI implementation annotations local while preserving host-owned handler spans. */
|
|
413
|
+
readonly isolateToolkitHandle: <A, E, R>(
|
|
414
|
+
effect: Effect.Effect<A, E, R>,
|
|
415
|
+
) => Effect.Effect<A, E, R>
|
|
416
|
+
}
|
|
417
|
+
|
|
418
|
+
/**
|
|
419
|
+
* @internal Engine-owned span-lifecycle policy. The AgentRuntime composition boundary builds this
|
|
420
|
+
* capability from the host's ambient Tracer; Tool execution consumes it without selecting,
|
|
421
|
+
* decorating, or locally providing a Tracer implementation.
|
|
422
|
+
*/
|
|
423
|
+
export class ToolSpanTelemetry extends Context.Service<
|
|
424
|
+
ToolSpanTelemetry,
|
|
425
|
+
ToolSpanTelemetryService
|
|
426
|
+
>()('@effect-agent/engine/ToolSpanTelemetry') {
|
|
427
|
+
static readonly make: Effect.Effect<ToolSpanTelemetryService> = Effect.map(
|
|
428
|
+
Tracer.Tracer,
|
|
429
|
+
(delegate) =>
|
|
430
|
+
ToolSpanTelemetry.of({
|
|
431
|
+
isolateEffectSpanLifecycle: (effect) =>
|
|
432
|
+
Effect.suspend(() => {
|
|
433
|
+
const isolated = makeIsolatedToolTracer(delegate)
|
|
434
|
+
|
|
435
|
+
return effect.pipe(
|
|
436
|
+
Effect.provideService(Tracer.Tracer, isolated.tracer),
|
|
437
|
+
// `Effect.ensuring` runs after the measured span's finalizer, matching the Stream
|
|
438
|
+
// boundary below while keeping the broker's value and error channels unchanged.
|
|
439
|
+
Effect.ensuring(isolated.reportLifecycleDefects),
|
|
440
|
+
)
|
|
441
|
+
}),
|
|
442
|
+
isolateToolkitHandle: (effect) =>
|
|
443
|
+
Effect.currentSpan.pipe(
|
|
444
|
+
Effect.option,
|
|
445
|
+
Effect.flatMap((parentOption) => {
|
|
446
|
+
if (Option.isNone(parentOption)) return effect
|
|
447
|
+
const parent = parentOption.value
|
|
448
|
+
|
|
449
|
+
// Effect AI annotates its current span with decoded Tool parameters before forking
|
|
450
|
+
// the handler. Keep those annotations on a local span that is never handed to the
|
|
451
|
+
// host tracer. DisablePropagation makes explicit handler spans filter past this
|
|
452
|
+
// implementation parent and attach to the canonical execute_tool span instead.
|
|
453
|
+
const local = new Tracer.NativeSpan({
|
|
454
|
+
name: 'AgentRuntime.toolkit.handle',
|
|
455
|
+
parent: Option.some(parent),
|
|
456
|
+
annotations: Context.add(Context.empty(), Tracer.DisablePropagation, true),
|
|
457
|
+
links: [],
|
|
458
|
+
startTime: 0n,
|
|
459
|
+
kind: 'internal',
|
|
460
|
+
sampled: parent.sampled,
|
|
461
|
+
})
|
|
462
|
+
|
|
463
|
+
return effect.pipe(
|
|
464
|
+
Effect.withParentSpan(local),
|
|
465
|
+
Effect.onExit((exit) =>
|
|
466
|
+
Effect.sync(() => {
|
|
467
|
+
local.end(0n, exit)
|
|
468
|
+
})
|
|
469
|
+
),
|
|
470
|
+
)
|
|
471
|
+
}),
|
|
472
|
+
),
|
|
473
|
+
isolateSpanLifecycle: (stream) =>
|
|
474
|
+
Stream.unwrap(
|
|
475
|
+
Effect.sync(() => {
|
|
476
|
+
const isolated = makeIsolatedToolTracer(delegate)
|
|
477
|
+
|
|
478
|
+
return stream.pipe(
|
|
479
|
+
Stream.provideService(Tracer.Tracer, isolated.tracer),
|
|
480
|
+
// `Stream.ensuring` runs after the canonical span's own finalizer, so creation,
|
|
481
|
+
// annotation, and close defects are reported outside this execution's measurement.
|
|
482
|
+
Stream.ensuring(isolated.reportLifecycleDefects),
|
|
483
|
+
)
|
|
484
|
+
}),
|
|
485
|
+
),
|
|
486
|
+
}),
|
|
487
|
+
)
|
|
488
|
+
}
|
package/src/index.ts
ADDED
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
export * as BrowserUse from './capabilities/BrowserUse'
|
|
2
|
+
export * as Budget from './capabilities/Budget'
|
|
3
|
+
export * as CodeMode from './capabilities/CodeMode'
|
|
4
|
+
export * as ContextTools from './capabilities/ContextTools'
|
|
5
|
+
export * as MemoryNotes from './capabilities/MemoryNotes'
|
|
6
|
+
export * as Messaging from './capabilities/Messaging'
|
|
7
|
+
export * as Redaction from './capabilities/Redaction'
|
|
8
|
+
export * as RunHooks from './capabilities/RunHooks'
|
|
9
|
+
export * as SemanticMemory from './capabilities/SemanticMemory'
|
|
10
|
+
export * as Subagent from './capabilities/Subagent'
|
|
11
|
+
export * as SubagentReservations from './capabilities/SubagentReservations'
|
|
12
|
+
export * as ToolDiscovery from './capabilities/ToolDiscovery'
|
|
13
|
+
export * as ToolResults from './capabilities/ToolResults'
|
|
14
|
+
export * as WebCapture from './capabilities/WebCapture'
|
|
15
|
+
export * as WebSearch from './capabilities/WebSearch'
|
|
16
|
+
export * as Agent from './core/Agent'
|
|
17
|
+
export * as AgentError from './core/AgentError'
|
|
18
|
+
export * as AgentPolicy from './core/AgentPolicy'
|
|
19
|
+
export * as AgentUpdates from './core/AgentUpdates'
|
|
20
|
+
export * as FailureDiagnostic from './core/FailureDiagnostic'
|
|
21
|
+
export * as Identifiers from './core/Identifiers'
|
|
22
|
+
export * as IdGenerator from './core/IdGenerator'
|
|
23
|
+
export * as Memory from './core/Memory'
|
|
24
|
+
export * as MemoryNamespace from './core/MemoryNamespace'
|
|
25
|
+
export * as MemoryReference from './core/MemoryReference'
|
|
26
|
+
export * as MemoryRevalidation from './core/MemoryRevalidation'
|
|
27
|
+
export * as MemoryStore from './core/MemoryStore'
|
|
28
|
+
export * as ProvisionalText from './core/ProvisionalText'
|
|
29
|
+
export * as Receipt from './core/Receipt'
|
|
30
|
+
export * as RememberingStore from './core/RememberingStore'
|
|
31
|
+
export * as RunEvent from './core/RunEvent'
|
|
32
|
+
export * as RunPolicyUsage from './core/RunPolicyUsage'
|
|
33
|
+
export * as SemanticMemoryIndex from './core/SemanticMemoryIndex'
|
|
34
|
+
export * as SemanticMemoryRevalidation from './core/SemanticMemoryRevalidation'
|
|
35
|
+
export * as SubagentContract from './core/SubagentContract'
|
|
36
|
+
export * as Thread from './core/Thread'
|
|
37
|
+
export * as ToolResult from './core/ToolResult'
|
|
38
|
+
export * as ToolResultStorage from './core/ToolResultStorage'
|
|
39
|
+
export * as Usage from './core/Usage'
|
|
40
|
+
export * as Worker from './core/Worker'
|
|
41
|
+
export * as ActivityStore from './durable/ActivityStore'
|
|
42
|
+
export * as Admin from './durable/Admin'
|
|
43
|
+
export * as AgentRegistration from './durable/AgentRegistration'
|
|
44
|
+
export * as CommittedActivity from './durable/CommittedActivity'
|
|
45
|
+
export * as Digest from './durable/Digest'
|
|
46
|
+
export * as DurableAgentRuntime from './durable/DurableAgentRuntime'
|
|
47
|
+
export * as DurableFailpoint from './durable/DurableFailpoint'
|
|
48
|
+
export * as EventSource from './durable/EventSource'
|
|
49
|
+
export * as LifecyclePublication from './durable/LifecyclePublication'
|
|
50
|
+
export * as MessageDelivery from './durable/MessageDelivery'
|
|
51
|
+
export * as OperationAuthorizer from './durable/OperationAuthorizer'
|
|
52
|
+
export * as PersistentHistory from './durable/PersistentHistory'
|
|
53
|
+
export * as PreparedInputAdmission from './durable/PreparedInputAdmission'
|
|
54
|
+
export * as RecordFormat from './durable/RecordFormat'
|
|
55
|
+
export * as Records from './durable/Records'
|
|
56
|
+
export * as Recovery from './durable/Recovery'
|
|
57
|
+
export * as RunContinuation from './durable/RunContinuation'
|
|
58
|
+
export * as RunJournal from './durable/RunJournal'
|
|
59
|
+
export * as Schedule from './durable/Schedule'
|
|
60
|
+
export * as ScheduleTransition from './durable/ScheduleTransition'
|
|
61
|
+
export * as Scheduling from './durable/Scheduling'
|
|
62
|
+
export * as SubmissionLedger from './durable/SubmissionLedger'
|
|
63
|
+
export * as SubmissionStatus from './durable/SubmissionStatus'
|
|
64
|
+
export * as Subscription from './durable/Subscription'
|
|
65
|
+
export * as SubscriptionInput from './durable/SubscriptionInput'
|
|
66
|
+
export * as Subscriptions from './durable/Subscriptions'
|
|
67
|
+
export * as SubscriptionTransition from './durable/SubscriptionTransition'
|
|
68
|
+
export * as ThreadArchiveRange from './durable/ThreadArchiveRange'
|
|
69
|
+
export * as ThreadContextHistory from './durable/ThreadContextHistory'
|
|
70
|
+
export * as ThreadContextHistoryProjection from './durable/ThreadContextHistoryProjection'
|
|
71
|
+
export * as ThreadImport from './durable/ThreadImport'
|
|
72
|
+
export * as ThreadInvariants from './durable/ThreadInvariants'
|
|
73
|
+
export * as ThreadProjectionMaintenance from './durable/ThreadProjectionMaintenance'
|
|
74
|
+
export * as ThreadStore from './durable/ThreadStore'
|
|
75
|
+
export * as ThreadTransfer from './durable/ThreadTransfer'
|
|
76
|
+
export * as ThreadWork from './durable/ThreadWork'
|
|
77
|
+
export * as ToolReconciler from './durable/ToolReconciler'
|
|
78
|
+
export * as WakeScheduler from './durable/WakeScheduler'
|
|
79
|
+
export * as WorkerAdmission from './durable/WorkerAdmission'
|
|
80
|
+
export * as WorkerHost from './durable/WorkerHost'
|
|
81
|
+
export * as AgentRuntime from './engine/AgentRuntime'
|
|
82
|
+
export * as Compaction from './engine/Compaction'
|
|
83
|
+
export * as ContextCompactor from './engine/ContextCompactor'
|
|
84
|
+
export * as ContextHistory from './engine/ContextHistory'
|
|
85
|
+
export * as ContextWindow from './engine/ContextWindow'
|
|
86
|
+
export * as DurableStep from './engine/DurableStep'
|
|
87
|
+
export * as MessagingHost from './engine/MessagingHost'
|
|
88
|
+
export * as Output from './engine/Output'
|
|
89
|
+
export * as RunEventSink from './engine/RunEventSink'
|
|
90
|
+
export * as RunOptions from './engine/RunOptions'
|
|
91
|
+
export * as SubagentHost from './engine/SubagentHost'
|
|
92
|
+
export * as ThreadHistory from './engine/ThreadHistory'
|
|
93
|
+
export * as ToolBroker from './engine/ToolBroker'
|
|
94
|
+
export * as InMemory from './InMemory'
|
|
95
|
+
export * as CodeExecutor from './sandbox/CodeExecutor'
|
|
96
|
+
export * as InteractiveBrowser from './sandbox/InteractiveBrowser'
|
|
97
|
+
export * as PageCapture from './sandbox/PageCapture'
|
|
98
|
+
export * as PageScreenshot from './sandbox/PageScreenshot'
|
|
99
|
+
export * as Sandbox from './sandbox/Sandbox'
|
|
100
|
+
export * as ToolExposure from './ToolExposure'
|