/** * The project-level plugin DECLARATION that `vigiles init` writes into a repo's * `.claude/settings.json`. * * ⚠️ **What this does and does not buy — the claim matters.** Writing * `extraKnownMarketplaces` + `enabledPlugins` does **NOT** make the plugin * available to a collaborator. Per the Claude Code docs (Discover plugins → * "Configure team marketplaces"), as of CC v2.1.195: * * > A plugin that only the project's `.claude/settings.json` enables, and that * > comes from an external source such as a GitHub repository or npm package, * > doesn't load until the team member installs it. Until then, Claude Code * > reports the plugin as not installed and shows the `claude plugin install` * > command to run. * * vigiles ships from a GitHub marketplace, so that is exactly our case, and the * boundary is deliberate: plugins "can execute arbitrary code on your machine * with your user privileges", so a repo is not allowed to install one for you. * * The declaration buys exactly one thing: a collaborator who clones the repo is * told the project wants this plugin, with the command that installs it. * **Silent absence becomes a prompt.** It does not become a working install. What * the plugin adds on their machine is the HOOKS; the SKILLS do not depend on it * any more — `init` links them into `.claude/skills/` (`./skill-links.ts`), and * the links travel with the clone. * * Nothing is vendored: what lands in the repo is a *reference* (a marketplace * source plus an enabled flag). The plugin content still lives in the global * cache, one copy shared across every repo on the machine. * * Both directions are PURE functions over the parsed settings object, so the * merge rules are unit-tested without touching a file. The rule that matters * most is **never clobber**: this file holds the user's hooks, permissions and * other plugins, and destroying it would be far worse than the silence. */ /** The marketplace name vigiles registers under. */ export declare const VIGILES_MARKETPLACE_NAME = "vigiles"; /** The plugin id `claude plugin install` records — `@`. */ export declare const VIGILES_PLUGIN_ID = "vigiles@vigiles"; /** The marketplace entry `init` writes (a reference, not vendored content). */ export declare const VIGILES_MARKETPLACE_ENTRY: { readonly source: { readonly source: "github"; readonly repo: "zernie/vigiles"; }; }; /** The result of an edit: the new settings, whether anything moved, and why. */ export interface DeclarationEdit { /** A NEW object — the input is never mutated. */ readonly settings: Record; /** False when the file already said what we wanted it to say. */ readonly changed: boolean; /** Human-readable notes for the CLI to print (never invented state). */ readonly notes: readonly string[]; } /** * Add the vigiles marketplace + enabled flag, **merging** into whatever is * already there. Pure — returns a new object. * * Two deliberate non-actions, both cases of "an existing answer is the user's * answer, not a gap to fill": * * - An existing `extraKnownMarketplaces.vigiles` is left **exactly** as-is. It * may point at a fork or a pinned ref, and rewriting it to upstream would * silently retarget their install. * - An existing `enabledPlugins["vigiles@vigiles"]` is left as-is **including * when it is `false`** — that is a deliberate disable, and flipping it back * would be the clobber this function exists to avoid. */ export declare function addVigilesDeclaration(settings: Record): DeclarationEdit; /** * Remove exactly what {@link addVigilesDeclaration} writes, and nothing else. * Pure. Other marketplaces and other plugins are never touched; a parent object * left empty is dropped so the file isn't littered with `{}`. * * Note what this deliberately does NOT do: uninstall the global plugin. That * install is shared by every repo on the machine, so one project cannot speak * for the others. */ export declare function removeVigilesDeclaration(settings: Record): DeclarationEdit; //# sourceMappingURL=plugin-declaration.d.ts.map