/** * Is `target` inside `root` (or `root` itself), after normalization? Traversal-safe: the check is * on the RESOLVED relative path's first segment, so `/root/../evil` never passes, and a sibling * whose name merely starts with dots (`/a/..hidden`) is not wrongly excluded. */ export declare function isInsideRoot(root: string, target: string): boolean; /** The session fields the root set is derived from — structural on purpose, so this stays a leaf * module (routes.ts hands it the wire-shape `SessionView.session`; tests hand it a literal). */ export interface RootSourceSession { workdir?: string | null; extra_write_roots?: string[] | null; } /** * The ONE root set a caller-supplied path is contained against (DES-FEEDBACK-002 CREW-1): * the run's workdir + its `extra_write_roots` (when a run is in play) + every registered repo * root. Extracted from the `POST /open` handler so `/open`, `GET /runs/:id/files`, and * `GET /runs/:id/diff` cannot drift — three copies of a containment root set is how one of * them quietly widens. */ export declare function allowedRootsFor(session: RootSourceSession | undefined, repos: ReadonlyArray<{ root_path: string; }>): string[]; /** The platform's opener invocation. Exported for tests; args are always a real argv array. */ export declare function platformOpenCommand(target: string): { cmd: string; args: string[]; }; /** * Spawn the platform opener, detached, and resolve on SPAWN success (the OS accepted the process — * what the opener then does with the path is the desktop environment's business). Rejects when the * opener binary itself cannot be spawned, which the route reports as 502. */ export declare function openWithSystemDefault(target: string): Promise; //# sourceMappingURL=open-path.d.ts.map