feat(phase18): MCP image/video resources, inline video player, GitHub image upload + proxy
## What - MCP image resources: notes expose  images as typed `image/*` blobs (knowtation://vault/{path}/image/{index}) for vision-capable agents. - MCP video resources: bare video URLs (.mp4/.webm/.mov) exposed as `video/*` text resources with the URL as content. - Hub inline video player: bare video URLs on their own line render as native <video controls> elements in read view (DOMPurify-safe, no iframes). - Insert Media URL toolbar: edit-mode button opens live-preview dialog; images and direct video links preview before insert. - GitHub image upload: Upload Image button commits JPEG/PNG/GIF/WebP files to the vault's GitHub backup repo (multi-layer validation: extension + Content-Type + magic bytes) and inserts the raw.githubusercontent.com URL. - Image proxy (hub/server.mjs + hub/gateway/server.mjs): GET /api/v1/vault/image-proxy fetches GitHub raw images through the Hub using the stored OAuth token — private-repo images display correctly. Hub render layer rewrites raw.githubusercontent.com <img> src to the proxy at display time; raw URL stays in the note markdown. - How to Use: new "Media & images" tab documents all embedding patterns, YouTube link limitation, public/private repo behaviour, and button usage. - Gateway parity: both upload-image (multipart) and image-proxy routes added to hub/gateway/server.mjs, proxied to bridge when BRIDGE_URL is set.
## Tests 507 tests, 0 failures. 5 new test files (73 new test cases): test/media-url-extract.test.mjs test/mcp-image-resources.test.mjs test/mcp-video-resources.test.mjs test/github-commit-image.test.mjs test/hub-image-upload-route.test.mjs
0 comments
muse hub commit comment sha256:4e34e82143fe3c6c46acb7857a71468871d51245251e09ab7040924df4697d27 --body "your comment"
No comments yet. Be the first to start the discussion.