@abstractframework/code
v0.16.2
Published
Browser-based coding assistant for AbstractFramework - connects to AbstractGateway for durable agent sessions
Maintainers
Readme
AbstractCode Web (Gateway-First)
The browser client for AbstractCode, published to npm as
@abstractframework/code. Like the terminal client, it is a gateway-first
host UI:
- talks only to AbstractGateway (
/api/gateway/*) - renders by replaying/streaming the ledger
- resumes waits by submitting durable commands
Run it without installing anything:
npx @abstractframework/code # serves on http://127.0.0.1:3002The server listens on 127.0.0.1 by default; pass --host 0.0.0.0 to accept
other machines directly (it then prints a warning that it is exposed beyond
this machine). AbstractGateway (0.7.0 or later) can also start it
and serve it at /apps/code/ on the gateway's own address, which is the one
address to expose or tunnel for a remote machine. Launch flags:
--gateway-url <url>, --port <n>, --host <addr>, --help; without
--gateway-url the server uses the gateway installed on this computer
(~/.abstractframework/gateway.json), else http://127.0.0.1:8080.
The interface uses AbstractUIC themes, authentication, settings, and reusable
workflow chat. It builds without a sibling checkout: the shared
@abstractframework/* components install from npm like any other dependency,
at the ranges declared in package.json.
The interface adapts to phones, tablets, laptop windows and wide screens: side panes become drawers below 1024 px, dialogs become bottom sheets on phones, and touch devices get 44 px targets. See responsive layout.
You can open it from another computer at the gateway's plain http address (LAN or Tailscale); voice needs an https address there. See opening the app from another computer over http.
Docs:
- Web overview:
../docs/web.md - Deployment:
../docs/deployment-web.md- Voice (optional): composer dictation, replies read aloud, and the Voice panel (see
../docs/web.md)
- Voice (optional): composer dictation, replies read aloud, and the Voice panel (see
Archiving conversations, Archived · N and the gateway's default voice
routes need AbstractGateway 0.13.0 or later. Shared unread markers need
AbstractGateway 0.19.0 or later; the Avatar view's live line and Findings and the
Paused · N automation section need AbstractGateway 0.20.0 or later. @ mentions,
the author on every reply and the gateway's iteration default need AbstractGateway
0.21.0.
Local dev
cd web
npm ci
npm run devIn the UI:
- set
Gateway URL(e.g.http://127.0.0.1:8080), or configure it on the server with--gateway-url(the packaged server;npm start -- --gateway-url …) - set
Gateway userand that user'sGateway token
When a Gateway user is provided, the web server exchanges the token for a Gateway browser session and stores only app-scoped session cookies. The raw token is not persisted in browser settings. Vite development and the packaged server use the same session proxy; the browser keeps API requests same-origin.
Choose a workflow in the toolbar: Gateway default (the coding agent your
gateway's operator set, resolved by the gateway when the turn starts), or a
coding agent listed under Shared (made available by your gateway's admin)
or Mine (agents you published or imported). The list holds only the
workflows the gateway says this app can run for you
(GET /api/gateway/bundles?executable_for=abstractcode.agent.v1); there is no
"show all" switch — ask your admin when a workflow is missing. The right rail's panels (Activity, Files, Model, Workflow, Workspace, Tools,
Skills, Voice) apply to the conversation or automation selected in the
sidebar; Files shows the workspace on the gateway with previews, Model → Stream replies shows replies as the model writes
them (on gateways that support it), and About shows the app's, the
framework's and the gateway's versions. Agent tasks use the composer; structured workflows use
Inputs. Questions, tool approvals, and
event waits appear in the conversation. Runs and history remain on the gateway
when you close the browser. Unsent drafts and queued turns do not survive reload.
Whether a browser may change the Gateway URL is decided by the browser's
address: only a browser on this machine may reconfigure it (forwarded headers
count only from a loopback peer such as the gateway's /apps/code/ relay),
and a sign-in over a loopback connection must name a loopback host. The
server-configured Gateway URL is authoritative for everyone else. Set ABSTRACTCODE_ALLOW_REMOTE_BROWSER_GATEWAY_CONFIG=1 to allow
it from anywhere, behind your own access control. Behind a reverse proxy every
peer is the proxy, so loopback carries no meaning there — set
ABSTRACTCODE_TRUST_PROXY_HEADERS=1 to refuse browser-supplied changes
regardless of peer, and add the env var above if you still want to permit them.
Compact conversation cards
Conversation rows use AbstractUIC's shared Watch-style SessionCard: cyan marks unread
content, orange marks a pending human question or approval, and a small ring marks work.
Reading clears unread only when loaded content is visible in the focused page. It never
answers or dismisses a pending approval. Read receipts are local to this browser and account;
Code and Assistant share them when served on the same origin. Existing history is baselined
on first use. Regenerate the canonical compatibility snapshot with npm run sync:sessions;
the normal build verifies its provenance. Other devices keep independent read state.
Message files and tool results
The canonical AbstractUIC conversation snapshot (npm run sync:conversation) supplies the
same message attachments, safe clickable links and structured tool-result viewer in both web
clients. Files accompany the original user or assistant message, including restored history
and file-only replies. File bytes load when opened through authenticated reads. The build
verifies snapshot hashes; no sibling checkout is required to build the committed web app.
Avatar conversation view
Choose Avatar in the conversation header for a second view over the same work. The avatar shows activity and, under it, one live line: the latest thing the assistant reports while it works, replaced as soon as something new arrives (nothing cycles). Click it to read it in full, then Reply to this to answer it or Latest to follow again. The findings it reports (facts or evidence it established) accumulate in a Findings panel beside the avatar, or a sheet you open with Findings on a phone; open one to see the results it came from. The answer appears once, as a message, with Markdown, links, files and structured results like the conversation. Conversation restores the ordinary chat and technical details. Switching views preserves the current draft and attachments.
Permission requests explain the action, its destinations and the assistant’s stated reason, with the same three labeled choices as the Conversation view: Deny, Allow (that tool, for the rest of this conversation) and Allow All (every tool, for the rest of this conversation). “Review details” opens Conversation mode for the technical arguments. A reason is shown only when the backend attached a public explanation to that exact request; older requests may have none. Avatar mode also uses the compact multiline composer and omits technical execution counters from its status strip.
While work continues, type or speak naturally to guide it. Reply to this on the live line pins a specific public update as context. Sending a correction makes it available to the assistant; the assistant's later response shows whether it adopted the correction. Questions use their displayed answer controls. Permission requests require an explicit choice; an ordinary message or silence grants no permission.
Essential questions keep waiting. A clarification may state a two-to-five minute answer deadline and what will happen without an answer. Conversation cues controls visual and audio alerts independently for questions, permission requests and completion. Audio alerts default off. Voice narration uses the existing voice preference; reading history or editing a reply silences automatic narration. Playback can be paused or silenced without stopping the task.
Public updates require a run started in Avatar mode and a backend supporting the public conversation protocol. Switching an already active legacy run changes its presentation; it does not manufacture missing updates. Tool details remain available in the ordinary view. Public updates describe the assistant's communicated conclusions, not private reasoning, and source references establish provenance rather than proof of correctness.
