@mcpc-tech/core 0.3.16 → 0.3.17

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 (3) hide show
  1. package/index.cjs +10 -10
  2. package/index.mjs +11 -11
  3. package/package.json +1 -1
package/index.cjs CHANGED
@@ -20966,13 +20966,13 @@ var mode_ai_sampling_plugin_default = createAISamplingModePlugin();
20966
20966
  var import_acp_ai_provider = require("@mcpc-tech/acp-ai-provider");
20967
20967
  var AIACPExecutor = class extends BaseAIExecutor {
20968
20968
  acpSettings;
20969
- clientTools;
20969
+ tools;
20970
20970
  provider = null;
20971
20971
  model = null;
20972
20972
  constructor(config2) {
20973
20973
  super(config2);
20974
20974
  this.acpSettings = config2.acpSettings;
20975
- this.clientTools = config2.clientTools ?? [];
20975
+ this.tools = config2.tools;
20976
20976
  }
20977
20977
  initProvider() {
20978
20978
  if (!this.model) {
@@ -20989,21 +20989,21 @@ var AIACPExecutor = class extends BaseAIExecutor {
20989
20989
  return "acp";
20990
20990
  }
20991
20991
  getToolListDescription() {
20992
- if (this.clientTools.length === 0) {
20993
- return "Tools will be provided by AI SDK";
20992
+ if (this.tools.length === 0) {
20993
+ return "Tools will be provided by ACP agent";
20994
20994
  }
20995
- return this.clientTools.map(([name, detail]) => `- ${name}: ${detail.description || "No description"}`).join("\n");
20995
+ return this.tools.map(([name, detail]) => `- ${name}: ${detail.description || "No description"}`).join("\n");
20996
20996
  }
20997
20997
  buildTools() {
20998
20998
  const aiTools = {};
20999
- for (const [name, detail] of this.clientTools) {
20999
+ for (const [name, detail] of this.tools) {
21000
21000
  if (!detail.execute) continue;
21001
21001
  aiTools[name] = this.convertToAISDKTool(name, detail, async (input) => {
21002
21002
  const result = await detail.execute(input);
21003
21003
  return this.formatResult(result);
21004
21004
  });
21005
21005
  }
21006
- return aiTools;
21006
+ return (0, import_acp_ai_provider.acpTools)(aiTools);
21007
21007
  }
21008
21008
  formatResult(result) {
21009
21009
  const texts = result.content?.filter((c) => c.type === "text").map((c) => c.text);
@@ -21024,13 +21024,13 @@ var AIACPExecutor = class extends BaseAIExecutor {
21024
21024
 
21025
21025
  // __mcpc__core_latest/node_modules/@mcpc/core/src/executors/ai/ai-acp-registrar.js
21026
21026
  function registerAIACPTool(server, params) {
21027
- const { name, description, allToolNames, depGroups, acpSettings, clientTools = [], maxSteps = 50, tracingEnabled = false } = params;
21027
+ const { name, description, allToolNames, depGroups, toolNameToDetailList, acpSettings, maxSteps = 50, tracingEnabled = false } = params;
21028
21028
  const createArgsDef = createArgsDefFactory(name, allToolNames, depGroups, void 0, void 0);
21029
21029
  const executor = new AIACPExecutor({
21030
21030
  name,
21031
21031
  description,
21032
21032
  acpSettings,
21033
- clientTools,
21033
+ tools: toolNameToDetailList,
21034
21034
  maxSteps,
21035
21035
  tracingEnabled
21036
21036
  });
@@ -21069,8 +21069,8 @@ var createAIACPModePlugin = () => ({
21069
21069
  name: context2.name,
21070
21070
  allToolNames: context2.allToolNames,
21071
21071
  depGroups: context2.depGroups,
21072
+ toolNameToDetailList: context2.toolNameToDetailList,
21072
21073
  acpSettings: opts.acpSettings,
21073
- clientTools: opts.clientTools,
21074
21074
  maxSteps: opts.maxSteps,
21075
21075
  tracingEnabled: opts.tracingEnabled
21076
21076
  });
package/index.mjs CHANGED
@@ -20951,16 +20951,16 @@ var createAISamplingModePlugin = () => ({
20951
20951
  var mode_ai_sampling_plugin_default = createAISamplingModePlugin();
20952
20952
 
20953
20953
  // __mcpc__core_latest/node_modules/@mcpc/core/src/executors/ai/ai-acp-executor.js
20954
- import { createACPProvider } from "@mcpc-tech/acp-ai-provider";
20954
+ import { acpTools, createACPProvider } from "@mcpc-tech/acp-ai-provider";
20955
20955
  var AIACPExecutor = class extends BaseAIExecutor {
20956
20956
  acpSettings;
20957
- clientTools;
20957
+ tools;
20958
20958
  provider = null;
20959
20959
  model = null;
20960
20960
  constructor(config2) {
20961
20961
  super(config2);
20962
20962
  this.acpSettings = config2.acpSettings;
20963
- this.clientTools = config2.clientTools ?? [];
20963
+ this.tools = config2.tools;
20964
20964
  }
20965
20965
  initProvider() {
20966
20966
  if (!this.model) {
@@ -20977,21 +20977,21 @@ var AIACPExecutor = class extends BaseAIExecutor {
20977
20977
  return "acp";
20978
20978
  }
20979
20979
  getToolListDescription() {
20980
- if (this.clientTools.length === 0) {
20981
- return "Tools will be provided by AI SDK";
20980
+ if (this.tools.length === 0) {
20981
+ return "Tools will be provided by ACP agent";
20982
20982
  }
20983
- return this.clientTools.map(([name, detail]) => `- ${name}: ${detail.description || "No description"}`).join("\n");
20983
+ return this.tools.map(([name, detail]) => `- ${name}: ${detail.description || "No description"}`).join("\n");
20984
20984
  }
20985
20985
  buildTools() {
20986
20986
  const aiTools = {};
20987
- for (const [name, detail] of this.clientTools) {
20987
+ for (const [name, detail] of this.tools) {
20988
20988
  if (!detail.execute) continue;
20989
20989
  aiTools[name] = this.convertToAISDKTool(name, detail, async (input) => {
20990
20990
  const result = await detail.execute(input);
20991
20991
  return this.formatResult(result);
20992
20992
  });
20993
20993
  }
20994
- return aiTools;
20994
+ return acpTools(aiTools);
20995
20995
  }
20996
20996
  formatResult(result) {
20997
20997
  const texts = result.content?.filter((c) => c.type === "text").map((c) => c.text);
@@ -21012,13 +21012,13 @@ var AIACPExecutor = class extends BaseAIExecutor {
21012
21012
 
21013
21013
  // __mcpc__core_latest/node_modules/@mcpc/core/src/executors/ai/ai-acp-registrar.js
21014
21014
  function registerAIACPTool(server, params) {
21015
- const { name, description, allToolNames, depGroups, acpSettings, clientTools = [], maxSteps = 50, tracingEnabled = false } = params;
21015
+ const { name, description, allToolNames, depGroups, toolNameToDetailList, acpSettings, maxSteps = 50, tracingEnabled = false } = params;
21016
21016
  const createArgsDef = createArgsDefFactory(name, allToolNames, depGroups, void 0, void 0);
21017
21017
  const executor = new AIACPExecutor({
21018
21018
  name,
21019
21019
  description,
21020
21020
  acpSettings,
21021
- clientTools,
21021
+ tools: toolNameToDetailList,
21022
21022
  maxSteps,
21023
21023
  tracingEnabled
21024
21024
  });
@@ -21057,8 +21057,8 @@ var createAIACPModePlugin = () => ({
21057
21057
  name: context2.name,
21058
21058
  allToolNames: context2.allToolNames,
21059
21059
  depGroups: context2.depGroups,
21060
+ toolNameToDetailList: context2.toolNameToDetailList,
21060
21061
  acpSettings: opts.acpSettings,
21061
- clientTools: opts.clientTools,
21062
21062
  maxSteps: opts.maxSteps,
21063
21063
  tracingEnabled: opts.tracingEnabled
21064
21064
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mcpc-tech/core",
3
- "version": "0.3.16",
3
+ "version": "0.3.17",
4
4
  "homepage": "https://jsr.io/@mcpc/core",
5
5
  "dependencies": {
6
6
  "@ai-sdk/provider": "^2.0.0",