import * as plugins from './plugins.js';
import * as interfaces from '../dist_ts_interfaces/index.js';
/**
 * Connection options for service worker connection attempts
 */
export interface IConnectionOptions {
    timeoutMs: number;
    maxRetries: number;
    initialDelayMs: number;
    maxDelayMs: number;
    backoffMultiplier: number;
}
/**
 * MessageManager implements two ways of serviceworker communication
 * * the serviceWorker method
 * * the deesComms method using BroadcastChannel
 */
/**
 * Callback type for status update subscriptions
 */
export type TStatusUpdateCallback = (status: interfaces.serviceworker.IStatusUpdate) => void;
export declare class ActionManager {
    deesComms: plugins.deesComms.DeesComms;
    private statusCallbacks;
    constructor();
    /**
     * Subscribe to status updates from the service worker
     * @returns Unsubscribe function
     */
    subscribeToStatusUpdates(callback: TStatusUpdateCallback): () => void;
    /**
     * Get current service worker status
     */
    getServiceWorkerStatus(): Promise<interfaces.serviceworker.IRequest_Serviceworker_GetStatus['response'] | null>;
    /**
     * Waits for service worker connection with timeout and retry logic.
     * Returns a result object instead of blocking forever.
     */
    waitForServiceWorkerConnection(options?: Partial<IConnectionOptions>): Promise<interfaces.serviceworker.IConnectionResult>;
    /**
     * Legacy method for backward compatibility - blocks until connected or gives up
     * @deprecated Use waitForServiceWorkerConnection() instead which returns a result
     */
    waitForServiceWorkerConnectionBlocking(): Promise<void>;
    purgeServiceWorkerCache(): Promise<{}>;
    getVersionInfo(): Promise<{
        appHash: string;
        appSemVer: string;
    }>;
    /**
     * Log a TypedRequest entry to the service worker for dashboard display
     */
    logTypedRequest(entry: interfaces.serviceworker.ITypedRequestLogEntry): Promise<void>;
    /**
     * Get TypedRequest traffic logs from the service worker
     */
    getTypedRequestLogs(options?: {
        limit?: number;
        method?: string;
        since?: number;
    }): Promise<interfaces.serviceworker.IRequest_Serviceworker_GetTypedRequestLogs['response'] | null>;
    /**
     * Get TypedRequest traffic statistics from the service worker
     */
    getTypedRequestStats(): Promise<interfaces.serviceworker.ITypedRequestStats | null>;
    /**
     * Clear TypedRequest traffic logs
     */
    clearTypedRequestLogs(): Promise<boolean>;
    /**
     * Subscribe to real-time TypedRequest log entries
     * @returns Unsubscribe function
     */
    subscribeToTypedRequestLogs(callback: (entry: interfaces.serviceworker.ITypedRequestLogEntry) => void): () => void;
}
