import type { Config } from '../../../config/schema.js';
import type { GatewayService } from '../../service.js';
/** MCP block for GET/PATCH `/api/config` (authenticated console editing). */
export declare function buildSafeMcpConfigForWeb(config: Config): {
    servers: import("../../../config/mcp-config-normalize.js").ConfigMcpServers;
    sessionIdleTtlMs?: number;
};
export declare function buildSafeBrowserConfigForWeb(browser: Config['agents']['defaults']['browser'] | undefined): {
    enabled: boolean;
    headless: boolean;
    allowPrivateUrls: boolean;
    commandTimeout: number;
    backend: "local" | "cdp" | "cloud" | "extension" | "cloakbrowser";
    cloudProvider: "browserbase" | "browser-use";
    cloud: Record<string, unknown>;
    cdpUrl: string;
    extension: {
        port?: number;
        host?: string;
        connectionTimeout?: number;
    };
    cloakbrowser: {
        keepOpen?: boolean;
        temporaryProfile?: boolean;
        cacheDir?: string;
        binaryPath?: string;
        timezone?: string;
        locale?: string;
        webrtcIp?: string;
        fingerprintPlatform?: string;
        extraArgs?: string[];
    };
    humanize: boolean;
    humanPreset: "default" | "careful";
    dialogPolicy: "must_respond" | "auto_dismiss" | "auto_accept";
    dialogTimeoutSeconds: number;
};
/** Sanitized config snapshot for GET/PATCH `/api/config` (matches persisted `service.currentConfig`). */
export declare function buildSafeWebConfigPayload(service: GatewayService): Promise<{
    agents: {
        defaultId: string;
        list: {
            name?: string;
            id: string;
        }[];
        defaults: {
            model: string;
            modelFallbacks: string[];
            imageModel: string;
            imageModelFallbacks: string[];
            imageGenerationModel: string;
            imageGenerationModelFallbacks: string[];
            imageGenerationModelTimeoutMs: number;
            imageGenerationModelAutoProviderFallback: boolean;
            mediaMaxMb: number;
            maxTokens: number;
            temperature: number;
            maxToolIterations: number;
            workspace: string;
            thinkingDefault: "off" | "minimal" | "low" | "medium" | "high" | "xhigh" | "adaptive";
            reasoningDefault: "off" | "on" | "stream";
            verboseDefault: "off" | "on" | "full";
            browser: {
                enabled: boolean;
                headless: boolean;
                allowPrivateUrls: boolean;
                commandTimeout: number;
                backend: "local" | "cdp" | "cloud" | "extension" | "cloakbrowser";
                cloudProvider: "browserbase" | "browser-use";
                cloud: Record<string, unknown>;
                cdpUrl: string;
                extension: {
                    port?: number;
                    host?: string;
                    connectionTimeout?: number;
                };
                cloakbrowser: {
                    keepOpen?: boolean;
                    temporaryProfile?: boolean;
                    cacheDir?: string;
                    binaryPath?: string;
                    timezone?: string;
                    locale?: string;
                    webrtcIp?: string;
                    fingerprintPlatform?: string;
                    extraArgs?: string[];
                };
                humanize: boolean;
                humanPreset: "default" | "careful";
                dialogPolicy: "must_respond" | "auto_dismiss" | "auto_accept";
                dialogTimeoutSeconds: number;
            };
            maxTaskDurationMs: number;
            maxRequestsPerTurn: number;
            maxToolFailuresPerTurn: number;
            compaction: {
                enabled: boolean;
                mode: "default" | "safeguard";
                reserveTokens: number;
                triggerThreshold: number;
                minMessagesBeforeCompact: number;
                keepRecentMessages: number;
                evictionWindow: number;
                retentionWindow: number;
                postCompactionSections?: string[];
            };
            pruning: {
                enabled: boolean;
                maxToolResultChars: number;
                headKeepRatio: number;
                tailKeepRatio: number;
            };
            memory: {
                enabled?: boolean;
                useEnhancedSystem?: boolean;
                userProfileEnabled?: boolean;
                memoryCharLimit?: number;
                userCharLimit?: number;
                provider?: "none" | "stub";
                injectionFrequency?: "every-turn" | "first-turn";
                contextCadence?: number;
                dialecticCadence?: number;
                dreaming?: {
                    enabled?: boolean;
                    frequency?: string;
                    timezone?: string;
                    phases?: {
                        light?: {
                            enabled?: boolean;
                            cron?: string;
                            lookbackDays?: number;
                            limit?: number;
                            dedupeSimilarity?: number;
                        };
                        deep?: {
                            enabled?: boolean;
                            cron?: string;
                            minScore?: number;
                            minRecallCount?: number;
                            minUniqueQueries?: number;
                            limit?: number;
                            recencyHalfLifeDays?: number;
                            maxAgeDays?: number;
                        };
                        rem?: {
                            enabled?: boolean;
                            cron?: string;
                            lookbackDays?: number;
                            limit?: number;
                            minPatternStrength?: number;
                        };
                    };
                };
            };
            sessionSearch: {
                summaryModel?: string;
            };
            backgroundReview: {
                enabled?: boolean;
                memoryNudgeInterval?: number;
                skillNudgeInterval?: number;
                maxToolRounds?: number;
                maxHistoryMessages?: number;
                maxDurationMs?: number;
            };
            webExtract: {
                model?: string;
                maxLength?: number;
            };
            delegate: {
                enabled?: boolean;
            };
            executeCode: {
                enabled?: boolean;
            };
            systemPromptOverride: string;
            skills: string[];
            tools: {
                disable?: string[];
            };
            params: Record<string, unknown>;
        };
    };
    channels: {
        [k: string]: Record<string, unknown>;
    };
    providers: any;
    /** Masked `cfg.providers` for capability keys (image / STT / etc.). */
    providersConfig: Record<string, import("./safe-providers-config.js").SafeProviderAuthEntry>;
    gateway: {
        bind: "custom" | "auto" | "loopback" | "lan" | "tailnet";
        customBindHost: string;
        port: number;
        corsOrigins: string[];
        trustedProxies: string[];
        allowRealIpFallback: boolean;
        dangerouslyAllowHostHeaderOriginFallback: boolean;
        security: {
            strict: boolean;
        };
        auth: {
            mode: "none" | "token" | "password" | "trusted-proxy";
            token: string;
            password: string;
            trustedProxy: {
                userHeader: string;
                requiredHeaders: string[];
                allowUsers: string[];
                allowLoopback: boolean;
            };
            rateLimit: {
                enabled: boolean;
                maxAttempts: number;
                windowMs: number;
                blockDurationMs: number;
                exemptLoopback: boolean;
            };
        };
        heartbeat: {
            enabled: boolean;
            intervalMs: number;
            includeSystemPromptSection: boolean;
            target: string;
            targetChatId: string;
            prompt: string;
            ackMaxChars: number;
            isolatedSession: boolean;
            activeHours: {
                start: string;
                end: string;
                timezone?: string;
            };
        };
        maxSseConnections: number;
        channelConnectDeferMode: "off" | "auto" | "explicit";
        channelConnectDeferIds: string[];
        channelConnectDeferSkipIds: string[];
        share: import("../../../share/share-types.js").ShareConfig;
        skillsMarketplaceProvider: string;
        skillsStoreBaseUrl: string;
    };
    cron: {
        enabled: boolean;
        maxConcurrentJobs: number;
        defaultTimezone: string;
        historyRetentionDays: number;
        enableMetrics: boolean;
    };
    goals: {
        maxTurns: number;
        checklistMode: boolean;
        maxConsecutiveParseFailures: number;
        judgeTimeoutMs: number;
        checklistHistoryChars: number;
        judgeModelRef?: string;
    };
    session: {
        dmScope: "main" | "per-peer" | "per-channel-peer" | "per-account-channel-peer";
        storage: {
            pruneAfterDays: number;
            maxEntries: number;
        };
    };
    tunnel: {
        enabled: boolean;
        autoStart: boolean;
        brokerUrl: string;
        registrationSecret: string;
        consent: {
            version: string;
            acceptedAt: string;
        };
        transport: {
            tls: "broker_terminated";
        };
    };
    update: {
        checkOnStart: boolean;
        channel: "stable" | "beta" | "dev";
        auto: {
            enabled: boolean;
            stableDelayHours: number;
            stableJitterHours: number;
            betaCheckIntervalHours: number;
        };
    };
    stt: unknown;
    tts: unknown;
    tools: {
        web: {
            region: "cn" | "global" | null;
            search: {
                maxResults: number;
                providers: Array<{
                    type: string;
                    apiKey: string;
                    url: string;
                    disabled: boolean;
                }>;
            };
            blocklist: {
                enabled: boolean;
                domains: string[];
            };
        };
    };
    bindings: {
        agentId: string;
        priority: number;
        match: {
            channel: string;
            accountId?: string;
            peerKind?: string;
            peerId?: string;
            guildId?: string;
            teamId?: string;
            memberRoleIds?: string[];
        };
        enabled: boolean;
        id?: string;
    }[];
    mcp: {
        servers: import("../../../config/mcp-config-normalize.js").ConfigMcpServers;
        sessionIdleTtlMs?: number;
    };
}>;
