/**
 * Pure resolution + validation helpers for `olam dispatch`.
 *
 * Extracted so the operator-facing ergonomics (resolve-by-name,
 * "did you mean" suggestions, mode validation) can be unit-tested
 * without the container/IO surface of the command action.
 */
/** Minimal world shape these helpers need (subset of WorldMetadata). */
export interface DispatchWorldRef {
    readonly id: string;
    readonly name: string;
    readonly status: string;
}
/** The execution modes `olam dispatch --mode` accepts. */
export declare const DISPATCH_MODES: readonly ["auto", "deep", "fast"];
export type DispatchMode = (typeof DISPATCH_MODES)[number];
/**
 * Resolve a world by the user-supplied argument.
 *
 * Precedence (backward-compatible — exact ID still wins):
 *   1. Exact ID match.
 *   2. Exact name match (operators usually remember the name, not the id).
 *
 * Returns the matched world, or `undefined` when nothing matches.
 * When two worlds share a name, the first registered wins — callers
 * should fall back to the unambiguous ID, which is surfaced in the
 * not-found suggestion list.
 */
export declare function resolveWorld<T extends DispatchWorldRef>(worlds: readonly T[], arg: string): T | undefined;
/**
 * Rank worlds by how likely the operator meant them, given a typo'd or
 * partial argument. Used to build a "did you mean" hint on not-found.
 *
 * Matching signal (lower score = better):
 *   - substring match on id or name (case-insensitive) → strong signal
 *   - small edit distance to id or name → typo signal
 *
 * Returns at most `limit` candidates, best first. Worlds with no
 * plausible relationship to the argument are dropped, so an empty
 * result is meaningful ("nothing close").
 */
export declare function suggestWorlds<T extends DispatchWorldRef>(worlds: readonly T[], arg: string, limit?: number): T[];
/**
 * Validate a `--mode` value. Returns the canonical mode on success, or
 * an `error` describing the valid set on failure. Unknown modes used to
 * silently fall through to non-deep behaviour; surfacing them prevents
 * a typo (`--mode dep`) from quietly running the wrong execution shape.
 */
export declare function validateMode(raw: string): {
    mode: DispatchMode;
} | {
    error: string;
};
//# sourceMappingURL=dispatch-resolve.d.ts.map