@mcpc-tech/cli 0.1.26 → 0.1.28
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/bin/mcpc.cjs +10 -10
- package/bin/mcpc.mjs +11 -11
- package/package.json +1 -1
package/bin/mcpc.cjs
CHANGED
|
@@ -10870,13 +10870,13 @@ var mode_ai_sampling_plugin_default = createAISamplingModePlugin();
|
|
|
10870
10870
|
var import_acp_ai_provider = require("@mcpc-tech/acp-ai-provider");
|
|
10871
10871
|
var AIACPExecutor = class extends BaseAIExecutor {
|
|
10872
10872
|
acpSettings;
|
|
10873
|
-
|
|
10873
|
+
tools;
|
|
10874
10874
|
provider = null;
|
|
10875
10875
|
model = null;
|
|
10876
10876
|
constructor(config) {
|
|
10877
10877
|
super(config);
|
|
10878
10878
|
this.acpSettings = config.acpSettings;
|
|
10879
|
-
this.
|
|
10879
|
+
this.tools = config.tools;
|
|
10880
10880
|
}
|
|
10881
10881
|
initProvider() {
|
|
10882
10882
|
if (!this.model) {
|
|
@@ -10893,21 +10893,21 @@ var AIACPExecutor = class extends BaseAIExecutor {
|
|
|
10893
10893
|
return "acp";
|
|
10894
10894
|
}
|
|
10895
10895
|
getToolListDescription() {
|
|
10896
|
-
if (this.
|
|
10897
|
-
return "Tools will be provided by
|
|
10896
|
+
if (this.tools.length === 0) {
|
|
10897
|
+
return "Tools will be provided by ACP agent";
|
|
10898
10898
|
}
|
|
10899
|
-
return this.
|
|
10899
|
+
return this.tools.map(([name, detail]) => `- ${name}: ${detail.description || "No description"}`).join("\n");
|
|
10900
10900
|
}
|
|
10901
10901
|
buildTools() {
|
|
10902
10902
|
const aiTools = {};
|
|
10903
|
-
for (const [name, detail] of this.
|
|
10903
|
+
for (const [name, detail] of this.tools) {
|
|
10904
10904
|
if (!detail.execute) continue;
|
|
10905
10905
|
aiTools[name] = this.convertToAISDKTool(name, detail, async (input) => {
|
|
10906
10906
|
const result = await detail.execute(input);
|
|
10907
10907
|
return this.formatResult(result);
|
|
10908
10908
|
});
|
|
10909
10909
|
}
|
|
10910
|
-
return aiTools;
|
|
10910
|
+
return (0, import_acp_ai_provider.acpTools)(aiTools);
|
|
10911
10911
|
}
|
|
10912
10912
|
formatResult(result) {
|
|
10913
10913
|
const texts = result.content?.filter((c) => c.type === "text").map((c) => c.text);
|
|
@@ -10928,13 +10928,13 @@ var AIACPExecutor = class extends BaseAIExecutor {
|
|
|
10928
10928
|
|
|
10929
10929
|
// __mcpc__cli_latest/node_modules/@jsr/mcpc__core/src/executors/ai/ai-acp-registrar.js
|
|
10930
10930
|
function registerAIACPTool(server, params) {
|
|
10931
|
-
const { name, description, allToolNames, depGroups,
|
|
10931
|
+
const { name, description, allToolNames, depGroups, toolNameToDetailList, acpSettings, maxSteps = 50, tracingEnabled = false } = params;
|
|
10932
10932
|
const createArgsDef = createArgsDefFactory(name, allToolNames, depGroups, void 0, void 0);
|
|
10933
10933
|
const executor = new AIACPExecutor({
|
|
10934
10934
|
name,
|
|
10935
10935
|
description,
|
|
10936
10936
|
acpSettings,
|
|
10937
|
-
|
|
10937
|
+
tools: toolNameToDetailList,
|
|
10938
10938
|
maxSteps,
|
|
10939
10939
|
tracingEnabled
|
|
10940
10940
|
});
|
|
@@ -10973,8 +10973,8 @@ var createAIACPModePlugin = () => ({
|
|
|
10973
10973
|
name: context2.name,
|
|
10974
10974
|
allToolNames: context2.allToolNames,
|
|
10975
10975
|
depGroups: context2.depGroups,
|
|
10976
|
+
toolNameToDetailList: context2.toolNameToDetailList,
|
|
10976
10977
|
acpSettings: opts.acpSettings,
|
|
10977
|
-
clientTools: opts.clientTools,
|
|
10978
10978
|
maxSteps: opts.maxSteps,
|
|
10979
10979
|
tracingEnabled: opts.tracingEnabled
|
|
10980
10980
|
});
|
package/bin/mcpc.mjs
CHANGED
|
@@ -10875,16 +10875,16 @@ var createAISamplingModePlugin = () => ({
|
|
|
10875
10875
|
var mode_ai_sampling_plugin_default = createAISamplingModePlugin();
|
|
10876
10876
|
|
|
10877
10877
|
// __mcpc__cli_latest/node_modules/@jsr/mcpc__core/src/executors/ai/ai-acp-executor.js
|
|
10878
|
-
import { createACPProvider } from "@mcpc-tech/acp-ai-provider";
|
|
10878
|
+
import { acpTools, createACPProvider } from "@mcpc-tech/acp-ai-provider";
|
|
10879
10879
|
var AIACPExecutor = class extends BaseAIExecutor {
|
|
10880
10880
|
acpSettings;
|
|
10881
|
-
|
|
10881
|
+
tools;
|
|
10882
10882
|
provider = null;
|
|
10883
10883
|
model = null;
|
|
10884
10884
|
constructor(config) {
|
|
10885
10885
|
super(config);
|
|
10886
10886
|
this.acpSettings = config.acpSettings;
|
|
10887
|
-
this.
|
|
10887
|
+
this.tools = config.tools;
|
|
10888
10888
|
}
|
|
10889
10889
|
initProvider() {
|
|
10890
10890
|
if (!this.model) {
|
|
@@ -10901,21 +10901,21 @@ var AIACPExecutor = class extends BaseAIExecutor {
|
|
|
10901
10901
|
return "acp";
|
|
10902
10902
|
}
|
|
10903
10903
|
getToolListDescription() {
|
|
10904
|
-
if (this.
|
|
10905
|
-
return "Tools will be provided by
|
|
10904
|
+
if (this.tools.length === 0) {
|
|
10905
|
+
return "Tools will be provided by ACP agent";
|
|
10906
10906
|
}
|
|
10907
|
-
return this.
|
|
10907
|
+
return this.tools.map(([name, detail]) => `- ${name}: ${detail.description || "No description"}`).join("\n");
|
|
10908
10908
|
}
|
|
10909
10909
|
buildTools() {
|
|
10910
10910
|
const aiTools = {};
|
|
10911
|
-
for (const [name, detail] of this.
|
|
10911
|
+
for (const [name, detail] of this.tools) {
|
|
10912
10912
|
if (!detail.execute) continue;
|
|
10913
10913
|
aiTools[name] = this.convertToAISDKTool(name, detail, async (input) => {
|
|
10914
10914
|
const result = await detail.execute(input);
|
|
10915
10915
|
return this.formatResult(result);
|
|
10916
10916
|
});
|
|
10917
10917
|
}
|
|
10918
|
-
return aiTools;
|
|
10918
|
+
return acpTools(aiTools);
|
|
10919
10919
|
}
|
|
10920
10920
|
formatResult(result) {
|
|
10921
10921
|
const texts = result.content?.filter((c) => c.type === "text").map((c) => c.text);
|
|
@@ -10936,13 +10936,13 @@ var AIACPExecutor = class extends BaseAIExecutor {
|
|
|
10936
10936
|
|
|
10937
10937
|
// __mcpc__cli_latest/node_modules/@jsr/mcpc__core/src/executors/ai/ai-acp-registrar.js
|
|
10938
10938
|
function registerAIACPTool(server, params) {
|
|
10939
|
-
const { name, description, allToolNames, depGroups,
|
|
10939
|
+
const { name, description, allToolNames, depGroups, toolNameToDetailList, acpSettings, maxSteps = 50, tracingEnabled = false } = params;
|
|
10940
10940
|
const createArgsDef = createArgsDefFactory(name, allToolNames, depGroups, void 0, void 0);
|
|
10941
10941
|
const executor = new AIACPExecutor({
|
|
10942
10942
|
name,
|
|
10943
10943
|
description,
|
|
10944
10944
|
acpSettings,
|
|
10945
|
-
|
|
10945
|
+
tools: toolNameToDetailList,
|
|
10946
10946
|
maxSteps,
|
|
10947
10947
|
tracingEnabled
|
|
10948
10948
|
});
|
|
@@ -10981,8 +10981,8 @@ var createAIACPModePlugin = () => ({
|
|
|
10981
10981
|
name: context2.name,
|
|
10982
10982
|
allToolNames: context2.allToolNames,
|
|
10983
10983
|
depGroups: context2.depGroups,
|
|
10984
|
+
toolNameToDetailList: context2.toolNameToDetailList,
|
|
10984
10985
|
acpSettings: opts.acpSettings,
|
|
10985
|
-
clientTools: opts.clientTools,
|
|
10986
10986
|
maxSteps: opts.maxSteps,
|
|
10987
10987
|
tracingEnabled: opts.tracingEnabled
|
|
10988
10988
|
});
|