Skip to content

feat(mcp): add config/CLI/TUI/migration surface for image passthrough - #6342

Merged
bug-ops merged 2 commits into
mainfrom
feat/issue-6241/media-config-cli-tui
Jul 16, 2026
Merged

feat(mcp): add config/CLI/TUI/migration surface for image passthrough#6342
bug-ops merged 2 commits into
mainfrom
feat/issue-6241/media-config-cli-tui

Conversation

@bug-ops

@bug-ops bug-ops commented Jul 16, 2026

Copy link
Copy Markdown
Owner

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 backfills media_passthrough = false on existing
    [[mcp.servers]] entries and appends a commented [mcp.media] advisory block for
    configs written before this feature existed.
  • TUI/CLI status indicators (mandatory per CLAUDE.md TUI Rules): a "Decoding MCP image…" spinner during MediaSanitizer::sanitize_image's decode, and a source-labeled
    "Image attached from mcp:<server> (<n>)" status when validated images are attached to
    the outgoing LLM request.
  • --no-mcp-media: an opt-in global CLI kill-switch for incident response, with full
    parity across the CLI/TUI runner, daemon, and both ACP entry points (threaded through
    AppBuilder::new, mirroring the existing safe_mode pattern).

Review notes

  • Reduced new-feature chain (no architect — scope was fully concrete from the merged P2
    work; no perf/security validators — no hot path or new security-critical logic).
  • impl-critic's first pass found a significant gap: the initially-proposed --no-mcp-media
    fix path was broken (config.cli.no_mcp_media had no populator), so the flag would have
    silently 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-end
    by both impl-critic and the reviewer independently.
  • tester found 2 real AC-relevant test gaps (Sandboxed-skip decision logic, kill-switch
    end-to-end effect) — both closed with new tests in the fix round.
  • Reviewer independently re-verified the AppBuilder::new call-site ripple across the
    whole workspace (17 sites) and ran the full commit-gate suite (fmt/clippy/nextest/rustdoc)
    clean.

Acceptance criteria

  • --init wizard prompt (default No, Sandboxed-forced-false, unit tested)
  • --migrate-config step 89 (idempotent, unit tested)
  • TUI/CLI status indicators for decode + source-labeled attach
  • --no-mcp-media kill-switch with CLI/daemon/ACP parity
  • Playbook: .local/testing/playbooks/mcp-media-passthrough.md
  • Coverage-status rows added (main repo root)
  • CHANGELOG.md entry
  • mdBook docs (book/src/guides/mcp.md, book/src/reference/cli.md)

Test plan

  • Full workspace nextest suite: 13891 passed, 0 failures/regressions
  • cargo +nightly fmt --check clean
  • cargo clippy --profile ci --workspace --all-targets --features "desktop,ide,server,chat,pdf,scheduler,testing" -- -D warnings clean
  • Rustdoc gate clean
  • Live-session playbook scenarios (opt-in round-trip, TUI indicators, migrate idempotency, --init walkthrough) — pending, tracked as Untested in coverage-status.md per project convention

Closes #6241

@github-actions github-actions Bot added documentation Improvements or additions to documentation rust Rust code changes core zeph-core crate enhancement New feature or request size/XL Extra large PR (500+ lines) labels Jul 16, 2026
@bug-ops
bug-ops force-pushed the feat/issue-6241/media-config-cli-tui branch from 5361411 to 7b91081 Compare July 16, 2026 22:10
@bug-ops
bug-ops enabled auto-merge (squash) July 16, 2026 22:21
bug-ops added 2 commits July 17, 2026 00:37
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
bug-ops force-pushed the feat/issue-6241/media-config-cli-tui branch from 1cc683e to c8d883f Compare July 16, 2026 22:37
@bug-ops
bug-ops merged commit ad2d0d0 into main Jul 16, 2026
26 of 27 checks passed
@bug-ops
bug-ops deleted the feat/issue-6241/media-config-cli-tui branch July 16, 2026 22:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

core zeph-core crate documentation Improvements or additions to documentation enhancement New feature or request rust Rust code changes size/XL Extra large PR (500+ lines)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Implement: P3 config/CLI/TUI/migration surface for MCP image passthrough

1 participant