@copilotkit/runtime 1.8.4-next.0 → 1.8.4-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.
- package/CHANGELOG.md +8 -0
- package/dist/{chunk-Q7XRW3BU.mjs → chunk-J3MFBKHV.mjs} +2 -2
- package/dist/{chunk-LWYWCDH6.mjs → chunk-K7ZZXZK5.mjs} +2 -2
- package/dist/{chunk-AJD3QANR.mjs → chunk-WVWVPGXI.mjs} +19 -10
- package/dist/{chunk-AJD3QANR.mjs.map → chunk-WVWVPGXI.mjs.map} +1 -1
- package/dist/{chunk-TTHRLA3P.mjs → chunk-ZXFXJVAP.mjs} +2 -2
- package/dist/{copilot-runtime-eb953402.d.ts → copilot-runtime-9347bd66.d.ts} +1 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.js +12 -3
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +7 -7
- package/dist/lib/index.d.ts +1 -1
- package/dist/lib/index.js +12 -3
- package/dist/lib/index.js.map +1 -1
- package/dist/lib/index.mjs +7 -7
- 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 +7 -7
- 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 +3 -3
- 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 +3 -3
- 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 +2 -2
- package/package.json +2 -2
- package/src/lib/runtime/copilot-runtime.ts +6 -3
- /package/dist/{chunk-Q7XRW3BU.mjs.map → chunk-J3MFBKHV.mjs.map} +0 -0
- /package/dist/{chunk-LWYWCDH6.mjs.map → chunk-K7ZZXZK5.mjs.map} +0 -0
- /package/dist/{chunk-TTHRLA3P.mjs.map → chunk-ZXFXJVAP.mjs.map} +0 -0
|
@@ -2,7 +2,7 @@ import {
|
|
|
2
2
|
copilotRuntimeNodeHttpEndpoint,
|
|
3
3
|
getRuntimeInstanceTelemetryInfo,
|
|
4
4
|
telemetry_client_default
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-WVWVPGXI.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-
|
|
25
|
+
//# sourceMappingURL=chunk-ZXFXJVAP.mjs.map
|
|
@@ -299,6 +299,7 @@ declare class CopilotRuntime<const T extends Parameter[] | [] = []> {
|
|
|
299
299
|
private onAfterRequest?;
|
|
300
300
|
private delegateAgentProcessingToServiceAdapter;
|
|
301
301
|
private observability?;
|
|
302
|
+
private availableAgents;
|
|
302
303
|
constructor(params?: CopilotRuntimeConstructorParams<T>);
|
|
303
304
|
processRuntimeRequest(request: CopilotRuntimeRequest): Promise<CopilotRuntimeResponse>;
|
|
304
305
|
discoverAgentsFromEndpoints(graphqlContext: GraphQLContext): Promise<AgentWithEndpoint[]>;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { i as CommonConfig, d as CopilotRequestContextProperties, a as CopilotRuntime, C as CopilotRuntimeConstructorParams, k as CopilotRuntimeLogger, e as CreateCopilotRuntimeServerOptions, G as GraphQLContext, L as LogLevel, b as addCustomHeaderPlugin, h as buildSchema, c as copilotKitEndpoint, g as createContext, m as createLogger, f as flattenToolCallsNoDuplicates, j as getCommonConfig, l as langGraphPlatformEndpoint, r as resolveEndpointType } from './copilot-runtime-
|
|
1
|
+
export { i as CommonConfig, d as CopilotRequestContextProperties, a as CopilotRuntime, C as CopilotRuntimeConstructorParams, k as CopilotRuntimeLogger, e as CreateCopilotRuntimeServerOptions, G as GraphQLContext, L as LogLevel, b as addCustomHeaderPlugin, h as buildSchema, c as copilotKitEndpoint, g as createContext, m as createLogger, f as flattenToolCallsNoDuplicates, j as getCommonConfig, l as langGraphPlatformEndpoint, r as resolveEndpointType } from './copilot-runtime-9347bd66.js';
|
|
2
2
|
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-fb9aa3ab.js';
|
|
3
3
|
export { CopilotRuntimeServerInstance, config, copilotRuntimeNextJSAppRouterEndpoint, copilotRuntimeNextJSPagesRouterEndpoint } from './lib/integrations/index.js';
|
|
4
4
|
export { copilotRuntimeNodeHttpEndpoint } from './lib/integrations/node-http/index.js';
|
package/dist/index.js
CHANGED
|
@@ -44,7 +44,7 @@ var require_package = __commonJS({
|
|
|
44
44
|
publishConfig: {
|
|
45
45
|
access: "public"
|
|
46
46
|
},
|
|
47
|
-
version: "1.8.4-next.
|
|
47
|
+
version: "1.8.4-next.1",
|
|
48
48
|
sideEffects: false,
|
|
49
49
|
main: "./dist/index.js",
|
|
50
50
|
module: "./dist/index.mjs",
|
|
@@ -4013,12 +4013,14 @@ var CopilotRuntime = class {
|
|
|
4013
4013
|
onAfterRequest;
|
|
4014
4014
|
delegateAgentProcessingToServiceAdapter;
|
|
4015
4015
|
observability;
|
|
4016
|
+
availableAgents;
|
|
4016
4017
|
constructor(params) {
|
|
4017
4018
|
var _a, _b;
|
|
4018
4019
|
if ((params == null ? void 0 : params.actions) && (params == null ? void 0 : params.remoteEndpoints) && (params == null ? void 0 : params.remoteEndpoints.some((e) => e.type === EndpointType.LangGraphPlatform))) {
|
|
4019
4020
|
console.warn("Actions set in runtime instance will not be available for the agent");
|
|
4020
4021
|
}
|
|
4021
4022
|
this.actions = (params == null ? void 0 : params.actions) || [];
|
|
4023
|
+
this.availableAgents = [];
|
|
4022
4024
|
for (const chain of (params == null ? void 0 : params.langserve) || []) {
|
|
4023
4025
|
const remoteChain = new RemoteChain(chain);
|
|
4024
4026
|
this.langserve.push(remoteChain.toAction());
|
|
@@ -4224,7 +4226,9 @@ please use an LLM adapter instead.`
|
|
|
4224
4226
|
try {
|
|
4225
4227
|
data = await client.assistants.search();
|
|
4226
4228
|
if (data && "detail" in data && data.detail.toLowerCase() === "not found") {
|
|
4227
|
-
throw new import_shared20.CopilotKitAgentDiscoveryError(
|
|
4229
|
+
throw new import_shared20.CopilotKitAgentDiscoveryError({
|
|
4230
|
+
availableAgents: this.availableAgents
|
|
4231
|
+
});
|
|
4228
4232
|
}
|
|
4229
4233
|
} catch (e) {
|
|
4230
4234
|
throw new import_shared20.CopilotKitMisuseError({
|
|
@@ -4289,6 +4293,10 @@ please use an LLM adapter instead.`
|
|
|
4289
4293
|
});
|
|
4290
4294
|
}
|
|
4291
4295
|
}, Promise.resolve([]));
|
|
4296
|
+
this.availableAgents = (await agents ?? []).map((a) => ({
|
|
4297
|
+
name: a.name,
|
|
4298
|
+
id: a.id
|
|
4299
|
+
}));
|
|
4292
4300
|
return agents;
|
|
4293
4301
|
}
|
|
4294
4302
|
async loadAgentState(graphqlContext, threadId, agentName) {
|
|
@@ -4386,7 +4394,8 @@ please use an LLM adapter instead.`
|
|
|
4386
4394
|
const currentAgent = serverSideActions.find((action) => action.name === agentName && isRemoteAgentAction(action));
|
|
4387
4395
|
if (!currentAgent) {
|
|
4388
4396
|
throw new import_shared20.CopilotKitAgentDiscoveryError({
|
|
4389
|
-
agentName
|
|
4397
|
+
agentName,
|
|
4398
|
+
availableAgents: this.availableAgents
|
|
4390
4399
|
});
|
|
4391
4400
|
}
|
|
4392
4401
|
const availableActionsForCurrentAgent = serverSideActions.filter((action) => (
|