import type { RestartContext, RestartFn } from '../types/hooks.js';
import type { MaybePromise } from '../types/utils.js';
type Cleanup = () => MaybePromise<void>;
export type RestartManager = {
    /** Whether a restart executor is available. */ readonly canRestart: boolean;
    /** Register a cleanup callback and return a function that unregisters it. */ registerCleanup(cleanup: Cleanup): () => void;
    /** Handle a restart request and return whether the restart succeeded. */ requestRestart(context: RestartContext): Promise<boolean>;
};
export declare const createRestartManager: ({ onRestart, restart }: {
    onRestart: (context: RestartContext) => MaybePromise<unknown>;
    restart?: RestartFn;
}) => RestartManager;
export { };
