Repository navigation
Move the MCP App resource out of the vendored browser layer - #308
Merged
Merged
Conversation
`compose_layer` copies every file under a layer root's `runtime`, `widgets` and `vendor` into the page directory, and `mcp-page-app.html` sat in `assets/vendor/`. Every page therefore carried 396KB it never fetched — about 38% of its vendored bytes — because the MCP App resource is not page payload at all. An MCP host reads it from the install over the tool transport; no browser ever asks for it. It moves to `skills/leaf/mcp-app/page-app.html`, outside the layer roots, so nothing can vendor it. `scripts/vendor.py mcp-app` writes it there and reproduces the tracked bytes exactly; `mcp_page.py` reads it from the new `MCP_APP` constant, which sits beside `KERNEL` and `BUNDLED_PACKAGES` saying why it is not one of them. `BROWSER_DIRS` needs no split. It described `assets/vendor/` and a package's `vendor/` as one kind and was wrong only about the one file that was not browser payload; with that gone the tuple is accurate again. A page initialized before this still holds the stale copy until its next `page init`, which retires it along with anything else the layer dropped. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01WiC25MCLJYBnRypf3ZXkku
leaf-agent
approved these changes
Sep 5, 2026
max-sixty
added a commit
that referenced
this pull request
Sep 5, 2026
`compose_layer` copies every file under a layer root's `runtime`, `widgets` and `vendor` into the page directory, and `mcp-page-app.html` sat in `assets/vendor/`. Every page therefore carried 396KB it never fetched — about 38% of its vendored bytes — because the MCP App resource is not page payload at all. An MCP host reads it from the install over the tool transport; no browser ever asks for it. It moves to `skills/leaf/mcp-app/page-app.html`, outside the layer roots, so nothing can vendor it. `scripts/vendor.py mcp-app` writes it there and reproduces the tracked bytes exactly. `mcp_page.py` reads it from a new `MCP_APP` constant, which sits beside `KERNEL` and `BUNDLED_PACKAGES` saying why it is not one of them. `BROWSER_DIRS` needs no split. It described `assets/vendor/` and a package's `vendor/` as one kind and was wrong only about the one file that was not browser payload; with that gone the tuple is accurate again, and the page-shape check in `packages.py` is unaffected. `test_init_does_not_vendor_the_mcp_app_resource` compares bytes rather than names, so putting the file back under any layer root under any name fails it. Verified by planting the copy back in `assets/vendor/` and watching it fail. A page initialized before this still holds the stale copy until its next `page init`, which retires it along with anything else the layer dropped. > _This was written by Claude Code on behalf of max-sixty_ 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Opus 5 <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
compose_layercopies every file under a layer root'sruntime,widgetsandvendorinto the page directory, andmcp-page-app.htmlsat inassets/vendor/. Every page therefore carried 396KB it never fetched — about 38% of its vendored bytes — because the MCP App resource is not page payload at all. An MCP host reads it from the install over the tool transport; no browser ever asks for it.It moves to
skills/leaf/mcp-app/page-app.html, outside the layer roots, so nothing can vendor it.scripts/vendor.py mcp-appwrites it there and reproduces the tracked bytes exactly.mcp_page.pyreads it from a newMCP_APPconstant, which sits besideKERNELandBUNDLED_PACKAGESsaying why it is not one of them.BROWSER_DIRSneeds no split. It describedassets/vendor/and a package'svendor/as one kind and was wrong only about the one file that was not browser payload; with that gone the tuple is accurate again, and the page-shape check inpackages.pyis unaffected.test_init_does_not_vendor_the_mcp_app_resourcecompares bytes rather than names, so putting the file back under any layer root under any name fails it. Verified by planting the copy back inassets/vendor/and watching it fail.A page initialized before this still holds the stale copy until its next
page init, which retires it along with anything else the layer dropped.🤖 Generated with Claude Code