@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
|
@@ -2,7 +2,7 @@ import {
|
|
|
2
2
|
copilotRuntimeNodeHttpEndpoint,
|
|
3
3
|
getRuntimeInstanceTelemetryInfo,
|
|
4
4
|
telemetry_client_default
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-HBCCZQBE.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-O4WMMGSX.mjs.map
|
|
@@ -2,7 +2,7 @@ import {
|
|
|
2
2
|
getCommonConfig,
|
|
3
3
|
getRuntimeInstanceTelemetryInfo,
|
|
4
4
|
telemetry_client_default
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-HBCCZQBE.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-QF6GPOZV.mjs.map
|
package/dist/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 './lib/integrations/index.js';
|
|
4
4
|
export { copilotRuntimeNodeHttpEndpoint } from './lib/integrations/node-http/index.js';
|
|
5
5
|
export { copilotRuntimeNodeExpressEndpoint } from './lib/integrations/node-express/index.js';
|
package/dist/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",
|
|
@@ -4744,11 +4744,13 @@ var import_rxjs2 = require("rxjs");
|
|
|
4744
4744
|
var import_langgraph_sdk2 = require("@langchain/langgraph-sdk");
|
|
4745
4745
|
|
|
4746
4746
|
// src/lib/runtime/mcp-tools-utils.ts
|
|
4747
|
-
function extractParametersFromSchema(
|
|
4748
|
-
var _a
|
|
4747
|
+
function extractParametersFromSchema(toolOrSchema) {
|
|
4748
|
+
var _a;
|
|
4749
4749
|
const parameters = [];
|
|
4750
|
-
const
|
|
4751
|
-
const
|
|
4750
|
+
const schema = "schema" in (toolOrSchema || {}) ? toolOrSchema.schema : toolOrSchema;
|
|
4751
|
+
const toolParameters = (schema == null ? void 0 : schema.parameters) || ((_a = schema == null ? void 0 : schema.parameters) == null ? void 0 : _a.jsonSchema);
|
|
4752
|
+
const properties = toolParameters == null ? void 0 : toolParameters.properties;
|
|
4753
|
+
const requiredParams = new Set((toolParameters == null ? void 0 : toolParameters.required) || []);
|
|
4752
4754
|
if (!properties) {
|
|
4753
4755
|
return parameters;
|
|
4754
4756
|
}
|
|
@@ -4771,7 +4773,7 @@ __name(extractParametersFromSchema, "extractParametersFromSchema");
|
|
|
4771
4773
|
function convertMCPToolsToActions(mcpTools, mcpEndpoint) {
|
|
4772
4774
|
const actions = [];
|
|
4773
4775
|
for (const [toolName, tool] of Object.entries(mcpTools)) {
|
|
4774
|
-
const parameters = extractParametersFromSchema(tool
|
|
4776
|
+
const parameters = extractParametersFromSchema(tool);
|
|
4775
4777
|
const handler = /* @__PURE__ */ __name(async (params) => {
|
|
4776
4778
|
try {
|
|
4777
4779
|
const result = await tool.execute({
|