import type { Config } from '../types/index.js'; /** * Resolve the effective `contributionMode` boolean using `flag ?? config` * precedence, with `'auto'` resolved against whether the target repo is a * GitHub fork — the same `flag ?? config ?? default` chain `resolveDefaults` * uses. Pure and side-effect free. * * Precedence: * - `flagOverride === true` (the `--contribution` flag) always wins → `true`. * - else `config.contributionMode`: `true → true`, `false → false`, * `'auto' → repoIsFork`. * - absent config → `false` (the opt-in default this release). * * `'auto'` is resolved server-side where fork metadata is known; the worker * only ever sees the resolved boolean. */ export declare function resolveContributionMode(config: Pick | undefined, flagOverride: boolean | undefined, repoIsFork: boolean): boolean; /** * Resolve the value the CLI forwards *unresolved* on a launch/plan request when * it cannot see fork status locally (the server resolves `'auto'`). Returns * `true` for the flag, the config value otherwise, and `undefined` when the * result is the inert default `false` — the same omit-when-absent discipline * `resolveForwardedDefaults` uses, so legacy request bodies stay byte-identical. */ export declare function resolveForwardedContributionMode(config: Pick | undefined, flagOverride: boolean | undefined): boolean | 'auto' | undefined; /** Outcome of {@link validateContributionBranchName}. */ export interface ContributionNameValidation { ok: boolean; message?: string; suggestedName?: string; } /** * Launch-time refusal for contribution tracking/branch names. Mirror of * `validateContributionBranchName` in `@hula/shared/contribution.ts` — the CLI * is a standalone published package and deliberately does not depend on * `@hula/shared` (see `plan.ts` / `plan-e2e-cases.ts`). Kept pure + unit-tested * (`contribution-mode.test.ts`) so the local copy and the server stay in sync. * * In contribution mode the issue/PR reference belongs in the PR body only, * never the branch name (it is pushed to a fork and opened upstream). Refuse a * name that embeds the known issue or PR number as a delimited (optionally * `#`-prefixed) token, with a clear message and a suggested name. When no * number is known (the common fork-with-issues-disabled case) nothing is * refused. */ export declare function validateContributionBranchName(name: string, opts?: { issueNumber?: number | null; prNumber?: number | null; }): ContributionNameValidation; /** * Resolve the effective `issuePlanSplit` boolean. Sibling of * {@link resolveContributionMode}: `flag ?? config ?? default` precedence with * `'auto'` resolved against ownership and whether contribution mode engaged. * * Precedence: * - `flagOverride === true` always wins → `true`. * - else `config.issuePlanSplit`: `true → true`, `false → false`, * `'auto' → (!userOwnsRepo || contributionEngaged)`. * - absent config → `'auto'` (the schema default), resolved the same way. * * `'auto'` is resolved server-side where ownership/fork metadata is known; the * worker/CLI only ever acts on the resolved boolean. */ export declare function resolveIssuePlanSplit(config: Pick | undefined, flagOverride: boolean | undefined, userOwnsRepo: boolean, contributionEngaged: boolean): boolean; /** * Resolve the value the CLI forwards *unresolved* on a launch/plan request for * `issuePlanSplit` (the server resolves `'auto'` against ownership). Returns * `true` for the flag, the config value otherwise, and `undefined` when the * result is the inert default `'auto'` with no explicit override — the * omit-when-absent discipline {@link resolveForwardedContributionMode} uses, so * legacy request bodies stay byte-identical. */ export declare function resolveForwardedIssuePlanSplit(config: Pick | undefined, flagOverride: boolean | undefined): boolean | 'auto' | undefined; //# sourceMappingURL=contribution-mode.d.ts.map