@cloudbase/cloudbase-mcp 2.17.0-beta.2 → 2.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.cjs CHANGED
@@ -1769,7 +1769,6 @@ const auth_js_1 = __webpack_require__(77291);
1769
1769
  const cloudbase_manager_js_1 = __webpack_require__(3431);
1770
1770
  const logger_js_1 = __webpack_require__(13039);
1771
1771
  const tool_result_js_1 = __webpack_require__(9835);
1772
- const rag_js_1 = __webpack_require__(64215);
1773
1772
  const env_setup_js_1 = __webpack_require__(6978);
1774
1773
  /**
1775
1774
  * Simplify environment list data by keeping only essential fields for AI assistant
@@ -2226,19 +2225,6 @@ async function enrichEnvInfoWithBilling(params) {
2226
2225
  return params.result;
2227
2226
  }
2228
2227
  }
2229
- async function getGuidePrompt(server) {
2230
- if (getCurrentIde(server) === "CodeBuddy" ||
2231
- process.env.CLOUDBASE_GUIDE_PROMPT === "false") {
2232
- return "";
2233
- }
2234
- try {
2235
- return await (0, rag_js_1.getClaudePrompt)();
2236
- }
2237
- catch (promptError) {
2238
- (0, logger_js_1.debug)("Failed to get CLAUDE prompt", { error: promptError });
2239
- return "";
2240
- }
2241
- }
2242
2228
  function normalizeOptionalToolString(value) {
2243
2229
  return typeof value === "string" && value.trim().length > 0
2244
2230
  ? value.trim()
@@ -2897,23 +2883,7 @@ function registerEnvTools(server) {
2897
2883
  default:
2898
2884
  throw new Error(`不支持的查询类型: ${action}`);
2899
2885
  }
2900
- let responseText = JSON.stringify(result, null, 2);
2901
- // For info action, append CLAUDE.md prompt content (skip for CodeBuddy IDE)
2902
- const currentIde = server.ide || process.env.INTEGRATION_IDE;
2903
- if (action === "info" && currentIde !== "CodeBuddy" && process.env.CLOUDBASE_GUIDE_PROMPT !== "false") {
2904
- try {
2905
- const promptContent = await (0, rag_js_1.getClaudePrompt)();
2906
- if (promptContent) {
2907
- responseText += `\n\n⚠️ 重要提示:后续所有云开发相关的开发工作必须严格遵循以下开发规范和最佳实践:\n\n${promptContent}`;
2908
- }
2909
- }
2910
- catch (promptError) {
2911
- (0, logger_js_1.debug)("Failed to get CLAUDE prompt in envQuery", {
2912
- error: promptError,
2913
- });
2914
- // Continue without prompt if fetch fails
2915
- }
2916
- }
2886
+ const responseText = JSON.stringify(result, null, 2);
2917
2887
  return {
2918
2888
  content: [
2919
2889
  {
@@ -88375,6 +88345,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
88375
88345
  Object.defineProperty(exports, "__esModule", ({ value: true }));
88376
88346
  exports.MANAGE_FUNCTION_ACTIONS = exports.QUERY_FUNCTION_ACTIONS = exports.TRIGGER_CONFIG_EXAMPLES = exports.SUPPORTED_TRIGGER_TYPES = exports.DEFAULT_NODEJS_RUNTIME = exports.SUPPORTED_NODEJS_RUNTIMES = exports.RECOMMENDED_RUNTIMES = exports.DEFAULT_RUNTIME = exports.ALL_SUPPORTED_RUNTIMES = exports.SUPPORTED_RUNTIMES = void 0;
88377
88347
  exports.formatRuntimeList = formatRuntimeList;
88348
+ exports.validateTimerCron = validateTimerCron;
88378
88349
  exports.shouldInstallDependencyForFunction = shouldInstallDependencyForFunction;
88379
88350
  exports.resolveEventFunctionRuntime = resolveEventFunctionRuntime;
88380
88351
  exports.buildFunctionOperationErrorMessage = buildFunctionOperationErrorMessage;
@@ -88478,12 +88449,32 @@ const VPC_SCHEMA = zod_1.z.object({
88478
88449
  vpcId: zod_1.z.string(),
88479
88450
  subnetId: zod_1.z.string(),
88480
88451
  });
88452
+ const SEVEN_FIELD_CRON_REGEX = /^\s*\S+\s+\S+\s+\S+\s+\S+\s+\S+\s+\S+\s+\S+\s*$/;
88453
+ function validateTimerCron(config) {
88454
+ const trimmed = config.trim();
88455
+ const fields = trimmed.split(/\s+/);
88456
+ if (fields.length === 5) {
88457
+ throw new Error(`timer 触发器的 cron 表达式必须使用 7 段格式(秒 分 时 日 月 星期 年),不支持标准 5 段格式。` +
88458
+ `\n收到 5 段: "${trimmed}"` +
88459
+ `\n正确示例: "0 */5 * * * * *"(每 5 分钟执行),"0 0 2 1 * * *"(每月 1 号 2 点)`);
88460
+ }
88461
+ if (fields.length < 7) {
88462
+ throw new Error(`timer 触发器的 cron 表达式必须使用 7 段格式(秒 分 时 日 月 星期 年),当前只有 ${fields.length} 段。` +
88463
+ `\n正确示例: "0 */5 * * * * *"(每 5 分钟执行),"0 0 2 1 * * *"(每月 1 号 2 点)`);
88464
+ }
88465
+ return trimmed;
88466
+ }
88481
88467
  const TRIGGER_SCHEMA = zod_1.z.object({
88482
88468
  name: zod_1.z.string().describe("触发器名称"),
88483
88469
  type: zod_1.z.enum(exports.SUPPORTED_TRIGGER_TYPES).describe("触发器类型"),
88484
88470
  config: zod_1.z
88485
88471
  .string()
88486
- .describe("触发器配置,timer 使用 7 段 cron:second minute hour day month week year"),
88472
+ .describe("触发器配置。timer 必须使用 CloudBase 7 段 cron 格式:秒 分 时 日 月 星期 年。" +
88473
+ "⚠️ 不支持标准 5 段 cron(如 */5 * * * * 是错误的)。" +
88474
+ "正确示例:0 */5 * * * * *(每5分钟)、0 0 2 1 * * *(每月1号2点)、0 30 9 * * * *(每天9:30)")
88475
+ .refine((val) => SEVEN_FIELD_CRON_REGEX.test(val), {
88476
+ message: "timer 触发器的 cron 表达式必须使用 7 段格式(秒 分 时 日 月 星期 年),不支持 5 段格式。正确示例:0 */5 * * * * *",
88477
+ }),
88487
88478
  });
