@cloudflare/ai-chat 0.1.5 → 0.1.6

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.
Files changed (67) hide show
  1. package/dist/experimental/forever.d.ts +4 -13
  2. package/dist/experimental/forever.js +1 -46
  3. package/dist/experimental/forever.js.map +1 -1
  4. package/dist/index.d.ts +59 -4
  5. package/dist/index.js +170 -28
  6. package/dist/index.js.map +1 -1
  7. package/dist/{message-builder-Bwc_Umye.js → message-builder-uSvexDl2.js} +17 -4
  8. package/dist/message-builder-uSvexDl2.js.map +1 -0
  9. package/dist/react.js +96 -10
  10. package/dist/react.js.map +1 -1
  11. package/dist/{resumable-stream-DqXxQVjf.d.ts → resumable-stream-DTLAk9XC.d.ts} +25 -2
  12. package/dist/types.d.ts +2 -1
  13. package/dist/types.js.map +1 -1
  14. package/package.json +7 -3
  15. package/CHANGELOG.md +0 -251
  16. package/dist/message-builder-Bwc_Umye.js.map +0 -1
  17. package/e2e/chat.spec.ts +0 -1703
  18. package/e2e/client-tools.spec.ts +0 -504
  19. package/e2e/llm.spec.ts +0 -637
  20. package/e2e/playwright.config.ts +0 -27
  21. package/e2e/worker.ts +0 -174
  22. package/e2e/wrangler.jsonc +0 -23
  23. package/scripts/build.ts +0 -32
  24. package/src/ai-chat-v5-migration.ts +0 -403
  25. package/src/experimental/forever.ts +0 -66
  26. package/src/index.ts +0 -2269
  27. package/src/message-builder.ts +0 -384
  28. package/src/react-tests/setup.ts +0 -3
  29. package/src/react-tests/use-agent-chat.test.tsx +0 -1435
  30. package/src/react-tests/vitest.config.ts +0 -20
  31. package/src/react.tsx +0 -1447
  32. package/src/resumable-stream.ts +0 -441
  33. package/src/tests/cancel-request.test.ts +0 -280
  34. package/src/tests/chat-context.test.ts +0 -85
  35. package/src/tests/chat-persistence.test.ts +0 -426
  36. package/src/tests/clear-history.test.ts +0 -132
  37. package/src/tests/client-tool-duplicate-message.test.ts +0 -1957
  38. package/src/tests/client-tools-broadcast.test.ts +0 -138
  39. package/src/tests/client-tools-continuation.test.ts +0 -314
  40. package/src/tests/client-tools-reconnect.test.ts +0 -143
  41. package/src/tests/cloudflare-test.d.ts +0 -5
  42. package/src/tests/custom-body-continuation.test.ts +0 -309
  43. package/src/tests/custom-body.test.ts +0 -186
  44. package/src/tests/destroy.test.ts +0 -57
  45. package/src/tests/get-messages-endpoint.test.ts +0 -153
  46. package/src/tests/max-persisted-messages.test.ts +0 -201
  47. package/src/tests/merge-server-state.test.ts +0 -343
  48. package/src/tests/message-builder.test.ts +0 -808
  49. package/src/tests/migration.test.ts +0 -282
  50. package/src/tests/non-sse-response.test.ts +0 -186
  51. package/src/tests/onfinish-cleanup.test.ts +0 -362
  52. package/src/tests/plaintext-response.test.ts +0 -87
  53. package/src/tests/request-id.test.ts +0 -312
  54. package/src/tests/resumable-streaming.test.ts +0 -758
  55. package/src/tests/row-size-guard.test.ts +0 -374
  56. package/src/tests/sanitize-messages.test.ts +0 -325
  57. package/src/tests/test-utils.ts +0 -39
  58. package/src/tests/tsconfig.json +0 -10
  59. package/src/tests/validate-messages.test.ts +0 -269
  60. package/src/tests/vitest.config.ts +0 -30
  61. package/src/tests/worker.ts +0 -456
  62. package/src/tests/wrangler.jsonc +0 -50
  63. package/src/tests/ws-transport-abort.test.ts +0 -198
  64. package/src/types.ts +0 -152
  65. package/src/ws-chat-transport.ts +0 -227
  66. package/tsconfig.json +0 -4
  67. package/vitest.config.ts +0 -7
