@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
package/dist/index.mjs
CHANGED
|
@@ -3,13 +3,13 @@ import {
|
|
|
3
3
|
config,
|
|
4
4
|
copilotRuntimeNextJSAppRouterEndpoint,
|
|
5
5
|
copilotRuntimeNextJSPagesRouterEndpoint
|
|
6
|
-
} from "./chunk-
|
|
7
|
-
import {
|
|
8
|
-
copilotRuntimeNestEndpoint
|
|
9
|
-
} from "./chunk-LWYWCDH6.mjs";
|
|
6
|
+
} from "./chunk-J3MFBKHV.mjs";
|
|
10
7
|
import {
|
|
11
8
|
copilotRuntimeNodeExpressEndpoint
|
|
12
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-ZXFXJVAP.mjs";
|
|
10
|
+
import {
|
|
11
|
+
copilotRuntimeNestEndpoint
|
|
12
|
+
} from "./chunk-K7ZZXZK5.mjs";
|
|
13
13
|
import {
|
|
14
14
|
CopilotRuntime,
|
|
15
15
|
addCustomHeaderPlugin,
|
|
@@ -22,7 +22,8 @@ import {
|
|
|
22
22
|
getCommonConfig,
|
|
23
23
|
langGraphPlatformEndpoint,
|
|
24
24
|
resolveEndpointType
|
|
25
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-WVWVPGXI.mjs";
|
|
26
|
+
import "./chunk-RTFJTJMA.mjs";
|
|
26
27
|
import {
|
|
27
28
|
AnthropicAdapter,
|
|
28
29
|
EmptyAdapter,
|
|
@@ -41,7 +42,6 @@ import {
|
|
|
41
42
|
MessageStreamInterruptedResponse,
|
|
42
43
|
UnknownErrorResponse
|
|
43
44
|
} from "./chunk-5BIEM2UU.mjs";
|
|
44
|
-
import "./chunk-RTFJTJMA.mjs";
|
|
45
45
|
import "./chunk-2OZAGFV3.mjs";
|
|
46
46
|
import "./chunk-FHD4JECV.mjs";
|
|
47
47
|
|
package/dist/lib/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 './integrations/index.js';
|
|
4
4
|
export { copilotRuntimeNodeHttpEndpoint } from './integrations/node-http/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.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",
|
|
@@ -3677,12 +3677,14 @@ var CopilotRuntime = class {
|
|
|
3677
3677
|
onAfterRequest;
|
|
3678
3678
|
delegateAgentProcessingToServiceAdapter;
|
|
3679
3679
|
observability;
|
|
3680
|
+
availableAgents;
|
|
3680
3681
|
constructor(params) {
|
|
3681
3682
|
var _a, _b;
|
|
3682
3683
|
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))) {
|
|
3683
3684
|
console.warn("Actions set in runtime instance will not be available for the agent");
|
|
3684
3685
|
}
|
|
3685
3686
|
this.actions = (params == null ? void 0 : params.actions) || [];
|
|
3687
|
+
this.availableAgents = [];
|
|
3686
3688
|
for (const chain of (params == null ? void 0 : params.langserve) || []) {
|
|
3687
3689
|
const remoteChain = new RemoteChain(chain);
|
|
3688
3690
|
this.langserve.push(remoteChain.toAction());
|
|
@@ -3888,7 +3890,9 @@ please use an LLM adapter instead.`
|
|
|
3888
3890
|
try {
|
|
3889
3891
|
data = await client.assistants.search();
|
|
3890
3892
|
if (data && "detail" in data && data.detail.toLowerCase() === "not found") {
|
|
3891
|
-
throw new import_shared18.CopilotKitAgentDiscoveryError(
|
|
3893
|
+
throw new import_shared18.CopilotKitAgentDiscoveryError({
|
|
3894
|
+
availableAgents: this.availableAgents
|
|
3895
|
+
});
|
|
3892
3896
|
}
|
|
3893
3897
|
} catch (e) {
|
|
3894
3898
|
throw new import_shared18.CopilotKitMisuseError({
|
|
@@ -3953,6 +3957,10 @@ please use an LLM adapter instead.`
|
|
|
3953
3957
|
});
|
|
3954
3958
|
}
|
|
3955
3959
|
}, Promise.resolve([]));
|
|
3960
|
+
this.availableAgents = (await agents ?? []).map((a) => ({
|
|
3961
|
+
name: a.name,
|
|
3962
|
+
id: a.id
|
|
3963
|
+
}));
|
|
3956
3964
|
return agents;
|
|
3957
3965
|
}
|
|
3958
3966
|
async loadAgentState(graphqlContext, threadId, agentName) {
|
|
@@ -4050,7 +4058,8 @@ please use an LLM adapter instead.`
|
|
|
4050
4058
|
const currentAgent = serverSideActions.find((action) => action.name === agentName && isRemoteAgentAction(action));
|
|
4051
4059
|
if (!currentAgent) {
|
|
4052
4060
|
throw new import_shared18.CopilotKitAgentDiscoveryError({
|
|
4053
|
-
agentName
|
|
4061
|
+
agentName,
|
|
4062
|
+
availableAgents: this.availableAgents
|
|
4054
4063
|
});
|
|
4055
4064
|
}
|
|
4056
4065
|
const availableActionsForCurrentAgent = serverSideActions.filter((action) => (
|