@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,2368 @@
|
|
|
1
|
+
import * as Tool from "effect/ai/Tool";
|
|
2
|
+
import * as Toolkit from "effect/ai/Toolkit";
|
|
3
|
+
import * as Effect from "effect/Effect";
|
|
4
|
+
import * as Layer from "effect/Layer";
|
|
5
|
+
import * as Schema from "effect/Schema";
|
|
6
|
+
import { _ as ModelServices, g as InstructionSource, p as InputPromptSource, r as AnyDefinition, s as Definition, w as RunDispositionDeclaration } from "./Agent-DSVEpq4e.mjs";
|
|
7
|
+
import { d as ToolCallId, r as DelegationId, u as ThreadId } from "./Identifiers-qafW4EP0.mjs";
|
|
8
|
+
import { c as SubagentExecutionFailureClassification, d as SubagentPolicy, f as SubagentPolicyInput, l as SubagentGrant, o as SubagentDelegationCaps, p as SubagentReservationAmounts, s as SubagentExecutionFailure } from "./SubagentContract-B7vQPueI.mjs";
|
|
9
|
+
import { s as RunTotals } from "./Usage-Bc-jXe_9.mjs";
|
|
10
|
+
import { C as SubagentDurability, E as SubagentDurabilityError, O as ToolCallWaiting, f as AgentRuntimeFailure, h as AgentSpawnerParent, m as AgentSpawner, p as AgentRuntimeRequirements, x as SpawnRunOptions, y as RuntimeBinding } from "./AgentRuntime-CoGy_5dm.mjs";
|
|
11
|
+
import { t as RunEventSink } from "./RunEventSink-f-T4jbNB.mjs";
|
|
12
|
+
import { m as RunContextPreparation } from "./RunOptions-BVSa3BO2.mjs";
|
|
13
|
+
import { t as ThreadHistory } from "./ThreadHistory-BkyGfv5E.mjs";
|
|
14
|
+
import { r as Diagnostic } from "./FailureDiagnostic-DpzYNI8f.mjs";
|
|
15
|
+
import { h as SubagentReservations, i as SubagentBudgetExhausted } from "./SubagentReservations-WrmIVzO5.mjs";
|
|
16
|
+
import { a as WorkerBudgetScope, c as WorkerError, f as WorkerRef, o as WorkerCompletion, p as WorkerReport } from "./Worker-xxucY_0b.mjs";
|
|
17
|
+
import { a as Receipt, n as JoinedToHost, t as IdempotencyKey } from "./Receipt-B4feBxMY.mjs";
|
|
18
|
+
import { a as SubagentHost, d as WorkerReporting, f as WorkerRunReport, u as WorkerReportPreparationFailure } from "./SubagentHost-CKhz1vbH.mjs";
|
|
19
|
+
import * as Brand from "effect/Brand";
|
|
20
|
+
import * as CryptoDigest from "effect/crypto/Digest";
|
|
21
|
+
import * as Stream from "effect/Stream";
|
|
22
|
+
import { c as MessageRef, l as MessageStatus } from "./Messaging-BqWHYf93.mjs";
|
|
23
|
+
declare const SubagentPrestartDenied_base: Schema.Class<SubagentPrestartDenied, Schema.TaggedStruct<"SubagentPrestartDenied", {
|
|
24
|
+
readonly delegationId: Schema.brand<Schema.NonEmptyString, "@effect-agent/core/DelegationId">;
|
|
25
|
+
readonly targetAgentId: Schema.brand<Schema.NonEmptyString, "@effect-agent/core/AgentId">;
|
|
26
|
+
readonly reason: Schema.Literals<readonly ["nested-delegation", "grant-violation", "budget-conflict"]>;
|
|
27
|
+
readonly message: Schema.String;
|
|
28
|
+
}>, import("effect/Cause").YieldableError>;
|
|
29
|
+
/**
|
|
30
|
+
* Delegation preflight denied before any child started.
|
|
31
|
+
* No reservation, identity, or event exists for the
|
|
32
|
+
* denied invocation; retry requires a new authorized parent Tool Call.
|
|
33
|
+
*/
|
|
34
|
+
declare class SubagentPrestartDenied extends SubagentPrestartDenied_base {}
|
|
35
|
+
declare const SubagentProjectionFailure_base: Schema.Class<SubagentProjectionFailure, Schema.TaggedStruct<"SubagentProjectionFailure", {
|
|
36
|
+
readonly delegationId: Schema.brand<Schema.NonEmptyString, "@effect-agent/core/DelegationId">;
|
|
37
|
+
readonly stage: Schema.Literals<readonly ["input", "result"]>;
|
|
38
|
+
readonly message: Schema.String;
|
|
39
|
+
/** Original validation error; detailed diagnostics are never part of the safe message. */
|
|
40
|
+
readonly cause: Schema.optionalKey<Schema.decodeTo<Schema.Unknown, Schema.Codec<Diagnostic, Diagnostic, never, never>, never, never>>;
|
|
41
|
+
readonly stack: Schema.optionalKey<Schema.String>;
|
|
42
|
+
}>, import("effect/Cause").YieldableError>;
|
|
43
|
+
/**
|
|
44
|
+
* Input or result projection failed its Schema or bounds.
|
|
45
|
+
* Fail closed: the message is a fixed description and
|
|
46
|
+
* never carries the raw child value.
|
|
47
|
+
*/
|
|
48
|
+
declare class SubagentProjectionFailure extends SubagentProjectionFailure_base {}
|
|
49
|
+
/**
|
|
50
|
+
* Derive the parent-Run delegation caps registered with
|
|
51
|
+
* `SubagentReservations` from one delegation policy: the per-invocation
|
|
52
|
+
* bounds scaled by `maxChildren` plus the invocation and concurrency limits.
|
|
53
|
+
*/
|
|
54
|
+
declare const delegationCapsFromPolicy: (policy: SubagentPolicy) => SubagentDelegationCaps;
|
|
55
|
+
/** Derive the all-or-nothing per-invocation reservation from one delegation policy. */
|
|
56
|
+
declare const delegationAllocationFromPolicy: (policy: SubagentPolicy) => SubagentReservationAmounts;
|
|
57
|
+
type Declaration<Name extends string, Input extends Schema.Top, Output extends Schema.Top, Parameters extends Schema.Top, Success extends Schema.Top, Failure extends Schema.Top, Prepare, Project> = Pick<SubagentDefineOptions<Input, Output, unknown, Record<string, Tool.Any>, Parameters, Success, Failure, Prepare, Project>, 'parameters' | 'success' | 'failure' | 'prepareInput' | 'projectResult' | 'policy' | 'needsApproval'> & {
|
|
58
|
+
readonly name: Name;
|
|
59
|
+
readonly delegationId: WorkerRef['delegationId'];
|
|
60
|
+
readonly target: AnyDefinition & {
|
|
61
|
+
readonly input: Input;
|
|
62
|
+
readonly output: Output;
|
|
63
|
+
};
|
|
64
|
+
readonly grant: SubagentGrant;
|
|
65
|
+
};
|
|
66
|
+
type WorkerDeclaration<Name extends string> = {
|
|
67
|
+
readonly name: Name;
|
|
68
|
+
readonly delegationId: WorkerRef['delegationId'];
|
|
69
|
+
readonly target: Pick<AnyDefinition, 'id'>;
|
|
70
|
+
};
|
|
71
|
+
/** Portable identity checked against this declaration; possession grants no authority. */
|
|
72
|
+
declare const Worker: <const Name extends string>(declaration: WorkerDeclaration<Name>) => Schema.refine<{
|
|
73
|
+
readonly schemaVersion: 1;
|
|
74
|
+
readonly delegationId: string & Brand.Brand<"@effect-agent/core/DelegationId">;
|
|
75
|
+
readonly targetAgentId: string & Brand.Brand<"@effect-agent/core/AgentId">;
|
|
76
|
+
readonly threadId: string & Brand.Brand<"@effect-agent/core/ThreadId">;
|
|
77
|
+
} & Brand.Brand<`@effect-agent/Worker/${Name}`>, Schema.Struct<{
|
|
78
|
+
readonly schemaVersion: Schema.Literal<1>;
|
|
79
|
+
readonly delegationId: Schema.brand<Schema.NonEmptyString, "@effect-agent/core/DelegationId">;
|
|
80
|
+
readonly targetAgentId: Schema.brand<Schema.NonEmptyString, "@effect-agent/core/AgentId">;
|
|
81
|
+
readonly threadId: Schema.brand<Schema.NonEmptyString, "@effect-agent/core/ThreadId">;
|
|
82
|
+
}>>;
|
|
83
|
+
type Worker<Name extends string> = ReturnType<typeof Worker<Name>>['Type'];
|
|
84
|
+
/** One exact Receipt, including private canonical failure evidence for programmatic callers. */
|
|
85
|
+
declare const WorkerObservation: <Success extends Schema.Top>(success: Success) => Schema.Union<readonly [Schema.TaggedStruct<"Pending", {
|
|
86
|
+
readonly receipt: typeof Receipt;
|
|
87
|
+
}>, Schema.TaggedStruct<"Settled", {
|
|
88
|
+
readonly receipt: typeof Receipt;
|
|
89
|
+
readonly runId: Schema.brand<Schema.NonEmptyString, "@effect-agent/core/RunId">;
|
|
90
|
+
readonly settlementId: Schema.brand<Schema.NonEmptyString, "@effect-agent/core/SettlementId">;
|
|
91
|
+
readonly outcome: Schema.Literal<"completed">;
|
|
92
|
+
readonly result: Success;
|
|
93
|
+
}>, Schema.Struct<{
|
|
94
|
+
readonly _tag: Schema.tag<"Settled">;
|
|
95
|
+
readonly receipt: typeof Receipt;
|
|
96
|
+
readonly runId: Schema.optionalKey<Schema.brand<Schema.NonEmptyString, "@effect-agent/core/RunId">>;
|
|
97
|
+
readonly settlementId: Schema.brand<Schema.NonEmptyString, "@effect-agent/core/SettlementId">;
|
|
98
|
+
readonly outcome: Schema.Literals<readonly ["failed", "aborted"]>;
|
|
99
|
+
readonly failure: typeof SubagentExecutionFailure;
|
|
100
|
+
readonly diagnostic: Schema.optionalKey<Schema.declareConstructor<{
|
|
101
|
+
readonly errorTag: string;
|
|
102
|
+
readonly message: string;
|
|
103
|
+
readonly diagnostic?: Diagnostic | undefined;
|
|
104
|
+
readonly context?: {
|
|
105
|
+
readonly agentId?: string | undefined;
|
|
106
|
+
readonly threadId?: string | undefined;
|
|
107
|
+
readonly runId?: string | undefined;
|
|
108
|
+
readonly submissionId?: string | undefined;
|
|
109
|
+
readonly attemptId?: string | undefined;
|
|
110
|
+
readonly turnId?: string | undefined;
|
|
111
|
+
readonly toolCallId?: string | undefined;
|
|
112
|
+
readonly toolName?: string | undefined;
|
|
113
|
+
readonly callId?: string | undefined;
|
|
114
|
+
readonly check?: string | undefined;
|
|
115
|
+
readonly operation?: string | undefined;
|
|
116
|
+
} | undefined;
|
|
117
|
+
}, {
|
|
118
|
+
readonly errorTag: string;
|
|
119
|
+
readonly message: string;
|
|
120
|
+
readonly diagnostic?: Diagnostic | undefined;
|
|
121
|
+
readonly context?: {
|
|
122
|
+
readonly agentId?: string | undefined;
|
|
123
|
+
readonly threadId?: string | undefined;
|
|
124
|
+
readonly runId?: string | undefined;
|
|
125
|
+
readonly submissionId?: string | undefined;
|
|
126
|
+
readonly attemptId?: string | undefined;
|
|
127
|
+
readonly turnId?: string | undefined;
|
|
128
|
+
readonly toolCallId?: string | undefined;
|
|
129
|
+
readonly toolName?: string | undefined;
|
|
130
|
+
readonly callId?: string | undefined;
|
|
131
|
+
readonly check?: string | undefined;
|
|
132
|
+
readonly operation?: string | undefined;
|
|
133
|
+
} | undefined;
|
|
134
|
+
}, readonly [Schema.Struct<{
|
|
135
|
+
readonly errorTag: Schema.NonEmptyString;
|
|
136
|
+
readonly message: Schema.String;
|
|
137
|
+
readonly diagnostic: Schema.optionalKey<Schema.Codec<Diagnostic, Diagnostic, never, never>>;
|
|
138
|
+
readonly context: Schema.optionalKey<Schema.declareConstructor<{
|
|
139
|
+
readonly agentId?: string | undefined;
|
|
140
|
+
readonly threadId?: string | undefined;
|
|
141
|
+
readonly runId?: string | undefined;
|
|
142
|
+
readonly submissionId?: string | undefined;
|
|
143
|
+
readonly attemptId?: string | undefined;
|
|
144
|
+
readonly turnId?: string | undefined;
|
|
145
|
+
readonly toolCallId?: string | undefined;
|
|
146
|
+
readonly toolName?: string | undefined;
|
|
147
|
+
readonly callId?: string | undefined;
|
|
148
|
+
readonly check?: string | undefined;
|
|
149
|
+
readonly operation?: string | undefined;
|
|
150
|
+
}, {
|
|
151
|
+
readonly agentId?: string | undefined;
|
|
152
|
+
readonly threadId?: string | undefined;
|
|
153
|
+
readonly runId?: string | undefined;
|
|
154
|
+
readonly submissionId?: string | undefined;
|
|
155
|
+
readonly attemptId?: string | undefined;
|
|
156
|
+
readonly turnId?: string | undefined;
|
|
157
|
+
readonly toolCallId?: string | undefined;
|
|
158
|
+
readonly toolName?: string | undefined;
|
|
159
|
+
readonly callId?: string | undefined;
|
|
160
|
+
readonly check?: string | undefined;
|
|
161
|
+
readonly operation?: string | undefined;
|
|
162
|
+
}, readonly [Schema.Struct<{
|
|
163
|
+
readonly agentId: Schema.optionalKey<Schema.String>;
|
|
164
|
+
readonly threadId: Schema.optionalKey<Schema.String>;
|
|
165
|
+
readonly runId: Schema.optionalKey<Schema.String>;
|
|
166
|
+
readonly submissionId: Schema.optionalKey<Schema.String>;
|
|
167
|
+
readonly attemptId: Schema.optionalKey<Schema.String>;
|
|
168
|
+
readonly turnId: Schema.optionalKey<Schema.String>;
|
|
169
|
+
readonly toolCallId: Schema.optionalKey<Schema.String>;
|
|
170
|
+
readonly toolName: Schema.optionalKey<Schema.String>;
|
|
171
|
+
readonly callId: Schema.optionalKey<Schema.String>;
|
|
172
|
+
readonly check: Schema.optionalKey<Schema.String>;
|
|
173
|
+
readonly operation: Schema.optionalKey<Schema.String>;
|
|
174
|
+
}>], {
|
|
175
|
+
readonly agentId?: string | undefined;
|
|
176
|
+
readonly threadId?: string | undefined;
|
|
177
|
+
readonly runId?: string | undefined;
|
|
178
|
+
readonly submissionId?: string | undefined;
|
|
179
|
+
readonly attemptId?: string | undefined;
|
|
180
|
+
readonly turnId?: string | undefined;
|
|
181
|
+
readonly toolCallId?: string | undefined;
|
|
182
|
+
readonly toolName?: string | undefined;
|
|
183
|
+
readonly callId?: string | undefined;
|
|
184
|
+
readonly check?: string | undefined;
|
|
185
|
+
readonly operation?: string | undefined;
|
|
186
|
+
}>>;
|
|
187
|
+
}>], {
|
|
188
|
+
readonly errorTag: string;
|
|
189
|
+
readonly message: string;
|
|
190
|
+
readonly diagnostic?: Diagnostic | undefined;
|
|
191
|
+
readonly context?: {
|
|
192
|
+
readonly agentId?: string | undefined;
|
|
193
|
+
readonly threadId?: string | undefined;
|
|
194
|
+
readonly runId?: string | undefined;
|
|
195
|
+
readonly submissionId?: string | undefined;
|
|
196
|
+
readonly attemptId?: string | undefined;
|
|
197
|
+
readonly turnId?: string | undefined;
|
|
198
|
+
readonly toolCallId?: string | undefined;
|
|
199
|
+
readonly toolName?: string | undefined;
|
|
200
|
+
readonly callId?: string | undefined;
|
|
201
|
+
readonly check?: string | undefined;
|
|
202
|
+
readonly operation?: string | undefined;
|
|
203
|
+
} | undefined;
|
|
204
|
+
}>>;
|
|
205
|
+
}>]>;
|
|
206
|
+
type WorkerObservation<Success extends Schema.Top> = ReturnType<typeof WorkerObservation<Success>>['Type'];
|
|
207
|
+
declare const operations: <const Name extends string, Input extends Schema.Top, Output extends Schema.Top, Parameters extends Schema.Top, Success extends Schema.Top, Failure extends Schema.Top, Prepare, Project>(declaration: Declaration<Name, Input, Output, Parameters, Success, Failure, Prepare, Project>) => {
|
|
208
|
+
start: (parameters: Parameters["Type"], options: {
|
|
209
|
+
readonly idempotencyKey: IdempotencyKey;
|
|
210
|
+
readonly budgetScope?: WorkerBudgetScope;
|
|
211
|
+
readonly continuationOf?: WorkerRef;
|
|
212
|
+
}) => Effect.Effect<{
|
|
213
|
+
worker: {
|
|
214
|
+
readonly schemaVersion: 1;
|
|
215
|
+
readonly delegationId: string & Brand.Brand<"@effect-agent/core/DelegationId">;
|
|
216
|
+
readonly targetAgentId: string & Brand.Brand<"@effect-agent/core/AgentId">;
|
|
217
|
+
readonly threadId: string & Brand.Brand<"@effect-agent/core/ThreadId">;
|
|
218
|
+
} & Brand.Brand<`@effect-agent/Worker/${Name}`>;
|
|
219
|
+
delivery: {
|
|
220
|
+
readonly message: {
|
|
221
|
+
readonly ownerThreadId: string & Brand.Brand<"@effect-agent/core/ThreadId">;
|
|
222
|
+
readonly messageId: string & Brand.Brand<"@effect-agent/thread/IdempotencyKey">;
|
|
223
|
+
};
|
|
224
|
+
readonly status: "pending";
|
|
225
|
+
readonly receipt: null;
|
|
226
|
+
readonly settlement: null;
|
|
227
|
+
readonly reason: string | null;
|
|
228
|
+
} | {
|
|
229
|
+
readonly message: {
|
|
230
|
+
readonly ownerThreadId: string & Brand.Brand<"@effect-agent/core/ThreadId">;
|
|
231
|
+
readonly messageId: string & Brand.Brand<"@effect-agent/thread/IdempotencyKey">;
|
|
232
|
+
};
|
|
233
|
+
readonly status: "accepted";
|
|
234
|
+
readonly receipt: Receipt;
|
|
235
|
+
readonly settlement: null;
|
|
236
|
+
readonly reason: string | null;
|
|
237
|
+
} | {
|
|
238
|
+
readonly message: {
|
|
239
|
+
readonly ownerThreadId: string & Brand.Brand<"@effect-agent/core/ThreadId">;
|
|
240
|
+
readonly messageId: string & Brand.Brand<"@effect-agent/thread/IdempotencyKey">;
|
|
241
|
+
};
|
|
242
|
+
readonly status: "processed";
|
|
243
|
+
readonly receipt: Receipt;
|
|
244
|
+
readonly settlement: {
|
|
245
|
+
readonly settlementId: string & Brand.Brand<"@effect-agent/core/SettlementId">;
|
|
246
|
+
readonly outcome: "aborted" | "completed" | "failed";
|
|
247
|
+
};
|
|
248
|
+
readonly reason: null;
|
|
249
|
+
} | {
|
|
250
|
+
readonly message: {
|
|
251
|
+
readonly ownerThreadId: string & Brand.Brand<"@effect-agent/core/ThreadId">;
|
|
252
|
+
readonly messageId: string & Brand.Brand<"@effect-agent/thread/IdempotencyKey">;
|
|
253
|
+
};
|
|
254
|
+
readonly status: "refused";
|
|
255
|
+
readonly receipt: null;
|
|
256
|
+
readonly settlement: null;
|
|
257
|
+
readonly reason: string;
|
|
258
|
+
} | {
|
|
259
|
+
readonly message: {
|
|
260
|
+
readonly ownerThreadId: string & Brand.Brand<"@effect-agent/core/ThreadId">;
|
|
261
|
+
readonly messageId: string & Brand.Brand<"@effect-agent/thread/IdempotencyKey">;
|
|
262
|
+
};
|
|
263
|
+
readonly status: "parked";
|
|
264
|
+
readonly receipt: Receipt | null;
|
|
265
|
+
readonly settlement: null;
|
|
266
|
+
readonly reason: string;
|
|
267
|
+
};
|
|
268
|
+
}, SubagentPrestartDenied | SubagentProjectionFailure | WorkerError | Failure["Type"], Prepare | SubagentHost | Parameters["EncodingServices"] | (Schema.Top & Input)["EncodingServices"]>;
|
|
269
|
+
followUp: (worker: {
|
|
270
|
+
readonly schemaVersion: 1;
|
|
271
|
+
readonly delegationId: string & Brand.Brand<"@effect-agent/core/DelegationId">;
|
|
272
|
+
readonly targetAgentId: string & Brand.Brand<"@effect-agent/core/AgentId">;
|
|
273
|
+
readonly threadId: string & Brand.Brand<"@effect-agent/core/ThreadId">;
|
|
274
|
+
} & Brand.Brand<`@effect-agent/Worker/${Name}`>, parameters: Parameters["Type"], options: {
|
|
275
|
+
readonly idempotencyKey: IdempotencyKey;
|
|
276
|
+
}) => Effect.Effect<{
|
|
277
|
+
readonly message: {
|
|
278
|
+
readonly ownerThreadId: string & Brand.Brand<"@effect-agent/core/ThreadId">;
|
|
279
|
+
readonly messageId: string & Brand.Brand<"@effect-agent/thread/IdempotencyKey">;
|
|
280
|
+
};
|
|
281
|
+
readonly status: "pending";
|
|
282
|
+
readonly receipt: null;
|
|
283
|
+
readonly settlement: null;
|
|
284
|
+
readonly reason: string | null;
|
|
285
|
+
} | {
|
|
286
|
+
readonly message: {
|
|
287
|
+
readonly ownerThreadId: string & Brand.Brand<"@effect-agent/core/ThreadId">;
|
|
288
|
+
readonly messageId: string & Brand.Brand<"@effect-agent/thread/IdempotencyKey">;
|
|
289
|
+
};
|
|
290
|
+
readonly status: "accepted";
|
|
291
|
+
readonly receipt: Receipt;
|
|
292
|
+
readonly settlement: null;
|
|
293
|
+
readonly reason: string | null;
|
|
294
|
+
} | {
|
|
295
|
+
readonly message: {
|
|
296
|
+
readonly ownerThreadId: string & Brand.Brand<"@effect-agent/core/ThreadId">;
|
|
297
|
+
readonly messageId: string & Brand.Brand<"@effect-agent/thread/IdempotencyKey">;
|
|
298
|
+
};
|
|
299
|
+
readonly status: "processed";
|
|
300
|
+
readonly receipt: Receipt;
|
|
301
|
+
readonly settlement: {
|
|
302
|
+
readonly settlementId: string & Brand.Brand<"@effect-agent/core/SettlementId">;
|
|
303
|
+
readonly outcome: "aborted" | "completed" | "failed";
|
|
304
|
+
};
|
|
305
|
+
readonly reason: null;
|
|
306
|
+
} | {
|
|
307
|
+
readonly message: {
|
|
308
|
+
readonly ownerThreadId: string & Brand.Brand<"@effect-agent/core/ThreadId">;
|
|
309
|
+
readonly messageId: string & Brand.Brand<"@effect-agent/thread/IdempotencyKey">;
|
|
310
|
+
};
|
|
311
|
+
readonly status: "refused";
|
|
312
|
+
readonly receipt: null;
|
|
313
|
+
readonly settlement: null;
|
|
314
|
+
readonly reason: string;
|
|
315
|
+
} | {
|
|
316
|
+
readonly message: {
|
|
317
|
+
readonly ownerThreadId: string & Brand.Brand<"@effect-agent/core/ThreadId">;
|
|
318
|
+
readonly messageId: string & Brand.Brand<"@effect-agent/thread/IdempotencyKey">;
|
|
319
|
+
};
|
|
320
|
+
readonly status: "parked";
|
|
321
|
+
readonly receipt: Receipt | null;
|
|
322
|
+
readonly settlement: null;
|
|
323
|
+
readonly reason: string;
|
|
324
|
+
}, SubagentProjectionFailure | WorkerError | Failure["Type"], Prepare | SubagentHost | Parameters["EncodingServices"] | (Schema.Top & Input)["EncodingServices"]>;
|
|
325
|
+
inspectMessage: (worker: {
|
|
326
|
+
readonly schemaVersion: 1;
|
|
327
|
+
readonly delegationId: string & Brand.Brand<"@effect-agent/core/DelegationId">;
|
|
328
|
+
readonly targetAgentId: string & Brand.Brand<"@effect-agent/core/AgentId">;
|
|
329
|
+
readonly threadId: string & Brand.Brand<"@effect-agent/core/ThreadId">;
|
|
330
|
+
} & Brand.Brand<`@effect-agent/Worker/${Name}`>, message: {
|
|
331
|
+
readonly ownerThreadId: string & Brand.Brand<"@effect-agent/core/ThreadId">;
|
|
332
|
+
readonly messageId: string & Brand.Brand<"@effect-agent/thread/IdempotencyKey">;
|
|
333
|
+
}) => Effect.Effect<{
|
|
334
|
+
readonly message: {
|
|
335
|
+
readonly ownerThreadId: string & Brand.Brand<"@effect-agent/core/ThreadId">;
|
|
336
|
+
readonly messageId: string & Brand.Brand<"@effect-agent/thread/IdempotencyKey">;
|
|
337
|
+
};
|
|
338
|
+
readonly status: "pending";
|
|
339
|
+
readonly receipt: null;
|
|
340
|
+
readonly settlement: null;
|
|
341
|
+
readonly reason: string | null;
|
|
342
|
+
} | {
|
|
343
|
+
readonly message: {
|
|
344
|
+
readonly ownerThreadId: string & Brand.Brand<"@effect-agent/core/ThreadId">;
|
|
345
|
+
readonly messageId: string & Brand.Brand<"@effect-agent/thread/IdempotencyKey">;
|
|
346
|
+
};
|
|
347
|
+
readonly status: "accepted";
|
|
348
|
+
readonly receipt: Receipt;
|
|
349
|
+
readonly settlement: null;
|
|
350
|
+
readonly reason: string | null;
|
|
351
|
+
} | {
|
|
352
|
+
readonly message: {
|
|
353
|
+
readonly ownerThreadId: string & Brand.Brand<"@effect-agent/core/ThreadId">;
|
|
354
|
+
readonly messageId: string & Brand.Brand<"@effect-agent/thread/IdempotencyKey">;
|
|
355
|
+
};
|
|
356
|
+
readonly status: "processed";
|
|
357
|
+
readonly receipt: Receipt;
|
|
358
|
+
readonly settlement: {
|
|
359
|
+
readonly settlementId: string & Brand.Brand<"@effect-agent/core/SettlementId">;
|
|
360
|
+
readonly outcome: "aborted" | "completed" | "failed";
|
|
361
|
+
};
|
|
362
|
+
readonly reason: null;
|
|
363
|
+
} | {
|
|
364
|
+
readonly message: {
|
|
365
|
+
readonly ownerThreadId: string & Brand.Brand<"@effect-agent/core/ThreadId">;
|
|
366
|
+
readonly messageId: string & Brand.Brand<"@effect-agent/thread/IdempotencyKey">;
|
|
367
|
+
};
|
|
368
|
+
readonly status: "refused";
|
|
369
|
+
readonly receipt: null;
|
|
370
|
+
readonly settlement: null;
|
|
371
|
+
readonly reason: string;
|
|
372
|
+
} | {
|
|
373
|
+
readonly message: {
|
|
374
|
+
readonly ownerThreadId: string & Brand.Brand<"@effect-agent/core/ThreadId">;
|
|
375
|
+
readonly messageId: string & Brand.Brand<"@effect-agent/thread/IdempotencyKey">;
|
|
376
|
+
};
|
|
377
|
+
readonly status: "parked";
|
|
378
|
+
readonly receipt: Receipt | null;
|
|
379
|
+
readonly settlement: null;
|
|
380
|
+
readonly reason: string;
|
|
381
|
+
}, WorkerError, SubagentHost>;
|
|
382
|
+
observe: (operation: "await" | "inspect", worker: {
|
|
383
|
+
readonly schemaVersion: 1;
|
|
384
|
+
readonly delegationId: string & Brand.Brand<"@effect-agent/core/DelegationId">;
|
|
385
|
+
readonly targetAgentId: string & Brand.Brand<"@effect-agent/core/AgentId">;
|
|
386
|
+
readonly threadId: string & Brand.Brand<"@effect-agent/core/ThreadId">;
|
|
387
|
+
} & Brand.Brand<`@effect-agent/Worker/${Name}`>, receipt: Receipt) => Effect.Effect<{
|
|
388
|
+
readonly _tag: "Pending";
|
|
389
|
+
readonly receipt: Receipt;
|
|
390
|
+
} | {
|
|
391
|
+
readonly _tag: "Settled";
|
|
392
|
+
readonly receipt: Receipt;
|
|
393
|
+
readonly runId?: (string & Brand.Brand<"@effect-agent/core/RunId">) | undefined;
|
|
394
|
+
readonly settlementId: string & Brand.Brand<"@effect-agent/core/SettlementId">;
|
|
395
|
+
readonly outcome: "aborted" | "failed";
|
|
396
|
+
readonly failure: SubagentExecutionFailure;
|
|
397
|
+
readonly diagnostic?: {
|
|
398
|
+
readonly errorTag: string;
|
|
399
|
+
readonly message: string;
|
|
400
|
+
readonly diagnostic?: Diagnostic | undefined;
|
|
401
|
+
readonly context?: {
|
|
402
|
+
readonly agentId?: string | undefined;
|
|
403
|
+
readonly threadId?: string | undefined;
|
|
404
|
+
readonly runId?: string | undefined;
|
|
405
|
+
readonly submissionId?: string | undefined;
|
|
406
|
+
readonly attemptId?: string | undefined;
|
|
407
|
+
readonly turnId?: string | undefined;
|
|
408
|
+
readonly toolCallId?: string | undefined;
|
|
409
|
+
readonly toolName?: string | undefined;
|
|
410
|
+
readonly callId?: string | undefined;
|
|
411
|
+
readonly check?: string | undefined;
|
|
412
|
+
readonly operation?: string | undefined;
|
|
413
|
+
} | undefined;
|
|
414
|
+
} | undefined;
|
|
415
|
+
} | Schema.Struct.View<{
|
|
416
|
+
readonly _tag: Schema.tag<"Settled">;
|
|
417
|
+
readonly receipt: typeof Receipt;
|
|
418
|
+
readonly runId: Schema.brand<Schema.NonEmptyString, "@effect-agent/core/RunId">;
|
|
419
|
+
readonly settlementId: Schema.brand<Schema.NonEmptyString, "@effect-agent/core/SettlementId">;
|
|
420
|
+
readonly outcome: Schema.Literal<"completed">;
|
|
421
|
+
readonly result: Success;
|
|
422
|
+
}, "Type", Success extends {
|
|
423
|
+
readonly "~type.optionality": "optional";
|
|
424
|
+
} ? "result" : never, Success extends {
|
|
425
|
+
readonly "~type.mutability": "mutable";
|
|
426
|
+
} ? "result" : never>, SubagentProjectionFailure | WorkerError | Failure["Type"], Project | SubagentHost | Output["DecodingServices"] | Parameters["DecodingServices"] | Success["EncodingServices"]>;
|
|
427
|
+
list: (options?: {
|
|
428
|
+
readonly limit?: number;
|
|
429
|
+
readonly after?: ThreadId;
|
|
430
|
+
} | undefined) => Effect.Effect<{
|
|
431
|
+
items: {
|
|
432
|
+
state: "active" | "cancelled" | "completed" | "failed" | "idle" | "starting" | "stopped" | "stopping" | "unknown";
|
|
433
|
+
acceptedInput: {
|
|
434
|
+
readonly receipt: Receipt;
|
|
435
|
+
readonly messageId: string & Brand.Brand<"@effect-agent/thread/IdempotencyKey">;
|
|
436
|
+
} | null;
|
|
437
|
+
appliedInput: {
|
|
438
|
+
readonly receipt: Receipt;
|
|
439
|
+
readonly messageId: string & Brand.Brand<"@effect-agent/thread/IdempotencyKey">;
|
|
440
|
+
readonly runId: string & Brand.Brand<"@effect-agent/core/RunId">;
|
|
441
|
+
readonly sequence: number;
|
|
442
|
+
} | null;
|
|
443
|
+
run: {
|
|
444
|
+
readonly runId: string & Brand.Brand<"@effect-agent/core/RunId">;
|
|
445
|
+
readonly hostReceipt: Receipt;
|
|
446
|
+
readonly outcome: "aborted" | "completed" | "failed" | null;
|
|
447
|
+
readonly disposition: Schema.Json;
|
|
448
|
+
} | null;
|
|
449
|
+
pendingDelivery: {
|
|
450
|
+
readonly message: {
|
|
451
|
+
readonly ownerThreadId: string & Brand.Brand<"@effect-agent/core/ThreadId">;
|
|
452
|
+
readonly messageId: string & Brand.Brand<"@effect-agent/thread/IdempotencyKey">;
|
|
453
|
+
};
|
|
454
|
+
readonly status: "pending";
|
|
455
|
+
readonly receipt: null;
|
|
456
|
+
readonly settlement: null;
|
|
457
|
+
readonly reason: string | null;
|
|
458
|
+
} | {
|
|
459
|
+
readonly message: {
|
|
460
|
+
readonly ownerThreadId: string & Brand.Brand<"@effect-agent/core/ThreadId">;
|
|
461
|
+
readonly messageId: string & Brand.Brand<"@effect-agent/thread/IdempotencyKey">;
|
|
462
|
+
};
|
|
463
|
+
readonly status: "accepted";
|
|
464
|
+
readonly receipt: Receipt;
|
|
465
|
+
readonly settlement: null;
|
|
466
|
+
readonly reason: string | null;
|
|
467
|
+
} | {
|
|
468
|
+
readonly message: {
|
|
469
|
+
readonly ownerThreadId: string & Brand.Brand<"@effect-agent/core/ThreadId">;
|
|
470
|
+
readonly messageId: string & Brand.Brand<"@effect-agent/thread/IdempotencyKey">;
|
|
471
|
+
};
|
|
472
|
+
readonly status: "processed";
|
|
473
|
+
readonly receipt: Receipt;
|
|
474
|
+
readonly settlement: {
|
|
475
|
+
readonly settlementId: string & Brand.Brand<"@effect-agent/core/SettlementId">;
|
|
476
|
+
readonly outcome: "aborted" | "completed" | "failed";
|
|
477
|
+
};
|
|
478
|
+
readonly reason: null;
|
|
479
|
+
} | {
|
|
480
|
+
readonly message: {
|
|
481
|
+
readonly ownerThreadId: string & Brand.Brand<"@effect-agent/core/ThreadId">;
|
|
482
|
+
readonly messageId: string & Brand.Brand<"@effect-agent/thread/IdempotencyKey">;
|
|
483
|
+
};
|
|
484
|
+
readonly status: "refused";
|
|
485
|
+
readonly receipt: null;
|
|
486
|
+
readonly settlement: null;
|
|
487
|
+
readonly reason: string;
|
|
488
|
+
} | {
|
|
489
|
+
readonly message: {
|
|
490
|
+
readonly ownerThreadId: string & Brand.Brand<"@effect-agent/core/ThreadId">;
|
|
491
|
+
readonly messageId: string & Brand.Brand<"@effect-agent/thread/IdempotencyKey">;
|
|
492
|
+
};
|
|
493
|
+
readonly status: "parked";
|
|
494
|
+
readonly receipt: Receipt | null;
|
|
495
|
+
readonly settlement: null;
|
|
496
|
+
readonly reason: string;
|
|
497
|
+
} | null;
|
|
498
|
+
watermark: {
|
|
499
|
+
readonly canonicalSequence: number;
|
|
500
|
+
readonly acceptedQueueSequence: number;
|
|
501
|
+
readonly pendingDeliveryVersion: number | null;
|
|
502
|
+
};
|
|
503
|
+
worker: {
|
|
504
|
+
readonly schemaVersion: 1;
|
|
505
|
+
readonly delegationId: string & Brand.Brand<"@effect-agent/core/DelegationId">;
|
|
506
|
+
readonly targetAgentId: string & Brand.Brand<"@effect-agent/core/AgentId">;
|
|
507
|
+
readonly threadId: string & Brand.Brand<"@effect-agent/core/ThreadId">;
|
|
508
|
+
} & Brand.Brand<`@effect-agent/Worker/${Name}`>;
|
|
509
|
+
latestReceipt: Receipt | null;
|
|
510
|
+
}[];
|
|
511
|
+
next: (string & Brand.Brand<"@effect-agent/core/ThreadId">) | null;
|
|
512
|
+
}, WorkerError, SubagentHost>;
|
|
513
|
+
cancel: (worker: {
|
|
514
|
+
readonly schemaVersion: 1;
|
|
515
|
+
readonly delegationId: string & Brand.Brand<"@effect-agent/core/DelegationId">;
|
|
516
|
+
readonly targetAgentId: string & Brand.Brand<"@effect-agent/core/AgentId">;
|
|
517
|
+
readonly threadId: string & Brand.Brand<"@effect-agent/core/ThreadId">;
|
|
518
|
+
} & Brand.Brand<`@effect-agent/Worker/${Name}`>, receipt: Receipt) => Effect.Effect<void, JoinedToHost | WorkerError, SubagentHost>;
|
|
519
|
+
};
|
|
520
|
+
/** Retain a first worker input. The same explicit key reuses its durable delivery identity. */
|
|
521
|
+
declare const start: <const Name extends string, Input extends Schema.Top, Output extends Schema.Top, Parameters extends Schema.Top, Success extends Schema.Top, Failure extends Schema.Top, Prepare, Project>(declaration: Declaration<Name, Input, Output, Parameters, Success, Failure, Prepare, Project>, parameters: Parameters['Type'], options: {
|
|
522
|
+
readonly idempotencyKey: IdempotencyKey;
|
|
523
|
+
readonly budgetScope?: WorkerBudgetScope;
|
|
524
|
+
readonly continuationOf?: WorkerRef;
|
|
525
|
+
}) => Effect.Effect<{
|
|
526
|
+
worker: {
|
|
527
|
+
readonly schemaVersion: 1;
|
|
528
|
+
readonly delegationId: string & Brand.Brand<"@effect-agent/core/DelegationId">;
|
|
529
|
+
readonly targetAgentId: string & Brand.Brand<"@effect-agent/core/AgentId">;
|
|
530
|
+
readonly threadId: string & Brand.Brand<"@effect-agent/core/ThreadId">;
|
|
531
|
+
} & Brand.Brand<`@effect-agent/Worker/${Name}`>;
|
|
532
|
+
delivery: {
|
|
533
|
+
readonly message: {
|
|
534
|
+
readonly ownerThreadId: string & Brand.Brand<"@effect-agent/core/ThreadId">;
|
|
535
|
+
readonly messageId: string & Brand.Brand<"@effect-agent/thread/IdempotencyKey">;
|
|
536
|
+
};
|
|
537
|
+
readonly status: "pending";
|
|
538
|
+
readonly receipt: null;
|
|
539
|
+
readonly settlement: null;
|
|
540
|
+
readonly reason: string | null;
|
|
541
|
+
} | {
|
|
542
|
+
readonly message: {
|
|
543
|
+
readonly ownerThreadId: string & Brand.Brand<"@effect-agent/core/ThreadId">;
|
|
544
|
+
readonly messageId: string & Brand.Brand<"@effect-agent/thread/IdempotencyKey">;
|
|
545
|
+
};
|
|
546
|
+
readonly status: "accepted";
|
|
547
|
+
readonly receipt: Receipt;
|
|
548
|
+
readonly settlement: null;
|
|
549
|
+
readonly reason: string | null;
|
|
550
|
+
} | {
|
|
551
|
+
readonly message: {
|
|
552
|
+
readonly ownerThreadId: string & Brand.Brand<"@effect-agent/core/ThreadId">;
|
|
553
|
+
readonly messageId: string & Brand.Brand<"@effect-agent/thread/IdempotencyKey">;
|
|
554
|
+
};
|
|
555
|
+
readonly status: "processed";
|
|
556
|
+
readonly receipt: Receipt;
|
|
557
|
+
readonly settlement: {
|
|
558
|
+
readonly settlementId: string & Brand.Brand<"@effect-agent/core/SettlementId">;
|
|
559
|
+
readonly outcome: "aborted" | "completed" | "failed";
|
|
560
|
+
};
|
|
561
|
+
readonly reason: null;
|
|
562
|
+
} | {
|
|
563
|
+
readonly message: {
|
|
564
|
+
readonly ownerThreadId: string & Brand.Brand<"@effect-agent/core/ThreadId">;
|
|
565
|
+
readonly messageId: string & Brand.Brand<"@effect-agent/thread/IdempotencyKey">;
|
|
566
|
+
};
|
|
567
|
+
readonly status: "refused";
|
|
568
|
+
readonly receipt: null;
|
|
569
|
+
readonly settlement: null;
|
|
570
|
+
readonly reason: string;
|
|
571
|
+
} | {
|
|
572
|
+
readonly message: {
|
|
573
|
+
readonly ownerThreadId: string & Brand.Brand<"@effect-agent/core/ThreadId">;
|
|
574
|
+
readonly messageId: string & Brand.Brand<"@effect-agent/thread/IdempotencyKey">;
|
|
575
|
+
};
|
|
576
|
+
readonly status: "parked";
|
|
577
|
+
readonly receipt: Receipt | null;
|
|
578
|
+
readonly settlement: null;
|
|
579
|
+
readonly reason: string;
|
|
580
|
+
};
|
|
581
|
+
}, SubagentPrestartDenied | SubagentProjectionFailure | WorkerError | Failure["Type"], Prepare | SubagentHost | Parameters["EncodingServices"] | (Schema.Top & Input)["EncodingServices"]>;
|
|
582
|
+
/** Retain typed follow-up parameters for the same worker Thread; inspect its MessageRef for delivery. */
|
|
583
|
+
declare const followUp: <const Name extends string, Input extends Schema.Top, Output extends Schema.Top, Parameters extends Schema.Top, Success extends Schema.Top, Failure extends Schema.Top, Prepare, Project>(declaration: Declaration<Name, Input, Output, Parameters, Success, Failure, Prepare, Project>, worker: Worker<Name>, parameters: Parameters['Type'], options: {
|
|
584
|
+
readonly idempotencyKey: IdempotencyKey;
|
|
585
|
+
}) => Effect.Effect<{
|
|
586
|
+
readonly message: {
|
|
587
|
+
readonly ownerThreadId: string & Brand.Brand<"@effect-agent/core/ThreadId">;
|
|
588
|
+
readonly messageId: string & Brand.Brand<"@effect-agent/thread/IdempotencyKey">;
|
|
589
|
+
};
|
|
590
|
+
readonly status: "pending";
|
|
591
|
+
readonly receipt: null;
|
|
592
|
+
readonly settlement: null;
|
|
593
|
+
readonly reason: string | null;
|
|
594
|
+
} | {
|
|
595
|
+
readonly message: {
|
|
596
|
+
readonly ownerThreadId: string & Brand.Brand<"@effect-agent/core/ThreadId">;
|
|
597
|
+
readonly messageId: string & Brand.Brand<"@effect-agent/thread/IdempotencyKey">;
|
|
598
|
+
};
|
|
599
|
+
readonly status: "accepted";
|
|
600
|
+
readonly receipt: Receipt;
|
|
601
|
+
readonly settlement: null;
|
|
602
|
+
readonly reason: string | null;
|
|
603
|
+
} | {
|
|
604
|
+
readonly message: {
|
|
605
|
+
readonly ownerThreadId: string & Brand.Brand<"@effect-agent/core/ThreadId">;
|
|
606
|
+
readonly messageId: string & Brand.Brand<"@effect-agent/thread/IdempotencyKey">;
|
|
607
|
+
};
|
|
608
|
+
readonly status: "processed";
|
|
609
|
+
readonly receipt: Receipt;
|
|
610
|
+
readonly settlement: {
|
|
611
|
+
readonly settlementId: string & Brand.Brand<"@effect-agent/core/SettlementId">;
|
|
612
|
+
readonly outcome: "aborted" | "completed" | "failed";
|
|
613
|
+
};
|
|
614
|
+
readonly reason: null;
|
|
615
|
+
} | {
|
|
616
|
+
readonly message: {
|
|
617
|
+
readonly ownerThreadId: string & Brand.Brand<"@effect-agent/core/ThreadId">;
|
|
618
|
+
readonly messageId: string & Brand.Brand<"@effect-agent/thread/IdempotencyKey">;
|
|
619
|
+
};
|
|
620
|
+
readonly status: "refused";
|
|
621
|
+
readonly receipt: null;
|
|
622
|
+
readonly settlement: null;
|
|
623
|
+
readonly reason: string;
|
|
624
|
+
} | {
|
|
625
|
+
readonly message: {
|
|
626
|
+
readonly ownerThreadId: string & Brand.Brand<"@effect-agent/core/ThreadId">;
|
|
627
|
+
readonly messageId: string & Brand.Brand<"@effect-agent/thread/IdempotencyKey">;
|
|
628
|
+
};
|
|
629
|
+
readonly status: "parked";
|
|
630
|
+
readonly receipt: Receipt | null;
|
|
631
|
+
readonly settlement: null;
|
|
632
|
+
readonly reason: string;
|
|
633
|
+
}, SubagentProjectionFailure | WorkerError | Failure["Type"], Prepare | SubagentHost | Parameters["EncodingServices"] | (Schema.Top & Input)["EncodingServices"]>;
|
|
634
|
+
/** Inspect a continuing worker with the same summary contract returned by list. */
|
|
635
|
+
declare const summary: <const Name extends string>(declaration: WorkerDeclaration<Name> & {
|
|
636
|
+
readonly target: AnyDefinition;
|
|
637
|
+
}, worker: {
|
|
638
|
+
readonly schemaVersion: 1;
|
|
639
|
+
readonly delegationId: string & Brand.Brand<"@effect-agent/core/DelegationId">;
|
|
640
|
+
readonly targetAgentId: string & Brand.Brand<"@effect-agent/core/AgentId">;
|
|
641
|
+
readonly threadId: string & Brand.Brand<"@effect-agent/core/ThreadId">;
|
|
642
|
+
} & Brand.Brand<`@effect-agent/Worker/${Name}`>) => Effect.Effect<{
|
|
643
|
+
latestReceipt: Receipt | null;
|
|
644
|
+
state: "active" | "cancelled" | "completed" | "failed" | "idle" | "starting" | "stopped" | "stopping" | "unknown";
|
|
645
|
+
acceptedInput: {
|
|
646
|
+
readonly receipt: Receipt;
|
|
647
|
+
readonly messageId: string & Brand.Brand<"@effect-agent/thread/IdempotencyKey">;
|
|
648
|
+
} | null;
|
|
649
|
+
appliedInput: {
|
|
650
|
+
readonly receipt: Receipt;
|
|
651
|
+
readonly messageId: string & Brand.Brand<"@effect-agent/thread/IdempotencyKey">;
|
|
652
|
+
readonly runId: string & Brand.Brand<"@effect-agent/core/RunId">;
|
|
653
|
+
readonly sequence: number;
|
|
654
|
+
} | null;
|
|
655
|
+
run: {
|
|
656
|
+
readonly runId: string & Brand.Brand<"@effect-agent/core/RunId">;
|
|
657
|
+
readonly hostReceipt: Receipt;
|
|
658
|
+
readonly outcome: "aborted" | "completed" | "failed" | null;
|
|
659
|
+
readonly disposition: Schema.Json;
|
|
660
|
+
} | null;
|
|
661
|
+
pendingDelivery: {
|
|
662
|
+
readonly message: {
|
|
663
|
+
readonly ownerThreadId: string & Brand.Brand<"@effect-agent/core/ThreadId">;
|
|
664
|
+
readonly messageId: string & Brand.Brand<"@effect-agent/thread/IdempotencyKey">;
|
|
665
|
+
};
|
|
666
|
+
readonly status: "pending";
|
|
667
|
+
readonly receipt: null;
|
|
668
|
+
readonly settlement: null;
|
|
669
|
+
readonly reason: string | null;
|
|
670
|
+
} | {
|
|
671
|
+
readonly message: {
|
|
672
|
+
readonly ownerThreadId: string & Brand.Brand<"@effect-agent/core/ThreadId">;
|
|
673
|
+
readonly messageId: string & Brand.Brand<"@effect-agent/thread/IdempotencyKey">;
|
|
674
|
+
};
|
|
675
|
+
readonly status: "accepted";
|
|
676
|
+
readonly receipt: Receipt;
|
|
677
|
+
readonly settlement: null;
|
|
678
|
+
readonly reason: string | null;
|
|
679
|
+
} | {
|
|
680
|
+
readonly message: {
|
|
681
|
+
readonly ownerThreadId: string & Brand.Brand<"@effect-agent/core/ThreadId">;
|
|
682
|
+
readonly messageId: string & Brand.Brand<"@effect-agent/thread/IdempotencyKey">;
|
|
683
|
+
};
|
|
684
|
+
readonly status: "processed";
|
|
685
|
+
readonly receipt: Receipt;
|
|
686
|
+
readonly settlement: {
|
|
687
|
+
readonly settlementId: string & Brand.Brand<"@effect-agent/core/SettlementId">;
|
|
688
|
+
readonly outcome: "aborted" | "completed" | "failed";
|
|
689
|
+
};
|
|
690
|
+
readonly reason: null;
|
|
691
|
+
} | {
|
|
692
|
+
readonly message: {
|
|
693
|
+
readonly ownerThreadId: string & Brand.Brand<"@effect-agent/core/ThreadId">;
|
|
694
|
+
readonly messageId: string & Brand.Brand<"@effect-agent/thread/IdempotencyKey">;
|
|
695
|
+
};
|
|
696
|
+
readonly status: "refused";
|
|
697
|
+
readonly receipt: null;
|
|
698
|
+
readonly settlement: null;
|
|
699
|
+
readonly reason: string;
|
|
700
|
+
} | {
|
|
701
|
+
readonly message: {
|
|
702
|
+
readonly ownerThreadId: string & Brand.Brand<"@effect-agent/core/ThreadId">;
|
|
703
|
+
readonly messageId: string & Brand.Brand<"@effect-agent/thread/IdempotencyKey">;
|
|
704
|
+
};
|
|
705
|
+
readonly status: "parked";
|
|
706
|
+
readonly receipt: Receipt | null;
|
|
707
|
+
readonly settlement: null;
|
|
708
|
+
readonly reason: string;
|
|
709
|
+
} | null;
|
|
710
|
+
watermark: {
|
|
711
|
+
readonly canonicalSequence: number;
|
|
712
|
+
readonly acceptedQueueSequence: number;
|
|
713
|
+
readonly pendingDeliveryVersion: number | null;
|
|
714
|
+
};
|
|
715
|
+
worker: {
|
|
716
|
+
readonly schemaVersion: 1;
|
|
717
|
+
readonly delegationId: string & Brand.Brand<"@effect-agent/core/DelegationId">;
|
|
718
|
+
readonly targetAgentId: string & Brand.Brand<"@effect-agent/core/AgentId">;
|
|
719
|
+
readonly threadId: string & Brand.Brand<"@effect-agent/core/ThreadId">;
|
|
720
|
+
} & Brand.Brand<`@effect-agent/Worker/${Name}`>;
|
|
721
|
+
}, WorkerError, SubagentHost>;
|
|
722
|
+
/** Inspect a worker summary, retained MessageRef, or the result of one exact accepted Receipt. */
|
|
723
|
+
declare function inspect<const Name extends string, Input extends Schema.Top, Output extends Schema.Top, Parameters extends Schema.Top, Success extends Schema.Top, Failure extends Schema.Top, Prepare, Project>(declaration: Declaration<Name, Input, Output, Parameters, Success, Failure, Prepare, Project>, worker: Worker<Name>): ReturnType<typeof summary<Name>>;
|
|
724
|
+
declare function inspect<const Name extends string, Input extends Schema.Top, Output extends Schema.Top, Parameters extends Schema.Top, Success extends Schema.Top, Failure extends Schema.Top, Prepare, Project>(declaration: Declaration<Name, Input, Output, Parameters, Success, Failure, Prepare, Project>, worker: Worker<Name>, receipt: Receipt): ReturnType<ReturnType<typeof operations<Name, Input, Output, Parameters, Success, Failure, Prepare, Project>>['observe']>;
|
|
725
|
+
declare function inspect<const Name extends string, Input extends Schema.Top, Output extends Schema.Top, Parameters extends Schema.Top, Success extends Schema.Top, Failure extends Schema.Top, Prepare, Project>(declaration: Declaration<Name, Input, Output, Parameters, Success, Failure, Prepare, Project>, worker: Worker<Name>, message: MessageRef): Effect.Effect<MessageStatus, WorkerError, SubagentHost>;
|
|
726
|
+
/** Read an authorized finite history snapshot; pass the last emitted sequence to resume. */
|
|
727
|
+
declare const observe: <const Name extends string>(declaration: WorkerDeclaration<Name> & {
|
|
728
|
+
readonly target: AnyDefinition;
|
|
729
|
+
}, worker: Worker<Name>, options?: {
|
|
730
|
+
readonly after?: number;
|
|
731
|
+
}) => Stream.Stream<{
|
|
732
|
+
readonly sequence: number;
|
|
733
|
+
readonly recordId: string;
|
|
734
|
+
readonly record: Schema.Json;
|
|
735
|
+
}, WorkerError, SubagentHost>;
|
|
736
|
+
/** Seal a continuing worker, retaining a stable command identity across retries and Runs. */
|
|
737
|
+
declare const stop: <const Name extends string>(declaration: WorkerDeclaration<Name> & {
|
|
738
|
+
readonly target: AnyDefinition;
|
|
739
|
+
}, worker: {
|
|
740
|
+
readonly schemaVersion: 1;
|
|
741
|
+
readonly delegationId: string & Brand.Brand<"@effect-agent/core/DelegationId">;
|
|
742
|
+
readonly targetAgentId: string & Brand.Brand<"@effect-agent/core/AgentId">;
|
|
743
|
+
readonly threadId: string & Brand.Brand<"@effect-agent/core/ThreadId">;
|
|
744
|
+
} & Brand.Brand<`@effect-agent/Worker/${Name}`>, options: {
|
|
745
|
+
readonly idempotencyKey: IdempotencyKey;
|
|
746
|
+
}) => Effect.Effect<{
|
|
747
|
+
readonly worker: {
|
|
748
|
+
readonly schemaVersion: 1;
|
|
749
|
+
readonly delegationId: string & Brand.Brand<"@effect-agent/core/DelegationId">;
|
|
750
|
+
readonly targetAgentId: string & Brand.Brand<"@effect-agent/core/AgentId">;
|
|
751
|
+
readonly threadId: string & Brand.Brand<"@effect-agent/core/ThreadId">;
|
|
752
|
+
};
|
|
753
|
+
readonly idempotencyKey: string & Brand.Brand<"@effect-agent/thread/IdempotencyKey">;
|
|
754
|
+
}, WorkerError, SubagentHost>;
|
|
755
|
+
/** Wait for the exact Receipt. Interrupting this Effect never cancels accepted work. */
|
|
756
|
+
declare const awaitWorker: <const Name extends string, Input extends Schema.Top, Output extends Schema.Top, Parameters extends Schema.Top, Success extends Schema.Top, Failure extends Schema.Top, Prepare, Project>(declaration: Declaration<Name, Input, Output, Parameters, Success, Failure, Prepare, Project>, worker: Worker<Name>, receipt: Receipt) => Effect.Effect<{
|
|
757
|
+
readonly _tag: "Pending";
|
|
758
|
+
readonly receipt: Receipt;
|
|
759
|
+
} | {
|
|
760
|
+
readonly _tag: "Settled";
|
|
761
|
+
readonly receipt: Receipt;
|
|
762
|
+
readonly runId?: (string & Brand.Brand<"@effect-agent/core/RunId">) | undefined;
|
|
763
|
+
readonly settlementId: string & Brand.Brand<"@effect-agent/core/SettlementId">;
|
|
764
|
+
readonly outcome: "aborted" | "failed";
|
|
765
|
+
readonly failure: SubagentExecutionFailure;
|
|
766
|
+
readonly diagnostic?: {
|
|
767
|
+
readonly errorTag: string;
|
|
768
|
+
readonly message: string;
|
|
769
|
+
readonly diagnostic?: Diagnostic | undefined;
|
|
770
|
+
readonly context?: {
|
|
771
|
+
readonly agentId?: string | undefined;
|
|
772
|
+
readonly threadId?: string | undefined;
|
|
773
|
+
readonly runId?: string | undefined;
|
|
774
|
+
readonly submissionId?: string | undefined;
|
|
775
|
+
readonly attemptId?: string | undefined;
|
|
776
|
+
readonly turnId?: string | undefined;
|
|
777
|
+
readonly toolCallId?: string | undefined;
|
|
778
|
+
readonly toolName?: string | undefined;
|
|
779
|
+
readonly callId?: string | undefined;
|
|
780
|
+
readonly check?: string | undefined;
|
|
781
|
+
readonly operation?: string | undefined;
|
|
782
|
+
} | undefined;
|
|
783
|
+
} | undefined;
|
|
784
|
+
} | Schema.Struct.View<{
|
|
785
|
+
readonly _tag: Schema.tag<"Settled">;
|
|
786
|
+
readonly receipt: typeof Receipt;
|
|
787
|
+
readonly runId: Schema.brand<Schema.NonEmptyString, "@effect-agent/core/RunId">;
|
|
788
|
+
readonly settlementId: Schema.brand<Schema.NonEmptyString, "@effect-agent/core/SettlementId">;
|
|
789
|
+
readonly outcome: Schema.Literal<"completed">;
|
|
790
|
+
readonly result: Success;
|
|
791
|
+
}, "Type", Success extends {
|
|
792
|
+
readonly "~type.optionality": "optional";
|
|
793
|
+
} ? "result" : never, Success extends {
|
|
794
|
+
readonly "~type.mutability": "mutable";
|
|
795
|
+
} ? "result" : never>, SubagentProjectionFailure | WorkerError | Failure["Type"], Project | SubagentHost | Output["DecodingServices"] | Parameters["DecodingServices"] | Success["EncodingServices"]>;
|
|
796
|
+
/** List only workers visible through the caller-bound host facet. */
|
|
797
|
+
declare const list: <const Name extends string, Input extends Schema.Top, Output extends Schema.Top, Parameters extends Schema.Top, Success extends Schema.Top, Failure extends Schema.Top, Prepare, Project>(declaration: Declaration<Name, Input, Output, Parameters, Success, Failure, Prepare, Project>, options?: {
|
|
798
|
+
readonly limit?: number;
|
|
799
|
+
readonly after?: ThreadId;
|
|
800
|
+
}) => Effect.Effect<{
|
|
801
|
+
items: {
|
|
802
|
+
state: "active" | "cancelled" | "completed" | "failed" | "idle" | "starting" | "stopped" | "stopping" | "unknown";
|
|
803
|
+
acceptedInput: {
|
|
804
|
+
readonly receipt: Receipt;
|
|
805
|
+
readonly messageId: string & Brand.Brand<"@effect-agent/thread/IdempotencyKey">;
|
|
806
|
+
} | null;
|
|
807
|
+
appliedInput: {
|
|
808
|
+
readonly receipt: Receipt;
|
|
809
|
+
readonly messageId: string & Brand.Brand<"@effect-agent/thread/IdempotencyKey">;
|
|
810
|
+
readonly runId: string & Brand.Brand<"@effect-agent/core/RunId">;
|
|
811
|
+
readonly sequence: number;
|
|
812
|
+
} | null;
|
|
813
|
+
run: {
|
|
814
|
+
readonly runId: string & Brand.Brand<"@effect-agent/core/RunId">;
|
|
815
|
+
readonly hostReceipt: Receipt;
|
|
816
|
+
readonly outcome: "aborted" | "completed" | "failed" | null;
|
|
817
|
+
readonly disposition: Schema.Json;
|
|
818
|
+
} | null;
|
|
819
|
+
pendingDelivery: {
|
|
820
|
+
readonly message: {
|
|
821
|
+
readonly ownerThreadId: string & Brand.Brand<"@effect-agent/core/ThreadId">;
|
|
822
|
+
readonly messageId: string & Brand.Brand<"@effect-agent/thread/IdempotencyKey">;
|
|
823
|
+
};
|
|
824
|
+
readonly status: "pending";
|
|
825
|
+
readonly receipt: null;
|
|
826
|
+
readonly settlement: null;
|
|
827
|
+
readonly reason: string | null;
|
|
828
|
+
} | {
|
|
829
|
+
readonly message: {
|
|
830
|
+
readonly ownerThreadId: string & Brand.Brand<"@effect-agent/core/ThreadId">;
|
|
831
|
+
readonly messageId: string & Brand.Brand<"@effect-agent/thread/IdempotencyKey">;
|
|
832
|
+
};
|
|
833
|
+
readonly status: "accepted";
|
|
834
|
+
readonly receipt: Receipt;
|
|
835
|
+
readonly settlement: null;
|
|
836
|
+
readonly reason: string | null;
|
|
837
|
+
} | {
|
|
838
|
+
readonly message: {
|
|
839
|
+
readonly ownerThreadId: string & Brand.Brand<"@effect-agent/core/ThreadId">;
|
|
840
|
+
readonly messageId: string & Brand.Brand<"@effect-agent/thread/IdempotencyKey">;
|
|
841
|
+
};
|
|
842
|
+
readonly status: "processed";
|
|
843
|
+
readonly receipt: Receipt;
|
|
844
|
+
readonly settlement: {
|
|
845
|
+
readonly settlementId: string & Brand.Brand<"@effect-agent/core/SettlementId">;
|
|
846
|
+
readonly outcome: "aborted" | "completed" | "failed";
|
|
847
|
+
};
|
|
848
|
+
readonly reason: null;
|
|
849
|
+
} | {
|
|
850
|
+
readonly message: {
|
|
851
|
+
readonly ownerThreadId: string & Brand.Brand<"@effect-agent/core/ThreadId">;
|
|
852
|
+
readonly messageId: string & Brand.Brand<"@effect-agent/thread/IdempotencyKey">;
|
|
853
|
+
};
|
|
854
|
+
readonly status: "refused";
|
|
855
|
+
readonly receipt: null;
|
|
856
|
+
readonly settlement: null;
|
|
857
|
+
readonly reason: string;
|
|
858
|
+
} | {
|
|
859
|
+
readonly message: {
|
|
860
|
+
readonly ownerThreadId: string & Brand.Brand<"@effect-agent/core/ThreadId">;
|
|
861
|
+
readonly messageId: string & Brand.Brand<"@effect-agent/thread/IdempotencyKey">;
|
|
862
|
+
};
|
|
863
|
+
readonly status: "parked";
|
|
864
|
+
readonly receipt: Receipt | null;
|
|
865
|
+
readonly settlement: null;
|
|
866
|
+
readonly reason: string;
|
|
867
|
+
} | null;
|
|
868
|
+
watermark: {
|
|
869
|
+
readonly canonicalSequence: number;
|
|
870
|
+
readonly acceptedQueueSequence: number;
|
|
871
|
+
readonly pendingDeliveryVersion: number | null;
|
|
872
|
+
};
|
|
873
|
+
worker: {
|
|
874
|
+
readonly schemaVersion: 1;
|
|
875
|
+
readonly delegationId: string & Brand.Brand<"@effect-agent/core/DelegationId">;
|
|
876
|
+
readonly targetAgentId: string & Brand.Brand<"@effect-agent/core/AgentId">;
|
|
877
|
+
readonly threadId: string & Brand.Brand<"@effect-agent/core/ThreadId">;
|
|
878
|
+
} & Brand.Brand<`@effect-agent/Worker/${Name}`>;
|
|
879
|
+
latestReceipt: Receipt | null;
|
|
880
|
+
}[];
|
|
881
|
+
next: (string & Brand.Brand<"@effect-agent/core/ThreadId">) | null;
|
|
882
|
+
}, WorkerError, SubagentHost>;
|
|
883
|
+
/** Request cancellation of exactly one Receipt; JoinedToHost remains a typed conflict. */
|
|
884
|
+
declare const cancel: <const Name extends string, Input extends Schema.Top, Output extends Schema.Top, Parameters extends Schema.Top, Success extends Schema.Top, Failure extends Schema.Top, Prepare, Project>(declaration: Declaration<Name, Input, Output, Parameters, Success, Failure, Prepare, Project>, worker: Worker<Name>, receipt: Receipt) => Effect.Effect<void, JoinedToHost | WorkerError, SubagentHost>;
|
|
885
|
+
/** Opt in to each model-facing operation. Waiting remains programmatic only. */
|
|
886
|
+
interface StartToolOptions {
|
|
887
|
+
/** Author-owned funding request; every native admission separately authorizes it. */
|
|
888
|
+
readonly budgetScope?: WorkerBudgetScope;
|
|
889
|
+
}
|
|
890
|
+
/** Retain new worker input under the current Tool Call's stable identity. */
|
|
891
|
+
declare const startTool: <const Name extends string, Input extends Schema.Top, Output extends Schema.Top, Parameters extends Schema.Top, Success extends Schema.Top, Failure extends Schema.Top, Prepare, Project>(declaration: Declaration<Name, Input, Output, Parameters, Success, Failure, Prepare, Project>, options?: StartToolOptions) => Readonly<{
|
|
892
|
+
tool: Tool.Tool<`${Name}_start`, {
|
|
893
|
+
readonly parameters: Parameters;
|
|
894
|
+
readonly success: Schema.Struct<{
|
|
895
|
+
readonly worker: Schema.refine<{
|
|
896
|
+
readonly schemaVersion: 1;
|
|
897
|
+
readonly delegationId: string & Brand.Brand<"@effect-agent/core/DelegationId">;
|
|
898
|
+
readonly targetAgentId: string & Brand.Brand<"@effect-agent/core/AgentId">;
|
|
899
|
+
readonly threadId: string & Brand.Brand<"@effect-agent/core/ThreadId">;
|
|
900
|
+
} & Brand.Brand<`@effect-agent/Worker/${Name}`>, Schema.Struct<{
|
|
901
|
+
readonly schemaVersion: Schema.Literal<1>;
|
|
902
|
+
readonly delegationId: Schema.brand<Schema.NonEmptyString, "@effect-agent/core/DelegationId">;
|
|
903
|
+
readonly targetAgentId: Schema.brand<Schema.NonEmptyString, "@effect-agent/core/AgentId">;
|
|
904
|
+
readonly threadId: Schema.brand<Schema.NonEmptyString, "@effect-agent/core/ThreadId">;
|
|
905
|
+
}>>;
|
|
906
|
+
readonly delivery: Schema.Union<readonly [Schema.Struct<{
|
|
907
|
+
readonly message: Schema.Struct<{
|
|
908
|
+
readonly ownerThreadId: Schema.brand<Schema.NonEmptyString, "@effect-agent/core/ThreadId">;
|
|
909
|
+
readonly messageId: Schema.brand<Schema.NonEmptyString, "@effect-agent/thread/IdempotencyKey">;
|
|
910
|
+
}>;
|
|
911
|
+
readonly status: Schema.Literal<"pending">;
|
|
912
|
+
readonly receipt: Schema.Null;
|
|
913
|
+
readonly settlement: Schema.Null;
|
|
914
|
+
readonly reason: Schema.NullOr<Schema.NonEmptyString>;
|
|
915
|
+
}>, Schema.Struct<{
|
|
916
|
+
readonly message: Schema.Struct<{
|
|
917
|
+
readonly ownerThreadId: Schema.brand<Schema.NonEmptyString, "@effect-agent/core/ThreadId">;
|
|
918
|
+
readonly messageId: Schema.brand<Schema.NonEmptyString, "@effect-agent/thread/IdempotencyKey">;
|
|
919
|
+
}>;
|
|
920
|
+
readonly status: Schema.Literal<"accepted">;
|
|
921
|
+
readonly receipt: typeof Receipt;
|
|
922
|
+
readonly settlement: Schema.Null;
|
|
923
|
+
readonly reason: Schema.NullOr<Schema.NonEmptyString>;
|
|
924
|
+
}>, Schema.Struct<{
|
|
925
|
+
readonly message: Schema.Struct<{
|
|
926
|
+
readonly ownerThreadId: Schema.brand<Schema.NonEmptyString, "@effect-agent/core/ThreadId">;
|
|
927
|
+
readonly messageId: Schema.brand<Schema.NonEmptyString, "@effect-agent/thread/IdempotencyKey">;
|
|
928
|
+
}>;
|
|
929
|
+
readonly status: Schema.Literal<"processed">;
|
|
930
|
+
readonly receipt: typeof Receipt;
|
|
931
|
+
readonly settlement: Schema.Struct<{
|
|
932
|
+
readonly settlementId: Schema.brand<Schema.NonEmptyString, "@effect-agent/core/SettlementId">;
|
|
933
|
+
readonly outcome: Schema.Literals<readonly ["completed", "failed", "aborted"]>;
|
|
934
|
+
}>;
|
|
935
|
+
readonly reason: Schema.Null;
|
|
936
|
+
}>, Schema.Struct<{
|
|
937
|
+
readonly message: Schema.Struct<{
|
|
938
|
+
readonly ownerThreadId: Schema.brand<Schema.NonEmptyString, "@effect-agent/core/ThreadId">;
|
|
939
|
+
readonly messageId: Schema.brand<Schema.NonEmptyString, "@effect-agent/thread/IdempotencyKey">;
|
|
940
|
+
}>;
|
|
941
|
+
readonly status: Schema.Literal<"refused">;
|
|
942
|
+
readonly receipt: Schema.Null;
|
|
943
|
+
readonly settlement: Schema.Null;
|
|
944
|
+
readonly reason: Schema.NonEmptyString;
|
|
945
|
+
}>, Schema.Struct<{
|
|
946
|
+
readonly message: Schema.Struct<{
|
|
947
|
+
readonly ownerThreadId: Schema.brand<Schema.NonEmptyString, "@effect-agent/core/ThreadId">;
|
|
948
|
+
readonly messageId: Schema.brand<Schema.NonEmptyString, "@effect-agent/thread/IdempotencyKey">;
|
|
949
|
+
}>;
|
|
950
|
+
readonly status: Schema.Literal<"parked">;
|
|
951
|
+
readonly receipt: Schema.NullOr<typeof Receipt>;
|
|
952
|
+
readonly settlement: Schema.Null;
|
|
953
|
+
readonly reason: Schema.NonEmptyString;
|
|
954
|
+
}>]>;
|
|
955
|
+
}>;
|
|
956
|
+
readonly failure: Schema.Union<readonly [Failure, typeof SubagentProjectionFailure, typeof SubagentPrestartDenied, typeof WorkerError]>;
|
|
957
|
+
readonly failureMode: "error";
|
|
958
|
+
}, CryptoDigest.Digest | SubagentHost>;
|
|
959
|
+
layer: import("effect/Layer").Layer<Tool.HandlersFor<[Tool.Tool<`${Name}_start`, {
|
|
960
|
+
readonly parameters: Parameters;
|
|
961
|
+
readonly success: Schema.Struct<{
|
|
962
|
+
readonly worker: Schema.refine<{
|
|
963
|
+
readonly schemaVersion: 1;
|
|
964
|
+
readonly delegationId: string & Brand.Brand<"@effect-agent/core/DelegationId">;
|
|
965
|
+
readonly targetAgentId: string & Brand.Brand<"@effect-agent/core/AgentId">;
|
|
966
|
+
readonly threadId: string & Brand.Brand<"@effect-agent/core/ThreadId">;
|
|
967
|
+
} & Brand.Brand<`@effect-agent/Worker/${Name}`>, Schema.Struct<{
|
|
968
|
+
readonly schemaVersion: Schema.Literal<1>;
|
|
969
|
+
readonly delegationId: Schema.brand<Schema.NonEmptyString, "@effect-agent/core/DelegationId">;
|
|
970
|
+
readonly targetAgentId: Schema.brand<Schema.NonEmptyString, "@effect-agent/core/AgentId">;
|
|
971
|
+
readonly threadId: Schema.brand<Schema.NonEmptyString, "@effect-agent/core/ThreadId">;
|
|
972
|
+
}>>;
|
|
973
|
+
readonly delivery: Schema.Union<readonly [Schema.Struct<{
|
|
974
|
+
readonly message: Schema.Struct<{
|
|
975
|
+
readonly ownerThreadId: Schema.brand<Schema.NonEmptyString, "@effect-agent/core/ThreadId">;
|
|
976
|
+
readonly messageId: Schema.brand<Schema.NonEmptyString, "@effect-agent/thread/IdempotencyKey">;
|
|
977
|
+
}>;
|
|
978
|
+
readonly status: Schema.Literal<"pending">;
|
|
979
|
+
readonly receipt: Schema.Null;
|
|
980
|
+
readonly settlement: Schema.Null;
|
|
981
|
+
readonly reason: Schema.NullOr<Schema.NonEmptyString>;
|
|
982
|
+
}>, Schema.Struct<{
|
|
983
|
+
readonly message: Schema.Struct<{
|
|
984
|
+
readonly ownerThreadId: Schema.brand<Schema.NonEmptyString, "@effect-agent/core/ThreadId">;
|
|
985
|
+
readonly messageId: Schema.brand<Schema.NonEmptyString, "@effect-agent/thread/IdempotencyKey">;
|
|
986
|
+
}>;
|
|
987
|
+
readonly status: Schema.Literal<"accepted">;
|
|
988
|
+
readonly receipt: typeof Receipt;
|
|
989
|
+
readonly settlement: Schema.Null;
|
|
990
|
+
readonly reason: Schema.NullOr<Schema.NonEmptyString>;
|
|
991
|
+
}>, Schema.Struct<{
|
|
992
|
+
readonly message: Schema.Struct<{
|
|
993
|
+
readonly ownerThreadId: Schema.brand<Schema.NonEmptyString, "@effect-agent/core/ThreadId">;
|
|
994
|
+
readonly messageId: Schema.brand<Schema.NonEmptyString, "@effect-agent/thread/IdempotencyKey">;
|
|
995
|
+
}>;
|
|
996
|
+
readonly status: Schema.Literal<"processed">;
|
|
997
|
+
readonly receipt: typeof Receipt;
|
|
998
|
+
readonly settlement: Schema.Struct<{
|
|
999
|
+
readonly settlementId: Schema.brand<Schema.NonEmptyString, "@effect-agent/core/SettlementId">;
|
|
1000
|
+
readonly outcome: Schema.Literals<readonly ["completed", "failed", "aborted"]>;
|
|
1001
|
+
}>;
|
|
1002
|
+
readonly reason: Schema.Null;
|
|
1003
|
+
}>, Schema.Struct<{
|
|
1004
|
+
readonly message: Schema.Struct<{
|
|
1005
|
+
readonly ownerThreadId: Schema.brand<Schema.NonEmptyString, "@effect-agent/core/ThreadId">;
|
|
1006
|
+
readonly messageId: Schema.brand<Schema.NonEmptyString, "@effect-agent/thread/IdempotencyKey">;
|
|
1007
|
+
}>;
|
|
1008
|
+
readonly status: Schema.Literal<"refused">;
|
|
1009
|
+
readonly receipt: Schema.Null;
|
|
1010
|
+
readonly settlement: Schema.Null;
|
|
1011
|
+
readonly reason: Schema.NonEmptyString;
|
|
1012
|
+
}>, Schema.Struct<{
|
|
1013
|
+
readonly message: Schema.Struct<{
|
|
1014
|
+
readonly ownerThreadId: Schema.brand<Schema.NonEmptyString, "@effect-agent/core/ThreadId">;
|
|
1015
|
+
readonly messageId: Schema.brand<Schema.NonEmptyString, "@effect-agent/thread/IdempotencyKey">;
|
|
1016
|
+
}>;
|
|
1017
|
+
readonly status: Schema.Literal<"parked">;
|
|
1018
|
+
readonly receipt: Schema.NullOr<typeof Receipt>;
|
|
1019
|
+
readonly settlement: Schema.Null;
|
|
1020
|
+
readonly reason: Schema.NonEmptyString;
|
|
1021
|
+
}>]>;
|
|
1022
|
+
}>;
|
|
1023
|
+
readonly failure: Schema.Union<readonly [Failure, typeof SubagentProjectionFailure, typeof SubagentPrestartDenied, typeof WorkerError]>;
|
|
1024
|
+
readonly failureMode: "error";
|
|
1025
|
+
}, CryptoDigest.Digest | SubagentHost>] extends (infer T) ? T extends [Tool.Tool<`${Name}_start`, {
|
|
1026
|
+
readonly parameters: Parameters;
|
|
1027
|
+
readonly success: Schema.Struct<{
|
|
1028
|
+
readonly worker: Schema.refine<{
|
|
1029
|
+
readonly schemaVersion: 1;
|
|
1030
|
+
readonly delegationId: string & Brand.Brand<"@effect-agent/core/DelegationId">;
|
|
1031
|
+
readonly targetAgentId: string & Brand.Brand<"@effect-agent/core/AgentId">;
|
|
1032
|
+
readonly threadId: string & Brand.Brand<"@effect-agent/core/ThreadId">;
|
|
1033
|
+
} & Brand.Brand<`@effect-agent/Worker/${Name}`>, Schema.Struct<{
|
|
1034
|
+
readonly schemaVersion: Schema.Literal<1>;
|
|
1035
|
+
readonly delegationId: Schema.brand<Schema.NonEmptyString, "@effect-agent/core/DelegationId">;
|
|
1036
|
+
readonly targetAgentId: Schema.brand<Schema.NonEmptyString, "@effect-agent/core/AgentId">;
|
|
1037
|
+
readonly threadId: Schema.brand<Schema.NonEmptyString, "@effect-agent/core/ThreadId">;
|
|
1038
|
+
}>>;
|
|
1039
|
+
readonly delivery: Schema.Union<readonly [Schema.Struct<{
|
|
1040
|
+
readonly message: Schema.Struct<{
|
|
1041
|
+
readonly ownerThreadId: Schema.brand<Schema.NonEmptyString, "@effect-agent/core/ThreadId">;
|
|
1042
|
+
readonly messageId: Schema.brand<Schema.NonEmptyString, "@effect-agent/thread/IdempotencyKey">;
|
|
1043
|
+
}>;
|
|
1044
|
+
readonly status: Schema.Literal<"pending">;
|
|
1045
|
+
readonly receipt: Schema.Null;
|
|
1046
|
+
readonly settlement: Schema.Null;
|
|
1047
|
+
readonly reason: Schema.NullOr<Schema.NonEmptyString>;
|
|
1048
|
+
}>, Schema.Struct<{
|
|
1049
|
+
readonly message: Schema.Struct<{
|
|
1050
|
+
readonly ownerThreadId: Schema.brand<Schema.NonEmptyString, "@effect-agent/core/ThreadId">;
|
|
1051
|
+
readonly messageId: Schema.brand<Schema.NonEmptyString, "@effect-agent/thread/IdempotencyKey">;
|
|
1052
|
+
}>;
|
|
1053
|
+
readonly status: Schema.Literal<"accepted">;
|
|
1054
|
+
readonly receipt: typeof Receipt;
|
|
1055
|
+
readonly settlement: Schema.Null;
|
|
1056
|
+
readonly reason: Schema.NullOr<Schema.NonEmptyString>;
|
|
1057
|
+
}>, Schema.Struct<{
|
|
1058
|
+
readonly message: Schema.Struct<{
|
|
1059
|
+
readonly ownerThreadId: Schema.brand<Schema.NonEmptyString, "@effect-agent/core/ThreadId">;
|
|
1060
|
+
readonly messageId: Schema.brand<Schema.NonEmptyString, "@effect-agent/thread/IdempotencyKey">;
|
|
1061
|
+
}>;
|
|
1062
|
+
readonly status: Schema.Literal<"processed">;
|
|
1063
|
+
readonly receipt: typeof Receipt;
|
|
1064
|
+
readonly settlement: Schema.Struct<{
|
|
1065
|
+
readonly settlementId: Schema.brand<Schema.NonEmptyString, "@effect-agent/core/SettlementId">;
|
|
1066
|
+
readonly outcome: Schema.Literals<readonly ["completed", "failed", "aborted"]>;
|
|
1067
|
+
}>;
|
|
1068
|
+
readonly reason: Schema.Null;
|
|
1069
|
+
}>, Schema.Struct<{
|
|
1070
|
+
readonly message: Schema.Struct<{
|
|
1071
|
+
readonly ownerThreadId: Schema.brand<Schema.NonEmptyString, "@effect-agent/core/ThreadId">;
|
|
1072
|
+
readonly messageId: Schema.brand<Schema.NonEmptyString, "@effect-agent/thread/IdempotencyKey">;
|
|
1073
|
+
}>;
|
|
1074
|
+
readonly status: Schema.Literal<"refused">;
|
|
1075
|
+
readonly receipt: Schema.Null;
|
|
1076
|
+
readonly settlement: Schema.Null;
|
|
1077
|
+
readonly reason: Schema.NonEmptyString;
|
|
1078
|
+
}>, Schema.Struct<{
|
|
1079
|
+
readonly message: Schema.Struct<{
|
|
1080
|
+
readonly ownerThreadId: Schema.brand<Schema.NonEmptyString, "@effect-agent/core/ThreadId">;
|
|
1081
|
+
readonly messageId: Schema.brand<Schema.NonEmptyString, "@effect-agent/thread/IdempotencyKey">;
|
|
1082
|
+
}>;
|
|
1083
|
+
readonly status: Schema.Literal<"parked">;
|
|
1084
|
+
readonly receipt: Schema.NullOr<typeof Receipt>;
|
|
1085
|
+
readonly settlement: Schema.Null;
|
|
1086
|
+
readonly reason: Schema.NonEmptyString;
|
|
1087
|
+
}>]>;
|
|
1088
|
+
}>;
|
|
1089
|
+
readonly failure: Schema.Union<readonly [Failure, typeof SubagentProjectionFailure, typeof SubagentPrestartDenied, typeof WorkerError]>;
|
|
1090
|
+
readonly failureMode: "error";
|
|
1091
|
+
}, CryptoDigest.Digest | SubagentHost>] ? T extends readonly Tool.Any[] ? { readonly [Tool in T[number] as Tool["name"]]: Tool; } : never : never : never>, never, Exclude<Prepare, import("effect/Scope").Scope> | Exclude<Input["EncodingServices"], import("effect/Scope").Scope> | Exclude<Parameters["EncodingServices"], import("effect/Scope").Scope>>;
|
|
1092
|
+
}>;
|
|
1093
|
+
/** Retain follow-up input for an existing worker under the current Tool Call's identity. */
|
|
1094
|
+
declare const followUpTool: <const Name extends string, Input extends Schema.Top, Output extends Schema.Top, Parameters extends Schema.Top, Success extends Schema.Top, Failure extends Schema.Top, Prepare, Project>(declaration: Declaration<Name, Input, Output, Parameters, Success, Failure, Prepare, Project>) => Readonly<{
|
|
1095
|
+
tool: Tool.Tool<`${Name}_follow_up`, {
|
|
1096
|
+
readonly parameters: Schema.Struct<{
|
|
1097
|
+
readonly worker: Schema.refine<{
|
|
1098
|
+
readonly schemaVersion: 1;
|
|
1099
|
+
readonly delegationId: string & Brand.Brand<"@effect-agent/core/DelegationId">;
|
|
1100
|
+
readonly targetAgentId: string & Brand.Brand<"@effect-agent/core/AgentId">;
|
|
1101
|
+
readonly threadId: string & Brand.Brand<"@effect-agent/core/ThreadId">;
|
|
1102
|
+
} & Brand.Brand<`@effect-agent/Worker/${Name}`>, Schema.Struct<{
|
|
1103
|
+
readonly schemaVersion: Schema.Literal<1>;
|
|
1104
|
+
readonly delegationId: Schema.brand<Schema.NonEmptyString, "@effect-agent/core/DelegationId">;
|
|
1105
|
+
readonly targetAgentId: Schema.brand<Schema.NonEmptyString, "@effect-agent/core/AgentId">;
|
|
1106
|
+
readonly threadId: Schema.brand<Schema.NonEmptyString, "@effect-agent/core/ThreadId">;
|
|
1107
|
+
}>>;
|
|
1108
|
+
readonly parameters: Schema.Union<readonly [Parameters]>;
|
|
1109
|
+
}>;
|
|
1110
|
+
readonly success: Schema.Union<readonly [Schema.Struct<{
|
|
1111
|
+
readonly message: Schema.Struct<{
|
|
1112
|
+
readonly ownerThreadId: Schema.brand<Schema.NonEmptyString, "@effect-agent/core/ThreadId">;
|
|
1113
|
+
readonly messageId: Schema.brand<Schema.NonEmptyString, "@effect-agent/thread/IdempotencyKey">;
|
|
1114
|
+
}>;
|
|
1115
|
+
readonly status: Schema.Literal<"pending">;
|
|
1116
|
+
readonly receipt: Schema.Null;
|
|
1117
|
+
readonly settlement: Schema.Null;
|
|
1118
|
+
readonly reason: Schema.NullOr<Schema.NonEmptyString>;
|
|
1119
|
+
}>, Schema.Struct<{
|
|
1120
|
+
readonly message: Schema.Struct<{
|
|
1121
|
+
readonly ownerThreadId: Schema.brand<Schema.NonEmptyString, "@effect-agent/core/ThreadId">;
|
|
1122
|
+
readonly messageId: Schema.brand<Schema.NonEmptyString, "@effect-agent/thread/IdempotencyKey">;
|
|
1123
|
+
}>;
|
|
1124
|
+
readonly status: Schema.Literal<"accepted">;
|
|
1125
|
+
readonly receipt: typeof Receipt;
|
|
1126
|
+
readonly settlement: Schema.Null;
|
|
1127
|
+
readonly reason: Schema.NullOr<Schema.NonEmptyString>;
|
|
1128
|
+
}>, Schema.Struct<{
|
|
1129
|
+
readonly message: Schema.Struct<{
|
|
1130
|
+
readonly ownerThreadId: Schema.brand<Schema.NonEmptyString, "@effect-agent/core/ThreadId">;
|
|
1131
|
+
readonly messageId: Schema.brand<Schema.NonEmptyString, "@effect-agent/thread/IdempotencyKey">;
|
|
1132
|
+
}>;
|
|
1133
|
+
readonly status: Schema.Literal<"processed">;
|
|
1134
|
+
readonly receipt: typeof Receipt;
|
|
1135
|
+
readonly settlement: Schema.Struct<{
|
|
1136
|
+
readonly settlementId: Schema.brand<Schema.NonEmptyString, "@effect-agent/core/SettlementId">;
|
|
1137
|
+
readonly outcome: Schema.Literals<readonly ["completed", "failed", "aborted"]>;
|
|
1138
|
+
}>;
|
|
1139
|
+
readonly reason: Schema.Null;
|
|
1140
|
+
}>, Schema.Struct<{
|
|
1141
|
+
readonly message: Schema.Struct<{
|
|
1142
|
+
readonly ownerThreadId: Schema.brand<Schema.NonEmptyString, "@effect-agent/core/ThreadId">;
|
|
1143
|
+
readonly messageId: Schema.brand<Schema.NonEmptyString, "@effect-agent/thread/IdempotencyKey">;
|
|
1144
|
+
}>;
|
|
1145
|
+
readonly status: Schema.Literal<"refused">;
|
|
1146
|
+
readonly receipt: Schema.Null;
|
|
1147
|
+
readonly settlement: Schema.Null;
|
|
1148
|
+
readonly reason: Schema.NonEmptyString;
|
|
1149
|
+
}>, Schema.Struct<{
|
|
1150
|
+
readonly message: Schema.Struct<{
|
|
1151
|
+
readonly ownerThreadId: Schema.brand<Schema.NonEmptyString, "@effect-agent/core/ThreadId">;
|
|
1152
|
+
readonly messageId: Schema.brand<Schema.NonEmptyString, "@effect-agent/thread/IdempotencyKey">;
|
|
1153
|
+
}>;
|
|
1154
|
+
readonly status: Schema.Literal<"parked">;
|
|
1155
|
+
readonly receipt: Schema.NullOr<typeof Receipt>;
|
|
1156
|
+
readonly settlement: Schema.Null;
|
|
1157
|
+
readonly reason: Schema.NonEmptyString;
|
|
1158
|
+
}>]>;
|
|
1159
|
+
readonly failure: Schema.Union<readonly [Failure, typeof SubagentProjectionFailure, typeof WorkerError]>;
|
|
1160
|
+
readonly failureMode: "error";
|
|
1161
|
+
}, CryptoDigest.Digest | SubagentHost>;
|
|
1162
|
+
layer: import("effect/Layer").Layer<Tool.HandlersFor<[Tool.Tool<`${Name}_follow_up`, {
|
|
1163
|
+
readonly parameters: Schema.Struct<{
|
|
1164
|
+
readonly worker: Schema.refine<{
|
|
1165
|
+
readonly schemaVersion: 1;
|
|
1166
|
+
readonly delegationId: string & Brand.Brand<"@effect-agent/core/DelegationId">;
|
|
1167
|
+
readonly targetAgentId: string & Brand.Brand<"@effect-agent/core/AgentId">;
|
|
1168
|
+
readonly threadId: string & Brand.Brand<"@effect-agent/core/ThreadId">;
|
|
1169
|
+
} & Brand.Brand<`@effect-agent/Worker/${Name}`>, Schema.Struct<{
|
|
1170
|
+
readonly schemaVersion: Schema.Literal<1>;
|
|
1171
|
+
readonly delegationId: Schema.brand<Schema.NonEmptyString, "@effect-agent/core/DelegationId">;
|
|
1172
|
+
readonly targetAgentId: Schema.brand<Schema.NonEmptyString, "@effect-agent/core/AgentId">;
|
|
1173
|
+
readonly threadId: Schema.brand<Schema.NonEmptyString, "@effect-agent/core/ThreadId">;
|
|
1174
|
+
}>>;
|
|
1175
|
+
readonly parameters: Schema.Union<readonly [Parameters]>;
|
|
1176
|
+
}>;
|
|
1177
|
+
readonly success: Schema.Union<readonly [Schema.Struct<{
|
|
1178
|
+
readonly message: Schema.Struct<{
|
|
1179
|
+
readonly ownerThreadId: Schema.brand<Schema.NonEmptyString, "@effect-agent/core/ThreadId">;
|
|
1180
|
+
readonly messageId: Schema.brand<Schema.NonEmptyString, "@effect-agent/thread/IdempotencyKey">;
|
|
1181
|
+
}>;
|
|
1182
|
+
readonly status: Schema.Literal<"pending">;
|
|
1183
|
+
readonly receipt: Schema.Null;
|
|
1184
|
+
readonly settlement: Schema.Null;
|
|
1185
|
+
readonly reason: Schema.NullOr<Schema.NonEmptyString>;
|
|
1186
|
+
}>, Schema.Struct<{
|
|
1187
|
+
readonly message: Schema.Struct<{
|
|
1188
|
+
readonly ownerThreadId: Schema.brand<Schema.NonEmptyString, "@effect-agent/core/ThreadId">;
|
|
1189
|
+
readonly messageId: Schema.brand<Schema.NonEmptyString, "@effect-agent/thread/IdempotencyKey">;
|
|
1190
|
+
}>;
|
|
1191
|
+
readonly status: Schema.Literal<"accepted">;
|
|
1192
|
+
readonly receipt: typeof Receipt;
|
|
1193
|
+
readonly settlement: Schema.Null;
|
|
1194
|
+
readonly reason: Schema.NullOr<Schema.NonEmptyString>;
|
|
1195
|
+
}>, Schema.Struct<{
|
|
1196
|
+
readonly message: Schema.Struct<{
|
|
1197
|
+
readonly ownerThreadId: Schema.brand<Schema.NonEmptyString, "@effect-agent/core/ThreadId">;
|
|
1198
|
+
readonly messageId: Schema.brand<Schema.NonEmptyString, "@effect-agent/thread/IdempotencyKey">;
|
|
1199
|
+
}>;
|
|
1200
|
+
readonly status: Schema.Literal<"processed">;
|
|
1201
|
+
readonly receipt: typeof Receipt;
|
|
1202
|
+
readonly settlement: Schema.Struct<{
|
|
1203
|
+
readonly settlementId: Schema.brand<Schema.NonEmptyString, "@effect-agent/core/SettlementId">;
|
|
1204
|
+
readonly outcome: Schema.Literals<readonly ["completed", "failed", "aborted"]>;
|
|
1205
|
+
}>;
|
|
1206
|
+
readonly reason: Schema.Null;
|
|
1207
|
+
}>, Schema.Struct<{
|
|
1208
|
+
readonly message: Schema.Struct<{
|
|
1209
|
+
readonly ownerThreadId: Schema.brand<Schema.NonEmptyString, "@effect-agent/core/ThreadId">;
|
|
1210
|
+
readonly messageId: Schema.brand<Schema.NonEmptyString, "@effect-agent/thread/IdempotencyKey">;
|
|
1211
|
+
}>;
|
|
1212
|
+
readonly status: Schema.Literal<"refused">;
|
|
1213
|
+
readonly receipt: Schema.Null;
|
|
1214
|
+
readonly settlement: Schema.Null;
|
|
1215
|
+
readonly reason: Schema.NonEmptyString;
|
|
1216
|
+
}>, Schema.Struct<{
|
|
1217
|
+
readonly message: Schema.Struct<{
|
|
1218
|
+
readonly ownerThreadId: Schema.brand<Schema.NonEmptyString, "@effect-agent/core/ThreadId">;
|
|
1219
|
+
readonly messageId: Schema.brand<Schema.NonEmptyString, "@effect-agent/thread/IdempotencyKey">;
|
|
1220
|
+
}>;
|
|
1221
|
+
readonly status: Schema.Literal<"parked">;
|
|
1222
|
+
readonly receipt: Schema.NullOr<typeof Receipt>;
|
|
1223
|
+
readonly settlement: Schema.Null;
|
|
1224
|
+
readonly reason: Schema.NonEmptyString;
|
|
1225
|
+
}>]>;
|
|
1226
|
+
readonly failure: Schema.Union<readonly [Failure, typeof SubagentProjectionFailure, typeof WorkerError]>;
|
|
1227
|
+
readonly failureMode: "error";
|
|
1228
|
+
}, CryptoDigest.Digest | SubagentHost>] extends (infer T) ? T extends [Tool.Tool<`${Name}_follow_up`, {
|
|
1229
|
+
readonly parameters: Schema.Struct<{
|
|
1230
|
+
readonly worker: Schema.refine<{
|
|
1231
|
+
readonly schemaVersion: 1;
|
|
1232
|
+
readonly delegationId: string & Brand.Brand<"@effect-agent/core/DelegationId">;
|
|
1233
|
+
readonly targetAgentId: string & Brand.Brand<"@effect-agent/core/AgentId">;
|
|
1234
|
+
readonly threadId: string & Brand.Brand<"@effect-agent/core/ThreadId">;
|
|
1235
|
+
} & Brand.Brand<`@effect-agent/Worker/${Name}`>, Schema.Struct<{
|
|
1236
|
+
readonly schemaVersion: Schema.Literal<1>;
|
|
1237
|
+
readonly delegationId: Schema.brand<Schema.NonEmptyString, "@effect-agent/core/DelegationId">;
|
|
1238
|
+
readonly targetAgentId: Schema.brand<Schema.NonEmptyString, "@effect-agent/core/AgentId">;
|
|
1239
|
+
readonly threadId: Schema.brand<Schema.NonEmptyString, "@effect-agent/core/ThreadId">;
|
|
1240
|
+
}>>;
|
|
1241
|
+
readonly parameters: Schema.Union<readonly [Parameters]>;
|
|
1242
|
+
}>;
|
|
1243
|
+
readonly success: Schema.Union<readonly [Schema.Struct<{
|
|
1244
|
+
readonly message: Schema.Struct<{
|
|
1245
|
+
readonly ownerThreadId: Schema.brand<Schema.NonEmptyString, "@effect-agent/core/ThreadId">;
|
|
1246
|
+
readonly messageId: Schema.brand<Schema.NonEmptyString, "@effect-agent/thread/IdempotencyKey">;
|
|
1247
|
+
}>;
|
|
1248
|
+
readonly status: Schema.Literal<"pending">;
|
|
1249
|
+
readonly receipt: Schema.Null;
|
|
1250
|
+
readonly settlement: Schema.Null;
|
|
1251
|
+
readonly reason: Schema.NullOr<Schema.NonEmptyString>;
|
|
1252
|
+
}>, Schema.Struct<{
|
|
1253
|
+
readonly message: Schema.Struct<{
|
|
1254
|
+
readonly ownerThreadId: Schema.brand<Schema.NonEmptyString, "@effect-agent/core/ThreadId">;
|
|
1255
|
+
readonly messageId: Schema.brand<Schema.NonEmptyString, "@effect-agent/thread/IdempotencyKey">;
|
|
1256
|
+
}>;
|
|
1257
|
+
readonly status: Schema.Literal<"accepted">;
|
|
1258
|
+
readonly receipt: typeof Receipt;
|
|
1259
|
+
readonly settlement: Schema.Null;
|
|
1260
|
+
readonly reason: Schema.NullOr<Schema.NonEmptyString>;
|
|
1261
|
+
}>, Schema.Struct<{
|
|
1262
|
+
readonly message: Schema.Struct<{
|
|
1263
|
+
readonly ownerThreadId: Schema.brand<Schema.NonEmptyString, "@effect-agent/core/ThreadId">;
|
|
1264
|
+
readonly messageId: Schema.brand<Schema.NonEmptyString, "@effect-agent/thread/IdempotencyKey">;
|
|
1265
|
+
}>;
|
|
1266
|
+
readonly status: Schema.Literal<"processed">;
|
|
1267
|
+
readonly receipt: typeof Receipt;
|
|
1268
|
+
readonly settlement: Schema.Struct<{
|
|
1269
|
+
readonly settlementId: Schema.brand<Schema.NonEmptyString, "@effect-agent/core/SettlementId">;
|
|
1270
|
+
readonly outcome: Schema.Literals<readonly ["completed", "failed", "aborted"]>;
|
|
1271
|
+
}>;
|
|
1272
|
+
readonly reason: Schema.Null;
|
|
1273
|
+
}>, Schema.Struct<{
|
|
1274
|
+
readonly message: Schema.Struct<{
|
|
1275
|
+
readonly ownerThreadId: Schema.brand<Schema.NonEmptyString, "@effect-agent/core/ThreadId">;
|
|
1276
|
+
readonly messageId: Schema.brand<Schema.NonEmptyString, "@effect-agent/thread/IdempotencyKey">;
|
|
1277
|
+
}>;
|
|
1278
|
+
readonly status: Schema.Literal<"refused">;
|
|
1279
|
+
readonly receipt: Schema.Null;
|
|
1280
|
+
readonly settlement: Schema.Null;
|
|
1281
|
+
readonly reason: Schema.NonEmptyString;
|
|
1282
|
+
}>, Schema.Struct<{
|
|
1283
|
+
readonly message: Schema.Struct<{
|
|
1284
|
+
readonly ownerThreadId: Schema.brand<Schema.NonEmptyString, "@effect-agent/core/ThreadId">;
|
|
1285
|
+
readonly messageId: Schema.brand<Schema.NonEmptyString, "@effect-agent/thread/IdempotencyKey">;
|
|
1286
|
+
}>;
|
|
1287
|
+
readonly status: Schema.Literal<"parked">;
|
|
1288
|
+
readonly receipt: Schema.NullOr<typeof Receipt>;
|
|
1289
|
+
readonly settlement: Schema.Null;
|
|
1290
|
+
readonly reason: Schema.NonEmptyString;
|
|
1291
|
+
}>]>;
|
|
1292
|
+
readonly failure: Schema.Union<readonly [Failure, typeof SubagentProjectionFailure, typeof WorkerError]>;
|
|
1293
|
+
readonly failureMode: "error";
|
|
1294
|
+
}, CryptoDigest.Digest | SubagentHost>] ? T extends readonly Tool.Any[] ? { readonly [Tool in T[number] as Tool["name"]]: Tool; } : never : never : never>, never, Exclude<Prepare, import("effect/Scope").Scope> | Exclude<Input["EncodingServices"], import("effect/Scope").Scope> | Exclude<Parameters["EncodingServices"], import("effect/Scope").Scope>>;
|
|
1295
|
+
}>;
|
|
1296
|
+
/** Inspect one delivery or accepted Receipt without resending input. */
|
|
1297
|
+
declare const inspectTool: <const Name extends string, Input extends Schema.Top, Output extends Schema.Top, Parameters extends Schema.Top, Success extends Schema.Top, Failure extends Schema.Top, Prepare, Project>(declaration: Declaration<Name, Input, Output, Parameters, Success, Failure, Prepare, Project>) => Readonly<{
|
|
1298
|
+
tool: Tool.Tool<`${Name}_inspect`, {
|
|
1299
|
+
readonly parameters: Schema.Struct<{
|
|
1300
|
+
readonly worker: Schema.refine<{
|
|
1301
|
+
readonly schemaVersion: 1;
|
|
1302
|
+
readonly delegationId: string & Brand.Brand<"@effect-agent/core/DelegationId">;
|
|
1303
|
+
readonly targetAgentId: string & Brand.Brand<"@effect-agent/core/AgentId">;
|
|
1304
|
+
readonly threadId: string & Brand.Brand<"@effect-agent/core/ThreadId">;
|
|
1305
|
+
} & Brand.Brand<`@effect-agent/Worker/${Name}`>, Schema.Struct<{
|
|
1306
|
+
readonly schemaVersion: Schema.Literal<1>;
|
|
1307
|
+
readonly delegationId: Schema.brand<Schema.NonEmptyString, "@effect-agent/core/DelegationId">;
|
|
1308
|
+
readonly targetAgentId: Schema.brand<Schema.NonEmptyString, "@effect-agent/core/AgentId">;
|
|
1309
|
+
readonly threadId: Schema.brand<Schema.NonEmptyString, "@effect-agent/core/ThreadId">;
|
|
1310
|
+
}>>;
|
|
1311
|
+
readonly message: Schema.optionalKey<Schema.Struct<{
|
|
1312
|
+
readonly ownerThreadId: Schema.brand<Schema.NonEmptyString, "@effect-agent/core/ThreadId">;
|
|
1313
|
+
readonly messageId: Schema.brand<Schema.NonEmptyString, "@effect-agent/thread/IdempotencyKey">;
|
|
1314
|
+
}>>;
|
|
1315
|
+
readonly receipt: Schema.optionalKey<typeof Receipt>;
|
|
1316
|
+
}>;
|
|
1317
|
+
readonly success: Schema.Union<readonly [Schema.Union<readonly [Schema.Struct<{
|
|
1318
|
+
readonly message: Schema.Struct<{
|
|
1319
|
+
readonly ownerThreadId: Schema.brand<Schema.NonEmptyString, "@effect-agent/core/ThreadId">;
|
|
1320
|
+
readonly messageId: Schema.brand<Schema.NonEmptyString, "@effect-agent/thread/IdempotencyKey">;
|
|
1321
|
+
}>;
|
|
1322
|
+
readonly status: Schema.Literal<"pending">;
|
|
1323
|
+
readonly receipt: Schema.Null;
|
|
1324
|
+
readonly settlement: Schema.Null;
|
|
1325
|
+
readonly reason: Schema.NullOr<Schema.NonEmptyString>;
|
|
1326
|
+
}>, Schema.Struct<{
|
|
1327
|
+
readonly message: Schema.Struct<{
|
|
1328
|
+
readonly ownerThreadId: Schema.brand<Schema.NonEmptyString, "@effect-agent/core/ThreadId">;
|
|
1329
|
+
readonly messageId: Schema.brand<Schema.NonEmptyString, "@effect-agent/thread/IdempotencyKey">;
|
|
1330
|
+
}>;
|
|
1331
|
+
readonly status: Schema.Literal<"accepted">;
|
|
1332
|
+
readonly receipt: typeof Receipt;
|
|
1333
|
+
readonly settlement: Schema.Null;
|
|
1334
|
+
readonly reason: Schema.NullOr<Schema.NonEmptyString>;
|
|
1335
|
+
}>, Schema.Struct<{
|
|
1336
|
+
readonly message: Schema.Struct<{
|
|
1337
|
+
readonly ownerThreadId: Schema.brand<Schema.NonEmptyString, "@effect-agent/core/ThreadId">;
|
|
1338
|
+
readonly messageId: Schema.brand<Schema.NonEmptyString, "@effect-agent/thread/IdempotencyKey">;
|
|
1339
|
+
}>;
|
|
1340
|
+
readonly status: Schema.Literal<"processed">;
|
|
1341
|
+
readonly receipt: typeof Receipt;
|
|
1342
|
+
readonly settlement: Schema.Struct<{
|
|
1343
|
+
readonly settlementId: Schema.brand<Schema.NonEmptyString, "@effect-agent/core/SettlementId">;
|
|
1344
|
+
readonly outcome: Schema.Literals<readonly ["completed", "failed", "aborted"]>;
|
|
1345
|
+
}>;
|
|
1346
|
+
readonly reason: Schema.Null;
|
|
1347
|
+
}>, Schema.Struct<{
|
|
1348
|
+
readonly message: Schema.Struct<{
|
|
1349
|
+
readonly ownerThreadId: Schema.brand<Schema.NonEmptyString, "@effect-agent/core/ThreadId">;
|
|
1350
|
+
readonly messageId: Schema.brand<Schema.NonEmptyString, "@effect-agent/thread/IdempotencyKey">;
|
|
1351
|
+
}>;
|
|
1352
|
+
readonly status: Schema.Literal<"refused">;
|
|
1353
|
+
readonly receipt: Schema.Null;
|
|
1354
|
+
readonly settlement: Schema.Null;
|
|
1355
|
+
readonly reason: Schema.NonEmptyString;
|
|
1356
|
+
}>, Schema.Struct<{
|
|
1357
|
+
readonly message: Schema.Struct<{
|
|
1358
|
+
readonly ownerThreadId: Schema.brand<Schema.NonEmptyString, "@effect-agent/core/ThreadId">;
|
|
1359
|
+
readonly messageId: Schema.brand<Schema.NonEmptyString, "@effect-agent/thread/IdempotencyKey">;
|
|
1360
|
+
}>;
|
|
1361
|
+
readonly status: Schema.Literal<"parked">;
|
|
1362
|
+
readonly receipt: Schema.NullOr<typeof Receipt>;
|
|
1363
|
+
readonly settlement: Schema.Null;
|
|
1364
|
+
readonly reason: Schema.NonEmptyString;
|
|
1365
|
+
}>]>, Schema.Union<readonly [Schema.TaggedStruct<"Pending", {
|
|
1366
|
+
readonly receipt: typeof Receipt;
|
|
1367
|
+
}>, Schema.TaggedStruct<"Settled", {
|
|
1368
|
+
readonly receipt: typeof Receipt;
|
|
1369
|
+
readonly runId: Schema.brand<Schema.NonEmptyString, "@effect-agent/core/RunId">;
|
|
1370
|
+
readonly settlementId: Schema.brand<Schema.NonEmptyString, "@effect-agent/core/SettlementId">;
|
|
1371
|
+
readonly outcome: Schema.Literal<"completed">;
|
|
1372
|
+
readonly result: Success;
|
|
1373
|
+
}>, Schema.TaggedStruct<"Settled", {
|
|
1374
|
+
readonly receipt: typeof Receipt;
|
|
1375
|
+
readonly runId: Schema.optionalKey<Schema.brand<Schema.NonEmptyString, "@effect-agent/core/RunId">>;
|
|
1376
|
+
readonly settlementId: Schema.brand<Schema.NonEmptyString, "@effect-agent/core/SettlementId">;
|
|
1377
|
+
readonly outcome: Schema.Literals<readonly ["failed", "aborted"]>;
|
|
1378
|
+
readonly failure: typeof SubagentExecutionFailure;
|
|
1379
|
+
}>]>]>;
|
|
1380
|
+
readonly failure: Schema.Union<readonly [Failure, typeof SubagentProjectionFailure, typeof WorkerError]>;
|
|
1381
|
+
readonly failureMode: "error";
|
|
1382
|
+
}, SubagentHost>;
|
|
1383
|
+
layer: import("effect/Layer").Layer<Tool.HandlersFor<[Tool.Tool<`${Name}_inspect`, {
|
|
1384
|
+
readonly parameters: Schema.Struct<{
|
|
1385
|
+
readonly worker: Schema.refine<{
|
|
1386
|
+
readonly schemaVersion: 1;
|
|
1387
|
+
readonly delegationId: string & Brand.Brand<"@effect-agent/core/DelegationId">;
|
|
1388
|
+
readonly targetAgentId: string & Brand.Brand<"@effect-agent/core/AgentId">;
|
|
1389
|
+
readonly threadId: string & Brand.Brand<"@effect-agent/core/ThreadId">;
|
|
1390
|
+
} & Brand.Brand<`@effect-agent/Worker/${Name}`>, Schema.Struct<{
|
|
1391
|
+
readonly schemaVersion: Schema.Literal<1>;
|
|
1392
|
+
readonly delegationId: Schema.brand<Schema.NonEmptyString, "@effect-agent/core/DelegationId">;
|
|
1393
|
+
readonly targetAgentId: Schema.brand<Schema.NonEmptyString, "@effect-agent/core/AgentId">;
|
|
1394
|
+
readonly threadId: Schema.brand<Schema.NonEmptyString, "@effect-agent/core/ThreadId">;
|
|
1395
|
+
}>>;
|
|
1396
|
+
readonly message: Schema.optionalKey<Schema.Struct<{
|
|
1397
|
+
readonly ownerThreadId: Schema.brand<Schema.NonEmptyString, "@effect-agent/core/ThreadId">;
|
|
1398
|
+
readonly messageId: Schema.brand<Schema.NonEmptyString, "@effect-agent/thread/IdempotencyKey">;
|
|
1399
|
+
}>>;
|
|
1400
|
+
readonly receipt: Schema.optionalKey<typeof Receipt>;
|
|
1401
|
+
}>;
|
|
1402
|
+
readonly success: Schema.Union<readonly [Schema.Union<readonly [Schema.Struct<{
|
|
1403
|
+
readonly message: Schema.Struct<{
|
|
1404
|
+
readonly ownerThreadId: Schema.brand<Schema.NonEmptyString, "@effect-agent/core/ThreadId">;
|
|
1405
|
+
readonly messageId: Schema.brand<Schema.NonEmptyString, "@effect-agent/thread/IdempotencyKey">;
|
|
1406
|
+
}>;
|
|
1407
|
+
readonly status: Schema.Literal<"pending">;
|
|
1408
|
+
readonly receipt: Schema.Null;
|
|
1409
|
+
readonly settlement: Schema.Null;
|
|
1410
|
+
readonly reason: Schema.NullOr<Schema.NonEmptyString>;
|
|
1411
|
+
}>, Schema.Struct<{
|
|
1412
|
+
readonly message: Schema.Struct<{
|
|
1413
|
+
readonly ownerThreadId: Schema.brand<Schema.NonEmptyString, "@effect-agent/core/ThreadId">;
|
|
1414
|
+
readonly messageId: Schema.brand<Schema.NonEmptyString, "@effect-agent/thread/IdempotencyKey">;
|
|
1415
|
+
}>;
|
|
1416
|
+
readonly status: Schema.Literal<"accepted">;
|
|
1417
|
+
readonly receipt: typeof Receipt;
|
|
1418
|
+
readonly settlement: Schema.Null;
|
|
1419
|
+
readonly reason: Schema.NullOr<Schema.NonEmptyString>;
|
|
1420
|
+
}>, Schema.Struct<{
|
|
1421
|
+
readonly message: Schema.Struct<{
|
|
1422
|
+
readonly ownerThreadId: Schema.brand<Schema.NonEmptyString, "@effect-agent/core/ThreadId">;
|
|
1423
|
+
readonly messageId: Schema.brand<Schema.NonEmptyString, "@effect-agent/thread/IdempotencyKey">;
|
|
1424
|
+
}>;
|
|
1425
|
+
readonly status: Schema.Literal<"processed">;
|
|
1426
|
+
readonly receipt: typeof Receipt;
|
|
1427
|
+
readonly settlement: Schema.Struct<{
|
|
1428
|
+
readonly settlementId: Schema.brand<Schema.NonEmptyString, "@effect-agent/core/SettlementId">;
|
|
1429
|
+
readonly outcome: Schema.Literals<readonly ["completed", "failed", "aborted"]>;
|
|
1430
|
+
}>;
|
|
1431
|
+
readonly reason: Schema.Null;
|
|
1432
|
+
}>, Schema.Struct<{
|
|
1433
|
+
readonly message: Schema.Struct<{
|
|
1434
|
+
readonly ownerThreadId: Schema.brand<Schema.NonEmptyString, "@effect-agent/core/ThreadId">;
|
|
1435
|
+
readonly messageId: Schema.brand<Schema.NonEmptyString, "@effect-agent/thread/IdempotencyKey">;
|
|
1436
|
+
}>;
|
|
1437
|
+
readonly status: Schema.Literal<"refused">;
|
|
1438
|
+
readonly receipt: Schema.Null;
|
|
1439
|
+
readonly settlement: Schema.Null;
|
|
1440
|
+
readonly reason: Schema.NonEmptyString;
|
|
1441
|
+
}>, Schema.Struct<{
|
|
1442
|
+
readonly message: Schema.Struct<{
|
|
1443
|
+
readonly ownerThreadId: Schema.brand<Schema.NonEmptyString, "@effect-agent/core/ThreadId">;
|
|
1444
|
+
readonly messageId: Schema.brand<Schema.NonEmptyString, "@effect-agent/thread/IdempotencyKey">;
|
|
1445
|
+
}>;
|
|
1446
|
+
readonly status: Schema.Literal<"parked">;
|
|
1447
|
+
readonly receipt: Schema.NullOr<typeof Receipt>;
|
|
1448
|
+
readonly settlement: Schema.Null;
|
|
1449
|
+
readonly reason: Schema.NonEmptyString;
|
|
1450
|
+
}>]>, Schema.Union<readonly [Schema.TaggedStruct<"Pending", {
|
|
1451
|
+
readonly receipt: typeof Receipt;
|
|
1452
|
+
}>, Schema.TaggedStruct<"Settled", {
|
|
1453
|
+
readonly receipt: typeof Receipt;
|
|
1454
|
+
readonly runId: Schema.brand<Schema.NonEmptyString, "@effect-agent/core/RunId">;
|
|
1455
|
+
readonly settlementId: Schema.brand<Schema.NonEmptyString, "@effect-agent/core/SettlementId">;
|
|
1456
|
+
readonly outcome: Schema.Literal<"completed">;
|
|
1457
|
+
readonly result: Success;
|
|
1458
|
+
}>, Schema.TaggedStruct<"Settled", {
|
|
1459
|
+
readonly receipt: typeof Receipt;
|
|
1460
|
+
readonly runId: Schema.optionalKey<Schema.brand<Schema.NonEmptyString, "@effect-agent/core/RunId">>;
|
|
1461
|
+
readonly settlementId: Schema.brand<Schema.NonEmptyString, "@effect-agent/core/SettlementId">;
|
|
1462
|
+
readonly outcome: Schema.Literals<readonly ["failed", "aborted"]>;
|
|
1463
|
+
readonly failure: typeof SubagentExecutionFailure;
|
|
1464
|
+
}>]>]>;
|
|
1465
|
+
readonly failure: Schema.Union<readonly [Failure, typeof SubagentProjectionFailure, typeof WorkerError]>;
|
|
1466
|
+
readonly failureMode: "error";
|
|
1467
|
+
}, SubagentHost>] extends (infer T) ? T extends [Tool.Tool<`${Name}_inspect`, {
|
|
1468
|
+
readonly parameters: Schema.Struct<{
|
|
1469
|
+
readonly worker: Schema.refine<{
|
|
1470
|
+
readonly schemaVersion: 1;
|
|
1471
|
+
readonly delegationId: string & Brand.Brand<"@effect-agent/core/DelegationId">;
|
|
1472
|
+
readonly targetAgentId: string & Brand.Brand<"@effect-agent/core/AgentId">;
|
|
1473
|
+
readonly threadId: string & Brand.Brand<"@effect-agent/core/ThreadId">;
|
|
1474
|
+
} & Brand.Brand<`@effect-agent/Worker/${Name}`>, Schema.Struct<{
|
|
1475
|
+
readonly schemaVersion: Schema.Literal<1>;
|
|
1476
|
+
readonly delegationId: Schema.brand<Schema.NonEmptyString, "@effect-agent/core/DelegationId">;
|
|
1477
|
+
readonly targetAgentId: Schema.brand<Schema.NonEmptyString, "@effect-agent/core/AgentId">;
|
|
1478
|
+
readonly threadId: Schema.brand<Schema.NonEmptyString, "@effect-agent/core/ThreadId">;
|
|
1479
|
+
}>>;
|
|
1480
|
+
readonly message: Schema.optionalKey<Schema.Struct<{
|
|
1481
|
+
readonly ownerThreadId: Schema.brand<Schema.NonEmptyString, "@effect-agent/core/ThreadId">;
|
|
1482
|
+
readonly messageId: Schema.brand<Schema.NonEmptyString, "@effect-agent/thread/IdempotencyKey">;
|
|
1483
|
+
}>>;
|
|
1484
|
+
readonly receipt: Schema.optionalKey<typeof Receipt>;
|
|
1485
|
+
}>;
|
|
1486
|
+
readonly success: Schema.Union<readonly [Schema.Union<readonly [Schema.Struct<{
|
|
1487
|
+
readonly message: Schema.Struct<{
|
|
1488
|
+
readonly ownerThreadId: Schema.brand<Schema.NonEmptyString, "@effect-agent/core/ThreadId">;
|
|
1489
|
+
readonly messageId: Schema.brand<Schema.NonEmptyString, "@effect-agent/thread/IdempotencyKey">;
|
|
1490
|
+
}>;
|
|
1491
|
+
readonly status: Schema.Literal<"pending">;
|
|
1492
|
+
readonly receipt: Schema.Null;
|
|
1493
|
+
readonly settlement: Schema.Null;
|
|
1494
|
+
readonly reason: Schema.NullOr<Schema.NonEmptyString>;
|
|
1495
|
+
}>, Schema.Struct<{
|
|
1496
|
+
readonly message: Schema.Struct<{
|
|
1497
|
+
readonly ownerThreadId: Schema.brand<Schema.NonEmptyString, "@effect-agent/core/ThreadId">;
|
|
1498
|
+
readonly messageId: Schema.brand<Schema.NonEmptyString, "@effect-agent/thread/IdempotencyKey">;
|
|
1499
|
+
}>;
|
|
1500
|
+
readonly status: Schema.Literal<"accepted">;
|
|
1501
|
+
readonly receipt: typeof Receipt;
|
|
1502
|
+
readonly settlement: Schema.Null;
|
|
1503
|
+
readonly reason: Schema.NullOr<Schema.NonEmptyString>;
|
|
1504
|
+
}>, Schema.Struct<{
|
|
1505
|
+
readonly message: Schema.Struct<{
|
|
1506
|
+
readonly ownerThreadId: Schema.brand<Schema.NonEmptyString, "@effect-agent/core/ThreadId">;
|
|
1507
|
+
readonly messageId: Schema.brand<Schema.NonEmptyString, "@effect-agent/thread/IdempotencyKey">;
|
|
1508
|
+
}>;
|
|
1509
|
+
readonly status: Schema.Literal<"processed">;
|
|
1510
|
+
readonly receipt: typeof Receipt;
|
|
1511
|
+
readonly settlement: Schema.Struct<{
|
|
1512
|
+
readonly settlementId: Schema.brand<Schema.NonEmptyString, "@effect-agent/core/SettlementId">;
|
|
1513
|
+
readonly outcome: Schema.Literals<readonly ["completed", "failed", "aborted"]>;
|
|
1514
|
+
}>;
|
|
1515
|
+
readonly reason: Schema.Null;
|
|
1516
|
+
}>, Schema.Struct<{
|
|
1517
|
+
readonly message: Schema.Struct<{
|
|
1518
|
+
readonly ownerThreadId: Schema.brand<Schema.NonEmptyString, "@effect-agent/core/ThreadId">;
|
|
1519
|
+
readonly messageId: Schema.brand<Schema.NonEmptyString, "@effect-agent/thread/IdempotencyKey">;
|
|
1520
|
+
}>;
|
|
1521
|
+
readonly status: Schema.Literal<"refused">;
|
|
1522
|
+
readonly receipt: Schema.Null;
|
|
1523
|
+
readonly settlement: Schema.Null;
|
|
1524
|
+
readonly reason: Schema.NonEmptyString;
|
|
1525
|
+
}>, Schema.Struct<{
|
|
1526
|
+
readonly message: Schema.Struct<{
|
|
1527
|
+
readonly ownerThreadId: Schema.brand<Schema.NonEmptyString, "@effect-agent/core/ThreadId">;
|
|
1528
|
+
readonly messageId: Schema.brand<Schema.NonEmptyString, "@effect-agent/thread/IdempotencyKey">;
|
|
1529
|
+
}>;
|
|
1530
|
+
readonly status: Schema.Literal<"parked">;
|
|
1531
|
+
readonly receipt: Schema.NullOr<typeof Receipt>;
|
|
1532
|
+
readonly settlement: Schema.Null;
|
|
1533
|
+
readonly reason: Schema.NonEmptyString;
|
|
1534
|
+
}>]>, Schema.Union<readonly [Schema.TaggedStruct<"Pending", {
|
|
1535
|
+
readonly receipt: typeof Receipt;
|
|
1536
|
+
}>, Schema.TaggedStruct<"Settled", {
|
|
1537
|
+
readonly receipt: typeof Receipt;
|
|
1538
|
+
readonly runId: Schema.brand<Schema.NonEmptyString, "@effect-agent/core/RunId">;
|
|
1539
|
+
readonly settlementId: Schema.brand<Schema.NonEmptyString, "@effect-agent/core/SettlementId">;
|
|
1540
|
+
readonly outcome: Schema.Literal<"completed">;
|
|
1541
|
+
readonly result: Success;
|
|
1542
|
+
}>, Schema.TaggedStruct<"Settled", {
|
|
1543
|
+
readonly receipt: typeof Receipt;
|
|
1544
|
+
readonly runId: Schema.optionalKey<Schema.brand<Schema.NonEmptyString, "@effect-agent/core/RunId">>;
|
|
1545
|
+
readonly settlementId: Schema.brand<Schema.NonEmptyString, "@effect-agent/core/SettlementId">;
|
|
1546
|
+
readonly outcome: Schema.Literals<readonly ["failed", "aborted"]>;
|
|
1547
|
+
readonly failure: typeof SubagentExecutionFailure;
|
|
1548
|
+
}>]>]>;
|
|
1549
|
+
readonly failure: Schema.Union<readonly [Failure, typeof SubagentProjectionFailure, typeof WorkerError]>;
|
|
1550
|
+
readonly failureMode: "error";
|
|
1551
|
+
}, SubagentHost>] ? T extends readonly Tool.Any[] ? { readonly [Tool in T[number] as Tool["name"]]: Tool; } : never : never : never>, never, Exclude<Project, import("effect/Scope").Scope> | Exclude<Output["DecodingServices"], import("effect/Scope").Scope> | Exclude<Parameters["DecodingServices"], import("effect/Scope").Scope> | Exclude<Success["EncodingServices"], import("effect/Scope").Scope>>;
|
|
1552
|
+
}>;
|
|
1553
|
+
/** Inspect a continuing worker's state and latest accepted input. */
|
|
1554
|
+
declare const summaryTool: <const Name extends string, Input extends Schema.Top, Output extends Schema.Top, Parameters extends Schema.Top, Success extends Schema.Top, Failure extends Schema.Top, Prepare, Project>(declaration: Declaration<Name, Input, Output, Parameters, Success, Failure, Prepare, Project>) => Readonly<{
|
|
1555
|
+
tool: Tool.Tool<`${Name}_summary`, {
|
|
1556
|
+
readonly parameters: Schema.Struct<{
|
|
1557
|
+
readonly worker: Schema.refine<{
|
|
1558
|
+
readonly schemaVersion: 1;
|
|
1559
|
+
readonly delegationId: string & Brand.Brand<"@effect-agent/core/DelegationId">;
|
|
1560
|
+
readonly targetAgentId: string & Brand.Brand<"@effect-agent/core/AgentId">;
|
|
1561
|
+
readonly threadId: string & Brand.Brand<"@effect-agent/core/ThreadId">;
|
|
1562
|
+
} & Brand.Brand<`@effect-agent/Worker/${Name}`>, Schema.Struct<{
|
|
1563
|
+
readonly schemaVersion: Schema.Literal<1>;
|
|
1564
|
+
readonly delegationId: Schema.brand<Schema.NonEmptyString, "@effect-agent/core/DelegationId">;
|
|
1565
|
+
readonly targetAgentId: Schema.brand<Schema.NonEmptyString, "@effect-agent/core/AgentId">;
|
|
1566
|
+
readonly threadId: Schema.brand<Schema.NonEmptyString, "@effect-agent/core/ThreadId">;
|
|
1567
|
+
}>>;
|
|
1568
|
+
}>;
|
|
1569
|
+
readonly success: Schema.Struct<{
|
|
1570
|
+
readonly latestReceipt: Schema.NullOr<typeof Receipt>;
|
|
1571
|
+
readonly state: Schema.Literals<readonly ["starting", "active", "unknown", "idle", "stopping", "stopped", "completed", "failed", "cancelled"]>;
|
|
1572
|
+
readonly acceptedInput: Schema.NullOr<Schema.Struct<{
|
|
1573
|
+
readonly receipt: typeof Receipt;
|
|
1574
|
+
readonly messageId: Schema.brand<Schema.NonEmptyString, "@effect-agent/thread/IdempotencyKey">;
|
|
1575
|
+
}>>;
|
|
1576
|
+
readonly appliedInput: Schema.NullOr<Schema.Struct<{
|
|
1577
|
+
readonly receipt: typeof Receipt;
|
|
1578
|
+
readonly messageId: Schema.brand<Schema.NonEmptyString, "@effect-agent/thread/IdempotencyKey">;
|
|
1579
|
+
readonly runId: Schema.brand<Schema.NonEmptyString, "@effect-agent/core/RunId">;
|
|
1580
|
+
readonly sequence: Schema.Natural;
|
|
1581
|
+
}>>;
|
|
1582
|
+
readonly run: Schema.NullOr<Schema.Struct<{
|
|
1583
|
+
readonly runId: Schema.brand<Schema.NonEmptyString, "@effect-agent/core/RunId">;
|
|
1584
|
+
readonly hostReceipt: typeof Receipt;
|
|
1585
|
+
readonly outcome: Schema.NullOr<Schema.Literals<readonly ["completed", "failed", "aborted"]>>;
|
|
1586
|
+
readonly disposition: Schema.NullOr<Schema.Codec<Schema.Json, Schema.Json, never, never>>;
|
|
1587
|
+
}>>;
|
|
1588
|
+
readonly pendingDelivery: Schema.NullOr<Schema.Union<readonly [Schema.Struct<{
|
|
1589
|
+
readonly message: Schema.Struct<{
|
|
1590
|
+
readonly ownerThreadId: Schema.brand<Schema.NonEmptyString, "@effect-agent/core/ThreadId">;
|
|
1591
|
+
readonly messageId: Schema.brand<Schema.NonEmptyString, "@effect-agent/thread/IdempotencyKey">;
|
|
1592
|
+
}>;
|
|
1593
|
+
readonly status: Schema.Literal<"pending">;
|
|
1594
|
+
readonly receipt: Schema.Null;
|
|
1595
|
+
readonly settlement: Schema.Null;
|
|
1596
|
+
readonly reason: Schema.NullOr<Schema.NonEmptyString>;
|
|
1597
|
+
}>, Schema.Struct<{
|
|
1598
|
+
readonly message: Schema.Struct<{
|
|
1599
|
+
readonly ownerThreadId: Schema.brand<Schema.NonEmptyString, "@effect-agent/core/ThreadId">;
|
|
1600
|
+
readonly messageId: Schema.brand<Schema.NonEmptyString, "@effect-agent/thread/IdempotencyKey">;
|
|
1601
|
+
}>;
|
|
1602
|
+
readonly status: Schema.Literal<"accepted">;
|
|
1603
|
+
readonly receipt: typeof Receipt;
|
|
1604
|
+
readonly settlement: Schema.Null;
|
|
1605
|
+
readonly reason: Schema.NullOr<Schema.NonEmptyString>;
|
|
1606
|
+
}>, Schema.Struct<{
|
|
1607
|
+
readonly message: Schema.Struct<{
|
|
1608
|
+
readonly ownerThreadId: Schema.brand<Schema.NonEmptyString, "@effect-agent/core/ThreadId">;
|
|
1609
|
+
readonly messageId: Schema.brand<Schema.NonEmptyString, "@effect-agent/thread/IdempotencyKey">;
|
|
1610
|
+
}>;
|
|
1611
|
+
readonly status: Schema.Literal<"processed">;
|
|
1612
|
+
readonly receipt: typeof Receipt;
|
|
1613
|
+
readonly settlement: Schema.Struct<{
|
|
1614
|
+
readonly settlementId: Schema.brand<Schema.NonEmptyString, "@effect-agent/core/SettlementId">;
|
|
1615
|
+
readonly outcome: Schema.Literals<readonly ["completed", "failed", "aborted"]>;
|
|
1616
|
+
}>;
|
|
1617
|
+
readonly reason: Schema.Null;
|
|
1618
|
+
}>, Schema.Struct<{
|
|
1619
|
+
readonly message: Schema.Struct<{
|
|
1620
|
+
readonly ownerThreadId: Schema.brand<Schema.NonEmptyString, "@effect-agent/core/ThreadId">;
|
|
1621
|
+
readonly messageId: Schema.brand<Schema.NonEmptyString, "@effect-agent/thread/IdempotencyKey">;
|
|
1622
|
+
}>;
|
|
1623
|
+
readonly status: Schema.Literal<"refused">;
|
|
1624
|
+
readonly receipt: Schema.Null;
|
|
1625
|
+
readonly settlement: Schema.Null;
|
|
1626
|
+
readonly reason: Schema.NonEmptyString;
|
|
1627
|
+
}>, Schema.Struct<{
|
|
1628
|
+
readonly message: Schema.Struct<{
|
|
1629
|
+
readonly ownerThreadId: Schema.brand<Schema.NonEmptyString, "@effect-agent/core/ThreadId">;
|
|
1630
|
+
readonly messageId: Schema.brand<Schema.NonEmptyString, "@effect-agent/thread/IdempotencyKey">;
|
|
1631
|
+
}>;
|
|
1632
|
+
readonly status: Schema.Literal<"parked">;
|
|
1633
|
+
readonly receipt: Schema.NullOr<typeof Receipt>;
|
|
1634
|
+
readonly settlement: Schema.Null;
|
|
1635
|
+
readonly reason: Schema.NonEmptyString;
|
|
1636
|
+
}>]>>;
|
|
1637
|
+
readonly watermark: Schema.Struct<{
|
|
1638
|
+
readonly canonicalSequence: Schema.Natural;
|
|
1639
|
+
readonly acceptedQueueSequence: Schema.Natural;
|
|
1640
|
+
readonly pendingDeliveryVersion: Schema.NullOr<Schema.Natural>;
|
|
1641
|
+
}>;
|
|
1642
|
+
readonly worker: Schema.refine<{
|
|
1643
|
+
readonly schemaVersion: 1;
|
|
1644
|
+
readonly delegationId: string & Brand.Brand<"@effect-agent/core/DelegationId">;
|
|
1645
|
+
readonly targetAgentId: string & Brand.Brand<"@effect-agent/core/AgentId">;
|
|
1646
|
+
readonly threadId: string & Brand.Brand<"@effect-agent/core/ThreadId">;
|
|
1647
|
+
} & Brand.Brand<`@effect-agent/Worker/${Name}`>, Schema.Struct<{
|
|
1648
|
+
readonly schemaVersion: Schema.Literal<1>;
|
|
1649
|
+
readonly delegationId: Schema.brand<Schema.NonEmptyString, "@effect-agent/core/DelegationId">;
|
|
1650
|
+
readonly targetAgentId: Schema.brand<Schema.NonEmptyString, "@effect-agent/core/AgentId">;
|
|
1651
|
+
readonly threadId: Schema.brand<Schema.NonEmptyString, "@effect-agent/core/ThreadId">;
|
|
1652
|
+
}>>;
|
|
1653
|
+
}>;
|
|
1654
|
+
readonly failure: typeof WorkerError;
|
|
1655
|
+
readonly failureMode: "error";
|
|
1656
|
+
}, SubagentHost>;
|
|
1657
|
+
layer: import("effect/Layer").Layer<Tool.HandlersFor<{ readonly [Tool in Tool.Tool<`${Name}_summary`, {
|
|
1658
|
+
readonly parameters: Schema.Struct<{
|
|
1659
|
+
readonly worker: Schema.refine<{
|
|
1660
|
+
readonly schemaVersion: 1;
|
|
1661
|
+
readonly delegationId: string & Brand.Brand<"@effect-agent/core/DelegationId">;
|
|
1662
|
+
readonly targetAgentId: string & Brand.Brand<"@effect-agent/core/AgentId">;
|
|
1663
|
+
readonly threadId: string & Brand.Brand<"@effect-agent/core/ThreadId">;
|
|
1664
|
+
} & Brand.Brand<`@effect-agent/Worker/${Name}`>, Schema.Struct<{
|
|
1665
|
+
readonly schemaVersion: Schema.Literal<1>;
|
|
1666
|
+
readonly delegationId: Schema.brand<Schema.NonEmptyString, "@effect-agent/core/DelegationId">;
|
|
1667
|
+
readonly targetAgentId: Schema.brand<Schema.NonEmptyString, "@effect-agent/core/AgentId">;
|
|
1668
|
+
readonly threadId: Schema.brand<Schema.NonEmptyString, "@effect-agent/core/ThreadId">;
|
|
1669
|
+
}>>;
|
|
1670
|
+
}>;
|
|
1671
|
+
readonly success: Schema.Struct<{
|
|
1672
|
+
readonly latestReceipt: Schema.NullOr<typeof Receipt>;
|
|
1673
|
+
readonly state: Schema.Literals<readonly ["starting", "active", "unknown", "idle", "stopping", "stopped", "completed", "failed", "cancelled"]>;
|
|
1674
|
+
readonly acceptedInput: Schema.NullOr<Schema.Struct<{
|
|
1675
|
+
readonly receipt: typeof Receipt;
|
|
1676
|
+
readonly messageId: Schema.brand<Schema.NonEmptyString, "@effect-agent/thread/IdempotencyKey">;
|
|
1677
|
+
}>>;
|
|
1678
|
+
readonly appliedInput: Schema.NullOr<Schema.Struct<{
|
|
1679
|
+
readonly receipt: typeof Receipt;
|
|
1680
|
+
readonly messageId: Schema.brand<Schema.NonEmptyString, "@effect-agent/thread/IdempotencyKey">;
|
|
1681
|
+
readonly runId: Schema.brand<Schema.NonEmptyString, "@effect-agent/core/RunId">;
|
|
1682
|
+
readonly sequence: Schema.Natural;
|
|
1683
|
+
}>>;
|
|
1684
|
+
readonly run: Schema.NullOr<Schema.Struct<{
|
|
1685
|
+
readonly runId: Schema.brand<Schema.NonEmptyString, "@effect-agent/core/RunId">;
|
|
1686
|
+
readonly hostReceipt: typeof Receipt;
|
|
1687
|
+
readonly outcome: Schema.NullOr<Schema.Literals<readonly ["completed", "failed", "aborted"]>>;
|
|
1688
|
+
readonly disposition: Schema.NullOr<Schema.Codec<Schema.Json, Schema.Json, never, never>>;
|
|
1689
|
+
}>>;
|
|
1690
|
+
readonly pendingDelivery: Schema.NullOr<Schema.Union<readonly [Schema.Struct<{
|
|
1691
|
+
readonly message: Schema.Struct<{
|
|
1692
|
+
readonly ownerThreadId: Schema.brand<Schema.NonEmptyString, "@effect-agent/core/ThreadId">;
|
|
1693
|
+
readonly messageId: Schema.brand<Schema.NonEmptyString, "@effect-agent/thread/IdempotencyKey">;
|
|
1694
|
+
}>;
|
|
1695
|
+
readonly status: Schema.Literal<"pending">;
|
|
1696
|
+
readonly receipt: Schema.Null;
|
|
1697
|
+
readonly settlement: Schema.Null;
|
|
1698
|
+
readonly reason: Schema.NullOr<Schema.NonEmptyString>;
|
|
1699
|
+
}>, Schema.Struct<{
|
|
1700
|
+
readonly message: Schema.Struct<{
|
|
1701
|
+
readonly ownerThreadId: Schema.brand<Schema.NonEmptyString, "@effect-agent/core/ThreadId">;
|
|
1702
|
+
readonly messageId: Schema.brand<Schema.NonEmptyString, "@effect-agent/thread/IdempotencyKey">;
|
|
1703
|
+
}>;
|
|
1704
|
+
readonly status: Schema.Literal<"accepted">;
|
|
1705
|
+
readonly receipt: typeof Receipt;
|
|
1706
|
+
readonly settlement: Schema.Null;
|
|
1707
|
+
readonly reason: Schema.NullOr<Schema.NonEmptyString>;
|
|
1708
|
+
}>, Schema.Struct<{
|
|
1709
|
+
readonly message: Schema.Struct<{
|
|
1710
|
+
readonly ownerThreadId: Schema.brand<Schema.NonEmptyString, "@effect-agent/core/ThreadId">;
|
|
1711
|
+
readonly messageId: Schema.brand<Schema.NonEmptyString, "@effect-agent/thread/IdempotencyKey">;
|
|
1712
|
+
}>;
|
|
1713
|
+
readonly status: Schema.Literal<"processed">;
|
|
1714
|
+
readonly receipt: typeof Receipt;
|
|
1715
|
+
readonly settlement: Schema.Struct<{
|
|
1716
|
+
readonly settlementId: Schema.brand<Schema.NonEmptyString, "@effect-agent/core/SettlementId">;
|
|
1717
|
+
readonly outcome: Schema.Literals<readonly ["completed", "failed", "aborted"]>;
|
|
1718
|
+
}>;
|
|
1719
|
+
readonly reason: Schema.Null;
|
|
1720
|
+
}>, Schema.Struct<{
|
|
1721
|
+
readonly message: Schema.Struct<{
|
|
1722
|
+
readonly ownerThreadId: Schema.brand<Schema.NonEmptyString, "@effect-agent/core/ThreadId">;
|
|
1723
|
+
readonly messageId: Schema.brand<Schema.NonEmptyString, "@effect-agent/thread/IdempotencyKey">;
|
|
1724
|
+
}>;
|
|
1725
|
+
readonly status: Schema.Literal<"refused">;
|
|
1726
|
+
readonly receipt: Schema.Null;
|
|
1727
|
+
readonly settlement: Schema.Null;
|
|
1728
|
+
readonly reason: Schema.NonEmptyString;
|
|
1729
|
+
}>, Schema.Struct<{
|
|
1730
|
+
readonly message: Schema.Struct<{
|
|
1731
|
+
readonly ownerThreadId: Schema.brand<Schema.NonEmptyString, "@effect-agent/core/ThreadId">;
|
|
1732
|
+
readonly messageId: Schema.brand<Schema.NonEmptyString, "@effect-agent/thread/IdempotencyKey">;
|
|
1733
|
+
}>;
|
|
1734
|
+
readonly status: Schema.Literal<"parked">;
|
|
1735
|
+
readonly receipt: Schema.NullOr<typeof Receipt>;
|
|
1736
|
+
readonly settlement: Schema.Null;
|
|
1737
|
+
readonly reason: Schema.NonEmptyString;
|
|
1738
|
+
}>]>>;
|
|
1739
|
+
readonly watermark: Schema.Struct<{
|
|
1740
|
+
readonly canonicalSequence: Schema.Natural;
|
|
1741
|
+
readonly acceptedQueueSequence: Schema.Natural;
|
|
1742
|
+
readonly pendingDeliveryVersion: Schema.NullOr<Schema.Natural>;
|
|
1743
|
+
}>;
|
|
1744
|
+
readonly worker: Schema.refine<{
|
|
1745
|
+
readonly schemaVersion: 1;
|
|
1746
|
+
readonly delegationId: string & Brand.Brand<"@effect-agent/core/DelegationId">;
|
|
1747
|
+
readonly targetAgentId: string & Brand.Brand<"@effect-agent/core/AgentId">;
|
|
1748
|
+
readonly threadId: string & Brand.Brand<"@effect-agent/core/ThreadId">;
|
|
1749
|
+
} & Brand.Brand<`@effect-agent/Worker/${Name}`>, Schema.Struct<{
|
|
1750
|
+
readonly schemaVersion: Schema.Literal<1>;
|
|
1751
|
+
readonly delegationId: Schema.brand<Schema.NonEmptyString, "@effect-agent/core/DelegationId">;
|
|
1752
|
+
readonly targetAgentId: Schema.brand<Schema.NonEmptyString, "@effect-agent/core/AgentId">;
|
|
1753
|
+
readonly threadId: Schema.brand<Schema.NonEmptyString, "@effect-agent/core/ThreadId">;
|
|
1754
|
+
}>>;
|
|
1755
|
+
}>;
|
|
1756
|
+
readonly failure: typeof WorkerError;
|
|
1757
|
+
readonly failureMode: "error";
|
|
1758
|
+
}, SubagentHost> as Tool["name"]]: Tool; }>, never, never>;
|
|
1759
|
+
}>;
|
|
1760
|
+
/** List workers visible through the current caller's host facet. */
|
|
1761
|
+
declare const listTool: <const Name extends string, Input extends Schema.Top, Output extends Schema.Top, Parameters extends Schema.Top, Success extends Schema.Top, Failure extends Schema.Top, Prepare, Project>(declaration: Declaration<Name, Input, Output, Parameters, Success, Failure, Prepare, Project>) => Readonly<{
|
|
1762
|
+
tool: Tool.Tool<`${Name}_list`, {
|
|
1763
|
+
readonly parameters: Schema.Struct<{
|
|
1764
|
+
readonly limit: Schema.optionalKey<Schema.Int>;
|
|
1765
|
+
readonly after: Schema.optionalKey<Schema.brand<Schema.NonEmptyString, "@effect-agent/core/ThreadId">>;
|
|
1766
|
+
}>;
|
|
1767
|
+
readonly success: Schema.Struct<{
|
|
1768
|
+
readonly items: Schema.$Array<Schema.Struct<{
|
|
1769
|
+
readonly latestReceipt: Schema.NullOr<typeof Receipt>;
|
|
1770
|
+
readonly state: Schema.Literals<readonly ["starting", "active", "unknown", "idle", "stopping", "stopped", "completed", "failed", "cancelled"]>;
|
|
1771
|
+
readonly acceptedInput: Schema.NullOr<Schema.Struct<{
|
|
1772
|
+
readonly receipt: typeof Receipt;
|
|
1773
|
+
readonly messageId: Schema.brand<Schema.NonEmptyString, "@effect-agent/thread/IdempotencyKey">;
|
|
1774
|
+
}>>;
|
|
1775
|
+
readonly appliedInput: Schema.NullOr<Schema.Struct<{
|
|
1776
|
+
readonly receipt: typeof Receipt;
|
|
1777
|
+
readonly messageId: Schema.brand<Schema.NonEmptyString, "@effect-agent/thread/IdempotencyKey">;
|
|
1778
|
+
readonly runId: Schema.brand<Schema.NonEmptyString, "@effect-agent/core/RunId">;
|
|
1779
|
+
readonly sequence: Schema.Natural;
|
|
1780
|
+
}>>;
|
|
1781
|
+
readonly run: Schema.NullOr<Schema.Struct<{
|
|
1782
|
+
readonly runId: Schema.brand<Schema.NonEmptyString, "@effect-agent/core/RunId">;
|
|
1783
|
+
readonly hostReceipt: typeof Receipt;
|
|
1784
|
+
readonly outcome: Schema.NullOr<Schema.Literals<readonly ["completed", "failed", "aborted"]>>;
|
|
1785
|
+
readonly disposition: Schema.NullOr<Schema.Codec<Schema.Json, Schema.Json, never, never>>;
|
|
1786
|
+
}>>;
|
|
1787
|
+
readonly pendingDelivery: Schema.NullOr<Schema.Union<readonly [Schema.Struct<{
|
|
1788
|
+
readonly message: Schema.Struct<{
|
|
1789
|
+
readonly ownerThreadId: Schema.brand<Schema.NonEmptyString, "@effect-agent/core/ThreadId">;
|
|
1790
|
+
readonly messageId: Schema.brand<Schema.NonEmptyString, "@effect-agent/thread/IdempotencyKey">;
|
|
1791
|
+
}>;
|
|
1792
|
+
readonly status: Schema.Literal<"pending">;
|
|
1793
|
+
readonly receipt: Schema.Null;
|
|
1794
|
+
readonly settlement: Schema.Null;
|
|
1795
|
+
readonly reason: Schema.NullOr<Schema.NonEmptyString>;
|
|
1796
|
+
}>, Schema.Struct<{
|
|
1797
|
+
readonly message: Schema.Struct<{
|
|
1798
|
+
readonly ownerThreadId: Schema.brand<Schema.NonEmptyString, "@effect-agent/core/ThreadId">;
|
|
1799
|
+
readonly messageId: Schema.brand<Schema.NonEmptyString, "@effect-agent/thread/IdempotencyKey">;
|
|
1800
|
+
}>;
|
|
1801
|
+
readonly status: Schema.Literal<"accepted">;
|
|
1802
|
+
readonly receipt: typeof Receipt;
|
|
1803
|
+
readonly settlement: Schema.Null;
|
|
1804
|
+
readonly reason: Schema.NullOr<Schema.NonEmptyString>;
|
|
1805
|
+
}>, Schema.Struct<{
|
|
1806
|
+
readonly message: Schema.Struct<{
|
|
1807
|
+
readonly ownerThreadId: Schema.brand<Schema.NonEmptyString, "@effect-agent/core/ThreadId">;
|
|
1808
|
+
readonly messageId: Schema.brand<Schema.NonEmptyString, "@effect-agent/thread/IdempotencyKey">;
|
|
1809
|
+
}>;
|
|
1810
|
+
readonly status: Schema.Literal<"processed">;
|
|
1811
|
+
readonly receipt: typeof Receipt;
|
|
1812
|
+
readonly settlement: Schema.Struct<{
|
|
1813
|
+
readonly settlementId: Schema.brand<Schema.NonEmptyString, "@effect-agent/core/SettlementId">;
|
|
1814
|
+
readonly outcome: Schema.Literals<readonly ["completed", "failed", "aborted"]>;
|
|
1815
|
+
}>;
|
|
1816
|
+
readonly reason: Schema.Null;
|
|
1817
|
+
}>, Schema.Struct<{
|
|
1818
|
+
readonly message: Schema.Struct<{
|
|
1819
|
+
readonly ownerThreadId: Schema.brand<Schema.NonEmptyString, "@effect-agent/core/ThreadId">;
|
|
1820
|
+
readonly messageId: Schema.brand<Schema.NonEmptyString, "@effect-agent/thread/IdempotencyKey">;
|
|
1821
|
+
}>;
|
|
1822
|
+
readonly status: Schema.Literal<"refused">;
|
|
1823
|
+
readonly receipt: Schema.Null;
|
|
1824
|
+
readonly settlement: Schema.Null;
|
|
1825
|
+
readonly reason: Schema.NonEmptyString;
|
|
1826
|
+
}>, Schema.Struct<{
|
|
1827
|
+
readonly message: Schema.Struct<{
|
|
1828
|
+
readonly ownerThreadId: Schema.brand<Schema.NonEmptyString, "@effect-agent/core/ThreadId">;
|
|
1829
|
+
readonly messageId: Schema.brand<Schema.NonEmptyString, "@effect-agent/thread/IdempotencyKey">;
|
|
1830
|
+
}>;
|
|
1831
|
+
readonly status: Schema.Literal<"parked">;
|
|
1832
|
+
readonly receipt: Schema.NullOr<typeof Receipt>;
|
|
1833
|
+
readonly settlement: Schema.Null;
|
|
1834
|
+
readonly reason: Schema.NonEmptyString;
|
|
1835
|
+
}>]>>;
|
|
1836
|
+
readonly watermark: Schema.Struct<{
|
|
1837
|
+
readonly canonicalSequence: Schema.Natural;
|
|
1838
|
+
readonly acceptedQueueSequence: Schema.Natural;
|
|
1839
|
+
readonly pendingDeliveryVersion: Schema.NullOr<Schema.Natural>;
|
|
1840
|
+
}>;
|
|
1841
|
+
readonly worker: Schema.refine<{
|
|
1842
|
+
readonly schemaVersion: 1;
|
|
1843
|
+
readonly delegationId: string & Brand.Brand<"@effect-agent/core/DelegationId">;
|
|
1844
|
+
readonly targetAgentId: string & Brand.Brand<"@effect-agent/core/AgentId">;
|
|
1845
|
+
readonly threadId: string & Brand.Brand<"@effect-agent/core/ThreadId">;
|
|
1846
|
+
} & Brand.Brand<`@effect-agent/Worker/${Name}`>, Schema.Struct<{
|
|
1847
|
+
readonly schemaVersion: Schema.Literal<1>;
|
|
1848
|
+
readonly delegationId: Schema.brand<Schema.NonEmptyString, "@effect-agent/core/DelegationId">;
|
|
1849
|
+
readonly targetAgentId: Schema.brand<Schema.NonEmptyString, "@effect-agent/core/AgentId">;
|
|
1850
|
+
readonly threadId: Schema.brand<Schema.NonEmptyString, "@effect-agent/core/ThreadId">;
|
|
1851
|
+
}>>;
|
|
1852
|
+
}>>;
|
|
1853
|
+
readonly next: Schema.NullOr<Schema.brand<Schema.NonEmptyString, "@effect-agent/core/ThreadId">>;
|
|
1854
|
+
}>;
|
|
1855
|
+
readonly failure: typeof WorkerError;
|
|
1856
|
+
readonly failureMode: "error";
|
|
1857
|
+
}, SubagentHost>;
|
|
1858
|
+
layer: import("effect/Layer").Layer<Tool.HandlersFor<{ readonly [Tool in Tool.Tool<`${Name}_list`, {
|
|
1859
|
+
readonly parameters: Schema.Struct<{
|
|
1860
|
+
readonly limit: Schema.optionalKey<Schema.Int>;
|
|
1861
|
+
readonly after: Schema.optionalKey<Schema.brand<Schema.NonEmptyString, "@effect-agent/core/ThreadId">>;
|
|
1862
|
+
}>;
|
|
1863
|
+
readonly success: Schema.Struct<{
|
|
1864
|
+
readonly items: Schema.$Array<Schema.Struct<{
|
|
1865
|
+
readonly latestReceipt: Schema.NullOr<typeof Receipt>;
|
|
1866
|
+
readonly state: Schema.Literals<readonly ["starting", "active", "unknown", "idle", "stopping", "stopped", "completed", "failed", "cancelled"]>;
|
|
1867
|
+
readonly acceptedInput: Schema.NullOr<Schema.Struct<{
|
|
1868
|
+
readonly receipt: typeof Receipt;
|
|
1869
|
+
readonly messageId: Schema.brand<Schema.NonEmptyString, "@effect-agent/thread/IdempotencyKey">;
|
|
1870
|
+
}>>;
|
|
1871
|
+
readonly appliedInput: Schema.NullOr<Schema.Struct<{
|
|
1872
|
+
readonly receipt: typeof Receipt;
|
|
1873
|
+
readonly messageId: Schema.brand<Schema.NonEmptyString, "@effect-agent/thread/IdempotencyKey">;
|
|
1874
|
+
readonly runId: Schema.brand<Schema.NonEmptyString, "@effect-agent/core/RunId">;
|
|
1875
|
+
readonly sequence: Schema.Natural;
|
|
1876
|
+
}>>;
|
|
1877
|
+
readonly run: Schema.NullOr<Schema.Struct<{
|
|
1878
|
+
readonly runId: Schema.brand<Schema.NonEmptyString, "@effect-agent/core/RunId">;
|
|
1879
|
+
readonly hostReceipt: typeof Receipt;
|
|
1880
|
+
readonly outcome: Schema.NullOr<Schema.Literals<readonly ["completed", "failed", "aborted"]>>;
|
|
1881
|
+
readonly disposition: Schema.NullOr<Schema.Codec<Schema.Json, Schema.Json, never, never>>;
|
|
1882
|
+
}>>;
|
|
1883
|
+
readonly pendingDelivery: Schema.NullOr<Schema.Union<readonly [Schema.Struct<{
|
|
1884
|
+
readonly message: Schema.Struct<{
|
|
1885
|
+
readonly ownerThreadId: Schema.brand<Schema.NonEmptyString, "@effect-agent/core/ThreadId">;
|
|
1886
|
+
readonly messageId: Schema.brand<Schema.NonEmptyString, "@effect-agent/thread/IdempotencyKey">;
|
|
1887
|
+
}>;
|
|
1888
|
+
readonly status: Schema.Literal<"pending">;
|
|
1889
|
+
readonly receipt: Schema.Null;
|
|
1890
|
+
readonly settlement: Schema.Null;
|
|
1891
|
+
readonly reason: Schema.NullOr<Schema.NonEmptyString>;
|
|
1892
|
+
}>, Schema.Struct<{
|
|
1893
|
+
readonly message: Schema.Struct<{
|
|
1894
|
+
readonly ownerThreadId: Schema.brand<Schema.NonEmptyString, "@effect-agent/core/ThreadId">;
|
|
1895
|
+
readonly messageId: Schema.brand<Schema.NonEmptyString, "@effect-agent/thread/IdempotencyKey">;
|
|
1896
|
+
}>;
|
|
1897
|
+
readonly status: Schema.Literal<"accepted">;
|
|
1898
|
+
readonly receipt: typeof Receipt;
|
|
1899
|
+
readonly settlement: Schema.Null;
|
|
1900
|
+
readonly reason: Schema.NullOr<Schema.NonEmptyString>;
|
|
1901
|
+
}>, Schema.Struct<{
|
|
1902
|
+
readonly message: Schema.Struct<{
|
|
1903
|
+
readonly ownerThreadId: Schema.brand<Schema.NonEmptyString, "@effect-agent/core/ThreadId">;
|
|
1904
|
+
readonly messageId: Schema.brand<Schema.NonEmptyString, "@effect-agent/thread/IdempotencyKey">;
|
|
1905
|
+
}>;
|
|
1906
|
+
readonly status: Schema.Literal<"processed">;
|
|
1907
|
+
readonly receipt: typeof Receipt;
|
|
1908
|
+
readonly settlement: Schema.Struct<{
|
|
1909
|
+
readonly settlementId: Schema.brand<Schema.NonEmptyString, "@effect-agent/core/SettlementId">;
|
|
1910
|
+
readonly outcome: Schema.Literals<readonly ["completed", "failed", "aborted"]>;
|
|
1911
|
+
}>;
|
|
1912
|
+
readonly reason: Schema.Null;
|
|
1913
|
+
}>, Schema.Struct<{
|
|
1914
|
+
readonly message: Schema.Struct<{
|
|
1915
|
+
readonly ownerThreadId: Schema.brand<Schema.NonEmptyString, "@effect-agent/core/ThreadId">;
|
|
1916
|
+
readonly messageId: Schema.brand<Schema.NonEmptyString, "@effect-agent/thread/IdempotencyKey">;
|
|
1917
|
+
}>;
|
|
1918
|
+
readonly status: Schema.Literal<"refused">;
|
|
1919
|
+
readonly receipt: Schema.Null;
|
|
1920
|
+
readonly settlement: Schema.Null;
|
|
1921
|
+
readonly reason: Schema.NonEmptyString;
|
|
1922
|
+
}>, Schema.Struct<{
|
|
1923
|
+
readonly message: Schema.Struct<{
|
|
1924
|
+
readonly ownerThreadId: Schema.brand<Schema.NonEmptyString, "@effect-agent/core/ThreadId">;
|
|
1925
|
+
readonly messageId: Schema.brand<Schema.NonEmptyString, "@effect-agent/thread/IdempotencyKey">;
|
|
1926
|
+
}>;
|
|
1927
|
+
readonly status: Schema.Literal<"parked">;
|
|
1928
|
+
readonly receipt: Schema.NullOr<typeof Receipt>;
|
|
1929
|
+
readonly settlement: Schema.Null;
|
|
1930
|
+
readonly reason: Schema.NonEmptyString;
|
|
1931
|
+
}>]>>;
|
|
1932
|
+
readonly watermark: Schema.Struct<{
|
|
1933
|
+
readonly canonicalSequence: Schema.Natural;
|
|
1934
|
+
readonly acceptedQueueSequence: Schema.Natural;
|
|
1935
|
+
readonly pendingDeliveryVersion: Schema.NullOr<Schema.Natural>;
|
|
1936
|
+
}>;
|
|
1937
|
+
readonly worker: Schema.refine<{
|
|
1938
|
+
readonly schemaVersion: 1;
|
|
1939
|
+
readonly delegationId: string & Brand.Brand<"@effect-agent/core/DelegationId">;
|
|
1940
|
+
readonly targetAgentId: string & Brand.Brand<"@effect-agent/core/AgentId">;
|
|
1941
|
+
readonly threadId: string & Brand.Brand<"@effect-agent/core/ThreadId">;
|
|
1942
|
+
} & Brand.Brand<`@effect-agent/Worker/${Name}`>, Schema.Struct<{
|
|
1943
|
+
readonly schemaVersion: Schema.Literal<1>;
|
|
1944
|
+
readonly delegationId: Schema.brand<Schema.NonEmptyString, "@effect-agent/core/DelegationId">;
|
|
1945
|
+
readonly targetAgentId: Schema.brand<Schema.NonEmptyString, "@effect-agent/core/AgentId">;
|
|
1946
|
+
readonly threadId: Schema.brand<Schema.NonEmptyString, "@effect-agent/core/ThreadId">;
|
|
1947
|
+
}>>;
|
|
1948
|
+
}>>;
|
|
1949
|
+
readonly next: Schema.NullOr<Schema.brand<Schema.NonEmptyString, "@effect-agent/core/ThreadId">>;
|
|
1950
|
+
}>;
|
|
1951
|
+
readonly failure: typeof WorkerError;
|
|
1952
|
+
readonly failureMode: "error";
|
|
1953
|
+
}, SubagentHost> as Tool["name"]]: Tool; }>, never, never>;
|
|
1954
|
+
}>;
|
|
1955
|
+
/** Request cancellation of one exact worker Receipt. */
|
|
1956
|
+
declare const cancelTool: <const Name extends string, Input extends Schema.Top, Output extends Schema.Top, Parameters extends Schema.Top, Success extends Schema.Top, Failure extends Schema.Top, Prepare, Project>(declaration: Declaration<Name, Input, Output, Parameters, Success, Failure, Prepare, Project>) => Readonly<{
|
|
1957
|
+
tool: Tool.Tool<`${Name}_cancel`, {
|
|
1958
|
+
readonly parameters: Schema.Struct<{
|
|
1959
|
+
readonly worker: Schema.refine<{
|
|
1960
|
+
readonly schemaVersion: 1;
|
|
1961
|
+
readonly delegationId: string & Brand.Brand<"@effect-agent/core/DelegationId">;
|
|
1962
|
+
readonly targetAgentId: string & Brand.Brand<"@effect-agent/core/AgentId">;
|
|
1963
|
+
readonly threadId: string & Brand.Brand<"@effect-agent/core/ThreadId">;
|
|
1964
|
+
} & Brand.Brand<`@effect-agent/Worker/${Name}`>, Schema.Struct<{
|
|
1965
|
+
readonly schemaVersion: Schema.Literal<1>;
|
|
1966
|
+
readonly delegationId: Schema.brand<Schema.NonEmptyString, "@effect-agent/core/DelegationId">;
|
|
1967
|
+
readonly targetAgentId: Schema.brand<Schema.NonEmptyString, "@effect-agent/core/AgentId">;
|
|
1968
|
+
readonly threadId: Schema.brand<Schema.NonEmptyString, "@effect-agent/core/ThreadId">;
|
|
1969
|
+
}>>;
|
|
1970
|
+
readonly receipt: typeof Receipt;
|
|
1971
|
+
}>;
|
|
1972
|
+
readonly success: Schema.Void;
|
|
1973
|
+
readonly failure: Schema.Union<readonly [typeof WorkerError, typeof JoinedToHost]>;
|
|
1974
|
+
readonly failureMode: "error";
|
|
1975
|
+
}, SubagentHost>;
|
|
1976
|
+
layer: import("effect/Layer").Layer<Tool.HandlersFor<{ readonly [Tool in Tool.Tool<`${Name}_cancel`, {
|
|
1977
|
+
readonly parameters: Schema.Struct<{
|
|
1978
|
+
readonly worker: Schema.refine<{
|
|
1979
|
+
readonly schemaVersion: 1;
|
|
1980
|
+
readonly delegationId: string & Brand.Brand<"@effect-agent/core/DelegationId">;
|
|
1981
|
+
readonly targetAgentId: string & Brand.Brand<"@effect-agent/core/AgentId">;
|
|
1982
|
+
readonly threadId: string & Brand.Brand<"@effect-agent/core/ThreadId">;
|
|
1983
|
+
} & Brand.Brand<`@effect-agent/Worker/${Name}`>, Schema.Struct<{
|
|
1984
|
+
readonly schemaVersion: Schema.Literal<1>;
|
|
1985
|
+
readonly delegationId: Schema.brand<Schema.NonEmptyString, "@effect-agent/core/DelegationId">;
|
|
1986
|
+
readonly targetAgentId: Schema.brand<Schema.NonEmptyString, "@effect-agent/core/AgentId">;
|
|
1987
|
+
readonly threadId: Schema.brand<Schema.NonEmptyString, "@effect-agent/core/ThreadId">;
|
|
1988
|
+
}>>;
|
|
1989
|
+
readonly receipt: typeof Receipt;
|
|
1990
|
+
}>;
|
|
1991
|
+
readonly success: Schema.Void;
|
|
1992
|
+
readonly failure: Schema.Union<readonly [typeof WorkerError, typeof JoinedToHost]>;
|
|
1993
|
+
readonly failureMode: "error";
|
|
1994
|
+
}, SubagentHost> as Tool["name"]]: Tool; }>, never, never>;
|
|
1995
|
+
}>;
|
|
1996
|
+
interface ReportingOptions {
|
|
1997
|
+
/**
|
|
1998
|
+
* Select canonical updates to notify the parent. Defaults to all. Decode the encoded value
|
|
1999
|
+
* with the child's update Schema. The first accepted emission freezes this decision.
|
|
2000
|
+
*/
|
|
2001
|
+
readonly reportUpdate?: WorkerReporting['reportUpdate'];
|
|
2002
|
+
/**
|
|
2003
|
+
* Select settled Runs before projection. False retains a filtered decision without parent
|
|
2004
|
+
* delivery. Recovery reuses a committed decision, but may reevaluate before it commits.
|
|
2005
|
+
*/
|
|
2006
|
+
readonly reportCompletion?: WorkerReporting['reportCompletion'];
|
|
2007
|
+
}
|
|
2008
|
+
/** Register this standard completion projection on the parent; registration captures its services. */
|
|
2009
|
+
declare const reporting: <const Name extends string, Input extends Schema.Top, Output extends Schema.Top, Parameters extends Schema.Top, Success extends Schema.Top, Failure extends Schema.Top, Prepare, Project>(declaration: Declaration<Name, Input, Output, Parameters, Success, Failure, Prepare, Project>, options?: ReportingOptions) => {
|
|
2010
|
+
reportUpdate?: WorkerReporting['reportUpdate'];
|
|
2011
|
+
reportCompletion?: WorkerReporting['reportCompletion'];
|
|
2012
|
+
delegationId: string & import("effect/Brand").Brand<"@effect-agent/core/DelegationId">;
|
|
2013
|
+
target: Definition<Schema.Top, Schema.Top, unknown, import("effect/ai/Toolkit").Any, RunDispositionDeclaration<never, Schema.Top> | undefined, unknown, Schema.Top | undefined> & {
|
|
2014
|
+
readonly input: Input;
|
|
2015
|
+
readonly output: Output;
|
|
2016
|
+
};
|
|
2017
|
+
prepare: (report: WorkerRunReport) => Effect.Effect<{
|
|
2018
|
+
message: {
|
|
2019
|
+
readonly _tag: "WorkerCompletion";
|
|
2020
|
+
readonly budgetExhausted: boolean;
|
|
2021
|
+
readonly schemaVersion: 1;
|
|
2022
|
+
readonly report: {
|
|
2023
|
+
readonly _tag: "Settled";
|
|
2024
|
+
readonly worker: {
|
|
2025
|
+
readonly schemaVersion: 1;
|
|
2026
|
+
readonly delegationId: string & import("effect/Brand").Brand<"@effect-agent/core/DelegationId">;
|
|
2027
|
+
readonly targetAgentId: string & import("effect/Brand").Brand<"@effect-agent/core/AgentId">;
|
|
2028
|
+
readonly threadId: string & import("effect/Brand").Brand<"@effect-agent/core/ThreadId">;
|
|
2029
|
+
};
|
|
2030
|
+
readonly receipt: Receipt;
|
|
2031
|
+
readonly runId: string & import("effect/Brand").Brand<"@effect-agent/core/RunId">;
|
|
2032
|
+
readonly settlementId: string & import("effect/Brand").Brand<"@effect-agent/core/SettlementId">;
|
|
2033
|
+
readonly outcome: "completed";
|
|
2034
|
+
readonly result: Schema.Json;
|
|
2035
|
+
} | {
|
|
2036
|
+
readonly _tag: "Settled";
|
|
2037
|
+
readonly worker: {
|
|
2038
|
+
readonly schemaVersion: 1;
|
|
2039
|
+
readonly delegationId: string & import("effect/Brand").Brand<"@effect-agent/core/DelegationId">;
|
|
2040
|
+
readonly targetAgentId: string & import("effect/Brand").Brand<"@effect-agent/core/AgentId">;
|
|
2041
|
+
readonly threadId: string & import("effect/Brand").Brand<"@effect-agent/core/ThreadId">;
|
|
2042
|
+
};
|
|
2043
|
+
readonly receipt: Receipt;
|
|
2044
|
+
readonly runId: string & import("effect/Brand").Brand<"@effect-agent/core/RunId">;
|
|
2045
|
+
readonly settlementId: string & import("effect/Brand").Brand<"@effect-agent/core/SettlementId">;
|
|
2046
|
+
readonly outcome: "aborted" | "failed";
|
|
2047
|
+
readonly failure: SubagentExecutionFailure;
|
|
2048
|
+
};
|
|
2049
|
+
};
|
|
2050
|
+
}, SubagentProjectionFailure | WorkerReportPreparationFailure | Failure["Type"], Project | Parameters["DecodingServices"] | Success["EncodingServices"] | (Schema.Top & Output)["DecodingServices"]>;
|
|
2051
|
+
};
|
|
2052
|
+
declare namespace Subagent_d_exports {
|
|
2053
|
+
export { ReportingOptions, StartToolOptions, SubagentChildRunFailure, SubagentContainedFailure, SubagentDeclarationOptions, SubagentDefineOptions, SubagentDelegation, SubagentDurableAccounting, SubagentExecutionFailure, SubagentExecutionFailureClassification, SubagentFailureMode, SubagentGrant, SubagentLayerRequirements, SubagentPolicy, SubagentPolicyInput, SubagentPrepareContext, SubagentPrestartDenied, SubagentProjectionFailure, SubagentResult, SubagentResultContext, SubagentReturnModeFailure, SubagentRuntimeOptions, SubagentTool, SubagentToolFailure, SubagentTools, Worker, WorkerCompletion, WorkerObservation, WorkerReport, awaitWorker as await, cancel, cancelTool, delegationAllocationFromPolicy, delegationCapsFromPolicy, followUp, followUpTool, inspect, inspectTool, layer, list, listTool, make, observe, reporting, start, startTool, stop, summaryTool };
|
|
2054
|
+
}
|
|
2055
|
+
/**
|
|
2056
|
+
* Bounded parent metadata visible to `prepareInput`.
|
|
2057
|
+
* It never contains the parent transcript, prompt, or a root runtime Context.
|
|
2058
|
+
*/
|
|
2059
|
+
type SubagentPrepareContext = {
|
|
2060
|
+
readonly delegationId: DelegationId;
|
|
2061
|
+
} & ({
|
|
2062
|
+
readonly source: 'tool';
|
|
2063
|
+
readonly toolCallId: ToolCallId;
|
|
2064
|
+
readonly parent: AgentSpawnerParent;
|
|
2065
|
+
} | {
|
|
2066
|
+
readonly source: 'programmatic';
|
|
2067
|
+
readonly parent: Pick<AgentSpawnerParent, 'agentId' | 'threadId'>;
|
|
2068
|
+
});
|
|
2069
|
+
/**
|
|
2070
|
+
* Bounded framework context handed to `projectResult` (SUB-034).
|
|
2071
|
+
* `budgetExhausted` is true exactly when the child settled through the
|
|
2072
|
+
* final-answer exhaustion resolution (RUN-018) — on the ephemeral path from
|
|
2073
|
+
* the child result's `finishReason`, on the durable path from the child
|
|
2074
|
+
* Settlement's honest marker — so the projection can surface a
|
|
2075
|
+
* budget-truncated partial to the orchestrator.
|
|
2076
|
+
*/
|
|
2077
|
+
interface SubagentResultContext {
|
|
2078
|
+
readonly budgetExhausted: boolean;
|
|
2079
|
+
/** Own and disjoint attached-descendant usage; absent only for legacy/custom hosts. */
|
|
2080
|
+
readonly usage?: RunTotals;
|
|
2081
|
+
readonly delegatedUsage?: RunTotals;
|
|
2082
|
+
}
|
|
2083
|
+
/** Default delegation result, preserving partial-output information. */
|
|
2084
|
+
declare const SubagentResult: <Output extends Schema.Top>(output: Output) => Schema.Struct<{
|
|
2085
|
+
readonly output: Output;
|
|
2086
|
+
readonly budgetExhausted: Schema.Boolean;
|
|
2087
|
+
}>;
|
|
2088
|
+
type SubagentResult<Output extends Schema.Top> = ReturnType<typeof SubagentResult<Output>>;
|
|
2089
|
+
/**
|
|
2090
|
+
* The delegation Tool failure Schema: the author's declared failure plus the
|
|
2091
|
+
* framework's preflight/budget/projection/durable-execution failure family.
|
|
2092
|
+
* With the default `failureMode: "error"`, exactly
|
|
2093
|
+
* this union (plus Effect AI's own error) can enter the parent handler `E`.
|
|
2094
|
+
*
|
|
2095
|
+
* The engine-owned `ToolCallWaiting` suspension signal and the typed
|
|
2096
|
+
* `SubagentDurabilityError` are members so the durable branch's waiting
|
|
2097
|
+
* signal and coordinator-seam failures travel typed through
|
|
2098
|
+
* `failureMode: "error"` (S2 plan §2); neither ever reaches an ephemeral
|
|
2099
|
+
* caller, and a waiting signal is not a Tool failure — the batch executor
|
|
2100
|
+
* keeps the raising call open and suspends the Run.
|
|
2101
|
+
*/
|
|
2102
|
+
type SubagentToolFailure<Failure extends Schema.Top> = Schema.Union<readonly [Failure, typeof SubagentPrestartDenied, typeof SubagentBudgetExhausted, typeof SubagentProjectionFailure, typeof SubagentExecutionFailure, typeof ToolCallWaiting, typeof SubagentDurabilityError]>;
|
|
2103
|
+
/**
|
|
2104
|
+
* Resolution for expected delegation failures (SUB-033, ADR-0019 S2).
|
|
2105
|
+
* `"error"` (the default) keeps today's semantics: every expected failure
|
|
2106
|
+
* travels the Effect error channel and fails the parent Tool batch (D-008).
|
|
2107
|
+
* `"return"` contains them: the declared child failure and the framework
|
|
2108
|
+
* failure family become model-visible result data instead of parent-fatal
|
|
2109
|
+
* errors, so one dead child cannot detonate the whole parent Run.
|
|
2110
|
+
*
|
|
2111
|
+
* Effect AI's native `failureMode: "return"` is deliberately NOT used: its
|
|
2112
|
+
* `Stream.catch` converts every handler failure into a result, which would
|
|
2113
|
+
* encode the engine-owned `ToolCallWaiting` suspension signal as data and
|
|
2114
|
+
* silently orphan a durable child. Containment therefore lives in the
|
|
2115
|
+
* delegation handler — the underlying Tool keeps Effect AI
|
|
2116
|
+
* `failureMode: "error"`, the Tool success Schema widens to a union of the
|
|
2117
|
+
* declared success and the contained failure family, and exactly
|
|
2118
|
+
* `ToolCallWaiting` and `SubagentDurabilityError` stay in the error channel,
|
|
2119
|
+
* preserving durable suspension semantics by construction.
|
|
2120
|
+
*/
|
|
2121
|
+
type SubagentFailureMode = 'error' | 'return';
|
|
2122
|
+
/**
|
|
2123
|
+
* The failure family that becomes model-visible result data under
|
|
2124
|
+
* `failureMode: "return"`: the author-declared failure plus every expected
|
|
2125
|
+
* framework delegation failure. The engine-signal members are excluded by
|
|
2126
|
+
* construction.
|
|
2127
|
+
*/
|
|
2128
|
+
type SubagentContainedFailure<Failure extends Schema.Top> = Schema.Union<readonly [Failure, typeof SubagentPrestartDenied, typeof SubagentBudgetExhausted, typeof SubagentProjectionFailure, typeof SubagentExecutionFailure]>;
|
|
2129
|
+
/**
|
|
2130
|
+
* The only failures a `"return"`-mode delegation Tool can raise: the
|
|
2131
|
+
* engine-owned waiting signal (consumed by the batch executor, never a Tool
|
|
2132
|
+
* failure) and the durable coordinator-seam error. Neither ever reaches an
|
|
2133
|
+
* ephemeral caller.
|
|
2134
|
+
*/
|
|
2135
|
+
type SubagentReturnModeFailure = Schema.Union<readonly [typeof ToolCallWaiting, typeof SubagentDurabilityError]>;
|
|
2136
|
+
/**
|
|
2137
|
+
* The native Effect AI Tool created by `Subagent.make` (SUB-001, SUB-003).
|
|
2138
|
+
* Its per-call dependencies are exactly the engine-provided `AgentSpawner`,
|
|
2139
|
+
* `RunEventSink`, and `SubagentDurability`; every child
|
|
2140
|
+
* requirement except the inherited Thread history policy is a construction requirement
|
|
2141
|
+
* of `Subagent.layer`. The engine excludes its own per-batch services from the runtime's
|
|
2142
|
+
* public requirements. Runtime IDs use the overridable default reference.
|
|
2143
|
+
*/
|
|
2144
|
+
type SubagentTool<Name extends string, Parameters extends Schema.Top, Success extends Schema.Top, Failure extends Schema.Top, Mode extends SubagentFailureMode = 'error'> = Mode extends 'return' ? Tool.Tool<Name, {
|
|
2145
|
+
readonly parameters: Parameters;
|
|
2146
|
+
readonly success: Schema.Union<readonly [Success, SubagentContainedFailure<Failure>]>;
|
|
2147
|
+
readonly failure: SubagentReturnModeFailure;
|
|
2148
|
+
readonly failureMode: 'error';
|
|
2149
|
+
}, AgentSpawner | RunEventSink | SubagentDurability> : Tool.Tool<Name, {
|
|
2150
|
+
readonly parameters: Parameters;
|
|
2151
|
+
readonly success: Success;
|
|
2152
|
+
readonly failure: SubagentToolFailure<Failure>;
|
|
2153
|
+
readonly failureMode: 'error';
|
|
2154
|
+
}, AgentSpawner | RunEventSink | SubagentDurability>;
|
|
2155
|
+
/** Singleton Tool record provided by one `Subagent.layer`. */
|
|
2156
|
+
type SubagentTools<Name extends string, Parameters extends Schema.Top, Success extends Schema.Top, Failure extends Schema.Top, Mode extends SubagentFailureMode = 'error'> = { readonly [Key in Name]: SubagentTool<Name, Parameters, Success, Failure, Mode>; };
|
|
2157
|
+
/** Explicit options accepted by `Subagent.make`. */
|
|
2158
|
+
interface SubagentDefineOptions<TargetInput extends Schema.Top, TargetOutput extends Schema.Top, TargetInstructions, TargetTools extends Record<string, Tool.Any>, Parameters extends Schema.Top, Success extends Schema.Top, Failure extends Schema.Top, PrepareRequirements = never, ProjectRequirements = never, Mode extends SubagentFailureMode = 'error'> {
|
|
2159
|
+
/**
|
|
2160
|
+
* Expected-failure resolution (SUB-033): `"error"` (default) fails the
|
|
2161
|
+
* parent Tool batch; `"return"` contains the declared failure and the
|
|
2162
|
+
* framework failure family as model-visible result data while
|
|
2163
|
+
* `ToolCallWaiting`/`SubagentDurabilityError` stay in the error channel.
|
|
2164
|
+
*/
|
|
2165
|
+
readonly failureMode?: Mode;
|
|
2166
|
+
/** Model-visible description of the delegated capability. */
|
|
2167
|
+
readonly description?: string | undefined;
|
|
2168
|
+
/** The model-agnostic child Agent Definition this delegation targets (SUB-002). */
|
|
2169
|
+
readonly target: Definition<TargetInput, TargetOutput, TargetInstructions, Toolkit.Toolkit<TargetTools>, RunDispositionDeclaration<TargetOutput['Type'], Schema.Top> | undefined, unknown, Schema.Top | undefined>;
|
|
2170
|
+
/** Schema for the model-decoded delegation parameters. */
|
|
2171
|
+
readonly parameters: Parameters;
|
|
2172
|
+
/** Schema for the bounded parent Tool result. */
|
|
2173
|
+
readonly success: Success;
|
|
2174
|
+
/** Schema for the author-declared delegation failure data. */
|
|
2175
|
+
readonly failure: Failure;
|
|
2176
|
+
/**
|
|
2177
|
+
* Effectful, typed projection from decoded parameters and bounded parent
|
|
2178
|
+
* metadata to the child Agent input. It never
|
|
2179
|
+
* receives the parent transcript or a root Context; its expected failures
|
|
2180
|
+
* are already the declared Tool failure.
|
|
2181
|
+
*/
|
|
2182
|
+
readonly prepareInput: (parameters: Parameters['Type'], context: SubagentPrepareContext) => Effect.Effect<TargetInput['Type'], Failure['Type'] | SubagentProjectionFailure, PrepareRequirements>;
|
|
2183
|
+
/**
|
|
2184
|
+
* Bounded result projection from the Schema-decoded child output, result
|
|
2185
|
+
* context, and original Schema-decoded Tool parameters to the declared Tool
|
|
2186
|
+
* success value. This is the explicit
|
|
2187
|
+
* declassification boundary for child output: the parameters let it bind
|
|
2188
|
+
* echoed identity and scope to the exact request without prompt parsing.
|
|
2189
|
+
* The context carries the
|
|
2190
|
+
* framework's honest exhaustion marker (SUB-034): when `budgetExhausted` is
|
|
2191
|
+
* true the child settled through the final-answer resolution (RUN-018) and
|
|
2192
|
+
* its output is a budget-truncated partial — surface it in the declared
|
|
2193
|
+
* success Schema so the caller can choose a fresh delegation with a larger
|
|
2194
|
+
* task budget.
|
|
2195
|
+
*/
|
|
2196
|
+
readonly projectResult: (output: TargetOutput['Type'], context: SubagentResultContext, parameters: Parameters['Type']) => Effect.Effect<Success['Type'], Failure['Type'] | SubagentProjectionFailure, ProjectRequirements>;
|
|
2197
|
+
/** Per-child ceilings. When omitted, reserve from the parent policy's shared delegation pool. */
|
|
2198
|
+
readonly policy?: SubagentPolicy | undefined;
|
|
2199
|
+
/**
|
|
2200
|
+
* Authority ceiling for the child. Defaults to
|
|
2201
|
+
* exactly the target's declared Tool names at depth ceiling one. The engine
|
|
2202
|
+
* exposes only permitted Tools; nested launches also require depth and lifetime authority.
|
|
2203
|
+
*/
|
|
2204
|
+
readonly grant?: SubagentGrant | undefined;
|
|
2205
|
+
/**
|
|
2206
|
+
* Native Effect AI approval metadata for establishment only (SUB-026):
|
|
2207
|
+
* parent approval never authorizes child actions, siblings, or retries.
|
|
2208
|
+
*/
|
|
2209
|
+
readonly needsApproval?: Tool.NeedsApproval<Parameters> | undefined;
|
|
2210
|
+
}
|
|
2211
|
+
/**
|
|
2212
|
+
* An immutable Subagent capability: one target Agent Definition exposed to
|
|
2213
|
+
* a parent as one Effect AI Tool with explicit projections, policy, and
|
|
2214
|
+
* authority ceiling. It owns no acquired resources and
|
|
2215
|
+
* is not executable until `Subagent.layer` supplies the child's model Layer.
|
|
2216
|
+
*/
|
|
2217
|
+
interface SubagentDelegation<Name extends string, TargetInput extends Schema.Top, TargetOutput extends Schema.Top, TargetInstructions, TargetTools extends Record<string, Tool.Any>, Parameters extends Schema.Top, Success extends Schema.Top, Failure extends Schema.Top, PrepareRequirements = never, ProjectRequirements = never, Mode extends SubagentFailureMode = 'error'> extends SubagentDefineOptions<TargetInput, TargetOutput, TargetInstructions, TargetTools, Parameters, Success, Failure, PrepareRequirements, ProjectRequirements, Mode> {
|
|
2218
|
+
readonly name: Name;
|
|
2219
|
+
/** Stable delegation identity; S1 derives it from the unique Tool name. */
|
|
2220
|
+
readonly delegationId: DelegationId;
|
|
2221
|
+
readonly grant: SubagentGrant;
|
|
2222
|
+
/** The resolved expected-failure resolution (SUB-033); never absent after `make`. */
|
|
2223
|
+
readonly failureMode: Mode;
|
|
2224
|
+
/**
|
|
2225
|
+
* The canonical contained-failure family for this delegation (SUB-033):
|
|
2226
|
+
* the declared failure plus the framework members. Consumers that classify
|
|
2227
|
+
* returned failure data (for example a coverage gate) MUST decode through
|
|
2228
|
+
* this value rather than reconstructing the union, so a framework change
|
|
2229
|
+
* to the contained family can never diverge from their decoder.
|
|
2230
|
+
*/
|
|
2231
|
+
readonly containedFailure: SubagentContainedFailure<Failure>;
|
|
2232
|
+
/** The real Effect AI Tool to include in the parent Toolkit (SUB-001). */
|
|
2233
|
+
readonly tool: SubagentTool<Name, Parameters, Success, Failure, Mode>;
|
|
2234
|
+
}
|
|
2235
|
+
/** Pure Subagent authoring surface. */
|
|
2236
|
+
/** Optional authoring fields; schemas default to the child's input and result envelope. */
|
|
2237
|
+
type SubagentDeclarationOptions<Input extends Schema.Top, Output extends Schema.Top, Instructions, Tools extends Record<string, Tool.Any>, Parameters extends Schema.Top, Success extends Schema.Top, Failure extends Schema.Top, Prepare, Project, Mode extends SubagentFailureMode> = Omit<SubagentDefineOptions<Input, Output, Instructions, Tools, Parameters, Success, Failure, Prepare, Project, Mode>, 'parameters' | 'success' | 'failure' | 'prepareInput' | 'projectResult'> & {
|
|
2238
|
+
readonly parameters?: Parameters;
|
|
2239
|
+
readonly success?: Success;
|
|
2240
|
+
readonly failure?: Failure;
|
|
2241
|
+
readonly prepareInput?: SubagentDefineOptions<Input, Output, Instructions, Tools, Parameters, Success, Failure, Prepare, Project, Mode>['prepareInput'];
|
|
2242
|
+
readonly projectResult?: SubagentDefineOptions<Input, Output, Instructions, Tools, Parameters, Success, Failure, Prepare, Project, Mode>['projectResult'];
|
|
2243
|
+
};
|
|
2244
|
+
/**
|
|
2245
|
+
* Expose one child Agent as an attached Effect AI Tool. The nonempty application
|
|
2246
|
+
* name is preserved as both Tool name and delegation identity; no prefix is required.
|
|
2247
|
+
* Parameters and result projections default to the child's input and result envelope.
|
|
2248
|
+
* Throws when the name is empty. Nested Tool visibility follows the effective inherited grant.
|
|
2249
|
+
*/
|
|
2250
|
+
declare function make<const Name extends string, Input extends Schema.Top, Output extends Schema.Top, Instructions, Tools extends Record<string, Tool.Any>, Parameters extends Schema.Top = Input, Success extends Schema.Top = SubagentResult<Output>, Failure extends Schema.Top = typeof Schema.Never, Prepare = never, Project = never, Target extends Definition<Input, Output, Instructions, Toolkit.Toolkit<Tools>, RunDispositionDeclaration<Output['Type'], Schema.Top> | undefined, unknown, Schema.Top | undefined> = Definition<Input, Output, Instructions, Toolkit.Toolkit<Tools>, RunDispositionDeclaration<Output['Type'], Schema.Top> | undefined, unknown, Schema.Top | undefined>>(name: Name, options: SubagentDeclarationOptions<Input, Output, Instructions, Tools, Parameters, Success, Failure, Prepare, Project, 'return'> & {
|
|
2251
|
+
readonly failureMode: 'return';
|
|
2252
|
+
readonly target: Target;
|
|
2253
|
+
}): SubagentDelegation<Name, Input, Output, Instructions, Tools, Parameters, Success, Failure, Prepare, Project, 'return'> & {
|
|
2254
|
+
readonly target: Target;
|
|
2255
|
+
};
|
|
2256
|
+
declare function make<const Name extends string, Input extends Schema.Top, Output extends Schema.Top, Instructions, Tools extends Record<string, Tool.Any>, Parameters extends Schema.Top = Input, Success extends Schema.Top = SubagentResult<Output>, Failure extends Schema.Top = typeof Schema.Never, Prepare = never, Project = never, Target extends Definition<Input, Output, Instructions, Toolkit.Toolkit<Tools>, RunDispositionDeclaration<Output['Type'], Schema.Top> | undefined, unknown, Schema.Top | undefined> = Definition<Input, Output, Instructions, Toolkit.Toolkit<Tools>, RunDispositionDeclaration<Output['Type'], Schema.Top> | undefined, unknown, Schema.Top | undefined>>(name: Name, options: SubagentDeclarationOptions<Input, Output, Instructions, Tools, Parameters, Success, Failure, Prepare, Project, 'error'> & {
|
|
2257
|
+
readonly target: Target;
|
|
2258
|
+
}): SubagentDelegation<Name, Input, Output, Instructions, Tools, Parameters, Success, Failure, Prepare, Project> & {
|
|
2259
|
+
readonly target: Target;
|
|
2260
|
+
};
|
|
2261
|
+
type InstructionResultOf<Instructions, Input> = Instructions extends ((input: Input) => infer Result) ? Result : Instructions;
|
|
2262
|
+
type InstructionErrorOf<Instructions, Input> = InstructionResultOf<Instructions, Input> extends Effect.Effect<infer _Success, infer Error, infer _Requirements> ? Error : never;
|
|
2263
|
+
type InstructionRequirementsOf<Instructions, Input> = InstructionResultOf<Instructions, Input> extends Effect.Effect<infer _Success, infer _Error, infer Requirements> ? Requirements : never;
|
|
2264
|
+
/**
|
|
2265
|
+
* Every expected child Run failure the delegation's total mapping must cover:
|
|
2266
|
+
* the child's inferred Agent failures plus
|
|
2267
|
+
* the interpreter's policy, protocol, and approval failures. Interruption and
|
|
2268
|
+
* defects are not members; they retain their distinct semantics.
|
|
2269
|
+
*/
|
|
2270
|
+
type SubagentChildRunFailure<TargetInput extends Schema.Top, TargetOutput extends Schema.Top, TargetInstructions, TargetTools extends Record<string, Tool.Any>, ModelProvides, ModelRequires, InstructionError = InstructionErrorOf<TargetInstructions, TargetInput['Type']>, InstructionRequirements = InstructionRequirementsOf<TargetInstructions, TargetInput['Type']>, InputPromptValue extends InputPromptSource<TargetInput['Type'], unknown, unknown> | undefined = undefined, UpdatesSchema extends Schema.Top | undefined = undefined, RunDispositionValue extends RunDispositionDeclaration<TargetOutput['Type'], Schema.Top> | undefined = undefined> = AgentRuntimeFailure<RuntimeBinding<TargetInput, TargetOutput, TargetInstructions, TargetTools, ModelProvides, ModelRequires, InstructionError, InstructionRequirements, RunDispositionValue, InputPromptValue, UpdatesSchema>, never, InstructionError>;
|
|
2271
|
+
/**
|
|
2272
|
+
* Construction requirements of one `Subagent.layer`: the child
|
|
2273
|
+
* Binding's full runtime requirements (Model Layer requirements, child Tool
|
|
2274
|
+
* handlers and their services, Schema services), both projection
|
|
2275
|
+
* requirements, and the parent-owned reservation service. Nothing here leaks
|
|
2276
|
+
* into the per-call Tool handler requirements. ThreadHistory and RunContextPreparation belong
|
|
2277
|
+
* to the parent Run's AgentSpawner and are inherited at invocation rather than captured here.
|
|
2278
|
+
*/
|
|
2279
|
+
type SubagentLayerRequirements<TargetInput extends Schema.Top, TargetOutput extends Schema.Top, TargetInstructions, TargetTools extends Record<string, Tool.Any>, ModelProvides, ModelRequires, PrepareRequirements, ProjectRequirements, HookRequirements = never, InstructionError = InstructionErrorOf<TargetInstructions, TargetInput['Type']>, InstructionRequirements = InstructionRequirementsOf<TargetInstructions, TargetInput['Type']>, InputPromptValue extends InputPromptSource<TargetInput['Type'], unknown, unknown> | undefined = undefined, UpdatesSchema extends Schema.Top | undefined = undefined, RunDispositionValue extends RunDispositionDeclaration<TargetOutput['Type'], Schema.Top> | undefined = undefined> = Exclude<AgentRuntimeRequirements<RuntimeBinding<TargetInput, TargetOutput, TargetInstructions, TargetTools, ModelProvides, ModelRequires, InstructionError, InstructionRequirements, RunDispositionValue, InputPromptValue, UpdatesSchema>, HookRequirements, InstructionRequirements>, ThreadHistory | RunContextPreparation> | TargetInput['EncodingServices'] | PrepareRequirements | ProjectRequirements | SubagentReservations;
|
|
2280
|
+
declare const SubagentDurableAccounting_base: Schema.Class<SubagentDurableAccounting, Schema.Struct<{
|
|
2281
|
+
/** The per-invocation allocation reserved at establishment. */
|
|
2282
|
+
readonly allocation: typeof SubagentReservationAmounts;
|
|
2283
|
+
/** Final consumed decision per dimension. */
|
|
2284
|
+
readonly consumed: typeof SubagentReservationAmounts;
|
|
2285
|
+
/** Amounts returned to the parent: `allocation - consumed` per dimension. */
|
|
2286
|
+
readonly released: typeof SubagentReservationAmounts;
|
|
2287
|
+
/** How the decision was computed; the handler only ever reports conservatively. */
|
|
2288
|
+
readonly basis: Schema.Literals<readonly ["reserved-conservative"]>;
|
|
2289
|
+
}>, {}>;
|
|
2290
|
+
/**
|
|
2291
|
+
* The conservative final accounting summary the durable delegation handler
|
|
2292
|
+
* attaches to every settlement join. The handler has no live child usage stream at durable join
|
|
2293
|
+
* time, so every dimension conservatively consumes its full reservation and
|
|
2294
|
+
* releases nothing — unreported usage never creates budget. The coordinator
|
|
2295
|
+
* owns the canonical accounting decision on `SubagentJoined` and may replace
|
|
2296
|
+
* structural dimensions from canonical child evidence; this value is opaque
|
|
2297
|
+
* encoded policy math to the engine and to storage adapters (D8).
|
|
2298
|
+
*/
|
|
2299
|
+
declare class SubagentDurableAccounting extends SubagentDurableAccounting_base {}
|
|
2300
|
+
/** Options accepted by `Subagent.layer`. */
|
|
2301
|
+
interface SubagentRuntimeOptions<Failure extends Schema.Top, ChildFailure, HookRequirements = never> {
|
|
2302
|
+
/**
|
|
2303
|
+
* Total mapping from every expected child Run failure to the declared Tool
|
|
2304
|
+
* failure (SUB-028). The parameter type is the child Binding's complete
|
|
2305
|
+
* expected failure union, so a mapping that covers only part of it is a
|
|
2306
|
+
* compile error. Interruption stays interruption and defects stay defects;
|
|
2307
|
+
* neither reaches this mapping.
|
|
2308
|
+
* When omitted, failures become bounded `SubagentExecutionFailure` values.
|
|
2309
|
+
*/
|
|
2310
|
+
readonly mapChildFailure?: ((failure: ChildFailure) => Failure['Type']) | undefined;
|
|
2311
|
+
/**
|
|
2312
|
+
* Override the parent-Run delegation caps registered with
|
|
2313
|
+
* `SubagentReservations`. An explicit policy uses `delegationCapsFromPolicy(policy)`;
|
|
2314
|
+
* an omitted policy uses one pool sized from the parent policy.
|
|
2315
|
+
* Supply shared caps explicitly when one parent Run uses several delegation
|
|
2316
|
+
* Tools, because re-registering different caps denies start fail-closed.
|
|
2317
|
+
*/
|
|
2318
|
+
readonly parentCaps?: SubagentDelegationCaps | undefined;
|
|
2319
|
+
/**
|
|
2320
|
+
* Seed child Run options (approval, context, input hooks) so child actions
|
|
2321
|
+
* follow their own ordinary approval and policy (SUB-026). Hook failures
|
|
2322
|
+
* must be handled inside the hook (`never` in `E`); a supplied budget hook
|
|
2323
|
+
* is composed after the reservation's own usage observation.
|
|
2324
|
+
*/
|
|
2325
|
+
readonly child?: SpawnRunOptions<never, HookRequirements> | undefined;
|
|
2326
|
+
}
|
|
2327
|
+
/**
|
|
2328
|
+
* Build the Toolkit handler Layer using the provided model requirement, or pass
|
|
2329
|
+
* a native model / explicit child Binding as an override. Without an override,
|
|
2330
|
+
* provide the model with Layer.provide; the handler captures it at construction.
|
|
2331
|
+
*
|
|
2332
|
+
* Construction requirements carry the child Binding's full runtime needs and
|
|
2333
|
+
* both projections; they are captured once via `Effect.context` so the
|
|
2334
|
+
* per-call handler requirements stay exactly the Tool's declared engine
|
|
2335
|
+
* dependencies. The handler dispatches on the engine-provided per-batch
|
|
2336
|
+
* `SubagentDurability` service mode:
|
|
2337
|
+
*
|
|
2338
|
+
* - **ephemeral** (the explicit engine default when no durable coordinator
|
|
2339
|
+
* supplied `InterpreterOptions.subagent`): the S1 path unchanged — preflight, an
|
|
2340
|
+
* in-process scoped child Run (SUB-011/012), stable lifecycle events,
|
|
2341
|
+
* total-mapped expected child failures, and Scope-finalizer reservation
|
|
2342
|
+
* settlement on every exit path.
|
|
2343
|
+
* - **durable** (S2): the same fail-closed preflight and input projection,
|
|
2344
|
+
* then idempotent establishment through the coordinator (spec §12 steps
|
|
2345
|
+
* 2-9) with construction-fixed child Binding digests, encoded grant, and
|
|
2346
|
+
* encoded allocation; the engine-owned waiting signal while the attached
|
|
2347
|
+
* child is nonterminal; and, on re-entry with a settled child, output
|
|
2348
|
+
* decoding, `projectResult`, and ONE atomic settlement join carrying the
|
|
2349
|
+
* conservative accounting summary. Failed children join as the bounded
|
|
2350
|
+
* `SubagentExecutionFailure`; no in-process child fiber ever starts.
|
|
2351
|
+
*/
|
|
2352
|
+
declare function layer<Name extends string, TargetInput extends Schema.Top, TargetOutput extends Schema.Top, TargetInstructions, TargetTools extends Record<string, Tool.Any>, Parameters extends Schema.Top, Success extends Schema.Top, Failure extends Schema.Top, PrepareRequirements, ProjectRequirements, HookRequirements = never, Mode extends SubagentFailureMode = 'error', InstructionError = InstructionErrorOf<TargetInstructions, TargetInput['Type']>, InstructionRequirements = InstructionRequirementsOf<TargetInstructions, TargetInput['Type']>, InputPromptValue extends InputPromptSource<TargetInput['Type'], unknown, unknown> | undefined = undefined, UpdatesSchema extends Schema.Top | undefined = undefined, RunDispositionValue extends RunDispositionDeclaration<TargetOutput['Type'], Schema.Top> | undefined = undefined>(delegation: SubagentDelegation<Name, TargetInput, TargetOutput, TargetInstructions, TargetTools, Parameters, Success, Failure, PrepareRequirements, ProjectRequirements, Mode> & {
|
|
2353
|
+
readonly target: {
|
|
2354
|
+
readonly instructions: InstructionSource<TargetInput['Type'], NoInfer<InstructionError>, NoInfer<InstructionRequirements>>;
|
|
2355
|
+
readonly inputPrompt?: InputPromptValue | undefined;
|
|
2356
|
+
readonly updates?: UpdatesSchema | undefined;
|
|
2357
|
+
readonly runDisposition?: RunDispositionValue | undefined;
|
|
2358
|
+
};
|
|
2359
|
+
}, modelOrBinding?: undefined, options?: SubagentRuntimeOptions<Failure, SubagentChildRunFailure<TargetInput, TargetOutput, TargetInstructions, TargetTools, never, ModelServices, InstructionError, InstructionRequirements, InputPromptValue, UpdatesSchema, RunDispositionValue>, HookRequirements>): Layer.Layer<Tool.HandlersFor<SubagentTools<Name, Parameters, Success, Failure, Mode>>, never, SubagentLayerRequirements<TargetInput, TargetOutput, TargetInstructions, TargetTools, never, ModelServices, PrepareRequirements, ProjectRequirements, HookRequirements, InstructionError, InstructionRequirements, InputPromptValue, UpdatesSchema, RunDispositionValue>>;
|
|
2360
|
+
declare function layer<Name extends string, TargetInput extends Schema.Top, TargetOutput extends Schema.Top, TargetInstructions, TargetTools extends Record<string, Tool.Any>, Parameters extends Schema.Top, Success extends Schema.Top, Failure extends Schema.Top, PrepareRequirements, ProjectRequirements, ModelProvides, ModelRequires, HookRequirements = never, Mode extends SubagentFailureMode = 'error', InstructionError = InstructionErrorOf<TargetInstructions, TargetInput['Type']>, InstructionRequirements = InstructionRequirementsOf<TargetInstructions, TargetInput['Type']>, InputPromptValue extends InputPromptSource<TargetInput['Type'], unknown, unknown> | undefined = undefined, UpdatesSchema extends Schema.Top | undefined = undefined, RunDispositionValue extends RunDispositionDeclaration<TargetOutput['Type'], Schema.Top> | undefined = undefined>(delegation: SubagentDelegation<Name, TargetInput, TargetOutput, TargetInstructions, TargetTools, Parameters, Success, Failure, PrepareRequirements, ProjectRequirements, Mode> & {
|
|
2361
|
+
readonly target: {
|
|
2362
|
+
readonly instructions: InstructionSource<TargetInput['Type'], NoInfer<InstructionError>, NoInfer<InstructionRequirements>>;
|
|
2363
|
+
readonly inputPrompt?: InputPromptValue | undefined;
|
|
2364
|
+
readonly updates?: UpdatesSchema | undefined;
|
|
2365
|
+
readonly runDisposition?: RunDispositionValue | undefined;
|
|
2366
|
+
};
|
|
2367
|
+
}, modelOrBinding: RuntimeBinding<TargetInput, TargetOutput, TargetInstructions, TargetTools, ModelProvides, ModelRequires, InstructionError, InstructionRequirements, RunDispositionValue, InputPromptValue, UpdatesSchema> | RuntimeBinding<TargetInput, TargetOutput, TargetInstructions, TargetTools, ModelProvides, ModelRequires, InstructionError, InstructionRequirements, RunDispositionValue, InputPromptValue, UpdatesSchema>['model'], options?: SubagentRuntimeOptions<Failure, SubagentChildRunFailure<TargetInput, TargetOutput, TargetInstructions, TargetTools, ModelProvides, ModelRequires, InstructionError, InstructionRequirements, InputPromptValue, UpdatesSchema, RunDispositionValue>, HookRequirements>): Layer.Layer<Tool.HandlersFor<SubagentTools<Name, Parameters, Success, Failure, Mode>>, never, SubagentLayerRequirements<TargetInput, TargetOutput, TargetInstructions, TargetTools, ModelProvides, ModelRequires, PrepareRequirements, ProjectRequirements, HookRequirements, InstructionError, InstructionRequirements, InputPromptValue, UpdatesSchema, RunDispositionValue>>;
|
|
2368
|
+
export { inspect as A, SubagentProjectionFailure as B, Worker as C, cancelTool as D, cancel as E, start as F, delegationCapsFromPolicy as H, startTool as I, stop as L, list as M, listTool as N, followUp as O, observe as P, summaryTool as R, StartToolOptions as S, awaitWorker as T, delegationAllocationFromPolicy as V, Subagent_d_exports as _, SubagentDelegation as a, ReportingOptions as b, SubagentLayerRequirements as c, SubagentResultContext as d, SubagentReturnModeFailure as f, SubagentTools as g, SubagentToolFailure as h, SubagentDefineOptions as i, inspectTool as j, followUpTool as k, SubagentPrepareContext as l, SubagentTool as m, SubagentContainedFailure as n, SubagentDurableAccounting as o, SubagentRuntimeOptions as p, SubagentDeclarationOptions as r, SubagentFailureMode as s, SubagentChildRunFailure as t, SubagentResult as u, layer as v, WorkerObservation as w, reporting as x, make as y, SubagentPrestartDenied as z };
|