/**
 * Coding-agent specific {@link Filesystem} adapter for the hashline patcher.
 *
 * Wires hashline's storage abstraction to the agent runtime:
 *
 * - Section paths are resolved through the plan-mode redirect so a bare
 *   `PLAN.md` lands at the canonical session artifact location.
 * - Reads go through `readEditFileText` (notebook-aware) and the
 *   auto-generated-file guard.
 * - Writes go through `serializeEditFileText` (notebook-aware) and the
 *   LSP writethrough, with FS-scan cache invalidation on success. The
 *   resulting `FileDiagnosticsResult` is captured per-path so the
 *   orchestrator can attach it to the tool result.
 *
 * Construct one per `executeHashlineSingle` call: per-section state
 * (batch request, diagnostics) lives on the instance and isn't safe to
 * share across concurrent edit tools.
 */
import { Filesystem, type WriteResult } from "@pk-nerdsaver-ai/hashline";
import type { FileDiagnosticsResult, WritethroughCallback, WritethroughDeferredHandle } from "../../lsp";
import type { ToolSession } from "../../tools";
import type { LspBatchRequest } from "../renderer";
export interface HashlineFilesystemOptions {
    session: ToolSession;
    writethrough: WritethroughCallback;
    beginDeferredDiagnosticsForPath: (path: string) => WritethroughDeferredHandle;
    signal?: AbortSignal;
    /**
     * Outer LSP batch request inherited from the tool-call context. The
     * orchestrator narrows this per-section (flush only on the final write)
     * via {@link HashlineFilesystem.setBatchRequest}.
     */
    batchRequest?: LspBatchRequest;
}
export declare class HashlineFilesystem extends Filesystem {
    #private;
    readonly session: ToolSession;
    constructor(options: HashlineFilesystemOptions);
    /**
     * Set the LSP batch request used for the next {@link writeText} call.
     * Multi-section orchestrators flip the `flush` flag to true before the
     * final section so LSP diagnostics flush in one round-trip.
     */
    setBatchRequest(batchRequest: LspBatchRequest | undefined): void;
    /**
     * Look up (and clear) the diagnostics captured by the most-recent
     * {@link writeText} call for `path`. Returns `undefined` if no write
     * has happened or the writethrough returned no diagnostics.
     */
    consumeDiagnostics(path: string): FileDiagnosticsResult | undefined;
    resolveAbsolute(relativePath: string): string;
    canonicalPath(relativePath: string): string;
    readText(relativePath: string): Promise<string>;
    preflightWrite(relativePath: string): Promise<void>;
    writeText(relativePath: string, content: string): Promise<WriteResult>;
    exists(relativePath: string): Promise<boolean>;
}
