/**
 * Shared host-task log viewer — the show-or-follow core behind the
 * top-level `agents logs <id>`.
 *
 * A running task with follow re-enters the offset-tail (`followHostTask`).
 * Otherwise the view is **concise by default**: a bounded tail of the captured
 * combined-stdout, so an agent glancing at a dispatched run never pulls the whole
 * log. `full` opts into the entire raw log. (A host run's real transcript lives
 * on the remote, not the local index — surfacing its rich summary needs remote
 * runs to be discoverable there first; until then the bounded tail is the safe
 * concise default.) Kept in one place so the two commands can never drift.
 */
import { type HostTask } from './tasks.js';
export interface HostLogResult {
    /** False when no host task with this id exists (caller may fall through to sessions). */
    found: boolean;
    /** Process exit code to adopt when the task was shown/followed. */
    exitCode?: number;
}
/**
 * Show (or follow, when running) a dispatched host task. Bounded-tail summary by
 * default; `full` dumps the entire raw combined-stdout log.
 */
export declare function showHostTaskLog(id: string, follow: boolean, full?: boolean): Promise<HostLogResult>;
/**
 * Machine-readable form of a host-dispatch task's log — the task record plus its
 * combined stdout. Powers `agents logs <id> --json` for the host-task branch.
 * Reconciles a still-'running' record from the remote `.exit` first, like the
 * text path does.
 */
export declare function hostTaskLogJson(id: string): {
    found: boolean;
    task?: HostTask;
    log?: string | null;
};
/** Last `n` lines of `text`, prefixed with an elision note when truncated. */
export declare function tailLines(text: string, n: number): string;
