agents 0.0.0-d7a460e → 0.0.0-da2bb57
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 +5 -3
- package/dist/ai-chat-agent.d.ts +86 -13
- package/dist/ai-chat-agent.js +340 -74
- package/dist/ai-chat-agent.js.map +1 -1
- package/dist/{ai-chat-v5-migration-DBHGW4Hv.js → ai-chat-v5-migration-BSiGZmYU.js} +1 -1
- package/dist/{ai-chat-v5-migration-DBHGW4Hv.js.map → ai-chat-v5-migration-BSiGZmYU.js.map} +1 -1
- package/dist/ai-chat-v5-migration.js +1 -1
- package/dist/ai-react.d.ts +14 -9
- package/dist/ai-react.js +164 -29
- package/dist/ai-react.js.map +1 -1
- package/dist/{ai-types-D5YoPrBZ.d.ts → ai-types-81H_-Uxh.d.ts} +15 -7
- package/dist/{ai-types-B3aQaFv3.js → ai-types-CrMqkwc_.js} +5 -1
- package/dist/ai-types-CrMqkwc_.js.map +1 -0
- package/dist/ai-types.d.ts +1 -1
- 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-BfiZ3HQd.js → client-B3SR12TQ.js} +2 -2
- package/dist/{client-BfiZ3HQd.js.map → client-B3SR12TQ.js.map} +1 -1
- package/dist/{client-CbWe9FBd.d.ts → client-BAQA84dr.d.ts} +2 -2
- package/dist/client-BZq9qau2.js +1093 -0
- package/dist/client-BZq9qau2.js.map +1 -0
- package/dist/client-DJhQNTez.d.ts +1528 -0
- package/dist/client.d.ts +2 -2
- package/dist/client.js +2 -2
- package/dist/codemode/ai.js +5 -5
- package/dist/{do-oauth-client-provider-DGc5pP0l.d.ts → do-oauth-client-provider-C2CHH5x-.d.ts} +1 -1
- package/dist/{do-oauth-client-provider-CswoD5Lu.js → do-oauth-client-provider-CwqK5SXm.js} +2 -1
- package/dist/do-oauth-client-provider-CwqK5SXm.js.map +1 -0
- package/dist/{index-DhJCaDWd.d.ts → index-BUle9RiP.d.ts} +2 -2
- package/dist/{index-DFqsR7mb.d.ts → index-BvEldExU.d.ts} +53 -26
- package/dist/index.d.ts +6 -6
- package/dist/index.js +5 -5
- package/dist/mcp/client.d.ts +4 -4
- package/dist/mcp/client.js +2 -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 +75 -36
- package/dist/mcp/index.js +99 -21
- package/dist/mcp/index.js.map +1 -1
- package/dist/mcp/x402.js +10 -6
- package/dist/mcp/x402.js.map +1 -1
- package/dist/{mcp-Dw5vDrY8.d.ts → mcp-BwPscEiF.d.ts} +1 -1
- package/dist/observability/index.d.ts +2 -2
- package/dist/observability/index.js +5 -5
- package/dist/{react-NCPvtyCY.d.ts → react-Ccc1FohP.d.ts} +33 -35
- package/dist/react.d.ts +9 -9
- package/dist/react.js +2 -2
- package/dist/react.js.map +1 -1
- package/dist/{serializable-CymX8ovI.d.ts → serializable-faDkMCai.d.ts} +1 -1
- package/dist/serializable.d.ts +1 -1
- package/dist/{src-Dz0H9hSU.js → src-D_KKH_4c.js} +123 -139
- package/dist/src-D_KKH_4c.js.map +1 -0
- package/package.json +53 -38
- package/dist/ai-types-B3aQaFv3.js.map +0 -1
- package/dist/client-9Ld2_lnt.js +0 -786
- package/dist/client-9Ld2_lnt.js.map +0 -1
- package/dist/client-Csp_m13H.d.ts +0 -5315
- package/dist/do-oauth-client-provider-CswoD5Lu.js.map +0 -1
- package/dist/src-Dz0H9hSU.js.map +0 -1
package/package.json
CHANGED
|
@@ -1,31 +1,65 @@
|
|
|
1
1
|
{
|
|
2
|
+
"name": "agents",
|
|
3
|
+
"description": "A home for your AI agents",
|
|
4
|
+
"keywords": [
|
|
5
|
+
"cloudflare",
|
|
6
|
+
"agents",
|
|
7
|
+
"ai",
|
|
8
|
+
"llm",
|
|
9
|
+
"durable objects"
|
|
10
|
+
],
|
|
11
|
+
"type": "module",
|
|
12
|
+
"version": "0.0.0-da2bb57",
|
|
13
|
+
"license": "MIT",
|
|
14
|
+
"repository": {
|
|
15
|
+
"directory": "packages/agents",
|
|
16
|
+
"type": "git",
|
|
17
|
+
"url": "git+https://github.com/cloudflare/agents.git"
|
|
18
|
+
},
|
|
19
|
+
"bin": {
|
|
20
|
+
"agents": "dist/cli.js"
|
|
21
|
+
},
|
|
2
22
|
"author": "Cloudflare Inc.",
|
|
3
23
|
"bugs": {
|
|
4
24
|
"url": "https://github.com/cloudflare/agents/issues"
|
|
5
25
|
},
|
|
6
26
|
"dependencies": {
|
|
7
|
-
"@ai-sdk/openai": "2.0.
|
|
8
|
-
"@
|
|
9
|
-
"
|
|
10
|
-
"
|
|
27
|
+
"@ai-sdk/openai": "2.0.72",
|
|
28
|
+
"@cfworker/json-schema": "^4.1.1",
|
|
29
|
+
"@modelcontextprotocol/sdk": "^1.22.0",
|
|
30
|
+
"ai": "5.0.101",
|
|
31
|
+
"cron-schedule": "^6.0.0",
|
|
11
32
|
"json-schema": "^0.4.0",
|
|
12
33
|
"json-schema-to-typescript": "^15.0.4",
|
|
13
34
|
"mimetext": "^3.0.27",
|
|
14
35
|
"nanoid": "^5.1.6",
|
|
15
36
|
"partyserver": "^0.0.75",
|
|
16
37
|
"partysocket": "1.1.6",
|
|
38
|
+
"yargs": "^18.0.0",
|
|
17
39
|
"zod": "^3.25.76",
|
|
18
|
-
"zod-to-ts": "^
|
|
19
|
-
},
|
|
20
|
-
"publishConfig": {
|
|
21
|
-
"access": "public"
|
|
40
|
+
"zod-to-ts": "^2.0.0"
|
|
22
41
|
},
|
|
23
|
-
"description": "A home for your AI agents",
|
|
24
42
|
"devDependencies": {
|
|
25
|
-
"@cloudflare/workers-oauth-provider": "^0.0
|
|
43
|
+
"@cloudflare/workers-oauth-provider": "^0.1.0",
|
|
44
|
+
"@types/yargs": "^17.0.35",
|
|
45
|
+
"react": "*",
|
|
46
|
+
"vitest-browser-react": "^1.0.1",
|
|
47
|
+
"x402": "^0.7.3"
|
|
48
|
+
},
|
|
49
|
+
"peerDependencies": {
|
|
26
50
|
"react": "*",
|
|
27
|
-
"
|
|
51
|
+
"viem": ">=2.0.0",
|
|
52
|
+
"x402": "^0.7.1"
|
|
53
|
+
},
|
|
54
|
+
"peerDependenciesMeta": {
|
|
55
|
+
"x402": {
|
|
56
|
+
"optional": true
|
|
57
|
+
},
|
|
58
|
+
"viem": {
|
|
59
|
+
"optional": true
|
|
60
|
+
}
|
|
28
61
|
},
|
|
62
|
+
"types": "dist/index.d.ts",
|
|
29
63
|
"exports": {
|
|
30
64
|
".": {
|
|
31
65
|
"types": "./dist/index.d.ts",
|
|
@@ -98,43 +132,24 @@
|
|
|
98
132
|
"require": "./dist/mcp/x402.js"
|
|
99
133
|
}
|
|
100
134
|
},
|
|
135
|
+
"publishConfig": {
|
|
136
|
+
"access": "public"
|
|
137
|
+
},
|
|
101
138
|
"files": [
|
|
102
139
|
"dist",
|
|
103
140
|
"README.md"
|
|
104
141
|
],
|
|
105
|
-
"keywords": [],
|
|
106
|
-
"license": "MIT",
|
|
107
|
-
"name": "agents",
|
|
108
|
-
"peerDependencies": {
|
|
109
|
-
"react": "*",
|
|
110
|
-
"viem": ">=2.0.0",
|
|
111
|
-
"x402": "^0.6.5"
|
|
112
|
-
},
|
|
113
|
-
"peerDependenciesMeta": {
|
|
114
|
-
"x402": {
|
|
115
|
-
"optional": true
|
|
116
|
-
},
|
|
117
|
-
"viem": {
|
|
118
|
-
"optional": true
|
|
119
|
-
}
|
|
120
|
-
},
|
|
121
|
-
"repository": {
|
|
122
|
-
"directory": "packages/agents",
|
|
123
|
-
"type": "git",
|
|
124
|
-
"url": "git+https://github.com/cloudflare/agents.git"
|
|
125
|
-
},
|
|
126
142
|
"scripts": {
|
|
127
143
|
"build": "tsx ./scripts/build.ts",
|
|
128
|
-
"check:test": "npm run check:test:workers && npm run check:test:react",
|
|
144
|
+
"check:test": "npm run check:test:workers && npm run check:test:react && npm run check:test:cli",
|
|
145
|
+
"check:test:cli": "vitest -r src/cli-tests --watch false",
|
|
129
146
|
"check:test:react": "vitest -r src/react-tests --watch false",
|
|
130
147
|
"check:test:workers": "vitest -r src/tests --watch false",
|
|
131
148
|
"evals": "(cd evals; evalite)",
|
|
132
|
-
"test": "npm run test:workers && npm run test:react",
|
|
149
|
+
"test": "npm run test:workers && npm run test:react && npm run test:cli",
|
|
150
|
+
"test:cli": "vitest -r src/cli-tests",
|
|
133
151
|
"test:react": "vitest -r src/react-tests",
|
|
134
152
|
"test:e2e": "vitest run src/e2e/e2e.test.ts --sequence.concurrent",
|
|
135
153
|
"test:workers": "vitest -r src/tests"
|
|
136
|
-
}
|
|
137
|
-
"type": "module",
|
|
138
|
-
"types": "dist/index.d.ts",
|
|
139
|
-
"version": "0.0.0-d7a460e"
|
|
154
|
+
}
|
|
140
155
|
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ai-types-B3aQaFv3.js","names":[],"sources":["../src/ai-types.ts"],"sourcesContent":["import type { UIMessage } from \"ai\";\n\n/**\n * Enum for message types to improve type safety and maintainability\n */\nexport enum MessageType {\n CF_AGENT_CHAT_MESSAGES = \"cf_agent_chat_messages\",\n CF_AGENT_USE_CHAT_REQUEST = \"cf_agent_use_chat_request\",\n CF_AGENT_USE_CHAT_RESPONSE = \"cf_agent_use_chat_response\",\n CF_AGENT_CHAT_CLEAR = \"cf_agent_chat_clear\",\n CF_AGENT_CHAT_REQUEST_CANCEL = \"cf_agent_chat_request_cancel\",\n\n CF_AGENT_MCP_SERVERS = \"cf_agent_mcp_servers\",\n CF_MCP_AGENT_EVENT = \"cf_mcp_agent_event\",\n CF_AGENT_STATE = \"cf_agent_state\",\n RPC = \"rpc\"\n}\n\n/**\n * Types of messages sent from the Agent to clients\n */\nexport type OutgoingMessage<ChatMessage extends UIMessage = UIMessage> =\n | {\n /** Indicates this message is a command to clear chat history */\n type: MessageType.CF_AGENT_CHAT_CLEAR;\n }\n | {\n /** Indicates this message contains updated chat messages */\n type: MessageType.CF_AGENT_CHAT_MESSAGES;\n /** Array of chat messages */\n messages: ChatMessage[];\n }\n | {\n /** Indicates this message is a response to a chat request */\n type: MessageType.CF_AGENT_USE_CHAT_RESPONSE;\n /** Unique ID of the request this response corresponds to */\n id: string;\n /** Content body of the response */\n body: string;\n /** Whether this is the final chunk of the response */\n done: boolean;\n /** Whether this response contains an error */\n error?: boolean;\n }\n | {\n /** Indicates this message is a command to clear chat history */\n type: MessageType.CF_AGENT_CHAT_CLEAR;\n };\n\n/**\n * Types of messages sent from clients to the Agent\n */\nexport type IncomingMessage<ChatMessage extends UIMessage = UIMessage> =\n | {\n /** Indicates this message is a command to clear chat history */\n type: MessageType.CF_AGENT_CHAT_CLEAR;\n }\n | {\n /** Indicates this message is a request to the chat API */\n type: MessageType.CF_AGENT_USE_CHAT_REQUEST;\n /** Unique ID for this request */\n id: string;\n /** Request initialization options */\n init: Pick<\n RequestInit,\n | \"method\"\n | \"keepalive\"\n | \"headers\"\n | \"body\"\n | \"redirect\"\n | \"integrity\"\n | \"credentials\"\n | \"mode\"\n | \"referrer\"\n | \"referrerPolicy\"\n | \"window\"\n >;\n }\n | {\n /** Indicates this message is a command to clear chat history */\n type: MessageType.CF_AGENT_CHAT_CLEAR;\n }\n | {\n /** Indicates this message contains updated chat messages */\n type: MessageType.CF_AGENT_CHAT_MESSAGES;\n /** Array of chat messages */\n messages: ChatMessage[];\n }\n | {\n /** Indicates the user wants to stop generation of this message */\n type: MessageType.CF_AGENT_CHAT_REQUEST_CANCEL;\n id: string;\n };\n"],"mappings":";;;;AAKA,IAAY,sDAAL;AACL;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA"}
|