/** * A working copy of shadok-ai's own source, so a user who installed the cockpit * with `npx shadok-ai` — no clone, no rights on the repo — can still have an * agent change it. The clone is anonymous over HTTPS: nothing here needs * authentication, which is what lets the user watch an agent work and read its * diff before connecting any GitHub account. */ export declare const SELF_REPO_URL = "https://github.com/shadok-ai/shadok-ai.git"; /** Our own copy, never the directory the running server was launched from. */ export declare function selfRepoDir(): string; export type SelfRepoPlan = "clone" | "update" | "reclone"; /** Pure: what to do with the checkout, given what is on disk. */ export declare function selfRepoPlan(exists: boolean, isRepo: boolean): SelfRepoPlan; /** * Pure: a short, human reason for a git failure — it is rendered on the CTA * card, so it must never come back empty. */ export declare function gitFailReason(e: unknown): string; export interface SelfRepoResult { cwd?: string; error?: string; } /** * Makes sure the source checkout exists and its `main` matches the remote, so a * tweak never starts from a stale base. Only the base clone is refreshed: the * worktrees a tweak session owns are separate checkouts and are never touched — * refreshing under a live agent is how you lose its work. */ export declare function ensureSelfRepo(): SelfRepoResult;