@copilotkit/runtime 1.8.2-next.1 → 1.8.2-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 (30) hide show
  1. package/CHANGELOG.md +7 -0
  2. package/dist/{chunk-C6HNX5KB.mjs → chunk-2VYBYZPK.mjs} +2 -2
  3. package/dist/{chunk-HLUPHHYT.mjs → chunk-H5AAJZIT.mjs} +7 -4
  4. package/dist/chunk-H5AAJZIT.mjs.map +1 -0
  5. package/dist/{chunk-CKEC4T6B.mjs → chunk-NLQY44UU.mjs} +2 -2
  6. package/dist/{chunk-KHL2SKIB.mjs → chunk-TD5ENJ33.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-C6HNX5KB.mjs.map → chunk-2VYBYZPK.mjs.map} +0 -0
  29. /package/dist/{chunk-CKEC4T6B.mjs.map → chunk-NLQY44UU.mjs.map} +0 -0
  30. /package/dist/{chunk-KHL2SKIB.mjs.map → chunk-TD5ENJ33.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-KHL2SKIB.mjs";
6
+ } from "./chunk-TD5ENJ33.mjs";
7
7
  import {
8
8
  copilotRuntimeNestEndpoint
9
- } from "./chunk-C6HNX5KB.mjs";
9
+ } from "./chunk-2VYBYZPK.mjs";
10
10
  import {
11
11
  copilotRuntimeNodeExpressEndpoint
12
- } from "./chunk-CKEC4T6B.mjs";
12
+ } from "./chunk-NLQY44UU.mjs";
13
13
  import {
14
14
  CopilotRuntime,
15
15
  addCustomHeaderPlugin,
@@ -22,7 +22,7 @@ import {
22
22
  getCommonConfig,
23
23
  langGraphPlatformEndpoint,
24
24
  resolveEndpointType
25
- } from "./chunk-HLUPHHYT.mjs";
25
+ } from "./chunk-H5AAJZIT.mjs";
26
26
  import {
27
27
  AnthropicAdapter,
28
28
  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.8.2-next.1",
47
+ version: "1.8.2-next.2",
48
48
  sideEffects: false,
49
49
  main: "./dist/index.js",
50
50
  module: "./dist/index.mjs",
@@ -2294,7 +2294,7 @@ async function streamEvents(controller, args) {
2294
2294
  const graphInfo = await client.assistants.getGraph(assistantId);
2295
2295
  const graphSchema = await client.assistants.getSchemas(assistantId);
2296
2296
  const schemaKeys = getSchemaKeys(graphSchema);
2297
- if (payload.input && schemaKeys.input) {
2297
+ if (payload.input && (schemaKeys == null ? void 0 : schemaKeys.input)) {
2298
2298
  payload.input = Object.fromEntries(Object.entries(payload.input).filter(([key]) => schemaKeys.input.includes(key)));
2299
2299
  }
2300
2300
  let streamingStateExtractor = new StreamingStateExtractor([]);
@@ -2468,7 +2468,7 @@ function getStateSyncEvent({ threadId, runId, agentName, nodeName, state, runnin
2468
2468
  messages: langchainMessagesToCopilotKit(state.messages || [])
2469
2469
  };
2470
2470
  }
2471
- if (schemaKeys.output) {
2471
+ if (schemaKeys == null ? void 0 : schemaKeys.output) {
2472
2472
  state = Object.fromEntries(Object.entries(state).filter(([key]) => schemaKeys.output.includes(key)));
2473
2473
  }
2474
2474
  return JSON.stringify({
@@ -2710,6 +2710,9 @@ function getSchemaKeys(graphSchema) {
2710
2710
  "messages",
2711
2711
  "copilotkit"
2712
2712
  ];
2713
+ if (!graphSchema.input_schema.properties || !graphSchema.output_schema.properties) {
2714
+ return null;
2715
+ }
2713
2716
  const inputSchema = Object.keys(graphSchema.input_schema.properties);
2714
2717
  const outputSchema = Object.keys(graphSchema.output_schema.properties);
2715
2718
  return {