Skip to content

First-class web surface (production): ship a browser host for the plugin's MCP Apps inside the artifact, openable from the installed CLI (<plugin> web); /web in dev for parity #564

Description

@ScriptedAlchemy

Problem

A plugin built with agent-bundle can ship an MCP server, hooks, skills, a routed CLI, and MCP Apps — but the only ways to look at one of those Apps in a browser are:

cargo-hauler is the concrete case (ScriptedAlchemy/cargo-hauler#83): hauler dashboard exists, but the README has to tell users it does not work from the npm package or an installed host pack — the exact places a user would type it. The same shape recurs for any plugin whose MCP App is also a reasonable web page: a build dashboard, an eval viewer, a notice inbox. Authors want to ship "MCP + CLI + agent plugins, and a web page that opens in a browser pane when you need it", with one component library and one data path (the App already renders from the tool result).

Scope: production first. This is not a dev-server nicety: the web page has to work from the shipped plugin — the npm package, an installed Claude/Codex/Cursor host pack, or a checked-out artifact/ — with no framework on the machine, exactly like the MCP server and CLI already do. Dev parity (/web on the Workbench) is the secondary requirement.

Proposal: a first-class web surface

  1. Artifact-resident browser host. Emit into the root (Emit one composite plugin artifact; use targets to select the host projections inside it #555 layout) a dependency-free, bundleable host — web/index.html + web/host.mjs (Node built-ins only, like agent-bundle/launch-env) — that spawns the plugin's own packed mcp/<server>.mjs over stdio, serves the App resource(s) on 127.0.0.1:<port> with the same sandbox/consent/token rules as serve-app, and speaks the MCP Apps ui/* bridge. No Effect, no Workbench, no framework at runtime; every module satisfies AB6005.
  2. A generated web command on the routed CLI. <plugin> web [<server>/<app>] [--port N] [--open] [--tool T --input JSON] — the framework owns the argv, the ready signal (url in the JSON result), teardown on the route signal, and the "which App" default (the only App, else required). Plugins stop hand-writing what cargo-hauler wrote 180 lines for.
  3. Config/convention. web: { apps: ['<server>/<app>'], open?: 'browser' | 'never' } (or src/web/ for an authored landing page listing the plugin's Apps) selects what the surface exposes; omit it and nothing is emitted. Capability tables record web per host as "browser, host-independent".
  4. Dev parity. agent-bundle dev serves the same host at /web/<server>/<app> so the URL a plugin documents is the URL the Workbench shows; serve-app becomes a thin wrapper over the same host.
  5. Diagnostics/docs. A named diagnostic when web names an App no tool advertises; en + zh pages for the surface, the command, and the /web path; one minor changeset if the artifact layout gains web/.

Acceptance

Relationship to existing issues

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestmeta-frameworkAgent Bundle compiler-coupled meta-framework

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions