export const TelegramConfigSchema: z.ZodObject<{ name: z.ZodOptional<z.ZodString>; capabilities: z.ZodOptional<z.ZodUnion<readonly [z.ZodArray<z.ZodString>, z.ZodObject<{ inlineButtons: z.ZodOptional<z.ZodEnum<{ group: "group"; allowlist: "allowlist"; dm: "dm"; all: "all"; off: "off"; }>>; }, z.core.$strict>]>>; execApprovals: z.ZodOptional<z.ZodObject<{ enabled: z.ZodOptional<z.ZodBoolean>; approvers: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>>; agentFilter: z.ZodOptional<z.ZodArray<z.ZodString>>; sessionFilter: z.ZodOptional<z.ZodArray<z.ZodString>>; target: z.ZodOptional<z.ZodEnum<{ channel: "channel"; dm: "dm"; both: "both"; }>>; }, z.core.$strict>>; markdown: z.ZodOptional<z.ZodObject<{ tables: z.ZodOptional<z.ZodEnum<{ off: "off"; bullets: "bullets"; code: "code"; block: "block"; }>>; }, z.core.$strict>>; enabled: z.ZodOptional<z.ZodBoolean>; commands: z.ZodOptional<z.ZodObject<{ native: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodLiteral<"auto">]>>; nativeSkills: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodLiteral<"auto">]>>; }, z.core.$strict>>; customCommands: z.ZodOptional<z.ZodArray<z.ZodObject<{ command: z.ZodString; description: z.ZodString; }, z.core.$strict>>>; configWrites: z.ZodOptional<z.ZodBoolean>; dmPolicy: z.ZodDefault<z.ZodOptional<z.ZodEnum<{ disabled: "disabled"; pairing: "pairing"; allowlist: "allowlist"; open: "open"; }>>>; botToken: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodDiscriminatedUnion<[z.ZodObject<{ source: z.ZodLiteral<"env">; provider: z.ZodString; id: z.ZodString; }, z.core.$strict>, z.ZodObject<{ source: z.ZodLiteral<"file">; provider: z.ZodString; id: z.ZodString; }, z.core.$strict>, z.ZodObject<{ source: z.ZodLiteral<"exec">; provider: z.ZodString; id: z.ZodString; }, z.core.$strict>], "source">]>>; tokenFile: z.ZodOptional<z.ZodString>; replyToMode: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"off">, z.ZodLiteral<"first">, z.ZodLiteral<"all">]>>; groups: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodOptional<z.ZodObject<{ requireMention: z.ZodOptional<z.ZodBoolean>; ingest: z.ZodOptional<z.ZodBoolean>; disableAudioPreflight: z.ZodOptional<z.ZodBoolean>; groupPolicy: z.ZodOptional<z.ZodEnum<{ disabled: "disabled"; allowlist: "allowlist"; open: "open"; }>>; tools: z.ZodOptional<z.ZodObject<{ allow: z.ZodOptional<z.ZodArray<z.ZodString>>; alsoAllow: z.ZodOptional<z.ZodArray<z.ZodString>>; deny: z.ZodOptional<z.ZodArray<z.ZodString>>; }, z.core.$strict>>; toolsBySender: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodOptional<z.ZodObject<{ allow: z.ZodOptional<z.ZodArray<z.ZodString>>; alsoAllow: z.ZodOptional<z.ZodArray<z.ZodString>>; deny: z.ZodOptional<z.ZodArray<z.ZodString>>; }, z.core.$strict>>>>; skills: z.ZodOptional<z.ZodArray<z.ZodString>>; enabled: z.ZodOptional<z.ZodBoolean>; allowFrom: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>>; systemPrompt: z.ZodOptional<z.ZodString>; topics: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodOptional<z.ZodObject<{ requireMention: z.ZodOptional<z.ZodBoolean>; ingest: z.ZodOptional<z.ZodBoolean>; disableAudioPreflight: z.ZodOptional<z.ZodBoolean>; groupPolicy: z.ZodOptional<z.ZodEnum<{ disabled: "disabled"; allowlist: "allowlist"; open: "open"; }>>; skills: z.ZodOptional<z.ZodArray<z.ZodString>>; enabled: z.ZodOptional<z.ZodBoolean>; allowFrom: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>>; systemPrompt: z.ZodOptional<z.ZodString>; agentId: z.ZodOptional<z.ZodString>; errorPolicy: z.ZodOptional<z.ZodEnum<{ silent: "silent"; always: "always"; once: "once"; }>>; errorCooldownMs: z.ZodOptional<z.ZodNumber>; }, z.core.$strict>>>>; errorPolicy: z.ZodOptional<z.ZodEnum<{ silent: "silent"; always: "always"; once: "once"; }>>; errorCooldownMs: z.ZodOptional<z.ZodNumber>; }, z.core.$strict>>>>; allowFrom: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>>; defaultTo: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>; groupAllowFrom: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>>; groupPolicy: z.ZodDefault<z.ZodOptional<z.ZodEnum<{ disabled: "disabled"; allowlist: "allowlist"; open: "open"; }>>>; contextVisibility: z.ZodOptional<z.ZodEnum<{ allowlist: "allowlist"; all: "all"; allowlist_quote: "allowlist_quote"; }>>; historyLimit: z.ZodOptional<z.ZodNumber>; dmHistoryLimit: z.ZodOptional<z.ZodNumber>; dms: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodOptional<z.ZodObject<{ historyLimit: z.ZodOptional<z.ZodNumber>; }, z.core.$strict>>>>; direct: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodOptional<z.ZodObject<{ dmPolicy: z.ZodOptional<z.ZodEnum<{ disabled: "disabled"; pairing: "pairing"; allowlist: "allowlist"; open: "open"; }>>; tools: z.ZodOptional<z.ZodObject<{ allow: z.ZodOptional<z.ZodArray<z.ZodString>>; alsoAllow: z.ZodOptional<z.ZodArray<z.ZodString>>; deny: z.ZodOptional<z.ZodArray<z.ZodString>>; }, z.core.$strict>>; toolsBySender: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodOptional<z.ZodObject<{ allow: z.ZodOptional<z.ZodArray<z.ZodString>>; alsoAllow: z.ZodOptional<z.ZodArray<z.ZodString>>; deny: z.ZodOptional<z.ZodArray<z.ZodString>>; }, z.core.$strict>>>>; skills: z.ZodOptional<z.ZodArray<z.ZodString>>; enabled: z.ZodOptional<z.ZodBoolean>; allowFrom: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>>; systemPrompt: z.ZodOptional<z.ZodString>; topics: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodOptional<z.ZodObject<{ requireMention: z.ZodOptional<z.ZodBoolean>; ingest: z.ZodOptional<z.ZodBoolean>; disableAudioPreflight: z.ZodOptional<z.ZodBoolean>; groupPolicy: z.ZodOptional<z.ZodEnum<{ disabled: "disabled"; allowlist: "allowlist"; open: "open"; }>>; skills: z.ZodOptional<z.ZodArray<z.ZodString>>; enabled: z.ZodOptional<z.ZodBoolean>; allowFrom: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>>; systemPrompt: z.ZodOptional<z.ZodString>; agentId: z.ZodOptional<z.ZodString>; errorPolicy: z.ZodOptional<z.ZodEnum<{ silent: "silent"; always: "always"; once: "once"; }>>; errorCooldownMs: z.ZodOptional<z.ZodNumber>; }, z.core.$strict>>>>; errorPolicy: z.ZodOptional<z.ZodEnum<{ silent: "silent"; always: "always"; once: "once"; }>>; errorCooldownMs: z.ZodOptional<z.ZodNumber>; requireTopic: z.ZodOptional<z.ZodBoolean>; autoTopicLabel: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodObject<{ enabled: z.ZodOptional<z.ZodBoolean>; prompt: z.ZodOptional<z.ZodString>; }, z.core.$strict>]>>; }, z.core.$strict>>>>; textChunkLimit: z.ZodOptional<z.ZodNumber>; chunkMode: z.ZodOptional<z.ZodEnum<{ length: "length"; newline: "newline"; }>>; streaming: z.ZodOptional<z.ZodEnum<{ off: "off"; block: "block"; partial: "partial"; progress: "progress"; }>>; blockStreaming: z.ZodOptional<z.ZodBoolean>; draftChunk: z.ZodOptional<z.ZodObject<{ minChars: z.ZodOptional<z.ZodNumber>; maxChars: z.ZodOptional<z.ZodNumber>; breakPreference: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"paragraph">, z.ZodLiteral<"newline">, z.ZodLiteral<"sentence">]>>; }, z.core.$strict>>; blockStreamingCoalesce: z.ZodOptional<z.ZodObject<{ minChars: z.ZodOptional<z.ZodNumber>; maxChars: z.ZodOptional<z.ZodNumber>; idleMs: z.ZodOptional<z.ZodNumber>; }, z.core.$strict>>; mediaMaxMb: z.ZodOptional<z.ZodNumber>; timeoutSeconds: z.ZodOptional<z.ZodNumber>; retry: z.ZodOptional<z.ZodObject<{ attempts: z.ZodOptional<z.ZodNumber>; minDelayMs: z.ZodOptional<z.ZodNumber>; maxDelayMs: z.ZodOptional<z.ZodNumber>; jitter: z.ZodOptional<z.ZodNumber>; }, z.core.$strict>>; network: z.ZodOptional<z.ZodObject<{ autoSelectFamily: z.ZodOptional<z.ZodBoolean>; dnsResultOrder: z.ZodOptional<z.ZodEnum<{ ipv4first: "ipv4first"; verbatim: "verbatim"; }>>; dangerouslyAllowPrivateNetwork: z.ZodOptional<z.ZodBoolean>; }, z.core.$strict>>; proxy: z.ZodOptional<z.ZodString>; webhookUrl: z.ZodOptional<z.ZodString>; webhookSecret: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodDiscriminatedUnion<[z.ZodObject<{ source: z.ZodLiteral<"env">; provider: z.ZodString; id: z.ZodString; }, z.core.$strict>, z.ZodObject<{ source: z.ZodLiteral<"file">; provider: z.ZodString; id: z.ZodString; }, z.core.$strict>, z.ZodObject<{ source: z.ZodLiteral<"exec">; provider: z.ZodString; id: z.ZodString; }, z.core.$strict>], "source">]>>; webhookPath: z.ZodOptional<z.ZodString>; webhookHost: z.ZodOptional<z.ZodString>; webhookPort: z.ZodOptional<z.ZodNumber>; webhookCertPath: z.ZodOptional<z.ZodString>; actions: z.ZodOptional<z.ZodObject<{ reactions: z.ZodOptional<z.ZodBoolean>; sendMessage: z.ZodOptional<z.ZodBoolean>; poll: z.ZodOptional<z.ZodBoolean>; deleteMessage: z.ZodOptional<z.ZodBoolean>; editMessage: z.ZodOptional<z.ZodBoolean>; sticker: z.ZodOptional<z.ZodBoolean>; createForumTopic: z.ZodOptional<z.ZodBoolean>; editForumTopic: z.ZodOptional<z.ZodBoolean>; }, z.core.$strict>>; threadBindings: z.ZodOptional<z.ZodObject<{ enabled: z.ZodOptional<z.ZodBoolean>; idleHours: z.ZodOptional<z.ZodNumber>; maxAgeHours: z.ZodOptional<z.ZodNumber>; spawnSubagentSessions: z.ZodOptional<z.ZodBoolean>; spawnAcpSessions: z.ZodOptional<z.ZodBoolean>; }, z.core.$strict>>; reactionNotifications: z.ZodOptional<z.ZodEnum<{ all: "all"; off: "off"; own: "own"; }>>; reactionLevel: z.ZodOptional<z.ZodEnum<{ off: "off"; ack: "ack"; minimal: "minimal"; extensive: "extensive"; }>>; heartbeat: z.ZodOptional<z.ZodObject<{ showOk: z.ZodOptional<z.ZodBoolean>; showAlerts: z.ZodOptional<z.ZodBoolean>; useIndicator: z.ZodOptional<z.ZodBoolean>; }, z.core.$strict>>; healthMonitor: z.ZodOptional<z.ZodObject<{ enabled: z.ZodOptional<z.ZodBoolean>; }, z.core.$strict>>; linkPreview: z.ZodOptional<z.ZodBoolean>; silentErrorReplies: z.ZodOptional<z.ZodBoolean>; responsePrefix: z.ZodOptional<z.ZodString>; ackReaction: z.ZodOptional<z.ZodString>; errorPolicy: z.ZodOptional<z.ZodEnum<{ silent: "silent"; always: "always"; once: "once"; }>>; errorCooldownMs: z.ZodOptional<z.ZodNumber>; apiRoot: z.ZodOptional<z.ZodString>; autoTopicLabel: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodObject<{ enabled: z.ZodOptional<z.ZodBoolean>; prompt: z.ZodOptional<z.ZodString>; }, z.core.$strict>]>>; accounts: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodOptional<z.ZodObject<{ name: z.ZodOptional<z.ZodString>; capabilities: z.ZodOptional<z.ZodUnion<readonly [z.ZodArray<z.ZodString>, z.ZodObject<{ inlineButtons: z.ZodOptional<z.ZodEnum<{ group: "group"; allowlist: "allowlist"; dm: "dm"; all: "all"; off: "off"; }>>; }, z.core.$strict>]>>; execApprovals: z.ZodOptional<z.ZodObject<{ enabled: z.ZodOptional<z.ZodBoolean>; approvers: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>>; agentFilter: z.ZodOptional<z.ZodArray<z.ZodString>>; sessionFilter: z.ZodOptional<z.ZodArray<z.ZodString>>; target: z.ZodOptional<z.ZodEnum<{ channel: "channel"; dm: "dm"; both: "both"; }>>; }, z.core.$strict>>; markdown: z.ZodOptional<z.ZodObject<{ tables: z.ZodOptional<z.ZodEnum<{ off: "off"; bullets: "bullets"; code: "code"; block: "block"; }>>; }, z.core.$strict>>; enabled: z.ZodOptional<z.ZodBoolean>; commands: z.ZodOptional<z.ZodObject<{ native: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodLiteral<"auto">]>>; nativeSkills: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodLiteral<"auto">]>>; }, z.core.$strict>>; customCommands: z.ZodOptional<z.ZodArray<z.ZodObject<{ command: z.ZodString; description: z.ZodString; }, z.core.$strict>>>; configWrites: z.ZodOptional<z.ZodBoolean>; dmPolicy: z.ZodDefault<z.ZodOptional<z.ZodEnum<{ disabled: "disabled"; pairing: "pairing"; allowlist: "allowlist"; open: "open"; }>>>; botToken: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodDiscriminatedUnion<[z.ZodObject<{ source: z.ZodLiteral<"env">; provider: z.ZodString; id: z.ZodString; }, z.core.$strict>, z.ZodObject<{ source: z.ZodLiteral<"file">; provider: z.ZodString; id: z.ZodString; }, z.core.$strict>, z.ZodObject<{ source: z.ZodLiteral<"exec">; provider: z.ZodString; id: z.ZodString; }, z.core.$strict>], "source">]>>; tokenFile: z.ZodOptional<z.ZodString>; replyToMode: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"off">, z.ZodLiteral<"first">, z.ZodLiteral<"all">]>>; groups: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodOptional<z.ZodObject<{ requireMention: z.ZodOptional<z.ZodBoolean>; ingest: z.ZodOptional<z.ZodBoolean>; disableAudioPreflight: z.ZodOptional<z.ZodBoolean>; groupPolicy: z.ZodOptional<z.ZodEnum<{ disabled: "disabled"; allowlist: "allowlist"; open: "open"; }>>; tools: z.ZodOptional<z.ZodObject<{ allow: z.ZodOptional<z.ZodArray<z.ZodString>>; alsoAllow: z.ZodOptional<z.ZodArray<z.ZodString>>; deny: z.ZodOptional<z.ZodArray<z.ZodString>>; }, z.core.$strict>>; toolsBySender: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodOptional<z.ZodObject<{ allow: z.ZodOptional<z.ZodArray<z.ZodString>>; alsoAllow: z.ZodOptional<z.ZodArray<z.ZodString>>; deny: z.ZodOptional<z.ZodArray<z.ZodString>>; }, z.core.$strict>>>>; skills: z.ZodOptional<z.ZodArray<z.ZodString>>; enabled: z.ZodOptional<z.ZodBoolean>; allowFrom: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>>; systemPrompt: z.ZodOptional<z.ZodString>; topics: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodOptional<z.ZodObject<{ requireMention: z.ZodOptional<z.ZodBoolean>; ingest: z.ZodOptional<z.ZodBoolean>; disableAudioPreflight: z.ZodOptional<z.ZodBoolean>; groupPolicy: z.ZodOptional<z.ZodEnum<{ disabled: "disabled"; allowlist: "allowlist"; open: "open"; }>>; skills: z.ZodOptional<z.ZodArray<z.ZodString>>; enabled: z.ZodOptional<z.ZodBoolean>; allowFrom: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>>; systemPrompt: z.ZodOptional<z.ZodString>; agentId: z.ZodOptional<z.ZodString>; errorPolicy: z.ZodOptional<z.ZodEnum<{ silent: "silent"; always: "always"; once: "once"; }>>; errorCooldownMs: z.ZodOptional<z.ZodNumber>; }, z.core.$strict>>>>; errorPolicy: z.ZodOptional<z.ZodEnum<{ silent: "silent"; always: "always"; once: "once"; }>>; errorCooldownMs: z.ZodOptional<z.ZodNumber>; }, z.core.$strict>>>>; allowFrom: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>>; defaultTo: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>; groupAllowFrom: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>>; groupPolicy: z.ZodDefault<z.ZodOptional<z.ZodEnum<{ disabled: "disabled"; allowlist: "allowlist"; open: "open"; }>>>; contextVisibility: z.ZodOptional<z.ZodEnum<{ allowlist: "allowlist"; all: "all"; allowlist_quote: "allowlist_quote"; }>>; historyLimit: z.ZodOptional<z.ZodNumber>; dmHistoryLimit: z.ZodOptional<z.ZodNumber>; dms: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodOptional<z.ZodObject<{ historyLimit: z.ZodOptional<z.ZodNumber>; }, z.core.$strict>>>>; direct: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodOptional<z.ZodObject<{ dmPolicy: z.ZodOptional<z.ZodEnum<{ disabled: "disabled"; pairing: "pairing"; allowlist: "allowlist"; open: "open"; }>>; tools: z.ZodOptional<z.ZodObject<{ allow: z.ZodOptional<z.ZodArray<z.ZodString>>; alsoAllow: z.ZodOptional<z.ZodArray<z.ZodString>>; deny: z.ZodOptional<z.ZodArray<z.ZodString>>; }, z.core.$strict>>; toolsBySender: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodOptional<z.ZodObject<{ allow: z.ZodOptional<z.ZodArray<z.ZodString>>; alsoAllow: z.ZodOptional<z.ZodArray<z.ZodString>>; deny: z.ZodOptional<z.ZodArray<z.ZodString>>; }, z.core.$strict>>>>; skills: z.ZodOptional<z.ZodArray<z.ZodString>>; enabled: z.ZodOptional<z.ZodBoolean>; allowFrom: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>>; systemPrompt: z.ZodOptional<z.ZodString>; topics: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodOptional<z.ZodObject<{ requireMention: z.ZodOptional<z.ZodBoolean>; ingest: z.ZodOptional<z.ZodBoolean>; disableAudioPreflight: z.ZodOptional<z.ZodBoolean>; groupPolicy: z.ZodOptional<z.ZodEnum<{ disabled: "disabled"; allowlist: "allowlist"; open: "open"; }>>; skills: z.ZodOptional<z.ZodArray<z.ZodString>>; enabled: z.ZodOptional<z.ZodBoolean>; allowFrom: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>>; systemPrompt: z.ZodOptional<z.ZodString>; agentId: z.ZodOptional<z.ZodString>; errorPolicy: z.ZodOptional<z.ZodEnum<{ silent: "silent"; always: "always"; once: "once"; }>>; errorCooldownMs: z.ZodOptional<z.ZodNumber>; }, z.core.$strict>>>>; errorPolicy: z.ZodOptional<z.ZodEnum<{ silent: "silent"; always: "always"; once: "once"; }>>; errorCooldownMs: z.ZodOptional<z.ZodNumber>; requireTopic: z.ZodOptional<z.ZodBoolean>; autoTopicLabel: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodObject<{ enabled: z.ZodOptional<z.ZodBoolean>; prompt: z.ZodOptional<z.ZodString>; }, z.core.$strict>]>>; }, z.core.$strict>>>>; textChunkLimit: z.ZodOptional<z.ZodNumber>; chunkMode: z.ZodOptional<z.ZodEnum<{ length: "length"; newline: "newline"; }>>; streaming: z.ZodOptional<z.ZodEnum<{ off: "off"; block: "block"; partial: "partial"; progress: "progress"; }>>; blockStreaming: z.ZodOptional<z.ZodBoolean>; draftChunk: z.ZodOptional<z.ZodObject<{ minChars: z.ZodOptional<z.ZodNumber>; maxChars: z.ZodOptional<z.ZodNumber>; breakPreference: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"paragraph">, z.ZodLiteral<"newline">, z.ZodLiteral<"sentence">]>>; }, z.core.$strict>>; blockStreamingCoalesce: z.ZodOptional<z.ZodObject<{ minChars: z.ZodOptional<z.ZodNumber>; maxChars: z.ZodOptional<z.ZodNumber>; idleMs: z.ZodOptional<z.ZodNumber>; }, z.core.$strict>>; mediaMaxMb: z.ZodOptional<z.ZodNumber>; timeoutSeconds: z.ZodOptional<z.ZodNumber>; retry: z.ZodOptional<z.ZodObject<{ attempts: z.ZodOptional<z.ZodNumber>; minDelayMs: z.ZodOptional<z.ZodNumber>; maxDelayMs: z.ZodOptional<z.ZodNumber>; jitter: z.ZodOptional<z.ZodNumber>; }, z.core.$strict>>; network: z.ZodOptional<z.ZodObject<{ autoSelectFamily: z.ZodOptional<z.ZodBoolean>; dnsResultOrder: z.ZodOptional<z.ZodEnum<{ ipv4first: "ipv4first"; verbatim: "verbatim"; }>>; dangerouslyAllowPrivateNetwork: z.ZodOptional<z.ZodBoolean>; }, z.core.$strict>>; proxy: z.ZodOptional<z.ZodString>; webhookUrl: z.ZodOptional<z.ZodString>; webhookSecret: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodDiscriminatedUnion<[z.ZodObject<{ source: z.ZodLiteral<"env">; provider: z.ZodString; id: z.ZodString; }, z.core.$strict>, z.ZodObject<{ source: z.ZodLiteral<"file">; provider: z.ZodString; id: z.ZodString; }, z.core.$strict>, z.ZodObject<{ source: z.ZodLiteral<"exec">; provider: z.ZodString; id: z.ZodString; }, z.core.$strict>], "source">]>>; webhookPath: z.ZodOptional<z.ZodString>; webhookHost: z.ZodOptional<z.ZodString>; webhookPort: z.ZodOptional<z.ZodNumber>; webhookCertPath: z.ZodOptional<z.ZodString>; actions: z.ZodOptional<z.ZodObject<{ reactions: z.ZodOptional<z.ZodBoolean>; sendMessage: z.ZodOptional<z.ZodBoolean>; poll: z.ZodOptional<z.ZodBoolean>; deleteMessage: z.ZodOptional<z.ZodBoolean>; editMessage: z.ZodOptional<z.ZodBoolean>; sticker: z.ZodOptional<z.ZodBoolean>; createForumTopic: z.ZodOptional<z.ZodBoolean>; editForumTopic: z.ZodOptional<z.ZodBoolean>; }, z.core.$strict>>; threadBindings: z.ZodOptional<z.ZodObject<{ enabled: z.ZodOptional<z.ZodBoolean>; idleHours: z.ZodOptional<z.ZodNumber>; maxAgeHours: z.ZodOptional<z.ZodNumber>; spawnSubagentSessions: z.ZodOptional<z.ZodBoolean>; spawnAcpSessions: z.ZodOptional<z.ZodBoolean>; }, z.core.$strict>>; reactionNotifications: z.ZodOptional<z.ZodEnum<{ all: "all"; off: "off"; own: "own"; }>>; reactionLevel: z.ZodOptional<z.ZodEnum<{ off: "off"; ack: "ack"; minimal: "minimal"; extensive: "extensive"; }>>; heartbeat: z.ZodOptional<z.ZodObject<{ showOk: z.ZodOptional<z.ZodBoolean>; showAlerts: z.ZodOptional<z.ZodBoolean>; useIndicator: z.ZodOptional<z.ZodBoolean>; }, z.core.$strict>>; healthMonitor: z.ZodOptional<z.ZodObject<{ enabled: z.ZodOptional<z.ZodBoolean>; }, z.core.$strict>>; linkPreview: z.ZodOptional<z.ZodBoolean>; silentErrorReplies: z.ZodOptional<z.ZodBoolean>; responsePrefix: z.ZodOptional<z.ZodString>; ackReaction: z.ZodOptional<z.ZodString>; errorPolicy: z.ZodOptional<z.ZodEnum<{ silent: "silent"; always: "always"; once: "once"; }>>; errorCooldownMs: z.ZodOptional<z.ZodNumber>; apiRoot: z.ZodOptional<z.ZodString>; autoTopicLabel: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodObject<{ enabled: z.ZodOptional<z.ZodBoolean>; prompt: z.ZodOptional<z.ZodString>; }, z.core.$strict>]>>; }, z.core.$strict>>>>; defaultAccount: z.ZodOptional<z.ZodString>; }, z.core.$strict>;


export const ToolPolicySchema: z.ZodOptional<z.ZodObject<{ allow: z.ZodOptional<z.ZodArray<z.ZodString>>; alsoAllow: z.ZodOptional<z.ZodArray<z.ZodString>>; deny: z.ZodOptional<z.ZodArray<z.ZodString>>; }, z.core.$strict>>;


export const WhatsAppConfigSchema: z.ZodObject<{ enabled: z.ZodOptional<z.ZodBoolean>; capabilities: z.ZodOptional<z.ZodArray<z.ZodString>>; markdown: z.ZodOptional<z.ZodObject<{ tables: z.ZodOptional<z.ZodEnum<{ off: "off"; bullets: "bullets"; code: "code"; block: "block"; }>>; }, z.core.$strict>>; configWrites: z.ZodOptional<z.ZodBoolean>; sendReadReceipts: z.ZodOptional<z.ZodBoolean>; messagePrefix: z.ZodOptional<z.ZodString>; responsePrefix: z.ZodOptional<z.ZodString>; dmPolicy: z.ZodDefault<z.ZodOptional<z.ZodEnum<{ disabled: "disabled"; pairing: "pairing"; allowlist: "allowlist"; open: "open"; }>>>; selfChatMode: z.ZodOptional<z.ZodBoolean>; allowFrom: z.ZodOptional<z.ZodArray<z.ZodString>>; defaultTo: z.ZodOptional<z.ZodString>; groupAllowFrom: z.ZodOptional<z.ZodArray<z.ZodString>>; groupPolicy: z.ZodDefault<z.ZodOptional<z.ZodEnum<{ disabled: "disabled"; allowlist: "allowlist"; open: "open"; }>>>; contextVisibility: z.ZodOptional<z.ZodEnum<{ allowlist: "allowlist"; all: "all"; allowlist_quote: "allowlist_quote"; }>>; historyLimit: z.ZodOptional<z.ZodNumber>; dmHistoryLimit: z.ZodOptional<z.ZodNumber>; dms: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodOptional<z.ZodObject<{ historyLimit: z.ZodOptional<z.ZodNumber>; }, z.core.$strict>>>>; textChunkLimit: z.ZodOptional<z.ZodNumber>; chunkMode: z.ZodOptional<z.ZodEnum<{ length: "length"; newline: "newline"; }>>; blockStreaming: z.ZodOptional<z.ZodBoolean>; blockStreamingCoalesce: z.ZodOptional<z.ZodObject<{ minChars: z.ZodOptional<z.ZodNumber>; maxChars: z.ZodOptional<z.ZodNumber>; idleMs: z.ZodOptional<z.ZodNumber>; }, z.core.$strict>>; groups: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodOptional<z.ZodObject<{ requireMention: z.ZodOptional<z.ZodBoolean>; tools: z.ZodOptional<z.ZodObject<{ allow: z.ZodOptional<z.ZodArray<z.ZodString>>; alsoAllow: z.ZodOptional<z.ZodArray<z.ZodString>>; deny: z.ZodOptional<z.ZodArray<z.ZodString>>; }, z.core.$strict>>; toolsBySender: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodOptional<z.ZodObject<{ allow: z.ZodOptional<z.ZodArray<z.ZodString>>; alsoAllow: z.ZodOptional<z.ZodArray<z.ZodString>>; deny: z.ZodOptional<z.ZodArray<z.ZodString>>; }, z.core.$strict>>>>; }, z.core.$strict>>>>; ackReaction: z.ZodOptional<z.ZodObject<{ emoji: z.ZodOptional<z.ZodString>; direct: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>; group: z.ZodDefault<z.ZodOptional<z.ZodEnum<{ mentions: "mentions"; never: "never"; always: "always"; }>>>; }, z.core.$strict>>; reactionLevel: z.ZodOptional<z.ZodEnum<{ off: "off"; ack: "ack"; minimal: "minimal"; extensive: "extensive"; }>>; debounceMs: z.ZodDefault<z.ZodOptional<z.ZodNumber>>; heartbeat: z.ZodOptional<z.ZodObject<{ showOk: z.ZodOptional<z.ZodBoolean>; showAlerts: z.ZodOptional<z.ZodBoolean>; useIndicator: z.ZodOptional<z.ZodBoolean>; }, z.core.$strict>>; healthMonitor: z.ZodOptional<z.ZodObject<{ enabled: z.ZodOptional<z.ZodBoolean>; }, z.core.$strict>>; accounts: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodOptional<z.ZodObject<{ capabilities: z.ZodOptional<z.ZodArray<z.ZodString>>; markdown: z.ZodOptional<z.ZodObject<{ tables: z.ZodOptional<z.ZodEnum<{ off: "off"; bullets: "bullets"; code: "code"; block: "block"; }>>; }, z.core.$strict>>; configWrites: z.ZodOptional<z.ZodBoolean>; sendReadReceipts: z.ZodOptional<z.ZodBoolean>; messagePrefix: z.ZodOptional<z.ZodString>; responsePrefix: z.ZodOptional<z.ZodString>; dmPolicy: z.ZodDefault<z.ZodOptional<z.ZodEnum<{ disabled: "disabled"; pairing: "pairing"; allowlist: "allowlist"; open: "open"; }>>>; selfChatMode: z.ZodOptional<z.ZodBoolean>; allowFrom: z.ZodOptional<z.ZodArray<z.ZodString>>; defaultTo: z.ZodOptional<z.ZodString>; groupAllowFrom: z.ZodOptional<z.ZodArray<z.ZodString>>; groupPolicy: z.ZodDefault<z.ZodOptional<z.ZodEnum<{ disabled: "disabled"; allowlist: "allowlist"; open: "open"; }>>>; contextVisibility: z.ZodOptional<z.ZodEnum<{ allowlist: "allowlist"; all: "all"; allowlist_quote: "allowlist_quote"; }>>; historyLimit: z.ZodOptional<z.ZodNumber>; dmHistoryLimit: z.ZodOptional<z.ZodNumber>; dms: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodOptional<z.ZodObject<{ historyLimit: z.ZodOptional<z.ZodNumber>; }, z.core.$strict>>>>; textChunkLimit: z.ZodOptional<z.ZodNumber>; chunkMode: z.ZodOptional<z.ZodEnum<{ length: "length"; newline: "newline"; }>>; blockStreaming: z.ZodOptional<z.ZodBoolean>; blockStreamingCoalesce: z.ZodOptional<z.ZodObject<{ minChars: z.ZodOptional<z.ZodNumber>; maxChars: z.ZodOptional<z.ZodNumber>; idleMs: z.ZodOptional<z.ZodNumber>; }, z.core.$strict>>; groups: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodOptional<z.ZodObject<{ requireMention: z.ZodOptional<z.ZodBoolean>; tools: z.ZodOptional<z.ZodObject<{ allow: z.ZodOptional<z.ZodArray<z.ZodString>>; alsoAllow: z.ZodOptional<z.ZodArray<z.ZodString>>; deny: z.ZodOptional<z.ZodArray<z.ZodString>>; }, z.core.$strict>>; toolsBySender: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodOptional<z.ZodObject<{ allow: z.ZodOptional<z.ZodArray<z.ZodString>>; alsoAllow: z.ZodOptional<z.ZodArray<z.ZodString>>; deny: z.ZodOptional<z.ZodArray<z.ZodString>>; }, z.core.$strict>>>>; }, z.core.$strict>>>>; ackReaction: z.ZodOptional<z.ZodObject<{ emoji: z.ZodOptional<z.ZodString>; direct: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>; group: z.ZodDefault<z.ZodOptional<z.ZodEnum<{ mentions: "mentions"; never: "never"; always: "always"; }>>>; }, z.core.$strict>>; reactionLevel: z.ZodOptional<z.ZodEnum<{ off: "off"; ack: "ack"; minimal: "minimal"; extensive: "extensive"; }>>; debounceMs: z.ZodDefault<z.ZodOptional<z.ZodNumber>>; heartbeat: z.ZodOptional<z.ZodObject<{ showOk: z.ZodOptional<z.ZodBoolean>; showAlerts: z.ZodOptional<z.ZodBoolean>; useIndicator: z.ZodOptional<z.ZodBoolean>; }, z.core.$strict>>; healthMonitor: z.ZodOptional<z.ZodObject<{ enabled: z.ZodOptional<z.ZodBoolean>; }, z.core.$strict>>; name: z.ZodOptional<z.ZodString>; enabled: z.ZodOptional<z.ZodBoolean>; authDir: z.ZodOptional<z.ZodString>; mediaMaxMb: z.ZodOptional<z.ZodNumber>; }, z.core.$strict>>>>; defaultAccount: z.ZodOptional<z.ZodString>; mediaMaxMb: z.ZodDefault<z.ZodOptional<z.ZodNumber>>; actions: z.ZodOptional<z.ZodObject<{ reactions: z.ZodOptional<z.ZodBoolean>; sendMessage: z.ZodOptional<z.ZodBoolean>; polls: z.ZodOptional<z.ZodBoolean>; }, z.core.$strict>>; }, z.core.$strict>;


