@cloudbase/cloudbase-mcp 2.23.8 → 2.23.9

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 CHANGED
@@ -13,7 +13,6 @@ import * as __WEBPACK_EXTERNAL_MODULE_https__ from "https";
13
13
  import * as __WEBPACK_EXTERNAL_MODULE_net__ from "net";
14
14
  import * as __WEBPACK_EXTERNAL_MODULE_fs__ from "fs";
15
15
  import * as __WEBPACK_EXTERNAL_MODULE__modelcontextprotocol_sdk_server_mcp_js_45c326f0__ from "@modelcontextprotocol/sdk/server/mcp.js";
16
- import * as __WEBPACK_EXTERNAL_MODULE_node_path_02319fef__ from "node:path";
17
16
  import * as __WEBPACK_EXTERNAL_MODULE_child_process__ from "child_process";
18
17
  import * as __WEBPACK_EXTERNAL_MODULE_ws__ from "ws";
19
18
  import * as __WEBPACK_EXTERNAL_MODULE__cloudbase_manager_node_6a52ea40__ from "@cloudbase/manager-node";
@@ -24,7 +23,6 @@ import * as __WEBPACK_EXTERNAL_MODULE_crypto__ from "crypto";
24
23
  import * as __WEBPACK_EXTERNAL_MODULE_fs_promises_f8dae9d1__ from "fs/promises";
25
24
  import * as __WEBPACK_EXTERNAL_MODULE_os__ from "os";
26
25
  import * as __WEBPACK_EXTERNAL_MODULE_winston__ from "winston";
27
- import * as __WEBPACK_EXTERNAL_MODULE_node_fs_75ed2103__ from "node:fs";
28
26
  /******/ var __webpack_modules__ = ({
29
27
 
30
28
  /***/ 622:
@@ -2202,7 +2200,7 @@ ${envIdSection}
2202
2200
  ## 环境信息
2203
2201
  - 操作系统: ${os_1.default.type()} ${os_1.default.release()}
2204
2202
  - Node.js版本: ${process.version}
2205
- - MCP 版本:${process.env.npm_package_version || "2.23.8" || 0}
2203
+ - MCP 版本:${process.env.npm_package_version || "2.23.9" || 0}
2206
2204
  - 系统架构: ${os_1.default.arch()}
2207
2205
  - 时间: ${new Date().toISOString()}
2208
2206
  - 请求ID: ${requestId}
@@ -2283,7 +2281,7 @@ function createWrappedHandler(name, handler, server) {
2283
2281
  requestId: (typeof error === 'object' && error && 'requestId' in error) ? error.requestId : '',
2284
2282
  ide: server.ide || process.env.INTEGRATION_IDE || ''
2285
2283
  });
2286
- const mcpVersion = true ? "2.23.8" : 0;
2284
+ const mcpVersion = true ? "2.23.9" : 0;
2287
2285
  const requestIdSuffix = requestId ? `\n🆔 RequestId: ${requestId}` : '';
2288
2286
  const enhancedErrorMessage = `${errorMessage}${requestIdSuffix}\n\n📦 CloudBase MCP v${mcpVersion}\n🔗 遇到问题?请复制以下链接到浏览器打开\n即可自动携带错误详情快速创建 GitHub Issue:\n${issueLink}`;
2289
2287
  // 创建新的错误对象,保持原有的错误类型但更新消息
@@ -9841,13 +9839,6 @@ function registerAppAuthTools(server) {
9841
9839
  }
9842
9840
 
9843
9841
 
9844
- /***/ }),
9845
-
9846
- /***/ 5663:
9847
- /***/ ((module) => {
9848
-
9849
- module.exports = __WEBPACK_EXTERNAL_MODULE_node_path_02319fef__;
9850
-
9851
9842
  /***/ }),
9852
9843
 
9853
9844
  /***/ 5814:
