agents 0.0.0-d72c6a2 → 0.0.0-d7b2f14

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 (85) hide show
  1. package/README.md +5 -3
  2. package/dist/ai-chat-agent.d.ts +99 -19
  3. package/dist/ai-chat-agent.js +804 -351
  4. package/dist/ai-chat-agent.js.map +1 -1
  5. package/dist/ai-chat-v5-migration-BSiGZmYU.js +155 -0
  6. package/dist/ai-chat-v5-migration-BSiGZmYU.js.map +1 -0
  7. package/dist/ai-chat-v5-migration.d.ts +7 -4
  8. package/dist/ai-chat-v5-migration.js +3 -19
  9. package/dist/ai-react.d.ts +25 -23
  10. package/dist/ai-react.js +409 -304
  11. package/dist/ai-react.js.map +1 -1
  12. package/dist/ai-types-81H_-Uxh.d.ts +103 -0
  13. package/dist/ai-types-CrMqkwc_.js +24 -0
  14. package/dist/ai-types-CrMqkwc_.js.map +1 -0
  15. package/dist/ai-types.d.ts +6 -91
  16. package/dist/ai-types.js +3 -7
  17. package/dist/cli/index.d.ts +1 -0
  18. package/dist/cli/index.js +28 -0
  19. package/dist/cli/index.js.map +1 -0
  20. package/dist/client-B3SR12TQ.js +117 -0
  21. package/dist/client-B3SR12TQ.js.map +1 -0
  22. package/dist/client-BAQA84dr.d.ts +104 -0
  23. package/dist/client-CFhjXCiO.js +1093 -0
  24. package/dist/client-CFhjXCiO.js.map +1 -0
  25. package/dist/client-z9RQJDtK.d.ts +833 -0
  26. package/dist/client.d.ts +11 -92
  27. package/dist/client.js +4 -12
  28. package/dist/codemode/ai.d.ts +27 -0
  29. package/dist/codemode/ai.js +151 -0
  30. package/dist/codemode/ai.js.map +1 -0
  31. package/dist/do-oauth-client-provider-C2CHH5x-.d.ts +55 -0
  32. package/dist/do-oauth-client-provider-CwqK5SXm.js +94 -0
  33. package/dist/do-oauth-client-provider-CwqK5SXm.js.map +1 -0
  34. package/dist/index-BUle9RiP.d.ts +58 -0
  35. package/dist/index-D3s0zwxa.d.ts +587 -0
  36. package/dist/index.d.ts +56 -550
  37. package/dist/index.js +7 -31
  38. package/dist/mcp/client.d.ts +4 -11
  39. package/dist/mcp/client.js +4 -9
  40. package/dist/mcp/do-oauth-client-provider.d.ts +2 -42
  41. package/dist/mcp/do-oauth-client-provider.js +3 -7
  42. package/dist/mcp/index.d.ts +188 -92
  43. package/dist/mcp/index.js +1430 -1012
  44. package/dist/mcp/index.js.map +1 -1
  45. package/dist/mcp/x402.d.ts +34 -0
  46. package/dist/mcp/x402.js +198 -0
  47. package/dist/mcp/x402.js.map +1 -0
  48. package/dist/mcp-BwPscEiF.d.ts +61 -0
  49. package/dist/observability/index.d.ts +3 -46
  50. package/dist/observability/index.js +7 -11
  51. package/dist/react-D9Ou_tyQ.d.ts +113 -0
  52. package/dist/react.d.ts +10 -123
  53. package/dist/react.js +183 -112
  54. package/dist/react.js.map +1 -1
  55. package/dist/schedule.d.ts +13 -10
  56. package/dist/schedule.js +43 -31
  57. package/dist/schedule.js.map +1 -1
  58. package/dist/serializable-faDkMCai.d.ts +39 -0
  59. package/dist/serializable.d.ts +7 -32
  60. package/dist/serializable.js +1 -1
  61. package/dist/src-CNAXL7wY.js +1182 -0
  62. package/dist/src-CNAXL7wY.js.map +1 -0
  63. package/package.json +71 -32
  64. package/dist/ai-chat-v5-migration.js.map +0 -1
  65. package/dist/ai-types.js.map +0 -1
  66. package/dist/chunk-AVYJQSLW.js +0 -17
  67. package/dist/chunk-AVYJQSLW.js.map +0 -1
  68. package/dist/chunk-LL2AFX7V.js +0 -109
  69. package/dist/chunk-LL2AFX7V.js.map +0 -1
  70. package/dist/chunk-MH46VMM4.js +0 -612
  71. package/dist/chunk-MH46VMM4.js.map +0 -1
  72. package/dist/chunk-QEVM4BVL.js +0 -116
  73. package/dist/chunk-QEVM4BVL.js.map +0 -1
  74. package/dist/chunk-UJVEAURM.js +0 -150
  75. package/dist/chunk-UJVEAURM.js.map +0 -1
  76. package/dist/chunk-YDUDMOL6.js +0 -1296
  77. package/dist/chunk-YDUDMOL6.js.map +0 -1
  78. package/dist/client-CvaJdLQA.d.ts +0 -5015
  79. package/dist/client.js.map +0 -1
  80. package/dist/index.js.map +0 -1
  81. package/dist/mcp/client.js.map +0 -1
  82. package/dist/mcp/do-oauth-client-provider.js.map +0 -1
  83. package/dist/observability/index.js.map +0 -1
  84. package/dist/serializable.js.map +0 -1
  85. package/src/index.ts +0 -1947
