effect-agent 0.1.0-beta.11 → 0.1.0-beta.110
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-1DMSO_Fl.mjs +86 -0
- package/dist/Agent-1DMSO_Fl.mjs.map +1 -0
- package/dist/Agent-DriBcXBN.d.mts +245 -0
- package/dist/AgentError-Bn1ytXRD.d.mts +117 -0
- package/dist/AgentPolicy-BqDoSXO6.d.mts +96 -0
- package/dist/AgentRuntime-CWkHuzyt.d.mts +346 -0
- package/dist/AgentRuntime-DLwPoEVH.mjs +4735 -0
- package/dist/AgentRuntime-DLwPoEVH.mjs.map +1 -0
- package/dist/AgentUpdates-DMJ-_xow.d.mts +53 -0
- package/dist/ContextCompactor-WwSIG_Z2.d.mts +161 -0
- package/dist/ContextWindow-DRQ5Mbm2.d.mts +58 -0
- package/dist/DurableAgentRuntime-PyIgNYXF.mjs +6772 -0
- package/dist/DurableAgentRuntime-PyIgNYXF.mjs.map +1 -0
- package/dist/DurableFailpoint-mx3-nsxU.d.mts +41 -0
- package/dist/DurableStep-Cry_iol4.d.mts +103 -0
- package/dist/EventSource-BUYLmL77.d.mts +51 -0
- package/dist/FailureDiagnostic-BElLOoED.mjs +274 -0
- package/dist/FailureDiagnostic-BElLOoED.mjs.map +1 -0
- package/dist/FailureDiagnostic-CaAkzGHL.d.mts +223 -0
- package/dist/Identifiers-CN2s30fF.d.mts +40 -0
- package/dist/InMemory.d.mts +24 -0
- package/dist/InMemory.mjs +24 -0
- package/dist/InMemory.mjs.map +1 -0
- package/dist/MemoryNamespace-BbRW5p71.d.mts +36 -0
- package/dist/MemoryReference-B8Q3UJoJ.d.mts +79 -0
- package/dist/Messaging-DaZDlBqh.d.mts +1067 -0
- package/dist/Messaging-Dkg87ebg.d.mts +221 -0
- package/dist/MessagingHost-D89X7ma8.mjs +110 -0
- package/dist/MessagingHost-D89X7ma8.mjs.map +1 -0
- package/dist/MessagingHost-e1Sbzfao.d.mts +74 -0
- package/dist/OperationAuthorizer-TzcQtpX5.d.mts +61 -0
- package/dist/Output-CAFJTAbP.d.mts +25 -0
- package/dist/PageCapture-Df8Xwskw.d.mts +583 -0
- package/dist/PageScreenshot-BpgZKAxl.d.mts +48 -0
- package/dist/PreparedInputAdmission-J3YK6LAm.d.mts +42 -0
- package/dist/Receipt-BAHyigAF.d.mts +33 -0
- package/dist/Records-4qnRmniE.d.mts +4058 -0
- package/dist/RunEvent-DIrzkjLr.d.mts +460 -0
- package/dist/RunEventSink-D5aVhISG.d.mts +108 -0
- package/dist/RunJournal-BXrq0VIK.mjs +931 -0
- package/dist/RunJournal-BXrq0VIK.mjs.map +1 -0
- package/dist/RunOptions-BoESJrxw.d.mts +935 -0
- package/dist/RunPolicyUsage-ClZxyR46.d.mts +21 -0
- package/dist/Sandbox-CEsDWBLq.d.mts +173 -0
- package/dist/Schedule-C2lH2kxY.d.mts +847 -0
- package/dist/Scheduling-DPb2QyAK.mjs +691 -0
- package/dist/Scheduling-DPb2QyAK.mjs.map +1 -0
- package/dist/Subagent-D9eYdGTl.mjs +1537 -0
- package/dist/Subagent-D9eYdGTl.mjs.map +1 -0
- package/dist/Subagent-F72tuaxy.d.mts +1360 -0
- package/dist/SubagentContract-DdT7Cqe6.d.mts +116 -0
- package/dist/SubagentHost-CmiNTOBZ.d.mts +149 -0
- package/dist/Subscription-pQUv0QD6.d.mts +945 -0
- package/dist/SubscriptionInput-DdJOiNMY.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-BmVRAHKs.d.mts +80 -0
- package/dist/ToolResult-BKdqWRff.d.mts +78 -0
- package/dist/Usage-Dx0aknfk.d.mts +121 -0
- package/dist/WakeScheduler-EjUF-GhC.d.mts +56 -0
- package/dist/Worker-Du9dhVnp.d.mts +279 -0
- package/dist/Worker-T_3RbaKc.mjs +210 -0
- package/dist/Worker-T_3RbaKc.mjs.map +1 -0
- package/dist/agent-registration-B5CI-Ygk.mjs +201 -0
- package/dist/agent-registration-B5CI-Ygk.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 +152 -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 +124 -0
- package/dist/capabilities/ToolDiscovery.mjs +230 -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 +115 -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 +134 -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/FailureDiagnostic.d.mts +2 -0
- package/dist/core/FailureDiagnostic.mjs +2 -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 +156 -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 +3 -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 +330 -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 +110 -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 +98 -0
- package/dist/durable/DurableFailpoint.mjs.map +1 -0
- package/dist/durable/DurableFailpointTestControl.d.mts +14 -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 +185 -0
- package/dist/durable/GitHubWorkflowSource.mjs +209 -0
- package/dist/durable/GitHubWorkflowSource.mjs.map +1 -0
- package/dist/durable/MessageDelivery.d.mts +876 -0
- package/dist/durable/MessageDelivery.mjs +549 -0
- package/dist/durable/MessageDelivery.mjs.map +1 -0
- package/dist/durable/MessageDeliveryStoreConformance.d.mts +376 -0
- package/dist/durable/MessageDeliveryStoreConformance.mjs +270 -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 +38 -0
- package/dist/durable/PreparedInputAdmission.mjs.map +1 -0
- package/dist/durable/Records.d.mts +2 -0
- package/dist/durable/Records.mjs +841 -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 +391 -0
- package/dist/durable/Schedule.mjs.map +1 -0
- package/dist/durable/ScheduleStoreConformance.d.mts +17 -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 +29 -0
- package/dist/durable/SqlMemoryStore.mjs +436 -0
- package/dist/durable/SqlMemoryStore.mjs.map +1 -0
- package/dist/durable/SqlMessageDeliveryStore.d.mts +42 -0
- package/dist/durable/SqlMessageDeliveryStore.mjs +173 -0
- package/dist/durable/SqlMessageDeliveryStore.mjs.map +1 -0
- package/dist/durable/SqlStorageV2Upgrade.d.mts +21 -0
- package/dist/durable/SqlStorageV2Upgrade.mjs +459 -0
- package/dist/durable/SqlStorageV2Upgrade.mjs.map +1 -0
- package/dist/durable/SqlSubscriptionStore.d.mts +62 -0
- package/dist/durable/SqlSubscriptionStore.mjs +751 -0
- package/dist/durable/SqlSubscriptionStore.mjs.map +1 -0
- package/dist/durable/SqlThreadNativeReads.d.mts +49 -0
- package/dist/durable/SqlThreadNativeReads.mjs +153 -0
- package/dist/durable/SqlThreadNativeReads.mjs.map +1 -0
- package/dist/durable/SubmissionLedger.d.mts +3 -0
- package/dist/durable/SubmissionLedger.mjs +918 -0
- package/dist/durable/SubmissionLedger.mjs.map +1 -0
- package/dist/durable/SubmissionLedgerConformance.d.mts +29 -0
- package/dist/durable/SubmissionLedgerConformance.mjs +1993 -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 +16 -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 +76 -0
- package/dist/durable/ThreadInvariants.mjs +246 -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 +336 -0
- package/dist/durable/ThreadStore.mjs.map +1 -0
- package/dist/durable/ThreadStoreConformance.d.mts +28 -0
- package/dist/durable/ThreadStoreConformance.mjs +503 -0
- package/dist/durable/ThreadStoreConformance.mjs.map +1 -0
- package/dist/durable/ToolReconciler.d.mts +2 -0
- package/dist/durable/ToolReconciler.mjs +85 -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 +124 -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 +91 -6
- package/dist/index.mjs +100 -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 +160 -0
- package/dist/sandbox/InteractiveBrowser.mjs +184 -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/InMemory.ts +19 -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 +2488 -0
- package/src/capabilities/SubagentReservations.ts +850 -0
- package/src/capabilities/ToolDiscovery.ts +369 -0
- package/src/capabilities/WebCapture.ts +722 -0
- package/src/capabilities/WebSearch.ts +190 -0
- package/src/capabilities/internal/subagent-background.ts +1246 -0
- package/src/capabilities/internal/subagent-contract.ts +146 -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 +595 -0
- package/src/core/AgentError.ts +172 -0
- package/src/core/AgentPolicy.ts +153 -0
- package/src/core/AgentUpdates.ts +100 -0
- package/src/core/FailureDiagnostic.ts +343 -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 +72 -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 +190 -0
- package/src/core/Usage.ts +529 -0
- package/src/core/Worker.ts +184 -0
- package/src/core/internal/agent-updates.ts +34 -0
- package/src/core/internal/message-status.ts +60 -0
- package/src/core/internal/strict-schema.ts +14 -0
- package/src/core/internal/utf8.ts +23 -0
- package/src/durable/ActivityStore.ts +160 -0
- package/src/durable/Admin.ts +505 -0
- package/src/durable/AgentRegistration.ts +14 -0
- package/src/durable/Certification.ts +210 -0
- package/src/durable/CommittedActivity.ts +296 -0
- package/src/durable/Digest.ts +87 -0
- package/src/durable/DurableAgentRuntime.ts +10950 -0
- package/src/durable/DurableFailpoint.ts +107 -0
- package/src/durable/DurableFailpointTestControl.ts +39 -0
- package/src/durable/EventSource.ts +172 -0
- package/src/durable/GitHubWorkflowSource.ts +447 -0
- package/src/durable/MessageDelivery.ts +817 -0
- package/src/durable/MessageDeliveryStoreConformance.ts +410 -0
- package/src/durable/OperationAuthorizer.ts +85 -0
- package/src/durable/PersistentHistory.ts +260 -0
- package/src/durable/PreparedInputAdmission.ts +57 -0
- package/src/durable/Records.ts +1065 -0
- package/src/durable/Recovery.ts +1018 -0
- package/src/durable/RunJournal.ts +1631 -0
- package/src/durable/Schedule.ts +513 -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 +321 -0
- package/src/durable/SqlStorageV2Upgrade.ts +500 -0
- package/src/durable/SqlSubscriptionStore.ts +1440 -0
- package/src/durable/SqlThreadNativeReads.ts +256 -0
- package/src/durable/SubmissionLedger.ts +1205 -0
- package/src/durable/SubmissionLedgerConformance.ts +4590 -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 +507 -0
- package/src/durable/ThreadProjection.ts +269 -0
- package/src/durable/ThreadProjectionMaintenance.ts +67 -0
- package/src/durable/ThreadStore.ts +552 -0
- package/src/durable/ThreadStoreConformance.ts +1156 -0
- package/src/durable/ToolReconciler.ts +109 -0
- package/src/durable/WakeScheduler.ts +134 -0
- package/src/durable/WorkerHost.ts +171 -0
- package/src/durable/internal/agent-registration.ts +621 -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 +117 -0
- package/src/durable/internal/message-status.ts +20 -0
- package/src/durable/internal/messaging-host.ts +637 -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 +2678 -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 +1101 -0
- package/src/engine/SubagentHost.ts +193 -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 +10485 -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 +99 -21
- package/src/sandbox/CodeExecutor.ts +352 -0
- package/src/sandbox/InteractiveBrowser.ts +290 -0
- package/src/sandbox/PageCapture.ts +691 -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
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { t as AgentId } from "./Identifiers-CN2s30fF.mjs";
|
|
2
|
+
import { t as IdempotencyKey } from "./Receipt-BAHyigAF.mjs";
|
|
3
|
+
import { Context, Effect, Schema, Stream } from "effect";
|
|
4
|
+
declare namespace AgentUpdates_d_exports {
|
|
5
|
+
export { Emitter, Update, UpdateError, decode, emit, observe };
|
|
6
|
+
}
|
|
7
|
+
declare const Update_base: Schema.Class<Update, Schema.Struct<{
|
|
8
|
+
readonly schemaVersion: Schema.Literal<1>;
|
|
9
|
+
readonly agentId: Schema.brand<Schema.NonEmptyString, "@effect-agent/core/AgentId">;
|
|
10
|
+
readonly threadId: Schema.brand<Schema.NonEmptyString, "@effect-agent/core/ThreadId">;
|
|
11
|
+
readonly runId: Schema.brand<Schema.NonEmptyString, "@effect-agent/core/RunId">;
|
|
12
|
+
readonly updateId: Schema.brand<Schema.NonEmptyString, "@effect-agent/thread/IdempotencyKey">;
|
|
13
|
+
readonly sequence: Schema.Int;
|
|
14
|
+
readonly value: Schema.Codec<Schema.Json, Schema.Json, never, never>;
|
|
15
|
+
}>, {}>;
|
|
16
|
+
/** Canonical schema-encoded intermediate output, scoped to one logical Run. */
|
|
17
|
+
declare class Update extends Update_base {}
|
|
18
|
+
declare const UpdateError_base: Schema.Class<UpdateError, Schema.TaggedStruct<"AgentUpdateError", {
|
|
19
|
+
readonly reason: Schema.Literals<readonly ["validation", "unavailable", "conflict", "capacity", "storage", "identity", "denied"]>;
|
|
20
|
+
}>, import("effect/Cause").YieldableError>;
|
|
21
|
+
/** Fail-closed update acceptance and decoding errors; payloads are never included. */
|
|
22
|
+
declare class UpdateError extends UpdateError_base {}
|
|
23
|
+
declare const Emitter_base: Context.ServiceClass<Emitter, "@effect-agent/core/AgentUpdates/Emitter", {
|
|
24
|
+
readonly emit: (request: {
|
|
25
|
+
readonly target: {
|
|
26
|
+
readonly id: AgentId;
|
|
27
|
+
readonly updates?: Schema.Top | undefined;
|
|
28
|
+
};
|
|
29
|
+
readonly updateId: IdempotencyKey;
|
|
30
|
+
readonly value: Schema.Json;
|
|
31
|
+
}) => Effect.Effect<Update, UpdateError>;
|
|
32
|
+
}>;
|
|
33
|
+
/** Engine-owned invocation port. The Agent ID and exact update Schema must match the executing definition. */
|
|
34
|
+
declare class Emitter extends Emitter_base {}
|
|
35
|
+
/** Structural schema boundary accepted by definitions and their model bindings. */
|
|
36
|
+
type Source<S extends Schema.Top> = {
|
|
37
|
+
readonly id: AgentId;
|
|
38
|
+
readonly updates?: S | undefined;
|
|
39
|
+
};
|
|
40
|
+
type BoundSource<S extends Schema.Top> = Source<S> | {
|
|
41
|
+
readonly definition: Source<S>;
|
|
42
|
+
};
|
|
43
|
+
/** Emit a decoded update under an explicit stable key. Retries cannot replace accepted values. */
|
|
44
|
+
declare const emit: <S extends Schema.Top>(agent: BoundSource<S>, value: NoInfer<S["Type"]>, options: {
|
|
45
|
+
readonly idempotencyKey: IdempotencyKey;
|
|
46
|
+
}) => Effect.Effect<Update, UpdateError, Emitter | S["EncodingServices"]>;
|
|
47
|
+
/** Decode canonical update data through its declaring Agent Schema. */
|
|
48
|
+
declare const decode: <S extends Schema.Top>(agent: BoundSource<S>, update: Update) => Effect.Effect<S["Type"], UpdateError, S["DecodingServices"]>;
|
|
49
|
+
/** Decode an encoded update stream without hiding its failures or requirements. */
|
|
50
|
+
declare const observe: <S extends Schema.Top, E, R>(agent: BoundSource<S>, updates: Stream.Stream<Update, E, R>) => Stream.Stream<S["Type"], E | UpdateError, R | S["DecodingServices"]>;
|
|
51
|
+
//#endregion
|
|
52
|
+
export { decode as a, UpdateError as i, Emitter as n, emit as o, Update as r, observe as s, AgentUpdates_d_exports as t };
|
|
53
|
+
//# sourceMappingURL=AgentUpdates-DMJ-_xow.d.mts.map
|
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
import { s as RunId, u as ThreadId } from "./Identifiers-CN2s30fF.mjs";
|
|
2
|
+
import { i as CompactionPolicy } from "./AgentPolicy-BqDoSXO6.mjs";
|
|
3
|
+
import { n as ContextRolloverRequest } from "./ContextWindow-DRQ5Mbm2.mjs";
|
|
4
|
+
import { LanguageModel, Model, Prompt } from "effect/unstable/ai";
|
|
5
|
+
import { Context, Effect, Layer, Option, Schema, Stream } from "effect";
|
|
6
|
+
//#region src/engine/internal/compaction.d.ts
|
|
7
|
+
/**
|
|
8
|
+
* Pure helpers for engine-native context compaction (RUN-026/RUN-027). Everything here is deterministic and side-effect free:
|
|
9
|
+
* the engine's turn loop owns the state transitions, the durable coordinator
|
|
10
|
+
* owns the canonical record, and this module owns the arithmetic.
|
|
11
|
+
*
|
|
12
|
+
* Compaction is a VIEW over official history, never a mutation of it. The
|
|
13
|
+
* durable commit machinery slices official history by length
|
|
14
|
+
* (`lastCommitLen` in the coordinator), so official history must stay
|
|
15
|
+
* append-only within an Attempt; only the outgoing model prompt is rebuilt.
|
|
16
|
+
*/
|
|
17
|
+
/** Model-visible replacement for a tool result cleared by prune compaction. */
|
|
18
|
+
declare const CLEARED_TOOL_RESULT = "[tool result cleared by compaction]";
|
|
19
|
+
/** Prefix of the user message that carries a compaction summary into the prompt. */
|
|
20
|
+
declare const COMPACTION_SUMMARY_PREFIX = "The prior thread was compacted into this summary:\n\n";
|
|
21
|
+
/** Rollover text is recovery evidence; it never asserts that an external action succeeded. */
|
|
22
|
+
declare const CONTEXT_ROLLOVER_PREFIX = "A fresh context window has started. Earlier conversation has left this model view. Restore relevant notes and use available history tools to retrieve evidence; verify live state before repeating an action.\n\n";
|
|
23
|
+
/** Stable across Attempts; the initial window uses turn zero. */
|
|
24
|
+
declare const contextWindowId: (runId: string, turn: number) => string;
|
|
25
|
+
/** Shared by the live interpreter and canonical journal projection. */
|
|
26
|
+
declare const contextWindowMessage: (windowId: string, handoff?: string) => Prompt.Message;
|
|
27
|
+
/**
|
|
28
|
+
* Deterministic UTF-8 bytes/4 token estimate over one message's structural JSON.
|
|
29
|
+
* Conservative for prose, slightly generous for dense JSON — the estimate
|
|
30
|
+
* only gates WHEN to compact, never what is preserved.
|
|
31
|
+
*/
|
|
32
|
+
declare const estimateMessageTokens: (message: Prompt.Message) => number;
|
|
33
|
+
/** Sum of `estimateMessageTokens` over a message array. */
|
|
34
|
+
declare const estimatePromptTokens: (messages: ReadonlyArray<Prompt.Message>, estimate?: (message: Prompt.Message) => number) => number;
|
|
35
|
+
/**
|
|
36
|
+
* Mutable per-Run compaction state held on the engine's RunContext. Indices
|
|
37
|
+
* are positions in the SOURCE prompt (the official-history basis handed to
|
|
38
|
+
* each Turn). Ordinary history grows append-only. Prepared history must retain
|
|
39
|
+
* content-equivalent covered prefixes or the engine rejects the next Turn.
|
|
40
|
+
*/
|
|
41
|
+
interface ContextCompactionState {
|
|
42
|
+
/**
|
|
43
|
+
* Source-index bounds `[start, end)` of the protected instruction/input
|
|
44
|
+
* block, mapped to prepared indices when necessary. `-1` before mapping;
|
|
45
|
+
* an unmappable protected block fails before any compaction decision.
|
|
46
|
+
*/
|
|
47
|
+
protectedStart: number;
|
|
48
|
+
protectedEnd: number;
|
|
49
|
+
/** Prepared prompts also retain application-added system instructions. */
|
|
50
|
+
protectSystemMessages?: boolean;
|
|
51
|
+
/** Tool messages at source index below this bound render as cleared. */
|
|
52
|
+
clearedThrough: number;
|
|
53
|
+
/**
|
|
54
|
+
* Source messages below this bound (outside the protected block) are
|
|
55
|
+
* replaced by a summary or a fresh-window marker. Absent before the first replacement.
|
|
56
|
+
*/
|
|
57
|
+
replacement: {
|
|
58
|
+
readonly kind: "summarize";
|
|
59
|
+
readonly through: number;
|
|
60
|
+
readonly summary: string;
|
|
61
|
+
} | {
|
|
62
|
+
readonly kind: "rollover";
|
|
63
|
+
readonly through: number;
|
|
64
|
+
readonly windowId: string;
|
|
65
|
+
readonly handoff?: string;
|
|
66
|
+
} | undefined;
|
|
67
|
+
/** Loop guard: at most one threshold compaction per Turn. */
|
|
68
|
+
lastCompactionTurn: number;
|
|
69
|
+
/** RUN-027 guard: at most one overflow compact-and-retry per Turn. */
|
|
70
|
+
overflowRetryTurn: number;
|
|
71
|
+
/**
|
|
72
|
+
* View length at the last model call, the base of the provider-anchored
|
|
73
|
+
* estimate. `-1` invalidates it (fresh Run or just compacted), forcing a
|
|
74
|
+
* full-view estimate.
|
|
75
|
+
*/
|
|
76
|
+
lastViewLength: number;
|
|
77
|
+
}
|
|
78
|
+
declare namespace ContextCompactor_d_exports {
|
|
79
|
+
export { CompactionDecision, CompactionError, CompactionModelLayer, CompactionRequest, ContextCompaction, ContextCompactor, ContextMessageTokenEstimator };
|
|
80
|
+
}
|
|
81
|
+
/**
|
|
82
|
+
* A proposed view change. Source indices are exclusive prefix bounds, never record sequences.
|
|
83
|
+
* Summaries contain at most 65,536 characters; the interpreter rejects oversized decisions
|
|
84
|
+
* before committing or changing coverage.
|
|
85
|
+
*/
|
|
86
|
+
declare const CompactionDecision: Schema.Union<readonly [Schema.Struct<{
|
|
87
|
+
readonly kind: Schema.Literal<"rollover">;
|
|
88
|
+
readonly through: Schema.Natural;
|
|
89
|
+
readonly handoff: Schema.optionalKey<Schema.NonEmptyString>;
|
|
90
|
+
}>, Schema.Struct<{
|
|
91
|
+
readonly kind: Schema.Literal<"clear-tool-results">;
|
|
92
|
+
readonly through: Schema.Natural;
|
|
93
|
+
}>, Schema.Struct<{
|
|
94
|
+
readonly kind: Schema.Literal<"summarize">;
|
|
95
|
+
readonly through: Schema.Natural;
|
|
96
|
+
readonly summary: Schema.NonEmptyString;
|
|
97
|
+
}>]>;
|
|
98
|
+
type CompactionDecision = typeof CompactionDecision.Type;
|
|
99
|
+
declare const CompactionError_base: Schema.Class<CompactionError, Schema.TaggedStruct<"CompactionError", {
|
|
100
|
+
readonly message: Schema.String;
|
|
101
|
+
readonly cause: Schema.optionalKey<Schema.Defect>;
|
|
102
|
+
}>, import("effect/Cause").YieldableError>;
|
|
103
|
+
/** Expected strategy or decision-validation failure. Causes stay in the live Effect only. */
|
|
104
|
+
declare class CompactionError extends CompactionError_base {}
|
|
105
|
+
/** Upstream Model.captureRequirements returns this closed Layer. */
|
|
106
|
+
type CompactionModelLayer = Layer.Layer<LanguageModel.LanguageModel | Model.ProviderName | Model.ModelName>;
|
|
107
|
+
/** A full message estimate, or undefined to use the native structural estimate. */
|
|
108
|
+
type ContextMessageTokenEstimator = (message: Prompt.Message) => number | undefined;
|
|
109
|
+
/**
|
|
110
|
+
* One bounded pass over an immutable source snapshot. A harness owns state, metering, and
|
|
111
|
+
* application of decisions. The interpreter permits at most one prune followed by one replacement
|
|
112
|
+
* (summary or rollover), and one call to summarize per Turn, shared across every trigger.
|
|
113
|
+
* All model work must use summarize so it is metered.
|
|
114
|
+
* Callback failures and requirements pass through unchanged; strategy dependencies belong to
|
|
115
|
+
* its construction Layer. Protected messages cannot be removed and Tool pairs cannot be split by a decision.
|
|
116
|
+
*/
|
|
117
|
+
interface CompactionRequest<E, R> {
|
|
118
|
+
readonly threadId: ThreadId;
|
|
119
|
+
readonly runId: RunId;
|
|
120
|
+
readonly turn: number;
|
|
121
|
+
readonly source: Prompt.Prompt;
|
|
122
|
+
readonly state: Readonly<ContextCompactionState>;
|
|
123
|
+
readonly policy: CompactionPolicy;
|
|
124
|
+
readonly targetTokens: number | undefined;
|
|
125
|
+
readonly trigger: "pressure" | "overflow" | "requested";
|
|
126
|
+
/** Budget admission may prohibit a separate model call while still allowing a rollover. */
|
|
127
|
+
readonly modelCallAllowed: boolean;
|
|
128
|
+
/** The current captured Model's message accounting, including native fallback. */
|
|
129
|
+
readonly estimateMessageTokens?: ContextMessageTokenEstimator | undefined;
|
|
130
|
+
/** Present for a successful, singleton context rollover Tool; through excludes later steering. */
|
|
131
|
+
readonly requested?: (ContextRolloverRequest & {
|
|
132
|
+
readonly through: number;
|
|
133
|
+
}) | undefined;
|
|
134
|
+
readonly summarize: (prompt: Prompt.Prompt, model?: CompactionModelLayer) => Effect.Effect<string, E, R>;
|
|
135
|
+
}
|
|
136
|
+
interface ContextCompaction {
|
|
137
|
+
/** Non-negative finite integer estimate, used for admission and derived prompt overhead too. */
|
|
138
|
+
readonly estimate: (messages: ReadonlyArray<Prompt.Message>) => number;
|
|
139
|
+
/** Emit decisions sequentially; the consumer commits each before pulling the next. */
|
|
140
|
+
readonly compact: <E, R>(request: CompactionRequest<E, R>) => Stream.Stream<CompactionDecision, E | CompactionError, R>;
|
|
141
|
+
}
|
|
142
|
+
declare const ContextCompactor_base: Context.ServiceClass<ContextCompactor, "@effect-agent/engine/ContextCompactor", ContextCompaction>;
|
|
143
|
+
/**
|
|
144
|
+
* The sole interpreter compaction port. Runs without an installed service provide layer at their
|
|
145
|
+
* composition boundary. Decorators yield this service during construction and receive their
|
|
146
|
+
* underlying implementation through Layer.provide. Direct harnesses use the same Layer contract.
|
|
147
|
+
*/
|
|
148
|
+
declare class ContextCompactor extends ContextCompactor_base {
|
|
149
|
+
static readonly layer: Layer.Layer<ContextCompactor, never, never>;
|
|
150
|
+
/**
|
|
151
|
+
* Start fresh windows without a summarizer call. The engine retains instructions/input and
|
|
152
|
+
* commits each boundary; a bounded emergency handoff preserves user inputs and unseen results.
|
|
153
|
+
* Applications provide notes/history tools alongside this strategy.
|
|
154
|
+
*/
|
|
155
|
+
static readonly layerRollover: Layer.Layer<ContextCompactor, never, never>;
|
|
156
|
+
/** Use the bounded default algorithm with a separate upstream Effect AI Model. */
|
|
157
|
+
static readonly layerWithModel: <Provider, Requirements>(model: Model.Model<Provider, LanguageModel.LanguageModel, Requirements>) => Layer.Layer<ContextCompactor, never, Requirements>;
|
|
158
|
+
}
|
|
159
|
+
//#endregion
|
|
160
|
+
export { ContextCompaction as a, ContextMessageTokenEstimator as c, CONTEXT_ROLLOVER_PREFIX as d, ContextCompactionState as f, estimatePromptTokens as g, estimateMessageTokens as h, CompactionRequest as i, CLEARED_TOOL_RESULT as l, contextWindowMessage as m, CompactionError as n, ContextCompactor as o, contextWindowId as p, CompactionModelLayer as r, ContextCompactor_d_exports as s, CompactionDecision as t, COMPACTION_SUMMARY_PREFIX as u };
|
|
161
|
+
//# sourceMappingURL=ContextCompactor-WwSIG_Z2.d.mts.map
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { Context, Effect, Schema } from "effect";
|
|
2
|
+
declare namespace ContextWindow_d_exports {
|
|
3
|
+
export { ContextHandoff, ContextRolloverRequest, ContextRolloverSelection, ContextRolloverTool, ContextWindow, ContextWindowStatus, ModelCallContext };
|
|
4
|
+
}
|
|
5
|
+
/** Model-authored continuation state; fuller notes belong in an application-owned memory store. */
|
|
6
|
+
declare const ContextHandoff: Schema.NonEmptyString;
|
|
7
|
+
/** Successful output of an explicitly designated context-window Tool. */
|
|
8
|
+
declare const ContextRolloverRequest: Schema.Struct<{
|
|
9
|
+
readonly handoff: Schema.optionalKey<Schema.NonEmptyString>;
|
|
10
|
+
}>;
|
|
11
|
+
type ContextRolloverRequest = typeof ContextRolloverRequest.Type;
|
|
12
|
+
/**
|
|
13
|
+
* Host-selected exclusive source-message boundary, applied at the next safe model seam.
|
|
14
|
+
* Omit through to reset the prefix before the protected current instructions/input. The
|
|
15
|
+
* engine resolves that prefix after preparation; an empty prior prefix needs no new window.
|
|
16
|
+
*/
|
|
17
|
+
declare const ContextRolloverSelection: Schema.Struct<{
|
|
18
|
+
readonly handoff: Schema.optionalKey<Schema.NonEmptyString>;
|
|
19
|
+
readonly through: Schema.optionalKey<Schema.Natural>;
|
|
20
|
+
}>;
|
|
21
|
+
type ContextRolloverSelection = typeof ContextRolloverSelection.Type;
|
|
22
|
+
declare const ModelCallContext_base: Schema.Class<ModelCallContext, Schema.Struct<{
|
|
23
|
+
readonly contextCapacity: Schema.Int;
|
|
24
|
+
readonly maxInputTokens: Schema.optionalKey<Schema.Int>;
|
|
25
|
+
readonly outputReserveTokens: Schema.Natural;
|
|
26
|
+
readonly uncountedOverheadTokens: Schema.Natural;
|
|
27
|
+
}>, {}>;
|
|
28
|
+
/**
|
|
29
|
+
* Bounds resolved alongside the native model for one Turn. Output reserve must match the
|
|
30
|
+
* selected provider configuration. Uncounted overhead includes only provider framing or image
|
|
31
|
+
* token costs absent from the prompt estimate; prompt text, output contracts, and native Tool
|
|
32
|
+
* schemas are counted by the engine. These are live-context bounds, not cumulative Run budgets.
|
|
33
|
+
*/
|
|
34
|
+
declare class ModelCallContext extends ModelCallContext_base {}
|
|
35
|
+
/**
|
|
36
|
+
* Definition-owned control annotation. A successful singleton application Tool carrying this
|
|
37
|
+
* annotation returns ContextRolloverRequest. The engine applies it at the next Turn seam,
|
|
38
|
+
* including after durable Tool-result replay. A Tool name alone never grants this authority.
|
|
39
|
+
*/
|
|
40
|
+
declare const ContextRolloverTool: Context.Reference<boolean>;
|
|
41
|
+
declare const ContextWindowStatus_base: Schema.Class<ContextWindowStatus, Schema.Struct<{
|
|
42
|
+
readonly threadId: Schema.brand<Schema.NonEmptyString, "@effect-agent/core/ThreadId">;
|
|
43
|
+
readonly runId: Schema.brand<Schema.NonEmptyString, "@effect-agent/core/RunId">;
|
|
44
|
+
readonly windowId: Schema.NonEmptyString;
|
|
45
|
+
readonly estimatedTokens: Schema.Natural;
|
|
46
|
+
readonly contextTokenLimit: Schema.NullOr<Schema.Natural>;
|
|
47
|
+
readonly remainingTokens: Schema.NullOr<Schema.Natural>;
|
|
48
|
+
}>, {}>;
|
|
49
|
+
/** Best available live-context estimate, independent of cumulative Run budgets. */
|
|
50
|
+
declare class ContextWindowStatus extends ContextWindowStatus_base {}
|
|
51
|
+
declare const ContextWindow_base: Context.ServiceClass<ContextWindow, "@effect-agent/engine/ContextWindow", {
|
|
52
|
+
readonly status: Effect.Effect<ContextWindowStatus>;
|
|
53
|
+
}>;
|
|
54
|
+
/** Engine-owned identity and context accounting for the current Run. */
|
|
55
|
+
declare class ContextWindow extends ContextWindow_base {}
|
|
56
|
+
//#endregion
|
|
57
|
+
export { ContextWindow as a, ModelCallContext as c, ContextRolloverTool as i, ContextRolloverRequest as n, ContextWindowStatus as o, ContextRolloverSelection as r, ContextWindow_d_exports as s, ContextHandoff as t };
|
|
58
|
+
//# sourceMappingURL=ContextWindow-DRQ5Mbm2.d.mts.map
|