import type { OutputEvent } from './types/session-types.js'; export interface BgJobMeta { jobId: string; subagentId: string; label: string; promptHash: string; model: string; startedAt: number; endedAt?: number; status: 'running' | 'completed' | 'failed' | 'cancelled'; parentSessionId?: string; stopReason?: string; schemaVersion: 1; } export declare class BgJobLogWriter { private readonly jobId; private readonly logPath; private readonly metaPath; private stream; private errored; private closed; private streamReady; private pendingLines; private readyPromise; private readyResolve; private metaWriteQueue; constructor(jobId: string); write(event: OutputEvent): void; private _openStream; private _writeLine; close(): Promise; writeMeta(meta: BgJobMeta): Promise; private _writeMetaInner; } export declare class BgJobLogReader { static listJobs(): Promise; static readMeta(jobId: string): Promise; static readEvents(jobId: string): AsyncGenerator; static tailEvents(jobId: string, opts?: { fromStart?: boolean; }): AsyncGenerator; }