export declare const ALLOWED_PATHS_ENV = "CROSSPAD_MCP_ALLOWED_PATHS"; export declare const PATH_NOT_ALLOWED = "PATH_NOT_ALLOWED"; /** * `fs.realpathSync` for a path that may not exist yet — `out` names a file the * capture is about to create. Resolve as much of the chain as exists and keep * the rest verbatim, following a dangling symlink by hand: a link inside an * allowed root pointing at /etc is the one case a plain "parent exists, good * enough" check would wave through. */ export declare function realpathLoose(p: string, depth?: number): string; /** The fixed roots: every configured repo, plus the server's own work dirs. */ export declare function allowedRoots(env?: NodeJS.ProcessEnv): string[]; /** What the rejection tells the caller — the roots, named. */ export declare function describeAllowedRoots(env?: NodeJS.ProcessEnv): string[]; export declare function isAllowedPath(p: string, env?: NodeJS.ProcessEnv): boolean; /** * Gate one path-valued tool argument. Returns the resolved path so a caller can * use it; throws a typed HilError naming the roots and the escape hatch when it * lands outside. `undefined` passes through untouched — an argument that was * never given cannot point anywhere. */ export declare function assertAllowedPath(param: string, given: string | undefined | null, env?: NodeJS.ProcessEnv): string | undefined;