agents 0.0.0-04d925e → 0.0.0-06b2ab0
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/README.md +255 -27
- package/dist/_esm-LV5FJ3HK.js +3922 -0
- package/dist/_esm-LV5FJ3HK.js.map +1 -0
- package/dist/ai-chat-agent.d.ts +14 -9
- package/dist/ai-chat-agent.js +482 -60
- package/dist/ai-chat-agent.js.map +1 -1
- package/dist/ai-chat-v5-migration.d.ts +152 -0
- package/dist/ai-chat-v5-migration.js +20 -0
- package/dist/ai-chat-v5-migration.js.map +1 -0
- package/dist/ai-react.d.ts +71 -72
- package/dist/ai-react.js +260 -107
- package/dist/ai-react.js.map +1 -1
- package/dist/ai-types.d.ts +37 -19
- package/dist/ai-types.js +7 -0
- package/dist/ccip-CMBYN64O.js +15 -0
- package/dist/ccip-CMBYN64O.js.map +1 -0
- package/dist/chunk-5Y6BEZDY.js +276 -0
- package/dist/chunk-5Y6BEZDY.js.map +1 -0
- package/dist/chunk-BER7KXUJ.js +18 -0
- package/dist/chunk-BER7KXUJ.js.map +1 -0
- package/dist/{chunk-BZXOAZUX.js → chunk-C2OEBJZ2.js} +17 -10
- package/dist/chunk-C2OEBJZ2.js.map +1 -0
- package/dist/chunk-JJBFIGUC.js +5202 -0
- package/dist/chunk-JJBFIGUC.js.map +1 -0
- package/dist/chunk-PR4QN5HX.js +43 -0
- package/dist/chunk-PR4QN5HX.js.map +1 -0
- package/dist/{chunk-QSGN3REV.js → chunk-QEVM4BVL.js} +10 -17
- package/dist/chunk-QEVM4BVL.js.map +1 -0
- package/dist/chunk-TYAY6AU6.js +159 -0
- package/dist/chunk-TYAY6AU6.js.map +1 -0
- package/dist/chunk-UJVEAURM.js +150 -0
- package/dist/chunk-UJVEAURM.js.map +1 -0
- package/dist/chunk-XGMKNUJA.js +1343 -0
- package/dist/chunk-XGMKNUJA.js.map +1 -0
- package/dist/chunk-ZMMHNOMZ.js +942 -0
- package/dist/chunk-ZMMHNOMZ.js.map +1 -0
- package/dist/client-DVoPb3-C.d.ts +5120 -0
- package/dist/client.d.ts +8 -2
- package/dist/client.js +3 -1
- package/dist/codemode/ai.d.ts +25 -0
- package/dist/codemode/ai.js +5200 -0
- package/dist/codemode/ai.js.map +1 -0
- package/dist/index.d.ts +208 -51
- package/dist/index.js +14 -4
- package/dist/mcp/client.d.ts +10 -781
- package/dist/mcp/client.js +2 -1
- package/dist/mcp/do-oauth-client-provider.d.ts +1 -0
- package/dist/mcp/do-oauth-client-provider.js +2 -1
- package/dist/mcp/index.d.ts +59 -64
- package/dist/mcp/index.js +957 -637
- package/dist/mcp/index.js.map +1 -1
- package/dist/mcp/x402.d.ts +39 -0
- package/dist/mcp/x402.js +3195 -0
- package/dist/mcp/x402.js.map +1 -0
- package/dist/mcp-BH1fJeiU.d.ts +58 -0
- package/dist/observability/index.d.ts +34 -0
- package/dist/observability/index.js +12 -0
- package/dist/observability/index.js.map +1 -0
- package/dist/react.d.ts +89 -15
- package/dist/react.js +121 -11
- package/dist/react.js.map +1 -1
- package/dist/schedule.d.ts +81 -7
- package/dist/schedule.js +21 -6
- package/dist/schedule.js.map +1 -1
- package/dist/secp256k1-M22GZP2U.js +2193 -0
- package/dist/secp256k1-M22GZP2U.js.map +1 -0
- package/dist/serializable.d.ts +32 -0
- package/dist/serializable.js +1 -0
- package/dist/serializable.js.map +1 -0
- package/package.json +98 -70
- package/src/index.ts +1014 -226
- package/dist/chunk-BZXOAZUX.js.map +0 -1
- package/dist/chunk-QSGN3REV.js.map +0 -1
- package/dist/chunk-RIYR6FR6.js +0 -777
- package/dist/chunk-RIYR6FR6.js.map +0 -1
- package/dist/chunk-Y67CHZBI.js +0 -464
- package/dist/chunk-Y67CHZBI.js.map +0 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,15 +1,29 @@
|
|
|
1
|
+
import { env } from "cloudflare:workers";
|
|
2
|
+
import { Client } from "@modelcontextprotocol/sdk/client/index.js";
|
|
3
|
+
import {
|
|
4
|
+
ServerCapabilities,
|
|
5
|
+
Tool,
|
|
6
|
+
Prompt,
|
|
7
|
+
Resource
|
|
8
|
+
} from "@modelcontextprotocol/sdk/types.js";
|
|
1
9
|
import { Server, Connection, PartyServerOptions } from "partyserver";
|
|
2
10
|
export { Connection, ConnectionContext, WSMessage } from "partyserver";
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
11
|
+
import {
|
|
12
|
+
e as MCPClientManager,
|
|
13
|
+
T as TransportType,
|
|
14
|
+
f as MCPConnectionState
|
|
15
|
+
} from "./client-DVoPb3-C.js";
|
|
16
|
+
import { Observability } from "./observability/index.js";
|
|
17
|
+
import { MessageType } from "./ai-types.js";
|
|
6
18
|
import "zod";
|
|
19
|
+
import "@modelcontextprotocol/sdk/shared/protocol.js";
|
|
20
|
+
import "ai";
|
|
21
|
+
import "./mcp-BH1fJeiU.js";
|
|
7
22
|
import "@modelcontextprotocol/sdk/client/sse.js";
|
|
23
|
+
import "@modelcontextprotocol/sdk/client/streamableHttp.js";
|
|
8
24
|
import "./mcp/do-oauth-client-provider.js";
|
|
9
25
|
import "@modelcontextprotocol/sdk/client/auth.js";
|
|
10
26
|
import "@modelcontextprotocol/sdk/shared/auth.js";
|
|
11
|
-
import "@modelcontextprotocol/sdk/shared/protocol.js";
|
|
12
|
-
import "ai";
|
|
13
27
|
|
|
14
28
|
/**
|
|
15
29
|
* RPC request message from client
|
|
@@ -24,14 +38,14 @@ type RPCRequest = {
|
|
|
24
38
|
* State update message from client
|
|
25
39
|
*/
|
|
26
40
|
type StateUpdateMessage = {
|
|
27
|
-
type:
|
|
41
|
+
type: MessageType.CF_AGENT_STATE;
|
|
28
42
|
state: unknown;
|
|
29
43
|
};
|
|
30
44
|
/**
|
|
31
45
|
* RPC response message to client
|
|
32
46
|
*/
|
|
33
47
|
type RPCResponse = {
|
|
34
|
-
type:
|
|
48
|
+
type: MessageType.RPC;
|
|
35
49
|
id: string;
|
|
36
50
|
} & (
|
|
37
51
|
| {
|
|
@@ -62,12 +76,24 @@ type CallableMetadata = {
|
|
|
62
76
|
* Decorator that marks a method as callable by clients
|
|
63
77
|
* @param metadata Optional metadata about the callable method
|
|
64
78
|
*/
|
|
65
|
-
declare function
|
|
79
|
+
declare function callable(
|
|
66
80
|
metadata?: CallableMetadata
|
|
67
81
|
): <This, Args extends unknown[], Return>(
|
|
68
82
|
target: (this: This, ...args: Args) => Return,
|
|
69
83
|
context: ClassMethodDecoratorContext
|
|
70
84
|
) => (this: This, ...args: Args) => Return;
|
|
85
|
+
/**
|
|
86
|
+
* Decorator that marks a method as callable by clients
|
|
87
|
+
* @deprecated this has been renamed to callable, and unstable_callable will be removed in the next major version
|
|
88
|
+
* @param metadata Optional metadata about the callable method
|
|
89
|
+
*/
|
|
90
|
+
declare const unstable_callable: (metadata?: CallableMetadata) => void;
|
|
91
|
+
type QueueItem<T = string> = {
|
|
92
|
+
id: string;
|
|
93
|
+
payload: T;
|
|
94
|
+
callback: keyof Agent<unknown>;
|
|
95
|
+
created_at: number;
|
|
96
|
+
};
|
|
71
97
|
/**
|
|
72
98
|
* Represents a scheduled task within an Agent
|
|
73
99
|
* @template T Type of the payload data
|
|
@@ -103,11 +129,12 @@ type Schedule<T = string> = {
|
|
|
103
129
|
cron: string;
|
|
104
130
|
}
|
|
105
131
|
);
|
|
132
|
+
|
|
106
133
|
/**
|
|
107
134
|
* MCP Server state update message from server -> Client
|
|
108
135
|
*/
|
|
109
136
|
type MCPServerMessage = {
|
|
110
|
-
type:
|
|
137
|
+
type: MessageType.CF_AGENT_MCP_SERVERS;
|
|
111
138
|
mcp: MCPServersState;
|
|
112
139
|
};
|
|
113
140
|
type MCPServersState = {
|
|
@@ -122,24 +149,32 @@ type MCPServer = {
|
|
|
122
149
|
name: string;
|
|
123
150
|
server_url: string;
|
|
124
151
|
auth_url: string | null;
|
|
125
|
-
state:
|
|
152
|
+
state: MCPConnectionState;
|
|
153
|
+
instructions: string | null;
|
|
154
|
+
capabilities: ServerCapabilities | null;
|
|
126
155
|
};
|
|
127
156
|
declare function getCurrentAgent<
|
|
128
|
-
T extends Agent<unknown, unknown> = Agent<unknown, unknown
|
|
157
|
+
T extends Agent<unknown, unknown> = Agent<unknown, unknown>
|
|
129
158
|
>(): {
|
|
130
159
|
agent: T | undefined;
|
|
131
160
|
connection: Connection | undefined;
|
|
132
|
-
request: Request
|
|
161
|
+
request: Request | undefined;
|
|
162
|
+
email: AgentEmail | undefined;
|
|
133
163
|
};
|
|
134
164
|
/**
|
|
135
165
|
* Base class for creating Agent implementations
|
|
136
166
|
* @template Env Environment type containing bindings
|
|
137
167
|
* @template State State type to store within the Agent
|
|
138
168
|
*/
|
|
139
|
-
declare class Agent<
|
|
169
|
+
declare class Agent<
|
|
170
|
+
Env = typeof env,
|
|
171
|
+
State = unknown,
|
|
172
|
+
Props extends Record<string, unknown> = Record<string, unknown>
|
|
173
|
+
> extends Server<Env, Props> {
|
|
140
174
|
private _state;
|
|
175
|
+
private _disposables;
|
|
141
176
|
private _ParentClass;
|
|
142
|
-
mcp: MCPClientManager;
|
|
177
|
+
readonly mcp: MCPClientManager;
|
|
143
178
|
/**
|
|
144
179
|
* Initial state for the Agent
|
|
145
180
|
* Override to provide default state values
|
|
@@ -156,6 +191,10 @@ declare class Agent<Env, State = unknown> extends Server<Env> {
|
|
|
156
191
|
/** Whether the Agent should hibernate when inactive */
|
|
157
192
|
hibernate: boolean;
|
|
158
193
|
};
|
|
194
|
+
/**
|
|
195
|
+
* The observability implementation to use for the Agent
|
|
196
|
+
*/
|
|
197
|
+
observability?: Observability;
|
|
159
198
|
/**
|
|
160
199
|
* Execute SQL queries against the Agent's database
|
|
161
200
|
* @template T Type of the returned rows
|
|
@@ -181,17 +220,75 @@ declare class Agent<Env, State = unknown> extends Server<Env> {
|
|
|
181
220
|
*/
|
|
182
221
|
onStateUpdate(state: State | undefined, source: Connection | "server"): void;
|
|
183
222
|
/**
|
|
184
|
-
* Called when the Agent receives an email
|
|
223
|
+
* Called when the Agent receives an email via routeAgentEmail()
|
|
224
|
+
* Override this method to handle incoming emails
|
|
185
225
|
* @param email Email message to process
|
|
186
226
|
*/
|
|
187
|
-
|
|
227
|
+
_onEmail(email: AgentEmail): Promise<void>;
|
|
228
|
+
/**
|
|
229
|
+
* Reply to an email
|
|
230
|
+
* @param email The email to reply to
|
|
231
|
+
* @param options Options for the reply
|
|
232
|
+
* @returns void
|
|
233
|
+
*/
|
|
234
|
+
replyToEmail(
|
|
235
|
+
email: AgentEmail,
|
|
236
|
+
options: {
|
|
237
|
+
fromName: string;
|
|
238
|
+
subject?: string | undefined;
|
|
239
|
+
body: string;
|
|
240
|
+
contentType?: string;
|
|
241
|
+
headers?: Record<string, string>;
|
|
242
|
+
}
|
|
243
|
+
): Promise<void>;
|
|
188
244
|
private _tryCatch;
|
|
245
|
+
/**
|
|
246
|
+
* Automatically wrap custom methods with agent context
|
|
247
|
+
* This ensures getCurrentAgent() works in all custom methods without decorators
|
|
248
|
+
*/
|
|
249
|
+
private _autoWrapCustomMethods;
|
|
189
250
|
onError(connection: Connection, error: unknown): void | Promise<void>;
|
|
190
251
|
onError(error: unknown): void | Promise<void>;
|
|
191
252
|
/**
|
|
192
253
|
* Render content (not implemented in base class)
|
|
193
254
|
*/
|
|
194
255
|
render(): void;
|
|
256
|
+
/**
|
|
257
|
+
* Queue a task to be executed in the future
|
|
258
|
+
* @param payload Payload to pass to the callback
|
|
259
|
+
* @param callback Name of the method to call
|
|
260
|
+
* @returns The ID of the queued task
|
|
261
|
+
*/
|
|
262
|
+
queue<T = unknown>(callback: keyof this, payload: T): Promise<string>;
|
|
263
|
+
private _flushingQueue;
|
|
264
|
+
private _flushQueue;
|
|
265
|
+
/**
|
|
266
|
+
* Dequeue a task by ID
|
|
267
|
+
* @param id ID of the task to dequeue
|
|
268
|
+
*/
|
|
269
|
+
dequeue(id: string): Promise<void>;
|
|
270
|
+
/**
|
|
271
|
+
* Dequeue all tasks
|
|
272
|
+
*/
|
|
273
|
+
dequeueAll(): Promise<void>;
|
|
274
|
+
/**
|
|
275
|
+
* Dequeue all tasks by callback
|
|
276
|
+
* @param callback Name of the callback to dequeue
|
|
277
|
+
*/
|
|
278
|
+
dequeueAllByCallback(callback: string): Promise<void>;
|
|
279
|
+
/**
|
|
280
|
+
* Get a queued task by ID
|
|
281
|
+
* @param id ID of the task to get
|
|
282
|
+
* @returns The task or undefined if not found
|
|
283
|
+
*/
|
|
284
|
+
getQueue(id: string): Promise<QueueItem<string> | undefined>;
|
|
285
|
+
/**
|
|
286
|
+
* Get all queues by key and value
|
|
287
|
+
* @param key Key to filter by
|
|
288
|
+
* @param value Value to filter by
|
|
289
|
+
* @returns Array of matching QueueItem objects
|
|
290
|
+
*/
|
|
291
|
+
getQueues(key: string, value: string): Promise<QueueItem<string>[]>;
|
|
195
292
|
/**
|
|
196
293
|
* Schedule a task to be executed in the future
|
|
197
294
|
* @template T Type of the payload data
|
|
@@ -246,58 +343,48 @@ declare class Agent<Env, State = unknown> extends Server<Env> {
|
|
|
246
343
|
* Destroy the Agent, removing all state and scheduled tasks
|
|
247
344
|
*/
|
|
248
345
|
destroy(): Promise<void>;
|
|
346
|
+
/**
|
|
347
|
+
* Get all methods marked as callable on this Agent
|
|
348
|
+
* @returns A map of method names to their metadata
|
|
349
|
+
*/
|
|
249
350
|
private _isCallable;
|
|
250
351
|
/**
|
|
251
352
|
* Connect to a new MCP Server
|
|
252
353
|
*
|
|
354
|
+
* @param serverName Name of the MCP server
|
|
253
355
|
* @param url MCP Server SSE URL
|
|
254
|
-
* @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.
|
|
255
357
|
* @param agentsPrefix agents routing prefix if not using `agents`
|
|
256
|
-
* @param options MCP client and transport
|
|
358
|
+
* @param options MCP client and transport options
|
|
257
359
|
* @returns authUrl
|
|
258
360
|
*/
|
|
259
361
|
addMcpServer(
|
|
260
362
|
serverName: string,
|
|
261
363
|
url: string,
|
|
262
|
-
callbackHost
|
|
364
|
+
callbackHost?: string,
|
|
263
365
|
agentsPrefix?: string,
|
|
264
366
|
options?: {
|
|
265
367
|
client?: ConstructorParameters<typeof Client>[1];
|
|
266
|
-
transport?: {
|
|
267
|
-
headers: HeadersInit;
|
|
268
|
-
};
|
|
269
|
-
}
|
|
270
|
-
): Promise<{
|
|
271
|
-
id: string;
|
|
272
|
-
authUrl: string | undefined;
|
|
273
|
-
}>;
|
|
274
|
-
_connectToMcpServerInternal(
|
|
275
|
-
serverName: string,
|
|
276
|
-
url: string,
|
|
277
|
-
callbackUrl: string,
|
|
278
|
-
options?: {
|
|
279
|
-
client?: ConstructorParameters<typeof Client>[1];
|
|
280
|
-
/**
|
|
281
|
-
* We don't expose the normal set of transport options because:
|
|
282
|
-
* 1) we can't serialize things like the auth provider or a fetch function into the DB for reconnection purposes
|
|
283
|
-
* 2) We probably want these options to be agnostic to the transport type (SSE vs Streamable)
|
|
284
|
-
*
|
|
285
|
-
* 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).
|
|
286
|
-
*/
|
|
287
368
|
transport?: {
|
|
288
369
|
headers?: HeadersInit;
|
|
370
|
+
type?: TransportType;
|
|
289
371
|
};
|
|
290
|
-
},
|
|
291
|
-
reconnect?: {
|
|
292
|
-
id: string;
|
|
293
|
-
oauthClientId?: string;
|
|
294
372
|
}
|
|
295
373
|
): Promise<{
|
|
296
374
|
id: string;
|
|
297
375
|
authUrl: string | undefined;
|
|
298
376
|
}>;
|
|
377
|
+
private _connectToMcpServerInternal;
|
|
299
378
|
removeMcpServer(id: string): Promise<void>;
|
|
300
|
-
|
|
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;
|
|
301
388
|
}
|
|
302
389
|
/**
|
|
303
390
|
* Namespace for creating Agent instances
|
|
@@ -330,17 +417,72 @@ declare function routeAgentRequest<Env>(
|
|
|
330
417
|
env: Env,
|
|
331
418
|
options?: AgentOptions<Env>
|
|
332
419
|
): Promise<Response | null>;
|
|
420
|
+
type EmailResolver<Env> = (
|
|
421
|
+
email: ForwardableEmailMessage,
|
|
422
|
+
env: Env
|
|
423
|
+
) => Promise<{
|
|
424
|
+
agentName: string;
|
|
425
|
+
agentId: string;
|
|
426
|
+
} | null>;
|
|
427
|
+
/**
|
|
428
|
+
* Create a resolver that uses the message-id header to determine the agent to route the email to
|
|
429
|
+
* @returns A function that resolves the agent to route the email to
|
|
430
|
+
*/
|
|
431
|
+
declare function createHeaderBasedEmailResolver<Env>(): EmailResolver<Env>;
|
|
432
|
+
/**
|
|
433
|
+
* Create a resolver that uses the email address to determine the agent to route the email to
|
|
434
|
+
* @param defaultAgentName The default agent name to use if the email address does not contain a sub-address
|
|
435
|
+
* @returns A function that resolves the agent to route the email to
|
|
436
|
+
*/
|
|
437
|
+
declare function createAddressBasedEmailResolver<Env>(
|
|
438
|
+
defaultAgentName: string
|
|
439
|
+
): EmailResolver<Env>;
|
|
440
|
+
/**
|
|
441
|
+
* Create a resolver that uses the agentName and agentId to determine the agent to route the email to
|
|
442
|
+
* @param agentName The name of the agent to route the email to
|
|
443
|
+
* @param agentId The id of the agent to route the email to
|
|
444
|
+
* @returns A function that resolves the agent to route the email to
|
|
445
|
+
*/
|
|
446
|
+
declare function createCatchAllEmailResolver<Env>(
|
|
447
|
+
agentName: string,
|
|
448
|
+
agentId: string
|
|
449
|
+
): EmailResolver<Env>;
|
|
450
|
+
type EmailRoutingOptions<Env> = AgentOptions<Env> & {
|
|
451
|
+
resolver: EmailResolver<Env>;
|
|
452
|
+
};
|
|
333
453
|
/**
|
|
334
454
|
* Route an email to the appropriate Agent
|
|
335
|
-
* @param email
|
|
336
|
-
* @param env
|
|
337
|
-
* @param options
|
|
455
|
+
* @param email The email to route
|
|
456
|
+
* @param env The environment containing the Agent bindings
|
|
457
|
+
* @param options The options for routing the email
|
|
458
|
+
* @returns A promise that resolves when the email has been routed
|
|
338
459
|
*/
|
|
339
460
|
declare function routeAgentEmail<Env>(
|
|
340
461
|
email: ForwardableEmailMessage,
|
|
341
462
|
env: Env,
|
|
342
|
-
options
|
|
463
|
+
options: EmailRoutingOptions<Env>
|
|
343
464
|
): Promise<void>;
|
|
465
|
+
type AgentEmail = {
|
|
466
|
+
from: string;
|
|
467
|
+
to: string;
|
|
468
|
+
getRaw: () => Promise<Uint8Array>;
|
|
469
|
+
headers: Headers;
|
|
470
|
+
rawSize: number;
|
|
471
|
+
setReject: (reason: string) => void;
|
|
472
|
+
forward: (rcptTo: string, headers?: Headers) => Promise<void>;
|
|
473
|
+
reply: (options: { from: string; to: string; raw: string }) => Promise<void>;
|
|
474
|
+
};
|
|
475
|
+
type EmailSendOptions = {
|
|
476
|
+
to: string;
|
|
477
|
+
subject: string;
|
|
478
|
+
body: string;
|
|
479
|
+
contentType?: string;
|
|
480
|
+
headers?: Record<string, string>;
|
|
481
|
+
includeRoutingHeaders?: boolean;
|
|
482
|
+
agentName?: string;
|
|
483
|
+
agentId?: string;
|
|
484
|
+
domain?: string;
|
|
485
|
+
};
|
|
344
486
|
/**
|
|
345
487
|
* Get or create an Agent by name
|
|
346
488
|
* @template Env Environment type containing bindings
|
|
@@ -350,12 +492,17 @@ declare function routeAgentEmail<Env>(
|
|
|
350
492
|
* @param options Options for Agent creation
|
|
351
493
|
* @returns Promise resolving to an Agent instance stub
|
|
352
494
|
*/
|
|
353
|
-
declare function getAgentByName<
|
|
495
|
+
declare function getAgentByName<
|
|
496
|
+
Env,
|
|
497
|
+
T extends Agent<Env>,
|
|
498
|
+
Props extends Record<string, unknown> = Record<string, unknown>
|
|
499
|
+
>(
|
|
354
500
|
namespace: AgentNamespace<T>,
|
|
355
501
|
name: string,
|
|
356
502
|
options?: {
|
|
357
503
|
jurisdiction?: DurableObjectJurisdiction;
|
|
358
504
|
locationHint?: DurableObjectLocationHint;
|
|
505
|
+
props?: Props;
|
|
359
506
|
}
|
|
360
507
|
): Promise<DurableObjectStub<T>>;
|
|
361
508
|
/**
|
|
@@ -381,20 +528,30 @@ declare class StreamingResponse {
|
|
|
381
528
|
export {
|
|
382
529
|
Agent,
|
|
383
530
|
type AgentContext,
|
|
531
|
+
type AgentEmail,
|
|
384
532
|
type AgentNamespace,
|
|
385
533
|
type AgentOptions,
|
|
386
534
|
type CallableMetadata,
|
|
535
|
+
type EmailResolver,
|
|
536
|
+
type EmailRoutingOptions,
|
|
537
|
+
type EmailSendOptions,
|
|
387
538
|
type MCPServer,
|
|
388
539
|
type MCPServerMessage,
|
|
389
540
|
type MCPServersState,
|
|
541
|
+
type QueueItem,
|
|
390
542
|
type RPCRequest,
|
|
391
543
|
type RPCResponse,
|
|
392
544
|
type Schedule,
|
|
393
545
|
type StateUpdateMessage,
|
|
394
546
|
StreamingResponse,
|
|
547
|
+
TransportType,
|
|
548
|
+
callable,
|
|
549
|
+
createAddressBasedEmailResolver,
|
|
550
|
+
createCatchAllEmailResolver,
|
|
551
|
+
createHeaderBasedEmailResolver,
|
|
395
552
|
getAgentByName,
|
|
396
553
|
getCurrentAgent,
|
|
397
554
|
routeAgentEmail,
|
|
398
555
|
routeAgentRequest,
|
|
399
|
-
unstable_callable
|
|
556
|
+
unstable_callable
|
|
400
557
|
};
|
package/dist/index.js
CHANGED
|
@@ -1,18 +1,28 @@
|
|
|
1
1
|
import {
|
|
2
2
|
Agent,
|
|
3
3
|
StreamingResponse,
|
|
4
|
+
callable,
|
|
5
|
+
createAddressBasedEmailResolver,
|
|
6
|
+
createCatchAllEmailResolver,
|
|
7
|
+
createHeaderBasedEmailResolver,
|
|
4
8
|
getAgentByName,
|
|
5
9
|
getCurrentAgent,
|
|
6
10
|
routeAgentEmail,
|
|
7
11
|
routeAgentRequest,
|
|
8
12
|
unstable_callable
|
|
9
|
-
} from "./chunk-
|
|
10
|
-
import "./chunk-
|
|
11
|
-
import "./chunk-
|
|
12
|
-
import "./chunk-
|
|
13
|
+
} from "./chunk-XGMKNUJA.js";
|
|
14
|
+
import "./chunk-ZMMHNOMZ.js";
|
|
15
|
+
import "./chunk-C2OEBJZ2.js";
|
|
16
|
+
import "./chunk-QEVM4BVL.js";
|
|
17
|
+
import "./chunk-BER7KXUJ.js";
|
|
18
|
+
import "./chunk-PR4QN5HX.js";
|
|
13
19
|
export {
|
|
14
20
|
Agent,
|
|
15
21
|
StreamingResponse,
|
|
22
|
+
callable,
|
|
23
|
+
createAddressBasedEmailResolver,
|
|
24
|
+
createCatchAllEmailResolver,
|
|
25
|
+
createHeaderBasedEmailResolver,
|
|
16
26
|
getAgentByName,
|
|
17
27
|
getCurrentAgent,
|
|
18
28
|
routeAgentEmail,
|