export type BaseProbeResult = BaseProbeResult<TError>;


export type BaseTokenResolution = BaseTokenResolution;


export type ChannelAccountSnapshot = ChannelAccountSnapshot;


export type ChannelAgentTool = ChannelAgentTool;


export type ChannelApprovalAdapter = ChannelApprovalAdapter;


export type ChannelApprovalCapability = ChannelApprovalCapability;


export type ChannelCommandConversationContext = ChannelCommandConversationContext;


export type ChannelDirectoryAdapter = ChannelDirectoryAdapter;


export type ChannelDoctorAdapter = ChannelDoctorAdapter;


export type ChannelDoctorConfigMutation = ChannelDoctorConfigMutation;


export type ChannelDoctorEmptyAllowlistAccountContext = ChannelDoctorEmptyAllowlistAccountContext;


export type ChannelDoctorSequenceResult = ChannelDoctorSequenceResult;


export type ChannelGroupContext = ChannelGroupContext;


export type ChannelMessageActionAdapter = ChannelMessageActionAdapter;


export type ChannelMessageActionContext = ChannelMessageActionContext;


export type ChannelMessageActionDiscoveryContext = ChannelMessageActionDiscoveryContext;


export type ChannelMessageActionName = "send" | "broadcast" | "poll" | "poll-vote" | "react" | "reactions" | "read" | "edit" | "unsend" | "reply" | "sendWithEffect" | "renameGroup" | "setGroupIcon" | "addParticipant" | "removeParticipant" | "leaveGroup" | "sendAttachment" | "delete" | "pin" | "unpin" | "list-pins" | "permissions" | "thread-create" | "thread-list" | "thread-reply" | "search" | "sticker" | "sticker-search" | "member-info" | "role-info" | "emoji-list" | "emoji-upload" | "sticker-upload" | "role-add" | "role-remove" | "channel-info" | "channel-list" | "channel-create" | "channel-edit" | "channel-delete" | "channel-move" | "category-create" | "category-edit" | "category-delete" | "topic-create" | "topic-edit" | "voice-status" | "event-list" | "event-create" | "timeout" | "kick" | "ban" | "set-profile" | "set-presence" | "download-file" | "upload-file";


export type ChannelMessageToolDiscovery = ChannelMessageToolDiscovery;


export type ChannelMessageToolSchemaContribution = ChannelMessageToolSchemaContribution;


export type ChannelStatusIssue = ChannelStatusIssue;


export type ChannelStructuredComponents = ChannelStructuredComponents;


export type ChannelThreadingContext = ChannelThreadingContext;


export type ChannelThreadingToolContext = ChannelThreadingToolContext;


export function createChannelPairingChallengeIssuer(params: { channel: ChannelId; upsertPairingRequest: (params: { id: string; meta?: PairingMeta | undefined; }) => Promise<{ code: string; created: boolean; }>; }): (challenge: Omit<...>) => Promise<...>;


export function createChannelPairingController(params: { core: PluginRuntime; channel: ChannelId; accountId: string; }): ChannelPairingController;


export function createLoggedPairingApprovalNotifier(format: string | ((params: { cfg: OpenClawConfig; id: string; accountId?: string | undefined; runtime?: RuntimeEnv | undefined; }) => string), log?: (message: string) => void): (params: { ...; }) => Promise<...>;


export function createPairingPrefixStripper(prefixRe: RegExp, map?: (entry: string) => string): (entry: string) => string;


export function createTextPairingAdapter(params: { idLabel: string; message: string; normalizeAllowEntry?: ((entry: string) => string) | undefined; notify: (params: { cfg: OpenClawConfig; id: string; accountId?: string | undefined; runtime?: RuntimeEnv | undefined; } & { ...; }) => void | Promise<...>; }): ChannelPairingAdapter;


export function readChannelAllowFromStoreSync(channel: ChannelId, env?: ProcessEnv, accountId?: string | undefined): string[];


export type ChannelPairingController = ChannelPairingController;


export function createChannelReplyPipeline(params: { cfg: OpenClawConfig; agentId: string; channel?: string | undefined; accountId?: string | undefined; typing?: CreateTypingCallbacksParams | undefined; typingCallbacks?: TypingCallbacks | undefined; }): ChannelReplyPipeline;


