@cloudbase/cloudbase-mcp 2.21.1-beta.0 → 2.21.1-beta.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/148.index.cjs +28 -31
- package/dist/880.index.cjs +5 -10
- package/dist/cli.cjs +2 -2
- package/dist/index.cjs +948 -788
- package/dist/index.d.ts +12 -1
- package/dist/index.js +106 -51
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -392,7 +392,7 @@ export { StdioServerTransport }
|
|
|
392
392
|
*
|
|
393
393
|
* - listFiles / getFileInfo / downloadFile:queryStorage 只读操作
|
|
394
394
|
* - uploadFile / deleteFiles / deleteDirectory:manageStorage 写操作
|
|
395
|
-
*
|
|
395
|
+
* - getFileUrl:获取文件临时下载链接(可选,未提供时使用 CAPI 默认实现)
|
|
396
396
|
*/
|
|
397
397
|
declare interface StorageOverrides {
|
|
398
398
|
/** 列出目录下的文件,替代 storageService.listDirectoryFiles() */
|
|
@@ -423,6 +423,17 @@ declare interface StorageOverrides {
|
|
|
423
423
|
localPath: string;
|
|
424
424
|
cloudPath: string;
|
|
425
425
|
}) => Promise<void>;
|
|
426
|
+
/**
|
|
427
|
+
* 获取文件临时下载链接,替代 storageService.getTemporaryUrl()
|
|
428
|
+
* 可通过 COS getObjectUrl 实现;未提供时走 manager-node 默认路径
|
|
429
|
+
*/
|
|
430
|
+
getFileUrl?: (params: {
|
|
431
|
+
cloudPath: string;
|
|
432
|
+
maxAge?: number;
|
|
433
|
+
}) => Promise<{
|
|
434
|
+
url: string;
|
|
435
|
+
fileId?: string;
|
|
436
|
+
}>;
|
|
426
437
|
/** 删除文件(支持批量),替代 storageService.deleteFile() */
|
|
427
438
|
deleteFiles?: (params: {
|
|
428
439
|
cloudPaths: string[];
|
package/dist/index.js
CHANGED
|
@@ -9394,29 +9394,7 @@ function registerEnvTools(server) {
|
|
|
9394
9394
|
});
|
|
9395
9395
|
} // end: wxide guard for auth tool
|
|
9396
9396
|
// queryEnv - 环境查询(合并 listEnvs + getEnvInfo + getEnvAuthDomains)
|
|
9397
|
-
|
|
9398
|
-
title: "CloudBase 环境查询",
|
|
9399
|
-
description: "查询 CloudBase 环境相关信息,支持查询环境列表、指定环境详情和安全域名。(曾用名:envQuery、listEnvs、getEnvInfo、getEnvAuthDomains)当 action=list 时,会按 DescribeEnvs 语义做列表/筛选,标准返回字段为 EnvId、Alias、Status、EnvType、Region、PackageId、PackageName、IsDefault,并支持通过 fields 白名单裁剪这些字段;aliasExact=true 时会按别名精确筛选,避免把前缀相近的环境误当作候选;即使传入 envId,action=list 也只返回摘要,不会返回完整资源明细或 expiry。如需查询某个已知 EnvId 对应环境的详细信息(包括资源字段和计费信息),必须使用 action=info 并传入目标环境的 envId 参数。action=info 会在可用时补充 BillingInfo(如 ExpireTime、PayMode、IsAutoRenew 等计费字段)。",
|
|
9400
|
-
inputSchema: {
|
|
9401
|
-
action: zod_1.z
|
|
9402
|
-
.enum(["list", "info", "domains"])
|
|
9403
|
-
.describe("查询类型:list=环境列表/摘要筛选(按 DescribeEnvs 语义筛选,支持通过 envId 筛选,返回 EnvId、Alias、Status、EnvType、Region、PackageId、PackageName、IsDefault,不支持 expiry),info=指定环境的详细信息(必须传入 envId,返回资源字段和计费信息),domains=安全域名列表"),
|
|
9404
|
-
alias: zod_1.z.string().optional().describe("按环境别名筛选。action=list 时可选"),
|
|
9405
|
-
aliasExact: zod_1.z.boolean().optional().describe("按环境别名精确筛选。action=list 时可选;与 alias 配合使用"),
|
|
9406
|
-
envId: zod_1.z.string().optional().describe("按环境 ID 筛选。action=list 时可选(仅按 DescribeEnvs 语义做筛选,仍返回摘要);action=info 时必填(返回该环境的详细信息,包含资源字段和计费信息)。如果任务已经给出了明确的 EnvId 并要求查询详情,请直接使用 action=info + envId,而不是 action=list"),
|
|
9407
|
-
limit: zod_1.z.number().int().positive().optional().describe("返回数量上限。action=list 时可选"),
|
|
9408
|
-
offset: zod_1.z.number().int().min(0).optional().describe("分页偏移。action=list 时可选"),
|
|
9409
|
-
fields: zod_1.z
|
|
9410
|
-
.array(zod_1.z.enum(DEFAULT_ENV_FIELDS))
|
|
9411
|
-
.optional()
|
|
9412
|
-
.describe("返回字段白名单。仅支持 EnvId、Alias、Status、EnvType、Region、PackageId、PackageName、IsDefault。action=list 时可选"),
|
|
9413
|
-
},
|
|
9414
|
-
annotations: {
|
|
9415
|
-
readOnlyHint: true,
|
|
9416
|
-
openWorldHint: true,
|
|
9417
|
-
category: "env",
|
|
9418
|
-
},
|
|
9419
|
-
}, async ({ action, alias, aliasExact, envId, limit, offset, fields, }) => {
|
|
9397
|
+
const queryEnvHandler = async ({ action, alias, aliasExact, envId, limit, offset, fields, }) => {
|
|
9420
9398
|
try {
|
|
9421
9399
|
let result;
|
|
9422
9400
|
switch (action) {
|
|
@@ -9598,7 +9576,34 @@ function registerEnvTools(server) {
|
|
|
9598
9576
|
],
|
|
9599
9577
|
};
|
|
9600
9578
|
}
|
|
9601
|
-
}
|
|
9579
|
+
};
|
|
9580
|
+
// Register primary tool name (queryEnv)
|
|
9581
|
+
const queryEnvToolSchema = {
|
|
9582
|
+
title: "CloudBase 环境查询",
|
|
9583
|
+
description: "查询 CloudBase 环境相关信息,支持查询环境列表、指定环境详情和安全域名。(曾用名:envQuery、listEnvs、getEnvInfo、getEnvAuthDomains)当 action=list 时,会按 DescribeEnvs 语义做列表/筛选,标准返回字段为 EnvId、Alias、Status、EnvType、Region、PackageId、PackageName、IsDefault,并支持通过 fields 白名单裁剪这些字段;aliasExact=true 时会按别名精确筛选,避免把前缀相近的环境误当作候选;即使传入 envId,action=list 也只返回摘要,不会返回完整资源明细或 expiry。如需查询某个已知 EnvId 对应环境的详细信息(包括资源字段和计费信息),必须使用 action=info 并传入目标环境的 envId 参数。action=info 会在可用时补充 BillingInfo(如 ExpireTime、PayMode、IsAutoRenew 等计费字段)。",
|
|
9584
|
+
inputSchema: {
|
|
9585
|
+
action: zod_1.z
|
|
9586
|
+
.enum(["list", "info", "domains"])
|
|
9587
|
+
.describe("查询类型:list=环境列表/摘要筛选(按 DescribeEnvs 语义筛选,支持通过 envId 筛选,返回 EnvId、Alias、Status、EnvType、Region、PackageId、PackageName、IsDefault,不支持 expiry),info=指定环境的详细信息(必须传入 envId,返回资源字段和计费信息),domains=安全域名列表"),
|
|
9588
|
+
alias: zod_1.z.string().optional().describe("按环境别名筛选。action=list 时可选"),
|
|
9589
|
+
aliasExact: zod_1.z.boolean().optional().describe("按环境别名精确筛选。action=list 时可选;与 alias 配合使用"),
|
|
9590
|
+
envId: zod_1.z.string().optional().describe("按环境 ID 筛选。action=list 时可选(仅按 DescribeEnvs 语义做筛选,仍返回摘要);action=info 时必填(返回该环境的详细信息,包含资源字段和计费信息)。如果任务已经给出了明确的 EnvId 并要求查询详情,请直接使用 action=info + envId,而不是 action=list"),
|
|
9591
|
+
limit: zod_1.z.number().int().positive().optional().describe("返回数量上限。action=list 时可选"),
|
|
9592
|
+
offset: zod_1.z.number().int().min(0).optional().describe("分页偏移。action=list 时可选"),
|
|
9593
|
+
fields: zod_1.z
|
|
9594
|
+
.array(zod_1.z.enum(DEFAULT_ENV_FIELDS))
|
|
9595
|
+
.optional()
|
|
9596
|
+
.describe("返回字段白名单。仅支持 EnvId、Alias、Status、EnvType、Region、PackageId、PackageName、IsDefault。action=list 时可选"),
|
|
9597
|
+
},
|
|
9598
|
+
annotations: {
|
|
9599
|
+
readOnlyHint: true,
|
|
9600
|
+
openWorldHint: true,
|
|
9601
|
+
category: "env",
|
|
9602
|
+
},
|
|
9603
|
+
};
|
|
9604
|
+
server.registerTool?.("queryEnv", queryEnvToolSchema, queryEnvHandler);
|
|
9605
|
+
// 向后兼容:envQuery 作为 queryEnv 的别名注册
|
|
9606
|
+
server.registerTool?.("envQuery", queryEnvToolSchema, queryEnvHandler);
|
|
9602
9607
|
// envDomainManagement - 环境域名管理(合并 createEnvDomain + deleteEnvDomain)
|
|
9603
9608
|
// 微信 IDE 场景不需要域名管理
|
|
9604
9609
|
if (server.ide !== 'wxide') {
|
|
@@ -10842,7 +10847,7 @@ function registerFunctionTools(server) {
|
|
|
10842
10847
|
inputSchema: {
|
|
10843
10848
|
action: zod_1.z
|
|
10844
10849
|
.enum(exports.MANAGE_FUNCTION_ACTIONS)
|
|
10845
|
-
.describe("写操作类型,例如 createFunction、updateFunctionCode、invokeFunction、deleteFunction、" +
|
|
10850
|
+
.describe("写操作类型,例如 createFunction、updateFunctionCode、incrementalDeployFunction、invokeFunction、deleteFunction、" +
|
|
10846
10851
|
"createFunctionTrigger(定时任务 / cron / timer)、deleteFunctionTrigger、attachLayer、detachLayer"),
|
|
10847
10852
|
func: CREATE_FUNCTION_SCHEMA.optional().describe("createFunction 操作的函数配置"),
|
|
10848
10853
|
functionRootPath: zod_1.z.string().optional().describe("创建或更新函数代码时默认推荐的本地目录方式。" +
|
|
@@ -10878,6 +10883,7 @@ function registerFunctionTools(server) {
|
|
|
10878
10883
|
.describe("updateFunctionLayers 的目标层列表,顺序即最终顺序"),
|
|
10879
10884
|
codeSecret: zod_1.z.string().optional().describe("层绑定时的代码保护密钥"),
|
|
10880
10885
|
confirm: zod_1.z.boolean().optional().describe("危险操作确认开关。deleteFunction、deleteFunctionTrigger、deleteLayerVersion、detachLayer 等删除类操作需要显式传入 confirm=true"),
|
|
10886
|
+
incrementalFile: zod_1.z.string().optional().describe("incrementalDeployFunction 增量部署时的变更文件路径"),
|
|
10881
10887
|
},
|
|
10882
10888
|
annotations: {
|
|
10883
10889
|
readOnlyHint: false,
|
|
@@ -11704,13 +11710,16 @@ async function resolveHostingStaticDomain(cloudbase, logger) {
|
|
|
11704
11710
|
return undefined;
|
|
11705
11711
|
}
|
|
11706
11712
|
}
|
|
11707
|
-
|
|
11713
|
+
// Returns the first hosting store record from DescribeStaticStore, which is
|
|
11714
|
+
// the authoritative source for Mini Program-sourced environments (those envs
|
|
11715
|
+
// do not populate StaticStorages in DescribeEnvs / getEnvInfo).
|
|
11716
|
+
// Throws when no valid store is found so upload can fail fast with a clear msg.
|
|
11717
|
+
async function getHostingStoreOrThrow(cloudbase, cloudBaseOptions, logger) {
|
|
11708
11718
|
const envId = await (0, cloudbase_manager_js_1.getEnvId)(cloudBaseOptions);
|
|
11709
|
-
const
|
|
11710
|
-
|
|
11711
|
-
|
|
11712
|
-
|
|
11713
|
-
return;
|
|
11719
|
+
const result = await callTcbHostingAction(cloudbase, 'DescribeStaticStore', { EnvId: envId }, logger);
|
|
11720
|
+
const hostingInfo = extractStaticStores(result);
|
|
11721
|
+
if (hostingInfo.length > 0 && hostingInfo[0].Bucket) {
|
|
11722
|
+
return hostingInfo[0];
|
|
11714
11723
|
}
|
|
11715
11724
|
throw new Error(`当前环境 ${envId} 未发现静态托管资源配置,无法上传文件。请先确认 MCP 已绑定到已开通静态托管的 CloudBase 环境;如需切换环境,请调用 auth(action="set_env", envId="目标环境ID") 后重试。`);
|
|
11716
11725
|
}
|
|
@@ -11918,8 +11927,9 @@ function registerHostingTools(server) {
|
|
|
11918
11927
|
throw new Error('manageHosting(action="upload") 需要提供 localPath + cloudPath,或提供 files 多文件上传列表。');
|
|
11919
11928
|
}
|
|
11920
11929
|
let result;
|
|
11930
|
+
let store;
|
|
11921
11931
|
try {
|
|
11922
|
-
await
|
|
11932
|
+
store = await getHostingStoreOrThrow(cloudbase, cloudBaseOptions, server.logger);
|
|
11923
11933
|
result = await cloudbase.hosting.uploadFiles({
|
|
11924
11934
|
localPath: input.localPath,
|
|
11925
11935
|
cloudPath: input.cloudPath,
|
|
@@ -11931,7 +11941,11 @@ function registerHostingTools(server) {
|
|
|
11931
11941
|
throw new Error(buildUploadErrorMessage(error, input.localPath));
|
|
11932
11942
|
}
|
|
11933
11943
|
(0, cloudbase_manager_js_1.logCloudBaseResult)(server.logger, result);
|
|
11934
|
-
|
|
11944
|
+
// Prefer CdnDomain from the DescribeStaticStore result we already
|
|
11945
|
+
// fetched; fall back to getEnvInfo for environments that populate
|
|
11946
|
+
// StaticDomain there but not in DescribeStaticStore.
|
|
11947
|
+
const cdnFromStore = (store.CdnDomain ?? store.StaticDomain);
|
|
11948
|
+
const staticDomain = cdnFromStore || await resolveHostingStaticDomain(cloudbase, server.logger);
|
|
11935
11949
|
const accessUrl = buildHostingAccessUrl(staticDomain, input.cloudPath, input.localPath);
|
|
11936
11950
|
try {
|
|
11937
11951
|
const envId = await (0, cloudbase_manager_js_1.getEnvId)(cloudBaseOptions);
|
|
@@ -14181,7 +14195,7 @@ function registerSetupTools(server) {
|
|
|
14181
14195
|
server.registerTool("downloadTemplate", {
|
|
14182
14196
|
title: "下载项目模板",
|
|
14183
14197
|
description: `自动下载并部署CloudBase项目模板。
|
|
14184
|
-
**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.21.1-beta.
|
|
14198
|
+
**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.21.1-beta.2" : 0}),便于后续维护和版本追踪\n- 下载 rules 模板时,如果项目中已存在 README.md 文件,系统会自动保护该文件不被覆盖(除非设置 overwrite=true)`,
|
|
14185
14199
|
inputSchema: {
|
|
14186
14200
|
template: zod_1.z
|
|
14187
14201
|
.enum(["react", "vue", "miniprogram", "uniapp", "rules"])
|
|
@@ -14554,10 +14568,24 @@ function registerStorageTools(server) {
|
|
|
14554
14568
|
};
|
|
14555
14569
|
}
|
|
14556
14570
|
case 'url': {
|
|
14557
|
-
|
|
14571
|
+
let temporaryUrl = "";
|
|
14572
|
+
let fileId = "";
|
|
14573
|
+
if (storageOverrides?.getFileUrl) {
|
|
14574
|
+
const urlResult = await storageOverrides.getFileUrl({
|
|
14558
14575
|
cloudPath: input.cloudPath,
|
|
14559
|
-
maxAge: input.maxAge || 3600
|
|
14560
|
-
}
|
|
14576
|
+
maxAge: input.maxAge || 3600,
|
|
14577
|
+
});
|
|
14578
|
+
temporaryUrl = urlResult.url;
|
|
14579
|
+
fileId = urlResult.fileId || "";
|
|
14580
|
+
}
|
|
14581
|
+
else {
|
|
14582
|
+
const result = await storageService.getTemporaryUrl([{
|
|
14583
|
+
cloudPath: input.cloudPath,
|
|
14584
|
+
maxAge: input.maxAge || 3600
|
|
14585
|
+
}]);
|
|
14586
|
+
temporaryUrl = result[0]?.url || "";
|
|
14587
|
+
fileId = result[0]?.fileId || "";
|
|
14588
|
+
}
|
|
14561
14589
|
const publicAccess = await resolveStoragePublicAccess({
|
|
14562
14590
|
cloudPath: input.cloudPath,
|
|
14563
14591
|
cloudBaseOptions,
|
|
@@ -14572,9 +14600,9 @@ function registerStorageTools(server) {
|
|
|
14572
14600
|
data: {
|
|
14573
14601
|
action: 'url',
|
|
14574
14602
|
cloudPath: input.cloudPath,
|
|
14575
|
-
temporaryUrl
|
|
14603
|
+
temporaryUrl,
|
|
14576
14604
|
expireTime: `${input.maxAge || 3600}秒`,
|
|
14577
|
-
fileId
|
|
14605
|
+
fileId,
|
|
14578
14606
|
storageCdnDomain: publicAccess.storageCdnDomain,
|
|
14579
14607
|
publicUrl: publicAccess.publicUrl,
|
|
14580
14608
|
note: "temporaryUrl 是临时签名链接,会按 expireTime 过期。publicUrl 基于 DescribeEnvs 返回的 Storages[0].CdnDomain 推导,⚠️ 仅在存储桶 ACL 为公有读(所有用户可读)时才能被匿名访问;默认私有读写存储桶返回的 publicUrl 会 403,此时请继续使用 temporaryUrl 或先将目标路径设置为公有读。"
|
|
@@ -14679,15 +14707,42 @@ function registerStorageTools(server) {
|
|
|
14679
14707
|
});
|
|
14680
14708
|
}
|
|
14681
14709
|
}
|
|
14682
|
-
|
|
14710
|
+
// 上传成功后获取临时 URL 和公网访问信息
|
|
14711
|
+
let temporaryUrl = "";
|
|
14712
|
+
let fileId = "";
|
|
14713
|
+
if (storageOverrides?.getFileUrl) {
|
|
14714
|
+
const urlResult = await storageOverrides.getFileUrl({
|
|
14683
14715
|
cloudPath: input.cloudPath,
|
|
14684
|
-
maxAge: 3600
|
|
14685
|
-
}
|
|
14686
|
-
|
|
14687
|
-
|
|
14688
|
-
|
|
14689
|
-
|
|
14690
|
-
|
|
14716
|
+
maxAge: 3600,
|
|
14717
|
+
});
|
|
14718
|
+
temporaryUrl = urlResult.url;
|
|
14719
|
+
fileId = urlResult.fileId || "";
|
|
14720
|
+
}
|
|
14721
|
+
else {
|
|
14722
|
+
try {
|
|
14723
|
+
const fileUrls = await storageService.getTemporaryUrl([{
|
|
14724
|
+
cloudPath: input.cloudPath,
|
|
14725
|
+
maxAge: 3600
|
|
14726
|
+
}]);
|
|
14727
|
+
temporaryUrl = fileUrls[0]?.url || "";
|
|
14728
|
+
fileId = fileUrls[0]?.fileId || "";
|
|
14729
|
+
}
|
|
14730
|
+
catch {
|
|
14731
|
+
// StorageOverrides 下 getTemporaryUrl 可能不可用
|
|
14732
|
+
}
|
|
14733
|
+
}
|
|
14734
|
+
let publicAccess = {};
|
|
14735
|
+
try {
|
|
14736
|
+
publicAccess = await resolveStoragePublicAccess({
|
|
14737
|
+
cloudPath: input.cloudPath,
|
|
14738
|
+
cloudBaseOptions,
|
|
14739
|
+
manager,
|
|
14740
|
+
});
|
|
14741
|
+
}
|
|
14742
|
+
catch {
|
|
14743
|
+
// DescribeEnvs 可能不支持(IDE 模式下会绕过)
|
|
14744
|
+
publicAccess = {};
|
|
14745
|
+
}
|
|
14691
14746
|
return {
|
|
14692
14747
|
content: [
|
|
14693
14748
|
{
|
|
@@ -14699,7 +14754,7 @@ function registerStorageTools(server) {
|
|
|
14699
14754
|
localPath: input.localPath,
|
|
14700
14755
|
cloudPath: input.cloudPath,
|
|
14701
14756
|
isDirectory: input.isDirectory,
|
|
14702
|
-
temporaryUrl
|
|
14757
|
+
temporaryUrl,
|
|
14703
14758
|
expireTime: "1小时",
|
|
14704
14759
|
storageCdnDomain: publicAccess.storageCdnDomain,
|
|
14705
14760
|
publicUrl: publicAccess.publicUrl,
|
|
@@ -15347,7 +15402,7 @@ class TelemetryReporter {
|
|
|
15347
15402
|
const nodeVersion = process.version; // Node.js版本
|
|
15348
15403
|
const arch = os_1.default.arch(); // 系统架构
|
|
15349
15404
|
// 从构建时注入的版本号获取MCP版本信息
|
|
15350
|
-
const mcpVersion = process.env.npm_package_version || "2.21.1-beta.
|
|
15405
|
+
const mcpVersion = process.env.npm_package_version || "2.21.1-beta.2" || 0;
|
|
15351
15406
|
return {
|
|
15352
15407
|
userAgent: `${osType} ${osRelease} ${arch} ${nodeVersion} CloudBase-MCP/${mcpVersion}`,
|
|
15353
15408
|
deviceId: this.deviceId,
|
|
@@ -15766,7 +15821,7 @@ ${envIdSection}
|
|
|
15766
15821
|
## 环境信息
|
|
15767
15822
|
- 操作系统: ${os_1.default.type()} ${os_1.default.release()}
|
|
15768
15823
|
- Node.js版本: ${process.version}
|
|
15769
|
-
- MCP 版本:${process.env.npm_package_version || "2.21.1-beta.
|
|
15824
|
+
- MCP 版本:${process.env.npm_package_version || "2.21.1-beta.2" || 0}
|
|
15770
15825
|
- 系统架构: ${os_1.default.arch()}
|
|
15771
15826
|
- 时间: ${new Date().toISOString()}
|
|
15772
15827
|
- 请求ID: ${requestId}
|
|
@@ -15847,7 +15902,7 @@ function createWrappedHandler(name, handler, server) {
|
|
|
15847
15902
|
requestId: (typeof error === 'object' && error && 'requestId' in error) ? error.requestId : '',
|
|
15848
15903
|
ide: server.ide || process.env.INTEGRATION_IDE || ''
|
|
15849
15904
|
});
|
|
15850
|
-
const mcpVersion = true ? "2.21.1-beta.
|
|
15905
|
+
const mcpVersion = true ? "2.21.1-beta.2" : 0;
|
|
15851
15906
|
const requestIdSuffix = requestId ? `\n🆔 RequestId: ${requestId}` : '';
|
|
15852
15907
|
const enhancedErrorMessage = `${errorMessage}${requestIdSuffix}\n\n📦 CloudBase MCP v${mcpVersion}\n🔗 遇到问题?请复制以下链接到浏览器打开\n即可自动携带错误详情快速创建 GitHub Issue:\n${issueLink}`;
|
|
15853
15908
|
// 创建新的错误对象,保持原有的错误类型但更新消息
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cloudbase/cloudbase-mcp",
|
|
3
|
-
"version": "2.21.1-beta.
|
|
3
|
+
"version": "2.21.1-beta.2",
|
|
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",
|