effect-agent 0.1.0-beta.103 → 0.1.0-beta.106
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{Agent-CM6JubNX.d.mts → Agent-Bk-mLtov.d.mts} +2 -2
- package/dist/{AgentError-CggcAQ7V.d.mts → AgentError-Bn1ytXRD.d.mts} +20 -4
- package/dist/{AgentRuntime-B1SXMVN7.d.mts → AgentRuntime-BEXToYl1.d.mts} +8 -8
- package/dist/{AgentRuntime-BWOnNc0d.mjs → AgentRuntime-e2M5UoXn.mjs} +4 -3
- package/dist/AgentRuntime-e2M5UoXn.mjs.map +1 -0
- package/dist/{DurableAgentRuntime-C9eRZS9N.mjs → DurableAgentRuntime-wd1x0TcB.mjs} +67 -36
- package/dist/DurableAgentRuntime-wd1x0TcB.mjs.map +1 -0
- package/dist/{EventSource-K7XUzurY.d.mts → EventSource-pH-v0k42.d.mts} +3 -3
- package/dist/FailureDiagnostic-BElLOoED.mjs +274 -0
- package/dist/FailureDiagnostic-BElLOoED.mjs.map +1 -0
- package/dist/FailureDiagnostic-CaAkzGHL.d.mts +223 -0
- package/dist/{Messaging-QMYhp297.d.mts → Messaging-Bl4SBKpR.d.mts} +3 -3
- package/dist/{MessagingHost-gAxs5gme.d.mts → MessagingHost-nwBMdRoh.d.mts} +3 -3
- package/dist/{Output-CjocJzsl.d.mts → Output-B6RQ5jRU.d.mts} +2 -2
- package/dist/{PreparedInputAdmission-KLk5rGFI.d.mts → PreparedInputAdmission-D3-BgmA9.d.mts} +8 -4
- package/dist/{Records-Bidb7ByL.d.mts → Records-B4S02MX1.d.mts} +201 -14
- package/dist/{RunJournal-srpbEBEy.mjs → RunJournal-BdIlgAEj.mjs} +2 -2
- package/dist/{RunJournal-srpbEBEy.mjs.map → RunJournal-BdIlgAEj.mjs.map} +1 -1
- package/dist/{RunOptions-Bruk54SE.d.mts → RunOptions-qOcPv08p.d.mts} +10 -5
- package/dist/{Schedule-Cy9up8Uf.d.mts → Schedule-D2TVEu3W.d.mts} +7 -2
- package/dist/{Scheduling-CHCsSCGo.mjs → Scheduling-DPb2QyAK.mjs} +2 -2
- package/dist/{Scheduling-CHCsSCGo.mjs.map → Scheduling-DPb2QyAK.mjs.map} +1 -1
- package/dist/{Subagent-DP0CzO16.d.mts → Subagent-BxuDuCHt.d.mts} +172 -8
- package/dist/{Subagent-C2s8PFrd.mjs → Subagent-uXWHXiKb.mjs} +64 -29
- package/dist/Subagent-uXWHXiKb.mjs.map +1 -0
- package/dist/{SubagentHost-CYcxkpRc.d.mts → SubagentHost-DEPw4YME.d.mts} +6 -3
- package/dist/{Subscription-CHyoQelH.d.mts → Subscription-nX0rz4GQ.d.mts} +3 -3
- package/dist/{SubscriptionInput-DqrHW-Ja.d.mts → SubscriptionInput-CAG3_pyJ.d.mts} +3 -3
- package/dist/{Worker--j87JI__.d.mts → Worker-Bbj9uq5H.d.mts} +5 -2
- package/dist/{agent-registration-ByeHejH3.mjs → agent-registration-B5CI-Ygk.mjs} +7 -5
- package/dist/agent-registration-B5CI-Ygk.mjs.map +1 -0
- package/dist/capabilities/Commands.d.mts +1 -1
- package/dist/capabilities/Messaging.d.mts +2 -2
- package/dist/capabilities/RunHooks.d.mts +1 -1
- package/dist/capabilities/Subagent.d.mts +2 -2
- package/dist/capabilities/Subagent.mjs +1 -1
- package/dist/core/Agent.d.mts +1 -1
- package/dist/core/AgentError.d.mts +2 -2
- package/dist/core/AgentError.mjs +19 -2
- package/dist/core/AgentError.mjs.map +1 -1
- package/dist/core/FailureDiagnostic.d.mts +2 -0
- package/dist/core/FailureDiagnostic.mjs +2 -0
- package/dist/core/Worker.d.mts +1 -1
- package/dist/core/Worker.mjs +4 -1
- package/dist/core/Worker.mjs.map +1 -1
- package/dist/durable/ActivityStore.d.mts +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 +1 -1
- package/dist/durable/Digest.d.mts +1 -1
- package/dist/durable/Digest.mjs +7 -7
- package/dist/durable/Digest.mjs.map +1 -1
- package/dist/durable/DurableAgentRuntime.d.mts +1 -1
- package/dist/durable/DurableAgentRuntime.mjs +1 -1
- package/dist/durable/EventSource.d.mts +1 -1
- package/dist/durable/EventSource.mjs +1 -1
- package/dist/durable/GitHubWorkflowSource.d.mts +3 -3
- package/dist/durable/GitHubWorkflowSource.mjs +1 -1
- package/dist/durable/MessageDelivery.d.mts +15 -3
- package/dist/durable/MessageDelivery.mjs +44 -24
- package/dist/durable/MessageDelivery.mjs.map +1 -1
- package/dist/durable/MessageDeliveryStoreConformance.d.mts +4 -1
- package/dist/durable/MessageDeliveryStoreConformance.mjs +1 -1
- package/dist/durable/PersistentHistory.d.mts +1 -1
- package/dist/durable/PersistentHistory.mjs +2 -2
- package/dist/durable/PreparedInputAdmission.d.mts +1 -1
- package/dist/durable/PreparedInputAdmission.mjs +8 -4
- package/dist/durable/PreparedInputAdmission.mjs.map +1 -1
- package/dist/durable/Records.d.mts +1 -1
- package/dist/durable/Records.mjs +831 -2
- package/dist/durable/Records.mjs.map +1 -0
- package/dist/durable/Recovery.d.mts +1 -1
- package/dist/durable/Recovery.mjs +1 -1
- package/dist/durable/RunJournal.d.mts +1 -1
- package/dist/durable/RunJournal.mjs +1 -1
- package/dist/durable/Schedule.d.mts +1 -1
- package/dist/durable/Schedule.mjs +12 -3
- package/dist/durable/Schedule.mjs.map +1 -1
- package/dist/durable/ScheduleStoreConformance.d.mts +1 -1
- package/dist/durable/ScheduleStoreConformance.mjs +1 -1
- package/dist/durable/ScheduleTransition.d.mts +1 -1
- package/dist/durable/ScheduleTransition.mjs +1 -1
- package/dist/durable/Scheduling.d.mts +2 -2
- package/dist/durable/Scheduling.mjs +1 -1
- package/dist/durable/SqlMessageDeliveryStore.mjs +13 -11
- package/dist/durable/SqlMessageDeliveryStore.mjs.map +1 -1
- package/dist/durable/SqlStorageV2Upgrade.d.mts +2 -2
- package/dist/durable/SqlStorageV2Upgrade.mjs +1 -1
- package/dist/durable/SqlSubscriptionStore.d.mts +2 -2
- package/dist/durable/SqlSubscriptionStore.mjs +1 -1
- package/dist/durable/SqlThreadNativeReads.d.mts +1 -1
- package/dist/durable/SqlThreadNativeReads.mjs +2 -2
- package/dist/durable/SubmissionLedger.d.mts +1 -1
- package/dist/durable/SubmissionLedger.mjs +6 -3
- package/dist/durable/SubmissionLedger.mjs.map +1 -1
- package/dist/durable/SubmissionLedgerConformance.d.mts +1 -1
- package/dist/durable/SubmissionLedgerConformance.mjs +1 -1
- package/dist/durable/SubmissionStatus.d.mts +1 -1
- package/dist/durable/Subscription.d.mts +1 -1
- package/dist/durable/Subscription.mjs +1 -1
- package/dist/durable/SubscriptionInput.d.mts +1 -1
- package/dist/durable/SubscriptionInput.mjs +2 -2
- package/dist/durable/SubscriptionStoreConformance.d.mts +1 -1
- package/dist/durable/SubscriptionStoreConformance.mjs +1 -1
- package/dist/durable/SubscriptionTools.d.mts +3 -3
- 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 +1 -1
- package/dist/durable/ThreadContextHistory.d.mts +1 -1
- package/dist/durable/ThreadContextHistory.mjs +1 -1
- package/dist/durable/ThreadContextHistoryProjection.d.mts +1 -1
- package/dist/durable/ThreadContextHistoryProjection.mjs +1 -1
- package/dist/durable/ThreadInvariants.d.mts +1 -1
- package/dist/durable/ThreadInvariants.mjs +2 -2
- package/dist/durable/ThreadProjection.d.mts +1 -1
- package/dist/durable/ThreadProjection.mjs +1 -1
- package/dist/durable/ThreadProjectionMaintenance.d.mts +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 +1 -1
- package/dist/durable/ToolReconciler.mjs +1 -1
- package/dist/durable/WorkerHost.d.mts +3 -3
- 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/Output.d.mts +1 -1
- package/dist/engine/RunOptions.d.mts +1 -1
- package/dist/engine/RunOptions.mjs +2 -0
- package/dist/engine/RunOptions.mjs.map +1 -1
- package/dist/engine/SubagentHost.d.mts +1 -1
- package/dist/engine/SubagentHost.mjs.map +1 -1
- package/dist/index.d.mts +18 -17
- package/dist/index.mjs +8 -7
- package/package.json +1 -1
- package/src/capabilities/internal/subagent-background.ts +66 -23
- package/src/capabilities/internal/subagent-contract.ts +4 -0
- package/src/core/AgentError.ts +20 -0
- package/src/core/FailureDiagnostic.ts +343 -0
- package/src/core/Worker.ts +4 -1
- package/src/durable/Digest.ts +22 -28
- package/src/durable/DurableAgentRuntime.ts +37 -13
- package/src/durable/MessageDelivery.ts +82 -24
- package/src/durable/PreparedInputAdmission.ts +17 -4
- package/src/durable/Records.ts +5 -15
- package/src/durable/Schedule.ts +11 -2
- package/src/durable/SqlMessageDeliveryStore.ts +21 -9
- package/src/durable/SubmissionLedger.ts +4 -1
- package/src/durable/internal/agent-registration.ts +46 -14
- package/src/durable/internal/worker-host.ts +32 -19
- package/src/engine/RunOptions.ts +11 -3
- package/src/engine/SubagentHost.ts +3 -0
- package/src/engine/internal/agent-runtime.ts +23 -16
- package/src/index.ts +1 -0
- package/dist/AgentRuntime-BWOnNc0d.mjs.map +0 -1
- package/dist/DurableAgentRuntime-C9eRZS9N.mjs.map +0 -1
- package/dist/Records-D8167fHn.mjs +0 -844
- package/dist/Records-D8167fHn.mjs.map +0 -1
- package/dist/Subagent-C2s8PFrd.mjs.map +0 -1
- package/dist/agent-registration-ByeHejH3.mjs.map +0 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { t as AgentId } from "./Identifiers-CN2s30fF.mjs";
|
|
2
2
|
import { i as UpdateError, n as Emitter } from "./AgentUpdates-DMJ-_xow.mjs";
|
|
3
3
|
import { r as Configuration } from "./ToolExposure-r2eOWk4F.mjs";
|
|
4
|
-
import { a as AgentInputError, l as AgentRunDispositionError, s as AgentOutputError } from "./AgentError-
|
|
4
|
+
import { a as AgentInputError, l as AgentRunDispositionError, s as AgentOutputError } from "./AgentError-Bn1ytXRD.mjs";
|
|
5
5
|
import { n as AgentPolicyInput, t as AgentPolicy } from "./AgentPolicy-BqDoSXO6.mjs";
|
|
6
6
|
import { AiError, LanguageModel, Model, Prompt, Tool, Toolkit } from "effect/unstable/ai";
|
|
7
7
|
import { Effect, Layer, Option, Schema } from "effect";
|
|
@@ -223,4 +223,4 @@ declare function make<const Name extends string, InputSchema extends Schema.Top,
|
|
|
223
223
|
declare const withModel: <DefinitionValue extends AnyDefinition, ModelValue>(definition: DefinitionValue, model: NativeModel<ModelValue>) => Binding<DefinitionValue, ModelValue>;
|
|
224
224
|
//#endregion
|
|
225
225
|
export { Tools as A, Requirements as C, RunDispositionSchema as D, RunDispositionFailure as E, withModel as F, UpdatesSchema as M, inspectTools as N, ToolInspection as O, make as P, OutputSchema as S, RunDispositionDeclaration as T, InstructionSource as _, CompletionFromToolDeclaration as a, NativeModel as b, Definition as c, EncodedInput as d, Failure as f, InstructionResult as g, InputSchema as h, Binding as i, Update as j, ToolUnion 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, ModelServices as v, RunDisposition as w, Output as x, Name as y };
|
|
226
|
-
//# sourceMappingURL=Agent-
|
|
226
|
+
//# sourceMappingURL=Agent-Bk-mLtov.d.mts.map
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
import { a as FailureDiagnostic_d_exports, r as Diagnostic } from "./FailureDiagnostic-CaAkzGHL.mjs";
|
|
1
2
|
import { Schema } from "effect";
|
|
2
3
|
declare namespace AgentError_d_exports {
|
|
3
|
-
export { AgentApprovalDenied, AgentApprovalPending, AgentError, AgentInputError, AgentInterrupted, AgentOutputError, AgentPolicyError, AgentRunDispositionError, AgentToolAuthorizationDenied, ContextBudgetError, ContextOverflowError, ModelProtocolError, PolicyLimit };
|
|
4
|
+
export { AgentApprovalDenied, AgentApprovalPending, AgentError, AgentInputError, AgentInterrupted, AgentOutputError, AgentPolicyError, AgentRunDispositionError, AgentToolAuthorizationCheckError, AgentToolAuthorizationDenied, ContextBudgetError, ContextOverflowError, ModelProtocolError, PolicyLimit };
|
|
4
5
|
}
|
|
5
6
|
declare const AgentInputError_base: Schema.Class<AgentInputError, Schema.TaggedStruct<"AgentInputError", {
|
|
6
7
|
readonly message: Schema.String;
|
|
@@ -45,9 +46,24 @@ declare const AgentToolAuthorizationDenied_base: Schema.Class<AgentToolAuthoriza
|
|
|
45
46
|
readonly toolCallId: Schema.brand<Schema.NonEmptyString, "@effect-agent/core/ToolCallId">;
|
|
46
47
|
readonly toolName: Schema.NonEmptyString;
|
|
47
48
|
readonly message: Schema.String;
|
|
49
|
+
/** Optional original policy evidence, excluded from model-facing ToolCallFailed data. */
|
|
50
|
+
readonly cause: Schema.optionalKey<Schema.decodeTo<Schema.declare<import("effect/Cause").Cause<unknown>, import("effect/Cause").Cause<unknown>>, Schema.Cause<Schema.decodeTo<Schema.Unknown, Schema.Codec<Diagnostic, Diagnostic, never, never>, never, never>, Schema.decodeTo<Schema.Unknown, Schema.Codec<Diagnostic, Diagnostic, never, never>, never, never>>, never, never>>;
|
|
51
|
+
readonly stack: Schema.optionalKey<Schema.String>;
|
|
48
52
|
}>, import("effect/Cause").YieldableError>;
|
|
49
53
|
/** A host denied current execution authority for a Tool Call before its Handler started. */
|
|
50
54
|
declare class AgentToolAuthorizationDenied extends AgentToolAuthorizationDenied_base {}
|
|
55
|
+
declare const AgentToolAuthorizationCheckError_base: Schema.Class<AgentToolAuthorizationCheckError, Schema.TaggedStruct<"AgentToolAuthorizationCheckError", {
|
|
56
|
+
readonly toolCallId: Schema.brand<Schema.NonEmptyString, "@effect-agent/core/ToolCallId">;
|
|
57
|
+
readonly toolName: Schema.NonEmptyString;
|
|
58
|
+
/** Safe summary. The original cause is private diagnostic evidence. */
|
|
59
|
+
readonly message: Schema.String;
|
|
60
|
+
readonly check: Schema.optionalKey<Schema.String>;
|
|
61
|
+
readonly callId: Schema.optionalKey<Schema.String>;
|
|
62
|
+
readonly cause: Schema.decodeTo<Schema.declare<import("effect/Cause").Cause<unknown>, import("effect/Cause").Cause<unknown>>, Schema.Cause<Schema.decodeTo<Schema.Unknown, Schema.Codec<Diagnostic, Diagnostic, never, never>, never, never>, Schema.decodeTo<Schema.Unknown, Schema.Codec<Diagnostic, Diagnostic, never, never>, never, never>>, never, never>;
|
|
63
|
+
readonly stack: Schema.optionalKey<Schema.String>;
|
|
64
|
+
}>, import("effect/Cause").YieldableError>;
|
|
65
|
+
/** The host could not complete its authority check; this is not a policy denial. */
|
|
66
|
+
declare class AgentToolAuthorizationCheckError extends AgentToolAuthorizationCheckError_base {}
|
|
51
67
|
declare const AgentApprovalPending_base: Schema.Class<AgentApprovalPending, Schema.TaggedStruct<"AgentApprovalPending", {
|
|
52
68
|
readonly approvalId: Schema.NonEmptyString;
|
|
53
69
|
readonly toolCallId: Schema.brand<Schema.NonEmptyString, "@effect-agent/core/ToolCallId">;
|
|
@@ -94,8 +110,8 @@ declare const ContextBudgetError_base: Schema.Class<ContextBudgetError, Schema.T
|
|
|
94
110
|
/** Local context preparation could not fit a legal prompt inside its target before provider I/O. */
|
|
95
111
|
declare class ContextBudgetError extends ContextBudgetError_base {}
|
|
96
112
|
/** Schema for framework-owned agent errors; application and Effect AI failures remain separate. */
|
|
97
|
-
declare const AgentError: Schema.Union<readonly [typeof AgentInputError, typeof AgentOutputError, typeof AgentRunDispositionError, typeof AgentPolicyError, typeof AgentApprovalDenied, typeof AgentToolAuthorizationDenied, typeof AgentApprovalPending, typeof ModelProtocolError, typeof AgentInterrupted, typeof ContextOverflowError, typeof ContextBudgetError]>;
|
|
113
|
+
declare const AgentError: Schema.Union<readonly [typeof AgentInputError, typeof AgentOutputError, typeof AgentRunDispositionError, typeof AgentPolicyError, typeof AgentApprovalDenied, typeof AgentToolAuthorizationDenied, typeof AgentToolAuthorizationCheckError, typeof AgentApprovalPending, typeof ModelProtocolError, typeof AgentInterrupted, typeof ContextOverflowError, typeof ContextBudgetError]>;
|
|
98
114
|
type AgentError = typeof AgentError.Type;
|
|
99
115
|
//#endregion
|
|
100
|
-
export { AgentInputError as a, AgentPolicyError as c,
|
|
101
|
-
//# sourceMappingURL=AgentError-
|
|
116
|
+
export { AgentInputError as a, AgentPolicyError as c, AgentToolAuthorizationDenied as d, ContextBudgetError as f, PolicyLimit as h, AgentError_d_exports as i, AgentRunDispositionError as l, ModelProtocolError as m, AgentApprovalPending as n, AgentInterrupted as o, ContextOverflowError as p, AgentError as r, AgentOutputError as s, AgentApprovalDenied as t, AgentToolAuthorizationCheckError as u };
|
|
117
|
+
//# sourceMappingURL=AgentError-Bn1ytXRD.d.mts.map
|
|
@@ -6,16 +6,16 @@ import { l as RunEvent } from "./RunEvent-DIrzkjLr.mjs";
|
|
|
6
6
|
import { n as ThreadHistoryError, t as ThreadHistory } from "./ThreadHistory-tS1KwxHR.mjs";
|
|
7
7
|
import { n as CurrentToolCatalog } from "./ToolExposure-UCN12eCd.mjs";
|
|
8
8
|
import { s as ToolBroker } from "./ToolBroker-DWs4tZra.mjs";
|
|
9
|
-
import { a as AgentInputError, c as AgentPolicyError, d as
|
|
9
|
+
import { a as AgentInputError, c as AgentPolicyError, d as AgentToolAuthorizationDenied, f as ContextBudgetError, m as ModelProtocolError, n as AgentApprovalPending, p as ContextOverflowError, s as AgentOutputError, t as AgentApprovalDenied, u as AgentToolAuthorizationCheckError } from "./AgentError-Bn1ytXRD.mjs";
|
|
10
10
|
import { t as AgentPolicy } from "./AgentPolicy-BqDoSXO6.mjs";
|
|
11
|
-
import { C as Requirements, D as RunDispositionSchema, E as RunDispositionFailure, M as UpdatesSchema, S as OutputSchema, T as RunDispositionDeclaration, _ as InstructionSource, a as CompletionFromToolDeclaration, c as Definition, d as EncodedInput, f as Failure, k as ToolUnion, m as InputPromptSource, n as Any, r as AnyDefinition, s as CompletionToolDeclaration, t as Agent_d_exports, x as Output } from "./Agent-
|
|
12
|
-
import { n as WorkerBudgetScope } from "./Worker
|
|
11
|
+
import { C as Requirements, D as RunDispositionSchema, E as RunDispositionFailure, M as UpdatesSchema, S as OutputSchema, T as RunDispositionDeclaration, _ as InstructionSource, a as CompletionFromToolDeclaration, c as Definition, d as EncodedInput, f as Failure, k as ToolUnion, m as InputPromptSource, n as Any, r as AnyDefinition, s as CompletionToolDeclaration, t as Agent_d_exports, x as Output } from "./Agent-Bk-mLtov.mjs";
|
|
12
|
+
import { n as WorkerBudgetScope } from "./Worker-Bbj9uq5H.mjs";
|
|
13
13
|
import { a as ContextWindow } from "./ContextWindow-DRQ5Mbm2.mjs";
|
|
14
14
|
import { n as CompactionError } from "./ContextCompactor-WwSIG_Z2.mjs";
|
|
15
15
|
import { t as DurableStep } from "./DurableStep-Cry_iol4.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 { i 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-qOcPv08p.mjs";
|
|
17
|
+
import { t as MessagingHost } from "./MessagingHost-nwBMdRoh.mjs";
|
|
18
|
+
import { i as SubagentHost } from "./SubagentHost-DEPw4YME.mjs";
|
|
19
19
|
import { t as RunEventSink } from "./RunEventSink-D5aVhISG.mjs";
|
|
20
20
|
import { AiError, LanguageModel, Model, Prompt, Tool, Toolkit } from "effect/unstable/ai";
|
|
21
21
|
import { Cause, Context, Effect, Layer, Option, Schema, Scope, Stream, Tracer } from "effect";
|
|
@@ -78,7 +78,7 @@ declare const AgentResultSchema: <Output extends Schema.Top>(output: Output) =>
|
|
|
78
78
|
/** Decoded terminal value produced by reducing a completed agent event stream. */
|
|
79
79
|
type AgentResult<Output> = ReturnType<typeof AgentResultSchema<Schema.Schema<Output>>>["Type"];
|
|
80
80
|
/** Expected agent, policy, and model-protocol failures exposed by the runtime. */
|
|
81
|
-
type AgentRuntimeFailure<AgentValue extends AnyDefinition | Any, HookError = never, InstructionError = never> = Failure<AgentValue> | ([UpdatesSchema<AgentValue>] extends [never] ? never : UpdateError) | AgentPolicyError | ContextBudgetError | ContextOverflowError | CompactionError | RunContextPreparationError | ModelProtocolError | AgentApprovalDenied | AgentToolAuthorizationDenied | AgentApprovalPending | AgentChildPending | ThreadHistoryError | HookError | InstructionError;
|
|
81
|
+
type AgentRuntimeFailure<AgentValue extends AnyDefinition | Any, HookError = never, InstructionError = never> = Failure<AgentValue> | ([UpdatesSchema<AgentValue>] extends [never] ? never : UpdateError) | AgentPolicyError | ContextBudgetError | ContextOverflowError | CompactionError | RunContextPreparationError | AgentToolAuthorizationCheckError | ModelProtocolError | AgentApprovalDenied | AgentToolAuthorizationDenied | AgentApprovalPending | AgentChildPending | ThreadHistoryError | HookError | InstructionError;
|
|
82
82
|
/**
|
|
83
83
|
* Services the engine itself provides locally to every Run: `AgentSpawner`
|
|
84
84
|
* bound to the Run's immutable identity and delegation depth, `RunEventSink`
|
|
@@ -343,4 +343,4 @@ declare namespace AgentRuntime_d_exports {
|
|
|
343
343
|
}
|
|
344
344
|
//#endregion
|
|
345
345
|
export { start as A, decodeFinalOutput as C, renderInputPrompt as D, projectCompletionOutput as E, withTerminalDefectEvent as F, stream as M, streamUnknown as N, run as O, streamWithUsageAccountingUnknown as P, ToolCallWaiting as S, projectCompletionFromToolOutput 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, startUnknown as j, runUnknown 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 };
|
|
346
|
-
//# sourceMappingURL=AgentRuntime-
|
|
346
|
+
//# sourceMappingURL=AgentRuntime-BEXToYl1.d.mts.map
|
|
@@ -901,7 +901,7 @@ const modelResponseCodecFor = (toolkit) => {
|
|
|
901
901
|
modelResponseCodecs.set(toolkit, codec);
|
|
902
902
|
return codec;
|
|
903
903
|
};
|
|
904
|
-
const ownModelResponsePartGeneral = Effect.
|
|
904
|
+
const ownModelResponsePartGeneral = Effect.fnUntraced(function* (part, toolkit, usage, limits) {
|
|
905
905
|
if (usage.responsePartCount >= limits.maxModelResponseParts) return yield* ModelProtocolError.make({ message: `Model response exceeded the ${limits.maxModelResponseParts}-part response limit` });
|
|
906
906
|
if (boundedValueFootprint(part, limits.maxModelResponseBytes - usage.responsePartBytes, knownSafeModelResponsePrototypes) === void 0) {
|
|
907
907
|
const preflight = schemaClassToolPartPreflight(part, toolkit);
|
|
@@ -1300,7 +1300,8 @@ const preflightToolAuthorization = (context, turnId, turn, call, options, annota
|
|
|
1300
1300
|
const denied = AgentToolAuthorizationDenied.make({
|
|
1301
1301
|
toolCallId: call.toolCallId,
|
|
1302
1302
|
toolName: call.toolName,
|
|
1303
|
-
message: decision.reason
|
|
1303
|
+
message: decision.reason,
|
|
1304
|
+
...decision.cause === void 0 ? {} : { cause: decision.cause }
|
|
1304
1305
|
});
|
|
1305
1306
|
return Stream.fromEffect(Effect.map(eventBase(context), (base) => ToolCallFailed.make({
|
|
1306
1307
|
...base,
|
|
@@ -4687,4 +4688,4 @@ var AgentRuntime_exports = /* @__PURE__ */ __exportAll({
|
|
|
4687
4688
|
//#endregion
|
|
4688
4689
|
export { stream as _, SubagentDurability as a, withTerminalDefectEvent as b, decodeFinalOutput as c, projectCompletionOutput as d, renderInputPrompt as f, startUnknown as g, start as h, AgentSpawner as i, encodeRunDisposition as l, runUnknown as m, AgentChildPending as n, SubagentDurabilityError as o, run as p, AgentResultSchema as r, ToolCallWaiting as s, AgentRuntime_exports as t, projectCompletionFromToolOutput as u, streamUnknown as v, streamWithUsageAccountingUnknown as y };
|
|
4689
4690
|
|
|
4690
|
-
//# sourceMappingURL=AgentRuntime-
|
|
4691
|
+
//# sourceMappingURL=AgentRuntime-e2M5UoXn.mjs.map
|