export type ChannelReplyPipeline = ChannelReplyPipeline;


export type CreateTypingCallbacksParams = CreateTypingCallbacksParams;


export type ReplyPrefixContext = import("../auto-reply/reply/response-prefix-template.ts").ResponsePrefixContext;


export type ReplyPrefixContextBundle = ReplyPrefixContextBundle;


export type ReplyPrefixOptions = ReplyPrefixOptions;


export type TypingCallbacks = TypingCallbacks;


export function createAccountStatusSink(params: { accountId: string; setStatus: (next: ChannelAccountSnapshot) => void; }): (patch: Omit<ChannelAccountSnapshot, "accountId">) => void;


export function createReplyPrefixContext(params: { cfg: OpenClawConfig; agentId: string; channel?: string | undefined; accountId?: string | undefined; }): ReplyPrefixContextBundle;


export function createReplyPrefixOptions(params: { cfg: OpenClawConfig; agentId: string; channel?: string | undefined; accountId?: string | undefined; }): ReplyPrefixOptions;


export function createTypingCallbacks(params: CreateTypingCallbacksParams): TypingCallbacks;


export function emitHeartbeatEvent(evt: Omit<HeartbeatEventPayload, "ts">): void;


export function enqueueSystemEvent(text: string, options: SystemEventOptions): boolean;


export function getLastHeartbeatEvent(): HeartbeatEventPayload | null;


export function keepHttpServerTaskAlive(params: { server: CloseAwareServer; abortSignal?: AbortSignal | undefined; onAbort?: (() => void | Promise<void>) | undefined; }): Promise<void>;


export function normalizeChannelId(raw?: string | null | undefined): ChannelId | null;


export function normalizeChatType(raw?: string | undefined): ChatType | undefined;


export function normalizePollDurationHours(value: number | undefined, options: { defaultHours: number; maxHours: number; }): number;


export function normalizePollInput(input: PollInput, options?: NormalizePollOptions): NormalizedPollInput;


export function onHeartbeatEvent(listener: (evt: HeartbeatEventPayload) => void): () => void;


export function recordChannelActivity(params: { channel: ChannelId; accountId?: string | null | undefined; direction: ChannelDirection; at?: number | undefined; }): void;


export function reduceInteractiveReply<TState>(interactive: InteractiveReply | undefined, initialState: TState, reduce: (state: TState, block: InteractiveReplyBlock, index: number) => TState): TState;


export function resetHeartbeatEventsForTest(): void;


export function resetSystemEventsForTest(): void;


export function resolveHeartbeatVisibility(params: { cfg: OpenClawConfig; channel: GatewayMessageChannel; accountId?: string | undefined; }): ResolvedHeartbeatVisibility;


export function resolveIndicatorType(status: "sent" | "ok-empty" | "ok-token" | "skipped" | "failed"): HeartbeatIndicatorType | undefined;


export function resolvePollMaxSelections(optionCount: number, allowMultiselect: boolean | undefined): number;


export function waitForTransportReady(params: WaitForTransportReadyParams): Promise<void>;


export function waitUntilAbort(signal?: AbortSignal | undefined, onAbort?: (() => void | Promise<void>) | undefined): Promise<void>;


export const CHANNEL_MESSAGE_ACTION_NAMES: readonly ["send", "broadcast", "poll", "poll-vote", "react", "reactions", "read", "edit", "unsend", "reply", "sendWithEffect", "renameGroup", "setGroupIcon", "addParticipant", "removeParticipant", "leaveGroup", "sendAttachment", "delete", "pin", "unpin", "list-pins", "permissions", "thread-create", "thread-list", "thread-reply", "search", "sticker", "sticker-search", "member-info", "role-info", "emoji-list", "emoji-upload", "sticker-upload", "role-add", "role-remove", "channel-info", "channel-list", "channel-create", "channel-edit", "channel-delete", "channel-move", "category-create", "category-edit", "category-delete", "topic-create", "topic-edit", "voice-status", "event-list", "event-create", "timeout", "kick", "ban", "set-profile", "set-presence", "set-profile", "download-file", "upload-file"];


export const CHANNEL_MESSAGE_CAPABILITIES: readonly ["interactive", "buttons", "cards", "components", "blocks"];


export type BaseProbeResult = BaseProbeResult<TError>;


export type BaseTokenResolution = BaseTokenResolution;


export type ChannelAccountSnapshot = ChannelAccountSnapshot;


export type ChannelAccountState = ChannelAccountState;


export type ChannelActionAvailabilityState = ChannelActionAvailabilityState;


export type ChannelAgentPromptAdapter = ChannelAgentPromptAdapter;


export type ChannelAgentTool = ChannelAgentTool;


export type ChannelAgentToolFactory = ChannelAgentToolFactory;


export type ChannelAllowlistAdapter = ChannelAllowlistAdapter;


export type ChannelApprovalAdapter = ChannelApprovalAdapter;


export type ChannelApprovalCapability = ChannelApprovalCapability;


export type ChannelApprovalForwardTarget = ChannelApprovalForwardTarget;


export type ChannelApprovalInitiatingSurfaceState = ChannelActionAvailabilityState;


export type ChannelAuthAdapter = ChannelAuthAdapter;


export type ChannelCapabilities = ChannelCapabilities;


export type ChannelCapabilitiesDiagnostics = ChannelCapabilitiesDiagnostics;


export type ChannelCapabilitiesDisplayLine = ChannelCapabilitiesDisplayLine;


export type ChannelCapabilitiesDisplayTone = ChannelCapabilitiesDisplayTone;


export type ChannelCommandAdapter = ChannelCommandAdapter;


export type ChannelCommandConversationContext = ChannelCommandConversationContext;


export type ChannelConfigAdapter = ChannelConfigAdapter<ResolvedAccount>;


export type ChannelConfiguredBindingConversationRef = ChannelConfiguredBindingConversationRef;


export type ChannelConfiguredBindingMatch = ChannelConfiguredBindingMatch;


export type ChannelConfiguredBindingProvider = ChannelConfiguredBindingProvider;


export type ChannelConversationBindingSupport = ChannelConversationBindingSupport;


export type ChannelDirectoryAdapter = ChannelDirectoryAdapter;


export type ChannelDirectoryEntry = ChannelDirectoryEntry;


export type ChannelDirectoryEntryKind = ChannelDirectoryEntryKind;


export type ChannelElevatedAdapter = ChannelElevatedAdapter;


export type ChannelGatewayAdapter = ChannelGatewayAdapter<ResolvedAccount>;


export type ChannelGatewayContext = ChannelGatewayContext<ResolvedAccount>;


export type ChannelGroupAdapter = ChannelGroupAdapter;


export type ChannelGroupContext = ChannelGroupContext;


export type ChannelHeartbeatAdapter = ChannelHeartbeatAdapter;


export type ChannelHeartbeatDeps = ChannelHeartbeatDeps;


export type ChannelLifecycleAdapter = ChannelLifecycleAdapter;


export type ChannelLoginWithQrStartResult = ChannelLoginWithQrStartResult;


export type ChannelLoginWithQrWaitResult = ChannelLoginWithQrWaitResult;


export type ChannelLogoutContext = ChannelLogoutContext<ResolvedAccount>;


export type ChannelLogoutResult = ChannelLogoutResult;


export type ChannelLogSink = ChannelLogSink;


export type ChannelMentionAdapter = ChannelMentionAdapter;


export type ChannelMessageActionAdapter = ChannelMessageActionAdapter;


export type ChannelMessageActionContext = ChannelMessageActionContext;


export type ChannelMessageActionDiscoveryContext = ChannelMessageActionDiscoveryContext;


export type ChannelMessageActionName = "send" | "broadcast" | "poll" | "poll-vote" | "react" | "reactions" | "read" | "edit" | "unsend" | "reply" | "sendWithEffect" | "renameGroup" | "setGroupIcon" | "addParticipant" | "removeParticipant" | "leaveGroup" | "sendAttachment" | "delete" | "pin" | "unpin" | "list-pins" | "permissions" | "thread-create" | "thread-list" | "thread-reply" | "search" | "sticker" | "sticker-search" | "member-info" | "role-info" | "emoji-list" | "emoji-upload" | "sticker-upload" | "role-add" | "role-remove" | "channel-info" | "channel-list" | "channel-create" | "channel-edit" | "channel-delete" | "channel-move" | "category-create" | "category-edit" | "category-delete" | "topic-create" | "topic-edit" | "voice-status" | "event-list" | "event-create" | "timeout" | "kick" | "ban" | "set-profile" | "set-presence" | "download-file" | "upload-file";


export type ChannelMessageCapability = "interactive" | "buttons" | "cards" | "components" | "blocks";


export type ChannelMessageToolDiscovery = ChannelMessageToolDiscovery;


export type ChannelMessageToolSchemaContribution = ChannelMessageToolSchemaContribution;


export type ChannelMessagingAdapter = ChannelMessagingAdapter;


export type ChannelOutboundAdapter = ChannelOutboundAdapter;


export type ChannelOutboundContext = ChannelOutboundContext;


export type ChannelOutboundPayloadHint = ChannelOutboundPayloadHint;


export type ChannelOutboundTargetMode = ChannelOutboundTargetMode;


export type ChannelOutboundTargetRef = ChannelOutboundTargetRef;


export type ChannelPairingAdapter = ChannelPairingAdapter;


export type ChannelPlugin = ChannelPlugin<ResolvedAccount, Probe, Audit>;


export type ChannelPollContext = ChannelPollContext;


export type ChannelPollResult = ChannelPollResult;


export type ChannelResolveKind = ChannelResolveKind;


export type ChannelResolverAdapter = ChannelResolverAdapter;


export type ChannelResolveResult = ChannelResolveResult;


export type ChannelSecurityAdapter = ChannelSecurityAdapter<ResolvedAccount>;


export type ChannelSecurityContext = ChannelSecurityContext<ResolvedAccount>;


export type ChannelSecurityDmPolicy = ChannelSecurityDmPolicy;


export type ChannelSetupAdapter = ChannelSetupAdapter;


export type ChannelSetupInput = ChannelSetupInput;


export type ChannelStatusAdapter = ChannelStatusAdapter<ResolvedAccount, Probe, Audit>;


export type ChannelStatusIssue = ChannelStatusIssue;


export type ChannelStreamingAdapter = ChannelStreamingAdapter;


export type ChannelStructuredComponents = ChannelStructuredComponents;


export type ChannelThreadingAdapter = ChannelThreadingAdapter;


export type ChannelThreadingContext = ChannelThreadingContext;


export type ChannelThreadingToolContext = ChannelThreadingToolContext;


export type ChannelToolSend = ChannelToolSend;


export type CreateTypingCallbacksParams = CreateTypingCallbacksParams;


export type HeartbeatEventPayload = HeartbeatEventPayload;


export type HeartbeatIndicatorType = HeartbeatIndicatorType;


export type NormalizedPollInput = NormalizedPollInput;


export type ReplyPrefixContextBundle = ReplyPrefixContextBundle;


export type ReplyPrefixOptions = ReplyPrefixOptions;


export type ResolvedHeartbeatVisibility = ResolvedHeartbeatVisibility;


export type TransportReadyResult = TransportReadyResult;


export type TypingCallbacks = TypingCallbacks;


export type WaitForTransportReadyParams = WaitForTransportReadyParams;


export function createOptionalChannelSetupAdapter(params: OptionalChannelSetupParams): ChannelSetupAdapter;


export function createOptionalChannelSetupSurface(params: OptionalChannelSetupParams): OptionalChannelSetupSurface;


export function createOptionalChannelSetupWizard(params: OptionalChannelSetupParams): ChannelSetupWizard;


export function createTopLevelChannelDmPolicy(params: { label: string; channel: string; policyKey: string; allowFromKey: string; getCurrent: (cfg: OpenClawConfig) => DmPolicy; promptAllowFrom?: ((params: { cfg: OpenClawConfig; prompter: WizardPrompter; accountId?: string | undefined; }) => Promise<...>) | undefined; getAllowFrom?: ((cfg: OpenClawConfig) => (string | number)[] | undefined) | undefined; }): ChannelSetupDmPolicy;


export function formatDocsLink(path: string, label?: string | undefined, opts?: { fallback?: string | undefined; force?: boolean | undefined; } | undefined): string;


export function setSetupChannelEnabled(cfg: OpenClawConfig, channel: string, enabled: boolean): OpenClawConfig;


export function splitSetupEntries(raw: string): string[];


export const DEFAULT_ACCOUNT_ID: "default";


export type ChannelSetupAdapter = ChannelSetupAdapter;


export type ChannelSetupDmPolicy = ChannelSetupDmPolicy;


export type ChannelSetupInput = ChannelSetupInput;


export type ChannelSetupWizard = ChannelSetupWizard;


export type OptionalChannelSetupSurface = OptionalChannelSetupSurface;


export function buildCommandsMessage(cfg?: OpenClawConfig | undefined, skillCommands?: SkillCommandSpec[] | undefined, options?: CommandsMessageOptions | undefined): string;


