/** * Fetches the Senpi skills monorepo via a shallow git clone into a temp directory. * * A single clone per tick is enough to update every skill that needs it, * avoiding N separate GitHub API calls for N skills. */ import type { LoggerLike } from "./types.js"; export interface CloneResult { /** Absolute path to the root of the cloned repo (temp directory). */ cloneDir: string; /** Must be called when done — removes the temp directory. */ cleanup: () => Promise; } /** Options for {@link cloneSkillsRepo}. All optional — sensible defaults from * `constants.ts` apply when omitted. */ export interface CloneSkillsRepoOptions { /** Repo URL to clone. Defaults to {@link SKILLS_REPO_URL}. */ repoUrl?: string; /** Branch to clone. Defaults to {@link SKILLS_REPO_BRANCH}. */ branch?: string; /** * Optional commit SHA to pin to. When set, after the shallow branch clone * the repo fetches and checks out this exact commit, so the working tree is * reproducible regardless of where the branch tip has moved. */ commit?: string; /** Clone timeout in ms. Defaults to 120000. */ timeoutMs?: number; logger?: LoggerLike; } /** * Shallow-clone a Senpi skills repo (branch) into a system temp directory. * * Uses `git clone --depth=1 --single-branch` to minimise bandwidth. * Retries up to 3 times with exponential back-off (2 s → 4 s → 8 s) to * handle transient network failures. * * `repoUrl` + `branch` are explicit so the coordinator can clone different * (repo, branch) groups when the manifest pins skills to different sources — * e.g. one skill on a `strategy-v2` test branch while the rest track `main`. * * The caller MUST call `cleanup()` in a `finally` block regardless of * whether subsequent copy steps succeed or fail. * * @throws When git exits with a non-zero code on all attempts, or when git * is unavailable. */ export declare function cloneSkillsRepo(options?: CloneSkillsRepoOptions): Promise; //# sourceMappingURL=fetcher.d.ts.map