/** * PeriodicNotifier — periodic silent injection of delegation progress * into parent sessions via combined batch blocks. * * Queues all delegation snapshots within a 2-second batch window, * then flushes ONE combined block with ALL changed * delegations. Single injection path — no double injection. * Fire-and-forget: sendPromptAsync failures are caught and logged. */ export interface DelegationSnapshot { delegationId: string; parentSessionId: string; agent: string; toolCount: number; actionCount: number; elapsedMs: number; } export interface PeriodicNotifierConfig { cadenceMs: number; batchWindowMs?: number; showToast?: boolean; client: unknown; } type InjectFn = (parentSessionId: string, line: string, delegationId?: string) => void; /** * Strips duration string from a formatted line so dedup comparison * focuses on toolCount and actionCount changes, not elapsed time. */ declare function stripDuration(line: string): string; export declare class PeriodicNotifier { private readonly config; private readonly inject; private readonly tracked; private readonly pendingFlush; private flushTimer; private lastBatchHash; private destroyed; constructor(config: PeriodicNotifierConfig, inject: InjectFn); get activeCount(): number; register(snapshot: DelegationSnapshot): void; deregister(delegationId: string): void; handlePollTick(snapshot: DelegationSnapshot): void; private scheduleFlush; private flush; destroy(): void; } export { stripDuration }; //# sourceMappingURL=periodic-notifier.d.ts.map