Skip to content
go-steerPublic

About

Operator-facing web UI for mast and any attach-mode-compatible core-agent variant. Thin client over the attach protocol; no agent loop in the browser.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

90 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

mast-web

Operator-facing web UI for core-agent — and for mast while it remains in service — over the attach protocol. Thin client; no agent loop in the browser.

core-agent is the primary backend (2026-10-30). go-steer consolidated on one agent harness: mast is folding into core-agent and is frozen (go-steer/mast#596, go-steer/core-agent#1411). core-agent already embeds a pinned mast-web release and serves it at /ui (--ui), so nothing changes in how this UI is built or deployed; what changes is which backend's protocol evolution it follows first. mast keeps working as a backend until it is archived. The name of this repository is a separate decision and is unchanged for now.

📚 Full documentation: go-steer.github.io/mast-web (deploys after first push to main)

CI Docs License

Status: pre-alpha. The repo is being bootstrapped phase-by-phase per docs/web-bootstrap.md. Phase A (UI port from cogo-wasm2) ships first; phase B wires the attach-protocol client; phase C adds the release pipeline. Architecture in docs/web-design.md.


Why a web UI

mast (and core-agent) is fundamentally a backend agent process — it runs in a Cloud Run pod, a Kubernetes service, or a daemon container, where all the load-bearing infrastructure (MCP servers, K8s context, credentials, audit log, cost ceilings, shared memory, watchdog) lives. The interactive surface is "operator drops in remotely to check progress, give a new task, verify a hypothesis" — a use case better served by a browser than a terminal:

  • No client installation (browse to URL)
  • Aligns with cloud-native deployment shape (HTTP-native)
  • Multi-operator-friendly out of the box
  • Auth integration with SSO / OIDC / IAP / mTLS via the attach mode's existing auth paths
  • Richer rendering primitives (syntax highlighting, collapsible tool calls, streaming, plan-first plan rendering, watchdog alerts)
  • Mobile-viable for at-a-glance status checks

The terminal-TUI use case (developer iterating on agent design locally) is better served by core-tui. mast-web doesn't try to be both products.


Architectural pattern

┌──────────────┐   SSE / POST       ┌──────────────────────┐    HTTP/MCP    ┌──────────────────┐
│  mast-web    │ ◄────────────────► │  mast (Cloud Run /   │ ◄────────────► │  Vertex / MCP    │
│  (browser)   │   attach protocol  │  K8s / daemon)       │                │  servers / K8s   │
│              │                    │                      │                │                  │
│  - Chat UI   │                    │  - Agent loop        │                │                  │
│  - Tool call │                    │  - Tool execution    │                │                  │
│    render    │                    │  - MCP integration   │                │                  │
│  - Streaming │                    │  - Audit log         │                │                  │
│  - Sidebar   │                    │  - Cost ceilings     │                │                  │
│  - Status    │                    │  - Watchdog          │                │                  │
└──────────────┘                    │  - Shared memory     │                └──────────────────┘
                                    └──────────────────────┘

The browser renders; the backend does everything else. See docs/web-design.md for the full architectural rationale, including why this differs from the cogo-wasm2 pattern (browser-WASM-as-agent + auth proxy) — that pattern fits cogo's job, but is structurally wrong for mast.


Quickstart

# 1. Run a core-agent backend with attach mode enabled. It needs a token:
#    since core-agent#1266 a token-less listener on an agent with the bash
#    tool refuses to start, because that tool could otherwise approve its
#    own permission prompts over the listener. --attach-token names an
#    environment variable, which core-agent keeps out of bash's reach.
export MAST_ATTACH_TOKEN="$(openssl rand -hex 24)"
core-agent --attach-listen :7777 --session-db --attach-token=MAST_ATTACH_TOKEN

# 2. In another terminal, serve the web UI
make dev

# 3. Browse to http://localhost:8000, connect to http://localhost:7777,
#    and paste the same token (echo $MAST_ATTACH_TOKEN) into the token field

To try the UI with no agent at all, dev/tools/mock-backend serves it against a mock on :7778; docs/walkthrough.md is the guided tour.

Deployment options

Four ways to deploy mast-web, in increasing order of operator control:

Path Command Best for
Hosted SPA Visit https://go-steer.github.io/mast-web/app/ (coming soon) "Just let me try mast"
Container image docker run -p 8080:8080 -e BACKEND_URL=http://core-agent:7777 ghcr.io/go-steer/mast-web:latest Production K8s / Cloud Run / Docker Compose
Agent --ui flag (planned) core-agent --attach-listen :7777 --ui then visit :7777/ui/ Single-binary deploys, air-gapped, local dev
Tarball + your own host tar -xzf mast-web-v0.1.0.tar.gz && nginx -s reload Custom CDN, strict hosting requirements

The container image bundles a tiny Go static-file server with the SPA and optionally proxies attach calls to a configured backend — eliminating CORS as a concern because the browser only ever talks to same-origin URLs. Configuration via env vars:

Env Default Purpose
LISTEN :8080 Bind address
BACKEND_URL — Optional reverse-proxy target; SPA hits /attach/* same-origin
API_PREFIX /attach URL prefix routed to the backend proxy
BACKEND_TOKEN — If set, the server injects Authorization: Bearer <token> into proxied requests; SPA carries no auth

For a hosted, multi-user install, proxy mode can also authenticate the human at its own edge and forward that identity to the agent as X-Asserted-Caller, so the browser holds no agent credential at all:

Env Default Purpose
AUTH_MODE none none | proxy-header | iap-jwt. Anything but none requires proxy mode
AUTH_HEADER — Identity header for proxy-header mode; no default on purpose
IAP_AUDIENCE — Expected aud for iap-jwt mode
BACKEND_AUTH bearer bearer | google-oauth | google-id-token
BACKEND_AUDIENCE $BACKEND_URL Audience for google-id-token
EXTERNAL_URL — Canonical public origin; used by the CSRF check
SSE_MAX_LIFETIME 30m Cap on any proxied request, SSE included
ALLOW_UNAUTHENTICATED false Acknowledge an open, non-loopback proxy

Note that a remote cross-origin backend is not a supported shape: neither core-agent nor mast emits CORS headers, so the browser blocks every response. Use a loopback backend or serve the SPA same-origin behind proxy mode. See the deployment guide for IAP setup, header-trust caveats, and the backend-side configuration.


Project layout

mast-web/
├── web/                    # the SPA (HTML/CSS/JS)
├── docs/                   # design docs + Hugo site
│   └── site/               # Hugo (Docsy theme)
├── dev/                    # build/test/lint tooling (matches go-steer convention)
│   ├── ci/presubmits/      # CI delegators
│   └── tools/              # actual logic
├── dist/                   # build output (gitignored)
└── .github/workflows/      # CI/CD

Verifying a build by hand

dev/tools/ci and the Playwright suite under smoke/ check that the code agrees with itself. Neither of them looks at the screen. docs/walkthrough.md is the part a person does — a numbered script, run against the mock backend, that reaches a yes or no on every capability this release claims. Run it before a tag, and whenever a change touches something whose failure mode is social (whose session is this, did my Stop land, who approved that) rather than mechanical.

dev/tools/mock-backend     # SPA + fake attach backend on :7778

Related

  • core-agent — the agent runtime this UI talks to; it embeds a pinned mast-web release behind --ui
  • mast — the former sibling runtime, now folding into core-agent (go-steer/mast#596); still a supported backend until it is archived
  • core-tui — terminal TUI alternative for developer/experimentation workflows
  • cogo-wasm2 — the project this borrows rendering surface from

License

Apache 2.0 — see LICENSE.

About

Operator-facing web UI for mast and any attach-mode-compatible core-agent variant. Thin client over the attach protocol; no agent loop in the browser.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages