import type { OpenClawPluginApi } from "openclaw/plugin-sdk"; import { type Dispatcher } from 'undici'; import { FileUploadLimits } from './limits'; import { PerChatSendQueue } from './send-queue'; import { type NicknameStore } from './nickname-store'; import type { ResolvedChatKind } from './types'; import { type ResolverEvent } from './always-respond'; import { WsClient, ConnectionLifecycle } from './ws-client'; import { OutboundQueue } from './outbound-queue'; import type { Logger, TrueConfChannelConfig, ResolvedAccount } from './types'; type InboundRoute = { kind: 'direct'; userId: string; } | { kind: 'group'; chatId: string; }; export declare function loadCaFromAccount(account: ResolvedAccount): Buffer | undefined; export interface AccountEntry { lifecycle: ConnectionLifecycle; wsClient: WsClient; dispatcher?: Dispatcher; unsubscribers?: Array<() => void>; limits: FileUploadLimits; sendQueue: PerChatSendQueue; outboundQueue: OutboundQueue; } export declare function shutdownAccountEntry(entry: { lifecycle: ConnectionLifecycle; wsClient: WsClient; dispatcher?: Dispatcher; unsubscribers?: Array<() => void>; }): void; export declare function mapPushToResolverEvent(method: string, payload: Record, logger: Logger): ResolverEvent | null; export declare function createRuntimeStore(): { accounts: Map; logger: Logger | null; runtime: unknown; fullConfig: unknown; channelConfig: TrueConfChannelConfig | null; directChatsByStableUserId: Map; lastInboundRouteByAccount: Map; chatTypeByChatId: Map; inflightChatTypeLookups: Map>; recentBotMsgIdsByChat: Map>; nicknameStore: NicknameStore | null; }; export type RuntimeStore = ReturnType; export declare function invalidateChatState(store: RuntimeStore, accountId: string, chatId: string): void; export declare function makeForceReconnectAdapter(getLifecycle: () => { forceReconnect: (reason: string) => Promise; } | null): (reason: string) => Promise; export declare function registerSdkPushHandler(args: { wsClient: WsClient; store: RuntimeStore; accountId: string; limits: FileUploadLimits; logger: Logger; }): () => void; export declare const channelPlugin: { id: "trueconf"; meta: { id: "trueconf"; label: string; selectionLabel: string; docsPath: string; blurb: string; order: number; aliases: string[]; }; capabilities: { chatTypes: ("direct" | "group" | "thread")[]; reactions: boolean; threads: boolean; media: boolean; polls: boolean; nativeCommands: boolean; blockStreaming: boolean; }; messaging: { normalizeTarget: (raw: string) => string; targetResolver: { looksLikeId: (_raw: string, normalized: string) => boolean; hint: string; }; }; config: { listAccountIds: (cfg: unknown) => string[]; defaultAccountId: (cfg: unknown) => string; resolveAccount: (cfg: unknown, accountId?: string | null) => ResolvedAccount; isConfigured: (account: ResolvedAccount) => boolean; isEnabled: (account: ResolvedAccount) => boolean; describeAccount: (account: ResolvedAccount) => import("./types").AccountDescription; }; setupWizard: import("openclaw/plugin-sdk").ChannelSetupWizard; setup: import("openclaw/plugin-sdk").ChannelSetupAdapter; outbound: { deliveryMode: "direct"; sendText: (ctx: { accountId?: string; to: string; text: string; }) => Promise<{ channel: string; messageId: string; }>; sendMedia: (ctx: { accountId?: string; to: string; text?: string; mediaUrl?: string; mediaLocalRoots?: readonly string[]; }) => Promise<{ channel: string; messageId: string; }>; }; gateway: { startAccount: (ctx: { accountId: string; setStatus: (next: Record) => void; abortSignal?: AbortSignal; }) => Promise; }; }; export declare function registerFull(api: OpenClawPluginApi): void; export declare function __resetForTesting(): void; export declare function __getAccountsForTesting(): Map; export {}; //# sourceMappingURL=channel.d.ts.map