agents 0.0.0-e4a2352 → 0.0.0-e8f693b

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 (77) hide show
  1. package/README.md +129 -7
  2. package/dist/ai-chat-agent.d.ts +20 -20
  3. package/dist/ai-chat-agent.js +532 -260
  4. package/dist/ai-chat-agent.js.map +1 -1
  5. package/dist/ai-chat-v5-migration-DBHGW4Hv.js +155 -0
  6. package/dist/ai-chat-v5-migration-DBHGW4Hv.js.map +1 -0
  7. package/dist/ai-chat-v5-migration.d.ts +155 -0
  8. package/dist/ai-chat-v5-migration.js +3 -0
  9. package/dist/ai-react.d.ts +73 -87
  10. package/dist/ai-react.js +261 -199
  11. package/dist/ai-react.js.map +1 -1
  12. package/dist/ai-types-B3aQaFv3.js +20 -0
  13. package/dist/ai-types-B3aQaFv3.js.map +1 -0
  14. package/dist/ai-types-D5YoPrBZ.d.ts +95 -0
  15. package/dist/ai-types.d.ts +6 -74
  16. package/dist/ai-types.js +3 -1
  17. package/dist/client-9Ld2_lnt.js +786 -0
  18. package/dist/client-9Ld2_lnt.js.map +1 -0
  19. package/dist/client-B17XUTV7.d.ts +5313 -0
  20. package/dist/client-BfiZ3HQd.js +117 -0
  21. package/dist/client-BfiZ3HQd.js.map +1 -0
  22. package/dist/client-CbWe9FBd.d.ts +104 -0
  23. package/dist/client.d.ts +11 -92
  24. package/dist/client.js +4 -11
  25. package/dist/codemode/ai.d.ts +27 -0
  26. package/dist/codemode/ai.js +151 -0
  27. package/dist/codemode/ai.js.map +1 -0
  28. package/dist/do-oauth-client-provider-CswoD5Lu.js +93 -0
  29. package/dist/do-oauth-client-provider-CswoD5Lu.js.map +1 -0
  30. package/dist/do-oauth-client-provider-DGc5pP0l.d.ts +55 -0
  31. package/dist/{index-BCJclX6q.d.ts → index-B6MjW6n-.d.ts} +100 -155
  32. package/dist/index-DhJCaDWd.d.ts +58 -0
  33. package/dist/index.d.ts +69 -40
  34. package/dist/index.js +7 -28
  35. package/dist/mcp/client.d.ts +4 -11
  36. package/dist/mcp/client.js +3 -9
  37. package/dist/mcp/do-oauth-client-provider.d.ts +2 -41
  38. package/dist/mcp/do-oauth-client-provider.js +3 -7
  39. package/dist/mcp/index.d.ts +126 -99
  40. package/dist/mcp/index.js +1222 -901
  41. package/dist/mcp/index.js.map +1 -1
  42. package/dist/mcp/x402.d.ts +34 -0
  43. package/dist/mcp/x402.js +194 -0
  44. package/dist/mcp/x402.js.map +1 -0
  45. package/dist/mcp-Dw5vDrY8.d.ts +61 -0
  46. package/dist/observability/index.d.ts +3 -14
  47. package/dist/observability/index.js +7 -10
  48. package/dist/react-CRBsIQ1z.d.ts +115 -0
  49. package/dist/react.d.ts +10 -121
  50. package/dist/react.js +183 -110
  51. package/dist/react.js.map +1 -1
  52. package/dist/schedule.d.ts +87 -10
  53. package/dist/schedule.js +46 -21
  54. package/dist/schedule.js.map +1 -1
  55. package/dist/serializable-CymX8ovI.d.ts +39 -0
  56. package/dist/serializable.d.ts +7 -32
  57. package/dist/serializable.js +1 -1
  58. package/dist/src-Dz0H9hSU.js +1200 -0
  59. package/dist/src-Dz0H9hSU.js.map +1 -0
  60. package/package.json +45 -11
  61. package/dist/ai-types.js.map +0 -1
  62. package/dist/chunk-HY7ZLHJB.js +0 -598
  63. package/dist/chunk-HY7ZLHJB.js.map +0 -1
  64. package/dist/chunk-JXN5WZFQ.js +0 -1287
  65. package/dist/chunk-JXN5WZFQ.js.map +0 -1
  66. package/dist/chunk-KUH345EY.js +0 -116
  67. package/dist/chunk-KUH345EY.js.map +0 -1
  68. package/dist/chunk-PVQZBKN7.js +0 -106
  69. package/dist/chunk-PVQZBKN7.js.map +0 -1
  70. package/dist/client-DgyzBU_8.d.ts +0 -4601
  71. package/dist/client.js.map +0 -1
  72. package/dist/index.js.map +0 -1
  73. package/dist/mcp/client.js.map +0 -1
  74. package/dist/mcp/do-oauth-client-provider.js.map +0 -1
  75. package/dist/observability/index.js.map +0 -1
  76. package/dist/serializable.js.map +0 -1
  77. package/src/index.ts +0 -1917
