//! pr-review-core — reusable engine for an advisory AI PR reviewer.
//!
//! Pulls a pull request's diff, reviews it with a Claude model via OpenRouter,
//! and posts a line-anchored inline review plus an advisory summary comment.
//! Provider-agnostic across GitHub and Bitbucket. Bot identity and any extra
//! prompt are injected through [`config::Config`] so consumers (bot binaries)
//! supply their own branding.
/// Clip a string to at most `n` characters (char-safe — never splits a UTF-8
/// codepoint). Used to keep API error bodies short in messages.