@copilotkit/runtime 1.50.0-beta.1 → 1.50.0-beta.2
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 +6 -0
- package/dist/index.d.ts +5 -5
- package/dist/index.js +15 -7
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +15 -7
- package/dist/index.mjs.map +1 -1
- package/package.json +9 -4
- package/src/graphql/message-conversion/agui-to-gql.test.ts +2 -2
- package/src/graphql/message-conversion/gql-to-agui.test.ts +30 -28
- package/src/graphql/message-conversion/roundtrip-conversion.test.ts +8 -8
- package/src/lib/integrations/nextjs/app-router.ts +3 -1
- package/src/lib/integrations/node-http/index.ts +3 -1
- package/src/lib/integrations/shared.ts +2 -2
- package/src/lib/runtime/copilot-runtime.ts +9 -7
package/dist/index.mjs
CHANGED
|
@@ -69,7 +69,7 @@ var require_package = __commonJS({
|
|
|
69
69
|
publishConfig: {
|
|
70
70
|
access: "public"
|
|
71
71
|
},
|
|
72
|
-
version: "1.50.0-beta.
|
|
72
|
+
version: "1.50.0-beta.2",
|
|
73
73
|
sideEffects: false,
|
|
74
74
|
main: "./dist/index.js",
|
|
75
75
|
module: "./dist/index.mjs",
|
|
@@ -118,8 +118,8 @@ var require_package = __commonJS({
|
|
|
118
118
|
dependencies: {
|
|
119
119
|
"@anthropic-ai/sdk": "^0.57.0",
|
|
120
120
|
"@copilotkit/shared": "workspace:*",
|
|
121
|
-
"@copilotkitnext/agent": "0.0.
|
|
122
|
-
"@copilotkitnext/runtime": "0.0.
|
|
121
|
+
"@copilotkitnext/agent": "0.0.23",
|
|
122
|
+
"@copilotkitnext/runtime": "0.0.23",
|
|
123
123
|
"@graphql-yoga/plugin-defer-stream": "^3.3.1",
|
|
124
124
|
"@langchain/aws": "^0.1.9",
|
|
125
125
|
"@langchain/community": "^0.3.29",
|
|
@@ -153,6 +153,11 @@ var require_package = __commonJS({
|
|
|
153
153
|
"@ag-ui/langgraph": ">=0.0.18",
|
|
154
154
|
"@ag-ui/proto": ">=0.0.39"
|
|
155
155
|
},
|
|
156
|
+
peerDependenciesMeta: {
|
|
157
|
+
"@ag-ui/langgraph": {
|
|
158
|
+
optional: true
|
|
159
|
+
}
|
|
160
|
+
},
|
|
156
161
|
keywords: [
|
|
157
162
|
"copilotkit",
|
|
158
163
|
"copilot",
|
|
@@ -3546,7 +3551,6 @@ var CopilotRuntime = class {
|
|
|
3546
3551
|
}
|
|
3547
3552
|
handleServiceAdapter(serviceAdapter) {
|
|
3548
3553
|
this.runtimeArgs.agents = Promise.resolve(this.runtimeArgs.agents ?? {}).then(async (agents) => {
|
|
3549
|
-
var _a;
|
|
3550
3554
|
let agentsList = agents;
|
|
3551
3555
|
const isAgentsListEmpty = !Object.keys(agents).length;
|
|
3552
3556
|
const hasServiceAdapter = Boolean(serviceAdapter);
|
|
@@ -3564,7 +3568,7 @@ var CopilotRuntime = class {
|
|
|
3564
3568
|
model: `${serviceAdapter.provider}/${serviceAdapter.model}`
|
|
3565
3569
|
});
|
|
3566
3570
|
}
|
|
3567
|
-
if (
|
|
3571
|
+
if (this.params.actions) {
|
|
3568
3572
|
const mcpTools = await this.getToolsFromMCP();
|
|
3569
3573
|
agentsList = this.assignToolsToAgents(agents, [
|
|
3570
3574
|
...this.getToolsFromActions(this.params.actions),
|
|
@@ -4718,7 +4722,9 @@ function copilotRuntimeNextJSAppRouterEndpoint(options) {
|
|
|
4718
4722
|
const logger2 = commonConfig.logging;
|
|
4719
4723
|
logger2.debug("Creating NextJS App Router endpoint");
|
|
4720
4724
|
const serviceAdapter = options.serviceAdapter;
|
|
4721
|
-
|
|
4725
|
+
if (serviceAdapter) {
|
|
4726
|
+
options.runtime.handleServiceAdapter(serviceAdapter);
|
|
4727
|
+
}
|
|
4722
4728
|
const copilotRoute = createCopilotEndpointSingleRoute({
|
|
4723
4729
|
runtime: options.runtime.instance,
|
|
4724
4730
|
basePath: options.baseUrl ?? options.endpoint
|
|
@@ -4771,7 +4777,9 @@ function copilotRuntimeNodeHttpEndpoint(options) {
|
|
|
4771
4777
|
const logger2 = commonConfig.logging;
|
|
4772
4778
|
logger2.debug("Creating Node HTTP endpoint");
|
|
4773
4779
|
const serviceAdapter = options.serviceAdapter;
|
|
4774
|
-
|
|
4780
|
+
if (serviceAdapter) {
|
|
4781
|
+
options.runtime.handleServiceAdapter(serviceAdapter);
|
|
4782
|
+
}
|
|
4775
4783
|
const honoApp = createCopilotEndpointSingleRoute({
|
|
4776
4784
|
runtime: options.runtime.instance,
|
|
4777
4785
|
basePath: options.baseUrl ?? options.endpoint
|