/** * The boot-time half of the tool-name collision check: a contributor claiming a * name the deployment's OWN extracted host tools already own. * * Pure functions of what boot already knows, so the message is testable on its * own rather than only observable as console noise from a booted server. */ import { VendoError } from "../core/index.js"; /** * The `.vendo` directory a configured `profileDir` means — the SAME rule the tool * registry's own reader uses (`readOptionalVendoJson` in @vendoai/vendo/actions): * `dir` may be the host root, in which case `.vendo` is inside it, or the * `.vendo` directory itself. * * Getting this wrong is not a wrong answer, it is NO answer: a gate that always * appended `/.vendo/` read nothing at all when `profileDir` pointed at `.vendo`, * so the boot check silently passed and the collision reverted to the * first-request failure the check exists to prevent. * * String-only on purpose (no `node:path`): this file is reachable from edge * bundles, and the comparison is exact enough — a directory merely ending in the * letters "vendo" is not `.vendo`. */ export declare const vendoDirOf: (dir: string) => string; /** * The host tool names in a `tools.json` document. * * Best-effort by design: a malformed or absent file yields no names. The registry * is the real parser and reports properly on a bad file; this gate exists to say * something useful early, never to become a second validator that could refuse a * boot the registry would have accepted. */ export declare const hostToolNamesIn: (raw: string | undefined) => string[]; /** * A contributor claiming a tool name the HOST's own tools already own. * * The registry refuses this collision on its own — it throws `conflict` — but * only when it first loads, on some later request, and its message names just * the second arrival ("from added registry"): nothing says which contributor, or * what it hit. This is the boot-time half, and it throws, so the deployment * never starts in a state where every tool call is going to fail. * * It compares against the host tool names composition already has WITHOUT doing * any I/O. Connector tools are not here on purpose: knowing them means a network * round trip, and making `createVendo` reach the network to compose would be a * far worse trade than leaving that rarer collision to the registry. */ export declare const hostToolCollision: (toolOwners: ReadonlyMap, hostToolNames: readonly string[]) => VendoError | undefined;