agents 0.0.0-cdfc590 → 0.0.0-cec3cca
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-CZBVDDoO.js → client-9Ld2_lnt.js} +2 -2
- package/dist/{client-CZBVDDoO.js.map → client-9Ld2_lnt.js.map} +1 -1
- 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-CrWcaPgn.d.ts → client-Csp_m13H.d.ts} +25 -23
- 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-Daqy_D9E.d.ts → index-DFqsR7mb.d.ts} +48 -46
- 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 +88 -9
- package/dist/mcp/index.js +549 -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-Cl4ZPPhW.d.ts → react-NCPvtyCY.d.ts} +28 -26
- 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-COfG--3R.js → src-Dz0H9hSU.js} +47 -26
- package/dist/src-Dz0H9hSU.js.map +1 -0
- package/package.json +14 -8
- package/dist/src-COfG--3R.js.map +0 -1
- package/src/index.ts +0 -2031
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
} from "./serializable-
|
|
2
|
+
i as SerializableValue,
|
|
3
|
+
r as SerializableReturnValue
|
|
4
|
+
} from "./serializable-CymX8ovI.js";
|
|
5
5
|
import {
|
|
6
6
|
PartyFetchOptions,
|
|
7
7
|
PartySocket,
|
|
@@ -94,11 +94,11 @@ declare function agentFetch(
|
|
|
94
94
|
): Promise<Response>;
|
|
95
95
|
//#endregion
|
|
96
96
|
export {
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
97
|
+
agentFetch as a,
|
|
98
|
+
StreamOptions as i,
|
|
99
|
+
AgentClientFetchOptions as n,
|
|
100
|
+
camelCaseToKebabCase as o,
|
|
101
|
+
AgentClientOptions as r,
|
|
102
|
+
AgentClient as t
|
|
103
103
|
};
|
|
104
|
-
//# sourceMappingURL=client-
|
|
104
|
+
//# sourceMappingURL=client-CbWe9FBd.d.ts.map
|
|
@@ -1,5 +1,5 @@
|
|
|
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
4
|
import {
|
|
5
5
|
CallToolRequest,
|
|
@@ -32,7 +32,7 @@ import { RequestOptions } from "@modelcontextprotocol/sdk/shared/protocol.js";
|
|
|
32
32
|
interface Disposable {
|
|
33
33
|
dispose(): void;
|
|
34
34
|
}
|
|
35
|
-
type Event<T> = (listener: (e: T) => void) => Disposable;
|
|
35
|
+
type Event<T$1> = (listener: (e: T$1) => void) => Disposable;
|
|
36
36
|
//#endregion
|
|
37
37
|
//#region src/mcp/sse-edge.d.ts
|
|
38
38
|
declare class SSEEdgeClientTransport extends SSEClientTransport {
|
|
@@ -65,7 +65,7 @@ declare class StreamableHTTPEdgeClientTransport extends StreamableHTTPClientTran
|
|
|
65
65
|
}
|
|
66
66
|
//#endregion
|
|
67
67
|
//#region src/mcp/types.d.ts
|
|
68
|
-
type MaybePromise<T> = T | Promise<T>;
|
|
68
|
+
type MaybePromise<T$1> = T$1 | Promise<T$1>;
|
|
69
69
|
type BaseTransportType = "sse" | "streamable-http";
|
|
70
70
|
type TransportType = BaseTransportType | "auto";
|
|
71
71
|
interface CORSOptions {
|
|
@@ -79,6 +79,7 @@ interface ServeOptions {
|
|
|
79
79
|
binding?: string;
|
|
80
80
|
corsOptions?: CORSOptions;
|
|
81
81
|
transport?: BaseTransportType;
|
|
82
|
+
jurisdiction?: DurableObjectJurisdiction;
|
|
82
83
|
}
|
|
83
84
|
//#endregion
|
|
84
85
|
//#region src/mcp/client-connection.d.ts
|
|
@@ -168,13 +169,13 @@ declare class MCPClientConnection {
|
|
|
168
169
|
| undefined;
|
|
169
170
|
required?: string[] | undefined;
|
|
170
171
|
};
|
|
172
|
+
description?: string | undefined;
|
|
171
173
|
_meta?:
|
|
172
174
|
| {
|
|
173
175
|
[x: string]: unknown;
|
|
174
176
|
}
|
|
175
177
|
| undefined;
|
|
176
178
|
title?: string | undefined;
|
|
177
|
-
description?: string | undefined;
|
|
178
179
|
icons?:
|
|
179
180
|
| {
|
|
180
181
|
[x: string]: unknown;
|
|
@@ -212,6 +213,7 @@ declare class MCPClientConnection {
|
|
|
212
213
|
[x: string]: unknown;
|
|
213
214
|
name: string;
|
|
214
215
|
uri: string;
|
|
216
|
+
description?: string | undefined;
|
|
215
217
|
_meta?:
|
|
216
218
|
| {
|
|
217
219
|
[x: string]: unknown;
|
|
@@ -219,7 +221,6 @@ declare class MCPClientConnection {
|
|
|
219
221
|
| undefined;
|
|
220
222
|
mimeType?: string | undefined;
|
|
221
223
|
title?: string | undefined;
|
|
222
|
-
description?: string | undefined;
|
|
223
224
|
icons?:
|
|
224
225
|
| {
|
|
225
226
|
[x: string]: unknown;
|
|
@@ -234,6 +235,7 @@ declare class MCPClientConnection {
|
|
|
234
235
|
{
|
|
235
236
|
[x: string]: unknown;
|
|
236
237
|
name: string;
|
|
238
|
+
description?: string | undefined;
|
|
237
239
|
_meta?:
|
|
238
240
|
| {
|
|
239
241
|
[x: string]: unknown;
|
|
@@ -248,7 +250,6 @@ declare class MCPClientConnection {
|
|
|
248
250
|
}[]
|
|
249
251
|
| undefined;
|
|
250
252
|
title?: string | undefined;
|
|
251
|
-
description?: string | undefined;
|
|
252
253
|
icons?:
|
|
253
254
|
| {
|
|
254
255
|
[x: string]: unknown;
|
|
@@ -264,6 +265,7 @@ declare class MCPClientConnection {
|
|
|
264
265
|
[x: string]: unknown;
|
|
265
266
|
name: string;
|
|
266
267
|
uriTemplate: string;
|
|
268
|
+
description?: string | undefined;
|
|
267
269
|
_meta?:
|
|
268
270
|
| {
|
|
269
271
|
[x: string]: unknown;
|
|
@@ -271,7 +273,6 @@ declare class MCPClientConnection {
|
|
|
271
273
|
| undefined;
|
|
272
274
|
mimeType?: string | undefined;
|
|
273
275
|
title?: string | undefined;
|
|
274
|
-
description?: string | undefined;
|
|
275
276
|
icons?:
|
|
276
277
|
| {
|
|
277
278
|
[x: string]: unknown;
|
|
@@ -5292,22 +5293,23 @@ type NamespacedData = {
|
|
|
5292
5293
|
serverId: string;
|
|
5293
5294
|
})[];
|
|
5294
5295
|
};
|
|
5295
|
-
declare function getNamespacedData<T extends keyof NamespacedData>(
|
|
5296
|
+
declare function getNamespacedData<T$1 extends keyof NamespacedData>(
|
|
5296
5297
|
mcpClients: Record<string, MCPClientConnection>,
|
|
5297
|
-
type: T
|
|
5298
|
-
): NamespacedData[T];
|
|
5298
|
+
type: T$1
|
|
5299
|
+
): NamespacedData[T$1];
|
|
5299
5300
|
//#endregion
|
|
5300
5301
|
export {
|
|
5301
|
-
|
|
5302
|
-
|
|
5303
|
-
|
|
5304
|
-
|
|
5305
|
-
|
|
5306
|
-
|
|
5307
|
-
|
|
5308
|
-
|
|
5309
|
-
|
|
5310
|
-
|
|
5311
|
-
|
|
5302
|
+
MCPConnectionState as a,
|
|
5303
|
+
MaybePromise as c,
|
|
5304
|
+
StreamableHTTPEdgeClientTransport as d,
|
|
5305
|
+
SSEEdgeClientTransport as f,
|
|
5306
|
+
getNamespacedData as i,
|
|
5307
|
+
ServeOptions as l,
|
|
5308
|
+
MCPClientOAuthCallbackConfig as n,
|
|
5309
|
+
BaseTransportType as o,
|
|
5310
|
+
MCPClientOAuthResult as r,
|
|
5311
|
+
CORSOptions as s,
|
|
5312
|
+
MCPClientManager as t,
|
|
5313
|
+
TransportType as u
|
|
5312
5314
|
};
|
|
5313
|
-
//# sourceMappingURL=client-
|
|
5315
|
+
//# sourceMappingURL=client-Csp_m13H.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-9Ld2_lnt.js";
|
|
4
|
+
import "../do-oauth-client-provider-CswoD5Lu.js";
|
|
5
|
+
import { s as getAgentByName } from "../src-Dz0H9hSU.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-Csp_m13H.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,
|
|
@@ -87,9 +87,9 @@ declare function callable(
|
|
|
87
87
|
* @param metadata Optional metadata about the callable method
|
|
88
88
|
*/
|
|
89
89
|
declare const unstable_callable: (metadata?: CallableMetadata) => void;
|
|
90
|
-
type QueueItem<T = string> = {
|
|
90
|
+
type QueueItem<T$1 = string> = {
|
|
91
91
|
id: string;
|
|
92
|
-
payload: T;
|
|
92
|
+
payload: T$1;
|
|
93
93
|
callback: keyof Agent<unknown>;
|
|
94
94
|
created_at: number;
|
|
95
95
|
};
|
|
@@ -97,13 +97,13 @@ type QueueItem<T = string> = {
|
|
|
97
97
|
* Represents a scheduled task within an Agent
|
|
98
98
|
* @template T Type of the payload data
|
|
99
99
|
*/
|
|
100
|
-
type Schedule<T = string> = {
|
|
100
|
+
type Schedule<T$1 = string> = {
|
|
101
101
|
/** Unique identifier for the schedule */
|
|
102
102
|
id: string;
|
|
103
103
|
/** Name of the method to be called */
|
|
104
104
|
callback: string;
|
|
105
105
|
/** Data to be passed to the callback */
|
|
106
|
-
payload: T;
|
|
106
|
+
payload: T$1;
|
|
107
107
|
} & (
|
|
108
108
|
| {
|
|
109
109
|
/** Type of schedule for one-time execution at a specific time */
|
|
@@ -152,9 +152,9 @@ type MCPServer = {
|
|
|
152
152
|
capabilities: ServerCapabilities | null;
|
|
153
153
|
};
|
|
154
154
|
declare function getCurrentAgent<
|
|
155
|
-
T extends Agent<unknown, unknown> = Agent<unknown, unknown>
|
|
155
|
+
T$1 extends Agent<unknown, unknown> = Agent<unknown, unknown>
|
|
156
156
|
>(): {
|
|
157
|
-
agent: T | undefined;
|
|
157
|
+
agent: T$1 | undefined;
|
|
158
158
|
connection: Connection | undefined;
|
|
159
159
|
request: Request | undefined;
|
|
160
160
|
email: AgentEmail | undefined;
|
|
@@ -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
|
*
|
|
@@ -492,17 +494,17 @@ type EmailSendOptions = {
|
|
|
492
494
|
*/
|
|
493
495
|
declare function getAgentByName<
|
|
494
496
|
Env,
|
|
495
|
-
T extends Agent<Env>,
|
|
497
|
+
T$1 extends Agent<Env>,
|
|
496
498
|
Props extends Record<string, unknown> = Record<string, unknown>
|
|
497
499
|
>(
|
|
498
|
-
namespace: AgentNamespace<T>,
|
|
500
|
+
namespace: AgentNamespace<T$1>,
|
|
499
501
|
name: string,
|
|
500
502
|
options?: {
|
|
501
503
|
jurisdiction?: DurableObjectJurisdiction;
|
|
502
504
|
locationHint?: DurableObjectLocationHint;
|
|
503
505
|
props?: Props;
|
|
504
506
|
}
|
|
505
|
-
): Promise<DurableObjectStub<T>>;
|
|
507
|
+
): Promise<DurableObjectStub<T$1>>;
|
|
506
508
|
/**
|
|
507
509
|
* A wrapper for streaming responses in callable methods
|
|
508
510
|
*/
|
|
@@ -524,35 +526,35 @@ declare class StreamingResponse {
|
|
|
524
526
|
}
|
|
525
527
|
//#endregion
|
|
526
528
|
export {
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
QueueItem,
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
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
|
|
557
559
|
};
|
|
558
|
-
//# sourceMappingURL=index-
|
|
560
|
+
//# sourceMappingURL=index-DFqsR7mb.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-Csp_m13H.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-DFqsR7mb.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-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
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-Csp_m13H.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 };
|