@@ -1,138 +0,0 @@
1
- import { describe, it, expect } from "vitest";
2
- import { MessageType } from "../types";
3
- import type { UIMessage as ChatMessage } from "ai";
4
- import { connectChatWS } from "./test-utils";
5
-
6
- describe("Client Tools Broadcast", () => {
7
- it("should not broadcast CF_AGENT_CHAT_MESSAGES back to the originating connection after chat request", async () => {
8
- const room = crypto.randomUUID();
9
- const { ws } = await connectChatWS(`/agents/test-chat-agent/${room}`);
10
-
11
- const receivedMessages: Array<{ type: string; [key: string]: unknown }> =
12
- [];
13
- let resolvePromise: (value: boolean) => void;
14
- const donePromise = new Promise<boolean>((res) => {
15
- resolvePromise = res;
16
- });
17
-
18
- const timeout = setTimeout(() => resolvePromise(false), 2000);
19
-
20
- ws.addEventListener("message", (e: MessageEvent) => {
21
- const data = JSON.parse(e.data as string);
22
- receivedMessages.push(data);
23
-
24
- // Wait for the response to complete
25
- if (data.type === MessageType.CF_AGENT_USE_CHAT_RESPONSE && data.done) {
26
- // Give a small delay to catch any broadcast that might follow
27
- setTimeout(() => {
28
- clearTimeout(timeout);
29
- resolvePromise(true);
30
- }, 100);
31
- }
32
- });
33
-
34
- const userMessage: ChatMessage = {
35
- id: "msg1",
36
- role: "user",
37
- parts: [{ type: "text", text: "Hello" }]
38
- };
39
-
40
- // Send chat request from the client
41
- ws.send(
42
- JSON.stringify({
43
- type: MessageType.CF_AGENT_USE_CHAT_REQUEST,
44
- id: "req1",
45
- init: {
46
- method: "POST",
47
- body: JSON.stringify({ messages: [userMessage] })
48
- }
49
- })
50
- );
51
-
52
- const done = await donePromise;
53
- expect(done).toBe(true);
54
-
55
- // The originating connection should NOT receive CF_AGENT_CHAT_MESSAGES
56
- // It should only receive CF_AGENT_USE_CHAT_RESPONSE messages
57
- const chatMessagesReceived = receivedMessages.filter(
58
- (m) => m.type === MessageType.CF_AGENT_CHAT_MESSAGES
59
- );
60
-
61
- // This is the bug: the originating connection receives CF_AGENT_CHAT_MESSAGES
62
- // which causes duplicate messages when combined with the stream response
63
- expect(chatMessagesReceived.length).toBe(0);
64
-
65
- ws.close(1000);
66
- });
67
-
68
- it("should broadcast CF_AGENT_CHAT_MESSAGES to other connections but not the originator", async () => {
69
- const room = crypto.randomUUID();
70
-
71
- // Connect two clients to the same room
72
- const { ws: ws1 } = await connectChatWS(`/agents/test-chat-agent/${room}`);
73
- const { ws: ws2 } = await connectChatWS(`/agents/test-chat-agent/${room}`);
74
-
75
- const ws1Messages: Array<{ type: string; [key: string]: unknown }> = [];
76
- const ws2Messages: Array<{ type: string; [key: string]: unknown }> = [];
77
-
78
- let resolvePromise: (value: boolean) => void;
79
- const donePromise = new Promise<boolean>((res) => {
80
- resolvePromise = res;
81
- });
82
-
83
- const timeout = setTimeout(() => resolvePromise(false), 2000);
84
-
85
- ws1.addEventListener("message", (e: MessageEvent) => {
86
- const data = JSON.parse(e.data as string);
87
- ws1Messages.push(data);
88
-
89
- if (data.type === MessageType.CF_AGENT_USE_CHAT_RESPONSE && data.done) {
90
- setTimeout(() => {
91
- clearTimeout(timeout);
92
- resolvePromise(true);
93
- }, 100);
94
- }
95
- });
96
-
97
- ws2.addEventListener("message", (e: MessageEvent) => {
98
- const data = JSON.parse(e.data as string);
99
- ws2Messages.push(data);
100
- });
101
-
102
- const userMessage: ChatMessage = {
103
- id: "msg1",
104
- role: "user",
105
- parts: [{ type: "text", text: "Hello" }]
106
- };
107
-
108
- // WS1 sends the chat request
109
- ws1.send(
110
- JSON.stringify({
111
- type: MessageType.CF_AGENT_USE_CHAT_REQUEST,
112
- id: "req1",
113
- init: {
114
- method: "POST",
115
- body: JSON.stringify({ messages: [userMessage] })
116
- }
117
- })
118
- );
119
-
120
- const done = await donePromise;
121
- expect(done).toBe(true);
122
-
123
- // WS1 (originator) should NOT receive CF_AGENT_CHAT_MESSAGES
124
- const ws1ChatMessages = ws1Messages.filter(
125
- (m) => m.type === MessageType.CF_AGENT_CHAT_MESSAGES
126
- );
127
- expect(ws1ChatMessages.length).toBe(0);
128
-
129
- // WS2 (other connection) SHOULD receive CF_AGENT_CHAT_MESSAGES
130
- const ws2ChatMessages = ws2Messages.filter(
131
- (m) => m.type === MessageType.CF_AGENT_CHAT_MESSAGES
132
- );
133
- expect(ws2ChatMessages.length).toBeGreaterThan(0);
134
-
135
- ws1.close();
136
- ws2.close(1000);
137
- });
138
- });
@@ -1,314 +0,0 @@
1
- import { env } from "cloudflare:test";
2
- import { describe, it, expect } from "vitest";
3
- import { MessageType } from "../types";
4
- import type { UIMessage as ChatMessage } from "ai";
5
- import { connectChatWS } from "./test-utils";
6
- import { getAgentByName } from "agents";
7
-
8
- describe("Client tools continuation", () => {
9
- it("should pass client tools to onChatMessage during auto-continuation", async () => {
10
- const room = crypto.randomUUID();
11
- const { ws } = await connectChatWS(`/agents/test-chat-agent/${room}`);
12
-
13
- const agentStub = await getAgentByName(env.TestChatAgent, room);
14
- await agentStub.clearCapturedContext();
15
-
16
- // Step 1: Send initial chat request WITH client tools to store them
17
- let resolvePromise: (value: boolean) => void;
18
- let donePromise = new Promise<boolean>((res) => {
19
- resolvePromise = res;
20
- });
21
-
22
- let timeout = setTimeout(() => resolvePromise(false), 2000);
23
-
24
- ws.addEventListener("message", function handler(e: MessageEvent) {
25
- const data = JSON.parse(e.data as string);
26
- if (data.type === MessageType.CF_AGENT_USE_CHAT_RESPONSE && data.done) {
27
- clearTimeout(timeout);
28
- resolvePromise(true);
29
- ws.removeEventListener("message", handler);
30
- }
31
- });
32
-
33
- const userMessage: ChatMessage = {
34
- id: "msg1",
35
- role: "user",
36
- parts: [{ type: "text", text: "Hello" }]
37
- };
38
-
39
- const clientTools = [
40
- {
41
- name: "changeBackgroundColor",
42
- description: "Changes the background color",
43
- parameters: {
44
- type: "object",
45
- properties: { color: { type: "string" } }
46
- }
47
- },
48
- {
49
- name: "changeTextColor",
50
- description: "Changes the text color",
51
- parameters: {
52
- type: "object",
53
- properties: { color: { type: "string" } }
54
- }
55
- }
56
- ];
57
-
58
- ws.send(
59
- JSON.stringify({
60
- type: MessageType.CF_AGENT_USE_CHAT_REQUEST,
61
- id: "req1",
62
- init: {
63
- method: "POST",
64
- body: JSON.stringify({ messages: [userMessage], clientTools })
65
- }
66
- })
67
- );
68
-
69
- let done = await donePromise;
70
- expect(done).toBe(true);
71
-
72
- // Verify initial request received client tools
73
- await new Promise((resolve) => setTimeout(resolve, 100));
74
- const initialClientTools = await agentStub.getCapturedClientTools();
75
- expect(initialClientTools).toBeDefined();
76
- expect(initialClientTools).toHaveLength(2);
77
-
78
- // Step 2: Persist a tool call in input-available state
79
- const toolCallId = "call_continuation_test";
80
- await agentStub.persistMessages([
81
- userMessage,
82
- {
83
- id: "assistant-1",
84
- role: "assistant",
85
- parts: [
86
- {
87
- type: "tool-changeBackgroundColor",
88
- toolCallId,
89
- state: "input-available",
90
- input: { color: "green" }
91
- }
92
- ] as ChatMessage["parts"]
93
- }
94
- ]);
95
-
96
- // Step 3: Clear captured state before continuation
97
- await agentStub.clearCapturedContext();
98
-
99
- // Step 4: Send tool result with autoContinue to trigger continuation
100
- ws.send(
101
- JSON.stringify({
102
- type: "cf_agent_tool_result",
103
- toolCallId,
104
- toolName: "changeBackgroundColor",
105
- output: { success: true },
106
- autoContinue: true
107
- })
108
- );
109
-
110
- // Wait for continuation (500ms stream wait + processing)
111
- await new Promise((resolve) => setTimeout(resolve, 1000));
112
-
113
- // Step 5: Verify continuation received client tools
114
- const continuationClientTools = await agentStub.getCapturedClientTools();
115
- expect(continuationClientTools).toBeDefined();
116
- expect(continuationClientTools).toHaveLength(2);
117
- expect(continuationClientTools).toEqual(clientTools);
118
-
119
- ws.close(1000);
120
- });
121
-
122
- it("should clear stored client tools when chat is cleared", async () => {
123
- const room = crypto.randomUUID();
124
- const { ws } = await connectChatWS(`/agents/test-chat-agent/${room}`);
125
-
126
- const agentStub = await getAgentByName(env.TestChatAgent, room);
127
-
128
- // Send initial request with client tools to store them
129
- let resolvePromise: (value: boolean) => void;
130
- const donePromise = new Promise<boolean>((res) => {
131
- resolvePromise = res;
132
- });
133
-
134
- const timeout = setTimeout(() => resolvePromise(false), 2000);
135
-
136
- ws.addEventListener("message", function handler(e: MessageEvent) {
137
- const data = JSON.parse(e.data as string);
138
- if (data.type === MessageType.CF_AGENT_USE_CHAT_RESPONSE && data.done) {
139
- clearTimeout(timeout);
140
- resolvePromise(true);
141
- ws.removeEventListener("message", handler);
142
- }
143
- });
144
-
145
- ws.send(
146
- JSON.stringify({
147
- type: MessageType.CF_AGENT_USE_CHAT_REQUEST,
148
- id: "req1",
149
- init: {
150
- method: "POST",
151
- body: JSON.stringify({
152
- messages: [
153
- {
154
- id: "msg1",
155
- role: "user",
156
- parts: [{ type: "text", text: "Hi" }]
157
- }
158
- ],
159
- clientTools: [{ name: "testTool", description: "Test" }]
160
- })
161
- }
162
- })
163
- );
164
-
165
- const done = await donePromise;
166
- expect(done).toBe(true);
167
-
168
- // Clear chat
169
- ws.send(JSON.stringify({ type: MessageType.CF_AGENT_CHAT_CLEAR }));
170
- await new Promise((resolve) => setTimeout(resolve, 200));
171
-
172
- // Persist a tool call and trigger continuation
173
- await agentStub.persistMessages([
174
- {
175
- id: "user-1",
176
- role: "user",
177
- parts: [{ type: "text", text: "Execute tool" }]
178
- },
179
- {
180
- id: "assistant-1",
181
- role: "assistant",
182
- parts: [
183
- {
184
- type: "tool-testTool",
185
- toolCallId: "call_after_clear",
186
- state: "input-available",
187
- input: {}
188
- }
189
- ] as ChatMessage["parts"]
190
- }
191
- ]);
192
-
193
- await agentStub.clearCapturedContext();
194
-
195
- ws.send(
196
- JSON.stringify({
197
- type: "cf_agent_tool_result",
198
- toolCallId: "call_after_clear",
199
- toolName: "testTool",
200
- output: { success: true },
201
- autoContinue: true
202
- })
203
- );
204
-
205
- await new Promise((resolve) => setTimeout(resolve, 1000));
206
-
207
- // Client tools should be undefined after chat clear
208
- const continuationClientTools = await agentStub.getCapturedClientTools();
209
- expect(continuationClientTools).toBeUndefined();
210
-
211
- ws.close(1000);
212
- });
213
-
214
- it("should clear stored client tools when new request has no client tools", async () => {
215
- const room = crypto.randomUUID();
216
- const { ws } = await connectChatWS(`/agents/test-chat-agent/${room}`);
217
-
218
- const agentStub = await getAgentByName(env.TestChatAgent, room);
219
-
220
- // Send first request WITH client tools
221
- let resolvePromise: (value: boolean) => void;
222
- let donePromise = new Promise<boolean>((res) => {
223
- resolvePromise = res;
224
- });
225
- let timeout = setTimeout(() => resolvePromise(false), 2000);
226
-
227
- const handler1 = (e: MessageEvent) => {
228
- const data = JSON.parse(e.data as string);
229
- if (data.type === MessageType.CF_AGENT_USE_CHAT_RESPONSE && data.done) {
230
- clearTimeout(timeout);
231
- resolvePromise(true);
232
- }
233
- };
234
- ws.addEventListener("message", handler1);
235
-
236
- ws.send(
237
- JSON.stringify({
238
- type: MessageType.CF_AGENT_USE_CHAT_REQUEST,
239
- id: "req1",
240
- init: {
241
- method: "POST",
242
- body: JSON.stringify({
243
- messages: [
244
- {
245
- id: "msg1",
246
- role: "user",
247
- parts: [{ type: "text", text: "Hi" }]
248
- }
249
- ],
250
- clientTools: [{ name: "testTool", description: "Test" }]
251
- })
252
- }
253
- })
254
- );
255
-
256
- let done = await donePromise;
257
- expect(done).toBe(true);
258
- ws.removeEventListener("message", handler1);
259
-
260
- await new Promise((resolve) => setTimeout(resolve, 100));
261
- let capturedTools = await agentStub.getCapturedClientTools();
262
- expect(capturedTools).toHaveLength(1);
263
-
264
- // Send second request WITHOUT client tools
265
- donePromise = new Promise<boolean>((res) => {
266
- resolvePromise = res;
267
- });
268
- timeout = setTimeout(() => resolvePromise(false), 2000);
269
-
270
- const handler2 = (e: MessageEvent) => {
271
- const data = JSON.parse(e.data as string);
272
- if (data.type === MessageType.CF_AGENT_USE_CHAT_RESPONSE && data.done) {
273
- clearTimeout(timeout);
274
- resolvePromise(true);
275
- }
276
- };
277
- ws.addEventListener("message", handler2);
278
-
279
- ws.send(
280
- JSON.stringify({
281
- type: MessageType.CF_AGENT_USE_CHAT_REQUEST,
282
- id: "req2",
283
- init: {
284
- method: "POST",
285
- body: JSON.stringify({
286
- messages: [
287
- {
288
- id: "msg1",
289
- role: "user",
290
- parts: [{ type: "text", text: "Hi" }]
291
- },
292
- {
293
- id: "msg2",
294
- role: "user",
295
- parts: [{ type: "text", text: "Again" }]
296
- }
297
- ]
298
- // No clientTools
299
- })
300
- }
301
- })
302
- );
303
-
304
- done = await donePromise;
305
- expect(done).toBe(true);
306
- ws.removeEventListener("message", handler2);
307
-
308
- await new Promise((resolve) => setTimeout(resolve, 100));
309
- capturedTools = await agentStub.getCapturedClientTools();
310
- expect(capturedTools).toBeUndefined();
311
-
312
- ws.close(1000);
313
- });
314
- });
@@ -1,143 +0,0 @@
1
- import { env } from "cloudflare:test";
2
- import { describe, it, expect } from "vitest";
3
- import { MessageType } from "../types";
4
- import type { UIMessage as ChatMessage } from "ai";
5
- import { connectChatWS } from "./test-utils";
6
- import { getAgentByName } from "agents";
7
-
8
- describe("Client tools after reconnect", () => {
9
- it("should use client tools from CF_AGENT_TOOL_RESULT for continuation", async () => {
10
- const room = crypto.randomUUID();
11
-
12
- // Step 1: Set up a conversation with a pending tool call (simulates state before refresh)
13
- const agentStub = await getAgentByName(env.TestChatAgent, room);
14
-
15
- const userMessage: ChatMessage = {
16
- id: "msg1",
17
- role: "user",
18
- parts: [{ type: "text", text: "Change the background" }]
19
- };
20
-
21
- const toolCallId = "call_reconnect_test";
22
- const assistantMessage: ChatMessage = {
23
- id: "assistant-1",
24
- role: "assistant",
25
- parts: [
26
- {
27
- type: "tool-changeBackgroundColor",
28
- toolCallId,
29
- state: "input-available",
30
- input: { color: "blue" }
31
- }
32
- ] as ChatMessage["parts"]
33
- };
34
-
35
- // Persist messages directly (simulates state loaded from SQLite after DO restart)
36
- await agentStub.persistMessages([userMessage, assistantMessage]);
37
-
38
- // Step 2: Connect (simulates reconnect after refresh)
39
- // Note: We intentionally do NOT send a CF_AGENT_USE_CHAT_REQUEST first,
40
- // so _lastClientTools is never set — this simulates DO restart.
41
- const { ws } = await connectChatWS(`/agents/test-chat-agent/${room}`);
42
-
43
- // Wait for connection to be established
44
- await new Promise((resolve) => setTimeout(resolve, 200));
45
-
46
- // Clear any captured context from connection setup
47
- await agentStub.clearCapturedContext();
48
-
49
- // Step 3: Send tool result WITH clientTools (simulates client approval after reconnect)
50
- const clientTools = [
51
- {
52
- name: "changeBackgroundColor",
53
- description: "Changes the background color",
54
- parameters: {
55
- type: "object",
56
- properties: { color: { type: "string" } }
57
- }
58
- },
59
- {
60
- name: "changeTextColor",
61
- description: "Changes the text color",
62
- parameters: {
63
- type: "object",
64
- properties: { color: { type: "string" } }
65
- }
66
- }
67
- ];
68
-
69
- ws.send(
70
- JSON.stringify({
71
- type: MessageType.CF_AGENT_TOOL_RESULT,
72
- toolCallId,
73
- toolName: "changeBackgroundColor",
74
- output: { success: true },
75
- autoContinue: true,
76
- clientTools
77
- })
78
- );
79
-
80
- // Wait for tool result to be applied + 500ms stream wait + continuation
81
- await new Promise((resolve) => setTimeout(resolve, 1500));
82
-
83
- // Step 4: Verify continuation received client tools
84
- const capturedClientTools = await agentStub.getCapturedClientTools();
85
- expect(capturedClientTools).toBeDefined();
86
- expect(capturedClientTools).toHaveLength(2);
87
- expect(capturedClientTools![0].name).toBe("changeBackgroundColor");
88
- expect(capturedClientTools![1].name).toBe("changeTextColor");
89
-
90
- ws.close(1000);
91
- });
92
-
93
- it("should work without clientTools in CF_AGENT_TOOL_RESULT (backwards compat)", async () => {
94
- const room = crypto.randomUUID();
95
-
96
- const agentStub = await getAgentByName(env.TestChatAgent, room);
97
-
98
- // Persist a conversation with a pending tool call
99
- await agentStub.persistMessages([
100
- {
101
- id: "msg1",
102
- role: "user",
103
- parts: [{ type: "text", text: "Do something" }]
104
- },
105
- {
106
- id: "assistant-1",
107
- role: "assistant",
108
- parts: [
109
- {
110
- type: "tool-testTool",
111
- toolCallId: "call_compat_test",
112
- state: "input-available",
113
- input: {}
114
- }
115
- ] as ChatMessage["parts"]
116
- }
117
- ]);
118
-
119
- const { ws } = await connectChatWS(`/agents/test-chat-agent/${room}`);
120
- await new Promise((resolve) => setTimeout(resolve, 200));
121
- await agentStub.clearCapturedContext();
122
-
123
- // Send tool result WITHOUT clientTools (old client behavior)
124
- ws.send(
125
- JSON.stringify({
126
- type: MessageType.CF_AGENT_TOOL_RESULT,
127
- toolCallId: "call_compat_test",
128
- toolName: "testTool",
129
- output: { success: true },
130
- autoContinue: true
131
- // No clientTools field
132
- })
133
- );
134
-
135
- await new Promise((resolve) => setTimeout(resolve, 1500));
136
-
137
- // Continuation should still fire, just without client tools
138
- const capturedClientTools = await agentStub.getCapturedClientTools();
139
- expect(capturedClientTools).toBeUndefined();
140
-
141
- ws.close(1000);
142
- });
143
- });
@@ -1,5 +0,0 @@
1
- import type { Env } from "./worker";
2
-
3
- declare module "cloudflare:test" {
4
- interface ProvidedEnv extends Env {}
5
- }