/** * The `.vendo/` surface readers the composition uses at compose time. * * Moved out of server.ts with the composition they serve; every one is a pure, * fail-soft read, and nothing here reaches the network. */ import type { ExtractedTool } from "./actions/index.js"; import { type SeedBaseline } from "./apps/index.js"; import { type ToolDefinition } from "./core/index.js"; import { type VendoTheme } from "./core/apps/index.js"; import type { CreateVendoConfig } from "./types.js"; /** 09 §4 — the .vendo/ files feeding the generation seat, read fail-soft (the composition works without them; on non-Node runtimes they just stay unset). Reads `node:fs` through the runtime built-in accessor so this module carries NO static Node import and still loads/bundles for edge/Worker targets. `root` is a `profileDir`, so it goes through `vendoDirOf` — it may be the host root or the `.vendo` directory itself, exactly like the actions registry's reader. Appending unconditionally reads `.vendo/.vendo/…`, which fail-soft turns into silence: theme, brief, catalog and knowledge all vanish with no error. */ export declare function dotVendoFile(name: string, root?: string): string | undefined; /** A synchronous, throw-free read of one file, for the compose-time gates. */ export declare function readFileSyncOrUndefined(path: string): string | undefined; /** * The host's own tool names, as far as composition can know them without doing * any I/O beyond one file read: the in-memory `profile.tools` piece, else * `tools.json` from the SAME directory the tool registry resolves it from. * * `vendoDirOf` is the registry's own rule (`profileDir` may be the host root or * the `.vendo` directory itself). Using anything else here made the gate read a * different file — or no file — and a gate that reads nothing passes everything. */ export declare function hostToolNames(config: CreateVendoConfig): string[]; /** * ADAPTER RULE, host-tool declarations (§10's `tools:` slot): the ONE place the * in-memory host-tool list is chosen, so the compose-time gate, the actions * registry and the development-capture baseline can never read different sets. * * `tools:` beats the deprecated `profile.tools` rather than the other way round. * The `apps.designRules` precedent — longer-standing knob wins — is about two * knobs of equal standing; this is a slot and its own former spelling, and a host * who adds the documented slot expects it to take effect. */ export declare function selectHostTools(config: CreateVendoConfig): ExtractedTool[] | undefined; /** The executable half of `tools:` — what joins the one registry as a * contribution rather than as a `.vendo` declaration. */ export declare function hostToolDefinitions(config: CreateVendoConfig): ToolDefinition[]; /** The compose-time project root for .vendo reads that happen LATER (the per-generation design-rules read): pinning it keeps a host that chdirs mid-run reading the same project every other .vendo input came from. */ export declare function dotVendoRoot(): string | undefined; /** Parse a theme surface body (from `.vendo/theme.json` or, when it later gains a cloud leg, the published doc). Malformed → undefined, same fail-soft stance as the rest of the .vendo readers. */ export declare function parseVendoTheme(raw: string | undefined): VendoTheme | undefined; /** 06-apps §8 — load sync-captured host source into the composition. Invalid files are warned and skipped so one bad slot cannot crash the host; an absent directory is the normal zero-remixable-components case. */ export declare function dotVendoSeedBaselines(root?: string): SeedBaseline[];