@copilotkit/runtime 1.55.0-next.8 → 1.55.0-next.9
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/CHANGELOG.md
CHANGED
package/dist/package.cjs
CHANGED
|
@@ -12,7 +12,7 @@ var require_package = /* @__PURE__ */ require_runtime.__commonJSMin(((exports, m
|
|
|
12
12
|
"url": "https://github.com/CopilotKit/CopilotKit.git"
|
|
13
13
|
},
|
|
14
14
|
"publishConfig": { "access": "public" },
|
|
15
|
-
"version": "1.55.0-next.
|
|
15
|
+
"version": "1.55.0-next.9",
|
|
16
16
|
"sideEffects": [
|
|
17
17
|
"./dist/index.mjs",
|
|
18
18
|
"./dist/index.cjs",
|
package/dist/package.mjs
CHANGED
|
@@ -12,7 +12,7 @@ var require_package = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
12
12
|
"url": "https://github.com/CopilotKit/CopilotKit.git"
|
|
13
13
|
},
|
|
14
14
|
"publishConfig": { "access": "public" },
|
|
15
|
-
"version": "1.55.0-next.
|
|
15
|
+
"version": "1.55.0-next.9",
|
|
16
16
|
"sideEffects": [
|
|
17
17
|
"./dist/index.mjs",
|
|
18
18
|
"./dist/index.cjs",
|
package/package.json
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
"publishConfig": {
|
|
10
10
|
"access": "public"
|
|
11
11
|
},
|
|
12
|
-
"version": "1.55.0-next.
|
|
12
|
+
"version": "1.55.0-next.9",
|
|
13
13
|
"sideEffects": [
|
|
14
14
|
"./dist/index.mjs",
|
|
15
15
|
"./dist/index.cjs",
|
|
@@ -91,7 +91,7 @@
|
|
|
91
91
|
"type-graphql": "2.0.0-rc.1",
|
|
92
92
|
"ws": "^8.18.0",
|
|
93
93
|
"zod": "^3.23.3",
|
|
94
|
-
"@copilotkit/shared": "1.55.0-next.
|
|
94
|
+
"@copilotkit/shared": "1.55.0-next.9"
|
|
95
95
|
},
|
|
96
96
|
"peerDependencies": {
|
|
97
97
|
"@anthropic-ai/sdk": "^0.57.0",
|
|
@@ -48,15 +48,15 @@ describe("CopilotEndpointExpress middleware", () => {
|
|
|
48
48
|
path: "/info",
|
|
49
49
|
});
|
|
50
50
|
|
|
51
|
-
await
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
);
|
|
51
|
+
await vi.waitFor(() => {
|
|
52
|
+
expect(after).toHaveBeenCalledWith(
|
|
53
|
+
expect.objectContaining({
|
|
54
|
+
runtime,
|
|
55
|
+
response: expect.any(Response),
|
|
56
|
+
path: "/info",
|
|
57
|
+
}),
|
|
58
|
+
);
|
|
59
|
+
});
|
|
60
60
|
|
|
61
61
|
expect(response.status).toBe(200);
|
|
62
62
|
expect(response.body).toHaveProperty("version");
|
|
@@ -142,8 +142,9 @@ describe("CopilotEndpointExpress middleware", () => {
|
|
|
142
142
|
|
|
143
143
|
expect(response.status).toBe(500);
|
|
144
144
|
expect(logSpy).toHaveBeenCalled();
|
|
145
|
-
await
|
|
146
|
-
|
|
145
|
+
await vi.waitFor(() => {
|
|
146
|
+
expect(after).toHaveBeenCalled();
|
|
147
|
+
});
|
|
147
148
|
});
|
|
148
149
|
|
|
149
150
|
it("passes parsed messages to afterRequestMiddleware", async () => {
|
|
@@ -159,10 +160,11 @@ describe("CopilotEndpointExpress middleware", () => {
|
|
|
159
160
|
const app = buildApp(runtime);
|
|
160
161
|
const response = await request(app).get("/info");
|
|
161
162
|
|
|
162
|
-
await
|
|
163
|
+
await vi.waitFor(() => {
|
|
164
|
+
expect(after).toHaveBeenCalled();
|
|
165
|
+
});
|
|
163
166
|
|
|
164
167
|
expect(response.status).toBe(200);
|
|
165
|
-
expect(after).toHaveBeenCalled();
|
|
166
168
|
expect(receivedParams).toHaveProperty("messages");
|
|
167
169
|
expect(receivedParams.messages).toEqual([]);
|
|
168
170
|
});
|
|
@@ -184,15 +186,15 @@ describe("CopilotEndpointExpress middleware", () => {
|
|
|
184
186
|
|
|
185
187
|
expect(response.status).toBe(200);
|
|
186
188
|
|
|
187
|
-
await
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
);
|
|
189
|
+
await vi.waitFor(() => {
|
|
190
|
+
expect(after).toHaveBeenCalledWith(
|
|
191
|
+
expect.objectContaining({
|
|
192
|
+
runtime,
|
|
193
|
+
response: expect.any(Response),
|
|
194
|
+
path: "/info",
|
|
195
|
+
}),
|
|
196
|
+
);
|
|
197
|
+
});
|
|
196
198
|
|
|
197
199
|
expect(logSpy).toHaveBeenCalledWith(
|
|
198
200
|
expect.objectContaining({
|
|
@@ -52,15 +52,15 @@ describe("CopilotEndpointSingleRouteExpress middleware", () => {
|
|
|
52
52
|
path: "/rpc",
|
|
53
53
|
});
|
|
54
54
|
|
|
55
|
-
await
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
);
|
|
55
|
+
await vi.waitFor(() => {
|
|
56
|
+
expect(after).toHaveBeenCalledWith(
|
|
57
|
+
expect.objectContaining({
|
|
58
|
+
runtime,
|
|
59
|
+
response: expect.any(Response),
|
|
60
|
+
path: "/rpc",
|
|
61
|
+
}),
|
|
62
|
+
);
|
|
63
|
+
});
|
|
64
64
|
|
|
65
65
|
expect(response.status).toBe(200);
|
|
66
66
|
expect(response.body).toHaveProperty("version");
|
|
@@ -147,8 +147,9 @@ describe("CopilotEndpointSingleRouteExpress middleware", () => {
|
|
|
147
147
|
|
|
148
148
|
expect(response.status).toBe(500);
|
|
149
149
|
expect(logSpy).toHaveBeenCalled();
|
|
150
|
-
await
|
|
151
|
-
|
|
150
|
+
await vi.waitFor(() => {
|
|
151
|
+
expect(after).toHaveBeenCalled();
|
|
152
|
+
});
|
|
152
153
|
});
|
|
153
154
|
|
|
154
155
|
it("passes parsed messages to afterRequestMiddleware", async () => {
|
|
@@ -164,10 +165,11 @@ describe("CopilotEndpointSingleRouteExpress middleware", () => {
|
|
|
164
165
|
const app = buildApp(runtime);
|
|
165
166
|
const response = await rpcRequest(app, { method: "info" });
|
|
166
167
|
|
|
167
|
-
await
|
|
168
|
+
await vi.waitFor(() => {
|
|
169
|
+
expect(after).toHaveBeenCalled();
|
|
170
|
+
});
|
|
168
171
|
|
|
169
172
|
expect(response.status).toBe(200);
|
|
170
|
-
expect(after).toHaveBeenCalled();
|
|
171
173
|
expect(receivedParams).toHaveProperty("messages");
|
|
172
174
|
expect(receivedParams.messages).toEqual([]);
|
|
173
175
|
});
|
|
@@ -189,15 +191,15 @@ describe("CopilotEndpointSingleRouteExpress middleware", () => {
|
|
|
189
191
|
|
|
190
192
|
expect(response.status).toBe(200);
|
|
191
193
|
|
|
192
|
-
await
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
);
|
|
194
|
+
await vi.waitFor(() => {
|
|
195
|
+
expect(after).toHaveBeenCalledWith(
|
|
196
|
+
expect.objectContaining({
|
|
197
|
+
runtime,
|
|
198
|
+
response: expect.any(Response),
|
|
199
|
+
path: "/rpc",
|
|
200
|
+
}),
|
|
201
|
+
);
|
|
202
|
+
});
|
|
201
203
|
|
|
202
204
|
expect(logSpy).toHaveBeenCalledWith(
|
|
203
205
|
expect.objectContaining({
|