agents 0.23.0 → 0.24.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.
Files changed (98) hide show
  1. package/dist/{agent-routing-DE5zmCQ8.d.ts → agent-routing-B2XLNMxq.d.ts} +196 -189
  2. package/dist/agent-routing.d.ts +1 -1
  3. package/dist/agent-tool-types.d.ts +26 -26
  4. package/dist/{agent-tools-DtXMTDGM.d.ts → agent-tools-Dj5Mzlw7.d.ts} +7 -7
  5. package/dist/agent-tools.d.ts +21 -21
  6. package/dist/{capability-BjSKYpzg.js → capability-B4WbF81e.js} +2 -1
  7. package/dist/capability-B4WbF81e.js.map +1 -0
  8. package/dist/{capability-runner-Be_-PLR1.d.ts → capability-runner-BUBa6Ake.d.ts} +40 -15
  9. package/dist/chat/index.d.ts +14 -11
  10. package/dist/chat/index.js +11 -7
  11. package/dist/chat/index.js.map +1 -1
  12. package/dist/chat-sdk/index.d.ts +3 -3
  13. package/dist/chat-sdk/index.js +1 -1
  14. package/dist/client-BxdkCuVy.d.ts +411 -0
  15. package/dist/client-C9DAjZIY.js +518 -0
  16. package/dist/client-C9DAjZIY.js.map +1 -0
  17. package/dist/{client-jagG8a9_.js → client-fyQrLGkD.js} +2 -2
  18. package/dist/{client-jagG8a9_.js.map → client-fyQrLGkD.js.map} +1 -1
  19. package/dist/client.d.ts +27 -283
  20. package/dist/client.js +2 -274
  21. package/dist/current-agent-C4w86kcN.d.ts +93 -0
  22. package/dist/{current-agent-Da_C9a3b.d.ts → durable-object-lifecycle-ei7M7lqB.d.ts} +13 -122
  23. package/dist/index-Dlgtd3Mj.d.ts +78 -0
  24. package/dist/index.d.ts +59 -59
  25. package/dist/index.js +2 -2
  26. package/dist/internal_context.d.ts +1 -1
  27. package/dist/lifecycle/index.d.ts +19 -17
  28. package/dist/lifecycle/index.js +2 -2
  29. package/dist/{lifecycle-CMRGjZdw.js → lifecycle-Mm_jQh7r.js} +36 -21
  30. package/dist/lifecycle-Mm_jQh7r.js.map +1 -0
  31. package/dist/mcp/client/index.d.ts +20 -20
  32. package/dist/mcp/client/index.js +1 -1
  33. package/dist/mcp/index.d.ts +35 -35
  34. package/dist/mcp/index.js +2 -2
  35. package/dist/queue/index.d.ts +123 -0
  36. package/dist/queue/index.js +2 -0
  37. package/dist/queue-BC9F5cUo.js +406 -0
  38. package/dist/queue-BC9F5cUo.js.map +1 -0
  39. package/dist/react.d.ts +33 -15
  40. package/dist/react.js +31 -8
  41. package/dist/react.js.map +1 -1
  42. package/dist/{retries-D9Ds-1lz.d.ts → retries-D9B2UCq3.d.ts} +9 -3
  43. package/dist/retries.d.ts +5 -3
  44. package/dist/retries.js +9 -1
  45. package/dist/retries.js.map +1 -1
  46. package/dist/routing/index.d.ts +2 -2
  47. package/dist/routing/index.js +1 -1
  48. package/dist/{scheduler-Dwh85ZGl.d.ts → scheduler-BGq6M5Kd.d.ts} +6 -6
  49. package/dist/{scheduler-DD9NdYbF.js → scheduler-D_KHqxBa.js} +4 -11
  50. package/dist/scheduler-D_KHqxBa.js.map +1 -0
  51. package/dist/schedules/index.d.ts +1 -1
  52. package/dist/schedules/index.js +1 -1
  53. package/dist/serializable.d.ts +1 -1
  54. package/dist/sessions/index.d.ts +1 -1
  55. package/dist/sessions/index.js +1 -1
  56. package/dist/{src-DlSHshb2.js → src-BNU3ZiJM.js} +126 -393
  57. package/dist/src-BNU3ZiJM.js.map +1 -0
  58. package/dist/state/index.d.ts +6 -0
  59. package/dist/state/index.js +137 -0
  60. package/dist/state/index.js.map +1 -0
  61. package/dist/streams/index.d.ts +1 -1
  62. package/dist/streams/index.js +1 -1
  63. package/dist/{streams-D6tJ0NN9.d.ts → streams-BcE8JP2X.d.ts} +2 -2
  64. package/dist/{streams-DZKgAj9b.js → streams-CCPRV6dt.js} +2 -2
  65. package/dist/{streams-DZKgAj9b.js.map → streams-CCPRV6dt.js.map} +1 -1
  66. package/dist/sub-routing.d.ts +12 -12
  67. package/dist/tasks/index.d.ts +1 -1
  68. package/dist/tasks/index.js +1 -1
  69. package/dist/{tasks-ylZgBjhj.js → tasks-D4nLqVSI.js} +3 -3
  70. package/dist/{tasks-ylZgBjhj.js.map → tasks-D4nLqVSI.js.map} +1 -1
  71. package/dist/{tasks-BRJ5zgya.d.ts → tasks-V2lCT8ZV.d.ts} +5 -5
  72. package/dist/transport-protocol-BxyngQ_R.js +25 -0
  73. package/dist/transport-protocol-BxyngQ_R.js.map +1 -0
  74. package/dist/transport-protocol-ZTew5Wso.d.ts +27 -0
  75. package/dist/types-DCD6BNZH.d.ts +70 -0
  76. package/dist/voice/index.d.ts +2 -2
  77. package/dist/websockets/index.d.ts +178 -69
  78. package/dist/websockets/index.js +3 -2
  79. package/dist/websockets-D7IzWbZb.js +1005 -0
  80. package/dist/websockets-D7IzWbZb.js.map +1 -0
  81. package/dist/workflow-types.d.ts +25 -25
  82. package/dist/workflows.d.ts +21 -21
  83. package/dist/workflows.js +1 -1
  84. package/docs/agent-class.md +2 -2
  85. package/docs/client-sdk.md +30 -0
  86. package/docs/index.md +1 -1
  87. package/docs/lifecycle.md +97 -22
  88. package/docs/queue.md +135 -241
  89. package/docs/retries.md +1 -1
  90. package/docs/sub-agents.md +3 -3
  91. package/package.json +12 -2
  92. package/dist/capability-BjSKYpzg.js.map +0 -1
  93. package/dist/client.js.map +0 -1
  94. package/dist/lifecycle-CMRGjZdw.js.map +0 -1
  95. package/dist/scheduler-DD9NdYbF.js.map +0 -1
  96. package/dist/src-DlSHshb2.js.map +0 -1
  97. package/dist/websockets-DUfRHPRq.js +0 -502
  98. package/dist/websockets-DUfRHPRq.js.map +0 -1
