@copilotkit/runtime 1.8.8-next.0 → 1.8.8-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 +7 -0
- package/dist/{chunk-62XKONGF.mjs → chunk-3UU33HF6.mjs} +2 -2
- package/dist/{chunk-XXKM3PJL.mjs → chunk-HBCCZQBE.mjs} +9 -7
- package/dist/{chunk-XXKM3PJL.mjs.map → chunk-HBCCZQBE.mjs.map} +1 -1
- package/dist/{chunk-YM7JEVJF.mjs → chunk-O4WMMGSX.mjs} +2 -2
- package/dist/{chunk-5TUGSSSM.mjs → chunk-QF6GPOZV.mjs} +2 -2
- package/dist/index.d.ts +1 -1
- package/dist/index.js +8 -6
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +4 -4
- package/dist/lib/index.d.ts +1 -1
- package/dist/lib/index.js +8 -6
- package/dist/lib/index.js.map +1 -1
- package/dist/lib/index.mjs +4 -4
- 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 +4 -4
- 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 +2 -2
- 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 +2 -2
- 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 +1 -1
- package/dist/{shared-e61e0ebb.d.ts → shared-32a46e93.d.ts} +3 -2
- package/package.json +2 -2
- package/src/lib/runtime/mcp-tools-utils.ts +16 -5
- /package/dist/{chunk-62XKONGF.mjs.map → chunk-3UU33HF6.mjs.map} +0 -0
- /package/dist/{chunk-YM7JEVJF.mjs.map → chunk-O4WMMGSX.mjs.map} +0 -0
- /package/dist/{chunk-5TUGSSSM.mjs.map → chunk-QF6GPOZV.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-
|
|
6
|
+
} from "./chunk-QF6GPOZV.mjs";
|
|
7
7
|
import {
|
|
8
8
|
copilotRuntimeNestEndpoint
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-O4WMMGSX.mjs";
|
|
10
10
|
import {
|
|
11
11
|
copilotRuntimeNodeExpressEndpoint
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-3UU33HF6.mjs";
|
|
13
13
|
import {
|
|
14
14
|
CopilotRuntime,
|
|
15
15
|
addCustomHeaderPlugin,
|
|
@@ -24,7 +24,7 @@ import {
|
|
|
24
24
|
getCommonConfig,
|
|
25
25
|
langGraphPlatformEndpoint,
|
|
26
26
|
resolveEndpointType
|
|
27
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-HBCCZQBE.mjs";
|
|
28
28
|
import {
|
|
29
29
|
AnthropicAdapter,
|
|
30
30
|
EmptyAdapter,
|
package/dist/lib/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
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-53d3fa48.js';
|
|
2
|
-
export { e as CommonConfig, C as CopilotRequestContextProperties, k as CopilotRuntime, j as CopilotRuntimeConstructorParams, f as CopilotRuntimeLogger, i as CopilotRuntimeRequest, b as CreateCopilotRuntimeServerOptions, G as GraphQLContext, L as LogLevel, o as MCPClient, p as MCPEndpointConfig, M as MCPTool, a as addCustomHeaderPlugin, d as buildSchema, s as convertMCPToolsToActions, m as copilotKitEndpoint, c as createContext, h as createLogger, q as extractParametersFromSchema, l as flattenToolCallsNoDuplicates, g as getCommonConfig, n as langGraphPlatformEndpoint, r as resolveEndpointType } from '../shared-
|
|
2
|
+
export { e as CommonConfig, C as CopilotRequestContextProperties, k as CopilotRuntime, j as CopilotRuntimeConstructorParams, f as CopilotRuntimeLogger, i as CopilotRuntimeRequest, b as CreateCopilotRuntimeServerOptions, G as GraphQLContext, L as LogLevel, o as MCPClient, p as MCPEndpointConfig, M as MCPTool, a as addCustomHeaderPlugin, d as buildSchema, s as convertMCPToolsToActions, m as copilotKitEndpoint, c as createContext, h as createLogger, q as extractParametersFromSchema, l as flattenToolCallsNoDuplicates, g as getCommonConfig, n as langGraphPlatformEndpoint, r as resolveEndpointType } from '../shared-32a46e93.js';
|
|
3
3
|
export { CopilotRuntimeServerInstance, config, copilotRuntimeNextJSAppRouterEndpoint, copilotRuntimeNextJSPagesRouterEndpoint } from './integrations/index.js';
|
|
4
4
|
export { copilotRuntimeNodeHttpEndpoint } from './integrations/node-http/index.js';
|
|
5
5
|
export { copilotRuntimeNodeExpressEndpoint } from './integrations/node-express/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.8-next.
|
|
47
|
+
version: "1.8.8-next.1",
|
|
48
48
|
sideEffects: false,
|
|
49
49
|
main: "./dist/index.js",
|
|
50
50
|
module: "./dist/index.mjs",
|
|
@@ -4377,11 +4377,13 @@ var import_rxjs2 = require("rxjs");
|
|
|
4377
4377
|
var import_langgraph_sdk2 = require("@langchain/langgraph-sdk");
|
|
4378
4378
|
|
|
4379
4379
|
// src/lib/runtime/mcp-tools-utils.ts
|
|
4380
|
-
function extractParametersFromSchema(
|
|
4381
|
-
var _a
|
|
4380
|
+
function extractParametersFromSchema(toolOrSchema) {
|
|
4381
|
+
var _a;
|
|
4382
4382
|
const parameters = [];
|
|
4383
|
-
const
|
|
4384
|
-
const
|
|
4383
|
+
const schema = "schema" in (toolOrSchema || {}) ? toolOrSchema.schema : toolOrSchema;
|
|
4384
|
+
const toolParameters = (schema == null ? void 0 : schema.parameters) || ((_a = schema == null ? void 0 : schema.parameters) == null ? void 0 : _a.jsonSchema);
|
|
4385
|
+
const properties = toolParameters == null ? void 0 : toolParameters.properties;
|
|
4386
|
+
const requiredParams = new Set((toolParameters == null ? void 0 : toolParameters.required) || []);
|
|
4385
4387
|
if (!properties) {
|
|
4386
4388
|
return parameters;
|
|
4387
4389
|
}
|
|
@@ -4404,7 +4406,7 @@ __name(extractParametersFromSchema, "extractParametersFromSchema");
|
|
|
4404
4406
|
function convertMCPToolsToActions(mcpTools, mcpEndpoint) {
|
|
4405
4407
|
const actions = [];
|
|
4406
4408
|
for (const [toolName, tool] of Object.entries(mcpTools)) {
|
|
4407
|
-
const parameters = extractParametersFromSchema(tool
|
|
4409
|
+
const parameters = extractParametersFromSchema(tool);
|
|
4408
4410
|
const handler = /* @__PURE__ */ __name(async (params) => {
|
|
4409
4411
|
try {
|
|
4410
4412
|
const result = await tool.execute({
|