/** * `openlore review` — the PR-review surface (change: add-pr-review-surface). * * Composes two analyses that already ship into ONE deterministic, conclusion-shaped * briefing for a `base..head` range, rendered as Markdown for a PR comment (or JSON * for a programmatic consumer): * * - the structural delta (`handleStructuralDiff`): added / removed / signature- * changed symbols, the callers they leave stale, and rename/move candidates; * - the blast radius (`computeBlastRadius`): hubs touched, layers crossed, * tests to run, governing decisions, and the spec/memory/decision drift the * change introduces — `computeBlastRadius` already folds change-scoped drift in, * so `review` does not separately re-run `detectDrift`. * * No new structural computation, no LLM, no new MCP tool (north star c6d1ad07). * Advisory by default (exit 0); opt-in gating reuses the `.openlore/config.json` * `blastRadius.block` convention. Degrades honestly — a missing index, an unreachable * base, or a non-git directory states what it could not compute rather than emitting * a misleading empty briefing. Decision: 4f3efb11. */ import { Command } from 'commander'; import { type BlastRadiusBriefing } from '../../core/services/mcp-handlers/blast-radius.js'; /** Hidden HTML marker the GitHub Action greps for to find-and-update its single * sticky comment (create once, update in place, never duplicate). MUST be the first * line of the rendered markdown so a simple substring match locates it. */ export declare const REVIEW_MARKER = ""; interface SymbolRef { name: string; file: string; className?: string | null; signature?: string; } interface StructuralResult { base?: string; head?: string; message?: string; error?: string; changedFiles?: Array<{ path: string; status: string; oldPath?: string; }>; summary?: { addedFunctions: number; removedFunctions: number; signatureChanges: number; addedEdges: number; removedEdges: number; staleCallers: number; renameCandidates: number; }; added?: SymbolRef[]; removed?: Array; }>; signatureChanged?: Array; }>; renameCandidates?: Array<{ from: SymbolRef; to: SymbolRef; confidence: string; note: string; }>; } export interface ReviewBriefing { base: string; head: string; structural: StructuralResult; blast: BlastRadiusBriefing | { error: string; }; caveats: string[]; /** `ok` when at least one of the two analyses produced a real result; `unavailable` * when both failed (e.g. not a git repo). The CLI/Action stays advisory either way. */ status: 'ok' | 'unavailable'; } /** Run both analyses for a `base..head` range and assemble the briefing. Never throws — * a thrown handler is captured as that section's `{error}` so an advisory caller (the * CLI, the CI Action) is never broken by a composed failure. */ export declare function composeReview(opts: { cwd: string; base?: string; head?: string; }): Promise; /** GitHub rejects an issue/PR comment body over this many characters with HTTP 422. * renderMarkdown clamps to it so the bundled Action can always post the briefing. */ export declare const MAX_MARKDOWN_CHARS = 65536; /** Render the full briefing as a Markdown PR comment. First line is the sticky marker. */ export declare function renderMarkdown(b: ReviewBriefing): string; /** Compact terminal rendering (human-readable, to stdout). */ export declare function renderHuman(b: ReviewBriefing): string; export interface ReviewCliOptions { cwd?: string; base?: string; head?: string; format?: 'markdown' | 'json'; out?: string; /** Hook/gating mode: honor `blastRadius.block` and exit non-zero on a triggered pattern. */ hook?: boolean; } export declare function runReviewCli(opts: ReviewCliOptions): Promise; export declare const reviewCommand: Command; export {}; //# sourceMappingURL=review.d.ts.map