/** * The skills root is `/skills` — full stop. Not a setting, not an env override. * * Design v3.1 §1 (ONE storage root: every crew store hangs off `crewStateHome()`) and v3.2 §1 (wicked * never writes into the user's own CLI directories) leave no room for a configurable root: codex * round 5 on #480 showed that a `skills_root` setting (or `WICKED_CREW_SKILLS_ROOT`) accepting any * absolute path let `PUT /settings {skills_root: "~/.codex/skills"}` make the SEED write into the * user's codex skills before the runtime got around to reporting the location as incompatible. Both * are retired (coordinator decision). What remains is this BOOT ASSERTION, evaluated by * `createServer` before the store is constructed: the root's CANONICAL path must lie inside the * daemon state home and outside every known user-level CLI directory, and the root entry itself * must not be a symlink. A violation is `SkillsRootUnfencedError` — a daemon start error, never a * warning after the first write. * * This is the one skills module beside plugin-source.ts that reads `homedir()` — to REFUSE roots, * never to write: it imports nothing that writes (tests/skills-no-user-cli-writes.test.ts pins * both facts). */ /** The skills root would lie outside the state home or inside a user CLI directory — the daemon does not start. */ export declare class SkillsRootUnfencedError extends Error { readonly root: string; constructor(root: string, detail: string); } /** * The user-level CLI configuration directories wicked must never write (design v3.2 §1), for `home`: * codex, pi, copilot, opencode, Claude Code — the literal `~/.claude` AND every dir the daemon's own * `CLAUDE_CONFIG_DIR` lists when it points elsewhere (those are the config dirs the user's Claude reads). */ export declare function userCliDirs(home?: string, env?: NodeJS.ProcessEnv): string[]; /** * The canonical spelling of `p`: the realpath of its deepest EXISTING ancestor with the missing tail * re-joined — so a root that does not exist yet is judged by where it WOULD land, links in its * ancestry resolved. Errors other than "does not exist" propagate (an unreadable ancestor is not * judged lexically). */ export declare function canonicalPath(p: string): string; export interface RootFenceOptions { /** The daemon state home (`crewStateHome()`) the root must lie inside. */ stateHome: string; /** The user's home (tests inject a fake one). */ home?: string; env?: NodeJS.ProcessEnv; } /** * Refuse a skills root that (1) is a symlink itself, (2) canonically lies outside the state home, or * (3) canonically lies inside a user CLI directory. Answers the canonical root. Throws * `SkillsRootUnfencedError`. A root that does not exist yet is judged by its would-be canonical path. */ export declare function assertSkillsRootFenced(root: string, opts: RootFenceOptions): { root: string; canonical: string; }; //# sourceMappingURL=root-fence.d.ts.map