import { EventEmitter } from 'node:events';
export type DeployPhase = 'start' | 'end';
export type DeployLifecycleEvent = {
    name: string;
    phase: DeployPhase;
};
type DeployLifecycleEventsMap = {
    'deploy:start': [componentName: string];
    'deploy:end': [componentName: string];
};
declare class DeployLifecycle extends EventEmitter<DeployLifecycleEventsMap> {
    #private;
    isDeployInFlight(componentName: string): boolean;
    _handle(event: DeployLifecycleEvent): void;
    _clearForTests(): void;
}
export declare const deployLifecycle: DeployLifecycle;
/**
 * Announce the start of a deploy for `componentName`. Awaits acknowledgement
 * from every worker so the caller can rely on all watchers being suppressed
 * before writing into the component directory.
 *
 * Ref-counted via DeployLifecycle so overlapping deploys of the same
 * component compose correctly (each call must be paired with exactly one
 * broadcastDeployEnd).
 */
export declare function broadcastDeployStart(componentName: string): Promise<void>;
/**
 * Announce the end of a deploy for `componentName`. Fire-and-forget — the
 * caller (the deploy operation) is done by this point and doesn't need to
 * wait for every worker to reopen its watcher.
 *
 * Must be called exactly once per matching broadcastDeployStart, even if the
 * deploy errored — typically from a `finally` block.
 */
export declare function broadcastDeployEnd(componentName: string): void;
export declare function _resetForTests(): void;
export declare const supportsCrossThreadBroadcast: boolean;
export {};
