/** * Extended canonical state surface definitions for the sidecar. * * This module re-exports the extended prefix list and provides the * directory listing function used by SC-02's REST API to enumerate * files under canonical state surfaces. * * @module sidecar/readonly-state-extensions */ import { type ReadOnlyStateOptions } from "./readonly-state.js"; import type { DirectoryEntry } from "./types.js"; /** * Extended canonical prefixes. This constant mirrors the internal * array in {@link module:sidecar/readonly-state.ts} so that consumers * (tests, REST API) can reference the authoritative set without * reaching into the private module const. */ export declare const CANONICAL_PREFIXES: readonly [".hivemind/state", ".hivemind/session-tracker", ".opencode", ".planning"]; /** * List the entries of a directory inside a canonical state surface. * * Returns an empty array when the path is outside the canonical * state surface, when the directory does not exist, or when a * filesystem error occurs — the function never throws. * * @param absoluteDirPath - Absolute path to the directory to list. * @param opts - Read-only state options including the * absolute project root. * @returns An array of {@link DirectoryEntry} objects describing * every entry in the directory. */ export declare function listCanonicalDirectory(absoluteDirPath: string, opts: ReadOnlyStateOptions): DirectoryEntry[]; /** * Convenience helper to build a {@link ReadOnlyStateOptions} object * from a project root path. * * @param projectRoot - Absolute path to the project root. * @returns A {@link ReadOnlyStateOptions} object. */ export declare function createReadOnlyStateOptions(projectRoot: string): ReadOnlyStateOptions; //# sourceMappingURL=readonly-state-extensions.d.ts.map