@@ -0,0 +1,55 @@
1
+ import { OAuthClientProvider } from "@modelcontextprotocol/sdk/client/auth.js";
2
+ import {
3
+ OAuthClientInformation,
4
+ OAuthClientInformationFull,
5
+ OAuthClientMetadata,
6
+ OAuthTokens
7
+ } from "@modelcontextprotocol/sdk/shared/auth.js";
8
+
9
+ //#region src/mcp/do-oauth-client-provider.d.ts
10
+ interface AgentsOAuthProvider extends OAuthClientProvider {
11
+ authUrl: string | undefined;
12
+ clientId: string | undefined;
13
+ serverId: string | undefined;
14
+ }
15
+ declare class DurableObjectOAuthClientProvider implements AgentsOAuthProvider {
16
+ storage: DurableObjectStorage;
17
+ clientName: string;
18
+ baseRedirectUrl: string;
19
+ private _authUrl_;
20
+ private _serverId_;
21
+ private _clientId_;
22
+ constructor(
23
+ storage: DurableObjectStorage,
24
+ clientName: string,
25
+ baseRedirectUrl: string
26
+ );
27
+ get clientMetadata(): OAuthClientMetadata;
28
+ get clientUri(): string;
29
+ get redirectUrl(): string;
30
+ get clientId(): string;
31
+ set clientId(clientId_: string);
32
+ get serverId(): string;
33
+ set serverId(serverId_: string);
34
+ keyPrefix(clientId: string): string;
35
+ clientInfoKey(clientId: string): string;
36
+ clientInformation(): Promise<OAuthClientInformation | undefined>;
37
+ saveClientInformation(
38
+ clientInformation: OAuthClientInformationFull
39
+ ): Promise<void>;
40
+ tokenKey(clientId: string): string;
41
+ tokens(): Promise<OAuthTokens | undefined>;
42
+ saveTokens(tokens: OAuthTokens): Promise<void>;
43
+ get authUrl(): string | undefined;
44
+ /**
45
+ * Because this operates on the server side (but we need browser auth), we send this url back to the user
46
+ * and require user interact to initiate the redirect flow
47
+ */
48
+ redirectToAuthorization(authUrl: URL): Promise<void>;
49
+ codeVerifierKey(clientId: string): string;
50
+ saveCodeVerifier(verifier: string): Promise<void>;
51
+ codeVerifier(): Promise<string>;
52
+ }
53
+ //#endregion
54
+ export { DurableObjectOAuthClientProvider as n, AgentsOAuthProvider as t };
55
+ //# sourceMappingURL=do-oauth-client-provider-DGc5pP0l.d.ts.map
@@ -1,88 +1,28 @@
1
- import { env } from "cloudflare:workers";
1
+ import {
2
+ a as MCPConnectionState,
3
+ l as TransportType,
4
+ t as MCPClientManager
5
+ } from "./client-B17XUTV7.js";
6
+ import { t as Observability } from "./index-DhJCaDWd.js";
7
+ import { n as MessageType } from "./ai-types-D5YoPrBZ.js";
8
+ import {
9
+ Connection,
10
+ Connection as Connection$1,
11
+ ConnectionContext,
12
+ PartyServerOptions,
13
+ Server,
14
+ WSMessage
15
+ } from "partyserver";
2
16
  import { Client } from "@modelcontextprotocol/sdk/client/index.js";
