@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
|
@@ -2,7 +2,7 @@ import {
|
|
|
2
2
|
getCommonConfig,
|
|
3
3
|
getRuntimeInstanceTelemetryInfo,
|
|
4
4
|
telemetry_client_default
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-U5OA7VEB.mjs";
|
|
6
6
|
import {
|
|
7
7
|
__name
|
|
8
8
|
} from "./chunk-FHD4JECV.mjs";
|
|
@@ -77,4 +77,4 @@ export {
|
|
|
77
77
|
config,
|
|
78
78
|
copilotRuntimeNextJSPagesRouterEndpoint
|
|
79
79
|
};
|
|
80
|
-
//# sourceMappingURL=chunk-
|
|
80
|
+
//# sourceMappingURL=chunk-UHUC2NVB.mjs.map
|
package/dist/index.js
CHANGED
|
@@ -44,7 +44,7 @@ var require_package = __commonJS({
|
|
|
44
44
|
publishConfig: {
|
|
45
45
|
access: "public"
|
|
46
46
|
},
|
|
47
|
-
version: "1.5.16-next.
|
|
47
|
+
version: "1.5.16-next.2",
|
|
48
48
|
sideEffects: false,
|
|
49
49
|
main: "./dist/index.js",
|
|
50
50
|
module: "./dist/index.mjs",
|
|
@@ -84,11 +84,11 @@ var require_package = __commonJS({
|
|
|
84
84
|
"@anthropic-ai/sdk": "^0.27.3",
|
|
85
85
|
"@copilotkit/shared": "workspace:*",
|
|
86
86
|
"@graphql-yoga/plugin-defer-stream": "^3.3.1",
|
|
87
|
-
"@langchain/community": "^0.
|
|
88
|
-
"@langchain/core": "^0.3.
|
|
87
|
+
"@langchain/community": "^0.3.29",
|
|
88
|
+
"@langchain/core": "^0.3.38",
|
|
89
89
|
"@langchain/google-gauth": "^0.1.0",
|
|
90
90
|
"@langchain/langgraph-sdk": "^0.0.36",
|
|
91
|
-
"@langchain/openai": "^0.
|
|
91
|
+
"@langchain/openai": "^0.4.2",
|
|
92
92
|
"class-transformer": "^0.5.1",
|
|
93
93
|
express: "^4.19.2",
|
|
94
94
|
graphql: "^16.8.1",
|
|
@@ -2544,9 +2544,16 @@ async function streamEvents(controller, args) {
|
|
|
2544
2544
|
};
|
|
2545
2545
|
}
|
|
2546
2546
|
if (lgInterruptMetaEvent == null ? void 0 : lgInterruptMetaEvent.response) {
|
|
2547
|
-
|
|
2548
|
-
|
|
2549
|
-
|
|
2547
|
+
let response = lgInterruptMetaEvent.response;
|
|
2548
|
+
try {
|
|
2549
|
+
payload.command = {
|
|
2550
|
+
resume: JSON.parse(response)
|
|
2551
|
+
};
|
|
2552
|
+
} catch (e) {
|
|
2553
|
+
payload.command = {
|
|
2554
|
+
resume: response
|
|
2555
|
+
};
|
|
2556
|
+
}
|
|
2550
2557
|
}
|
|
2551
2558
|
if (mode === "continue" && !activeInterruptEvent) {
|
|
2552
2559
|
await client.threads.updateState(threadId, {
|
|
@@ -2606,17 +2613,18 @@ async function streamEvents(controller, args) {
|
|
|
2606
2613
|
activeInterruptEvent = true;
|
|
2607
2614
|
const interruptValue = interruptEvents == null ? void 0 : interruptEvents[0].value;
|
|
2608
2615
|
if (typeof interruptValue != "string" && "__copilotkit_interrupt_value__" in interruptValue) {
|
|
2616
|
+
const evValue = interruptValue.__copilotkit_interrupt_value__;
|
|
2609
2617
|
emit(JSON.stringify({
|
|
2610
2618
|
event: LangGraphEventTypes.OnCopilotKitInterrupt,
|
|
2611
2619
|
data: {
|
|
2612
|
-
value:
|
|
2620
|
+
value: typeof evValue === "string" ? evValue : JSON.stringify(evValue),
|
|
2613
2621
|
messages: langchainMessagesToCopilotKit(interruptValue.__copilotkit_messages__)
|
|
2614
2622
|
}
|
|
2615
2623
|
}) + "\n");
|
|
2616
2624
|
} else {
|
|
2617
2625
|
emit(JSON.stringify({
|
|
2618
2626
|
event: LangGraphEventTypes.OnInterrupt,
|
|
2619
|
-
value: interruptValue
|
|
2627
|
+
value: typeof interruptValue === "string" ? interruptValue : JSON.stringify(interruptValue)
|
|
2620
2628
|
}) + "\n");
|
|
2621
2629
|
}
|
|
2622
2630
|
continue;
|
|
@@ -5281,7 +5289,7 @@ var CopilotResolver = class {
|
|
|
5281
5289
|
type: event.type,
|
|
5282
5290
|
name: event.name,
|
|
5283
5291
|
data: {
|
|
5284
|
-
value:
|
|
5292
|
+
value: event.data.value,
|
|
5285
5293
|
messages: event.data.messages.map((message) => {
|
|
5286
5294
|
if (message.type === "TextMessage" || "content" in message && "role" in message) {
|
|
5287
5295
|
return (0, import_class_transformer3.plainToInstance)(TextMessage, {
|