feat(author): H5P.Row's widths and empty columns, the skill changes a package, the read in SECURITY.md
Closes #242. Small ones before h5p-author 0.13.0 and h5p-mcp 0.2.0.
What changes
- H5P.Row: what H5P.com's own editor writes now builds. H5P's content check keeps both of these, and the library plays them. The owner's package from H5P.com refused both on its way back from a read.
- Column widths take two decimals (24.76, 62.56). No editor in the pack sets them, and the standard form refuses a decimal typed in.
- A column may be left empty, as a spacer: the source leaves its
contentout. An empty column plays as an empty one (params.content === undefinedbecomes[]). - How: a layout's new
decimalspatches the semantics as itsoptionaldoes.H5P.Rowgetsdecimals, andH5P.RowColumngetsoptional.
- The skill changes an
.h5pthe user has.SKILL.mdroutes to the newreferences/change.mdin place of steps 1 and 2, asking nothing. The package is read with the tool of the first route that holds; route 3 fetches the bundle of the type the package'sh5p.jsonnames, and route 4 cannot read one. The source is changed as asked, built by the same route, and handed over as any build.- The description names changing a package in its first sentence, with "never edit or zip one by hand". Its front matter is plain YAML: a test now holds every skill's to what a YAML parser reads, and to the Agent Skills limits on name and description.
- Route 3, Node with no npm, names the type with
python3whereunzipis missing. A read that stops at an addon's part, such as H5P.MathDisplay where the text holds math, fetches that part intoparts/and reads again, as a build by that route does. The missing-part error says "which this package needs", true of a read as of a build. - The package exports the new file, and
.gitignorecovers its packed copy. The org site zips all ofreferences/, so its skill zips carry it as they are.
- SECURITY.md names the read: an archive is untrusted; only the files the content names are written, only in the folder, never over a file; and a path that could lead out is left out of the source.
- The README says no telemetry: a build reads the source, the files it names and the pack, and writes the package.
- Two slow tests get 20 s. The Interactive Video media test takes 2 to 3 s on CI, and timed out at vitest's 5 s once (PR #237's run). The bundle command's test, which writes every content type's bundle twice, timed out at 5.0 s on this PR's run.
- Docs: design/author.md has the two departures from the pinned editor, the skill's change flow, and the read's new numbers.
Tested
- Row: widths with two decimals build, three are refused, and an empty spacer column builds with no note.
- The owner's packages, read and built again: 27 of the 30 at the pack's versions build as read (26 before). The H5P.com one, rebuilt, passes the verifier. The 3 left need what their notes name: pictures missing from the package, styles pasted from Word, and a question with one answer.
- The skill on Haiku in Claude Code, given
quiz.h5pand the build archive and asked for two harder questions. Route 1 used a local archive whose one-file tool was built from this branch, as the org site builds it. npm was cut off, and the user's own skills and settings were left out.-
The description's wording decided whether the skill was opened.
The description Opened the skill Otherwise "or change an .h5p" at the end 1 of 3 runs 2 runs edited content.jsonand zipped it by handchanging a package in the first sentence, with "never edit or zip one by hand" 3 of 3 runs, and 3 of 3 again once the front matter parsed — -
What the 3 that opened it did: each read the package with the tool, changed its source and built it with the tool: 6 questions, the added ones of kinds the quiz has. About $0.014 a run.
-
The hand-over: 1 of those 3 said the package is unverified and gave the build page's line; 2 dropped both. That is the hand-over's known weakness on Haiku, and its text is unchanged here.
-
- Route 3 with an addon: a math package read with only H5P.Blanks' bundle stops at
H5P.MathDisplay-1.0.h5p, and reads once that part is added. - The front-matter test passes for the five skills, and fails on the old colon.
- Suites: the author package, 262 tests in Node and Chromium;
apps/skills' front-matter test;pnpm typecheckfor both.
Found, not done here
schemaOfshows a field as the pack's semantics have it, not as a layout patches it. SoH5P.Video.mdcalls the poster required, andH5P.GameMap.mdfour fields, though the build takes all of them as optional. Patching the schema too would change those two type files, which models read, so it wants its own Haiku check.
Release
h5p-author 0.13.0, then h5p-mcp 0.2.0. skills.sh serves the skill from main, and route 2 runs npx @latest, so a release soon after this merges keeps read from being named before npm has it. The org site's pin then moves the one-file tool and the bundles to 0.13.0.
Summary by cubic
Makes h5p-author read and rebuild packages that H5P.com's own editor writes, and lets the skill change an .h5p the user already has instead of only authoring new content.
- H5P.Row column widths now take two decimals, and a column may be left empty as a spacer; a layout's new
decimalspatches semantics the wayoptionaldoes, so 27 of 30 readable owner packages build again after a read. SKILL.mdroutes to a newreferences/change.mdfor changing a package the user has: read it with the build tool, change the source, build it there. Tested on Haiku in Claude Code: all 3 runs read, changed, and built with the tool.SECURITY.mddocuments the read: an archive is untrusted, only named files are written in the package's folder, never over a file, and paths that could lead out are refused.- The Interactive Video media and bundle command tests' timeouts rise to 20 s after slow CI runs timed out at vitest's 5 s.
- The skill's front matter now parses again (a colon broke it):
apps/skills/tests/front-matter.test.tsholds every skill's front matter to what a YAML parser reads and to the Agent Skills limits. references/change.mdroute 3 now fetches an addon's part intoparts/and reads again when a read stops at one, and offerspython3whereunzipis missing.