feat(mcp): add config/CLI/TUI/migration surface for image passthrough - #6342
Merged
Conversation
bug-ops
force-pushed
the
feat/issue-6241/media-config-cli-tui
branch
from
July 16, 2026 22:10
5361411 to
7b91081
Compare
bug-ops
enabled auto-merge (squash)
July 16, 2026 22:21
Completes the P3 phase of the MCP image passthrough feature (spec-072): --init wizard prompt (default off, hard-skipped for Sandboxed servers), --migrate-config step 89 backfilling media_passthrough defaults, TUI/CLI status indicators for the decode spinner and source-labeled attachment, and an opt-in --no-mcp-media kill-switch with full parity across the CLI/TUI, daemon, and ACP entry points. Closes #6241
The new no_mcp_media flag pushed run_acp_http_server, build_tool_setup, and run_configured_acp_autostart past clippy's too_many_arguments, fn_params_excessive_bools, and too_many_lines thresholds, matching the existing allow pattern already used by sibling CLI/bootstrap functions in these files.
bug-ops
force-pushed
the
feat/issue-6241/media-config-cli-tui
branch
from
July 16, 2026 22:37
1cc683e to
c8d883f
Compare
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.
Summary
Completes the P3 phase of the MCP image passthrough feature (spec-072), building on the
merged P2 MediaSanitizer work (#6331/#6240):
--init: MCP remote-server wizard now asks "Enable image passthrough for this server?"(default No); Sandboxed-trust servers skip the prompt since passthrough is always
hard-blocked for them at runtime regardless of the flag.
--migrate-config: new step 89 backfillsmedia_passthrough = falseon existing[[mcp.servers]]entries and appends a commented[mcp.media]advisory block forconfigs written before this feature existed.
CLAUDE.mdTUI Rules): a"Decoding MCP image…"spinner duringMediaSanitizer::sanitize_image's decode, and a source-labeled"Image attached from mcp:<server> (<n>)"status when validated images are attached tothe outgoing LLM request.
--no-mcp-media: an opt-in global CLI kill-switch for incident response, with fullparity across the CLI/TUI runner, daemon, and both ACP entry points (threaded through
AppBuilder::new, mirroring the existingsafe_modepattern).Review notes
new-featurechain (no architect — scope was fully concrete from the merged P2work; no perf/security validators — no hot path or new security-critical logic).
--no-mcp-mediafix path was broken (
config.cli.no_mcp_mediahad no populator), so the flag would havesilently no-op'd in daemon/ACP modes — the project's recurring "wire-X-into-daemon/acp"
defect class. Fixed properly via explicit parameter threading into
AppBuilder::new/run_daemon/run_acp_server/run_acp_http_server, verified end-to-endby both impl-critic and the reviewer independently.
end-to-end effect) — both closed with new tests in the fix round.
AppBuilder::newcall-site ripple across thewhole workspace (17 sites) and ran the full commit-gate suite (fmt/clippy/nextest/rustdoc)
clean.
Acceptance criteria
--initwizard prompt (default No, Sandboxed-forced-false, unit tested)--migrate-configstep 89 (idempotent, unit tested)--no-mcp-mediakill-switch with CLI/daemon/ACP parity.local/testing/playbooks/mcp-media-passthrough.mdbook/src/guides/mcp.md,book/src/reference/cli.md)Test plan
cargo +nightly fmt --checkcleancargo clippy --profile ci --workspace --all-targets --features "desktop,ide,server,chat,pdf,scheduler,testing" -- -D warningsclean--initwalkthrough) — pending, tracked asUntestedin coverage-status.md per project conventionCloses #6241