@cloudbase/cloudbase-mcp 2.31.0 → 2.32.0

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.d.ts CHANGED
@@ -20,6 +20,9 @@ export declare interface AuthOptions {
20
20
  * 自定义 API 请求函数,由外部注入,替代 TC3 签名发请求。
21
21
  * 入参对齐 CAPI 模式:service + action + version + region + payload。
22
22
  * 返回腾讯云 API 响应中 Response 字段的内容(已解包)。
23
+ *
24
+ * `appid` 为可选扩展字段(向后兼容):多小程序会话场景下由工具透传,
25
+ * 宿主(如微信 IDE)据此选择对应登录态;未使用多 appid 的注入方可忽略。
23
26
  */
24
27
  export declare type CloudApiRequestFn = (params: {
25
28
  service: string;
@@ -27,6 +30,8 @@ export declare type CloudApiRequestFn = (params: {
27
30
  version: string;
28
31
  region: string;
29
32
  payload: Record<string, any>;
33
+ /** Optional WeChat mini-program AppID for host login-session selection */
34
+ appid?: string;
30
35
  }) => Promise<any>;
31
36
 
32
37
  declare type CloudBaseConfigBase = NonNullable<ConstructorParameters<typeof CloudBase>[0]>;
@@ -371,10 +376,47 @@ declare type McpClientInfo = {
371
376
 
372
377
  export { McpServer }
373
378
 
379
+ /**
380
+ * 消息推送领域动作(经 CloudApiRequestFn 的 action 字段表达,宿主映射到具体 qbase CGI,
381
+ * CloudBase MCP 不感知 URL)。与现有 service/action/payload 分层一致:
382
+ * 本包只表达「做什么」,由宿主注入的 requestFn 负责「怎么发 + 鉴权」。
383
+ */
384
+ export declare type MsgPushAction = "getAppConfig" | "uploadAppConfig" | "getCallbackSupportList" | "getContainerCallbackConfig" | "setContainerCallbackConfig";
385
+
386
+ /**
387
+ * 消息推送(msg-push)插件 override 钩子。
388
+ * 复用现有 `cloudBaseOptions.requestFn`(CloudApiRequestFn)传输层,
389
+ * 仅在需要定制 service 名等场景下通过本钩子提供;未提供时工具用默认 service 约定。
390
+ */
391
+ export declare interface MsgPushOverrides {
392
+ /** 消息推送 qbase CGI 对应的 Cloud API service 名(默认 "qbase");宿主可按后端契约覆盖 */
393
+ service?: string;
394
+ }
395
+
396
+ /** 消息推送 qbase 响应(业务码 ret === 0 为成功;由宿主 requestFn 解包后返回) */
397
+ export declare interface MsgPushQbaseResponse {
398
+ base_resp?: {
399
+ ret: number;
400
+ errmsg?: string;
401
+ };
402
+ [key: string]: unknown;
403
+ }
404
+
374
405
  /** 各插件的可选配置 */
375
406
  export declare interface PluginOptions {
376
407
  functions?: FunctionDeployOverrides;
377
408
  storage?: StorageOverrides;
409
+ /**
410
+ * 消息推送(msg-push)插件配置。
411
+ *
412
+ * 消息推送 qbase 管理能力(getappconfig / uploadappconfig / route/getcallbacksupportlist /
413
+ * get|setcontainercallbackconfig)依赖微信小程序登录态,CloudBase MCP 独立运行
414
+ * (腾讯云身份)无法直连。复用现有 `cloudBaseOptions.requestFn`(CloudApiRequestFn:
415
+ * service/action/version/region/payload 领域语义)作为传输层——与 databaseNoSQL/functions
416
+ * 完全一致,包内不感知 URL。宿主(如微信开发者工具)在 createCloudBaseMcpServer 时注入
417
+ * requestFn 并启用 msg-push 插件即可;未注入时工具返回明确指引错误(指向微信 IDE 工具)。
418
+ */
419
+ msgPush?: MsgPushOverrides;
378
420
  }
379
421
 
380
422
  export declare const RAW_IDE_FILE_MAPPINGS: Record<string, IdeFileDescriptor[]>;