88488
88479
  const CREATE_FUNCTION_SCHEMA = zod_1.z.object({
88489
88480
  name: zod_1.z.string().describe("函数名称"),
@@ -89146,6 +89137,12 @@ function registerFunctionTools(server) {
89146
89137
  if (!input.triggers?.length) {
89147
89138
  throw new Error("createFunctionTrigger 操作时,triggers 参数是必需的");
89148
89139
  }
89140
+ // Validate timer cron format before sending to CloudBase
89141
+ for (const trigger of input.triggers) {
89142
+ if (trigger.type === "timer") {
89143
+ validateTimerCron(trigger.config);
89144
+ }
89145
+ }
89149
89146
  const cloudbase = await getManager();
89150
89147
  const result = await cloudbase.functions.createFunctionTriggers(input.functionName, input.triggers);
89151
89148
  (0, cloudbase_manager_js_1.logCloudBaseResult)(server.logger, result);
@@ -89377,7 +89374,10 @@ function registerFunctionTools(server) {
89377
89374
  .enum(exports.MANAGE_FUNCTION_ACTIONS)
89378
89375
  .describe("写操作类型,例如 createFunction、invokeFunction、attachLayer"),
89379
89376
  func: CREATE_FUNCTION_SCHEMA.optional().describe("createFunction 操作的函数配置"),
89380
- functionRootPath: zod_1.z.string().optional().describe("函数根目录(父目录绝对路径)"),
89377
+ functionRootPath: zod_1.z.string().optional().describe("函数根目录(父目录绝对路径)。" +
89378
+ "本地应按 cloudfunctions/<functionName>/index.js 布局," +
89379
+ "此参数传 cloudfunctions 目录的绝对路径(如 /abs/path/cloudfunctions),不要传到函数名子目录。" +
89380
+ "SDK 会自动拼接函数名子目录。"),
89381
89381
  force: zod_1.z.boolean().optional().describe("createFunction 时是否覆盖"),
89382
89382
  functionName: zod_1.z.string().optional().describe("函数名称。大多数 action 使用该字段作为统一目标"),
89383
89383
  zipFile: zod_1.z.string().optional().describe("代码包的 base64 编码"),
@@ -133564,7 +133564,7 @@ class TelemetryReporter {
133564
133564
  const nodeVersion = process.version; // Node.js版本
133565
133565
  const arch = os_1.default.arch(); // 系统架构
133566
133566
  // 从构建时注入的版本号获取MCP版本信息
133567
- const mcpVersion = process.env.npm_package_version || "2.17.0-beta.2" || 0;
133567
+ const mcpVersion = process.env.npm_package_version || "2.17.1" || 0;
133568
133568
  return {
133569
133569
  userAgent: `${osType} ${osRelease} ${arch} ${nodeVersion} CloudBase-MCP/${mcpVersion}`,
133570
133570
  deviceId: this.deviceId,
@@ -177816,7 +177816,6 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
177816
177816
  };
177817
177817
  Object.defineProperty(exports, "__esModule", ({ value: true }));
177818
177818
  exports.resolveSkillSearchRoots = resolveSkillSearchRoots;
177819
- exports.getClaudePrompt = getClaudePrompt;
177820
177819
  exports.registerRagTools = registerRagTools;
177821
177820
  const adm_zip_1 = __importDefault(__webpack_require__(30283));
177822
177821
  const fs = __importStar(__webpack_require__(79748));
@@ -177825,7 +177824,6 @@ const os = __importStar(__webpack_require__(21820));
177825
177824
  const path = __importStar(__webpack_require__(39902));
177826
177825
  const zod_1 = __webpack_require__(21614);
177827
177826
  const cloudbase_manager_js_1 = __webpack_require__(3431);
177828
- const claude_prompt_js_1 = __webpack_require__(68359);
177829
177827
  const json_content_js_1 = __webpack_require__(4365);
177830
177828
  const logger_js_1 = __webpack_require__(13039);
177831
177829
  // 1. 枚举定义
@@ -178191,34 +178189,6 @@ async function downloadResources() {
178191
178189
  });
178192
178190
  return resourceDownloadPromise;
178193
178191
  }
178194
- // Get CLAUDE.md prompt content
178195
- // Priority: 1. From downloaded template, 2. Fallback to embedded constant
178196
- async function getClaudePrompt() {
178197
- try {
178198
- // Try to get from downloaded template
178199
- const extractDir = await downloadWebTemplate();
178200
- const claudePath = path.join(extractDir, "CLAUDE.md");
178201
- try {
178202
- const content = await fs.readFile(claudePath, "utf8");
178203
- return content;
178204
- }
178205
- catch (error) {
178206
- // CLAUDE.md not found in template, use fallback
178207
- (0, logger_js_1.warn)("[getClaudePrompt] CLAUDE.md not found in template, using fallback", {
178208
- error,
178209
- path: claudePath,
178210
- });
178211
- return claude_prompt_js_1.FALLBACK_CLAUDE_PROMPT;
178212
- }
178213
- }
178214
- catch (error) {
178215
- // Template download failed, use fallback
178216
- (0, logger_js_1.warn)("[getClaudePrompt] Template download failed, using fallback", {
178217
- error,
178218
- });
178219
- return claude_prompt_js_1.FALLBACK_CLAUDE_PROMPT;
178220
- }
178221
- }
178222
178192
  async function registerRagTools(server) {
178223
178193
  // 联网搜索
178224
178194
  server.registerTool?.("searchWeb", {
@@ -187740,323 +187710,6 @@ const fallback = {
187740
187710
  module.exports = isUnicodeSupported() ? main : fallback;
187741
187711
 
187742
187712
 
187743
- /***/ }),
187744
-
187745
- /***/ 68359:
187746
- /***/ ((__unused_webpack_module, exports) => {
187747
-
187748
- "use strict";
187749
-
187750
- Object.defineProperty(exports, "__esModule", ({ value: true }));
187751
- exports.FALLBACK_CLAUDE_PROMPT = void 0;
187752
- // Fallback CLAUDE.md prompt content
187753
- // This is used when template download fails or CLAUDE.md is not found in the template
187754
- exports.FALLBACK_CLAUDE_PROMPT = `---
187755
- description: CloudBase AI Development Rules Guide - Provides scenario-based best practices to ensure development quality
187756
- globs: *
187757
- alwaysApply: true
187758
- ---
187759
-
187760
- # CloudBase AI Development Rules Guide
187761
-
187762
- ## Quick Reference for AI
187763
-
187764
- **⚠️ CRITICAL: Read this section first based on your project type**
187765
-
187766
- ### When Developing a Web Project:
187767
- 1. **Environment Check**: Query environment info only when the task actually needs environment metadata, deployment, or an env ID. For existing applications with active TODOs or unfinished handlers, do not spend turns on hosting or domain queries unless the user explicitly asks for deployment.
187768
- 1. **Execution Mode for Existing-Code Tasks**: If the task is to complete an existing application, wire TODO logic, or repair a broken flow, do **not** enter design-only, brainstorming-only, or spec-only flows first. Gather only the minimum context needed, then implement directly. Do not stop after “project exploration complete”.
187769
- 1. **Existing File Focus (MANDATORY)**: For an existing Web app with active pages or TODO-bearing files, do not broad-scan the whole repo before coding. First inspect only the task-critical files: \`src/lib/backend.*\`, \`src/lib/auth.*\`, \`src/lib/cms-service.*\`, \`src/lib/storage-service.*\`, and the page/components that already consume those APIs. Then implement those TODOs before doing any wide repo exploration.
187770
- 1. **Task Tool Discipline**: For targeted repair tasks, do not spend many turns in \`TaskCreate\`, \`TaskUpdate\`, or project-management loops. At most keep one short checklist. After that, write code. Do not let task-management consume the turn budget.
187771
- 1. **No README / UI-Design Detour For Existing Apps**: If the repo already contains the target pages and only backend TODOs are missing, skip README-driven discovery and skip UI-design workflows unless the task explicitly asks for a visual redesign. Backend wiring is the priority.
187772
- 1. **No Broad Grep / Glob Sweep**: In targeted repair tasks, do not recursively Grep / Glob the whole repo for long periods. Open the known TODO-bearing files directly and start editing.
187773
- 3. **⚠️ UI Design (CRITICAL)**: **MUST read \`rules/ui-design/rule.md\` FIRST before generating any page, interface, component, or style** - This is NOT optional. You MUST explicitly read this file and output the design specification before writing any UI code.
187774
- 4. **Core Capabilities**: Read Core Capabilities section below (especially UI Design and Database + Authentication for Web)
187775
- 5. **Platform Rules**: Read \`rules/web-development/rule.md\` for platform-specific rules (SDK integration, static hosting, build configuration)
187776
- 6. **Authentication**: Read \`rules/auth-web/rule.md\` - **MUST use Web SDK built-in authentication**
187777
- - \`accessKey\` can only be a real Publishable Key obtained from CloudBase auth/app config. Never use \`envId\`, a username, or any placeholder string as \`accessKey\`.
187778
- - If you do not have a real Publishable Key yet, do not fabricate one. First query or configure auth readiness, or initialize without \`accessKey\` if the login flow itself is what will establish end-user identity.
187779
- 7. **Cloud Storage (when files are uploaded from browser code)**: Read \`rules/cloud-storage-web/rule.md\` before implementing upload / preview / temp URL flows. For local dev origins (for example Vite on \`127.0.0.1\` / \`localhost\`), query current security domains first and compare against the returned whitelist entry format (usually \`host:port\`, such as \`127.0.0.1:4173\` or \`localhost:5173\`). If \`envQuery(action="domains")\` reports missing local entries or returns a \`next_step\`, execute that \`envDomainManagement\` step before relying on \`app.uploadFile()\`. After upload, do not handcraft a storage URL from \`envId\`, bucket domain, or \`cloudPath\`; resolve an actual browser-usable URL through \`app.getTempFileURL()\` using the returned \`fileID\`.
187780
- 7. **Database**:
187781
- - NoSQL: \`rules/no-sql-web-sdk/rule.md\`
187782
- - MySQL: \`rules/relational-database-web/rule.md\` + \`rules/relational-database-mcp/rule.md\`
187783
-
187784
- ### When Developing a Mini Program Project:
187785
- 1. **Environment Check**: Call \`envQuery\` tool first (applies to all interactions)
187786
- 2. **⚠️ UI Design (CRITICAL)**: **MUST read \`rules/ui-design/rule.md\` FIRST before generating any page, interface, component, or style** - This is NOT optional. You MUST explicitly read this file and output the design specification before writing any UI code.
187787
- 3. **Core Capabilities**: Read Core Capabilities section below (especially UI Design and Database + Authentication for Mini Program)
187788
- 4. **Platform Rules**: Read \`rules/miniprogram-development/rule.md\` for platform-specific rules (project structure, WeChat Developer Tools, wx.cloud usage)
187789
- 5. **Authentication**: Read \`rules/auth-wechat/rule.md\` - **Naturally login-free, get OPENID in cloud functions**
187790
- 6. **Database**:
187791
- - NoSQL: \`rules/no-sql-wx-mp-sdk/rule.md\`
187792
- - MySQL: \`rules/relational-database-mcp/rule.md\` (via MCP tools)
187793
-
187794
- ---
187795
-
187796
- ## Core Capabilities (Must Be Done Well)
187797
-
187798
- As the most important part of application development, the following four core capabilities must be done well, without needing to read different rules for different platforms:
187799
-
187800
- ### 1. ⚠️ UI Design (CRITICAL - Highest Priority)
187801
- **⚠️ MANDATORY: Must strictly follow \`rules/ui-design/rule.md\` rules for ALL design work**
187802
-
187803
- **🚨 CRITICAL ENFORCEMENT: You MUST explicitly read the file \`rules/ui-design/rule.md\` before generating ANY UI code. This is NOT a suggestion - it is a MANDATORY requirement.**
187804
-
187805
- **Before generating ANY page, interface, component, or style:**
187806
- 1. **MUST FIRST explicitly read \`rules/ui-design/rule.md\` file** - Use file reading tools to read this file, do NOT skip this step
187807
- 2. **MUST complete design specification output** before writing any code:
187808
- - Purpose Statement
187809
- - Aesthetic Direction (choose from specific options, NOT generic terms)
187810
- - Color Palette (with hex codes, avoid forbidden colors)
187811
- - Typography (specific font names, avoid forbidden fonts)
187812
- - Layout Strategy (asymmetric/creative approach, avoid centered templates)
187813
- 3. **MUST ensure** generated interfaces have distinctive aesthetic styles and high-quality visual design
187814
- 4. **MUST avoid** generic AI aesthetics (common fonts, clichéd color schemes, templated designs)
187815
-
187816
- **This applies to ALL tasks involving:**
187817
- - Page generation
187818
- - Interface creation
187819
- - Component design
187820
- - Style/visual effects
187821
- - Any frontend visual elements
187822
-
187823
- **⚠️ VIOLATION DETECTION: If you find yourself writing UI code without first reading \`rules/ui-design/rule.md\`, STOP immediately and read the file first.**
187824
-
187825
- ### 2. Database + Authentication
187826
- **Strengthen database and authentication capabilities**
187827
-
187828
- **Authentication**:
187829
- - **Web Projects**:
187830
- - Must use CloudBase Web SDK built-in authentication, refer to \`rules/auth-web/rule.md\`
187831
- - For username-style accounts, use \`auth.signUp({ username, password })\` and \`auth.signInWithPassword({ username, password })\`
187832
- - Do not use email-only helpers or email-only input semantics when the account identifier is a plain username string
187833
- - When an existing schema or fixture already provides role/profile metadata in \`users\`, \`profiles\`, or \`user_roles\`, reuse that collection instead of inventing yet another one. In role-based content-management flows, a \`user_roles\` collection keyed by \`uid\` is an acceptable and validated pattern.
187834
- - For browser-side file upload / preview flows, read \`rules/cloud-storage-web/rule.md\`; on local dev origins, verify the required local host entries (for example \`127.0.0.1:4173\`, \`localhost:5173\`) are already in the environment security-domain whitelist before depending on \`app.uploadFile()\`. If \`envQuery(action="domains")\` returns missing local entries or a \`next_step\`, execute that \`envDomainManagement\` action first. After upload, use \`app.getTempFileURL()\` to resolve the preview/download URL instead of constructing a URL string manually.
187835
- - Platform development rules: Refer to \`rules/web-development/rule.md\` for Web SDK integration, static hosting deployment, and build configuration
187836
- - **Mini Program Projects**:
187837
- - Naturally login-free, get \`wxContext.OPENID\` in cloud functions, refer to \`rules/auth-wechat/rule.md\`
187838
- - Platform development rules: Refer to \`rules/miniprogram-development/rule.md\` for mini program project structure, WeChat Developer Tools integration, and CloudBase capabilities
187839
- - **Node.js Backend**: Refer to \`rules/auth-nodejs/rule.md\`
187840
-
187841
- **Database Operations**:
187842
- - **Web Projects**:
187843
- - NoSQL Database: Refer to \`rules/no-sql-web-sdk/rule.md\`
187844
- - For content collections that only need owner-only writes, simple permissions such as \`READONLY\` can be a good fit. But for CMS-style collections that require **app-level admin users** to edit/delete any record while editors can only edit/delete their own records, a \`CUSTOM\` rule is expected.
187845
- - A validated CMS article rule shape is: \`{"read":"auth.uid != null","create":"auth.uid != null","update":"auth.uid != null && (get('database.user_roles.' + auth.uid).role == 'admin' || doc.authorId == auth.uid)","delete":"auth.uid != null && (get('database.user_roles.' + auth.uid).role == 'admin' || doc.authorId == auth.uid)"}\`.
187846
- - For that CMS pattern, frontend writes can stay on \`.doc(id).update()\` / \`.doc(id).remove()\`. Do not force a \`where(...)\` rewrite unless the task explicitly requires a different rule design.
187847
- - MySQL Relational Database: Refer to \`rules/relational-database-web/rule.md\` (Web application development) and \`rules/relational-database-mcp/rule.md\` (Management via MCP tools)
187848
- - Platform development rules: Refer to \`rules/web-development/rule.md\` for Web SDK database integration patterns
187849
- - **Mini Program Projects**:
187850
- - NoSQL Database: Refer to \`rules/no-sql-wx-mp-sdk/rule.md\`
187851
- - MySQL Relational Database: Refer to \`rules/relational-database-mcp/rule.md\` (via MCP tools)
187852
- - Platform development rules: Refer to \`rules/miniprogram-development/rule.md\` for mini program database integration and wx.cloud usage
187853
- - **Data Model Creation** (Universal): Refer to \`rules/data-model-creation/rule.md\`
187854
-
187855
- ### 3. Static Hosting Deployment (Web)
187856
- **Refer to deployment process in \`rules/web-development/rule.md\`**
187857
- - Use CloudBase static hosting after build completion
187858
- - Deploy using \`uploadFiles\` tool
187859
- - \`uploadFiles\` is only for static hosting deployment; do not use it for COS / cloud storage uploads. For storage objects, use \`manageStorage(action="upload")\`
187860
- - If the task is local verification or an unfinished application repair with a dev server workflow, skip static hosting deployment unless the user explicitly asks for a deployed URL
187861
- - Remind users that CDN has a few minutes of cache after deployment
187862
- - Generate markdown format access links with random queryString
187863
-
187864
- ### 4. Backend Deployment (Cloud Functions or CloudRun)
187865
- **Refer to \`rules/cloudrun-development/rule.md\`**
187866
- - **Cloud Function Deployment**: Prefer \`queryFunctions\` to inspect current state, then use \`manageFunctions\` with \`action="createFunction"\` or \`action="updateFunctionCode"\`.
187867
- - In agent / non-interactive runs, treat \`manageFunctions\` as the default deployment path for both Event and HTTP functions; do not fall back to CLI login flows unless MCP tools are unavailable.
187868
- - For HTTP functions, create or update them through \`manageFunctions\` with \`func.type="HTTP"\` instead of relying on \`tcb fn deploy\` as the primary path.
187869
- - **CloudRun Deployment**: Use \`manageCloudRun\` tool for containerized deployment
187870
- - Ensure backend code supports CORS, prepare Dockerfile (for container type)
187871
-
187872
- ## Development Process Standards
187873
-
187874
- **Important: To ensure development quality, AI must complete the following steps before starting work:**
187875
-
187876
- ### 0. Environment Check (First Step)
187877
- After user inputs any content, first check CloudBase environment status:
187878
- - Ensure current CloudBase environment ID is known
187879
- - If not present in conversation history and the task needs env metadata or deployment, call \`envQuery\` tool with parameter \`action=info\` to query current environment information and environment ID
187880
- - **Important**: When environment ID configuration is involved in code later, automatically use the queried environment ID, no need for manual user input
187881
-
187882
- ### 1. Scenario Identification
187883
- Identify current development scenario type, mainly for understanding project type, but core capabilities apply to all projects:
187884
- - **Web Projects**: React/Vue/native JS frontend projects
187885
- - **WeChat Mini Programs**: Mini program CloudBase projects
187886
- - **CloudRun Projects**: CloudBase Run backend service projects (supports any language: Java/Go/Python/Node.js/PHP/.NET, etc.)
187887
- - **Database Related**: Projects involving data operations
187888
- - **UI Design/Interface Generation**: Projects requiring interface design, page generation, prototype creation, component design, etc.
187889
-
187890
- ### 2. Platform-Specific Quick Guide
187891
-
187892
- **Web Projects - Required Rule Files:**
187893
- - \`rules/web-development/rule.md\` - Platform development rules (SDK integration, static hosting, build configuration)
187894
- - \`rules/auth-web/rule.md\` - Authentication (MUST use Web SDK built-in authentication)
187895
- - \`rules/no-sql-web-sdk/rule.md\` - NoSQL database operations
187896
- - \`rules/relational-database-web/rule.md\` - MySQL database operations (Web)
187897
- - \`rules/relational-database-mcp/rule.md\` - MySQL database management (MCP tools)
187898
- - \`rules/cloudbase-platform/rule.md\` - Universal CloudBase platform knowledge
187899
-
187900
- **Mini Program Projects - Required Rule Files:**
187901
- - \`rules/miniprogram-development/rule.md\` - Platform development rules (project structure, WeChat Developer Tools, wx.cloud)
187902
- - \`rules/auth-wechat/rule.md\` - Authentication (naturally login-free, get OPENID in cloud functions)
187903
- - \`rules/no-sql-wx-mp-sdk/rule.md\` - NoSQL database operations
187904
- - \`rules/relational-database-mcp/rule.md\` - MySQL database operations (via MCP tools)
187905
- - \`rules/cloudbase-platform/rule.md\` - Universal CloudBase platform knowledge
187906
-
187907
- **Universal Rule Files (All Projects):**
187908
- - **⚠️ \`rules/ui-design/rule.md\`** - **MANDATORY - HIGHEST PRIORITY** - Must read FIRST before any UI/page/component/style generation
187909
- - \`rules/data-model-creation/rule.md\` - Data model creation and MySQL modeling
187910
- - \`rules/spec-workflow/rule.md\` - Standard software engineering process (if needed)
187911
-
187912
- ### 3. Development Confirmation
187913
- Before starting work, suggest confirming with user:
187914
- 1. "I identify this as a [scenario type] project"
187915
- 2. "I will strictly follow core capability requirements and refer to relevant rule files"
187916
- 3. "Please confirm if my understanding is correct"
187917
-
187918
- ## Core Behavior Rules
187919
- 0. **Existing-Code Completion Bias**: For existing applications with TODOs or broken flows, implementation is the goal. Do not hand off to a design-only phase, do not stop at exploration, and do not treat a summary of findings as task completion. After minimal context gathering, write code and wire the real backend flow.
187920
- 0. **No Broad Exploration For TODO Apps**: When the repo already exposes TODO markers in backend integration files, do not keep globbing, summarizing, or reading unrelated files. Open the TODO-bearing files and implement them.
187921
- 0. **No Task-Loop Derailment**: In targeted repair tasks, avoid repeated \`TaskCreate\` / \`TaskUpdate\` cycles. One minimal checklist is enough; the rest of the budget should go to file edits, tool calls, and verification.
187922
- 0. **Do Not Delegate Or Defer**: In targeted repair tasks, do not invoke design copilots, brainstorming helpers, or delegated agent flows before the core TODO files are implemented. Finish the direct file edits first.
187923
- 1. **Tool Priority**: For Tencent CloudBase operations, must prioritize using CloudBase MCP tools
187924
- 2. **Project Understanding**: First read current project's README.md, follow project instructions for development. Exception: for existing applications where the missing work is clearly in known backend integration files, skip README-first and go straight to those files.
187925
- 4. **Directory Standards**: Before outputting project code in current directory, first check current directory files
187926
- 5. **Development Order**: When developing, prioritize frontend first, then backend, ensuring frontend interface and interaction logic are completed first, then implement backend business logic
187927
- 6. **⚠️ UI Design Rules Mandatory Application**: When tasks involve generating pages, interfaces, components, styles, or any frontend visual elements, **MUST FIRST explicitly read the file \`rules/ui-design/rule.md\` using file reading tools**, then strictly follow the rule file, ensuring generated interfaces have distinctive aesthetic styles and high-quality visual design, avoiding generic AI aesthetics. **You MUST output the design specification before writing any UI code.** Exception: for existing applications where page structure is already fixed and only backend integration is missing, do not trigger the UI-design workflow.
187928
- 7. **Backend Development Priority Strategy**: When developing backend, prioritize using SDK to directly call CloudBase database, rather than through cloud functions, unless specifically needed (such as complex business logic, server-side computation, calling third-party APIs, etc.)
187929
- 8. **Deployment Order**: When there are backend dependencies, prioritize deploying backend before previewing frontend
187930
- 9. **Interactive Confirmation**: Clarify requirements when needed, and confirm before executing high-risk operations
187931
- 10. **Real-time Communication**: Use CloudBase real-time database watch capability
187932
- 11. **⚠️ Authentication Rules**: When users develop projects, if user login authentication is needed, must use built-in authentication functions, must strictly distinguish authentication methods by platform
187933
- - **Web Projects**: **MUST use CloudBase Web SDK built-in authentication** (e.g., \`auth.toDefaultLoginPage()\`), refer to \`rules/auth-web/rule.md\`
187934
- - **Username-style Web accounts**: Use \`auth.signUp({ username, password })\` for registration and \`auth.signInWithPassword({ username, password })\` for login. Do not use \`signInWithEmailAndPassword\` / \`signUpWithEmailAndPassword\` when the identifier is not an email address.
187935
- - **Web initialization**: Only set \`accessKey\` when you have a real Publishable Key. Never set \`accessKey: envId\` or any made-up string.
187936
- - **Mini Program Projects**: **Naturally login-free**, get \`wxContext.OPENID\` in cloud functions, refer to \`rules/auth-wechat/rule.md\`
187937
-
187938
- ## Development Workflow
187939
-
187940
- ### Development
187941
-
187942
- 1. **Project Bootstrap Discipline**:
187943
- - Prefer the existing project structure and scripts when they already exist
187944
- - For new projects, keep the initial structure consistent and avoid mixing unrelated frameworks in one workspace
187945
- - If you bootstrap or copy an existing starter manually, hidden files and project config must be carried over as well
187946
-
187947
- 2. **⚠️ UI Design Document Reading (MANDATORY)**:
187948
- - **Before generating ANY page, interface, component, or style, MUST FIRST explicitly read the file \`rules/ui-design/rule.md\` using file reading tools**
187949
- - **MUST output the design specification** (Purpose Statement, Aesthetic Direction, Color Palette, Typography, Layout Strategy) before writing any UI code
187950
- - This is NOT optional - you MUST read the file and follow the design thinking framework and frontend aesthetics guidelines
187951
- - Avoid generating generic AI aesthetic style interfaces
187952
-
187953
- 3. **Mini Program TabBar Material Download - Download Remote Material Links**: Mini program Tabbar and other material images must use **png** format, must use downloadRemoteFile tool to download files locally. Can select from Unsplash, wikimedia (generally choose 500 size), Pexels, Apple official UI and other resources
187954
-
187955
- If remote links are needed in the application, can continue to call uploadFile to upload and obtain temporary access links and cloud storage cloudId
187956
-
187957
- 3. **Query Professional Knowledge from Knowledge Base**: If uncertain about any CloudBase knowledge, can use searchKnowledgeBase tool to intelligently search CloudBase knowledge base (supports CloudBase and cloud functions, mini program frontend knowledge, etc.), quickly obtain professional documents and answers through vector search
187958
-
187959
- 4. **WeChat Developer Tools Open Project Workflow**:
187960
- - When detecting current project is a mini program project, suggest user to use WeChat Developer Tools for preview, debugging, and publishing
187961
- - Before opening, confirm project.config.json has appid field configured. If not configured, must ask user to provide it
187962
- - Use WeChat Developer built-in CLI command to open project (pointing to directory containing project.config.json):
187963
- - Windows: \`"C:\\Program Files (x86)\\Tencent\\微信web开发者工具\\cli.bat" open --project "项目根目录路径"\`
187964
- - macOS: \`/Applications/wechatwebdevtools.app/Contents/MacOS/cli open --project "/path/to/project/root"\`
187965
- - Project root directory path is the directory containing project.config.json file
187966
-
187967
- ### Deployment Process
187968
-
187969
- 1. **Cloud Function Deployment Process**: Prefer \`queryFunctions\` to query current functions, then call \`manageFunctions\` with \`action="createFunction"\` or \`action="updateFunctionCode"\` to deploy cloud function code. In agent / non-interactive runs, keep deployment on MCP tools instead of CLI login flows. For HTTP functions, set \`func.type="HTTP"\` when creating them. Only need to point \`functionRootPath\` to the parent directory of the cloud function directory (for example, the absolute path of the \`cloudfunctions\` directory). No need for code compression or other preprocessing.
187970
-
187971
- 2. **CloudRun Deployment Process**: For non-cloud function backend services (Java, Go, PHP, Python, Node.js, etc.), use manageCloudRun tool for deployment. Ensure backend code supports CORS, prepare Dockerfile, then call manageCloudRun for containerized deployment. For details, refer to \`rules/cloudrun-development/rule.md\`
187972
-
187973
- 3. **Static Hosting Deployment Process**: Deploy using uploadFiles tool for static hosting only. If the task needs a COS object that must be queried or polled with the storage SDK, use \`manageStorage\` / \`queryStorage\` instead. For local verification or unfinished application repairs, do not deploy hosting unless the user explicitly asks for deployment. After deployment, remind users that CDN has a few minutes of cache. Can generate markdown format access links with random queryString. For details, refer to \`rules/web-development/rule.md\`
187974
-
187975
- ### Documentation Generation Rules
187976
-
187977
- 1. You will generate a README.md file after generating the project, containing basic project information, such as project name, project description. Most importantly, clearly explain the project architecture and involved CloudBase resources, so maintainers can refer to it for modification and maintenance
187978
- 2. After deployment, if it's a web project, can write the official deployment access address in the documentation
187979
-
187980
- ### Configuration File Rules
187981
-
187982
- 1. To help others who don't use AI understand what resources are available, can generate a cloudbaserc.json file after generation
187983
-
187984
- ### MCP Interface Call Rules
187985
- When calling MCP services, you need to fully understand the data types of all interfaces to be called, as well as return value types. If you're not sure which interface to call, first check the documentation and tool descriptions, then determine which interface and parameters to call based on the documentation and tool descriptions. Do not have incorrect method parameters or parameter type errors.
187986
-
187987
- For example, many interfaces require a confirm parameter, which is a boolean type. If you don't provide this parameter, or provide incorrect data type, the interface will return an error.
187988
-
187989
- ### Environment ID Auto-Configuration Rules
187990
- - When generating project configuration files (such as \`cloudbaserc.json\`, \`project.config.json\`, etc.), automatically use the environment ID queried by \`envQuery\`
187991
- - In code examples involving environment ID, automatically fill in current environment ID, no need for manual user replacement
187992
- - In deployment and preview related operations, prioritize using already queried environment information
187993
-
187994
- ## Professional Rule File Reference
187995
-
187996
- **Note**: For detailed information, refer to the specific skill files. This section provides quick reference only.
187997
-
187998
- ### Platform Development Skills
187999
- - **Web**: \`rules/web-development/rule.md\` - SDK integration, static hosting, build configuration
188000
- - **Mini Program**: \`rules/miniprogram-development/rule.md\` - Project structure, WeChat Developer Tools, wx.cloud
188001
- - **CloudRun**: \`rules/cloudrun-development/rule.md\` - Backend deployment (functions/containers)
188002
- - **Platform (Universal)**: \`rules/cloudbase-platform/rule.md\` - Environment, authentication, services
188003
-
188004
- ### Authentication Skills
188005
- - **Web**: \`rules/auth-web/rule.md\` - **MUST use Web SDK built-in authentication**
188006
- - **Mini Program**: \`rules/auth-wechat/rule.md\` - **Naturally login-free, get OPENID in cloud functions**
188007
- - **Node.js**: \`rules/auth-nodejs/rule.md\`
188008
- - **HTTP API**: \`rules/auth-http-api/rule.md\`
188009
-
188010
- ### Database Skills
188011
- - **NoSQL (Web)**: \`rules/no-sql-web-sdk/rule.md\`
188012
- - **NoSQL (Mini Program)**: \`rules/no-sql-wx-mp-sdk/rule.md\`
188013
- - **MySQL (Web)**: \`rules/relational-database-web/rule.md\`
188014
- - **MySQL (MCP)**: \`rules/relational-database-mcp/rule.md\`
188015
- - **Data Model Creation**: \`rules/data-model-creation/rule.md\`
188016
-
188017
- ### 🎨 ⚠️ UI Design Skill (CRITICAL - Read FIRST)
188018
- - **\`rules/ui-design/rule.md\`** - **MANDATORY - HIGHEST PRIORITY**
188019
- - **MUST read FIRST before generating ANY interface/page/component/style**
188020
- - Design thinking framework, complete design process, frontend aesthetics guidelines
188021
- - **NO EXCEPTIONS**: All UI work requires reading this file first
188022
-
188023
- ### Workflow Skills
188024
- - **Spec Workflow**: \`rules/spec-workflow/rule.md\` - Standard software engineering process (requirements, design, tasks)
188025
-
188026
- ## Development Quality Checklist
188027
-
188028
- To ensure development quality, recommend completing the following checks before starting tasks:
188029
-
188030
- ### Recommended Steps
188031
- 0. **[ ] Environment Check**: Call \`envQuery\` tool to check CloudBase environment status (applies to all interactions)
188032
- 1. **[ ] Scenario Identification**: Clearly identify what type of project this is (Web/Mini Program/Database/UI)
188033
- 3. **[ ] Core Capability Confirmation**: Confirm all four core capabilities have been considered
188034
- - UI Design: Have you explicitly read the file \`rules/ui-design/rule.md\` using file reading tools?
188035
- - Database + Authentication: Have you referred to corresponding authentication and database skills?
188036
- - Static Hosting Deployment: Have you understood the deployment process?
188037
- - Backend Deployment: Have you understood cloud function or CloudRun deployment process?
188038
- 4. **[ ] UI Design Rules Check (MANDATORY)**: If task involves generating pages, interfaces, components, or styles:
188039
- - Have you explicitly read the file \`rules/ui-design/rule.md\` using file reading tools? (Required: YES)
188040
- - Have you output the design specification before writing code? (Required: YES)
188041
- - Have you understood and will follow the design thinking framework? (Required: YES)
188042
- 5. **[ ] User Confirmation**: Confirm with user whether scenario identification and core capability understanding are correct
188043
- 6. **[ ] Rule Execution**: Strictly follow core capability requirements and relevant rule files for development
188044
-
188045
- ### ⚠️ Common Issues to Avoid
188046
- - **❌ DO NOT skip reading UI design document** - Must explicitly read \`rules/ui-design/rule.md\` file before generating any UI code
188047
- - Avoid skipping core capabilities and starting development directly
188048
- - Avoid mixing APIs and authentication methods from different platforms
188049
- - Avoid ignoring UI design rules: All tasks involving interfaces, pages, components, styles must explicitly read and strictly follow \`rules/ui-design/rule.md\`
188050
- - Avoid ignoring database and authentication standards: Must use correct authentication methods and database operation methods
188051
- - Important technical solutions should be confirmed with users
188052
-
188053
- ### Quality Assurance
188054
- If development is found to not comply with standards, can:
188055
- - Point out specific issues
188056
- - Require re-execution of rule check process
188057
- - Clearly specify rule files that need to be followed`;
188058
-
188059
-
188060
187713
  /***/ }),
188061
187714
 
188062
187715
  /***/ 68385:
@@ -191778,7 +191431,7 @@ ${envIdSection}
191778
191431
  ## 环境信息
191779
191432
  - 操作系统: ${os_1.default.type()} ${os_1.default.release()}
191780
191433
  - Node.js版本: ${process.version}
191781
- - MCP 版本:${process.env.npm_package_version || "2.17.0-beta.2" || 0}
191434
+ - MCP 版本:${process.env.npm_package_version || "2.17.1" || 0}
191782
191435
  - 系统架构: ${os_1.default.arch()}
191783
191436
  - 时间: ${new Date().toISOString()}
191784
191437
  - 请求ID: ${requestId}
@@ -200363,7 +200016,7 @@ deleteCollection: 删除集合`),
200363
200016
  // writeNoSqlDatabaseContent
200364
200017
  server.registerTool?.("writeNoSqlDatabaseContent", {
200365
200018
  title: "修改 NoSQL 数据库数据记录",
200366
- description: "修改 NoSQL 数据库数据记录。可按 MongoDB updateOne/updateMany 的心智模型理解:部分更新必须使用 $set/$inc/$push 等更新操作符;如果直接传 { field: value } 这类普通对象,底层会把它当作替换内容,存在覆盖整条文档的风险。更新嵌套对象中的某个字段时必须使用点号路径(如 { \"$set\": { \"address.city\": \"shenzhen\" } }),若写成 { \"$set\": { \"address\": { \"city\": \"shenzhen\" } } } 则整个 address 对象会被替换,同级其他字段将丢失。若集合中的角色/档案文档会在前端通过 `db.collection(...).doc(uid)` 读取,请确保文档 `_id` 就是该 `uid`;不要用 `query={\"uid\":\"...\"}` + `upsert=true` 去更新 `users` / `profiles`,否则经常会生成一个不同的 `_id`,导致后续 `doc(uid)` 读取命中不到。",
200019
+ description: "修改 NoSQL 数据库数据记录。可按 MongoDB updateOne/updateMany 的心智模型理解:部分更新必须使用 `$set`、`$inc`、`$push` 等更新操作符;如果直接传“字段到值的普通对象”这类内容,底层会把它当作替换内容,存在覆盖整条文档的风险。更新嵌套对象中的某个字段时必须使用点号路径,例如把 `address.city` 设为 `shenzhen`;如果把整个 `address` 对象作为 `$set` 的值传入,则整个 `address` 对象会被替换,同级其他字段将丢失。若集合中的角色/档案文档会在前端通过 `db.collection(...).doc(uid)` 读取,请确保文档 `_id` 就是该 `uid`;不要用按 `uid` 条件查询再配合 `upsert=true` 的方式去更新 `users` / `profiles`,否则经常会生成一个不同的 `_id`,导致后续 `doc(uid)` 读取命中不到。",
200367
200020
  inputSchema: {
200368
200021
  action: zod_1.z
200369
200022
  .enum(["insert", "update", "delete"])
@@ -200384,7 +200037,7 @@ deleteCollection: 删除集合`),
200384
200037
  update: zod_1.z
200385
200038
  .union([zod_1.z.object({}).passthrough(), zod_1.z.string()])
200386
200039
  .optional()
200387
- .describe("更新内容(对象或字符串,推荐对象)(update 操作必填)。按 MongoDB 更新语义传入 MgoUpdate:部分更新请使用 $set/$inc/$unset/$push 等操作符,例如 { \"$set\": { \"status\": \"pending\" } };不要直接传 { \"status\": \"pending\" },否则可能替换整条文档。更新嵌套字段时必须用点号路径,如 { \"$set\": { \"address.city\": \"shenzhen\" } },不要写成 { \"$set\": { \"address\": { \"city\": \"shenzhen\" } } }(会替换整个 address 对象)。"),
200040
+ .describe("更新内容(对象或字符串,推荐对象)(update 操作必填)。按 MongoDB 更新语义传入 MgoUpdate:部分更新请使用 `$set`、`$inc`、`$unset`、`$push` 等操作符,例如使用 `$set` 更新 `status`;不要直接传“字段到值的普通对象”,否则可能替换整条文档。更新嵌套字段时必须使用点号路径,例如通过 `$set` 更新 `address.city`;不要把整个 `address` 对象作为 `$set` 的值传入,否则会替换整个 `address` 对象。"),
200388
200041
  isMulti: zod_1.z
200389
200042
  .boolean()
200390
200043
  .optional()
@@ -206320,7 +205973,7 @@ function registerSetupTools(server) {
206320
205973
  title: "下载项目模板",
206321
205974
  description: `自动下载并部署CloudBase项目模板。⚠️ **MANDATORY FOR NEW PROJECTS** ⚠️
206322
205975
 
206323
- **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- 其他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.17.0-beta.2" : 0}),便于后续维护和版本追踪\n- 下载 rules 模板时,如果项目中已存在 README.md 文件,系统会自动保护该文件不被覆盖(除非设置 overwrite=true)`,
205976
+ **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- 其他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.17.1" : 0}),便于后续维护和版本追踪\n- 下载 rules 模板时,如果项目中已存在 README.md 文件,系统会自动保护该文件不被覆盖(除非设置 overwrite=true)`,
206324
205977
  inputSchema: {
206325
205978
  template: zod_1.z
206326
205979
  .enum(["react", "vue", "miniprogram", "uniapp", "rules"])
@@ -208784,7 +208437,7 @@ module.exports = toComparators
208784
208437
  "use strict";
208785
208438
 
208786
208439
  Object.defineProperty(exports, "__esModule", ({ value: true }));
208787
- exports.DEFAULT_NODEJS_RUNTIME = exports.SUPPORTED_NODEJS_RUNTIMES = exports.formatRuntimeList = exports.RECOMMENDED_RUNTIMES = exports.DEFAULT_RUNTIME = exports.ALL_SUPPORTED_RUNTIMES = exports.SUPPORTED_RUNTIMES = exports.RAW_IDE_FILE_MAPPINGS = exports.simplifyEnvList = exports.envManager = exports.createCloudBaseManagerWithOptions = exports.resetCloudBaseManagerCache = exports.getEnvId = exports.getCloudBaseManager = exports.shouldRegisterTool = exports.getCloudModeStatus = exports.enableCloudMode = exports.isCloudMode = exports.logout = exports.getLoginState = exports.warn = exports.error = exports.info = exports.reportToolCall = exports.reportToolkitLifecycle = exports.telemetryReporter = exports.StdioServerTransport = exports.getDefaultServer = exports.createCloudBaseMcpServer = void 0;
208440
+ exports.validateTimerCron = exports.DEFAULT_NODEJS_RUNTIME = exports.SUPPORTED_NODEJS_RUNTIMES = exports.formatRuntimeList = exports.RECOMMENDED_RUNTIMES = exports.DEFAULT_RUNTIME = exports.ALL_SUPPORTED_RUNTIMES = exports.SUPPORTED_RUNTIMES = exports.RAW_IDE_FILE_MAPPINGS = exports.simplifyEnvList = exports.envManager = exports.createCloudBaseManagerWithOptions = exports.resetCloudBaseManagerCache = exports.getEnvId = exports.getCloudBaseManager = exports.shouldRegisterTool = exports.getCloudModeStatus = exports.enableCloudMode = exports.isCloudMode = exports.logout = exports.getLoginState = exports.warn = exports.error = exports.info = exports.reportToolCall = exports.reportToolkitLifecycle = exports.telemetryReporter = exports.StdioServerTransport = exports.getDefaultServer = exports.createCloudBaseMcpServer = void 0;
208788
208441
  exports.getInteractiveServerAsync = getInteractiveServerAsync;
208789
208442
  // CloudBase MCP Server Library
208790
208443
  var server_js_1 = __webpack_require__(31422);
@@ -208824,6 +208477,7 @@ Object.defineProperty(exports, "RECOMMENDED_RUNTIMES", ({ enumerable: true, get:
208824
208477
  Object.defineProperty(exports, "formatRuntimeList", ({ enumerable: true, get: function () { return functions_js_1.formatRuntimeList; } }));
208825
208478
  Object.defineProperty(exports, "SUPPORTED_NODEJS_RUNTIMES", ({ enumerable: true, get: function () { return functions_js_1.SUPPORTED_NODEJS_RUNTIMES; } }));
208826
208479
  Object.defineProperty(exports, "DEFAULT_NODEJS_RUNTIME", ({ enumerable: true, get: function () { return functions_js_1.DEFAULT_NODEJS_RUNTIME; } }));
208480
+ Object.defineProperty(exports, "validateTimerCron", ({ enumerable: true, get: function () { return functions_js_1.validateTimerCron; } }));
208827
208481
  /**
208828
208482
  * Get interactive server instance (CommonJS compatible)
208829
208483
  */
@@ -256291,7 +255945,8 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
256291
255945
  exports.resolveWebCredential = exports.resolveCredential = exports.checkAuth = void 0;
256292
255946
  const cloud_api_1 = __webpack_require__(2090);
256293
255947
  const config_1 = __webpack_require__(88472);
256294
- // 调用 env:list 接口,检查密钥是否有效
255948
+ // 调用 CheckTcbService 接口,检查密钥是否有效
255949
+ // 相比 DescribeEnvs,该接口不会返回环境列表,仅验证登录态,性能更好
256295
255950
  function checkAuth(credential, options = {}) {
256296
255951
  return __awaiter(this, void 0, void 0, function* () {
256297
255952
  // 兼容原临时秘钥
@@ -256310,7 +255965,7 @@ function checkAuth(credential, options = {}) {
256310
255965
  });
256311
255966
  return tcbService.request({
256312
255967
  region,
256313
- action: 'DescribeEnvs'
255968
+ action: 'CheckTcbService'
256314
255969
  });
256315
255970
  });
256316
255971
  }
package/dist/index.d.ts CHANGED
@@ -403,6 +403,8 @@ export declare interface UploadFileParams {
403
403
  fileContent: string;
404
404
  }
405
405
 
406
+ export declare function validateTimerCron(config: string): string;
407
+
406
408
  export declare const warn: (message: string, data?: object | Error) => void;
407
409
 
408
410
  export { }