import type { ChangelogRecord } from './changelog.js'; export interface CommitMessageOptions { /** The subject line, in the operator's words. The record never invents one. */ readonly message: string; readonly record: ChangelogRecord; } /** * Render the commit that carries a baseline update. * * The subject line is the operator's, unchanged. A command that rewrote it would * be overruling the one part of the message a project's own conventions govern — * and every repository with a commit-message convention has one. */ export declare function renderCommitMessage(options: CommitMessageOptions): string; /** * The body, as lines somebody scans rather than sentences they read. * * Exported because a commit message is not the only place these lines belong. * An agent asking *what would this update record* before running `accept` has to * be answered in the same words the commit will carry, or the preview becomes a * second description of a baseline update — and the two would then be edited * separately until one of them was wrong. * * This lands in **every** baseline commit. That is the constraint the shape is * chosen for: a paragraph explaining what `--all` means is true, and by the * fourth commit nobody reads it, and by the tenth it is what `git log` looks * like. So the body is a table — one line per change, fixed columns, fingerprint * first, because that is the token a reader recognises when the same shape comes * back three months later. * * Nothing here argues. Everything that used to be argued in prose is in the * trailers, where the reader that needs it decodes it and the person scrolling * past does not pay for it. */ export declare function changelogBody(record: ChangelogRecord): readonly string[]; /** * Read the record out of a commit message, or `undefined` when it carries none. * * `undefined` is *this commit is not a baseline update*, which is the answer for * almost every commit in a repository and is not a failure. A malformed one is, * and it throws: a record that half-parsed would answer "what changed here" with * the part that happened to survive. * * Keys this reader does not know are **kept, not refused**. A field added by a * later writer is not a corrupt record, it is a newer one, and a reader that * threw on it would make every additive change a breaking change — which is the * pressure that turns a version number into a wall nobody may cross. The version * is checked instead, and it moves only when an existing field changes meaning. */ export declare function parseCommitMessage(text: string): ChangelogRecord | undefined; //# sourceMappingURL=changelog-message.d.ts.map