Skip to content

feat(mcp): expose multimodal bundles and smoke test - #10

Closed
MarinaMackay wants to merge 7 commits into
mmwiki-pr5-config-storage-v2from
codex/mmwiki-pr6-mcp-smoke
Closed

feat(mcp): expose multimodal bundles and smoke test#10
MarinaMackay wants to merge 7 commits into
mmwiki-pr5-config-storage-v2from
codex/mmwiki-pr6-mcp-smoke

Conversation

@MarinaMackay

Copy link
Copy Markdown
Owner

Summary

Part 6 of the multimodal repository knowledge stack.

This slice addresses polish/hardening after review-risk audit:

  • wire persisted multimodal bundles into the production MCP server via --multimodal-bundle;
  • expose search_visual_context, get_visual_evidence, and find_visual_code_links through MCP;
  • add a reproducible scripts/smoke_multimodal_vlm.py path for local deterministic and optional real VLM smoke tests;
  • extract bounded embedded SVG text from real repository diagrams for a less-demo deterministic fallback.

Testing

python -m pytest test/scripts/test_build_multimodal_knowledge.py test/scripts/test_smoke_multimodal_vlm.py test/wiki test/web/test_config.py
python -m py_compile codenib/cli.py codenib/mcp/context.py codenib/mcp/server.py scripts/smoke_multimodal_vlm.py test/mcp/test_mcp_server.py

Latest local result:

414 passed

Note: full MCP tests require the codenib[mcp] extra. This local environment is missing mcp.types, so MCP files were checked with py_compile and the bundle router path is covered by unit tests added in test/mcp/test_mcp_server.py for MCP-enabled CI.

@MarinaMackay

Copy link
Copy Markdown
Owner Author

Update after comparing against nearby OSS patterns (GitDiagram / CodeGraph / OpenKB / Open Zread): this PR6 hardening slice now includes four concrete productization additions:

  1. Incremental bundle update CLI
python scripts/update_multimodal_knowledge.py /path/to/repository \
  --previous /tmp/old-multimodal-knowledge.json \
  --output /tmp/new-multimodal-knowledge.json

It reuses unchanged VisualFactPacks and regenerates only added/changed media artifacts.

  1. Validated visual graph plans

Adds codenib.visual-graph-plan.v1 / codenib.visual-graph-manifest.v1, validates node ids, edge endpoints, source paths, limits, and plan hashes, then compiles plans to Mermaid.

  1. Agent-friendly MCP exploration tool

Adds explore_visual_context on top of the existing lower-level visual tools so agents can get visual search, optional evidence, and optional source links in one call.

  1. HTML smoke preview

smoke_multimodal_vlm.py can now write a self-contained HTML preview showing SVG artifact, extracted entities, claims, source bindings, Mermaid graph plan, and tool output.

Latest local validation on the full PR6 stack:

python -m pytest test/scripts/test_build_multimodal_knowledge.py test/scripts/test_update_multimodal_knowledge.py test/scripts/test_smoke_multimodal_vlm.py test/wiki test/web/test_config.py
# 421 passed

@MarinaMackay
MarinaMackay deleted the codex/mmwiki-pr6-mcp-smoke branch September 1, 2026 07:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant