import type { FeatureMapSnapshot } from "@kenkaiiii/gg-protocol"; export declare const RECHECK_DEBOUNCE_MS = 800; /** * How long a project's map is kept after its last window leaves it. Switching * sessions releases and re-acquires it; without this every return re-ran the * full check (it parses the whole project) on top of the session's own load. */ export declare const RELEASE_KEEP_MS: number; export interface FeatureMapHandle { /** The current map; checks the project first if it hasn't been yet. */ snapshot(): Promise; noteToolStart(toolCallId: string, name: string, args: unknown): void; noteToolEnd(toolCallId: string, isError: boolean): void; /** A run ended: re-list the files and re-read history. */ runEnded(): void; /** Re-check everything now (after any check in flight) and return the new map. */ refresh(): Promise; /** An action was sent to the agent: its history findings clear once its files change. */ act(featureId: string, actionId: string): Promise; release(): void; } export interface FeatureMapWatch { acquire(cwd: string, onChange: (snapshot: FeatureMapSnapshot) => void): FeatureMapHandle; /** Projects being watched. */ size(): number; } /** Tools that change files, across GG's own and Claude Code's names. */ export declare const isWriteTool: (name: string) => boolean; /** Every file path in a write or edit tool's arguments. */ export declare function writePaths(args: unknown): string[]; export declare function createFeatureMapWatch(options: { /** Where addressed actions are kept (`~/.gg/feature-maps`). */ readonly stateDir: string; readonly debounceMs?: number; /** How long a released project's map is kept (see {@link RELEASE_KEEP_MS}). */ readonly keepMs?: number; readonly now?: () => Date; }): FeatureMapWatch;