@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
@@ -2,7 +2,7 @@ import {
2
2
  copilotRuntimeNodeHttpEndpoint,
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";
@@ -22,4 +22,4 @@ __name(copilotRuntimeNestEndpoint, "copilotRuntimeNestEndpoint");
22
22
  export {
23
23
  copilotRuntimeNestEndpoint
24
24
  };
25
- //# sourceMappingURL=chunk-C6HNX5KB.mjs.map
25
+ //# sourceMappingURL=chunk-Y4XO5QXY.mjs.map
@@ -2,7 +2,7 @@ import {
2
2
  copilotRuntimeNodeHttpEndpoint,
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";
@@ -22,4 +22,4 @@ __name(copilotRuntimeNodeExpressEndpoint, "copilotRuntimeNodeExpressEndpoint");
22
22
  export {
23
23
  copilotRuntimeNodeExpressEndpoint
24
24
  };
25
- //# sourceMappingURL=chunk-CKEC4T6B.mjs.map
25
+ //# sourceMappingURL=chunk-ZZD4UOWB.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.8.2-next.1",
47
+ version: "1.8.2-next.3",
48
48
  sideEffects: false,
49
49
  main: "./dist/index.js",
50
50
  module: "./dist/index.mjs",
@@ -2630,7 +2630,7 @@ async function streamEvents(controller, args) {
2630
2630
  const graphInfo = await client.assistants.getGraph(assistantId);
2631
2631
  const graphSchema = await client.assistants.getSchemas(assistantId);
2632
2632
  const schemaKeys = getSchemaKeys(graphSchema);
2633
- if (payload.input && schemaKeys.input) {
2633
+ if (payload.input && (schemaKeys == null ? void 0 : schemaKeys.input)) {
2634
2634
  payload.input = Object.fromEntries(Object.entries(payload.input).filter(([key]) => schemaKeys.input.includes(key)));
2635
2635
  }
2636
2636
  let streamingStateExtractor = new StreamingStateExtractor([]);
@@ -2804,7 +2804,7 @@ function getStateSyncEvent({ threadId, runId, agentName, nodeName, state, runnin
2804
2804
  messages: langchainMessagesToCopilotKit(state.messages || [])
2805
2805
  };
2806
2806
  }
2807
- if (schemaKeys.output) {
2807
+ if (schemaKeys == null ? void 0 : schemaKeys.output) {
2808
2808
  state = Object.fromEntries(Object.entries(state).filter(([key]) => schemaKeys.output.includes(key)));
2809
2809
  }
2810
2810
  return JSON.stringify({
@@ -3046,6 +3046,9 @@ function getSchemaKeys(graphSchema) {
3046
3046
  "messages",
3047
3047
  "copilotkit"
3048
3048
  ];
3049
+ if (!graphSchema.input_schema.properties || !graphSchema.output_schema.properties) {
3050
+ return null;
3051
+ }
3049
3052
  const inputSchema = Object.keys(graphSchema.input_schema.properties);
3050
3053
  const outputSchema = Object.keys(graphSchema.output_schema.properties);
3051
3054
  return {