@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.
Files changed (31) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/dist/{chunk-PPSNRM2D.mjs → chunk-FHRPZT3X.mjs} +2 -2
  3. package/dist/{chunk-DLC2JHVP.mjs → chunk-HHBTKTJ5.mjs} +19 -11
  4. package/dist/chunk-HHBTKTJ5.mjs.map +1 -0
  5. package/dist/{chunk-X4UE3Q5F.mjs → chunk-N6X67FPO.mjs} +2 -2
  6. package/dist/{chunk-M7UBXBRI.mjs → chunk-TWUMUUCQ.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-PPSNRM2D.mjs.map → chunk-FHRPZT3X.mjs.map} +0 -0
  30. /package/dist/{chunk-X4UE3Q5F.mjs.map → chunk-N6X67FPO.mjs.map} +0 -0
  31. /package/dist/{chunk-M7UBXBRI.mjs.map → chunk-TWUMUUCQ.mjs.map} +0 -0
package/CHANGELOG.md CHANGED
@@ -1,5 +1,21 @@
1
1
  # @copilotkit/runtime
2
2
 
3
+ ## 1.5.16
4
+
5
+ ### Patch Changes
6
+
7
+ - 9be85f1: - fix: use latest langchain packages
8
+ - 48b7c7b: - fix: detect and alert on version mismatch
9
+ - Updated dependencies [48b7c7b]
10
+ - @copilotkit/shared@1.5.16
11
+
12
+ ## 1.5.16-next.2
13
+
14
+ ### Patch Changes
15
+
16
+ - 9be85f1: - fix: use latest langchain packages
17
+ - @copilotkit/shared@1.5.16-next.2
18
+
3
19
  ## 1.5.16-next.1
4
20
 
5
21
  ### Patch Changes
@@ -2,7 +2,7 @@ import {
2
2
  copilotRuntimeNodeHttpEndpoint,
3
3
  getRuntimeInstanceTelemetryInfo,
4
4
  telemetry_client_default
5
- } from "./chunk-DLC2JHVP.mjs";
5
+ } from "./chunk-HHBTKTJ5.mjs";
6
6
  import {
7
7
  __name
8
8
  } from "./chunk-FHD4JECV.mjs";
@@ -22,4 +22,4 @@ __name(copilotRuntimeNodeExpressEndpoint, "copilotRuntimeNodeExpressEndpoint");
22
22
  export {
23
23
  copilotRuntimeNodeExpressEndpoint
24
24
  };
25
- //# sourceMappingURL=chunk-PPSNRM2D.mjs.map
25
+ //# sourceMappingURL=chunk-FHRPZT3X.mjs.map
@@ -39,7 +39,7 @@ var require_package = __commonJS({
39
39
  publishConfig: {
40
40
  access: "public"
41
41
  },
42
- version: "1.5.16-next.1",
42
+ version: "1.5.16",
43
43
  sideEffects: false,
44
44
  main: "./dist/index.js",
45
45
  module: "./dist/index.mjs",
@@ -79,11 +79,11 @@ var require_package = __commonJS({
79
79
  "@anthropic-ai/sdk": "^0.27.3",
80
80
  "@copilotkit/shared": "workspace:*",
81
81
  "@graphql-yoga/plugin-defer-stream": "^3.3.1",
82
- "@langchain/community": "^0.0.53",
83
- "@langchain/core": "^0.3.13",
82
+ "@langchain/community": "^0.3.29",
83
+ "@langchain/core": "^0.3.38",
84
84
  "@langchain/google-gauth": "^0.1.0",
85
85
  "@langchain/langgraph-sdk": "^0.0.36",
86
- "@langchain/openai": "^0.0.28",
86
+ "@langchain/openai": "^0.4.2",
87
87
  "class-transformer": "^0.5.1",
88
88
  express: "^4.19.2",
89
89
  graphql: "^16.8.1",
@@ -1748,9 +1748,16 @@ async function streamEvents(controller, args) {
1748
1748
  };
1749
1749
  }
1750
1750
  if (lgInterruptMetaEvent == null ? void 0 : lgInterruptMetaEvent.response) {
1751
- payload.command = {
1752
- resume: lgInterruptMetaEvent.response
1753
- };
1751
+ let response = lgInterruptMetaEvent.response;
1752
+ try {
1753
+ payload.command = {
1754
+ resume: JSON.parse(response)
1755
+ };
1756
+ } catch (e) {
1757
+ payload.command = {
1758
+ resume: response
1759
+ };
1760
+ }
1754
1761
  }
1755
1762
  if (mode === "continue" && !activeInterruptEvent) {
1756
1763
  await client.threads.updateState(threadId, {
@@ -1810,17 +1817,18 @@ async function streamEvents(controller, args) {
1810
1817
  activeInterruptEvent = true;
1811
1818
  const interruptValue = interruptEvents == null ? void 0 : interruptEvents[0].value;
1812
1819
  if (typeof interruptValue != "string" && "__copilotkit_interrupt_value__" in interruptValue) {
1820
+ const evValue = interruptValue.__copilotkit_interrupt_value__;
1813
1821
  emit(JSON.stringify({
1814
1822
  event: LangGraphEventTypes.OnCopilotKitInterrupt,
1815
1823
  data: {
1816
- value: interruptValue.__copilotkit_interrupt_value__,
1824
+ value: typeof evValue === "string" ? evValue : JSON.stringify(evValue),
1817
1825
  messages: langchainMessagesToCopilotKit(interruptValue.__copilotkit_messages__)
1818
1826
  }
1819
1827
  }) + "\n");
1820
1828
  } else {
1821
1829
  emit(JSON.stringify({
1822
1830
  event: LangGraphEventTypes.OnInterrupt,
1823
- value: interruptValue
1831
+ value: typeof interruptValue === "string" ? interruptValue : JSON.stringify(interruptValue)
1824
1832
  }) + "\n");
1825
1833
  }
1826
1834
  continue;
@@ -3555,7 +3563,7 @@ var CopilotResolver = class {
3555
3563
  type: event.type,
3556
3564
  name: event.name,
3557
3565
  data: {
3558
- value: typeof event.data.value === "string" ? event.data.value : JSON.stringify(event.data.value),
3566
+ value: event.data.value,
3559
3567
  messages: event.data.messages.map((message) => {
3560
3568
  if (message.type === "TextMessage" || "content" in message && "role" in message) {
3561
3569
  return plainToInstance3(TextMessage, {
@@ -4185,4 +4193,4 @@ export {
4185
4193
  getCommonConfig,
4186
4194
  copilotRuntimeNodeHttpEndpoint
4187
4195
  };
4188
- //# sourceMappingURL=chunk-DLC2JHVP.mjs.map
4196
+ //# sourceMappingURL=chunk-HHBTKTJ5.mjs.map