@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.
Files changed (36) hide show
  1. package/CHANGELOG.md +7 -0
  2. package/dist/{chunk-62XKONGF.mjs → chunk-3UU33HF6.mjs} +2 -2
  3. package/dist/{chunk-XXKM3PJL.mjs → chunk-HBCCZQBE.mjs} +9 -7
  4. package/dist/{chunk-XXKM3PJL.mjs.map → chunk-HBCCZQBE.mjs.map} +1 -1
  5. package/dist/{chunk-YM7JEVJF.mjs → chunk-O4WMMGSX.mjs} +2 -2
  6. package/dist/{chunk-5TUGSSSM.mjs → chunk-QF6GPOZV.mjs} +2 -2
  7. package/dist/index.d.ts +1 -1
  8. package/dist/index.js +8 -6
  9. package/dist/index.js.map +1 -1
  10. package/dist/index.mjs +4 -4
  11. package/dist/lib/index.d.ts +1 -1
  12. package/dist/lib/index.js +8 -6
  13. package/dist/lib/index.js.map +1 -1
  14. package/dist/lib/index.mjs +4 -4
  15. package/dist/lib/integrations/index.d.ts +2 -2
  16. package/dist/lib/integrations/index.js +1 -1
  17. package/dist/lib/integrations/index.js.map +1 -1
  18. package/dist/lib/integrations/index.mjs +4 -4
  19. package/dist/lib/integrations/nest/index.d.ts +1 -1
  20. package/dist/lib/integrations/nest/index.js +1 -1
  21. package/dist/lib/integrations/nest/index.js.map +1 -1
  22. package/dist/lib/integrations/nest/index.mjs +2 -2
  23. package/dist/lib/integrations/node-express/index.d.ts +1 -1
  24. package/dist/lib/integrations/node-express/index.js +1 -1
  25. package/dist/lib/integrations/node-express/index.js.map +1 -1
  26. package/dist/lib/integrations/node-express/index.mjs +2 -2
  27. package/dist/lib/integrations/node-http/index.d.ts +1 -1
  28. package/dist/lib/integrations/node-http/index.js +1 -1
  29. package/dist/lib/integrations/node-http/index.js.map +1 -1
  30. package/dist/lib/integrations/node-http/index.mjs +1 -1
  31. package/dist/{shared-e61e0ebb.d.ts → shared-32a46e93.d.ts} +3 -2
  32. package/package.json +2 -2
  33. package/src/lib/runtime/mcp-tools-utils.ts +16 -5
  34. /package/dist/{chunk-62XKONGF.mjs.map → chunk-3UU33HF6.mjs.map} +0 -0
  35. /package/dist/{chunk-YM7JEVJF.mjs.map → chunk-O4WMMGSX.mjs.map} +0 -0
  36. /package/dist/{chunk-5TUGSSSM.mjs.map → chunk-QF6GPOZV.mjs.map} +0 -0
package/CHANGELOG.md CHANGED
@@ -1,5 +1,12 @@
1
1
  # @copilotkit/runtime
2
2
 
3
+ ## 1.8.8-next.1
4
+
5
+ ### Patch Changes
6
+
7
+ - 8c26335: - fix: update MCP tool parameter extraction to handle full tool objects
8
+ - @copilotkit/shared@1.8.8-next.1
9
+
3
10
  ## 1.8.8-next.0
4
11
 
5
12
  ### Patch Changes
@@ -2,7 +2,7 @@ import {
2
2
  copilotRuntimeNodeHttpEndpoint,
3
3
  getRuntimeInstanceTelemetryInfo,
4
4
  telemetry_client_default
5
- } from "./chunk-XXKM3PJL.mjs";
5
+ } from "./chunk-HBCCZQBE.mjs";
6
6
  import {
7
7
  __name
8
8
  } from "./chunk-FHD4JECV.mjs";
@@ -22,4 +22,4 @@ __name(copilotRuntimeNodeExpressEndpoint, "copilotRuntimeNodeExpressEndpoint");
22
22
  export {
23
23
  copilotRuntimeNodeExpressEndpoint
24
24
  };
25
- //# sourceMappingURL=chunk-62XKONGF.mjs.map
25
+ //# sourceMappingURL=chunk-3UU33HF6.mjs.map
@@ -40,7 +40,7 @@ var require_package = __commonJS({
40
40
  publishConfig: {
41
41
  access: "public"
42
42
  },
43
- version: "1.8.8-next.0",
43
+ version: "1.8.8-next.1",
44
44
  sideEffects: false,
45
45
  main: "./dist/index.js",
46
46
  module: "./dist/index.mjs",
@@ -2958,11 +2958,13 @@ import { from } from "rxjs";
2958
2958
  import { Client as LangGraphClient2 } from "@langchain/langgraph-sdk";
2959
2959
 
2960
2960
  // src/lib/runtime/mcp-tools-utils.ts
2961
- function extractParametersFromSchema(toolSchema) {
2962
- var _a, _b;
2961
+ function extractParametersFromSchema(toolOrSchema) {
2962
+ var _a;
2963
2963
  const parameters = [];
2964
- const properties = (_a = toolSchema == null ? void 0 : toolSchema.parameters) == null ? void 0 : _a.properties;
2965
- const requiredParams = new Set(((_b = toolSchema == null ? void 0 : toolSchema.parameters) == null ? void 0 : _b.required) || []);
2964
+ const schema = "schema" in (toolOrSchema || {}) ? toolOrSchema.schema : toolOrSchema;
2965
+ const toolParameters = (schema == null ? void 0 : schema.parameters) || ((_a = schema == null ? void 0 : schema.parameters) == null ? void 0 : _a.jsonSchema);
2966
+ const properties = toolParameters == null ? void 0 : toolParameters.properties;
2967
+ const requiredParams = new Set((toolParameters == null ? void 0 : toolParameters.required) || []);
2966
2968
  if (!properties) {
2967
2969
  return parameters;
2968
2970
  }
@@ -2985,7 +2987,7 @@ __name(extractParametersFromSchema, "extractParametersFromSchema");
2985
2987
  function convertMCPToolsToActions(mcpTools, mcpEndpoint) {
2986
2988
  const actions = [];
2987
2989
  for (const [toolName, tool] of Object.entries(mcpTools)) {
2988
- const parameters = extractParametersFromSchema(tool.schema);
2990
+ const parameters = extractParametersFromSchema(tool);
2989
2991
  const handler = /* @__PURE__ */ __name(async (params) => {
2990
2992
  try {
2991
2993
  const result = await tool.execute({
@@ -4995,4 +4997,4 @@ export {
4995
4997
  getCommonConfig,
4996
4998
  copilotRuntimeNodeHttpEndpoint
4997
4999
  };
4998
- //# sourceMappingURL=chunk-XXKM3PJL.mjs.map
5000
+ //# sourceMappingURL=chunk-HBCCZQBE.mjs.map