@@ -9917,7 +9908,7 @@ class TelemetryReporter {
9917
9908
  const nodeVersion = process.version; // Node.js版本
9918
9909
  const arch = os_1.default.arch(); // 系统架构
9919
9910
  // 从构建时注入的版本号获取MCP版本信息
9920
- const mcpVersion = process.env.npm_package_version || "2.23.8" || 0;
9911
+ const mcpVersion = process.env.npm_package_version || "2.23.9" || 0;
9921
9912
  return {
9922
9913
  userAgent: `${osType} ${osRelease} ${arch} ${nodeVersion} CloudBase-MCP/${mcpVersion}`,
9923
9914
  deviceId: this.deviceId,
@@ -11587,16 +11578,12 @@ module.exports = __WEBPACK_EXTERNAL_MODULE_ws__;
11587
11578
  /***/ }),
11588
11579
 
11589
11580
  /***/ 6473:
11590
- /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
11581
+ /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
11591
11582
 
11592
11583
 
11593
- var __importDefault = (this && this.__importDefault) || function (mod) {
11594
- return (mod && mod.__esModule) ? mod : { "default": mod };
11595
- };
11596
11584
  Object.defineProperty(exports, "__esModule", ({ value: true }));
11585
+ exports.__resetPgReadyCache = __resetPgReadyCache;
11597
11586
  exports.registerPGDatabaseTools = registerPGDatabaseTools;
11598
- const node_fs_1 = __webpack_require__(9627);
11599
- const node_path_1 = __importDefault(__webpack_require__(5663));
11600
11587
  const zod_1 = __webpack_require__(2971);
11601
11588
  const cloudbase_manager_js_1 = __webpack_require__(3431);
11602
11589
  const tool_result_js_1 = __webpack_require__(9835);
@@ -11611,7 +11598,6 @@ const QUERY_ACTIONS = [
11611
11598
  "sql",
11612
11599
  ];
11613
11600
  const MANAGE_ACTIONS = [
11614
- "init",
11615
11601
  "execute",
11616
11602
  "dryRun",
11617
11603
  "planMigration",
@@ -11632,63 +11618,19 @@ function buildNextAction(tool, action, reason, suggestedArgs) {
11632
11618
  reason,
11633
11619
  };
11634
11620
  }
