/**
 * `agents devices` (registry) + `agents ssh` (smart wrapper).
 *
 * `agents devices` keeps a registry of SSH device profiles — platform, login
 * user, address, and auth — self-populated from `tailscale status --json`.
 * `agents ssh <name>` then connects through one hardened path: preflight
 * (offline → fail fast instead of a 2-minute hang), platform-aware exec
 * (PowerShell on Windows), and password-from-bundle auth via an askpass shim.
 * Rendering the registry to an ssh_config include also lets plain ssh / scp /
 * rsync / `agents sessions --device` resolve the same logical names.
 */
import type { Command } from 'commander';
import { type DeviceRegistry } from '../lib/devices/registry.js';
import { type FanOutDeviceTarget } from '../lib/devices/fleet.js';
import { type DeviceStats } from '../lib/devices/health.js';
import type { AgentId } from '../lib/types.js';
import { type HostHarnessResult } from '../lib/devices/harness-inventory.js';
import { type CrabboxBox } from '../lib/crabbox/cli.js';
/**
 * Render the device list. When `statsMap` is provided, resource columns are
 * appended — a `spec` cell (cores / total RAM / total disk), normalized load,
 * memory and disk-used percentages, a headroom badge, and (in `full` mode)
 * free/total memory — with the per-device role and `description` riding the
 * tail, so it's obvious which boxes have room and what each box is for.
 * Without it (probe skipped) the classic reachability line is used. A fleet
 * capacity summary is appended whenever stats were gathered.
 */
export declare function renderDeviceTable(reg: DeviceRegistry, names: string[], self: string | undefined, statsMap?: Map<string, DeviceStats>, full?: boolean, interactiveHost?: string, opts?: {
    width?: number;
    ignoredCount?: number;
}): string[];
/**
 * Live "Leased boxes" section for `agents devices` (F4, RUSH-1923), computed
 * from `crabboxList()` — these are ephemeral crabbox leases, NEVER written into
 * the device registry. Returns [] when crabbox is unavailable / has no creds /
 * reports no boxes, so the section is simply omitted. `nowSecs` is injected so
 * the row formatting is deterministic in tests.
 */
export declare function renderLeasedBoxesSection(boxes: CrabboxBox[], nowSecs: number): string[];
/**
 * Whether `agents devices list` shows the "Leased boxes" section (RUSH-2190).
 * Opt-in via --all only: loading it scans the keychain for bundle credentials
 * and can raise a Touch ID sheet after the table has printed, so the default
 * list must never reach for it. --no-stats stays the hard "instant, no provider
 * calls" opt-out even when --all is passed.
 */
export declare function showLeasedBoxesSection(opts: {
    all?: boolean;
    stats?: boolean;
}): boolean;
/**
 * Remote argv for `agents ssh <slug>` into a leased crabbox. Crabbox ssh does
 * not go through {@link buildSshInvocation}, so this stamps the same
 * AGENTS_FLEET_REMOTE consent marker a registered-device ssh would (PHNX-3065).
 * Exported so the branch is unit-testable without a live crabbox.
 */
export declare function leasedBoxRemoteCmd(cmd: string[]): string[];
/**
 * Race `fanOut` against an overall wall-clock deadline (RUSH-2041).
 *
 * If `fanOut` settles first the result passes through unchanged. If the
 * deadline fires first every pending remote target is mapped to `failed` (or
 * `skipped` for pre-skipped targets), so callers always get a complete result
 * array and the command exits promptly rather than hanging.
 *
 * Exported so the unit test can exercise the real path with a hanging probe
 * instead of reimplementing the logic.
 */
export declare function raceFleetPingDeadline<T, Target extends FanOutDeviceTarget>(fanOut: Promise<import('../lib/devices/fleet.js').FanOutDeviceResult<T>[]>, remoteTargets: Target[], overallTimeoutMs: number): Promise<import('../lib/devices/fleet.js').FanOutDeviceResult<T>[]>;
export interface HarnessInventoryOpts {
    agents?: AgentId[];
    devices?: string[];
    refresh?: boolean;
    json?: boolean;
    local?: boolean;
}
/**
 * Gather harness rows across the fleet: THIS host in process, every reachable
 * peer over SSH. Shared by both `harnesses` and `accounts` (they differ only in
 * how the rows are rendered). Honors an optional `--device` allowlist on both
 * the local and remote rows. Bounded by the same per-device + overall deadlines
 * as `fleet ping`, so one unreachable box can never stall the glance.
 */
export declare function collectFleetHarnesses(opts: HarnessInventoryOpts): Promise<HostHarnessResult[]>;
export declare function runDevicesAccounts(opts: HarnessInventoryOpts): Promise<void>;
/** Register both `agents ssh` and `agents devices`. */
export declare function registerSshCommands(program: Command): void;
