@copilotkit/runtime 1.8.2-next.0 → 1.8.2-next.1

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 +7 -0
  2. package/dist/{chunk-UGVXD6KK.mjs → chunk-C6HNX5KB.mjs} +2 -2
  3. package/dist/{chunk-TNMBPY25.mjs → chunk-CKEC4T6B.mjs} +2 -2
  4. package/dist/{chunk-QZFOLVUA.mjs → chunk-HLUPHHYT.mjs} +27 -13
  5. package/dist/{chunk-QZFOLVUA.mjs.map → chunk-HLUPHHYT.mjs.map} +1 -1
  6. package/dist/{chunk-QAPB44C7.mjs → chunk-KHL2SKIB.mjs} +2 -2
  7. package/dist/index.js +17 -3
  8. package/dist/index.js.map +1 -1
  9. package/dist/index.mjs +6 -6
  10. package/dist/lib/index.js +17 -3
  11. package/dist/lib/index.js.map +1 -1
  12. package/dist/lib/index.mjs +6 -6
  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 +6 -6
  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 +4 -4
  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 +4 -4
  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 +3 -3
  25. package/package.json +4 -4
  26. package/src/lib/runtime/copilot-runtime.ts +16 -4
  27. /package/dist/{chunk-UGVXD6KK.mjs.map → chunk-C6HNX5KB.mjs.map} +0 -0
  28. /package/dist/{chunk-TNMBPY25.mjs.map → chunk-CKEC4T6B.mjs.map} +0 -0
  29. /package/dist/{chunk-QAPB44C7.mjs.map → chunk-KHL2SKIB.mjs.map} +0 -0
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  copilotRuntimeNodeHttpEndpoint
3
- } from "../../../chunk-QZFOLVUA.mjs";
4
- import "../../../chunk-RTFJTJMA.mjs";
5
- import "../../../chunk-2OZAGFV3.mjs";
3
+ } from "../../../chunk-HLUPHHYT.mjs";
6
4
  import "../../../chunk-FZJAYGIR.mjs";
7
5
  import "../../../chunk-5BIEM2UU.mjs";
6
+ import "../../../chunk-RTFJTJMA.mjs";
7
+ import "../../../chunk-2OZAGFV3.mjs";
8
8
  import "../../../chunk-FHD4JECV.mjs";
9
9
  export {
10
10
  copilotRuntimeNodeHttpEndpoint
package/package.json CHANGED
@@ -9,7 +9,7 @@
9
9
  "publishConfig": {
10
10
  "access": "public"
11
11
  },
12
- "version": "1.8.2-next.0",
12
+ "version": "1.8.2-next.1",
13
13
  "sideEffects": false,
14
14
  "main": "./dist/index.js",
15
15
  "module": "./dist/index.mjs",
@@ -32,8 +32,8 @@
32
32
  "tsup": "^6.7.0",
33
33
  "typescript": "^5.2.3",
34
34
  "zod-to-json-schema": "^3.23.5",
35
- "tsconfig": "1.4.6",
36
- "eslint-config-custom": "1.4.6"
35
+ "eslint-config-custom": "1.4.6",
36
+ "tsconfig": "1.4.6"
37
37
  },
38
38
  "dependencies": {
39
39
  "@anthropic-ai/sdk": "^0.27.3",
@@ -59,7 +59,7 @@
59
59
  "rxjs": "^7.8.1",
60
60
  "type-graphql": "2.0.0-rc.1",
61
61
  "zod": "^3.23.3",
62
- "@copilotkit/shared": "1.8.2-next.0"
62
+ "@copilotkit/shared": "1.8.2-next.1"
63
63
  },
64
64
  "keywords": [
65
65
  "copilotkit",
@@ -493,11 +493,23 @@ please use an LLM adapter instead.`,
493
493
  apiKey: endpoint.langsmithApiKey,
494
494
  defaultHeaders: { ...propertyHeaders },
495
495
  });
496
+ let data: Array<{ assistant_id: string; graph_id: string }> | { detail: string } = [];
497
+ try {
498
+ data = await client.assistants.search();
496
499
 
497
- const data: Array<{ assistant_id: string; graph_id: string }> =
498
- await client.assistants.search();
499
-
500
- const endpointAgents = (data ?? []).map((entry) => ({
500
+ if (data && "detail" in data && (data.detail as string).toLowerCase() === "not found") {
501
+ throw new CopilotKitAgentDiscoveryError();
502
+ }
503
+ } catch (e) {
504
+ throw new CopilotKitMisuseError({
505
+ message: `
506
+ Failed to find or contact remote endpoint at url ${endpoint.deploymentUrl}.
507
+ Make sure the API is running and that it's indeed a LangGraph platform url.
508
+
509
+ See more: https://docs.copilotkit.ai/troubleshooting/common-issues`,
510
+ });
511
+ }
512
+ const endpointAgents = data.map((entry) => ({
501
513
  name: entry.graph_id,
502
514
  id: entry.assistant_id,
503
515
  description: "",