/** * asset-roots.ts — the single definition of *where* skaile-owned content lives. * * The policy sits in `core/` rather than next to either of its callers because * both layers that need it already depend on `core/`: the CLI's discovery * surfaces (`flow list`, completions, skill walking) and the flow connector's * resolution surfaces under `factory-assets/` (`resume`, sub-flow targets, * `serve`). Keeping it in `cli/` instead would force a `factory-assets → cli` * import, which is a real module cycle — and duplicating it there is exactly * how the two lists drifted apart in the first place. */ /** * Root of the per-user skaile data directory (`~/.skaile`). * * Deliberately **not** routed through `globalSkaileDir()`: that one honours * `$SKAILE_HOME`, this one is the fixed home-relative path the library, index * and config layers have always written to. Reconciling the two would move * users' data, so it is a behaviour change rather than a cleanup. * * @docLink packages/core/concepts#discovery */ export declare function skaileHomeDir(): string; /** * The library checkouts directory before any environment override — the value * `getConfigDefaults()` reports as the *default*, which must stay independent of * `SKAILE_LIBRARIES_DIR` so a config file can still be seen to override it. * Callers that want the effective directory want {@link resolveLibraryDir}. * * @docLink packages/core/concepts#discovery */ export declare function defaultLibraryDir(): string; /** * Resolve the active library checkouts directory. * * `SKAILE_LIBRARIES_DIR` overrides the default `~/.skaile/libraries`. * * @docLink packages/core/concepts#discovery */ export declare function resolveLibraryDir(): string; /** * All content roots that skill / flow discovery should walk, in priority order, * filtered to those that exist on disk and de-duplicated. * * Four layers, in this order: * 1. The project-local install root `/.skaile/`, where * `skaile install` / `skaile add` deploy flows. * 2. The first-party `factory-assets/` roots from the shared `factoryAssetRoots()` * helper — the `SKAILE_FACTORY_ASSETS_DIR` override layer (when set) ahead of * the bundled tree (in-repo source in dev, `dist/factory-assets/` after * install). No monorepo special-case. * 3. The user-library dir `~/.skaile/libraries/`. * 4. The user-global install root `~/.skaile/`. * * Order is significant: `findSkills` / flow discovery dedupe first-root-wins, so * the env override shadows the bundled tree on a name clash. The project-local * install root leads because `deployAll` applies `patches:` to the deployed copy * — that copy, not the factory original, is the project's effective flow. * * Only `flow` installs into skaile's own `.skaile/` tree; every other asset kind * installs into the driver's directory (`.claude/`, `.omp/`, `.codex/`), which * the driver reads natively and skaile deliberately does not enumerate. So the * roots below are exactly the skaile-owned ones — an invariant asserted by * `cli/tests/installed-asset-roots.test.ts`. * * This is the discovery surface used by `findSkills`, flow discovery, and the * completion resolvers; flow *resolution* walks these same roots behind * `flowLookupRoots`, which only prepends the project's own `ai-assets/` tree. * * @param projectDir - Project directory whose local install root to include * (default: `process.cwd()`). * @docLink packages/core/concepts#discovery */ export declare function aiResourceRoots(projectDir?: string): string[]; //# sourceMappingURL=asset-roots.d.ts.map