/**
 * The engine — turns requests into open surfaces.
 *
 * `specForRequest` and `buildRequests` are pure (planning); `openSurface` and
 * `openSurfaces` add the side-effecting transport. A batch runs sequentially and
 * staggered so a `split-right` lands in the tab that was just opened (the split
 * targets the front pane).
 */
import type { Backend, EngineContext, LaunchRequest, LaunchResult, LaunchSpec } from './types.js';
import { type Packing } from './policy.js';
import { type HostResolver } from './transport.js';
/** The concrete launch command for a request (pure — no side effects). */
export declare function specForRequest(req: LaunchRequest): LaunchSpec;
export interface OpenOptions {
    resolveHost?: HostResolver;
    ctx?: EngineContext;
}
/** Open a single surface for one request. Never throws — failures come back in the result. */
export declare function openSurface(req: LaunchRequest, opts?: OpenOptions): Promise<LaunchResult>;
/** One command to run as a surface. */
export interface SurfaceItem {
    cwd: string;
    command: string[];
    /** Optional harness identity for editor-backed backends (vscodium-agent). */
    agent?: string;
    sessionId?: string;
    title?: string;
}
export interface BuildRequestsOptions {
    backend: Backend;
    host?: string;
    packing?: Packing;
}
/** Turn a list of commands into layout-assigned requests (pure — the planning step). */
export declare function buildRequests(items: SurfaceItem[], opts: BuildRequestsOptions): LaunchRequest[];
export interface OpenManyOptions extends OpenOptions, BuildRequestsOptions {
    staggerMs?: number;
}
/**
 * Open many surfaces, applying the layout policy (default: two-per-tab).
 * Sequential + staggered so each split follows the tab it splits.
 */
export declare function openSurfaces(items: SurfaceItem[], opts: OpenManyOptions): Promise<LaunchResult[]>;