export function buildCommandsMessagePaginated(cfg?: OpenClawConfig | undefined, skillCommands?: SkillCommandSpec[] | undefined, options?: CommandsMessageOptions | undefined): CommandsMessageResult;


export function buildCommandText(commandName: string, args?: string | undefined): string;


export function buildCommandTextFromArgs(command: ChatCommandDefinition, args?: CommandArgs | undefined): string;


export function buildHelpMessage(cfg?: OpenClawConfig | undefined): string;


export function buildModelsProviderData(cfg: OpenClawConfig, agentId?: string | undefined): Promise<ModelsProviderData>;


export function createPreCryptoDirectDmAuthorizer(params: { resolveAccess: (senderId: string) => Promise<ResolvedInboundDirectDmAccess | Pick<ResolvedInboundDirectDmAccess, "access">>; issuePairingChallenge?: ((params: { ...; }) => Promise<...>) | undefined; onBlocked?: ((params: { ...; }) => void) | undefined; }): (input: { ...; }) => Promise<...>;


export function findCommandByNativeName(name: string, provider?: string | undefined): ChatCommandDefinition | undefined;


export function formatModelsAvailableHeader(params: { provider: string; total: number; cfg: OpenClawConfig; agentDir?: string | undefined; sessionEntry?: SessionEntry | undefined; }): string;


export function getCommandDetection(_cfg?: OpenClawConfig | undefined): CommandDetection;


export function hasControlCommand(text?: string | undefined, cfg?: OpenClawConfig | undefined, options?: CommandNormalizeOptions | undefined): boolean;


export function hasInlineCommandTokens(text?: string | undefined): boolean;


export function isCommandEnabled(cfg: OpenClawConfig, commandKey: string): boolean;


export function isCommandMessage(raw: string): boolean;


export function isControlCommandMessage(text?: string | undefined, cfg?: OpenClawConfig | undefined, options?: CommandNormalizeOptions | undefined): boolean;


export function isNativeCommandSurface(surface?: string | undefined): boolean;


export function listChatCommands(params?: { skillCommands?: SkillCommandSpec[] | undefined; } | undefined): ChatCommandDefinition[];


export function listChatCommandsForConfig(cfg: OpenClawConfig, params?: { skillCommands?: SkillCommandSpec[] | undefined; } | undefined): ChatCommandDefinition[];


export function listNativeCommandSpecs(params?: { skillCommands?: SkillCommandSpec[] | undefined; provider?: string | undefined; } | undefined): NativeCommandSpec[];


export function listNativeCommandSpecsForConfig(cfg: OpenClawConfig, params?: { skillCommands?: SkillCommandSpec[] | undefined; provider?: string | undefined; } | undefined): NativeCommandSpec[];


export function listReservedChatSlashCommandNames(extraNames?: string[]): Set<string>;


export function listSkillCommandsForAgents(params: { cfg: OpenClawConfig; agentIds?: string[] | undefined; }): SkillCommandSpec[];


export function listSkillCommandsForWorkspace(params: { workspaceDir: string; cfg: OpenClawConfig; agentId?: string | undefined; skillFilter?: string[] | undefined; }): SkillCommandSpec[];


export function maybeResolveTextAlias(raw: string, cfg?: OpenClawConfig | undefined): string | null;


export function normalizeCommandBody(raw: string, options?: CommandNormalizeOptions | undefined): string;


export function parseCommandArgs(command: ChatCommandDefinition, raw?: string | undefined): CommandArgs | undefined;


export function resolveCommandArgChoices(params: { command: ChatCommandDefinition; arg: CommandArgDefinition; cfg?: OpenClawConfig | undefined; provider?: string | undefined; model?: string | undefined; }): ResolvedCommandArgChoice[];


export function resolveCommandArgMenu(params: { command: ChatCommandDefinition; args?: CommandArgs | undefined; cfg?: OpenClawConfig | undefined; }): { arg: CommandArgDefinition; choices: ResolvedCommandArgChoice[]; title?: string | undefined; } | null;


export function resolveCommandAuthorization(params: { ctx: MsgContext; cfg: OpenClawConfig; commandAuthorized: boolean; }): CommandAuthorization;


export function resolveCommandAuthorizedFromAuthorizers(params: { useAccessGroups: boolean; authorizers: CommandAuthorizer[]; modeWhenAccessGroupsOff?: CommandGatingModeWhenAccessGroupsOff | undefined; }): boolean;


export function resolveControlCommandGate(params: { useAccessGroups: boolean; authorizers: CommandAuthorizer[]; allowTextCommands: boolean; hasControlCommand: boolean; modeWhenAccessGroupsOff?: CommandGatingModeWhenAccessGroupsOff | undefined; }): { ...; };


export function resolveDirectDmAuthorizationOutcome(params: { isGroup: boolean; dmPolicy: string; senderAllowedForCommands: boolean; }): "disabled" | "unauthorized" | "allowed";


export function resolveDualTextControlCommandGate(params: { useAccessGroups: boolean; primaryConfigured: boolean; primaryAllowed: boolean; secondaryConfigured: boolean; secondaryAllowed: boolean; hasControlCommand: boolean; modeWhenAccessGroupsOff?: CommandGatingModeWhenAccessGroupsOff | undefined; }): { ...; };


export function resolveInboundDirectDmAccessWithRuntime(params: { cfg: OpenClawConfig; channel: ChannelId; accountId: string; dmPolicy?: string | null | undefined; allowFrom?: (string | number)[] | null | undefined; senderId: string; ... 4 more ...; readStoreAllowFrom?: ((provider: ChannelId, accountId: string) => Promise<...>) | undefined; }): Promise<...>;


export function resolveModelsCommandReply(params: { cfg: OpenClawConfig; commandBodyNormalized: string; surface?: string | undefined; currentModel?: string | undefined; agentId?: string | undefined; agentDir?: string | undefined; sessionEntry?: SessionEntry | undefined; }): Promise<...>;


export function resolveNativeCommandSessionTargets(params: ResolveNativeCommandSessionTargetsParams): { sessionKey: string; commandTargetSessionKey: string; };


export function resolveSenderCommandAuthorization(params: ResolveSenderCommandAuthorizationParams): Promise<{ shouldComputeAuth: boolean; effectiveAllowFrom: string[]; effectiveGroupAllowFrom: string[]; senderAllowedForCommands: boolean; commandAuthorized: boolean | undefined; }>;


export function resolveSenderCommandAuthorizationWithRuntime(params: ResolveSenderCommandAuthorizationWithRuntimeParams): Promise<{ shouldComputeAuth: boolean; effectiveAllowFrom: string[]; effectiveGroupAllowFrom: string[]; senderAllowedForCommands: boolean; commandAuthorized: boolean | undefined; }>;


export function resolveSkillCommandInvocation(params: { commandBodyNormalized: string; skillCommands: SkillCommandSpec[]; }): { command: SkillCommandSpec; args?: string | undefined; } | null;


export function resolveStoredModelOverride(params: { sessionEntry?: SessionEntry | undefined; sessionStore?: Record<string, SessionEntry> | undefined; sessionKey?: string | undefined; parentSessionKey?: string | undefined; defaultProvider: string; }): StoredModelOverride | null;


export function resolveTextCommand(raw: string, cfg?: OpenClawConfig | undefined): { command: ChatCommandDefinition; args?: string | undefined; } | null;


export function serializeCommandArgs(command: ChatCommandDefinition, args?: CommandArgs | undefined): string | undefined;


export function shouldComputeCommandAuthorized(text?: string | undefined, cfg?: OpenClawConfig | undefined, options?: CommandNormalizeOptions | undefined): boolean;


export function shouldHandleTextCommands(params: ShouldHandleTextCommandsParams): boolean;


export type ChatCommandDefinition = ChatCommandDefinition;


export type CommandArgChoiceContext = CommandArgChoiceContext;


export type CommandArgDefinition = CommandArgDefinition;


export type CommandArgMenuSpec = CommandArgMenuSpec;


export type CommandArgsParsing = CommandArgsParsing;


export type CommandArgValues = CommandArgValues;


export type CommandAuthorization = CommandAuthorization;


export type CommandAuthorizationRuntime = CommandAuthorizationRuntime;


export type CommandAuthorizer = CommandAuthorizer;


export type CommandDetection = CommandDetection;


export type CommandGatingModeWhenAccessGroupsOff = CommandGatingModeWhenAccessGroupsOff;


export type CommandNormalizeOptions = CommandNormalizeOptions;


export type CommandScope = CommandScope;


export type DirectDmCommandAuthorizationRuntime = DirectDmCommandAuthorizationRuntime;


export type ModelsProviderData = ModelsProviderData;


export type NativeCommandSpec = NativeCommandSpec;


export type ResolvedCommandArgChoice = ResolvedCommandArgChoice;


export type ResolvedInboundDirectDmAccess = ResolvedInboundDirectDmAccess;


export type ResolveNativeCommandSessionTargetsParams = ResolveNativeCommandSessionTargetsParams;


export type ResolveSenderCommandAuthorizationParams = ResolveSenderCommandAuthorizationParams;


export type ResolveSenderCommandAuthorizationWithRuntimeParams = ResolveSenderCommandAuthorizationWithRuntimeParams;


export type ShouldHandleTextCommandsParams = ShouldHandleTextCommandsParams;


export type SkillCommandSpec = SkillCommandSpec;


export type StoredModelOverride = StoredModelOverride;


export function applyAccountNameToChannelSection(params: { cfg: OpenClawConfig; channelKey: string; accountId: string; name?: string | undefined; alwaysUseAccounts?: boolean | undefined; }): OpenClawConfig;


export function buildAgentSessionKey(params: { agentId: string; channel: string; accountId?: string | null | undefined; peer?: RoutePeer | null | undefined; dmScope?: "main" | "per-peer" | "per-channel-peer" | "per-account-channel-peer" | undefined; identityLinks?: Record<...> | undefined; }): string;


export function buildChannelConfigSchema(schema: ZodType<unknown, unknown, $ZodTypeInternals<unknown, unknown>>, options?: BuildChannelConfigSchemaOptions | undefined): ChannelConfigSchema;


export function buildChannelOutboundSessionRoute(params: { cfg: OpenClawConfig; agentId: string; channel: string; accountId?: string | null | undefined; peer: { kind: "direct" | "group" | "channel"; id: string; }; chatType: "direct" | "group" | "channel"; from: string; to: string; threadId?: string | ... 1 more ... | undefined; }): ChannelOutboundSessionRoute;


export function buildPluginConfigSchema(schema: ZodType<unknown, unknown, $ZodTypeInternals<unknown, unknown>>, options?: BuildPluginConfigSchemaOptions | undefined): OpenClawPluginConfigSchema;


export function channelTargetSchema(options?: { description?: string | undefined; } | undefined): TString;


export function channelTargetsSchema(options?: { description?: string | undefined; } | undefined): TArray<TString>;


export function clearAccountEntryFields<TAccountEntry extends object>(params: { accounts?: Record<string, TAccountEntry> | undefined; accountId: string; fields: string[]; isValueSet?: ((value: unknown) => boolean) | undefined; markClearedOnFieldPresence?: boolean | undefined; }): { ...; };


export function createChannelPluginBase<TResolvedAccount>(params: CreateChannelPluginBaseOptions<TResolvedAccount>): CreatedChannelPluginBase<TResolvedAccount>;


export function createChatChannelPlugin<TResolvedAccount extends { accountId?: string | null; }, Probe = unknown, Audit = unknown>(params: { base: ChatChannelPluginBase<TResolvedAccount, Probe, Audit>; security?: ChannelSecurityAdapter<TResolvedAccount> | ChatChannelSecurityOptions<...> | undefined; pairing?: ChannelPairingAdapter | ... 1 more ... | undefined; threading?: ChannelThreadingAdapter | ... 1 more ... | undefined; outbound?: ChannelOutboundAdapter | ... 1 more ... | undefined; }): ChannelPlugin<...>;


export function createDedupeCache(options: DedupeCacheOptions): DedupeCache;


export function createSubsystemLogger(subsystem: string): SubsystemLogger;


export function defineChannelPluginEntry<TPlugin>({ id, name, description, plugin, configSchema, setRuntime, registerCliMetadata, registerFull, }: DefineChannelPluginEntryOptions<TPlugin>): DefinedChannelPluginEntry<TPlugin>;


export function definePluginEntry({ id, name, description, kind, configSchema, register, }: DefinePluginEntryOptions): DefinedPluginEntry;


export function defineSetupPluginEntry<TPlugin>(plugin: TPlugin): { plugin: TPlugin; };


export function delegateCompactionToRuntime(params: { sessionId: string; sessionKey?: string | undefined; sessionFile: string; tokenBudget?: number | undefined; force?: boolean | undefined; currentTokenCount?: number | undefined; compactionTarget?: "budget" | ... 1 more ... | undefined; customInstructions?: string | undefined; runtimeContext?: ContextEngineRuntimeContext | undefined; }): Promise<...>;


