feat(zeph-tools,zeph-llm): add ToolOutput.media plumbing for MCP image passthrough - #6238
Merged
Merged
Conversation
…e passthrough Foundational, behavior-preserving plumbing for multimodal MCP ContentBlock::Image passthrough (spec-072, #6229 P0 of 4): adds ToolOutput.media: Vec<ImageData> with #[derive(Default)], a new zeph-tools -> zeph-llm dependency edge, and a redacting Debug impl for ImageData so raw image bytes never reach logs or debug output. media is never populated in this PR, so no runtime behavior changes. Decode/validate/ attach logic, the persistence strip, vision-tier routing, and the config/CLI/TUI surface are deferred to P1-P3 follow-up issues.
bug-ops
enabled auto-merge (squash)
July 13, 2026 18:59
This was referenced Jul 13, 2026
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
ContentBlock::Imagepassthrough (spec-072). This is P0 of a 4-phase implementation (P0 plumbing -> P1 persistence strip -> P2 decode/validate/attach -> P3 config/CLI/TUI surface); see follow-up issues for P1-P3.ToolOutput.media: Vec<zeph_llm::ImageData>(empty by default) with#[derive(Default)]onToolOutput, a newzeph-tools -> zeph-llmcrate dependency edge, and a hand-written redactingimpl Debug for ImageData([image: {mime}, {n} bytes], never the raw bytes) hardening a latent Debug-derive leak on the existing user-upload image path.ToolOutput { .. }construction sites across the workspace to..Default::default()so the new field doesn't require touching every call site's logic.mediais never populated in this PR, so it changes no runtime behavior. Decode/validate/attach logic, the persistence strip (SQLite/Qdrant/durable JSONL), vision-tier routing, and the config/CLI/TUI opt-in surface are deferred to P1-P3.Part of #6229 (P0 only — this PR does NOT close the issue; the issue tracks the full feature and stays open until P1-P3 land as follow-up issues referencing
specs/072-multimodal-mcp-passthrough/plan.md).Test plan
cargo +nightly fmt --checkcargo clippy --profile ci --workspace --all-targets --features "desktop,ide,server,chat,pdf,scheduler,testing" -- -D warningscargo clippy --profile ci --workspace --all-targets --features bench -- -D warningscargo nextest run --config-file .github/nextest.toml --workspace --features "desktop,ide,server,chat,pdf,scheduler" --lib --bins(13475/13475 passed)cargo test --doc --workspace --features "desktop,ide,server,chat,pdf,scheduler"RUSTFLAGS="-D warnings" RUSTDOCFLAGS="--deny rustdoc::broken_intra_doc_links" cargo doc --no-deps --workspace --features "desktop,ide,server,chat,pdf,scheduler"gitleaks protect --stagedtest_tool_output_default_media_empty,test_image_data_debug_redacts_bytes(asserts exact redacted output and absence of the raw byte values)MessagePart::Imageemission or provider request-builder changes (P2 scope)