@copilotkit/runtime 1.8.1 → 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 (30) hide show
  1. package/CHANGELOG.md +13 -0
  2. package/dist/{chunk-O33RXDDY.mjs → chunk-C6HNX5KB.mjs} +2 -2
  3. package/dist/{chunk-6276MKXI.mjs → chunk-CKEC4T6B.mjs} +2 -2
  4. package/dist/{chunk-WN6OJX5I.mjs → chunk-HLUPHHYT.mjs} +18 -4
  5. package/dist/chunk-HLUPHHYT.mjs.map +1 -0
  6. package/dist/{chunk-34PLTABO.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 +4 -4
  10. package/dist/lib/index.js +17 -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/copilot-runtime.ts +16 -4
  27. package/dist/chunk-WN6OJX5I.mjs.map +0 -1
  28. /package/dist/{chunk-O33RXDDY.mjs.map → chunk-C6HNX5KB.mjs.map} +0 -0
  29. /package/dist/{chunk-6276MKXI.mjs.map → chunk-CKEC4T6B.mjs.map} +0 -0
  30. /package/dist/{chunk-34PLTABO.mjs.map → chunk-KHL2SKIB.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-34PLTABO.mjs";
6
+ } from "./chunk-KHL2SKIB.mjs";
7
7
  import {
8
8
  copilotRuntimeNestEndpoint
9
- } from "./chunk-O33RXDDY.mjs";
9
+ } from "./chunk-C6HNX5KB.mjs";
10
10
  import {
11
11
  copilotRuntimeNodeExpressEndpoint
12
- } from "./chunk-6276MKXI.mjs";
12
+ } from "./chunk-CKEC4T6B.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-WN6OJX5I.mjs";
25
+ } from "./chunk-HLUPHHYT.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.1",
47
+ version: "1.8.2-next.1",
48
48
  sideEffects: false,
49
49
  main: "./dist/index.js",
50
50
  module: "./dist/index.mjs",
@@ -3881,8 +3881,22 @@ please use an LLM adapter instead.`
3881
3881
  ...propertyHeaders
3882
3882
  }
3883
3883
  });
3884
- const data = await client.assistants.search();
3885
- const endpointAgents = (data ?? []).map((entry) => ({
3884
+ let data = [];
3885
+ try {
3886
+ data = await client.assistants.search();
3887
+ if (data && "detail" in data && data.detail.toLowerCase() === "not found") {
3888
+ throw new import_shared18.CopilotKitAgentDiscoveryError();
3889
+ }
3890
+ } catch (e) {
3891
+ throw new import_shared18.CopilotKitMisuseError({
3892
+ message: `
3893
+ Failed to find or contact remote endpoint at url ${endpoint.deploymentUrl}.
3894
+ Make sure the API is running and that it's indeed a LangGraph platform url.
3895
+
3896
+ See more: https://docs.copilotkit.ai/troubleshooting/common-issues`
3897
+ });
3898
+ }
3899
+ const endpointAgents = data.map((entry) => ({
3886
3900
  name: entry.graph_id,
3887
3901
  id: entry.assistant_id,
3888
3902
  description: "",