Skip to content

feat(author, mcp): a file's facts before a source names it, and a note for what only a look can check (#260, #266) - #282

Open
alekswebnet wants to merge 3 commits into
mainfrom
feat/media-facts
Open

alekswebnet wants to merge 3 commits into
mainfrom
feat/media-facts

Conversation

@alekswebnet

@alekswebnet alekswebnet commented Nov 25, 2026 •

Copy link
Copy Markdown
Contributor

Closes #260. Closes #266.

For five content types a source holds numbers that mean something only against a file: an Interactive Video's times, and the places of hotspots, areas and stages on a picture. This gives a model the facts a tool can read before it writes them, and has the build say plainly what nothing but a person's eyes can check.

What changes

  • h5p-author media <file or address>… says what a file is before a source names it: a picture's size, an mp4's length and whether it has sound, a Vimeo video's length as Vimeo gives it. It reads with the readers a build already holds a source's files to, and needs no libraries. describeMedia and mediaLine are the same from code.
  • h5p_media, a fifth tool of the local MCP server, is that command for an app with no shell. It reads only in the server's folders and answers in words alone.
  • Vimeo's length holds an Interactive Video's times, as a file's does. Its answer carries the length in whole seconds, so a time is refused only a second past it, and the problem says whose word the length is. YouTube says none.
  • A build says the length it held the times to: result.lengths, a line of the command's output and of both servers' answers.
  • A build notes what is placed or timed by numbers alone, one note for each such list: "holds 5 hotspots placed by numbers, which a build cannot hold to the picture: look at each in the preview". The skill already passes a build's notes on.
  • The skill names media where a file is written, by route. The Interactive Video file says to read the length first, and that a text over a video is H5P.Text. The Image Hotspots file says a hotspot's position is its centre (read in the library's stylesheet).

Measured, 2026-11-25

Claude Code stood in for a chat with a code sandbox: the skill installed, the file attached, npm cut off for real on routes 1 and 3. Two test files: a picture of five small shapes at known places, and a 10 s mp4.

#266, today's skill and tool (16 runs: Haiku and Sonnet, two tasks, routes 1 to 3, and four with a picture named only by its path).

What was recorded Result
Built 16 of 16, 14 at the first build
The attachment found and named 16 of 16 copied it beside the source and named it by its name; none by a made-up path
The build's line said "1 media file" 16 of 16
Verifier, where npm answered passed in 8 of 8
Hotspots on the shape they name 5 of 5 in every run, within one percent
A picture named only by its path was opened first 4 of 4
A time past the video's end none written: every one of the 6 video runs first wrote an mp4 parser of its own to learn the length

The two runs that lost a round: an Interactive Video's text written as H5P.AdvancedText (fixed here in the type file), and a bundle unzipped into parts/, which left its index at parts/parts (not changed here).

#260, before and after.

Before After
Video, routes with a shell: how the length was learned a parser of the model's own, 6 of 6 runs media, and no parser, 4 of 4 runs (route 1)
Video, MCP tools only (Haiku): builds needed 2 in 3 of 3 runs; two left a first package whose question started as the clip ended 1 in 3 of 3 runs, h5p_media called first
The reply says the places or times are unchecked, or asks to check them 6 of 16 runs 8 of 8 runs

So the three things #260 proposed first are built (A, B and E). Its other options are not:

  • C, a grid over the picture. Shown the picture, both models placed all five hotspots within one percent in 14 of 14 runs with no grid, so it is not built. Other chats' models were not measured.
  • D, asking for a video's moments. Not built: it costs the one question the skill may ask.

Behaviour that changes

  • Every build of Image Hotspots, Find the Hotspot, Find Multiple Hotspots, Game Map and Interactive Video now carries one note. A caller that expected no notes for these types sees one.
  • An Interactive Video on Vimeo with a time more than a second past the length Vimeo gives is now refused; it built before.
  • MediaStore.lengthOf returns { file, seconds, host }, not a number (internal).

Tests

  • Author: 297 pass, type check clean. New: media on files, hosted videos, refusals, confinement and the command's exit code; Vimeo's length, its one second of slack and four answers that say no length; the notes for each type; the length line.
  • MCP: 46 pass, type check clean. New: h5p_media in and outside its folder, and the length line in a build's answer.
  • Skills: 82 pass. Every type file's example still builds with no note but the two expected ones.