3
17
  import {
4
- ServerCapabilities,
5
- Tool,
6
18
  Prompt,
7
- Resource
19
+ Resource,
20
+ ServerCapabilities,
21
+ Tool
8
22
  } from "@modelcontextprotocol/sdk/types.js";
9
- import { Server, Connection, PartyServerOptions } from "partyserver";
10
- import { M as MCPClientManager } from "./client-DgyzBU_8.js";
11
- import { Message } from "ai";
23
+ import { env } from "cloudflare:workers";
12
24
 
13
- type BaseEvent<
14
- T extends string,
15
- Payload extends Record<string, unknown> = {}
16
- > = {
17
- type: T;
18
- /**
19
- * The unique identifier for the event
20
- */
21
- id: string;
22
- /**
23
- * The message to display in the logs for this event, should the implementation choose to display
24
- * a human-readable message.
25
- */
26
- displayMessage: string;
27
- /**
28
- * The payload of the event
29
- */
30
- payload: Payload;
31
- /**
32
- * The timestamp of the event in milliseconds since epoch
33
- */
34
- timestamp: number;
35
- };
36
- /**
37
- * The type of events that can be emitted by an Agent
38
- */
39
- type ObservabilityEvent =
40
- | BaseEvent<
41
- "state:update",
42
- {
43
- state: unknown;
44
- previousState: unknown;
45
- }
46
- >
47
- | BaseEvent<
48
- "rpc",
49
- {
50
- method: string;
51
- args: unknown[];
52
- streaming?: boolean;
53
- success: boolean;
54
- }
55
- >
56
- | BaseEvent<
57
- "message:request" | "message:response",
58
- {
59
- message: Message[];
60
- }
61
- >
62
- | BaseEvent<"message:clear">
63
- | BaseEvent<
64
- "schedule:create" | "schedule:execute" | "schedule:cancel",
65
- Schedule<unknown>
66
- >
67
- | BaseEvent<"destroy">
68
- | BaseEvent<
69
- "connect",
70
- {
71
- connectionId: string;
72
- }
73
- >;
74
- interface Observability {
75
- /**
76
- * Emit an event for the Agent's observability implementation to handle.
77
- * @param event - The event to emit
78
- * @param ctx - The execution context of the invocation
79
- */
80
- emit(event: ObservabilityEvent, ctx: DurableObjectState): void;
81
- }
82
- /**
83
- * A generic observability implementation that logs events to the console.
84
- */
85
- declare const genericObservability: Observability;
25
+ //#region src/index.d.ts
86
26
 
87
27
  /**
88
28
  * RPC request message from client
@@ -97,14 +37,14 @@ type RPCRequest = {
97
37
  * State update message from client
98
38
  */
99
39
  type StateUpdateMessage = {
100
- type: "cf_agent_state";
40
+ type: MessageType.CF_AGENT_STATE;
101
41
  state: unknown;
102
42
  };
103
43
  /**
104
44
  * RPC response message to client
105
45
  */
