import type { Api } from "@cargo-ai/api"; import type { Command } from "commander"; import { type Cookbook } from "../cookbook.js"; /** A file the install would write: absolute source, project-relative target. */ type PlannedFile = { source: string; target: string; }; export declare function registerAddCommands(parent: Command, getApi: () => Api): void; /** * Copy one cookbook's files into an existing project. Shared by `add` and by * `init`'s wizard, so there is exactly one implementation of "which files land * where, and what happens when one already exists". * * Returns undefined only when the user declined the write. A project that * already has every file the cookbook ships is a successful install of zero * files, not a refusal: the cookbook is present and still needs setting up, so * the caller has the same work to describe either way. */ export declare function installCookbook(payload: { root: string; /** Where the CDK project lives — `root`, or its `infra/`. */ cdkDir: string; cookbook: Cookbook; overwrite: boolean; confirm: boolean; quiet: boolean; }): Promise<{ written: string[]; skipped: string[]; /** * Every file the cookbook occupies in this project, whether this run * wrote it or found it already there. Where a cookbook *is* does not * depend on which run put it there, so this — not `written` — is what * the checklist and the agent brief describe. */ occupied: string[]; } | undefined>; /** * Where each of the cookbook's files lands: `infra/` under the project's * `infra//`, `scripts/` under `scripts//`, everything else under * `//` for each of `SKILLS_DIRECTORIES` — beside the skills the * scaffolded repo already ships. * * A cookbook is a skill that happens to carry resources, so its shape is * `infra/` plus SKILL.md, README.md, `references/` and `evals/` — and the * references only make sense next to the procedure that cites them. `scripts/` * is a third named directory, not skill material: the loader imports every * `.ts` under `infra/`, and a repo root already holds `scripts/` whose files * run on import, so cookbook scripts belong there, namespaced, not inside * either half. Splitting on the directories the convention names keeps each * piece whole, and keeps relative paths inside a piece intact: a resource * file reaches its assets by relative path, so anything that moves has to * move together. * * The skill half is written once per agent convention rather than once: no * single directory is read by every agent, and `MIRROR_SKILLS_DIRECTORIES` * explains the split. The resource half and the scripts half are written * once — they are loaded or run by path, not discovered by convention, and * duplicating them would register every resource twice or leave two copies * of the same runnable file. * * Every piece stays namespaced by cookbook. The loader scans every `.ts` * under the project root, so `infra//` is discovered like any other * directory, while two cookbooks that both declare a HubSpot connector stay * out of each other's way. A genuine slug clash between them still fails in * `register`. */ export declare function planFiles(sourceDir: string, name: string): PlannedFile[]; /** * The brief handed to a coding agent after a cookbook is installed. * * The cookbook ships its own procedure at `skills//SKILL.md`, and that * file — not this prompt — is the authority on what it needs and which * adaptations are declared rather than forks. But it is written for someone * who found the folder in gtm-skills and still has to place it, so read from * the top it opens on `cdk init` and "copy this folder in": follow it in order * after `add` and the first thing you do is undo the install. * * So this is not a summary of the procedure, it is an ordering over it — * where the files landed, where to start reading, and which of the declared * inputs to look up rather than ask for. Everything past the ordering stays in * SKILL.md. */ export declare function cookbookPrompt(cookbook: Cookbook, /** Every file the cookbook occupies here — see `installCookbook`. */ files: readonly string[], /** Project-relative path to the seeded company brief, when there is one. */ companyContextPath?: string): string; export {}; //# sourceMappingURL=add.d.ts.map