effect-agent 0.1.0-beta.85 → 0.1.0-beta.87
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-BLyETCPo.mjs +4562 -0
- package/dist/AgentRuntime-BLyETCPo.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-uggeJpv3.mjs +6368 -0
- package/dist/DurableAgentRuntime-uggeJpv3.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-Cy_hU1tv.mjs +1469 -0
- package/dist/Subagent-Cy_hU1tv.mjs.map +1 -0
- package/dist/Subagent-DyfzHNdv.d.mts +826 -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 +6 -5
- package/dist/ToolExposure.mjs +17 -9
- package/dist/ToolExposure.mjs.map +1 -1
- 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 +435 -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 +88 -54
- package/dist/index.mjs +97 -54
- 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 +252 -0
- package/dist/sandbox/ProtectedBrowser.mjs +270 -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 -1
- package/src/Ephemeral.ts +17 -0
- package/src/ToolExposure.ts +2 -2
- 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 +774 -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 +10117 -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 +96 -53
- 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 +413 -0
- package/src/sandbox/Sandbox.ts +241 -0
- package/dist/Agent.d.mts +0 -5
- package/dist/Agent.mjs +0 -10
- package/dist/Agent.mjs.map +0 -1
- package/dist/AgentError.d.mts +0 -5
- package/dist/AgentError.mjs +0 -10
- package/dist/AgentError.mjs.map +0 -1
- package/dist/AgentPolicy.d.mts +0 -5
- package/dist/AgentPolicy.mjs +0 -10
- package/dist/AgentPolicy.mjs.map +0 -1
- package/dist/AgentRuntime.d.mts +0 -5
- package/dist/AgentRuntime.mjs +0 -10
- package/dist/AgentRuntime.mjs.map +0 -1
- package/dist/AgentUpdates.d.mts +0 -5
- package/dist/AgentUpdates.mjs +0 -10
- package/dist/AgentUpdates.mjs.map +0 -1
- package/dist/Approval.d.mts +0 -5
- package/dist/Approval.mjs +0 -10
- package/dist/Approval.mjs.map +0 -1
- package/dist/Budget.d.mts +0 -5
- package/dist/Budget.mjs +0 -10
- package/dist/Budget.mjs.map +0 -1
- package/dist/CodeMode.d.mts +0 -5
- package/dist/CodeMode.mjs +0 -10
- package/dist/CodeMode.mjs.map +0 -1
- package/dist/Commands.d.mts +0 -5
- package/dist/Commands.mjs +0 -10
- package/dist/Commands.mjs.map +0 -1
- package/dist/Compaction.d.mts +0 -5
- package/dist/Compaction.mjs +0 -10
- package/dist/Compaction.mjs.map +0 -1
- package/dist/ContextCompactor.d.mts +0 -5
- package/dist/ContextCompactor.mjs +0 -10
- package/dist/ContextCompactor.mjs.map +0 -1
- package/dist/ContextHistory.d.mts +0 -5
- package/dist/ContextHistory.mjs +0 -10
- package/dist/ContextHistory.mjs.map +0 -1
- package/dist/ContextTools.d.mts +0 -5
- package/dist/ContextTools.mjs +0 -10
- package/dist/ContextTools.mjs.map +0 -1
- package/dist/ContextWindow.d.mts +0 -5
- package/dist/ContextWindow.mjs +0 -10
- package/dist/ContextWindow.mjs.map +0 -1
- package/dist/DurableStep.d.mts +0 -5
- package/dist/DurableStep.mjs +0 -10
- package/dist/DurableStep.mjs.map +0 -1
- package/dist/EphemeralThreads.d.mts +0 -5
- package/dist/EphemeralThreads.mjs +0 -10
- package/dist/EphemeralThreads.mjs.map +0 -1
- package/dist/IdGenerator.d.mts +0 -5
- package/dist/IdGenerator.mjs +0 -10
- package/dist/IdGenerator.mjs.map +0 -1
- package/dist/Identifiers.d.mts +0 -5
- package/dist/Identifiers.mjs +0 -10
- package/dist/Identifiers.mjs.map +0 -1
- package/dist/Mcp.d.mts +0 -5
- package/dist/Mcp.mjs +0 -10
- package/dist/Mcp.mjs.map +0 -1
- package/dist/McpClient.d.mts +0 -5
- package/dist/McpClient.mjs +0 -10
- package/dist/McpClient.mjs.map +0 -1
- package/dist/Memory.d.mts +0 -5
- package/dist/Memory.mjs +0 -10
- package/dist/Memory.mjs.map +0 -1
- package/dist/MemoryNamespace.d.mts +0 -5
- package/dist/MemoryNamespace.mjs +0 -10
- package/dist/MemoryNamespace.mjs.map +0 -1
- package/dist/MemoryNotes.d.mts +0 -5
- package/dist/MemoryNotes.mjs +0 -10
- package/dist/MemoryNotes.mjs.map +0 -1
- package/dist/MemoryReference.d.mts +0 -5
- package/dist/MemoryReference.mjs +0 -10
- package/dist/MemoryReference.mjs.map +0 -1
- package/dist/MemoryRevalidation.d.mts +0 -5
- package/dist/MemoryRevalidation.mjs +0 -10
- package/dist/MemoryRevalidation.mjs.map +0 -1
- package/dist/MemoryStore.d.mts +0 -5
- package/dist/MemoryStore.mjs +0 -10
- package/dist/MemoryStore.mjs.map +0 -1
- package/dist/Messaging.d.mts +0 -5
- package/dist/Messaging.mjs +0 -10
- package/dist/Messaging.mjs.map +0 -1
- package/dist/MessagingHost.d.mts +0 -5
- package/dist/MessagingHost.mjs +0 -10
- package/dist/MessagingHost.mjs.map +0 -1
- package/dist/ModelContext.d.mts +0 -5
- package/dist/ModelContext.mjs +0 -10
- package/dist/ModelContext.mjs.map +0 -1
- package/dist/Receipt.d.mts +0 -5
- package/dist/Receipt.mjs +0 -10
- package/dist/Receipt.mjs.map +0 -1
- package/dist/Redaction.d.mts +0 -5
- package/dist/Redaction.mjs +0 -10
- package/dist/Redaction.mjs.map +0 -1
- package/dist/Remembering.d.mts +0 -5
- package/dist/Remembering.mjs +0 -10
- package/dist/Remembering.mjs.map +0 -1
- package/dist/RememberingStore.d.mts +0 -5
- package/dist/RememberingStore.mjs +0 -10
- package/dist/RememberingStore.mjs.map +0 -1
- package/dist/RunEvent.d.mts +0 -5
- package/dist/RunEvent.mjs +0 -10
- package/dist/RunEvent.mjs.map +0 -1
- package/dist/RunEventSink.d.mts +0 -5
- package/dist/RunEventSink.mjs +0 -10
- package/dist/RunEventSink.mjs.map +0 -1
- package/dist/RunHooks.d.mts +0 -5
- package/dist/RunHooks.mjs +0 -10
- package/dist/RunHooks.mjs.map +0 -1
- package/dist/RunOptions.d.mts +0 -5
- package/dist/RunOptions.mjs +0 -10
- package/dist/RunOptions.mjs.map +0 -1
- package/dist/RunPolicyUsage.d.mts +0 -5
- package/dist/RunPolicyUsage.mjs +0 -10
- package/dist/RunPolicyUsage.mjs.map +0 -1
- package/dist/SemanticMemory.d.mts +0 -5
- package/dist/SemanticMemory.mjs +0 -10
- package/dist/SemanticMemory.mjs.map +0 -1
- package/dist/SemanticMemoryIndex.d.mts +0 -5
- package/dist/SemanticMemoryIndex.mjs +0 -10
- package/dist/SemanticMemoryIndex.mjs.map +0 -1
- package/dist/SemanticMemoryRevalidation.d.mts +0 -5
- package/dist/SemanticMemoryRevalidation.mjs +0 -10
- package/dist/SemanticMemoryRevalidation.mjs.map +0 -1
- package/dist/Subagent.d.mts +0 -5
- package/dist/Subagent.mjs +0 -10
- package/dist/Subagent.mjs.map +0 -1
- package/dist/SubagentContract.d.mts +0 -5
- package/dist/SubagentContract.mjs +0 -10
- package/dist/SubagentContract.mjs.map +0 -1
- package/dist/SubagentHost.d.mts +0 -5
- package/dist/SubagentHost.mjs +0 -10
- package/dist/SubagentHost.mjs.map +0 -1
- package/dist/SubagentReservations.d.mts +0 -5
- package/dist/SubagentReservations.mjs +0 -10
- package/dist/SubagentReservations.mjs.map +0 -1
- package/dist/ThreadHistory.d.mts +0 -5
- package/dist/ThreadHistory.mjs +0 -10
- package/dist/ThreadHistory.mjs.map +0 -1
- package/dist/ToolBroker.d.mts +0 -5
- package/dist/ToolBroker.mjs +0 -10
- package/dist/ToolBroker.mjs.map +0 -1
- package/dist/ToolDiscovery.d.mts +0 -5
- package/dist/ToolDiscovery.mjs +0 -10
- package/dist/ToolDiscovery.mjs.map +0 -1
- package/dist/ToolResult.d.mts +0 -5
- package/dist/ToolResult.mjs +0 -10
- package/dist/ToolResult.mjs.map +0 -1
- package/dist/Usage.d.mts +0 -5
- package/dist/Usage.mjs +0 -10
- package/dist/Usage.mjs.map +0 -1
- package/dist/WebCapture.d.mts +0 -5
- package/dist/WebCapture.mjs +0 -10
- package/dist/WebCapture.mjs.map +0 -1
- package/dist/WebSearch.d.mts +0 -5
- package/dist/WebSearch.mjs +0 -10
- package/dist/WebSearch.mjs.map +0 -1
- package/dist/Worker.d.mts +0 -5
- package/dist/Worker.mjs +0 -10
- package/dist/Worker.mjs.map +0 -1
- package/dist/rolldown-runtime-BBjsoOtd.mjs +0 -27
- package/src/Agent.ts +0 -1
- package/src/AgentError.ts +0 -1
- package/src/AgentPolicy.ts +0 -1
- package/src/AgentRuntime.ts +0 -1
- package/src/AgentUpdates.ts +0 -1
- package/src/Approval.ts +0 -1
- package/src/Budget.ts +0 -1
- package/src/CodeMode.ts +0 -1
- package/src/Commands.ts +0 -1
- package/src/Compaction.ts +0 -1
- package/src/ContextCompactor.ts +0 -1
- package/src/ContextHistory.ts +0 -1
- package/src/ContextTools.ts +0 -1
- package/src/ContextWindow.ts +0 -1
- package/src/DurableStep.ts +0 -1
- package/src/EphemeralThreads.ts +0 -1
- package/src/IdGenerator.ts +0 -1
- package/src/Identifiers.ts +0 -1
- package/src/Mcp.ts +0 -1
- package/src/McpClient.ts +0 -1
- package/src/Memory.ts +0 -1
- package/src/MemoryNamespace.ts +0 -1
- package/src/MemoryNotes.ts +0 -1
- package/src/MemoryReference.ts +0 -1
- package/src/MemoryRevalidation.ts +0 -1
- package/src/MemoryStore.ts +0 -1
- package/src/Messaging.ts +0 -1
- package/src/MessagingHost.ts +0 -1
- package/src/ModelContext.ts +0 -1
- package/src/Receipt.ts +0 -1
- package/src/Redaction.ts +0 -1
- package/src/Remembering.ts +0 -1
- package/src/RememberingStore.ts +0 -1
- package/src/RunEvent.ts +0 -1
- package/src/RunEventSink.ts +0 -1
- package/src/RunHooks.ts +0 -1
- package/src/RunOptions.ts +0 -1
- package/src/RunPolicyUsage.ts +0 -1
- package/src/SemanticMemory.ts +0 -1
- package/src/SemanticMemoryIndex.ts +0 -1
- package/src/SemanticMemoryRevalidation.ts +0 -1
- package/src/Subagent.ts +0 -1
- package/src/SubagentContract.ts +0 -1
- package/src/SubagentHost.ts +0 -1
- package/src/SubagentReservations.ts +0 -1
- package/src/ThreadHistory.ts +0 -1
- package/src/ToolBroker.ts +0 -1
- package/src/ToolDiscovery.ts +0 -1
- package/src/ToolResult.ts +0 -1
- package/src/Usage.ts +0 -1
- package/src/WebCapture.ts +0 -1
- package/src/WebSearch.ts +0 -1
- package/src/Worker.ts +0 -1
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
import { _ as Digest } from "../Records-BAGkekt8.mjs";
|
|
2
|
+
import { Context, Effect, Layer, Schema } from "effect";
|
|
3
|
+
declare namespace ActivityStore_d_exports {
|
|
4
|
+
export { ActivityBusy, ActivityClaim, ActivityClaimRequest, ActivityMutationFailpoint, ActivityMutationFailure, ActivityMutationPoint, ActivityOwnershipLost, ActivityProcessorKey, ActivityProcessorStore, ActivityProgress, ActivityStoreError, ActivityStoreFailure, ActivityWorkConflict, PreparedActivity };
|
|
5
|
+
}
|
|
6
|
+
declare const ActivityProcessorKey_base: Schema.Class<ActivityProcessorKey, Schema.Struct<{
|
|
7
|
+
readonly processorId: Schema.NonEmptyString;
|
|
8
|
+
readonly processorVersion: Schema.NonEmptyString;
|
|
9
|
+
readonly threadId: Schema.brand<Schema.NonEmptyString, "@effect-agent/core/ThreadId">;
|
|
10
|
+
}>, {}>;
|
|
11
|
+
/** Application-owned processor identity. Changing the version starts independent progress. */
|
|
12
|
+
declare class ActivityProcessorKey extends ActivityProcessorKey_base {}
|
|
13
|
+
declare const PreparedActivity_base: Schema.Class<PreparedActivity, Schema.Struct<{
|
|
14
|
+
readonly version: Schema.Literal<1>;
|
|
15
|
+
readonly key: typeof ActivityProcessorKey;
|
|
16
|
+
readonly sequence: Schema.brand<Schema.Natural, "@effect-agent/thread/CanonicalSequence">;
|
|
17
|
+
readonly workId: Schema.brand<Schema.String, "@effect-agent/thread/Digest">;
|
|
18
|
+
readonly recordId: Schema.brand<Schema.NonEmptyString, "@effect-agent/thread/RecordId">;
|
|
19
|
+
readonly recordDigest: Schema.brand<Schema.String, "@effect-agent/thread/Digest">;
|
|
20
|
+
readonly output: Schema.declare<Schema.Json, Schema.Json>;
|
|
21
|
+
}>, {}>;
|
|
22
|
+
/** Durable extraction output, pinned before any external application of that output. */
|
|
23
|
+
declare class PreparedActivity extends PreparedActivity_base {}
|
|
24
|
+
declare const ActivityClaim_base: Schema.Class<ActivityClaim, Schema.Struct<{
|
|
25
|
+
readonly key: typeof ActivityProcessorKey;
|
|
26
|
+
readonly owner: Schema.NonEmptyString;
|
|
27
|
+
readonly epoch: Schema.Int;
|
|
28
|
+
readonly throughSequence: Schema.brand<Schema.Natural, "@effect-agent/thread/CanonicalSequence">;
|
|
29
|
+
readonly leaseExpiresAt: Schema.Finite;
|
|
30
|
+
/** Pending output captured atomically at acquisition; advance returns null here. */
|
|
31
|
+
readonly pending: Schema.NullOr<typeof PreparedActivity>;
|
|
32
|
+
}>, {}>;
|
|
33
|
+
/** Independent from Thread ownership, submission delivery, and canonical checkpoints. */
|
|
34
|
+
declare class ActivityClaim extends ActivityClaim_base {}
|
|
35
|
+
declare const ActivityProgress_base: Schema.Class<ActivityProgress, Schema.Struct<{
|
|
36
|
+
readonly version: Schema.Literal<1>;
|
|
37
|
+
readonly key: typeof ActivityProcessorKey;
|
|
38
|
+
readonly throughSequence: Schema.brand<Schema.Natural, "@effect-agent/thread/CanonicalSequence">;
|
|
39
|
+
readonly epoch: Schema.Int;
|
|
40
|
+
readonly owner: Schema.NullOr<Schema.NonEmptyString>;
|
|
41
|
+
readonly leaseExpiresAt: Schema.Finite;
|
|
42
|
+
readonly pending: Schema.NullOr<typeof PreparedActivity>;
|
|
43
|
+
/** Time of the last cursor advance, not the activity time or a global freshness clock. */
|
|
44
|
+
readonly advancedAt: Schema.NullOr<Schema.Finite>;
|
|
45
|
+
}>, {}>;
|
|
46
|
+
declare class ActivityProgress extends ActivityProgress_base {}
|
|
47
|
+
declare const ActivityStoreError_base: Schema.Class<ActivityStoreError, Schema.TaggedStruct<"ActivityStoreError", {
|
|
48
|
+
readonly operation: Schema.NonEmptyString;
|
|
49
|
+
readonly reason: Schema.Literals<readonly ["invalid-input", "unavailable", "corrupt", "incompatible"]>;
|
|
50
|
+
}>, import("effect/Cause").YieldableError>;
|
|
51
|
+
declare class ActivityStoreError extends ActivityStoreError_base {}
|
|
52
|
+
declare const ActivityBusy_base: Schema.Class<ActivityBusy, Schema.TaggedStruct<"ActivityBusy", {
|
|
53
|
+
readonly key: typeof ActivityProcessorKey;
|
|
54
|
+
readonly leaseExpiresAt: Schema.Finite;
|
|
55
|
+
}>, import("effect/Cause").YieldableError>;
|
|
56
|
+
declare class ActivityBusy extends ActivityBusy_base {}
|
|
57
|
+
declare const ActivityOwnershipLost_base: Schema.Class<ActivityOwnershipLost, Schema.TaggedStruct<"ActivityOwnershipLost", {
|
|
58
|
+
readonly key: typeof ActivityProcessorKey;
|
|
59
|
+
readonly owner: Schema.NonEmptyString;
|
|
60
|
+
readonly epoch: Schema.Int;
|
|
61
|
+
}>, import("effect/Cause").YieldableError>;
|
|
62
|
+
declare class ActivityOwnershipLost extends ActivityOwnershipLost_base {}
|
|
63
|
+
declare const ActivityWorkConflict_base: Schema.Class<ActivityWorkConflict, Schema.TaggedStruct<"ActivityWorkConflict", {
|
|
64
|
+
readonly key: typeof ActivityProcessorKey;
|
|
65
|
+
readonly workId: Schema.brand<Schema.String, "@effect-agent/thread/Digest">;
|
|
66
|
+
}>, import("effect/Cause").YieldableError>;
|
|
67
|
+
declare class ActivityWorkConflict extends ActivityWorkConflict_base {}
|
|
68
|
+
declare const ActivityMutationPoint: Schema.Literals<readonly ["activity:initialize:before", "activity:initialize:after", "activity:claim:before", "activity:claim:after-state", "activity:claim:after", "activity:prepare:before", "activity:prepare:after-state", "activity:prepare:after", "activity:advance:before", "activity:advance:after-state", "activity:advance:after", "activity:release:before", "activity:release:after-state", "activity:release:after"]>;
|
|
69
|
+
type ActivityMutationPoint = typeof ActivityMutationPoint.Type;
|
|
70
|
+
declare const ActivityMutationFailure_base: Schema.Class<ActivityMutationFailure, Schema.TaggedStruct<"ActivityMutationFailure", {
|
|
71
|
+
readonly point: Schema.Literals<readonly ["activity:initialize:before", "activity:initialize:after", "activity:claim:before", "activity:claim:after-state", "activity:claim:after", "activity:prepare:before", "activity:prepare:after-state", "activity:prepare:after", "activity:advance:before", "activity:advance:after-state", "activity:advance:after", "activity:release:before", "activity:release:after-state", "activity:release:after"]>;
|
|
72
|
+
}>, import("effect/Cause").YieldableError>;
|
|
73
|
+
declare class ActivityMutationFailure extends ActivityMutationFailure_base {}
|
|
74
|
+
declare const ActivityMutationFailpoint_base: Context.ServiceClass<ActivityMutationFailpoint, "@effect-agent/thread/ActivityMutationFailpoint", {
|
|
75
|
+
readonly hit: (point: ActivityMutationPoint) => Effect.Effect<void, ActivityMutationFailure>;
|
|
76
|
+
}>;
|
|
77
|
+
declare class ActivityMutationFailpoint extends ActivityMutationFailpoint_base {
|
|
78
|
+
static readonly layer: Layer.Layer<ActivityMutationFailpoint, never, never>;
|
|
79
|
+
}
|
|
80
|
+
type ActivityStoreFailure = ActivityStoreError | ActivityBusy | ActivityOwnershipLost | ActivityWorkConflict | ActivityMutationFailure;
|
|
81
|
+
declare const ActivityClaimRequest_base: Schema.Class<ActivityClaimRequest, Schema.Struct<{
|
|
82
|
+
readonly key: typeof ActivityProcessorKey;
|
|
83
|
+
readonly owner: Schema.NonEmptyString;
|
|
84
|
+
readonly leaseMillis: Schema.Int;
|
|
85
|
+
}>, {}>;
|
|
86
|
+
declare class ActivityClaimRequest extends ActivityClaimRequest_base {}
|
|
87
|
+
declare const ActivityProcessorStore_base: Context.ServiceClass<ActivityProcessorStore, "@effect-agent/thread/ActivityProcessorStore", {
|
|
88
|
+
readonly inspect: (key: ActivityProcessorKey) => Effect.Effect<ActivityProgress | null, ActivityStoreError>;
|
|
89
|
+
readonly claim: (request: ActivityClaimRequest) => Effect.Effect<ActivityClaim, ActivityStoreFailure>;
|
|
90
|
+
readonly prepare: (request: {
|
|
91
|
+
readonly claim: ActivityClaim;
|
|
92
|
+
readonly work: PreparedActivity;
|
|
93
|
+
}) => Effect.Effect<PreparedActivity, ActivityStoreFailure>;
|
|
94
|
+
readonly advance: (request: {
|
|
95
|
+
readonly claim: ActivityClaim;
|
|
96
|
+
readonly workId: Digest;
|
|
97
|
+
}) => Effect.Effect<ActivityClaim, ActivityStoreFailure>;
|
|
98
|
+
readonly release: (claim: ActivityClaim) => Effect.Effect<void, ActivityStoreFailure>;
|
|
99
|
+
}>;
|
|
100
|
+
/**
|
|
101
|
+
* Optional durable progress for finite committed-activity passes. Every mutation is atomic.
|
|
102
|
+
* claim rejects an unexpired owner and allocates a strictly newer epoch on every successful
|
|
103
|
+
* acquisition, including an initial grant and reacquisition after release with the same owner. It preserves
|
|
104
|
+
* pending output and returns it with the claim. prepare and advance reject expired or superseded claims and
|
|
105
|
+
* require the claim's throughSequence to equal current progress. prepare accepts only the next
|
|
106
|
+
* sequence, pins one output, and rejects divergent reuse. advance requires its pending work ID,
|
|
107
|
+
* increments progress by exactly one, and clears pending in the same transaction.
|
|
108
|
+
*
|
|
109
|
+
* release checks owner/epoch, independent of the cursor, and never discards pending output.
|
|
110
|
+
* The adapter owns its lease clock. A failed release leaves only a bounded lease to expire.
|
|
111
|
+
* This port never owns, mutates, or checkpoints the canonical Thread log.
|
|
112
|
+
*/
|
|
113
|
+
declare class ActivityProcessorStore extends ActivityProcessorStore_base {}
|
|
114
|
+
//#endregion
|
|
115
|
+
export { ActivityBusy, ActivityClaim, ActivityClaimRequest, ActivityMutationFailpoint, ActivityMutationFailure, ActivityMutationPoint, ActivityOwnershipLost, ActivityProcessorKey, ActivityProcessorStore, ActivityProgress, ActivityStoreError, ActivityStoreFailure, ActivityWorkConflict, PreparedActivity, ActivityStore_d_exports as t };
|
|
116
|
+
//# sourceMappingURL=ActivityStore.d.mts.map
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
import { t as __exportAll } from "../rolldown-runtime-D7D4PA-g.mjs";
|
|
2
|
+
import { ThreadId } from "../core/Identifiers.mjs";
|
|
3
|
+
import { CanonicalSequence, Digest, PersistedJson, RecordId } from "./Records.mjs";
|
|
4
|
+
import { Context, Effect, Layer, Schema } from "effect";
|
|
5
|
+
//#region src/durable/ActivityStore.ts
|
|
6
|
+
var ActivityStore_exports = /* @__PURE__ */ __exportAll({
|
|
7
|
+
ActivityBusy: () => ActivityBusy,
|
|
8
|
+
ActivityClaim: () => ActivityClaim,
|
|
9
|
+
ActivityClaimRequest: () => ActivityClaimRequest,
|
|
10
|
+
ActivityMutationFailpoint: () => ActivityMutationFailpoint,
|
|
11
|
+
ActivityMutationFailure: () => ActivityMutationFailure,
|
|
12
|
+
ActivityMutationPoint: () => ActivityMutationPoint,
|
|
13
|
+
ActivityOwnershipLost: () => ActivityOwnershipLost,
|
|
14
|
+
ActivityProcessorKey: () => ActivityProcessorKey,
|
|
15
|
+
ActivityProcessorStore: () => ActivityProcessorStore,
|
|
16
|
+
ActivityProgress: () => ActivityProgress,
|
|
17
|
+
ActivityStoreError: () => ActivityStoreError,
|
|
18
|
+
ActivityWorkConflict: () => ActivityWorkConflict,
|
|
19
|
+
PreparedActivity: () => PreparedActivity
|
|
20
|
+
});
|
|
21
|
+
const Identity = Schema.NonEmptyString.check(Schema.isMaxLength(256));
|
|
22
|
+
const Epoch = Schema.Int.check(Schema.isBetween({
|
|
23
|
+
minimum: 0,
|
|
24
|
+
maximum: Number.MAX_SAFE_INTEGER
|
|
25
|
+
}));
|
|
26
|
+
const Timestamp = Schema.Finite.check(Schema.isGreaterThanOrEqualTo(0));
|
|
27
|
+
/** Application-owned processor identity. Changing the version starts independent progress. */
|
|
28
|
+
var ActivityProcessorKey = class extends Schema.Class("@effect-agent/thread/ActivityProcessorKey")({
|
|
29
|
+
processorId: Identity,
|
|
30
|
+
processorVersion: Identity,
|
|
31
|
+
threadId: ThreadId.check(Schema.isMaxLength(1024))
|
|
32
|
+
}) {};
|
|
33
|
+
/** Durable extraction output, pinned before any external application of that output. */
|
|
34
|
+
var PreparedActivity = class extends Schema.Class("@effect-agent/thread/PreparedActivity")({
|
|
35
|
+
version: Schema.Literal(1),
|
|
36
|
+
key: ActivityProcessorKey,
|
|
37
|
+
sequence: CanonicalSequence.check(Schema.isGreaterThan(0)),
|
|
38
|
+
workId: Digest,
|
|
39
|
+
recordId: RecordId,
|
|
40
|
+
recordDigest: Digest,
|
|
41
|
+
output: PersistedJson
|
|
42
|
+
}) {};
|
|
43
|
+
/** Independent from Thread ownership, submission delivery, and canonical checkpoints. */
|
|
44
|
+
var ActivityClaim = class extends Schema.Class("@effect-agent/thread/ActivityClaim")({
|
|
45
|
+
key: ActivityProcessorKey,
|
|
46
|
+
owner: Identity,
|
|
47
|
+
epoch: Epoch,
|
|
48
|
+
throughSequence: CanonicalSequence,
|
|
49
|
+
leaseExpiresAt: Timestamp,
|
|
50
|
+
/** Pending output captured atomically at acquisition; advance returns null here. */
|
|
51
|
+
pending: Schema.NullOr(PreparedActivity)
|
|
52
|
+
}) {};
|
|
53
|
+
var ActivityProgress = class extends Schema.Class("@effect-agent/thread/ActivityProgress")({
|
|
54
|
+
version: Schema.Literal(1),
|
|
55
|
+
key: ActivityProcessorKey,
|
|
56
|
+
throughSequence: CanonicalSequence,
|
|
57
|
+
epoch: Epoch,
|
|
58
|
+
owner: Schema.NullOr(Identity),
|
|
59
|
+
leaseExpiresAt: Timestamp,
|
|
60
|
+
pending: Schema.NullOr(PreparedActivity),
|
|
61
|
+
/** Time of the last cursor advance, not the activity time or a global freshness clock. */
|
|
62
|
+
advancedAt: Schema.NullOr(Timestamp)
|
|
63
|
+
}) {};
|
|
64
|
+
var ActivityStoreError = class extends Schema.TaggedError()("ActivityStoreError", {
|
|
65
|
+
operation: Schema.NonEmptyString,
|
|
66
|
+
reason: Schema.Literals([
|
|
67
|
+
"invalid-input",
|
|
68
|
+
"unavailable",
|
|
69
|
+
"corrupt",
|
|
70
|
+
"incompatible"
|
|
71
|
+
])
|
|
72
|
+
}) {};
|
|
73
|
+
var ActivityBusy = class extends Schema.TaggedError()("ActivityBusy", {
|
|
74
|
+
key: ActivityProcessorKey,
|
|
75
|
+
leaseExpiresAt: Timestamp
|
|
76
|
+
}) {};
|
|
77
|
+
var ActivityOwnershipLost = class extends Schema.TaggedError()("ActivityOwnershipLost", {
|
|
78
|
+
key: ActivityProcessorKey,
|
|
79
|
+
owner: Identity,
|
|
80
|
+
epoch: Epoch
|
|
81
|
+
}) {};
|
|
82
|
+
var ActivityWorkConflict = class extends Schema.TaggedError()("ActivityWorkConflict", {
|
|
83
|
+
key: ActivityProcessorKey,
|
|
84
|
+
workId: Digest
|
|
85
|
+
}) {};
|
|
86
|
+
const ActivityMutationPoint = Schema.Literals([
|
|
87
|
+
"activity:initialize:before",
|
|
88
|
+
"activity:initialize:after",
|
|
89
|
+
"activity:claim:before",
|
|
90
|
+
"activity:claim:after-state",
|
|
91
|
+
"activity:claim:after",
|
|
92
|
+
"activity:prepare:before",
|
|
93
|
+
"activity:prepare:after-state",
|
|
94
|
+
"activity:prepare:after",
|
|
95
|
+
"activity:advance:before",
|
|
96
|
+
"activity:advance:after-state",
|
|
97
|
+
"activity:advance:after",
|
|
98
|
+
"activity:release:before",
|
|
99
|
+
"activity:release:after-state",
|
|
100
|
+
"activity:release:after"
|
|
101
|
+
]);
|
|
102
|
+
var ActivityMutationFailure = class extends Schema.TaggedError()("ActivityMutationFailure", { point: ActivityMutationPoint }) {};
|
|
103
|
+
var ActivityMutationFailpoint = class extends Context.Service()("@effect-agent/thread/ActivityMutationFailpoint") {
|
|
104
|
+
static layer = Layer.succeed(this, { hit: () => Effect.void });
|
|
105
|
+
};
|
|
106
|
+
var ActivityClaimRequest = class extends Schema.Class("@effect-agent/thread/ActivityClaimRequest")({
|
|
107
|
+
key: ActivityProcessorKey,
|
|
108
|
+
owner: Identity,
|
|
109
|
+
leaseMillis: Schema.Int.check(Schema.isBetween({
|
|
110
|
+
minimum: 1,
|
|
111
|
+
maximum: 6e5
|
|
112
|
+
}))
|
|
113
|
+
}) {};
|
|
114
|
+
/**
|
|
115
|
+
* Optional durable progress for finite committed-activity passes. Every mutation is atomic.
|
|
116
|
+
* claim rejects an unexpired owner and allocates a strictly newer epoch on every successful
|
|
117
|
+
* acquisition, including an initial grant and reacquisition after release with the same owner. It preserves
|
|
118
|
+
* pending output and returns it with the claim. prepare and advance reject expired or superseded claims and
|
|
119
|
+
* require the claim's throughSequence to equal current progress. prepare accepts only the next
|
|
120
|
+
* sequence, pins one output, and rejects divergent reuse. advance requires its pending work ID,
|
|
121
|
+
* increments progress by exactly one, and clears pending in the same transaction.
|
|
122
|
+
*
|
|
123
|
+
* release checks owner/epoch, independent of the cursor, and never discards pending output.
|
|
124
|
+
* The adapter owns its lease clock. A failed release leaves only a bounded lease to expire.
|
|
125
|
+
* This port never owns, mutates, or checkpoints the canonical Thread log.
|
|
126
|
+
*/
|
|
127
|
+
var ActivityProcessorStore = class extends Context.Service()("@effect-agent/thread/ActivityProcessorStore") {};
|
|
128
|
+
//#endregion
|
|
129
|
+
export { ActivityBusy, ActivityClaim, ActivityClaimRequest, ActivityMutationFailpoint, ActivityMutationFailure, ActivityMutationPoint, ActivityOwnershipLost, ActivityProcessorKey, ActivityProcessorStore, ActivityProgress, ActivityStoreError, ActivityWorkConflict, PreparedActivity, ActivityStore_exports as t };
|
|
130
|
+
|
|
131
|
+
//# sourceMappingURL=ActivityStore.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ActivityStore.mjs","names":[],"sources":["../../src/durable/ActivityStore.ts"],"sourcesContent":["import { Context, Effect, Layer, Schema } from \"effect\";\n\nimport { ThreadId } from \"../core/Identifiers.ts\";\nimport { CanonicalSequence, Digest, PersistedJson, RecordId } from \"./Records.ts\";\n\nconst Identity = Schema.NonEmptyString.check(Schema.isMaxLength(256));\nconst Epoch = Schema.Int.check(Schema.isBetween({ minimum: 0, maximum: Number.MAX_SAFE_INTEGER }));\nconst Timestamp = Schema.Finite.check(Schema.isGreaterThanOrEqualTo(0));\n\n/** Application-owned processor identity. Changing the version starts independent progress. */\nexport class ActivityProcessorKey extends Schema.Class<ActivityProcessorKey>(\n \"@effect-agent/thread/ActivityProcessorKey\",\n)({\n processorId: Identity,\n processorVersion: Identity,\n threadId: ThreadId.check(Schema.isMaxLength(1_024)),\n}) {}\n\n/** Durable extraction output, pinned before any external application of that output. */\nexport class PreparedActivity extends Schema.Class<PreparedActivity>(\n \"@effect-agent/thread/PreparedActivity\",\n)({\n version: Schema.Literal(1),\n key: ActivityProcessorKey,\n sequence: CanonicalSequence.check(Schema.isGreaterThan(0)),\n workId: Digest,\n recordId: RecordId,\n recordDigest: Digest,\n output: PersistedJson,\n}) {}\n\n/** Independent from Thread ownership, submission delivery, and canonical checkpoints. */\nexport class ActivityClaim extends Schema.Class<ActivityClaim>(\n \"@effect-agent/thread/ActivityClaim\",\n)({\n key: ActivityProcessorKey,\n owner: Identity,\n epoch: Epoch,\n throughSequence: CanonicalSequence,\n leaseExpiresAt: Timestamp,\n /** Pending output captured atomically at acquisition; advance returns null here. */\n pending: Schema.NullOr(PreparedActivity),\n}) {}\n\nexport class ActivityProgress extends Schema.Class<ActivityProgress>(\n \"@effect-agent/thread/ActivityProgress\",\n)({\n version: Schema.Literal(1),\n key: ActivityProcessorKey,\n throughSequence: CanonicalSequence,\n epoch: Epoch,\n owner: Schema.NullOr(Identity),\n leaseExpiresAt: Timestamp,\n pending: Schema.NullOr(PreparedActivity),\n /** Time of the last cursor advance, not the activity time or a global freshness clock. */\n advancedAt: Schema.NullOr(Timestamp),\n}) {}\n\nexport class ActivityStoreError extends Schema.TaggedError<ActivityStoreError>()(\n \"ActivityStoreError\",\n {\n operation: Schema.NonEmptyString,\n reason: Schema.Literals([\"invalid-input\", \"unavailable\", \"corrupt\", \"incompatible\"]),\n },\n) {}\n\nexport class ActivityBusy extends Schema.TaggedError<ActivityBusy>()(\"ActivityBusy\", {\n key: ActivityProcessorKey,\n leaseExpiresAt: Timestamp,\n}) {}\n\nexport class ActivityOwnershipLost extends Schema.TaggedError<ActivityOwnershipLost>()(\n \"ActivityOwnershipLost\",\n { key: ActivityProcessorKey, owner: Identity, epoch: Epoch },\n) {}\n\nexport class ActivityWorkConflict extends Schema.TaggedError<ActivityWorkConflict>()(\n \"ActivityWorkConflict\",\n { key: ActivityProcessorKey, workId: Digest },\n) {}\n\nexport const ActivityMutationPoint = Schema.Literals([\n \"activity:initialize:before\",\n \"activity:initialize:after\",\n \"activity:claim:before\",\n \"activity:claim:after-state\",\n \"activity:claim:after\",\n \"activity:prepare:before\",\n \"activity:prepare:after-state\",\n \"activity:prepare:after\",\n \"activity:advance:before\",\n \"activity:advance:after-state\",\n \"activity:advance:after\",\n \"activity:release:before\",\n \"activity:release:after-state\",\n \"activity:release:after\",\n]);\n\nexport type ActivityMutationPoint = typeof ActivityMutationPoint.Type;\n\nexport class ActivityMutationFailure extends Schema.TaggedError<ActivityMutationFailure>()(\n \"ActivityMutationFailure\",\n { point: ActivityMutationPoint },\n) {}\n\nexport class ActivityMutationFailpoint extends Context.Service<\n ActivityMutationFailpoint,\n { readonly hit: (point: ActivityMutationPoint) => Effect.Effect<void, ActivityMutationFailure> }\n>()(\"@effect-agent/thread/ActivityMutationFailpoint\") {\n static readonly layer = Layer.succeed(this, { hit: () => Effect.void });\n}\n\nexport type ActivityStoreFailure =\n | ActivityStoreError\n | ActivityBusy\n | ActivityOwnershipLost\n | ActivityWorkConflict\n | ActivityMutationFailure;\n\nexport class ActivityClaimRequest extends Schema.Class<ActivityClaimRequest>(\n \"@effect-agent/thread/ActivityClaimRequest\",\n)({\n key: ActivityProcessorKey,\n owner: Identity,\n leaseMillis: Schema.Int.check(Schema.isBetween({ minimum: 1, maximum: 600_000 })),\n}) {}\n\n/**\n * Optional durable progress for finite committed-activity passes. Every mutation is atomic.\n * claim rejects an unexpired owner and allocates a strictly newer epoch on every successful\n * acquisition, including an initial grant and reacquisition after release with the same owner. It preserves\n * pending output and returns it with the claim. prepare and advance reject expired or superseded claims and\n * require the claim's throughSequence to equal current progress. prepare accepts only the next\n * sequence, pins one output, and rejects divergent reuse. advance requires its pending work ID,\n * increments progress by exactly one, and clears pending in the same transaction.\n *\n * release checks owner/epoch, independent of the cursor, and never discards pending output.\n * The adapter owns its lease clock. A failed release leaves only a bounded lease to expire.\n * This port never owns, mutates, or checkpoints the canonical Thread log.\n */\nexport class ActivityProcessorStore extends Context.Service<\n ActivityProcessorStore,\n {\n readonly inspect: (\n key: ActivityProcessorKey,\n ) => Effect.Effect<ActivityProgress | null, ActivityStoreError>;\n readonly claim: (\n request: ActivityClaimRequest,\n ) => Effect.Effect<ActivityClaim, ActivityStoreFailure>;\n readonly prepare: (request: {\n readonly claim: ActivityClaim;\n readonly work: PreparedActivity;\n }) => Effect.Effect<PreparedActivity, ActivityStoreFailure>;\n readonly advance: (request: {\n readonly claim: ActivityClaim;\n readonly workId: Digest;\n }) => Effect.Effect<ActivityClaim, ActivityStoreFailure>;\n readonly release: (claim: ActivityClaim) => Effect.Effect<void, ActivityStoreFailure>;\n }\n>()(\"@effect-agent/thread/ActivityProcessorStore\") {}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAKA,MAAM,WAAW,OAAO,eAAe,MAAM,OAAO,YAAY,GAAG,CAAC;AACpE,MAAM,QAAQ,OAAO,IAAI,MAAM,OAAO,UAAU;CAAE,SAAS;CAAG,SAAS,OAAO;AAAiB,CAAC,CAAC;AACjG,MAAM,YAAY,OAAO,OAAO,MAAM,OAAO,uBAAuB,CAAC,CAAC;;AAGtE,IAAa,uBAAb,cAA0C,OAAO,MAC/C,2CACF,CAAC,CAAC;CACA,aAAa;CACb,kBAAkB;CAClB,UAAU,SAAS,MAAM,OAAO,YAAY,IAAK,CAAC;AACpD,CAAC,CAAC,CAAC,CAAC;;AAGJ,IAAa,mBAAb,cAAsC,OAAO,MAC3C,uCACF,CAAC,CAAC;CACA,SAAS,OAAO,QAAQ,CAAC;CACzB,KAAK;CACL,UAAU,kBAAkB,MAAM,OAAO,cAAc,CAAC,CAAC;CACzD,QAAQ;CACR,UAAU;CACV,cAAc;CACd,QAAQ;AACV,CAAC,CAAC,CAAC,CAAC;;AAGJ,IAAa,gBAAb,cAAmC,OAAO,MACxC,oCACF,CAAC,CAAC;CACA,KAAK;CACL,OAAO;CACP,OAAO;CACP,iBAAiB;CACjB,gBAAgB;;CAEhB,SAAS,OAAO,OAAO,gBAAgB;AACzC,CAAC,CAAC,CAAC,CAAC;AAEJ,IAAa,mBAAb,cAAsC,OAAO,MAC3C,uCACF,CAAC,CAAC;CACA,SAAS,OAAO,QAAQ,CAAC;CACzB,KAAK;CACL,iBAAiB;CACjB,OAAO;CACP,OAAO,OAAO,OAAO,QAAQ;CAC7B,gBAAgB;CAChB,SAAS,OAAO,OAAO,gBAAgB;;CAEvC,YAAY,OAAO,OAAO,SAAS;AACrC,CAAC,CAAC,CAAC,CAAC;AAEJ,IAAa,qBAAb,cAAwC,OAAO,YAAgC,CAAC,CAC9E,sBACA;CACE,WAAW,OAAO;CAClB,QAAQ,OAAO,SAAS;EAAC;EAAiB;EAAe;EAAW;CAAc,CAAC;AACrF,CACF,CAAC,CAAC,CAAC;AAEH,IAAa,eAAb,cAAkC,OAAO,YAA0B,CAAC,CAAC,gBAAgB;CACnF,KAAK;CACL,gBAAgB;AAClB,CAAC,CAAC,CAAC,CAAC;AAEJ,IAAa,wBAAb,cAA2C,OAAO,YAAmC,CAAC,CACpF,yBACA;CAAE,KAAK;CAAsB,OAAO;CAAU,OAAO;AAAM,CAC7D,CAAC,CAAC,CAAC;AAEH,IAAa,uBAAb,cAA0C,OAAO,YAAkC,CAAC,CAClF,wBACA;CAAE,KAAK;CAAsB,QAAQ;AAAO,CAC9C,CAAC,CAAC,CAAC;AAEH,MAAa,wBAAwB,OAAO,SAAS;CACnD;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACF,CAAC;AAID,IAAa,0BAAb,cAA6C,OAAO,YAAqC,CAAC,CACxF,2BACA,EAAE,OAAO,sBAAsB,CACjC,CAAC,CAAC,CAAC;AAEH,IAAa,4BAAb,cAA+C,QAAQ,QAGrD,CAAC,CAAC,gDAAgD,CAAC,CAAC;CACpD,OAAgB,QAAQ,MAAM,QAAQ,MAAM,EAAE,WAAW,OAAO,KAAK,CAAC;AACxE;AASA,IAAa,uBAAb,cAA0C,OAAO,MAC/C,2CACF,CAAC,CAAC;CACA,KAAK;CACL,OAAO;CACP,aAAa,OAAO,IAAI,MAAM,OAAO,UAAU;EAAE,SAAS;EAAG,SAAS;CAAQ,CAAC,CAAC;AAClF,CAAC,CAAC,CAAC,CAAC;;;;;;;;;;;;;;AAeJ,IAAa,yBAAb,cAA4C,QAAQ,QAmBlD,CAAC,CAAC,6CAA6C,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { Cr as RetryCommand, Dr as predictRecoveryDisposition, Er as obligationSeverityOf, Or as recoveryDecisionMeaning, Sr as RecoveryExplanation, Tr as RetryRefused, _r as ObligationReport, br as RECOVERY_DECISION_MEANINGS, cr as ExplainedEvidence, dr as IntegrityCheck, fr as IntegrityCheckName, gr as ObligationEntry, hr as ObligationBlockedOn, kr as renderRecoveryExplanation, lr as ExplainedSubmission, mr as IntegrityReport, pr as IntegrityCheckStatus, ur as ExplainedUnknownCall, vr as ObligationSeverity, wr as RetryRefusalReason, xr as RecoveryDisposition, yr as ObligationThresholds } from "../Records-BAGkekt8.mjs";
|
|
2
|
+
export { ExplainedEvidence, ExplainedSubmission, ExplainedUnknownCall, IntegrityCheck, IntegrityCheckName, IntegrityCheckStatus, IntegrityReport, ObligationBlockedOn, ObligationEntry, ObligationReport, ObligationSeverity, ObligationThresholds, RECOVERY_DECISION_MEANINGS, RecoveryDisposition, RecoveryExplanation, RetryCommand, RetryRefusalReason, RetryRefused, obligationSeverityOf, predictRecoveryDisposition, recoveryDecisionMeaning, renderRecoveryExplanation };
|
|
@@ -0,0 +1,328 @@
|
|
|
1
|
+
import { t as __exportAll } from "../rolldown-runtime-D7D4PA-g.mjs";
|
|
2
|
+
import { SubmissionId, ThreadId, ToolCallId } from "../core/Identifiers.mjs";
|
|
3
|
+
import { QueueSequence } from "../core/Receipt.mjs";
|
|
4
|
+
import { CanonicalSequence, SettlementOutcome, ToolCallUnknown } from "./Records.mjs";
|
|
5
|
+
import { AbortCommand, AbortIntent, ApprovalDecisionIntent, ChildAttachmentSnapshot, JoinSnapshot, ParentLinkage, SubmissionState, SuspensionSnapshot, UnknownResolutionIntent } from "./SubmissionLedger.mjs";
|
|
6
|
+
import { OpenDelegationCallEvidence, OpenToolCallEvidence, PendingApprovalEvidence, RecoveryDecision } from "./Recovery.mjs";
|
|
7
|
+
import { DateTime, Schema } from "effect";
|
|
8
|
+
//#region src/durable/Admin.ts
|
|
9
|
+
var Admin_exports = /* @__PURE__ */ __exportAll({
|
|
10
|
+
ExplainedEvidence: () => ExplainedEvidence,
|
|
11
|
+
ExplainedSubmission: () => ExplainedSubmission,
|
|
12
|
+
ExplainedUnknownCall: () => ExplainedUnknownCall,
|
|
13
|
+
IntegrityCheck: () => IntegrityCheck,
|
|
14
|
+
IntegrityCheckName: () => IntegrityCheckName,
|
|
15
|
+
IntegrityCheckStatus: () => IntegrityCheckStatus,
|
|
16
|
+
IntegrityReport: () => IntegrityReport,
|
|
17
|
+
ObligationBlockedOn: () => ObligationBlockedOn,
|
|
18
|
+
ObligationEntry: () => ObligationEntry,
|
|
19
|
+
ObligationReport: () => ObligationReport,
|
|
20
|
+
ObligationSeverity: () => ObligationSeverity,
|
|
21
|
+
ObligationThresholds: () => ObligationThresholds,
|
|
22
|
+
RECOVERY_DECISION_MEANINGS: () => RECOVERY_DECISION_MEANINGS,
|
|
23
|
+
RecoveryDisposition: () => RecoveryDisposition,
|
|
24
|
+
RecoveryExplanation: () => RecoveryExplanation,
|
|
25
|
+
RetryCommand: () => RetryCommand,
|
|
26
|
+
RetryRefusalReason: () => RetryRefusalReason,
|
|
27
|
+
RetryRefused: () => RetryRefused,
|
|
28
|
+
obligationSeverityOf: () => obligationSeverityOf,
|
|
29
|
+
predictRecoveryDisposition: () => predictRecoveryDisposition,
|
|
30
|
+
recoveryDecisionMeaning: () => recoveryDecisionMeaning,
|
|
31
|
+
renderRecoveryExplanation: () => renderRecoveryExplanation
|
|
32
|
+
});
|
|
33
|
+
/**
|
|
34
|
+
* Pure report logic for the P7 administrative operations (plan §3): the Schema classes carried
|
|
35
|
+
* by `DurableAgentRuntime.explain`/`verify`/`scanObligations`, the operator meaning table for
|
|
36
|
+
* every recovery decision tag, and the text renderer. Everything here is pure — no port access,
|
|
37
|
+
* no clocks, no writes — so hosts, CLIs, and wire envelopes share one report vocabulary.
|
|
38
|
+
*/
|
|
39
|
+
const BoundedDetail = Schema.String.check(Schema.isMaxLength(4096));
|
|
40
|
+
/** Non-negative whole seconds derived from the Effect Clock. */
|
|
41
|
+
const AgeSeconds = Schema.Int.check(Schema.isGreaterThanOrEqualTo(0));
|
|
42
|
+
/**
|
|
43
|
+
* The disposition family of `RecoveryReport`, reused verbatim so an explanation predicts exactly
|
|
44
|
+
* what `runRecovery`/`retry` would report for the same decision.
|
|
45
|
+
*/
|
|
46
|
+
const RecoveryDisposition = Schema.Literals([
|
|
47
|
+
"repaired",
|
|
48
|
+
"deferred",
|
|
49
|
+
"none",
|
|
50
|
+
"unknown"
|
|
51
|
+
]);
|
|
52
|
+
/** Submission identity, lane position, and Clock-derived ages (DUR-017 obligation visibility). */
|
|
53
|
+
var ExplainedSubmission = class extends Schema.Class("@effect-agent/thread/ExplainedSubmission")({
|
|
54
|
+
submissionId: SubmissionId,
|
|
55
|
+
threadId: ThreadId,
|
|
56
|
+
state: SubmissionState,
|
|
57
|
+
queueSequence: QueueSequence,
|
|
58
|
+
createdAt: Schema.DateTimeUtcFromString,
|
|
59
|
+
readyAt: Schema.optionalKey(Schema.DateTimeUtcFromString),
|
|
60
|
+
/** Whole seconds since admission (`createdAt`). */
|
|
61
|
+
ageSeconds: AgeSeconds,
|
|
62
|
+
/** Whole seconds since readiness, present exactly when `readyAt` is recorded. */
|
|
63
|
+
readyAgeSeconds: Schema.optionalKey(AgeSeconds),
|
|
64
|
+
parentLinkage: Schema.optionalKey(ParentLinkage)
|
|
65
|
+
}) {};
|
|
66
|
+
/** One durable Unknown Outcome and whether a covering resolution intent exists (DUR-017). */
|
|
67
|
+
var ExplainedUnknownCall = class extends Schema.Class("@effect-agent/thread/ExplainedUnknownCall")({
|
|
68
|
+
toolCallId: ToolCallId,
|
|
69
|
+
toolName: ToolCallUnknown.fields.toolName,
|
|
70
|
+
reason: ToolCallUnknown.fields.reason,
|
|
71
|
+
recordedAt: Schema.DateTimeUtcFromString,
|
|
72
|
+
/** A durable `resolveUnknown` intent covers this call. */
|
|
73
|
+
resolved: Schema.Boolean
|
|
74
|
+
}) {};
|
|
75
|
+
/**
|
|
76
|
+
* The evidence summary of one explanation: the classifier's canonical-history inputs plus the
|
|
77
|
+
* durable intents and subagent attachments the ledger snapshot carries. Everything is read-only
|
|
78
|
+
* observation — assembling this value performs zero writes.
|
|
79
|
+
*/
|
|
80
|
+
var ExplainedEvidence = class extends Schema.Class("@effect-agent/thread/ExplainedEvidence")({
|
|
81
|
+
threadMaterialized: Schema.Boolean,
|
|
82
|
+
inputRecorded: Schema.Boolean,
|
|
83
|
+
abortRecorded: Schema.Boolean,
|
|
84
|
+
recordedSettlementOutcome: Schema.optionalKey(SettlementOutcome),
|
|
85
|
+
/** Prepared ordinary Tool Calls without a canonical outcome (DUR-009). */
|
|
86
|
+
openToolCalls: Schema.Array(OpenToolCallEvidence),
|
|
87
|
+
/** Delegation Tool Calls with an open parent-side obligation. */
|
|
88
|
+
openDelegationCalls: Schema.Array(OpenDelegationCallEvidence),
|
|
89
|
+
/** Canonically requested approvals without a canonical decision. */
|
|
90
|
+
approvalsPending: Schema.Array(PendingApprovalEvidence),
|
|
91
|
+
/** Durable Unknown Outcomes with their resolution coverage (DUR-017). */
|
|
92
|
+
unknownCalls: Schema.Array(ExplainedUnknownCall),
|
|
93
|
+
/** Durable approval decisions recorded against this Submission. */
|
|
94
|
+
approvalDecisions: Schema.Array(ApprovalDecisionIntent),
|
|
95
|
+
/** Durable unknown-outcome resolutions recorded against this Submission. */
|
|
96
|
+
unknownResolutions: Schema.Array(UnknownResolutionIntent),
|
|
97
|
+
/** Parent-side child attachments. */
|
|
98
|
+
childAttachments: Schema.Array(ChildAttachmentSnapshot),
|
|
99
|
+
/** Host-side joined/joining members of this Submission's Run (DUR-016). */
|
|
100
|
+
joins: Schema.Array(JoinSnapshot),
|
|
101
|
+
/** Joined-side host identity, when this Submission is joined to a host Run. */
|
|
102
|
+
hostSubmissionId: Schema.optionalKey(SubmissionId),
|
|
103
|
+
suspension: Schema.optionalKey(SuspensionSnapshot),
|
|
104
|
+
abortIntent: Schema.optionalKey(AbortIntent)
|
|
105
|
+
}) {};
|
|
106
|
+
/**
|
|
107
|
+
* The read-only recovery explanation of one Submission (P7 exit gate "operators can explain
|
|
108
|
+
* recovery state without editing storage"): the submission summary, the evidence the pure
|
|
109
|
+
* classifier consumed, the exact `RecoveryDecision` it selected, that decision's operator
|
|
110
|
+
* meaning, and the disposition the recovery pass would report for it.
|
|
111
|
+
*/
|
|
112
|
+
var RecoveryExplanation = class extends Schema.Class("@effect-agent/thread/RecoveryExplanation")({
|
|
113
|
+
submission: ExplainedSubmission,
|
|
114
|
+
evidence: ExplainedEvidence,
|
|
115
|
+
decision: RecoveryDecision,
|
|
116
|
+
/** Static operator meaning of `decision._tag` (see `RECOVERY_DECISION_MEANINGS`). */
|
|
117
|
+
decisionMeaning: BoundedDetail,
|
|
118
|
+
/**
|
|
119
|
+
* The disposition `runRecovery` would report when this decision executes without claim
|
|
120
|
+
* contention (see `predictRecoveryDisposition`): `repaired` = the recovery pass itself fixes
|
|
121
|
+
* it; `deferred` = a claiming worker must finish it; `unknown` = durably blocked on the
|
|
122
|
+
* authorized DUR-017 resolution path; `none` = settled, nothing owed.
|
|
123
|
+
*/
|
|
124
|
+
disposition: RecoveryDisposition,
|
|
125
|
+
explainedAt: Schema.DateTimeUtcFromString
|
|
126
|
+
}) {};
|
|
127
|
+
/**
|
|
128
|
+
* Operator meaning of every recovery decision tag, matching the classifier docstrings in
|
|
129
|
+
* `recovery.ts` (the classifier remains the semantic authority; this table is its operator
|
|
130
|
+
* rendering). Exhaustive over `RecoveryDecision` — adding a decision without a meaning is a
|
|
131
|
+
* compile error here.
|
|
132
|
+
*/
|
|
133
|
+
const RECOVERY_DECISION_MEANINGS = {
|
|
134
|
+
CompleteMaterialization: "Ledger admission committed but the Thread is not durable: recovery finishes materialization, appends ThreadCreated, and marks readiness.",
|
|
135
|
+
RepairReadiness: "The Thread is durable but the readiness marker is missing: recovery replays the idempotent markReady.",
|
|
136
|
+
ApplyInput: "No canonical input record exists yet: recovery appends the deterministic UserInputRecorded record and marks it applied.",
|
|
137
|
+
RepairInputMarker: "The canonical input record exists but the ledger marker was lost: recovery repairs the marker from history, never the reverse (DUR-015).",
|
|
138
|
+
ResumeFromTurnBoundary: "Input is applied and no terminal work is reserved: a claiming worker resumes the Run from the last committed Turn boundary; the model may be re-invoked and any duplicate cost is observable (durability §9).",
|
|
139
|
+
AppendReservedSettlement: "A settlement is reserved but not canonical: recovery appends the EXACT reserved record, then finalizes (DUR-011).",
|
|
140
|
+
FinalizeLedgerFromHistory: "The canonical settlement record exists: recovery rebuilds/finalizes the ledger from history and never rewrites history from the cached ledger status (DUR-011, DUR-015).",
|
|
141
|
+
SettleAborted: "A durable abort intent exists with no reserved outcome and no open attached-child obligation: recovery settles aborted, first recording ToolCallUnknown audits for open ordinary calls — abort never asserts external rollback (durability §13).",
|
|
142
|
+
MarkUnknown: "Prepared ordinary Tool Calls have no canonical outcome: recovery reconciles each open call and marks the remainder Unknown — never an automatic replay (DUR-009/DUR-017).",
|
|
143
|
+
ResumePendingToolBatch: "A committed tool-declaring response has zero prepared and zero settled records: a claiming worker resumes the declared batch without model re-invocation and without Unknown (durability §15).",
|
|
144
|
+
AwaitApprovalDecision: "Canonically requested approvals lack decisions: the lane waits durably for the authorized resolveApproval path (recovery repairs a lost suspend transition from history).",
|
|
145
|
+
ResumeSuspended: "Every pending approval has a durable decision: a claiming worker resumes the declared batch, appending the canonical ToolApprovalDecided records first.",
|
|
146
|
+
AwaitUnknownResolution: "Unknown Outcomes lack covering resolutions: the lane stays blocked awaiting the authorized DUR-017 resolveUnknown path; the obligation stays visible, nothing replays.",
|
|
147
|
+
ApplyUnknownResolutions: "Durable resolution intents cover every open call: recovery applies them canonically and reopens the lane.",
|
|
148
|
+
RevertJoining: "The Submission is joining without a canonical input record: recovery reverts it to ready — the input was never consumed and will be delivered exactly once later (DUR-016).",
|
|
149
|
+
RepairJoinMarker: "The canonical joined input exists but the joined marker was lost: recovery repairs the marker only; the input reattaches, never duplicates (DUR-015/DUR-016).",
|
|
150
|
+
SettleJoinedWithHost: "The host Run settled canonically: recovery settles this joined Submission with the host outcome — each joined Submission is owed its own settlement (DUR-002).",
|
|
151
|
+
AwaitHostSettlement: "The Submission is joined and its host Run is still live: nothing to repair — the input reattaches through the host's resume and the Submission settles with the host.",
|
|
152
|
+
CompleteChildAdmission: "A canonical SubagentRequested exists and the authoritative lookup proved not-admitted: recovery idempotently admits the intended child from the canonical request payload alone.",
|
|
153
|
+
AwaitChildAdmissionResolution: "The authoritative child-admission lookup answered indeterminate (or was not performed): recovery waits and retries the authoritative owner; a second admission never occurs (SUB-031).",
|
|
154
|
+
RepairSubagentStartLink: "The child is admitted but the parent's SubagentStarted link (or reservation attachment) is missing: recovery resolves the SAME child by its deterministic key and appends the exact link (SUB-016/SUB-017).",
|
|
155
|
+
EnsureWaitingForChild: "Children are established and at least one is nonterminal while the parent lane is not durably suspended: recovery restores the waitingForChild suspension; it reattaches the one existing child and never spawns a replacement (SUB-018/SUB-030).",
|
|
156
|
+
AwaitChildSettlement: "The parent is durably suspended waitingForChild and a listed child is not yet provably settled: the lane stays dormant, consumes no worker permit, and the child's Settlement wakes it durably (SUB-021/SUB-030).",
|
|
157
|
+
ResumeWaitingParent: "Every relevant child is provably settled but the parent has not joined: recovery replays the idempotent wake so a claiming worker resumes the declared batch and joins each child's canonical Settlement.",
|
|
158
|
+
ApplyJoinAccounting: "The canonical SubagentJoined record exists but the reservation release is incomplete: recovery replays the accounting decision FROM the canonical record — budget stays unavailable until repair, never available twice (DUR-015).",
|
|
159
|
+
PropagateChildAbort: "Parent abort is canonical while attached children are nonterminal: recovery idempotently issues each child's durable abort command and keeps the parent waiting for the joins — request-abort-and-join is the only close behavior.",
|
|
160
|
+
ReleaseOrphanChildReservation: "A child budget reservation can no longer bind a child: recovery freezes the deterministic zero-consumed accounting decision and releases the unused allocation exactly once.",
|
|
161
|
+
AwaitParentEstablishment: "The Submission is a parent-linked child whose Thread lacks the canonical lineage record: the child lane defers its own readiness repair — the parent's idempotent establishment completes it, so a child never runs a Turn before its lineage is canonical (P7 §7(a), SUB-016).",
|
|
162
|
+
NoAction: "The Submission is settled; nothing is owed."
|
|
163
|
+
};
|
|
164
|
+
/** The operator meaning of one recovery decision tag. */
|
|
165
|
+
const recoveryDecisionMeaning = (tag) => RECOVERY_DECISION_MEANINGS[tag];
|
|
166
|
+
/**
|
|
167
|
+
* The disposition the recovery executor reports for a decision when its repair executes without
|
|
168
|
+
* claim contention (pure prediction; `executeRecoveryDecision` in the coordinator remains the
|
|
169
|
+
* execution authority — a lane concurrently claimed by a worker can always defer instead).
|
|
170
|
+
* `AwaitApprovalDecision` depends on the snapshot: an already-suspended lane waits (`deferred`),
|
|
171
|
+
* while a claimable lane with a lost suspend transition is repaired.
|
|
172
|
+
*/
|
|
173
|
+
const predictRecoveryDisposition = (decision, snapshot) => {
|
|
174
|
+
switch (decision._tag) {
|
|
175
|
+
case "NoAction": return "none";
|
|
176
|
+
case "AwaitUnknownResolution":
|
|
177
|
+
case "MarkUnknown": return "unknown";
|
|
178
|
+
case "ResumeFromTurnBoundary":
|
|
179
|
+
case "ResumePendingToolBatch":
|
|
180
|
+
case "ResumeSuspended":
|
|
181
|
+
case "AwaitHostSettlement":
|
|
182
|
+
case "AwaitChildAdmissionResolution":
|
|
183
|
+
case "AwaitChildSettlement":
|
|
184
|
+
case "AwaitParentEstablishment": return "deferred";
|
|
185
|
+
case "AwaitApprovalDecision": return snapshot.submission.state === "suspended" ? "deferred" : "repaired";
|
|
186
|
+
default: return "repaired";
|
|
187
|
+
}
|
|
188
|
+
};
|
|
189
|
+
const formatUtc = (value) => DateTime.formatIso(value);
|
|
190
|
+
/** Pure operator text for one explanation (the CLI's `explain` output body). */
|
|
191
|
+
const renderRecoveryExplanation = (explanation) => {
|
|
192
|
+
const submission = explanation.submission;
|
|
193
|
+
const evidence = explanation.evidence;
|
|
194
|
+
const lines = [
|
|
195
|
+
`Submission ${submission.submissionId} (thread ${submission.threadId})`,
|
|
196
|
+
` state: ${submission.state} queue: ${submission.queueSequence} age: ${submission.ageSeconds}s`,
|
|
197
|
+
` admitted: ${formatUtc(submission.createdAt)}${submission.readyAt === void 0 ? "" : ` ready: ${formatUtc(submission.readyAt)}`}`
|
|
198
|
+
];
|
|
199
|
+
if (submission.parentLinkage !== void 0) lines.push(` attached child of ${submission.parentLinkage.parentSubmissionId} (tool call ${submission.parentLinkage.parentToolCallId})`);
|
|
200
|
+
lines.push(` evidence: input=${evidence.inputRecorded ? "recorded" : "missing"} settlement=${evidence.recordedSettlementOutcome ?? "none"} abort=${evidence.abortRecorded ? "recorded" : "none"} materialized=${evidence.threadMaterialized ? "yes" : "no"}`);
|
|
201
|
+
if (evidence.openToolCalls.length > 0) lines.push(` open ordinary tool calls: ${evidence.openToolCalls.map((call) => `${call.toolName}#${call.toolCallId}`).join(", ")}`);
|
|
202
|
+
if (evidence.openDelegationCalls.length > 0) lines.push(` open delegation calls: ${evidence.openDelegationCalls.map((call) => `${call.toolName}#${call.toolCallId}(requested=${call.requested} started=${call.started} joined=${call.joined})`).join(", ")}`);
|
|
203
|
+
if (evidence.approvalsPending.length > 0) lines.push(` approvals pending: ${evidence.approvalsPending.map((pending) => pending.toolCallId).join(", ")}`);
|
|
204
|
+
for (const unknown of evidence.unknownCalls) lines.push(` unknown outcome: ${unknown.toolName}#${unknown.toolCallId} recorded ${formatUtc(unknown.recordedAt)} ${unknown.resolved ? "(resolution intent recorded)" : "(awaiting resolveUnknown)"}`);
|
|
205
|
+
if (evidence.childAttachments.length > 0) lines.push(` attached children: ${evidence.childAttachments.map((child) => `${child.childSubmissionId}(${child.childState})`).join(", ")}`);
|
|
206
|
+
if (evidence.joins.length > 0) lines.push(` joined members: ${evidence.joins.map((join) => `${join.submissionId}(${join.state})`).join(", ")}`);
|
|
207
|
+
if (evidence.hostSubmissionId !== void 0) lines.push(` joined to host: ${evidence.hostSubmissionId}`);
|
|
208
|
+
if (evidence.suspension !== void 0) lines.push(` suspended (${evidence.suspension.reason._tag}) since ${formatUtc(evidence.suspension.suspendedAt)}`);
|
|
209
|
+
if (evidence.abortIntent !== void 0) lines.push(` abort intent by ${evidence.abortIntent.author} at ${formatUtc(evidence.abortIntent.requestedAt)}`);
|
|
210
|
+
lines.push(` decision: ${explanation.decision._tag} → disposition ${explanation.disposition}`, ` meaning: ${explanation.decisionMeaning}`);
|
|
211
|
+
return lines.join("\n");
|
|
212
|
+
};
|
|
213
|
+
/** The named integrity checks `verifyThreadInvariants` performs. */
|
|
214
|
+
const IntegrityCheckName = Schema.Literals([
|
|
215
|
+
"schema-round-trip",
|
|
216
|
+
"record-identity",
|
|
217
|
+
"sequence-contiguity",
|
|
218
|
+
"digest-chain",
|
|
219
|
+
"fifo-input-order",
|
|
220
|
+
"fifo-settlement-order",
|
|
221
|
+
"terminal-uniqueness",
|
|
222
|
+
"ledger-canonical-agreement",
|
|
223
|
+
"checkpoint-binding",
|
|
224
|
+
"all-settled"
|
|
225
|
+
]);
|
|
226
|
+
const IntegrityCheckStatus = Schema.Literals([
|
|
227
|
+
"passed",
|
|
228
|
+
"failed",
|
|
229
|
+
"skipped"
|
|
230
|
+
]);
|
|
231
|
+
/** One typed check result; `detail` explains a failure or the honest reason for a skip. */
|
|
232
|
+
var IntegrityCheck = class extends Schema.Class("@effect-agent/thread/IntegrityCheck")({
|
|
233
|
+
name: IntegrityCheckName,
|
|
234
|
+
status: IntegrityCheckStatus,
|
|
235
|
+
detail: Schema.optionalKey(BoundedDetail)
|
|
236
|
+
}) {};
|
|
237
|
+
/**
|
|
238
|
+
* The read-only integrity verdict for one Thread (plan §3 `verify`): typed per-check
|
|
239
|
+
* results, never a repair. `ok` is true exactly when no check failed — skipped checks are
|
|
240
|
+
* honest scope statements, not silent passes.
|
|
241
|
+
*/
|
|
242
|
+
var IntegrityReport = class extends Schema.Class("@effect-agent/thread/IntegrityReport")({
|
|
243
|
+
threadId: ThreadId,
|
|
244
|
+
tailSequence: CanonicalSequence,
|
|
245
|
+
recordCount: Schema.Int.check(Schema.isGreaterThanOrEqualTo(0)),
|
|
246
|
+
submissionCount: Schema.Int.check(Schema.isGreaterThanOrEqualTo(0)),
|
|
247
|
+
checks: Schema.Array(IntegrityCheck),
|
|
248
|
+
ok: Schema.Boolean
|
|
249
|
+
}) {};
|
|
250
|
+
/**
|
|
251
|
+
* What one nonterminal Submission is visibly blocked on (DUR-017 operator surface; OPS-001).
|
|
252
|
+
* `ready-aged`/`running-aged` are not blocks — they are accepted work whose settlement age is
|
|
253
|
+
* measurable and alertable.
|
|
254
|
+
*/
|
|
255
|
+
const ObligationBlockedOn = Schema.Literals([
|
|
256
|
+
"unknown",
|
|
257
|
+
"approval",
|
|
258
|
+
"waitingForChild",
|
|
259
|
+
"ready-aged",
|
|
260
|
+
"running-aged"
|
|
261
|
+
]);
|
|
262
|
+
const ObligationSeverity = Schema.Literals([
|
|
263
|
+
"ok",
|
|
264
|
+
"aging",
|
|
265
|
+
"overdue"
|
|
266
|
+
]);
|
|
267
|
+
/** Host-supplied age thresholds; the framework deliberately does not own the alert loop. */
|
|
268
|
+
var ObligationThresholds = class extends Schema.Class("@effect-agent/thread/ObligationThresholds")({
|
|
269
|
+
/** Age (whole seconds) at which an obligation is reported `aging`. */
|
|
270
|
+
agingSeconds: AgeSeconds,
|
|
271
|
+
/** Age (whole seconds) at which an obligation is reported `overdue`. */
|
|
272
|
+
overdueSeconds: AgeSeconds
|
|
273
|
+
}) {};
|
|
274
|
+
/** One nonterminal accepted-work obligation with its age and severity. */
|
|
275
|
+
var ObligationEntry = class extends Schema.Class("@effect-agent/thread/ObligationEntry")({
|
|
276
|
+
submissionId: SubmissionId,
|
|
277
|
+
threadId: ThreadId,
|
|
278
|
+
state: SubmissionState,
|
|
279
|
+
blockedOn: ObligationBlockedOn,
|
|
280
|
+
ageSeconds: AgeSeconds,
|
|
281
|
+
severity: ObligationSeverity
|
|
282
|
+
}) {};
|
|
283
|
+
/**
|
|
284
|
+
* The scan-based DUR-017/OPS-001 operator surface (plan §3): a fold of the ledger's nonterminal
|
|
285
|
+
* scan into aged, severity-classified rows. Scan-based, never a daemon — hosts run it
|
|
286
|
+
* periodically and export logs/metrics; ages need no storage-version bump because every source
|
|
287
|
+
* timestamp already exists (`createdAt`/`readyAt`, `suspendedAt`, the canonical
|
|
288
|
+
* `ToolCallUnknown` record's `createdAt`).
|
|
289
|
+
*/
|
|
290
|
+
var ObligationReport = class extends Schema.Class("@effect-agent/thread/ObligationReport")({
|
|
291
|
+
thresholds: ObligationThresholds,
|
|
292
|
+
entries: Schema.Array(ObligationEntry),
|
|
293
|
+
generatedAt: Schema.DateTimeUtcFromString
|
|
294
|
+
}) {};
|
|
295
|
+
/** Severity of one obligation age under the supplied thresholds. */
|
|
296
|
+
const obligationSeverityOf = (ageSeconds, thresholds) => ageSeconds >= thresholds.overdueSeconds ? "overdue" : ageSeconds >= thresholds.agingSeconds ? "aging" : "ok";
|
|
297
|
+
/**
|
|
298
|
+
* The mandatory-audit retry command (SEC-011): `author`/`reason` carry the same bounds as the
|
|
299
|
+
* canonical abort command so every mutating administrative operation stays attributable. The
|
|
300
|
+
* executed repair itself appends the deterministic `RepairAnnotated` audit record (DUR-013) —
|
|
301
|
+
* retry adds no new canonical record type.
|
|
302
|
+
*/
|
|
303
|
+
var RetryCommand = class extends Schema.Class("@effect-agent/thread/RetryCommand")({
|
|
304
|
+
submissionId: SubmissionId,
|
|
305
|
+
author: AbortCommand.fields.author,
|
|
306
|
+
reason: AbortCommand.fields.reason
|
|
307
|
+
}) {};
|
|
308
|
+
/** Why a retry was refused without executing anything. */
|
|
309
|
+
const RetryRefusalReason = Schema.Literals([
|
|
310
|
+
"settled",
|
|
311
|
+
"await-unknown-resolution",
|
|
312
|
+
"await-approval-decision"
|
|
313
|
+
]);
|
|
314
|
+
/**
|
|
315
|
+
* Typed refusal of `retry` (plan §3): lanes blocked on `AwaitUnknownResolution` or
|
|
316
|
+
* `AwaitApprovalDecision` have their own authorized operations, and settled work is never
|
|
317
|
+
* re-driven. The refusal names the classifier decision so the operator sees WHY.
|
|
318
|
+
*/
|
|
319
|
+
var RetryRefused = class extends Schema.TaggedError()("RetryRefused", {
|
|
320
|
+
submissionId: SubmissionId,
|
|
321
|
+
refusal: RetryRefusalReason,
|
|
322
|
+
decisionTag: Schema.String.check(Schema.isMaxLength(256)),
|
|
323
|
+
message: Schema.String.check(Schema.isMaxLength(4096))
|
|
324
|
+
}) {};
|
|
325
|
+
//#endregion
|
|
326
|
+
export { ExplainedEvidence, ExplainedSubmission, ExplainedUnknownCall, IntegrityCheck, IntegrityCheckName, IntegrityCheckStatus, IntegrityReport, ObligationBlockedOn, ObligationEntry, ObligationReport, ObligationSeverity, ObligationThresholds, RECOVERY_DECISION_MEANINGS, RecoveryDisposition, RecoveryExplanation, RetryCommand, RetryRefusalReason, RetryRefused, obligationSeverityOf, predictRecoveryDisposition, recoveryDecisionMeaning, renderRecoveryExplanation, Admin_exports as t };
|
|
327
|
+
|
|
328
|
+
//# sourceMappingURL=Admin.mjs.map
|