@copilotkit/runtime 1.8.2-next.1 → 1.8.2-next.3

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 (30) hide show
  1. package/CHANGELOG.md +13 -0
  2. package/dist/{chunk-KHL2SKIB.mjs → chunk-CXABXJSR.mjs} +2 -2
  3. package/dist/{chunk-HLUPHHYT.mjs → chunk-PVOQ4SUZ.mjs} +7 -4
  4. package/dist/chunk-PVOQ4SUZ.mjs.map +1 -0
  5. package/dist/{chunk-C6HNX5KB.mjs → chunk-Y4XO5QXY.mjs} +2 -2
  6. package/dist/{chunk-CKEC4T6B.mjs → chunk-ZZD4UOWB.mjs} +2 -2
  7. package/dist/index.js +6 -3
  8. package/dist/index.js.map +1 -1
  9. package/dist/index.mjs +4 -4
  10. package/dist/lib/index.js +6 -3
  11. package/dist/lib/index.js.map +1 -1
  12. package/dist/lib/index.mjs +4 -4
  13. package/dist/lib/integrations/index.js +1 -1
  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 +1 -1
  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 +1 -1
  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 +1 -1
  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 +2 -2
  26. package/src/lib/runtime/remote-lg-action.ts +9 -5
  27. package/dist/chunk-HLUPHHYT.mjs.map +0 -1
  28. /package/dist/{chunk-KHL2SKIB.mjs.map → chunk-CXABXJSR.mjs.map} +0 -0
  29. /package/dist/{chunk-C6HNX5KB.mjs.map → chunk-Y4XO5QXY.mjs.map} +0 -0
  30. /package/dist/{chunk-CKEC4T6B.mjs.map → chunk-ZZD4UOWB.mjs.map} +0 -0
package/CHANGELOG.md CHANGED
@@ -1,5 +1,18 @@
1
1
  # @copilotkit/runtime
2
2
 
3
+ ## 1.8.2-next.3
4
+
5
+ ### Patch Changes
6
+
7
+ - @copilotkit/shared@1.8.2-next.3
8
+
9
+ ## 1.8.2-next.2
10
+
11
+ ### Patch Changes
12
+
13
+ - 4eedf97: - fix: handle failure to fetch langgraph schema
14
+ - @copilotkit/shared@1.8.2-next.2
15
+
3
16
  ## 1.8.2-next.1
4
17
 
5
18
  ### Patch Changes
@@ -2,7 +2,7 @@ import {
2
2
  getCommonConfig,
3
3
  getRuntimeInstanceTelemetryInfo,
4
4
  telemetry_client_default
5
- } from "./chunk-HLUPHHYT.mjs";
5
+ } from "./chunk-PVOQ4SUZ.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-KHL2SKIB.mjs.map
80
+ //# sourceMappingURL=chunk-CXABXJSR.mjs.map
@@ -39,7 +39,7 @@ var require_package = __commonJS({
39
39
  publishConfig: {
40
40
  access: "public"
41
41
  },
42
- version: "1.8.2-next.1",
42
+ version: "1.8.2-next.3",
43
43
  sideEffects: false,
44
44
  main: "./dist/index.js",
45
45
  module: "./dist/index.mjs",
@@ -1807,7 +1807,7 @@ async function streamEvents(controller, args) {
1807
1807
  const graphInfo = await client.assistants.getGraph(assistantId);
1808
1808
  const graphSchema = await client.assistants.getSchemas(assistantId);
1809
1809
  const schemaKeys = getSchemaKeys(graphSchema);
1810
- if (payload.input && schemaKeys.input) {
1810
+ if (payload.input && (schemaKeys == null ? void 0 : schemaKeys.input)) {
1811
1811
  payload.input = Object.fromEntries(Object.entries(payload.input).filter(([key]) => schemaKeys.input.includes(key)));
1812
1812
  }
1813
1813
  let streamingStateExtractor = new StreamingStateExtractor([]);
@@ -1981,7 +1981,7 @@ function getStateSyncEvent({ threadId, runId, agentName, nodeName, state, runnin
1981
1981
  messages: langchainMessagesToCopilotKit(state.messages || [])
1982
1982
  };
1983
1983
  }
1984
- if (schemaKeys.output) {
1984
+ if (schemaKeys == null ? void 0 : schemaKeys.output) {
1985
1985
  state = Object.fromEntries(Object.entries(state).filter(([key]) => schemaKeys.output.includes(key)));
1986
1986
  }
1987
1987
  return JSON.stringify({
@@ -2223,6 +2223,9 @@ function getSchemaKeys(graphSchema) {
2223
2223
  "messages",
2224
2224
  "copilotkit"
2225
2225
  ];
2226
+ if (!graphSchema.input_schema.properties || !graphSchema.output_schema.properties) {
2227
+ return null;
2228
+ }
2226
2229
  const inputSchema = Object.keys(graphSchema.input_schema.properties);
2227
2230
  const outputSchema = Object.keys(graphSchema.output_schema.properties);
2228
2231
  return {
@@ -4569,4 +4572,4 @@ export {
4569
4572
  getCommonConfig,
4570
4573
  copilotRuntimeNodeHttpEndpoint
4571
4574
  };
4572
- //# sourceMappingURL=chunk-HLUPHHYT.mjs.map
4575
+ //# sourceMappingURL=chunk-PVOQ4SUZ.mjs.map