@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.
- package/CHANGELOG.md +7 -0
- package/dist/{chunk-TOBFVWZU.mjs → chunk-B2BL6HPT.mjs} +2 -2
- package/dist/{chunk-6RUTA76W.mjs → chunk-CBVVBPVJ.mjs} +2 -2
- package/dist/{chunk-PMIAGZGS.mjs → chunk-NI7RVCMB.mjs} +10 -38
- package/dist/chunk-NI7RVCMB.mjs.map +1 -0
- package/dist/{chunk-5OK4GLKL.mjs → chunk-VVXCPFVN.mjs} +2 -2
- package/dist/{chunk-VBXBFZEL.mjs → chunk-ZIEDTGZF.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-TOBFVWZU.mjs.map → chunk-B2BL6HPT.mjs.map} +0 -0
- /package/dist/{chunk-6RUTA76W.mjs.map → chunk-CBVVBPVJ.mjs.map} +0 -0
- /package/dist/{chunk-5OK4GLKL.mjs.map → chunk-VVXCPFVN.mjs.map} +0 -0
- /package/dist/{chunk-VBXBFZEL.mjs.map → chunk-ZIEDTGZF.mjs.map} +0 -0
|
@@ -378,7 +378,7 @@ declare class CopilotRuntime<const T extends Parameter[] | [] = []> {
|
|
|
378
378
|
processRuntimeRequest(request: CopilotRuntimeRequest): Promise<CopilotRuntimeResponse>;
|
|
379
379
|
getAllAgents(graphqlContext: GraphQLContext): Promise<(AgentWithEndpoint | Agent)[]>;
|
|
380
380
|
discoverAgentsFromEndpoints(graphqlContext: GraphQLContext): Promise<AgentWithEndpoint[]>;
|
|
381
|
-
discoverAgentsFromAgui():
|
|
381
|
+
discoverAgentsFromAgui(): Agent[];
|
|
382
382
|
loadAgentState(graphqlContext: GraphQLContext, threadId: string, agentName: string): Promise<LoadAgentStateResponse>;
|
|
383
383
|
private processAgentRequest;
|
|
384
384
|
private getServerSideActions;
|
package/package.json
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
"publishConfig": {
|
|
10
10
|
"access": "public"
|
|
11
11
|
},
|
|
12
|
-
"version": "1.9.2-next.
|
|
12
|
+
"version": "1.9.2-next.11",
|
|
13
13
|
"sideEffects": false,
|
|
14
14
|
"main": "./dist/index.js",
|
|
15
15
|
"module": "./dist/index.mjs",
|
|
@@ -66,7 +66,7 @@
|
|
|
66
66
|
"rxjs": "7.8.1",
|
|
67
67
|
"type-graphql": "2.0.0-rc.1",
|
|
68
68
|
"zod": "^3.23.3",
|
|
69
|
-
"@copilotkit/shared": "1.9.2-next.
|
|
69
|
+
"@copilotkit/shared": "1.9.2-next.11"
|
|
70
70
|
},
|
|
71
71
|
"peerDependencies": {
|
|
72
72
|
"@ag-ui/client": ">=0.0.28",
|
|
@@ -787,10 +787,8 @@ please use an LLM adapter instead.`,
|
|
|
787
787
|
}
|
|
788
788
|
|
|
789
789
|
async getAllAgents(graphqlContext: GraphQLContext): Promise<(AgentWithEndpoint | Agent)[]> {
|
|
790
|
-
const
|
|
791
|
-
|
|
792
|
-
this.discoverAgentsFromAgui(),
|
|
793
|
-
]);
|
|
790
|
+
const agentsWithEndpoints = await this.discoverAgentsFromEndpoints(graphqlContext);
|
|
791
|
+
const aguiAgents = this.discoverAgentsFromAgui();
|
|
794
792
|
|
|
795
793
|
this.availableAgents = [...agentsWithEndpoints, ...aguiAgents].map((a) => ({
|
|
796
794
|
name: a.name,
|
|
@@ -885,39 +883,12 @@ please use an LLM adapter instead.`,
|
|
|
885
883
|
return agents;
|
|
886
884
|
}
|
|
887
885
|
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
let data: Array<{ assistant_id: string; graph_id: string }> | { detail: string } = [];
|
|
895
|
-
try {
|
|
896
|
-
data = await client.assistants.search();
|
|
897
|
-
|
|
898
|
-
if (data && "detail" in data && (data.detail as string).toLowerCase() === "not found") {
|
|
899
|
-
throw new CopilotKitAgentDiscoveryError({ availableAgents: this.availableAgents });
|
|
900
|
-
}
|
|
901
|
-
} catch (e) {
|
|
902
|
-
throw new CopilotKitMisuseError({
|
|
903
|
-
message: `
|
|
904
|
-
Failed to find or contact agent ${agent.graphId}.
|
|
905
|
-
Make sure the LangGraph API is running and the agent is defined in langgraph.json
|
|
906
|
-
|
|
907
|
-
See more: https://docs.copilotkit.ai/troubleshooting/common-issues`,
|
|
908
|
-
});
|
|
909
|
-
}
|
|
910
|
-
const endpointAgents = data.map((entry) => ({
|
|
911
|
-
name: entry.graph_id,
|
|
912
|
-
id: entry.assistant_id,
|
|
913
|
-
description: "",
|
|
914
|
-
}));
|
|
915
|
-
return [...agents, ...endpointAgents];
|
|
916
|
-
},
|
|
917
|
-
Promise.resolve([]),
|
|
918
|
-
);
|
|
919
|
-
|
|
920
|
-
return agents;
|
|
886
|
+
discoverAgentsFromAgui(): Agent[] {
|
|
887
|
+
return Object.values(this.agents ?? []).map((agent: LangGraphAgent) => ({
|
|
888
|
+
name: agent.agentName,
|
|
889
|
+
id: agent.agentId,
|
|
890
|
+
description: "",
|
|
891
|
+
}));
|
|
921
892
|
}
|
|
922
893
|
|
|
923
894
|
async loadAgentState(
|