@copilotkit/runtime 1.5.12-next.7 → 1.5.13-next.0

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 (29) hide show
  1. package/CHANGELOG.md +22 -0
  2. package/dist/{chunk-34276UUU.mjs → chunk-HBCVNFMF.mjs} +12 -9
  3. package/dist/{chunk-34276UUU.mjs.map → chunk-HBCVNFMF.mjs.map} +1 -1
  4. package/dist/{chunk-DLESGNLO.mjs → chunk-OBZLPXFY.mjs} +2 -2
  5. package/dist/{chunk-UBYSQI43.mjs → chunk-V4EKDRR6.mjs} +2 -2
  6. package/dist/{chunk-WTUPF3W3.mjs → chunk-ZZUINFAU.mjs} +2 -2
  7. package/dist/index.js +6 -3
  8. package/dist/index.js.map +1 -1
  9. package/dist/index.mjs +9 -9
  10. package/dist/lib/index.js +6 -3
  11. package/dist/lib/index.js.map +1 -1
  12. package/dist/lib/index.mjs +5 -5
  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 +5 -5
  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 +3 -3
  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 +3 -3
  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 +2 -2
  25. package/package.json +2 -2
  26. package/src/lib/runtime/copilot-runtime.ts +7 -2
  27. /package/dist/{chunk-DLESGNLO.mjs.map → chunk-OBZLPXFY.mjs.map} +0 -0
  28. /package/dist/{chunk-UBYSQI43.mjs.map → chunk-V4EKDRR6.mjs.map} +0 -0
  29. /package/dist/{chunk-WTUPF3W3.mjs.map → chunk-ZZUINFAU.mjs.map} +0 -0
@@ -1,8 +1,8 @@
1
1
  import {
2
2
  copilotRuntimeNodeHttpEndpoint
3
- } from "../../../chunk-34276UUU.mjs";
4
- import "../../../chunk-S3KKBII4.mjs";
3
+ } from "../../../chunk-HBCVNFMF.mjs";
5
4
  import "../../../chunk-U3V2BCGI.mjs";
5
+ import "../../../chunk-S3KKBII4.mjs";
6
6
  import "../../../chunk-HNUNXFTW.mjs";
7
7
  import "../../../chunk-D2WLFQS6.mjs";
8
8
  import "../../../chunk-44O2JGUY.mjs";
package/package.json CHANGED
@@ -9,7 +9,7 @@
9
9
  "publishConfig": {
10
10
  "access": "public"
11
11
  },
12
- "version": "1.5.12-next.7",
12
+ "version": "1.5.13-next.0",
13
13
  "sideEffects": false,
14
14
  "main": "./dist/index.js",
15
15
  "module": "./dist/index.mjs",
@@ -58,7 +58,7 @@
58
58
  "rxjs": "^7.8.1",
59
59
  "type-graphql": "2.0.0-rc.1",
60
60
  "zod": "^3.23.3",
61
- "@copilotkit/shared": "1.5.12-next.7"
61
+ "@copilotkit/shared": "1.5.13-next.0"
62
62
  },
63
63
  "keywords": [
64
64
  "copilotkit",
@@ -30,12 +30,14 @@ import {
30
30
  RemoteChain,
31
31
  RemoteChainParameters,
32
32
  } from "../../service-adapters";
33
+
33
34
  import { MessageInput } from "../../graphql/inputs/message.input";
34
35
  import { ActionInput } from "../../graphql/inputs/action.input";
35
36
  import { RuntimeEventSource } from "../../service-adapters/events";
36
37
  import { convertGqlInputToMessages } from "../../service-adapters/conversion";
37
38
  import { Message } from "../../graphql/types/converted";
38
39
  import { ForwardedParametersInput } from "../../graphql/inputs/forwarded-parameters.input";
40
+
39
41
  import {
40
42
  isLangGraphAgentAction,
41
43
  LangGraphAgentAction,
@@ -45,6 +47,7 @@ import {
45
47
  CopilotKitEndpoint,
46
48
  LangGraphPlatformEndpoint,
47
49
  } from "./remote-actions";
50
+
48
51
  import { GraphQLContext } from "../integrations/shared";
49
52
  import { AgentSessionInput } from "../../graphql/inputs/agent-session.input";
50
53
  import { from } from "rxjs";
@@ -380,7 +383,10 @@ please use an LLM adapter instead.`,
380
383
  apiUrl: agentWithEndpoint.endpoint.deploymentUrl,
381
384
  apiKey: agentWithEndpoint.endpoint.langsmithApiKey,
382
385
  });
383
- const state = (await client.threads.getState(threadId)).values as any;
386
+ let state: any = {};
387
+ try {
388
+ state = (await client.threads.getState(threadId)).values as any;
389
+ } catch (error) {}
384
390
 
385
391
  if (Object.keys(state).length === 0) {
386
392
  return {
@@ -390,7 +396,6 @@ please use an LLM adapter instead.`,
390
396
  messages: JSON.stringify([]),
391
397
  };
392
398
  } else {
393
- console.log(state);
394
399
  const { messages, ...stateWithoutMessages } = state;
395
400
  const copilotkitMessages = langchainMessagesToCopilotKit(messages);
396
401
  return {