import type { Logger } from './types.js';
export interface ObservedJsonl {
    /** Absolute path of the JSONL file Claude Code wrote. */
    jsonlPath: string;
    /** Intrinsic session id (the JSONL basename, no `.jsonl` extension). */
    claudeSessionId: string;
}
export interface ObservationHandle {
    /** Resolves with the observed file once the head bytes match the bridge
     *  suffix. Resolves with `null` after `cancel()` is called and no match
     *  ever fired. Never rejects — observation failures are logged and the
     *  pending registration is left in place until cancel. */
    promise: Promise<ObservedJsonl | null>;
    /** Removes the pending observation. If a match fires after cancel, the
     *  resolve is a no-op. Safe to call multiple times. */
    cancel: () => void;
}
export interface JsonlObserver {
    /** Register a pending observation. Returns immediately. */
    observe(opts: {
        bridgeSuffix: string;
    }): ObservationHandle;
    /** Stop the underlying fs.watch. Tests use this for cleanup. */
    close(): void;
}
export declare function createJsonlObserver(opts: {
    projectsDir: string;
    logger: Logger;
}): JsonlObserver;
//# sourceMappingURL=jsonl-observer.d.ts.map