/**
 * olam status [world] — Show status.
 *
 * Without a world argument: shows machine-level status (CLI version,
 * Host CP state, worlds count, update availability). Exit 0 when host
 * CP is running; exit 1 when stopped.
 *
 * With a world ID: shows per-world details (unchanged from pre-D2 behaviour).
 *
 * Lazy imports for host-cp.js / context.js so tests can inject without
 * transitive @olam/adapters resolution.
 */
import type { Command } from 'commander';
/**
 * Canonical runtime-state contract per Decision 17. Surfaced by host-cp's
 * `GET /v1/worlds/:id/status` endpoint; both Docker and Kubernetes engines
 * map their native state onto this shape so the wire-format is identical.
 */
export interface WorldRuntimeStatus {
    readonly state: 'running' | 'starting' | 'stopped' | 'crashed' | 'unknown';
    readonly ready_replicas: number;
    readonly restarts: number;
    readonly last_event_type: string | null;
    readonly last_event_age_seconds: number | null;
}
/**
 * Parse and validate a server response payload into WorldRuntimeStatus.
 * Returns null on any shape mismatch so the caller falls back gracefully.
 * Exported for unit testing.
 */
export declare function parseRuntimeStatus(raw: unknown): WorldRuntimeStatus | null;
export type FetchRuntimeFn = (worldId: string, token: string) => Promise<WorldRuntimeStatus | null>;
/**
 * Default fetcher — hits host-cp's /v1/worlds/:id/status via the loopback
 * port with a 2-second timeout. Returns null on any error so the calling
 * `olam status` command renders the registry view without the runtime
 * block when host-cp is down or the engine fails (preserves the legacy
 * behaviour for operators with a stopped host-cp).
 */
export declare const fetchWorldRuntimeStatus: FetchRuntimeFn;
export interface MachineStatus {
    readonly version: string;
    readonly port: number;
    readonly host_cp: 'running' | 'stopped';
    readonly token_present: boolean;
    readonly worlds: number;
    readonly update_available: boolean | null;
    readonly last_update_check: string | null;
}
export type ProbeFn = () => Promise<{
    url: string;
    mode: string;
} | null>;
export type ReadTokenFn = () => string | null;
export type LoadContextFn = () => Promise<{
    ctx: {
        worldManager: {
            listWorlds: () => unknown[];
        };
    } | null;
    error?: Error | null;
}>;
export declare function getMachineStatus(_probe?: ProbeFn, _loadCtx?: LoadContextFn, _readToken?: ReadTokenFn): Promise<MachineStatus>;
export declare function registerStatus(program: Command): void;
//# sourceMappingURL=status.d.ts.map