import type { CLISpec } from '../../commands/cli/types.ts'; import type { CLIInstall } from './types.ts'; /** * Installed CLIs, keyed by head word. * * Fully separate from the mount registry: a CLI exists because it was * installed (YAML `clis:` section or registerCli), never because * storage was mounted. Install is fail-loud: a bad name, a colliding * name, or a config the spec's configModel rejects throws at install * time, so a workspace that loads has only valid entries. * * The lifecycle is host-side only, and must stay that way: install and * uninstall are called by the program embedding mirage, never by a line * the agent types, so an agent cannot take away the tools it was given. * Do not add an `install`/`uninstall` shell builtin. What an agent can * do is shadow a head word with a shell function, which is bash's own * rule, reversible with `unset -f`, bypassable with `command `, * and visible through `type -a`. Pinning a head word against that * belongs in the policy layer's `preCommand`, since it is a * per-deployment call rather than a property of the registry. */ export declare class CLIRegistry { private readonly installs; /** * Install a CLI under a head word. The name must be a single word and * must not collide with another installed CLI, a shell builtin, or a * general command (a runtime capture of the same name is fine: the * policy steers per line). */ install(name: string, spec: CLISpec, config?: Record | null): CLIInstall; private validateConfig; /** Remove an installed CLI; its head word stops resolving (127). */ uninstall(name: string): void; /** Look up an installation by head word. */ get(name: string): CLIInstall | null; /** Snapshot of the installed CLIs keyed by head word. */ items(): Map; /** The installed head words. */ names(): ReadonlySet; } //# sourceMappingURL=registry.d.ts.map