MCP: the agent facade moves into src/agent/, assembled into the development page only
The command tables and the page-side reads, screens and dispatch (scripts/lib/mcp-commands.js and
mcp-page.js) become src/agent/, the facade window.TUBES.call(tool, args) in the page's own scope.
A new <!-- @include-dev agent --> line in src/index.html pastes it in after the game, but only in the
development page (npm run dev, the MCP server, i18n-check, tests that ask with load({agent:true})).
The build drops the line whole: _site/ is byte for byte what main builds.
Tests load the page players get by default, the build test fails if anything outside src/agent/ names
the facade's api/API_ names, and the pages test checks the built page carries none of it and still
plays. ADR 0004 records the rule.
This commit is contained in:
parent
b2366ed260
commit
5b76685e5c
27 changed files with 1052 additions and 869 deletions
|
|
@ -5,7 +5,8 @@ https://seriesoftub.es, hosted on GitHub Pages. The game is one static page with
|
|||
Its source is many small files in `src/` (`src/styles/*.css`, `src/game/**/*.js`, the shell
|
||||
`src/index.html`); the build pastes them together, in path order, into a single `index.html`, the
|
||||
same one-file page players have always loaded. Static files (dictionaries, icons, service worker)
|
||||
live in `site/`.
|
||||
live in `site/`. `src/agent/` (the facade the MCP server plays through) goes into the development page only,
|
||||
never into the page players get, and nothing in `src/game/` may use it (`docs/adr/0004-dev-only-code.md`).
|
||||
|
||||
Read these before larger changes:
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue