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

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 +7 -0
  2. package/dist/{chunk-TOBFVWZU.mjs → chunk-B2BL6HPT.mjs} +2 -2
  3. package/dist/{chunk-6RUTA76W.mjs → chunk-CBVVBPVJ.mjs} +2 -2
  4. package/dist/{chunk-PMIAGZGS.mjs → chunk-NI7RVCMB.mjs} +10 -38
  5. package/dist/chunk-NI7RVCMB.mjs.map +1 -0
  6. package/dist/{chunk-5OK4GLKL.mjs → chunk-VVXCPFVN.mjs} +2 -2
  7. package/dist/{chunk-VBXBFZEL.mjs → chunk-ZIEDTGZF.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-TOBFVWZU.mjs.map → chunk-B2BL6HPT.mjs.map} +0 -0
  37. /package/dist/{chunk-6RUTA76W.mjs.map → chunk-CBVVBPVJ.mjs.map} +0 -0
  38. /package/dist/{chunk-5OK4GLKL.mjs.map → chunk-VVXCPFVN.mjs.map} +0 -0
  39. /package/dist/{chunk-VBXBFZEL.mjs.map → chunk-ZIEDTGZF.mjs.map} +0 -0
package/dist/index.mjs CHANGED
@@ -1,18 +1,18 @@
1
1
  import {
2
2
  CustomEventNames,
3
3
  LangGraphAgent
4
- } from "./chunk-5OK4GLKL.mjs";
4
+ } from "./chunk-VVXCPFVN.mjs";
5
5
  import {
6
6
  config,
7
7
  copilotRuntimeNextJSAppRouterEndpoint,
8
8
  copilotRuntimeNextJSPagesRouterEndpoint
9
- } from "./chunk-6RUTA76W.mjs";
9
+ } from "./chunk-CBVVBPVJ.mjs";
10
10
  import {
11
11
  copilotRuntimeNestEndpoint
12
- } from "./chunk-TOBFVWZU.mjs";
12
+ } from "./chunk-B2BL6HPT.mjs";
13
13
  import {
14
14
  copilotRuntimeNodeExpressEndpoint
15
- } from "./chunk-VBXBFZEL.mjs";
15
+ } from "./chunk-ZIEDTGZF.mjs";
16
16
  import {
17
17
  CopilotRuntime,
18
18
  addCustomHeaderPlugin,
@@ -28,7 +28,7 @@ import {
28
28
  getCommonConfig,
29
29
  langGraphPlatformEndpoint,
30
30
  resolveEndpointType
31
- } from "./chunk-PMIAGZGS.mjs";
31
+ } from "./chunk-NI7RVCMB.mjs";
32
32
  import "./chunk-SHBDMA63.mjs";
