@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.
Files changed (31) hide show
  1. package/CHANGELOG.md +7 -0
  2. package/dist/{chunk-X4UE3Q5F.mjs → chunk-ISPCKW3E.mjs} +2 -2
  3. package/dist/{chunk-PPSNRM2D.mjs → chunk-TBPOHFA4.mjs} +2 -2
  4. package/dist/{chunk-DLC2JHVP.mjs → chunk-U5OA7VEB.mjs} +19 -11
  5. package/dist/chunk-U5OA7VEB.mjs.map +1 -0
  6. package/dist/{chunk-M7UBXBRI.mjs → chunk-UHUC2NVB.mjs} +2 -2
  7. package/dist/index.js +18 -10
  8. package/dist/index.js.map +1 -1
  9. package/dist/index.mjs +4 -4
  10. package/dist/lib/index.js +18 -10
  11. package/dist/lib/index.js.map +1 -1
  12. package/dist/lib/index.mjs +4 -4
  13. package/dist/lib/integrations/index.js +5 -5
  14. package/dist/lib/integrations/index.js.map +1 -1
  15. package/dist/lib/integrations/index.mjs +4 -4
  16. package/dist/lib/integrations/nest/index.js +5 -5
  17. package/dist/lib/integrations/nest/index.js.map +1 -1
  18. package/dist/lib/integrations/nest/index.mjs +2 -2
  19. package/dist/lib/integrations/node-express/index.js +5 -5
  20. package/dist/lib/integrations/node-express/index.js.map +1 -1
  21. package/dist/lib/integrations/node-express/index.mjs +2 -2
  22. package/dist/lib/integrations/node-http/index.js +5 -5
  23. package/dist/lib/integrations/node-http/index.js.map +1 -1
  24. package/dist/lib/integrations/node-http/index.mjs +1 -1
  25. package/package.json +5 -5
  26. package/src/graphql/resolvers/copilot.resolver.ts +1 -4
  27. package/src/lib/runtime/remote-lg-action.ts +13 -3
  28. package/dist/chunk-DLC2JHVP.mjs.map +0 -1
  29. /package/dist/{chunk-X4UE3Q5F.mjs.map → chunk-ISPCKW3E.mjs.map} +0 -0
  30. /package/dist/{chunk-PPSNRM2D.mjs.map → chunk-TBPOHFA4.mjs.map} +0 -0
  31. /package/dist/{chunk-M7UBXBRI.mjs.map → chunk-UHUC2NVB.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-M7UBXBRI.mjs";
6
+ } from "./chunk-UHUC2NVB.mjs";
7
7
  import {
8
8
  copilotRuntimeNestEndpoint
9
- } from "./chunk-X4UE3Q5F.mjs";
9
+ } from "./chunk-ISPCKW3E.mjs";
10
10
  import {
11
11
  copilotRuntimeNodeExpressEndpoint
12
- } from "./chunk-PPSNRM2D.mjs";
12
+ } from "./chunk-TBPOHFA4.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-DLC2JHVP.mjs";
24
+ } from "./chunk-U5OA7VEB.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-next.1",
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.0.53",
88
- "@langchain/core": "^0.3.13",
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.0.28",
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
- payload.command = {
2212
- resume: lgInterruptMetaEvent.response
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: interruptValue.__copilotkit_interrupt_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: typeof event.data.value === "string" ? event.data.value : JSON.stringify(event.data.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, {