@@ -1,20 +1,20 @@
1
1
  import {
2
- _ as LifecycleJobOutcome,
3
- b as Connection,
4
- g as LifecycleJobContext,
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
- w as WSMessage,
10
- x as ConnectionContext
11
- } from "./capability-runner-Be_-PLR1.js";
12
- import { t as RetryOptions } from "./retries-D9Ds-1lz.js";
9
+ v as LifecycleJobOutcome,
10
+ x as Connection
11
+ } from "./capability-runner-BUBa6Ake.js";
12
+ import { t as RetryOptions } from "./retries-D9B2UCq3.js";
13
13
  import {
14
- c as LifecycleRouteEnvelope,
15
- n as CurrentAgentContext,
16
- o as Lifecycle
17
- } from "./current-agent-Da_C9a3b.js";
14
+ r as LifecycleRouteEnvelope,
15
+ t as Lifecycle
16
+ } from "./durable-object-lifecycle-ei7M7lqB.js";
17
+ import { n as CurrentAgentContext } from "./current-agent-C4w86kcN.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-Dwh85ZGl.js";
45
- import { l as TaskHandlers, r as Tasks } from "./tasks-BRJ5zgya.js";
44
+ } from "./scheduler-BGq6M5Kd.js";
45
+ import { i as QueueItem } from "./types-DCD6BNZH.js";
46
+ import { l as TaskHandlers, r as Tasks } from "./tasks-V2lCT8ZV.js";
47
+ import { t as State } from "./index-Dlgtd3Mj.js";
46
48
  import { t as CallableMetadata } from "./callable-decorator-DP__HhBA.js";
47
49
  import { AsyncLocalStorage } from "node:async_hooks";
