import type { Config } from '../../types/index.js'; /** * Outcome of {@link ensurePlanBranch}. */ export interface EnsurePlanBranchResult { /** The git branch name the plan lives on (sanitized issue name). */ branch: string; /** True when the branch was created on origin by this call. */ created: boolean; /** True when the plan file on the branch was written/refreshed by this call. */ updated: boolean; } /** * Thrown when the plan file cannot be found anywhere — not on disk, not on * the feature branch, not on the base branch. Callers translate this into the * historical "Plan not found locally or on origin/main" error handling. */ export declare class PlanNotFoundError extends Error { constructor(planPath: string); } /** * Ensure the feature branch for `issueName` exists on origin and carries the * current plan file — the core of the plan-branch flow. * * - Branch missing on origin → create it from `origin/` * with the plan committed (one worktree publish, one push). * - Branch exists but the plan file on it is missing or stale → publish the * fresh content to the branch. * - Branch exists with identical content → no-op. * * This runs BEFORE the beforeLaunch hook in `hula launch`, so hooks (e.g. * Vercel branch-scoped env vars) can rely on the git branch existing on the * remote. It is also invoked at plan time via `hula upload --branch`. * * @throws PlanNotFoundError when the plan content cannot be resolved anywhere. */ export declare function ensurePlanBranch(config: Config, planPath: string, issueName: string, repoRoot?: string): Promise; //# sourceMappingURL=PlanBranchService.d.ts.map