Not verified

  • Route 2 (npx) and route 3 could not run the new command before a release: only route 1, with an archive built from this branch, and the MCP server were run. The baseline covered all three routes.
  • No chat app was tried, only Claude Code as a stand-in, and only Claude models.
  • media on a real WebM, Ogg, WAV or MP3: their length is not read, by design.

Release

Author and MCP each need a minor: media, describeMedia, lengths and h5p_media are new. The skill names media, so the organisation's site should pin the new author release soon after: until then its archive and one-file tool answer "unknown command", and a model falls back to what it does today.


Summary by cubic

Closes #260 and #266. Adds a way to read a file's facts before a source names them, and makes a build say what only a person can check: a hotspot's place and a video's times.

What changes

  • h5p-author media, describeMedia and mediaLine report a picture's size, an mp4's length and sound, and a Vimeo video's length as Vimeo gives it, with the readers a build holds a source's files to and nothing extra to install. A web address with no extension served as audio/ogg or audio/webm is read too, and downloads are kept one at a time, however many are named.
  • The MCP server grows a fifth tool, h5p_media, for an app with no shell; it reads only inside the server's folders and refuses a blank file name.
  • An Interactive Video's times are now held to Vimeo's length as well as a file's, letting a time pass only one second beyond it; YouTube still gives no length.
  • A build's result carries lengths, and the command line and both servers say each, so the next writer starts from it.
  • Builds now add one note per list of hotspots, areas, stages, or interactions placed or timed by numbers, saying to look at them in the preview; bookmarks, end screens, and names not the table's own are not noted.
  • The skill names media where a file is written; it says to look at the picture where a model can see one, that a legacy hotspot's position is its top left, and that a text over a video is H5P.Text. Where media gives no length, the user's own length is taken and the reply says the times were not checked against it.

Behavior and release

  • Every build of Image Hotspots, Find the Hotspot, Find Multiple Hotspots, Game Map and Interactive Video now emits one note; callers expecting none for these types will see it.
  • An Interactive Video on Vimeo with a time more than a second past the length Vimeo says is now refused, where it built before.
  • MediaStore.lengthOf now returns { file, seconds, host }, not a number (internal).
  • Author and MCP each need a minor release for the new media, describeMedia, lengths and h5p_media; the skill calls media, so the organisation's site should pin the new author release soon after, or its archive and one-file tool answer "unknown command".

Written for commit f402bdd. Summary will update on new commits.

View guided diff Turn on auto-fix

… a build says a video's length and what only a look can check (#260, #266)

h5p-author media, describeMedia and mediaLine read a picture's size, an mp4's
length and what a build notes of its tracks, and a Vimeo video's length as
Vimeo gives it, by the readers a build holds a source's files to. An
Interactive Video's times are held to Vimeo's length as to a file's, a second
past it let through for the rounding. A build's result has lengths, and the
command line says each. What a source places on a picture or times on a video
by numbers alone is a note of the build's, for whoever looks at the preview.

The skill names the command where a file is written, the Interactive Video
file says to read the length first and that a text over a video is H5P.Text,
and design/author.md records the runs with a file attached (#266).
…deo's length (#260)

The local server's fifth tool, for an app with no shell: a video's length
before its times are written, read and confined as a build reads a source's
files. heldLines says the length an Interactive Video's times were held to,
for both servers.

@cubic-dev-ai cubic-dev-ai Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All reported issues were addressed across 25 files

Reply with feedback, questions, or to request a fix.

View guided diff | Turn on auto-fix | Re-trigger cubic

Comment thread packages/mcp/lib/answers.mjs Resolved
Comment thread design/author.md Resolved
Comment thread packages/mcp/lib/server.mjs Resolved
Comment thread packages/author/lib/types.mjs Resolved
Comment thread packages/author/lib/media.mjs Resolved
Comment thread packages/mcp/README.md Resolved
Comment thread apps/skills/tests/author-verify.test.ts Resolved
Comment thread packages/author/lib/media.mjs Resolved
- describeMedia keeps one download on disk at a time, however many
  addresses h5p_media is given, and reads a recording at an address with no
  extension served as audio/ogg or audio/webm.
- byNumber looks its table up by its own names only.
- h5p_media refuses a blank name in its schema.
- The examples' test holds the new note to its whole wording.
- The skill: a picture is looked at where the model can see it (route 0
  passes an attachment on unopened); where media gives no length, the
  user's length is taken and the reply says the times were not checked; a
  legacy hotspot's position is its top left.
- The documents: which lists get the note, which lengths are read, the
  Vimeo second of slack, and that h5p_media takes web addresses.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant