Repository navigation
feat(lua-agent-builder): web apps on ui 0.3, lua-ui MCP for components (1.14.0, LUA-1481) - #26
Conversation
lua-cli 3.55.0 scaffolds pages on @lua-ai-global/ui ~0.3 (the Workspace enterprise restyle) and app-client ~0.1, which applies the shell's light/dark, density and accent to <html> itself. - .mcp.json: the lua-ui server (https://ui.lua.dev/mcp, public Storybook catalog of @lua-ai-global/ui); lua-skill-builder gets its three tools, the permission template allows the whole (read-only) server - web-apps.md §2/§4/§9 and lua-skill-builder step 4: no theme code (keep void lua.start() only), semantic tokens only, look components up in the lua-ui MCP first, Page/ListRow/EmptyState, lua apps upgrade (named for the user) when a component is newer than the installed ui, gateway restyle of ui < 0.3 apps - lints: lua.dev remote host, kebab-case MCP tool names, lua-ui registry and allow rule, lua apps upgrade - version 1.14.0 everywhere; dist/server.js rebuilt Refs LUA-1481. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
rares04
left a comment
There was a problem hiding this comment.
Code review — MEDIUM risk
This release adds the remote lua-ui MCP, updates the web-app builder and knowledge guidance for ui 0.3, and bumps the version to 1.14.0. The production gate logic is untouched. The main concerns are a whole-server MCP allow for an unauthenticated remote endpoint and tool names that are not yet confirmed to resolve live. Four changed files were not reviewed.
Major
plugins/lua-agent-builder/lib/permissions-template.json:109— Whole-server allow (mcp__plugin_lua-agent-builder_lua-ui,mcp__lua-ui) for a remote, unauthenticated MCP. Any tool added later would run without a prompt, and lua-docs is explicitly protected against this exact pattern. Allow the three tools individually (plugin and bare spellings), and make lint-permissions and the mirror test enforce that and forbid the whole-server rule.plugins/lua-agent-builder/agents/lua-skill-builder.md:5— Hyphenated tool names are unverified in a live Claude Code session (admitted in the PR body). If they do not resolve, the builder's mandatory lookup step cannot run and it may guess props. Verify live before merge and add a fallback, for example reading the installed ui package types.
Minor
plugins/lua-agent-builder/scripts/lint-mcp-config.mjs:49— The host regex trusts every*.lua.devsubdomain. Pin the exact hosts.plugins/lua-agent-builder/lib/knowledge/web-apps.md:74— The "no theme code" guidance assumes app-client 0.1. Older templates (lua-cli 3.42–3.45) install an unpinned app-client that may be 0.0.x, so those pages could lose theming. Gate the guidance on the app-client or lua-cli version.
PR Risk Reviewer — automated senior review of 5fc21b5 · risk: medium · confidence: 0.60
…ed theme guidance Review round 1 on #26: - permissions: the ui catalog's three tools are allowed one by one in both spellings; lint-permissions and the mirror test require them and forbid a whole-server allow rule for any remote (http/sse) server in .mcp.json - the server key is `ui` (was `lua-ui`), so every composed plugin tool name is <= 64 chars (longest: ..._ui__get-documentation-for-story, 61). lint-mcp-refs checks raw tool names against ^[A-Za-z0-9_-]{1,64}$ and composed names for charset and a 128 ceiling: composed names of 65-69 chars (lua-docs query_docs_filesystem_lua_cli, lua-platform list_primitive_versions) already resolve live, so 64 is not the composed limit - skill builder / web-apps.md: when the ui tools are unavailable, read the installed package's exports and dist .d.ts instead of guessing props - lint-mcp-config pins remote hosts exactly (docs.heylua.ai, ui.lua.dev; https, no port, no credentials) - theme guidance gated on app-client in web/package.json: no theme code on 0.1+; keep the template's lines on 0.0.x or the copied 3.42-3.45 client and recommend lua apps upgrade Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
rares04
left a comment
There was a problem hiding this comment.
Code review — LOW risk
Previously flagged
- previously flagged Whole-server allow for a remote MCP — resolved. The three ui tools are now allowed individually in both spellings. lint-permissions and the mirror test forbid whole-server allows for any remote server.
- previously flagged Hyphenated tool names unverified live — resolved in practice. The builder now falls back to reading the installed ui package. Live confirmation is still outstanding (see Minor).
- previously flagged Host regex widens trust to all lua.dev subdomains — resolved. The lint now uses an exact-host allowlist with https, no port and no credentials.
- previously flagged Behavior change for older lua-cli — resolved. Theme guidance is gated on the app-client version, and older apps keep their theme lines.
The new commits fix every prior finding. The production gate logic is untouched, and the permission tightening is enforced by both a lint and a test. Several omitted files limit confidence slightly.
Minor
plugins/lua-agent-builder/agents/lua-skill-builder.md:5— The hyphenated tool names are still unconfirmed in a live session. The fallback makes this non-blocking. Run one liveget-documentationcall and record the result in the PR.plugins/lua-agent-builder/scripts/lint-mcp-refs.mjs:33— COMPOSED_MAX of 128 is an unverified sanity ceiling. Do not treat it as proof that a name resolves.
PR Risk Reviewer — automated senior review of 91b80ae · risk: low · confidence: 0.72 · re-review · round 2
|
@rares04 thanks. All four are addressed in 91b80ae. Major
Minor
|
|
@rares04 both minors addressed, with evidence:
|
LUA-1481, part of LUA-1475. Agents that build web app pages now build on the new Lua design and look components up instead of guessing.
What changes
.mcp.jsonaddslua-ui→https://ui.lua.dev/mcp. It is the public Storybook MCP of@lua-ai-global/ui: read-only, no auth, toolslist-all-documentation,get-documentationandget-documentation-for-story.lib/permissions-template.jsonallows it, and SECURITY.md and the README describe it.~0.3and app-client~0.1. Look a component up in lua-ui before using it (Page, ListRow, EmptyState, …). Use semantic tokens only, with no palette classes or hex. Write no theme code: app-client applies light/dark, density and the person's accent, so keep onlyvoid lua.start(). When a component is newer than the installed ui, namelua apps upgrade <name>for the user.lua apps upgrade: no code changes from 0.2 to 0.3, look over the pages withlua apps dev, and the gateway restyles apps still on ui < 0.3 until they're rebuilt (ADR 0027).lint-mcp-configallows thelua.devhost.lint-mcp-refsaccepts kebab-case tool names and has a lua-ui registry.lint-permissionsand the permissions-mirror test require the lua-ui rule.lint-knowledge-commandsknowslua apps upgrade.dist/server.js, CHANGELOG, and USER_GUIDE "New in 1.14.0".Checks
npm run lint: 17/17 pass.npm run test:coverage: 68 suites, 2072 tests, thresholds met.mcp/lua-platformbuild passes.Notes
tools/list. They contain hyphens (mcp__plugin_lua-agent-builder_lua-ui__get-documentation), and I haven't yet confirmed in a live Claude Code session that these resolve.lua apps upgradeitself, so the one-confirmation-per-command rule holds; it names the command for the user.🤖 Generated with Claude Code