import { type DeviceStats } from './devices/health.js';
/** Live agent workload on a host. */
export interface FleetAgentCounts {
    /** Sessions actively working (status === 'running'). */
    running: number;
    /** Total live sessions regardless of status (running/idle/input-required/…). */
    live: number;
    /** Running count broken down by context: terminal / teams / cloud / headless. */
    byContext: Record<string, number>;
    /** Running count broken down by agent CLI: claude / codex / cursor / … */
    byAgent: Record<string, number>;
}
/** One host's published status row. */
export interface FleetStatusRow {
    host: string;
    agents: FleetAgentCounts;
    /** Resource stats from the local probe; null when the probe produced nothing. */
    stats: DeviceStats | null;
    /** Epoch ms this row was computed. */
    capturedAt: number;
}
/** Minimal shape needed to count workload — a subset of ActiveSession. */
type CountableSession = {
    status?: string;
    context?: string;
    kind?: string;
    pidAlive?: boolean;
};
/**
 * Tally running-agent workload from a host's live sessions. "running" is the
 * actively-working set (`status === 'running'`); `live` is every session the
 * host is tracking. Pure so the tally is unit-tested without a live scan.
 */
export declare function computeAgentCounts(sessions: ReadonlyArray<CountableSession>): FleetAgentCounts;
/**
 * Probe THIS host's status — resource stats locally (no SSH) and agent workload
 * from the local live-session set (`getActiveSessions({ localOnly: true })`,
 * which never dials a remote host). Never throws: a failed sub-probe degrades to
 * null stats / zero counts.
 */
export declare function probeLocalFleetStatus(host: string, now?: number): Promise<FleetStatusRow>;
export declare function setFleetStatusMirrorPathForTest(mirrorPath: string | null): string | null;
/** Read the whole fleet-status mirror (best-effort; missing/corrupt → empty). */
export declare function readFleetStatus(): Record<string, FleetStatusRow>;
/** Merge rows into the mirror (best-effort; preserves other hosts' rows). */
export declare function writeFleetStatusRows(entries: Record<string, FleetStatusRow>): void;
/**
 * Publish THIS host's row into the mirror (probe self, no SSH). The daemon calls
 * this on its warm tick; it is the whole of the daemon's fleet-status duty now
 * that cross-host probing is gone.
 */
export declare function publishLocalFleetStatus(host: string): Promise<FleetStatusRow>;
export {};
