/** * Weixin (WeChat ilink) channel — long-poll getUpdates, QR login, direct messages only. */ import './pairing-config-resolver.js'; import type { Config } from '@xopcai/xopc/config/schema.js'; import type { MessageBus } from '@xopcai/xopc/infra/bus/index.js'; import type { ChannelCapabilities, ChannelPlugin, ChannelPluginDefaults, ChannelPluginInitOptions, ChannelPluginReloadMeta, ChannelPluginStartOptions, ChannelSecurityContext, ChannelStreamingAdapter } from '@xopcai/xopc/channels/plugin-types.js'; import type { ChannelCliLoginAdapter, ChannelCronDeliveryAdapter, ChannelRuntimeActionAdapter } from '@xopcai/xopc/channels/plugins/types.adapters.js'; import { type ResolvedWeixinAccount } from './auth/accounts.js'; import { weixinTextChunker } from './outbound-send.js'; export declare class WeixinChannelPlugin implements ChannelPlugin { readonly id: "weixin"; readonly reload: ChannelPluginReloadMeta; readonly meta: { readonly id: "weixin"; readonly label: "Weixin"; readonly selectionLabel: "Weixin (ilink)"; readonly docsPath: "/channels/weixin"; readonly blurb: "WeChat via Tencent ilink bot API (QR login, direct chat)."; readonly order: 3; readonly deferConnectUntilAfterListen: true; }; readonly capabilities: ChannelCapabilities; readonly configSchema: { schema: {}; validate: (raw: unknown) => { ok: true; errors?: undefined; } | { ok: false; errors: string[]; }; }; readonly cronDelivery: ChannelCronDeliveryAdapter; readonly onboard: import("@xopcai/xopc/channels/plugins/types.adapters.js").ChannelOnboardAdapter; readonly cliLogin: ChannelCliLoginAdapter; readonly runtimeActions: ChannelRuntimeActionAdapter; readonly configSurface: import("@xopcai/xopc/channels/plugins/types.adapters.js").ChannelConfigSurfaceAdapter; readonly pairing: import("@xopcai/xopc/channels/plugins/types.adapters.js").ChannelPairingAdapter; readonly defaults: ChannelPluginDefaults; private bus; private cfg; private abortControllers; /** Unregister fn for the workflow-progress capability registered against the global broker. */ private workflowProgressUnregister; config: { listAccountIds: (cfg: Config) => string[]; resolveAccount: (cfg: Config, accountId?: string | null) => ResolvedWeixinAccount; isConfigured: (account: ResolvedWeixinAccount) => Promise; describeAccount: (account: ResolvedWeixinAccount, _cfg: Config) => { accountId: string; channelId: string; name: string; enabled: boolean; configured: boolean; status: any; }; }; security: { resolveDmPolicy: ({ account }: { account: ResolvedWeixinAccount; }) => import("@xopcai/xopc/channels/channel-domain.js").DmPolicy; checkAccess: (ctx: ChannelSecurityContext, account: ResolvedWeixinAccount, _cfg: Config) => import("@xopcai/xopc/channels/security.js").SecurityResult; }; outbound: { sendPayload: (ctx: import("@xopcai/xopc/channels/plugin-types.js").ChannelOutboundPayloadContext) => Promise; sendText: (ctx: import("@xopcai/xopc/channels/plugin-types.js").ChannelOutboundContext) => Promise; sendMedia: (ctx: import("@xopcai/xopc/channels/plugin-types.js").ChannelOutboundContext) => Promise; deliveryMode: "direct"; chunker: typeof weixinTextChunker; chunkerMode: "text"; textChunkLimit: number; }; streaming: ChannelStreamingAdapter; /** Channel plugin hints (cron targets, media paths). */ agentPrompt: { augmentSystemPrompt: () => string; }; init(options: ChannelPluginInitOptions): Promise; private registerWorkflowProgressCapability; start(options?: ChannelPluginStartOptions): Promise; stop(accountId?: string): Promise; channelIsRunning(cfg: Config): boolean; onConfigUpdated(cfg: Config): Promise; /** * Restart long-poll monitors after credentials were written to disk without a `channels.weixin` JSON * delta (e.g. only token files / account index updated). Gateway calls this after QR login completes. * * Pass `bus` explicitly: if Weixin was disabled at gateway boot, `init()` was skipped and `this.bus` was never set. */ reloadMonitorsWithConfig(cfg: Config, bus: MessageBus): Promise; } export declare const weixinPlugin: WeixinChannelPlugin;