@copilotkit/runtime 1.5.16-next.1 → 1.5.16-next.2
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 +7 -0
- package/dist/{chunk-X4UE3Q5F.mjs → chunk-ISPCKW3E.mjs} +2 -2
- package/dist/{chunk-PPSNRM2D.mjs → chunk-TBPOHFA4.mjs} +2 -2
- package/dist/{chunk-DLC2JHVP.mjs → chunk-U5OA7VEB.mjs} +19 -11
- package/dist/chunk-U5OA7VEB.mjs.map +1 -0
- package/dist/{chunk-M7UBXBRI.mjs → chunk-UHUC2NVB.mjs} +2 -2
- package/dist/index.js +18 -10
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +4 -4
- package/dist/lib/index.js +18 -10
- package/dist/lib/index.js.map +1 -1
- package/dist/lib/index.mjs +4 -4
- package/dist/lib/integrations/index.js +5 -5
- package/dist/lib/integrations/index.js.map +1 -1
- package/dist/lib/integrations/index.mjs +4 -4
- package/dist/lib/integrations/nest/index.js +5 -5
- package/dist/lib/integrations/nest/index.js.map +1 -1
- package/dist/lib/integrations/nest/index.mjs +2 -2
- package/dist/lib/integrations/node-express/index.js +5 -5
- package/dist/lib/integrations/node-express/index.js.map +1 -1
- package/dist/lib/integrations/node-express/index.mjs +2 -2
- package/dist/lib/integrations/node-http/index.js +5 -5
- package/dist/lib/integrations/node-http/index.js.map +1 -1
- package/dist/lib/integrations/node-http/index.mjs +1 -1
- package/package.json +5 -5
- package/src/graphql/resolvers/copilot.resolver.ts +1 -4
- package/src/lib/runtime/remote-lg-action.ts +13 -3
- package/dist/chunk-DLC2JHVP.mjs.map +0 -1
- /package/dist/{chunk-X4UE3Q5F.mjs.map → chunk-ISPCKW3E.mjs.map} +0 -0
- /package/dist/{chunk-PPSNRM2D.mjs.map → chunk-TBPOHFA4.mjs.map} +0 -0
- /package/dist/{chunk-M7UBXBRI.mjs.map → chunk-UHUC2NVB.mjs.map} +0 -0
package/package.json
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
"publishConfig": {
|
|
10
10
|
"access": "public"
|
|
11
11
|
},
|
|
12
|
-
"version": "1.5.16-next.
|
|
12
|
+
"version": "1.5.16-next.2",
|
|
13
13
|
"sideEffects": false,
|
|
14
14
|
"main": "./dist/index.js",
|
|
15
15
|
"module": "./dist/index.mjs",
|
|
@@ -38,11 +38,11 @@
|
|
|
38
38
|
"dependencies": {
|
|
39
39
|
"@anthropic-ai/sdk": "^0.27.3",
|
|
40
40
|
"@graphql-yoga/plugin-defer-stream": "^3.3.1",
|
|
41
|
-
"@langchain/community": "^0.
|
|
42
|
-
"@langchain/core": "^0.3.
|
|
41
|
+
"@langchain/community": "^0.3.29",
|
|
42
|
+
"@langchain/core": "^0.3.38",
|
|
43
43
|
"@langchain/google-gauth": "^0.1.0",
|
|
44
44
|
"@langchain/langgraph-sdk": "^0.0.36",
|
|
45
|
-
"@langchain/openai": "^0.
|
|
45
|
+
"@langchain/openai": "^0.4.2",
|
|
46
46
|
"class-transformer": "^0.5.1",
|
|
47
47
|
"express": "^4.19.2",
|
|
48
48
|
"graphql": "^16.8.1",
|
|
@@ -58,7 +58,7 @@
|
|
|
58
58
|
"rxjs": "^7.8.1",
|
|
59
59
|
"type-graphql": "2.0.0-rc.1",
|
|
60
60
|
"zod": "^3.23.3",
|
|
61
|
-
"@copilotkit/shared": "1.5.16-next.
|
|
61
|
+
"@copilotkit/shared": "1.5.16-next.2"
|
|
62
62
|
},
|
|
63
63
|
"keywords": [
|
|
64
64
|
"copilotkit",
|
|
@@ -274,10 +274,7 @@ export class CopilotResolver {
|
|
|
274
274
|
type: event.type,
|
|
275
275
|
name: event.name,
|
|
276
276
|
data: {
|
|
277
|
-
value:
|
|
278
|
-
typeof event.data.value === "string"
|
|
279
|
-
? event.data.value
|
|
280
|
-
: JSON.stringify(event.data.value),
|
|
277
|
+
value: event.data.value,
|
|
281
278
|
messages: event.data.messages.map((message) => {
|
|
282
279
|
if (
|
|
283
280
|
message.type === "TextMessage" ||
|
|
@@ -161,7 +161,13 @@ async function streamEvents(controller: ReadableStreamDefaultController, args: E
|
|
|
161
161
|
payload.command = { resume: formattedMessages[formattedMessages.length - 1] };
|
|
162
162
|
}
|
|
163
163
|
if (lgInterruptMetaEvent?.response) {
|
|
164
|
-
|
|
164
|
+
let response = lgInterruptMetaEvent.response;
|
|
165
|
+
try {
|
|
166
|
+
payload.command = { resume: JSON.parse(response) };
|
|
167
|
+
// In case of unparsable string, we keep the event as is
|
|
168
|
+
} catch (e) {
|
|
169
|
+
payload.command = { resume: response };
|
|
170
|
+
}
|
|
165
171
|
}
|
|
166
172
|
|
|
167
173
|
if (mode === "continue" && !activeInterruptEvent) {
|
|
@@ -234,11 +240,12 @@ async function streamEvents(controller: ReadableStreamDefaultController, args: E
|
|
|
234
240
|
typeof interruptValue != "string" &&
|
|
235
241
|
"__copilotkit_interrupt_value__" in interruptValue
|
|
236
242
|
) {
|
|
243
|
+
const evValue = interruptValue.__copilotkit_interrupt_value__;
|
|
237
244
|
emit(
|
|
238
245
|
JSON.stringify({
|
|
239
246
|
event: LangGraphEventTypes.OnCopilotKitInterrupt,
|
|
240
247
|
data: {
|
|
241
|
-
value:
|
|
248
|
+
value: typeof evValue === "string" ? evValue : JSON.stringify(evValue),
|
|
242
249
|
messages: langchainMessagesToCopilotKit(interruptValue.__copilotkit_messages__),
|
|
243
250
|
},
|
|
244
251
|
}) + "\n",
|
|
@@ -247,7 +254,10 @@ async function streamEvents(controller: ReadableStreamDefaultController, args: E
|
|
|
247
254
|
emit(
|
|
248
255
|
JSON.stringify({
|
|
249
256
|
event: LangGraphEventTypes.OnInterrupt,
|
|
250
|
-
value:
|
|
257
|
+
value:
|
|
258
|
+
typeof interruptValue === "string"
|
|
259
|
+
? interruptValue
|
|
260
|
+
: JSON.stringify(interruptValue),
|
|
251
261
|
}) + "\n",
|
|
252
262
|
);
|
|
253
263
|
}
|