/**
 * olam destroy <world> — Tear down a world and clean up resources.
 *
 * Accepts a world ID (the long-standing contract) OR a world name —
 * operators usually remember the friendly name, not the generated id.
 * Resolution precedence is exact-ID-first, so existing scripts that pass
 * an ID keep their behaviour. On a miss, a "did you mean" hint surfaces
 * the closest worlds (typo / substring), mirroring `olam dispatch`. This
 * matters most here: destroy is irreversible, so a silent not-found that
 * forces the operator to re-run `olam list` and retype is a sharp edge.
 */
import type { Command } from 'commander';
import { type DispatchWorldRef } from './dispatch-resolve.js';
/** Minimal world shape the resolver + destroy flow need. */
export interface DestroyWorldRef extends DispatchWorldRef {
    readonly name: string;
}
/** Injectable deps for unit testing — host wiring lives in {@link registerDestroy}. */
export interface DestroyDeps<T extends DestroyWorldRef> {
    /** List all worlds — typically `ctx.worldManager.listWorlds()`. */
    readonly listWorlds: () => readonly T[];
    /** Destroy the resolved world by its canonical id. */
    readonly destroyWorld: (worldId: string, opts: {
        skipCrystallize?: boolean;
    }) => Promise<void>;
    /** Best-effort host-cp deregister; never throws fatally. */
    readonly deregister: (worldId: string) => Promise<void>;
    /** Spinner factory — keeps the ora dependency injectable + silent in tests. */
    readonly startSpinner: (text: string) => {
        succeed: (text: string) => void;
        fail: (text: string) => void;
    };
    /** Stdout sink (used for "did you mean" lines). */
    readonly stdout: (line: string) => void;
    /** Stderr sink — defaults to {@link printError} in production wiring. */
    readonly stderr: (line: string) => void;
}
/**
 * Run the destroy command. Pure: all I/O happens through {@link DestroyDeps}.
 *
 * @returns Process exit code (0 success, 1 error).
 */
export declare function runDestroy<T extends DestroyWorldRef>(worldArg: string, opts: {
    skipCrystallize?: boolean;
}, deps: DestroyDeps<T>): Promise<number>;
export declare function registerDestroy(program: Command): void;
//# sourceMappingURL=destroy.d.ts.map