/** * Monitor registry — session-scoped bookkeeping for line-oriented monitors. * * A monitor is a detached background command (task subsystem) whose log is * swept at turn boundaries; new lines land in the next turn's user content * as a bracketed block. The registry owns read offsets so the task-side * meta.json single-writer contract (runner only) stays intact. * * Volume cutoff: a monitor producing more than MAX_LINES_PER_SWEEP lines in * one sweep, or MAX_EVENTS_PER_SESSION lines overall, is auto-paused with a * note — a flooding monitor must not drown the conversation. Restart it * with a tighter filter pattern instead. */ export declare const MAX_LINES_PER_SWEEP = 50; export declare const MAX_EVENTS_PER_SESSION = 200; export interface MonitorEntry { taskRunId: string; label: string; pattern?: RegExp; byteOffset: number; eventsDelivered: number; paused: boolean; pausedReason?: string; } export declare function resetMonitors(): void; export declare function registerMonitor(entry: { taskRunId: string; label: string; pattern?: RegExp; }): void; export declare function getMonitor(taskRunId: string): MonitorEntry | undefined; export declare function removeMonitor(taskRunId: string): boolean; export declare function listMonitors(): MonitorEntry[]; export interface MonitorSweepResult { /** Ready-to-append blocks, one per monitor with fresh lines. */ blocks: string[]; } /** * Read fresh log lines for every active monitor. Called at turn boundaries * by the agent loop; safe to call often (offset-tracked, no re-reads). */ export declare function sweepMonitors(): MonitorSweepResult;