Repository navigation
CLI: review builds without MCP (sc-8782) - #13
Merged
Merged
Conversation
…mages) and build review call the MCP server's list_builds, get_build, get_snapshot and review with the CLI's token, for agents without MCP
VisualCIdocspring/visualci · build #95 · 290 unchanged · no changes This PR vs base: nothing since #93, across 1 build Updated as builds change. Agents can review with VisualCI's MCP tools. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
sc-8782. Agents without VisualCI's MCP server connected (a CI job, a session started before the server was added, a harness without MCP) can now review a build from the CLI.
visualci build list [--waiting] [--branch B] [--limit N]visualci build show <build> [--all] [--offset N] [--limit N]visualci build snapshot <build> <name> [--crop changed] [--images all|diff|head|base|none] [--pages 1,2] [--against previous] [--save-images DIR]visualci build review <build> approve|reject [--only added|changed] [--snapshot NAME]... [--comment TEXT]How: each command calls the MCP server's tool of the same job (
list_builds,get_build,get_snapshot,review) with the CLI's token (VISUALCI_TOKEN,--tokenorvisualci login's), one statelesstools/callPOST. The output is what an agent reads over MCP, and the server needs no new endpoints. The MCP URL comes from the API URL (api.becomesmcp., other hosts use their own/mcp), or from$VISUALCI_MCP_URL. A personal token sends the project (--project,$VISUALCI_PROJECTor visualci.yml). The output is text with JSON indented, or the whole result with--json.--save-imageswrites each image as02-page-2-changed-diff.png. A refused call exits 1.These live under
buildbecausevisualci snapshotalready adds a file to a build. The story'svisualci buildsandvisualci reviewbecamebuild listandbuild review.Verified: on docspring-dev against the seeded dev server, with a personal token:
build list --waitinglists the demo build;build show 3gives get_build's answer;build snapshot 3 receipt.pdf --crop changed --save-imagessaved 4 cropped PNGs;build review 999 approveprints "no build 999 in this project" and exits 1.Unit tests cover the MCP URL, image names and saving, and the JSON indenting.
CLI 0.2.9. Once it's released, a follow-up PR pins the docs to 0.2.9 and documents the commands (CLI reference, plus "over MCP if it's connected, otherwise these commands" on the agents page and in install.md).
Review: no screenshots change.