@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
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  copilotRuntimeNodeHttpEndpoint
3
- } from "../../../chunk-YKYBGYYL.mjs";
3
+ } from "../../../chunk-GRU5EPNU.mjs";
4
4
  import "../../../chunk-SHBDMA63.mjs";
5
5
  import "../../../chunk-QLLV2QVK.mjs";
6
6
  import "../../../chunk-XWBDEXDA.mjs";
package/package.json CHANGED
@@ -9,7 +9,7 @@
9
9
  "publishConfig": {
10
10
  "access": "public"
11
11
  },
12
- "version": "1.9.2-next.25",
12
+ "version": "1.9.2-next.26",
13
13
  "sideEffects": false,
14
14
  "main": "./dist/index.js",
15
15
  "module": "./dist/index.mjs",
@@ -66,7 +66,7 @@
66
66
  "rxjs": "7.8.1",
67
67
  "type-graphql": "2.0.0-rc.1",
68
68
  "zod": "^3.23.3",
69
- "@copilotkit/shared": "1.9.2-next.25"
69
+ "@copilotkit/shared": "1.9.2-next.26"
70
70
  },
71
71
  "peerDependencies": {
72
72
  "@ag-ui/client": ">=0.0.34",
@@ -975,16 +975,21 @@ please use an LLM adapter instead.`,
975
975
  } catch (error) {
976
976
  // All errors from agent state loading are user configuration issues
977
977
  const errorMessage = error instanceof Error ? error.message : String(error);
978
+ const errorStatus = error?.response?.status || error?.status;
978
979
 
979
- // Log user configuration errors at debug level to reduce noise
980
- console.debug(`Agent '${agentName}' configuration issue: ${errorMessage}`);
981
-
982
- // Throw a configuration error - all agent state loading failures are user setup issues
983
- throw new ResolvedCopilotKitError({
984
- status: 400,
985
- message: `Agent '${agentName}' failed to execute: ${errorMessage}`,
986
- code: CopilotKitErrorCode.CONFIGURATION_ERROR,
987
- });
980
+ if (errorStatus === 404) {
981
+ state = {};
982
+ } else {
983
+ // Log user configuration errors at debug level to reduce noise
984
+ console.debug(`Agent '${agentName}' configuration issue: ${errorMessage}`);
985
+
986
+ // Throw a configuration error - all agent state loading failures are user setup issues
987
+ throw new ResolvedCopilotKitError({
988
+ status: 400,
989
+ message: `Agent '${agentName}' failed to execute: ${errorMessage}`,
990
+ code: CopilotKitErrorCode.CONFIGURATION_ERROR,
991
+ });
992
+ }
988
993
  }
989
994
 
990
995
  if (Object.keys(state).length === 0) {