48
50
  import {
@@ -561,6 +563,9 @@ interface DynamicAgentHostPort {
561
563
  readonly tasks: {
562
564
  __DO_NOT_USE_WILL_BREAK__cleanupRoutePrefix(prefix: string): Promise<void>;
563
565
  };
566
+ readonly _queue: {
567
+ __DO_NOT_USE_WILL_BREAK__cleanupRoutePrefix(prefix: string): Promise<void>;
568
+ };
564
569
  /** Local (non-facet-index) durable fiber recovery pass. */
565
570
  _checkRunFibers(): Promise<void>;
566
571
  /** Overridable RPC entry points — call via the host so subclass overrides intercept. */
@@ -586,20 +591,12 @@ interface DynamicAgentHostPort {
586
591
  tag?: string
587
592
  ): Iterable<Connection<TState>>;
588
593
  };
589
- _ensureConnectionWrapped(connection: Connection): void;
590
594
  _unsafe_getConnectionFlag(connection: Connection, key: string): unknown;
591
595
  _unsafe_setConnectionFlag(
592
596
  connection: Connection,
593
597
  key: string,
594
598
  value: unknown
595
599
  ): void;
596
- readonly _rawStateAccessors: {
597
- get(connection: Connection):
598
- | {
599
- getRaw(): unknown;
600
- }
601
- | undefined;
602
- };
603
600
  shouldConnectionBeReadonly(
604
601
  connection: Connection,
605
602
  context: {
@@ -613,7 +610,6 @@ interface DynamicAgentHostPort {
613
610
  request: Request;
614
611
  }
615
612
  ): boolean;
616
- _setConnectionNoProtocol(connection: Connection): void;
617
613
  getConnectionTags(
618
614
  connection: Connection,
619
615
  context: {
@@ -692,8 +688,9 @@ declare class DynamicAgentsInternal extends LifecycleCapability {
692
688
  rootResolvesToSelf(): boolean;
693
689
  /**
694
690
  * Clean root-owned bookkeeping for a sub-tree of facets: bulk-cancel
695
- * schedules and routed Task wake mirrors under the owner-path prefix,
696
- * and delete root-side facet fiber recovery leases for the same sub-tree.
691
+ * schedules, queue items, and routed Task wake mirrors under the
692
+ * owner-path prefix, and delete root-side facet fiber recovery leases for
693
+ * the same sub-tree.
697
694
  */
698
695
  cleanupPrefix(ownerPath: ReadonlyArray<AgentPathStep>): Promise<void>;
699
696
  /**
@@ -4083,13 +4080,6 @@ type RPCResponse = {
4083
4080
  error: string;
4084
4081
  }
4085
4082
  );
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
4083
  type DetachedReconcilePayload = {
4094
4084
  cadenceIndex?: number;
4095
4085
  };
@@ -4466,11 +4456,11 @@ type WorkflowName<E> = WorkflowBinding<E> | (string & {});
4466
4456
  /**
4467
4457
  * Base class for creating Agent implementations
4468
4458
  * @template Env Environment type containing bindings
4469
- * @template State State type to store within the Agent
4459
+ * @template TState State type to store within the Agent
4470
4460
  */
4471
4461
  declare class Agent<
4472
4462
  Env extends Cloudflare.Env = Cloudflare.Env,
4473
- State = unknown,
4463
+ TState = unknown,
4474
4464
  Props extends Record<string, unknown> = Record<string, unknown>
4475
4465
  > extends DurableObject<Env> {
4476
4466
  /**
@@ -4489,6 +4479,16 @@ declare class Agent<
4489
4479
  * from paths that do not pass through the capability (facet bridging,
4490
4480
  * direct calls).
4491
4481
  */
4482
+ /**
4483
+ * Durable state: the `cf_agents_state` row, lazy load, validated persistence.
4484
+ * `initialState` stays on Agent (a subclass field, initialized after this
4485
+ * one) and is seeded by the `state` getter. Typed `<unknown>` rather than
4486
+ * `<TState>` because `TState` appears in both `get()` and `set()` positions,
4487
+ * which would make `Agent`'s own `TState` parameter invariant and break
4488
+ * `Subclass -> Agent<Env, unknown>` assignability; the typed boundary is
4489
+ * re-established in `state` / `setState`.
4490
+ */
4491
+ readonly _state: State<unknown>;
4492
4492
  private readonly _webSockets;
4493
4493
  /** Run user initialization after lifecycle components have started. */
4494
4494
  onStart(_props?: Props): void | Promise<void>;
@@ -4515,7 +4515,6 @@ declare class Agent<
4515
4515
  ): string[] | Promise<string[]>;
4516
4516
  /** @internal Ensure lifecycle startup before a native RPC implementation. */
4517
4517
  __unsafe_ensureInitialized(props?: Props): Promise<void>;
4518
- private _state;
4519
4518
  private _disposables;
4520
4519
  private _destroyed;
4521
4520
  /**
@@ -4523,7 +4522,6 @@ declare class Agent<
4523
4522
  * Used by internal flag methods (readonly, no-protocol) to read/write
4524
4523
  * _cf_-prefixed keys without going through the user-facing state/setState.
4525
4524
  */
4526
- private _rawStateAccessors;
4527
4525
  /**
4528
4526
  * Cached persistence-hook dispatch mode, computed once in the constructor.
4529
4527
  * - "new" → call onStateChanged
@@ -4616,6 +4614,12 @@ declare class Agent<
4616
4614
  * cancelSchedule() methods are the stable surface.
4617
4615
  */
4618
4616
  readonly scheduler: Scheduler;
4617
+ /**
4618
+ * Durable background-work capability installed into this Agent's
4619
+ * Lifecycle. Agent's queue()/dequeue()/dequeueAll()/dequeueAllByCallback()/
4620
+ * getQueue()/getQueues() methods are its surface.
4621
+ */
4622
+ private readonly _queue;
4619
4623
  /**
4620
4624
  * Durable replayable execution capability installed into this Agent's
4621
4625
  * Lifecycle. Declare definitions on the overridable
@@ -4647,7 +4651,7 @@ declare class Agent<
4647
4651
  * Initial state for the Agent
4648
4652
  * Override to provide default state values
4649
4653
  */
4650
- initialState: State;
4654
+ initialState: TState;
4651
4655
  /**
4652
4656
  * Stable key for Workers AI session affinity (prefix-cache optimization).
4653
4657
  *
@@ -4667,9 +4671,12 @@ declare class Agent<
4667
4671
  */
4668
4672
  get sessionAffinity(): string;
4669
4673
  /**
4670
- * Current state of the Agent
4674
+ * Current state of the Agent.
4675
+ *
4676
+ * Delegates to the State capability, which owns lazy load and the
4677
+ * in-memory cache; Agent seeds `initialState` on first access.
4671
4678
  */
4672
- get state(): State;
4679
+ get state(): TState;
4673
4680
  /**
4674
4681
  * Agent configuration options.
4675
4682
  * Override in subclasses - only specify what you want to change.
@@ -4722,6 +4729,14 @@ declare class Agent<
4722
4729
  * local dev and the constructor only runs once per DO instance).
4723
4730
  */
4724
4731
  protected _ensureSchema(): void;
4732
+ /**
4733
+ * Read the Agent's schema version from its KV key. A DO created before the
4734
+ * State capability owned `cf_agents_state` has the version as a row in that
4735
+ * table instead: read it once, move it to the key, and delete the row so the
4736
+ * table is left with a single owner. Synchronous (`storage.kv`) because the
4737
+ * constructor gates DDL on it.
4738
+ */
4739
+ private _readSchemaVersion;
4725
4740
  constructor(ctx: AgentContext, env: Env);
4726
4741
  private _restoreAgentFacetContext;
4727
4742
  /**
@@ -4736,26 +4751,20 @@ declare class Agent<
4736
4751
  * @param excludeIds Additional connection IDs to exclude (e.g. the source)
4737
4752
  */
4738
4753
  private _broadcastProtocol;
4739
- private _setStateInternal;
4754
+ /**
4755
+ * React to a persisted state change from the State capability.
4756
+ *
4757
+ * Reproduces the pre-migration steps 3-4: broadcast the new state to
4758
+ * protocol-enabled connections (excluding the originating connection) and
4759
+ * run the notification hook off the invocation tail.
4760
+ */
4761
+ private _handleStateChanged;
4740
4762
  /**
4741
4763
  * Update the Agent's state
4742
4764
  * @param state New state to set
4743
4765
  * @throws Error if called from a readonly connection context
4744
4766
  */
4745
- setState(state: State): void;
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;
4767
+ setState(state: TState): void;
4759
4768
  /**
4760
4769
  * Mark a connection as readonly or readwrite
4761
4770
  * @param connection The connection to mark
@@ -4789,8 +4798,8 @@ declare class Agent<
4789
4798
  *
4790
4799
  * Write an internal `_cf_`-prefixed flag to the raw connection state,
4791
4800
  * bypassing the user-facing state wrapper. The key must be registered
4792
- * in `CF_INTERNAL_KEYS` so it is preserved across user `setState` calls
4793
- * and hidden from `connection.state`.
4801
+ * with `registerInternalConnectionKeys` so it is preserved across user
4802
+ * `setState` calls and hidden from `connection.state`.
4794
4803
  *
4795
4804
  * @internal
4796
4805
  */
@@ -4840,18 +4849,13 @@ declare class Agent<
4840
4849
  * @returns True if the connection receives protocol messages
4841
4850
  */
4842
4851
  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
4852
  /**
4849
4853
  * Called before the Agent's state is persisted and broadcast.
4850
4854
  * Override to validate or reject an update by throwing an error.
4851
4855
  *
4852
4856
  * IMPORTANT: This hook must be synchronous.
4853
4857
  */
4854
- validateStateChange(_nextState: State, _source: Connection | "server"): void;
4858
+ validateStateChange(_nextState: TState, _source: Connection | "server"): void;
4855
4859
  /**
4856
4860
  * Called after the Agent's state has been persisted and broadcast to all clients.
4857
4861
  * This is a notification hook — errors here are routed to onError and do not
@@ -4861,7 +4865,7 @@ declare class Agent<
4861
4865
  * @param source Source of the state update ("server" or a client connection)
4862
4866
  */
4863
4867
  onStateChanged(
4864
- _state: State | undefined,
4868
+ _state: TState | undefined,
4865
4869
  _source: Connection | "server"
4866
4870
  ): void;
4867
4871
  /**
@@ -4876,7 +4880,7 @@ declare class Agent<
4876
4880
  * @param source Source of the state update ("server" or a client connection)
4877
4881
  */
4878
4882
  onStateUpdate(
4879
- _state: State | undefined,
4883
+ _state: TState | undefined,
4880
4884
  _source: Connection | "server"
4881
4885
  ): void;
4882
4886
  /**
@@ -4974,11 +4978,16 @@ declare class Agent<
4974
4978
  }
4975
4979
  ): Promise<T>;
4976
4980
  /**
4977
- * Queue a task to be executed in the future
4981
+ * Queue a task to run in the background.
4982
+ *
4983
+ * The item is durable: it runs from the Lifecycle alarm event loop after
4984
+ * this call returns, in push order, one at a time, with retries per
4985
+ * `options.retry`, and survives the Durable Object leaving memory.
4978
4986
  * @param callback Name of the method to call
4979
4987
  * @param payload Payload to pass to the callback
4980
4988
  * @param options Options for the queued task
4981
4989
  * @param options.retry Retry options for the callback execution
4990
+ * @param options.id Stable id; a push with an existing id replaces that item
4982
4991
  * @returns The ID of the queued task
4983
4992
  */
4984
4993
  queue<T = unknown>(
@@ -4986,37 +4995,36 @@ declare class Agent<
4986
4995
  payload: T,
4987
4996
  options?: {
4988
4997
  retry?: RetryOptions;
4998
+ id?: string;
4989
4999
  }
4990
5000
  ): Promise<string>;
4991
- private _flushingQueue;
4992
- private _flushQueue;
4993
5001
  /**
4994
5002
  * Dequeue a task by ID
4995
5003
  * @param id ID of the task to dequeue
4996
5004
  */
4997
- dequeue(id: string): void;
5005
+ dequeue(id: string): Promise<boolean>;
4998
5006
  /**
4999
5007
  * Dequeue all tasks
5000
5008
  */
5001
- dequeueAll(): void;
5009
+ dequeueAll(): Promise<number>;
5002
5010
  /**
5003
5011
  * Dequeue all tasks by callback
5004
5012
  * @param callback Name of the callback to dequeue
5005
5013
  */
5006
- dequeueAllByCallback(callback: string): void;
5014
+ dequeueAllByCallback(callback: string): Promise<number>;
5007
5015
  /**
5008
5016
  * Get a queued task by ID
5009
5017
  * @param id ID of the task to get
5010
5018
  * @returns The task or undefined if not found
5011
5019
  */
5012
- getQueue(id: string): QueueItem<string> | undefined;
5020
+ getQueue<T = unknown>(id: string): Promise<QueueItem<T> | undefined>;
5013
5021
  /**
5014
- * Get all queues by key and value
5022
+ * Get all queued tasks whose payload has `key` equal to `value`
5015
5023
  * @param key Key to filter by
5016
5024
  * @param value Value to filter by
5017
5025
  * @returns Array of matching QueueItem objects
5018
5026
  */
5019
- getQueues(key: string, value: string): QueueItem<string>[];
5027
+ getQueues<T = unknown>(key: string, value: string): Promise<QueueItem<T>[]>;
5020
5028
  private _lifecycleRouteAddress;
5021
5029
  private _routeLifecycleToRoot;
5022
5030
  private _routeLifecycleToTarget;
@@ -6815,144 +6823,143 @@ declare function getAgentByName<
6815
6823
  ): Promise<DurableObjectStub<T>>;
6816
6824
  //#endregion
6817
6825
  export {
6818
- ChatCapableAgentClass as $,
6819
- RPC_DO_PREFIX as $t,
6820
- StreamingResponse as A,
6821
- routeSubAgentRequest as An,
6822
- MCPAITool as At,
6823
- AgentToolFailure as B,
6824
- MCPOAuthCallbackResult as Bt,
6826
+ DetachedAgentToolConfig as $,
6827
+ ElicitRequest$2 as $t,
6828
+ getCurrentAgent as A,
6829
+ withInvocationScope as An,
6830
+ MCPAIToolSet as At,
6831
+ AgentToolInterruptedReason as B,
6832
+ MCPServerFilter as Bt,
6825
6833
  MCPServersState as C,
6826
- SubAgentPathMatch as Cn,
6827
- WorkflowProgressCallback as Ct,
6828
- StartFiberOptions as D,
6829
- buildSubAgentPathUnchecked as Dn,
6830
- WorkflowTrackingRow as Dt,
6831
- RPCResponse as E,
6832
- buildSubAgentPath as En,
6833
- WorkflowStatus as Et,
6834
- AgentToolChildAdapter as F,
6835
- MCPClientManagerOptions as Ft,
6836
- AgentToolProgressSnapshot as G,
6837
- getNamespacedData as Gt,
6838
- AgentToolLifecycleResult as H,
6839
- MCPServerOptions as Ht,
6840
- AgentToolDisplayMetadata as I,
6841
- MCPClientOAuthCallbackConfig as It,
6842
- AgentToolRunPart as J,
6843
- MCPElicitationHandlers as Jt,
6844
- AgentToolRunInfo as K,
6845
- normalizeServerId as Kt,
6846
- AgentToolEvent as L,
6847
- MCPClientOAuthResult as Lt,
6848
- routeAgentEmail as M,
6849
- MCPClientElicitationHandler as Mt,
6850
- AGENT_TOOL_MILESTONE_PART as N,
6851
- MCPClientElicitationHandlers as Nt,
6852
- StartFiberResult as O,
6853
- getSubAgentByName as On,
6854
- ElicitRequest$1 as Ot,
6855
- AGENT_TOOL_PROGRESS_PART as P,
6856
- MCPClientManager as Pt,
6857
- AgentToolTerminalStatus as Q,
6858
- RPCServerTransportOptions as Qt,
6859
- AgentToolEventMessage as R,
6860
- MCPConnectionResult as Rt,
6834
+ buildAgentPath as Cn,
6835
+ WorkflowQueryCriteria as Ct,
6836
+ StartFiberResult as D,
6837
+ getSubAgentByName as Dn,
6838
+ ElicitRequest$1 as Dt,
6839
+ StartFiberOptions as E,
6840
+ buildSubAgentPathUnchecked as En,
6841
+ WorkflowTrackingRow as Et,
6842
+ AgentToolDisplayMetadata as F,
6843
+ MCPClientOAuthCallbackConfig as Ft,
6844
+ AgentToolRunInfo as G,
6845
+ normalizeServerId as Gt,
6846
+ AgentToolMilestone as H,
6847
+ MCP_SERVER_ID_MAX_LENGTH as Ht,
6848
+ AgentToolEvent as I,
6849
+ MCPClientOAuthResult as It,
6850
+ AgentToolRunState as J,
6851
+ RPCClientTransport as Jt,
6852
+ AgentToolRunInspection as K,
6853
+ MCPElicitationHandler as Kt,
6854
+ AgentToolEventMessage as L,
6855
+ MCPConnectionResult as Lt,
6856
+ AGENT_TOOL_MILESTONE_PART as M,
6857
+ MCPClientElicitationHandlers as Mt,
6858
+ AGENT_TOOL_PROGRESS_PART as N,
6859
+ MCPClientManager as Nt,
6860
+ StateUpdateMessage as O,
6861
+ parseSubAgentPath as On,
6862
+ ElicitResult$2 as Ot,
6863
+ AgentToolChildAdapter as P,
6864
+ MCPClientManagerOptions as Pt,
6865
+ ChatCapableAgentClass as Q,
6866
+ RPC_DO_PREFIX as Qt,
6867
+ AgentToolEventState as R,
6868
+ MCPDiscoverResult as Rt,
6861
6869
  MCPServerMessage as S,
6862
- SUB_PREFIX as Sn,
6863
- WorkflowPage as St,
6864
- RPCRequest as T,
6865
- buildAgentUrl as Tn,
6866
- WorkflowRejectedError as Tt,
6867
- AgentToolMilestone as U,
6868
- MCP_SERVER_ID_MAX_LENGTH as Ut,
6869
- AgentToolInterruptedReason as V,
6870
- MCPServerFilter as Vt,
6871
- AgentToolProgress as W,
6872
- RegisterServerOptions as Wt,
6873
- AgentToolRunStatus as X,
6874
- RPCClientTransportOptions as Xt,
6875
- AgentToolRunState as Y,
6876
- RPCClientTransport as Yt,
6877
- AgentToolStoredChunk as Z,
6878
- RPCServerTransport as Zt,
6870
+ SubAgentPathMatch as Sn,
6871
+ WorkflowProgressCallback as St,
6872
+ RPCResponse as T,
6873
+ buildSubAgentPath as Tn,
6874
+ WorkflowStatus as Tt,
6875
+ AgentToolProgress as U,
6876
+ RegisterServerOptions as Ut,
6877
+ AgentToolLifecycleResult as V,
6878
+ MCPServerOptions as Vt,
6879
+ AgentToolProgressSnapshot as W,
6880
+ getNamespacedData as Wt,
6881
+ AgentToolStoredChunk as X,
6882
+ RPCServerTransport as Xt,
6883
+ AgentToolRunStatus as Y,
6884
+ RPCClientTransportOptions as Yt,
6885
+ AgentToolTerminalStatus as Z,
6886
+ RPCServerTransportOptions as Zt,
6879
6887
  FiberRecoveryContext as _,
6880
- StreamableHTTPEdgeClientTransport as _n,
6881
- WorkflowCompleteCallback as _t,
6888
+ DynamicAgentClass as _n,
6889
+ WorkflowErrorCallback as _t,
6882
6890
  routeAgentRequest as a,
6883
- DurableObjectEventStore as an,
6884
- AgentWorkflowInternalParams as at,
6891
+ createMcpHandler$1 as an,
6892
+ AgentWorkflowOrigin as at,
6885
6893
  ListFibersOptions as b,
6886
- AgentPathStep as bn,
6887
- WorkflowEventPayload as bt,
6894
+ BuildAgentPathOptions as bn,
6895
+ WorkflowInfo as bt,
6888
6896
  Agent as c,
6889
- CreateLegacyMcpHandlerOptions as cn,
6890
- AgentWorkflowPathStep as ct,
6897
+ CreateMcpHandlerOptions$1 as cn,
6898
+ AgentWorkflowStep as ct,
6891
6899
  AgentStaticOptions as d,
6892
- createLegacyMcpHandler as dn,
6893
- DefaultProgress as dt,
6894
- ElicitRequest$2 as en,
6895
- DetachedAgentToolConfig as et,
6900
+ MCPStorageApi as dn,
6901
+ RunWorkflowOptions as dt,
6902
+ ElicitRequestSchema as en,
6903
+ DetachedRunAgentToolResult as et,
6896
6904
  DEFAULT_AGENT_STATIC_OPTIONS as f,
6897
- MCPStorageApi as fn,
6898
- RunWorkflowOptions as ft,
6905
+ TransportState as fn,
6906
+ WaitForApprovalOptions as ft,
6899
6907
  FiberInspection as g,
6900
- SSEEdgeClientTransport as gn,
6901
- WorkflowCallbackType as gt,
6908
+ StreamableHTTPEdgeClientTransport as gn,
6909
+ WorkflowCompleteCallback as gt,
6902
6910
  FiberContext as h,
6903
- WorkerTransportOptions as hn,
6904
- WorkflowCallbackBase as ht,
6911
+ SSEEdgeClientTransport as hn,
6912
+ WorkflowCallbackType as ht,
6905
6913
  getAgentByName as i,
6906
- ClearableEventStore as in,
6907
- AgentWorkflowEvent as it,
6908
- getCurrentAgent as j,
6909
- withInvocationScope as jn,
6910
- MCPAIToolSet as jt,
6911
- StateUpdateMessage as k,
6912
- parseSubAgentPath as kn,
6913
- ElicitResult$2 as kt,
6914
+ DurableObjectEventStore as in,
6915
+ AgentWorkflowInternalParams as it,
6916
+ routeAgentEmail as j,
6917
+ MCPClientElicitationHandler as jt,
6918
+ StreamingResponse as k,
6919
+ routeSubAgentRequest as kn,
6920
+ MCPAITool as kt,
6914
6921
  AgentContext as l,
6915
- CreateMcpHandlerOptions$1 as ln,
6916
- AgentWorkflowStep as lt,
6922
+ LegacyMcpHandler as ln,
6923
+ ApprovalEventPayload as lt,
6917
6924
  EmailRoutingOptions as m,
6918
- WorkerTransport as mn,
6919
- WorkflowCallback as mt,
6925
+ WorkerTransportOptions as mn,
6926
+ WorkflowCallbackBase as mt,
6920
6927
  AgentOptions as n,
6921
- ElicitResult$3 as nn,
6922
- RunAgentToolOptions as nt,
6928
+ McpAgent as nn,
6929
+ RunAgentToolResult as nt,
6923
6930
  AddMcpServerOptions as o,
6924
- createMcpHandler$1 as on,
6925
- AgentWorkflowOrigin as ot,
6931
+ experimental_createMcpHandler as on,
6932
+ AgentWorkflowParams as ot,
6926
6933
  DeleteFibersOptions as p,
6927
- TransportState as pn,
6928
- WaitForApprovalOptions as pt,
6929
- AgentToolRunInspection as q,
6930
- MCPElicitationHandler as qt,
6934
+ WorkerTransport as pn,
6935
+ WorkflowCallback as pt,
6936
+ AgentToolRunPart as q,
6937
+ MCPElicitationHandlers as qt,
6931
6938
  RoutingRetryOptions as r,
6932
- McpAgent as rn,
6933
- RunAgentToolResult as rt,
6939
+ ClearableEventStore as rn,
6940
+ AgentWorkflowEvent as rt,
6934
6941
  AddRpcMcpServerOptions as s,
6935
- experimental_createMcpHandler as sn,
6936
- AgentWorkflowParams as st,
6942
+ CreateLegacyMcpHandlerOptions as sn,
6943
+ AgentWorkflowPathStep as st,
6937
6944
  AgentGetOptions as t,
6938
- ElicitRequestSchema as tn,
6939
- DetachedRunAgentToolResult as tt,
6945
+ ElicitResult$3 as tn,
6946
+ RunAgentToolOptions as tt,
6940
6947
  AgentNamespace as u,
6941
- LegacyMcpHandler as un,
6942
- ApprovalEventPayload as ut,
6948
+ createLegacyMcpHandler as un,
6949
+ DefaultProgress as ut,
6943
6950
  FiberRecoveryResult as v,
6944
- DynamicAgentClass as vn,
6945
- WorkflowErrorCallback as vt,
6946
- QueueItem as w,
6947
- buildAgentPath as wn,
6948
- WorkflowQueryCriteria as wt,
6951
+ DynamicAgentStub as vn,
6952
+ WorkflowEventCallback as vt,
6953
+ RPCRequest as w,
6954
+ buildAgentUrl as wn,
6955
+ WorkflowRejectedError as wt,
6949
6956
  MCPServer as x,
6950
- BuildAgentPathOptions as xn,
6951
- WorkflowInfo as xt,
6957
+ SUB_PREFIX as xn,
6958
+ WorkflowPage as xt,
6952
6959
  FiberStatus as y,
6953
- DynamicAgentStub as yn,
6954
- WorkflowEventCallback as yt,
6955
- AgentToolEventState as z,
6956
- MCPDiscoverResult as zt
6960
+ AgentPathStep as yn,
6961
+ WorkflowEventPayload as yt,
6962
+ AgentToolFailure as z,
6963
+ MCPOAuthCallbackResult as zt
6957
6964
  };
6958
- //# sourceMappingURL=agent-routing-DE5zmCQ8.d.ts.map
6965
+ //# sourceMappingURL=agent-routing-B2XLNMxq.d.ts.map
@@ -4,7 +4,7 @@ import {
4
4
  n as AgentOptions,
5
5
  r as RoutingRetryOptions,
6
6
  t as AgentGetOptions
7
- } from "./agent-routing-DE5zmCQ8.js";
7
+ } from "./agent-routing-B2XLNMxq.js";
8
8
  export {
9
9
  AgentGetOptions,
10
10
  AgentOptions,
@@ -1,30 +1,30 @@
1
1
  import {
2
- $ as ChatCapableAgentClass,
3
- B as AgentToolFailure,
4
- F as AgentToolChildAdapter,
5
- G as AgentToolProgressSnapshot,
6
- H as AgentToolLifecycleResult,
7
- I as AgentToolDisplayMetadata,
8
- J as AgentToolRunPart,
9
- K as AgentToolRunInfo,
10
- L as AgentToolEvent,
11
- N as AGENT_TOOL_MILESTONE_PART,
12
- P as AGENT_TOOL_PROGRESS_PART,
13
- Q as AgentToolTerminalStatus,
14
- R as AgentToolEventMessage,
15
- U as AgentToolMilestone,
16
- V as AgentToolInterruptedReason,
17
- W as AgentToolProgress,
18
- X as AgentToolRunStatus,
19
- Y as AgentToolRunState,
20
- Z as AgentToolStoredChunk,
21
- et as DetachedAgentToolConfig,
22
- nt as RunAgentToolOptions,
23
- q as AgentToolRunInspection,
24
- rt as RunAgentToolResult,
25
- tt as DetachedRunAgentToolResult,
26
- z as AgentToolEventState
27
- } from "./agent-routing-DE5zmCQ8.js";
2
+ $ as DetachedAgentToolConfig,
3
+ B as AgentToolInterruptedReason,
4
+ F as AgentToolDisplayMetadata,
5
+ G as AgentToolRunInfo,
6
+ H as AgentToolMilestone,
7
+ I as AgentToolEvent,
8
+ J as AgentToolRunState,
9
+ K as AgentToolRunInspection,
10
+ L as AgentToolEventMessage,
11
+ M as AGENT_TOOL_MILESTONE_PART,
12
+ N as AGENT_TOOL_PROGRESS_PART,
13
+ P as AgentToolChildAdapter,
14
+ Q as ChatCapableAgentClass,
15
+ R as AgentToolEventState,
16
+ U as AgentToolProgress,
17
+ V as AgentToolLifecycleResult,
18
+ W as AgentToolProgressSnapshot,
19
+ X as AgentToolStoredChunk,
20
+ Y as AgentToolRunStatus,
21
+ Z as AgentToolTerminalStatus,
22
+ et as DetachedRunAgentToolResult,
23
+ nt as RunAgentToolResult,
24
+ q as AgentToolRunPart,
25
+ tt as RunAgentToolOptions,
26
+ z as AgentToolFailure
27
+ } from "./agent-routing-B2XLNMxq.js";
28
28
  export {
29
29
  AGENT_TOOL_MILESTONE_PART,
30
30
  AGENT_TOOL_PROGRESS_PART,