@copilotkit/runtime 1.9.2-next.12 → 1.9.2-next.14
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-26EZI2OL.mjs → chunk-55VUNE6C.mjs} +2 -2
- package/dist/{chunk-67FD4ROM.mjs → chunk-J7IKWG2M.mjs} +24 -24
- package/dist/chunk-J7IKWG2M.mjs.map +1 -0
- package/dist/{chunk-GS7DO47Q.mjs → chunk-JTFQ5GIL.mjs} +1 -25
- package/dist/chunk-JTFQ5GIL.mjs.map +1 -0
- package/dist/{chunk-QYYJ4HZT.mjs → chunk-LHHL56Z2.mjs} +2 -2
- package/dist/{chunk-XRRSRDZR.mjs → chunk-LLFNFIOQ.mjs} +2 -2
- package/dist/{chunk-5242BPKE.mjs → chunk-OXUJLGHK.mjs} +2 -2
- package/dist/index.js +22 -46
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +6 -6
- package/dist/lib/index.js +22 -46
- package/dist/lib/index.js.map +1 -1
- package/dist/lib/index.mjs +6 -6
- package/dist/lib/integrations/index.js +1 -1
- package/dist/lib/integrations/index.js.map +1 -1
- package/dist/lib/integrations/index.mjs +5 -5
- 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.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.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/dist/service-adapters/index.js +0 -24
- package/dist/service-adapters/index.js.map +1 -1
- package/dist/service-adapters/index.mjs +1 -1
- package/package.json +2 -2
- package/src/lib/runtime/copilot-runtime.ts +21 -20
- package/src/service-adapters/openai/openai-adapter.ts +0 -14
- package/dist/chunk-67FD4ROM.mjs.map +0 -1
- package/dist/chunk-GS7DO47Q.mjs.map +0 -1
- /package/dist/{chunk-26EZI2OL.mjs.map → chunk-55VUNE6C.mjs.map} +0 -0
- /package/dist/{chunk-QYYJ4HZT.mjs.map → chunk-LHHL56Z2.mjs.map} +0 -0
- /package/dist/{chunk-XRRSRDZR.mjs.map → chunk-LLFNFIOQ.mjs.map} +0 -0
- /package/dist/{chunk-5242BPKE.mjs.map → chunk-OXUJLGHK.mjs.map} +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# @copilotkit/runtime
|
|
2
2
|
|
|
3
|
+
## 1.9.2-next.14
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 3a7f45f: - fix: resolve agui agents only after all other endpoints
|
|
8
|
+
- @copilotkit/shared@1.9.2-next.14
|
|
9
|
+
|
|
10
|
+
## 1.9.2-next.13
|
|
11
|
+
|
|
12
|
+
### Patch Changes
|
|
13
|
+
|
|
14
|
+
- dec5527: - fix: only fetch agent state for langgraph agents
|
|
15
|
+
- @copilotkit/shared@1.9.2-next.13
|
|
16
|
+
|
|
3
17
|
## 1.9.2-next.12
|
|
4
18
|
|
|
5
19
|
### Patch Changes
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
LangGraphEventTypes
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-J7IKWG2M.mjs";
|
|
4
4
|
import {
|
|
5
5
|
__name
|
|
6
6
|
} from "./chunk-FHD4JECV.mjs";
|
|
@@ -155,4 +155,4 @@ export {
|
|
|
155
155
|
CustomEventNames,
|
|
156
156
|
LangGraphAgent
|
|
157
157
|
};
|
|
158
|
-
//# sourceMappingURL=chunk-
|
|
158
|
+
//# sourceMappingURL=chunk-55VUNE6C.mjs.map
|
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
EmptyAdapter,
|
|
10
10
|
RemoteChain,
|
|
11
11
|
streamLangChainResponse
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-JTFQ5GIL.mjs";
|
|
13
13
|
import {
|
|
14
14
|
GuardrailsValidationFailureResponse,
|
|
15
15
|
MessageStreamInterruptedResponse,
|
|
@@ -40,7 +40,7 @@ var require_package = __commonJS({
|
|
|
40
40
|
publishConfig: {
|
|
41
41
|
access: "public"
|
|
42
42
|
},
|
|
43
|
-
version: "1.9.2-next.
|
|
43
|
+
version: "1.9.2-next.14",
|
|
44
44
|
sideEffects: false,
|
|
45
45
|
main: "./dist/index.js",
|
|
46
46
|
module: "./dist/index.mjs",
|
|
@@ -3165,10 +3165,10 @@ please use an LLM adapter instead.`
|
|
|
3165
3165
|
return agents;
|
|
3166
3166
|
}
|
|
3167
3167
|
discoverAgentsFromAgui() {
|
|
3168
|
-
return Object.
|
|
3169
|
-
name: agent.agentName,
|
|
3170
|
-
id: agent.agentId,
|
|
3171
|
-
description: ""
|
|
3168
|
+
return Object.entries(this.agents ?? []).map(([key, agent]) => ({
|
|
3169
|
+
name: agent.agentName ?? key,
|
|
3170
|
+
id: agent.agentId ?? key,
|
|
3171
|
+
description: agent.description ?? ""
|
|
3172
3172
|
}));
|
|
3173
3173
|
}
|
|
3174
3174
|
async loadAgentState(graphqlContext, threadId, agentName) {
|
|
@@ -3231,25 +3231,25 @@ please use an LLM adapter instead.`
|
|
|
3231
3231
|
const propertyHeaders = graphqlContext.properties.authorization ? {
|
|
3232
3232
|
authorization: `Bearer ${graphqlContext.properties.authorization}`
|
|
3233
3233
|
} : null;
|
|
3234
|
-
let client;
|
|
3235
|
-
if ("endpoint" in agent && agent.endpoint.type === EndpointType.LangGraphPlatform) {
|
|
3236
|
-
client = new LangGraphClient2({
|
|
3237
|
-
apiUrl: agent.endpoint.deploymentUrl,
|
|
3238
|
-
apiKey: agent.endpoint.langsmithApiKey,
|
|
3239
|
-
defaultHeaders: {
|
|
3240
|
-
...propertyHeaders
|
|
3241
|
-
}
|
|
3242
|
-
});
|
|
3243
|
-
} else {
|
|
3244
|
-
const aguiAgent = graphqlContext._copilotkit.runtime.agents[agent.name];
|
|
3245
|
-
if (!aguiAgent) {
|
|
3246
|
-
throw new Error(`Agent: ${agent.name} could not be resolved`);
|
|
3247
|
-
}
|
|
3248
|
-
client = aguiAgent.client;
|
|
3249
|
-
}
|
|
3250
3234
|
let state = {};
|
|
3251
3235
|
try {
|
|
3252
|
-
|
|
3236
|
+
let client;
|
|
3237
|
+
if ("endpoint" in agent && agent.endpoint.type === EndpointType.LangGraphPlatform) {
|
|
3238
|
+
client = new LangGraphClient2({
|
|
3239
|
+
apiUrl: agent.endpoint.deploymentUrl,
|
|
3240
|
+
apiKey: agent.endpoint.langsmithApiKey,
|
|
3241
|
+
defaultHeaders: {
|
|
3242
|
+
...propertyHeaders
|
|
3243
|
+
}
|
|
3244
|
+
});
|
|
3245
|
+
} else {
|
|
3246
|
+
const aguiAgent = graphqlContext._copilotkit.runtime.agents[agent.name];
|
|
3247
|
+
if (!aguiAgent) {
|
|
3248
|
+
throw new Error(`Agent: ${agent.name} could not be resolved`);
|
|
3249
|
+
}
|
|
3250
|
+
client = aguiAgent.client ?? null;
|
|
3251
|
+
}
|
|
3252
|
+
state = client ? (await client.threads.getState(threadId)).values : {};
|
|
3253
3253
|
} catch (error) {
|
|
3254
3254
|
const errorMessage = error instanceof Error ? error.message : String(error);
|
|
3255
3255
|
console.debug(`Agent '${agentName}' configuration issue: ${errorMessage}`);
|
|
@@ -5811,4 +5811,4 @@ export {
|
|
|
5811
5811
|
getCommonConfig,
|
|
5812
5812
|
copilotRuntimeNodeHttpEndpoint
|
|
5813
5813
|
};
|
|
5814
|
-
//# sourceMappingURL=chunk-
|
|
5814
|
+
//# sourceMappingURL=chunk-J7IKWG2M.mjs.map
|