@copilotkit/runtime 1.8.3 → 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 +14 -0
- package/dist/{chunk-YAGK34TY.mjs → chunk-J3MFBKHV.mjs} +2 -2
- package/dist/{chunk-3QQN3UHZ.mjs → chunk-K7ZZXZK5.mjs} +2 -2
- package/dist/{chunk-4PYMUXNW.mjs → chunk-WVWVPGXI.mjs} +19 -10
- package/dist/chunk-WVWVPGXI.mjs.map +1 -0
- package/dist/{chunk-GWEVSIPK.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-4PYMUXNW.mjs.map +0 -1
- /package/dist/{chunk-YAGK34TY.mjs.map → chunk-J3MFBKHV.mjs.map} +0 -0
- /package/dist/{chunk-3QQN3UHZ.mjs.map → chunk-K7ZZXZK5.mjs.map} +0 -0
- /package/dist/{chunk-GWEVSIPK.mjs.map → chunk-ZXFXJVAP.mjs.map} +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# @copilotkit/runtime
|
|
2
2
|
|
|
3
|
+
## 1.8.4-next.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- f363760: - fix: when unable to find specified agent, show what's available
|
|
8
|
+
- Updated dependencies [f363760]
|
|
9
|
+
- @copilotkit/shared@1.8.4-next.1
|
|
10
|
+
|
|
11
|
+
## 1.8.4-next.0
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- @copilotkit/shared@1.8.4-next.0
|
|
16
|
+
|
|
3
17
|
## 1.8.3
|
|
4
18
|
|
|
5
19
|
### Patch Changes
|
|
@@ -2,7 +2,7 @@ import {
|
|
|
2
2
|
getCommonConfig,
|
|
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";
|
|
@@ -77,4 +77,4 @@ export {
|
|
|
77
77
|
config,
|
|
78
78
|
copilotRuntimeNextJSPagesRouterEndpoint
|
|
79
79
|
};
|
|
80
|
-
//# sourceMappingURL=chunk-
|
|
80
|
+
//# sourceMappingURL=chunk-J3MFBKHV.mjs.map
|
|
@@ -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(copilotRuntimeNestEndpoint, "copilotRuntimeNestEndpoint");
|
|
|
22
22
|
export {
|
|
23
23
|
copilotRuntimeNestEndpoint
|
|
24
24
|
};
|
|
25
|
-
//# sourceMappingURL=chunk-
|
|
25
|
+
//# sourceMappingURL=chunk-K7ZZXZK5.mjs.map
|
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
import {
|
|
2
|
+
ActionExecutionMessage,
|
|
3
|
+
AgentStateMessage,
|
|
4
|
+
ResultMessage,
|
|
5
|
+
TextMessage
|
|
6
|
+
} from "./chunk-RTFJTJMA.mjs";
|
|
1
7
|
import {
|
|
2
8
|
EmptyAdapter,
|
|
3
9
|
RemoteChain,
|
|
@@ -10,12 +16,6 @@ import {
|
|
|
10
16
|
SuccessResponseStatus,
|
|
11
17
|
UnknownErrorResponse
|
|
12
18
|
} from "./chunk-5BIEM2UU.mjs";
|
|
13
|
-
import {
|
|
14
|
-
ActionExecutionMessage,
|
|
15
|
-
AgentStateMessage,
|
|
16
|
-
ResultMessage,
|
|
17
|
-
TextMessage
|
|
18
|
-
} from "./chunk-RTFJTJMA.mjs";
|
|
19
19
|
import {
|
|
20
20
|
BaseMessageInput
|
|
21
21
|
} from "./chunk-2OZAGFV3.mjs";
|
|
@@ -39,7 +39,7 @@ var require_package = __commonJS({
|
|
|
39
39
|
publishConfig: {
|
|
40
40
|
access: "public"
|
|
41
41
|
},
|
|
42
|
-
version: "1.8.
|
|
42
|
+
version: "1.8.4-next.1",
|
|
43
43
|
sideEffects: false,
|
|
44
44
|
main: "./dist/index.js",
|
|
45
45
|
module: "./dist/index.mjs",
|
|
@@ -2716,12 +2716,14 @@ var CopilotRuntime = class {
|
|
|
2716
2716
|
onAfterRequest;
|
|
2717
2717
|
delegateAgentProcessingToServiceAdapter;
|
|
2718
2718
|
observability;
|
|
2719
|
+
availableAgents;
|
|
2719
2720
|
constructor(params) {
|
|
2720
2721
|
var _a, _b;
|
|
2721
2722
|
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))) {
|
|
2722
2723
|
console.warn("Actions set in runtime instance will not be available for the agent");
|
|
2723
2724
|
}
|
|
2724
2725
|
this.actions = (params == null ? void 0 : params.actions) || [];
|
|
2726
|
+
this.availableAgents = [];
|
|
2725
2727
|
for (const chain of (params == null ? void 0 : params.langserve) || []) {
|
|
2726
2728
|
const remoteChain = new RemoteChain(chain);
|
|
2727
2729
|
this.langserve.push(remoteChain.toAction());
|
|
@@ -2927,7 +2929,9 @@ please use an LLM adapter instead.`
|
|
|
2927
2929
|
try {
|
|
2928
2930
|
data = await client.assistants.search();
|
|
2929
2931
|
if (data && "detail" in data && data.detail.toLowerCase() === "not found") {
|
|
2930
|
-
throw new CopilotKitAgentDiscoveryError(
|
|
2932
|
+
throw new CopilotKitAgentDiscoveryError({
|
|
2933
|
+
availableAgents: this.availableAgents
|
|
2934
|
+
});
|
|
2931
2935
|
}
|
|
2932
2936
|
} catch (e) {
|
|
2933
2937
|
throw new CopilotKitMisuseError({
|
|
@@ -2992,6 +2996,10 @@ please use an LLM adapter instead.`
|
|
|
2992
2996
|
});
|
|
2993
2997
|
}
|
|
2994
2998
|
}, Promise.resolve([]));
|
|
2999
|
+
this.availableAgents = (await agents ?? []).map((a) => ({
|
|
3000
|
+
name: a.name,
|
|
3001
|
+
id: a.id
|
|
3002
|
+
}));
|
|
2995
3003
|
return agents;
|
|
2996
3004
|
}
|
|
2997
3005
|
async loadAgentState(graphqlContext, threadId, agentName) {
|
|
@@ -3089,7 +3097,8 @@ please use an LLM adapter instead.`
|
|
|
3089
3097
|
const currentAgent = serverSideActions.find((action) => action.name === agentName && isRemoteAgentAction(action));
|
|
3090
3098
|
if (!currentAgent) {
|
|
3091
3099
|
throw new CopilotKitAgentDiscoveryError({
|
|
3092
|
-
agentName
|
|
3100
|
+
agentName,
|
|
3101
|
+
availableAgents: this.availableAgents
|
|
3093
3102
|
});
|
|
3094
3103
|
}
|
|
3095
3104
|
const availableActionsForCurrentAgent = serverSideActions.filter((action) => (
|
|
@@ -4572,4 +4581,4 @@ export {
|
|
|
4572
4581
|
getCommonConfig,
|
|
4573
4582
|
copilotRuntimeNodeHttpEndpoint
|
|
4574
4583
|
};
|
|
4575
|
-
//# sourceMappingURL=chunk-
|
|
4584
|
+
//# sourceMappingURL=chunk-WVWVPGXI.mjs.map
|