clone

a browser grid puzzle game where you push words around to rewrite the rules of each level

Expose installed pack notes and document mod diagnostics

Dami committed 3e75be9
commit
3e75be9f5229c1deb89955feaf5dc2d7c1eb37f8
parent
46272da00ecf1e5249732f3d64b21ebaf2c11f3c
author
Dami <dami.etoile@gmail.com>
3 files changed, +43 -6
Mdocs/modding.md32++++++++++++++++++++++++++----
Msrc/pack-service.js10++++++++-
Mtests/pack-service.test.js7++++++-
M docs/modding.md +28 -4
@@ -41,7 +41,7 @@ The exported object has these fields:
4141 4242 | Field | Required | Meaning |4343 | --- | --- | --- |44-| `manifest` | yes | `id`, `name`, and semantic `version`; optional `engine` must be `1` |44+| `manifest` | yes | `id`, `name`, and semantic `version`; optional `engine` must be `1`; optional `features` lists required host features |4545 | `levels` | yes | One or more level objects |4646 | `palette` | no | Uppercase noun to display string, or `{ glyph, faces: 'left' \| 'right' }` for an explicitly directional glyph |4747 | `vocabulary` | no | Uppercase noun tokens used by the mod |
@@ -54,6 +54,14 @@ or vocabulary entries. Every level requires a unique lowercase `id` and may
5454 also include `title` and `hint`. A pack can contain at most 64 levels, each5555 with at most 4096 entities. The local CommonJS source limit is 512 KiB.5656 57+`manifest.features` is an optional array of unique lowercase feature IDs. The58+current host supports `automata`. A new automata pack should declare59+`features: ['automata']`; existing version 1 packs and links without the field60+remain valid. A required feature the host does not support stops import with61+“This pack needs a newer Miau.” A future mechanic that older hosts must reject62+also needs a higher `manifest.engine` version, because an older host may ignore63+an unfamiliar manifest field.64+5765 Palette strings never flip. A mod that opts into facing may use a bounded5866 object entry instead:5967
@@ -111,6 +119,22 @@ missing levels, out-of-bounds positions, duplicate IDs, unsupported object
111119 kinds, invalid rule tokens, and invalid palette entries. This lets an editor112120 show actionable errors without starting a partially loaded mod.113121 122+The pack service also returns nonblocking `warnings` beside `errors` when a123+word tile has no rule or noun meaning in its proof. This check covers loose124+words that might be pushed into a sentence later. It uses nouns placed in that125+proof and that proof's automata subjects, along with core and locally declared126+properties. A palette entry or a noun in another proof does not make a word127+meaningful here. For example, a loose `SHUT` word receives a note when `SHUT`128+is neither a noun nor a property in the proof. If the player forms129+`DOOR IS SHUT`, the engine interprets `SHUT` as a noun transformation; the note130+explains that consequence. Each record includes `word`, `levelId`,131+`levelTitle`, `sentence` when formed, player-facing `message`, and technical132+`detail`. Authors can still install and play a pack with notes.133+134+Automata properties are declared per proof. The same token cannot also be an135+object noun in that proof. A custom property declared only in another proof136+has no behavior here, and its word tile receives a note.137+114138 ## Bundled teaching packs115139 116140 The repository includes two authored packs in addition to the three core
@@ -146,9 +170,9 @@ Local imports follow the same flow: Workshop, Import, Gift preview, then
146170 explicit **Keep and play**. Workshop also offers Play, Share link, Export147171 `.cjs`, and Remove. Installed authored pack data is persisted through the pack148172 library and reloaded without evaluating CommonJS. The service and pending149-install contract are covered by unit tests. [Revision 5 of the public stage](https://fcbc.n.zip/)150-verifies these flows with 150 Node tests and the full browser sharing suite, including151-missing-audio behavior and the mobile, reduced-motion, and `?dev` paths.173+install contract are covered by unit and browser tests. The174+[stable public stage](https://fcbc.n.zip/) includes the verified sharing flow;175+engine and preview revisions are recorded in `docs/roadmap.md`.152176 Workshop is reachable directly from Title and INDEX. The designer accepted153177 the stage visual gate.154178
M src/pack-service.js +9 -1
M tests/pack-service.test.js +6 -1