import { type TreeNode } from "../internal/file-tree/index.js";
import type { WorkspaceEntry } from "./useWorkspaceEntries.js";
import type { WorkspaceFileEntry, WorkspaceFileLister } from "./WorkspaceFileLister.js";
/**
 * A processed listing for one workspace entry.
 *
 * Advisory `notice` entries (e.g. GitHub's "tree truncated" marker) are removed
 * from {@link WorkspaceListing.files} and never enter {@link WorkspaceListing.tree};
 * their presence is collapsed into {@link WorkspaceListing.truncated} so both the
 * accordion and search render one honest "results may be incomplete" banner
 * instead of a fake, clickable row (DD-11).
 */
export interface WorkspaceListing {
    /** Openable entries (files and directories); advisory notices removed. */
    readonly files: readonly WorkspaceFileEntry[];
    /** Hierarchy of the openable files (directories excluded), ready for `FileTreeNode`. */
    readonly tree: readonly TreeNode[];
    /** `true` when the lister signalled the listing was incomplete (too many files). */
    readonly truncated: boolean;
}
/** Options for {@link loadEntryFiles}. */
export interface LoadEntryFilesOptions {
    /** Skip the cache and re-call the lister (the accordion's Refresh action). */
    readonly bustCache?: boolean;
}
/**
 * Returns a cached {@link WorkspaceListing} for an entry synchronously, or
 * `undefined` when nothing is cached. Lets a consumer render a warm listing
 * instantly (no loading flash) before deciding whether to fetch.
 */
export declare function peekEntryListing(entryId: string): WorkspaceListing | undefined;
/**
 * Loads and caches the processed listing for a single workspace entry.
 *
 * Returns the cached listing when present (unless `bustCache`), otherwise calls
 * the platform-injected `lister`, processes the raw entries once, and caches the
 * result. Returns `null` when the lister returns `null` (substrate unsupported
 * for this entry) — the honest "unavailable here" signal, not cached.
 */
export declare function loadEntryFiles(entry: WorkspaceEntry, lister: WorkspaceFileLister, options?: LoadEntryFilesOptions): Promise<WorkspaceListing | null>;
/**
 * Clears the shared cache. Test-only seam for deterministic isolation.
 *
 * @internal
 */
export declare function __clearWorkspaceListingCache(): void;
//# sourceMappingURL=workspaceListingCache.d.ts.map