/**
 * Host cloud provider — your own machines as a task-execution backend.
 *
 * A thin adapter over the hosts subsystem (lib/hosts/*): `agents cloud run
 * --provider host --device <name>` dispatches through the SAME detached-SSH
 * launch as `agents run --device`, and the resulting task shows up in BOTH
 * `agents cloud ps` and `agents devices ps` — one store (the host-task sidecars
 * under ~/.agents/.cache/hosts/), two views. No new transport, no relay: SSH
 * is the only wire, exactly like the rest of the host design (docs/fleet.md).
 *
 * Status semantics follow reconcile.ts's prime rule: completion is only ever
 * CONFIRMED from the remote `.exit` file — an unreachable host leaves a task
 * `running`, never guessed as failed. The cloud SQLite store row is a cached
 * index (the `cloud list` refresh loop upserts what `status()` returns); the
 * sidecar stays the source of truth. Reachability is memoized per target for
 * the life of the process so a down host costs ONE short timeout, not one per
 * task ("care around the cloud status-refresh path", lib/hosts/tasks.ts).
 */
import type { CloudEvent, CloudProvider, CloudTarget, CloudTask, CloudTaskStatus, DispatchOptions, ProviderCapabilities } from './types.js';
import type { HostTask } from '../hosts/tasks.js';
/** Project a host-task sidecar into the cloud task shape. */
export declare function hostTaskToCloudTask(task: HostTask): CloudTask;
export declare class HostCloudProvider implements CloudProvider {
    readonly id: "host";
    readonly name = "Host (your machines)";
    readonly targetKind: "host";
    /**
     * Reachability memo, per target, for the life of this process. The cloud
     * refresh loop calls `status()` once per active task; without the memo a
     * down host would cost one ~6s ssh timeout PER task instead of one total.
     * CLI processes are short-lived, so staleness is bounded by the invocation.
     */
    private reachable;
    capabilities(): ProviderCapabilities;
    dispatch(options: DispatchOptions): Promise<CloudTask>;
    status(taskId: string): Promise<CloudTask>;
    list(filter?: {
        status?: CloudTaskStatus;
    }): Promise<CloudTask[]>;
    /**
     * `reconcileTask` with the per-process reachability memo folded in: probe a
     * target at most once per process; a down host leaves its tasks `running`.
     */
    private reconcileMemoized;
    /**
     * Offset-tail the remote log (the same one-round-trip fetch the `run --device`
     * follow uses) and yield it as `text` events until the `.exit` file lands.
     */
    stream(taskId: string): AsyncIterable<CloudEvent>;
    cancel(taskId: string): Promise<void>;
    /**
     * Follow-up message = resume the run's session on the same host. Only runs
     * that captured a session id (Claude — the one agent that takes
     * `--session-id`) can be resumed; others get an actionable refusal.
     */
    message(taskId: string, content: string): Promise<void>;
    /** The unified host pool (enrolled hosts ∪ devices), dispatchable ones only. */
    listTargets(): Promise<CloudTarget[]>;
}