export function deleteAccountFromConfigSection(params: { cfg: OpenClawConfig; sectionKey: string; accountId: string; clearBaseFields?: string[] | undefined; }): OpenClawConfig;


export function emptyPluginConfigSchema(): OpenClawPluginConfigSchema;


export function enqueueKeyedTask<T>(params: { tails: Map<string, Promise<void>>; key: string; task: () => Promise<T>; hooks?: KeyedAsyncQueueHooks | undefined; }): Promise<...>;


export function formatPairingApproveHint(channelId: string): string;


export function generateSecureToken(bytes?: number): string;


export function generateSecureUuid(): string;


export function getChatChannelMeta(id: "telegram" | "whatsapp" | "discord" | "irc" | "googlechat" | "slack" | "signal" | "imessage" | "line"): ChannelMeta;


export function isSecretRef(value: unknown): value is SecretRef;


export function loadSecretFileSync(filePath: string, label: string, options?: SecretFileReadOptions): SecretFileReadResult;


export function migrateBaseNameToDefaultAccount(params: { cfg: OpenClawConfig; channelKey: string; alwaysUseAccounts?: boolean | undefined; }): OpenClawConfig;


export function normalizeAccountId(value: string | null | undefined): string;


export function normalizeAtHashSlug(raw?: string | null | undefined): string;


export function normalizeHyphenSlug(raw?: string | null | undefined): string;


export function optionalStringEnum<T extends readonly string[]>(values: T, options?: StringEnumOptions<T>): TOptional<TUnsafe<T[number]>>;


export function parseOptionalDelimitedEntries(value?: string | undefined): string[] | undefined;


export function readSecretFileSync(filePath: string, label: string, options?: SecretFileReadOptions): string;


export function resolveGatewayBindUrl(params: { bind?: string | undefined; customBindHost?: string | undefined; scheme: "ws" | "wss"; port: number; pickTailnetHost: () => string | null; pickLanHost: () => string | null; }): GatewayBindUrlResult;


export function resolveGatewayPort(cfg?: OpenClawConfig | undefined, env?: ProcessEnv): number;


export function resolveGlobalDedupeCache(key: symbol, options: DedupeCacheOptions): DedupeCache;


export function resolveTailnetHostWithRunner(runCommandWithTimeout?: TailscaleStatusCommandRunner | undefined): Promise<string | null>;


export function resolveThreadSessionKeys(params: { baseSessionKey: string; threadId?: string | null | undefined; parentSessionKey?: string | undefined; useSuffix?: boolean | undefined; normalizeThreadId?: ((threadId: string) => string) | undefined; }): { ...; };


export function setAccountEnabledInConfigSection(params: { cfg: OpenClawConfig; sectionKey: string; accountId: string; enabled: boolean; allowTopLevel?: boolean | undefined; }): OpenClawConfig;


export function stringEnum<T extends readonly string[]>(values: T, options?: StringEnumOptions<T>): TUnsafe<T[number]>;


export function stripChannelTargetPrefix(raw: string, ...providers: string[]): string;


export function stripTargetKindPrefix(raw: string): string;


export function tryReadSecretFileSync(filePath: string | undefined, label: string, options?: SecretFileReadOptions): string | undefined;


export const DEFAULT_ACCOUNT_ID: "default";


export const DEFAULT_SECRET_FILE_MAX_BYTES: number;


export type AnyAgentTool = AnyAgentTool;


export type ChannelConfigUiHint = ChannelConfigUiHint;


export type ChannelMessageActionContext = ChannelMessageActionContext;


export type ChannelMessagingAdapter = ChannelMessagingAdapter;


export type ChannelOutboundSessionRoute = ChannelOutboundSessionRoute;


export type ChannelOutboundSessionRouteParams = {    cfg: OpenClawConfig;    agentId: string;    accountId?: string | null;    target: string;    resolvedTarget?: {        to: string;        kind: import("../channels/plugins/types.core.js").ChannelDirectoryEntryKind | "channel";        display?: string;        source: "normalized" | "directory";    };    replyToId?: string | null;    threadId?: string | number | null;};


export type ChannelPlugin = ChannelPlugin<ResolvedAccount, Probe, Audit>;


export type GatewayBindUrlResult = GatewayBindUrlResult;


export type GatewayRequestHandlerOptions = GatewayRequestHandlerOptions;


export type MediaUnderstandingProviderPlugin = MediaUnderstandingProvider;


export type OpenClawConfig = OpenClawConfig;


export type OpenClawPluginApi = OpenClawPluginApi;


export type OpenClawPluginCommandDefinition = OpenClawPluginCommandDefinition;


export type OpenClawPluginConfigSchema = OpenClawPluginConfigSchema;


export type OpenClawPluginDefinition = OpenClawPluginDefinition;


export type OpenClawPluginService = OpenClawPluginService;


export type OpenClawPluginServiceContext = OpenClawPluginServiceContext;


export type OpenClawPluginToolContext = OpenClawPluginToolContext;


export type OpenClawPluginToolFactory = OpenClawPluginToolFactory;


export type PluginCommandContext = PluginCommandContext;


export type PluginLogger = PluginLogger;


export type PluginRuntime = PluginRuntime;


export type ProviderAugmentModelCatalogContext = ProviderAugmentModelCatalogContext;


export type ProviderAuthContext = ProviderAuthContext;


export type ProviderAuthDoctorHintContext = ProviderAuthDoctorHintContext;


export type ProviderAuthMethod = ProviderAuthMethod;


export type ProviderAuthMethodNonInteractiveContext = ProviderAuthMethodNonInteractiveContext;


export type ProviderAuthResult = ProviderAuthResult;


export type ProviderBuildMissingAuthMessageContext = ProviderBuildMissingAuthMessageContext;


export type ProviderBuildUnknownModelHintContext = ProviderBuildUnknownModelHintContext;


export type ProviderBuiltInModelSuppressionContext = ProviderBuiltInModelSuppressionContext;


export type ProviderBuiltInModelSuppressionResult = ProviderBuiltInModelSuppressionResult;


export type ProviderCacheTtlEligibilityContext = ProviderCacheTtlEligibilityContext;


export type ProviderCatalogContext = ProviderCatalogContext;


export type ProviderCatalogResult = ProviderCatalogResult;


export type ProviderDefaultThinkingPolicyContext = ProviderDefaultThinkingPolicyContext;


export type ProviderDiscoveryContext = ProviderCatalogContext;


export type ProviderFetchUsageSnapshotContext = ProviderFetchUsageSnapshotContext;


export type ProviderModernModelPolicyContext = ProviderModernModelPolicyContext;


export type ProviderNormalizeResolvedModelContext = ProviderNormalizeResolvedModelContext;


export type ProviderNormalizeToolSchemasContext = ProviderNormalizeToolSchemasContext;


export type ProviderPreparedRuntimeAuth = ProviderPreparedRuntimeAuth;


export type ProviderPrepareDynamicModelContext = ProviderResolveDynamicModelContext;


export type ProviderPrepareExtraParamsContext = ProviderPrepareExtraParamsContext;


export type ProviderPrepareRuntimeAuthContext = ProviderPrepareRuntimeAuthContext;


export type ProviderReasoningOutputMode = ProviderReasoningOutputMode;


export type ProviderReasoningOutputModeContext = ProviderReplayPolicyContext;


export type ProviderReplayPolicy = ProviderReplayPolicy;


export type ProviderReplayPolicyContext = ProviderReplayPolicyContext;


export type ProviderReplaySessionEntry = ProviderReplaySessionEntry;


export type ProviderReplaySessionState = ProviderReplaySessionState;


export type ProviderResolvedUsageAuth = ProviderResolvedUsageAuth;


export type ProviderResolveDynamicModelContext = ProviderResolveDynamicModelContext;


export type ProviderResolveUsageAuthContext = ProviderResolveUsageAuthContext;


export type ProviderRuntimeModel = ProviderRuntimeModel;


export type ProviderSanitizeReplayHistoryContext = ProviderSanitizeReplayHistoryContext;


export type ProviderThinkingPolicyContext = ProviderThinkingPolicyContext;


export type ProviderToolSchemaDiagnostic = ProviderToolSchemaDiagnostic;


export type ProviderUsageSnapshot = ProviderUsageSnapshot;


export type ProviderValidateReplayTurnsContext = ProviderValidateReplayTurnsContext;


export type ProviderWrapStreamFnContext = ProviderWrapStreamFnContext;


export type SecretFileReadOptions = SecretFileReadOptions;


export type SecretFileReadResult = SecretFileReadResult;


export type SpeechProviderPlugin = SpeechProviderPlugin;


export type TailscaleStatusCommandResult = TailscaleStatusCommandResult;


export type TailscaleStatusCommandRunner = TailscaleStatusCommandRunner;


export type UsageProviderId = UsageProviderId;


export function definePluginEntry({ id, name, description, kind, configSchema, register, }: DefinePluginEntryOptions): DefinedPluginEntry;


export function emptyPluginConfigSchema(): OpenClawPluginConfigSchema;


export type AnyAgentTool = AnyAgentTool;


export type MediaUnderstandingProviderPlugin = MediaUnderstandingProvider;


export type OpenClawConfig = OpenClawConfig;


export type OpenClawPluginApi = OpenClawPluginApi;


export type OpenClawPluginCommandDefinition = OpenClawPluginCommandDefinition;


export type OpenClawPluginConfigSchema = OpenClawPluginConfigSchema;


export type OpenClawPluginDefinition = OpenClawPluginDefinition;


export type OpenClawPluginService = OpenClawPluginService;


export type OpenClawPluginServiceContext = OpenClawPluginServiceContext;


export type OpenClawPluginToolContext = OpenClawPluginToolContext;


export type OpenClawPluginToolFactory = OpenClawPluginToolFactory;


export type PluginCommandContext = PluginCommandContext;


export type PluginLogger = PluginLogger;


export type ProviderAugmentModelCatalogContext = ProviderAugmentModelCatalogContext;


export type ProviderAuthContext = ProviderAuthContext;


export type ProviderAuthDoctorHintContext = ProviderAuthDoctorHintContext;


export type ProviderAuthMethod = ProviderAuthMethod;


export type ProviderAuthMethodNonInteractiveContext = ProviderAuthMethodNonInteractiveContext;


export type ProviderAuthResult = ProviderAuthResult;


export type ProviderBuildMissingAuthMessageContext = ProviderBuildMissingAuthMessageContext;


export type ProviderBuildUnknownModelHintContext = ProviderBuildUnknownModelHintContext;


export type ProviderBuiltInModelSuppressionContext = ProviderBuiltInModelSuppressionContext;


export type ProviderBuiltInModelSuppressionResult = ProviderBuiltInModelSuppressionResult;


export type ProviderCacheTtlEligibilityContext = ProviderCacheTtlEligibilityContext;


export type ProviderCatalogContext = ProviderCatalogContext;


export type ProviderCatalogResult = ProviderCatalogResult;


export type ProviderDefaultThinkingPolicyContext = ProviderDefaultThinkingPolicyContext;


export type ProviderDeferSyntheticProfileAuthContext = ProviderDeferSyntheticProfileAuthContext;


export type ProviderDiscoveryContext = ProviderCatalogContext;


export type ProviderFetchUsageSnapshotContext = ProviderFetchUsageSnapshotContext;


export type ProviderModernModelPolicyContext = ProviderModernModelPolicyContext;


export type ProviderNormalizeConfigContext = ProviderNormalizeConfigContext;


export type ProviderNormalizeModelIdContext = ProviderNormalizeModelIdContext;


export type ProviderNormalizeResolvedModelContext = ProviderNormalizeResolvedModelContext;


export type ProviderNormalizeToolSchemasContext = ProviderNormalizeToolSchemasContext;


export type ProviderNormalizeTransportContext = ProviderNormalizeTransportContext;


export type ProviderPreparedRuntimeAuth = ProviderPreparedRuntimeAuth;


export type ProviderPrepareDynamicModelContext = ProviderResolveDynamicModelContext;


export type ProviderPrepareExtraParamsContext = ProviderPrepareExtraParamsContext;


export type ProviderPrepareRuntimeAuthContext = ProviderPrepareRuntimeAuthContext;


export type ProviderReasoningOutputMode = ProviderReasoningOutputMode;


export type ProviderReasoningOutputModeContext = ProviderReplayPolicyContext;


export type ProviderReplayPolicy = ProviderReplayPolicy;


export type ProviderReplayPolicyContext = ProviderReplayPolicyContext;


export type ProviderReplaySessionEntry = ProviderReplaySessionEntry;


export type ProviderReplaySessionState = ProviderReplaySessionState;


export type ProviderResolveConfigApiKeyContext = ProviderResolveConfigApiKeyContext;


export type ProviderResolvedUsageAuth = ProviderResolvedUsageAuth;


export type ProviderResolveDynamicModelContext = ProviderResolveDynamicModelContext;


export type ProviderResolveUsageAuthContext = ProviderResolveUsageAuthContext;


export type ProviderRuntimeModel = ProviderRuntimeModel;


export type ProviderSanitizeReplayHistoryContext = ProviderSanitizeReplayHistoryContext;


