/**
 * olam resume <pr> — Find and enter the world that opened a PR.
 *
 * Accepts a PR number (e.g. `876`), a PR URL (e.g.
 * `https://github.com/pleri/olam/pull/876`), or a branch name
 * (`night/cycle-04-goal-dispatch`). PR number / URL inputs are
 * normalised via `gh pr view <input> --json number,headRefName`;
 * branch-name inputs skip the `gh` round-trip.
 *
 * After resolving the branch, walks the world registry via
 * `WorldManager.listWorlds()` and matches against `WorldMetadata.branch`.
 * On a unique match, execs `olam enter <id>` so the operator drops into
 * the world's terminal. On zero or multiple matches, prints a clear
 * error and exits 1.
 *
 * Language-aligned with Claude Code 2.1.122's `/resume <pr-url>`.
 */
import type { Command } from 'commander';
/** Minimal world shape this command needs — keeps deps narrow + testable. */
export interface WorldRef {
    readonly id: string;
    readonly name: string;
    readonly branch: string;
}
/** Resolved input — either a direct branch or a PR-derived branch + number. */
export interface ResolvedInput {
    readonly branch: string;
    readonly prNumber?: number;
}
/** Injectable deps for unit testing — host wiring lives in {@link registerResume}. */
export interface ResumeDeps {
    /** Resolve the user-supplied `<pr>` to a branch (+ PR number when known). */
    readonly resolveInput: (input: string) => Promise<ResolvedInput>;
    /** List worlds — typically `ctx.worldManager.listWorlds()`. */
    readonly listWorlds: () => readonly WorldRef[];
    /** Exec `olam enter <worldId>` — typically a re-invocation of the CLI binary. */
    readonly enterWorld: (worldId: string) => void;
    /** Stdout sink — defaults to `console.log` in production wiring. */
    readonly stdout: (line: string) => void;
    /** Stderr sink — defaults to {@link printError} in production wiring. */
    readonly stderr: (line: string) => void;
}
/** Detect whether the input looks like a PR identifier (number or GitHub URL). */
export declare function looksLikePrIdentifier(input: string): boolean;
/**
 * Run the resume command. Pure: all I/O happens through {@link ResumeDeps}.
 *
 * @returns Process exit code (0 success, 1 error).
 */
export declare function runResume(input: string, deps: ResumeDeps): Promise<number>;
/**
 * Production resolver: shells out to `gh pr view` for PR-shaped inputs.
 * Branch-name inputs short-circuit (no gh round-trip).
 */
export declare function resolveInputViaGh(input: string): Promise<ResolvedInput>;
/**
 * Commander wiring. Composes existing primitives:
 * 1. `gh pr view` → branch + PR number (skipped when input is already a branch).
 * 2. `WorldManager.listWorlds()` → match by `branch`.
 * 3. `execFileSync('olam', ['enter', id])` → drop the operator into the world.
 */
export declare function registerResume(program: Command): void;
//# sourceMappingURL=resume.d.ts.map