/** * Pure string builder for the own-repo (maintainer-mode) pull-request body. This * is the opposite of the guest body: it carries the "Generated by HubLaunch" * banner, the optional "Overview" plan-goal section, the plan-file link, * and the "⚠️ Warnings" box — the maintainer-grade format. The guest body * (`guest-pr-body.ts`) is deliberately plain and has none of those. * * Two invariants this builder enforces that the old inline assembly did not: * * 1. **AI assistance is always disclosed.** Every own-repo PR body ends with * {@link OWNER_DISCLOSURE} — a tool-agnostic sentence — placed immediately * before the footer, independent of the warnings block, so partial-progress * and duration-exceeded runs disclose too. The wording is tool-agnostic * (names HubLaunch, asserts human accountability, names no model/provider) * because runs are provider/model-configurable; it still contains the literal * phrase "made with AI assistance" so it satisfies the compliance grep. * 2. **The "what changed" content is the diff, not the plan.** The authoritative * description is the diff-derived `## Summary` / `### Key Changes` / file-stats * passed in by the caller. The plan explanation is still shown, but under a * heading that frames it as the plan's *intended goal*, not this run's diff. * * Deterministic, no I/O; the bash `build_owner_pr_body` in `ralph-run.sh` mirrors * this byte-for-byte (pinned by `ralph-run-mirror-parity.test.ts`). */ /** * The always-emitted AI-assistance disclosure for own-repo PR bodies. Tool- and * provider-agnostic: it names HubLaunch and asserts human accountability without * hardcoding a model or provider (runs are configurable). Contains the literal * phrase "made with AI assistance" so it matches the compliance grep * `made with AI assistance|AI[- ]assisted`. Exported so the test asserts the * exact wording and the bash mirror cannot drift. */ export declare const OWNER_DISCLOSURE = "This change was made with AI assistance, orchestrated by HubLaunch; a human reviewed and is accountable for it."; /** * One-line framing sentence rendered under the "Overview" * heading, making clear it describes the plan's intent rather than this run's * full diff. Kept as a constant so the mirror and test pin the exact wording. */ export declare const PLAN_GOAL_FRAMING = "_This describes what the plan set out to achieve \u2014 see the Summary below for what this run actually changed._"; /** The generic summary line used when no plan title is available. */ export declare const GENERIC_SUMMARY = "This PR was automatically created by HubLaunch based on the implementation plan."; /** The "Generated by HubLaunch" footer, below a horizontal rule. */ export declare const OWNER_FOOTER = "*Generated by HubLaunch - AI-Powered Development Automation*"; export interface OwnerPrBodyOptions { /** Diff-derived title line, e.g. "This PR implements: ****" or the generic fallback. */ summaryText: string; /** Diff-derived "### Key Changes" bullet list (already rendered); empty when unavailable. */ changesSummary?: string; /** Diff-derived file-stats line, e.g. "_Modified 2 files across 1 packages_"; empty when unavailable. */ fileStats?: string; /** The plan's intended-goal explanation (RALPH_PLAN_EXPLANATION); framed as intent, not diff. */ planExplanation?: string; /** Pre-rendered "## Linked Issue" reference block; empty when none. */ issueReference?: string; /** Pre-rendered "## 📋 Implementation Plan" reference block; empty when none. */ planReference?: string; /** Pre-rendered "## ⚠️ Warnings" section; empty when none. */ warningsSection?: string; } /** * Assemble the own-repo PR body, in order: the "Overview" plan-goal * section (when present), the diff-derived `## Summary` (title + * optional `### Key Changes` + optional file stats), the issue reference, the * plan reference, the warnings section, then the always-present * {@link OWNER_DISCLOSURE} paragraph, then the `---` / {@link OWNER_FOOTER}. * * The builder never computes the diff summary or file stats itself; those are * passed in already-rendered, keeping the diff the single source of the "what * changed" text. Empty sections are omitted; the disclosure and footer are * always emitted. Sections are joined with blank lines and the body ends with a * trailing newline — matching the `sections.join('\n\n') + '\n'` idiom of * `guest-pr-body.ts`. */ export declare function buildOwnerPrBody(opts: OwnerPrBodyOptions): string; //# sourceMappingURL=owner-pr-body.d.ts.map