agents 0.8.3 → 0.8.4

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.
@@ -0,0 +1,18 @@
1
+ {
2
+ "compilerOptions": {
3
+ "target": "ES2021",
4
+ "lib": ["ES2022", "DOM", "DOM.Iterable"],
5
+ "jsx": "react-jsx",
6
+ "module": "ES2022",
7
+ "moduleResolution": "bundler",
8
+ "types": ["node", "@cloudflare/workers-types"],
9
+ "allowImportingTsExtensions": true,
10
+ "noEmit": true,
11
+ "isolatedModules": true,
12
+ "verbatimModuleSyntax": true,
13
+ "esModuleInterop": true,
14
+ "forceConsistentCasingInFileNames": true,
15
+ "strict": true,
16
+ "skipLibCheck": true
17
+ }
18
+ }
package/dist/client.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { r as Agent } from "./index-DynYigzs.js";
1
+ import { r as Agent } from "./index-BADmcFuB.js";
2
2
  import {
3
3
  i as SerializableValue,
4
4
  n as RPCMethod,
@@ -1,4 +1,4 @@
1
- import { r as Agent } from "../index-DynYigzs.js";
1
+ import { r as Agent } from "../index-BADmcFuB.js";
2
2
  //#region src/experimental/forever.d.ts
3
3
  type FiberState = {
4
4
  id: string;
@@ -720,7 +720,7 @@ declare class MCPClientConnection {
720
720
  */
721
721
  getTransport(
722
722
  transportType: BaseTransportType
723
- ): RPCClientTransport | SSEClientTransport | StreamableHTTPClientTransport;
723
+ ): StreamableHTTPClientTransport | SSEClientTransport | RPCClientTransport;
724
724
  private tryConnect;
725
725
  private _capabilityErrorHandler;
726
726
  }
@@ -2865,4 +2865,4 @@ export {
2865
2865
  Schedule as y,
2866
2866
  MCPServerOptions as z
2867
2867
  };
2868
- //# sourceMappingURL=index-DynYigzs.d.ts.map
2868
+ //# sourceMappingURL=index-BADmcFuB.d.ts.map
package/dist/index.d.ts CHANGED
@@ -33,7 +33,7 @@ import {
33
33
  w as SubAgentStub,
34
34
  x as StateUpdateMessage,
35
35
  y as Schedule
36
- } from "./index-DynYigzs.js";
36
+ } from "./index-BADmcFuB.js";
37
37
  import {
38
38
  n as AgentsOAuthProvider,
39
39
  r as DurableObjectOAuthClientProvider,
@@ -1,2 +1,2 @@
1
- import { B as RegisterServerOptions, F as MCPClientOAuthResult, I as MCPConnectionResult, L as MCPDiscoverResult, M as MCPClientManager, N as MCPClientManagerOptions, P as MCPClientOAuthCallbackConfig, R as MCPOAuthCallbackResult, V as getNamespacedData, z as MCPServerOptions } from "../index-DynYigzs.js";
1
+ import { B as RegisterServerOptions, F as MCPClientOAuthResult, I as MCPConnectionResult, L as MCPDiscoverResult, M as MCPClientManager, N as MCPClientManagerOptions, P as MCPClientOAuthCallbackConfig, R as MCPOAuthCallbackResult, V as getNamespacedData, z as MCPServerOptions } from "../index-BADmcFuB.js";
2
2
  export { MCPClientManager, MCPClientManagerOptions, MCPClientOAuthCallbackConfig, MCPClientOAuthResult, MCPConnectionResult, MCPDiscoverResult, MCPOAuthCallbackResult, MCPServerOptions, RegisterServerOptions, getNamespacedData };
@@ -1,2 +1,2 @@
1
- import { $ as experimental_createMcpHandler, F as MCPClientOAuthResult, G as RPCServerTransportOptions, H as RPCClientTransport, I as MCPConnectionResult, J as ElicitRequestSchema, K as RPC_DO_PREFIX, L as MCPDiscoverResult, P as MCPClientOAuthCallbackConfig, Q as createMcpHandler, U as RPCClientTransportOptions, W as RPCServerTransport, X as McpAgent, Y as ElicitResult, Z as CreateMcpHandlerOptions, at as SSEEdgeClientTransport, et as McpAuthContext, it as WorkerTransportOptions, nt as TransportState, ot as StreamableHTTPEdgeClientTransport, q as ElicitRequest, rt as WorkerTransport, st as McpClientOptions, tt as getMcpAuthContext, z as MCPServerOptions } from "../index-DynYigzs.js";
1
+ import { $ as experimental_createMcpHandler, F as MCPClientOAuthResult, G as RPCServerTransportOptions, H as RPCClientTransport, I as MCPConnectionResult, J as ElicitRequestSchema, K as RPC_DO_PREFIX, L as MCPDiscoverResult, P as MCPClientOAuthCallbackConfig, Q as createMcpHandler, U as RPCClientTransportOptions, W as RPCServerTransport, X as McpAgent, Y as ElicitResult, Z as CreateMcpHandlerOptions, at as SSEEdgeClientTransport, et as McpAuthContext, it as WorkerTransportOptions, nt as TransportState, ot as StreamableHTTPEdgeClientTransport, q as ElicitRequest, rt as WorkerTransport, st as McpClientOptions, tt as getMcpAuthContext, z as MCPServerOptions } from "../index-BADmcFuB.js";
2
2
  export { CreateMcpHandlerOptions, ElicitRequest, ElicitRequestSchema, ElicitResult, MCPClientOAuthCallbackConfig, MCPClientOAuthResult, MCPConnectionResult, MCPDiscoverResult, MCPServerOptions, McpAgent, McpAuthContext, McpClientOptions, RPCClientTransport, RPCClientTransportOptions, RPCServerTransport, RPCServerTransportOptions, RPC_DO_PREFIX, SSEEdgeClientTransport, StreamableHTTPEdgeClientTransport, TransportState, WorkerTransport, WorkerTransportOptions, createMcpHandler, experimental_createMcpHandler, getMcpAuthContext };
package/dist/react.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { h as MCPServersState } from "./index-DynYigzs.js";
1
+ import { h as MCPServersState } from "./index-BADmcFuB.js";
2
2
  import {
3
3
  AgentPromiseReturnType,
4
4
  AgentStub,
package/dist/vite.d.ts ADDED
@@ -0,0 +1,14 @@
1
+ import { Plugin } from "vite";
2
+
3
+ //#region src/vite.d.ts
4
+ /**
5
+ * Vite plugin for Agents SDK projects.
6
+ *
7
+ * Currently handles TC39 decorator transforms (Oxc doesn't support them yet,
8
+ * oxc#9170) so `@callable()` works at runtime. Will grow to cover other
9
+ * Agents-specific build concerns as needed.
10
+ */
11
+ declare function agents(): Plugin;
12
+ //#endregion
13
+ export { agents as default };
14
+ //# sourceMappingURL=vite.d.ts.map
package/dist/vite.js ADDED
@@ -0,0 +1,19 @@
1
+ import babel from "@rolldown/plugin-babel";
2
+ //#region src/vite.ts
3
+ /**
4
+ * Vite plugin for Agents SDK projects.
5
+ *
6
+ * Currently handles TC39 decorator transforms (Oxc doesn't support them yet,
7
+ * oxc#9170) so `@callable()` works at runtime. Will grow to cover other
8
+ * Agents-specific build concerns as needed.
9
+ */
10
+ function agents() {
11
+ return babel({ presets: [{
12
+ preset: () => ({ plugins: [["@babel/plugin-proposal-decorators", { version: "2023-11" }]] }),
13
+ rolldown: { filter: { code: "@" } }
14
+ }] });
15
+ }
16
+ //#endregion
17
+ export { agents as default };
18
+
19
+ //# sourceMappingURL=vite.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"vite.js","names":[],"sources":["../src/vite.ts"],"sourcesContent":["import babel from \"@rolldown/plugin-babel\";\nimport type { Plugin } from \"vite\";\n\n/**\n * Vite plugin for Agents SDK projects.\n *\n * Currently handles TC39 decorator transforms (Oxc doesn't support them yet,\n * oxc#9170) so `@callable()` works at runtime. Will grow to cover other\n * Agents-specific build concerns as needed.\n */\nexport default function agents(): Plugin {\n return babel({\n presets: [\n {\n preset: () => ({\n plugins: [\n [\"@babel/plugin-proposal-decorators\", { version: \"2023-11\" }]\n ]\n }),\n rolldown: { filter: { code: \"@\" } }\n }\n ]\n }) as unknown as Plugin;\n}\n"],"mappings":";;;;;;;;;AAUA,SAAwB,SAAiB;AACvC,QAAO,MAAM,EACX,SAAS,CACP;EACE,eAAe,EACb,SAAS,CACP,CAAC,qCAAqC,EAAE,SAAS,WAAW,CAAC,CAC9D,EACF;EACD,UAAU,EAAE,QAAQ,EAAE,MAAM,KAAK,EAAE;EACpC,CACF,EACF,CAAC"}
@@ -1,4 +1,4 @@
1
- import { r as Agent } from "./index-DynYigzs.js";
1
+ import { r as Agent } from "./index-BADmcFuB.js";
2
2
  import {
3
3
  S as WorkflowTrackingRow,
4
4
  _ as WorkflowPage,
package/package.json CHANGED
@@ -9,7 +9,7 @@
9
9
  "durable objects"
10
10
  ],
11
11
  "type": "module",
12
- "version": "0.8.3",
12
+ "version": "0.8.4",
13
13
  "license": "MIT",
14
14
  "repository": {
15
15
  "directory": "packages/agents",
@@ -24,8 +24,10 @@
24
24
  "url": "https://github.com/cloudflare/agents/issues"
25
25
  },
26
26
  "dependencies": {
27
+ "@babel/plugin-proposal-decorators": "^7.29.0",
27
28
  "@cfworker/json-schema": "^4.1.1",
28
29
  "@modelcontextprotocol/sdk": "1.26.0",
30
+ "@rolldown/plugin-babel": "^0.2.2",
29
31
  "cron-schedule": "^6.0.0",
30
32
  "json-schema": "^0.4.0",
31
33
  "json-schema-to-typescript": "^15.0.4",
@@ -52,13 +54,14 @@
52
54
  "peerDependencies": {
53
55
  "@ai-sdk/openai": "^3.0.0",
54
56
  "@ai-sdk/react": "^3.0.0",
55
- "@cloudflare/ai-chat": "^0.2.4",
57
+ "@cloudflare/ai-chat": "^0.2.5",
56
58
  "@cloudflare/codemode": "^0.3.1",
57
59
  "@x402/core": "^2.0.0",
58
60
  "@x402/evm": "^2.0.0",
59
61
  "ai": "^6.0.0",
60
62
  "react": "^19.0.0",
61
63
  "viem": ">=2.0.0",
64
+ "vite": ">=6.0.0",
62
65
  "zod": "^4.0.0"
63
66
  },
64
67
  "peerDependenciesMeta": {
@@ -82,6 +85,9 @@
82
85
  },
83
86
  "viem": {
84
87
  "optional": true
88
+ },
89
+ "vite": {
90
+ "optional": true
85
91
  }
86
92
  },
87
93
  "types": "dist/index.d.ts",
@@ -180,6 +186,12 @@
180
186
  "types": "./dist/email.d.ts",
181
187
  "import": "./dist/email.js",
182
188
  "require": "./dist/email.js"
189
+ },
190
+ "./tsconfig": "./agents.tsconfig.json",
191
+ "./vite": {
192
+ "types": "./dist/vite.d.ts",
193
+ "import": "./dist/vite.js",
194
+ "require": "./dist/vite.js"
183
195
  }
184
196
  },
185
197
  "publishConfig": {
@@ -187,6 +199,7 @@
187
199
  },
188
200
  "files": [
189
201
  "dist",
202
+ "agents.tsconfig.json",
190
203
  "README.md"
191
204
  ],
192
205
  "nx": {