11635
- function getPgContextStorePath() {
11636
- return (process.env.CLOUDBASE_PG_CONTEXT_PATH ??
11637
- node_path_1.default.join(process.env.HOME ?? ".", ".cloudbase-mcp", "pg-context.json"));
11638
- }
11639
- async function loadStoredPgContext() {
11640
- if (!process.env.CLOUDBASE_PG_CONTEXT_PATH) {
11641
- return undefined;
11642
- }
11643
- try {
11644
- const raw = await node_fs_1.promises.readFile(getPgContextStorePath(), "utf8");
11645
- return JSON.parse(raw);
11646
- }
11647
- catch {
11648
- return undefined;
11649
- }
11650
- }
11651
- async function savePgContext(server, context) {
11652
- server.pgRuntimeContext = context;
11653
- if (!process.env.CLOUDBASE_PG_CONTEXT_PATH) {
11654
- return;
11655
- }
11656
- const storePath = getPgContextStorePath();
11657
- await node_fs_1.promises.mkdir(node_path_1.default.dirname(storePath), { recursive: true });
11658
- await node_fs_1.promises.writeFile(storePath, JSON.stringify(context, null, 2), {
11659
- encoding: "utf8",
11660
- mode: 0o600,
11661
- });
11662
- await node_fs_1.promises.chmod(storePath, 0o600).catch(() => undefined);
11663
- }
11664
- async function getPgContext(server) {
11665
- if (server.pgRuntimeContext) {
11666
- return server.pgRuntimeContext;
11667
- }
11668
- const stored = await loadStoredPgContext();
11669
- if (stored) {
11670
- server.pgRuntimeContext = stored;
11671
- }
11672
- return stored;
11673
- }
11674
- function buildMissingContextResult() {
11675
- return buildPgToolResult({
11676
- success: false,
11677
- errorCode: "PG_CONTEXT_NOT_INITIALIZED",
11678
- message: "PostgreSQL context is not initialized yet. Call managePgDatabase(action=init) to bind the current CloudBase environment's built-in PostgreSQL runtime.",
11679
- nextActions: [
11680
- buildNextAction(MANAGE_PG_DATABASE, "init", "初始化 CloudBase PG 云端执行上下文,然后再查询 schema 或执行 SQL。", { action: "init" }),
11681
- ],
11682
- });
11683
- }
11684
- function sanitizePgContext(context) {
11621
+ /**
11622
+ * 从 cloudBaseOptions + args 推导 PG 执行上下文(无状态)
11623
+ * 照搬 MySQL 的 resolveSqlDbContext 模式
11624
+ */
11625
+ async function resolvePgDbContext(cloudBaseOptions, args) {
11626
+ const envId = args?.envId ??
11627
+ cloudBaseOptions?.envId ??
11628
+ (await (0, cloudbase_manager_js_1.getEnvId)(cloudBaseOptions));
11685
11629
  return {
11686
- envId: context.envId,
11687
- instanceId: context.instanceId,
11688
- defaultSchema: context.defaultSchema,
11689
- runtimeMode: context.runtimeMode,
11690
- bootstrapMode: context.bootstrapMode,
11691
- role: context.role,
11630
+ envId,
11631
+ instanceId: args?.instanceId ?? "cloudbase-pg",
11632
+ defaultSchema: args?.defaultSchema ?? "public",
11633
+ role: args?.role ?? "cloudbase_admin",
11692
11634
  };
11693
11635
  }
11694
11636
  function normalizeLimit(limit, fallback = 20, max = 200) {
@@ -12256,89 +12198,65 @@ function createManagerPgClient(context, cloudBaseOptions) {
12256
12198
  function sleep(ms) {
12257
12199
  return new Promise((resolve) => setTimeout(resolve, ms));
12258
12200
  }
12259
- async function ensurePgReady(context, deps, options) {
12260
- const maxAttempts = options?.maxAttempts ?? 20;
12261
- const retryDelayMs = options?.retryDelayMs ?? 1000;
12262
- let lastError;
12263
- for (let attempt = 1; attempt <= maxAttempts; attempt += 1) {
12264
- try {
12265
- await withPgClient(context, deps, async (client) => {
12266
- await client.query("SELECT 1");
12267
- });
12268
- return;
12269
- }
12270
- catch (error) {
12271
- lastError = error;
12272
- if (attempt === maxAttempts) {
12273
- break;
12201
+ /**
12202
+ * 模块级 Promise 缓存:同一 server 生命周期内只探测一次 PG 就绪状态
12203
+ * 照搬 MySQL lazy 就绪检查模式,避免每次业务调用都 SELECT 1
12204
+ */
12205
+ let pgReadyPromise = null;
12206
+ /**
12207
+ * @internal 重置就绪探测缓存(仅供测试使用)
12208
+ */
12209
+ function __resetPgReadyCache() {
12210
+ pgReadyPromise = null;
12211
+ }
12212
+ /**
12213
+ * 首次 SQL 调用时探测 PG 就绪,Promise 缓存避免重复探测
12214
+ * 探测失败抛错,由调用方捕获返回 PG_NOT_READY 错误码
12215
+ */
12216
+ async function ensurePgReadyOnce(cloudBaseOptions, deps) {
12217
+ if (pgReadyPromise) {
12218
+ return pgReadyPromise;
12219
+ }
12220
+ pgReadyPromise = (async () => {
12221
+ const context = await resolvePgDbContext(cloudBaseOptions);
12222
+ const maxAttempts = deps.readyCheckOptions?.maxAttempts ?? 20;
12223
+ const retryDelayMs = deps.readyCheckOptions?.retryDelayMs ?? 1000;
12224
+ let lastError;
12225
+ for (let attempt = 1; attempt <= maxAttempts; attempt += 1) {
12226
+ try {
12227
+ await withPgClient(context, deps, async (client) => {
12228
+ await client.query("SELECT 1");
12229
+ });
12230
+ return;
12231
+ }
12232
+ catch (error) {
12233
+ lastError = error;
12234
+ if (attempt === maxAttempts) {
12235
+ break;
12236
+ }
12237
+ await sleep(retryDelayMs);
12274
12238
  }
12275
- await sleep(retryDelayMs);
12276
12239
  }
12277
- }
12278
- const reason = lastError instanceof Error ? lastError.message : String(lastError);
12279
- throw new Error(`PostgreSQL is not ready after ${maxAttempts} attempts. Last error: ${reason}`);
12280
- }
12281
- async function handleInit(args, server, deps) {
12282
- const existing = await getPgContext(server);
12283
- const resolvedEnvId = args.envId ??
12284
- server.cloudBaseOptions?.envId ??
12285
- process.env.CLOUDBASE_ENV_ID ??
12286
- existing?.envId;
12287
- if (!resolvedEnvId) {
12288
- return buildPgToolResult({
12289
- success: false,
12290
- errorCode: "ENV_ID_REQUIRED",
12291
- message: "CloudBase PostgreSQL only supports the built-in cloud runtime. Provide envId or bind a CloudBase environment before calling managePgDatabase(action=init).",
12292
- });
12293
- }
12294
- const bootstrapResult = {
12295
- instanceId: args.instanceId ?? "cloudbase-pg",
12296
- defaultSchema: args.defaultSchema ?? "public",
12297
- status: "ready",
12298
- runtimeMode: "cloudbase-manager",
12299
- role: args.role ?? "cloudbase_admin",
12300
- };
12301
- const now = new Date().toISOString();
12302
- const context = {
12303
- envId: resolvedEnvId,
12304
- instanceId: bootstrapResult.instanceId,
12305
- defaultSchema: bootstrapResult.defaultSchema,
12306
- runtimeMode: "cloudbase-manager",
12307
- bootstrapMode: "cloud",
12308
- role: bootstrapResult.role,
12309
- createdAt: existing?.createdAt ?? now,
12310
- updatedAt: now,
12311
- };
12312
- await ensurePgReady(context, deps, deps.readyCheckOptions);
12313
- await savePgContext(server, context);
12314
- return buildPgToolResult({
12315
- success: true,
12316
- data: {
12317
- context: {
12318
- ...sanitizePgContext(context),
12319
- },
12320
- status: bootstrapResult.status,
12321
- },
12322
- message: "CloudBase PG 云端执行上下文已就绪。先查询对象或 schema,再执行写入 SQL。",
12323
- nextActions: [
12324
- buildNextAction(QUERY_PG_DATABASE, "objects", "List schema-qualified database objects before drilling into a specific table.", { action: "objects", limit: 20 }),
12325
- buildSchemaNextAction("Inspect a concrete schema-qualified table after you know which object matters.", `${context.defaultSchema}.your_table`),
12326
- ],
12327
- });
12240
+ const reason = lastError instanceof Error ? lastError.message : String(lastError);
12241
+ throw new Error(`PostgreSQL is not ready after ${maxAttempts} attempts. Last error: ${reason}`);
12242
+ })();
12243
+ return pgReadyPromise;
12328
12244
  }
12329
12245
  async function handleQueryContext(server) {
12330
- const context = await getPgContext(server);
12331
- if (!context) {
12332
- return buildMissingContextResult();
12333
- }
12246
+ const context = await resolvePgDbContext(server.cloudBaseOptions);
12334
12247
  return buildPgToolResult({
12335
12248
  success: true,
12336
12249
  data: {
12337
12250
  context: {
12338
- ...sanitizePgContext(context),
12251
+ envId: context.envId,
12252
+ instanceId: context.instanceId,
12253
+ defaultSchema: context.defaultSchema,
12254
+ runtimeMode: "cloudbase-manager",
12255
+ bootstrapMode: "cloud",
12256
+ role: context.role,
12339
12257
  },
12340
12258
  },
12341
- message: "Resolved current CloudBase PostgreSQL context.",
12259
+ message: "Resolved current CloudBase PostgreSQL context (auto-derived).",
12342
12260
  nextActions: [
12343
12261
  buildNextAction(QUERY_PG_DATABASE, "objects", "List schema-qualified objects before inspecting an individual table.", { action: "objects", limit: 20 }),
12344
12262
  ],
@@ -12734,9 +12652,20 @@ function registerPGDatabaseTools(server, providedDeps) {
12734
12652
  if (args.action === "context") {
12735
12653
  return handleQueryContext(server);
12736
12654
  }
12737
- const context = await getPgContext(server);
12738
- if (!context) {
12739
- return buildMissingContextResult();
12655
+ const context = await resolvePgDbContext(server.cloudBaseOptions);
12656
+ try {
12657
+ await ensurePgReadyOnce(server.cloudBaseOptions, deps);
12658
+ }
12659
+ catch (error) {
12660
+ const reason = error instanceof Error ? error.message : String(error);
12661
+ return buildPgToolResult({
12662
+ success: false,
12663
+ errorCode: "PG_NOT_READY",
12664
+ message: `CloudBase PostgreSQL is not ready. ${reason}`,
12665
+ nextActions: [
12666
+ buildNextAction("queryEnv", "info", "检查当前环境 PostgreSQL 实例状态。", { action: "info", envId: context.envId }),
12667
+ ],
12668
+ });
12740
12669
  }
12741
12670
  switch (args.action) {
12742
12671
  case "objects":
@@ -12757,11 +12686,11 @@ function registerPGDatabaseTools(server, providedDeps) {
12757
12686
  });
12758
12687
  server.registerTool?.(MANAGE_PG_DATABASE, {
12759
12688
  title: "管理 PostgreSQL 上下文或执行写入 SQL",
12760
- description: "管理 CloudBase PostgreSQL MCP 上下文。仅支持 CloudBase 内置 PostgreSQL 云端 Manager SDK 执行路径、SQL 风险预检、迁移规划,以及在显式确认后执行写入 SQL。",
12689
+ description: "管理 CloudBase PostgreSQL:执行已确认的写入 SQL 或 DDL、SQL 风险预检、迁移规划。上下文自动从当前 MCP 环境推导,无需 init。仅支持 CloudBase 内置 PostgreSQL 云端 Manager SDK 执行路径。",
12761
12690
  inputSchema: {
12762
12691
  action: zod_1.z
12763
12692
  .enum(MANAGE_ACTIONS)
12764
- .describe("操作类型:init=初始化或绑定 PostgreSQL 上下文;execute=执行已确认的写入 SQL 或 DDL;dryRun=只分析 SQL 风险不执行;planMigration=通过 PreviewPGUserMigrations 预览迁移计划;applyMigration=通过 PushPGUserMigrations 应用迁移;listMigrations=查询已应用的 Migration 列表;migrationDetail=查看单条 Migration 详情;rollbackMigration=回滚指定 Migration"),
12693
+ .describe("操作类型:execute=执行已确认的写入 SQL 或 DDL;dryRun=只分析 SQL 风险不执行;planMigration=通过 PreviewPGUserMigrations 预览迁移计划;applyMigration=通过 PushPGUserMigrations 应用迁移;listMigrations=查询已应用的 Migration 列表;migrationDetail=查看单条 Migration 详情;rollbackMigration=回滚指定 Migration"),
12765
12694
  sql: zod_1.z
12766
12695
  .string()
12767
12696
  .optional()
@@ -12777,11 +12706,11 @@ function registerPGDatabaseTools(server, providedDeps) {
12777
12706
  instanceId: zod_1.z
12778
12707
  .string()
12779
12708
  .optional()
12780
- .describe("可选的 PostgreSQL 逻辑实例标识。"),
12709
+ .describe("可选的 PostgreSQL 逻辑实例标识,默认 cloudbase-pg。"),
12781
12710
  defaultSchema: zod_1.z
12782
12711
  .string()
12783
12712
  .optional()
12784
- .describe("默认 schema,会保存到 PG 上下文中,默认 public。"),
12713
+ .describe("可选的默认 schema,默认 public。"),
12785
12714
  role: zod_1.z
12786
12715
  .string()
12787
12716
  .optional()
@@ -12799,13 +12728,23 @@ function registerPGDatabaseTools(server, providedDeps) {
12799
12728
  category: CATEGORY,
12800
12729
  },
12801
12730
  }, async (args) => {
12731
+ const context = await resolvePgDbContext(server.cloudBaseOptions, args);
12732
+ const cbOpts = server.cloudBaseOptions;
12802
12733
  switch (args.action) {
12803
- case "init":
12804
- return handleInit(args, server, deps);
12805
12734
  case "execute": {
12806
- const context = await getPgContext(server);
12807
- if (!context) {
12808
- return buildMissingContextResult();
12735
+ try {
12736
+ await ensurePgReadyOnce(cbOpts, deps);
12737
+ }
12738
+ catch (error) {
12739
+ const reason = error instanceof Error ? error.message : String(error);
12740
+ return buildPgToolResult({
12741
+ success: false,
12742
+ errorCode: "PG_NOT_READY",
12743
+ message: `CloudBase PostgreSQL is not ready. ${reason}`,
12744
+ nextActions: [
12745
+ buildNextAction("queryEnv", "info", "检查当前环境 PostgreSQL 实例状态。", { action: "info", envId: context.envId }),
12746
+ ],
12747
+ });
12809
12748
  }
12810
12749
  return handleExecuteSql(args, context, deps);
12811
12750
  }
@@ -12816,17 +12755,12 @@ function registerPGDatabaseTools(server, providedDeps) {
12816
12755
  case "listMigrations":
12817
12756
  case "migrationDetail":
12818
12757
  case "rollbackMigration": {
12819
- const migrationCtx = await getPgContext(server);
12820
- if (!migrationCtx) {
12821
- return buildMissingContextResult();
12822
- }
12823
- const cbOpts = server.cloudBaseOptions;
12824
12758
  switch (args.action) {
12825
- case "planMigration": return handlePlanMigration(args, migrationCtx, deps, cbOpts);
12826
- case "applyMigration": return handleApplyMigration(args, migrationCtx, deps, cbOpts);
12827
- case "listMigrations": return handleListMigrations(args, migrationCtx, deps, cbOpts);
12828
- case "migrationDetail": return handleMigrationDetail(args, migrationCtx, deps, cbOpts);
12829
- case "rollbackMigration": return handleRollbackMigration(args, migrationCtx, deps, cbOpts);
12759
+ case "planMigration": return handlePlanMigration(args, context, deps, cbOpts);
12760
+ case "applyMigration": return handleApplyMigration(args, context, deps, cbOpts);
12761
+ case "listMigrations": return handleListMigrations(args, context, deps, cbOpts);
12762
+ case "migrationDetail": return handleMigrationDetail(args, context, deps, cbOpts);
12763
+ case "rollbackMigration": return handleRollbackMigration(args, context, deps, cbOpts);
12830
12764
  default: return buildPgToolResult({ success: false, errorCode: "UNSUPPORTED_ACTION", message: `Unsupported action: ${args.action}` });
12831
12765
  }
12832
12766
  }
@@ -13928,7 +13862,7 @@ function registerSetupTools(server) {
13928
13862
  server.registerTool("downloadTemplate", {
13929
13863
  title: "下载项目模板",
13930
13864
  description: `自动下载并部署CloudBase项目模板。
13931
- **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.23.8" : 0}),便于后续维护和版本追踪\n- 下载 rules 模板时,如果项目中已存在 README.md 文件,系统会自动保护该文件不被覆盖(除非设置 overwrite=true)`,
13865
+ **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.23.9" : 0}),便于后续维护和版本追踪\n- 下载 rules 模板时,如果项目中已存在 README.md 文件,系统会自动保护该文件不被覆盖(除非设置 overwrite=true)`,
13932
13866
  inputSchema: {
13933
13867
  template: zod_1.z
13934
13868
  .enum(["react", "vue", "miniprogram", "uniapp", "rules"])
@@ -17312,13 +17246,6 @@ function registerAgentTools(server) {
17312
17246
  }
17313
17247
 
17314
17248
 
17315
- /***/ }),
17316
-
17317
- /***/ 9627:
17318
- /***/ ((module) => {
17319
-
17320
- module.exports = __WEBPACK_EXTERNAL_MODULE_node_fs_75ed2103__;
17321
-
17322
17249
  /***/ }),
17323
17250
 
17324
17251
  /***/ 9684:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cloudbase/cloudbase-mcp",
3
- "version": "2.23.8",
3
+ "version": "2.23.9",
4
4
  "packageManager": "pnpm@10.8.0",
5
5
  "description": "腾讯云开发 MCP Server,通过AI提示词和MCP协议+云开发,让开发更智能、更高效,当你在Cursor/ VSCode GitHub Copilot/WinSurf/CodeBuddy/Augment Code/Claude Code等AI编程工具里写代码时,它能自动帮你生成可直接部署的前后端应用+小程序,并一键发布到腾讯云开发 CloudBase。",
6
6
  "main": "./dist/index.cjs",