@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.
- package/CHANGELOG.md +13 -0
- package/dist/{chunk-5OK4GLKL.mjs → chunk-26EZI2OL.mjs} +2 -2
- package/dist/{chunk-VBXBFZEL.mjs → chunk-5242BPKE.mjs} +2 -2
- package/dist/{chunk-PMIAGZGS.mjs → chunk-67FD4ROM.mjs} +10 -38
- package/dist/chunk-67FD4ROM.mjs.map +1 -0
- package/dist/{chunk-TOBFVWZU.mjs → chunk-QYYJ4HZT.mjs} +2 -2
- package/dist/{chunk-6RUTA76W.mjs → chunk-XRRSRDZR.mjs} +2 -2
- package/dist/index.d.ts +1 -1
- package/dist/index.js +9 -37
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +5 -5
- package/dist/lib/index.d.ts +1 -1
- package/dist/lib/index.js +9 -37
- package/dist/lib/index.js.map +1 -1
- package/dist/lib/index.mjs +5 -5
- package/dist/lib/integrations/index.d.ts +2 -2
- package/dist/lib/integrations/index.js +1 -1
- package/dist/lib/integrations/index.js.map +1 -1
- package/dist/lib/integrations/index.mjs +4 -4
- package/dist/lib/integrations/nest/index.d.ts +1 -1
- package/dist/lib/integrations/nest/index.js +1 -1
- package/dist/lib/integrations/nest/index.js.map +1 -1
- package/dist/lib/integrations/nest/index.mjs +2 -2
- package/dist/lib/integrations/node-express/index.d.ts +1 -1
- package/dist/lib/integrations/node-express/index.js +1 -1
- package/dist/lib/integrations/node-express/index.js.map +1 -1
- package/dist/lib/integrations/node-express/index.mjs +2 -2
- package/dist/lib/integrations/node-http/index.d.ts +1 -1
- package/dist/lib/integrations/node-http/index.js +1 -1
- package/dist/lib/integrations/node-http/index.js.map +1 -1
- package/dist/lib/integrations/node-http/index.mjs +1 -1
- package/dist/{shared-bd953ebf.d.ts → shared-4164c674.d.ts} +1 -1
- package/package.json +2 -2
- package/src/lib/runtime/copilot-runtime.ts +8 -37
- package/dist/chunk-PMIAGZGS.mjs.map +0 -1
- /package/dist/{chunk-5OK4GLKL.mjs.map → chunk-26EZI2OL.mjs.map} +0 -0
- /package/dist/{chunk-VBXBFZEL.mjs.map → chunk-5242BPKE.mjs.map} +0 -0
- /package/dist/{chunk-TOBFVWZU.mjs.map → chunk-QYYJ4HZT.mjs.map} +0 -0
- /package/dist/{chunk-6RUTA76W.mjs.map → chunk-XRRSRDZR.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-
|
|
4
|
+
} from "./chunk-26EZI2OL.mjs";
|
|
5
5
|
import {
|
|
6
6
|
config,
|
|
7
7
|
copilotRuntimeNextJSAppRouterEndpoint,
|
|
8
8
|
copilotRuntimeNextJSPagesRouterEndpoint
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-XRRSRDZR.mjs";
|
|
10
10
|
import {
|
|
11
11
|
copilotRuntimeNestEndpoint
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-QYYJ4HZT.mjs";
|
|
13
13
|
import {
|
|
14
14
|
copilotRuntimeNodeExpressEndpoint
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-5242BPKE.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-
|
|
31
|
+
} from "./chunk-67FD4ROM.mjs";
|
|
32
32
|
import "./chunk-SHBDMA63.mjs";
|
|
33
33
|
import {
|
|
34
34
|
AnthropicAdapter,
|
package/dist/lib/index.d.ts
CHANGED
|
@@ -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-
|
|
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.
|
|
47
|
+
version: "1.9.2-next.12",
|
|
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
|
|
4607
|
-
|
|
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
|
-
|
|
4710
|
-
|
|
4711
|
-
|
|
4712
|
-
|
|
4713
|
-
|
|
4714
|
-
|
|
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);
|