You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
author: declare a source's own fields once, as a schema a model can be shown #230
A source's own fields (type, title, language, license, licenseVersion, authors, source, yearFrom, yearTo, params) are written down three times:
checked by hand in sourceOf;
typed by a separate Source typedef;
described to a model only in prose (SOURCE_FIELDS).
The MCP server (#227) takes h5p_build's source as any object, so a model sees no shape until a build refuses one. In Claude Code, Haiku's first Question Set build through the server was refused for authors: ["Unknown"].
Proposal
One schema for a source's own fields, sourceSchema, exported by the author package:
sourceOf holds each field to it. The messages stay as they are, and every problem of an author is said at once. An author written as a name alone is said with the object to write.
What stays in code: what one field cannot say alone stays in sourceOf. That is a content type named loosely, a licence written with its version, a version for a licence that takes none, and fields in the wrong place.
zod/mini, not zod: a build runs in a page too. With zod/mini the schema adds 23 kB minified; zod's chained API adds 93 kB.
Not in scope: a content's fields (params), which are held to each library's semantics.json.
Activity
fix(author): show params with no default, as Haiku built a video from…
fix(author): one list of a source's fields, a strict schema, zod as t…
Merge pull request #231 from missing-elements/feat/source-schema
feat(mcp): h5p_build shows a source's own fields, which the build che…
fix(mcp): show a source's fields with nothing required or forbidden (#…