@cloudbase/cloudbase-mcp 2.34.0 → 2.34.2

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
@@ -202710,7 +202710,7 @@ exports.env = (0, types_js_1.defineModule)({
202710
202710
  "auth.deviceCodeMissing": "未获取到设备码信息,请重试设备码登录",
202711
202711
  "auth.deviceStarted": "已发起设备码登录,请在浏览器中打开 verification_uri 并输入 user_code 完成授权。授权完成后请再次调用 auth(action=\"status\")。",
202712
202712
  "auth.loginStateMissing": "未获取到登录态,请先完成认证",
202713
- "auth.apiKeyArgsRequired": "action=login_by_api_key 时必须同时提供 apiKey 和 envId。",
202713
+ "auth.apiKeyArgsRequired": "action=login_by_api_key 时必须同时提供 apiKey 和 apiKeyEnvId。",
202714
202714
  "auth.apiKeySuccess": "API Key 认证成功,已获取临时密钥。",
202715
202715
  "auth.apiKeyExchangeFailed": "API Key 换取临时密钥失败。",
202716
202716
  "auth.apiKeyDiagLogin": "\n\n诊断信息:\n- CLOUDBASE_ENV_ID: {envId}\n- CLOUDBASE_API_KEY: {apiKeyPrefix}...(已截断)\n- TCB_SITE: {site}\n\n可能原因:\n1. API Key 已过期或被删除\n2. CLOUDBASE_ENV_ID 与 API Key 所属环境不匹配\n3. API Key 与站点不匹配:国际站环境的 Key 需配置 TCB_SITE=intl(走 ap-singapore 网关);国内站环境(含 ap-guangzhou/ap-singapore 地域)不要配置 intl\n4. 网络连接问题\n\n建议:请检查 API Key 和环境 ID 是否正确。",
@@ -202923,7 +202923,7 @@ exports.env = (0, types_js_1.defineModule)({
202923
202923
  "auth.deviceCodeMissing": "No device code info was returned; please retry device-code login",
202924
202924
  "auth.deviceStarted": "Device-code login started. Open verification_uri in the browser and enter user_code to complete the authorization. Once authorized, call auth(action=\"status\") again.",
202925
202925
  "auth.loginStateMissing": "No login state was obtained; please complete authentication first",
202926
- "auth.apiKeyArgsRequired": "Both apiKey and envId must be provided when action=login_by_api_key.",
202926
+ "auth.apiKeyArgsRequired": "Both apiKey and apiKeyEnvId must be provided when action=login_by_api_key.",
202927
202927
  "auth.apiKeySuccess": "API Key authentication succeeded; temporary credentials obtained.",
202928
202928
  "auth.apiKeyExchangeFailed": "Failed to exchange the API Key for temporary credentials.",
202929
202929
  "auth.apiKeyDiagLogin": "\n\nDiagnostics:\n- CLOUDBASE_ENV_ID: {envId}\n- CLOUDBASE_API_KEY: {apiKeyPrefix}... (truncated)\n- TCB_SITE: {site}\n\nPossible causes:\n1. The API Key has expired or was deleted\n2. CLOUDBASE_ENV_ID does not match the environment the API Key belongs to\n3. The API Key does not match the site: keys for international-site environments need TCB_SITE=intl (routed via the ap-singapore gateway); do not set intl for domestic-site environments (including the ap-guangzhou/ap-singapore regions)\n4. Network connectivity issue\n\nSuggestion: check that the API Key and environment ID are correct.",
@@ -218658,7 +218658,7 @@ function registerEnvTools(server) {
218658
218658
  code: "INVALID_ARGS",
218659
218659
  message: (0, index_js_1.t)("env.auth.apiKeyArgsRequired", undefined, outLang),
218660
218660
  next_step: (0, tool_result_js_1.buildAuthNextStep)("login_by_api_key", {
218661
- suggestedArgs: { action: "login_by_api_key", apiKey: "<your-api-key>", envId: "<your-env-id>" },
218661
+ suggestedArgs: { action: "login_by_api_key", apiKey: "<your-api-key>", apiKeyEnvId: "<your-env-id>" },
218662
218662
  }),
218663
218663
  });
218664
218664
  }
@@ -218703,7 +218703,7 @@ function registerEnvTools(server) {
218703
218703
  auth_mode: "api_key",
218704
218704
  envId: toolApiKeyEnvId,
218705
218705
  next_step: (0, tool_result_js_1.buildAuthNextStep)("login_by_api_key", {
218706
- suggestedArgs: { action: "login_by_api_key", apiKey: "<your-api-key>", envId: "<your-env-id>" },
218706
+ suggestedArgs: { action: "login_by_api_key", apiKey: "<your-api-key>", apiKeyEnvId: "<your-env-id>" },
218707
218707
  }),
218708
218708
  });
218709
218709
  }
