agents 0.0.0-a215bb2 → 0.0.0-a3b7e23
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/ai-chat-agent.d.ts +10 -10
- package/dist/ai-chat-agent.js +6 -6
- package/dist/{ai-chat-v5-migration-gdyLiTd8.js → ai-chat-v5-migration-DBHGW4Hv.js} +2 -2
- package/dist/{ai-chat-v5-migration-gdyLiTd8.js.map → ai-chat-v5-migration-DBHGW4Hv.js.map} +1 -1
- package/dist/ai-chat-v5-migration.js +1 -1
- package/dist/ai-react.d.ts +9 -9
- package/dist/ai-react.js +1 -1
- package/dist/{ai-types-UZlfLOYP.js → ai-types-B3aQaFv3.js} +2 -2
- package/dist/{ai-types-UZlfLOYP.js.map → ai-types-B3aQaFv3.js.map} +1 -1
- package/dist/{ai-types-BWW4umHY.d.ts → ai-types-D5YoPrBZ.d.ts} +2 -2
- package/dist/ai-types.d.ts +4 -4
- package/dist/ai-types.js +1 -1
- package/dist/cli.d.ts +8 -0
- package/dist/cli.js +27 -0
- package/dist/cli.js.map +1 -0
- package/dist/{client-DjR-lC16.js → client-BfiZ3HQd.js} +3 -3
- package/dist/{client-DjR-lC16.js.map → client-BfiZ3HQd.js.map} +1 -1
- package/dist/{client-CmMi85Sj.d.ts → client-CbWe9FBd.d.ts} +10 -10
- package/dist/{client-CZBVDDoO.js → client-DZhjV_XA.js} +14 -81
- package/dist/client-DZhjV_XA.js.map +1 -0
- package/dist/{client-C-nwz-3N.d.ts → client-DnzF-4rM.d.ts} +29 -59
- package/dist/client.d.ts +8 -8
- package/dist/client.js +2 -2
- package/dist/codemode/ai.js +5 -5
- package/dist/{do-oauth-client-provider-B2jr6UNq.js → do-oauth-client-provider-CswoD5Lu.js} +2 -2
- package/dist/{do-oauth-client-provider-B2jr6UNq.js.map → do-oauth-client-provider-CswoD5Lu.js.map} +1 -1
- package/dist/{do-oauth-client-provider-CCwGwnrA.d.ts → do-oauth-client-provider-DGc5pP0l.d.ts} +2 -2
- package/dist/{index-CMEWpbHx.d.ts → index-Db_90HY3.d.ts} +39 -47
- package/dist/{index-W4JUkafc.d.ts → index-DhJCaDWd.d.ts} +7 -3
- package/dist/index.d.ts +36 -36
- package/dist/index.js +5 -5
- package/dist/mcp/client.d.ts +3 -3
- package/dist/mcp/client.js +1 -1
- package/dist/mcp/do-oauth-client-provider.d.ts +1 -1
- package/dist/mcp/do-oauth-client-provider.js +1 -1
- package/dist/mcp/index.d.ts +104 -9
- package/dist/mcp/index.js +580 -26
- package/dist/mcp/index.js.map +1 -1
- package/dist/{mcp-BEwaCsxO.d.ts → mcp-Dw5vDrY8.d.ts} +2 -2
- package/dist/observability/index.d.ts +2 -2
- package/dist/observability/index.js +5 -5
- package/dist/{react-jvtffQuA.d.ts → react-DpZSFXW-.d.ts} +17 -17
- package/dist/react.d.ts +9 -9
- package/dist/react.js +1 -1
- package/dist/{serializable-gtr9YMhp.d.ts → serializable-CymX8ovI.d.ts} +8 -3
- package/dist/serializable.d.ts +5 -5
- package/dist/{src-L3cHuAag.js → src-CwIW7tU2.js} +87 -102
- package/dist/src-CwIW7tU2.js.map +1 -0
- package/package.json +51 -37
- package/dist/client-CZBVDDoO.js.map +0 -1
- package/dist/src-L3cHuAag.js.map +0 -1
|
@@ -1,6 +1,14 @@
|
|
|
1
|
-
import { MCPObservabilityEvent } from "./mcp-
|
|
2
|
-
import { AgentsOAuthProvider } from "./do-oauth-client-provider-
|
|
1
|
+
import { t as MCPObservabilityEvent } from "./mcp-Dw5vDrY8.js";
|
|
2
|
+
import { t as AgentsOAuthProvider } from "./do-oauth-client-provider-DGc5pP0l.js";
|
|
3
3
|
import { Client } from "@modelcontextprotocol/sdk/client/index.js";
|
|
4
|
+
import {
|
|
5
|
+
SSEClientTransport,
|
|
6
|
+
SSEClientTransportOptions
|
|
7
|
+
} from "@modelcontextprotocol/sdk/client/sse.js";
|
|
8
|
+
import {
|
|
9
|
+
StreamableHTTPClientTransport,
|
|
10
|
+
StreamableHTTPClientTransportOptions
|
|
11
|
+
} from "@modelcontextprotocol/sdk/client/streamableHttp.js";
|
|
4
12
|
import {
|
|
5
13
|
CallToolRequest,
|
|
6
14
|
CallToolResultSchema,
|
|
@@ -15,14 +23,6 @@ import {
|
|
|
15
23
|
ServerCapabilities,
|
|
16
24
|
Tool
|
|
17
25
|
} from "@modelcontextprotocol/sdk/types.js";
|
|
18
|
-
import {
|
|
19
|
-
SSEClientTransport,
|
|
20
|
-
SSEClientTransportOptions
|
|
21
|
-
} from "@modelcontextprotocol/sdk/client/sse.js";
|
|
22
|
-
import {
|
|
23
|
-
StreamableHTTPClientTransport,
|
|
24
|
-
StreamableHTTPClientTransportOptions
|
|
25
|
-
} from "@modelcontextprotocol/sdk/client/streamableHttp.js";
|
|
26
26
|
import * as ai0 from "ai";
|
|
27
27
|
import { ToolSet } from "ai";
|
|
28
28
|
import * as zod0 from "zod";
|
|
@@ -34,36 +34,6 @@ interface Disposable {
|
|
|
34
34
|
}
|
|
35
35
|
type Event<T> = (listener: (e: T) => void) => Disposable;
|
|
36
36
|
//#endregion
|
|
37
|
-
//#region src/mcp/sse-edge.d.ts
|
|
38
|
-
declare class SSEEdgeClientTransport extends SSEClientTransport {
|
|
39
|
-
private authProvider;
|
|
40
|
-
/**
|
|
41
|
-
* Creates a new EdgeSSEClientTransport, which overrides fetch to be compatible with the CF workers environment
|
|
42
|
-
*/
|
|
43
|
-
constructor(url: URL, options: SSEClientTransportOptions);
|
|
44
|
-
authHeaders(): Promise<
|
|
45
|
-
| {
|
|
46
|
-
Authorization: string;
|
|
47
|
-
}
|
|
48
|
-
| undefined
|
|
49
|
-
>;
|
|
50
|
-
}
|
|
51
|
-
//#endregion
|
|
52
|
-
//#region src/mcp/streamable-http-edge.d.ts
|
|
53
|
-
declare class StreamableHTTPEdgeClientTransport extends StreamableHTTPClientTransport {
|
|
54
|
-
private authProvider;
|
|
55
|
-
/**
|
|
56
|
-
* Creates a new StreamableHTTPEdgeClientTransport, which overrides fetch to be compatible with the CF workers environment
|
|
57
|
-
*/
|
|
58
|
-
constructor(url: URL, options: StreamableHTTPClientTransportOptions);
|
|
59
|
-
authHeaders(): Promise<
|
|
60
|
-
| {
|
|
61
|
-
Authorization: string;
|
|
62
|
-
}
|
|
63
|
-
| undefined
|
|
64
|
-
>;
|
|
65
|
-
}
|
|
66
|
-
//#endregion
|
|
67
37
|
//#region src/mcp/types.d.ts
|
|
68
38
|
type MaybePromise<T> = T | Promise<T>;
|
|
69
39
|
type BaseTransportType = "sse" | "streamable-http";
|
|
@@ -79,6 +49,7 @@ interface ServeOptions {
|
|
|
79
49
|
binding?: string;
|
|
80
50
|
corsOptions?: CORSOptions;
|
|
81
51
|
transport?: BaseTransportType;
|
|
52
|
+
jurisdiction?: DurableObjectJurisdiction;
|
|
82
53
|
}
|
|
83
54
|
//#endregion
|
|
84
55
|
//#region src/mcp/client-connection.d.ts
|
|
@@ -168,13 +139,13 @@ declare class MCPClientConnection {
|
|
|
168
139
|
| undefined;
|
|
169
140
|
required?: string[] | undefined;
|
|
170
141
|
};
|
|
171
|
-
description?: string | undefined;
|
|
172
142
|
_meta?:
|
|
173
143
|
| {
|
|
174
144
|
[x: string]: unknown;
|
|
175
145
|
}
|
|
176
146
|
| undefined;
|
|
177
147
|
title?: string | undefined;
|
|
148
|
+
description?: string | undefined;
|
|
178
149
|
icons?:
|
|
179
150
|
| {
|
|
180
151
|
[x: string]: unknown;
|
|
@@ -212,7 +183,6 @@ declare class MCPClientConnection {
|
|
|
212
183
|
[x: string]: unknown;
|
|
213
184
|
name: string;
|
|
214
185
|
uri: string;
|
|
215
|
-
description?: string | undefined;
|
|
216
186
|
_meta?:
|
|
217
187
|
| {
|
|
218
188
|
[x: string]: unknown;
|
|
@@ -220,6 +190,7 @@ declare class MCPClientConnection {
|
|
|
220
190
|
| undefined;
|
|
221
191
|
mimeType?: string | undefined;
|
|
222
192
|
title?: string | undefined;
|
|
193
|
+
description?: string | undefined;
|
|
223
194
|
icons?:
|
|
224
195
|
| {
|
|
225
196
|
[x: string]: unknown;
|
|
@@ -234,7 +205,6 @@ declare class MCPClientConnection {
|
|
|
234
205
|
{
|
|
235
206
|
[x: string]: unknown;
|
|
236
207
|
name: string;
|
|
237
|
-
description?: string | undefined;
|
|
238
208
|
_meta?:
|
|
239
209
|
| {
|
|
240
210
|
[x: string]: unknown;
|
|
@@ -249,6 +219,7 @@ declare class MCPClientConnection {
|
|
|
249
219
|
}[]
|
|
250
220
|
| undefined;
|
|
251
221
|
title?: string | undefined;
|
|
222
|
+
description?: string | undefined;
|
|
252
223
|
icons?:
|
|
253
224
|
| {
|
|
254
225
|
[x: string]: unknown;
|
|
@@ -264,7 +235,6 @@ declare class MCPClientConnection {
|
|
|
264
235
|
[x: string]: unknown;
|
|
265
236
|
name: string;
|
|
266
237
|
uriTemplate: string;
|
|
267
|
-
description?: string | undefined;
|
|
268
238
|
_meta?:
|
|
269
239
|
| {
|
|
270
240
|
[x: string]: unknown;
|
|
@@ -272,6 +242,7 @@ declare class MCPClientConnection {
|
|
|
272
242
|
| undefined;
|
|
273
243
|
mimeType?: string | undefined;
|
|
274
244
|
title?: string | undefined;
|
|
245
|
+
description?: string | undefined;
|
|
275
246
|
icons?:
|
|
276
247
|
| {
|
|
277
248
|
[x: string]: unknown;
|
|
@@ -294,7 +265,7 @@ declare class MCPClientConnection {
|
|
|
294
265
|
*/
|
|
295
266
|
getTransport(
|
|
296
267
|
transportType: BaseTransportType
|
|
297
|
-
):
|
|
268
|
+
): StreamableHTTPClientTransport | SSEClientTransport;
|
|
298
269
|
private tryConnect;
|
|
299
270
|
private _capabilityErrorHandler;
|
|
300
271
|
}
|
|
@@ -360,12 +331,12 @@ declare class MCPClientManager {
|
|
|
360
331
|
| {
|
|
361
332
|
serverId: string;
|
|
362
333
|
authSuccess: boolean;
|
|
363
|
-
authError
|
|
334
|
+
authError: string;
|
|
364
335
|
}
|
|
365
336
|
| {
|
|
366
337
|
serverId: string;
|
|
367
338
|
authSuccess: boolean;
|
|
368
|
-
authError
|
|
339
|
+
authError?: undefined;
|
|
369
340
|
}
|
|
370
341
|
>;
|
|
371
342
|
/**
|
|
@@ -5298,16 +5269,15 @@ declare function getNamespacedData<T extends keyof NamespacedData>(
|
|
|
5298
5269
|
): NamespacedData[T];
|
|
5299
5270
|
//#endregion
|
|
5300
5271
|
export {
|
|
5301
|
-
|
|
5302
|
-
|
|
5303
|
-
|
|
5304
|
-
|
|
5305
|
-
|
|
5306
|
-
|
|
5307
|
-
|
|
5308
|
-
|
|
5309
|
-
|
|
5310
|
-
TransportType
|
|
5311
|
-
getNamespacedData
|
|
5272
|
+
MCPConnectionState as a,
|
|
5273
|
+
MaybePromise as c,
|
|
5274
|
+
getNamespacedData as i,
|
|
5275
|
+
ServeOptions as l,
|
|
5276
|
+
MCPClientOAuthCallbackConfig as n,
|
|
5277
|
+
BaseTransportType as o,
|
|
5278
|
+
MCPClientOAuthResult as r,
|
|
5279
|
+
CORSOptions as s,
|
|
5280
|
+
MCPClientManager as t,
|
|
5281
|
+
TransportType as u
|
|
5312
5282
|
};
|
|
5313
|
-
//# sourceMappingURL=client-
|
|
5283
|
+
//# sourceMappingURL=client-DnzF-4rM.d.ts.map
|
package/dist/client.d.ts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import "./serializable-
|
|
1
|
+
import "./serializable-CymX8ovI.js";
|
|
2
2
|
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
} from "./client-
|
|
3
|
+
a as agentFetch,
|
|
4
|
+
i as StreamOptions,
|
|
5
|
+
n as AgentClientFetchOptions,
|
|
6
|
+
o as camelCaseToKebabCase,
|
|
7
|
+
r as AgentClientOptions,
|
|
8
|
+
t as AgentClient
|
|
9
|
+
} from "./client-CbWe9FBd.js";
|
|
10
10
|
export {
|
|
11
11
|
AgentClient,
|
|
12
12
|
AgentClientFetchOptions,
|
package/dist/client.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import "./ai-types-
|
|
2
|
-
import {
|
|
1
|
+
import "./ai-types-B3aQaFv3.js";
|
|
2
|
+
import { n as agentFetch, r as camelCaseToKebabCase, t as AgentClient } from "./client-BfiZ3HQd.js";
|
|
3
3
|
|
|
4
4
|
export { AgentClient, agentFetch, camelCaseToKebabCase };
|
package/dist/codemode/ai.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import "../ai-types-
|
|
2
|
-
import "../client-
|
|
3
|
-
import "../client-
|
|
4
|
-
import "../do-oauth-client-provider-
|
|
5
|
-
import { getAgentByName } from "../src-
|
|
1
|
+
import "../ai-types-B3aQaFv3.js";
|
|
2
|
+
import "../client-BfiZ3HQd.js";
|
|
3
|
+
import "../client-DZhjV_XA.js";
|
|
4
|
+
import "../do-oauth-client-provider-CswoD5Lu.js";
|
|
5
|
+
import { s as getAgentByName } from "../src-CwIW7tU2.js";
|
|
6
6
|
import { generateObject, tool } from "ai";
|
|
7
7
|
import { openai } from "@ai-sdk/openai";
|
|
8
8
|
import { z } from "zod/v3";
|
|
@@ -89,5 +89,5 @@ var DurableObjectOAuthClientProvider = class {
|
|
|
89
89
|
};
|
|
90
90
|
|
|
91
91
|
//#endregion
|
|
92
|
-
export { DurableObjectOAuthClientProvider };
|
|
93
|
-
//# sourceMappingURL=do-oauth-client-provider-
|
|
92
|
+
export { DurableObjectOAuthClientProvider as t };
|
|
93
|
+
//# sourceMappingURL=do-oauth-client-provider-CswoD5Lu.js.map
|
package/dist/{do-oauth-client-provider-B2jr6UNq.js.map → do-oauth-client-provider-CswoD5Lu.js.map}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"do-oauth-client-provider-
|
|
1
|
+
{"version":3,"file":"do-oauth-client-provider-CswoD5Lu.js","names":["storage: DurableObjectStorage","clientName: string","baseRedirectUrl: string"],"sources":["../src/mcp/do-oauth-client-provider.ts"],"sourcesContent":["import type { OAuthClientProvider } from \"@modelcontextprotocol/sdk/client/auth.js\";\nimport type {\n OAuthClientInformation,\n OAuthClientInformationFull,\n OAuthClientMetadata,\n OAuthTokens\n} from \"@modelcontextprotocol/sdk/shared/auth.js\";\nimport { nanoid } from \"nanoid\";\n\n// A slight extension to the standard OAuthClientProvider interface because `redirectToAuthorization` doesn't give us the interface we need\n// This allows us to track authentication for a specific server and associated dynamic client registration\nexport interface AgentsOAuthProvider extends OAuthClientProvider {\n authUrl: string | undefined;\n clientId: string | undefined;\n serverId: string | undefined;\n}\n\nexport class DurableObjectOAuthClientProvider implements AgentsOAuthProvider {\n private _authUrl_: string | undefined;\n private _serverId_: string | undefined;\n private _clientId_: string | undefined;\n\n constructor(\n public storage: DurableObjectStorage,\n public clientName: string,\n public baseRedirectUrl: string\n ) {}\n\n get clientMetadata(): OAuthClientMetadata {\n return {\n client_name: this.clientName,\n client_uri: this.clientUri,\n grant_types: [\"authorization_code\", \"refresh_token\"],\n redirect_uris: [this.redirectUrl],\n response_types: [\"code\"],\n token_endpoint_auth_method: \"none\"\n };\n }\n\n get clientUri() {\n return new URL(this.redirectUrl).origin;\n }\n\n get redirectUrl() {\n return `${this.baseRedirectUrl}/${this.serverId}`;\n }\n\n get clientId() {\n if (!this._clientId_) {\n throw new Error(\"Trying to access clientId before it was set\");\n }\n return this._clientId_;\n }\n\n set clientId(clientId_: string) {\n this._clientId_ = clientId_;\n }\n\n get serverId() {\n if (!this._serverId_) {\n throw new Error(\"Trying to access serverId before it was set\");\n }\n return this._serverId_;\n }\n\n set serverId(serverId_: string) {\n this._serverId_ = serverId_;\n }\n\n keyPrefix(clientId: string) {\n return `/${this.clientName}/${this.serverId}/${clientId}`;\n }\n\n clientInfoKey(clientId: string) {\n return `${this.keyPrefix(clientId)}/client_info/`;\n }\n\n async clientInformation(): Promise<OAuthClientInformation | undefined> {\n if (!this._clientId_) {\n return undefined;\n }\n return (\n (await this.storage.get<OAuthClientInformation>(\n this.clientInfoKey(this.clientId)\n )) ?? undefined\n );\n }\n\n async saveClientInformation(\n clientInformation: OAuthClientInformationFull\n ): Promise<void> {\n await this.storage.put(\n this.clientInfoKey(clientInformation.client_id),\n clientInformation\n );\n this.clientId = clientInformation.client_id;\n }\n\n tokenKey(clientId: string) {\n return `${this.keyPrefix(clientId)}/token`;\n }\n\n async tokens(): Promise<OAuthTokens | undefined> {\n if (!this._clientId_) {\n return undefined;\n }\n return (\n (await this.storage.get<OAuthTokens>(this.tokenKey(this.clientId))) ??\n undefined\n );\n }\n\n async saveTokens(tokens: OAuthTokens): Promise<void> {\n await this.storage.put(this.tokenKey(this.clientId), tokens);\n }\n\n get authUrl() {\n return this._authUrl_;\n }\n\n /**\n * Because this operates on the server side (but we need browser auth), we send this url back to the user\n * and require user interact to initiate the redirect flow\n */\n async redirectToAuthorization(authUrl: URL): Promise<void> {\n // Generate secure random token for state parameter\n const stateToken = nanoid();\n authUrl.searchParams.set(\"state\", stateToken);\n this._authUrl_ = authUrl.toString();\n }\n\n codeVerifierKey(clientId: string) {\n return `${this.keyPrefix(clientId)}/code_verifier`;\n }\n\n async saveCodeVerifier(verifier: string): Promise<void> {\n const key = this.codeVerifierKey(this.clientId);\n\n // Don't overwrite existing verifier to preserve first PKCE verifier\n const existing = await this.storage.get<string>(key);\n if (existing) {\n return;\n }\n\n await this.storage.put(key, verifier);\n }\n\n async codeVerifier(): Promise<string> {\n const codeVerifier = await this.storage.get<string>(\n this.codeVerifierKey(this.clientId)\n );\n if (!codeVerifier) {\n throw new Error(\"No code verifier found\");\n }\n return codeVerifier;\n }\n}\n"],"mappings":";;;AAiBA,IAAa,mCAAb,MAA6E;CAK3E,YACE,AAAOA,SACP,AAAOC,YACP,AAAOC,iBACP;EAHO;EACA;EACA;;CAGT,IAAI,iBAAsC;AACxC,SAAO;GACL,aAAa,KAAK;GAClB,YAAY,KAAK;GACjB,aAAa,CAAC,sBAAsB,gBAAgB;GACpD,eAAe,CAAC,KAAK,YAAY;GACjC,gBAAgB,CAAC,OAAO;GACxB,4BAA4B;GAC7B;;CAGH,IAAI,YAAY;AACd,SAAO,IAAI,IAAI,KAAK,YAAY,CAAC;;CAGnC,IAAI,cAAc;AAChB,SAAO,GAAG,KAAK,gBAAgB,GAAG,KAAK;;CAGzC,IAAI,WAAW;AACb,MAAI,CAAC,KAAK,WACR,OAAM,IAAI,MAAM,8CAA8C;AAEhE,SAAO,KAAK;;CAGd,IAAI,SAAS,WAAmB;AAC9B,OAAK,aAAa;;CAGpB,IAAI,WAAW;AACb,MAAI,CAAC,KAAK,WACR,OAAM,IAAI,MAAM,8CAA8C;AAEhE,SAAO,KAAK;;CAGd,IAAI,SAAS,WAAmB;AAC9B,OAAK,aAAa;;CAGpB,UAAU,UAAkB;AAC1B,SAAO,IAAI,KAAK,WAAW,GAAG,KAAK,SAAS,GAAG;;CAGjD,cAAc,UAAkB;AAC9B,SAAO,GAAG,KAAK,UAAU,SAAS,CAAC;;CAGrC,MAAM,oBAAiE;AACrE,MAAI,CAAC,KAAK,WACR;AAEF,SACG,MAAM,KAAK,QAAQ,IAClB,KAAK,cAAc,KAAK,SAAS,CAClC,IAAK;;CAIV,MAAM,sBACJ,mBACe;AACf,QAAM,KAAK,QAAQ,IACjB,KAAK,cAAc,kBAAkB,UAAU,EAC/C,kBACD;AACD,OAAK,WAAW,kBAAkB;;CAGpC,SAAS,UAAkB;AACzB,SAAO,GAAG,KAAK,UAAU,SAAS,CAAC;;CAGrC,MAAM,SAA2C;AAC/C,MAAI,CAAC,KAAK,WACR;AAEF,SACG,MAAM,KAAK,QAAQ,IAAiB,KAAK,SAAS,KAAK,SAAS,CAAC,IAClE;;CAIJ,MAAM,WAAW,QAAoC;AACnD,QAAM,KAAK,QAAQ,IAAI,KAAK,SAAS,KAAK,SAAS,EAAE,OAAO;;CAG9D,IAAI,UAAU;AACZ,SAAO,KAAK;;;;;;CAOd,MAAM,wBAAwB,SAA6B;EAEzD,MAAM,aAAa,QAAQ;AAC3B,UAAQ,aAAa,IAAI,SAAS,WAAW;AAC7C,OAAK,YAAY,QAAQ,UAAU;;CAGrC,gBAAgB,UAAkB;AAChC,SAAO,GAAG,KAAK,UAAU,SAAS,CAAC;;CAGrC,MAAM,iBAAiB,UAAiC;EACtD,MAAM,MAAM,KAAK,gBAAgB,KAAK,SAAS;AAI/C,MADiB,MAAM,KAAK,QAAQ,IAAY,IAAI,CAElD;AAGF,QAAM,KAAK,QAAQ,IAAI,KAAK,SAAS;;CAGvC,MAAM,eAAgC;EACpC,MAAM,eAAe,MAAM,KAAK,QAAQ,IACtC,KAAK,gBAAgB,KAAK,SAAS,CACpC;AACD,MAAI,CAAC,aACH,OAAM,IAAI,MAAM,yBAAyB;AAE3C,SAAO"}
|
package/dist/{do-oauth-client-provider-CCwGwnrA.d.ts → do-oauth-client-provider-DGc5pP0l.d.ts}
RENAMED
|
@@ -51,5 +51,5 @@ declare class DurableObjectOAuthClientProvider implements AgentsOAuthProvider {
|
|
|
51
51
|
codeVerifier(): Promise<string>;
|
|
52
52
|
}
|
|
53
53
|
//#endregion
|
|
54
|
-
export {
|
|
55
|
-
//# sourceMappingURL=do-oauth-client-provider-
|
|
54
|
+
export { DurableObjectOAuthClientProvider as n, AgentsOAuthProvider as t };
|
|
55
|
+
//# sourceMappingURL=do-oauth-client-provider-DGc5pP0l.d.ts.map
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
TransportType
|
|
5
|
-
} from "./client-
|
|
6
|
-
import { Observability } from "./index-
|
|
7
|
-
import { MessageType } from "./ai-types-
|
|
2
|
+
a as MCPConnectionState,
|
|
3
|
+
t as MCPClientManager,
|
|
4
|
+
u as TransportType
|
|
5
|
+
} from "./client-DnzF-4rM.js";
|
|
6
|
+
import { t as Observability } from "./index-DhJCaDWd.js";
|
|
7
|
+
import { n as MessageType } from "./ai-types-D5YoPrBZ.js";
|
|
8
8
|
import {
|
|
9
9
|
Connection,
|
|
10
10
|
Connection as Connection$1,
|
|
@@ -171,6 +171,7 @@ declare class Agent<
|
|
|
171
171
|
> extends Server<Env, Props> {
|
|
172
172
|
private _state;
|
|
173
173
|
private _disposables;
|
|
174
|
+
private _mcpStateRestored;
|
|
174
175
|
private _ParentClass;
|
|
175
176
|
readonly mcp: MCPClientManager;
|
|
176
177
|
/**
|
|
@@ -346,6 +347,7 @@ declare class Agent<
|
|
|
346
347
|
* @returns A map of method names to their metadata
|
|
347
348
|
*/
|
|
348
349
|
private _isCallable;
|
|
350
|
+
private _ensureMcpStateRestored;
|
|
349
351
|
/**
|
|
350
352
|
* Connect to a new MCP Server
|
|
351
353
|
*
|
|
@@ -372,16 +374,6 @@ declare class Agent<
|
|
|
372
374
|
id: string;
|
|
373
375
|
authUrl: string | undefined;
|
|
374
376
|
}>;
|
|
375
|
-
/**
|
|
376
|
-
* Handle potential OAuth callback requests after DO hibernation.
|
|
377
|
-
* Detects OAuth callbacks, restores state from database, and processes the callback.
|
|
378
|
-
* Returns a Response if this was an OAuth callback, otherwise returns undefined.
|
|
379
|
-
*/
|
|
380
|
-
private _handlePotentialOAuthCallback;
|
|
381
|
-
/**
|
|
382
|
-
* Process an OAuth callback request (assumes state is already restored)
|
|
383
|
-
*/
|
|
384
|
-
private _processOAuthCallback;
|
|
385
377
|
private _connectToMcpServerInternal;
|
|
386
378
|
removeMcpServer(id: string): Promise<void>;
|
|
387
379
|
getMcpServers(): MCPServersState;
|
|
@@ -534,35 +526,35 @@ declare class StreamingResponse {
|
|
|
534
526
|
}
|
|
535
527
|
//#endregion
|
|
536
528
|
export {
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
QueueItem,
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
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
|
|
567
559
|
};
|
|
568
|
-
//# sourceMappingURL=index-
|
|
560
|
+
//# sourceMappingURL=index-Db_90HY3.d.ts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { BaseEvent, MCPObservabilityEvent } from "./mcp-
|
|
1
|
+
import { n as BaseEvent, t as MCPObservabilityEvent } from "./mcp-Dw5vDrY8.js";
|
|
2
2
|
|
|
3
3
|
//#region src/observability/agent.d.ts
|
|
4
4
|
|
|
@@ -50,5 +50,9 @@ interface Observability {
|
|
|
50
50
|
*/
|
|
51
51
|
declare const genericObservability: Observability;
|
|
52
52
|
//#endregion
|
|
53
|
-
export {
|
|
54
|
-
|
|
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,40 +1,40 @@
|
|
|
1
|
-
import { TransportType } from "./client-
|
|
2
|
-
import "./mcp-
|
|
3
|
-
import "./do-oauth-client-provider-
|
|
4
|
-
import "./index-
|
|
5
|
-
import "./ai-types-
|
|
1
|
+
import { u as TransportType } from "./client-DnzF-4rM.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
6
|
import {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
QueueItem,
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
} from "./index-
|
|
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,
|
|
19
|
+
f as MCPServer,
|
|
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-Db_90HY3.js";
|
|
38
38
|
export {
|
|
39
39
|
Agent,
|
|
40
40
|
AgentContext,
|
package/dist/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import "./ai-types-
|
|
2
|
-
import "./client-
|
|
3
|
-
import "./client-
|
|
4
|
-
import "./do-oauth-client-provider-
|
|
5
|
-
import {
|
|
1
|
+
import "./ai-types-B3aQaFv3.js";
|
|
2
|
+
import "./client-BfiZ3HQd.js";
|
|
3
|
+
import "./client-DZhjV_XA.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-CwIW7tU2.js";
|
|
6
6
|
|
|
7
7
|
export { Agent, StreamingResponse, callable, createAddressBasedEmailResolver, createCatchAllEmailResolver, createHeaderBasedEmailResolver, getAgentByName, getCurrentAgent, routeAgentEmail, routeAgentRequest, unstable_callable };
|
package/dist/mcp/client.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import "../mcp-
|
|
3
|
-
import "../do-oauth-client-provider-
|
|
1
|
+
import { i as getNamespacedData, n as MCPClientOAuthCallbackConfig, r as MCPClientOAuthResult, t as MCPClientManager } from "../client-DnzF-4rM.js";
|
|
2
|
+
import "../mcp-Dw5vDrY8.js";
|
|
3
|
+
import "../do-oauth-client-provider-DGc5pP0l.js";
|
|
4
4
|
export { MCPClientManager, MCPClientOAuthCallbackConfig, MCPClientOAuthResult, getNamespacedData };
|
package/dist/mcp/client.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { n as DurableObjectOAuthClientProvider, t as AgentsOAuthProvider } from "../do-oauth-client-provider-DGc5pP0l.js";
|
|
2
2
|
export { AgentsOAuthProvider, DurableObjectOAuthClientProvider };
|