export type BaselineSlot = "baseline" | "pending"; export interface BaselineStore { appDir: string; /** Absolute `.git` directory, or null when the app is not in a repo. */ gitDir: string | null; /** Absolute work-tree root, or null when the app is not in a repo. */ repoRoot: string | null; /** Repo-relative posix prefix the app lives at ("" when app === repo root). */ prefix: string; /** Stable id used in ref names and tarball filenames. */ slug: string; } export interface BaselineWriteMeta { template: string; templateRef: string; coreVersion?: string; } export interface BaselineWriteResult { kind: "git-ref" | "tarball"; /** Ref name or tarball path. */ location: string; /** Commit sha for git refs. */ commit?: string; configuredRefspecs: string[]; } export declare function resolveBaselineStore(appDir: string): BaselineStore; export declare function baselineRefName(store: BaselineStore, slot: BaselineSlot): string; export declare function baselineTarballPath(store: BaselineStore, slot: BaselineSlot): string; export declare function baselineExists(store: BaselineStore, slot: BaselineSlot): boolean; export declare function baselineDescription(store: BaselineStore, slot: BaselineSlot): string | null; /** * Snapshot `sourceDir` into the baseline store. Writes through a temporary * index and an out-of-tree work-tree so HEAD, the real index, and the working * tree are untouched. */ export declare function writeBaseline(store: BaselineStore, sourceDir: string, slot: BaselineSlot, meta: BaselineWriteMeta): BaselineWriteResult; /** Point `slot` at whatever `from` currently points at. */ export declare function promoteBaseline(store: BaselineStore, from: BaselineSlot, to: BaselineSlot): boolean; export declare function clearBaseline(store: BaselineStore, slot: BaselineSlot): void; /** * Extract a stored baseline into a fresh temp directory whose root is the app * root. Returns null when the slot is empty. Callers own the returned dir. */ export declare function materializeBaseline(store: BaselineStore, slot: BaselineSlot): string | null; /** * Teach the repo's remote to carry `refs/agent-native/*` so baselines survive * clone and push. Returns the refspecs it actually added. */ export declare function ensureBaselineRefspecs(store: BaselineStore): string[]; /** Uncommitted changes under the app dir, as porcelain lines. */ export declare function appDirtyPaths(store: BaselineStore): string[]; /** Make each path segment safe for `git check-ref-format`. */ export declare function sanitizeRefPath(value: string): string; //# sourceMappingURL=template-baseline.d.ts.map