@copilotkit/runtime 1.9.2-next.25 → 1.9.2-next.26

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 (32) hide show
  1. package/CHANGELOG.md +7 -0
  2. package/dist/{chunk-DOXGUQKL.mjs → chunk-3RL34U4Q.mjs} +2 -2
  3. package/dist/{chunk-3JXN25PL.mjs → chunk-D7OAY4CQ.mjs} +2 -2
  4. package/dist/{chunk-YKYBGYYL.mjs → chunk-GRU5EPNU.mjs} +14 -8
  5. package/dist/chunk-GRU5EPNU.mjs.map +1 -0
  6. package/dist/{chunk-BNLL5CH2.mjs → chunk-PQG7ZI72.mjs} +2 -2
  7. package/dist/{chunk-GJWXNXSA.mjs → chunk-SE7TPKR2.mjs} +2 -2
  8. package/dist/index.js +13 -7
  9. package/dist/index.js.map +1 -1
  10. package/dist/index.mjs +5 -5
  11. package/dist/lib/index.js +13 -7
  12. package/dist/lib/index.js.map +1 -1
  13. package/dist/lib/index.mjs +5 -5
  14. package/dist/lib/integrations/index.js +1 -1
  15. package/dist/lib/integrations/index.js.map +1 -1
  16. package/dist/lib/integrations/index.mjs +4 -4
  17. package/dist/lib/integrations/nest/index.js +1 -1
  18. package/dist/lib/integrations/nest/index.js.map +1 -1
  19. package/dist/lib/integrations/nest/index.mjs +2 -2
  20. package/dist/lib/integrations/node-express/index.js +1 -1
  21. package/dist/lib/integrations/node-express/index.js.map +1 -1
  22. package/dist/lib/integrations/node-express/index.mjs +2 -2
  23. package/dist/lib/integrations/node-http/index.js +1 -1
  24. package/dist/lib/integrations/node-http/index.js.map +1 -1
  25. package/dist/lib/integrations/node-http/index.mjs +1 -1
  26. package/package.json +2 -2
  27. package/src/lib/runtime/copilot-runtime.ts +14 -9
  28. package/dist/chunk-YKYBGYYL.mjs.map +0 -1
  29. /package/dist/{chunk-DOXGUQKL.mjs.map → chunk-3RL34U4Q.mjs.map} +0 -0
  30. /package/dist/{chunk-3JXN25PL.mjs.map → chunk-D7OAY4CQ.mjs.map} +0 -0
  31. /package/dist/{chunk-BNLL5CH2.mjs.map → chunk-PQG7ZI72.mjs.map} +0 -0
  32. /package/dist/{chunk-GJWXNXSA.mjs.map → chunk-SE7TPKR2.mjs.map} +0 -0
package/CHANGELOG.md CHANGED
@@ -1,5 +1,12 @@
1
1
  # @copilotkit/runtime
2
2
 
3
+ ## 1.9.2-next.26
4
+
5
+ ### Patch Changes
6
+
7
+ - 83822d2: - fix: do not show error on state loading if thread does not exist
8
+ - @copilotkit/shared@1.9.2-next.26
9
+
3
10
  ## 1.9.2-next.25
4
11
 
5
12
  ### Patch Changes
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  LangGraphEventTypes
3
- } from "./chunk-YKYBGYYL.mjs";
3
+ } from "./chunk-GRU5EPNU.mjs";
4
4
  import {
5
5
  __name
6
6
  } from "./chunk-FHD4JECV.mjs";
@@ -155,4 +155,4 @@ export {
155
155
  CustomEventNames,
156
156
  LangGraphAgent
157
157
  };
158
- //# sourceMappingURL=chunk-DOXGUQKL.mjs.map
158
+ //# sourceMappingURL=chunk-3RL34U4Q.mjs.map
@@ -2,7 +2,7 @@ import {
2
2
  copilotRuntimeNodeHttpEndpoint,
3
3
  getRuntimeInstanceTelemetryInfo,
4
4
  telemetry_client_default
5
- } from "./chunk-YKYBGYYL.mjs";
5
+ } from "./chunk-GRU5EPNU.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-3JXN25PL.mjs.map
25
+ //# sourceMappingURL=chunk-D7OAY4CQ.mjs.map
@@ -40,7 +40,7 @@ var require_package = __commonJS({
40
40
  publishConfig: {
41
41
  access: "public"
42
42
  },
43
- version: "1.9.2-next.25",
43
+ version: "1.9.2-next.26",
44
44
  sideEffects: false,
45
45
  main: "./dist/index.js",
46
46
  module: "./dist/index.mjs",
@@ -3211,6 +3211,7 @@ please use an LLM adapter instead.`
3211
3211
  }));
3212
3212
  }
3213
3213
  async loadAgentState(graphqlContext, threadId, agentName) {
3214
+ var _a;
3214
3215
  const agents = await this.getAllAgents(graphqlContext);
3215
3216
  const agent = agents.find((agent2) => agent2.name === agentName);
3216
3217
  if (!agent) {
@@ -3291,12 +3292,17 @@ please use an LLM adapter instead.`
3291
3292
  state = client ? (await client.threads.getState(threadId)).values : {};
3292
3293
  } catch (error) {
3293
3294
  const errorMessage = error instanceof Error ? error.message : String(error);
3294
- console.debug(`Agent '${agentName}' configuration issue: ${errorMessage}`);
3295
- throw new ResolvedCopilotKitError({
3296
- status: 400,
3297
- message: `Agent '${agentName}' failed to execute: ${errorMessage}`,
3298
- code: CopilotKitErrorCode2.CONFIGURATION_ERROR
3299
- });
3295
+ const errorStatus = ((_a = error == null ? void 0 : error.response) == null ? void 0 : _a.status) || (error == null ? void 0 : error.status);
3296
+ if (errorStatus === 404) {
3297
+ state = {};
3298
+ } else {
3299
+ console.debug(`Agent '${agentName}' configuration issue: ${errorMessage}`);
3300
+ throw new ResolvedCopilotKitError({
3301
+ status: 400,
3302
+ message: `Agent '${agentName}' failed to execute: ${errorMessage}`,
3303
+ code: CopilotKitErrorCode2.CONFIGURATION_ERROR
3304
+ });
3305
+ }
3300
3306
  }
3301
3307
  if (Object.keys(state).length === 0) {
3302
3308
  return {
@@ -5909,4 +5915,4 @@ export {
5909
5915
  getCommonConfig,
5910
5916
  copilotRuntimeNodeHttpEndpoint
5911
5917
  };
5912
- //# sourceMappingURL=chunk-YKYBGYYL.mjs.map
5918
+ //# sourceMappingURL=chunk-GRU5EPNU.mjs.map