106
46
  type RPCResponse = {
107
- type: "rpc";
47
+ type: MessageType.RPC;
108
48
  id: string;
109
49
  } & (
110
50
  | {
@@ -135,15 +75,21 @@ type CallableMetadata = {
135
75
  * Decorator that marks a method as callable by clients
136
76
  * @param metadata Optional metadata about the callable method
137
77
  */
138
- declare function unstable_callable(
78
+ declare function callable(
139
79
  metadata?: CallableMetadata
140
80
  ): <This, Args extends unknown[], Return>(
141
81
  target: (this: This, ...args: Args) => Return,
142
82
  context: ClassMethodDecoratorContext
143
83
  ) => (this: This, ...args: Args) => Return;
144
- type QueueItem<T = string> = {
84
+ /**
85
+ * Decorator that marks a method as callable by clients
86
+ * @deprecated this has been renamed to callable, and unstable_callable will be removed in the next major version
87
+ * @param metadata Optional metadata about the callable method
88
+ */
89
+ declare const unstable_callable: (metadata?: CallableMetadata) => void;
90
+ type QueueItem<T$1 = string> = {
145
91
  id: string;
146
- payload: T;
92
+ payload: T$1;
147
93
  callback: keyof Agent<unknown>;
148
94
  created_at: number;
149
95
  };
@@ -151,13 +97,13 @@ type QueueItem<T = string> = {
151
97
  * Represents a scheduled task within an Agent
152
98
  * @template T Type of the payload data
153
99
  */
154
- type Schedule<T = string> = {
100
+ type Schedule<T$1 = string> = {
155
101
  /** Unique identifier for the schedule */
156
102
  id: string;
157
103
  /** Name of the method to be called */
158
104
  callback: string;
159
105
  /** Data to be passed to the callback */
160
- payload: T;
106
+ payload: T$1;
161
107
  } & (
162
108
  | {
163
109
  /** Type of schedule for one-time execution at a specific time */
@@ -186,7 +132,7 @@ type Schedule<T = string> = {
186
132
  * MCP Server state update message from server -> Client
187
133
  */
188
134
  type MCPServerMessage = {
189
- type: "cf_agent_mcp_servers";
135
+ type: MessageType.CF_AGENT_MCP_SERVERS;
190
136
  mcp: MCPServersState;
191
137
  };
192
138
  type MCPServersState = {
@@ -201,14 +147,14 @@ type MCPServer = {
201
147
  name: string;
202
148
  server_url: string;
203
149
  auth_url: string | null;
204
- state: "authenticating" | "connecting" | "ready" | "discovering" | "failed";
150
+ state: MCPConnectionState;
205
151
  instructions: string | null;
206
152
  capabilities: ServerCapabilities | null;
207
153
  };
208
154
  declare function getCurrentAgent<
209
- T extends Agent<unknown, unknown> = Agent<unknown, unknown>
155
+ T$1 extends Agent<unknown, unknown> = Agent<unknown, unknown>
210
156
  >(): {
211
- agent: T | undefined;
157
+ agent: T$1 | undefined;
212
158
  connection: Connection | undefined;
213
159
  request: Request | undefined;
214
160
  email: AgentEmail | undefined;
@@ -218,10 +164,16 @@ declare function getCurrentAgent<
218
164
  * @template Env Environment type containing bindings
219
165
  * @template State State type to store within the Agent
220
166
  */
221
- declare class Agent<Env = typeof env, State = unknown> extends Server<Env> {
167
+ declare class Agent<
168
+ Env = typeof env,
169
+ State = unknown,
170
+ Props extends Record<string, unknown> = Record<string, unknown>
171
+ > extends Server<Env, Props> {
222
172
  private _state;
173
+ private _disposables;
174
+ private _mcpStateRestored;
223
175
  private _ParentClass;
224
- mcp: MCPClientManager;
176
+ readonly mcp: MCPClientManager;
225
177
  /**
226
178
  * Initial state for the Agent
227
179
  * Override to provide default state values
@@ -395,58 +347,44 @@ declare class Agent<Env = typeof env, State = unknown> extends Server<Env> {
395
347
  * @returns A map of method names to their metadata
396
348
  */
397
349
  private _isCallable;
350
+ private _ensureMcpStateRestored;
398
351
  /**
399
352
  * Connect to a new MCP Server
400
353
  *
354
+ * @param serverName Name of the MCP server
401
355
  * @param url MCP Server SSE URL
402
- * @param callbackHost Base host for the agent, used for the redirect URI.
356
+ * @param callbackHost Base host for the agent, used for the redirect URI. If not provided, will be derived from the current request.
403
357
  * @param agentsPrefix agents routing prefix if not using `agents`
404
- * @param options MCP client and transport (header) options
358
+ * @param options MCP client and transport options
405
359
  * @returns authUrl
406
360
  */
407
361
  addMcpServer(
408
362
  serverName: string,
409
363
  url: string,
410
- callbackHost: string,
364
+ callbackHost?: string,
411
365
  agentsPrefix?: string,
412
366
  options?: {
413
367
  client?: ConstructorParameters<typeof Client>[1];
414
- transport?: {
415
- headers: HeadersInit;
416
- };
417
- }
418
- ): Promise<{
419
- id: string;
420
- authUrl: string | undefined;
421
- }>;
422
- _connectToMcpServerInternal(
423
- _serverName: string,
424
- url: string,
425
- callbackUrl: string,
426
- options?: {
427
- client?: ConstructorParameters<typeof Client>[1];
428
- /**
429
- * We don't expose the normal set of transport options because:
430
- * 1) we can't serialize things like the auth provider or a fetch function into the DB for reconnection purposes
431
- * 2) We probably want these options to be agnostic to the transport type (SSE vs Streamable)
432
- *
433
- * This has the limitation that you can't override fetch, but I think headers should handle nearly all cases needed (i.e. non-standard bearer auth).
434
- */
435
368
  transport?: {
436
369
  headers?: HeadersInit;
370
+ type?: TransportType;
437
371
  };
438
- },
439
- reconnect?: {
440
- id: string;
441
- oauthClientId?: string;
442
372
  }
443
373
  ): Promise<{
444
374
  id: string;
445
375
  authUrl: string | undefined;
446
- clientId: string | undefined;
447
376
  }>;
377
+ private _connectToMcpServerInternal;
448
378
  removeMcpServer(id: string): Promise<void>;
449
379
  getMcpServers(): MCPServersState;
380
+ private broadcastMcpServers;
381
+ /**
382
+ * Handle OAuth callback response using MCPClientManager configuration
383
+ * @param result OAuth callback result
384
+ * @param request The original request (needed for base URL)
385
+ * @returns Response for the OAuth callback
386
+ */
387
+ private handleOAuthCallbackResponse;
450
388
  }
451
389
  /**
452
390
  * Namespace for creating Agent instances
@@ -554,14 +492,19 @@ type EmailSendOptions = {
554
492
  * @param options Options for Agent creation
555
493
  * @returns Promise resolving to an Agent instance stub
556
494
  */
557
- declare function getAgentByName<Env, T extends Agent<Env>>(
558
- namespace: AgentNamespace<T>,
495
+ declare function getAgentByName<
496
+ Env,
497
+ T$1 extends Agent<Env>,
498
+ Props extends Record<string, unknown> = Record<string, unknown>
499
+ >(
500
+ namespace: AgentNamespace<T$1>,
559
501
  name: string,
560
502
  options?: {
561
503
  jurisdiction?: DurableObjectJurisdiction;
562
504
  locationHint?: DurableObjectLocationHint;
505
+ props?: Props;
563
506
  }
564
- ): Promise<DurableObjectStub<T>>;
507
+ ): Promise<DurableObjectStub<T$1>>;
565
508
  /**
566
509
  * A wrapper for streaming responses in callable methods
567
510
  */
@@ -581,35 +524,37 @@ declare class StreamingResponse {
581
524
  */
582
525
  end(finalChunk?: unknown): void;
583
526
  }
584
-
527
+ //#endregion
585
528
  export {
586
- Agent as A,
587
- type CallableMetadata as C,
588
- type EmailResolver as E,
589
- type MCPServersState as M,
590
- type ObservabilityEvent as O,
591
- type QueueItem as Q,
592
- type RPCRequest as R,
593
- type StateUpdateMessage as S,
594
- type AgentContext as a,
595
- type Observability as b,
596
- type RPCResponse as c,
597
- type Schedule as d,
598
- type MCPServerMessage as e,
599
- type MCPServer as f,
600
- genericObservability as g,
601
- getCurrentAgent as h,
602
- type AgentNamespace as i,
603
- type AgentOptions as j,
604
- createHeaderBasedEmailResolver as k,
605
- createAddressBasedEmailResolver as l,
606
- createCatchAllEmailResolver as m,
607
- type EmailRoutingOptions as n,
608
- routeAgentEmail as o,
609
- type AgentEmail as p,
610
- type EmailSendOptions as q,
611
- routeAgentRequest as r,
612
- getAgentByName as s,
613
- StreamingResponse as t,
614
- unstable_callable as u
529
+ unstable_callable as A,
530
+ createAddressBasedEmailResolver as C,
531
+ getCurrentAgent as D,
532
+ getAgentByName as E,
533
+ routeAgentEmail as O,
534
+ callable as S,
535
+ createHeaderBasedEmailResolver as T,
536
+ RPCResponse as _,
537
+ AgentOptions as a,
538
+ StreamingResponse as b,
539
+ ConnectionContext as c,
540
+ EmailSendOptions as d,
541
+ MCPServer as f,
542
+ RPCRequest as g,
543
+ QueueItem as h,
544
+ AgentNamespace as i,
545
+ routeAgentRequest as k,
546
+ EmailResolver as l,
547
+ MCPServersState as m,
548
+ AgentContext as n,
549
+ CallableMetadata as o,
550
+ MCPServerMessage as p,
551
+ AgentEmail as r,
552
+ Connection$1 as s,
553
+ Agent as t,
554
+ EmailRoutingOptions as u,
555
+ Schedule as v,
556
+ createCatchAllEmailResolver as w,
557
+ WSMessage as x,
558
+ StateUpdateMessage as y
615
559
  };
560
+ //# sourceMappingURL=index-B6MjW6n-.d.ts.map
@@ -0,0 +1,58 @@
1
+ import { n as BaseEvent, t as MCPObservabilityEvent } from "./mcp-Dw5vDrY8.js";
2
+
3
+ //#region src/observability/agent.d.ts
4
+
5
+ /**
6
+ * Agent-specific observability events
7
+ * These track the lifecycle and operations of an Agent
8
+ */
9
+ type AgentObservabilityEvent =
10
+ | BaseEvent<"state:update", {}>
11
+ | BaseEvent<
12
+ "rpc",
13
+ {
14
+ method: string;
15
+ streaming?: boolean;
16
+ }
17
+ >
18
+ | BaseEvent<"message:request" | "message:response", {}>
19
+ | BaseEvent<"message:clear">
20
+ | BaseEvent<
21
+ "schedule:create" | "schedule:execute" | "schedule:cancel",
22
+ {
23
+ callback: string;
24
+ id: string;
25
+ }
26
+ >
27
+ | BaseEvent<"destroy">
28
+ | BaseEvent<
29
+ "connect",
30
+ {
31
+ connectionId: string;
32
+ }
33
+ >;
34
+ //#endregion
35
+ //#region src/observability/index.d.ts
36
+ /**
37
+ * Union of all observability event types from different domains
38
+ */
39
+ type ObservabilityEvent = AgentObservabilityEvent | MCPObservabilityEvent;
40
+ interface Observability {
41
+ /**
42
+ * Emit an event for the Agent's observability implementation to handle.
43
+ * @param event - The event to emit
44
+ * @param ctx - The execution context of the invocation (optional)
45
+ */
46
+ emit(event: ObservabilityEvent, ctx?: DurableObjectState): void;
47
+ }
48
+ /**
49
+ * A generic observability implementation that logs events to the console.
50
+ */
51
+ declare const genericObservability: Observability;
52
+ //#endregion
53
+ export {
54
+ ObservabilityEvent as n,
55
+ genericObservability as r,
56
+ Observability as t
57
+ };
58
+ //# sourceMappingURL=index-DhJCaDWd.d.ts.map
package/dist/index.d.ts CHANGED
@@ -1,41 +1,70 @@
1
- import "cloudflare:workers";
2
- import "@modelcontextprotocol/sdk/client/index.js";
3
- import "@modelcontextprotocol/sdk/types.js";
4
- export { Connection, ConnectionContext, WSMessage } from "partyserver";
5
- import "./client-DgyzBU_8.js";
6
- export {
7
- A as Agent,
8
- a as AgentContext,
9
- p as AgentEmail,
10
- i as AgentNamespace,
11
- j as AgentOptions,
12
- C as CallableMetadata,
13
- E as EmailResolver,
14
- n as EmailRoutingOptions,
15
- q as EmailSendOptions,
1
+ import { l as TransportType } from "./client-B17XUTV7.js";
2
+ import "./mcp-Dw5vDrY8.js";
3
+ import "./do-oauth-client-provider-DGc5pP0l.js";
4
+ import "./index-DhJCaDWd.js";
5
+ import "./ai-types-D5YoPrBZ.js";
6
+ import {
7
+ A as unstable_callable,
8
+ C as createAddressBasedEmailResolver,
9
+ D as getCurrentAgent,
10
+ E as getAgentByName,
11
+ O as routeAgentEmail,
12
+ S as callable,
13
+ T as createHeaderBasedEmailResolver,
14
+ _ as RPCResponse,
15
+ a as AgentOptions,
16
+ b as StreamingResponse,
17
+ c as ConnectionContext,
18
+ d as EmailSendOptions,
16
19
  f as MCPServer,
17
- e as MCPServerMessage,
18
- M as MCPServersState,
19
- Q as QueueItem,
20
- R as RPCRequest,
21
- c as RPCResponse,
22
- d as Schedule,
23
- S as StateUpdateMessage,
24
- t as StreamingResponse,
25
- l as createAddressBasedEmailResolver,
26
- m as createCatchAllEmailResolver,
27
- k as createHeaderBasedEmailResolver,
28
- s as getAgentByName,
29
- h as getCurrentAgent,
30
- o as routeAgentEmail,
31
- r as routeAgentRequest,
32
- u as unstable_callable
33
- } from "./index-BCJclX6q.js";
34
- import "zod";
35
- import "@modelcontextprotocol/sdk/shared/protocol.js";
36
- import "ai";
37
- import "@modelcontextprotocol/sdk/client/sse.js";
38
- import "@modelcontextprotocol/sdk/client/streamableHttp.js";
39
- import "./mcp/do-oauth-client-provider.js";
40
- import "@modelcontextprotocol/sdk/client/auth.js";
41
- import "@modelcontextprotocol/sdk/shared/auth.js";
20
+ g as RPCRequest,
21
+ h as QueueItem,
22
+ i as AgentNamespace,
23
+ k as routeAgentRequest,
24
+ l as EmailResolver,
25
+ m as MCPServersState,
26
+ n as AgentContext,
27
+ o as CallableMetadata,
28
+ p as MCPServerMessage,
29
+ r as AgentEmail,
30
+ s as Connection,
31
+ t as Agent,
32
+ u as EmailRoutingOptions,
33
+ v as Schedule,
34
+ w as createCatchAllEmailResolver,
35
+ x as WSMessage,
36
+ y as StateUpdateMessage
37
+ } from "./index-B6MjW6n-.js";
38
+ export {
39
+ Agent,
40
+ AgentContext,
41
+ AgentEmail,
42
+ AgentNamespace,
43
+ AgentOptions,
44
+ CallableMetadata,
45
+ Connection,
46
+ ConnectionContext,
47
+ EmailResolver,
48
+ EmailRoutingOptions,
49
+ EmailSendOptions,
50
+ MCPServer,
51
+ MCPServerMessage,
52
+ MCPServersState,
53
+ QueueItem,
54
+ RPCRequest,
55
+ RPCResponse,
56
+ Schedule,
57
+ StateUpdateMessage,
58
+ StreamingResponse,
59
+ TransportType,
60
+ WSMessage,
61
+ callable,
62
+ createAddressBasedEmailResolver,
63
+ createCatchAllEmailResolver,
64
+ createHeaderBasedEmailResolver,
65
+ getAgentByName,
66
+ getCurrentAgent,
67
+ routeAgentEmail,
68
+ routeAgentRequest,
69
+ unstable_callable
70
+ };
package/dist/index.js CHANGED
@@ -1,28 +1,7 @@
1
- import {
2
- Agent,
3
- StreamingResponse,
4
- createAddressBasedEmailResolver,
5
- createCatchAllEmailResolver,
6
- createHeaderBasedEmailResolver,
7
- getAgentByName,
8
- getCurrentAgent,
9
- routeAgentEmail,
10
- routeAgentRequest,
11
- unstable_callable
12
- } from "./chunk-JXN5WZFQ.js";
13
- import "./chunk-HY7ZLHJB.js";
14
- import "./chunk-PVQZBKN7.js";
15
- import "./chunk-KUH345EY.js";
16
- export {
17
- Agent,
18
- StreamingResponse,
19
- createAddressBasedEmailResolver,
20
- createCatchAllEmailResolver,
21
- createHeaderBasedEmailResolver,
22
- getAgentByName,
23
- getCurrentAgent,
24
- routeAgentEmail,
25
- routeAgentRequest,
26
- unstable_callable
27
- };
28
- //# sourceMappingURL=index.js.map
1
+ import "./ai-types-B3aQaFv3.js";
2
+ import "./client-BfiZ3HQd.js";
3
+ import "./client-9Ld2_lnt.js";
4
+ import "./do-oauth-client-provider-CswoD5Lu.js";
5
+ import { a as createCatchAllEmailResolver, c as getCurrentAgent, d as unstable_callable, i as createAddressBasedEmailResolver, l as routeAgentEmail, n as StreamingResponse, o as createHeaderBasedEmailResolver, r as callable, s as getAgentByName, t as Agent, u as routeAgentRequest } from "./src-Dz0H9hSU.js";
6
+
7
+ export { Agent, StreamingResponse, callable, createAddressBasedEmailResolver, createCatchAllEmailResolver, createHeaderBasedEmailResolver, getAgentByName, getCurrentAgent, routeAgentEmail, routeAgentRequest, unstable_callable };
@@ -1,11 +1,4 @@
1
- import 'zod';
2
- import '@modelcontextprotocol/sdk/client/index.js';
3
- import '@modelcontextprotocol/sdk/shared/protocol.js';
4
- import '@modelcontextprotocol/sdk/types.js';
5
- import 'ai';
6
- export { M as MCPClientManager, g as getNamespacedData } from '../client-DgyzBU_8.js';
7
- import '@modelcontextprotocol/sdk/client/sse.js';
8
- import '@modelcontextprotocol/sdk/client/streamableHttp.js';
9
- import './do-oauth-client-provider.js';
10
- import '@modelcontextprotocol/sdk/client/auth.js';
11
- import '@modelcontextprotocol/sdk/shared/auth.js';
1
+ import { i as getNamespacedData, n as MCPClientOAuthCallbackConfig, r as MCPClientOAuthResult, t as MCPClientManager } from "../client-B17XUTV7.js";
2
+ import "../mcp-Dw5vDrY8.js";
3
+ import "../do-oauth-client-provider-DGc5pP0l.js";
4
+ export { MCPClientManager, MCPClientOAuthCallbackConfig, MCPClientOAuthResult, getNamespacedData };
@@ -1,9 +1,3 @@
1
- import {
2
- MCPClientManager,
3
- getNamespacedData
4
- } from "../chunk-HY7ZLHJB.js";
5
- export {
6
- MCPClientManager,
7
- getNamespacedData
8
- };
9
- //# sourceMappingURL=client.js.map
1
+ import { n as getNamespacedData, t as MCPClientManager } from "../client-9Ld2_lnt.js";
2
+
3
+ export { MCPClientManager, getNamespacedData };