@yielded/agent 0.1.0-beta.173 → 0.1.0-beta.175
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/{Admin-BX9ns28E.d.mts → Admin-Qa3I1oA5.d.mts} +61 -21
- package/dist/{Agent-9aBoIi74.d.mts → Agent-B39jRnFv.d.mts} +2 -2
- package/dist/{Agent-0WvBWWbM.mjs → Agent-BiRbr73L.mjs} +7 -6
- package/dist/Agent-BiRbr73L.mjs.map +1 -0
- package/dist/{AgentRuntime-BfP14534.d.mts → AgentRuntime-CHDyRbSf.d.mts} +12 -12
- package/dist/{AgentRuntime-CQ-qcETl.mjs → AgentRuntime-DaDKMasp.mjs} +290 -273
- package/dist/AgentRuntime-DaDKMasp.mjs.map +1 -0
- package/dist/{Digest-DCuPlhNk.mjs → Digest-C3EODOee.mjs} +42 -15
- package/dist/Digest-C3EODOee.mjs.map +1 -0
- package/dist/{DurableAgentRuntime-BAmSkWYr.mjs → DurableAgentRuntime-CPlw5_7e.mjs} +1557 -1458
- package/dist/DurableAgentRuntime-CPlw5_7e.mjs.map +1 -0
- package/dist/{EventSource-BwliwQz9.d.mts → EventSource-BTu68yDW.d.mts} +2 -2
- package/dist/InMemory.d.mts +2 -2
- package/dist/{MessageDelivery-B943ebI_.d.mts → MessageDelivery-DjAZJ4Fd.d.mts} +42 -42
- package/dist/{Messaging-C_6OOg_s.d.mts → Messaging-SVu6rWV8.d.mts} +12 -6
- package/dist/{MessagingHost-B8oKM7AC.d.mts → MessagingHost-C6SOAcoG.d.mts} +2 -2
- package/dist/{MessagingHost-CRUK4JBi.mjs → MessagingHost-CZCyrnvJ.mjs} +27 -26
- package/dist/MessagingHost-CZCyrnvJ.mjs.map +1 -0
- package/dist/{Output-Dsx6k52t.d.mts → Output-CRamN1Fy.d.mts} +2 -2
- package/dist/{PreparedInputAdmission-CxSJSiTl.d.mts → PreparedInputAdmission-wgY4JMZY.d.mts} +3 -3
- package/dist/{Records-BiuJDWNe.mjs → Records-DzL4Kbtw.mjs} +2 -2
- package/dist/{Records-BiuJDWNe.mjs.map → Records-DzL4Kbtw.mjs.map} +1 -1
- package/dist/{RunContinuation-FHM7XPjq.d.mts → RunContinuation-3jB5pULC.d.mts} +13 -7
- package/dist/{RunContinuation-DHYNAQFi.mjs → RunContinuation-BiyKJK32.mjs} +173 -82
- package/dist/RunContinuation-BiyKJK32.mjs.map +1 -0
- package/dist/{RunJournal-kfKVxJj7.mjs → RunJournal-CPMKcfd0.mjs} +106 -73
- package/dist/RunJournal-CPMKcfd0.mjs.map +1 -0
- package/dist/{RunOptions-D8zxFIrZ.d.mts → RunOptions-Be77lKVZ.d.mts} +2 -2
- package/dist/{RunStorage-uqPxps09.mjs → RunStorage-CzutHJBE.mjs} +10 -6
- package/dist/RunStorage-CzutHJBE.mjs.map +1 -0
- package/dist/{Scheduling-CVyfXlBR.mjs → Scheduling-07_dsGED.mjs} +12 -12
- package/dist/Scheduling-07_dsGED.mjs.map +1 -0
- package/dist/{Subagent-vpffemql.mjs → Subagent-CexndZSp.mjs} +53 -40
- package/dist/Subagent-CexndZSp.mjs.map +1 -0
- package/dist/{Subagent-E6tvd7-k.d.mts → Subagent-xhN_aD1r.d.mts} +20 -9
- package/dist/{SubagentHost-B6w2m-SI.d.mts → SubagentHost-D1xBgn9g.d.mts} +2 -2
- package/dist/{Subscription-DONig54Q.d.mts → Subscription-DmIHlOJK.d.mts} +2 -2
- package/dist/{SubscriptionInput-mJIRxWJM.d.mts → SubscriptionInput-DgcQhvbe.d.mts} +2 -2
- package/dist/{Thread-dk-QiNml.d.mts → Thread-DzdJAY4J.d.mts} +4 -3
- package/dist/{ThreadHistory-ByxS8HU1.d.mts → ThreadHistory-KPPBJLJb.d.mts} +12 -2
- package/dist/{ThreadImport-DckUMEqJ.mjs → ThreadImport-CjlG57vH.mjs} +9 -9
- package/dist/ThreadImport-CjlG57vH.mjs.map +1 -0
- package/dist/{ThreadImport-DpHxjBrA.d.mts → ThreadImport-DP-vOk2F.d.mts} +5 -5
- package/dist/{ThreadStore-CEekRa80.mjs → ThreadStore-EuUilthA.mjs} +162 -85
- package/dist/ThreadStore-EuUilthA.mjs.map +1 -0
- package/dist/{ThreadTransfer-B4gTQLIl.mjs → ThreadTransfer-DB_zsrtJ.mjs} +4 -4
- package/dist/{ThreadTransfer-B4gTQLIl.mjs.map → ThreadTransfer-DB_zsrtJ.mjs.map} +1 -1
- package/dist/{WorkerAdmission-DFVbbVh2.mjs → WorkerAdmission-eBeXt_mu.mjs} +5 -5
- package/dist/{WorkerAdmission-DFVbbVh2.mjs.map → WorkerAdmission-eBeXt_mu.mjs.map} +1 -1
- package/dist/{agent-registration-ByMZ_cK5.mjs → agent-registration-a6QYaG3h.mjs} +70 -57
- package/dist/agent-registration-a6QYaG3h.mjs.map +1 -0
- package/dist/capabilities/Approval.mjs +2 -2
- package/dist/capabilities/Approval.mjs.map +1 -1
- package/dist/capabilities/BrowserUse.d.mts +102 -1867
- package/dist/capabilities/BrowserUse.mjs +74 -798
- package/dist/capabilities/BrowserUse.mjs.map +1 -1
- package/dist/capabilities/Budget.mjs +3 -1
- package/dist/capabilities/Budget.mjs.map +1 -1
- package/dist/capabilities/CodeMode.d.mts +1 -1
- package/dist/capabilities/CodeMode.mjs +16 -9
- package/dist/capabilities/CodeMode.mjs.map +1 -1
- package/dist/capabilities/Commands.d.mts +1 -1
- package/dist/capabilities/McpClient.mjs +1 -1
- package/dist/capabilities/McpClient.mjs.map +1 -1
- package/dist/capabilities/Messaging.d.mts +1 -1
- package/dist/capabilities/Messaging.mjs +5 -5
- package/dist/capabilities/Messaging.mjs.map +1 -1
- package/dist/capabilities/ModelContext.d.mts +1 -1
- package/dist/capabilities/ModelContext.mjs +7 -5
- package/dist/capabilities/ModelContext.mjs.map +1 -1
- package/dist/capabilities/Redaction.mjs +49 -19
- package/dist/capabilities/Redaction.mjs.map +1 -1
- package/dist/capabilities/RunHooks.d.mts +2 -2
- package/dist/capabilities/RunHooks.mjs +1 -1
- package/dist/capabilities/RunHooks.mjs.map +1 -1
- package/dist/capabilities/Subagent.d.mts +1 -1
- package/dist/capabilities/Subagent.mjs +1 -1
- package/dist/capabilities/SubagentReservations.mjs +3 -1
- package/dist/capabilities/SubagentReservations.mjs.map +1 -1
- package/dist/capabilities/WebCapture.mjs.map +1 -1
- package/dist/capabilities/WebSearch.mjs +7 -7
- package/dist/capabilities/WebSearch.mjs.map +1 -1
- package/dist/core/Agent.d.mts +1 -1
- package/dist/core/Agent.mjs +1 -1
- package/dist/core/AgentUpdates.mjs +8 -8
- package/dist/core/AgentUpdates.mjs.map +1 -1
- package/dist/core/Thread.d.mts +2 -2
- package/dist/core/Thread.mjs +6 -4
- package/dist/core/Thread.mjs.map +1 -1
- package/dist/core/Usage.mjs +2 -2
- package/dist/core/Usage.mjs.map +1 -1
- package/dist/durable/ActivityStore.mjs +1 -1
- package/dist/durable/Admin.d.mts +1 -1
- package/dist/durable/Admin.mjs +1 -1
- package/dist/durable/AgentRegistration.d.mts +1 -1
- package/dist/durable/AgentRegistration.mjs +1 -1
- package/dist/durable/Certification.d.mts +1 -1
- package/dist/durable/CommittedActivity.d.mts +1 -1
- package/dist/durable/CommittedActivity.mjs +3 -3
- package/dist/durable/Digest.mjs +1 -1
- package/dist/durable/DurableAgentRuntime.d.mts +1 -1
- package/dist/durable/DurableAgentRuntime.mjs +2 -2
- package/dist/durable/EventSource.d.mts +1 -1
- package/dist/durable/EventSource.mjs +7 -7
- package/dist/durable/EventSource.mjs.map +1 -1
- package/dist/durable/GitHubWorkflowSource.d.mts +3 -3
- package/dist/durable/LifecyclePublication.d.mts +1 -1
- package/dist/durable/LifecyclePublication.mjs +2 -2
- package/dist/durable/MessageDelivery.d.mts +1 -1
- package/dist/durable/MessageDelivery.mjs +2 -2
- package/dist/durable/MessageDeliveryStoreConformance.d.mts +40 -40
- package/dist/durable/MessageDeliveryStoreConformance.mjs +2 -2
- package/dist/durable/PersistentHistory.d.mts +2 -2
- package/dist/durable/PersistentHistory.mjs +4 -4
- package/dist/durable/PreparedInputAdmission.d.mts +1 -1
- package/dist/durable/RecordFormat.mjs +3 -3
- package/dist/durable/RecordFormat.mjs.map +1 -1
- package/dist/durable/Records.mjs +1 -1
- package/dist/durable/Recovery.d.mts +1 -1
- package/dist/durable/Recovery.mjs +1 -1
- package/dist/durable/RunContinuation.d.mts +2 -2
- package/dist/durable/RunContinuation.mjs +3 -3
- package/dist/durable/RunJournal.d.mts +2 -2
- package/dist/durable/RunJournal.mjs +2 -2
- package/dist/durable/RunStorage.d.mts +1 -1
- package/dist/durable/RunStorage.mjs +1 -1
- package/dist/durable/Schedule.mjs +1 -1
- package/dist/durable/ScheduleStoreConformance.mjs +1 -1
- package/dist/durable/ScheduleTransition.mjs +1 -1
- package/dist/durable/Scheduling.d.mts +1 -1
- package/dist/durable/Scheduling.mjs +1 -1
- package/dist/durable/SettlementPublisher.d.mts +1 -1
- package/dist/durable/SettlementPublisher.mjs +3 -3
- package/dist/durable/SqlMemoryStore.mjs +5 -3
- package/dist/durable/SqlMemoryStore.mjs.map +1 -1
- package/dist/durable/SubmissionLedger.d.mts +1 -1
- package/dist/durable/SubmissionLedger.mjs +11 -3
- package/dist/durable/SubmissionLedger.mjs.map +1 -1
- package/dist/durable/SubmissionLedgerConformance.d.mts +1 -1
- package/dist/durable/SubmissionLedgerConformance.mjs +6 -6
- package/dist/durable/SubmissionStatus.d.mts +1 -1
- package/dist/durable/Subscription.d.mts +1 -1
- package/dist/durable/Subscription.mjs +2 -2
- package/dist/durable/SubscriptionInput.d.mts +1 -1
- package/dist/durable/SubscriptionInput.mjs +4 -4
- package/dist/durable/SubscriptionInput.mjs.map +1 -1
- package/dist/durable/SubscriptionStoreConformance.d.mts +1 -1
- package/dist/durable/SubscriptionStoreConformance.mjs +3 -3
- package/dist/durable/SubscriptionStoreConformance.mjs.map +1 -1
- package/dist/durable/SubscriptionTools.d.mts +2 -2
- package/dist/durable/SubscriptionTransition.d.mts +1 -1
- package/dist/durable/SubscriptionTransition.mjs +1 -1
- package/dist/durable/Subscriptions.d.mts +5 -5
- package/dist/durable/Subscriptions.mjs +3 -3
- package/dist/durable/Subscriptions.mjs.map +1 -1
- package/dist/durable/ThreadArchiveRange.d.mts +1 -1
- package/dist/durable/ThreadArchiveRange.mjs +1 -1
- package/dist/durable/ThreadContextHistory.d.mts +1 -1
- package/dist/durable/ThreadContextHistory.mjs +2 -2
- package/dist/durable/ThreadContextHistoryProjection.mjs +1 -1
- package/dist/durable/ThreadImport.d.mts +1 -1
- package/dist/durable/ThreadImport.mjs +1 -1
- package/dist/durable/ThreadInvariants.d.mts +3 -3
- package/dist/durable/ThreadInvariants.mjs +5 -5
- package/dist/durable/ThreadInvariants.mjs.map +1 -1
- package/dist/durable/ThreadProjection.mjs +1 -1
- package/dist/durable/ThreadProjectionMaintenance.d.mts +1 -1
- package/dist/durable/ThreadReader.d.mts +1 -1
- package/dist/durable/ThreadReader.mjs +1 -1
- package/dist/durable/ThreadStore.d.mts +1 -1
- package/dist/durable/ThreadStore.mjs +2 -2
- package/dist/durable/ThreadStoreConformance.d.mts +1 -1
- package/dist/durable/ThreadStoreConformance.mjs +4 -4
- package/dist/durable/ThreadTransfer.d.mts +1 -1
- package/dist/durable/ThreadTransfer.mjs +1 -1
- package/dist/durable/ThreadWork.d.mts +2 -2
- package/dist/durable/ThreadWork.mjs +12 -6
- package/dist/durable/ThreadWork.mjs.map +1 -1
- package/dist/durable/ToolReconciler.mjs +1 -1
- package/dist/durable/WakeScheduler.mjs +23 -39
- package/dist/durable/WakeScheduler.mjs.map +1 -1
- package/dist/durable/WorkerAdmission.d.mts +1 -1
- package/dist/durable/WorkerAdmission.mjs +1 -1
- package/dist/durable/WorkerHost.d.mts +2 -2
- package/dist/engine/AgentRuntime.d.mts +1 -1
- package/dist/engine/AgentRuntime.mjs +1 -1
- package/dist/engine/MessagingHost.d.mts +1 -1
- package/dist/engine/MessagingHost.mjs +1 -1
- package/dist/engine/Output.d.mts +1 -1
- package/dist/engine/Output.mjs +1 -1
- package/dist/engine/RunOptions.d.mts +1 -1
- package/dist/engine/SubagentHost.d.mts +1 -1
- package/dist/engine/ThreadHistory.d.mts +1 -1
- package/dist/engine/ThreadHistory.mjs +3 -2
- package/dist/engine/ThreadHistory.mjs.map +1 -1
- package/dist/index.d.mts +21 -21
- package/dist/index.mjs +16 -16
- package/dist/{output-contract-CMIhu4Cw.mjs → output-contract-DCnLYCdp.mjs} +12 -15
- package/dist/{output-contract-CMIhu4Cw.mjs.map → output-contract-DCnLYCdp.mjs.map} +1 -1
- package/dist/{run-context-reader-OcsZr4bk.d.mts → run-context-reader-DVhJZ1Qe.d.mts} +2 -2
- package/package.json +1 -1
- package/src/capabilities/Approval.ts +58 -60
- package/src/capabilities/BrowserUse.ts +89 -944
- package/src/capabilities/Budget.ts +8 -1
- package/src/capabilities/CodeMode.ts +57 -33
- package/src/capabilities/McpClient.ts +2 -2
- package/src/capabilities/Messaging.ts +51 -55
- package/src/capabilities/ModelContext.ts +5 -2
- package/src/capabilities/Redaction.ts +64 -34
- package/src/capabilities/RunHooks.ts +52 -55
- package/src/capabilities/Subagent.ts +33 -33
- package/src/capabilities/SubagentReservations.ts +9 -1
- package/src/capabilities/WebCapture.ts +6 -0
- package/src/capabilities/WebSearch.ts +10 -7
- package/src/capabilities/internal/subagent-background.ts +202 -158
- package/src/core/Agent.ts +11 -6
- package/src/core/AgentUpdates.ts +8 -8
- package/src/core/Thread.ts +142 -146
- package/src/core/Usage.ts +7 -8
- package/src/core/internal/agent-updates.ts +1 -0
- package/src/durable/DurableAgentRuntime.ts +1024 -829
- package/src/durable/EventSource.ts +15 -9
- package/src/durable/RecordFormat.ts +5 -3
- package/src/durable/RunContinuation.ts +316 -113
- package/src/durable/RunJournal.ts +106 -114
- package/src/durable/RunStorage.ts +129 -124
- package/src/durable/Scheduling.ts +639 -651
- package/src/durable/SqlMemoryStore.ts +8 -6
- package/src/durable/SubmissionLedger.ts +11 -0
- package/src/durable/SubscriptionInput.ts +5 -3
- package/src/durable/SubscriptionStoreConformance.ts +23 -23
- package/src/durable/Subscriptions.ts +18 -19
- package/src/durable/ThreadImport.ts +18 -19
- package/src/durable/ThreadInvariants.ts +2 -1
- package/src/durable/ThreadStore.ts +217 -111
- package/src/durable/ThreadWork.ts +11 -2
- package/src/durable/WakeScheduler.ts +34 -66
- package/src/durable/internal/StorageOwner.ts +10 -4
- package/src/durable/internal/agent-registration.ts +96 -89
- package/src/durable/internal/canonical-json.ts +61 -20
- package/src/durable/internal/prompt-history-cache.ts +13 -4
- package/src/durable/internal/record-encoding.ts +120 -64
- package/src/durable/internal/schedule-time.ts +6 -6
- package/src/durable/internal/usage-totals.ts +35 -0
- package/src/durable/internal/worker-host.ts +69 -74
- package/src/engine/MessagingHost.ts +4 -2
- package/src/engine/ThreadHistory.ts +47 -48
- package/src/engine/internal/agent-runtime.ts +1298 -1217
- package/src/engine/internal/output-contract.ts +15 -15
- package/src/engine/internal/primitive-delta.ts +2 -3
- package/src/engine/internal/provisional-text.ts +12 -10
- package/src/engine/internal/tool-exposure.ts +22 -18
- package/src/engine/internal/tool-telemetry.ts +15 -12
- package/dist/Agent-0WvBWWbM.mjs.map +0 -1
- package/dist/AgentRuntime-CQ-qcETl.mjs.map +0 -1
- package/dist/Digest-DCuPlhNk.mjs.map +0 -1
- package/dist/DurableAgentRuntime-BAmSkWYr.mjs.map +0 -1
- package/dist/MessagingHost-CRUK4JBi.mjs.map +0 -1
- package/dist/RunContinuation-DHYNAQFi.mjs.map +0 -1
- package/dist/RunJournal-kfKVxJj7.mjs.map +0 -1
- package/dist/RunStorage-uqPxps09.mjs.map +0 -1
- package/dist/Scheduling-CVyfXlBR.mjs.map +0 -1
- package/dist/Subagent-vpffemql.mjs.map +0 -1
- package/dist/ThreadImport-DckUMEqJ.mjs.map +0 -1
- package/dist/ThreadStore-CEekRa80.mjs.map +0 -1
- package/dist/agent-registration-ByMZ_cK5.mjs.map +0 -1
|
@@ -5,20 +5,20 @@ import { r as Update } from "./AgentUpdates-DksV4D0A.mjs";
|
|
|
5
5
|
import { c as Selection, l as Snapshot } from "./ToolExposure-jTheYXrK.mjs";
|
|
6
6
|
import { l as RunUsageSummary, r as ModelCallUsage } from "./Usage-CzZJ6A2n.mjs";
|
|
7
7
|
import { a as ExhaustedLimit } from "./RunEvent-C5jVQZ6K.mjs";
|
|
8
|
-
import { t as ThreadHistory } from "./ThreadHistory-
|
|
8
|
+
import { t as ThreadHistory } from "./ThreadHistory-KPPBJLJb.mjs";
|
|
9
9
|
import { a as FailureDiagnostic_d_exports, r as Diagnostic } from "./FailureDiagnostic-DvHruCSJ.mjs";
|
|
10
10
|
import { o as AgentInputError } from "./AgentError-CBH7_MjG.mjs";
|
|
11
11
|
import { t as ToolParameterRejection } from "./ToolResult-5SdG8FE2.mjs";
|
|
12
12
|
import { t as AgentPolicy } from "./AgentPolicy-B4lbCU2T.mjs";
|
|
13
|
-
import { E as RunDispositionDeclaration, _ as InstructionSource, c as Definition, m as InputPromptSource, n as Any, r as AnyDefinition, t as Agent_d_exports, y as ModelServices } from "./Agent-
|
|
13
|
+
import { E as RunDispositionDeclaration, _ as InstructionSource, c as Definition, m as InputPromptSource, n as Any, r as AnyDefinition, t as Agent_d_exports, y as ModelServices } from "./Agent-B39jRnFv.mjs";
|
|
14
14
|
import { t as RunPolicyUsage } from "./RunPolicyUsage-QmYVw9z8.mjs";
|
|
15
15
|
import { c as WorkerError, f as WorkerRef, n as AssignmentTerminal } from "./Worker-CHRaIsWu.mjs";
|
|
16
|
-
import { G as RunToolAuthorization, O as RunCostEstimator, h as RunApprovalHook, ot as RunTurnToolResult, x as RunContextPreparation } from "./RunOptions-
|
|
16
|
+
import { G as RunToolAuthorization, O as RunCostEstimator, h as RunApprovalHook, ot as RunTurnToolResult, x as RunContextPreparation } from "./RunOptions-Be77lKVZ.mjs";
|
|
17
17
|
import { o as MessagingError, r as InputMessage } from "./Messaging-DF_IWnxV.mjs";
|
|
18
|
-
import { t as MessagingHost } from "./MessagingHost-
|
|
19
|
-
import "./Messaging-
|
|
20
|
-
import { d as WorkerReportPreparationFailure, f as WorkerReporting, o as SubagentHost } from "./SubagentHost-
|
|
21
|
-
import { p as RuntimeBinding, r as AgentCompletionProjectionRequirements, s as AgentRuntimeRequirements } from "./AgentRuntime-
|
|
18
|
+
import { t as MessagingHost } from "./MessagingHost-C6SOAcoG.mjs";
|
|
19
|
+
import "./Messaging-SVu6rWV8.mjs";
|
|
20
|
+
import { d as WorkerReportPreparationFailure, f as WorkerReporting, o as SubagentHost } from "./SubagentHost-D1xBgn9g.mjs";
|
|
21
|
+
import { p as RuntimeBinding, r as AgentCompletionProjectionRequirements, s as AgentRuntimeRequirements } from "./AgentRuntime-CHDyRbSf.mjs";
|
|
22
22
|
import { $ as RecordEnvelope, Ct as ToolApprovalDecided, Dt as ToolCallSettled, H as ModelResponseRecorded, It as WorkerInputCompleted, K as PersistedJson, Mt as UserInputRecorded, Pt as WorkerAdmission, Rt as WorkerInputRequested, W as PROMPT_EVIDENCE_TAGS, Wt as WorkerStopRequested, Y as PromptRecordEnvelope, _t as SubagentRequested, a as BatchId, b as DefinitionDigests, bt as SubmissionSettledRecord, d as CanonicalRecordEnvelope, et as RecordId, ft as RunStartedRecord, ht as SubagentJoined, i as ApprovalDecision, l as CanonicalBatch, m as CompactionCreated, p as CanonicalSequence, pt as SettlementFailureDiagnostic, q as ProducerId, r as AgentUpdateEmitted, st as RunContinuation, t as AbortRequested, tt as RecordJson, v as DeclaredToolCall, vt as SubagentStarted, wt as ToolApprovalRequested, x as DeploymentId, y as DefinitionDigestInput, yt as SubmissionSettled } from "./Records-BTnGRdcf.mjs";
|
|
23
23
|
import { t as DigestError } from "./Digest-DjUgS5PG.mjs";
|
|
24
24
|
import { n as DurableRuntimeFailpoint, r as DurableRuntimeFailpointError } from "./DurableFailpoint-BugHZKvJ.mjs";
|
|
@@ -146,7 +146,7 @@ type EntryWorkerRequirements<Entry> = Entry extends {
|
|
|
146
146
|
}> : never;
|
|
147
147
|
type AttemptLayerRequirements<Requirements, AttemptLayer> = AttemptLayer extends ((context: AgentAttemptContext) => Layer.Layer<infer Provides, never, infer Requires>) ? Exclude<Requirements, Provides> | Requires : Requirements;
|
|
148
148
|
type EntryRequirements<Entry> = Entry extends unknown ? AttemptLayerRequirements<EntryWorkerRequirements<Entry>, "attemptLayer" extends keyof Entry ? Entry["attemptLayer"] : undefined> : never;
|
|
149
|
-
type RegistrationRequirements<Entries extends ReadonlyArray<AgentRegistration>> =
|
|
149
|
+
type RegistrationRequirements<Entries extends ReadonlyArray<AgentRegistration>> = EntryRequirements<Entries[number]>;
|
|
150
150
|
/** Compile heterogeneous Agent descriptors into exact, dependency-closed worker registrations. */
|
|
151
151
|
declare const compileRegistrations: <const Entries extends ReadonlyArray<AgentRegistration>>(entries: Entries) => Effect.Effect<ReadonlyArray<ResolvedBinding>, DigestError, Crypto.Crypto | RegistrationRequirements<Entries>>;
|
|
152
152
|
declare namespace AgentRegistration_d_exports {
|
|
@@ -178,7 +178,7 @@ interface JournalMetadata {
|
|
|
178
178
|
}>;
|
|
179
179
|
}
|
|
180
180
|
declare namespace RunJournal_d_exports {
|
|
181
|
-
export { JournalBoundary, RunJournalContext, RunJournalError, RunJournalProjection, RunJournalUsage, TurnCommitInput, agentUpdateRecordId, approvalDecisionBatchId, childIdempotencyKeyFor, childThreadIdFor, compactionBatchId, compactionRecordId, firstWorkerInputRecordId, markUnknownBatchId, modelResponseInterruptedBatchId, modelResponseInterruptedRecordId, modelResponseRecordId, peerMessageRecordId, projectRunJournal, projectRunJournalStream, promptFromCanonicalRecords, runCompletedRecordId, runDurationBatchId, runDurationRecordId, runIdForSubmission, runStartedBatchId, runStartedRecordId, subagentJoinBatchId, subagentJoinedRecordId, subagentLineageBatchId, subagentLineageRecordId, subagentRequestedBatchId, subagentRequestedRecordId, subagentStartedBatchId, subagentStartedRecordId, toolApprovalDecisionRecordId, toolApprovalRequestRecordId, toolCallResolutionBatchId, toolCallResolvedRecordId, toolCallResultBatchId, toolCallSettledRecordId, toolCallUnknownRecordId, toolStepSettledBatchId, toolStepSettledRecordId, turnApprovalsBatchId, turnBatchId, turnCanonicalBatch, turnIdForRun, turnResponseBatch, turnResponseBatchId, turnResultsBatch, turnResultsBatchId, workerInputRecordId, workerOriginRecordId, workerReportRecordId };
|
|
181
|
+
export { JournalBoundary, RunJournalContext, RunJournalError, RunJournalProjection, RunJournalUsage, TurnCommitInput, agentUpdateRecordId, approvalDecisionBatchId, childIdempotencyKeyFor, childThreadIdFor, compactionBatchId, compactionRecordId, firstWorkerInputRecordId, initialRunJournal, markUnknownBatchId, modelResponseInterruptedBatchId, modelResponseInterruptedRecordId, modelResponseRecordId, peerMessageRecordId, projectRunJournal, projectRunJournalStream, promptFromCanonicalRecords, runCompletedRecordId, runDurationBatchId, runDurationRecordId, runIdForSubmission, runStartedBatchId, runStartedRecordId, subagentJoinBatchId, subagentJoinedRecordId, subagentLineageBatchId, subagentLineageRecordId, subagentRequestedBatchId, subagentRequestedRecordId, subagentStartedBatchId, subagentStartedRecordId, toolApprovalDecisionRecordId, toolApprovalRequestRecordId, toolCallResolutionBatchId, toolCallResolvedRecordId, toolCallResultBatchId, toolCallSettledRecordId, toolCallUnknownRecordId, toolStepSettledBatchId, toolStepSettledRecordId, turnApprovalsBatchId, turnBatchId, turnCanonicalBatch, turnIdForRun, turnResponseBatch, turnResponseBatchId, turnResultsBatch, turnResultsBatchId, workerInputRecordId, workerOriginRecordId, workerReportRecordId };
|
|
182
182
|
}
|
|
183
183
|
declare const RunJournalError_base: Schema.Class<RunJournalError, Schema.TaggedStruct<"RunJournalError", {
|
|
184
184
|
readonly message: Schema.String;
|
|
@@ -241,7 +241,7 @@ declare const workerOriginRecordId: (threadId: ThreadId) => RecordId;
|
|
|
241
241
|
declare const workerReportRecordId: (messageId: IdempotencyKey) => RecordId;
|
|
242
242
|
declare const peerMessageRecordId: (messageId: IdempotencyKey) => RecordId;
|
|
243
243
|
/** Same immutable tuple used by native update admission; callers never parse its hash. */
|
|
244
|
-
declare const agentUpdateRecordId: (threadId: string & Brand.Brand<"@effect-agent/core/ThreadId">, runId: string & Brand.Brand<"@effect-agent/core/RunId">, updateId: string & Brand.Brand<"@effect-agent/thread/IdempotencyKey">) => Effect.Effect<string & Brand.Brand<"@effect-agent/thread/RecordId">, DigestError, Crypto.Crypto>;
|
|
244
|
+
declare const agentUpdateRecordId: (threadId: string & Brand.Brand<"@effect-agent/core/ThreadId">, runId: string & Brand.Brand<"@effect-agent/core/RunId">, updateId: string & Brand.Brand<"@effect-agent/thread/IdempotencyKey">) => Effect.Effect<string & Brand.Brand<"@effect-agent/thread/RecordId">, DigestError, import("effect/Crypto").Crypto>;
|
|
245
245
|
/** Deterministic batch identity of one Turn's `ToolCallUnknown` marking append. */
|
|
246
246
|
declare const markUnknownBatchId: (submissionId: SubmissionId, turn: number) => BatchId;
|
|
247
247
|
/** Deterministic canonical record identity of one Tool Call's `ToolCallUnknown` record. */
|
|
@@ -373,6 +373,9 @@ interface RunJournalProjection {
|
|
|
373
373
|
/** Last successful singleton Tool awaiting possible context-control interpretation by the engine. */
|
|
374
374
|
readonly pendingContextToolCallId?: string | undefined;
|
|
375
375
|
}
|
|
376
|
+
/** Internal first-Run projection after exact input/checkpoint-absence verification. The
|
|
377
|
+
* new UserInputRecorded contributes no model message; the engine evaluates it later. */
|
|
378
|
+
declare const initialRunJournal: (history: Prompt.Prompt) => RunJournalProjection;
|
|
376
379
|
/**
|
|
377
380
|
* Pure projection: rebuild one Run's resume state from canonical records (DUR-015). Canonical
|
|
378
381
|
* order is authoritative; the fold projects each `ModelResponseRecorded` Turn and the
|
|
@@ -431,6 +434,7 @@ declare const projectRunJournal: (records: ReadonlyArray<CanonicalRecordEnvelope
|
|
|
431
434
|
* Prompt (plan §Coordinator flow step 3).
|
|
432
435
|
*/
|
|
433
436
|
declare const promptFromCanonicalRecords: (records: ReadonlyArray<CanonicalRecordEnvelope>) => Effect.Effect<Prompt.Prompt, RunJournalError>;
|
|
437
|
+
/** Everything one committed Turn contributes to its canonical batch. */
|
|
434
438
|
interface TurnCommitInput {
|
|
435
439
|
readonly toolResultMaxBytes?: number | undefined;
|
|
436
440
|
readonly toolSelectionMaxBytes?: number | undefined;
|
|
@@ -479,7 +483,7 @@ interface TurnCommitInput {
|
|
|
479
483
|
* joins the response in the same atomic batch. Other application Turns split into
|
|
480
484
|
* `turnResponseBatch` + `turnResultsBatch` before execution.
|
|
481
485
|
*/
|
|
482
|
-
declare const turnCanonicalBatch: (input: TurnCommitInput) => Effect.Effect<CanonicalBatch,
|
|
486
|
+
declare const turnCanonicalBatch: (input: TurnCommitInput) => Effect.Effect<CanonicalBatch, RunJournalError, never>;
|
|
483
487
|
/**
|
|
484
488
|
* Commit the normalized response and original operation contracts before application Tools
|
|
485
489
|
* execute, or promote a deferred readonly response before a persisted call-scoped capability.
|
|
@@ -487,14 +491,14 @@ declare const turnCanonicalBatch: (input: TurnCommitInput) => Effect.Effect<Cano
|
|
|
487
491
|
* loss; approvals and the dispatch fence remain separate execution requirements. Provider
|
|
488
492
|
* results stay in assistant content. Application outcomes belong to the results commit.
|
|
489
493
|
*/
|
|
490
|
-
declare const turnResponseBatch: (input: TurnCommitInput) => Effect.Effect<CanonicalBatch,
|
|
494
|
+
declare const turnResponseBatch: (input: TurnCommitInput) => Effect.Effect<CanonicalBatch, RunJournalError, never>;
|
|
491
495
|
/**
|
|
492
496
|
* Commit 5 of a tool-declaring Turn (plan §2.1): the Turn's `ToolCallSettled` records in
|
|
493
497
|
* declaration order under batch identity `turn-results:{runId}:{turn}` — the batch becomes
|
|
494
498
|
* model-visible atomically. A completion after already committed Tool results gets its own
|
|
495
499
|
* terminal batch; it never rewrites or repeats the earlier Tool outcomes.
|
|
496
500
|
*/
|
|
497
|
-
declare const turnResultsBatch: (input: TurnCommitInput) => Effect.Effect<CanonicalBatch,
|
|
501
|
+
declare const turnResultsBatch: (input: TurnCommitInput) => Effect.Effect<CanonicalBatch, RunJournalError, never>;
|
|
498
502
|
//#endregion
|
|
499
503
|
//#region src/durable/internal/StorageOwner.d.ts
|
|
500
504
|
type MutationGate = <A, E, R>(effect: Effect.Effect<A, E, R>) => Effect.Effect<A, E, R>;
|
|
@@ -1615,7 +1619,7 @@ interface ThreadArchiveStorage {
|
|
|
1615
1619
|
readonly verify: (request: ThreadArchiveRangeRequest) => Effect.Effect<ThreadArchiveRange, ReadFailure>;
|
|
1616
1620
|
}
|
|
1617
1621
|
declare namespace ThreadWork_d_exports {
|
|
1618
|
-
export { CanonicalWorkEntry, MAX_RECOVERY_PAGES, MAX_RECOVERY_WORK_ITEMS, MAX_WORK_CURSOR_CHARS, MAX_WORK_ENTRY_BYTES, MAX_WORK_PAGE_BYTES, MAX_WORK_PAGE_ENTRIES, MAX_WORK_REBUILD_BYTES, MAX_WORK_REBUILD_RECORDS, ThreadWorkCursor, ThreadWorkDiscovery, ThreadWorkEntry, ThreadWorkPage, ThreadWorkRequest, ThreadWorkStorage, WORK_INDEX_VERSION, WorkDiscoveryUnavailable, WorkIndexChange, WorkIndexProgress, WorkIndexRebuildRequest, WorkOwner, WorkStateReference, WorkThreadsPage, WorkThreadsRequest, WorkerReportingMode, admissionWork, advanceWorkEntry, decodeWorkCursor, deliveryPredecessor, encodeWorkCursor, operationEvidence, resolveWorkEvidence, validateWorkPage, workId, workIndexChanges };
|
|
1622
|
+
export { CanonicalWorkEntry, FreshAdmissionWork, MAX_RECOVERY_PAGES, MAX_RECOVERY_WORK_ITEMS, MAX_WORK_CURSOR_CHARS, MAX_WORK_ENTRY_BYTES, MAX_WORK_PAGE_BYTES, MAX_WORK_PAGE_ENTRIES, MAX_WORK_REBUILD_BYTES, MAX_WORK_REBUILD_RECORDS, ThreadWorkCursor, ThreadWorkDiscovery, ThreadWorkEntry, ThreadWorkPage, ThreadWorkRequest, ThreadWorkStorage, WORK_INDEX_VERSION, WorkDiscoveryUnavailable, WorkIndexChange, WorkIndexProgress, WorkIndexRebuildRequest, WorkOwner, WorkStateReference, WorkThreadsPage, WorkThreadsRequest, WorkerReportingMode, admissionWork, advanceWorkEntry, decodeWorkCursor, deliveryPredecessor, encodeWorkCursor, operationEvidence, resolveWorkEvidence, validateWorkPage, workId, workIndexChanges };
|
|
1619
1623
|
}
|
|
1620
1624
|
declare const WORK_INDEX_VERSION = 3;
|
|
1621
1625
|
declare const MAX_WORK_PAGE_ENTRIES = 128;
|
|
@@ -1862,6 +1866,12 @@ declare const ThreadWorkCursor: Schema.Struct<{
|
|
|
1862
1866
|
readonly after: Schema.optionalKey<Schema.NonEmptyString>;
|
|
1863
1867
|
}>;
|
|
1864
1868
|
type ThreadWorkCursor = typeof ThreadWorkCursor.Type;
|
|
1869
|
+
/** Local snapshot request; it grants no claim or dispatch authority. */
|
|
1870
|
+
declare const FreshAdmissionWork: Schema.Struct<{
|
|
1871
|
+
readonly threadId: Schema.brand<Schema.NonEmptyString, "@effect-agent/core/ThreadId">;
|
|
1872
|
+
readonly submissionId: Schema.brand<Schema.NonEmptyString, "@effect-agent/core/SubmissionId">;
|
|
1873
|
+
}>;
|
|
1874
|
+
type FreshAdmissionWork = typeof FreshAdmissionWork.Type;
|
|
1865
1875
|
declare const WorkThreadsRequest: Schema.Struct<{
|
|
1866
1876
|
readonly afterThreadId: Schema.optionalKey<Schema.brand<Schema.NonEmptyString, "@effect-agent/core/ThreadId">>;
|
|
1867
1877
|
readonly limit: Schema.Int;
|
|
@@ -1897,6 +1907,9 @@ declare const WorkDiscoveryUnavailable_base: Schema.Class<WorkDiscoveryUnavailab
|
|
|
1897
1907
|
declare class WorkDiscoveryUnavailable extends WorkDiscoveryUnavailable_base {}
|
|
1898
1908
|
/** Native owner pages and canonical-index maintenance, implemented at the storage owner. */
|
|
1899
1909
|
interface ThreadWorkStorage {
|
|
1910
|
+
/** Native proof that this untouched root admission has no other recovery obligations.
|
|
1911
|
+
* A caller must still claim and validate current controls before dispatch. */
|
|
1912
|
+
readonly isOnlyFreshAdmission?: (request: FreshAdmissionWork) => Effect.Effect<boolean, ThreadStoreError>;
|
|
1900
1913
|
readonly threads: (request: WorkThreadsRequest) => Effect.Effect<WorkThreadsPage, ThreadStoreError>;
|
|
1901
1914
|
readonly page: (request: ThreadWorkRequest) => Effect.Effect<ThreadWorkPage, WorkDiscoveryUnavailable | ThreadStoreError>;
|
|
1902
1915
|
/** One bounded pass. Append transactions and the completion check serialize with this pass. */
|
|
@@ -1923,7 +1936,7 @@ declare const decodeWorkCursor: (request: {
|
|
|
1923
1936
|
readonly threadDigest: string & import("effect/Brand").Brand<"@effect-agent/thread/Digest">;
|
|
1924
1937
|
readonly source: "admissions" | "canonical" | "deliveries";
|
|
1925
1938
|
readonly after?: string | undefined;
|
|
1926
|
-
}, ThreadStoreError, Crypto.Crypto>;
|
|
1939
|
+
}, ThreadStoreError, import("effect/Crypto").Crypto>;
|
|
1927
1940
|
declare const encodeWorkCursor: (input: {
|
|
1928
1941
|
readonly version: 3;
|
|
1929
1942
|
readonly threadDigest: string & import("effect/Brand").Brand<"@effect-agent/thread/Digest">;
|
|
@@ -2123,7 +2136,7 @@ type WorkIndexChange = {
|
|
|
2123
2136
|
* these changes with the source batch. Rebuild folds the same rules in sequence order; it may
|
|
2124
2137
|
* suppress a delivery handoff only after its authoritative delivery row exists.
|
|
2125
2138
|
*/
|
|
2126
|
-
declare const workIndexChanges: (envelope: CanonicalRecordEnvelope, reporting: WorkerReportingMode) => Effect.Effect<readonly WorkIndexChange[], ThreadStoreError,
|
|
2139
|
+
declare const workIndexChanges: (envelope: CanonicalRecordEnvelope, reporting: WorkerReportingMode) => Effect.Effect<readonly WorkIndexChange[], ThreadStoreError, never>;
|
|
2127
2140
|
/** Backfill is chronological. A state's creation identity never changes on later updates. */
|
|
2128
2141
|
declare const advanceWorkEntry: (previous: CanonicalWorkEntry | undefined, next: CanonicalWorkEntry) => CanonicalWorkEntry;
|
|
2129
2142
|
declare namespace ThreadStore_d_exports {
|
|
@@ -2301,6 +2314,8 @@ interface PreparedAppend extends AppendRequest {
|
|
|
2301
2314
|
readonly json: string;
|
|
2302
2315
|
/** Checkpoint wire from the same detached, validated execution capture. */
|
|
2303
2316
|
readonly checkpointJson: string;
|
|
2317
|
+
/** Schema-encoded fact array from this same capture, for the stable retry digest. */
|
|
2318
|
+
readonly factsJson: string;
|
|
2304
2319
|
readonly bytes: number;
|
|
2305
2320
|
}>;
|
|
2306
2321
|
readonly records: ReadonlyArray<{
|
|
@@ -2311,8 +2326,13 @@ interface PreparedAppend extends AppendRequest {
|
|
|
2311
2326
|
readonly canonical: CanonicalBatch["records"][number];
|
|
2312
2327
|
}>;
|
|
2313
2328
|
}
|
|
2329
|
+
interface CapturedAppend extends PreparedAppend {
|
|
2330
|
+
readonly records: ReadonlyArray<Omit<PreparedAppend["records"][number], "wire"> & {
|
|
2331
|
+
readonly wire: typeof RecordEnvelope.Encoded;
|
|
2332
|
+
}>;
|
|
2333
|
+
}
|
|
2314
2334
|
declare const PreparedAppend: {
|
|
2315
|
-
capture: (input: AppendRequest) => Effect.Effect<
|
|
2335
|
+
capture: (input: AppendRequest) => Effect.Effect<CapturedAppend, ThreadStoreError>;
|
|
2316
2336
|
};
|
|
2317
2337
|
declare const AppendResult_base: Schema.Class<AppendResult, Schema.Struct<{
|
|
2318
2338
|
readonly firstSequence: Schema.brand<Schema.Natural, "@effect-agent/thread/CanonicalSequence">;
|
|
@@ -3381,6 +3401,9 @@ interface RunWriter {
|
|
|
3381
3401
|
}
|
|
3382
3402
|
interface RunStorageSession extends RunWriter, RunOwnership {
|
|
3383
3403
|
readonly claim: Claim;
|
|
3404
|
+
/** Library-only initialization, before application/model IO. Hold progress before mutation
|
|
3405
|
+
* so the captured controls and this owner's acknowledged input remain one read view. */
|
|
3406
|
+
readonly withInitialization?: <A, E, R>(effect: Effect.Effect<A, E, R>) => Effect.Effect<A, E | OwnershipLost, R>;
|
|
3384
3407
|
readonly refresh: Effect.Effect<void, ThreadStoreFailure>;
|
|
3385
3408
|
readonly publishSettlement: (batch: CanonicalBatch, executions?: ReadonlyArray<ExecutionUpdate>) => Effect.Effect<SettlementPublicationResult, SettlementPublicationFailure>;
|
|
3386
3409
|
}
|
|
@@ -3575,6 +3598,11 @@ declare class RecoverySweepResult extends RecoverySweepResult_base {}
|
|
|
3575
3598
|
/** Recover one bounded page of native work, optionally confined to one Thread. */
|
|
3576
3599
|
interface RecoverySweepOptions {
|
|
3577
3600
|
readonly threadId?: ThreadId;
|
|
3601
|
+
/** Leave this incarnation's untouched root admissions to their first actual claim.
|
|
3602
|
+
* A verified sole admission needs no recovery inventory; other owners retain bounded
|
|
3603
|
+
* discovery and deferred reports. Neither case supplies ownership or a recovery decision:
|
|
3604
|
+
* the Attempt still verifies current controls, journal, fencing and historyDigest. */
|
|
3605
|
+
readonly deferUnclaimedAdmissions?: boolean;
|
|
3578
3606
|
/** Continue the previous pass with the same Thread selection until its result has no cursor. */
|
|
3579
3607
|
readonly cursor?: string;
|
|
3580
3608
|
}
|
|
@@ -3876,7 +3904,7 @@ declare class DurableAgentRuntime extends DurableAgentRuntime_base {
|
|
|
3876
3904
|
* Every claimed head must select exactly one current registered Definition. Worker calls
|
|
3877
3905
|
* cannot replace these registrations or their captured services. Tool authorization is required.
|
|
3878
3906
|
*/
|
|
3879
|
-
static layerRegistered<const Entries extends ReadonlyArray<AgentRegistration>>(registrations: Entries): Layer.Layer<DurableAgentRuntime, DigestError, Crypto.Crypto | DurableRuntimeConfig | DurableRuntimeFailpoint | RunStorage | RunToolAuthorization | StorageOwner | SubmissionLedger | ThreadStore | ToolReconciler | WakeScheduler | Exclude<
|
|
3907
|
+
static layerRegistered<const Entries extends ReadonlyArray<AgentRegistration>>(registrations: Entries): Layer.Layer<DurableAgentRuntime, DigestError, Crypto.Crypto | DurableRuntimeConfig | DurableRuntimeFailpoint | RunStorage | RunToolAuthorization | StorageOwner | SubmissionLedger | ThreadStore | ToolReconciler | WakeScheduler | Exclude<Entries[number] extends (infer T) ? T extends Entries[number] ? T extends unknown ? ("attemptLayer" extends keyof T ? T[keyof T & "attemptLayer"] : undefined) extends (infer T_1) ? T_1 extends ("attemptLayer" extends keyof T ? T[keyof T & "attemptLayer"] : undefined) ? T_1 extends ((context: AgentAttemptContext) => Layer.Layer<infer Provides, never, infer Requires>) ? Requires | Exclude<T extends {
|
|
3880
3908
|
readonly agent: infer A extends ExecutableAgentBinding;
|
|
3881
3909
|
} ? DurableWorkerRequirements<A> : T extends {
|
|
3882
3910
|
readonly agent: infer D extends Definition<Schema.Top, Schema.Top, unknown, import("effect/ai/Toolkit").Any, RunDispositionDeclaration<never, Schema.Top> | undefined, unknown, Schema.Top | undefined> & {
|
|
@@ -4196,6 +4224,10 @@ declare const SubmissionSnapshot_base: Schema.Class<SubmissionSnapshot, Schema.S
|
|
|
4196
4224
|
readonly inputPayload: Schema.declare<Schema.Json, Schema.Json>;
|
|
4197
4225
|
readonly inputDigest: Schema.brand<Schema.String, "@effect-agent/thread/Digest">;
|
|
4198
4226
|
readonly settledOutcome: Schema.optionalKey<Schema.Literals<readonly ["completed", "failed", "aborted"]>>;
|
|
4227
|
+
/** First committed finalization time; paired with settledRecordId by native adapters. */
|
|
4228
|
+
readonly settledAt: Schema.optionalKey<Schema.DateTimeUtcFromString>;
|
|
4229
|
+
/** Exact canonical settlement behind the finalized projection; not a substitute for reading it. */
|
|
4230
|
+
readonly settledRecordId: Schema.optionalKey<Schema.brand<Schema.NonEmptyString, "@effect-agent/thread/RecordId">>;
|
|
4199
4231
|
readonly createdAt: Schema.DateTimeUtcFromString;
|
|
4200
4232
|
readonly readyAt: Schema.optionalKey<Schema.DateTimeUtcFromString>;
|
|
4201
4233
|
readonly admissionGroup: Schema.optionalKey<Schema.NonEmptyString>;
|
|
@@ -4983,7 +5015,9 @@ declare class LedgerError extends LedgerError_base {}
|
|
|
4983
5015
|
type SubmissionLedgerFailure = AdmissionConflict | OwnershipLost | SettlementConflict | ApprovalConflict | UnknownResolutionConflict | JoinedToHost | ChildReservationConflict | LedgerError | AdmissionPolicyError;
|
|
4984
5016
|
declare const SubmissionLedger_base: Context.ServiceClass<SubmissionLedger, "@effect-agent/thread/SubmissionLedger", {
|
|
4985
5017
|
readonly capabilities: Effect.Effect<LedgerCapabilities>;
|
|
4986
|
-
readonly admit: (request: AdmissionRequest
|
|
5018
|
+
readonly admit: (request: AdmissionRequest, options?: {
|
|
5019
|
+
readonly readyIfInitialized?: boolean;
|
|
5020
|
+
}) => Effect.Effect<AdmissionResult, AdmissionConflict | AdmissionPolicyError | LedgerError>;
|
|
4987
5021
|
readonly markReady: (request: MarkReadyRequest) => Effect.Effect<void, LedgerError>;
|
|
4988
5022
|
readonly lookup: (request: SubmissionLookup) => Effect.Effect<Option.Option<SubmissionSnapshot>, LedgerError>;
|
|
4989
5023
|
/** Absent adapters fail closed when funding a worker from an explicitly selected input. */
|
|
@@ -5014,6 +5048,8 @@ declare const SubmissionLedger_base: Context.ServiceClass<SubmissionLedger, "@ef
|
|
|
5014
5048
|
readonly beginChildBudgetRelease: (request: BeginChildBudgetReleaseRequest) => Effect.Effect<ChildBudgetReservationSnapshot, ChildReservationConflict | LedgerError>;
|
|
5015
5049
|
readonly releaseChildBudget: (request: ReleaseChildBudgetRequest) => Effect.Effect<ChildBudgetReservationSnapshot, ChildReservationConflict | LedgerError>;
|
|
5016
5050
|
readonly scanNonterminal: Stream.Stream<SubmissionWorkItem, LedgerError>;
|
|
5051
|
+
/** Optional native snapshot for hosts that need the complete control worklist. */
|
|
5052
|
+
readonly listNonterminal?: Effect.Effect<ReadonlyArray<SubmissionWorkItem>, LedgerError>;
|
|
5017
5053
|
readonly loadRecoverySnapshot: (request: RecoverySnapshotRequest) => Effect.Effect<RecoverySnapshot, LedgerError>;
|
|
5018
5054
|
}>;
|
|
5019
5055
|
/**
|
|
@@ -5031,6 +5067,10 @@ declare const SubmissionLedger_base: Context.ServiceClass<SubmissionLedger, "@ef
|
|
|
5031
5067
|
* An optional `parentLinkage` is recorded immutably at first admission (SUB-016); a replay
|
|
5032
5068
|
* whose linkage diverges (present vs. absent, or different identities) fails with
|
|
5033
5069
|
* `AdmissionConflict` even when the input digest matches.
|
|
5070
|
+
* With `readyIfInitialized`, an adapter may insert a fresh ordinary Submission as ready
|
|
5071
|
+
* when it proves Thread initialization under the admission's owner transaction. Readiness,
|
|
5072
|
+
* its lifecycle fact and source progress commit with the receipt. Otherwise it returns
|
|
5073
|
+
* admitted and the caller completes materialization and `markReady` as usual.
|
|
5034
5074
|
* - `resolveAdmission` — authoritative tri-state admission lookup by scoped idempotency key
|
|
5035
5075
|
* (SUB-031): `NotAdmitted` proves absence, `Admitted` carries the full snapshot, and
|
|
5036
5076
|
* `Indeterminate` states that the adapter cannot currently prove either. Only `NotAdmitted`
|
|
@@ -5770,5 +5810,5 @@ declare const RetryRefused_base: Schema.Class<RetryRefused, Schema.TaggedStruct<
|
|
|
5770
5810
|
*/
|
|
5771
5811
|
declare class RetryRefused extends RetryRefused_base {}
|
|
5772
5812
|
//#endregion
|
|
5773
|
-
export { ResumeFromTurnBoundary as $, ThreadArchiveRangeRequest as $a, ThreadWorkerCapacityRequest as $i, DurableAwaitFailure as $n, subagentRequestedBatchId as $o, ExecutionCheckpoint as $r, RecoverySnapshotRequest as $t, AwaitHostSettlement as A, WorkOwner as Aa, ThreadIdentityRequest as Ai, WaitingChild as An, childIdempotencyKeyFor as Ao, SubmissionStatus_d_exports as Ar, DurableBindingFailure as As, ChildReservationConflict as At, NoAction as B, operationEvidence as Ba, ThreadResolutionFact as Bi, submissionSettlementBatchId as Bn, projectRunJournal as Bo, SettlementPublication as Br, FundingOwnerRequest as Bt, renderRecoveryExplanation as C, ThreadWorkStorage as Ca, ThreadExportCursor as Ci, SuspensionReason as Cn, RunJournalError as Co, recoveryRepairBatchId as Cr, toolCallSettledRecordId as Cs, ApprovalDecisionIntent as Ct, AwaitApprovalDecision as D, WorkIndexChange as Da, ThreadExportSnapshot as Di, UnknownResolutionConflict as Dn, TurnCommitInput as Do, PendingSubmission as Dr, BindingSelection as Ds, ChildAttachmentSnapshot as Dt, ApplyUnknownResolutions as E, WorkDiscoveryUnavailable as Ea, ThreadExportRequest as Ei, UnknownResolutionCommand as En, RunJournal_d_exports as Eo, threadCreatedRecordId as Er, AgentRegistration as Es, BeginChildBudgetReleaseRequest as Et, DeclaredPendingBatchEvidence as F, admissionWork as Fa, ThreadPromptRead as Fi, settlementFailureFromRecord as Fn, markUnknownBatchId as Fo, RunStorageSession as Fr, compileBindingContracts as Fs, Claim as Ft, RecoveryDecision as G, MAX_ARCHIVE_RANGE_BYTES as Ga, ThreadStoreError as Gi, workerTerminalFromRecord as Gn, runDurationRecordId as Go, validateCanonicalSettlement as Gr, LedgerError as Gt, OpenToolCallEvidence as H, validateWorkPage as Ha, ThreadSelection as Hi, submissionSettlementRecordId as Hn, promptFromCanonicalRecords as Ho, SettlementPublicationFailure as Hr, JoinSnapshot as Ht, DelegationAdmissionEvidence as I, advanceWorkEntry as Ia, ThreadRead as Ii, submissionAbortBatchId as In, modelResponseInterruptedBatchId as Io, RunWriter as Ir, compileRegistrations as Is, ClaimHandoff as It, ReleaseOrphanChildReservation as J, MAX_CANONICAL_BATCH_BYTES as Ja, ThreadTail as Ji, DurableAgentRuntime as Jn, runStartedRecordId as Jo, AppendConflict as Jr, MarkReadyRequest as Jt, RecoveryEvidence as K, MAX_ARCHIVE_RANGE_PAGE as Ka, ThreadStoreFailure as Ki, ApprovalSuspensionError as Kn, runIdForSubmission as Ko, validateJoinedSettlement as Kr, MarkInputAppliedRequest as Kt, EnsureWaitingForChild as L, decodeWorkCursor as La, ThreadReadRequest as Li, submissionAbortRecordId as Ln, modelResponseInterruptedRecordId as Lo, layer as Lr, definitionDigestsEqual as Ls, ClaimJoiningRequest as Lt, AwaitUnknownResolution as M, WorkThreadsPage as Ma, ThreadNotMaterialized as Mi, WorkerLedgerState as Mn, compactionBatchId as Mo, RunChildBudgetReservation as Mr, ExecutableAgentBinding as Ms, ChildReservationStatus as Mt, CompleteChildAdmission as N, WorkThreadsRequest as Na, ThreadObservation as Ni, WorkerStopCommand as Nn, compactionRecordId as No, RunOwnership as Nr, ReplayVersions as Ns, ChildSettledNotification as Nt, AwaitChildAdmissionResolution as O, WorkIndexProgress as Oa, ThreadExportSource as Oi, UnknownResolutionIntent as On, agentUpdateRecordId as Oo, SettledSubmission as Or, BindingUnavailable as Os, ChildBudgetReservationRequest as Ot, CompleteMaterialization as P, WorkerReportingMode as Pa, ThreadPeerCountRequest as Pi, approvalDecisionsCover as Pn, firstWorkerInputRecordId as Po, RunStorage as Pr, ResolvedBinding as Ps, ChildSettledOutcome as Pt, RepairSubagentStartLink as Q, ThreadArchiveRangeRead as Qa, ThreadWorkerCapacity as Qi, DurableApprovalSuspension as Qn, subagentLineageRecordId as Qo, CommitBatch as Qr, RecoverySnapshot as Qt, FinalizeLedgerFromHistory as R, deliveryPredecessor as Ra, ThreadReader as Ri, submissionInputBatchId as Rn, modelResponseRecordId as Ro, make as Rr, ClaimRequest as Rt, recoveryDecisionMeaning as S, ThreadWorkRequest as Sa, ThreadExportBatch as Si, SuspensionOutcome as Sn, RunJournalContext as So, isolateRecovery as Sr, JournalRecordEnvelope as Ss, ApprovalDecisionCommand as St, ApplyJoinAccounting as T, WORK_INDEX_VERSION as Ta, ThreadExportRejected as Ti, UnknownResolution as Tn, RunJournalUsage as To, threadCreatedBatchId as Tr, AgentAttemptContext as Ts, AttachChildToReservationRequest as Tt, PendingApprovalEvidence as U, workId as Ua, ThreadStore as Ui, unknownResolutionKind as Un, runCompletedRecordId as Uo, SettlementPublicationResult as Ur, JoiningClaim as Ut, OpenDelegationCallEvidence as V, resolveWorkEvidence as Va, ThreadRunInputRequest as Vi, submissionSettlementId as Vn, projectRunJournalStream as Vo, SettlementPublicationAuthority as Vr, InputAppliedMarker as Vt, PropagateChildAbort as W, workIndexChanges as Wa, ThreadStoreDiagnostic as Wi, unknownResolutionMatchesResult as Wn, runDurationBatchId as Wo, SettlementPublisher as Wr, LedgerCapabilities as Wt, RepairJoinMarker as X, ThreadArchiveRangePage as Xa, ThreadVerificationRequest as Xi, DurableApprovalFailure as Xn, subagentJoinedRecordId as Xo, AppendResult as Xr, OwnershipLost as Xt, RepairInputMarker as Y, ThreadArchiveRange as Ya, ThreadTailRequest as Yi, DurableAgentRuntime_d_exports as Yn, subagentJoinBatchId as Yo, AppendRequest as Yr, MarkUnknownRequest as Yt, RepairReadiness as Z, ThreadArchiveRangePublish as Za, ThreadVerificationStorage as Zi, DurableApprovalResolver as Zn, subagentLineageBatchId as Zo, CheckpointRejected as Zr, ParentLinkage as Zt, RetryCommand as _, MAX_WORK_REBUILD_RECORDS as _a, ThreadApprovalFact as _i, SubmissionScheduling as _n, OwnerGeneration as _o, RecoverySweepOptions as _r, turnResultsBatch as _s, AdmissionPolicyError as _t, IntegrityCheck as a, makeTransferFactCheck as aa, MAX_THREAD_EXPORT_CURSOR_CHARS as ai, ResolutionSafeToRetry as an, LifecyclePublicationConfig as ao, DurableRetryFailure as ar, toolCallResolutionBatchId as as, SettleJoinedWithHost as at, obligationSeverityOf as b, ThreadWorkEntry as ba, ThreadCommands as bi, SubmissionWorkItem as bn, makeStorageOwner as bo, WorkRecoveryRequest as br, workerOriginRecordId as bs, AdmissionResult as bt, IntegrityReport as c, transferPageFits as ca, PreparedAppend as ci, SettlementConflict as cn, LifecyclePublicationHandler as co, DurableSubmitAgent as cr, toolCallUnknownRecordId as cs, AbortCommand as ct, ObligationReport as d, MAX_RECOVERY_WORK_ITEMS as da, PromptCheckpointRead as di, SubmissionLedger as dn, LifecyclePublication_d_exports as do, DurableVerifyFailure as dr, turnApprovalsBatchId as ds, AdmissionAdmitted as dt, ThreadWorkerSeal as ea, ExecutionRead as ei, ReleaseChildBudgetRequest as en, ThreadArchiveRangeSeal as eo, DurableExplainFailure as er, subagentRequestedRecordId as es, ResumePendingToolBatch as et, ObligationSeverity as f, MAX_WORK_CURSOR_CHARS as fa, PromptCheckpoints as fi, SubmissionLedgerFailure as fn, drainLifecyclePublications as fo, DurableWorkerFailure as fr, turnBatchId as fs, AdmissionConflict as ft, RecoveryExplanation as g, MAX_WORK_REBUILD_BYTES as ga, ThreadAdmission as gi, SubmissionLookupByKey as gn, MutationGate as go, RecoveryReport as gr, turnResponseBatchId as gs, AdmissionNotAdmitted as gt, RecoveryDisposition as h, MAX_WORK_PAGE_ENTRIES as ha, ThreadAbortFact as hi, SubmissionLookupById as hn, ProgressAppendRecord as ho, RecoveryFailure as hr, turnResponseBatch as hs, AdmissionIndeterminate as ht, ExplainedUnknownCall as i, getRunInput as ia, MAX_PROMPT_CHECKPOINT_RUNS as ii, ResolutionNeverHappened as in, LifecyclePublicationBatch as io, DurableResolveFailure as ir, toolApprovalRequestRecordId as is, SettleAborted as it, AwaitParentEstablishment as j, WorkStateReference as ja, ThreadMaterialization as ji, WaitingForChildSuspension as jn, childThreadIdFor as jo, RunChildAttachment as jr, DurableWorkerBinding as js, ChildReservationId as jt, AwaitChildSettlement as k, WorkIndexRebuildRequest as ka, ThreadIdentity as ki, UnknownResolutionKind as kn, approvalDecisionBatchId as ko, SubmissionStatus as kr, CurrentBindingSelection as ks, ChildBudgetReservationSnapshot as kt, ObligationBlockedOn as l, CanonicalWorkEntry as la, PromptCheckpoint as li, SettlementFinalization as ln, LifecyclePublicationSource as lo, DurableSubmitFailure as lr, toolStepSettledBatchId as ls, AbortIntent as lt, RECOVERY_DECISION_MEANINGS as m, MAX_WORK_PAGE_BYTES as ma, SelectedThreadRead as mi, SubmissionLookup as mn, lifecyclePublicationLayer as mo, RecoveryBlocked as mr, turnIdForRun as ms, AdmissionGroup as mt, ExplainedEvidence as n, canonicalBatchFitsTransfer as na, LoadCheckpointRequest as ni, ResolutionAbortSubmission as nn, ThreadArchiveStorage as no, DurableObserveOptions as nr, subagentStartedRecordId as ns, ResumeWaitingParent as nt, IntegrityCheckName as o, readWorkerState as oa, MAX_THREAD_EXPORT_PAGE_BYTES as oi, RevertJoiningRequest as on, LifecyclePublicationError as oo, DurableRuntimeConfig as or, toolCallResolvedRecordId as os, classifyRecovery as ot, ObligationThresholds as p, MAX_WORK_ENTRY_BYTES as pa, SaveCheckpointRequest as pi, SubmissionLedger_d_exports as pn, lifecyclePublicationBatchMaxFacts as po, DurableWorkerRequirements as pr, turnCanonicalBatch as ps, AdmissionFence as pt, Recovery_d_exports as q, MAX_ARCHIVE_RANGE_RECORDS as qa, ThreadStore_d_exports as qi, DurableAbortFailure as qn, runStartedBatchId as qo, validatePublication as qr, MarkJoinedRequest as qt, ExplainedSubmission as r, getRecord as ra, MAX_PROMPT_CHECKPOINT_BYTES as ri, ResolutionCompletedWithResult as rn, LifecyclePublication as ro, DurableProgressFailure as rr, toolApprovalDecisionRecordId as rs, RevertJoining as rt, IntegrityCheckStatus as s, streamExport as sa, MAX_THREAD_EXPORT_PAGE_RECORDS as si, Settlement as sn, LifecyclePublicationFact as so, DurableRuntimeConfigOptions as sr, toolCallResultBatchId as ss, pendingApprovalForRecovery as st, Admin_d_exports as t, ThreadWorkerStateRequest as ta, ExecutionUpdate as ti, ReservedChildBudget as tn, ThreadArchiveRange_d_exports as to, DurableObligationFailure as tr, subagentStartedBatchId as ts, ResumeSuspended as tt, ObligationEntry as u, MAX_RECOVERY_PAGES as ua, PromptCheckpointHead as ui, SubmissionAdmissionFence as un, LifecyclePublicationStorage as uo, DurableSubmitOptions as ur, toolStepSettledRecordId as us, AbortIntentRequest as ut, RetryRefusalReason as v, ThreadWorkCursor as va, ThreadCheckpoint as vi, SubmissionSnapshot as vn, StorageOwner as vo, RecoverySweepResult as vr, turnResultsBatchId as vs, AdmissionRequest as vt, ApplyInput as w, ThreadWork_d_exports as wa, ThreadExportRecord as wi, SuspensionSnapshot as wn, RunJournalProjection as wo, recoveryRepairRecordId as wr, AgentRegistration_d_exports as ws, ApprovalPendingSuspension as wt, predictRecoveryDisposition as x, ThreadWorkPage as xa, ThreadExport as xi, SuspendRequest as xn, JournalBoundary as xo, childReservationIdFor as xr, workerReportRecordId as xs, ApprovalConflict as xt, RetryRefused as y, ThreadWorkDiscovery as ya, ThreadCheckpoints as yi, SubmissionState as yn, StorageOwnerService as yo, WorkRecoveryReport as yr, workerInputRecordId as ys, AdmissionResolution as yt, MarkUnknown as z, encodeWorkCursor as za, ThreadRecordRequest as zi, submissionInputRecordId as zn, peerMessageRecordId as zo, makeRunWriter as zr, FundingOwner as zt };
|
|
5774
|
-
//# sourceMappingURL=Admin-
|
|
5813
|
+
export { ResumeFromTurnBoundary as $, ThreadArchiveRangeRead as $a, ThreadWorkerCapacityRequest as $i, DurableAwaitFailure as $n, subagentLineageBatchId as $o, ExecutionCheckpoint as $r, RecoverySnapshotRequest as $t, AwaitHostSettlement as A, WorkIndexRebuildRequest as Aa, ThreadIdentityRequest as Ai, WaitingChild as An, approvalDecisionBatchId as Ao, SubmissionStatus_d_exports as Ar, BindingUnavailable as As, ChildReservationConflict as At, NoAction as B, encodeWorkCursor as Ba, ThreadResolutionFact as Bi, submissionSettlementBatchId as Bn, modelResponseRecordId as Bo, SettlementPublication as Br, FundingOwnerRequest as Bt, renderRecoveryExplanation as C, ThreadWorkRequest as Ca, ThreadExportCursor as Ci, SuspensionReason as Cn, RunJournalContext as Co, recoveryRepairBatchId as Cr, workerReportRecordId as Cs, ApprovalDecisionIntent as Ct, AwaitApprovalDecision as D, WorkDiscoveryUnavailable as Da, ThreadExportSnapshot as Di, UnknownResolutionConflict as Dn, RunJournal_d_exports as Do, PendingSubmission as Dr, AgentAttemptContext as Ds, ChildAttachmentSnapshot as Dt, ApplyUnknownResolutions as E, WORK_INDEX_VERSION as Ea, ThreadExportRequest as Ei, UnknownResolutionCommand as En, RunJournalUsage as Eo, threadCreatedRecordId as Er, AgentRegistration_d_exports as Es, BeginChildBudgetReleaseRequest as Et, DeclaredPendingBatchEvidence as F, WorkerReportingMode as Fa, ThreadPromptRead as Fi, settlementFailureFromRecord as Fn, firstWorkerInputRecordId as Fo, RunStorageSession as Fr, ReplayVersions as Fs, Claim as Ft, RecoveryDecision as G, workIndexChanges as Ga, ThreadStoreError as Gi, workerTerminalFromRecord as Gn, runCompletedRecordId as Go, validateCanonicalSettlement as Gr, LedgerError as Gt, OpenToolCallEvidence as H, resolveWorkEvidence as Ha, ThreadSelection as Hi, submissionSettlementRecordId as Hn, projectRunJournal as Ho, SettlementPublicationFailure as Hr, JoinSnapshot as Ht, DelegationAdmissionEvidence as I, admissionWork as Ia, ThreadRead as Ii, submissionAbortBatchId as In, initialRunJournal as Io, RunWriter as Ir, ResolvedBinding as Is, ClaimHandoff as It, ReleaseOrphanChildReservation as J, MAX_ARCHIVE_RANGE_RECORDS as Ja, ThreadTail as Ji, DurableAgentRuntime as Jn, runIdForSubmission as Jo, AppendConflict as Jr, MarkReadyRequest as Jt, RecoveryEvidence as K, MAX_ARCHIVE_RANGE_BYTES as Ka, ThreadStoreFailure as Ki, ApprovalSuspensionError as Kn, runDurationBatchId as Ko, validateJoinedSettlement as Kr, MarkInputAppliedRequest as Kt, EnsureWaitingForChild as L, advanceWorkEntry as La, ThreadReadRequest as Li, submissionAbortRecordId as Ln, markUnknownBatchId as Lo, layer as Lr, compileBindingContracts as Ls, ClaimJoiningRequest as Lt, AwaitUnknownResolution as M, WorkStateReference as Ma, ThreadNotMaterialized as Mi, WorkerLedgerState as Mn, childThreadIdFor as Mo, RunChildBudgetReservation as Mr, DurableBindingFailure as Ms, ChildReservationStatus as Mt, CompleteChildAdmission as N, WorkThreadsPage as Na, ThreadObservation as Ni, WorkerStopCommand as Nn, compactionBatchId as No, RunOwnership as Nr, DurableWorkerBinding as Ns, ChildSettledNotification as Nt, AwaitChildAdmissionResolution as O, WorkIndexChange as Oa, ThreadExportSource as Oi, UnknownResolutionIntent as On, TurnCommitInput as Oo, SettledSubmission as Or, AgentRegistration as Os, ChildBudgetReservationRequest as Ot, CompleteMaterialization as P, WorkThreadsRequest as Pa, ThreadPeerCountRequest as Pi, approvalDecisionsCover as Pn, compactionRecordId as Po, RunStorage as Pr, ExecutableAgentBinding as Ps, ChildSettledOutcome as Pt, RepairSubagentStartLink as Q, ThreadArchiveRangePublish as Qa, ThreadWorkerCapacity as Qi, DurableApprovalSuspension as Qn, subagentJoinedRecordId as Qo, CommitBatch as Qr, RecoverySnapshot as Qt, FinalizeLedgerFromHistory as R, decodeWorkCursor as Ra, ThreadReader as Ri, submissionInputBatchId as Rn, modelResponseInterruptedBatchId as Ro, make as Rr, compileRegistrations as Rs, ClaimRequest as Rt, recoveryDecisionMeaning as S, ThreadWorkPage as Sa, ThreadExportBatch as Si, SuspensionOutcome as Sn, JournalBoundary as So, isolateRecovery as Sr, workerOriginRecordId as Ss, ApprovalDecisionCommand as St, ApplyJoinAccounting as T, ThreadWork_d_exports as Ta, ThreadExportRejected as Ti, UnknownResolution as Tn, RunJournalProjection as To, threadCreatedBatchId as Tr, toolCallSettledRecordId as Ts, AttachChildToReservationRequest as Tt, PendingApprovalEvidence as U, validateWorkPage as Ua, ThreadStore as Ui, unknownResolutionKind as Un, projectRunJournalStream as Uo, SettlementPublicationResult as Ur, JoiningClaim as Ut, OpenDelegationCallEvidence as V, operationEvidence as Va, ThreadRunInputRequest as Vi, submissionSettlementId as Vn, peerMessageRecordId as Vo, SettlementPublicationAuthority as Vr, InputAppliedMarker as Vt, PropagateChildAbort as W, workId as Wa, ThreadStoreDiagnostic as Wi, unknownResolutionMatchesResult as Wn, promptFromCanonicalRecords as Wo, SettlementPublisher as Wr, LedgerCapabilities as Wt, RepairJoinMarker as X, ThreadArchiveRange as Xa, ThreadVerificationRequest as Xi, DurableApprovalFailure as Xn, runStartedRecordId as Xo, AppendResult as Xr, OwnershipLost as Xt, RepairInputMarker as Y, MAX_CANONICAL_BATCH_BYTES as Ya, ThreadTailRequest as Yi, DurableAgentRuntime_d_exports as Yn, runStartedBatchId as Yo, AppendRequest as Yr, MarkUnknownRequest as Yt, RepairReadiness as Z, ThreadArchiveRangePage as Za, ThreadVerificationStorage as Zi, DurableApprovalResolver as Zn, subagentJoinBatchId as Zo, CheckpointRejected as Zr, ParentLinkage as Zt, RetryCommand as _, MAX_WORK_REBUILD_BYTES as _a, ThreadApprovalFact as _i, SubmissionScheduling as _n, MutationGate as _o, RecoverySweepOptions as _r, turnResponseBatch as _s, AdmissionPolicyError as _t, IntegrityCheck as a, makeTransferFactCheck as aa, MAX_THREAD_EXPORT_CURSOR_CHARS as ai, ResolutionSafeToRetry as an, LifecyclePublicationBatch as ao, DurableRetryFailure as ar, toolApprovalDecisionRecordId as as, SettleJoinedWithHost as at, obligationSeverityOf as b, ThreadWorkDiscovery as ba, ThreadCommands as bi, SubmissionWorkItem as bn, StorageOwnerService as bo, WorkRecoveryRequest as br, turnResultsBatchId as bs, AdmissionResult as bt, IntegrityReport as c, transferPageFits as ca, PreparedAppend as ci, SettlementConflict as cn, LifecyclePublicationFact as co, DurableSubmitAgent as cr, toolCallResolvedRecordId as cs, AbortCommand as ct, ObligationReport as d, MAX_RECOVERY_PAGES as da, PromptCheckpointRead as di, SubmissionLedger as dn, LifecyclePublicationStorage as do, DurableVerifyFailure as dr, toolStepSettledBatchId as ds, AdmissionAdmitted as dt, ThreadWorkerSeal as ea, ExecutionRead as ei, ReleaseChildBudgetRequest as en, ThreadArchiveRangeRequest as eo, DurableExplainFailure as er, subagentLineageRecordId as es, ResumePendingToolBatch as et, ObligationSeverity as f, MAX_RECOVERY_WORK_ITEMS as fa, PromptCheckpoints as fi, SubmissionLedgerFailure as fn, LifecyclePublication_d_exports as fo, DurableWorkerFailure as fr, toolStepSettledRecordId as fs, AdmissionConflict as ft, RecoveryExplanation as g, MAX_WORK_PAGE_ENTRIES as ga, ThreadAdmission as gi, SubmissionLookupByKey as gn, ProgressAppendRecord as go, RecoveryReport as gr, turnIdForRun as gs, AdmissionNotAdmitted as gt, RecoveryDisposition as h, MAX_WORK_PAGE_BYTES as ha, ThreadAbortFact as hi, SubmissionLookupById as hn, lifecyclePublicationLayer as ho, RecoveryFailure as hr, turnCanonicalBatch as hs, AdmissionIndeterminate as ht, ExplainedUnknownCall as i, getRunInput as ia, MAX_PROMPT_CHECKPOINT_RUNS as ii, ResolutionNeverHappened as in, LifecyclePublication as io, DurableResolveFailure as ir, subagentStartedRecordId as is, SettleAborted as it, AwaitParentEstablishment as j, WorkOwner as ja, ThreadMaterialization as ji, WaitingForChildSuspension as jn, childIdempotencyKeyFor as jo, RunChildAttachment as jr, CurrentBindingSelection as js, ChildReservationId as jt, AwaitChildSettlement as k, WorkIndexProgress as ka, ThreadIdentity as ki, UnknownResolutionKind as kn, agentUpdateRecordId as ko, SubmissionStatus as kr, BindingSelection as ks, ChildBudgetReservationSnapshot as kt, ObligationBlockedOn as l, CanonicalWorkEntry as la, PromptCheckpoint as li, SettlementFinalization as ln, LifecyclePublicationHandler as lo, DurableSubmitFailure as lr, toolCallResultBatchId as ls, AbortIntent as lt, RECOVERY_DECISION_MEANINGS as m, MAX_WORK_ENTRY_BYTES as ma, SelectedThreadRead as mi, SubmissionLookup as mn, lifecyclePublicationBatchMaxFacts as mo, RecoveryBlocked as mr, turnBatchId as ms, AdmissionGroup as mt, ExplainedEvidence as n, canonicalBatchFitsTransfer as na, LoadCheckpointRequest as ni, ResolutionAbortSubmission as nn, ThreadArchiveRange_d_exports as no, DurableObserveOptions as nr, subagentRequestedRecordId as ns, ResumeWaitingParent as nt, IntegrityCheckName as o, readWorkerState as oa, MAX_THREAD_EXPORT_PAGE_BYTES as oi, RevertJoiningRequest as on, LifecyclePublicationConfig as oo, DurableRuntimeConfig as or, toolApprovalRequestRecordId as os, classifyRecovery as ot, ObligationThresholds as p, MAX_WORK_CURSOR_CHARS as pa, SaveCheckpointRequest as pi, SubmissionLedger_d_exports as pn, drainLifecyclePublications as po, DurableWorkerRequirements as pr, turnApprovalsBatchId as ps, AdmissionFence as pt, Recovery_d_exports as q, MAX_ARCHIVE_RANGE_PAGE as qa, ThreadStore_d_exports as qi, DurableAbortFailure as qn, runDurationRecordId as qo, validatePublication as qr, MarkJoinedRequest as qt, ExplainedSubmission as r, getRecord as ra, MAX_PROMPT_CHECKPOINT_BYTES as ri, ResolutionCompletedWithResult as rn, ThreadArchiveStorage as ro, DurableProgressFailure as rr, subagentStartedBatchId as rs, RevertJoining as rt, IntegrityCheckStatus as s, streamExport as sa, MAX_THREAD_EXPORT_PAGE_RECORDS as si, Settlement as sn, LifecyclePublicationError as so, DurableRuntimeConfigOptions as sr, toolCallResolutionBatchId as ss, pendingApprovalForRecovery as st, Admin_d_exports as t, ThreadWorkerStateRequest as ta, ExecutionUpdate as ti, ReservedChildBudget as tn, ThreadArchiveRangeSeal as to, DurableObligationFailure as tr, subagentRequestedBatchId as ts, ResumeSuspended as tt, ObligationEntry as u, FreshAdmissionWork as ua, PromptCheckpointHead as ui, SubmissionAdmissionFence as un, LifecyclePublicationSource as uo, DurableSubmitOptions as ur, toolCallUnknownRecordId as us, AbortIntentRequest as ut, RetryRefusalReason as v, MAX_WORK_REBUILD_RECORDS as va, ThreadCheckpoint as vi, SubmissionSnapshot as vn, OwnerGeneration as vo, RecoverySweepResult as vr, turnResponseBatchId as vs, AdmissionRequest as vt, ApplyInput as w, ThreadWorkStorage as wa, ThreadExportRecord as wi, SuspensionSnapshot as wn, RunJournalError as wo, recoveryRepairRecordId as wr, JournalRecordEnvelope as ws, ApprovalPendingSuspension as wt, predictRecoveryDisposition as x, ThreadWorkEntry as xa, ThreadExport as xi, SuspendRequest as xn, makeStorageOwner as xo, childReservationIdFor as xr, workerInputRecordId as xs, ApprovalConflict as xt, RetryRefused as y, ThreadWorkCursor as ya, ThreadCheckpoints as yi, SubmissionState as yn, StorageOwner as yo, WorkRecoveryReport as yr, turnResultsBatch as ys, AdmissionResolution as yt, MarkUnknown as z, deliveryPredecessor as za, ThreadRecordRequest as zi, submissionInputRecordId as zn, modelResponseInterruptedRecordId as zo, makeRunWriter as zr, definitionDigestsEqual as zs, FundingOwner as zt };
|
|
5814
|
+
//# sourceMappingURL=Admin-Qa3I1oA5.d.mts.map
|
|
@@ -264,7 +264,7 @@ declare function make<const Name extends string, InputSchema extends Schema.Top,
|
|
|
264
264
|
readonly id: AgentId & Name;
|
|
265
265
|
};
|
|
266
266
|
/** Bind a native model or thread resolver without acquiring or hiding its requirements. */
|
|
267
|
-
declare
|
|
267
|
+
declare function withModel<DefinitionValue extends AnyDefinition, ModelValue>(definition: DefinitionValue, model: NativeModel<ModelValue>): Binding<DefinitionValue, ModelValue>;
|
|
268
268
|
//#endregion
|
|
269
269
|
export { ToolUnion as A, OutputSchema as C, RunDispositionFailure as D, RunDispositionDeclaration as E, isModelResolver as F, make as I, withModel as L, Update as M, UpdatesSchema as N, RunDispositionSchema as O, inspectTools as P, Output as S, RunDisposition as T, InstructionSource as _, CompletionFromToolDeclaration as a, Name as b, Definition as c, EncodedInput as d, Failure as f, InstructionResult as g, InputSchema as h, Binding as i, Tools as j, ToolInspection as k, DefinitionOptions as l, InputPromptSource as m, Any as n, CompletionProjectionInput as o, Input as p, AnyDefinition as r, CompletionToolDeclaration as s, Agent_d_exports as t, DefinitionRequirements as u, ModelResolver as v, Requirements as w, NativeModel as x, ModelServices as y };
|
|
270
|
-
//# sourceMappingURL=Agent-
|
|
270
|
+
//# sourceMappingURL=Agent-B39jRnFv.d.mts.map
|
|
@@ -82,12 +82,13 @@ function make(id, options) {
|
|
|
82
82
|
runDisposition: options.runDisposition === void 0 ? void 0 : Object.freeze({ ...options.runDisposition })
|
|
83
83
|
});
|
|
84
84
|
}
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
});
|
|
85
|
+
function withModel(definition, model) {
|
|
86
|
+
return Object.freeze({
|
|
87
|
+
definition,
|
|
88
|
+
model
|
|
89
|
+
});
|
|
90
|
+
}
|
|
90
91
|
//#endregion
|
|
91
92
|
export { make as a, isModelResolver as i, ToolInspection as n, withModel as o, inspectTools as r, Agent_exports as t };
|
|
92
93
|
|
|
93
|
-
//# sourceMappingURL=Agent-
|
|
94
|
+
//# sourceMappingURL=Agent-BiRbr73L.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Agent-BiRbr73L.mjs","names":["S"],"sources":["../src/core/internal/agent-updates.ts","../src/core/Agent.ts"],"sourcesContent":["import * as Tool from \"effect/ai/Tool\";\nimport * as Toolkit from \"effect/ai/Toolkit\";\nimport * as Schema from \"effect/Schema\";\n\nimport { Emitter, UpdateError } from \"../AgentUpdates.ts\";\n\n/** Definition-owned native Tool. Runtime supplies its handler under the same identity. */\nexport const updateTool = <S extends Schema.Top>(schema: S) =>\n Tool.make(\"emit_update\", {\n description:\n \"Emit a structured intermediate update. Success acknowledges acceptance by this Run; \" +\n \"parent delivery and processing are separate. This does not complete the task.\",\n parameters: Schema.Struct({ value: schema }),\n success: Schema.Struct({ emitted: Schema.Literal(true) }),\n failure: UpdateError,\n failureMode: \"return\",\n }).addDependency(Emitter);\n\nexport type UpdateToolkit<\n T extends Toolkit.Any,\n S extends Schema.Top | undefined,\n> = S extends Schema.Top\n ? Toolkit.Toolkit<T[\"tools\"] & { readonly emit_update: ReturnType<typeof updateTool<S>> }>\n : T;\n\nexport const withUpdateTool = (\n toolkit: Toolkit.Any,\n schema: Schema.Top | undefined,\n): Toolkit.Any => {\n if (schema === undefined) return toolkit;\n if (Object.hasOwn(toolkit.tools, \"emit_update\"))\n // oxlint-disable-next-line effect/no-untyped-throw, effect/no-native-error -- Agent.make synchronously rejects a toolkit that occupies the reserved update Tool name.\n throw new TypeError(\"emit_update is reserved for Agent updates\");\n\n return Toolkit.make(...Object.values(toolkit.tools), updateTool(schema));\n};\n","import type { Effect, Layer, Option, Schema } from \"effect\";\nimport type { AiError, LanguageModel, Model, Prompt } from \"effect/ai\";\nimport * as Tool from \"effect/ai/Tool\";\nimport * as Toolkit from \"effect/ai/Toolkit\";\nimport * as S from \"effect/Schema\";\n\nimport type {\n AgentInputDecodeError,\n AgentInputError,\n AgentOutputError,\n AgentRunDispositionError,\n} from \"./AgentError.ts\";\nimport { AgentPolicy, type AgentPolicyInput } from \"./AgentPolicy.ts\";\nimport { AgentId } from \"./Identifiers.ts\";\nimport { type UpdateToolkit, withUpdateTool } from \"./internal/agent-updates.ts\";\nimport type { Configuration } from \"./ToolExposure.ts\";\n\n/** Prompt input produced directly or by an Effect that preserves its failure and requirements. */\nexport type InstructionResult<E = never, R = never> =\n | Prompt.RawInput\n | Effect.Effect<Prompt.RawInput, E, R>;\n\n/** Static prompt input or an input-dependent source evaluated once while preparing a run. */\nexport type InstructionSource<Input, E = never, R = never> =\n | Prompt.RawInput\n | ((input: Input) => InstructionResult<E, R>);\n\n/** Definition-owned projection from decoded Agent input to model-visible prompt content. */\nexport type InputPromptSource<Input, E = never, R = never> = (\n input: Input,\n) => InstructionResult<E, R>;\n\n/** Native services needed to execute and identify model calls. */\nexport type ModelServices = LanguageModel.LanguageModel | Model.ProviderName | Model.ModelName;\n\n/**\n * An optional capability on a provided LanguageModel service. The runtime supplies\n * only model-visible task context and eligible Tool descriptions after validating input.\n * The resolver owns retaining one choice per Thread, including across Runs and\n * recovery; it captures client requirements and returns a closed native Layer\n * that the interpreter acquires for the Run. Context hooks may prepare prompts\n * but cannot replace this model through a per-Turn modelCall.\n * Selection failures remain AiError values and all selector/client services stay in R.\n */\nexport interface ModelResolver extends LanguageModel.LanguageModel {\n readonly resolve: (request: {\n readonly threadId: string;\n readonly state: Schema.JsonObject;\n }) => Effect.Effect<Layer.Layer<ModelServices>, AiError.AiError>;\n}\n\n/** Detect the deferred resolver capability on a trusted, host-provided model service. */\nexport const isModelResolver = (model: LanguageModel.LanguageModel): model is ModelResolver =>\n \"resolve\" in model && typeof model.resolve === \"function\";\n\n/** Accepts native model Layers that provide generation and model identity. */\nexport type NativeModel<ModelValue> =\n ModelValue extends Layer.Layer<infer Provides, never, infer _Requires>\n ? ModelServices extends Provides\n ? ModelValue\n : never\n : never;\n\n/** Definition-owned boundary for selecting and validating an application run disposition. */\nexport interface RunDispositionDeclaration<Output, DispositionSchema extends Schema.Top> {\n /**\n * Opt background workers into one retained assignment. The encoded disposition must be\n * Worker.AssignmentDisposition: completed seals the worker, waiting leaves it steerable.\n * Failures and exhausted Runs seal as failed; aborting an active Run seals as cancelled.\n * The worker origin retains this choice. Omission preserves reusable workers.\n */\n readonly workerLifecycle?: \"assignment\" | undefined;\n /** Canonical Schema used to validate and encode the selected disposition. */\n readonly schema: DispositionSchema;\n /** Pure selection from decoded output. `undefined` declares none, except for assignments. */\n readonly fromOutput: (output: Output) => unknown;\n}\n\n/** Values available to a Definition-owned completion Tool projector after canonical decoding. */\nexport interface CompletionProjectionInput<Parameters = unknown, Result = unknown> {\n readonly parameters: Parameters;\n readonly result: Result;\n}\n\n/**\n * One application Tool whose successful result can complete its owning Agent when it is the\n * only application call. Provider-executed calls may accompany it only with terminal results.\n * Mixed, wholly unexecuted application batches are rejected with failed Tool results so the\n * model can correct them within ordinary Run budgets; completed provider results are retained.\n * Missing provider results and invalid pending resumed batches fail closed. The completion\n * designation never permits side-effect replay.\n */\nexport interface CompletionToolDeclaration<\n Parameters = unknown,\n Result = unknown,\n Output = unknown,\n> {\n readonly tool: string;\n /** Require native Tool use on every model Turn and this Tool for final completion. */\n readonly required?: boolean | undefined;\n /**\n * Pure, deterministic projection: recovery may reevaluate a recorded Tool result before\n * RunCompleted commits. Once committed, that stored output wins across later code changes.\n */\n readonly project: (input: CompletionProjectionInput<Parameters, Result>) => Output;\n}\n\ntype CompletionToolFor<ToolkitValue extends Toolkit.Any, Output> = {\n readonly [Name in keyof ToolkitValue[\"tools\"] & string]: CompletionToolDeclaration<\n Tool.Parameters<ToolkitValue[\"tools\"][Name]>,\n Tool.Success<ToolkitValue[\"tools\"][Name]>,\n Output\n > & { readonly tool: Name };\n}[keyof ToolkitValue[\"tools\"] & string];\n\n/**\n * An ordinary action Tool whose canonical success may satisfy the whole request.\n * Projectors must be pure and deterministic: recovery re-evaluates them. None preserves\n * ordinary continuation; Some is validated as the Agent output. These Tools must be the sole\n * application call; terminal provider results may accompany them. They never receive the\n * required completion Tool's exhaustion allowance.\n */\nexport interface CompletionFromToolDeclaration<\n Parameters = unknown,\n Result = unknown,\n Output = unknown,\n> {\n readonly tool: string;\n readonly project: (input: CompletionProjectionInput<Parameters, Result>) => Option.Option<Output>;\n}\n\ntype CompletionFromToolFor<ToolkitValue extends Toolkit.Any, Output> = {\n readonly [Name in keyof ToolkitValue[\"tools\"] & string]: CompletionFromToolDeclaration<\n Tool.Parameters<ToolkitValue[\"tools\"][Name]>,\n Tool.Success<ToolkitValue[\"tools\"][Name]>,\n Output\n > & { readonly tool: Name };\n}[keyof ToolkitValue[\"tools\"] & string];\n\n/** Immutable, model-agnostic schemas, behavior, tools, and bounds for an agent. */\nexport interface Definition<\n InputSchema extends Schema.Top,\n OutputSchema extends Schema.Top,\n Instructions,\n ToolkitValue extends Toolkit.Any,\n RunDispositionValue = undefined,\n InputPromptValue = undefined,\n UpdatesSchema extends Schema.Top | undefined = undefined,\n> {\n /** Stable agent identity; changing it creates a distinct definition identity. */\n readonly id: AgentId;\n /** Canonical Schema for intermediate updates emitted by this Agent. */\n readonly updates?: UpdatesSchema;\n /** Canonical schema used to decode and encode run input. */\n readonly input: InputSchema;\n /** Canonical schema used to decode the final model output. */\n readonly output: OutputSchema;\n /**\n * Evaluated once while preparing each Run. OpenAI, xAI and native adapters advertising support\n * preserve chronological system messages, omitting exact repeats only when no distinct system\n * instruction intervenes. The actual selected model determines support on each call. Other\n * adapters group systems first and keep the last exact repeat, including provider options;\n * Anthropic requires an upstream adapter with mid-conversation system-message support.\n * Stored history is unchanged.\n */\n readonly instructions: Instructions;\n /**\n * Optional projection from decoded input to model-visible native Effect AI prompt content.\n * This controls disclosure only: durable admission retains the complete input and Tool\n * authorization receives it. A projection failure never falls back to sending full input.\n */\n readonly inputPrompt?: InputPromptValue | undefined;\n /** Native Effect AI toolkit whose failures and requirements remain visible. */\n readonly toolkit: ToolkitValue;\n readonly toolExposure?: Configuration | undefined;\n /** Finite execution bounds enforced by the runtime. */\n readonly policy: AgentPolicy;\n /** Explicit policy fields, retained so delegated runs can inherit omitted fields. */\n readonly policyOverrides?: Partial<AgentPolicyInput> | undefined;\n /** Optional successful Tool result that projects directly to the Agent output and settles. */\n readonly completion?: CompletionToolDeclaration | undefined;\n readonly completionFromTools?: ReadonlyArray<CompletionFromToolDeclaration> | undefined;\n readonly runDisposition?: RunDispositionValue | undefined;\n readonly description?: string | undefined;\n readonly metadata?: Readonly<Record<string, string>> | undefined;\n}\n\n/** Options for a model-agnostic agent definition. */\nexport interface DefinitionOptions<\n InputSchema extends Schema.Top,\n OutputSchema extends Schema.Top,\n Instructions extends InstructionSource<InputSchema[\"Type\"], unknown, unknown>,\n ToolkitValue extends Toolkit.Any,\n RunDispositionValue extends\n | RunDispositionDeclaration<OutputSchema[\"Type\"], Schema.Top>\n | undefined = undefined,\n InputPromptValue extends InputPromptSource<InputSchema[\"Type\"], unknown, unknown> | undefined =\n undefined,\n UpdatesSchema extends Schema.Top | undefined = undefined,\n> {\n readonly updates?: UpdatesSchema;\n readonly input: InputSchema;\n readonly output: OutputSchema;\n readonly instructions: Instructions;\n readonly inputPrompt?: InputPromptValue | undefined;\n readonly toolkit: ToolkitValue;\n readonly toolExposure?: Configuration | undefined;\n readonly policy?: Partial<AgentPolicyInput> | undefined;\n readonly completion?: CompletionToolFor<ToolkitValue, OutputSchema[\"Type\"]> | undefined;\n readonly completionFromTools?:\n | ReadonlyArray<CompletionFromToolFor<ToolkitValue, OutputSchema[\"Type\"]>>\n | undefined;\n readonly runDisposition?: RunDispositionValue | undefined;\n readonly description?: string | undefined;\n readonly metadata?: Readonly<Record<string, string>> | undefined;\n}\n\ntype AnyDefinitionShape = Definition<\n Schema.Top,\n Schema.Top,\n unknown,\n Toolkit.Any,\n RunDispositionDeclaration<never, Schema.Top> | undefined,\n unknown,\n Schema.Top | undefined\n>;\n\n/** Immutable pairing of an agent definition with a native model Layer or thread resolver. */\nexport interface Binding<DefinitionValue extends AnyDefinitionShape, ModelValue> {\n readonly definition: DefinitionValue;\n readonly model: NativeModel<ModelValue>;\n}\n\ntype InstructionEffect<Instructions, Input> = Instructions extends (input: Input) => infer Result\n ? Result\n : Instructions;\n\ntype InputPromptEffect<InputPrompt, Input> = InputPrompt extends (input: Input) => infer Result\n ? Result\n : never;\n\ntype EffectError<Value> =\n Value extends Effect.Effect<infer _Success, infer Error, infer _Services> ? Error : never;\n\ntype EffectServices<Value> =\n Value extends Effect.Effect<infer _Success, infer _Error, infer Services> ? Services : never;\n\ntype ModelRequirements<Value> =\n Value extends Layer.Layer<infer _Provides, infer _Error, infer Services> ? Services : never;\n\n/** Constructors and type projections for definitions and runnable model bindings. */\n\n/** Type-erased definition used at generic framework boundaries. */\nexport type AnyDefinition = AnyDefinitionShape;\n\n/** Read-only interpreter program or binding used at inspection and projection boundaries. */\nexport interface Any {\n readonly definition: AnyDefinition;\n readonly model?: unknown;\n}\n\n/** Native Tool configuration for inspection; it does not predict an invocation's outcome. */\nexport const ToolInspection = S.Struct({\n name: S.String,\n failureMode: S.Literals([\"error\", \"return\"]),\n /** False for provider-executed Tools, whose results do not pass through local handlers. */\n requiresHandler: S.Boolean,\n});\n\nexport type ToolInspection = typeof ToolInspection.Type;\n\n/**\n * Inspect registered native Tools in declaration order without acquiring handlers or a Model.\n * This is the full Definition toolkit, before run-specific visibility or exposure filtering.\n * `failureMode` is Effect AI's configured mode, including its `\"error\"` default. Handler-level\n * recovery, programmatic invocation and Subagent containment can change where failures go;\n * consult execution diagnostics for the actual route. No arguments, results or services are read.\n */\nexport const inspectTools = (agent: AnyDefinition | Any): ReadonlyArray<ToolInspection> => {\n const definition = \"definition\" in agent ? agent.definition : agent;\n\n return Object.values(definition.toolkit.tools).map((tool) =>\n ToolInspection.make({\n name: tool.name,\n failureMode: tool.failureMode,\n requiresHandler: !Tool.isProviderDefined(tool) || tool.requiresHandler,\n }),\n );\n};\n\ntype DefinitionOf<AgentValue extends AnyDefinition | Any> = AgentValue extends {\n readonly definition: infer DefinitionValue extends AnyDefinition;\n}\n ? DefinitionValue\n : AgentValue;\n\ntype RunDispositionSchemaOf<DefinitionValue extends AnyDefinition> = [\n Exclude<DefinitionValue[\"runDisposition\"], undefined>,\n] extends [never]\n ? never\n : Exclude<DefinitionValue[\"runDisposition\"], undefined> extends RunDispositionDeclaration<\n never,\n infer DispositionSchema\n >\n ? DispositionSchema\n : never;\n\n/** Literal Agent ID, retained by Agent.make. */\nexport type Name<A extends AnyDefinition | Any> = DefinitionOf<A>[\"id\"] extends AgentId &\n (infer N extends string)\n ? N\n : string;\n\n/** Declared update Schema, or never for Agents without updates. */\nexport type UpdatesSchema<A extends AnyDefinition | Any> = Exclude<\n DefinitionOf<A>[\"updates\"],\n undefined\n>;\n\n/** Decoded intermediate update value. */\nexport type Update<A extends AnyDefinition | Any> = UpdatesSchema<A>[\"Type\"];\n\n/** Decoded input type of a definition or binding. */\nexport type Input<AgentValue extends AnyDefinition | Any> =\n DefinitionOf<AgentValue>[\"input\"][\"Type\"];\n\n/** Encoded input accepted by the primary execution operations. */\nexport type EncodedInput<AgentValue extends AnyDefinition | Any> =\n DefinitionOf<AgentValue>[\"input\"][\"Encoded\"];\n\n/** Decoded output type of a definition or binding. */\nexport type Output<AgentValue extends AnyDefinition | Any> =\n DefinitionOf<AgentValue>[\"output\"][\"Type\"];\n\n/** Input Schema carried by a definition or binding. */\nexport type InputSchema<AgentValue extends AnyDefinition | Any> = DefinitionOf<AgentValue>[\"input\"];\n\n/** Output Schema carried by a definition or binding. */\nexport type OutputSchema<AgentValue extends AnyDefinition | Any> =\n DefinitionOf<AgentValue>[\"output\"];\n\n/** Application run-disposition Schema carried by a definition or binding, or `never`. */\nexport type RunDispositionSchema<AgentValue extends AnyDefinition | Any> = RunDispositionSchemaOf<\n DefinitionOf<AgentValue>\n>;\n\n/** Decoded application run disposition declared by a definition or binding. */\nexport type RunDisposition<AgentValue extends AnyDefinition | Any> = [\n RunDispositionSchema<AgentValue>,\n] extends [never]\n ? never\n : RunDispositionSchema<AgentValue>[\"Type\"];\n\n/** Validation failure admitted only by definitions that declare a run disposition. */\nexport type RunDispositionFailure<AgentValue extends AnyDefinition | Any> = [\n RunDispositionSchemaOf<DefinitionOf<AgentValue>>,\n] extends [never]\n ? never\n : AgentRunDispositionError;\n\n/** Effect AI tool map carried by a definition or binding. */\nexport type Tools<AgentValue extends AnyDefinition | Any> = Toolkit.Tools<\n DefinitionOf<AgentValue>[\"toolkit\"]\n>;\n\ntype ApplicationTools<A extends AnyDefinition> = [UpdatesSchema<A>] extends [never]\n ? Tools<A>\n : Omit<Tools<A>, \"emit_update\">;\n\ntype ToolMapValues<ToolMap extends Record<string, Tool.Any>> = ToolMap extends unknown\n ? ToolMap[keyof ToolMap]\n : never;\n\n/** All possible tools, including keys present in only one definition or binding branch. */\nexport type ToolUnion<AgentValue extends AnyDefinition | Any> = ToolMapValues<Tools<AgentValue>>;\n\n/** Instruction, tool-handler, and Schema services required before a Model is bound. */\nexport type DefinitionRequirements<DefinitionValue extends AnyDefinition> =\n DefinitionValue extends unknown\n ?\n | EffectServices<InstructionEffect<DefinitionValue[\"instructions\"], Input<DefinitionValue>>>\n | EffectServices<InputPromptEffect<DefinitionValue[\"inputPrompt\"], Input<DefinitionValue>>>\n | Tool.HandlersFor<ApplicationTools<DefinitionValue>>\n | Tool.HandlerServices<ToolMapValues<ApplicationTools<DefinitionValue>>>\n // The interpreter canonically re-encodes decoded Tool parameters before recording them.\n | Tool.ParametersSchema<ToolUnion<DefinitionValue>>[\"EncodingServices\"]\n | Tool.SuccessSchema<ToolUnion<DefinitionValue>>[\"DecodingServices\"]\n | DefinitionValue[\"input\"][\"DecodingServices\"]\n | DefinitionValue[\"input\"][\"EncodingServices\"]\n | DefinitionValue[\"output\"][\"DecodingServices\"]\n | DefinitionValue[\"output\"][\"EncodingServices\"]\n | UpdatesSchema<DefinitionValue>[\"DecodingServices\"]\n | UpdatesSchema<DefinitionValue>[\"EncodingServices\"]\n | RunDispositionSchemaOf<DefinitionValue>[\"DecodingServices\"]\n | RunDispositionSchemaOf<DefinitionValue>[\"EncodingServices\"]\n : never;\n\n/** Definition services plus native model services, or a binding's model Layer requirements. */\nexport type Requirements<AgentValue extends AnyDefinition | Any> =\n | DefinitionRequirements<DefinitionOf<AgentValue>>\n | (AgentValue extends { readonly model: infer ModelValue }\n ? ModelRequirements<ModelValue>\n : ModelServices);\n\n// Distribute after unwrapping bindings too: withModel may itself contain a definition union.\ntype DefinitionFailure<DefinitionValue extends AnyDefinition> = DefinitionValue extends unknown\n ?\n | EffectError<InstructionEffect<DefinitionValue[\"instructions\"], Input<DefinitionValue>>>\n | EffectError<InputPromptEffect<DefinitionValue[\"inputPrompt\"], Input<DefinitionValue>>>\n | Tool.HandlerError<ToolUnion<DefinitionValue>>\n : never;\n\n/** Failures from every possible definition, preserving each branch's instruction input type. */\nexport type Failure<AgentValue extends AnyDefinition | Any> =\n | DefinitionFailure<DefinitionOf<AgentValue>>\n | AiError.AiError\n | AgentInputDecodeError\n | AgentInputError\n | AgentOutputError\n | RunDispositionFailure<AgentValue>;\n\n/** Validate an agent ID and return a shallowly frozen, model-agnostic definition. */\nexport function make<\n const Name extends string,\n InputSchema extends Schema.Top,\n OutputSchema extends Schema.Top,\n Instructions extends InstructionSource<InputSchema[\"Type\"], unknown, unknown>,\n ToolkitValue extends Toolkit.Any,\n DispositionSchema extends Schema.Top,\n InputPromptValue extends InputPromptSource<InputSchema[\"Type\"], unknown, unknown> | undefined,\n UpdatesSchema extends Schema.Top | undefined = undefined,\n>(\n id: Name,\n options: DefinitionOptions<\n InputSchema,\n OutputSchema,\n Instructions,\n ToolkitValue,\n RunDispositionDeclaration<OutputSchema[\"Type\"], DispositionSchema>,\n InputPromptValue,\n UpdatesSchema\n > & {\n readonly runDisposition: RunDispositionDeclaration<OutputSchema[\"Type\"], DispositionSchema>;\n readonly inputPrompt: InputPromptValue;\n },\n): Definition<\n InputSchema,\n OutputSchema,\n Instructions,\n UpdateToolkit<ToolkitValue, NoInfer<UpdatesSchema>>,\n RunDispositionDeclaration<OutputSchema[\"Type\"], DispositionSchema>,\n InputPromptValue,\n NoInfer<UpdatesSchema>\n> & { readonly id: AgentId & Name };\n\nexport function make<\n const Name extends string,\n InputSchema extends Schema.Top,\n OutputSchema extends Schema.Top,\n Instructions extends InstructionSource<InputSchema[\"Type\"], unknown, unknown>,\n ToolkitValue extends Toolkit.Any,\n DispositionSchema extends Schema.Top,\n UpdatesSchema extends Schema.Top | undefined = undefined,\n>(\n id: Name,\n options: DefinitionOptions<\n InputSchema,\n OutputSchema,\n Instructions,\n ToolkitValue,\n RunDispositionDeclaration<OutputSchema[\"Type\"], DispositionSchema>,\n undefined,\n UpdatesSchema\n > & {\n readonly runDisposition: RunDispositionDeclaration<OutputSchema[\"Type\"], DispositionSchema>;\n readonly inputPrompt?: undefined;\n },\n): Definition<\n InputSchema,\n OutputSchema,\n Instructions,\n UpdateToolkit<ToolkitValue, NoInfer<UpdatesSchema>>,\n RunDispositionDeclaration<OutputSchema[\"Type\"], DispositionSchema>,\n undefined,\n NoInfer<UpdatesSchema>\n> & { readonly id: AgentId & Name };\n\nexport function make<\n const Name extends string,\n InputSchema extends Schema.Top,\n OutputSchema extends Schema.Top,\n Instructions extends InstructionSource<InputSchema[\"Type\"], unknown, unknown>,\n ToolkitValue extends Toolkit.Any,\n InputPromptValue extends InputPromptSource<InputSchema[\"Type\"], unknown, unknown> | undefined,\n UpdatesSchema extends Schema.Top | undefined = undefined,\n>(\n id: Name,\n options: DefinitionOptions<\n InputSchema,\n OutputSchema,\n Instructions,\n ToolkitValue,\n undefined,\n InputPromptValue,\n UpdatesSchema\n > & {\n readonly inputPrompt: InputPromptValue;\n readonly runDisposition?: undefined;\n },\n): Definition<\n InputSchema,\n OutputSchema,\n Instructions,\n UpdateToolkit<ToolkitValue, NoInfer<UpdatesSchema>>,\n undefined,\n InputPromptValue,\n NoInfer<UpdatesSchema>\n> & { readonly id: AgentId & Name };\n\nexport function make<\n const Name extends string,\n InputSchema extends Schema.Top,\n OutputSchema extends Schema.Top,\n Instructions extends InstructionSource<InputSchema[\"Type\"], unknown, unknown>,\n ToolkitValue extends Toolkit.Any,\n UpdatesSchema extends Schema.Top | undefined = undefined,\n>(\n id: Name,\n options: DefinitionOptions<\n InputSchema,\n OutputSchema,\n Instructions,\n ToolkitValue,\n undefined,\n undefined,\n UpdatesSchema\n > & {\n readonly inputPrompt?: undefined;\n readonly runDisposition?: undefined;\n },\n): Definition<\n InputSchema,\n OutputSchema,\n Instructions,\n UpdateToolkit<ToolkitValue, NoInfer<UpdatesSchema>>,\n undefined,\n undefined,\n NoInfer<UpdatesSchema>\n> & { readonly id: AgentId & Name };\n\nexport function make(\n id: string,\n options: {\n readonly updates?: Schema.Top | undefined;\n readonly input: Schema.Top;\n readonly output: Schema.Top;\n readonly instructions: unknown;\n readonly inputPrompt?: unknown;\n readonly toolkit: Toolkit.Any;\n readonly toolExposure?: Configuration | undefined;\n readonly policy?: Partial<AgentPolicyInput> | undefined;\n readonly completion?: CompletionToolDeclaration | undefined;\n readonly completionFromTools?: ReadonlyArray<CompletionFromToolDeclaration> | undefined;\n readonly runDisposition?: RunDispositionDeclaration<never, Schema.Top> | undefined;\n readonly description?: string | undefined;\n readonly metadata?: Readonly<Record<string, string>> | undefined;\n },\n): AnyDefinition {\n const completionNames = new Set<string>();\n\n for (const declaration of options.completionFromTools ?? []) {\n if (declaration.tool === options.completion?.tool || completionNames.has(declaration.tool)) {\n // oxlint-disable-next-line effect/no-untyped-throw, effect/no-native-error -- Agent.make synchronously rejects duplicate completion declarations before constructing the Definition.\n throw new Error(`Tool ${declaration.tool} has more than one completion declaration`);\n }\n if (!Object.hasOwn(options.toolkit.tools, declaration.tool)) {\n // oxlint-disable-next-line effect/no-untyped-throw, effect/no-native-error -- Agent.make synchronously rejects completion declarations for absent Tools.\n throw new Error(`Unknown completion Tool ${declaration.tool}`);\n }\n completionNames.add(declaration.tool);\n }\n\n const tools = Object.values(options.toolkit.tools);\n\n const readonlyTools = tools.map((tool) =>\n Tool.isProviderDefined(tool) &&\n !tool.requiresHandler &&\n [\"web_search\", \"web_search_preview\", \"file_search\"].includes(tool.providerName)\n ? tool.annotate(Tool.Readonly, true)\n : tool,\n );\n\n const toolkit = readonlyTools.some((tool, index) => tool !== tools[index])\n ? Toolkit.make(...readonlyTools)\n : options.toolkit;\n\n return Object.freeze({\n ...options,\n toolkit: withUpdateTool(toolkit, options.updates),\n policy: AgentPolicy.resolve(options.policy),\n policyOverrides: Object.freeze({ ...options.policy }),\n toolExposure:\n options.toolExposure === undefined\n ? undefined\n : Object.freeze({\n ...options.toolExposure,\n initialToolNames: Object.freeze([...(options.toolExposure.initialToolNames ?? [])]),\n }),\n id: S.decodeSync(AgentId)(id),\n metadata: options.metadata === undefined ? undefined : Object.freeze({ ...options.metadata }),\n completion:\n options.completion === undefined ? undefined : Object.freeze({ ...options.completion }),\n completionFromTools:\n options.completionFromTools === undefined\n ? undefined\n : Object.freeze(\n options.completionFromTools.map((declaration) => Object.freeze({ ...declaration })),\n ),\n runDisposition:\n options.runDisposition === undefined\n ? undefined\n : Object.freeze({ ...options.runDisposition }),\n });\n}\n\n/** Bind a native model or thread resolver without acquiring or hiding its requirements. */\nexport function withModel<DefinitionValue extends AnyDefinition, ModelValue>(\n definition: DefinitionValue,\n model: NativeModel<ModelValue>,\n): Binding<DefinitionValue, ModelValue>;\n\nexport function withModel<DefinitionValue extends AnyDefinition, ModelValue>(\n definition: DefinitionValue,\n model: ModelValue,\n) {\n return Object.freeze({ definition, model });\n}\n"],"mappings":";;;;;;;;;AAOA,MAAa,cAAoC,WAC/C,KAAK,KAAK,eAAe;CACvB,aACE;CAEF,YAAY,OAAO,OAAO,EAAE,OAAO,OAAO,CAAC;CAC3C,SAAS,OAAO,OAAO,EAAE,SAAS,OAAO,QAAQ,IAAI,EAAE,CAAC;CACxD,SAAS;CACT,aAAa;AACf,CAAC,CAAC,CAAC,cAAc,OAAO;AAS1B,MAAa,kBACX,SACA,WACgB;CAChB,IAAI,WAAW,KAAA,GAAW,OAAO;CACjC,IAAI,OAAO,OAAO,QAAQ,OAAO,aAAa,GAE5C,MAAM,IAAI,UAAU,2CAA2C;CAEjE,OAAO,QAAQ,KAAK,GAAG,OAAO,OAAO,QAAQ,KAAK,GAAG,WAAW,MAAM,CAAC;AACzE;;;;;;;;;;;ACiBA,MAAa,mBAAmB,UAC9B,aAAa,SAAS,OAAO,MAAM,YAAY;;AAiNjD,MAAa,iBAAiBA,OAAE,OAAO;CACrC,MAAMA,OAAE;CACR,aAAaA,OAAE,SAAS,CAAC,SAAS,QAAQ,CAAC;;CAE3C,iBAAiBA,OAAE;AACrB,CAAC;;;;;;;;AAWD,MAAa,gBAAgB,UAA8D;CACzF,MAAM,aAAa,gBAAgB,QAAQ,MAAM,aAAa;CAE9D,OAAO,OAAO,OAAO,WAAW,QAAQ,KAAK,CAAC,CAAC,KAAK,SAClD,eAAe,KAAK;EAClB,MAAM,KAAK;EACX,aAAa,KAAK;EAClB,iBAAiB,CAAC,KAAK,kBAAkB,IAAI,KAAK,KAAK;CACzD,CAAC,CACH;AACF;AAsQA,SAAgB,KACd,IACA,SAee;CACf,MAAM,kCAAkB,IAAI,IAAY;CAExC,KAAK,MAAM,eAAe,QAAQ,uBAAuB,CAAC,GAAG;EAC3D,IAAI,YAAY,SAAS,QAAQ,YAAY,QAAQ,gBAAgB,IAAI,YAAY,IAAI,GAEvF,MAAM,IAAI,MAAM,QAAQ,YAAY,KAAK,0CAA0C;EAErF,IAAI,CAAC,OAAO,OAAO,QAAQ,QAAQ,OAAO,YAAY,IAAI,GAExD,MAAM,IAAI,MAAM,2BAA2B,YAAY,MAAM;EAE/D,gBAAgB,IAAI,YAAY,IAAI;CACtC;CAEA,MAAM,QAAQ,OAAO,OAAO,QAAQ,QAAQ,KAAK;CAEjD,MAAM,gBAAgB,MAAM,KAAK,SAC/B,KAAK,kBAAkB,IAAI,KAC3B,CAAC,KAAK,mBACN;EAAC;EAAc;EAAsB;CAAa,CAAC,CAAC,SAAS,KAAK,YAAY,IAC1E,KAAK,SAAS,KAAK,UAAU,IAAI,IACjC,IACN;CAEA,MAAM,UAAU,cAAc,MAAM,MAAM,UAAU,SAAS,MAAM,MAAM,IACrE,QAAQ,KAAK,GAAG,aAAa,IAC7B,QAAQ;CAEZ,OAAO,OAAO,OAAO;EACnB,GAAG;EACH,SAAS,eAAe,SAAS,QAAQ,OAAO;EAChD,QAAQ,YAAY,QAAQ,QAAQ,MAAM;EAC1C,iBAAiB,OAAO,OAAO,EAAE,GAAG,QAAQ,OAAO,CAAC;EACpD,cACE,QAAQ,iBAAiB,KAAA,IACrB,KAAA,IACA,OAAO,OAAO;GACZ,GAAG,QAAQ;GACX,kBAAkB,OAAO,OAAO,CAAC,GAAI,QAAQ,aAAa,oBAAoB,CAAC,CAAE,CAAC;EACpF,CAAC;EACP,IAAIA,OAAE,WAAW,OAAO,CAAC,CAAC,EAAE;EAC5B,UAAU,QAAQ,aAAa,KAAA,IAAY,KAAA,IAAY,OAAO,OAAO,EAAE,GAAG,QAAQ,SAAS,CAAC;EAC5F,YACE,QAAQ,eAAe,KAAA,IAAY,KAAA,IAAY,OAAO,OAAO,EAAE,GAAG,QAAQ,WAAW,CAAC;EACxF,qBACE,QAAQ,wBAAwB,KAAA,IAC5B,KAAA,IACA,OAAO,OACL,QAAQ,oBAAoB,KAAK,gBAAgB,OAAO,OAAO,EAAE,GAAG,YAAY,CAAC,CAAC,CACpF;EACN,gBACE,QAAQ,mBAAmB,KAAA,IACvB,KAAA,IACA,OAAO,OAAO,EAAE,GAAG,QAAQ,eAAe,CAAC;CACnD,CAAC;AACH;AAQA,SAAgB,UACd,YACA,OACA;CACA,OAAO,OAAO,OAAO;EAAE;EAAY;CAAM,CAAC;AAC5C"}
|
|
@@ -3,19 +3,19 @@ import { i as SubagentBudgetReservation, l as SubagentGrant, u as SubagentParent
|
|
|
3
3
|
import { i as UpdateError, n as Emitter } from "./AgentUpdates-DksV4D0A.mjs";
|
|
4
4
|
import { c as RunUsageReport, s as RunTotals } from "./Usage-CzZJ6A2n.mjs";
|
|
5
5
|
import { u as RunEvent } from "./RunEvent-C5jVQZ6K.mjs";
|
|
6
|
-
import { n as ThreadHistoryError, t as ThreadHistory } from "./ThreadHistory-
|
|
6
|
+
import { n as ThreadHistoryError, t as ThreadHistory } from "./ThreadHistory-KPPBJLJb.mjs";
|
|
7
7
|
import { n as CurrentToolCatalog } from "./ToolExposure-DFQKf9ET.mjs";
|
|
8
8
|
import { s as ToolBroker } from "./ToolBroker-P5t4ZN78.mjs";
|
|
9
9
|
import { c as AgentOutputError, f as AgentToolAuthorizationCheckError, g as ModelProtocolError, h as ContextOverflowError, l as AgentPersistenceCapacityError, m as ContextBudgetError, n as AgentApprovalPending, o as AgentInputError, p as AgentToolAuthorizationDenied, t as AgentApprovalDenied, u as AgentPolicyError } from "./AgentError-CBH7_MjG.mjs";
|
|
10
10
|
import { t as AgentPolicy } from "./AgentPolicy-B4lbCU2T.mjs";
|
|
11
|
-
import { A as ToolUnion, C as OutputSchema, D as RunDispositionFailure, E as RunDispositionDeclaration, N as UpdatesSchema, O as RunDispositionSchema, S as Output, _ as InstructionSource, a as CompletionFromToolDeclaration, c as Definition, d as EncodedInput, f as Failure, m as InputPromptSource, n as Any, r as AnyDefinition, s as CompletionToolDeclaration, t as Agent_d_exports, w as Requirements } from "./Agent-
|
|
11
|
+
import { A as ToolUnion, C as OutputSchema, D as RunDispositionFailure, E as RunDispositionDeclaration, N as UpdatesSchema, O as RunDispositionSchema, S as Output, _ as InstructionSource, a as CompletionFromToolDeclaration, c as Definition, d as EncodedInput, f as Failure, m as InputPromptSource, n as Any, r as AnyDefinition, s as CompletionToolDeclaration, t as Agent_d_exports, w as Requirements } from "./Agent-B39jRnFv.mjs";
|
|
12
12
|
import { a as WorkerBudgetScope } from "./Worker-CHRaIsWu.mjs";
|
|
13
13
|
import { a as ContextWindow } from "./ContextWindow-Cvv8N9Xy.mjs";
|
|
14
14
|
import { n as CompactionError } from "./ContextCompactor-Bz91grmO.mjs";
|
|
15
15
|
import { t as DurableStep } from "./DurableStep-DXGn7KQ4.mjs";
|
|
16
|
-
import { B as RunSubagentChildIdentity, H as RunSubagentEstablishRequest, M as RunOptions, S as RunContextPreparationError, W as RunSubagentJoinRequest, i as ChildEstablishStatus, l as ModelUsageAccounting, t as AgentUpdateAcceptance, x as RunContextPreparation } from "./RunOptions-
|
|
17
|
-
import { t as MessagingHost } from "./MessagingHost-
|
|
18
|
-
import { o as SubagentHost } from "./SubagentHost-
|
|
16
|
+
import { B as RunSubagentChildIdentity, H as RunSubagentEstablishRequest, M as RunOptions, S as RunContextPreparationError, W as RunSubagentJoinRequest, i as ChildEstablishStatus, l as ModelUsageAccounting, t as AgentUpdateAcceptance, x as RunContextPreparation } from "./RunOptions-Be77lKVZ.mjs";
|
|
17
|
+
import { t as MessagingHost } from "./MessagingHost-C6SOAcoG.mjs";
|
|
18
|
+
import { o as SubagentHost } from "./SubagentHost-D1xBgn9g.mjs";
|
|
19
19
|
import { t as RunEventSink } from "./RunEventSink-shh6Qf9E.mjs";
|
|
20
20
|
import * as Tool$1 from "effect/ai/Tool";
|
|
21
21
|
import * as Toolkit$1 from "effect/ai/Toolkit";
|
|
@@ -49,7 +49,7 @@ declare const ToolSpanTelemetry_base: Context.ServiceClass<ToolSpanTelemetry, "@
|
|
|
49
49
|
* decorating, or locally providing a Tracer implementation.
|
|
50
50
|
*/
|
|
51
51
|
declare class ToolSpanTelemetry extends ToolSpanTelemetry_base {
|
|
52
|
-
static readonly
|
|
52
|
+
static readonly make: Effect.Effect<ToolSpanTelemetryService>;
|
|
53
53
|
}
|
|
54
54
|
//#endregion
|
|
55
55
|
//#region src/engine/internal/agent-runtime.d.ts
|
|
@@ -122,16 +122,16 @@ declare const decodeFinalOutput: <AgentValue extends Any>(agent: AgentValue, tex
|
|
|
122
122
|
}, AgentOutputError, OutputSchema<AgentValue>["DecodingServices"]>;
|
|
123
123
|
declare const projectCompletionOutput: <AgentValue extends Any>(agent: AgentValue, declaration: CompletionToolDeclaration<unknown, unknown, unknown>, parameters: unknown, result: unknown) => Effect.Effect<{
|
|
124
124
|
encoded: Schema.Json;
|
|
125
|
-
decoded:
|
|
126
|
-
}, AgentOutputError | ModelProtocolError,
|
|
125
|
+
decoded: AgentValue["definition"]["output"]["Type"];
|
|
126
|
+
}, AgentOutputError | ModelProtocolError, AgentValue["definition"]["output"]["DecodingServices"] | AgentValue["definition"]["output"]["EncodingServices"] | AgentCompletionProjectionRequirements<AgentValue>>;
|
|
127
127
|
/** Reconstruct optional action completion identically for live execution and canonical recovery. */
|
|
128
128
|
declare const projectCompletionFromToolOutput: <AgentValue extends Any>(agent: AgentValue, declaration: CompletionFromToolDeclaration<unknown, unknown, unknown>, parameters: unknown, result: unknown) => Effect.Effect<Option.None<{
|
|
129
129
|
encoded: Schema.Json;
|
|
130
|
-
decoded:
|
|
130
|
+
decoded: AgentValue["definition"]["output"]["Type"];
|
|
131
131
|
}> | Option.Some<{
|
|
132
132
|
encoded: Schema.Json;
|
|
133
|
-
decoded:
|
|
134
|
-
}>, AgentOutputError | ModelProtocolError,
|
|
133
|
+
decoded: AgentValue["definition"]["output"]["Type"];
|
|
134
|
+
}>, AgentOutputError | ModelProtocolError, AgentValue["definition"]["output"]["DecodingServices"] | AgentValue["definition"]["output"]["EncodingServices"] | AgentCompletionProjectionRequirements<AgentValue>>;
|
|
135
135
|
declare function encodeRunDisposition<AgentValue extends Any>(agent: AgentValue, output: Output<AgentValue>): Effect.Effect<Schema.Json | undefined, RunDispositionFailure<AgentValue>, RunDispositionSchema<AgentValue>["EncodingServices"]>;
|
|
136
136
|
/**
|
|
137
137
|
* Scoped detached execution whose observers cannot backpressure Run
|
|
@@ -359,4 +359,4 @@ declare namespace AgentRuntime_d_exports {
|
|
|
359
359
|
}
|
|
360
360
|
//#endregion
|
|
361
361
|
export { runUnknown as A, decodeFinalOutput as C, projectCompletionOutput as D, projectCompletionFromToolOutput as E, streamWithUsageAccountingUnknown as F, withTerminalDefectEvent as I, startUnknown as M, stream as N, renderInputPrompt as O, streamUnknown as P, ToolCallWaiting as S, executeWithUsageAccountingUnknown as T, SubagentDurability as _, AgentResultSchema as a, SubagentDurabilityError as b, AgentSpawner as c, DetachedRun as d, EngineProvidedToolServices as f, SpawnedChildRun as g, SpawnRunOptions as h, AgentResult as i, start as j, run as k, AgentSpawnerParent as l, SpawnDelegation as m, AgentChildPending as n, AgentRuntimeFailure as o, RuntimeBinding as p, AgentCompletionProjectionRequirements as r, AgentRuntimeRequirements as s, AgentRuntime_d_exports as t, AgentSpawnerService as u, SubagentDurabilityDurable as v, encodeRunDisposition as w, SubagentDurabilityService as x, SubagentDurabilityEphemeral as y };
|
|
362
|
-
//# sourceMappingURL=AgentRuntime-
|
|
362
|
+
//# sourceMappingURL=AgentRuntime-CHDyRbSf.d.mts.map
|