UNPKG

@code-yeongyu/senpi

Version:

Coding agent CLI with read, bash, edit, write tools and session management

37 lines • 1.9 kB
import { type MonitorSpill } from "./monitor-overflow.ts"; import type { MonitorEvent } from "./monitor-registry.ts"; import { type TerminalNotifierDeps } from "./notify.ts"; import type { MonitorDeliverySettings } from "./settings.ts"; export type { MonitorSpill, MonitorSpillResult } from "./monitor-overflow.ts"; export interface MonitorNotificationScheduler { now(): number; setTimeout(callback: () => void, delayMs: number): unknown; clearTimeout(timer: unknown): void; } export interface MonitorNotifierDeps extends TerminalNotifierDeps { readonly getSettings: () => MonitorDeliverySettings; /** Pause the monitors contributing to a shared wake-budget exhaustion. */ readonly pauseMonitors: (ids: readonly string[]) => readonly string[]; /** Wake rate (and burst) of a paced monitor; undefined leaves the monitor unpaced. */ readonly wakesPerHour?: (id: string) => number | undefined; /** Append overflow lines to the monitor's overflow file; undefined when it has none. */ readonly spillOverflow?: MonitorSpill; readonly scheduler?: MonitorNotificationScheduler; } /** * Session-scoped monitor delivery queue. It preserves the terminal runtime as the authoritative, * bounded event history while retaining only capped per-monitor batches for chat injection. A * wake is filled by whole monitors; a monitor that does not fit stays queued for the next wake. */ export declare class MonitorNotifier { #private; constructor(deps: MonitorNotifierDeps); notifyEvent(event: MonitorEvent): void; /** Any explicit user or tool activity breaks a consecutive monitor-only wake streak. */ noteActivity(): void; /** Clear delivery bookkeeping for monitors explicitly resumed by the registry. */ resume(ids: readonly string[]): void; rearm(id: string): void; dispose(): void; } //# sourceMappingURL=monitor-notify.d.ts.map