export type ProviderThinkingPolicyContext = ProviderThinkingPolicyContext;


export type ProviderToolSchemaDiagnostic = ProviderToolSchemaDiagnostic;


export type ProviderValidateReplayTurnsContext = ProviderValidateReplayTurnsContext;


export type ProviderWrapStreamFnContext = ProviderWrapStreamFnContext;


export type SpeechProviderPlugin = SpeechProviderPlugin;


export function applyAgentDefaultModelPrimary(cfg: OpenClawConfig, primary: string): OpenClawConfig;


export function applyOnboardAuthAgentModelsAndProviders(cfg: OpenClawConfig, params: { agentModels: Record<string, AgentModelEntryConfig>; providers: Record<string, ModelProviderConfig>; }): OpenClawConfig;


export function applyProviderConfigWithDefaultModel(cfg: OpenClawConfig, params: { agentModels: Record<string, AgentModelEntryConfig>; providerId: string; api: "github-copilot" | "openai-completions" | ... 6 more ... | "azure-openai-responses"; baseUrl: string; defaultModel: ModelDefinitionConfig; defaultModelId?: string | undefined; }): OpenClawConfig;


export function applyProviderConfigWithDefaultModelPreset(cfg: OpenClawConfig, params: { providerId: string; api: "github-copilot" | "openai-completions" | "openai-responses" | "openai-codex-responses" | "anthropic-messages" | "google-generative-ai" | "bedrock-converse-stream" | "ollama" | "azure-openai-responses"; ... 4 more ...; primaryModelRef?: string | undefined; }): OpenClawConfig;


export function applyProviderConfigWithDefaultModels(cfg: OpenClawConfig, params: { agentModels: Record<string, AgentModelEntryConfig>; providerId: string; api: "github-copilot" | "openai-completions" | ... 6 more ... | "azure-openai-responses"; baseUrl: string; defaultModels: ModelDefinitionConfig[]; defaultModelId?: string | undefined; }): OpenClawConfig;


export function applyProviderConfigWithDefaultModelsPreset(cfg: OpenClawConfig, params: { providerId: string; api: "github-copilot" | "openai-completions" | "openai-responses" | "openai-codex-responses" | "anthropic-messages" | "google-generative-ai" | "bedrock-converse-stream" | "ollama" | "azure-openai-responses"; ... 4 more ...; primaryModelRef?: string | undefined; }): OpenClawConfig;


export function applyProviderConfigWithModelCatalog(cfg: OpenClawConfig, params: { agentModels: Record<string, AgentModelEntryConfig>; providerId: string; api: "github-copilot" | "openai-completions" | ... 6 more ... | "azure-openai-responses"; baseUrl: string; catalogModels: ModelDefinitionConfig[]; }): OpenClawConfig;


export function applyProviderConfigWithModelCatalogPreset(cfg: OpenClawConfig, params: { providerId: string; api: "github-copilot" | "openai-completions" | "openai-responses" | "openai-codex-responses" | "anthropic-messages" | "google-generative-ai" | "bedrock-converse-stream" | "ollama" | "azure-openai-responses"; baseUrl: string; catalogModels: ModelDefinitionConfig[]; aliases?: readonly AgentModelAliasEntry[] | undefined; primaryModelRef?: string | undefined; }): OpenClawConfig;


export function createDefaultModelPresetAppliers<TArgs extends unknown[]>(params: { resolveParams: (cfg: OpenClawConfig, ...args: TArgs) => Omit<{ providerId: string; api: "github-copilot" | "openai-completions" | "openai-responses" | ... 5 more ... | "azure-openai-responses"; ... 4 more ...; primaryModelRef?: string | undefined; }, "primaryModelRef"> | null | undefined; primaryModelRef: string; }): ProviderOnboardPresetAppliers<...>;


export function createDefaultModelsPresetAppliers<TArgs extends unknown[]>(params: { resolveParams: (cfg: OpenClawConfig, ...args: TArgs) => Omit<{ providerId: string; api: "github-copilot" | "openai-completions" | "openai-responses" | ... 5 more ... | "azure-openai-responses"; ... 4 more ...; primaryModelRef?: string | undefined; }, "primaryModelRef"> | null | undefined; primaryModelRef: string; }): ProviderOnboardPresetAppliers<...>;


export function createModelCatalogPresetAppliers<TArgs extends unknown[]>(params: { resolveParams: (cfg: OpenClawConfig, ...args: TArgs) => Omit<{ providerId: string; api: "github-copilot" | "openai-completions" | "openai-responses" | ... 5 more ... | "azure-openai-responses"; baseUrl: string; catalogModels: ModelDefinitionConfig[]; aliases?: readonly AgentModelAliasEntry[] | undefined; primaryModelRef?: string | undefined; }, "primaryModelRef"> | null | undefined; primaryModelRef: string; }): ProviderOnboardPresetAppliers<...>;


export function ensureModelAllowlistEntry(params: { cfg: OpenClawConfig; modelRef: string; defaultProvider?: string | undefined; }): OpenClawConfig;


export function resolveAgentModelFallbackValues(model?: AgentModelConfig | undefined): string[];


export function resolveAgentModelPrimaryValue(model?: AgentModelConfig | undefined): string | undefined;


export function withAgentModelAliases(existing: Record<string, AgentModelEntryConfig> | undefined, aliases: readonly AgentModelAliasEntry[]): Record<string, AgentModelEntryConfig>;


export type AgentModelAliasEntry = AgentModelAliasEntry;


export type ModelApi = "github-copilot" | "openai-completions" | "openai-responses" | "openai-codex-responses" | "anthropic-messages" | "google-generative-ai" | "bedrock-converse-stream" | "ollama" | "azure-openai-responses";


export type ModelDefinitionConfig = ModelDefinitionConfig;


export type ModelProviderConfig = ModelProviderConfig;


export type OpenClawConfig = OpenClawConfig;


export type ProviderOnboardPresetAppliers = ProviderOnboardPresetAppliers<TArgs>;


export function buildMediaPayload(mediaList: MediaPayloadInput[], opts?: { preserveMediaTypeCardinality?: boolean | undefined; } | undefined): MediaPayload;


export function countOutboundMedia(payload: { mediaUrls?: string[] | undefined; mediaUrl?: string | undefined; }): number;


export function createNormalizedOutboundDeliverer(handler: (payload: OutboundReplyPayload) => Promise<void>): (payload: unknown) => Promise<void>;


export function deliverFormattedTextWithAttachments(params: { payload: OutboundReplyPayload; send: (params: { text: string; replyToId?: string | undefined; }) => Promise<void>; }): Promise<boolean>;


export function deliverTextOrMediaReply(params: { payload: OutboundReplyPayload; text: string; chunkText?: ((text: string) => readonly string[]) | undefined; sendText: (text: string) => Promise<void>; sendMedia: (payload: { ...; }) => Promise<...>; onMediaError?: ((params: { ...; }) => void | Promise<...>) | undefined; }): Promise<...>;


export function formatTextWithAttachmentLinks(text: string | undefined, mediaUrls: string[]): string;


export function hasOutboundMedia(payload: { mediaUrls?: string[] | undefined; mediaUrl?: string | undefined; }): boolean;


export function hasOutboundReplyContent(payload: { text?: string | undefined; mediaUrls?: string[] | undefined; mediaUrl?: string | undefined; }, options?: { trimText?: boolean | undefined; } | undefined): boolean;


export function hasOutboundText(payload: { text?: string | undefined; }, options?: { trim?: boolean | undefined; } | undefined): boolean;


export function isNumericTargetId(raw: string): boolean;


export function normalizeOutboundReplyPayload(payload: Record<string, unknown>): OutboundReplyPayload;


export function resolveOutboundMediaUrls(payload: { mediaUrls?: string[] | undefined; mediaUrl?: string | undefined; }): string[];


export function resolvePayloadMediaUrls(payload: ReplyPayload): string[];


export function resolveSendableOutboundReplyParts(payload: { text?: string | undefined; mediaUrls?: string[] | undefined; mediaUrl?: string | undefined; }, options?: { text?: string | undefined; } | undefined): SendableOutboundReplyParts;


export function resolveTextChunksWithFallback(text: string, chunks: readonly string[]): string[];


export function sendMediaWithLeadingCaption(params: { mediaUrls: string[]; caption: string; send: (payload: { mediaUrl: string; caption?: string | undefined; }) => Promise<void>; onError?: ((params: { error: unknown; mediaUrl: string; caption?: string | undefined; index: number; isFirst: boolean; }) => void | Promise<...>) | undefined; }): Promise<...>;


export function sendPayloadMediaSequence<TResult>(params: { text: string; mediaUrls: readonly string[]; send: (input: { text: string; mediaUrl: string; index: number; isFirst: boolean; }) => Promise<TResult>; }): Promise<TResult | undefined>;


export function sendPayloadMediaSequenceAndFinalize<TMediaResult, TResult>(params: { text: string; mediaUrls: readonly string[]; send: (input: { text: string; mediaUrl: string; index: number; isFirst: boolean; }) => Promise<TMediaResult>; finalize: () => Promise<TResult>; }): Promise<...>;


export function sendPayloadMediaSequenceOrFallback<TResult>(params: { text: string; mediaUrls: readonly string[]; send: (input: { text: string; mediaUrl: string; index: number; isFirst: boolean; }) => Promise<TResult>; fallbackResult: TResult; sendNoMedia?: (() => Promise<...>) | undefined; }): Promise<...>;


export function sendPayloadWithChunkedTextAndMedia<TContext extends { payload: object; }, TResult>(params: { ctx: TContext; textChunkLimit?: number | undefined; chunker?: ((text: string, limit: number) => string[]) | null | undefined; sendText: (ctx: TContext & { ...; }) => Promise<...>; sendMedia: (ctx: TContext & { ...; }) => Promise<...>; emptyResult: TResult; }): Promise<...>;


export function sendTextMediaPayload(params: { channel: string; ctx: ChannelOutboundPayloadContext; adapter: SendPayloadAdapter; }): Promise<OutboundDeliveryResult>;


export type MediaPayload = MediaPayload;


export type MediaPayloadInput = MediaPayloadInput;


export type OutboundReplyPayload = OutboundReplyPayload;


export type SendableOutboundReplyParts = SendableOutboundReplyParts;


export function createPluginRuntimeStore<T>(errorMessage: string): { setRuntime: (next: T) => void; clearRuntime: () => void; tryGetRuntime: () => T | null; getRuntime: () => T; };


export type PluginRuntime = PluginRuntime;


export function buildOptionalSecretInputSchema(): ZodOptional<ZodUnion<readonly [ZodString, ZodDiscriminatedUnion<[ZodObject<{ source: ZodLiteral<"env">; provider: ZodString; id: ZodString; }, $strip>, ZodObject<...>, ZodObject<...>], "source">]>>;


export function buildSecretInputArraySchema(): ZodArray<ZodUnion<readonly [ZodString, ZodDiscriminatedUnion<[ZodObject<{ source: ZodLiteral<"env">; provider: ZodString; id: ZodString; }, $strip>, ZodObject<...>, ZodObject<...>], "source">]>>;


export function buildSecretInputSchema(): ZodUnion<readonly [ZodString, ZodDiscriminatedUnion<[ZodObject<{ source: ZodLiteral<"env">; provider: ZodString; id: ZodString; }, $strip>, ZodObject<...>, ZodObject<...>], "source">]>;


export function hasConfiguredSecretInput(value: unknown, defaults?: SecretDefaults | undefined): boolean;


export function normalizeResolvedSecretInputString(params: { value: unknown; refValue?: unknown; defaults?: SecretDefaults | undefined; path: string; }): string | undefined;


export function normalizeSecretInput(value: unknown): string;


export function normalizeSecretInputString(value: unknown): string | undefined;


export function buildCommandTestParams(commandBody: string, cfg: OpenClawConfig, ctxOverrides?: Partial<MsgContext> | undefined): HandleCommandsParams;


export function buildDispatchInboundCaptureMock<T extends Record<string, unknown>>(actual: T, setCtx: (ctx: unknown) => void): T & { dispatchInboundMessage: Mock<(params: { ctx: unknown; }) => Promise<{ queuedFinal: boolean; counts: { tool: number; block: number; final: number; }; }>>; dispatchInboundMessageWithDispatcher: Mock<...>; dispatchInboundMessageWithBufferedDispatcher: Mock<...>; };


export function callGateway<T = Record<string, unknown>>(opts: CallGatewayOptions): Promise<T>;


export function captureEnv(keys: string[]): { restore(): void; };


export function capturePluginRegistration(params: { register(api: OpenClawPluginApi): void; }): CapturedPluginRegistration;


export function countLines(text: string): number;


export function createAuthCaptureJsonFetch(responseBody: unknown): { fetchFn: ((_input: RequestInfo | URL, init?: RequestInit | undefined) => Promise<Response>) & FetchWithPreconnect; getAuthHeader: () => string | null; };


export function createCliRuntimeCapture(): CliRuntimeCapture;


export function createEmptyPluginRegistry(): PluginRegistry;


