@copilotkit/runtime 1.5.16-next.1 → 1.5.16
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 +16 -0
- package/dist/{chunk-PPSNRM2D.mjs → chunk-FHRPZT3X.mjs} +2 -2
- package/dist/{chunk-DLC2JHVP.mjs → chunk-HHBTKTJ5.mjs} +19 -11
- package/dist/chunk-HHBTKTJ5.mjs.map +1 -0
- package/dist/{chunk-X4UE3Q5F.mjs → chunk-N6X67FPO.mjs} +2 -2
- package/dist/{chunk-M7UBXBRI.mjs → chunk-TWUMUUCQ.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-PPSNRM2D.mjs.map → chunk-FHRPZT3X.mjs.map} +0 -0
- /package/dist/{chunk-X4UE3Q5F.mjs.map → chunk-N6X67FPO.mjs.map} +0 -0
- /package/dist/{chunk-M7UBXBRI.mjs.map → chunk-TWUMUUCQ.mjs.map} +0 -0
package/dist/index.mjs
CHANGED
|
@@ -3,13 +3,13 @@ import {
|
|
|
3
3
|
config,
|
|
4
4
|
copilotRuntimeNextJSAppRouterEndpoint,
|
|
5
5
|
copilotRuntimeNextJSPagesRouterEndpoint
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-TWUMUUCQ.mjs";
|
|
7
7
|
import {
|
|
8
8
|
copilotRuntimeNestEndpoint
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-N6X67FPO.mjs";
|
|
10
10
|
import {
|
|
11
11
|
copilotRuntimeNodeExpressEndpoint
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-FHRPZT3X.mjs";
|
|
13
13
|
import {
|
|
14
14
|
CopilotRuntime,
|
|
15
15
|
addCustomHeaderPlugin,
|
|
@@ -21,7 +21,7 @@ import {
|
|
|
21
21
|
getCommonConfig,
|
|
22
22
|
langGraphPlatformEndpoint,
|
|
23
23
|
resolveEndpointType
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-HHBTKTJ5.mjs";
|
|
25
25
|
import {
|
|
26
26
|
AnthropicAdapter,
|
|
27
27
|
EmptyAdapter,
|
package/dist/lib/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
|
|
47
|
+
version: "1.5.16",
|
|
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",
|
|
@@ -2208,9 +2208,16 @@ async function streamEvents(controller, args) {
|
|
|
2208
2208
|
};
|
|
2209
2209
|
}
|
|
2210
2210
|
if (lgInterruptMetaEvent == null ? void 0 : lgInterruptMetaEvent.response) {
|
|
2211
|
-
|
|
2212
|
-
|
|
2213
|
-
|
|
2211
|
+
let response = lgInterruptMetaEvent.response;
|
|
2212
|
+
try {
|
|
2213
|
+
payload.command = {
|
|
2214
|
+
resume: JSON.parse(response)
|
|
2215
|
+
};
|
|
2216
|
+
} catch (e) {
|
|
2217
|
+
payload.command = {
|
|
2218
|
+
resume: response
|
|
2219
|
+
};
|
|
2220
|
+
}
|
|
2214
2221
|
}
|
|
2215
2222
|
if (mode === "continue" && !activeInterruptEvent) {
|
|
2216
2223
|
await client.threads.updateState(threadId, {
|
|
@@ -2270,17 +2277,18 @@ async function streamEvents(controller, args) {
|
|
|
2270
2277
|
activeInterruptEvent = true;
|
|
2271
2278
|
const interruptValue = interruptEvents == null ? void 0 : interruptEvents[0].value;
|
|
2272
2279
|
if (typeof interruptValue != "string" && "__copilotkit_interrupt_value__" in interruptValue) {
|
|
2280
|
+
const evValue = interruptValue.__copilotkit_interrupt_value__;
|
|
2273
2281
|
emit(JSON.stringify({
|
|
2274
2282
|
event: LangGraphEventTypes.OnCopilotKitInterrupt,
|
|
2275
2283
|
data: {
|
|
2276
|
-
value:
|
|
2284
|
+
value: typeof evValue === "string" ? evValue : JSON.stringify(evValue),
|
|
2277
2285
|
messages: langchainMessagesToCopilotKit(interruptValue.__copilotkit_messages__)
|
|
2278
2286
|
}
|
|
2279
2287
|
}) + "\n");
|
|
2280
2288
|
} else {
|
|
2281
2289
|
emit(JSON.stringify({
|
|
2282
2290
|
event: LangGraphEventTypes.OnInterrupt,
|
|
2283
|
-
value: interruptValue
|
|
2291
|
+
value: typeof interruptValue === "string" ? interruptValue : JSON.stringify(interruptValue)
|
|
2284
2292
|
}) + "\n");
|
|
2285
2293
|
}
|
|
2286
2294
|
continue;
|
|
@@ -4945,7 +4953,7 @@ var CopilotResolver = class {
|
|
|
4945
4953
|
type: event.type,
|
|
4946
4954
|
name: event.name,
|
|
4947
4955
|
data: {
|
|
4948
|
-
value:
|
|
4956
|
+
value: event.data.value,
|
|
4949
4957
|
messages: event.data.messages.map((message) => {
|
|
4950
4958
|
if (message.type === "TextMessage" || "content" in message && "role" in message) {
|
|
4951
4959
|
return (0, import_class_transformer3.plainToInstance)(TextMessage, {
|