Serve the h5p-author skill, with a page of its files' full addresses

Merged
AL
20h ago
+195-8

Closes #15.

/h5p/skill/ serves the h5p-author skill as the pinned @missing-elements/h5p-author 0.9.0 carries it, for a chat that cannot install the skill and is refused by GitHub's per-address limit ("I couldn't access the GitHub SKILL.md file due to rate limiting").

  • Files: SKILL.md, LICENSE and references/ (the brief and 32 type files), copied as they are by eleventy.config.js.
  • The page: src/h5p/skill/index.njk writes out the full address of every file, each as its link's text, since a chat's fetch tool may open only addresses it has seen whole. The link to give a chat is https://missing-elements.github.io/h5p/skill/.
  • index.json: the author's version and the files, from src/_data/skill.js, which stops the build if the pinned package carries no SKILL.md.
  • Unversioned addresses: the site builds from one pinned release, so a versioned folder would stop working at the next update for a chat given it before.
  • h5p-author 0.8.0 → 0.9.0: the build page's type files and bundles move with it; nothing in its build changes.
  • appType: 'mpa': vite preview answered every missing file with the home page and a 200, so a test that a file is served passed when it was not. It now gives a 404, as GitHub Pages does. The existing tests all pass under it.

Tests

e2e/skill.spec.ts, 3 tests: the page lists every file the package carries, each address as its link's text, SKILL.md first, and index.json agrees; each file is served byte-equal to the package's; every address SKILL.md gives resolves here, both its relative links and its addresses on this site, with <Type> filled in. The whole suite passes from a clean build, 15 of 15.

Six mutations, each caught: dropping the copy of LICENSE or references/, a link's text not the whole address, the type files not listed, LICENSE missing from files, SKILL.md not first. Before appType: 'mpa', the two copy mutations failed one test each, not two.

The page at 375 px and 1100 px, light and dark: no horizontal scroll, no console errors.


Summary by cubic

Serves the h5p-author skill at /h5p/skill/ for a chat that cannot install it, since GitHub's per-address rate limit refused the SKILL.md file. The page lists every file's full address, because a chat's fetch tool may only open addresses it has seen whole.

  • Copies SKILL.md, LICENSE, and references/ from the pinned @missing-elements/h5p-author package as-is.
  • Updates @missing-elements/h5p-author from 0.8.0 to 0.9.0, the first version that carries SKILL.md; the build page's type files and bundles move with it.
  • Adds appType: 'mpa' to the Vite config so vite preview returns a 404 for missing files, as GitHub Pages does, instead of the home page with a 200.