import type { PluginDisposable } from "@thortiq/plugin-api";
export type DisposableLike = PluginDisposable | {
    destroy(): void | Promise<void>;
} | (() => void | Promise<void>);
/** Creates an idempotent disposable around an arbitrary cleanup callback. */
export declare function toDisposable(cleanup: () => void): PluginDisposable;
/**
 * Owns plugin-local resources in reverse registration order. Host resources
 * remain independently scope-owned; this store is for author-side composition.
 */
export declare class DisposableStore {
    #private;
    get disposed(): boolean;
    add<T extends DisposableLike>(value: T): T;
    dispose(): Promise<void>;
}
/** Registers an idempotent callback which runs when the signal aborts. */
export declare function onAbort(signal: AbortSignal, callback: () => void): PluginDisposable;
