export interface TaskBinding {
    device: string;
    profile?: string;
    url?: string;
    sessionId?: string;
    launchId?: string;
    createdAt: number;
}
export type TaskIndex = Record<string, TaskBinding>;
export declare const REJECT_DEVICE_MESSAGE: string;
export type TaskRoute = {
    kind: 'proceed';
    task?: string;
    device: string;
} | {
    kind: 'unknown';
    task: string;
    message: string;
} | {
    kind: 'ambiguous';
    message: string;
} | {
    kind: 'reject-device';
    message: string;
};
export declare function isTerminalBrowserVerb(verb: string): boolean;
export declare function taskIndexPath(): string;
export declare function readTaskIndex(): TaskIndex;
export declare function getTaskBinding(name: string): TaskBinding | undefined;
export declare function listTaskBindings(): Array<{
    name: string;
} & TaskBinding>;
export declare function bindTask(name: string, binding: TaskBinding): void;
export declare function updateTaskBinding(name: string, patch: Partial<TaskBinding>): void;
export declare function unbindTask(name: string): void;
/** Drop every binding recorded under this profile (after `stop --profile` / gc). */
export declare function unbindTasksForProfile(profile: string): void;
export declare function tasksForCaller(sessionId?: string, launchId?: string): Array<{
    name: string;
} & TaskBinding>;
export declare function formatOpenTaskList(entries: Array<{
    name: string;
} & TaskBinding>, now?: number): string;
export declare function unknownTaskMessage(name: string, entries?: ({
    name: string;
} & TaskBinding)[]): string;
export declare function ambiguousTasksMessage(entries: Array<{
    name: string;
} & TaskBinding>): string;
/**
 * Decide where a page verb should run.
 *
 * `--device` on a later verb is always rejected (bind it at start).
 * A named task that is not in the local index fails loud with the open-task
 * list. Two or more tasks for this caller, with no `--task`, fail the same way.
 * Zero matches with no `--task` follows the fleet browser hub when the caller
 * passed one (`opts.hub` — the box drives `browser.device` by default), so a
 * cold page verb reaches the logged-in hub browser exactly as a bare
 * `agents browser start` already does; with no hub it proceeds locally and the
 * daemon resolves from caller identity for the first implicit create. The caller
 * (the CLI's task-routing hook) supplies `opts.hub` from `defaultBrowserHub()`,
 * which is already undefined on the hub itself and on a fleet-remote re-exec, so
 * this can never forward to self or loop.
 */
export declare function resolveTaskRoute(opts: {
    task?: string;
    device?: string;
    sessionId?: string;
    launchId?: string;
    self?: string;
    hub?: string;
}): TaskRoute;
/**
 * The daemon sandboxes screenshot writes to the browser runtime dir, so `-o`
 * outside that dir is ignored there. The CLI process honors `-o` by copying
 * the captured file to the requested path. Same path → no copy.
 */
export declare function honorScreenshotOutput(requested: string | undefined, daemonPath: string): string;