@@ -218718,7 +218718,7 @@ function registerEnvTools(server) {
218718
218718
  message: (0, index_js_1.t)("env.auth.apiKeyException", { message }, outLang),
218719
218719
  auth_mode: "api_key",
218720
218720
  next_step: (0, tool_result_js_1.buildAuthNextStep)("login_by_api_key", {
218721
- suggestedArgs: { action: "login_by_api_key", apiKey: "<your-api-key>", envId: "<your-env-id>" },
218721
+ suggestedArgs: { action: "login_by_api_key", apiKey: "<your-api-key>", apiKeyEnvId: "<your-env-id>" },
218722
218722
  }),
218723
218723
  });
218724
218724
  }
@@ -227899,32 +227899,37 @@ async function downloadWebTemplate() {
227899
227899
  async function downloadOpenAPI() {
227900
227900
  const baseDir = path.join(CACHE_BASE_DIR, "openapi");
227901
227901
  await fs.mkdir(baseDir, { recursive: true });
227902
- const results = [];
227903
- await Promise.all(OPENAPI_SOURCES.map(async (source) => {
227902
+ const downloaded = await Promise.all(OPENAPI_SOURCES.map(async (source) => {
227904
227903
  try {
227905
227904
  const response = await fetch(source.url);
227906
227905
  if (!response.ok) {
227907
227906
  (0, logger_js_1.warn)(`[downloadOpenAPI] Failed to download ${source.name}`, {
227908
227907
  status: response.status,
227909
227908
  });
227910
- return;
227909
+ return undefined;
227911
227910
  }
227912
227911
  const content = await response.text();
227913
227912
  const filePath = path.join(baseDir, `${source.name}.openapi.yaml`);
227914
227913
  await fs.writeFile(filePath, content, "utf8");
227915
- results.push({
227914
+ return {
227916
227915
  name: source.name,
227917
227916
  description: source.description,
227918
227917
  absolutePath: filePath,
227919
227918
  url: source.url,
227920
- });
227919
+ };
227921
227920
  }
227922
227921
  catch (error) {
227923
227922
  (0, logger_js_1.warn)(`[downloadOpenAPI] Failed to download ${source.name}`, {
227924
227923
  error,
227925
227924
  });
227925
+ return undefined;
227926
227926
  }
227927
227927
  }));
227928
+ // 顺序必须跟随 OPENAPI_SOURCES 声明顺序。`Promise.all` 只保证按输入顺序
227929
+ // 返回结果,所以这里先收集再过滤;若改成在各并发任务内部 `results.push()`,
227930
+ // 数组顺序会变成网络完成顺序,导致 tools.json / mcp-tools.md 里内联的
227931
+ // OpenAPI 清单在每次构建之间无意义漂移。
227932
+ const results = downloaded.filter((item) => item !== undefined);
227928
227933
  (0, logger_js_1.debug)("[downloadOpenAPI] openAPIDocs 下载完成", {
227929
227934
  successCount: results.length,
227930
227935
  total: OPENAPI_SOURCES.length,
@@ -231557,7 +231562,7 @@ class TelemetryReporter {
231557
231562
  const arch = os_1.default.arch(); // 系统架构
231558
231563
  // Build-time injected version; guard for vitest / non-webpack runtimes.
231559
231564
  const mcpVersion = process.env.npm_package_version ||
231560
- ( true ? "2.34.0" : 0);
231565
+ ( true ? "2.34.2" : 0);
231561
231566
  return {
231562
231567
  userAgent: `${osType} ${osRelease} ${arch} ${nodeVersion} CloudBase-MCP/${mcpVersion}`,
231563
231568
  deviceId: this.deviceId,
@@ -232150,7 +232155,7 @@ ${envIdSection}
232150
232155
  ## 环境信息
232151
232156
  - 操作系统: ${os_1.default.type()} ${os_1.default.release()}
232152
232157
  - Node.js版本: ${process.version}
232153
- - MCP 版本:${process.env.npm_package_version || ( true ? "2.34.0" : 0)}
232158
+ - MCP 版本:${process.env.npm_package_version || ( true ? "2.34.2" : 0)}
232154
232159
  - 系统架构: ${os_1.default.arch()}
232155
232160
  - 时间: ${new Date().toISOString()}
232156
232161
  - 请求ID: ${requestId}
@@ -232239,7 +232244,7 @@ function createWrappedHandler(name, handler, server) {
232239
232244
  requestId,
232240
232245
  ide: server.ide || process.env.INTEGRATION_IDE || ''
232241
232246
  });
232242
- const mcpVersion = true ? "2.34.0" : 0;
232247
+ const mcpVersion = true ? "2.34.2" : 0;
232243
232248
  const requestIdSuffix = requestId ? `\n🆔 RequestId: ${requestId}` : '';
232244
232249
  const enhancedErrorMessage = `${errorMessage}${requestIdSuffix}\n\n📦 CloudBase MCP v${mcpVersion}\n🔗 遇到问题?请复制以下链接到浏览器打开\n即可自动携带错误详情快速创建 GitHub Issue:\n${issueLink}`;
232245
232250
  // 创建新的错误对象,保持原有的错误类型但更新消息
package/dist/index.js CHANGED
@@ -3730,7 +3730,7 @@ exports.env = (0, types_js_1.defineModule)({
3730
3730
  "auth.deviceCodeMissing": "未获取到设备码信息,请重试设备码登录",
3731
3731
  "auth.deviceStarted": "已发起设备码登录,请在浏览器中打开 verification_uri 并输入 user_code 完成授权。授权完成后请再次调用 auth(action=\"status\")。",
3732
3732
  "auth.loginStateMissing": "未获取到登录态,请先完成认证",
3733
- "auth.apiKeyArgsRequired": "action=login_by_api_key 时必须同时提供 apiKey 和 envId。",
3733
+ "auth.apiKeyArgsRequired": "action=login_by_api_key 时必须同时提供 apiKey 和 apiKeyEnvId。",
3734
3734
  "auth.apiKeySuccess": "API Key 认证成功,已获取临时密钥。",
3735
3735
  "auth.apiKeyExchangeFailed": "API Key 换取临时密钥失败。",
3736
3736
  "auth.apiKeyDiagLogin": "\n\n诊断信息:\n- CLOUDBASE_ENV_ID: {envId}\n- CLOUDBASE_API_KEY: {apiKeyPrefix}...(已截断)\n- TCB_SITE: {site}\n\n可能原因:\n1. API Key 已过期或被删除\n2. CLOUDBASE_ENV_ID 与 API Key 所属环境不匹配\n3. API Key 与站点不匹配:国际站环境的 Key 需配置 TCB_SITE=intl(走 ap-singapore 网关);国内站环境(含 ap-guangzhou/ap-singapore 地域)不要配置 intl\n4. 网络连接问题\n\n建议:请检查 API Key 和环境 ID 是否正确。",
@@ -3943,7 +3943,7 @@ exports.env = (0, types_js_1.defineModule)({
3943
3943
  "auth.deviceCodeMissing": "No device code info was returned; please retry device-code login",
3944
3944
  "auth.deviceStarted": "Device-code login started. Open verification_uri in the browser and enter user_code to complete the authorization. Once authorized, call auth(action=\"status\") again.",
3945
3945
  "auth.loginStateMissing": "No login state was obtained; please complete authentication first",
3946
- "auth.apiKeyArgsRequired": "Both apiKey and envId must be provided when action=login_by_api_key.",
3946
+ "auth.apiKeyArgsRequired": "Both apiKey and apiKeyEnvId must be provided when action=login_by_api_key.",
3947
3947
  "auth.apiKeySuccess": "API Key authentication succeeded; temporary credentials obtained.",
3948
3948
  "auth.apiKeyExchangeFailed": "Failed to exchange the API Key for temporary credentials.",
3949
3949
  "auth.apiKeyDiagLogin": "\n\nDiagnostics:\n- CLOUDBASE_ENV_ID: {envId}\n- CLOUDBASE_API_KEY: {apiKeyPrefix}... (truncated)\n- TCB_SITE: {site}\n\nPossible causes:\n1. The API Key has expired or was deleted\n2. CLOUDBASE_ENV_ID does not match the environment the API Key belongs to\n3. The API Key does not match the site: keys for international-site environments need TCB_SITE=intl (routed via the ap-singapore gateway); do not set intl for domestic-site environments (including the ap-guangzhou/ap-singapore regions)\n4. Network connectivity issue\n\nSuggestion: check that the API Key and environment ID are correct.",
@@ -19613,7 +19613,7 @@ function registerEnvTools(server) {
19613
19613
  code: "INVALID_ARGS",
19614
19614
  message: (0, index_js_1.t)("env.auth.apiKeyArgsRequired", undefined, outLang),
19615
19615
  next_step: (0, tool_result_js_1.buildAuthNextStep)("login_by_api_key", {
19616
- suggestedArgs: { action: "login_by_api_key", apiKey: "<your-api-key>", envId: "<your-env-id>" },
19616
+ suggestedArgs: { action: "login_by_api_key", apiKey: "<your-api-key>", apiKeyEnvId: "<your-env-id>" },
19617
19617
  }),
19618
19618
  });
19619
19619
  }
@@ -19658,7 +19658,7 @@ function registerEnvTools(server) {
19658
19658
  auth_mode: "api_key",
19659
19659
  envId: toolApiKeyEnvId,
19660
19660
  next_step: (0, tool_result_js_1.buildAuthNextStep)("login_by_api_key", {
19661
- suggestedArgs: { action: "login_by_api_key", apiKey: "<your-api-key>", envId: "<your-env-id>" },
19661
+ suggestedArgs: { action: "login_by_api_key", apiKey: "<your-api-key>", apiKeyEnvId: "<your-env-id>" },
19662
19662
  }),
19663
19663
  });
19664
19664
  }
@@ -19673,7 +19673,7 @@ function registerEnvTools(server) {
19673
19673
  message: (0, index_js_1.t)("env.auth.apiKeyException", { message }, outLang),
19674
19674
  auth_mode: "api_key",
19675
19675
  next_step: (0, tool_result_js_1.buildAuthNextStep)("login_by_api_key", {
19676
- suggestedArgs: { action: "login_by_api_key", apiKey: "<your-api-key>", envId: "<your-env-id>" },
19676
+ suggestedArgs: { action: "login_by_api_key", apiKey: "<your-api-key>", apiKeyEnvId: "<your-env-id>" },
19677
19677
  }),
19678
19678
  });
19679
19679
  }
@@ -28847,32 +28847,37 @@ async function downloadWebTemplate() {
28847
28847
  async function downloadOpenAPI() {
28848
28848
  const baseDir = path.join(CACHE_BASE_DIR, "openapi");
28849
28849
  await fs.mkdir(baseDir, { recursive: true });
28850
- const results = [];
28851
- await Promise.all(OPENAPI_SOURCES.map(async (source) => {
28850
+ const downloaded = await Promise.all(OPENAPI_SOURCES.map(async (source) => {
28852
28851
  try {
28853
28852
  const response = await fetch(source.url);
28854
28853
  if (!response.ok) {
28855
28854
  (0, logger_js_1.warn)(`[downloadOpenAPI] Failed to download ${source.name}`, {
28856
28855
  status: response.status,
28857
28856
  });
28858
- return;
28857
+ return undefined;
28859
28858
  }
28860
28859
  const content = await response.text();
28861
28860
  const filePath = path.join(baseDir, `${source.name}.openapi.yaml`);
28862
28861
  await fs.writeFile(filePath, content, "utf8");
28863
- results.push({
28862
+ return {
28864
28863
  name: source.name,
28865
28864
  description: source.description,
28866
28865
  absolutePath: filePath,
28867
28866
  url: source.url,
28868
- });
28867
+ };
28869
28868
  }
28870
28869
  catch (error) {
28871
28870
  (0, logger_js_1.warn)(`[downloadOpenAPI] Failed to download ${source.name}`, {
28872
28871
  error,
28873
28872
  });
28873
+ return undefined;
28874
28874
  }
28875
28875
  }));
28876
+ // 顺序必须跟随 OPENAPI_SOURCES 声明顺序。`Promise.all` 只保证按输入顺序
28877
+ // 返回结果,所以这里先收集再过滤;若改成在各并发任务内部 `results.push()`,
28878
+ // 数组顺序会变成网络完成顺序,导致 tools.json / mcp-tools.md 里内联的
28879
+ // OpenAPI 清单在每次构建之间无意义漂移。
28880
+ const results = downloaded.filter((item) => item !== undefined);
28876
28881
  (0, logger_js_1.debug)("[downloadOpenAPI] openAPIDocs 下载完成", {
28877
28882
  successCount: results.length,
28878
28883
  total: OPENAPI_SOURCES.length,
@@ -32499,7 +32504,7 @@ class TelemetryReporter {
32499
32504
  const arch = os_1.default.arch(); // 系统架构
32500
32505
  // Build-time injected version; guard for vitest / non-webpack runtimes.
32501
32506
  const mcpVersion = process.env.npm_package_version ||
32502
- ( true ? "2.34.0" : 0);
32507
+ ( true ? "2.34.2" : 0);
32503
32508
  return {
32504
32509
  userAgent: `${osType} ${osRelease} ${arch} ${nodeVersion} CloudBase-MCP/${mcpVersion}`,
32505
32510
  deviceId: this.deviceId,
@@ -33091,7 +33096,7 @@ ${envIdSection}
33091
33096
  ## 环境信息
33092
33097
  - 操作系统: ${os_1.default.type()} ${os_1.default.release()}
33093
33098
  - Node.js版本: ${process.version}
33094
- - MCP 版本:${process.env.npm_package_version || ( true ? "2.34.0" : 0)}
33099
+ - MCP 版本:${process.env.npm_package_version || ( true ? "2.34.2" : 0)}
33095
33100
  - 系统架构: ${os_1.default.arch()}
33096
33101
  - 时间: ${new Date().toISOString()}
33097
33102
  - 请求ID: ${requestId}
@@ -33180,7 +33185,7 @@ function createWrappedHandler(name, handler, server) {
33180
33185
  requestId,
33181
33186
  ide: server.ide || process.env.INTEGRATION_IDE || ''
33182
33187
  });
33183
- const mcpVersion = true ? "2.34.0" : 0;
33188
+ const mcpVersion = true ? "2.34.2" : 0;
33184
33189
  const requestIdSuffix = requestId ? `\n🆔 RequestId: ${requestId}` : '';
33185
33190
  const enhancedErrorMessage = `${errorMessage}${requestIdSuffix}\n\n📦 CloudBase MCP v${mcpVersion}\n🔗 遇到问题?请复制以下链接到浏览器打开\n即可自动携带错误详情快速创建 GitHub Issue:\n${issueLink}`;
33186
33191
  // 创建新的错误对象,保持原有的错误类型但更新消息
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cloudbase/cloudbase-mcp",
3
- "version": "2.34.0",
3
+ "version": "2.34.2",
4
4
  "mcpName": "io.github.TencentCloudBase/cloudbase-mcp",
5
5
  "packageManager": "pnpm@10.8.0",
6
6
  "description": "CloudBase MCP Server — operate Tencent CloudBase (database, auth, functions, storage, hosting) from AI coding tools via the Model Context Protocol. Part of CloudBase AI Toolkit.",
package/server.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "name": "io.github.TencentCloudBase/cloudbase-mcp",
4
4
  "title": "CloudBase",
5
5
  "description": "CloudBase MCP: DB, functions, storage, hosting via @cloudbase/cloudbase-mcp",
6
- "version": "2.34.0",
6
+ "version": "2.34.2",
7
7
  "websiteUrl": "https://github.com/TencentCloudBase/CloudBase-AI-Toolkit",
8
8
  "repository": {
9
9
  "url": "https://github.com/TencentCloudBase/CloudBase-AI-Toolkit",
@@ -25,7 +25,7 @@
25
25
  "registryType": "npm",
26
26
  "registryBaseUrl": "https://registry.npmjs.org",
27
27
  "identifier": "@cloudbase/cloudbase-mcp",
28
- "version": "2.34.0",
28
+ "version": "2.34.2",
29
29
  "runtimeHint": "npx",
30
30
  "transport": {
31
31
  "type": "stdio"