agents 0.23.0 → 0.25.0
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-routing-DE5zmCQ8.d.ts → agent-routing-0DR0Tk2v.d.ts} +270 -190
- package/dist/agent-routing.d.ts +1 -1
- package/dist/agent-routing.js.map +1 -1
- package/dist/agent-tool-types.d.ts +13 -7
- package/dist/agent-tool-types.js +23 -1
- package/dist/agent-tool-types.js.map +1 -1
- package/dist/{agent-tools-y7zLfw4Q.js → agent-tools-CdJC-8Dc.js} +72 -9
- package/dist/agent-tools-CdJC-8Dc.js.map +1 -0
- package/dist/{agent-tools-DtXMTDGM.d.ts → agent-tools-YrATZJu2.d.ts} +29 -15
- package/dist/agent-tools.d.ts +6 -4
- package/dist/agent-tools.js.map +1 -1
- package/dist/ai-fm7xx1BK.js +312 -0
- package/dist/ai-fm7xx1BK.js.map +1 -0
- package/dist/base64-redaction-C1Uu29t5.js +59 -0
- package/dist/base64-redaction-C1Uu29t5.js.map +1 -0
- package/dist/browser/ai-sdk.d.ts +90 -0
- package/dist/browser/ai-sdk.js +51 -0
- package/dist/browser/ai-sdk.js.map +1 -0
- package/dist/browser/ai.d.ts +4 -4
- package/dist/browser/ai.js +1 -347
- package/dist/browser/index.d.ts +81 -79
- package/dist/browser/index.js +361 -2
- package/dist/browser/index.js.map +1 -0
- package/dist/browser/tanstack-ai.d.ts +96 -1
- package/dist/browser/tanstack-ai.js +62 -2
- package/dist/browser/tanstack-ai.js.map +1 -1
- package/dist/browser-DE3d-RLk.d.ts +275 -0
- package/dist/browser-tool-CQ10e6Kj.js +480 -0
- package/dist/browser-tool-CQ10e6Kj.js.map +1 -0
- package/dist/browser-tool-DuNdlwZ9.d.ts +73 -0
- package/dist/{capability-BjSKYpzg.js → capability-B4WbF81e.js} +2 -1
- package/dist/capability-B4WbF81e.js.map +1 -0
- package/dist/{capability-runner-Be_-PLR1.d.ts → capability-runner-DBAnGr6L.d.ts} +45 -15
- package/dist/chat/index.d.ts +341 -232
- package/dist/chat/index.js +602 -72
- package/dist/chat/index.js.map +1 -1
- package/dist/chat/react.d.ts +42 -2
- package/dist/chat/react.js +191 -35
- package/dist/chat/react.js.map +1 -1
- package/dist/chat/transport.d.ts +1 -1
- package/dist/chat/transport.js +1 -1
- package/dist/chat-sdk/index.d.ts +17 -3
- package/dist/chat-sdk/index.js +28 -2
- package/dist/chat-sdk/index.js.map +1 -1
- package/dist/client-4OlMIJx-.js +591 -0
- package/dist/client-4OlMIJx-.js.map +1 -0
- package/dist/{client-jagG8a9_.js → client-fyQrLGkD.js} +2 -2
- package/dist/{client-jagG8a9_.js.map → client-fyQrLGkD.js.map} +1 -1
- package/dist/client-je3koD9Z.d.ts +446 -0
- package/dist/client.d.ts +29 -283
- package/dist/client.js +2 -274
- package/dist/{connector-CptFKzRh.js → connector-58XDGvc3.js} +251 -120
- package/dist/connector-58XDGvc3.js.map +1 -0
- package/dist/{connector-CkQD4MK3.d.ts → connector-Cl-VqPmA.d.ts} +244 -146
- package/dist/context/index.d.ts +29 -0
- package/dist/context/index.js +64 -17
- package/dist/context/index.js.map +1 -1
- package/dist/current-agent-DhoDkSnH.js.map +1 -1
- package/dist/current-agent-vAk_5JMt.d.ts +93 -0
- package/dist/{current-agent-Da_C9a3b.d.ts → durable-object-lifecycle-HhgOMWq9.d.ts} +26 -127
- package/dist/harnesses/pi/index.d.ts +348 -0
- package/dist/harnesses/pi/index.js +754 -0
- package/dist/harnesses/pi/index.js.map +1 -0
- package/dist/images-iiTDSyRu.js +1631 -0
- package/dist/images-iiTDSyRu.js.map +1 -0
- package/dist/index-BreL0YrQ.d.ts +78 -0
- package/dist/index-kbSUIer3.d.ts +343 -0
- package/dist/index.d.ts +43 -41
- package/dist/index.js +2 -2
- package/dist/internal_context.d.ts +1 -1
- package/dist/lifecycle/index.d.ts +19 -17
- package/dist/lifecycle/index.js +2 -2
- package/dist/{lifecycle-CMRGjZdw.js → lifecycle-CFu6OV03.js} +73 -29
- package/dist/lifecycle-CFu6OV03.js.map +1 -0
- package/dist/mcp/client/index.d.ts +20 -20
- package/dist/mcp/client/index.js +1 -1
- package/dist/mcp/client/x402.js +21 -19
- package/dist/mcp/client/x402.js.map +1 -1
- package/dist/mcp/index.d.ts +35 -35
- package/dist/mcp/index.js +2 -2
- package/dist/{message-builder-BymO4N_D.js → message-builder-DAl9AhHH.js} +89 -4
- package/dist/message-builder-DAl9AhHH.js.map +1 -0
- package/dist/models/ai-sdk/index.d.ts +353 -0
- package/dist/models/ai-sdk/index.js +2443 -0
- package/dist/models/ai-sdk/index.js.map +1 -0
- package/dist/models/pi-ai/index.d.ts +313 -0
- package/dist/models/pi-ai/index.js +1795 -0
- package/dist/models/pi-ai/index.js.map +1 -0
- package/dist/observability/ai/index.js +20 -4
- package/dist/observability/ai/index.js.map +1 -1
- package/dist/{protocol-B0nh6KNf.js → protocol-kHsr-f0X.js} +26 -12
- package/dist/{protocol-B0nh6KNf.js.map → protocol-kHsr-f0X.js.map} +1 -1
- package/dist/queue/index.d.ts +123 -0
- package/dist/queue/index.js +2 -0
- package/dist/queue-BB-zfIYF.js +406 -0
- package/dist/queue-BB-zfIYF.js.map +1 -0
- package/dist/react.d.ts +31 -13
- package/dist/react.js +190 -71
- package/dist/react.js.map +1 -1
- package/dist/{retries-D9Ds-1lz.d.ts → retries-CV6AkXmQ.d.ts} +23 -8
- package/dist/retries.d.ts +12 -8
- package/dist/retries.js +19 -1
- package/dist/retries.js.map +1 -1
- package/dist/routing/index.d.ts +2 -2
- package/dist/routing/index.js +1 -1
- package/dist/{scheduler-DD9NdYbF.js → scheduler-DZ3xQfeK.js} +4 -11
- package/dist/scheduler-DZ3xQfeK.js.map +1 -0
- package/dist/{scheduler-Dwh85ZGl.d.ts → scheduler-RdACNXDP.d.ts} +6 -6
- package/dist/schedules/index.d.ts +1 -1
- package/dist/schedules/index.js +1 -1
- package/dist/serializable.d.ts +1 -1
- package/dist/sessions/index.d.ts +70 -3
- package/dist/sessions/index.js +276 -67
- package/dist/sessions/index.js.map +1 -1
- package/dist/skills/index.d.ts +29 -314
- package/dist/socket-address.d.ts +16 -0
- package/dist/socket-address.js +19 -0
- package/dist/socket-address.js.map +1 -0
- package/dist/{src-DlSHshb2.js → src-BZeu-SCD.js} +541 -500
- package/dist/src-BZeu-SCD.js.map +1 -0
- package/dist/state/index.d.ts +6 -0
- package/dist/state/index.js +137 -0
- package/dist/state/index.js.map +1 -0
- package/dist/streams/index.d.ts +1 -1
- package/dist/streams/index.js +1 -1
- package/dist/{streams-D6tJ0NN9.d.ts → streams-Cmkj9QfW.d.ts} +4 -2
- package/dist/{streams-DZKgAj9b.js → streams-DW-UCOUc.js} +9 -2
- package/dist/streams-DW-UCOUc.js.map +1 -0
- package/dist/sub-routing.d.ts +12 -12
- package/dist/tasks/index.d.ts +1 -1
- package/dist/tasks/index.js +1 -1
- package/dist/{tasks-ylZgBjhj.js → tasks-68DESxf0.js} +3 -3
- package/dist/{tasks-ylZgBjhj.js.map → tasks-68DESxf0.js.map} +1 -1
- package/dist/{tasks-BRJ5zgya.d.ts → tasks-9YxYtByh.d.ts} +5 -5
- package/dist/transport-PfFnt-Ld.d.ts +525 -0
- package/dist/transport-protocol-BxyngQ_R.js +25 -0
- package/dist/transport-protocol-BxyngQ_R.js.map +1 -0
- package/dist/transport-protocol-ZTew5Wso.d.ts +27 -0
- package/dist/types-BA4anrjI.d.ts +70 -0
- package/dist/voice/index.d.ts +2 -2
- package/dist/websockets/index.d.ts +195 -69
- package/dist/websockets/index.js +3 -2
- package/dist/websockets-Ci-LZFHH.js +1030 -0
- package/dist/websockets-Ci-LZFHH.js.map +1 -0
- package/dist/wire-types-CnMt6_HR.js.map +1 -1
- package/dist/wire-types-CrjKvDyi.d.ts +300 -0
- package/dist/workflow-types.d.ts +25 -25
- package/dist/workflows.d.ts +21 -21
- package/dist/workflows.js +1 -1
- package/dist/{ws-chat-transport-UNRIS2xl.d.ts → ws-chat-transport-BbT1A5Lc.d.ts} +51 -2
- package/dist/{ws-chat-transport-rWwta645.js → ws-chat-transport-cqMKq3IY.js} +143 -16
- package/dist/ws-chat-transport-cqMKq3IY.js.map +1 -0
- package/docs/agent-class.md +2 -2
- package/docs/agent-tools.md +29 -4
- package/docs/browse-the-web.md +87 -5
- package/docs/chat-agents.md +124 -16
- package/docs/client-sdk.md +30 -0
- package/docs/context.md +27 -0
- package/docs/durable-execution.md +2 -0
- package/docs/harnesses/pi.md +91 -0
- package/docs/human-in-the-loop.md +4 -0
- package/docs/index.md +4 -1
- package/docs/lifecycle.md +114 -23
- package/docs/models-pi-ai.md +325 -0
- package/docs/models.md +504 -0
- package/docs/queue.md +135 -241
- package/docs/resumable-streaming.md +2 -0
- package/docs/retries.md +1 -1
- package/docs/routing.md +13 -13
- package/docs/sessions.md +36 -1
- package/docs/state.md +1 -0
- package/docs/sub-agents.md +12 -3
- package/package.json +51 -3
- package/dist/agent-tools-y7zLfw4Q.js.map +0 -1
- package/dist/browser/ai.js.map +0 -1
- package/dist/capability-BjSKYpzg.js.map +0 -1
- package/dist/client-tools-aIBO0Fk7.d.ts +0 -53
- package/dist/client.js.map +0 -1
- package/dist/connector-CptFKzRh.js.map +0 -1
- package/dist/lifecycle-CMRGjZdw.js.map +0 -1
- package/dist/message-builder-BymO4N_D.js.map +0 -1
- package/dist/scheduler-DD9NdYbF.js.map +0 -1
- package/dist/src-DlSHshb2.js.map +0 -1
- package/dist/streams-DZKgAj9b.js.map +0 -1
- package/dist/websockets-DUfRHPRq.js +0 -502
- package/dist/websockets-DUfRHPRq.js.map +0 -1
- package/dist/ws-chat-transport-rWwta645.js.map +0 -1
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
S as ConnectionContext,
|
|
3
|
+
T as WSMessage,
|
|
4
|
+
_ as LifecycleJobContext,
|
|
5
5
|
o as MemoryLimitContext,
|
|
6
6
|
s as LifecycleCapability,
|
|
7
7
|
t as CapabilityRequestContext,
|
|
8
8
|
u as LifecycleRouteAddress,
|
|
9
|
-
|
|
10
|
-
x as
|
|
11
|
-
} from "./capability-runner-
|
|
12
|
-
import { t as RetryOptions } from "./retries-
|
|
9
|
+
v as LifecycleJobOutcome,
|
|
10
|
+
x as Connection
|
|
11
|
+
} from "./capability-runner-DBAnGr6L.js";
|
|
12
|
+
import { t as RetryOptions } from "./retries-CV6AkXmQ.js";
|
|
13
13
|
import {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
} from "./current-agent-
|
|
14
|
+
r as LifecycleRouteEnvelope,
|
|
15
|
+
t as Lifecycle
|
|
16
|
+
} from "./durable-object-lifecycle-HhgOMWq9.js";
|
|
17
|
+
import { n as CurrentAgentContext } from "./current-agent-vAk_5JMt.js";
|
|
18
18
|
import { t as AgentEmail } from "./internal_context-BlxFEWfn.js";
|
|
19
19
|
import { r as EmailResolver, s as SendEmailOptions } from "./email-7TatiTnl.js";
|
|
20
20
|
import {
|
|
@@ -41,8 +41,10 @@ import {
|
|
|
41
41
|
i as Schedule,
|
|
42
42
|
o as ScheduleOptions,
|
|
43
43
|
t as Scheduler
|
|
44
|
-
} from "./scheduler-
|
|
45
|
-
import {
|
|
44
|
+
} from "./scheduler-RdACNXDP.js";
|
|
45
|
+
import { i as QueueItem } from "./types-BA4anrjI.js";
|
|
46
|
+
import { l as TaskHandlers, r as Tasks } from "./tasks-9YxYtByh.js";
|
|
47
|
+
import { t as State } from "./index-BreL0YrQ.js";
|
|
46
48
|
import { t as CallableMetadata } from "./callable-decorator-DP__HhBA.js";
|
|
47
49
|
import { AsyncLocalStorage } from "node:async_hooks";
|
|
48
50
|
import {
|
|
@@ -405,6 +407,11 @@ type RootFacetRpcSurface = {
|
|
|
405
407
|
connectionId: string,
|
|
406
408
|
state: unknown
|
|
407
409
|
): Promise<unknown>;
|
|
410
|
+
_cf_closeSubAgentConnectionsForPrefix(
|
|
411
|
+
prefix: ReadonlyArray<AgentPathStep>,
|
|
412
|
+
code: number,
|
|
413
|
+
reason: string
|
|
414
|
+
): Promise<void>;
|
|
408
415
|
};
|
|
409
416
|
//#endregion
|
|
410
417
|
//#region src/dynamic-agents/bridges.d.ts
|
|
@@ -547,9 +554,6 @@ interface DynamicAgentHostPort {
|
|
|
547
554
|
): boolean;
|
|
548
555
|
hasSubAgent(className: string, name: string): boolean;
|
|
549
556
|
_cf_resolveSubAgent(className: string, name: string): Promise<unknown>;
|
|
550
|
-
_cf_cleanupFacetPrefix(
|
|
551
|
-
ownerPath: ReadonlyArray<AgentPathStep>
|
|
552
|
-
): Promise<void>;
|
|
553
557
|
_cf_routeLifecycle(
|
|
554
558
|
target: LifecycleRouteAddress | undefined,
|
|
555
559
|
envelope: LifecycleRouteEnvelope
|
|
@@ -561,6 +565,9 @@ interface DynamicAgentHostPort {
|
|
|
561
565
|
readonly tasks: {
|
|
562
566
|
__DO_NOT_USE_WILL_BREAK__cleanupRoutePrefix(prefix: string): Promise<void>;
|
|
563
567
|
};
|
|
568
|
+
readonly _queue: {
|
|
569
|
+
__DO_NOT_USE_WILL_BREAK__cleanupRoutePrefix(prefix: string): Promise<void>;
|
|
570
|
+
};
|
|
564
571
|
/** Local (non-facet-index) durable fiber recovery pass. */
|
|
565
572
|
_checkRunFibers(): Promise<void>;
|
|
566
573
|
/** Overridable RPC entry points — call via the host so subclass overrides intercept. */
|
|
@@ -586,20 +593,12 @@ interface DynamicAgentHostPort {
|
|
|
586
593
|
tag?: string
|
|
587
594
|
): Iterable<Connection<TState>>;
|
|
588
595
|
};
|
|
589
|
-
_ensureConnectionWrapped(connection: Connection): void;
|
|
590
596
|
_unsafe_getConnectionFlag(connection: Connection, key: string): unknown;
|
|
591
597
|
_unsafe_setConnectionFlag(
|
|
592
598
|
connection: Connection,
|
|
593
599
|
key: string,
|
|
594
600
|
value: unknown
|
|
595
601
|
): void;
|
|
596
|
-
readonly _rawStateAccessors: {
|
|
597
|
-
get(connection: Connection):
|
|
598
|
-
| {
|
|
599
|
-
getRaw(): unknown;
|
|
600
|
-
}
|
|
601
|
-
| undefined;
|
|
602
|
-
};
|
|
603
602
|
shouldConnectionBeReadonly(
|
|
604
603
|
connection: Connection,
|
|
605
604
|
context: {
|
|
@@ -613,7 +612,6 @@ interface DynamicAgentHostPort {
|
|
|
613
612
|
request: Request;
|
|
614
613
|
}
|
|
615
614
|
): boolean;
|
|
616
|
-
_setConnectionNoProtocol(connection: Connection): void;
|
|
617
615
|
getConnectionTags(
|
|
618
616
|
connection: Connection,
|
|
619
617
|
context: {
|
|
@@ -692,8 +690,9 @@ declare class DynamicAgentsInternal extends LifecycleCapability {
|
|
|
692
690
|
rootResolvesToSelf(): boolean;
|
|
693
691
|
/**
|
|
694
692
|
* Clean root-owned bookkeeping for a sub-tree of facets: bulk-cancel
|
|
695
|
-
* schedules and routed Task wake mirrors under the
|
|
696
|
-
* and delete root-side facet fiber recovery leases for
|
|
693
|
+
* schedules, queue items, and routed Task wake mirrors under the
|
|
694
|
+
* owner-path prefix, and delete root-side facet fiber recovery leases for
|
|
695
|
+
* the same sub-tree.
|
|
697
696
|
*/
|
|
698
697
|
cleanupPrefix(ownerPath: ReadonlyArray<AgentPathStep>): Promise<void>;
|
|
699
698
|
/**
|
|
@@ -764,6 +763,12 @@ declare class DynamicAgentsInternal extends LifecycleCapability {
|
|
|
764
763
|
* storage. Transitively deletes the child's own children.
|
|
765
764
|
*/
|
|
766
765
|
delete(className: string, name: string): Promise<void>;
|
|
766
|
+
/** Root-side: close sockets whose `/sub/...` target is under `prefix`. */
|
|
767
|
+
closeConnectionsForPrefix(
|
|
768
|
+
prefix: ReadonlyArray<AgentPathStep>,
|
|
769
|
+
code: number,
|
|
770
|
+
reason: string
|
|
771
|
+
): void;
|
|
767
772
|
/** Drop all facet-side virtual connections (test/rehydration hook). */
|
|
768
773
|
clearVirtualConnections(): void;
|
|
769
774
|
/** Facet-side lookup of a virtual connection by id. */
|
|
@@ -3688,6 +3693,20 @@ declare const AGENT_TOOL_PROGRESS_PART = "data-agent-progress";
|
|
|
3688
3693
|
* re-resolves milestone waiters. See `design/rfc-detached-agent-tools.md`.
|
|
3689
3694
|
*/
|
|
3690
3695
|
declare const AGENT_TOOL_MILESTONE_PART = "data-agent-milestone";
|
|
3696
|
+
/**
|
|
3697
|
+
* Whether a chunk body is a progress or milestone frame. These are broadcast
|
|
3698
|
+
* but never written to the child's chunk store, so they have no stored-chunk
|
|
3699
|
+
* position and must not take part in stored-position numbering or dedupe.
|
|
3700
|
+
*/
|
|
3701
|
+
declare function isAgentToolLifecycleChunk(body: string): boolean;
|
|
3702
|
+
/**
|
|
3703
|
+
* Whether a forwarded chunk has no stored-chunk position: a progress or
|
|
3704
|
+
* milestone frame, or a chunk too large to store. Such chunks carry the next
|
|
3705
|
+
* stored position without consuming it.
|
|
3706
|
+
*/
|
|
3707
|
+
declare function isPositionlessAgentToolChunk(
|
|
3708
|
+
chunk: AgentToolStoredChunk
|
|
3709
|
+
): boolean;
|
|
3691
3710
|
/**
|
|
3692
3711
|
* Ephemeral progress signal a running sub-agent emits with `reportProgress`. The
|
|
3693
3712
|
* well-known fields drive generic UI (a bar + status line) with no per-app
|
|
@@ -3854,7 +3873,17 @@ type RunAgentToolOptions<Input = unknown, Self = Record<string, unknown>> = {
|
|
|
3854
3873
|
* must outlive the spawning turn; cancel it explicitly via `cancelAgentTool`.
|
|
3855
3874
|
*/
|
|
3856
3875
|
detached?: boolean | DetachedAgentToolConfig<Self>;
|
|
3876
|
+
/**
|
|
3877
|
+
* Which child events reach the parent's clients. `"full"` (default) forwards
|
|
3878
|
+
* every streamed chunk. `"terminal"` forwards only lifecycle events: started,
|
|
3879
|
+
* progress and milestone frames, and the terminal event. The child still
|
|
3880
|
+
* persists its whole stream, and the parent still tails it for completion,
|
|
3881
|
+
* cancellation, progress and recovery. Use it for a headless parent with no
|
|
3882
|
+
* client watching the child. Not supported with `detached`.
|
|
3883
|
+
*/
|
|
3884
|
+
eventDelivery?: AgentToolEventDelivery;
|
|
3857
3885
|
};
|
|
3886
|
+
type AgentToolEventDelivery = "full" | "terminal";
|
|
3858
3887
|
/**
|
|
3859
3888
|
* Result of dispatching a detached run. Returns immediately after dispatch
|
|
3860
3889
|
* rather than after completion.
|
|
@@ -3918,6 +3947,12 @@ type AgentToolRunInspection<Output = unknown> = {
|
|
|
3918
3947
|
type AgentToolStoredChunk = {
|
|
3919
3948
|
sequence: number;
|
|
3920
3949
|
body: string;
|
|
3950
|
+
/**
|
|
3951
|
+
* Set when the child broadcast this chunk but could not store it (it exceeds
|
|
3952
|
+
* the stored-chunk size limit). The chunk is never replayed, so it carries
|
|
3953
|
+
* the next stored position without consuming it and dedupes on this id.
|
|
3954
|
+
*/
|
|
3955
|
+
unstoredId?: string;
|
|
3921
3956
|
};
|
|
3922
3957
|
type AgentToolChildAdapter<Input = unknown, Output = unknown> = {
|
|
3923
3958
|
startAgentToolRun(
|
|
@@ -3925,11 +3960,23 @@ type AgentToolChildAdapter<Input = unknown, Output = unknown> = {
|
|
|
3925
3960
|
options: {
|
|
3926
3961
|
runId: string;
|
|
3927
3962
|
signal?: AbortSignal;
|
|
3963
|
+
/**
|
|
3964
|
+
* `"terminal"` means no client is watching this run's chunks, so the
|
|
3965
|
+
* child can skip broadcasting them.
|
|
3966
|
+
*/
|
|
3967
|
+
eventDelivery?: AgentToolEventDelivery;
|
|
3928
3968
|
}
|
|
3929
3969
|
): Promise<AgentToolRunInspection<Output>>;
|
|
3930
3970
|
cancelAgentToolRun(runId: string, reason?: unknown): Promise<void>;
|
|
3931
3971
|
inspectAgentToolRun(
|
|
3932
|
-
runId: string
|
|
3972
|
+
runId: string,
|
|
3973
|
+
options?: {
|
|
3974
|
+
/**
|
|
3975
|
+
* `false` reports the stored row as-is instead of first reconciling
|
|
3976
|
+
* (and possibly sealing) a stale run. Defaults to `true`.
|
|
3977
|
+
*/
|
|
3978
|
+
reconcile?: boolean;
|
|
3979
|
+
}
|
|
3933
3980
|
): Promise<AgentToolRunInspection<Output> | null>;
|
|
3934
3981
|
getAgentToolChunks(
|
|
3935
3982
|
runId: string,
|
|
@@ -3957,7 +4004,8 @@ type AgentToolEvent =
|
|
|
3957
4004
|
| {
|
|
3958
4005
|
kind: "chunk";
|
|
3959
4006
|
runId: string;
|
|
3960
|
-
body: string
|
|
4007
|
+
body: string /** See {@link AgentToolStoredChunk.unstoredId}. */;
|
|
4008
|
+
unstoredId?: string;
|
|
3961
4009
|
}
|
|
3962
4010
|
| {
|
|
3963
4011
|
kind: "finished";
|
|
@@ -4083,13 +4131,6 @@ type RPCResponse = {
|
|
|
4083
4131
|
error: string;
|
|
4084
4132
|
}
|
|
4085
4133
|
);
|
|
4086
|
-
type QueueItem<T = string> = {
|
|
4087
|
-
id: string;
|
|
4088
|
-
payload: T;
|
|
4089
|
-
callback: keyof Agent<Cloudflare.Env>;
|
|
4090
|
-
created_at: number;
|
|
4091
|
-
retry?: RetryOptions;
|
|
4092
|
-
};
|
|
4093
4134
|
type DetachedReconcilePayload = {
|
|
4094
4135
|
cadenceIndex?: number;
|
|
4095
4136
|
};
|
|
@@ -4327,9 +4368,9 @@ declare const DEFAULT_AGENT_STATIC_OPTIONS: {
|
|
|
4327
4368
|
/**
|
|
4328
4369
|
* Optional hard wall-clock ceiling (ms) on a single agent-tool re-attach
|
|
4329
4370
|
* (#1630). Caps the total wait even as the no-progress budget re-arms across
|
|
4330
|
-
* stream-closes. Defaults to `Infinity` (no implicit cap),
|
|
4331
|
-
*
|
|
4332
|
-
*
|
|
4371
|
+
* stream-closes. Defaults to `Infinity` (no implicit cap, #1672): a healthy,
|
|
4372
|
+
* still-advancing child is followed for as long as it makes progress — a
|
|
4373
|
+
* hung child is bounded by
|
|
4333
4374
|
* the no-progress budget, and a content-runaway by the child's own
|
|
4334
4375
|
* `maxRecoveryWork` / `shouldKeepRecovering`. Set a finite value to impose a
|
|
4335
4376
|
* wall-clock cap (which also tears the child down on `window-exceeded`).
|
|
@@ -4399,9 +4440,9 @@ interface AgentStaticOptions {
|
|
|
4399
4440
|
/**
|
|
4400
4441
|
* Optional hard wall-clock ceiling in milliseconds on a single agent-tool
|
|
4401
4442
|
* re-attach (#1630). Caps the total wait even as the no-progress budget
|
|
4402
|
-
* re-arms across stream-closes. Default: `Infinity` (no implicit cap
|
|
4403
|
-
*
|
|
4404
|
-
*
|
|
4443
|
+
* re-arms across stream-closes. Default: `Infinity` (no implicit cap,
|
|
4444
|
+
* #1672) — a healthy, still-advancing child is followed for as long as it
|
|
4445
|
+
* makes progress, exactly
|
|
4405
4446
|
* as on the live (never-evicted) path. Set a finite value to impose a
|
|
4406
4447
|
* wall-clock cap (which also tears the child down on `window-exceeded`); `0`
|
|
4407
4448
|
* also disables the ceiling.
|
|
@@ -4466,12 +4507,12 @@ type WorkflowName<E> = WorkflowBinding<E> | (string & {});
|
|
|
4466
4507
|
/**
|
|
4467
4508
|
* Base class for creating Agent implementations
|
|
4468
4509
|
* @template Env Environment type containing bindings
|
|
4469
|
-
* @template
|
|
4510
|
+
* @template TState State type to store within the Agent
|
|
4470
4511
|
*/
|
|
4471
4512
|
declare class Agent<
|
|
4472
4513
|
Env extends Cloudflare.Env = Cloudflare.Env,
|
|
4473
|
-
|
|
4474
|
-
Props extends
|
|
4514
|
+
TState = unknown,
|
|
4515
|
+
Props extends object = object
|
|
4475
4516
|
> extends DurableObject<Env> {
|
|
4476
4517
|
/**
|
|
4477
4518
|
* Runtime lifecycle and reusable durable capabilities for this Agent.
|
|
@@ -4489,6 +4530,16 @@ declare class Agent<
|
|
|
4489
4530
|
* from paths that do not pass through the capability (facet bridging,
|
|
4490
4531
|
* direct calls).
|
|
4491
4532
|
*/
|
|
4533
|
+
/**
|
|
4534
|
+
* Durable state: the `cf_agents_state` row, lazy load, validated persistence.
|
|
4535
|
+
* `initialState` stays on Agent (a subclass field, initialized after this
|
|
4536
|
+
* one) and is seeded by the `state` getter. Typed `<unknown>` rather than
|
|
4537
|
+
* `<TState>` because `TState` appears in both `get()` and `set()` positions,
|
|
4538
|
+
* which would make `Agent`'s own `TState` parameter invariant and break
|
|
4539
|
+
* `Subclass -> Agent<Env, unknown>` assignability; the typed boundary is
|
|
4540
|
+
* re-established in `state` / `setState`.
|
|
4541
|
+
*/
|
|
4542
|
+
readonly _state: State<unknown>;
|
|
4492
4543
|
private readonly _webSockets;
|
|
4493
4544
|
/** Run user initialization after lifecycle components have started. */
|
|
4494
4545
|
onStart(_props?: Props): void | Promise<void>;
|
|
@@ -4515,7 +4566,6 @@ declare class Agent<
|
|
|
4515
4566
|
): string[] | Promise<string[]>;
|
|
4516
4567
|
/** @internal Ensure lifecycle startup before a native RPC implementation. */
|
|
4517
4568
|
__unsafe_ensureInitialized(props?: Props): Promise<void>;
|
|
4518
|
-
private _state;
|
|
4519
4569
|
private _disposables;
|
|
4520
4570
|
private _destroyed;
|
|
4521
4571
|
/**
|
|
@@ -4523,7 +4573,6 @@ declare class Agent<
|
|
|
4523
4573
|
* Used by internal flag methods (readonly, no-protocol) to read/write
|
|
4524
4574
|
* _cf_-prefixed keys without going through the user-facing state/setState.
|
|
4525
4575
|
*/
|
|
4526
|
-
private _rawStateAccessors;
|
|
4527
4576
|
/**
|
|
4528
4577
|
* Cached persistence-hook dispatch mode, computed once in the constructor.
|
|
4529
4578
|
* - "new" → call onStateChanged
|
|
@@ -4616,6 +4665,12 @@ declare class Agent<
|
|
|
4616
4665
|
* cancelSchedule() methods are the stable surface.
|
|
4617
4666
|
*/
|
|
4618
4667
|
readonly scheduler: Scheduler;
|
|
4668
|
+
/**
|
|
4669
|
+
* Durable background-work capability installed into this Agent's
|
|
4670
|
+
* Lifecycle. Agent's queue()/dequeue()/dequeueAll()/dequeueAllByCallback()/
|
|
4671
|
+
* getQueue()/getQueues() methods are its surface.
|
|
4672
|
+
*/
|
|
4673
|
+
private readonly _queue;
|
|
4619
4674
|
/**
|
|
4620
4675
|
* Durable replayable execution capability installed into this Agent's
|
|
4621
4676
|
* Lifecycle. Declare definitions on the overridable
|
|
@@ -4647,7 +4702,7 @@ declare class Agent<
|
|
|
4647
4702
|
* Initial state for the Agent
|
|
4648
4703
|
* Override to provide default state values
|
|
4649
4704
|
*/
|
|
4650
|
-
initialState:
|
|
4705
|
+
initialState: TState;
|
|
4651
4706
|
/**
|
|
4652
4707
|
* Stable key for Workers AI session affinity (prefix-cache optimization).
|
|
4653
4708
|
*
|
|
@@ -4667,9 +4722,12 @@ declare class Agent<
|
|
|
4667
4722
|
*/
|
|
4668
4723
|
get sessionAffinity(): string;
|
|
4669
4724
|
/**
|
|
4670
|
-
* Current state of the Agent
|
|
4725
|
+
* Current state of the Agent.
|
|
4726
|
+
*
|
|
4727
|
+
* Delegates to the State capability, which owns lazy load and the
|
|
4728
|
+
* in-memory cache; Agent seeds `initialState` on first access.
|
|
4671
4729
|
*/
|
|
4672
|
-
get state():
|
|
4730
|
+
get state(): TState;
|
|
4673
4731
|
/**
|
|
4674
4732
|
* Agent configuration options.
|
|
4675
4733
|
* Override in subclasses - only specify what you want to change.
|
|
@@ -4722,6 +4780,14 @@ declare class Agent<
|
|
|
4722
4780
|
* local dev and the constructor only runs once per DO instance).
|
|
4723
4781
|
*/
|
|
4724
4782
|
protected _ensureSchema(): void;
|
|
4783
|
+
/**
|
|
4784
|
+
* Read the Agent's schema version from its KV key. A DO created before the
|
|
4785
|
+
* State capability owned `cf_agents_state` has the version as a row in that
|
|
4786
|
+
* table instead: read it once, move it to the key, and delete the row so the
|
|
4787
|
+
* table is left with a single owner. Synchronous (`storage.kv`) because the
|
|
4788
|
+
* constructor gates DDL on it.
|
|
4789
|
+
*/
|
|
4790
|
+
private _readSchemaVersion;
|
|
4725
4791
|
constructor(ctx: AgentContext, env: Env);
|
|
4726
4792
|
private _restoreAgentFacetContext;
|
|
4727
4793
|
/**
|
|
@@ -4736,26 +4802,20 @@ declare class Agent<
|
|
|
4736
4802
|
* @param excludeIds Additional connection IDs to exclude (e.g. the source)
|
|
4737
4803
|
*/
|
|
4738
4804
|
private _broadcastProtocol;
|
|
4739
|
-
|
|
4805
|
+
/**
|
|
4806
|
+
* React to a persisted state change from the State capability.
|
|
4807
|
+
*
|
|
4808
|
+
* Reproduces the pre-migration steps 3-4: broadcast the new state to
|
|
4809
|
+
* protocol-enabled connections (excluding the originating connection) and
|
|
4810
|
+
* run the notification hook off the invocation tail.
|
|
4811
|
+
*/
|
|
4812
|
+
private _handleStateChanged;
|
|
4740
4813
|
/**
|
|
4741
4814
|
* Update the Agent's state
|
|
4742
4815
|
* @param state New state to set
|
|
4743
4816
|
* @throws Error if called from a readonly connection context
|
|
4744
4817
|
*/
|
|
4745
|
-
setState(state:
|
|
4746
|
-
/**
|
|
4747
|
-
* Wraps connection.state and connection.setState so that internal
|
|
4748
|
-
* _cf_-prefixed flags (readonly, no-protocol) are hidden from user code
|
|
4749
|
-
* and cannot be accidentally overwritten.
|
|
4750
|
-
*
|
|
4751
|
-
* Idempotent — safe to call multiple times on the same connection.
|
|
4752
|
-
* After hibernation, the _rawStateAccessors WeakMap is empty but the
|
|
4753
|
-
* connection's state getter still reads from the persisted WebSocket
|
|
4754
|
-
* attachment. Calling this method re-captures the raw getter so that
|
|
4755
|
-
* predicate methods (isConnectionReadonly, isConnectionProtocolEnabled)
|
|
4756
|
-
* work correctly post-hibernation.
|
|
4757
|
-
*/
|
|
4758
|
-
private _ensureConnectionWrapped;
|
|
4818
|
+
setState(state: TState): void;
|
|
4759
4819
|
/**
|
|
4760
4820
|
* Mark a connection as readonly or readwrite
|
|
4761
4821
|
* @param connection The connection to mark
|
|
@@ -4789,8 +4849,8 @@ declare class Agent<
|
|
|
4789
4849
|
*
|
|
4790
4850
|
* Write an internal `_cf_`-prefixed flag to the raw connection state,
|
|
4791
4851
|
* bypassing the user-facing state wrapper. The key must be registered
|
|
4792
|
-
*
|
|
4793
|
-
* and hidden from `connection.state`.
|
|
4852
|
+
* with `registerInternalConnectionKeys` so it is preserved across user
|
|
4853
|
+
* `setState` calls and hidden from `connection.state`.
|
|
4794
4854
|
*
|
|
4795
4855
|
* @internal
|
|
4796
4856
|
*/
|
|
@@ -4840,18 +4900,13 @@ declare class Agent<
|
|
|
4840
4900
|
* @returns True if the connection receives protocol messages
|
|
4841
4901
|
*/
|
|
4842
4902
|
isConnectionProtocolEnabled(connection: Connection): boolean;
|
|
4843
|
-
/**
|
|
4844
|
-
* Mark a connection as having protocol messages disabled.
|
|
4845
|
-
* Called internally when shouldSendProtocolMessages returns false.
|
|
4846
|
-
*/
|
|
4847
|
-
private _setConnectionNoProtocol;
|
|
4848
4903
|
/**
|
|
4849
4904
|
* Called before the Agent's state is persisted and broadcast.
|
|
4850
4905
|
* Override to validate or reject an update by throwing an error.
|
|
4851
4906
|
*
|
|
4852
4907
|
* IMPORTANT: This hook must be synchronous.
|
|
4853
4908
|
*/
|
|
4854
|
-
validateStateChange(_nextState:
|
|
4909
|
+
validateStateChange(_nextState: TState, _source: Connection | "server"): void;
|
|
4855
4910
|
/**
|
|
4856
4911
|
* Called after the Agent's state has been persisted and broadcast to all clients.
|
|
4857
4912
|
* This is a notification hook — errors here are routed to onError and do not
|
|
@@ -4861,7 +4916,7 @@ declare class Agent<
|
|
|
4861
4916
|
* @param source Source of the state update ("server" or a client connection)
|
|
4862
4917
|
*/
|
|
4863
4918
|
onStateChanged(
|
|
4864
|
-
_state:
|
|
4919
|
+
_state: TState | undefined,
|
|
4865
4920
|
_source: Connection | "server"
|
|
4866
4921
|
): void;
|
|
4867
4922
|
/**
|
|
@@ -4876,7 +4931,7 @@ declare class Agent<
|
|
|
4876
4931
|
* @param source Source of the state update ("server" or a client connection)
|
|
4877
4932
|
*/
|
|
4878
4933
|
onStateUpdate(
|
|
4879
|
-
_state:
|
|
4934
|
+
_state: TState | undefined,
|
|
4880
4935
|
_source: Connection | "server"
|
|
4881
4936
|
): void;
|
|
4882
4937
|
/**
|
|
@@ -4974,11 +5029,16 @@ declare class Agent<
|
|
|
4974
5029
|
}
|
|
4975
5030
|
): Promise<T>;
|
|
4976
5031
|
/**
|
|
4977
|
-
* Queue a task to
|
|
5032
|
+
* Queue a task to run in the background.
|
|
5033
|
+
*
|
|
5034
|
+
* The item is durable: it runs from the Lifecycle alarm event loop after
|
|
5035
|
+
* this call returns, in push order, one at a time, with retries per
|
|
5036
|
+
* `options.retry`, and survives the Durable Object leaving memory.
|
|
4978
5037
|
* @param callback Name of the method to call
|
|
4979
5038
|
* @param payload Payload to pass to the callback
|
|
4980
5039
|
* @param options Options for the queued task
|
|
4981
5040
|
* @param options.retry Retry options for the callback execution
|
|
5041
|
+
* @param options.id Stable id; a push with an existing id replaces that item
|
|
4982
5042
|
* @returns The ID of the queued task
|
|
4983
5043
|
*/
|
|
4984
5044
|
queue<T = unknown>(
|
|
@@ -4986,37 +5046,36 @@ declare class Agent<
|
|
|
4986
5046
|
payload: T,
|
|
4987
5047
|
options?: {
|
|
4988
5048
|
retry?: RetryOptions;
|
|
5049
|
+
id?: string;
|
|
4989
5050
|
}
|
|
4990
5051
|
): Promise<string>;
|
|
4991
|
-
private _flushingQueue;
|
|
4992
|
-
private _flushQueue;
|
|
4993
5052
|
/**
|
|
4994
5053
|
* Dequeue a task by ID
|
|
4995
5054
|
* @param id ID of the task to dequeue
|
|
4996
5055
|
*/
|
|
4997
|
-
dequeue(id: string):
|
|
5056
|
+
dequeue(id: string): Promise<boolean>;
|
|
4998
5057
|
/**
|
|
4999
5058
|
* Dequeue all tasks
|
|
5000
5059
|
*/
|
|
5001
|
-
dequeueAll():
|
|
5060
|
+
dequeueAll(): Promise<number>;
|
|
5002
5061
|
/**
|
|
5003
5062
|
* Dequeue all tasks by callback
|
|
5004
5063
|
* @param callback Name of the callback to dequeue
|
|
5005
5064
|
*/
|
|
5006
|
-
dequeueAllByCallback(callback: string):
|
|
5065
|
+
dequeueAllByCallback(callback: string): Promise<number>;
|
|
5007
5066
|
/**
|
|
5008
5067
|
* Get a queued task by ID
|
|
5009
5068
|
* @param id ID of the task to get
|
|
5010
5069
|
* @returns The task or undefined if not found
|
|
5011
5070
|
*/
|
|
5012
|
-
getQueue(id: string): QueueItem<
|
|
5071
|
+
getQueue<T = unknown>(id: string): Promise<QueueItem<T> | undefined>;
|
|
5013
5072
|
/**
|
|
5014
|
-
* Get all
|
|
5073
|
+
* Get all queued tasks whose payload has `key` equal to `value`
|
|
5015
5074
|
* @param key Key to filter by
|
|
5016
5075
|
* @param value Value to filter by
|
|
5017
5076
|
* @returns Array of matching QueueItem objects
|
|
5018
5077
|
*/
|
|
5019
|
-
getQueues(key: string, value: string): QueueItem<
|
|
5078
|
+
getQueues<T = unknown>(key: string, value: string): Promise<QueueItem<T>[]>;
|
|
5020
5079
|
private _lifecycleRouteAddress;
|
|
5021
5080
|
private _routeLifecycleToRoot;
|
|
5022
5081
|
private _routeLifecycleToTarget;
|
|
@@ -5493,6 +5552,11 @@ declare class Agent<
|
|
|
5493
5552
|
code?: number,
|
|
5494
5553
|
reason?: string
|
|
5495
5554
|
): Promise<void>;
|
|
5555
|
+
_cf_closeSubAgentConnectionsForPrefix(
|
|
5556
|
+
prefix: ReadonlyArray<AgentPathStep>,
|
|
5557
|
+
code: number,
|
|
5558
|
+
reason: string
|
|
5559
|
+
): Promise<void>;
|
|
5496
5560
|
_cf_setSubAgentConnectionState(
|
|
5497
5561
|
connectionId: string,
|
|
5498
5562
|
state: unknown
|
|
@@ -5916,8 +5980,23 @@ declare class Agent<
|
|
|
5916
5980
|
private _stringifyAgentToolOutput;
|
|
5917
5981
|
private _broadcastAgentToolEvent;
|
|
5918
5982
|
private _broadcastAgentToolChunks;
|
|
5983
|
+
private _isTerminalOnlyAgentToolRun;
|
|
5919
5984
|
private _broadcastAgentToolStoredChunks;
|
|
5985
|
+
/**
|
|
5986
|
+
* One budget shared by every step of a bounded recovery read, so a run's
|
|
5987
|
+
* total time stays within `timeoutMs`. Returns the remaining milliseconds,
|
|
5988
|
+
* never below 1 because a non-positive timeout means "unbounded".
|
|
5989
|
+
*/
|
|
5990
|
+
private _agentToolRecoveryDeadline;
|
|
5920
5991
|
private _broadcastAgentToolStoredChunksFromAdapter;
|
|
5992
|
+
/**
|
|
5993
|
+
* Milestones are persisted on the child run rather than in its chunk log, so
|
|
5994
|
+
* replay re-emits them from the child's inspection. The client dedupes them
|
|
5995
|
+
* on the milestone's own sequence, so a milestone already seen live is a no-op.
|
|
5996
|
+
* They carry the next stored-chunk sequence without consuming it, matching
|
|
5997
|
+
* the live path.
|
|
5998
|
+
*/
|
|
5999
|
+
private _broadcastAgentToolMilestones;
|
|
5921
6000
|
private _forwardAgentToolStream;
|
|
5922
6001
|
/**
|
|
5923
6002
|
* Hook invoked by `_forwardAgentToolStream` after a child produces output that
|
|
@@ -6011,9 +6090,9 @@ declare class Agent<
|
|
|
6011
6090
|
* dies and recovers again during deploy churn is still collected. A genuinely
|
|
6012
6091
|
* silent/hung child can never block recovery forever: it seals `interrupted`
|
|
6013
6092
|
* after one `noProgressTimeoutMs` window. `maxWindowMs` is an OPTIONAL hard
|
|
6014
|
-
* wall-clock ceiling (default `Infinity` — uncapped,
|
|
6015
|
-
*
|
|
6016
|
-
*
|
|
6093
|
+
* wall-clock ceiling (default `Infinity` — uncapped, #1672); set it finite
|
|
6094
|
+
* to also bound a child that keeps progressing, which seals
|
|
6095
|
+
* `window-exceeded` and tears the child down.
|
|
6017
6096
|
*
|
|
6018
6097
|
* Returns the terminal `result` (and `completedAt`) when the child reaches a
|
|
6019
6098
|
* terminal status, plus the advanced broadcast `sequence`. Returns
|
|
@@ -6029,6 +6108,8 @@ declare class Agent<
|
|
|
6029
6108
|
private _scheduleAgentToolRunRecovery;
|
|
6030
6109
|
private _agentToolRunRecoveryRunIds;
|
|
6031
6110
|
private _getAgentToolChunksForRecovery;
|
|
6111
|
+
/** Resolve to `undefined` when `promise` rejects or outlasts `timeoutMs`. */
|
|
6112
|
+
private _settleWithinRecoveryTimeout;
|
|
6032
6113
|
/**
|
|
6033
6114
|
* Shared facet resolution — takes a CamelCase class name string
|
|
6034
6115
|
* (matching `ctx.exports`) rather than a class reference. Both
|
|
@@ -6731,7 +6812,7 @@ interface AgentRouteMatch<Env = Cloudflare.Env> {
|
|
|
6731
6812
|
}
|
|
6732
6813
|
interface AgentRouteOptions<
|
|
6733
6814
|
Env = Cloudflare.Env,
|
|
6734
|
-
Props extends
|
|
6815
|
+
Props extends object = object
|
|
6735
6816
|
> {
|
|
6736
6817
|
/** URL prefix before the binding and instance name. Default: `agents`. */
|
|
6737
6818
|
prefix?: string;
|
|
@@ -6774,10 +6855,7 @@ interface AgentRouteOptions<
|
|
|
6774
6855
|
/** Configuration options for {@link routeAgentRequest}. */
|
|
6775
6856
|
type AgentOptions<Env> = AgentRouteOptions<Env>;
|
|
6776
6857
|
/** Options for resolving and starting a named Agent. */
|
|
6777
|
-
type AgentGetOptions<
|
|
6778
|
-
Env,
|
|
6779
|
-
Props extends Record<string, unknown> = Record<string, unknown>
|
|
6780
|
-
> = Pick<
|
|
6858
|
+
type AgentGetOptions<Env, Props extends object = object> = Pick<
|
|
6781
6859
|
AgentRouteOptions<Env, Props>,
|
|
6782
6860
|
"jurisdiction" | "locationHint" | "props" | "routingRetry"
|
|
6783
6861
|
>;
|
|
@@ -6807,7 +6885,7 @@ declare function routeAgentRequest<Env>(
|
|
|
6807
6885
|
declare function getAgentByName<
|
|
6808
6886
|
Env extends Cloudflare.Env = Cloudflare.Env,
|
|
6809
6887
|
T extends Agent<Env> = Agent<Env>,
|
|
6810
|
-
Props extends
|
|
6888
|
+
Props extends object = object
|
|
6811
6889
|
>(
|
|
6812
6890
|
namespace: DurableObjectNamespace<T>,
|
|
6813
6891
|
name: string,
|
|
@@ -6816,143 +6894,145 @@ declare function getAgentByName<
|
|
|
6816
6894
|
//#endregion
|
|
6817
6895
|
export {
|
|
6818
6896
|
ChatCapableAgentClass as $,
|
|
6819
|
-
|
|
6820
|
-
|
|
6821
|
-
|
|
6822
|
-
|
|
6897
|
+
RPCServerTransport as $t,
|
|
6898
|
+
getCurrentAgent as A,
|
|
6899
|
+
getSubAgentByName as An,
|
|
6900
|
+
ElicitRequest$1 as At,
|
|
6823
6901
|
AgentToolFailure as B,
|
|
6824
|
-
|
|
6902
|
+
MCPConnectionResult as Bt,
|
|
6825
6903
|
MCPServersState as C,
|
|
6826
|
-
|
|
6827
|
-
|
|
6828
|
-
|
|
6829
|
-
|
|
6830
|
-
|
|
6831
|
-
|
|
6832
|
-
|
|
6833
|
-
|
|
6834
|
-
|
|
6835
|
-
|
|
6904
|
+
BuildAgentPathOptions as Cn,
|
|
6905
|
+
WorkflowInfo as Ct,
|
|
6906
|
+
StartFiberResult as D,
|
|
6907
|
+
buildAgentUrl as Dn,
|
|
6908
|
+
WorkflowRejectedError as Dt,
|
|
6909
|
+
StartFiberOptions as E,
|
|
6910
|
+
buildAgentPath as En,
|
|
6911
|
+
WorkflowQueryCriteria as Et,
|
|
6912
|
+
AgentToolDisplayMetadata as F,
|
|
6913
|
+
MCPClientElicitationHandlers as Ft,
|
|
6836
6914
|
AgentToolProgressSnapshot as G,
|
|
6837
|
-
|
|
6915
|
+
MCP_SERVER_ID_MAX_LENGTH as Gt,
|
|
6838
6916
|
AgentToolLifecycleResult as H,
|
|
6839
|
-
|
|
6840
|
-
|
|
6841
|
-
|
|
6917
|
+
MCPOAuthCallbackResult as Ht,
|
|
6918
|
+
AgentToolEvent as I,
|
|
6919
|
+
MCPClientManager as It,
|
|
6842
6920
|
AgentToolRunPart as J,
|
|
6843
|
-
|
|
6921
|
+
normalizeServerId as Jt,
|
|
6844
6922
|
AgentToolRunInfo as K,
|
|
6845
|
-
|
|
6846
|
-
|
|
6847
|
-
|
|
6848
|
-
|
|
6849
|
-
|
|
6850
|
-
|
|
6851
|
-
|
|
6852
|
-
|
|
6853
|
-
|
|
6854
|
-
|
|
6855
|
-
|
|
6856
|
-
|
|
6923
|
+
RegisterServerOptions as Kt,
|
|
6924
|
+
AgentToolEventDelivery as L,
|
|
6925
|
+
MCPClientManagerOptions as Lt,
|
|
6926
|
+
AGENT_TOOL_MILESTONE_PART as M,
|
|
6927
|
+
routeSubAgentRequest as Mn,
|
|
6928
|
+
MCPAITool as Mt,
|
|
6929
|
+
AGENT_TOOL_PROGRESS_PART as N,
|
|
6930
|
+
withInvocationScope as Nn,
|
|
6931
|
+
MCPAIToolSet as Nt,
|
|
6932
|
+
StateUpdateMessage as O,
|
|
6933
|
+
buildSubAgentPath as On,
|
|
6934
|
+
WorkflowStatus as Ot,
|
|
6935
|
+
AgentToolChildAdapter as P,
|
|
6936
|
+
MCPClientElicitationHandler as Pt,
|
|
6857
6937
|
AgentToolTerminalStatus as Q,
|
|
6858
|
-
|
|
6938
|
+
RPCClientTransportOptions as Qt,
|
|
6859
6939
|
AgentToolEventMessage as R,
|
|
6860
|
-
|
|
6940
|
+
MCPClientOAuthCallbackConfig as Rt,
|
|
6861
6941
|
MCPServerMessage as S,
|
|
6862
|
-
|
|
6863
|
-
|
|
6864
|
-
|
|
6865
|
-
|
|
6866
|
-
|
|
6942
|
+
AgentPathStep as Sn,
|
|
6943
|
+
WorkflowEventPayload as St,
|
|
6944
|
+
RPCResponse as T,
|
|
6945
|
+
SubAgentPathMatch as Tn,
|
|
6946
|
+
WorkflowProgressCallback as Tt,
|
|
6867
6947
|
AgentToolMilestone as U,
|
|
6868
|
-
|
|
6948
|
+
MCPServerFilter as Ut,
|
|
6869
6949
|
AgentToolInterruptedReason as V,
|
|
6870
|
-
|
|
6950
|
+
MCPDiscoverResult as Vt,
|
|
6871
6951
|
AgentToolProgress as W,
|
|
6872
|
-
|
|
6952
|
+
MCPServerOptions as Wt,
|
|
6873
6953
|
AgentToolRunStatus as X,
|
|
6874
|
-
|
|
6954
|
+
MCPElicitationHandlers as Xt,
|
|
6875
6955
|
AgentToolRunState as Y,
|
|
6876
|
-
|
|
6956
|
+
MCPElicitationHandler as Yt,
|
|
6877
6957
|
AgentToolStoredChunk as Z,
|
|
6878
|
-
|
|
6958
|
+
RPCClientTransport as Zt,
|
|
6879
6959
|
FiberRecoveryContext as _,
|
|
6880
|
-
|
|
6881
|
-
|
|
6960
|
+
WorkerTransportOptions as _n,
|
|
6961
|
+
WorkflowCallbackBase as _t,
|
|
6882
6962
|
routeAgentRequest as a,
|
|
6883
|
-
|
|
6884
|
-
|
|
6963
|
+
McpAgent as an,
|
|
6964
|
+
isPositionlessAgentToolChunk as at,
|
|
6885
6965
|
ListFibersOptions as b,
|
|
6886
|
-
|
|
6887
|
-
|
|
6966
|
+
DynamicAgentClass as bn,
|
|
6967
|
+
WorkflowErrorCallback as bt,
|
|
6888
6968
|
Agent as c,
|
|
6889
|
-
|
|
6890
|
-
|
|
6969
|
+
createMcpHandler$1 as cn,
|
|
6970
|
+
AgentWorkflowOrigin as ct,
|
|
6891
6971
|
AgentStaticOptions as d,
|
|
6892
|
-
|
|
6893
|
-
|
|
6894
|
-
|
|
6972
|
+
CreateMcpHandlerOptions$1 as dn,
|
|
6973
|
+
AgentWorkflowStep as dt,
|
|
6974
|
+
RPCServerTransportOptions as en,
|
|
6895
6975
|
DetachedAgentToolConfig as et,
|
|
6896
6976
|
DEFAULT_AGENT_STATIC_OPTIONS as f,
|
|
6897
|
-
|
|
6898
|
-
|
|
6977
|
+
LegacyMcpHandler as fn,
|
|
6978
|
+
ApprovalEventPayload as ft,
|
|
6899
6979
|
FiberInspection as g,
|
|
6900
|
-
|
|
6901
|
-
|
|
6980
|
+
WorkerTransport as gn,
|
|
6981
|
+
WorkflowCallback as gt,
|
|
6902
6982
|
FiberContext as h,
|
|
6903
|
-
|
|
6904
|
-
|
|
6983
|
+
TransportState as hn,
|
|
6984
|
+
WaitForApprovalOptions as ht,
|
|
6905
6985
|
getAgentByName as i,
|
|
6906
|
-
|
|
6907
|
-
|
|
6908
|
-
|
|
6909
|
-
|
|
6910
|
-
|
|
6911
|
-
|
|
6912
|
-
|
|
6913
|
-
|
|
6986
|
+
ElicitResult$3 as in,
|
|
6987
|
+
isAgentToolLifecycleChunk as it,
|
|
6988
|
+
routeAgentEmail as j,
|
|
6989
|
+
parseSubAgentPath as jn,
|
|
6990
|
+
ElicitResult$2 as jt,
|
|
6991
|
+
StreamingResponse as k,
|
|
6992
|
+
buildSubAgentPathUnchecked as kn,
|
|
6993
|
+
WorkflowTrackingRow as kt,
|
|
6914
6994
|
AgentContext as l,
|
|
6915
|
-
|
|
6916
|
-
|
|
6995
|
+
experimental_createMcpHandler as ln,
|
|
6996
|
+
AgentWorkflowParams as lt,
|
|
6917
6997
|
EmailRoutingOptions as m,
|
|
6918
|
-
|
|
6919
|
-
|
|
6998
|
+
MCPStorageApi as mn,
|
|
6999
|
+
RunWorkflowOptions as mt,
|
|
6920
7000
|
AgentOptions as n,
|
|
6921
|
-
|
|
7001
|
+
ElicitRequest$2 as nn,
|
|
6922
7002
|
RunAgentToolOptions as nt,
|
|
6923
7003
|
AddMcpServerOptions as o,
|
|
6924
|
-
|
|
6925
|
-
|
|
7004
|
+
ClearableEventStore as on,
|
|
7005
|
+
AgentWorkflowEvent as ot,
|
|
6926
7006
|
DeleteFibersOptions as p,
|
|
6927
|
-
|
|
6928
|
-
|
|
7007
|
+
createLegacyMcpHandler as pn,
|
|
7008
|
+
DefaultProgress as pt,
|
|
6929
7009
|
AgentToolRunInspection as q,
|
|
6930
|
-
|
|
7010
|
+
getNamespacedData as qt,
|
|
6931
7011
|
RoutingRetryOptions as r,
|
|
6932
|
-
|
|
7012
|
+
ElicitRequestSchema as rn,
|
|
6933
7013
|
RunAgentToolResult as rt,
|
|
6934
7014
|
AddRpcMcpServerOptions as s,
|
|
6935
|
-
|
|
6936
|
-
|
|
7015
|
+
DurableObjectEventStore as sn,
|
|
7016
|
+
AgentWorkflowInternalParams as st,
|
|
6937
7017
|
AgentGetOptions as t,
|
|
6938
|
-
|
|
7018
|
+
RPC_DO_PREFIX as tn,
|
|
6939
7019
|
DetachedRunAgentToolResult as tt,
|
|
6940
7020
|
AgentNamespace as u,
|
|
6941
|
-
|
|
6942
|
-
|
|
7021
|
+
CreateLegacyMcpHandlerOptions as un,
|
|
7022
|
+
AgentWorkflowPathStep as ut,
|
|
6943
7023
|
FiberRecoveryResult as v,
|
|
6944
|
-
|
|
6945
|
-
|
|
6946
|
-
|
|
6947
|
-
|
|
6948
|
-
|
|
7024
|
+
SSEEdgeClientTransport as vn,
|
|
7025
|
+
WorkflowCallbackType as vt,
|
|
7026
|
+
RPCRequest as w,
|
|
7027
|
+
SUB_PREFIX as wn,
|
|
7028
|
+
WorkflowPage as wt,
|
|
6949
7029
|
MCPServer as x,
|
|
6950
|
-
|
|
6951
|
-
|
|
7030
|
+
DynamicAgentStub as xn,
|
|
7031
|
+
WorkflowEventCallback as xt,
|
|
6952
7032
|
FiberStatus as y,
|
|
6953
|
-
|
|
6954
|
-
|
|
7033
|
+
StreamableHTTPEdgeClientTransport as yn,
|
|
7034
|
+
WorkflowCompleteCallback as yt,
|
|
6955
7035
|
AgentToolEventState as z,
|
|
6956
|
-
|
|
7036
|
+
MCPClientOAuthResult as zt
|
|
6957
7037
|
};
|
|
6958
|
-
//# sourceMappingURL=agent-routing-
|
|
7038
|
+
//# sourceMappingURL=agent-routing-0DR0Tk2v.d.ts.map
|