@cloudbase/cloudbase-mcp 1.8.16 → 1.8.18

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.
@@ -0,0 +1,473 @@
1
+ /*
2
+ object-assign
3
+ (c) Sindre Sorhus
4
+ @license MIT
5
+ */
6
+
7
+ /*!
8
+ * mustache.js - Logic-less {{mustache}} templates with JavaScript
9
+ * http://github.com/janl/mustache.js
10
+ */
11
+
12
+ /*!
13
+ * Copyright 2010 LearnBoost <dev@learnboost.com>
14
+ *
15
+ * Licensed under the Apache License, Version 2.0 (the "License");
16
+ * you may not use this file except in compliance with the License.
17
+ * You may obtain a copy of the License at
18
+ *
19
+ * http://www.apache.org/licenses/LICENSE-2.0
20
+ *
21
+ * Unless required by applicable law or agreed to in writing, software
22
+ * distributed under the License is distributed on an "AS IS" BASIS,
23
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
24
+ * See the License for the specific language governing permissions and
25
+ * limitations under the License.
26
+ */
27
+
28
+ /*!
29
+ * Copyright (c) 2015, Salesforce.com, Inc.
30
+ * All rights reserved.
31
+ *
32
+ * Redistribution and use in source and binary forms, with or without
33
+ * modification, are permitted provided that the following conditions are met:
34
+ *
35
+ * 1. Redistributions of source code must retain the above copyright notice,
36
+ * this list of conditions and the following disclaimer.
37
+ *
38
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
39
+ * this list of conditions and the following disclaimer in the documentation
40
+ * and/or other materials provided with the distribution.
41
+ *
42
+ * 3. Neither the name of Salesforce.com nor the names of its contributors may
43
+ * be used to endorse or promote products derived from this software without
44
+ * specific prior written permission.
45
+ *
46
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
47
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
48
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
49
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
50
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
51
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
52
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
53
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
54
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
55
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
56
+ * POSSIBILITY OF SUCH DAMAGE.
57
+ */
58
+
59
+ /*!
60
+ * Copyright (c) 2015-2020, Salesforce.com, Inc.
61
+ * All rights reserved.
62
+ *
63
+ * Redistribution and use in source and binary forms, with or without
64
+ * modification, are permitted provided that the following conditions are met:
65
+ *
66
+ * 1. Redistributions of source code must retain the above copyright notice,
67
+ * this list of conditions and the following disclaimer.
68
+ *
69
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
70
+ * this list of conditions and the following disclaimer in the documentation
71
+ * and/or other materials provided with the distribution.
72
+ *
73
+ * 3. Neither the name of Salesforce.com nor the names of its contributors may
74
+ * be used to endorse or promote products derived from this software without
75
+ * specific prior written permission.
76
+ *
77
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
78
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
79
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
80
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
81
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
82
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
83
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
84
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
85
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
86
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
87
+ * POSSIBILITY OF SUCH DAMAGE.
88
+ */
89
+
90
+ /*!
91
+ * Copyright (c) 2018, Salesforce.com, Inc.
92
+ * All rights reserved.
93
+ *
94
+ * Redistribution and use in source and binary forms, with or without
95
+ * modification, are permitted provided that the following conditions are met:
96
+ *
97
+ * 1. Redistributions of source code must retain the above copyright notice,
98
+ * this list of conditions and the following disclaimer.
99
+ *
100
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
101
+ * this list of conditions and the following disclaimer in the documentation
102
+ * and/or other materials provided with the distribution.
103
+ *
104
+ * 3. Neither the name of Salesforce.com nor the names of its contributors may
105
+ * be used to endorse or promote products derived from this software without
106
+ * specific prior written permission.
107
+ *
108
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
109
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
110
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
111
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
112
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
113
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
114
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
115
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
116
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
117
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
118
+ * POSSIBILITY OF SUCH DAMAGE.
119
+ */
120
+
121
+ /*!
122
+ * accepts
123
+ * Copyright(c) 2014 Jonathan Ong
124
+ * Copyright(c) 2015 Douglas Christopher Wilson
125
+ * MIT Licensed
126
+ */
127
+
128
+ /*!
129
+ * body-parser
130
+ * Copyright(c) 2014 Jonathan Ong
131
+ * Copyright(c) 2014-2015 Douglas Christopher Wilson
132
+ * MIT Licensed
133
+ */
134
+
135
+ /*!
136
+ * body-parser
137
+ * Copyright(c) 2014-2015 Douglas Christopher Wilson
138
+ * MIT Licensed
139
+ */
140
+
141
+ /*!
142
+ * bytes
143
+ * Copyright(c) 2012-2014 TJ Holowaychuk
144
+ * Copyright(c) 2015 Jed Watson
145
+ * MIT Licensed
146
+ */
147
+
148
+ /*!
149
+ * content-disposition
150
+ * Copyright(c) 2014-2017 Douglas Christopher Wilson
151
+ * MIT Licensed
152
+ */
153
+
154
+ /*!
155
+ * content-type
156
+ * Copyright(c) 2015 Douglas Christopher Wilson
157
+ * MIT Licensed
158
+ */
159
+
160
+ /*!
161
+ * cookie
162
+ * Copyright(c) 2012-2014 Roman Shtylman
163
+ * Copyright(c) 2015 Douglas Christopher Wilson
164
+ * MIT Licensed
165
+ */
166
+
167
+ /*!
168
+ * depd
169
+ * Copyright(c) 2014-2018 Douglas Christopher Wilson
170
+ * MIT Licensed
171
+ */
172
+
173
+ /*!
174
+ * ee-first
175
+ * Copyright(c) 2014 Jonathan Ong
176
+ * MIT Licensed
177
+ */
178
+
179
+ /*!
180
+ * encodeurl
181
+ * Copyright(c) 2016 Douglas Christopher Wilson
182
+ * MIT Licensed
183
+ */
184
+
185
+ /*!
186
+ * escape-html
187
+ * Copyright(c) 2012-2013 TJ Holowaychuk
188
+ * Copyright(c) 2015 Andreas Lubbe
189
+ * Copyright(c) 2015 Tiancheng "Timothy" Gu
190
+ * MIT Licensed
191
+ */
192
+
193
+ /*!
194
+ * etag
195
+ * Copyright(c) 2014-2016 Douglas Christopher Wilson
196
+ * MIT Licensed
197
+ */
198
+
199
+ /*!
200
+ * express
201
+ * Copyright(c) 2009-2013 TJ Holowaychuk
202
+ * Copyright(c) 2013 Roman Shtylman
203
+ * Copyright(c) 2014-2015 Douglas Christopher Wilson
204
+ * MIT Licensed
205
+ */
206
+
207
+ /*!
208
+ * express
209
+ * Copyright(c) 2009-2013 TJ Holowaychuk
210
+ * Copyright(c) 2014-2015 Douglas Christopher Wilson
211
+ * MIT Licensed
212
+ */
213
+
214
+ /*!
215
+ * fill-range <https://github.com/jonschlinkert/fill-range>
216
+ *
217
+ * Copyright (c) 2014-present, Jon Schlinkert.
218
+ * Licensed under the MIT License.
219
+ */
220
+
221
+ /*!
222
+ * finalhandler
223
+ * Copyright(c) 2014-2022 Douglas Christopher Wilson
224
+ * MIT Licensed
225
+ */
226
+
227
+ /*!
228
+ * forwarded
229
+ * Copyright(c) 2014-2017 Douglas Christopher Wilson
230
+ * MIT Licensed
231
+ */
232
+
233
+ /*!
234
+ * fresh
235
+ * Copyright(c) 2012 TJ Holowaychuk
236
+ * Copyright(c) 2016-2017 Douglas Christopher Wilson
237
+ * MIT Licensed
238
+ */
239
+
240
+ /*!
241
+ * http-errors
242
+ * Copyright(c) 2014 Jonathan Ong
243
+ * Copyright(c) 2016 Douglas Christopher Wilson
244
+ * MIT Licensed
245
+ */
246
+
247
+ /*!
248
+ * is-extglob <https://github.com/jonschlinkert/is-extglob>
249
+ *
250
+ * Copyright (c) 2014-2016, Jon Schlinkert.
251
+ * Licensed under the MIT License.
252
+ */
253
+
254
+ /*!
255
+ * is-glob <https://github.com/jonschlinkert/is-glob>
256
+ *
257
+ * Copyright (c) 2014-2017, Jon Schlinkert.
258
+ * Released under the MIT License.
259
+ */
260
+
261
+ /*!
262
+ * is-natural-number.js | MIT (c) Shinnosuke Watanabe
263
+ * https://github.com/shinnn/is-natural-number.js
264
+ */
265
+
266
+ /*!
267
+ * is-number <https://github.com/jonschlinkert/is-number>
268
+ *
269
+ * Copyright (c) 2014-present, Jon Schlinkert.
270
+ * Released under the MIT License.
271
+ */
272
+
273
+ /*!
274
+ * media-typer
275
+ * Copyright(c) 2014-2017 Douglas Christopher Wilson
276
+ * MIT Licensed
277
+ */
278
+
279
+ /*!
280
+ * mime-db
281
+ * Copyright(c) 2014 Jonathan Ong
282
+ * Copyright(c) 2015-2022 Douglas Christopher Wilson
283
+ * MIT Licensed
284
+ */
285
+
286
+ /*!
287
+ * mime-types
288
+ * Copyright(c) 2014 Jonathan Ong
289
+ * Copyright(c) 2015 Douglas Christopher Wilson
290
+ * MIT Licensed
291
+ */
292
+
293
+ /*!
294
+ * negotiator
295
+ * Copyright(c) 2012 Federico Romero
296
+ * Copyright(c) 2012-2014 Isaac Z. Schlueter
297
+ * Copyright(c) 2015 Douglas Christopher Wilson
298
+ * MIT Licensed
299
+ */
300
+
301
+ /*!
302
+ * normalize-path <https://github.com/jonschlinkert/normalize-path>
303
+ *
304
+ * Copyright (c) 2014-2018, Jon Schlinkert.
305
+ * Released under the MIT License.
306
+ */
307
+
308
+ /*!
309
+ * on-finished
310
+ * Copyright(c) 2013 Jonathan Ong
311
+ * Copyright(c) 2014 Douglas Christopher Wilson
312
+ * MIT Licensed
313
+ */
314
+
315
+ /*!
316
+ * parseurl
317
+ * Copyright(c) 2014 Jonathan Ong
318
+ * Copyright(c) 2014-2017 Douglas Christopher Wilson
319
+ * MIT Licensed
320
+ */
321
+
322
+ /*!
323
+ * proxy-addr
324
+ * Copyright(c) 2014-2016 Douglas Christopher Wilson
325
+ * MIT Licensed
326
+ */
327
+
328
+ /*!
329
+ * range-parser
330
+ * Copyright(c) 2012-2014 TJ Holowaychuk
331
+ * Copyright(c) 2015-2016 Douglas Christopher Wilson
332
+ * MIT Licensed
333
+ */
334
+
335
+ /*!
336
+ * raw-body
337
+ * Copyright(c) 2013-2014 Jonathan Ong
338
+ * Copyright(c) 2014-2022 Douglas Christopher Wilson
339
+ * MIT Licensed
340
+ */
341
+
342
+ /*!
343
+ * router
344
+ * Copyright(c) 2013 Roman Shtylman
345
+ * Copyright(c) 2014-2022 Douglas Christopher Wilson
346
+ * MIT Licensed
347
+ */
348
+
349
+ /*!
350
+ * send
351
+ * Copyright(c) 2012 TJ Holowaychuk
352
+ * Copyright(c) 2014-2022 Douglas Christopher Wilson
353
+ * MIT Licensed
354
+ */
355
+
356
+ /*!
357
+ * serve-static
358
+ * Copyright(c) 2010 Sencha Inc.
359
+ * Copyright(c) 2011 TJ Holowaychuk
360
+ * Copyright(c) 2014-2016 Douglas Christopher Wilson
361
+ * MIT Licensed
362
+ */
363
+
364
+ /*!
365
+ * statuses
366
+ * Copyright(c) 2014 Jonathan Ong
367
+ * Copyright(c) 2016 Douglas Christopher Wilson
368
+ * MIT Licensed
369
+ */
370
+
371
+ /*!
372
+ * strip-dirs | MIT (c) Shinnosuke Watanabe
373
+ * https://github.com/shinnn/node-strip-dirs
374
+ */
375
+
376
+ /*!
377
+ * to-regex-range <https://github.com/micromatch/to-regex-range>
378
+ *
379
+ * Copyright (c) 2015-present, Jon Schlinkert.
380
+ * Released under the MIT License.
381
+ */
382
+
383
+ /*!
384
+ * toidentifier
385
+ * Copyright(c) 2016 Douglas Christopher Wilson
386
+ * MIT Licensed
387
+ */
388
+
389
+ /*!
390
+ * type-is
391
+ * Copyright(c) 2014 Jonathan Ong
392
+ * Copyright(c) 2014-2015 Douglas Christopher Wilson
393
+ * MIT Licensed
394
+ */
395
+
396
+ /*!
397
+ * unpipe
398
+ * Copyright(c) 2015 Douglas Christopher Wilson
399
+ * MIT Licensed
400
+ */
401
+
402
+ /*!
403
+ * vary
404
+ * Copyright(c) 2014-2017 Douglas Christopher Wilson
405
+ * MIT Licensed
406
+ */
407
+
408
+ /*! crc32.js (C) 2014-present SheetJS -- http://sheetjs.com */
409
+
410
+ /*! queue-microtask. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */
411
+
412
+ /*! run-parallel. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */
413
+
414
+ /*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */
415
+
416
+ /**
417
+ * @license
418
+ * Lodash <https://lodash.com/>
419
+ * Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
420
+ * Released under MIT license <https://lodash.com/license>
421
+ * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
422
+ * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
423
+ */
424
+
425
+ /**
426
+ * Archiver Core
427
+ *
428
+ * @ignore
429
+ * @license [MIT]{@link https://github.com/archiverjs/node-archiver/blob/master/LICENSE}
430
+ * @copyright (c) 2012-2014 Chris Talkington, contributors.
431
+ */
432
+
433
+ /**
434
+ * Archiver Vending
435
+ *
436
+ * @ignore
437
+ * @license [MIT]{@link https://github.com/archiverjs/node-archiver/blob/master/LICENSE}
438
+ * @copyright (c) 2012-2014 Chris Talkington, contributors.
439
+ */
440
+
441
+ /**
442
+ * JSON Format Plugin
443
+ *
444
+ * @module plugins/json
445
+ * @license [MIT]{@link https://github.com/archiverjs/node-archiver/blob/master/LICENSE}
446
+ * @copyright (c) 2012-2014 Chris Talkington, contributors.
447
+ */
448
+
449
+ /**
450
+ * TAR Format Plugin
451
+ *
452
+ * @module plugins/tar
453
+ * @license [MIT]{@link https://github.com/archiverjs/node-archiver/blob/master/LICENSE}
454
+ * @copyright (c) 2012-2014 Chris Talkington, contributors.
455
+ */
456
+
457
+ /**
458
+ * ZIP Format Plugin
459
+ *
460
+ * @module plugins/zip
461
+ * @license [MIT]{@link https://github.com/archiverjs/node-archiver/blob/master/LICENSE}
462
+ * @copyright (c) 2012-2014 Chris Talkington, contributors.
463
+ */
464
+
465
+ /**
466
+ * ZipStream
467
+ *
468
+ * @ignore
469
+ * @license [MIT]{@link https://github.com/archiverjs/node-zip-stream/blob/master/LICENSE}
470
+ * @copyright (c) 2014 Chris Talkington, contributors.
471
+ */
472
+
473
+ /** @license URI.js v4.4.1 (c) 2011 Gary Court. License: http://github.com/garycourt/uri-js */
package/dist/index.d.ts CHANGED
@@ -1,214 +1,10 @@
1
- import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
2
- export { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
3
- import * as _cloudbase_toolbox from '@cloudbase/toolbox';
4
- import CloudBase from '@cloudbase/manager-node';
5
- export { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js';
6
-
7
- interface InteractiveResult {
8
- type: 'envId' | 'clarification' | 'confirmation';
9
- data: any;
10
- cancelled?: boolean;
11
- }
12
- declare class InteractiveServer {
13
- private app;
14
- private server;
15
- private wss;
16
- private port;
17
- private isRunning;
18
- private currentResolver;
19
- private sessionData;
20
- private readonly DEFAULT_PORT;
21
- private readonly FALLBACK_PORTS;
22
- constructor();
23
- private cleanup;
24
- private setupExpress;
25
- private setupWebSocket;
26
- start(): Promise<number>;
27
- stop(): Promise<void>;
28
- collectEnvId(availableEnvs: any[]): Promise<InteractiveResult>;
29
- clarifyRequest(message: string, options?: string[]): Promise<InteractiveResult>;
30
- private getEnvSetupHTML;
31
- private getLogsHTML;
32
- private getClarificationHTML;
33
- private getConfirmationHTML;
34
- get running(): boolean;
35
- get currentPort(): number;
36
- }
37
-
38
- interface UploadFileParams {
39
- cloudPath: string;
40
- fileContent: string;
41
- }
42
- interface ListFilesParams {
43
- prefix: string;
44
- marker?: string;
45
- }
46
- interface DeleteFileParams {
47
- cloudPath: string;
48
- }
49
- interface GetFileInfoParams {
50
- cloudPath: string;
51
- }
52
- interface ToolResponse {
53
- success: boolean;
54
- [key: string]: any;
55
- }
56
- interface DataModelField {
57
- name: string;
58
- type: 'string' | 'number' | 'boolean' | 'date' | 'array' | 'object' | 'objectId' | 'file' | 'image';
59
- required?: boolean;
60
- default?: any;
61
- description?: string;
62
- validation?: {
63
- min?: number;
64
- max?: number;
65
- pattern?: string;
66
- enum?: any[];
67
- };
68
- }
69
- interface DataModelSchema {
70
- type: 'object';
71
- properties: Record<string, {
72
- type: string;
73
- description?: string;
74
- required?: boolean;
75
- default?: any;
76
- validation?: any;
77
- }>;
78
- required?: string[];
79
- }
80
- interface DataModel {
81
- id?: string;
82
- name: string;
83
- title: string;
84
- schema: DataModelSchema;
85
- envId?: string;
86
- status?: 'draft' | 'published';
87
- createdAt?: string;
88
- updatedAt?: string;
89
- }
90
- interface CloudBaseOptions {
91
- secretId?: string;
92
- secretKey?: string;
93
- token?: string;
94
- envId?: string;
95
- proxy?: string;
96
- region?: string;
97
- envType?: string;
98
- }
99
-
100
- /**
101
- * 数据上报类
102
- * 用于收集 MCP 工具使用情况和错误信息,帮助改进产品
103
- *
104
- * 隐私保护:
105
- * - 可通过环境变量 CLOUDBASE_MCP_TELEMETRY_DISABLED=true 完全关闭
106
- * - 不收集敏感信息(代码内容、具体文件路径等)
107
- * - 使用设备指纹而非真实用户信息
108
- * - 所有数据仅用于产品改进,不用于其他用途
109
- */
110
- declare class TelemetryReporter {
111
- private deviceId;
112
- private userAgent;
113
- private additionalParams;
114
- private enabled;
115
- constructor();
116
- /**
117
- * 获取用户运行环境信息
118
- * 包含操作系统、Node版本和MCP版本等信息
119
- */
120
- getUserAgent(): {
121
- userAgent: string;
122
- deviceId: string;
123
- osType: string;
124
- osRelease: string;
125
- nodeVersion: string;
126
- arch: string;
127
- mcpVersion: string;
128
- };
129
- /**
130
- * 获取设备唯一标识
131
- * 基于主机名、CPU信息和MAC地址生成匿名设备指纹
132
- */
133
- private getDeviceId;
134
- /**
135
- * 发送HTTP请求
136
- */
137
- private postFetch;
138
- /**
139
- * 上报事件
140
- * @param eventCode 事件代码
141
- * @param eventData 事件数据
142
- */
143
- report(eventCode: string, eventData?: {
144
- [key: string]: any;
145
- }): Promise<void>;
146
- /**
147
- * 设置公共参数
148
- */
149
- addAdditionalParams(params: {
150
- [key: string]: any;
151
- }): void;
152
- /**
153
- * 检查是否启用
154
- */
155
- isEnabled(): boolean;
156
- }
157
- declare const telemetryReporter: TelemetryReporter;
158
- declare const reportToolkitLifecycle: (params: {
159
- event: "start" | "exit";
160
- duration?: number;
161
- exitCode?: number;
162
- error?: string;
163
- }) => Promise<void>;
164
-
165
- declare const info: (message: string, data?: any) => void;
166
- declare const warn: (message: string, data?: any) => void;
167
- declare const error: (message: string, data?: any) => void;
168
-
169
- interface ExtendedMcpServer extends McpServer {
170
- cloudBaseOptions?: CloudBaseOptions;
171
- }
172
- /**
173
- * Create and configure a CloudBase MCP Server instance
174
- * @param options Server configuration options
175
- * @returns Configured McpServer instance
176
- */
177
- declare function createCloudBaseMcpServer(options?: {
178
- name?: string;
179
- version?: string;
180
- enableTelemetry?: boolean;
181
- cloudBaseOptions?: CloudBaseOptions;
182
- }): ExtendedMcpServer;
183
- /**
184
- * Get the default configured CloudBase MCP Server
185
- */
186
- declare function getDefaultServer(): ExtendedMcpServer;
187
-
188
- declare function getLoginState(): Promise<_cloudbase_toolbox.Credential>;
189
- declare function logout(): Promise<void>;
190
-
191
- declare function getEnvId(cloudBaseOptions?: CloudBaseOptions): Promise<string>;
192
- declare function resetCloudBaseManagerCache(): void;
193
- interface GetManagerOptions {
194
- requireEnvId?: boolean;
195
- cloudBaseOptions?: CloudBaseOptions;
196
- }
197
- /**
198
- * 每次都实时获取最新的 token/secretId/secretKey
199
- */
200
- declare function getCloudBaseManager(options?: GetManagerOptions): Promise<CloudBase>;
201
- /**
202
- * 使用传入的 CloudBase 配置创建 manager,不使用缓存
203
- * @param cloudBaseOptions 传入的 CloudBase 配置选项
204
- * @returns CloudBase manager 实例
205
- */
206
- declare function createCloudBaseManagerWithOptions(cloudBaseOptions: CloudBaseOptions): CloudBase;
207
-
1
+ export { createCloudBaseMcpServer, getDefaultServer, type McpServer, type ExtendedMcpServer, StdioServerTransport, telemetryReporter, reportToolkitLifecycle, info, error, warn } from "./server.js";
2
+ export type { UploadFileParams, ListFilesParams, DeleteFileParams, GetFileInfoParams, ToolResponse, DataModelField, DataModelSchema, DataModel, CloudBaseOptions } from "./types.js";
3
+ export { getLoginState, logout } from "./auth.js";
4
+ export { getCloudBaseManager, getEnvId, resetCloudBaseManagerCache, createCloudBaseManagerWithOptions } from "./cloudbase-manager.js";
5
+ export type { InteractiveResult } from "./interactive-server.js";
208
6
  /**
209
7
  * Get interactive server instance (CommonJS compatible)
210
8
  */
211
- declare function getInteractiveServerAsync(): Promise<InteractiveServer>;
212
-
213
- export { createCloudBaseManagerWithOptions, createCloudBaseMcpServer, error, getCloudBaseManager, getDefaultServer, getEnvId, getInteractiveServerAsync, getLoginState, info, logout, reportToolkitLifecycle, resetCloudBaseManagerCache, telemetryReporter, warn };
214
- export type { CloudBaseOptions, DataModel, DataModelField, DataModelSchema, DeleteFileParams, ExtendedMcpServer, GetFileInfoParams, InteractiveResult, ListFilesParams, ToolResponse, UploadFileParams };
9
+ export declare function getInteractiveServerAsync(): Promise<import("./interactive-server.js").InteractiveServer>;
10
+ //# sourceMappingURL=index.d.ts.map