@copilotkit/runtime 1.9.2-next.10 → 1.9.2-next.12

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 (39) hide show
  1. package/CHANGELOG.md +13 -0
  2. package/dist/{chunk-5OK4GLKL.mjs → chunk-26EZI2OL.mjs} +2 -2
  3. package/dist/{chunk-VBXBFZEL.mjs → chunk-5242BPKE.mjs} +2 -2
  4. package/dist/{chunk-PMIAGZGS.mjs → chunk-67FD4ROM.mjs} +10 -38
  5. package/dist/chunk-67FD4ROM.mjs.map +1 -0
  6. package/dist/{chunk-TOBFVWZU.mjs → chunk-QYYJ4HZT.mjs} +2 -2
  7. package/dist/{chunk-6RUTA76W.mjs → chunk-XRRSRDZR.mjs} +2 -2
  8. package/dist/index.d.ts +1 -1
  9. package/dist/index.js +9 -37
  10. package/dist/index.js.map +1 -1
  11. package/dist/index.mjs +5 -5
  12. package/dist/lib/index.d.ts +1 -1
  13. package/dist/lib/index.js +9 -37
  14. package/dist/lib/index.js.map +1 -1
  15. package/dist/lib/index.mjs +5 -5
  16. package/dist/lib/integrations/index.d.ts +2 -2
  17. package/dist/lib/integrations/index.js +1 -1
  18. package/dist/lib/integrations/index.js.map +1 -1
  19. package/dist/lib/integrations/index.mjs +4 -4
  20. package/dist/lib/integrations/nest/index.d.ts +1 -1
  21. package/dist/lib/integrations/nest/index.js +1 -1
  22. package/dist/lib/integrations/nest/index.js.map +1 -1
  23. package/dist/lib/integrations/nest/index.mjs +2 -2
  24. package/dist/lib/integrations/node-express/index.d.ts +1 -1
  25. package/dist/lib/integrations/node-express/index.js +1 -1
  26. package/dist/lib/integrations/node-express/index.js.map +1 -1
  27. package/dist/lib/integrations/node-express/index.mjs +2 -2
  28. package/dist/lib/integrations/node-http/index.d.ts +1 -1
  29. package/dist/lib/integrations/node-http/index.js +1 -1
  30. package/dist/lib/integrations/node-http/index.js.map +1 -1
  31. package/dist/lib/integrations/node-http/index.mjs +1 -1
  32. package/dist/{shared-bd953ebf.d.ts → shared-4164c674.d.ts} +1 -1
  33. package/package.json +2 -2
  34. package/src/lib/runtime/copilot-runtime.ts +8 -37
  35. package/dist/chunk-PMIAGZGS.mjs.map +0 -1
  36. /package/dist/{chunk-5OK4GLKL.mjs.map → chunk-26EZI2OL.mjs.map} +0 -0
  37. /package/dist/{chunk-VBXBFZEL.mjs.map → chunk-5242BPKE.mjs.map} +0 -0
  38. /package/dist/{chunk-TOBFVWZU.mjs.map → chunk-QYYJ4HZT.mjs.map} +0 -0
  39. /package/dist/{chunk-6RUTA76W.mjs.map → chunk-XRRSRDZR.mjs.map} +0 -0
package/CHANGELOG.md CHANGED
@@ -1,5 +1,18 @@
1
1
  # @copilotkit/runtime
2
2
 
3
+ ## 1.9.2-next.12
4
+
5
+ ### Patch Changes
6
+
7
+ - @copilotkit/shared@1.9.2-next.12
8
+
9
+ ## 1.9.2-next.11
10
+
11
+ ### Patch Changes
12
+
13
+ - 1f4949a: - fix: remove agent discovery for agui agents
14
+ - @copilotkit/shared@1.9.2-next.11
15
+
3
16
  ## 1.9.2-next.10
4
17
 
5
18
  ### Patch Changes
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  LangGraphEventTypes
3
- } from "./chunk-PMIAGZGS.mjs";
3
+ } from "./chunk-67FD4ROM.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-5OK4GLKL.mjs.map
158
+ //# sourceMappingURL=chunk-26EZI2OL.mjs.map
@@ -2,7 +2,7 @@ import {
2
2
  copilotRuntimeNodeHttpEndpoint,
3
3
  getRuntimeInstanceTelemetryInfo,
4
4
  telemetry_client_default
5
- } from "./chunk-PMIAGZGS.mjs";
5
+ } from "./chunk-67FD4ROM.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-VBXBFZEL.mjs.map
25
+ //# sourceMappingURL=chunk-5242BPKE.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.10",
43
+ version: "1.9.2-next.12",
44
44
  sideEffects: false,
45
45
  main: "./dist/index.js",
46
46
  module: "./dist/index.mjs",
@@ -3063,10 +3063,8 @@ please use an LLM adapter instead.`
3063
3063
  }
3064
3064
  }
3065
3065
  async getAllAgents(graphqlContext) {
3066
- const [agentsWithEndpoints, aguiAgents] = await Promise.all([
3067
- this.discoverAgentsFromEndpoints(graphqlContext),
3068
- this.discoverAgentsFromAgui()
3069
- ]);
3066
+ const agentsWithEndpoints = await this.discoverAgentsFromEndpoints(graphqlContext);
3067
+ const aguiAgents = this.discoverAgentsFromAgui();
3070
3068
  this.availableAgents = [
3071
3069
  ...agentsWithEndpoints,
3072
3070
  ...aguiAgents
@@ -3166,38 +3164,12 @@ please use an LLM adapter instead.`
3166
3164
  }, Promise.resolve([]));
3167
3165
  return agents;
3168
3166
  }
3169
- async discoverAgentsFromAgui() {
3170
- const agents = Object.values(this.agents ?? []).reduce(async (acc, agent) => {
3171
- const agents2 = await acc;
3172
- const client = agent.client;
3173
- let data = [];
3174
- try {
3175
- data = await client.assistants.search();
3176
- if (data && "detail" in data && data.detail.toLowerCase() === "not found") {
3177
- throw new CopilotKitAgentDiscoveryError({
3178
- availableAgents: this.availableAgents
3179
- });
3180
- }
3181
- } catch (e) {
3182
- throw new CopilotKitMisuseError2({
3183
- message: `
3184
- Failed to find or contact agent ${agent.graphId}.
3185
- Make sure the LangGraph API is running and the agent is defined in langgraph.json
3186
-
3187
- See more: https://docs.copilotkit.ai/troubleshooting/common-issues`
3188
- });
3189
- }
3190
- const endpointAgents = data.map((entry) => ({
3191
- name: entry.graph_id,
3192
- id: entry.assistant_id,
3193
- description: ""
3194
- }));
3195
- return [
3196
- ...agents2,
3197
- ...endpointAgents
3198
- ];
3199
- }, Promise.resolve([]));
3200
- return agents;
3167
+ discoverAgentsFromAgui() {
3168
+ return Object.values(this.agents ?? []).map((agent) => ({
3169
+ name: agent.agentName,
3170
+ id: agent.agentId,
3171
+ description: ""
3172
+ }));
3201
3173
  }
3202
3174
  async loadAgentState(graphqlContext, threadId, agentName) {
3203
3175
  const agents = await this.getAllAgents(graphqlContext);
@@ -5839,4 +5811,4 @@ export {
5839
5811
  getCommonConfig,
5840
5812
  copilotRuntimeNodeHttpEndpoint
5841
5813
  };
5842
- //# sourceMappingURL=chunk-PMIAGZGS.mjs.map
5814
+ //# sourceMappingURL=chunk-67FD4ROM.mjs.map