import type { TokensaveCli } from "./cli.js"; import type { GraphArtifactStore } from "./artifact-store.js"; import type { IncidentLog } from "./incidents.js"; import type { GraphSection } from "../config/schema.js"; /** * Debounces PostToolUse Edit|Write events and forwards path batches to * TokensaveCli.sync. Owns: * - In-memory Set of pending paths (cap = config.hookQueueMax). * - A single debounce Timer (window = config.debounceMs). * - A 100ms poll loop reading .bober/graph/.hook-queue.jsonl. * * onPostToolUse is synchronous (fire-and-forget). flush() drains the queue * with a 5000ms total budget — called from GraphPipelineLifecycle.stop() * before the engine is killed. */ export declare class GraphHookHandler { private readonly cli; private readonly store; private readonly incidents; private readonly config; private readonly queue; private debounceTimer; private pollTimer; private overflowBatch; private syncing; private stopped; private readonly queueFilePath; private static readonly FLUSH_BUDGET_MS; private static readonly POLL_INTERVAL_MS; private static readonly OVERFLOW_EVICT; private static readonly OVERFLOW_WARN_EVERY; constructor(cli: TokensaveCli, store: GraphArtifactStore, incidents: IncidentLog, config: GraphSection, projectRoot: string); /** Begin polling the IPC queue file. Called once at lifecycle start(). */ start(): void; /** * Synchronous fire-and-forget entry point. * Adds paths to queue; resets debounce timer; on cap-overflow drops oldest. * Returns immediately — NO awaits. */ onPostToolUse(payload: { paths: string[]; }): void; /** Drain queue with FLUSH_BUDGET_MS total budget. Called from lifecycle.stop(). */ flush(): Promise; private evictOldest; private runSync; private markPending; private drainIpcFile; } //# sourceMappingURL=hook-handler.d.ts.map