/**
 * Pure session state tracker — zero external imports.
 *
 * Lives in `core/` so that `ToolExecutionContext` (in `core-types.ts`) can
 * reference it without violating the boundary rule that `core/` never imports
 * from `app/`.
 *
 * Combines two concerns:
 *   1. Read-before-edit tracking — which files has the agent read this session?
 *   2. File-unchanged optimization — content hash per file so tools can skip
 *      re-reading files whose content hasn't changed since the last read.
 *   3. Session-scoped filesystem approval grants.
 */
export interface FilesystemApprovalGrant {
    /** Canonical absolute root or file path approved for this session. */
    path: string;
    /** Access level granted under the approved path. */
    access: 'read' | 'write';
    /** Whether the grant applies to the exact file or everything under a folder root. */
    scope: 'file' | 'folder';
}
/** Snapshot recorded when a file is read. */
export interface ReadEntry {
    /** Content hash (e.g. SHA-256 hex) at the time of read. */
    hash: string;
    /** AgentController loop turn number when the read occurred. */
    turnNumber: number;
}
/**
 * Tracks per-file read state and an internal turn counter for the agent session.
 *
 * All paths must be absolute. The class does not normalize or validate paths —
 * callers are responsible for canonicalization.
 */
export declare class SessionState {
    /** Backing store: absolute path -> read snapshot (used for hash caching). */
    private readonly _reads;
    /** Paths that have been read at any point — never cleared by markModified. */
    private readonly _everRead;
    /** Monotonically increasing turn counter. */
    private _currentTurn;
    /** Session-scoped filesystem approval grants. */
    private readonly _filesystemApprovalGrants;
    /** Current turn number. */
    get currentTurn(): number;
    /** Advance the turn counter by one. Call once per agent loop iteration. */
    incrementTurn(): void;
    /**
     * Record that a file was read with the given content hash at a specific turn.
     *
     * @param absolutePath — Canonical absolute path of the file.
     * @param contentHash  — Hash of the file content at read time.
     * @param turnNumber   — The turn in which the read occurred.
     */
    markRead(absolutePath: string, contentHash: string, turnNumber: number): void;
    /** Whether the file has been read at any point during this session. */
    hasBeenRead(absolutePath: string): boolean;
    /**
     * Return the cached read state for a file, or `undefined` if the file has
     * not been read (or was invalidated by {@link markModified}).
     */
    getReadState(absolutePath: string): ReadEntry | undefined;
    /**
     * Invalidate cached read state for a file.
     *
     * Call this when a tool modifies a file so the next read returns full
     * content instead of a "file unchanged" short-circuit.
     */
    markModified(absolutePath: string): void;
    grantFilesystemAccess(path: string, access: 'read' | 'write', scope: 'file' | 'folder'): void;
    getFilesystemApprovalGrants(): FilesystemApprovalGrant[];
}
//# sourceMappingURL=session-state.d.ts.map