/**
 * Runtime placement resolution for routines: local / host / fleet / cloud.
 *
 * The scheduler only decides *whether* this machine may fire the job
 * (`devices` + `jobRunsOnThisDevice`). This module decides *where the job
 * body runs* once it has been fired, using `hostStrategy`.
 *
 * Fleet semantics (RUSH-2035 / RUSH-1980): pick exactly one online device per
 * fire. Cross-device double-fire is prevented by requiring a `devices` firing
 * pin for fleet/host/cloud strategies (applied at add/sync time).
 */
import type { JobConfig } from './scheduling/routines.js';
import { type DevicePlatform } from './devices/registry.js';
export type PlacementTarget = {
    mode: 'local';
} | {
    mode: 'host';
    host: string;
} | {
    mode: 'cloud';
};
/**
 * Pick one online fleet device for `hostStrategy: fleet`.
 *
 * Preference order:
 * 1. This machine, if online and eligible (avoids needless SSH)
 * 2. First eligible online device by name (stable / deterministic)
 *
 * `config.devices` is the *firing* allowlist only (which daemon may fire the
 * job). It is intentionally NOT used as an execution pool filter — otherwise
 * the double-fire pin (`devices: [self]`) would collapse fleet placement to
 * always-local. Offline / no-address devices are never chosen.
 */
export declare function pickFleetDevice(_config?: Pick<JobConfig, 'devices'>, platform?: DevicePlatform): string | null;
/**
 * Resolve where a fired job's body should execute.
 * Throws a human-readable Error when placement cannot be satisfied.
 *
 * `host: 'auto'` under `hostStrategy: fleet` re-picks a healthy, signed-in,
 * unloaded device AT EACH FIRE via the same picker `agents run --device auto`
 * uses (`resolveDeviceAuto`), instead of `pickFleetDevice`'s
 * first-online-by-name order. The decision is deliberately not baked in at add
 * time — fleet health at fire time is the whole point (RUSH-2719).
 */
export declare function resolvePlacementTarget(config: JobConfig, deps?: {
    resolveDeviceAuto?: (agent?: string) => Promise<{
        pickedDeviceKey: string;
    }>;
}): Promise<PlacementTarget>;