@@ -0,0 +1,587 @@
1
+ import {
2
+ h as TransportType,
3
+ t as MCPClientManager,
4
+ u as MCPConnectionState
5
+ } from "./client-z9RQJDtK.js";
6
+ import { t as Observability } from "./index-BUle9RiP.js";
7
+ import { n as MessageType } from "./ai-types-81H_-Uxh.js";
8
+ import {
9
+ Connection,
10
+ Connection as Connection$1,
11
+ ConnectionContext,
12
+ PartyServerOptions,
13
+ Server,
14
+ WSMessage
15
+ } from "partyserver";
16
+ import { Client } from "@modelcontextprotocol/sdk/client/index.js";
17
+ import {
18
+ Prompt,
19
+ Resource,
20
+ ServerCapabilities,
21
+ Tool
22
+ } from "@modelcontextprotocol/sdk/types.js";
23
+ import { env } from "cloudflare:workers";
24
+
25
+ //#region src/index.d.ts
26
+
27
+ /**
28
+ * RPC request message from client
29
+ */
30
+ type RPCRequest = {
31
+ type: "rpc";
32
+ id: string;
33
+ method: string;
34
+ args: unknown[];
35
+ };
36
+ /**
37
+ * State update message from client
38
+ */
39
+ type StateUpdateMessage = {
40
+ type: MessageType.CF_AGENT_STATE;
41
+ state: unknown;
42
+ };
43
+ /**
44
+ * RPC response message to client
45
+ */
46
+ type RPCResponse = {
47
+ type: MessageType.RPC;
48
+ id: string;
49
+ } & (
50
+ | {
51
+ success: true;
52
+ result: unknown;
53
+ done?: false;
54
+ }
55
+ | {
56
+ success: true;
57
+ result: unknown;
58
+ done: true;
59
+ }
60
+ | {
61
+ success: false;
62
+ error: string;
63
+ }
64
+ );
65
+ /**
66
+ * Metadata for a callable method
67
+ */
68
+ type CallableMetadata = {
69
+ /** Optional description of what the method does */
70
+ description?: string;
71
+ /** Whether the method supports streaming responses */
72
+ streaming?: boolean;
73
+ };
74
+ /**
75
+ * Decorator that marks a method as callable by clients
76
+ * @param metadata Optional metadata about the callable method
77
+ */
78
+ declare function callable(
79
+ metadata?: CallableMetadata
80
+ ): <This, Args extends unknown[], Return>(
81
+ target: (this: This, ...args: Args) => Return,
82
+ context: ClassMethodDecoratorContext
83
+ ) => (this: This, ...args: Args) => Return;
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 = string> = {
91
+ id: string;
92
+ payload: T;
93
+ callback: keyof Agent<unknown>;
94
+ created_at: number;
95
+ };
96
+ /**
97
+ * Represents a scheduled task within an Agent
98
+ * @template T Type of the payload data
99
+ */
100
+ type Schedule<T = string> = {
101
+ /** Unique identifier for the schedule */
102
+ id: string;
103
+ /** Name of the method to be called */
104
+ callback: string;
105
+ /** Data to be passed to the callback */
106
+ payload: T;
107
+ } & (
108
+ | {
109
+ /** Type of schedule for one-time execution at a specific time */
110
+ type: "scheduled";
111
+ /** Timestamp when the task should execute */
112
+ time: number;
113
+ }
114
+ | {
115
+ /** Type of schedule for delayed execution */
116
+ type: "delayed";
117
+ /** Timestamp when the task should execute */
118
+ time: number;
119
+ /** Number of seconds to delay execution */
120
+ delayInSeconds: number;
121
+ }
122
+ | {
123
+ /** Type of schedule for recurring execution based on cron expression */
124
+ type: "cron";
125
+ /** Timestamp for the next execution */
126
+ time: number;
127
+ /** Cron expression defining the schedule */
128
+ cron: string;
129
+ }
130
+ );
131
+ /**
132
+ * MCP Server state update message from server -> Client
133
+ */
134
+ type MCPServerMessage = {
135
+ type: MessageType.CF_AGENT_MCP_SERVERS;
136
+ mcp: MCPServersState;
137
+ };
138
+ type MCPServersState = {
139
+ servers: {
140
+ [id: string]: MCPServer;
141
+ };
142
+ tools: (Tool & {
143
+ serverId: string;
144
+ })[];
145
+ prompts: (Prompt & {
146
+ serverId: string;
147
+ })[];
148
+ resources: (Resource & {
149
+ serverId: string;
150
+ })[];
151
+ };
152
+ type MCPServer = {
153
+ name: string;
154
+ server_url: string;
155
+ auth_url: string | null;
156
+ state: MCPConnectionState;
157
+ instructions: string | null;
158
+ capabilities: ServerCapabilities | null;
159
+ };
160
+ declare function getCurrentAgent<
161
+ T extends Agent<unknown, unknown> = Agent<unknown, unknown>
162
+ >(): {
163
+ agent: T | undefined;
164
+ connection: Connection | undefined;
165
+ request: Request | undefined;
166
+ email: AgentEmail | undefined;
167
+ };
168
+ /**
169
+ * Base class for creating Agent implementations
170
+ * @template Env Environment type containing bindings
171
+ * @template State State type to store within the Agent
172
+ */
173
+ declare class Agent<
174
+ Env = typeof env,
175
+ State = unknown,
176
+ Props extends Record<string, unknown> = Record<string, unknown>
177
+ > extends Server<Env, Props> {
178
+ private _state;
179
+ private _disposables;
180
+ private _destroyed;
181
+ private _ParentClass;
182
+ readonly mcp: MCPClientManager;
183
+ /**
184
+ * Initial state for the Agent
185
+ * Override to provide default state values
186
+ */
187
+ initialState: State;
188
+ /**
189
+ * Current state of the Agent
190
+ */
191
+ get state(): State;
192
+ /**
193
+ * Agent configuration options
194
+ */
195
+ static options: {
196
+ /** Whether the Agent should hibernate when inactive */
197
+ hibernate: boolean;
198
+ };
199
+ /**
200
+ * The observability implementation to use for the Agent
201
+ */
202
+ observability?: Observability;
203
+ /**
204
+ * Execute SQL queries against the Agent's database
205
+ * @template T Type of the returned rows
206
+ * @param strings SQL query template strings
207
+ * @param values Values to be inserted into the query
208
+ * @returns Array of query results
209
+ */
210
+ sql<T = Record<string, string | number | boolean | null>>(
211
+ strings: TemplateStringsArray,
212
+ ...values: (string | number | boolean | null)[]
213
+ ): T[];
214
+ constructor(ctx: AgentContext, env: Env);
215
+ private _setStateInternal;
216
+ /**
217
+ * Update the Agent's state
218
+ * @param state New state to set
219
+ */
220
+ setState(state: State): void;
221
+ /**
222
+ * Called when the Agent's state is updated
223
+ * @param state Updated state
224
+ * @param source Source of the state update ("server" or a client connection)
225
+ */
226
+ onStateUpdate(state: State | undefined, source: Connection | "server"): void;
227
+ /**
228
+ * Called when the Agent receives an email via routeAgentEmail()
229
+ * Override this method to handle incoming emails
230
+ * @param email Email message to process
231
+ */
232
+ _onEmail(email: AgentEmail): Promise<void>;
233
+ /**
234
+ * Reply to an email
235
+ * @param email The email to reply to
236
+ * @param options Options for the reply
237
+ * @returns void
238
+ */
239
+ replyToEmail(
240
+ email: AgentEmail,
241
+ options: {
242
+ fromName: string;
243
+ subject?: string | undefined;
244
+ body: string;
245
+ contentType?: string;
246
+ headers?: Record<string, string>;
247
+ }
248
+ ): Promise<void>;
249
+ private _tryCatch;
250
+ /**
251
+ * Automatically wrap custom methods with agent context
252
+ * This ensures getCurrentAgent() works in all custom methods without decorators
253
+ */
254
+ private _autoWrapCustomMethods;
255
+ onError(connection: Connection, error: unknown): void | Promise<void>;
256
+ onError(error: unknown): void | Promise<void>;
257
+ /**
258
+ * Render content (not implemented in base class)
259
+ */
260
+ render(): void;
261
+ /**
262
+ * Queue a task to be executed in the future
263
+ * @param payload Payload to pass to the callback
264
+ * @param callback Name of the method to call
265
+ * @returns The ID of the queued task
266
+ */
267
+ queue<T = unknown>(callback: keyof this, payload: T): Promise<string>;
268
+ private _flushingQueue;
269
+ private _flushQueue;
270
+ /**
271
+ * Dequeue a task by ID
272
+ * @param id ID of the task to dequeue
273
+ */
274
+ dequeue(id: string): Promise<void>;
275
+ /**
276
+ * Dequeue all tasks
277
+ */
278
+ dequeueAll(): Promise<void>;
279
+ /**
280
+ * Dequeue all tasks by callback
281
+ * @param callback Name of the callback to dequeue
282
+ */
283
+ dequeueAllByCallback(callback: string): Promise<void>;
284
+ /**
285
+ * Get a queued task by ID
286
+ * @param id ID of the task to get
287
+ * @returns The task or undefined if not found
288
+ */
289
+ getQueue(id: string): Promise<QueueItem<string> | undefined>;
290
+ /**
291
+ * Get all queues by key and value
292
+ * @param key Key to filter by
293
+ * @param value Value to filter by
294
+ * @returns Array of matching QueueItem objects
295
+ */
296
+ getQueues(key: string, value: string): Promise<QueueItem<string>[]>;
297
+ /**
298
+ * Schedule a task to be executed in the future
299
+ * @template T Type of the payload data
300
+ * @param when When to execute the task (Date, seconds delay, or cron expression)
301
+ * @param callback Name of the method to call
302
+ * @param payload Data to pass to the callback
303
+ * @returns Schedule object representing the scheduled task
304
+ */
305
+ schedule<T = string>(
306
+ when: Date | string | number,
307
+ callback: keyof this,
308
+ payload?: T
309
+ ): Promise<Schedule<T>>;
310
+ /**
311
+ * Get a scheduled task by ID
312
+ * @template T Type of the payload data
313
+ * @param id ID of the scheduled task
314
+ * @returns The Schedule object or undefined if not found
315
+ */
316
+ getSchedule<T = string>(id: string): Promise<Schedule<T> | undefined>;
317
+ /**
318
+ * Get scheduled tasks matching the given criteria
319
+ * @template T Type of the payload data
320
+ * @param criteria Criteria to filter schedules
321
+ * @returns Array of matching Schedule objects
322
+ */
323
+ getSchedules<T = string>(criteria?: {
324
+ id?: string;
325
+ type?: "scheduled" | "delayed" | "cron";
326
+ timeRange?: {
327
+ start?: Date;
328
+ end?: Date;
329
+ };
330
+ }): Schedule<T>[];
331
+ /**
332
+ * Cancel a scheduled task
333
+ * @param id ID of the task to cancel
334
+ * @returns true if the task was cancelled, false if the task was not found
335
+ */
336
+ cancelSchedule(id: string): Promise<boolean>;
337
+ private _scheduleNextAlarm;
338
+ /**
339
+ * Method called when an alarm fires.
340
+ * Executes any scheduled tasks that are due.
341
+ *
342
+ * @remarks
343
+ * To schedule a task, please use the `this.schedule` method instead.
344
+ * See {@link https://developers.cloudflare.com/agents/api-reference/schedule-tasks/}
345
+ */
346
+ readonly alarm: () => Promise<void>;
347
+ /**
348
+ * Destroy the Agent, removing all state and scheduled tasks
349
+ */
350
+ destroy(): Promise<void>;
351
+ /**
352
+ * Get all methods marked as callable on this Agent
353
+ * @returns A map of method names to their metadata
354
+ */
355
+ private _isCallable;
356
+ /**
357
+ * Connect to a new MCP Server
358
+ *
359
+ * @param serverName Name of the MCP server
360
+ * @param url MCP Server SSE URL
361
+ * @param callbackHost Base host for the agent, used for the redirect URI. If not provided, will be derived from the current request.
362
+ * @param agentsPrefix agents routing prefix if not using `agents`
363
+ * @param options MCP client and transport options
364
+ * @returns Server id and state - either "authenticating" with authUrl, or "ready"
365
+ * @throws If connection or discovery fails
366
+ */
367
+ addMcpServer(
368
+ serverName: string,
369
+ url: string,
370
+ callbackHost?: string,
371
+ agentsPrefix?: string,
372
+ options?: {
373
+ client?: ConstructorParameters<typeof Client>[1];
374
+ transport?: {
375
+ headers?: HeadersInit;
376
+ type?: TransportType;
377
+ };
378
+ }
379
+ ): Promise<
380
+ | {
381
+ id: string;
382
+ state: typeof MCPConnectionState.AUTHENTICATING;
383
+ authUrl: string;
384
+ }
385
+ | {
386
+ id: string;
387
+ state: typeof MCPConnectionState.READY;
388
+ authUrl?: undefined;
389
+ }
390
+ >;
391
+ removeMcpServer(id: string): Promise<void>;
392
+ getMcpServers(): MCPServersState;
393
+ private broadcastMcpServers;
394
+ /**
395
+ * Handle MCP OAuth callback request if it's an OAuth callback.
396
+ *
397
+ * This method encapsulates the entire OAuth callback flow:
398
+ * 1. Checks if the request is an MCP OAuth callback
399
+ * 2. Processes the OAuth code exchange
400
+ * 3. Establishes the connection if successful
401
+ * 4. Broadcasts MCP server state updates
402
+ * 5. Returns the appropriate HTTP response
403
+ *
404
+ * @param request The incoming HTTP request
405
+ * @returns Response if this was an OAuth callback, null otherwise
406
+ */
407
+ private handleMcpOAuthCallback;
408
+ /**
409
+ * Handle OAuth callback response using MCPClientManager configuration
410
+ * @param result OAuth callback result
411
+ * @param request The original request (needed for base URL)
412
+ * @returns Response for the OAuth callback
413
+ */
414
+ private handleOAuthCallbackResponse;
415
+ }
416
+ /**
417
+ * Namespace for creating Agent instances
418
+ * @template Agentic Type of the Agent class
419
+ */
420
+ type AgentNamespace<Agentic extends Agent<unknown>> =
421
+ DurableObjectNamespace<Agentic>;
422
+ /**
423
+ * Agent's durable context
424
+ */
425
+ type AgentContext = DurableObjectState;
426
+ /**
427
+ * Configuration options for Agent routing
428
+ */
429
+ type AgentOptions<Env> = PartyServerOptions<Env> & {
430
+ /**
431
+ * Whether to enable CORS for the Agent
432
+ */
433
+ cors?: boolean | HeadersInit | undefined;
434
+ };
435
+ /**
436
+ * Route a request to the appropriate Agent
437
+ * @param request Request to route
438
+ * @param env Environment containing Agent bindings
439
+ * @param options Routing options
440
+ * @returns Response from the Agent or undefined if no route matched
441
+ */
442
+ declare function routeAgentRequest<Env>(
443
+ request: Request,
444
+ env: Env,
445
+ options?: AgentOptions<Env>
446
+ ): Promise<Response | null>;
447
+ type EmailResolver<Env> = (
448
+ email: ForwardableEmailMessage,
449
+ env: Env
450
+ ) => Promise<{
451
+ agentName: string;
452
+ agentId: string;
453
+ } | null>;
454
+ /**
455
+ * Create a resolver that uses the message-id header to determine the agent to route the email to
456
+ * @returns A function that resolves the agent to route the email to
457
+ */
458
+ declare function createHeaderBasedEmailResolver<Env>(): EmailResolver<Env>;
459
+ /**
460
+ * Create a resolver that uses the email address to determine the agent to route the email to
461
+ * @param defaultAgentName The default agent name to use if the email address does not contain a sub-address
462
+ * @returns A function that resolves the agent to route the email to
463
+ */
464
+ declare function createAddressBasedEmailResolver<Env>(
465
+ defaultAgentName: string
466
+ ): EmailResolver<Env>;
467
+ /**
468
+ * Create a resolver that uses the agentName and agentId to determine the agent to route the email to
469
+ * @param agentName The name of the agent to route the email to
470
+ * @param agentId The id of the agent to route the email to
471
+ * @returns A function that resolves the agent to route the email to
472
+ */
473
+ declare function createCatchAllEmailResolver<Env>(
474
+ agentName: string,
475
+ agentId: string
476
+ ): EmailResolver<Env>;
477
+ type EmailRoutingOptions<Env> = AgentOptions<Env> & {
478
+ resolver: EmailResolver<Env>;
479
+ };
480
+ /**
481
+ * Route an email to the appropriate Agent
482
+ * @param email The email to route
483
+ * @param env The environment containing the Agent bindings
484
+ * @param options The options for routing the email
485
+ * @returns A promise that resolves when the email has been routed
486
+ */
487
+ declare function routeAgentEmail<Env>(
488
+ email: ForwardableEmailMessage,
489
+ env: Env,
490
+ options: EmailRoutingOptions<Env>
491
+ ): Promise<void>;
492
+ type AgentEmail = {
493
+ from: string;
494
+ to: string;
495
+ getRaw: () => Promise<Uint8Array>;
496
+ headers: Headers;
497
+ rawSize: number;
498
+ setReject: (reason: string) => void;
499
+ forward: (rcptTo: string, headers?: Headers) => Promise<void>;
500
+ reply: (options: { from: string; to: string; raw: string }) => Promise<void>;
501
+ };
502
+ type EmailSendOptions = {
503
+ to: string;
504
+ subject: string;
505
+ body: string;
506
+ contentType?: string;
507
+ headers?: Record<string, string>;
508
+ includeRoutingHeaders?: boolean;
509
+ agentName?: string;
510
+ agentId?: string;
511
+ domain?: string;
512
+ };
513
+ /**
514
+ * Get or create an Agent by name
515
+ * @template Env Environment type containing bindings
516
+ * @template T Type of the Agent class
517
+ * @param namespace Agent namespace
518
+ * @param name Name of the Agent instance
519
+ * @param options Options for Agent creation
520
+ * @returns Promise resolving to an Agent instance stub
521
+ */
522
+ declare function getAgentByName<
523
+ Env,
524
+ T extends Agent<Env>,
525
+ Props extends Record<string, unknown> = Record<string, unknown>
526
+ >(
527
+ namespace: AgentNamespace<T>,
528
+ name: string,
529
+ options?: {
530
+ jurisdiction?: DurableObjectJurisdiction;
531
+ locationHint?: DurableObjectLocationHint;
532
+ props?: Props;
533
+ }
534
+ ): Promise<DurableObjectStub<T>>;
535
+ /**
536
+ * A wrapper for streaming responses in callable methods
537
+ */
538
+ declare class StreamingResponse {
539
+ private _connection;
540
+ private _id;
541
+ private _closed;
542
+ constructor(connection: Connection, id: string);
543
+ /**
544
+ * Send a chunk of data to the client
545
+ * @param chunk The data to send
546
+ */
547
+ send(chunk: unknown): void;
548
+ /**
549
+ * End the stream and send the final chunk (if any)
550
+ * @param finalChunk Optional final chunk of data to send
551
+ */
552
+ end(finalChunk?: unknown): void;
553
+ }
554
+ //#endregion
555
+ export {
556
+ unstable_callable as A,
557
+ createAddressBasedEmailResolver as C,
558
+ getCurrentAgent as D,
559
+ getAgentByName as E,
560
+ routeAgentEmail as O,
561
+ callable as S,
562
+ createHeaderBasedEmailResolver as T,
563
+ RPCResponse as _,
564
+ AgentOptions as a,
565
+ StreamingResponse as b,
566
+ ConnectionContext as c,
567
+ EmailSendOptions as d,
568
+ MCPServer as f,
569
+ RPCRequest as g,
570
+ QueueItem as h,
571
+ AgentNamespace as i,
572
+ routeAgentRequest as k,
573
+ EmailResolver as l,
574
+ MCPServersState as m,
575
+ AgentContext as n,
576
+ CallableMetadata as o,
577
+ MCPServerMessage as p,
578
+ AgentEmail as r,
579
+ Connection$1 as s,
580
+ Agent as t,
581
+ EmailRoutingOptions as u,
582
+ Schedule as v,
583
+ createCatchAllEmailResolver as w,
584
+ WSMessage as x,
585
+ StateUpdateMessage as y
586
+ };
587
+ //# sourceMappingURL=index-D3s0zwxa.d.ts.map