The OpenCode provider allows using a variety of models with an agent
harness that can gather more information from the codebase as required
(like with claude-code, codex, or gemini-cli).
This is an alternative to using OpenRouter directly, where the api
provider is more like a chatbot and cannot gather any additional context
beyond what was handed to it.
The per-reviewer summary step was removed in 0f03726, dropping the
summaries field from DebateResult, but this test still asserted on it
and failed. Remove the stale assertion.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
By default the orchestrator is resilient: a single reviewer (or context
gatherer) failure is logged and the round continues with the survivors,
aborting only when all reviewers fail.
The new --fail-fast flag flips to strict mode — any reviewer or
context-gathering failure re-throws immediately and terminates the
whole flow. Wired through the review and discuss commands via
OrchestratorOptions.failFast, with a regression test and README docs.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
- Add extractDiffLineRanges() to include valid line ranges in structurizer prompt
- Add content-based matching (extractCodeFromBody + findLineByContent) as fallback
- Add full diff fallback via gh api when per-file patches are null
- Widen nearest-line threshold from 20 to 50 for better coverage
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Replace execSync with spawnSync in getFileHistory() and getPRDetails()
to prevent shell injection through file paths and PR numbers. Add input
validation for prNumber (must be a positive integer).
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Replace execSync with spawnSync in findReferences() to prevent shell
injection through malicious symbol names in PR diffs. Use -F (fixed-string)
and -e flags for safe argument passing to ripgrep.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
When the AI reviewer references a line not exactly in a diff hunk,
find the nearest valid diff line (within 20 lines) and post inline
there instead of falling back to file-level. Also constrain the
structurizer prompt to only reference files actually in the diff.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Allow users to configure `base_url` per provider to connect to
compatible third-party endpoints (Azure OpenAI, Ollama, vLLM, one-api,
etc.). All four API providers (Anthropic, OpenAI, Gemini, MiniMax) now
accept an optional `base_url` in config which is passed through to
their respective SDKs.
Co-authored-by: Cursor <cursoragent@cursor.com>
Validates that PR numbers are numeric-only in postPRReview and
getPRHeadSha before passing them to shell commands.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add commenter module that builds GitHub PR review payloads from merged
issues. Issues with file+line become inline review comments, issues
without line info go into the review body. Includes gh CLI wrappers for
posting reviews and fetching PR head SHA.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add formatCallChainForReviewer to display exact code snippets at each
call site, giving reviewers precise context about how changed symbols
are used across the codebase. Raw references are now stored in
GatheredContext and formatted into the reviewer prompt.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add parseFocusAreas to extract suggested review focus from analyzer
output and inject them as hints into each reviewer's first-round
prompt. Focus areas are suggestions, not constraints — reviewers are
explicitly told to also flag anything else they notice.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add parseReviewerOutput to extract structured issues from reviewer
JSON blocks and deduplicateIssues to merge similar issues across
multiple reviewers using Jaccard similarity on title words.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add reference collector module that:
- Extracts function/class symbols from git diffs
- Uses ripgrep to find where symbols are referenced in the codebase
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add codex-cli provider that calls the codex CLI command, similar to claude-code provider.
Also update gemini model to gemini-3-pro in user config.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add Google Gemini provider using @google/generative-ai SDK with support
for both standard and streaming chat methods. Update default config
template to use simpler model-based reviewer names (claude, gemini)
instead of role-based names. Analyzer and summarizer now use claude-code.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add TypeScript interfaces for the Magpie configuration system:
- ProviderConfig: API key storage for providers
- ReviewerConfig: Model and prompt configuration
- DefaultsConfig: Default settings (max_rounds, output_format)
- MagpieConfig: Root configuration structure
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>