@cloudbase/cloudbase-mcp 2.25.7 → 2.25.8
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 +2 -2
- package/dist/index.cjs +11 -20
- package/dist/index.d.ts +4 -0
- package/dist/index.js +11 -20
- package/package.json +3 -1
package/dist/index.cjs
CHANGED
|
@@ -139372,7 +139372,7 @@ class TelemetryReporter {
|
|
|
139372
139372
|
const nodeVersion = process.version; // Node.js版本
|
|
139373
139373
|
const arch = os_1.default.arch(); // 系统架构
|
|
139374
139374
|
// 从构建时注入的版本号获取MCP版本信息
|
|
139375
|
-
const mcpVersion = process.env.npm_package_version || "2.25.
|
|
139375
|
+
const mcpVersion = process.env.npm_package_version || "2.25.8" || 0;
|
|
139376
139376
|
return {
|
|
139377
139377
|
userAgent: `${osType} ${osRelease} ${arch} ${nodeVersion} CloudBase-MCP/${mcpVersion}`,
|
|
139378
139378
|
deviceId: this.deviceId,
|
|
@@ -215267,7 +215267,7 @@ ${envIdSection}
|
|
|
215267
215267
|
## 环境信息
|
|
215268
215268
|
- 操作系统: ${os_1.default.type()} ${os_1.default.release()}
|
|
215269
215269
|
- Node.js版本: ${process.version}
|
|
215270
|
-
- MCP 版本:${process.env.npm_package_version || "2.25.
|
|
215270
|
+
- MCP 版本:${process.env.npm_package_version || "2.25.8" || 0}
|
|
215271
215271
|
- 系统架构: ${os_1.default.arch()}
|
|
215272
215272
|
- 时间: ${new Date().toISOString()}
|
|
215273
215273
|
- 请求ID: ${requestId}
|
|
@@ -215348,7 +215348,7 @@ function createWrappedHandler(name, handler, server) {
|
|
|
215348
215348
|
requestId: (typeof error === 'object' && error && 'requestId' in error) ? error.requestId : '',
|
|
215349
215349
|
ide: server.ide || process.env.INTEGRATION_IDE || ''
|
|
215350
215350
|
});
|
|
215351
|
-
const mcpVersion = true ? "2.25.
|
|
215351
|
+
const mcpVersion = true ? "2.25.8" : 0;
|
|
215352
215352
|
const requestIdSuffix = requestId ? `\n🆔 RequestId: ${requestId}` : '';
|
|
215353
215353
|
const enhancedErrorMessage = `${errorMessage}${requestIdSuffix}\n\n📦 CloudBase MCP v${mcpVersion}\n🔗 遇到问题?请复制以下链接到浏览器打开\n即可自动携带错误详情快速创建 GitHub Issue:\n${issueLink}`;
|
|
215354
215354
|
// 创建新的错误对象,保持原有的错误类型但更新消息
|
|
@@ -232232,7 +232232,7 @@ function registerSetupTools(server) {
|
|
|
232232
232232
|
server.registerTool("downloadTemplate", {
|
|
232233
232233
|
title: "下载项目模板",
|
|
232234
232234
|
description: `自动下载并部署CloudBase项目模板。
|
|
232235
|
-
**Note**: Call this tool when the user requests to create a new project using a CloudBase template.\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- 其他IDE类型见下方列表\n\n注意:如果未传入 ide 参数且无法从环境变量检测到 IDE,将提示错误并要求传入 ide 参数\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- qoder: Qoder AI编辑器\n- antigravity: Google Antigravity AI编辑器\n- vscode: Visual Studio Code\n- kiro: Kiro AI编辑器\n- aider: Aider AI编辑器\n\n特别说明:\n- rules 模板会自动包含当前 mcp 版本号信息(版本号:${ true ? "2.25.
|
|
232235
|
+
**Note**: Call this tool when the user requests to create a new project using a CloudBase template.\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- 其他IDE类型见下方列表\n\n注意:如果未传入 ide 参数且无法从环境变量检测到 IDE,将提示错误并要求传入 ide 参数\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- qoder: Qoder AI编辑器\n- antigravity: Google Antigravity AI编辑器\n- vscode: Visual Studio Code\n- kiro: Kiro AI编辑器\n- aider: Aider AI编辑器\n\n特别说明:\n- rules 模板会自动包含当前 mcp 版本号信息(版本号:${ true ? "2.25.8" : 0}),便于后续维护和版本追踪\n- 下载 rules 模板时,如果项目中已存在 README.md 文件,系统会自动保护该文件不被覆盖(除非设置 overwrite=true)`,
|
|
232236
232236
|
inputSchema: {
|
|
232237
232237
|
template: zod_1.z
|
|
232238
232238
|
.enum(["react", "vue", "miniprogram", "uniapp", "rules"])
|
|
@@ -259387,7 +259387,7 @@ module.exports = {
|
|
|
259387
259387
|
/***/ }),
|
|
259388
259388
|
|
|
259389
259389
|
/***/ 89684:
|
|
259390
|
-
/***/ ((__unused_webpack_module, exports
|
|
259390
|
+
/***/ ((__unused_webpack_module, exports) => {
|
|
259391
259391
|
|
|
259392
259392
|
"use strict";
|
|
259393
259393
|
|
|
@@ -259396,13 +259396,16 @@ exports.isCloudMode = isCloudMode;
|
|
|
259396
259396
|
exports.enableCloudMode = enableCloudMode;
|
|
259397
259397
|
exports.getCloudModeStatus = getCloudModeStatus;
|
|
259398
259398
|
exports.shouldRegisterTool = shouldRegisterTool;
|
|
259399
|
-
const logger_js_1 = __webpack_require__(13039);
|
|
259400
259399
|
/**
|
|
259401
259400
|
* Check if MCP is running in cloud mode
|
|
259402
259401
|
* Cloud mode is enabled by:
|
|
259403
259402
|
* 1. Command line argument --cloud-mode
|
|
259404
259403
|
* 2. Environment variable CLOUDBASE_MCP_CLOUD_MODE=true
|
|
259405
259404
|
* 3. Environment variable MCP_CLOUD_MODE=true
|
|
259405
|
+
*
|
|
259406
|
+
* Intentionally does not import logger: logger.ts calls isCloudMode() during
|
|
259407
|
+
* module init, so importing logger here creates a circular dependency that
|
|
259408
|
+
* crashes `node dist/cli.cjs --cloud-mode` with `debug is not a function`.
|
|
259406
259409
|
*/
|
|
259407
259410
|
function isCloudMode() {
|
|
259408
259411
|
// Check for CLI argument first
|
|
@@ -259410,21 +259413,13 @@ function isCloudMode() {
|
|
|
259410
259413
|
// Check environment variables
|
|
259411
259414
|
const cloudModeEnabled = process.env.CLOUDBASE_MCP_CLOUD_MODE === 'true' ||
|
|
259412
259415
|
process.env.MCP_CLOUD_MODE === 'true';
|
|
259413
|
-
|
|
259414
|
-
if (isEnabled) {
|
|
259415
|
-
(0, logger_js_1.debug)('Cloud mode is enabled', {
|
|
259416
|
-
source: hasCloudModeArg ? 'CLI_ARG' : 'ENV_VAR',
|
|
259417
|
-
envVar: process.env.CLOUDBASE_MCP_CLOUD_MODE || process.env.MCP_CLOUD_MODE
|
|
259418
|
-
});
|
|
259419
|
-
}
|
|
259420
|
-
return isEnabled;
|
|
259416
|
+
return hasCloudModeArg || cloudModeEnabled;
|
|
259421
259417
|
}
|
|
259422
259418
|
/**
|
|
259423
259419
|
* Enable cloud mode by setting environment variable
|
|
259424
259420
|
*/
|
|
259425
259421
|
function enableCloudMode() {
|
|
259426
259422
|
process.env.CLOUDBASE_MCP_CLOUD_MODE = 'true';
|
|
259427
|
-
(0, logger_js_1.debug)('Cloud mode enabled via API call');
|
|
259428
259423
|
}
|
|
259429
259424
|
/**
|
|
259430
259425
|
* Get cloud mode status for logging/debugging
|
|
@@ -259472,11 +259467,7 @@ function shouldRegisterTool(toolName) {
|
|
|
259472
259467
|
// Download tools - local file downloads
|
|
259473
259468
|
'manageStorage',
|
|
259474
259469
|
];
|
|
259475
|
-
|
|
259476
|
-
if (!shouldRegister) {
|
|
259477
|
-
(0, logger_js_1.debug)(`Cloud mode: skipping registration of incompatible tool: ${toolName}`);
|
|
259478
|
-
}
|
|
259479
|
-
return shouldRegister;
|
|
259470
|
+
return !cloudIncompatibleTools.includes(toolName);
|
|
259480
259471
|
}
|
|
259481
259472
|
|
|
259482
259473
|
|
package/dist/index.d.ts
CHANGED
|
@@ -302,6 +302,10 @@ declare class InteractiveServer {
|
|
|
302
302
|
* 1. Command line argument --cloud-mode
|
|
303
303
|
* 2. Environment variable CLOUDBASE_MCP_CLOUD_MODE=true
|
|
304
304
|
* 3. Environment variable MCP_CLOUD_MODE=true
|
|
305
|
+
*
|
|
306
|
+
* Intentionally does not import logger: logger.ts calls isCloudMode() during
|
|
307
|
+
* module init, so importing logger here creates a circular dependency that
|
|
308
|
+
* crashes `node dist/cli.cjs --cloud-mode` with `debug is not a function`.
|
|
305
309
|
*/
|
|
306
310
|
export declare function isCloudMode(): boolean;
|
|
307
311
|
|
package/dist/index.js
CHANGED
|
@@ -2772,7 +2772,7 @@ ${envIdSection}
|
|
|
2772
2772
|
## 环境信息
|
|
2773
2773
|
- 操作系统: ${os_1.default.type()} ${os_1.default.release()}
|
|
2774
2774
|
- Node.js版本: ${process.version}
|
|
2775
|
-
- MCP 版本:${process.env.npm_package_version || "2.25.
|
|
2775
|
+
- MCP 版本:${process.env.npm_package_version || "2.25.8" || 0}
|
|
2776
2776
|
- 系统架构: ${os_1.default.arch()}
|
|
2777
2777
|
- 时间: ${new Date().toISOString()}
|
|
2778
2778
|
- 请求ID: ${requestId}
|
|
@@ -2853,7 +2853,7 @@ function createWrappedHandler(name, handler, server) {
|
|
|
2853
2853
|
requestId: (typeof error === 'object' && error && 'requestId' in error) ? error.requestId : '',
|
|
2854
2854
|
ide: server.ide || process.env.INTEGRATION_IDE || ''
|
|
2855
2855
|
});
|
|
2856
|
-
const mcpVersion = true ? "2.25.
|
|
2856
|
+
const mcpVersion = true ? "2.25.8" : 0;
|
|
2857
2857
|
const requestIdSuffix = requestId ? `\n🆔 RequestId: ${requestId}` : '';
|
|
2858
2858
|
const enhancedErrorMessage = `${errorMessage}${requestIdSuffix}\n\n📦 CloudBase MCP v${mcpVersion}\n🔗 遇到问题?请复制以下链接到浏览器打开\n即可自动携带错误详情快速创建 GitHub Issue:\n${issueLink}`;
|
|
2859
2859
|
// 创建新的错误对象,保持原有的错误类型但更新消息
|
|
@@ -11208,7 +11208,7 @@ class TelemetryReporter {
|
|
|
11208
11208
|
const nodeVersion = process.version; // Node.js版本
|
|
11209
11209
|
const arch = os_1.default.arch(); // 系统架构
|
|
11210
11210
|
// 从构建时注入的版本号获取MCP版本信息
|
|
11211
|
-
const mcpVersion = process.env.npm_package_version || "2.25.
|
|
11211
|
+
const mcpVersion = process.env.npm_package_version || "2.25.8" || 0;
|
|
11212
11212
|
return {
|
|
11213
11213
|
userAgent: `${osType} ${osRelease} ${arch} ${nodeVersion} CloudBase-MCP/${mcpVersion}`,
|
|
11214
11214
|
deviceId: this.deviceId,
|
|
@@ -16743,7 +16743,7 @@ function registerSetupTools(server) {
|
|
|
16743
16743
|
server.registerTool("downloadTemplate", {
|
|
16744
16744
|
title: "下载项目模板",
|
|
16745
16745
|
description: `自动下载并部署CloudBase项目模板。
|
|
16746
|
-
**Note**: Call this tool when the user requests to create a new project using a CloudBase template.\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- 其他IDE类型见下方列表\n\n注意:如果未传入 ide 参数且无法从环境变量检测到 IDE,将提示错误并要求传入 ide 参数\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- qoder: Qoder AI编辑器\n- antigravity: Google Antigravity AI编辑器\n- vscode: Visual Studio Code\n- kiro: Kiro AI编辑器\n- aider: Aider AI编辑器\n\n特别说明:\n- rules 模板会自动包含当前 mcp 版本号信息(版本号:${ true ? "2.25.
|
|
16746
|
+
**Note**: Call this tool when the user requests to create a new project using a CloudBase template.\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- 其他IDE类型见下方列表\n\n注意:如果未传入 ide 参数且无法从环境变量检测到 IDE,将提示错误并要求传入 ide 参数\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- qoder: Qoder AI编辑器\n- antigravity: Google Antigravity AI编辑器\n- vscode: Visual Studio Code\n- kiro: Kiro AI编辑器\n- aider: Aider AI编辑器\n\n特别说明:\n- rules 模板会自动包含当前 mcp 版本号信息(版本号:${ true ? "2.25.8" : 0}),便于后续维护和版本追踪\n- 下载 rules 模板时,如果项目中已存在 README.md 文件,系统会自动保护该文件不被覆盖(除非设置 overwrite=true)`,
|
|
16747
16747
|
inputSchema: {
|
|
16748
16748
|
template: zod_1.z
|
|
16749
16749
|
.enum(["react", "vue", "miniprogram", "uniapp", "rules"])
|
|
@@ -20473,7 +20473,7 @@ function registerAgentTools(server) {
|
|
|
20473
20473
|
/***/ }),
|
|
20474
20474
|
|
|
20475
20475
|
/***/ 9684:
|
|
20476
|
-
/***/ ((__unused_webpack_module, exports
|
|
20476
|
+
/***/ ((__unused_webpack_module, exports) => {
|
|
20477
20477
|
|
|
20478
20478
|
|
|
20479
20479
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
@@ -20481,13 +20481,16 @@ exports.isCloudMode = isCloudMode;
|
|
|
20481
20481
|
exports.enableCloudMode = enableCloudMode;
|
|
20482
20482
|
exports.getCloudModeStatus = getCloudModeStatus;
|
|
20483
20483
|
exports.shouldRegisterTool = shouldRegisterTool;
|
|
20484
|
-
const logger_js_1 = __webpack_require__(3039);
|
|
20485
20484
|
/**
|
|
20486
20485
|
* Check if MCP is running in cloud mode
|
|
20487
20486
|
* Cloud mode is enabled by:
|
|
20488
20487
|
* 1. Command line argument --cloud-mode
|
|
20489
20488
|
* 2. Environment variable CLOUDBASE_MCP_CLOUD_MODE=true
|
|
20490
20489
|
* 3. Environment variable MCP_CLOUD_MODE=true
|
|
20490
|
+
*
|
|
20491
|
+
* Intentionally does not import logger: logger.ts calls isCloudMode() during
|
|
20492
|
+
* module init, so importing logger here creates a circular dependency that
|
|
20493
|
+
* crashes `node dist/cli.cjs --cloud-mode` with `debug is not a function`.
|
|
20491
20494
|
*/
|
|
20492
20495
|
function isCloudMode() {
|
|
20493
20496
|
// Check for CLI argument first
|
|
@@ -20495,21 +20498,13 @@ function isCloudMode() {
|
|
|
20495
20498
|
// Check environment variables
|
|
20496
20499
|
const cloudModeEnabled = process.env.CLOUDBASE_MCP_CLOUD_MODE === 'true' ||
|
|
20497
20500
|
process.env.MCP_CLOUD_MODE === 'true';
|
|
20498
|
-
|
|
20499
|
-
if (isEnabled) {
|
|
20500
|
-
(0, logger_js_1.debug)('Cloud mode is enabled', {
|
|
20501
|
-
source: hasCloudModeArg ? 'CLI_ARG' : 'ENV_VAR',
|
|
20502
|
-
envVar: process.env.CLOUDBASE_MCP_CLOUD_MODE || process.env.MCP_CLOUD_MODE
|
|
20503
|
-
});
|
|
20504
|
-
}
|
|
20505
|
-
return isEnabled;
|
|
20501
|
+
return hasCloudModeArg || cloudModeEnabled;
|
|
20506
20502
|
}
|
|
20507
20503
|
/**
|
|
20508
20504
|
* Enable cloud mode by setting environment variable
|
|
20509
20505
|
*/
|
|
20510
20506
|
function enableCloudMode() {
|
|
20511
20507
|
process.env.CLOUDBASE_MCP_CLOUD_MODE = 'true';
|
|
20512
|
-
(0, logger_js_1.debug)('Cloud mode enabled via API call');
|
|
20513
20508
|
}
|
|
20514
20509
|
/**
|
|
20515
20510
|
* Get cloud mode status for logging/debugging
|
|
@@ -20557,11 +20552,7 @@ function shouldRegisterTool(toolName) {
|
|
|
20557
20552
|
// Download tools - local file downloads
|
|
20558
20553
|
'manageStorage',
|
|
20559
20554
|
];
|
|
20560
|
-
|
|
20561
|
-
if (!shouldRegister) {
|
|
20562
|
-
(0, logger_js_1.debug)(`Cloud mode: skipping registration of incompatible tool: ${toolName}`);
|
|
20563
|
-
}
|
|
20564
|
-
return shouldRegister;
|
|
20555
|
+
return !cloudIncompatibleTools.includes(toolName);
|
|
20565
20556
|
}
|
|
20566
20557
|
|
|
20567
20558
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cloudbase/cloudbase-mcp",
|
|
3
|
-
"version": "2.25.
|
|
3
|
+
"version": "2.25.8",
|
|
4
4
|
"packageManager": "pnpm@10.8.0",
|
|
5
5
|
"description": "CloudBase MCP Server — operate Tencent CloudBase (database, auth, functions, storage, hosting) from AI coding tools via the Model Context Protocol. Part of CloudBase AI Toolkit.",
|
|
6
6
|
"main": "./dist/index.cjs",
|
|
@@ -48,6 +48,8 @@
|
|
|
48
48
|
"test:watch": "npm run build && vitest",
|
|
49
49
|
"test:coverage": "npm run build && vitest run --coverage",
|
|
50
50
|
"test:pg:cloud": "npm run build && node ./scripts/verify-pg-cloud-smoke.mjs",
|
|
51
|
+
"test:cli:cloud-mode": "node ./scripts/verify-cli-cloud-mode-smoke.mjs",
|
|
52
|
+
"test:npm:tarball-smoke": "node ./scripts/verify-npm-tarball-smoke.mjs",
|
|
51
53
|
"test:inspector": "npm run build && npx @modelcontextprotocol/inspector node ./dist/cli.js",
|
|
52
54
|
"prepublishOnly": "npm run build && node scripts/prepare-publish.cjs",
|
|
53
55
|
"postpublish": "node scripts/restore-deps.cjs"
|