@mcpcloud/cli 0.17.0-next-20260807033113 → 0.17.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/dist/index.js +17 -7
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -7803,7 +7803,11 @@ function watchSpecFile(options) {
|
|
|
7803
7803
|
|
|
7804
7804
|
// src/commands/servers-lifecycle.ts
|
|
7805
7805
|
var DEPLOY_TARGETS = ["workersDev", "managedDomain"];
|
|
7806
|
-
var ACCESS_MODES = [
|
|
7806
|
+
var ACCESS_MODES = [
|
|
7807
|
+
"public",
|
|
7808
|
+
"privateOrg",
|
|
7809
|
+
"unlisted"
|
|
7810
|
+
];
|
|
7807
7811
|
function validateChoice(name, value, allowed) {
|
|
7808
7812
|
const v2 = value.trim();
|
|
7809
7813
|
if (!allowed.includes(v2)) {
|
|
@@ -8655,7 +8659,7 @@ function registerServerTestAuthoringCommands(scenarios, suites) {
|
|
|
8655
8659
|
}
|
|
8656
8660
|
printSuccess(data.created === 0 ? "No new scenarios — every tool already has one." : `Generated ${data.created} scenario${data.created === 1 ? "" : "s"}.`);
|
|
8657
8661
|
}));
|
|
8658
|
-
suites.command("run <server>").description("Run the server’s test scenarios and report the suite result").option("--org <organizationId>", "Organization ID").option("--profile <profile>", `Execution profile: ${EXECUTION_PROFILES.join(" | ")} (default mockBindings)`).option("--scenario <id...>", "Run only these scenarios (repeatable); omit for every active scenario").option("--timeout <seconds>", "Request timeout in seconds (default 300, max 600)").addHelpText("after", [
|
|
8662
|
+
suites.command("run <server>").description("Run the server’s test scenarios and report the suite result").option("--org <organizationId>", "Organization ID").option("--execution-profile <profile>", `Execution profile: ${EXECUTION_PROFILES.join(" | ")} (default mockBindings)`).option("--scenario <id...>", "Run only these scenarios (repeatable); omit for every active scenario").option("--timeout <seconds>", "Request timeout in seconds (default 300, max 600)").addHelpText("after", [
|
|
8659
8663
|
"",
|
|
8660
8664
|
"Examples:",
|
|
8661
8665
|
" $ mcp servers test-suites run my-api",
|
|
@@ -8670,8 +8674,8 @@ function registerServerTestAuthoringCommands(scenarios, suites) {
|
|
|
8670
8674
|
' server work". previewBindings and liveEndpoint call the real upstream.'
|
|
8671
8675
|
].join(`
|
|
8672
8676
|
`)).action(runAction(async (serverRef, opts) => {
|
|
8673
|
-
if (opts.
|
|
8674
|
-
throw new Error(`Invalid --profile: ${opts.
|
|
8677
|
+
if (opts.executionProfile && !EXECUTION_PROFILES.includes(opts.executionProfile)) {
|
|
8678
|
+
throw new Error(`Invalid --execution-profile: ${opts.executionProfile}. Expected one of: ${EXECUTION_PROFILES.join(", ")}.`);
|
|
8675
8679
|
}
|
|
8676
8680
|
const { orgId, projectId, serverId } = await resolveServerAndProject(serverRef, opts.org);
|
|
8677
8681
|
const body = {
|
|
@@ -8679,8 +8683,8 @@ function registerServerTestAuthoringCommands(scenarios, suites) {
|
|
|
8679
8683
|
projectId,
|
|
8680
8684
|
serverId
|
|
8681
8685
|
};
|
|
8682
|
-
if (opts.
|
|
8683
|
-
body["profile"] = opts.
|
|
8686
|
+
if (opts.executionProfile)
|
|
8687
|
+
body["profile"] = opts.executionProfile;
|
|
8684
8688
|
if (opts.scenario?.length)
|
|
8685
8689
|
body["scenarioIds"] = opts.scenario;
|
|
8686
8690
|
const data = await api.post("/api/v1/server/test-suite/run", body, { timeoutMs: parseTimeoutMs(opts.timeout, DEFAULT_SUITE_TIMEOUT_MS) });
|
|
@@ -11026,6 +11030,7 @@ function diffLine2(label, applied, suggested) {
|
|
|
11026
11030
|
}
|
|
11027
11031
|
|
|
11028
11032
|
// src/commands/tools.ts
|
|
11033
|
+
var PROJECT_TOOLS_PAGE_LIMIT = 100;
|
|
11029
11034
|
function registerToolCommands(program2) {
|
|
11030
11035
|
const tools = program2.command("tools").description("Inspect and edit tools on a project or server");
|
|
11031
11036
|
tools.command("list").description("List tools for a project, or scope to a single server with --server").option("--org <organizationId>", "Organization ID").option("--project <project>", "List every tool in this project (id or name)").option("--server <server>", "List only the tools that belong to this server — id, name, or slug (the CLI resolves its project, fetches the project tools, then filters to this server)").action(runAction(async (opts) => {
|
|
@@ -11046,9 +11051,11 @@ function registerToolCommands(program2) {
|
|
|
11046
11051
|
projectId = serverData.server.projectId;
|
|
11047
11052
|
}
|
|
11048
11053
|
const data = await api.get("/api/v1/project/tools", {
|
|
11054
|
+
limit: String(PROJECT_TOOLS_PAGE_LIMIT),
|
|
11049
11055
|
organizationId: orgId,
|
|
11050
11056
|
projectId
|
|
11051
11057
|
});
|
|
11058
|
+
const truncated = data.tools.length >= PROJECT_TOOLS_PAGE_LIMIT;
|
|
11052
11059
|
const rows = resolvedServerId ? data.tools.filter((t) => t.serverId === resolvedServerId) : data.tools;
|
|
11053
11060
|
printList(rows.map((t) => ({
|
|
11054
11061
|
name: t.name,
|
|
@@ -11062,7 +11069,10 @@ function registerToolCommands(program2) {
|
|
|
11062
11069
|
{ key: "path", label: "Path", width: 32 },
|
|
11063
11070
|
{ key: "enrichment", label: "Enrichment", width: 12 },
|
|
11064
11071
|
{ key: "description", label: "Description", width: 60 }
|
|
11065
|
-
], resolvedServerId ? { ...data, tools: rows } : data);
|
|
11072
|
+
], resolvedServerId ? { ...data, tools: rows, truncated } : { ...data, truncated });
|
|
11073
|
+
if (truncated) {
|
|
11074
|
+
printWarn(`Showing the first ${PROJECT_TOOLS_PAGE_LIMIT} tools — this project has more. ` + "Filter with --server, or read them from the deployed endpoint with `mcp invoke <server> --list`.");
|
|
11075
|
+
}
|
|
11066
11076
|
}));
|
|
11067
11077
|
registerToolsShowCommand(tools);
|
|
11068
11078
|
registerToolsDiffCommand(tools);
|
package/package.json
CHANGED