export function createRequestCaptureJsonFetch(responseBody: unknown): { fetchFn: ((input: RequestInfo | URL, init?: RequestInit | undefined) => Promise<Response>) & FetchWithPreconnect; getRequest: () => { ...; }; };


export function createSandboxTestContext(params?: { overrides?: Partial<SandboxContext> | undefined; dockerOverrides?: Partial<SandboxDockerConfig> | undefined; } | undefined): SandboxContext;


export function createSlackOutboundPayloadHarness(params: { payload: ReplyPayload; sendResults?: { messageId: string; }[] | undefined; }): SlackOutboundPayloadHarness;


export function createTempHomeEnv(prefix: string): Promise<TempHomeEnv>;


export function createWhatsAppPollFixture(): { cfg: OpenClawConfig; poll: { question: string; options: string[]; maxSelections: number; }; to: string; accountId: string; };


export function createWindowsCmdShimFixture(params: { shimPath: string; scriptPath: string; shimLine: string; }): Promise<void>;


export function expectChannelInboundContextContract(ctx: MsgContext): void;


export function expectGeneratedTokenPersistedToGatewayAuth(params: { generatedToken?: string | undefined; authToken?: string | undefined; persistedConfig?: OpenClawConfig | undefined; }): void;


export function expectWhatsAppPollSent(sendPollWhatsApp: MockInstance<Procedure>, params: { cfg: OpenClawConfig; poll: { question: string; options: string[]; maxSelections: number; }; to?: string | undefined; accountId?: string | undefined; }): void;


export function firstWrittenJsonArg<T>(writeJson: MockCallsWithFirstArg): T | null;


export function getActivePluginRegistry(): PluginRegistry | null;


export function hasBalancedFences(chunk: string): boolean;


export function installCommonResolveTargetErrorCases(params: { resolveTarget: ResolveTargetFn; implicitAllowFrom: string[]; }): void;


export function installPinnedHostnameTestHooks(): void;


export function isLiveTestEnabled(extraEnvVars?: readonly string[], env?: ProcessEnv): boolean;


export function jsonResponse(body: unknown, status?: number): Response;


export function loadBundledPluginPublicSurfaceSync<T extends object>(params: { pluginId: string; artifactBasename: string; }): T;


export function loadBundledPluginTestApiSync<T extends object>(pluginId: string): T;


export function mockPinnedHostnameResolution(addresses?: string[]): Mock<(hostname: string, lookupFn?: { (hostname: string, family: number): Promise<LookupAddress>; (hostname: string, options: LookupOneOptions): Promise<...>; (hostname: string, options: LookupAllOptions): Promise<...>; (hostname: string, options: LookupOptions): Promise<...>; (hostname: string): Promise<...>; }) => Promise<...>>;


export function peekSystemEvents(sessionKey: string): string[];


export function primeChannelOutboundSendMock<TArgs extends unknown[]>(sendMock: Mock<(...args: TArgs) => Promise<unknown>>, fallbackResult: Record<string, unknown>, sendResults?: Record<string, unknown>[]): void;


export function removeAckReactionAfterReply(params: { removeAfterReply: boolean; ackReactionPromise: Promise<boolean> | null; ackReactionValue: string | null; remove: () => Promise<void>; onError?: ((err: unknown) => void) | undefined; }): void;


export function requestBodyText(body: BodyInit | null | undefined): string;


export function requestUrl(input: string | Request | URL): string;


export function resetPluginRuntimeStateForTest(): void;


export function resetSystemEventsForTest(): void;


export function resolveProviderPluginChoice(params: { providers: ProviderPlugin[]; choice: string; }): { provider: ProviderPlugin; method: ProviderAuthMethod; wizard?: ProviderPluginWizardSetup | undefined; } | null;


export function resolveRelativeBundledPluginPublicModuleId(params: { fromModuleUrl: string; pluginId: string; artifactBasename: string; }): string;


export function runAcpRuntimeAdapterContract(params: AcpRuntimeAdapterContractParams): Promise<void>;


export function sanitizeTerminalText(input: string): string;


export function setActivePluginRegistry(registry: PluginRegistry, cacheKey?: string | undefined, runtimeSubagentMode?: "default" | "explicit" | "gateway-bindable"): void;


export function setDefaultChannelPluginRegistryForTests(): void;


export function shouldAckReaction(params: AckReactionGateParams): boolean;


export function spyRuntimeErrors(runtime: Pick<OutputRuntimeEnv, "error">): Mock<(...args: unknown[]) => void>;


export function spyRuntimeJson(runtime: Pick<OutputRuntimeEnv, "writeJson">): Mock<(value: unknown, space?: number | undefined) => void>;


export function spyRuntimeLogs(runtime: Pick<OutputRuntimeEnv, "log">): Mock<(...args: unknown[]) => void>;


export function withEnv<T>(env: Record<string, string | undefined>, fn: () => T): T;


export function withEnvAsync<T>(env: Record<string, string | undefined>, fn: () => Promise<T>): Promise<T>;


export function withFetchPreconnect<T extends typeof fetch>(fn: T): T & FetchWithPreconnect;
export function withFetchPreconnect<T extends object>(fn: T): T & FetchWithPreconnect & { (input: RequestInfo | URL, init?: RequestInit | undefined): Promise<Response>; (input: string | ... 1 more ... | URL, init?: RequestInit | undefined): Promise<...>; };


export function withStateDirEnv<T>(prefix: string, fn: (ctx: { tempRoot: string; stateDir: string; }) => Promise<T>): Promise<T>;


export function writeSkill(params: { dir: string; name: string; description: string; metadata?: string | undefined; body?: string | undefined; frontmatterExtra?: string | undefined; }): Promise<void>;


export const __testing: { resetAcpSessionManagerForTests(): void; setAcpSessionManagerForTests(manager: unknown): void; };


export const handleAcpCommand: CommandHandler;


export type ChannelAccountSnapshot = ChannelAccountSnapshot;


export type ChannelGatewayContext = ChannelGatewayContext<ResolvedAccount>;


export type CliMockOutputRuntime = CliMockOutputRuntime;


export type CliRuntimeCapture = CliRuntimeCapture;


export type OpenClawConfig = OpenClawConfig;


export type PluginRuntime = PluginRuntime;


export function applyBasicWebhookRequestGuards(params: { req: IncomingMessage; res: ServerResponse<IncomingMessage>; allowMethods?: readonly string[] | undefined; rateLimiter?: FixedWindowRateLimiter | undefined; rateLimitKey?: string | undefined; nowMs?: number | undefined; requireJsonContentType?: boolean | undefined; }): boolean;


export function beginWebhookRequestPipelineOrReject(params: { req: IncomingMessage; res: ServerResponse<IncomingMessage>; allowMethods?: readonly string[] | undefined; rateLimiter?: FixedWindowRateLimiter | undefined; ... 6 more ...; inFlightLimitMessage?: string | undefined; }): { ...; } | { ...; };


export function createBoundedCounter(options: { maxTrackedKeys: number; ttlMs?: number | undefined; pruneIntervalMs?: number | undefined; }): BoundedCounter;


export function createFixedWindowRateLimiter(options: { windowMs: number; maxRequests: number; maxTrackedKeys: number; pruneIntervalMs?: number | undefined; }): FixedWindowRateLimiter;


export function createWebhookAnomalyTracker(options?: { maxTrackedKeys?: number | undefined; ttlMs?: number | undefined; logEvery?: number | undefined; trackedStatusCodes?: readonly number[] | undefined; } | undefined): WebhookAnomalyTracker;


export function createWebhookInFlightLimiter(options?: { maxInFlightPerKey?: number | undefined; maxTrackedKeys?: number | undefined; } | undefined): WebhookInFlightLimiter;


export function isJsonContentType(value: string | string[] | undefined): boolean;


export function isRequestBodyLimitError(error: unknown, code?: RequestBodyLimitErrorCode | undefined): error is RequestBodyLimitError;


export function normalizePluginHttpPath(path?: string | null | undefined, fallback?: string | null | undefined): string | null;


export function normalizeWebhookPath(raw: string): string;


export function readJsonWebhookBodyOrReject(params: { req: IncomingMessage; res: ServerResponse<IncomingMessage>; maxBytes?: number | undefined; timeoutMs?: number | undefined; profile?: WebhookBodyReadProfile | undefined; emptyObjectOnEmpty?: boolean | undefined; invalidJsonMessage?: string | undefined; }): Promise<...>;


export function readRequestBodyWithLimit(req: IncomingMessage, options: ReadRequestBodyOptions): Promise<string>;


export function readWebhookBodyOrReject(params: { req: IncomingMessage; res: ServerResponse<IncomingMessage>; maxBytes?: number | undefined; timeoutMs?: number | undefined; profile?: WebhookBodyReadProfile | undefined; invalidBodyMessage?: string | undefined; }): Promise<...>;


export function registerPluginHttpRoute(params: { path?: string | null | undefined; fallbackPath?: string | null | undefined; handler: PluginHttpRouteHandler; auth: OpenClawPluginHttpRouteAuth; ... 6 more ...; registry?: PluginRegistry | undefined; }): () => void;


export function registerWebhookTarget<T extends { path: string; }>(targetsByPath: Map<string, T[]>, target: T, opts?: RegisterWebhookTargetOptions<T> | undefined): RegisteredWebhookTarget<T>;


export function registerWebhookTargetWithPluginRoute<T extends { path: string; }>(params: { targetsByPath: Map<string, T[]>; target: T; route: RegisterWebhookPluginRouteOptions; onLastPathTargetRemoved?: ((params: { ...; }) => void) | undefined; }): RegisteredWebhookTarget<...>;


export function requestBodyErrorToText(code: RequestBodyLimitErrorCode): string;


export function resolveRequestClientIp(req?: IncomingMessage | undefined, trustedProxies?: string[] | undefined, allowRealIpFallback?: boolean): string | undefined;


export function resolveSingleWebhookTarget<T>(targets: readonly T[], isMatch: (target: T) => boolean): WebhookTargetMatchResult<T>;


export function resolveSingleWebhookTargetAsync<T>(targets: readonly T[], isMatch: (target: T) => Promise<boolean>): Promise<WebhookTargetMatchResult<T>>;


export function resolveWebhookPath(params: { webhookPath?: string | undefined; webhookUrl?: string | undefined; defaultPath?: string | null | undefined; }): string | null;


export function resolveWebhookTargets<T>(req: IncomingMessage, targetsByPath: Map<string, T[]>): { path: string; targets: T[]; } | null;


export function resolveWebhookTargetWithAuthOrReject<T>(params: { targets: readonly T[]; res: ServerResponse<IncomingMessage>; isMatch: (target: T) => boolean | Promise<boolean>; unauthorizedStatusCode?: number | undefined; unauthorizedMessage?: string | undefined; ambiguousStatusCode?: number | undefined; ambiguousMessage?: string | undefined; }): Promise<...>;


export function resolveWebhookTargetWithAuthOrRejectSync<T>(params: { targets: readonly T[]; res: ServerResponse<IncomingMessage>; isMatch: (target: T) => boolean; unauthorizedStatusCode?: number | undefined; unauthorizedMessage?: string | undefined; ambiguousStatusCode?: number | undefined; ambiguousMessage?: string | undefined; }): T | null;


export function withResolvedWebhookRequestPipeline<T>(params: { req: IncomingMessage; res: ServerResponse<IncomingMessage>; targetsByPath: Map<string, T[]>; allowMethods?: readonly string[] | undefined; ... 8 more ...; handle: (args: { ...; }) => boolean | ... 1 more ... | Promise<...>; }): Promise<...>;


export const WEBHOOK_ANOMALY_COUNTER_DEFAULTS: Readonly<{ maxTrackedKeys: 4096; ttlMs: number; logEvery: 25; }>;


export const WEBHOOK_ANOMALY_STATUS_CODES: readonly number[];


export const WEBHOOK_BODY_READ_DEFAULTS: Readonly<{ preAuth: { maxBytes: number; timeoutMs: number; }; postAuth: { maxBytes: number; timeoutMs: number; }; }>;


export const WEBHOOK_IN_FLIGHT_DEFAULTS: Readonly<{ maxInFlightPerKey: 8; maxTrackedKeys: 4096; }>;


export const WEBHOOK_RATE_LIMIT_DEFAULTS: Readonly<{ windowMs: 60000; maxRequests: 120; maxTrackedKeys: 4096; }>;


export type BoundedCounter = BoundedCounter;


export type FixedWindowRateLimiter = FixedWindowRateLimiter;


export type RegisteredWebhookTarget = RegisteredWebhookTarget<T>;


export type RegisterWebhookPluginRouteOptions = RegisterWebhookPluginRouteOptions;


export type RegisterWebhookTargetOptions = RegisterWebhookTargetOptions<T>;


export type WebhookAnomalyTracker = WebhookAnomalyTracker;


export type WebhookBodyReadProfile = WebhookBodyReadProfile;


export type WebhookInFlightLimiter = WebhookInFlightLimiter;


export type WebhookTargetMatchResult = WebhookTargetMatchResult<T>;