@cloudbase/cloudbase-mcp 2.21.1-beta.0 → 2.21.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/{267.index.js → 341.index.js} +979 -1012
- package/dist/{148.index.cjs → 508.index.cjs} +19568 -19005
- package/dist/{880.index.cjs → 602.index.cjs} +3907 -3912
- package/dist/cli.cjs +6 -6
- package/dist/index.cjs +240544 -217293
- package/dist/index.d.ts +1 -109
- package/dist/index.js +15011 -15178
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -13,24 +13,7 @@ export declare interface AuthOptions {
|
|
|
13
13
|
oauthCustom?: boolean;
|
|
14
14
|
}
|
|
15
15
|
|
|
16
|
-
|
|
17
|
-
* 自定义 API 请求函数,由外部注入,替代 TC3 签名发请求。
|
|
18
|
-
* 入参对齐 CAPI 模式:service + action + version + region + payload。
|
|
19
|
-
* 返回腾讯云 API 响应中 Response 字段的内容(已解包)。
|
|
20
|
-
*/
|
|
21
|
-
export declare type CloudApiRequestFn = (params: {
|
|
22
|
-
service: string;
|
|
23
|
-
action: string;
|
|
24
|
-
version: string;
|
|
25
|
-
region: string;
|
|
26
|
-
payload: Record<string, any>;
|
|
27
|
-
}) => Promise<any>;
|
|
28
|
-
|
|
29
|
-
declare type CloudBaseConfigBase = NonNullable<ConstructorParameters<typeof CloudBase>[0]>;
|
|
30
|
-
|
|
31
|
-
export declare type CloudBaseOptions = CloudBaseConfigBase & {
|
|
32
|
-
requestFn?: CloudApiRequestFn;
|
|
33
|
-
};
|
|
16
|
+
export declare type CloudBaseOptions = NonNullable<ConstructorParameters<typeof CloudBase>[0]>;
|
|
34
17
|
|
|
35
18
|
/**
|
|
36
19
|
* Create a manager with the provided CloudBase options, without using cache
|
|
@@ -70,7 +53,6 @@ export declare function createCloudBaseMcpServer(options?: {
|
|
|
70
53
|
logger?: Logger;
|
|
71
54
|
pluginsEnabled?: string[];
|
|
72
55
|
pluginsDisabled?: string[];
|
|
73
|
-
pluginOptions?: PluginOptions;
|
|
74
56
|
}): Promise<ExtendedMcpServer>;
|
|
75
57
|
|
|
76
58
|
export declare interface DataModel {
|
|
@@ -159,48 +141,11 @@ export declare interface ExtendedMcpServer extends McpServer {
|
|
|
159
141
|
authOptions?: AuthOptions;
|
|
160
142
|
ide?: string;
|
|
161
143
|
logger?: Logger;
|
|
162
|
-
pluginOptions?: PluginOptions;
|
|
163
|
-
/** 已注册工具的列表,供外部(如微信 IDE)提取并注册到自己的 MCP server */
|
|
164
|
-
toolDefs: Array<{
|
|
165
|
-
name: string;
|
|
166
|
-
description: string;
|
|
167
|
-
inputSchema: any;
|
|
168
|
-
handler: (input: any) => Promise<any>;
|
|
169
|
-
}>;
|
|
170
144
|
setLogger(logger: Logger): void;
|
|
171
145
|
}
|
|
172
146
|
|
|
173
147
|
export declare function formatRuntimeList(): string;
|
|
174
148
|
|
|
175
|
-
/**
|
|
176
|
-
* manageFunctions 工具中部分 action 的 override 钩子
|
|
177
|
-
* 参数使用 CloudBase 领域语言,与 MCP 内部 DTO 解耦
|
|
178
|
-
* 实现方(如微信 IDE)负责在内部做参数适配
|
|
179
|
-
*
|
|
180
|
-
* - createFunction / updateFunctionCode:有默认实现,override 后可走外部专有接口
|
|
181
|
-
* - incrementalDeployFunction:无默认实现,必须通过 pluginOptions 注入
|
|
182
|
-
*/
|
|
183
|
-
export declare interface FunctionDeployOverrides {
|
|
184
|
-
createFunction?: (params: {
|
|
185
|
-
functionName: string;
|
|
186
|
-
functionRootPath: string;
|
|
187
|
-
runtime?: string;
|
|
188
|
-
force?: boolean;
|
|
189
|
-
installDependency?: boolean;
|
|
190
|
-
}) => Promise<any>;
|
|
191
|
-
updateFunctionCode?: (params: {
|
|
192
|
-
functionName: string;
|
|
193
|
-
functionRootPath: string;
|
|
194
|
-
force?: boolean;
|
|
195
|
-
installDependency?: boolean;
|
|
196
|
-
}) => Promise<any>;
|
|
197
|
-
incrementalDeployFunction?: (params: {
|
|
198
|
-
functionName: string;
|
|
199
|
-
functionRootPath: string;
|
|
200
|
-
incrementalFile: string;
|
|
201
|
-
}) => Promise<any>;
|
|
202
|
-
}
|
|
203
|
-
|
|
204
149
|
/**
|
|
205
150
|
* 每次都实时获取最新的 token/secretId/secretKey
|
|
206
151
|
*/
|
|
@@ -331,12 +276,6 @@ export declare function logout(): Promise<void>;
|
|
|
331
276
|
|
|
332
277
|
export { McpServer }
|
|
333
278
|
|
|
334
|
-
/** 各插件的可选配置 */
|
|
335
|
-
export declare interface PluginOptions {
|
|
336
|
-
functions?: FunctionDeployOverrides;
|
|
337
|
-
storage?: StorageOverrides;
|
|
338
|
-
}
|
|
339
|
-
|
|
340
279
|
export declare const RAW_IDE_FILE_MAPPINGS: Record<string, IdeFileDescriptor[]>;
|
|
341
280
|
|
|
342
281
|
export declare const RECOMMENDED_RUNTIMES: {
|
|
@@ -386,53 +325,6 @@ export declare function simplifyEnvList(envList: any[]): any[];
|
|
|
386
325
|
|
|
387
326
|
export { StdioServerTransport }
|
|
388
327
|
|
|
389
|
-
/**
|
|
390
|
-
* 存储工具中需要 COS SDK 操作的 override 钩子
|
|
391
|
-
* 实现方(如微信 IDE)负责在内部通过 /route/getcosauth 获取临时签名并操作 COS
|
|
392
|
-
*
|
|
393
|
-
* - listFiles / getFileInfo / downloadFile:queryStorage 只读操作
|
|
394
|
-
* - uploadFile / deleteFiles / deleteDirectory:manageStorage 写操作
|
|
395
|
-
* 无需 override 的:getTemporaryUrl(通过 CAPI DescribeEnvs 推导,已可走 requestFn)
|
|
396
|
-
*/
|
|
397
|
-
declare interface StorageOverrides {
|
|
398
|
-
/** 列出目录下的文件,替代 storageService.listDirectoryFiles() */
|
|
399
|
-
listFiles?: (params: {
|
|
400
|
-
cloudPath: string;
|
|
401
|
-
}) => Promise<Array<Record<string, any>>>;
|
|
402
|
-
/** 获取文件元信息,替代 storageService.getFileInfo() */
|
|
403
|
-
getFileInfo?: (params: {
|
|
404
|
-
cloudPath: string;
|
|
405
|
-
}) => Promise<Record<string, any>>;
|
|
406
|
-
/** 下载文件到本地,替代 storageService.downloadFile() */
|
|
407
|
-
downloadFile?: (params: {
|
|
408
|
-
cloudPath: string;
|
|
409
|
-
localPath: string;
|
|
410
|
-
}) => Promise<void>;
|
|
411
|
-
/** 下载目录到本地,替代 storageService.downloadDirectory() */
|
|
412
|
-
downloadDirectory?: (params: {
|
|
413
|
-
cloudPath: string;
|
|
414
|
-
localPath: string;
|
|
415
|
-
}) => Promise<void>;
|
|
416
|
-
/** 上传单个文件,替代 storageService.uploadFile() */
|
|
417
|
-
uploadFile?: (params: {
|
|
418
|
-
localPath: string;
|
|
419
|
-
cloudPath: string;
|
|
420
|
-
}) => Promise<void>;
|
|
421
|
-
/** 上传目录,替代 storageService.uploadDirectory() */
|
|
422
|
-
uploadDirectory?: (params: {
|
|
423
|
-
localPath: string;
|
|
424
|
-
cloudPath: string;
|
|
425
|
-
}) => Promise<void>;
|
|
426
|
-
/** 删除文件(支持批量),替代 storageService.deleteFile() */
|
|
427
|
-
deleteFiles?: (params: {
|
|
428
|
-
cloudPaths: string[];
|
|
429
|
-
}) => Promise<void>;
|
|
430
|
-
/** 删除目录,替代 storageService.deleteDirectory() */
|
|
431
|
-
deleteDirectory?: (params: {
|
|
432
|
-
cloudPath: string;
|
|
433
|
-
}) => Promise<void>;
|
|
434
|
-
}
|
|
435
|
-
|
|
436
328
|
export declare const SUPPORTED_NODEJS_RUNTIMES: readonly ["Nodejs20.19", "Nodejs18.15", "Nodejs16.13", "Nodejs14.18", "Nodejs12.16", "Nodejs10.15", "Nodejs8.9"];
|
|
437
329
|
|
|
438
330
|
export declare const SUPPORTED_RUNTIMES: {
|