import type { BuildBase } from "../ci/base.js"; import type { Session } from "../session.js"; import type { BuildChannel, PlanOptions, ReleasedUnit, Warning } from "@tallyrelease/core"; export interface PlanFlags { branch?: string; base?: string; head?: string; all?: boolean; format?: "text" | "json"; json?: boolean; out?: string; githubOutput?: boolean; summary?: boolean; } export interface PlanSetup { opts: Omit; /** `--head` sha, null to plan the working tree at HEAD. */ ref: string | null; base: BuildBase; /** Base warnings and `W_HEAD_BRANCH`. */ warnings: Warning[]; } /** The HEAD sha; `E_NO_HEAD` in a repository without commits. */ export declare const resolveHead: (session: Session) => Promise; /** * The build channel of `branch`: `nightly` when selected and the branch rule * sets a nightly channel, else `build`. `E_CHANNEL_SELECT` when `nightly` is * selected explicitly and the rule sets none. */ export declare const buildChannel: (session: Session, branch: string) => Promise; /** * Plan options for `--branch`, `--base` and `--head`. With `--head` only * `--base` and the local merge base apply, and files come from the commit. * `channel: false` plans the build channel and skips the selection. */ export declare const planOptions: (session: Session, flags: Pick, { channel }?: { channel?: boolean; }) => Promise; /** Forge facts known from a reconcile, by tag. */ export interface KnownForge { prs: ReadonlyMap; releases: ReadonlyMap; } /** * `released` with `forge` from `known`, else the PR that merged the release * commit and the release of the release tag; `forge` is null without a forge. */ export declare const releasedForge: (session: Session, released: readonly ReleasedUnit[], known?: KnownForge) => Promise;