feat(video): read playlists and channels as a corpus, and serve video over MCP - #12
Merged
Merged
Conversation
… over MCP webindex video list reads the first --limit videos of a playlist or channel (its /videos tab when none is named), two at a time, each kept as its own run, and writes CORPUS.md and corpus.json naming them V1…Vn; a video that cannot be read keeps its label. video search on a corpus labels its hits. MCP gains webindex_video_fetch, webindex_video_search, webindex_video_frames and webindex_video_list. The three that keep a run are annotated as writing (additively, idempotent); under a policy their dir is a name inside the video root, never a path. references/video.md documents the whole of it. Closes #7
…ements - under NO_WRITE a run is neither written nor collected: fetch hands the transcript back (a run already on disk included), list and frames refuse - a kept run records the track it was read from and is reused only for a request in that language; meta.json is written last, so a run cut short is never reused, and a run or corpus that cannot be written is a reason - a media download is judged on its exit status before any file, and leftover fragments are never taken for the video - a playlist that lists one video twice reads and labels it once - frames are staged and swapped in whole; frames and list are annotated destructive, since they replace earlier frames and an earlier corpus Refs #7
|
🎉 This PR is included in version 1.25.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
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.
Last of four PRs for #7.
webindex video list <playlist|channel> [--limit n]lists the videos without reading them (a channel's/videostab when the URL names none; tabs and nested playlists skipped), reads each as its own run two at a time, and writesCORPUS.md+corpus.jsonnaming themV1…Vnin listing order. A video that cannot be read keeps its label with the reason, so the numbering never shifts.video searchon a corpus directory labels its hitsV1…Vn; passages no longer straddle a chapter start.webindex_video_fetch,webindex_video_search,webindex_video_frames,webindex_video_list. The three that keep a run are annotatedreadOnlyHint: false(additive, idempotent); under--public-only/--extract-root/--allow-remote,diris a directory name inside the video root, never a path.webindex_video_listreports progress per video.references/video.md(linked from SKILL.md, served over MCP), README tables and counts (359 exports, 28 commands, 20 MCP tools); untitled chapters read as "Chapter N".Checked live: the "100 Seconds of Code" playlist, 3 videos, read in 36 s (two from auto-captions, one through whisper), then searched with V# labels;
webindex mcpover stdio:tools/listshows the 20 tools,webindex_video_fetchandwebindex_video_searchanswer.Closes #7