@cloudbase/cloudbase-mcp 2.0.4 → 2.0.5
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 +11 -7
- package/dist/index.cjs +11 -7
- package/dist/index.js +11 -7
- package/package.json +1 -1
package/dist/cli.cjs
CHANGED
|
@@ -33476,9 +33476,12 @@ function wrap (fn) {
|
|
|
33476
33476
|
"use strict";
|
|
33477
33477
|
|
|
33478
33478
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
33479
|
+
exports.WRITE_SECURITY_RULE = exports.READ_SECURITY_RULE = void 0;
|
|
33479
33480
|
exports.registerSecurityRuleTools = registerSecurityRuleTools;
|
|
33480
33481
|
const zod_1 = __webpack_require__(21614);
|
|
33481
33482
|
const cloudbase_manager_js_1 = __webpack_require__(3431);
|
|
33483
|
+
exports.READ_SECURITY_RULE = "readSecurityRule";
|
|
33484
|
+
exports.WRITE_SECURITY_RULE = "writeSecurityRule";
|
|
33482
33485
|
/**
|
|
33483
33486
|
* 注册安全规则相关 Tool
|
|
33484
33487
|
* @param server MCP Server 实例
|
|
@@ -33487,7 +33490,7 @@ function registerSecurityRuleTools(server) {
|
|
|
33487
33490
|
const cloudBaseOptions = server.cloudBaseOptions;
|
|
33488
33491
|
const getManager = () => (0, cloudbase_manager_js_1.getCloudBaseManager)({ cloudBaseOptions });
|
|
33489
33492
|
// 读取安全规则 Tool
|
|
33490
|
-
server.registerTool?.(
|
|
33493
|
+
server.registerTool?.(exports.READ_SECURITY_RULE, {
|
|
33491
33494
|
title: "读取安全规则",
|
|
33492
33495
|
description: `读取指定资源(noSQL 数据库、SQL 数据库、云函数、存储桶)的安全规则和权限类别。`,
|
|
33493
33496
|
inputSchema: {
|
|
@@ -33587,7 +33590,7 @@ function registerSecurityRuleTools(server) {
|
|
|
33587
33590
|
}
|
|
33588
33591
|
});
|
|
33589
33592
|
// 写入安全规则 Tool
|
|
33590
|
-
server.registerTool?.(
|
|
33593
|
+
server.registerTool?.(exports.WRITE_SECURITY_RULE, {
|
|
33591
33594
|
title: "写入安全规则",
|
|
33592
33595
|
description: `设置指定资源(数据库集合、云函数、存储桶)的安全规则。`,
|
|
33593
33596
|
inputSchema: {
|
|
@@ -38318,6 +38321,7 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
|
38318
38321
|
exports.registerSQLDatabaseTools = registerSQLDatabaseTools;
|
|
38319
38322
|
const zod_1 = __webpack_require__(21614);
|
|
38320
38323
|
const cloudbase_manager_js_1 = __webpack_require__(3431);
|
|
38324
|
+
const security_rule_js_1 = __webpack_require__(7862);
|
|
38321
38325
|
const CATEGORY = "SQL database";
|
|
38322
38326
|
function registerSQLDatabaseTools(server) {
|
|
38323
38327
|
// Get cloudBaseOptions, if not available then undefined
|
|
@@ -38386,7 +38390,7 @@ function registerSQLDatabaseTools(server) {
|
|
|
38386
38390
|
// executeWriteSQL
|
|
38387
38391
|
server.registerTool?.("executeWriteSQL", {
|
|
38388
38392
|
title: "Execute write SQL statement",
|
|
38389
|
-
description: "Execute a write SQL statement on the SQL database (INSERT, UPDATE, DELETE, etc.).
|
|
38393
|
+
description: "Execute a write SQL statement on the SQL database (INSERT, UPDATE, DELETE, etc.). Whenever you create a new table, you **must** contain a fixed `_opeid` column that represents the user and is used for access control.",
|
|
38390
38394
|
inputSchema: {
|
|
38391
38395
|
sql: zod_1.z
|
|
38392
38396
|
.string()
|
|
@@ -38424,7 +38428,7 @@ function registerSQLDatabaseTools(server) {
|
|
|
38424
38428
|
type: "text",
|
|
38425
38429
|
text: JSON.stringify({
|
|
38426
38430
|
success: true,
|
|
38427
|
-
message:
|
|
38431
|
+
message: `SQL statement executed successfully. If you just created a table, make sure to check its security rule is set to a proper value by using \`${security_rule_js_1.WRITE_SECURITY_RULE}\` and \`${security_rule_js_1.READ_SECURITY_RULE}\` tools.`,
|
|
38428
38432
|
result,
|
|
38429
38433
|
}, null, 2),
|
|
38430
38434
|
},
|
|
@@ -134861,7 +134865,7 @@ class TelemetryReporter {
|
|
|
134861
134865
|
const nodeVersion = process.version; // Node.js版本
|
|
134862
134866
|
const arch = os_1.default.arch(); // 系统架构
|
|
134863
134867
|
// 从构建时注入的版本号获取MCP版本信息
|
|
134864
|
-
const mcpVersion = process.env.npm_package_version || "2.0.
|
|
134868
|
+
const mcpVersion = process.env.npm_package_version || "2.0.5" || 0;
|
|
134865
134869
|
return {
|
|
134866
134870
|
userAgent: `${osType} ${osRelease} ${arch} ${nodeVersion} CloudBase-MCP/${mcpVersion}`,
|
|
134867
134871
|
deviceId: this.deviceId,
|
|
@@ -200506,7 +200510,7 @@ ${envIdSection}
|
|
|
200506
200510
|
## 环境信息
|
|
200507
200511
|
- 操作系统: ${os_1.default.type()} ${os_1.default.release()}
|
|
200508
200512
|
- Node.js版本: ${process.version}
|
|
200509
|
-
- MCP 版本:${process.env.npm_package_version || "2.0.
|
|
200513
|
+
- MCP 版本:${process.env.npm_package_version || "2.0.5" || 0}
|
|
200510
200514
|
- 系统架构: ${os_1.default.arch()}
|
|
200511
200515
|
- 时间: ${new Date().toISOString()}
|
|
200512
200516
|
- 请求ID: ${requestId}
|
|
@@ -215083,7 +215087,7 @@ function registerSetupTools(server) {
|
|
|
215083
215087
|
title: "下载项目模板",
|
|
215084
215088
|
description: `自动下载并部署CloudBase项目模板。⚠️ **MANDATORY FOR NEW PROJECTS** ⚠️
|
|
215085
215089
|
|
|
215086
|
-
**CRITICAL**: This tool MUST be called FIRST when starting a new project.\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 ? "2.0.
|
|
215090
|
+
**CRITICAL**: This tool MUST be called FIRST when starting a new project.\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 ? "2.0.5" : 0}),便于后续维护和版本追踪\n- 下载 rules 模板时,如果项目中已存在 README.md 文件,系统会自动保护该文件不被覆盖(除非设置 overwrite=true)`,
|
|
215087
215091
|
inputSchema: {
|
|
215088
215092
|
template: zod_1.z.enum(["react", "vue", "miniprogram", "uniapp", "rules"]).describe("要下载的模板类型"),
|
|
215089
215093
|
ide: zod_1.z.enum(IDE_TYPES).optional().default("all").describe("指定要下载的IDE类型,默认为all(下载所有IDE配置)"),
|
package/dist/index.cjs
CHANGED
|
@@ -33475,9 +33475,12 @@ function wrap (fn) {
|
|
|
33475
33475
|
"use strict";
|
|
33476
33476
|
|
|
33477
33477
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
33478
|
+
exports.WRITE_SECURITY_RULE = exports.READ_SECURITY_RULE = void 0;
|
|
33478
33479
|
exports.registerSecurityRuleTools = registerSecurityRuleTools;
|
|
33479
33480
|
const zod_1 = __webpack_require__(21614);
|
|
33480
33481
|
const cloudbase_manager_js_1 = __webpack_require__(3431);
|
|
33482
|
+
exports.READ_SECURITY_RULE = "readSecurityRule";
|
|
33483
|
+
exports.WRITE_SECURITY_RULE = "writeSecurityRule";
|
|
33481
33484
|
/**
|
|
33482
33485
|
* 注册安全规则相关 Tool
|
|
33483
33486
|
* @param server MCP Server 实例
|
|
@@ -33486,7 +33489,7 @@ function registerSecurityRuleTools(server) {
|
|
|
33486
33489
|
const cloudBaseOptions = server.cloudBaseOptions;
|
|
33487
33490
|
const getManager = () => (0, cloudbase_manager_js_1.getCloudBaseManager)({ cloudBaseOptions });
|
|
33488
33491
|
// 读取安全规则 Tool
|
|
33489
|
-
server.registerTool?.(
|
|
33492
|
+
server.registerTool?.(exports.READ_SECURITY_RULE, {
|
|
33490
33493
|
title: "读取安全规则",
|
|
33491
33494
|
description: `读取指定资源(noSQL 数据库、SQL 数据库、云函数、存储桶)的安全规则和权限类别。`,
|
|
33492
33495
|
inputSchema: {
|
|
@@ -33586,7 +33589,7 @@ function registerSecurityRuleTools(server) {
|
|
|
33586
33589
|
}
|
|
33587
33590
|
});
|
|
33588
33591
|
// 写入安全规则 Tool
|
|
33589
|
-
server.registerTool?.(
|
|
33592
|
+
server.registerTool?.(exports.WRITE_SECURITY_RULE, {
|
|
33590
33593
|
title: "写入安全规则",
|
|
33591
33594
|
description: `设置指定资源(数据库集合、云函数、存储桶)的安全规则。`,
|
|
33592
33595
|
inputSchema: {
|
|
@@ -38317,6 +38320,7 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
|
38317
38320
|
exports.registerSQLDatabaseTools = registerSQLDatabaseTools;
|
|
38318
38321
|
const zod_1 = __webpack_require__(21614);
|
|
38319
38322
|
const cloudbase_manager_js_1 = __webpack_require__(3431);
|
|
38323
|
+
const security_rule_js_1 = __webpack_require__(7862);
|
|
38320
38324
|
const CATEGORY = "SQL database";
|
|
38321
38325
|
function registerSQLDatabaseTools(server) {
|
|
38322
38326
|
// Get cloudBaseOptions, if not available then undefined
|
|
@@ -38385,7 +38389,7 @@ function registerSQLDatabaseTools(server) {
|
|
|
38385
38389
|
// executeWriteSQL
|
|
38386
38390
|
server.registerTool?.("executeWriteSQL", {
|
|
38387
38391
|
title: "Execute write SQL statement",
|
|
38388
|
-
description: "Execute a write SQL statement on the SQL database (INSERT, UPDATE, DELETE, etc.).
|
|
38392
|
+
description: "Execute a write SQL statement on the SQL database (INSERT, UPDATE, DELETE, etc.). Whenever you create a new table, you **must** contain a fixed `_opeid` column that represents the user and is used for access control.",
|
|
38389
38393
|
inputSchema: {
|
|
38390
38394
|
sql: zod_1.z
|
|
38391
38395
|
.string()
|
|
@@ -38423,7 +38427,7 @@ function registerSQLDatabaseTools(server) {
|
|
|
38423
38427
|
type: "text",
|
|
38424
38428
|
text: JSON.stringify({
|
|
38425
38429
|
success: true,
|
|
38426
|
-
message:
|
|
38430
|
+
message: `SQL statement executed successfully. If you just created a table, make sure to check its security rule is set to a proper value by using \`${security_rule_js_1.WRITE_SECURITY_RULE}\` and \`${security_rule_js_1.READ_SECURITY_RULE}\` tools.`,
|
|
38427
38431
|
result,
|
|
38428
38432
|
}, null, 2),
|
|
38429
38433
|
},
|
|
@@ -134710,7 +134714,7 @@ class TelemetryReporter {
|
|
|
134710
134714
|
const nodeVersion = process.version; // Node.js版本
|
|
134711
134715
|
const arch = os_1.default.arch(); // 系统架构
|
|
134712
134716
|
// 从构建时注入的版本号获取MCP版本信息
|
|
134713
|
-
const mcpVersion = process.env.npm_package_version || "2.0.
|
|
134717
|
+
const mcpVersion = process.env.npm_package_version || "2.0.5" || 0;
|
|
134714
134718
|
return {
|
|
134715
134719
|
userAgent: `${osType} ${osRelease} ${arch} ${nodeVersion} CloudBase-MCP/${mcpVersion}`,
|
|
134716
134720
|
deviceId: this.deviceId,
|
|
@@ -200355,7 +200359,7 @@ ${envIdSection}
|
|
|
200355
200359
|
## 环境信息
|
|
200356
200360
|
- 操作系统: ${os_1.default.type()} ${os_1.default.release()}
|
|
200357
200361
|
- Node.js版本: ${process.version}
|
|
200358
|
-
- MCP 版本:${process.env.npm_package_version || "2.0.
|
|
200362
|
+
- MCP 版本:${process.env.npm_package_version || "2.0.5" || 0}
|
|
200359
200363
|
- 系统架构: ${os_1.default.arch()}
|
|
200360
200364
|
- 时间: ${new Date().toISOString()}
|
|
200361
200365
|
- 请求ID: ${requestId}
|
|
@@ -214932,7 +214936,7 @@ function registerSetupTools(server) {
|
|
|
214932
214936
|
title: "下载项目模板",
|
|
214933
214937
|
description: `自动下载并部署CloudBase项目模板。⚠️ **MANDATORY FOR NEW PROJECTS** ⚠️
|
|
214934
214938
|
|
|
214935
|
-
**CRITICAL**: This tool MUST be called FIRST when starting a new project.\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 ? "2.0.
|
|
214939
|
+
**CRITICAL**: This tool MUST be called FIRST when starting a new project.\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 ? "2.0.5" : 0}),便于后续维护和版本追踪\n- 下载 rules 模板时,如果项目中已存在 README.md 文件,系统会自动保护该文件不被覆盖(除非设置 overwrite=true)`,
|
|
214936
214940
|
inputSchema: {
|
|
214937
214941
|
template: zod_1.z.enum(["react", "vue", "miniprogram", "uniapp", "rules"]).describe("要下载的模板类型"),
|
|
214938
214942
|
ide: zod_1.z.enum(IDE_TYPES).optional().default("all").describe("指定要下载的IDE类型,默认为all(下载所有IDE配置)"),
|
package/dist/index.js
CHANGED
|
@@ -6021,7 +6021,7 @@ ${envIdSection}
|
|
|
6021
6021
|
## 环境信息
|
|
6022
6022
|
- 操作系统: ${os_1.default.type()} ${os_1.default.release()}
|
|
6023
6023
|
- Node.js版本: ${process.version}
|
|
6024
|
-
- MCP 版本:${process.env.npm_package_version || "2.0.
|
|
6024
|
+
- MCP 版本:${process.env.npm_package_version || "2.0.5" || 0}
|
|
6025
6025
|
- 系统架构: ${os_1.default.arch()}
|
|
6026
6026
|
- 时间: ${new Date().toISOString()}
|
|
6027
6027
|
- 请求ID: ${requestId}
|
|
@@ -6178,6 +6178,7 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
|
6178
6178
|
exports.registerSQLDatabaseTools = registerSQLDatabaseTools;
|
|
6179
6179
|
const zod_1 = __webpack_require__(971);
|
|
6180
6180
|
const cloudbase_manager_js_1 = __webpack_require__(431);
|
|
6181
|
+
const security_rule_js_1 = __webpack_require__(862);
|
|
6181
6182
|
const CATEGORY = "SQL database";
|
|
6182
6183
|
function registerSQLDatabaseTools(server) {
|
|
6183
6184
|
// Get cloudBaseOptions, if not available then undefined
|
|
@@ -6246,7 +6247,7 @@ function registerSQLDatabaseTools(server) {
|
|
|
6246
6247
|
// executeWriteSQL
|
|
6247
6248
|
server.registerTool?.("executeWriteSQL", {
|
|
6248
6249
|
title: "Execute write SQL statement",
|
|
6249
|
-
description: "Execute a write SQL statement on the SQL database (INSERT, UPDATE, DELETE, etc.).
|
|
6250
|
+
description: "Execute a write SQL statement on the SQL database (INSERT, UPDATE, DELETE, etc.). Whenever you create a new table, you **must** contain a fixed `_opeid` column that represents the user and is used for access control.",
|
|
6250
6251
|
inputSchema: {
|
|
6251
6252
|
sql: zod_1.z
|
|
6252
6253
|
.string()
|
|
@@ -6284,7 +6285,7 @@ function registerSQLDatabaseTools(server) {
|
|
|
6284
6285
|
type: "text",
|
|
6285
6286
|
text: JSON.stringify({
|
|
6286
6287
|
success: true,
|
|
6287
|
-
message:
|
|
6288
|
+
message: `SQL statement executed successfully. If you just created a table, make sure to check its security rule is set to a proper value by using \`${security_rule_js_1.WRITE_SECURITY_RULE}\` and \`${security_rule_js_1.READ_SECURITY_RULE}\` tools.`,
|
|
6288
6289
|
result,
|
|
6289
6290
|
}, null, 2),
|
|
6290
6291
|
},
|
|
@@ -7210,7 +7211,7 @@ function registerSetupTools(server) {
|
|
|
7210
7211
|
title: "下载项目模板",
|
|
7211
7212
|
description: `自动下载并部署CloudBase项目模板。⚠️ **MANDATORY FOR NEW PROJECTS** ⚠️
|
|
7212
7213
|
|
|
7213
|
-
**CRITICAL**: This tool MUST be called FIRST when starting a new project.\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 ? "2.0.
|
|
7214
|
+
**CRITICAL**: This tool MUST be called FIRST when starting a new project.\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 ? "2.0.5" : 0}),便于后续维护和版本追踪\n- 下载 rules 模板时,如果项目中已存在 README.md 文件,系统会自动保护该文件不被覆盖(除非设置 overwrite=true)`,
|
|
7214
7215
|
inputSchema: {
|
|
7215
7216
|
template: zod_1.z.enum(["react", "vue", "miniprogram", "uniapp", "rules"]).describe("要下载的模板类型"),
|
|
7216
7217
|
ide: zod_1.z.enum(IDE_TYPES).optional().default("all").describe("指定要下载的IDE类型,默认为all(下载所有IDE配置)"),
|
|
@@ -7893,9 +7894,12 @@ function registerStorageTools(server) {
|
|
|
7893
7894
|
|
|
7894
7895
|
|
|
7895
7896
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
7897
|
+
exports.WRITE_SECURITY_RULE = exports.READ_SECURITY_RULE = void 0;
|
|
7896
7898
|
exports.registerSecurityRuleTools = registerSecurityRuleTools;
|
|
7897
7899
|
const zod_1 = __webpack_require__(971);
|
|
7898
7900
|
const cloudbase_manager_js_1 = __webpack_require__(431);
|
|
7901
|
+
exports.READ_SECURITY_RULE = "readSecurityRule";
|
|
7902
|
+
exports.WRITE_SECURITY_RULE = "writeSecurityRule";
|
|
7899
7903
|
/**
|
|
7900
7904
|
* 注册安全规则相关 Tool
|
|
7901
7905
|
* @param server MCP Server 实例
|
|
@@ -7904,7 +7908,7 @@ function registerSecurityRuleTools(server) {
|
|
|
7904
7908
|
const cloudBaseOptions = server.cloudBaseOptions;
|
|
7905
7909
|
const getManager = () => (0, cloudbase_manager_js_1.getCloudBaseManager)({ cloudBaseOptions });
|
|
7906
7910
|
// 读取安全规则 Tool
|
|
7907
|
-
server.registerTool?.(
|
|
7911
|
+
server.registerTool?.(exports.READ_SECURITY_RULE, {
|
|
7908
7912
|
title: "读取安全规则",
|
|
7909
7913
|
description: `读取指定资源(noSQL 数据库、SQL 数据库、云函数、存储桶)的安全规则和权限类别。`,
|
|
7910
7914
|
inputSchema: {
|
|
@@ -8004,7 +8008,7 @@ function registerSecurityRuleTools(server) {
|
|
|
8004
8008
|
}
|
|
8005
8009
|
});
|
|
8006
8010
|
// 写入安全规则 Tool
|
|
8007
|
-
server.registerTool?.(
|
|
8011
|
+
server.registerTool?.(exports.WRITE_SECURITY_RULE, {
|
|
8008
8012
|
title: "写入安全规则",
|
|
8009
8013
|
description: `设置指定资源(数据库集合、云函数、存储桶)的安全规则。`,
|
|
8010
8014
|
inputSchema: {
|
|
@@ -8249,7 +8253,7 @@ class TelemetryReporter {
|
|
|
8249
8253
|
const nodeVersion = process.version; // Node.js版本
|
|
8250
8254
|
const arch = os_1.default.arch(); // 系统架构
|
|
8251
8255
|
// 从构建时注入的版本号获取MCP版本信息
|
|
8252
|
-
const mcpVersion = process.env.npm_package_version || "2.0.
|
|
8256
|
+
const mcpVersion = process.env.npm_package_version || "2.0.5" || 0;
|
|
8253
8257
|
return {
|
|
8254
8258
|
userAgent: `${osType} ${osRelease} ${arch} ${nodeVersion} CloudBase-MCP/${mcpVersion}`,
|
|
8255
8259
|
deviceId: this.deviceId,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cloudbase/cloudbase-mcp",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.5",
|
|
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",
|