33
33
  import {
34
34
  AnthropicAdapter,
@@ -1,5 +1,5 @@
1
1
  export { G as GoogleGenerativeAIAdapter, f as GroqAdapter, e as GroqAdapterParams, L as LangChainAdapter, a as OpenAIAdapter, O as OpenAIAdapterParams, c as OpenAIAssistantAdapter, b as OpenAIAssistantAdapterParams, d as UnifyAdapter, U as UnifyAdapterParams } from '../groq-adapter-172a2ca4.js';
2
- export { e as CommonConfig, C as CopilotRequestContextProperties, k as CopilotRuntime, j as CopilotRuntimeConstructorParams, f as CopilotRuntimeLogger, i as CopilotRuntimeRequest, b as CreateCopilotRuntimeServerOptions, G as GraphQLContext, L as LogLevel, o as MCPClient, p as MCPEndpointConfig, M as MCPTool, a as addCustomHeaderPlugin, d as buildSchema, s as convertMCPToolsToActions, m as copilotKitEndpoint, c as createContext, h as createLogger, q as extractParametersFromSchema, l as flattenToolCallsNoDuplicates, t as generateMcpToolInstructions, g as getCommonConfig, n as langGraphPlatformEndpoint, r as resolveEndpointType } from '../shared-bd953ebf.js';
2
+ export { e as CommonConfig, C as CopilotRequestContextProperties, k as CopilotRuntime, j as CopilotRuntimeConstructorParams, f as CopilotRuntimeLogger, i as CopilotRuntimeRequest, b as CreateCopilotRuntimeServerOptions, G as GraphQLContext, L as LogLevel, o as MCPClient, p as MCPEndpointConfig, M as MCPTool, a as addCustomHeaderPlugin, d as buildSchema, s as convertMCPToolsToActions, m as copilotKitEndpoint, c as createContext, h as createLogger, q as extractParametersFromSchema, l as flattenToolCallsNoDuplicates, t as generateMcpToolInstructions, g as getCommonConfig, n as langGraphPlatformEndpoint, r as resolveEndpointType } from '../shared-4164c674.js';
3
3
  export { CopilotRuntimeServerInstance, config, copilotRuntimeNextJSAppRouterEndpoint, copilotRuntimeNextJSPagesRouterEndpoint } from './integrations/index.js';
4
4
  export { copilotRuntimeNodeHttpEndpoint } from './integrations/node-http/index.js';
5
5
  export { copilotRuntimeNodeExpressEndpoint } from './integrations/node-express/index.js';
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.9.2-next.10",
47
+ version: "1.9.2-next.11",
48
48
  sideEffects: false,
49
49
  main: "./dist/index.js",
50
50
  module: "./dist/index.mjs",
@@ -4603,10 +4603,8 @@ please use an LLM adapter instead.`
4603
4603
  }
4604
4604
  }
4605
4605
  async getAllAgents(graphqlContext) {
4606
- const [agentsWithEndpoints, aguiAgents] = await Promise.all([
4607
- this.discoverAgentsFromEndpoints(graphqlContext),
4608
- this.discoverAgentsFromAgui()
4609
- ]);
4606
+ const agentsWithEndpoints = await this.discoverAgentsFromEndpoints(graphqlContext);
4607
+ const aguiAgents = this.discoverAgentsFromAgui();
4610
4608
  this.availableAgents = [
4611
4609
  ...agentsWithEndpoints,
4612
4610
  ...aguiAgents
@@ -4706,38 +4704,12 @@ please use an LLM adapter instead.`
4706
4704
  }, Promise.resolve([]));
4707
4705
  return agents;
4708
4706
  }
4709
- async discoverAgentsFromAgui() {
4710
- const agents = Object.values(this.agents ?? []).reduce(async (acc, agent) => {
4711
- const agents2 = await acc;
4712
- const client = agent.client;
4713
- let data = [];
4714
- try {
4715
- data = await client.assistants.search();
4716
- if (data && "detail" in data && data.detail.toLowerCase() === "not found") {
4717
- throw new import_shared15.CopilotKitAgentDiscoveryError({
4718
- availableAgents: this.availableAgents
4719
- });
4720
- }
4721
- } catch (e) {
4722
- throw new import_shared15.CopilotKitMisuseError({
4723
- message: `
4724
- Failed to find or contact agent ${agent.graphId}.
4725
- Make sure the LangGraph API is running and the agent is defined in langgraph.json
4726
-
4727
- See more: https://docs.copilotkit.ai/troubleshooting/common-issues`
4728
- });
4729
- }
4730
- const endpointAgents = data.map((entry) => ({
4731
- name: entry.graph_id,
4732
- id: entry.assistant_id,
4733
- description: ""
4734
- }));
4735
- return [
4736
- ...agents2,
4737
- ...endpointAgents
4738
- ];
4739
- }, Promise.resolve([]));
4740
- return agents;
4707
+ discoverAgentsFromAgui() {
4708
+ return Object.values(this.agents ?? []).map((agent) => ({
4709
+ name: agent.agentName,
4710
+ id: agent.agentId,
4711
+ description: ""
4712
+ }));
4741
4713
  }
4742
4714
  async loadAgentState(graphqlContext, threadId, agentName) {
4743
4715
  const agents = await this.getAllAgents(graphqlContext);