/** * Pure string builders for the guest (contribution-mode) pull-request body. The * guest body is plain and honest: a summary, the issue/PR reference, a * verification section reporting only what actually ran, and a short AI * disclosure. No "Generated by HubLaunch" banner, no warning boxes, no plan * links, no marketing — the opposite of the maintainer-grade body. * * Field evidence drove the disclosure wording: PRs whose bodies named a product * were closed as spam within minutes, while a PR carrying no product pitch was * merged with thanks. So the default disclosure names **no** product and * carries **no** link — a generic "AI-assisted, human-reviewed" line. A product * reference appears only when the contributor opts in (`linkGuidelines`) or the * target repo's published policy requires AI disclosure, and even then it is a * single cited link to the Responsible Contribution Guidelines, never a pitch. * * Deterministic, no I/O; the bash in `ralph-run.sh` mirrors this. */ /** The outcome of a single verification command. */ export type VerificationOutcome = 'passed' | 'failed' | 'could-not-run'; /** One command that was (or could not be) run as part of verification. */ export interface VerificationEntry { /** The command invoked (e.g. `pnpm test`). */ command: string; /** Whether it passed, failed, or could not run in the sandbox. */ outcome: VerificationOutcome; /** Why it could not run (required for `could-not-run` entries). */ reason?: string; /** A link to the run (e.g. fork CI), when available. */ link?: string; } /** * The generic, product-free disclosure used by default. Says an AI assistant * wrote the code with a person reviewing — no product name, no link, no model * or provider named, no marketing. Exported so the test asserts the exact * wording and the bash mirror cannot drift. */ export declare const GENERIC_DISCLOSURE = "This change was made with AI assistance and reviewed by a person before this pull request was opened."; /** * The URL of the public Responsible Contribution Guidelines page, cited (and * only cited) when the contributor opts in or the target repo's policy requires * AI disclosure. The page is published separately, so this URL may 404 for now. */ export declare const GUIDELINES_URL = "https://www.hublaunch.site/responsible-contribution"; /** * Build the single disclosure line for the guest PR body. * * - Both flags false (the default) → {@link GENERIC_DISCLOSURE}: no product * name, no link. This is what field evidence shows gets a PR merged rather * than closed as spam. * - Either flag true → a single line citing the Responsible Contribution * Guidelines via {@link GUIDELINES_URL}. `linkGuidelines` is the contributor's * opt-in; `policyRequiresDisclosure` is set when the target repo's stored * guidelines infer an `aiStance` of `requires_disclosure` (the Phase 2 * guidelines reader — `updateGuidelines` — resolves it server-side and the * worker forwards it as `RALPH_POLICY_REQUIRES_DISCLOSURE`). When both are * true the line is emitted once, not duplicated. */ export declare function buildDisclosureLine(opts: { linkGuidelines: boolean; policyRequiresDisclosure: boolean; }): string; /** * Render the `## Verification` section. Lists each command that ran with its * pass/fail outcome (and a link where present), then a "Could not run" list * with each reason. Never claims manual verification. When `entries` is empty, * renders an honest "no automated checks were executed" line. */ export declare function buildVerificationSection(entries: VerificationEntry[]): string; export interface GuestPrBodyOptions { /** A plain-words summary of the change. */ summary: string; /** The issue/PR reference (e.g. `Closes #123`) — the only place a number appears. */ issueReference?: string; /** A pre-rendered verification section (see {@link buildVerificationSection}). */ verification: string; /** * The contributor's opt-in to cite the Responsible Contribution Guidelines. * Defaults to `false` (the product-free generic disclosure). */ linkGuidelines?: boolean; /** * Set when the target repo's stored guidelines require AI disclosure * (`aiStance === 'requires_disclosure'`, resolved server-side by the Phase 2 * `updateGuidelines` reader and forwarded as `RALPH_POLICY_REQUIRES_DISCLOSURE`). * Independent of the contributor's `linkGuidelines` opt-in. */ policyRequiresDisclosure?: boolean; } /** * Assemble the guest PR body: a plain summary, the issue/PR reference (the only * place a number appears), the verification section, then the disclosure line * ({@link buildDisclosureLine} — generic by default, Guidelines link only on * opt-in/policy). No plan links, no banner, no warning boxes. */ export declare function buildGuestPrBody(opts: GuestPrBodyOptions): string; //# sourceMappingURL=guest-pr-body.d.ts.map