/**
 * Log reading utilities for the broker SDK.
 *
 * Reads agent logs from the local filesystem at
 * `.agent-relay/worker-logs/{agent}.log`.
 */
export interface GetLogsOptions {
    /** Directory containing worker logs. Defaults to `.agent-relay/worker-logs` in cwd. */
    logsDir?: string;
    /** Number of lines to return from the end. Default: 50 */
    lines?: number;
}
export interface LogsResult {
    agent: string;
    content: string;
    found: boolean;
    lineCount: number;
    /** Other agents that have log files (populated when `found` is false). */
    availableAgents?: string[];
}
export type LogFollowEvent = {
    type: "subscribed";
    agent: string;
} | {
    type: "history";
    agent: string;
    lines: string[];
} | {
    type: "log";
    agent: string;
    content: string;
} | {
    type: "error";
    agent: string;
    error: string;
    availableAgents?: string[];
};
export interface FollowLogsOptions {
    /** Directory containing worker logs. Defaults to `.agent-relay/worker-logs` in cwd. */
    logsDir?: string;
    /** Poll interval in ms for new log content. Default: 1000 */
    pollMs?: number;
    /** Number of history lines to emit on initial subscribe. Default: 200 */
    historyLines?: number;
    /**
     * If true, subscribe even if the log file is not present yet.
     * A `subscribed` + empty `history` event is emitted and follow continues.
     */
    allowMissing?: boolean;
    /** Event sink for subscribe/history/log/error events. */
    onEvent: (event: LogFollowEvent) => void;
}
export interface LogFollowHandle {
    unsubscribe: () => void;
}
/**
 * Get logs for a specific agent.
 *
 * @example
 * ```ts
 * import { getLogs } from "@agent-relay/sdk";
 *
 * const result = await getLogs("Worker1", { lines: 100 });
 * if (result.found) {
 *   console.log(result.content);
 * }
 * ```
 */
export declare function getLogs(agent: string, options?: GetLogsOptions): Promise<LogsResult>;
/**
 * Follow an agent log file by polling local filesystem for appended content.
 *
 * Emits:
 * - `subscribed` once
 * - `history` once (initial tail)
 * - `log` for incremental content
 * - `error` if subscription cannot be established
 *
 * @example
 * ```ts
 * import { followLogs } from "@agent-relay/sdk";
 *
 * const handle = followLogs("Worker1", {
 *   historyLines: 100,
 *   onEvent(event) {
 *     if (event.type === "log") console.log(event.content);
 *   },
 * });
 *
 * setTimeout(() => handle.unsubscribe(), 30_000);
 * ```
 */
export declare function followLogs(agent: string, options: FollowLogsOptions): LogFollowHandle;
/**
 * List all agents that have log files.
 *
 * @example
 * ```ts
 * import { listLoggedAgents } from "@agent-relay/sdk";
 *
 * const agents = await listLoggedAgents();
 * console.log("Agents with logs:", agents);
 * ```
 */
export declare function listLoggedAgents(logsDir?: string): Promise<string[]>;
//# sourceMappingURL=logs.d.ts.map