/** Branch name for a rollback PR. Pure. */ export declare function rollbackBranchName(env: string | undefined, shortRef: string): string; /** PR title for a rollback. Pure. */ export declare function rollbackTitle(env: string | undefined, ref: string): string; /** PR body — explains that merging + applying completes the rollback. Pure. */ export declare function rollbackBody(env: string | undefined, ref: string, sourceDir: string): string; export interface RollbackResult { /** true when the source already matched the ref — nothing to roll back. */ noop: boolean; branch?: string; prUrl?: string; /** * The rollback delta as a unified diff — present only for a `dryRun`, where * it is the whole point: the PR body's diff is what a reviewer would act on, * so producing it without a PR is what makes the delta inspectable offline. */ diff?: string; } /** * Open a rollback PR restoring `sourceDir` to `ref`. Isolated worktree; the * caller's branch is untouched. Throws on an unknown ref or a git/gh failure. * * `dryRun` computes the same delta and returns it as a diff without pushing a * branch or opening a PR, leaving the repository exactly as it found it. * * That mode exists because the PR path needs a GitHub remote and an * authenticated `gh` — reasonable for the operator flow this was built for * (#873), and impossible for a hermetic acceptance run. chant#1208's CC * round-trip has to demonstrate rollback offline, on an emulator, with no * remote in the picture; without this it could only assert the `noop` case, * which exercises none of the interesting work. */ export declare function rollbackToRevision(opts: { ref: string; env: string | undefined; sourceDir: string; cwd: string; /** Compute and return the delta; open no PR, push nothing, leave no branch. */ dryRun?: boolean; }): Promise; //# sourceMappingURL=rollback.d.ts.map