@cloudbase/cloudbase-mcp 1.8.40 → 1.8.41
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/cli.cjs +13 -31
- package/dist/index.cjs +13 -31
- package/dist/index.js +13 -31
- package/package.json +1 -1
package/dist/cli.cjs
CHANGED
|
@@ -1218,10 +1218,10 @@ module.exports = (string, separator) => {
|
|
|
1218
1218
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
1219
1219
|
exports.registerEnvTools = registerEnvTools;
|
|
1220
1220
|
const zod_1 = __webpack_require__(21614);
|
|
1221
|
-
const cloudbase_manager_js_1 = __webpack_require__(3431);
|
|
1222
1221
|
const auth_js_1 = __webpack_require__(77291);
|
|
1223
|
-
const
|
|
1222
|
+
const cloudbase_manager_js_1 = __webpack_require__(3431);
|
|
1224
1223
|
const logger_js_1 = __webpack_require__(13039);
|
|
1224
|
+
const interactive_js_1 = __webpack_require__(3461);
|
|
1225
1225
|
function registerEnvTools(server) {
|
|
1226
1226
|
// 获取 cloudBaseOptions,如果没有则为 undefined
|
|
1227
1227
|
const cloudBaseOptions = server.cloudBaseOptions;
|
|
@@ -1309,12 +1309,12 @@ function registerEnvTools(server) {
|
|
|
1309
1309
|
};
|
|
1310
1310
|
}
|
|
1311
1311
|
});
|
|
1312
|
-
// envQuery - 环境查询(合并 listEnvs + getEnvInfo + getEnvAuthDomains)
|
|
1312
|
+
// envQuery - 环境查询(合并 listEnvs + getEnvInfo + getEnvAuthDomains + getWebsiteConfig)
|
|
1313
1313
|
server.registerTool?.("envQuery", {
|
|
1314
1314
|
title: "环境查询",
|
|
1315
|
-
description: "
|
|
1315
|
+
description: "查询云开发环境相关信息,支持查询环境列表、当前环境信息、安全域名和静态网站托管配置。(原工具名:listEnvs/getEnvInfo/getEnvAuthDomains/getWebsiteConfig,为兼容旧AI规则可继续使用这些名称)",
|
|
1316
1316
|
inputSchema: {
|
|
1317
|
-
action: zod_1.z.enum(["list", "info", "domains"]).describe("查询类型:list=环境列表,info=当前环境信息,domains
|
|
1317
|
+
action: zod_1.z.enum(["list", "info", "domains", "hosting"]).describe("查询类型:list=环境列表,info=当前环境信息,domains=安全域名列表,hosting=静态网站托管配置")
|
|
1318
1318
|
},
|
|
1319
1319
|
annotations: {
|
|
1320
1320
|
readOnlyHint: true,
|
|
@@ -1344,6 +1344,10 @@ function registerEnvTools(server) {
|
|
|
1344
1344
|
const cloudbaseDomains = await getManager();
|
|
1345
1345
|
result = await cloudbaseDomains.env.getEnvAuthDomains();
|
|
1346
1346
|
break;
|
|
1347
|
+
case "hosting":
|
|
1348
|
+
const cloudbaseHosting = await getManager();
|
|
1349
|
+
result = await cloudbaseHosting.hosting.getWebsiteConfig();
|
|
1350
|
+
break;
|
|
1347
1351
|
default:
|
|
1348
1352
|
throw new Error(`不支持的查询类型: ${action}`);
|
|
1349
1353
|
}
|
|
@@ -33860,7 +33864,7 @@ function registerDownloadTools(server) {
|
|
|
33860
33864
|
// downloadRemoteFileToPath - 下载远程文件到指定路径 (cloud-incompatible)
|
|
33861
33865
|
server.registerTool("downloadRemoteFileToPath", {
|
|
33862
33866
|
title: "下载远程文件到指定路径",
|
|
33863
|
-
description: "
|
|
33867
|
+
description: "下载远程文件到项目根目录下的指定相对路径。Claude Code: WORKSPACE_FOLDER_PATHS, Qwen Code: PROJECT_ROOT, CodeBuddy: GITHUB_WORKSPACE。例如:小程序的 Tabbar 等素材图片,必须使用 **png** 格式,可以从 Unsplash、wikimedia【一般选用 500 大小即可、Pexels、Apple 官方 UI 等资源中选择来下载。",
|
|
33864
33868
|
inputSchema: {
|
|
33865
33869
|
url: zod_1.z.string().describe("远程文件的 URL 地址"),
|
|
33866
33870
|
relativePath: zod_1.z.string().describe("相对于项目根目录的路径,例如:'assets/images/logo.png' 或 'docs/api.md'。不允许使用 ../ 等路径遍历操作。")
|
|
@@ -105692,28 +105696,6 @@ function registerHostingTools(server) {
|
|
|
105692
105696
|
]
|
|
105693
105697
|
};
|
|
105694
105698
|
});
|
|
105695
|
-
// getWebsiteConfig - 获取静态网站托管配置
|
|
105696
|
-
server.registerTool?.("getWebsiteConfig", {
|
|
105697
|
-
title: "查询静态托管配置",
|
|
105698
|
-
description: "获取静态网站托管配置",
|
|
105699
|
-
inputSchema: {},
|
|
105700
|
-
annotations: {
|
|
105701
|
-
readOnlyHint: true,
|
|
105702
|
-
openWorldHint: true,
|
|
105703
|
-
category: "hosting"
|
|
105704
|
-
}
|
|
105705
|
-
}, async () => {
|
|
105706
|
-
const cloudbase = await getManager();
|
|
105707
|
-
const result = await cloudbase.hosting.getWebsiteConfig();
|
|
105708
|
-
return {
|
|
105709
|
-
content: [
|
|
105710
|
-
{
|
|
105711
|
-
type: "text",
|
|
105712
|
-
text: JSON.stringify(result, null, 2)
|
|
105713
|
-
}
|
|
105714
|
-
]
|
|
105715
|
-
};
|
|
105716
|
-
});
|
|
105717
105699
|
// deleteFiles - 删除静态网站托管文件
|
|
105718
105700
|
server.registerTool?.("deleteFiles", {
|
|
105719
105701
|
title: "删除静态文件",
|
|
@@ -122160,7 +122142,7 @@ class TelemetryReporter {
|
|
|
122160
122142
|
const nodeVersion = process.version; // Node.js版本
|
|
122161
122143
|
const arch = os_1.default.arch(); // 系统架构
|
|
122162
122144
|
// 从构建时注入的版本号获取MCP版本信息
|
|
122163
|
-
const mcpVersion = process.env.npm_package_version || "1.8.
|
|
122145
|
+
const mcpVersion = process.env.npm_package_version || "1.8.41" || 0;
|
|
122164
122146
|
return {
|
|
122165
122147
|
userAgent: `${osType} ${osRelease} ${arch} ${nodeVersion} CloudBase-MCP/${mcpVersion}`,
|
|
122166
122148
|
deviceId: this.deviceId,
|
|
@@ -180046,7 +180028,7 @@ ${envIdSection}
|
|
|
180046
180028
|
## 环境信息
|
|
180047
180029
|
- 操作系统: ${os_1.default.type()} ${os_1.default.release()}
|
|
180048
180030
|
- Node.js版本: ${process.version}
|
|
180049
|
-
- MCP 版本:${process.env.npm_package_version || "1.8.
|
|
180031
|
+
- MCP 版本:${process.env.npm_package_version || "1.8.41" || 0}
|
|
180050
180032
|
- 系统架构: ${os_1.default.arch()}
|
|
180051
180033
|
- 时间: ${new Date().toISOString()}
|
|
180052
180034
|
- 请求ID: ${requestId}
|
|
@@ -195072,7 +195054,7 @@ function registerSetupTools(server) {
|
|
|
195072
195054
|
// downloadTemplate - 下载项目模板 (cloud-incompatible)
|
|
195073
195055
|
server.registerTool("downloadTemplate", {
|
|
195074
195056
|
title: "下载项目模板",
|
|
195075
|
-
description: `自动下载并部署CloudBase项目模板。\n\n支持的模板:\n- react: React + CloudBase 全栈应用模板\n- vue: Vue + CloudBase 全栈应用模板\n- miniprogram: 微信小程序 + 云开发模板 \n- uniapp: UniApp + CloudBase 跨端应用模板\n- rules: 只包含AI编辑器配置文件(包含Cursor、WindSurf、CodeBuddy等所有主流编辑器配置),适合在已有项目中补充AI编辑器配置\n\n支持的IDE类型:\n- all: 下载所有IDE配置(默认)\n- cursor: Cursor AI编辑器\n- windsurf: WindSurf AI编辑器\n- codebuddy: CodeBuddy AI编辑器\n- claude-code: Claude Code AI编辑器\n- cline: Cline AI编辑器\n- gemini-cli: Gemini CLI\n- opencode: OpenCode AI编辑器\n- qwen-code: 通义灵码\n- baidu-comate: 百度Comate\n- openai-codex-cli: OpenAI Codex CLI\n- augment-code: Augment Code\n- github-copilot: GitHub Copilot\n- roocode: RooCode AI编辑器\n- tongyi-lingma: 通义灵码\n- trae: Trae AI编辑器\n- vscode: Visual Studio Code\n\n特别说明:\n- rules 模板会自动包含当前 mcp 版本号信息(版本号:${ true ? "1.8.
|
|
195057
|
+
description: `自动下载并部署CloudBase项目模板。\n\n支持的模板:\n- react: React + CloudBase 全栈应用模板\n- vue: Vue + CloudBase 全栈应用模板\n- miniprogram: 微信小程序 + 云开发模板 \n- uniapp: UniApp + CloudBase 跨端应用模板\n- rules: 只包含AI编辑器配置文件(包含Cursor、WindSurf、CodeBuddy等所有主流编辑器配置),适合在已有项目中补充AI编辑器配置\n\n支持的IDE类型:\n- all: 下载所有IDE配置(默认)\n- cursor: Cursor AI编辑器\n- windsurf: WindSurf AI编辑器\n- codebuddy: CodeBuddy AI编辑器\n- claude-code: Claude Code AI编辑器\n- cline: Cline AI编辑器\n- gemini-cli: Gemini CLI\n- opencode: OpenCode AI编辑器\n- qwen-code: 通义灵码\n- baidu-comate: 百度Comate\n- openai-codex-cli: OpenAI Codex CLI\n- augment-code: Augment Code\n- github-copilot: GitHub Copilot\n- roocode: RooCode AI编辑器\n- tongyi-lingma: 通义灵码\n- trae: Trae AI编辑器\n- vscode: Visual Studio Code\n\n特别说明:\n- rules 模板会自动包含当前 mcp 版本号信息(版本号:${ true ? "1.8.41" : 0}),便于后续维护和版本追踪\n- 下载 rules 模板时,如果项目中已存在 README.md 文件,系统会自动保护该文件不被覆盖(除非设置 overwrite=true)`,
|
|
195076
195058
|
inputSchema: {
|
|
195077
195059
|
template: zod_1.z.enum(["react", "vue", "miniprogram", "uniapp", "rules"]).describe("要下载的模板类型"),
|
|
195078
195060
|
ide: zod_1.z.enum(IDE_TYPES).optional().default("all").describe("指定要下载的IDE类型,默认为all(下载所有IDE配置)"),
|
package/dist/index.cjs
CHANGED
|
@@ -1217,10 +1217,10 @@ module.exports = (string, separator) => {
|
|
|
1217
1217
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
1218
1218
|
exports.registerEnvTools = registerEnvTools;
|
|
1219
1219
|
const zod_1 = __webpack_require__(21614);
|
|
1220
|
-
const cloudbase_manager_js_1 = __webpack_require__(3431);
|
|
1221
1220
|
const auth_js_1 = __webpack_require__(77291);
|
|
1222
|
-
const
|
|
1221
|
+
const cloudbase_manager_js_1 = __webpack_require__(3431);
|
|
1223
1222
|
const logger_js_1 = __webpack_require__(13039);
|
|
1223
|
+
const interactive_js_1 = __webpack_require__(3461);
|
|
1224
1224
|
function registerEnvTools(server) {
|
|
1225
1225
|
// 获取 cloudBaseOptions,如果没有则为 undefined
|
|
1226
1226
|
const cloudBaseOptions = server.cloudBaseOptions;
|
|
@@ -1308,12 +1308,12 @@ function registerEnvTools(server) {
|
|
|
1308
1308
|
};
|
|
1309
1309
|
}
|
|
1310
1310
|
});
|
|
1311
|
-
// envQuery - 环境查询(合并 listEnvs + getEnvInfo + getEnvAuthDomains)
|
|
1311
|
+
// envQuery - 环境查询(合并 listEnvs + getEnvInfo + getEnvAuthDomains + getWebsiteConfig)
|
|
1312
1312
|
server.registerTool?.("envQuery", {
|
|
1313
1313
|
title: "环境查询",
|
|
1314
|
-
description: "
|
|
1314
|
+
description: "查询云开发环境相关信息,支持查询环境列表、当前环境信息、安全域名和静态网站托管配置。(原工具名:listEnvs/getEnvInfo/getEnvAuthDomains/getWebsiteConfig,为兼容旧AI规则可继续使用这些名称)",
|
|
1315
1315
|
inputSchema: {
|
|
1316
|
-
action: zod_1.z.enum(["list", "info", "domains"]).describe("查询类型:list=环境列表,info=当前环境信息,domains
|
|
1316
|
+
action: zod_1.z.enum(["list", "info", "domains", "hosting"]).describe("查询类型:list=环境列表,info=当前环境信息,domains=安全域名列表,hosting=静态网站托管配置")
|
|
1317
1317
|
},
|
|
1318
1318
|
annotations: {
|
|
1319
1319
|
readOnlyHint: true,
|
|
@@ -1343,6 +1343,10 @@ function registerEnvTools(server) {
|
|
|
1343
1343
|
const cloudbaseDomains = await getManager();
|
|
1344
1344
|
result = await cloudbaseDomains.env.getEnvAuthDomains();
|
|
1345
1345
|
break;
|
|
1346
|
+
case "hosting":
|
|
1347
|
+
const cloudbaseHosting = await getManager();
|
|
1348
|
+
result = await cloudbaseHosting.hosting.getWebsiteConfig();
|
|
1349
|
+
break;
|
|
1346
1350
|
default:
|
|
1347
1351
|
throw new Error(`不支持的查询类型: ${action}`);
|
|
1348
1352
|
}
|
|
@@ -33859,7 +33863,7 @@ function registerDownloadTools(server) {
|
|
|
33859
33863
|
// downloadRemoteFileToPath - 下载远程文件到指定路径 (cloud-incompatible)
|
|
33860
33864
|
server.registerTool("downloadRemoteFileToPath", {
|
|
33861
33865
|
title: "下载远程文件到指定路径",
|
|
33862
|
-
description: "
|
|
33866
|
+
description: "下载远程文件到项目根目录下的指定相对路径。Claude Code: WORKSPACE_FOLDER_PATHS, Qwen Code: PROJECT_ROOT, CodeBuddy: GITHUB_WORKSPACE。例如:小程序的 Tabbar 等素材图片,必须使用 **png** 格式,可以从 Unsplash、wikimedia【一般选用 500 大小即可、Pexels、Apple 官方 UI 等资源中选择来下载。",
|
|
33863
33867
|
inputSchema: {
|
|
33864
33868
|
url: zod_1.z.string().describe("远程文件的 URL 地址"),
|
|
33865
33869
|
relativePath: zod_1.z.string().describe("相对于项目根目录的路径,例如:'assets/images/logo.png' 或 'docs/api.md'。不允许使用 ../ 等路径遍历操作。")
|
|
@@ -105543,28 +105547,6 @@ function registerHostingTools(server) {
|
|
|
105543
105547
|
]
|
|
105544
105548
|
};
|
|
105545
105549
|
});
|
|
105546
|
-
// getWebsiteConfig - 获取静态网站托管配置
|
|
105547
|
-
server.registerTool?.("getWebsiteConfig", {
|
|
105548
|
-
title: "查询静态托管配置",
|
|
105549
|
-
description: "获取静态网站托管配置",
|
|
105550
|
-
inputSchema: {},
|
|
105551
|
-
annotations: {
|
|
105552
|
-
readOnlyHint: true,
|
|
105553
|
-
openWorldHint: true,
|
|
105554
|
-
category: "hosting"
|
|
105555
|
-
}
|
|
105556
|
-
}, async () => {
|
|
105557
|
-
const cloudbase = await getManager();
|
|
105558
|
-
const result = await cloudbase.hosting.getWebsiteConfig();
|
|
105559
|
-
return {
|
|
105560
|
-
content: [
|
|
105561
|
-
{
|
|
105562
|
-
type: "text",
|
|
105563
|
-
text: JSON.stringify(result, null, 2)
|
|
105564
|
-
}
|
|
105565
|
-
]
|
|
105566
|
-
};
|
|
105567
|
-
});
|
|
105568
105550
|
// deleteFiles - 删除静态网站托管文件
|
|
105569
105551
|
server.registerTool?.("deleteFiles", {
|
|
105570
105552
|
title: "删除静态文件",
|
|
@@ -122011,7 +121993,7 @@ class TelemetryReporter {
|
|
|
122011
121993
|
const nodeVersion = process.version; // Node.js版本
|
|
122012
121994
|
const arch = os_1.default.arch(); // 系统架构
|
|
122013
121995
|
// 从构建时注入的版本号获取MCP版本信息
|
|
122014
|
-
const mcpVersion = process.env.npm_package_version || "1.8.
|
|
121996
|
+
const mcpVersion = process.env.npm_package_version || "1.8.41" || 0;
|
|
122015
121997
|
return {
|
|
122016
121998
|
userAgent: `${osType} ${osRelease} ${arch} ${nodeVersion} CloudBase-MCP/${mcpVersion}`,
|
|
122017
121999
|
deviceId: this.deviceId,
|
|
@@ -179897,7 +179879,7 @@ ${envIdSection}
|
|
|
179897
179879
|
## 环境信息
|
|
179898
179880
|
- 操作系统: ${os_1.default.type()} ${os_1.default.release()}
|
|
179899
179881
|
- Node.js版本: ${process.version}
|
|
179900
|
-
- MCP 版本:${process.env.npm_package_version || "1.8.
|
|
179882
|
+
- MCP 版本:${process.env.npm_package_version || "1.8.41" || 0}
|
|
179901
179883
|
- 系统架构: ${os_1.default.arch()}
|
|
179902
179884
|
- 时间: ${new Date().toISOString()}
|
|
179903
179885
|
- 请求ID: ${requestId}
|
|
@@ -194923,7 +194905,7 @@ function registerSetupTools(server) {
|
|
|
194923
194905
|
// downloadTemplate - 下载项目模板 (cloud-incompatible)
|
|
194924
194906
|
server.registerTool("downloadTemplate", {
|
|
194925
194907
|
title: "下载项目模板",
|
|
194926
|
-
description: `自动下载并部署CloudBase项目模板。\n\n支持的模板:\n- react: React + CloudBase 全栈应用模板\n- vue: Vue + CloudBase 全栈应用模板\n- miniprogram: 微信小程序 + 云开发模板 \n- uniapp: UniApp + CloudBase 跨端应用模板\n- rules: 只包含AI编辑器配置文件(包含Cursor、WindSurf、CodeBuddy等所有主流编辑器配置),适合在已有项目中补充AI编辑器配置\n\n支持的IDE类型:\n- all: 下载所有IDE配置(默认)\n- cursor: Cursor AI编辑器\n- windsurf: WindSurf AI编辑器\n- codebuddy: CodeBuddy AI编辑器\n- claude-code: Claude Code AI编辑器\n- cline: Cline AI编辑器\n- gemini-cli: Gemini CLI\n- opencode: OpenCode AI编辑器\n- qwen-code: 通义灵码\n- baidu-comate: 百度Comate\n- openai-codex-cli: OpenAI Codex CLI\n- augment-code: Augment Code\n- github-copilot: GitHub Copilot\n- roocode: RooCode AI编辑器\n- tongyi-lingma: 通义灵码\n- trae: Trae AI编辑器\n- vscode: Visual Studio Code\n\n特别说明:\n- rules 模板会自动包含当前 mcp 版本号信息(版本号:${ true ? "1.8.
|
|
194908
|
+
description: `自动下载并部署CloudBase项目模板。\n\n支持的模板:\n- react: React + CloudBase 全栈应用模板\n- vue: Vue + CloudBase 全栈应用模板\n- miniprogram: 微信小程序 + 云开发模板 \n- uniapp: UniApp + CloudBase 跨端应用模板\n- rules: 只包含AI编辑器配置文件(包含Cursor、WindSurf、CodeBuddy等所有主流编辑器配置),适合在已有项目中补充AI编辑器配置\n\n支持的IDE类型:\n- all: 下载所有IDE配置(默认)\n- cursor: Cursor AI编辑器\n- windsurf: WindSurf AI编辑器\n- codebuddy: CodeBuddy AI编辑器\n- claude-code: Claude Code AI编辑器\n- cline: Cline AI编辑器\n- gemini-cli: Gemini CLI\n- opencode: OpenCode AI编辑器\n- qwen-code: 通义灵码\n- baidu-comate: 百度Comate\n- openai-codex-cli: OpenAI Codex CLI\n- augment-code: Augment Code\n- github-copilot: GitHub Copilot\n- roocode: RooCode AI编辑器\n- tongyi-lingma: 通义灵码\n- trae: Trae AI编辑器\n- vscode: Visual Studio Code\n\n特别说明:\n- rules 模板会自动包含当前 mcp 版本号信息(版本号:${ true ? "1.8.41" : 0}),便于后续维护和版本追踪\n- 下载 rules 模板时,如果项目中已存在 README.md 文件,系统会自动保护该文件不被覆盖(除非设置 overwrite=true)`,
|
|
194927
194909
|
inputSchema: {
|
|
194928
194910
|
template: zod_1.z.enum(["react", "vue", "miniprogram", "uniapp", "rules"]).describe("要下载的模板类型"),
|
|
194929
194911
|
ide: zod_1.z.enum(IDE_TYPES).optional().default("all").describe("指定要下载的IDE类型,默认为all(下载所有IDE配置)"),
|
package/dist/index.js
CHANGED
|
@@ -1542,7 +1542,7 @@ function registerDownloadTools(server) {
|
|
|
1542
1542
|
// downloadRemoteFileToPath - 下载远程文件到指定路径 (cloud-incompatible)
|
|
1543
1543
|
server.registerTool("downloadRemoteFileToPath", {
|
|
1544
1544
|
title: "下载远程文件到指定路径",
|
|
1545
|
-
description: "
|
|
1545
|
+
description: "下载远程文件到项目根目录下的指定相对路径。Claude Code: WORKSPACE_FOLDER_PATHS, Qwen Code: PROJECT_ROOT, CodeBuddy: GITHUB_WORKSPACE。例如:小程序的 Tabbar 等素材图片,必须使用 **png** 格式,可以从 Unsplash、wikimedia【一般选用 500 大小即可、Pexels、Apple 官方 UI 等资源中选择来下载。",
|
|
1546
1546
|
inputSchema: {
|
|
1547
1547
|
url: zod_1.z.string().describe("远程文件的 URL 地址"),
|
|
1548
1548
|
relativePath: zod_1.z.string().describe("相对于项目根目录的路径,例如:'assets/images/logo.png' 或 'docs/api.md'。不允许使用 ../ 等路径遍历操作。")
|
|
@@ -1921,28 +1921,6 @@ function registerHostingTools(server) {
|
|
|
1921
1921
|
]
|
|
1922
1922
|
};
|
|
1923
1923
|
});
|
|
1924
|
-
// getWebsiteConfig - 获取静态网站托管配置
|
|
1925
|
-
server.registerTool?.("getWebsiteConfig", {
|
|
1926
|
-
title: "查询静态托管配置",
|
|
1927
|
-
description: "获取静态网站托管配置",
|
|
1928
|
-
inputSchema: {},
|
|
1929
|
-
annotations: {
|
|
1930
|
-
readOnlyHint: true,
|
|
1931
|
-
openWorldHint: true,
|
|
1932
|
-
category: "hosting"
|
|
1933
|
-
}
|
|
1934
|
-
}, async () => {
|
|
1935
|
-
const cloudbase = await getManager();
|
|
1936
|
-
const result = await cloudbase.hosting.getWebsiteConfig();
|
|
1937
|
-
return {
|
|
1938
|
-
content: [
|
|
1939
|
-
{
|
|
1940
|
-
type: "text",
|
|
1941
|
-
text: JSON.stringify(result, null, 2)
|
|
1942
|
-
}
|
|
1943
|
-
]
|
|
1944
|
-
};
|
|
1945
|
-
});
|
|
1946
1924
|
// deleteFiles - 删除静态网站托管文件
|
|
1947
1925
|
server.registerTool?.("deleteFiles", {
|
|
1948
1926
|
title: "删除静态文件",
|
|
@@ -5079,7 +5057,7 @@ ${envIdSection}
|
|
|
5079
5057
|
## 环境信息
|
|
5080
5058
|
- 操作系统: ${os_1.default.type()} ${os_1.default.release()}
|
|
5081
5059
|
- Node.js版本: ${process.version}
|
|
5082
|
-
- MCP 版本:${process.env.npm_package_version || "1.8.
|
|
5060
|
+
- MCP 版本:${process.env.npm_package_version || "1.8.41" || 0}
|
|
5083
5061
|
- 系统架构: ${os_1.default.arch()}
|
|
5084
5062
|
- 时间: ${new Date().toISOString()}
|
|
5085
5063
|
- 请求ID: ${requestId}
|
|
@@ -6122,7 +6100,7 @@ function registerSetupTools(server) {
|
|
|
6122
6100
|
// downloadTemplate - 下载项目模板 (cloud-incompatible)
|
|
6123
6101
|
server.registerTool("downloadTemplate", {
|
|
6124
6102
|
title: "下载项目模板",
|
|
6125
|
-
description: `自动下载并部署CloudBase项目模板。\n\n支持的模板:\n- react: React + CloudBase 全栈应用模板\n- vue: Vue + CloudBase 全栈应用模板\n- miniprogram: 微信小程序 + 云开发模板 \n- uniapp: UniApp + CloudBase 跨端应用模板\n- rules: 只包含AI编辑器配置文件(包含Cursor、WindSurf、CodeBuddy等所有主流编辑器配置),适合在已有项目中补充AI编辑器配置\n\n支持的IDE类型:\n- all: 下载所有IDE配置(默认)\n- cursor: Cursor AI编辑器\n- windsurf: WindSurf AI编辑器\n- codebuddy: CodeBuddy AI编辑器\n- claude-code: Claude Code AI编辑器\n- cline: Cline AI编辑器\n- gemini-cli: Gemini CLI\n- opencode: OpenCode AI编辑器\n- qwen-code: 通义灵码\n- baidu-comate: 百度Comate\n- openai-codex-cli: OpenAI Codex CLI\n- augment-code: Augment Code\n- github-copilot: GitHub Copilot\n- roocode: RooCode AI编辑器\n- tongyi-lingma: 通义灵码\n- trae: Trae AI编辑器\n- vscode: Visual Studio Code\n\n特别说明:\n- rules 模板会自动包含当前 mcp 版本号信息(版本号:${ true ? "1.8.
|
|
6103
|
+
description: `自动下载并部署CloudBase项目模板。\n\n支持的模板:\n- react: React + CloudBase 全栈应用模板\n- vue: Vue + CloudBase 全栈应用模板\n- miniprogram: 微信小程序 + 云开发模板 \n- uniapp: UniApp + CloudBase 跨端应用模板\n- rules: 只包含AI编辑器配置文件(包含Cursor、WindSurf、CodeBuddy等所有主流编辑器配置),适合在已有项目中补充AI编辑器配置\n\n支持的IDE类型:\n- all: 下载所有IDE配置(默认)\n- cursor: Cursor AI编辑器\n- windsurf: WindSurf AI编辑器\n- codebuddy: CodeBuddy AI编辑器\n- claude-code: Claude Code AI编辑器\n- cline: Cline AI编辑器\n- gemini-cli: Gemini CLI\n- opencode: OpenCode AI编辑器\n- qwen-code: 通义灵码\n- baidu-comate: 百度Comate\n- openai-codex-cli: OpenAI Codex CLI\n- augment-code: Augment Code\n- github-copilot: GitHub Copilot\n- roocode: RooCode AI编辑器\n- tongyi-lingma: 通义灵码\n- trae: Trae AI编辑器\n- vscode: Visual Studio Code\n\n特别说明:\n- rules 模板会自动包含当前 mcp 版本号信息(版本号:${ true ? "1.8.41" : 0}),便于后续维护和版本追踪\n- 下载 rules 模板时,如果项目中已存在 README.md 文件,系统会自动保护该文件不被覆盖(除非设置 overwrite=true)`,
|
|
6126
6104
|
inputSchema: {
|
|
6127
6105
|
template: zod_1.z.enum(["react", "vue", "miniprogram", "uniapp", "rules"]).describe("要下载的模板类型"),
|
|
6128
6106
|
ide: zod_1.z.enum(IDE_TYPES).optional().default("all").describe("指定要下载的IDE类型,默认为all(下载所有IDE配置)"),
|
|
@@ -6285,10 +6263,10 @@ module.exports = __WEBPACK_EXTERNAL_MODULE__modelcontextprotocol_sdk_server_mcp_
|
|
|
6285
6263
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
6286
6264
|
exports.registerEnvTools = registerEnvTools;
|
|
6287
6265
|
const zod_1 = __webpack_require__(971);
|
|
6288
|
-
const cloudbase_manager_js_1 = __webpack_require__(431);
|
|
6289
6266
|
const auth_js_1 = __webpack_require__(291);
|
|
6290
|
-
const
|
|
6267
|
+
const cloudbase_manager_js_1 = __webpack_require__(431);
|
|
6291
6268
|
const logger_js_1 = __webpack_require__(39);
|
|
6269
|
+
const interactive_js_1 = __webpack_require__(461);
|
|
6292
6270
|
function registerEnvTools(server) {
|
|
6293
6271
|
// 获取 cloudBaseOptions,如果没有则为 undefined
|
|
6294
6272
|
const cloudBaseOptions = server.cloudBaseOptions;
|
|
@@ -6376,12 +6354,12 @@ function registerEnvTools(server) {
|
|
|
6376
6354
|
};
|
|
6377
6355
|
}
|
|
6378
6356
|
});
|
|
6379
|
-
// envQuery - 环境查询(合并 listEnvs + getEnvInfo + getEnvAuthDomains)
|
|
6357
|
+
// envQuery - 环境查询(合并 listEnvs + getEnvInfo + getEnvAuthDomains + getWebsiteConfig)
|
|
6380
6358
|
server.registerTool?.("envQuery", {
|
|
6381
6359
|
title: "环境查询",
|
|
6382
|
-
description: "
|
|
6360
|
+
description: "查询云开发环境相关信息,支持查询环境列表、当前环境信息、安全域名和静态网站托管配置。(原工具名:listEnvs/getEnvInfo/getEnvAuthDomains/getWebsiteConfig,为兼容旧AI规则可继续使用这些名称)",
|
|
6383
6361
|
inputSchema: {
|
|
6384
|
-
action: zod_1.z.enum(["list", "info", "domains"]).describe("查询类型:list=环境列表,info=当前环境信息,domains
|
|
6362
|
+
action: zod_1.z.enum(["list", "info", "domains", "hosting"]).describe("查询类型:list=环境列表,info=当前环境信息,domains=安全域名列表,hosting=静态网站托管配置")
|
|
6385
6363
|
},
|
|
6386
6364
|
annotations: {
|
|
6387
6365
|
readOnlyHint: true,
|
|
@@ -6411,6 +6389,10 @@ function registerEnvTools(server) {
|
|
|
6411
6389
|
const cloudbaseDomains = await getManager();
|
|
6412
6390
|
result = await cloudbaseDomains.env.getEnvAuthDomains();
|
|
6413
6391
|
break;
|
|
6392
|
+
case "hosting":
|
|
6393
|
+
const cloudbaseHosting = await getManager();
|
|
6394
|
+
result = await cloudbaseHosting.hosting.getWebsiteConfig();
|
|
6395
|
+
break;
|
|
6414
6396
|
default:
|
|
6415
6397
|
throw new Error(`不支持的查询类型: ${action}`);
|
|
6416
6398
|
}
|
|
@@ -8739,7 +8721,7 @@ class TelemetryReporter {
|
|
|
8739
8721
|
const nodeVersion = process.version; // Node.js版本
|
|
8740
8722
|
const arch = os_1.default.arch(); // 系统架构
|
|
8741
8723
|
// 从构建时注入的版本号获取MCP版本信息
|
|
8742
|
-
const mcpVersion = process.env.npm_package_version || "1.8.
|
|
8724
|
+
const mcpVersion = process.env.npm_package_version || "1.8.41" || 0;
|
|
8743
8725
|
return {
|
|
8744
8726
|
userAgent: `${osType} ${osRelease} ${arch} ${nodeVersion} CloudBase-MCP/${mcpVersion}`,
|
|
8745
8727
|
deviceId: this.deviceId,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cloudbase/cloudbase-mcp",
|
|
3
|
-
"version": "1.8.
|
|
3
|
+
"version": "1.8.41",
|
|
4
4
|
"description": "腾讯云开发 MCP Server,通过AI提示词和MCP协议+云开发,让开发更智能、更高效,当你在Cursor/ VSCode GitHub Copilot/WinSurf/CodeBuddy/Augment Code/Claude Code等AI编程工具里写代码时,它能自动帮你生成可直接部署的前后端应用+小程序,并一键发布到腾讯云开发 CloudBase。",
|
|
5
5
|
"main": "./dist/index.cjs",
|
|
6
6
|
"module": "./dist/index.js",
|