import type { ConfigManager } from '../config/manager.js';
import type { SecretsManager } from '../config/secrets.js';
import type { ServiceRegistry } from '../config/service-registry.js';
import { type SurfaceAdapterContext } from '../adapters/index.js';
export type ProviderRuntimeSurface = 'slack' | 'discord' | 'ntfy';
export interface ProviderRuntimeStatus {
    readonly surface: ProviderRuntimeSurface;
    readonly running: boolean;
    readonly configured: boolean;
    readonly transport: 'socket-mode' | 'gateway' | 'json-stream';
    readonly lastStartedAt?: number | undefined;
    readonly lastStoppedAt?: number | undefined;
    readonly lastError?: string | undefined;
    readonly metadata: Record<string, unknown>;
}
export interface ProviderRuntimeActionResult {
    readonly ok: boolean;
    readonly surface: ProviderRuntimeSurface;
    readonly status: ProviderRuntimeStatus;
    readonly message: string;
}
interface ProviderRuntimeManagerDeps {
    readonly configManager: ConfigManager;
    readonly secretsManager?: Pick<SecretsManager, 'get' | 'getGlobalHome'> | undefined;
    readonly serviceRegistry: ServiceRegistry;
    readonly buildSurfaceAdapterContext: () => SurfaceAdapterContext;
}
export declare class ChannelProviderRuntimeManager {
    private readonly deps;
    private slackClient;
    private discordClient;
    private ntfyAbort;
    private readonly state;
    constructor(deps: ProviderRuntimeManagerDeps);
    startConfigured(): Promise<ProviderRuntimeActionResult[]>;
    start(surface: ProviderRuntimeSurface): Promise<ProviderRuntimeActionResult>;
    stop(surface: ProviderRuntimeSurface): ProviderRuntimeActionResult;
    stopAll(): void;
    status(surface: ProviderRuntimeSurface): ProviderRuntimeStatus;
    private startSlack;
    private startDiscord;
    private startNtfy;
    private handleSlackEnvelope;
    private handleDiscordDispatch;
    private handleNtfyMessage;
    private resolveSlackBotToken;
    private resolveSlackAppToken;
    private resolveDiscordBotToken;
    private resolveNtfyToken;
    private resolveNtfyTopics;
    private isConfigured;
    private markStarted;
    private markStopped;
    private markError;
    private result;
    private resolveConfigSecret;
}
export {};
//# sourceMappingURL=provider-runtime.d.ts.map