effect-agent 0.1.0-beta.9 → 0.1.0-beta.91
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/dist/Agent-CN0EWRsR.d.mts +226 -0
- package/dist/Agent-RklVROrm.mjs +83 -0
- package/dist/Agent-RklVROrm.mjs.map +1 -0
- package/dist/AgentError-CggcAQ7V.d.mts +101 -0
- package/dist/AgentPolicy-CetmQrf3.d.mts +96 -0
- package/dist/AgentRuntime-CHipL2jG.mjs +4598 -0
- package/dist/AgentRuntime-CHipL2jG.mjs.map +1 -0
- package/dist/AgentRuntime-uxR_a4VM.d.mts +346 -0
- package/dist/AgentUpdates-DMJ-_xow.d.mts +53 -0
- package/dist/ContextCompactor-Dxu5zhOL.d.mts +161 -0
- package/dist/ContextWindow-DRQ5Mbm2.d.mts +58 -0
- package/dist/DurableAgentRuntime-D7gDKGjH.mjs +6368 -0
- package/dist/DurableAgentRuntime-D7gDKGjH.mjs.map +1 -0
- package/dist/DurableFailpoint-Oinuuedm.d.mts +41 -0
- package/dist/DurableStep-Cry_iol4.d.mts +103 -0
- package/dist/Ephemeral.d.mts +22 -0
- package/dist/Ephemeral.mjs +22 -0
- package/dist/Ephemeral.mjs.map +1 -0
- package/dist/EventSource-OqS_P9ug.d.mts +51 -0
- package/dist/Identifiers-CN2s30fF.d.mts +40 -0
- package/dist/MemoryNamespace-BbRW5p71.d.mts +36 -0
- package/dist/MemoryReference-B8Q3UJoJ.d.mts +79 -0
- package/dist/Messaging-CkcIdt4I.d.mts +490 -0
- package/dist/MessagingHost-CRk0kXzT.d.mts +246 -0
- package/dist/MessagingHost-CWi_PP3g.mjs +137 -0
- package/dist/MessagingHost-CWi_PP3g.mjs.map +1 -0
- package/dist/OperationAuthorizer-TzcQtpX5.d.mts +61 -0
- package/dist/Output-D6SkedVx.d.mts +25 -0
- package/dist/PageCapture-Df8Xwskw.d.mts +583 -0
- package/dist/PageScreenshot-BpgZKAxl.d.mts +48 -0
- package/dist/PreparedInputAdmission-C4HbjHgl.d.mts +38 -0
- package/dist/Receipt-BAHyigAF.d.mts +33 -0
- package/dist/Records-BAGkekt8.d.mts +3570 -0
- package/dist/RunEvent-DIrzkjLr.d.mts +460 -0
- package/dist/RunEventSink-D5aVhISG.d.mts +108 -0
- package/dist/RunJournal-Cgg1kNvc.mjs +825 -0
- package/dist/RunJournal-Cgg1kNvc.mjs.map +1 -0
- package/dist/RunOptions-g1aigcKI.d.mts +915 -0
- package/dist/RunPolicyUsage-ClZxyR46.d.mts +21 -0
- package/dist/Sandbox-CEsDWBLq.d.mts +173 -0
- package/dist/Schedule-H3SEYX9g.d.mts +842 -0
- package/dist/Scheduling-C9aIP8zT.mjs +691 -0
- package/dist/Scheduling-C9aIP8zT.mjs.map +1 -0
- package/dist/Subagent-DyfzHNdv.d.mts +826 -0
- package/dist/Subagent-U5qXOFE8.mjs +1469 -0
- package/dist/Subagent-U5qXOFE8.mjs.map +1 -0
- package/dist/SubagentContract-DdT7Cqe6.d.mts +116 -0
- package/dist/SubagentHost-CJUBQlcc.d.mts +140 -0
- package/dist/Subscription-BEP8oQO5.d.mts +921 -0
- package/dist/SubscriptionInput-vAAOBrK7.d.mts +41 -0
- package/dist/Thread-DOBQ0QUY.d.mts +96 -0
- package/dist/ThreadHistory-tS1KwxHR.d.mts +60 -0
- package/dist/ToolBroker-DWs4tZra.d.mts +133 -0
- package/dist/ToolExposure-9uF_Yo0T.mjs +10 -0
- package/dist/ToolExposure-9uF_Yo0T.mjs.map +1 -0
- package/dist/ToolExposure-C93U1sPu.mjs +30 -0
- package/dist/ToolExposure-C93U1sPu.mjs.map +1 -0
- package/dist/ToolExposure-UCN12eCd.d.mts +39 -0
- package/dist/ToolExposure-r2eOWk4F.d.mts +46 -0
- package/dist/ToolExposure.d.mts +8 -0
- package/dist/ToolExposure.mjs +21 -0
- package/dist/ToolExposure.mjs.map +1 -0
- package/dist/ToolReconciler-DQVaJfpE.d.mts +76 -0
- package/dist/ToolResult-DmmgoChv.d.mts +61 -0
- package/dist/Usage-Dx0aknfk.d.mts +121 -0
- package/dist/WakeScheduler-EjUF-GhC.d.mts +56 -0
- package/dist/Worker-CaPYykpe.d.mts +228 -0
- package/dist/agent-registration-CWDMOAZA.mjs +172 -0
- package/dist/agent-registration-CWDMOAZA.mjs.map +1 -0
- package/dist/capabilities/Approval.d.mts +114 -0
- package/dist/capabilities/Approval.mjs +226 -0
- package/dist/capabilities/Approval.mjs.map +1 -0
- package/dist/capabilities/Budget.d.mts +112 -0
- package/dist/capabilities/Budget.mjs +346 -0
- package/dist/capabilities/Budget.mjs.map +1 -0
- package/dist/capabilities/CodeMode.d.mts +157 -0
- package/dist/capabilities/CodeMode.mjs +522 -0
- package/dist/capabilities/CodeMode.mjs.map +1 -0
- package/dist/capabilities/Commands.d.mts +55 -0
- package/dist/capabilities/Commands.mjs +57 -0
- package/dist/capabilities/Commands.mjs.map +1 -0
- package/dist/capabilities/ContextTools.d.mts +321 -0
- package/dist/capabilities/ContextTools.mjs +126 -0
- package/dist/capabilities/ContextTools.mjs.map +1 -0
- package/dist/capabilities/Mcp.d.mts +108 -0
- package/dist/capabilities/Mcp.mjs +260 -0
- package/dist/capabilities/Mcp.mjs.map +1 -0
- package/dist/capabilities/McpClient.d.mts +115 -0
- package/dist/capabilities/McpClient.mjs +506 -0
- package/dist/capabilities/McpClient.mjs.map +1 -0
- package/dist/capabilities/MemoryNotes.d.mts +424 -0
- package/dist/capabilities/MemoryNotes.mjs +128 -0
- package/dist/capabilities/MemoryNotes.mjs.map +1 -0
- package/dist/capabilities/Messaging.d.mts +3 -0
- package/dist/capabilities/Messaging.mjs +151 -0
- package/dist/capabilities/Messaging.mjs.map +1 -0
- package/dist/capabilities/ModelContext.d.mts +89 -0
- package/dist/capabilities/ModelContext.mjs +168 -0
- package/dist/capabilities/ModelContext.mjs.map +1 -0
- package/dist/capabilities/Redaction.d.mts +37 -0
- package/dist/capabilities/Redaction.mjs +104 -0
- package/dist/capabilities/Redaction.mjs.map +1 -0
- package/dist/capabilities/Remembering.d.mts +434 -0
- package/dist/capabilities/Remembering.mjs +290 -0
- package/dist/capabilities/Remembering.mjs.map +1 -0
- package/dist/capabilities/RunHooks.d.mts +82 -0
- package/dist/capabilities/RunHooks.mjs +144 -0
- package/dist/capabilities/RunHooks.mjs.map +1 -0
- package/dist/capabilities/SemanticMemory.d.mts +431 -0
- package/dist/capabilities/SemanticMemory.mjs +315 -0
- package/dist/capabilities/SemanticMemory.mjs.map +1 -0
- package/dist/capabilities/Subagent.d.mts +4 -0
- package/dist/capabilities/Subagent.mjs +5 -0
- package/dist/capabilities/SubagentReservations.d.mts +186 -0
- package/dist/capabilities/SubagentReservations.mjs +479 -0
- package/dist/capabilities/SubagentReservations.mjs.map +1 -0
- package/dist/capabilities/ToolDiscovery.d.mts +109 -0
- package/dist/capabilities/ToolDiscovery.mjs +211 -0
- package/dist/capabilities/ToolDiscovery.mjs.map +1 -0
- package/dist/capabilities/WebCapture.d.mts +163 -0
- package/dist/capabilities/WebCapture.mjs +335 -0
- package/dist/capabilities/WebCapture.mjs.map +1 -0
- package/dist/capabilities/WebSearch.d.mts +71 -0
- package/dist/capabilities/WebSearch.mjs +112 -0
- package/dist/capabilities/WebSearch.mjs.map +1 -0
- package/dist/compaction-C2OTceKw.mjs +505 -0
- package/dist/compaction-C2OTceKw.mjs.map +1 -0
- package/dist/core/Agent.d.mts +2 -0
- package/dist/core/Agent.mjs +2 -0
- package/dist/core/AgentError.d.mts +2 -0
- package/dist/core/AgentError.mjs +117 -0
- package/dist/core/AgentError.mjs.map +1 -0
- package/dist/core/AgentPolicy.d.mts +2 -0
- package/dist/core/AgentPolicy.mjs +94 -0
- package/dist/core/AgentPolicy.mjs.map +1 -0
- package/dist/core/AgentUpdates.d.mts +2 -0
- package/dist/core/AgentUpdates.mjs +63 -0
- package/dist/core/AgentUpdates.mjs.map +1 -0
- package/dist/core/IdGenerator.d.mts +26 -0
- package/dist/core/IdGenerator.mjs +27 -0
- package/dist/core/IdGenerator.mjs.map +1 -0
- package/dist/core/Identifiers.d.mts +2 -0
- package/dist/core/Identifiers.mjs +43 -0
- package/dist/core/Identifiers.mjs.map +1 -0
- package/dist/core/Memory.d.mts +57 -0
- package/dist/core/Memory.mjs +203 -0
- package/dist/core/Memory.mjs.map +1 -0
- package/dist/core/MemoryNamespace.d.mts +2 -0
- package/dist/core/MemoryNamespace.mjs +116 -0
- package/dist/core/MemoryNamespace.mjs.map +1 -0
- package/dist/core/MemoryReference.d.mts +2 -0
- package/dist/core/MemoryReference.mjs +109 -0
- package/dist/core/MemoryReference.mjs.map +1 -0
- package/dist/core/MemoryRevalidation.d.mts +65 -0
- package/dist/core/MemoryRevalidation.mjs +126 -0
- package/dist/core/MemoryRevalidation.mjs.map +1 -0
- package/dist/core/MemoryStore.d.mts +186 -0
- package/dist/core/MemoryStore.mjs +243 -0
- package/dist/core/MemoryStore.mjs.map +1 -0
- package/dist/core/Receipt.d.mts +2 -0
- package/dist/core/Receipt.mjs +36 -0
- package/dist/core/Receipt.mjs.map +1 -0
- package/dist/core/RememberingStore.d.mts +1562 -0
- package/dist/core/RememberingStore.mjs +190 -0
- package/dist/core/RememberingStore.mjs.map +1 -0
- package/dist/core/RunEvent.d.mts +2 -0
- package/dist/core/RunEvent.mjs +337 -0
- package/dist/core/RunEvent.mjs.map +1 -0
- package/dist/core/RunPolicyUsage.d.mts +2 -0
- package/dist/core/RunPolicyUsage.mjs +21 -0
- package/dist/core/RunPolicyUsage.mjs.map +1 -0
- package/dist/core/SemanticMemoryIndex.d.mts +826 -0
- package/dist/core/SemanticMemoryIndex.mjs +185 -0
- package/dist/core/SemanticMemoryIndex.mjs.map +1 -0
- package/dist/core/SemanticMemoryRevalidation.d.mts +45 -0
- package/dist/core/SemanticMemoryRevalidation.mjs +191 -0
- package/dist/core/SemanticMemoryRevalidation.mjs.map +1 -0
- package/dist/core/SubagentContract.d.mts +2 -0
- package/dist/core/SubagentContract.mjs +148 -0
- package/dist/core/SubagentContract.mjs.map +1 -0
- package/dist/core/Thread.d.mts +2 -0
- package/dist/core/Thread.mjs +250 -0
- package/dist/core/Thread.mjs.map +1 -0
- package/dist/core/ToolResult.d.mts +2 -0
- package/dist/core/ToolResult.mjs +140 -0
- package/dist/core/ToolResult.mjs.map +1 -0
- package/dist/core/Usage.d.mts +2 -0
- package/dist/core/Usage.mjs +319 -0
- package/dist/core/Usage.mjs.map +1 -0
- package/dist/core/Worker.d.mts +3 -0
- package/dist/core/Worker.mjs +147 -0
- package/dist/core/Worker.mjs.map +1 -0
- package/dist/durable/ActivityStore.d.mts +116 -0
- package/dist/durable/ActivityStore.mjs +131 -0
- package/dist/durable/ActivityStore.mjs.map +1 -0
- package/dist/durable/Admin.d.mts +2 -0
- package/dist/durable/Admin.mjs +328 -0
- package/dist/durable/Admin.mjs.map +1 -0
- package/dist/durable/AgentRegistration.d.mts +2 -0
- package/dist/durable/AgentRegistration.mjs +14 -0
- package/dist/durable/AgentRegistration.mjs.map +1 -0
- package/dist/durable/Certification.d.mts +111 -0
- package/dist/durable/Certification.mjs +159 -0
- package/dist/durable/Certification.mjs.map +1 -0
- package/dist/durable/CommittedActivity.d.mts +62 -0
- package/dist/durable/CommittedActivity.mjs +159 -0
- package/dist/durable/CommittedActivity.mjs.map +1 -0
- package/dist/durable/Digest.d.mts +2 -0
- package/dist/durable/Digest.mjs +50 -0
- package/dist/durable/Digest.mjs.map +1 -0
- package/dist/durable/DurableAgentRuntime.d.mts +3 -0
- package/dist/durable/DurableAgentRuntime.mjs +3 -0
- package/dist/durable/DurableFailpoint.d.mts +2 -0
- package/dist/durable/DurableFailpoint.mjs +94 -0
- package/dist/durable/DurableFailpoint.mjs.map +1 -0
- package/dist/durable/DurableFailpointTestControl.d.mts +15 -0
- package/dist/durable/DurableFailpointTestControl.mjs +19 -0
- package/dist/durable/DurableFailpointTestControl.mjs.map +1 -0
- package/dist/durable/EventSource.d.mts +2 -0
- package/dist/durable/EventSource.mjs +65 -0
- package/dist/durable/EventSource.mjs.map +1 -0
- package/dist/durable/GitHubWorkflowSource.d.mts +144 -0
- package/dist/durable/GitHubWorkflowSource.mjs +209 -0
- package/dist/durable/GitHubWorkflowSource.mjs.map +1 -0
- package/dist/durable/MessageDelivery.d.mts +492 -0
- package/dist/durable/MessageDelivery.mjs +495 -0
- package/dist/durable/MessageDelivery.mjs.map +1 -0
- package/dist/durable/MessageDeliveryStoreConformance.d.mts +358 -0
- package/dist/durable/MessageDeliveryStoreConformance.mjs +243 -0
- package/dist/durable/MessageDeliveryStoreConformance.mjs.map +1 -0
- package/dist/durable/OperationAuthorizer.d.mts +2 -0
- package/dist/durable/OperationAuthorizer.mjs +70 -0
- package/dist/durable/OperationAuthorizer.mjs.map +1 -0
- package/dist/durable/PersistentHistory.d.mts +16 -0
- package/dist/durable/PersistentHistory.mjs +125 -0
- package/dist/durable/PersistentHistory.mjs.map +1 -0
- package/dist/durable/PreparedInputAdmission.d.mts +2 -0
- package/dist/durable/PreparedInputAdmission.mjs +34 -0
- package/dist/durable/PreparedInputAdmission.mjs.map +1 -0
- package/dist/durable/Records.d.mts +2 -0
- package/dist/durable/Records.mjs +795 -0
- package/dist/durable/Records.mjs.map +1 -0
- package/dist/durable/Recovery.d.mts +2 -0
- package/dist/durable/Recovery.mjs +739 -0
- package/dist/durable/Recovery.mjs.map +1 -0
- package/dist/durable/RunJournal.d.mts +2 -0
- package/dist/durable/RunJournal.mjs +2 -0
- package/dist/durable/Schedule.d.mts +2 -0
- package/dist/durable/Schedule.mjs +382 -0
- package/dist/durable/Schedule.mjs.map +1 -0
- package/dist/durable/ScheduleStoreConformance.d.mts +18 -0
- package/dist/durable/ScheduleStoreConformance.mjs +420 -0
- package/dist/durable/ScheduleStoreConformance.mjs.map +1 -0
- package/dist/durable/ScheduleTransition.d.mts +24 -0
- package/dist/durable/ScheduleTransition.mjs +180 -0
- package/dist/durable/ScheduleTransition.mjs.map +1 -0
- package/dist/durable/Scheduling.d.mts +54 -0
- package/dist/durable/Scheduling.mjs +2 -0
- package/dist/durable/SqlMemoryStore.d.mts +30 -0
- package/dist/durable/SqlMemoryStore.mjs +436 -0
- package/dist/durable/SqlMemoryStore.mjs.map +1 -0
- package/dist/durable/SqlMessageDeliveryStore.d.mts +40 -0
- package/dist/durable/SqlMessageDeliveryStore.mjs +167 -0
- package/dist/durable/SqlMessageDeliveryStore.mjs.map +1 -0
- package/dist/durable/SqlStorageV2Upgrade.d.mts +22 -0
- package/dist/durable/SqlStorageV2Upgrade.mjs +459 -0
- package/dist/durable/SqlStorageV2Upgrade.mjs.map +1 -0
- package/dist/durable/SqlSubscriptionStore.d.mts +63 -0
- package/dist/durable/SqlSubscriptionStore.mjs +751 -0
- package/dist/durable/SqlSubscriptionStore.mjs.map +1 -0
- package/dist/durable/SubmissionLedger.d.mts +3 -0
- package/dist/durable/SubmissionLedger.mjs +914 -0
- package/dist/durable/SubmissionLedger.mjs.map +1 -0
- package/dist/durable/SubmissionLedgerConformance.d.mts +30 -0
- package/dist/durable/SubmissionLedgerConformance.mjs +1986 -0
- package/dist/durable/SubmissionLedgerConformance.mjs.map +1 -0
- package/dist/durable/SubmissionStatus.d.mts +2 -0
- package/dist/durable/SubmissionStatus.mjs +18 -0
- package/dist/durable/SubmissionStatus.mjs.map +1 -0
- package/dist/durable/Subscription.d.mts +2 -0
- package/dist/durable/Subscription.mjs +360 -0
- package/dist/durable/Subscription.mjs.map +1 -0
- package/dist/durable/SubscriptionInput.d.mts +2 -0
- package/dist/durable/SubscriptionInput.mjs +52 -0
- package/dist/durable/SubscriptionInput.mjs.map +1 -0
- package/dist/durable/SubscriptionStoreConformance.d.mts +17 -0
- package/dist/durable/SubscriptionStoreConformance.mjs +625 -0
- package/dist/durable/SubscriptionStoreConformance.mjs.map +1 -0
- package/dist/durable/SubscriptionTools.d.mts +273 -0
- package/dist/durable/SubscriptionTools.mjs +190 -0
- package/dist/durable/SubscriptionTools.mjs.map +1 -0
- package/dist/durable/SubscriptionTransition.d.mts +21 -0
- package/dist/durable/SubscriptionTransition.mjs +148 -0
- package/dist/durable/SubscriptionTransition.mjs.map +1 -0
- package/dist/durable/Subscriptions.d.mts +73 -0
- package/dist/durable/Subscriptions.mjs +627 -0
- package/dist/durable/Subscriptions.mjs.map +1 -0
- package/dist/durable/ThreadContextHistory.d.mts +32 -0
- package/dist/durable/ThreadContextHistory.mjs +152 -0
- package/dist/durable/ThreadContextHistory.mjs.map +1 -0
- package/dist/durable/ThreadContextHistoryProjection.d.mts +60 -0
- package/dist/durable/ThreadContextHistoryProjection.mjs +149 -0
- package/dist/durable/ThreadContextHistoryProjection.mjs.map +1 -0
- package/dist/durable/ThreadInvariants.d.mts +74 -0
- package/dist/durable/ThreadInvariants.mjs +200 -0
- package/dist/durable/ThreadInvariants.mjs.map +1 -0
- package/dist/durable/ThreadProjection.d.mts +78 -0
- package/dist/durable/ThreadProjection.mjs +158 -0
- package/dist/durable/ThreadProjection.mjs.map +1 -0
- package/dist/durable/ThreadProjectionMaintenance.d.mts +49 -0
- package/dist/durable/ThreadProjectionMaintenance.mjs +33 -0
- package/dist/durable/ThreadProjectionMaintenance.mjs.map +1 -0
- package/dist/durable/ThreadStore.d.mts +2 -0
- package/dist/durable/ThreadStore.mjs +147 -0
- package/dist/durable/ThreadStore.mjs.map +1 -0
- package/dist/durable/ThreadStoreConformance.d.mts +29 -0
- package/dist/durable/ThreadStoreConformance.mjs +248 -0
- package/dist/durable/ThreadStoreConformance.mjs.map +1 -0
- package/dist/durable/ToolReconciler.d.mts +2 -0
- package/dist/durable/ToolReconciler.mjs +81 -0
- package/dist/durable/ToolReconciler.mjs.map +1 -0
- package/dist/durable/WakeScheduler.d.mts +2 -0
- package/dist/durable/WakeScheduler.mjs +85 -0
- package/dist/durable/WakeScheduler.mjs.map +1 -0
- package/dist/durable/WorkerHost.d.mts +129 -0
- package/dist/durable/WorkerHost.mjs +77 -0
- package/dist/durable/WorkerHost.mjs.map +1 -0
- package/dist/engine/AgentRuntime.d.mts +2 -0
- package/dist/engine/AgentRuntime.mjs +2 -0
- package/dist/engine/Compaction.d.mts +7 -0
- package/dist/engine/Compaction.mjs +16 -0
- package/dist/engine/Compaction.mjs.map +1 -0
- package/dist/engine/ContextCompactor.d.mts +2 -0
- package/dist/engine/ContextCompactor.mjs +119 -0
- package/dist/engine/ContextCompactor.mjs.map +1 -0
- package/dist/engine/ContextHistory.d.mts +65 -0
- package/dist/engine/ContextHistory.mjs +76 -0
- package/dist/engine/ContextHistory.mjs.map +1 -0
- package/dist/engine/ContextWindow.d.mts +2 -0
- package/dist/engine/ContextWindow.mjs +59 -0
- package/dist/engine/ContextWindow.mjs.map +1 -0
- package/dist/engine/DurableStep.d.mts +2 -0
- package/dist/engine/DurableStep.mjs +62 -0
- package/dist/engine/DurableStep.mjs.map +1 -0
- package/dist/engine/MessagingHost.d.mts +2 -0
- package/dist/engine/MessagingHost.mjs +2 -0
- package/dist/engine/Output.d.mts +2 -0
- package/dist/engine/Output.mjs +8 -0
- package/dist/engine/Output.mjs.map +1 -0
- package/dist/engine/RunEventSink.d.mts +2 -0
- package/dist/engine/RunEventSink.mjs +22 -0
- package/dist/engine/RunEventSink.mjs.map +1 -0
- package/dist/engine/RunOptions.d.mts +2 -0
- package/dist/engine/RunOptions.mjs +122 -0
- package/dist/engine/RunOptions.mjs.map +1 -0
- package/dist/engine/SubagentHost.d.mts +2 -0
- package/dist/engine/SubagentHost.mjs +72 -0
- package/dist/engine/SubagentHost.mjs.map +1 -0
- package/dist/engine/ThreadHistory.d.mts +2 -0
- package/dist/engine/ThreadHistory.mjs +67 -0
- package/dist/engine/ThreadHistory.mjs.map +1 -0
- package/dist/engine/ToolBroker.d.mts +2 -0
- package/dist/engine/ToolBroker.mjs +42 -0
- package/dist/engine/ToolBroker.mjs.map +1 -0
- package/dist/foreign-diagnostic-DBQ1XHKh.mjs +37 -0
- package/dist/foreign-diagnostic-DBQ1XHKh.mjs.map +1 -0
- package/dist/index.d.mts +89 -6
- package/dist/index.mjs +98 -6
- package/dist/output-contract-BC7tjlGw.mjs +84 -0
- package/dist/output-contract-BC7tjlGw.mjs.map +1 -0
- package/dist/rolldown-runtime-D7D4PA-g.mjs +13 -0
- package/dist/sandbox/CodeExecutor.d.mts +194 -0
- package/dist/sandbox/CodeExecutor.mjs +278 -0
- package/dist/sandbox/CodeExecutor.mjs.map +1 -0
- package/dist/sandbox/InteractiveBrowser.d.mts +142 -0
- package/dist/sandbox/InteractiveBrowser.mjs +165 -0
- package/dist/sandbox/InteractiveBrowser.mjs.map +1 -0
- package/dist/sandbox/PageCapture.d.mts +2 -0
- package/dist/sandbox/PageCapture.mjs +450 -0
- package/dist/sandbox/PageCapture.mjs.map +1 -0
- package/dist/sandbox/PageCrawl.d.mts +88 -0
- package/dist/sandbox/PageCrawl.mjs +124 -0
- package/dist/sandbox/PageCrawl.mjs.map +1 -0
- package/dist/sandbox/PageScreenshot.d.mts +2 -0
- package/dist/sandbox/PageScreenshot.mjs +53 -0
- package/dist/sandbox/PageScreenshot.mjs.map +1 -0
- package/dist/sandbox/ProtectedBrowser.d.mts +273 -0
- package/dist/sandbox/ProtectedBrowser.mjs +287 -0
- package/dist/sandbox/ProtectedBrowser.mjs.map +1 -0
- package/dist/sandbox/Sandbox.d.mts +2 -0
- package/dist/sandbox/Sandbox.mjs +208 -0
- package/dist/sandbox/Sandbox.mjs.map +1 -0
- package/dist/utf8-BYfhEkcj.mjs +11 -0
- package/dist/utf8-BYfhEkcj.mjs.map +1 -0
- package/dist/utf8-DchGZRBd.mjs +23 -0
- package/dist/utf8-DchGZRBd.mjs.map +1 -0
- package/package.json +1 -40
- package/src/Ephemeral.ts +17 -0
- package/src/ToolExposure.ts +2 -0
- package/src/capabilities/Approval.ts +352 -0
- package/src/capabilities/Budget.ts +536 -0
- package/src/capabilities/CodeMode.ts +1090 -0
- package/src/capabilities/Commands.ts +86 -0
- package/src/capabilities/ContextTools.ts +184 -0
- package/src/capabilities/Mcp.ts +427 -0
- package/src/capabilities/McpClient.ts +967 -0
- package/src/capabilities/MemoryNotes.ts +174 -0
- package/src/capabilities/Messaging.ts +261 -0
- package/src/capabilities/ModelContext.ts +354 -0
- package/src/capabilities/Redaction.ts +157 -0
- package/src/capabilities/Remembering.ts +550 -0
- package/src/capabilities/RunHooks.ts +280 -0
- package/src/capabilities/SemanticMemory.ts +447 -0
- package/src/capabilities/Subagent.ts +2277 -0
- package/src/capabilities/SubagentReservations.ts +850 -0
- package/src/capabilities/ToolDiscovery.ts +339 -0
- package/src/capabilities/WebCapture.ts +722 -0
- package/src/capabilities/WebSearch.ts +184 -0
- package/src/capabilities/internal/subagent-background.ts +1106 -0
- package/src/capabilities/internal/subagent-contract.ts +142 -0
- package/src/capabilities/internal/subagent-policy.ts +235 -0
- package/src/capabilities/internal/subagent-reporting.ts +261 -0
- package/src/capabilities/internal/utf8.ts +10 -0
- package/src/core/Agent.ts +575 -0
- package/src/core/AgentError.ts +152 -0
- package/src/core/AgentPolicy.ts +153 -0
- package/src/core/AgentUpdates.ts +100 -0
- package/src/core/IdGenerator.ts +39 -0
- package/src/core/Identifiers.ts +48 -0
- package/src/core/Memory.ts +290 -0
- package/src/core/MemoryNamespace.ts +196 -0
- package/src/core/MemoryReference.ts +121 -0
- package/src/core/MemoryRevalidation.ts +185 -0
- package/src/core/MemoryStore.ts +368 -0
- package/src/core/Messaging.ts +90 -0
- package/src/core/Receipt.ts +42 -0
- package/src/core/RememberingStore.ts +300 -0
- package/src/core/RunEvent.ts +366 -0
- package/src/core/RunPolicyUsage.ts +17 -0
- package/src/core/SemanticMemoryIndex.ts +250 -0
- package/src/core/SemanticMemoryRevalidation.ts +254 -0
- package/src/core/SubagentContract.ts +196 -0
- package/src/core/Thread.ts +371 -0
- package/src/core/ToolExposure.ts +74 -0
- package/src/core/ToolResult.ts +170 -0
- package/src/core/Usage.ts +529 -0
- package/src/core/Worker.ts +173 -0
- package/src/core/internal/agent-updates.ts +32 -0
- package/src/core/internal/utf8.ts +23 -0
- package/src/durable/ActivityStore.ts +160 -0
- package/src/durable/Admin.ts +496 -0
- package/src/durable/AgentRegistration.ts +13 -0
- package/src/durable/Certification.ts +210 -0
- package/src/durable/CommittedActivity.ts +296 -0
- package/src/durable/Digest.ts +93 -0
- package/src/durable/DurableAgentRuntime.ts +10340 -0
- package/src/durable/DurableFailpoint.ts +103 -0
- package/src/durable/DurableFailpointTestControl.ts +39 -0
- package/src/durable/EventSource.ts +172 -0
- package/src/durable/GitHubWorkflowSource.ts +453 -0
- package/src/durable/MessageDelivery.ts +708 -0
- package/src/durable/MessageDeliveryStoreConformance.ts +363 -0
- package/src/durable/OperationAuthorizer.ts +85 -0
- package/src/durable/PersistentHistory.ts +260 -0
- package/src/durable/PreparedInputAdmission.ts +44 -0
- package/src/durable/Records.ts +1010 -0
- package/src/durable/Recovery.ts +1018 -0
- package/src/durable/RunJournal.ts +1479 -0
- package/src/durable/Schedule.ts +504 -0
- package/src/durable/ScheduleStoreConformance.ts +638 -0
- package/src/durable/ScheduleTransition.ts +265 -0
- package/src/durable/Scheduling.ts +1077 -0
- package/src/durable/SqlMemoryStore.ts +778 -0
- package/src/durable/SqlMessageDeliveryStore.ts +302 -0
- package/src/durable/SqlStorageV2Upgrade.ts +500 -0
- package/src/durable/SqlSubscriptionStore.ts +1440 -0
- package/src/durable/SubmissionLedger.ts +1201 -0
- package/src/durable/SubmissionLedgerConformance.ts +4579 -0
- package/src/durable/SubmissionStatus.ts +14 -0
- package/src/durable/Subscription.ts +544 -0
- package/src/durable/SubscriptionInput.ts +144 -0
- package/src/durable/SubscriptionStoreConformance.ts +945 -0
- package/src/durable/SubscriptionTools.ts +327 -0
- package/src/durable/SubscriptionTransition.ts +302 -0
- package/src/durable/Subscriptions.ts +1210 -0
- package/src/durable/ThreadContextHistory.ts +227 -0
- package/src/durable/ThreadContextHistoryProjection.ts +216 -0
- package/src/durable/ThreadInvariants.ts +442 -0
- package/src/durable/ThreadProjection.ts +269 -0
- package/src/durable/ThreadProjectionMaintenance.ts +67 -0
- package/src/durable/ThreadStore.ts +242 -0
- package/src/durable/ThreadStoreConformance.ts +710 -0
- package/src/durable/ToolReconciler.ts +105 -0
- package/src/durable/WakeScheduler.ts +134 -0
- package/src/durable/WorkerHost.ts +171 -0
- package/src/durable/internal/agent-registration.ts +525 -0
- package/src/durable/internal/agent-updates.ts +302 -0
- package/src/durable/internal/foreign-diagnostic.ts +47 -0
- package/src/durable/internal/journal-checkpoint.ts +104 -0
- package/src/durable/internal/journal-metadata.ts +107 -0
- package/src/durable/internal/messaging-host.ts +608 -0
- package/src/durable/internal/schedule-time.ts +303 -0
- package/src/durable/internal/storage-v2-layout.ts +163 -0
- package/src/durable/internal/storage-v2.ts +73 -0
- package/src/durable/internal/worker-host.ts +2467 -0
- package/src/durable/internal/worker-runtime.ts +9 -0
- package/src/engine/AgentRuntime.ts +37 -0
- package/src/engine/Compaction.ts +11 -0
- package/src/engine/ContextCompactor.ts +277 -0
- package/src/engine/ContextHistory.ts +73 -0
- package/src/engine/ContextWindow.ts +72 -0
- package/src/engine/DurableStep.ts +132 -0
- package/src/engine/MessagingHost.ts +110 -0
- package/src/engine/Output.ts +2 -0
- package/src/engine/RunEventSink.ts +132 -0
- package/src/engine/RunOptions.ts +1077 -0
- package/src/engine/SubagentHost.ts +181 -0
- package/src/engine/ThreadHistory.ts +120 -0
- package/src/engine/ToolBroker.ts +157 -0
- package/src/engine/ToolExposure.ts +48 -0
- package/src/engine/internal/agent-runtime.ts +10162 -0
- package/src/engine/internal/bounded-value.ts +315 -0
- package/src/engine/internal/compaction.ts +678 -0
- package/src/engine/internal/error-diagnostic.ts +39 -0
- package/src/engine/internal/output-contract.ts +173 -0
- package/src/engine/internal/primitive-delta.ts +80 -0
- package/src/engine/internal/provider-result-staging.ts +211 -0
- package/src/engine/internal/tool-derivative.ts +106 -0
- package/src/engine/internal/tool-exposure.ts +224 -0
- package/src/engine/internal/tool-telemetry.ts +484 -0
- package/src/index.ts +97 -22
- package/src/sandbox/CodeExecutor.ts +352 -0
- package/src/sandbox/InteractiveBrowser.ts +257 -0
- package/src/sandbox/PageCapture.ts +692 -0
- package/src/sandbox/PageCrawl.ts +148 -0
- package/src/sandbox/PageScreenshot.ts +81 -0
- package/src/sandbox/ProtectedBrowser.ts +436 -0
- package/src/sandbox/Sandbox.ts +241 -0
package/dist/index.d.mts
CHANGED
|
@@ -1,6 +1,89 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
import { a as Identifiers_d_exports } from "./Identifiers-CN2s30fF.mjs";
|
|
2
|
+
import { f as Thread_d_exports } from "./Thread-DOBQ0QUY.mjs";
|
|
3
|
+
import { a as SubagentContract_d_exports } from "./SubagentContract-DdT7Cqe6.mjs";
|
|
4
|
+
import { t as SubagentReservations_d_exports } from "./capabilities/SubagentReservations.mjs";
|
|
5
|
+
import { o as Receipt_d_exports } from "./Receipt-BAHyigAF.mjs";
|
|
6
|
+
import { t as AgentUpdates_d_exports } from "./AgentUpdates-DMJ-_xow.mjs";
|
|
7
|
+
import { f as Usage_d_exports } from "./Usage-Dx0aknfk.mjs";
|
|
8
|
+
import { u as RunEvent_d_exports } from "./RunEvent-DIrzkjLr.mjs";
|
|
9
|
+
import { i as ThreadHistory_d_exports } from "./ThreadHistory-tS1KwxHR.mjs";
|
|
10
|
+
import { t as Ephemeral_d_exports } from "./Ephemeral.mjs";
|
|
11
|
+
import { t as ToolExposure_d_exports } from "./ToolExposure.mjs";
|
|
12
|
+
import { t as Redaction_d_exports } from "./capabilities/Redaction.mjs";
|
|
13
|
+
import { t as Approval_d_exports } from "./capabilities/Approval.mjs";
|
|
14
|
+
import { t as Budget_d_exports } from "./capabilities/Budget.mjs";
|
|
15
|
+
import { p as ToolBroker_d_exports } from "./ToolBroker-DWs4tZra.mjs";
|
|
16
|
+
import { D as Sandbox_d_exports } from "./Sandbox-CEsDWBLq.mjs";
|
|
17
|
+
import { t as CodeExecutor_d_exports } from "./sandbox/CodeExecutor.mjs";
|
|
18
|
+
import { t as CodeMode_d_exports } from "./capabilities/CodeMode.mjs";
|
|
19
|
+
import { i as AgentError_d_exports } from "./AgentError-CggcAQ7V.mjs";
|
|
20
|
+
import { n as ToolResult_d_exports } from "./ToolResult-DmmgoChv.mjs";
|
|
21
|
+
import { r as AgentPolicy_d_exports } from "./AgentPolicy-CetmQrf3.mjs";
|
|
22
|
+
import { t as Agent_d_exports } from "./Agent-CN0EWRsR.mjs";
|
|
23
|
+
import { c as MemoryReference_d_exports } from "./MemoryReference-B8Q3UJoJ.mjs";
|
|
24
|
+
import { n as RunPolicyUsage_d_exports } from "./RunPolicyUsage-ClZxyR46.mjs";
|
|
25
|
+
import { m as Worker_d_exports } from "./Worker-CaPYykpe.mjs";
|
|
26
|
+
import { s as ContextWindow_d_exports } from "./ContextWindow-DRQ5Mbm2.mjs";
|
|
27
|
+
import { s as ContextCompactor_d_exports } from "./ContextCompactor-Dxu5zhOL.mjs";
|
|
28
|
+
import { i as DurableStep_d_exports } from "./DurableStep-Cry_iol4.mjs";
|
|
29
|
+
import { F as RunOptions_d_exports } from "./RunOptions-g1aigcKI.mjs";
|
|
30
|
+
import { t as Commands_d_exports } from "./capabilities/Commands.mjs";
|
|
31
|
+
import { t as ContextHistory_d_exports } from "./engine/ContextHistory.mjs";
|
|
32
|
+
import { t as ContextTools_d_exports } from "./capabilities/ContextTools.mjs";
|
|
33
|
+
import { t as Mcp_d_exports } from "./capabilities/Mcp.mjs";
|
|
34
|
+
import { t as McpClient_d_exports } from "./capabilities/McpClient.mjs";
|
|
35
|
+
import { i as MemoryNamespace_d_exports } from "./MemoryNamespace-BbRW5p71.mjs";
|
|
36
|
+
import { t as MemoryStore_d_exports } from "./core/MemoryStore.mjs";
|
|
37
|
+
import { t as MemoryNotes_d_exports } from "./capabilities/MemoryNotes.mjs";
|
|
38
|
+
import { n as MessagingHost_d_exports } from "./MessagingHost-CRk0kXzT.mjs";
|
|
39
|
+
import { t as Messaging_d_exports } from "./Messaging-CkcIdt4I.mjs";
|
|
40
|
+
import { t as ModelContext_d_exports } from "./capabilities/ModelContext.mjs";
|
|
41
|
+
import { t as RememberingStore_d_exports } from "./core/RememberingStore.mjs";
|
|
42
|
+
import { t as Remembering_d_exports } from "./capabilities/Remembering.mjs";
|
|
43
|
+
import { t as RunHooks_d_exports } from "./capabilities/RunHooks.mjs";
|
|
44
|
+
import { t as MemoryRevalidation_d_exports } from "./core/MemoryRevalidation.mjs";
|
|
45
|
+
import { t as SemanticMemoryIndex_d_exports } from "./core/SemanticMemoryIndex.mjs";
|
|
46
|
+
import { t as SemanticMemoryRevalidation_d_exports } from "./core/SemanticMemoryRevalidation.mjs";
|
|
47
|
+
import { t as SemanticMemory_d_exports } from "./capabilities/SemanticMemory.mjs";
|
|
48
|
+
import { a as SubagentHost_d_exports } from "./SubagentHost-CJUBQlcc.mjs";
|
|
49
|
+
import { t as AgentRuntime_d_exports } from "./AgentRuntime-uxR_a4VM.mjs";
|
|
50
|
+
import { i as RunEventSink_d_exports } from "./RunEventSink-D5aVhISG.mjs";
|
|
51
|
+
import { v as Subagent_d_exports } from "./Subagent-DyfzHNdv.mjs";
|
|
52
|
+
import { t as ToolDiscovery_d_exports } from "./capabilities/ToolDiscovery.mjs";
|
|
53
|
+
import { D as PageCapture_d_exports } from "./PageCapture-Df8Xwskw.mjs";
|
|
54
|
+
import { t as WebCapture_d_exports } from "./capabilities/WebCapture.mjs";
|
|
55
|
+
import { t as WebSearch_d_exports } from "./capabilities/WebSearch.mjs";
|
|
56
|
+
import { t as IdGenerator_d_exports } from "./core/IdGenerator.mjs";
|
|
57
|
+
import { t as Memory_d_exports } from "./core/Memory.mjs";
|
|
58
|
+
import { Ar as AgentRegistration_d_exports, Hr as Digest_d_exports, N as Records_d_exports, Ua as SubmissionLedger_d_exports, an as ThreadStore_d_exports, dn as SubmissionStatus_d_exports, gn as RunJournal_d_exports, mt as DurableAgentRuntime_d_exports, sr as Admin_d_exports, vi as Recovery_d_exports } from "./Records-BAGkekt8.mjs";
|
|
59
|
+
import { t as DurableFailpoint_d_exports } from "./DurableFailpoint-Oinuuedm.mjs";
|
|
60
|
+
import { a as OperationAuthorizer_d_exports } from "./OperationAuthorizer-TzcQtpX5.mjs";
|
|
61
|
+
import { l as ToolReconciler_d_exports } from "./ToolReconciler-DQVaJfpE.mjs";
|
|
62
|
+
import { n as WakeScheduler_d_exports } from "./WakeScheduler-EjUF-GhC.mjs";
|
|
63
|
+
import { t as ActivityStore_d_exports } from "./durable/ActivityStore.mjs";
|
|
64
|
+
import { t as CommittedActivity_d_exports } from "./durable/CommittedActivity.mjs";
|
|
65
|
+
import { R as Schedule_d_exports } from "./Schedule-H3SEYX9g.mjs";
|
|
66
|
+
import { k as Subscription_d_exports } from "./Subscription-BEP8oQO5.mjs";
|
|
67
|
+
import { n as EventSource_d_exports } from "./EventSource-OqS_P9ug.mjs";
|
|
68
|
+
import { n as PreparedInputAdmission_d_exports } from "./PreparedInputAdmission-C4HbjHgl.mjs";
|
|
69
|
+
import { r as SubscriptionInput_d_exports } from "./SubscriptionInput-vAAOBrK7.mjs";
|
|
70
|
+
import { t as Subscriptions_d_exports } from "./durable/Subscriptions.mjs";
|
|
71
|
+
import { t as MessageDelivery_d_exports } from "./durable/MessageDelivery.mjs";
|
|
72
|
+
import { t as PersistentHistory_d_exports } from "./durable/PersistentHistory.mjs";
|
|
73
|
+
import { t as ScheduleTransition_d_exports } from "./durable/ScheduleTransition.mjs";
|
|
74
|
+
import { t as Scheduling_d_exports } from "./durable/Scheduling.mjs";
|
|
75
|
+
import { t as SubscriptionTools_d_exports } from "./durable/SubscriptionTools.mjs";
|
|
76
|
+
import { t as SubscriptionTransition_d_exports } from "./durable/SubscriptionTransition.mjs";
|
|
77
|
+
import { t as ThreadContextHistory_d_exports } from "./durable/ThreadContextHistory.mjs";
|
|
78
|
+
import { t as ThreadContextHistoryProjection_d_exports } from "./durable/ThreadContextHistoryProjection.mjs";
|
|
79
|
+
import { t as ThreadInvariants_d_exports } from "./durable/ThreadInvariants.mjs";
|
|
80
|
+
import { t as ThreadProjection_d_exports } from "./durable/ThreadProjection.mjs";
|
|
81
|
+
import { t as ThreadProjectionMaintenance_d_exports } from "./durable/ThreadProjectionMaintenance.mjs";
|
|
82
|
+
import { t as WorkerHost_d_exports } from "./durable/WorkerHost.mjs";
|
|
83
|
+
import { t as Compaction_d_exports } from "./engine/Compaction.mjs";
|
|
84
|
+
import { t as Output_d_exports } from "./Output-D6SkedVx.mjs";
|
|
85
|
+
import { c as PageScreenshot_d_exports } from "./PageScreenshot-BpgZKAxl.mjs";
|
|
86
|
+
import { t as InteractiveBrowser_d_exports } from "./sandbox/InteractiveBrowser.mjs";
|
|
87
|
+
import { t as PageCrawl_d_exports } from "./sandbox/PageCrawl.mjs";
|
|
88
|
+
import { t as ProtectedBrowser_d_exports } from "./sandbox/ProtectedBrowser.mjs";
|
|
89
|
+
export { ActivityStore_d_exports as ActivityStore, Admin_d_exports as Admin, Agent_d_exports as Agent, AgentError_d_exports as AgentError, AgentPolicy_d_exports as AgentPolicy, AgentRegistration_d_exports as AgentRegistration, AgentRuntime_d_exports as AgentRuntime, AgentUpdates_d_exports as AgentUpdates, Approval_d_exports as Approval, Budget_d_exports as Budget, CodeExecutor_d_exports as CodeExecutor, CodeMode_d_exports as CodeMode, Commands_d_exports as Commands, CommittedActivity_d_exports as CommittedActivity, Compaction_d_exports as Compaction, ContextCompactor_d_exports as ContextCompactor, ContextHistory_d_exports as ContextHistory, ContextTools_d_exports as ContextTools, ContextWindow_d_exports as ContextWindow, Digest_d_exports as Digest, DurableAgentRuntime_d_exports as DurableAgentRuntime, DurableFailpoint_d_exports as DurableFailpoint, DurableStep_d_exports as DurableStep, Ephemeral_d_exports as Ephemeral, EventSource_d_exports as EventSource, IdGenerator_d_exports as IdGenerator, Identifiers_d_exports as Identifiers, InteractiveBrowser_d_exports as InteractiveBrowser, Mcp_d_exports as Mcp, McpClient_d_exports as McpClient, Memory_d_exports as Memory, MemoryNamespace_d_exports as MemoryNamespace, MemoryNotes_d_exports as MemoryNotes, MemoryReference_d_exports as MemoryReference, MemoryRevalidation_d_exports as MemoryRevalidation, MemoryStore_d_exports as MemoryStore, MessageDelivery_d_exports as MessageDelivery, Messaging_d_exports as Messaging, MessagingHost_d_exports as MessagingHost, ModelContext_d_exports as ModelContext, OperationAuthorizer_d_exports as OperationAuthorizer, Output_d_exports as Output, PageCapture_d_exports as PageCapture, PageCrawl_d_exports as PageCrawl, PageScreenshot_d_exports as PageScreenshot, PersistentHistory_d_exports as PersistentHistory, PreparedInputAdmission_d_exports as PreparedInputAdmission, ProtectedBrowser_d_exports as ProtectedBrowser, Receipt_d_exports as Receipt, Records_d_exports as Records, Recovery_d_exports as Recovery, Redaction_d_exports as Redaction, Remembering_d_exports as Remembering, RememberingStore_d_exports as RememberingStore, RunEvent_d_exports as RunEvent, RunEventSink_d_exports as RunEventSink, RunHooks_d_exports as RunHooks, RunJournal_d_exports as RunJournal, RunOptions_d_exports as RunOptions, RunPolicyUsage_d_exports as RunPolicyUsage, Sandbox_d_exports as Sandbox, Schedule_d_exports as Schedule, ScheduleTransition_d_exports as ScheduleTransition, Scheduling_d_exports as Scheduling, SemanticMemory_d_exports as SemanticMemory, SemanticMemoryIndex_d_exports as SemanticMemoryIndex, SemanticMemoryRevalidation_d_exports as SemanticMemoryRevalidation, Subagent_d_exports as Subagent, SubagentContract_d_exports as SubagentContract, SubagentHost_d_exports as SubagentHost, SubagentReservations_d_exports as SubagentReservations, SubmissionLedger_d_exports as SubmissionLedger, SubmissionStatus_d_exports as SubmissionStatus, Subscription_d_exports as Subscription, SubscriptionInput_d_exports as SubscriptionInput, SubscriptionTools_d_exports as SubscriptionTools, SubscriptionTransition_d_exports as SubscriptionTransition, Subscriptions_d_exports as Subscriptions, Thread_d_exports as Thread, ThreadContextHistory_d_exports as ThreadContextHistory, ThreadContextHistoryProjection_d_exports as ThreadContextHistoryProjection, ThreadHistory_d_exports as ThreadHistory, ThreadInvariants_d_exports as ThreadInvariants, ThreadProjection_d_exports as ThreadProjection, ThreadProjectionMaintenance_d_exports as ThreadProjectionMaintenance, ThreadStore_d_exports as ThreadStore, ToolBroker_d_exports as ToolBroker, ToolDiscovery_d_exports as ToolDiscovery, ToolExposure_d_exports as ToolExposure, ToolReconciler_d_exports as ToolReconciler, ToolResult_d_exports as ToolResult, Usage_d_exports as Usage, WakeScheduler_d_exports as WakeScheduler, WebCapture_d_exports as WebCapture, WebSearch_d_exports as WebSearch, Worker_d_exports as Worker, WorkerHost_d_exports as WorkerHost };
|
package/dist/index.mjs
CHANGED
|
@@ -1,6 +1,98 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
import { t as ToolResult_exports } from "./core/ToolResult.mjs";
|
|
2
|
+
import { t as AgentPolicy_exports } from "./core/AgentPolicy.mjs";
|
|
3
|
+
import { t as Identifiers_exports } from "./core/Identifiers.mjs";
|
|
4
|
+
import { t as Receipt_exports } from "./core/Receipt.mjs";
|
|
5
|
+
import { t as AgentUpdates_exports } from "./core/AgentUpdates.mjs";
|
|
6
|
+
import { t as Agent_exports } from "./Agent-RklVROrm.mjs";
|
|
7
|
+
import { t as AgentError_exports } from "./core/AgentError.mjs";
|
|
8
|
+
import { t as IdGenerator_exports } from "./core/IdGenerator.mjs";
|
|
9
|
+
import { t as SubagentContract_exports } from "./core/SubagentContract.mjs";
|
|
10
|
+
import { t as Usage_exports } from "./core/Usage.mjs";
|
|
11
|
+
import { t as RunEvent_exports } from "./core/RunEvent.mjs";
|
|
12
|
+
import { t as Worker_exports } from "./core/Worker.mjs";
|
|
13
|
+
import { n as MessagingHost_exports } from "./MessagingHost-CWi_PP3g.mjs";
|
|
14
|
+
import { t as SubagentHost_exports } from "./engine/SubagentHost.mjs";
|
|
15
|
+
import { t as Thread_exports } from "./core/Thread.mjs";
|
|
16
|
+
import { t as ThreadHistory_exports } from "./engine/ThreadHistory.mjs";
|
|
17
|
+
import { t as AgentRuntime_exports } from "./AgentRuntime-CHipL2jG.mjs";
|
|
18
|
+
import { t as ContextWindow_exports } from "./engine/ContextWindow.mjs";
|
|
19
|
+
import { t as DurableStep_exports } from "./engine/DurableStep.mjs";
|
|
20
|
+
import { t as ContextCompactor_exports } from "./engine/ContextCompactor.mjs";
|
|
21
|
+
import { t as RunEventSink_exports } from "./engine/RunEventSink.mjs";
|
|
22
|
+
import { t as MemoryReference_exports } from "./core/MemoryReference.mjs";
|
|
23
|
+
import { t as RunPolicyUsage_exports } from "./core/RunPolicyUsage.mjs";
|
|
24
|
+
import { t as RunOptions_exports } from "./engine/RunOptions.mjs";
|
|
25
|
+
import { t as ToolBroker_exports } from "./engine/ToolBroker.mjs";
|
|
26
|
+
import { t as Redaction_exports } from "./capabilities/Redaction.mjs";
|
|
27
|
+
import { t as Approval_exports } from "./capabilities/Approval.mjs";
|
|
28
|
+
import { t as Budget_exports } from "./capabilities/Budget.mjs";
|
|
29
|
+
import { t as Sandbox_exports } from "./sandbox/Sandbox.mjs";
|
|
30
|
+
import { t as CodeExecutor_exports } from "./sandbox/CodeExecutor.mjs";
|
|
31
|
+
import { t as CodeMode_exports } from "./capabilities/CodeMode.mjs";
|
|
32
|
+
import { t as Commands_exports } from "./capabilities/Commands.mjs";
|
|
33
|
+
import { t as Compaction_exports } from "./engine/Compaction.mjs";
|
|
34
|
+
import { t as ContextHistory_exports } from "./engine/ContextHistory.mjs";
|
|
35
|
+
import { t as ContextTools_exports } from "./capabilities/ContextTools.mjs";
|
|
36
|
+
import { t as SubagentReservations_exports } from "./capabilities/SubagentReservations.mjs";
|
|
37
|
+
import { t as Ephemeral_exports } from "./Ephemeral.mjs";
|
|
38
|
+
import { t as InteractiveBrowser_exports } from "./sandbox/InteractiveBrowser.mjs";
|
|
39
|
+
import { t as Mcp_exports } from "./capabilities/Mcp.mjs";
|
|
40
|
+
import { t as McpClient_exports } from "./capabilities/McpClient.mjs";
|
|
41
|
+
import { t as Memory_exports } from "./core/Memory.mjs";
|
|
42
|
+
import { t as MemoryNamespace_exports } from "./core/MemoryNamespace.mjs";
|
|
43
|
+
import { t as MemoryStore_exports } from "./core/MemoryStore.mjs";
|
|
44
|
+
import { t as MemoryNotes_exports } from "./capabilities/MemoryNotes.mjs";
|
|
45
|
+
import { t as MemoryRevalidation_exports } from "./core/MemoryRevalidation.mjs";
|
|
46
|
+
import { t as Messaging_exports } from "./capabilities/Messaging.mjs";
|
|
47
|
+
import { t as ModelContext_exports } from "./capabilities/ModelContext.mjs";
|
|
48
|
+
import { t as Output_exports } from "./engine/Output.mjs";
|
|
49
|
+
import { t as PageCapture_exports } from "./sandbox/PageCapture.mjs";
|
|
50
|
+
import { t as PageCrawl_exports } from "./sandbox/PageCrawl.mjs";
|
|
51
|
+
import { t as PageScreenshot_exports } from "./sandbox/PageScreenshot.mjs";
|
|
52
|
+
import { t as ProtectedBrowser_exports } from "./sandbox/ProtectedBrowser.mjs";
|
|
53
|
+
import { t as RememberingStore_exports } from "./core/RememberingStore.mjs";
|
|
54
|
+
import { t as Remembering_exports } from "./capabilities/Remembering.mjs";
|
|
55
|
+
import { t as RunHooks_exports } from "./capabilities/RunHooks.mjs";
|
|
56
|
+
import { t as SemanticMemoryIndex_exports } from "./core/SemanticMemoryIndex.mjs";
|
|
57
|
+
import { t as SemanticMemoryRevalidation_exports } from "./core/SemanticMemoryRevalidation.mjs";
|
|
58
|
+
import { t as SemanticMemory_exports } from "./capabilities/SemanticMemory.mjs";
|
|
59
|
+
import { r as Subagent_exports } from "./Subagent-U5qXOFE8.mjs";
|
|
60
|
+
import { t as ToolDiscovery_exports } from "./capabilities/ToolDiscovery.mjs";
|
|
61
|
+
import { t as ToolExposure_exports } from "./ToolExposure.mjs";
|
|
62
|
+
import { t as WebCapture_exports } from "./capabilities/WebCapture.mjs";
|
|
63
|
+
import { t as WebSearch_exports } from "./capabilities/WebSearch.mjs";
|
|
64
|
+
import { t as Records_exports } from "./durable/Records.mjs";
|
|
65
|
+
import { t as ActivityStore_exports } from "./durable/ActivityStore.mjs";
|
|
66
|
+
import { t as SubmissionLedger_exports } from "./durable/SubmissionLedger.mjs";
|
|
67
|
+
import { t as Recovery_exports } from "./durable/Recovery.mjs";
|
|
68
|
+
import { t as Admin_exports } from "./durable/Admin.mjs";
|
|
69
|
+
import { t as Digest_exports } from "./durable/Digest.mjs";
|
|
70
|
+
import { t as AgentRegistration_exports } from "./durable/AgentRegistration.mjs";
|
|
71
|
+
import { t as ThreadStore_exports } from "./durable/ThreadStore.mjs";
|
|
72
|
+
import { t as CommittedActivity_exports } from "./durable/CommittedActivity.mjs";
|
|
73
|
+
import { t as DurableFailpoint_exports } from "./durable/DurableFailpoint.mjs";
|
|
74
|
+
import { t as Schedule_exports } from "./durable/Schedule.mjs";
|
|
75
|
+
import { t as PreparedInputAdmission_exports } from "./durable/PreparedInputAdmission.mjs";
|
|
76
|
+
import { t as Subscription_exports } from "./durable/Subscription.mjs";
|
|
77
|
+
import { t as MessageDelivery_exports } from "./durable/MessageDelivery.mjs";
|
|
78
|
+
import { n as DurableAgentRuntime_exports } from "./DurableAgentRuntime-D7gDKGjH.mjs";
|
|
79
|
+
import { n as RunJournal_exports } from "./RunJournal-Cgg1kNvc.mjs";
|
|
80
|
+
import { t as WorkerHost_exports } from "./durable/WorkerHost.mjs";
|
|
81
|
+
import { t as OperationAuthorizer_exports } from "./durable/OperationAuthorizer.mjs";
|
|
82
|
+
import { t as SubmissionStatus_exports } from "./durable/SubmissionStatus.mjs";
|
|
83
|
+
import { t as ThreadInvariants_exports } from "./durable/ThreadInvariants.mjs";
|
|
84
|
+
import { t as ToolReconciler_exports } from "./durable/ToolReconciler.mjs";
|
|
85
|
+
import { t as WakeScheduler_exports } from "./durable/WakeScheduler.mjs";
|
|
86
|
+
import { t as EventSource_exports } from "./durable/EventSource.mjs";
|
|
87
|
+
import { t as PersistentHistory_exports } from "./durable/PersistentHistory.mjs";
|
|
88
|
+
import { t as ScheduleTransition_exports } from "./durable/ScheduleTransition.mjs";
|
|
89
|
+
import { i as Scheduling_exports } from "./Scheduling-C9aIP8zT.mjs";
|
|
90
|
+
import { t as SubscriptionInput_exports } from "./durable/SubscriptionInput.mjs";
|
|
91
|
+
import { t as Subscriptions_exports } from "./durable/Subscriptions.mjs";
|
|
92
|
+
import { t as SubscriptionTools_exports } from "./durable/SubscriptionTools.mjs";
|
|
93
|
+
import { t as SubscriptionTransition_exports } from "./durable/SubscriptionTransition.mjs";
|
|
94
|
+
import { t as ThreadProjection_exports } from "./durable/ThreadProjection.mjs";
|
|
95
|
+
import { t as ThreadProjectionMaintenance_exports } from "./durable/ThreadProjectionMaintenance.mjs";
|
|
96
|
+
import { t as ThreadContextHistoryProjection_exports } from "./durable/ThreadContextHistoryProjection.mjs";
|
|
97
|
+
import { t as ThreadContextHistory_exports } from "./durable/ThreadContextHistory.mjs";
|
|
98
|
+
export { ActivityStore_exports as ActivityStore, Admin_exports as Admin, Agent_exports as Agent, AgentError_exports as AgentError, AgentPolicy_exports as AgentPolicy, AgentRegistration_exports as AgentRegistration, AgentRuntime_exports as AgentRuntime, AgentUpdates_exports as AgentUpdates, Approval_exports as Approval, Budget_exports as Budget, CodeExecutor_exports as CodeExecutor, CodeMode_exports as CodeMode, Commands_exports as Commands, CommittedActivity_exports as CommittedActivity, Compaction_exports as Compaction, ContextCompactor_exports as ContextCompactor, ContextHistory_exports as ContextHistory, ContextTools_exports as ContextTools, ContextWindow_exports as ContextWindow, Digest_exports as Digest, DurableAgentRuntime_exports as DurableAgentRuntime, DurableFailpoint_exports as DurableFailpoint, DurableStep_exports as DurableStep, Ephemeral_exports as Ephemeral, EventSource_exports as EventSource, IdGenerator_exports as IdGenerator, Identifiers_exports as Identifiers, InteractiveBrowser_exports as InteractiveBrowser, Mcp_exports as Mcp, McpClient_exports as McpClient, Memory_exports as Memory, MemoryNamespace_exports as MemoryNamespace, MemoryNotes_exports as MemoryNotes, MemoryReference_exports as MemoryReference, MemoryRevalidation_exports as MemoryRevalidation, MemoryStore_exports as MemoryStore, MessageDelivery_exports as MessageDelivery, Messaging_exports as Messaging, MessagingHost_exports as MessagingHost, ModelContext_exports as ModelContext, OperationAuthorizer_exports as OperationAuthorizer, Output_exports as Output, PageCapture_exports as PageCapture, PageCrawl_exports as PageCrawl, PageScreenshot_exports as PageScreenshot, PersistentHistory_exports as PersistentHistory, PreparedInputAdmission_exports as PreparedInputAdmission, ProtectedBrowser_exports as ProtectedBrowser, Receipt_exports as Receipt, Records_exports as Records, Recovery_exports as Recovery, Redaction_exports as Redaction, Remembering_exports as Remembering, RememberingStore_exports as RememberingStore, RunEvent_exports as RunEvent, RunEventSink_exports as RunEventSink, RunHooks_exports as RunHooks, RunJournal_exports as RunJournal, RunOptions_exports as RunOptions, RunPolicyUsage_exports as RunPolicyUsage, Sandbox_exports as Sandbox, Schedule_exports as Schedule, ScheduleTransition_exports as ScheduleTransition, Scheduling_exports as Scheduling, SemanticMemory_exports as SemanticMemory, SemanticMemoryIndex_exports as SemanticMemoryIndex, SemanticMemoryRevalidation_exports as SemanticMemoryRevalidation, Subagent_exports as Subagent, SubagentContract_exports as SubagentContract, SubagentHost_exports as SubagentHost, SubagentReservations_exports as SubagentReservations, SubmissionLedger_exports as SubmissionLedger, SubmissionStatus_exports as SubmissionStatus, Subscription_exports as Subscription, SubscriptionInput_exports as SubscriptionInput, SubscriptionTools_exports as SubscriptionTools, SubscriptionTransition_exports as SubscriptionTransition, Subscriptions_exports as Subscriptions, Thread_exports as Thread, ThreadContextHistory_exports as ThreadContextHistory, ThreadContextHistoryProjection_exports as ThreadContextHistoryProjection, ThreadHistory_exports as ThreadHistory, ThreadInvariants_exports as ThreadInvariants, ThreadProjection_exports as ThreadProjection, ThreadProjectionMaintenance_exports as ThreadProjectionMaintenance, ThreadStore_exports as ThreadStore, ToolBroker_exports as ToolBroker, ToolDiscovery_exports as ToolDiscovery, ToolExposure_exports as ToolExposure, ToolReconciler_exports as ToolReconciler, ToolResult_exports as ToolResult, Usage_exports as Usage, WakeScheduler_exports as WakeScheduler, WebCapture_exports as WebCapture, WebSearch_exports as WebSearch, Worker_exports as Worker, WorkerHost_exports as WorkerHost };
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import { Prompt, Tool } from "effect/unstable/ai";
|
|
2
|
+
import { Schema } from "effect";
|
|
3
|
+
//#region src/engine/internal/output-contract.ts
|
|
4
|
+
const outputFormatAnnotation = "@effect-agent/engine/Output/format";
|
|
5
|
+
/**
|
|
6
|
+
* Declare ordinary assistant text as an Agent's final-output wire format. Apply this to the
|
|
7
|
+
* complete output Schema after composing transformations. Its encoded type must be string;
|
|
8
|
+
* decoding, checks, transformations, and service requirements remain owned by that Schema.
|
|
9
|
+
* Text is preserved verbatim, including whitespace, quotes, and an empty reply when allowed.
|
|
10
|
+
* Required completion Tools still take precedence. Unmarked Schemas use JSON final output.
|
|
11
|
+
*
|
|
12
|
+
* @example
|
|
13
|
+
* ```ts
|
|
14
|
+
* output: Output.text(Schema.String.check(Schema.isMaxLength(20_000)))
|
|
15
|
+
* ```
|
|
16
|
+
*/
|
|
17
|
+
const textOutput = (schema) => schema.annotate({ [outputFormatAnnotation]: "text" });
|
|
18
|
+
const isTextOutput = (schema) => Schema.resolveAnnotations(schema)?.[outputFormatAnnotation] === "text";
|
|
19
|
+
const contractDirective = (definition) => definition.completion === void 0 ? "Final output contract: when the task is complete, the final assistant message must be only JSON that is valid against this JSON Schema — no prose, no Markdown code fences, nothing before or after the JSON." : `Final output contract: when the task is complete without calling the "${definition.completion.tool}" completion Tool, the final assistant message must be only JSON that is valid against this JSON Schema — no prose, no Markdown code fences, nothing before or after the JSON. When calling the "${definition.completion.tool}" completion Tool, never place this private Agent output JSON in any Tool argument; follow the Tool's parameter schema instead. Call it as the sole application Tool Call, after receiving any other needed application Tool results. Completed provider Tool results may accompany it. The engine projects the successful completion Tool result into the Agent output.`;
|
|
20
|
+
const requiredCompletionDirective = (tool, hasAlternatives) => `Final output contract: ${hasAlternatives ? "otherwise complete" : "complete only"} by calling the required completion Tool ${JSON.stringify(tool)} as the sole application Tool Call in its batch. Completed provider Tool results may accompany it. Do not emit an ordinary final assistant text answer. The Tool's canonical parameters and successful result are projected and validated as the Agent output.`;
|
|
21
|
+
/**
|
|
22
|
+
* Render the model-visible final-output contract for one definition. The
|
|
23
|
+
* derivation and message identity are stable for an immutable definition.
|
|
24
|
+
* An output Schema the Effect AI derivation cannot represent is reported as
|
|
25
|
+
* `unrenderable`; the caller falls back to the prior behavior — the contract
|
|
26
|
+
* is guidance, and a Schema that decodes but does not render must not become
|
|
27
|
+
* a new failure mode.
|
|
28
|
+
*/
|
|
29
|
+
const rendered = (message) => ({
|
|
30
|
+
_tag: "rendered",
|
|
31
|
+
message,
|
|
32
|
+
part: Prompt.makeMessage("system", { content: message })
|
|
33
|
+
});
|
|
34
|
+
const renderOutputSchemaContract = (definition) => {
|
|
35
|
+
if (definition.completion?.required === true) return rendered(requiredCompletionDirective(definition.completion.tool, (definition.completionFromTools?.length ?? 0) > 0));
|
|
36
|
+
if (isTextOutput(definition.output)) return rendered("Final output contract: write the final reply as ordinary assistant text, without JSON wrapping. An empty reply is valid only when allowed by the output Schema and the task instructions." + (definition.completion === void 0 ? "" : ` When calling the "${definition.completion.tool}" completion Tool, follow its parameter schema instead and call it as the sole application Tool Call, after receiving any other needed application Tool results; completed provider Tool results may accompany it; the engine projects its successful result into the Agent output.`));
|
|
37
|
+
try {
|
|
38
|
+
const jsonSchema = Tool.getJsonSchemaFromSchema(definition.output);
|
|
39
|
+
return rendered(`${contractDirective(definition)}\n\n${JSON.stringify(jsonSchema, void 0, 2)}`);
|
|
40
|
+
} catch (cause) {
|
|
41
|
+
return {
|
|
42
|
+
_tag: "unrenderable",
|
|
43
|
+
reason: cause instanceof Error ? cause.message : String(cause)
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
};
|
|
47
|
+
const outputContracts = /* @__PURE__ */ new WeakMap();
|
|
48
|
+
const outputSchemaContract = (definition) => {
|
|
49
|
+
const cached = outputContracts.get(definition);
|
|
50
|
+
if (cached !== void 0) return cached;
|
|
51
|
+
const base = renderOutputSchemaContract(definition);
|
|
52
|
+
const alternatives = definition.completionFromTools ?? [];
|
|
53
|
+
const contract = base._tag === "rendered" && alternatives.length > 0 ? rendered(`The following action Tools may complete the Run from their successful canonical result: ${alternatives.map((declaration) => JSON.stringify(declaration.tool)).join(", ")}. Call such a Tool as the sole application Tool Call, following its parameter schema. Completed provider Tool results may accompany it. It may complete the Run only when it satisfies the whole request. An incomplete or pending result continues the Run. These actions are unavailable during finalization after budget exhaustion.
|
|
54
|
+
|
|
55
|
+
` + base.message) : base;
|
|
56
|
+
outputContracts.set(definition, contract);
|
|
57
|
+
return contract;
|
|
58
|
+
};
|
|
59
|
+
/**
|
|
60
|
+
* Insert the contract immediately after the request prompt's last system
|
|
61
|
+
* message (position 0 when none exists), extending the last contiguous
|
|
62
|
+
* system block. Placement is normative: the Anthropic provider replaces its
|
|
63
|
+
* top-level `system` parameter per contiguous system group, so only the last
|
|
64
|
+
* block survives there — an isolated trailing contract message would discard
|
|
65
|
+
* the author's instructions, and a contract inside an earlier block (for
|
|
66
|
+
* example a resumed Thread's original instructions ahead of this Run's
|
|
67
|
+
* evaluated instructions) would itself be discarded. Extending the last
|
|
68
|
+
* block keeps author content and contract together on every provider and
|
|
69
|
+
* preserves the author's per-message cache-control annotations.
|
|
70
|
+
*/
|
|
71
|
+
const insertOutputContract = (prompt, message) => {
|
|
72
|
+
const content = prompt.content;
|
|
73
|
+
let insertAt = 0;
|
|
74
|
+
for (let index = 0; index < content.length; index += 1) if (content[index]?.role === "system") insertAt = index + 1;
|
|
75
|
+
return Prompt.fromMessages([
|
|
76
|
+
...content.slice(0, insertAt),
|
|
77
|
+
message,
|
|
78
|
+
...content.slice(insertAt)
|
|
79
|
+
]);
|
|
80
|
+
};
|
|
81
|
+
//#endregion
|
|
82
|
+
export { textOutput as i, isTextOutput as n, outputSchemaContract as r, insertOutputContract as t };
|
|
83
|
+
|
|
84
|
+
//# sourceMappingURL=output-contract-BC7tjlGw.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"output-contract-BC7tjlGw.mjs","names":[],"sources":["../src/engine/internal/output-contract.ts"],"sourcesContent":["import { Schema } from \"effect\";\nimport { Prompt, Tool } from \"effect/unstable/ai\";\n\nimport type * as Agent from \"../../core/Agent.ts\";\n\nconst outputFormatAnnotation = \"@effect-agent/engine/Output/format\";\n\n/**\n * Declare ordinary assistant text as an Agent's final-output wire format. Apply this to the\n * complete output Schema after composing transformations. Its encoded type must be string;\n * decoding, checks, transformations, and service requirements remain owned by that Schema.\n * Text is preserved verbatim, including whitespace, quotes, and an empty reply when allowed.\n * Required completion Tools still take precedence. Unmarked Schemas use JSON final output.\n *\n * @example\n * ```ts\n * output: Output.text(Schema.String.check(Schema.isMaxLength(20_000)))\n * ```\n */\nexport const textOutput = <S extends Schema.Top & { readonly Encoded: string }>(\n schema: S,\n): S[\"Rebuild\"] => schema.annotate({ [outputFormatAnnotation]: \"text\" });\n\nexport const isTextOutput = (schema: Schema.Top): boolean =>\n Schema.resolveAnnotations(schema)?.[outputFormatAnnotation] === \"text\";\n\n/**\n * Model-visible final-output contract (RUN-028).\n *\n * For ordinary text completion, the interpreter's only output-conformance\n * point is `decodeFinalOutput`, which validates the final text after the\n * model has already finished. This module renders that Schema's wire contract\n * with the same Effect AI derivation the providers use for Tool parameters\n * and states it as one framework-owned system message on every model request.\n * A required completion Tool instead gets a native-tool directive: its Tool\n * parameter Schema is already carried by the provider request, and ordinary\n * final text is not an allowed completion path.\n *\n * The contract is a per-request projection of the immutable definition —\n * exactly like the Tool schemas the request already carries. It is inserted\n * at model-request materialization (after context preparation) and never\n * into official history, so canonical records, run events, and the committed\n * DN/DC golden are unchanged.\n *\n */\n\n/** Rendering outcome for one definition's output Schema. */\ntype OutputContract =\n | {\n readonly _tag: \"rendered\";\n /** The complete system-message text: directive plus the derived JSON Schema. */\n readonly message: string;\n readonly part: Prompt.SystemMessage;\n }\n | {\n readonly _tag: \"unrenderable\";\n /** Why Effect AI's JSON-Schema derivation rejected the output Schema. */\n readonly reason: string;\n };\n\nconst contractDirective = (definition: Agent.AnyDefinition): string =>\n definition.completion === undefined\n ? \"Final output contract: when the task is complete, the final assistant message must be only \" +\n \"JSON that is valid against this JSON Schema — no prose, no Markdown code fences, nothing \" +\n \"before or after the JSON.\"\n : `Final output contract: when the task is complete without calling the \"${definition.completion.tool}\" completion Tool, the final assistant message must be only ` +\n \"JSON that is valid against this JSON Schema — no prose, no Markdown code fences, nothing \" +\n `before or after the JSON. When calling the \"${definition.completion.tool}\" completion Tool, never place this private Agent output JSON in any Tool argument; follow the Tool's parameter schema instead. Call it as the sole application Tool Call, after receiving any other needed application Tool results. Completed provider Tool results may accompany it. The engine projects the successful completion Tool result into the Agent output.`;\n\nconst requiredCompletionDirective = (tool: string, hasAlternatives: boolean): string =>\n `Final output contract: ${hasAlternatives ? \"otherwise complete\" : \"complete only\"} by calling the required completion Tool ${JSON.stringify(tool)} ` +\n \"as the sole application Tool Call in its batch. Completed provider Tool results may accompany it. Do not emit an ordinary final assistant text answer. \" +\n \"The Tool's canonical parameters and successful result are projected and validated as the Agent output.\";\n\n/**\n * Render the model-visible final-output contract for one definition. The\n * derivation and message identity are stable for an immutable definition.\n * An output Schema the Effect AI derivation cannot represent is reported as\n * `unrenderable`; the caller falls back to the prior behavior — the contract\n * is guidance, and a Schema that decodes but does not render must not become\n * a new failure mode.\n */\nconst rendered = (message: string): OutputContract => ({\n _tag: \"rendered\",\n message,\n part: Prompt.makeMessage(\"system\", { content: message }),\n});\n\nconst renderOutputSchemaContract = (definition: Agent.AnyDefinition): OutputContract => {\n if (definition.completion?.required === true) {\n return rendered(\n requiredCompletionDirective(\n definition.completion.tool,\n (definition.completionFromTools?.length ?? 0) > 0,\n ),\n );\n }\n if (isTextOutput(definition.output)) {\n return rendered(\n \"Final output contract: write the final reply as ordinary assistant text, without JSON wrapping. \" +\n \"An empty reply is valid only when allowed by the output Schema and the task instructions.\" +\n (definition.completion === undefined\n ? \"\"\n : ` When calling the \"${definition.completion.tool}\" completion Tool, follow its parameter schema instead and call it as the sole application Tool Call, after receiving any other needed application Tool results; completed provider Tool results may accompany it; the engine projects its successful result into the Agent output.`),\n );\n }\n try {\n const jsonSchema = Tool.getJsonSchemaFromSchema(definition.output);\n\n return rendered(\n `${contractDirective(definition)}\\n\\n${JSON.stringify(jsonSchema, undefined, 2)}`,\n );\n } catch (cause) {\n return {\n _tag: \"unrenderable\",\n reason: cause instanceof Error ? cause.message : String(cause),\n };\n }\n};\n\n// Native incremental-response tracking recognizes message objects, not rendered text.\n// Weak keys retain neither discarded definitions nor their Schema graphs.\nconst outputContracts = new WeakMap<Agent.AnyDefinition, OutputContract>();\n\nexport const outputSchemaContract = (definition: Agent.AnyDefinition): OutputContract => {\n const cached = outputContracts.get(definition);\n\n if (cached !== undefined) return cached;\n const base = renderOutputSchemaContract(definition);\n const alternatives = definition.completionFromTools ?? [];\n\n const contract =\n base._tag === \"rendered\" && alternatives.length > 0\n ? rendered(\n `The following action Tools may complete the Run from their successful canonical result: ${alternatives.map((declaration) => JSON.stringify(declaration.tool)).join(\", \")}. ` +\n \"Call such a Tool as the sole application Tool Call, following its parameter schema. Completed provider Tool results may accompany it. It may complete the Run only when it satisfies the whole request. \" +\n \"An incomplete or pending result continues the Run. These actions are unavailable during finalization after budget exhaustion.\\n\\n\" +\n base.message,\n )\n : base;\n\n outputContracts.set(definition, contract);\n\n return contract;\n};\n\n/**\n * Insert the contract immediately after the request prompt's last system\n * message (position 0 when none exists), extending the last contiguous\n * system block. Placement is normative: the Anthropic provider replaces its\n * top-level `system` parameter per contiguous system group, so only the last\n * block survives there — an isolated trailing contract message would discard\n * the author's instructions, and a contract inside an earlier block (for\n * example a resumed Thread's original instructions ahead of this Run's\n * evaluated instructions) would itself be discarded. Extending the last\n * block keeps author content and contract together on every provider and\n * preserves the author's per-message cache-control annotations.\n */\nexport const insertOutputContract = (\n prompt: Prompt.Prompt,\n message: Prompt.SystemMessage,\n): Prompt.Prompt => {\n const content = prompt.content;\n let insertAt = 0;\n\n for (let index = 0; index < content.length; index += 1) {\n if (content[index]?.role === \"system\") {\n insertAt = index + 1;\n }\n }\n\n return Prompt.fromMessages([...content.slice(0, insertAt), message, ...content.slice(insertAt)]);\n};\n"],"mappings":";;;AAKA,MAAM,yBAAyB;;;;;;;;;;;;;AAc/B,MAAa,cACX,WACiB,OAAO,SAAS,GAAG,yBAAyB,OAAO,CAAC;AAEvE,MAAa,gBAAgB,WAC3B,OAAO,mBAAmB,MAAM,CAAC,GAAG,4BAA4B;AAoClE,MAAM,qBAAqB,eACzB,WAAW,eAAe,KAAA,IACtB,kNAGA,yEAAyE,WAAW,WAAW,KAAK,mMAErD,WAAW,WAAW,KAAK;AAEhF,MAAM,+BAA+B,MAAc,oBACjD,0BAA0B,kBAAkB,uBAAuB,gBAAgB,2CAA2C,KAAK,UAAU,IAAI,EAAE;;;;;;;;;AAYrJ,MAAM,YAAY,aAAqC;CACrD,MAAM;CACN;CACA,MAAM,OAAO,YAAY,UAAU,EAAE,SAAS,QAAQ,CAAC;AACzD;AAEA,MAAM,8BAA8B,eAAoD;CACtF,IAAI,WAAW,YAAY,aAAa,MACtC,OAAO,SACL,4BACE,WAAW,WAAW,OACrB,WAAW,qBAAqB,UAAU,KAAK,CAClD,CACF;CAEF,IAAI,aAAa,WAAW,MAAM,GAChC,OAAO,SACL,+LAEG,WAAW,eAAe,KAAA,IACvB,KACA,sBAAsB,WAAW,WAAW,KAAK,qRACzD;CAEF,IAAI;EACF,MAAM,aAAa,KAAK,wBAAwB,WAAW,MAAM;EAEjE,OAAO,SACL,GAAG,kBAAkB,UAAU,EAAE,MAAM,KAAK,UAAU,YAAY,KAAA,GAAW,CAAC,GAChF;CACF,SAAS,OAAO;EACd,OAAO;GACL,MAAM;GACN,QAAQ,iBAAiB,QAAQ,MAAM,UAAU,OAAO,KAAK;EAC/D;CACF;AACF;AAIA,MAAM,kCAAkB,IAAI,QAA6C;AAEzE,MAAa,wBAAwB,eAAoD;CACvF,MAAM,SAAS,gBAAgB,IAAI,UAAU;CAE7C,IAAI,WAAW,KAAA,GAAW,OAAO;CACjC,MAAM,OAAO,2BAA2B,UAAU;CAClD,MAAM,eAAe,WAAW,uBAAuB,CAAC;CAExD,MAAM,WACJ,KAAK,SAAS,cAAc,aAAa,SAAS,IAC9C,SACE,2FAA2F,aAAa,KAAK,gBAAgB,KAAK,UAAU,YAAY,IAAI,CAAC,CAAC,CAAC,KAAK,IAAI,EAAE;;IAGxK,KAAK,OACT,IACA;CAEN,gBAAgB,IAAI,YAAY,QAAQ;CAExC,OAAO;AACT;;;;;;;;;;;;;AAcA,MAAa,wBACX,QACA,YACkB;CAClB,MAAM,UAAU,OAAO;CACvB,IAAI,WAAW;CAEf,KAAK,IAAI,QAAQ,GAAG,QAAQ,QAAQ,QAAQ,SAAS,GACnD,IAAI,QAAQ,MAAM,EAAE,SAAS,UAC3B,WAAW,QAAQ;CAIvB,OAAO,OAAO,aAAa;EAAC,GAAG,QAAQ,MAAM,GAAG,QAAQ;EAAG;EAAS,GAAG,QAAQ,MAAM,QAAQ;CAAC,CAAC;AACjG"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
//#region \0rolldown/runtime.js
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __exportAll = (all, no_symbols) => {
|
|
4
|
+
let target = {};
|
|
5
|
+
for (var name in all) __defProp(target, name, {
|
|
6
|
+
get: all[name],
|
|
7
|
+
enumerable: true
|
|
8
|
+
});
|
|
9
|
+
if (!no_symbols) __defProp(target, Symbol.toStringTag, { value: "Module" });
|
|
10
|
+
return target;
|
|
11
|
+
};
|
|
12
|
+
//#endregion
|
|
13
|
+
export { __exportAll as t };
|
|
@@ -0,0 +1,194 @@
|
|
|
1
|
+
import { n as NetworkDisabled, p as SandboxImplementation, t as NetworkAllowlist } from "../Sandbox-CEsDWBLq.mjs";
|
|
2
|
+
import { Context, Duration, Effect, Schema, Scope } from "effect";
|
|
3
|
+
declare namespace CodeExecutor_d_exports {
|
|
4
|
+
export { CodeExecutionError, CodeExecutionHost, CodeExecutionLimits, CodeExecutionNamespace, CodeExecutionProtocolError, CodeExecutionRequest, CodeExecutionResourceUse, CodeExecutionResult, CodeExecutionTimeoutError, CodeExecutor, CodeExecutorExecute, CodeExecutorStartError, CodeExecutorTerminatedError, CodeExecutorUnsupportedError, CodeHostCall, CodeHostCallFailure, CodeHostCallLimitError, CodeHostCallResult, CodeHostCallSuccess, CodeOutputLimitError, CodeProgramFailedError, CodeSourceError, JsIdentifier };
|
|
5
|
+
}
|
|
6
|
+
/** A JavaScript identifier safe to bind as a sandbox global or method name. */
|
|
7
|
+
declare const JsIdentifier: Schema.refine<string, Schema.NonEmptyString>;
|
|
8
|
+
type JsIdentifier = typeof JsIdentifier.Type;
|
|
9
|
+
declare const CodeExecutionNamespace_base: Schema.Class<CodeExecutionNamespace, Schema.Struct<{
|
|
10
|
+
readonly name: Schema.refine<string, Schema.NonEmptyString>;
|
|
11
|
+
readonly methods: Schema.$Array<Schema.refine<string, Schema.NonEmptyString>>;
|
|
12
|
+
}>, {}>;
|
|
13
|
+
/** One callable namespace exposed to the generated program as a typed global. */
|
|
14
|
+
declare class CodeExecutionNamespace extends CodeExecutionNamespace_base {}
|
|
15
|
+
declare const CodeExecutionLimits_base: Schema.Class<CodeExecutionLimits, Schema.Struct<{
|
|
16
|
+
readonly maxSourceBytes: Schema.Int;
|
|
17
|
+
readonly maxWallTime: Schema.refine<Duration.Duration, Schema.Duration>;
|
|
18
|
+
readonly cpuMillis: Schema.optionalKey<Schema.Int>;
|
|
19
|
+
readonly maxLogBytes: Schema.Int;
|
|
20
|
+
readonly maxResultBytes: Schema.Int;
|
|
21
|
+
readonly maxHostCalls: Schema.Natural;
|
|
22
|
+
/** Maximum active host calls per pass; defaults to four. Excess calls wait in Scope. */
|
|
23
|
+
readonly maxHostCallConcurrency: Schema.optionalKey<Schema.Int>;
|
|
24
|
+
readonly maxHostCallArgumentBytes: Schema.Int;
|
|
25
|
+
readonly maxHostCallResultBytes: Schema.Int;
|
|
26
|
+
}>, {}>;
|
|
27
|
+
/**
|
|
28
|
+
* Limits an executor must either enforce or reject (CAP-015). Byte bounds are
|
|
29
|
+
* measured on UTF-8 encoded JSON at the sandbox boundary.
|
|
30
|
+
*/
|
|
31
|
+
declare class CodeExecutionLimits extends CodeExecutionLimits_base {}
|
|
32
|
+
declare const CodeExecutionRequest_base: Schema.Class<CodeExecutionRequest, Schema.Struct<{
|
|
33
|
+
readonly language: Schema.Literals<readonly ["javascript"]>;
|
|
34
|
+
readonly source: Schema.String;
|
|
35
|
+
readonly namespaces: Schema.$Array<typeof CodeExecutionNamespace>;
|
|
36
|
+
readonly network: Schema.Union<readonly [typeof NetworkDisabled, typeof NetworkAllowlist]>;
|
|
37
|
+
readonly limits: typeof CodeExecutionLimits;
|
|
38
|
+
}>, {}>;
|
|
39
|
+
/**
|
|
40
|
+
* One isolated execution pass over bounded generated JavaScript. The source
|
|
41
|
+
* must be a single expression evaluating to one async function; the executor
|
|
42
|
+
* harness invokes it exactly once with no arguments (ADR-0017 decision 5).
|
|
43
|
+
*/
|
|
44
|
+
declare class CodeExecutionRequest extends CodeExecutionRequest_base {}
|
|
45
|
+
declare const CodeHostCall_base: Schema.Class<CodeHostCall, Schema.Struct<{
|
|
46
|
+
readonly namespace: Schema.refine<string, Schema.NonEmptyString>;
|
|
47
|
+
readonly method: Schema.refine<string, Schema.NonEmptyString>;
|
|
48
|
+
readonly argument: Schema.Codec<Schema.Json, Schema.Json, never, never>;
|
|
49
|
+
}>, {}>;
|
|
50
|
+
/** One host invocation from generated code. Data only: the broker owns identity. */
|
|
51
|
+
declare class CodeHostCall extends CodeHostCall_base {}
|
|
52
|
+
declare const CodeHostCallSuccess_base: Schema.Class<CodeHostCallSuccess, Schema.TaggedStruct<"CodeHostCallSuccess", {
|
|
53
|
+
readonly value: Schema.Codec<Schema.Json, Schema.Json, never, never>;
|
|
54
|
+
}>, {}>;
|
|
55
|
+
/** A host call settled with the encoded Tool success value. */
|
|
56
|
+
declare class CodeHostCallSuccess extends CodeHostCallSuccess_base {}
|
|
57
|
+
declare const CodeHostCallFailure_base: Schema.Class<CodeHostCallFailure, Schema.TaggedStruct<"CodeHostCallFailure", {
|
|
58
|
+
readonly error: Schema.Codec<Schema.Json, Schema.Json, never, never>;
|
|
59
|
+
}>, {}>;
|
|
60
|
+
/**
|
|
61
|
+
* A host call settled with a Schema-encoded typed failure envelope. Inside the
|
|
62
|
+
* generated program the call's Promise rejects with the envelope value, so a
|
|
63
|
+
* program can catch and branch on expected failures.
|
|
64
|
+
*/
|
|
65
|
+
declare class CodeHostCallFailure extends CodeHostCallFailure_base {}
|
|
66
|
+
/** Outcome of one host call as data; transport failures stay executor errors. */
|
|
67
|
+
declare const CodeHostCallResult: Schema.Union<readonly [typeof CodeHostCallSuccess, typeof CodeHostCallFailure]>;
|
|
68
|
+
type CodeHostCallResult = typeof CodeHostCallResult.Type;
|
|
69
|
+
declare const CodeExecutionHost_base: Context.ServiceClass<CodeExecutionHost, "@effect-agent/sandbox/CodeExecutionHost", {
|
|
70
|
+
readonly call: (call: CodeHostCall) => Effect.Effect<CodeHostCallResult>;
|
|
71
|
+
}>;
|
|
72
|
+
/**
|
|
73
|
+
* The per-pass host capability: the only authority generated code has over the
|
|
74
|
+
* host. It is provided at the pass edge by the capability layer, its live
|
|
75
|
+
* bindings are scoped resources, and it is never persisted (ADR-0017
|
|
76
|
+
* decision 2). Broker-level failures return as `CodeHostCallFailure` data;
|
|
77
|
+
* an unexpected host defect remains a defect.
|
|
78
|
+
*/
|
|
79
|
+
declare class CodeExecutionHost extends CodeExecutionHost_base {}
|
|
80
|
+
declare const CodeExecutionResourceUse_base: Schema.Class<CodeExecutionResourceUse, Schema.Struct<{
|
|
81
|
+
readonly wallTime: Schema.refine<Duration.Duration, Schema.Duration>;
|
|
82
|
+
readonly hostCalls: Schema.Natural;
|
|
83
|
+
readonly logBytes: Schema.Natural;
|
|
84
|
+
readonly resultBytes: Schema.Natural;
|
|
85
|
+
readonly cpuMillis: Schema.optionalKey<Schema.Natural>;
|
|
86
|
+
}>, {}>;
|
|
87
|
+
/** Accounting one executor observed for one pass. */
|
|
88
|
+
declare class CodeExecutionResourceUse extends CodeExecutionResourceUse_base {}
|
|
89
|
+
declare const CodeExecutionResult_base: Schema.Class<CodeExecutionResult, Schema.Struct<{
|
|
90
|
+
readonly implementation: typeof SandboxImplementation;
|
|
91
|
+
readonly value: Schema.Codec<Schema.Json, Schema.Json, never, never>;
|
|
92
|
+
readonly logs: Schema.$Array<Schema.String>;
|
|
93
|
+
readonly resourceUse: typeof CodeExecutionResourceUse;
|
|
94
|
+
}>, {}>;
|
|
95
|
+
/**
|
|
96
|
+
* The bounded outcome of one successful pass. `value` and `logs` are the raw
|
|
97
|
+
* executor capture; the aggregate model-visible egress budget and redaction
|
|
98
|
+
* pass are owned by the Code Mode capability, not the executor (CAP-016).
|
|
99
|
+
*/
|
|
100
|
+
declare class CodeExecutionResult extends CodeExecutionResult_base {}
|
|
101
|
+
declare const CodeSourceError_base: Schema.Class<CodeSourceError, Schema.TaggedStruct<"CodeSourceError", {
|
|
102
|
+
readonly implementation: typeof SandboxImplementation;
|
|
103
|
+
readonly reason: Schema.Literals<readonly ["invalid", "oversized", "not-a-function"]>;
|
|
104
|
+
readonly message: Schema.String;
|
|
105
|
+
}>, import("effect/Cause").YieldableError>;
|
|
106
|
+
/** The source is not one async function expression the executor can run. */
|
|
107
|
+
declare class CodeSourceError extends CodeSourceError_base {}
|
|
108
|
+
declare const CodeExecutorUnsupportedError_base: Schema.Class<CodeExecutorUnsupportedError, Schema.TaggedStruct<"CodeExecutorUnsupportedError", {
|
|
109
|
+
readonly implementation: typeof SandboxImplementation;
|
|
110
|
+
readonly feature: Schema.Literals<readonly ["language", "network", "cpu-limit", "namespaces", "wall-clock", "host-calls"]>;
|
|
111
|
+
readonly message: Schema.String;
|
|
112
|
+
}>, import("effect/Cause").YieldableError>;
|
|
113
|
+
/** The executor cannot honestly enforce one requested feature, limit, or policy. */
|
|
114
|
+
declare class CodeExecutorUnsupportedError extends CodeExecutorUnsupportedError_base {}
|
|
115
|
+
declare const CodeExecutorStartError_base: Schema.Class<CodeExecutorStartError, Schema.TaggedStruct<"CodeExecutorStartError", {
|
|
116
|
+
readonly implementation: typeof SandboxImplementation;
|
|
117
|
+
readonly message: Schema.String;
|
|
118
|
+
readonly cause: Schema.optionalKey<Schema.Defect>;
|
|
119
|
+
}>, import("effect/Cause").YieldableError>;
|
|
120
|
+
/** The executor could not start the isolated pass. */
|
|
121
|
+
declare class CodeExecutorStartError extends CodeExecutorStartError_base {}
|
|
122
|
+
declare const CodeExecutionTimeoutError_base: Schema.Class<CodeExecutionTimeoutError, Schema.TaggedStruct<"CodeExecutionTimeoutError", {
|
|
123
|
+
readonly implementation: typeof SandboxImplementation;
|
|
124
|
+
readonly kind: Schema.Literals<readonly ["cpu", "wall-clock"]>;
|
|
125
|
+
readonly maxWallTime: Schema.refine<Duration.Duration, Schema.Duration>;
|
|
126
|
+
readonly logs: Schema.$Array<Schema.String>;
|
|
127
|
+
}>, import("effect/Cause").YieldableError>;
|
|
128
|
+
/** The pass exceeded its CPU or wall-clock budget and was terminated. */
|
|
129
|
+
declare class CodeExecutionTimeoutError extends CodeExecutionTimeoutError_base {}
|
|
130
|
+
declare const CodeOutputLimitError_base: Schema.Class<CodeOutputLimitError, Schema.TaggedStruct<"CodeOutputLimitError", {
|
|
131
|
+
readonly implementation: typeof SandboxImplementation;
|
|
132
|
+
readonly surface: Schema.Literals<readonly ["logs", "result", "host-call-argument", "host-call-result"]>;
|
|
133
|
+
readonly limit: Schema.Int;
|
|
134
|
+
readonly observed: Schema.Natural;
|
|
135
|
+
readonly logs: Schema.$Array<Schema.String>;
|
|
136
|
+
}>, import("effect/Cause").YieldableError>;
|
|
137
|
+
/** A bounded surface (logs, result, or a per-call byte bound) was exceeded. */
|
|
138
|
+
declare class CodeOutputLimitError extends CodeOutputLimitError_base {}
|
|
139
|
+
declare const CodeHostCallLimitError_base: Schema.Class<CodeHostCallLimitError, Schema.TaggedStruct<"CodeHostCallLimitError", {
|
|
140
|
+
readonly implementation: typeof SandboxImplementation;
|
|
141
|
+
readonly limit: Schema.Natural;
|
|
142
|
+
readonly logs: Schema.$Array<Schema.String>;
|
|
143
|
+
}>, import("effect/Cause").YieldableError>;
|
|
144
|
+
/** The pass issued more host calls than its executor-owned cap allows. */
|
|
145
|
+
declare class CodeHostCallLimitError extends CodeHostCallLimitError_base {}
|
|
146
|
+
declare const CodeProgramFailedError_base: Schema.Class<CodeProgramFailedError, Schema.TaggedStruct<"CodeProgramFailedError", {
|
|
147
|
+
readonly implementation: typeof SandboxImplementation;
|
|
148
|
+
readonly reason: Schema.Literals<readonly ["threw", "rejected", "non-json-result"]>;
|
|
149
|
+
readonly thrown: Schema.Codec<Schema.Json, Schema.Json, never, never>;
|
|
150
|
+
readonly message: Schema.String;
|
|
151
|
+
readonly logs: Schema.$Array<Schema.String>;
|
|
152
|
+
}>, import("effect/Cause").YieldableError>;
|
|
153
|
+
/**
|
|
154
|
+
* The generated program finished by failing: it threw, its promise rejected,
|
|
155
|
+
* or it returned a value that is not JSON. The bounded thrown value and log
|
|
156
|
+
* capture flow back so a model can correct the program without a blind retry.
|
|
157
|
+
*/
|
|
158
|
+
declare class CodeProgramFailedError extends CodeProgramFailedError_base {}
|
|
159
|
+
declare const CodeExecutionProtocolError_base: Schema.Class<CodeExecutionProtocolError, Schema.TaggedStruct<"CodeExecutionProtocolError", {
|
|
160
|
+
readonly implementation: typeof SandboxImplementation;
|
|
161
|
+
readonly message: Schema.String;
|
|
162
|
+
}>, import("effect/Cause").YieldableError>;
|
|
163
|
+
/** The executor or its transport produced a value outside the protocol Schemas. */
|
|
164
|
+
declare class CodeExecutionProtocolError extends CodeExecutionProtocolError_base {}
|
|
165
|
+
declare const CodeExecutorTerminatedError_base: Schema.Class<CodeExecutorTerminatedError, Schema.TaggedStruct<"CodeExecutorTerminatedError", {
|
|
166
|
+
readonly implementation: typeof SandboxImplementation;
|
|
167
|
+
readonly message: Schema.String;
|
|
168
|
+
}>, import("effect/Cause").YieldableError>;
|
|
169
|
+
/**
|
|
170
|
+
* The pass was terminated externally — isolate eviction or a platform kill —
|
|
171
|
+
* with no terminal program result. No result is fabricated.
|
|
172
|
+
*/
|
|
173
|
+
declare class CodeExecutorTerminatedError extends CodeExecutorTerminatedError_base {}
|
|
174
|
+
/** Expected Code Mode execution failures. Interruption stays an Effect interruption. */
|
|
175
|
+
declare const CodeExecutionError: Schema.Union<readonly [typeof CodeSourceError, typeof CodeExecutorUnsupportedError, typeof CodeExecutorStartError, typeof CodeExecutionTimeoutError, typeof CodeOutputLimitError, typeof CodeHostCallLimitError, typeof CodeProgramFailedError, typeof CodeExecutionProtocolError, typeof CodeExecutorTerminatedError]>;
|
|
176
|
+
type CodeExecutionError = typeof CodeExecutionError.Type;
|
|
177
|
+
declare const CodeExecutor_base: Context.ServiceClass<CodeExecutor, "@effect-agent/sandbox/CodeExecutor", {
|
|
178
|
+
readonly execute: (request: CodeExecutionRequest) => Effect.Effect<CodeExecutionResult, CodeExecutionError, Scope.Scope | CodeExecutionHost>;
|
|
179
|
+
}>;
|
|
180
|
+
/**
|
|
181
|
+
* Callback-capable isolated execution port for Code Mode (ADR-0017), a sibling
|
|
182
|
+
* of the command-shaped `Sandbox` service. One `execute` is one stateless pass:
|
|
183
|
+
* the executor owns no approval, Tool, replay, or Thread semantics, holds
|
|
184
|
+
* every pass resource in the given Scope, and reaches the host only through the
|
|
185
|
+
* `CodeExecutionHost` service in its requirement channel. Implementations must
|
|
186
|
+
* identify their isolation posture honestly; an `unisolated` executor is never
|
|
187
|
+
* a security boundary (CAP-010, CAP-015).
|
|
188
|
+
*/
|
|
189
|
+
declare class CodeExecutor extends CodeExecutor_base {}
|
|
190
|
+
/** Type helper for implementations that preserve the public CodeExecutor contract. */
|
|
191
|
+
type CodeExecutorExecute = (request: CodeExecutionRequest) => Effect.Effect<CodeExecutionResult, CodeExecutionError, Scope.Scope | CodeExecutionHost>;
|
|
192
|
+
//#endregion
|
|
193
|
+
export { CodeExecutionError, CodeExecutionHost, CodeExecutionLimits, CodeExecutionNamespace, CodeExecutionProtocolError, CodeExecutionRequest, CodeExecutionResourceUse, CodeExecutionResult, CodeExecutionTimeoutError, CodeExecutor, CodeExecutorExecute, CodeExecutorStartError, CodeExecutorTerminatedError, CodeExecutorUnsupportedError, CodeHostCall, CodeHostCallFailure, CodeHostCallLimitError, CodeHostCallResult, CodeHostCallSuccess, CodeOutputLimitError, CodeProgramFailedError, CodeSourceError, JsIdentifier, CodeExecutor_d_exports as t };
|
|
194
|
+
//# sourceMappingURL=CodeExecutor.d.mts.map
|