Harness Console¶
The local control plane's front end: one service that lets you view, manage, orchestrate, and deploy the fleet's AI harnesses from a browser, using exactly the tools/ entrypoints the CLI and CI run. The same page, built static, is the public site on GitHub Pages — https://bamr87.github.io/bamr87/ — where it reads a snapshot of this API instead of the API itself, and where a visitor can connect GitHub or a running console to get the write path back (docs/CONSOLE-PAGES.md; docs/HARNESS-OPS.md, "The two planes").
Run it¶
tools/dash console # native: bootstraps .venv-console (latest deps), serves http://127.0.0.1:4001
tools/dash console --docker # the compose service (same devenv image, loopback port 4001)
docker compose up -d console # same thing
CONSOLE_RELOAD=1 tools/dash console # auto-reload while editing app.py / core.py
cd tools/console/web && npm run dev # the page with hot reload on :5173, proxied to a running console
For the dev server's Terminal page, start the console with DASH_CONSOLE_ALLOWED_ORIGINS=http://localhost:5173, so the WebSocket admits that origin.
The console is the runtime of the local control plane, and this page is one of its two front ends. AI agents are a third, through the fleet MCP server (mcp_layer/, which absorbed tools/fleetcore/mcp_server.py), whose action tools go through this same job API and confirm gate. The terminal dash (tools/dash tui, tools/tui/) is the other human one: it reads the same views from tools/fleetcore/, binds the same keys (keys v1) in the same bashOS palette, and submits jobs to this process's API, so a job started in either one shows up in both. The page also runs the terminal dash itself, on its Terminal page. Under Docker the TUI reaches it over a Unix socket (CONSOLE_UDS, serve.py) in a volume only the tui service mounts, which keeps the DNS-rebinding allowlist loopback-only.
The console is one of the local stack's three services; docker compose up -d phoenix starts the trace store it links to (http://127.0.0.1:6006), and tools/dash lake sync fills the data lake the Traces page reads (see docs/HARNESS-OPS.md, "The local stack").
Credentials are inherited from the process environment (gh auth login, or GH_TOKEN / FLEET_TOKEN / the Claude tokens in .env for the compose service) — and, since 0.3, they can also be handed to the console on the Credentials page when it starts without them: a pasted value lives in this process's environment (which is exactly what a job inherits) and dies with the process, a GitHub token can instead go to gh auth login --with-token over stdin so the CLI's own store keeps it, and writing anything to the gitignored .env (mode 600) is a separate, explicitly confirmed step. Values are never returned, logged, or placed on a command line; every status document reports credential names, presence and provenance only. DASH_CONSOLE_AUTH=off refuses every credential write; set DASH_CONSOLE_TOKEN to require Authorization: Bearer … on the API when the console is reachable beyond localhost. Independently of that, the console answers only to loopback Host values: binding to 127.0.0.1 does not by itself stop a hostile page from resolving its own hostname to 127.0.0.1 (DNS rebinding) and then talking to this origin as same-origin, which on a console that can dispatch workflows and run --apply fan-outs is a real lever. Front it with another hostname by naming that hostname in DASH_CONSOLE_ALLOWED_HOSTS (comma-separated) — and set the token as well.
The Django backend (ADR 0006)¶
The console's backend is moving to Django one route family at a time (ADR 0006, epic #699), in the same process on the same port. run.sh and serve.py serve dispatch.py, which sends /admin/, /accounts/ and /api/v1/ to the Django project in backend/ and every other path, the Terminal WebSocket and the startup lifespan to the FastAPI app exactly as before. Phase B1 ports no route and moves no data; what Django answers today:
| Path | What it is | Token |
|---|---|---|
/admin/ |
the Django admin over its own users and groups (the operational records arrive in B2 and B4) | required when DASH_CONSOLE_TOKEN is set |
/api/v1/healthz |
liveness: {"status": "ok"}, touches nothing |
never |
/api/v1/readyz |
readiness: 200 when the database answers and every migration is applied, else 503 {"status": "degraded", "checks": {…}} |
never |
/api/v1/version |
{"name", "version", "commit", "built_at"}: the hub release in CHANGELOG.md, GIT_SHA or the checkout's HEAD |
never |
/accounts/ |
reserved for B3's sign-in; 404 until then | required when set |
The dispatcher runs the console's own checks before Django sees a request, with the same functions the FastAPI routes use: a foreign Host is refused (421) on every Django path, and without the bearer token, when DASH_CONSOLE_TOKEN is set, every Django path but the three health endpoints answers 401. A browser cannot add that header, so on a console that requires a token the admin is reachable only through a client or proxy that sends it, until B3 brings the sign-in contract. Every Django response carries the page's Content-Security-Policy; the admin uses no inline script, so script-src 'self' holds. Its Referrer-Policy stays Django's same-origin: under the page's no-referrer a browser sends Origin: null with the login form and Django's CSRF check refuses it.
The settings come from the environment (backend/settings.py):
- The database is SQLite in
DASH_CONSOLE_STATE(default.fleet/console/, gitignored; the compose service keeps its own in theconsole-runvolume) unlessDATABASE_URLnames one (postgres://user:pass@host:5432/name, which also needspsycopgin the venv).run.shapplies the migrations before every start; a failed migrate is reported and the console starts anyway, with/api/v1/readyzsaying what is wrong. - The secret key is
DJANGO_SECRET_KEY. On loopback it may be unset: one is generated once into the state directory (secret_key, mode 600) and reused, and never printed. WhenDASH_CONSOLE_ALLOWED_HOSTSnames a non-loopback host it is required; without it the Django paths answer 503 with that reason and the rest of the console serves as before. - The hosts are the console's own allowlist:
ALLOWED_HOSTSequals the DNS-rebinding guard's list. DEBUG is always off; the session and CSRF cookies areconsole_sessionidandconsole_csrftoken, so a Django app on another loopback port never shares them.
.venv-console/bin/python tools/console/backend/manage.py migrate # what run.sh runs on start
.venv-console/bin/python tools/console/backend/manage.py createsuperuser # an admin login (asks for the password)
curl -s http://127.0.0.1:4001/api/v1/readyz
Both commands have an F5 entry in the 1-console group. The public site never imports Django: snapshot.py calls the service layer, and test_backend.py holds that.
The page¶
A React + TypeScript app on Mantine (app shell, Spotlight palette, modals, notifications), TanStack Query (one cache for every API document) and React Router (every view is a URL), built with Vite from web/ into web/dist/, which app.py serves. run.sh rebuilds it whenever a source file is newer than the last build, at latest versions and without a lockfile, like the venv. Without npm the API still serves, and / says how to build the page.
Nine sections, each a group of pages, with a drill-down for every entity. Every repo name, operation, job, loop, site and config block is a link to its own page.
| Section | Pages | Drill-downs |
|---|---|---|
| Profile | Home (who, the fleet's vital signs, featured projects, writing), About, Experience, Portfolio (every project as a card), Writing, Services, Contact | /blog/:slug — a post |
Overview (/overview) |
the fleet as a story: a status strip (repos by health as one segmented bar; findings by severity band and how many levers clear them, with the generator's cap named when the list is at it; both budgets' projected month against their ceilings with the week-over-week turn and whether that is better; what waits on the maintainer from the decision index, read on a console only; the oldest input), the Nodes line (from /api/nodes), the two budgets with a fifteen-day sparkline each, the harnesses against the standard (conformant / off / not graded, the most-missed controls, scheduled vs observed AI runs against the cap), flow (the issue-pipeline funnel, open PRs ready vs draft, issues), the hub scorecard as bullets against their thresholds with the trip wires, a weekday × UTC-hour heat strip of every AI cron with the crowded cells ringed, the attention queue grouped by lever (or flat) with a lever's job pill in its row, and every signal on one log-scale freshness timeline with its refresh. Trends are _data/harness_registry.yml's own git history (core.registry_history: one point per committed day, cached per HEAD; a shallow clone has one). Chart pieces live in components/Viz.tsx |
a finding → its project; its lever → the operation or page; every title → the page that explains it |
| Fleet | Projects (the TUI's Apps view from /api/fleet, filtered and sorted by fleetcore on the server), Desktop (the bashOS OS shell: an icon per app, each in a window; right-click an icon or a title bar for open beside, Live beside Local, a new tab and a link, or Shift+F10 and the title bar's button from the keyboard — below), Apps (the app portal: every fleet frontend, opened inside the console — below), Inbox (flagged items, filter by kind), PR queue (every open pull request, who moves it next, and bulk actions: below), Roadmap, Features (the fleet feature index), Engagements (the estimate/actuals ledger), GitHub (connect through the OAuth App; every repo the account sees; the action log), GitHub Projects (Projects (v2) across every owner, a table or a board by Status, read-only — below), Containers, Nodes (where hub workloads run, from /api/nodes: a card per node with its role, on/off state, reachability, capacity and placed services, then the drift and the placement table; a node that is off is never probed, and the published page shows the committed model with nothing probed — docs/PLATFORM.md) |
/projects/:name — everything joined on one project (/api/project/:name): health, CI, triage, open work, failing workflows, its harness workflows and crons, its runs and workflows in the lake, its content site, a live GitHub tab (below), and repo-scoped actions (deploy the kit, auth order, lake sync, evolution dispatch); /github/:owner/:repo — the same live view for any repo the account can see |
| Harnesses | Inventory (every AI workflow with its route, caps and verdict against the harness standard, the rebuild plan grouped by lever, the standard's controls; the Repos view keeps the per-repo baseline and the deploy to gap repos), Health (trip wires + scorecard), Schedules (caps, AI crons per UTC hour, the calendar), Loops, Workflows (the workflow atlas: every hub workflow and composite action, the standards as checks, run health with each failure classified from the lake, retirement candidates, and a designer that scaffolds a workflow inside the rules — docs/WORKFLOW-ATLAS.md), Work board (every open issue, PR, roadmap spec, spec package and backlog item on six lanes, in the order the loops take them; drag to reorder, move and reprioritise; throughput per loop) | /workflows/:id — triggers and their fleet.yml keys, jobs, the actions it stands on, Claude call sites, findings, its runs and why they failed, and a dispatch form typed from its own inputs; /workflows/actions/:id — inputs, outputs, callers; /loops/:id — schedule, committed outputs and their freshness, the local-half operations, a CI dispatch, Run locally beside it for a loop whose agent step has a local: spec (the JEV loop runner, below), the loop's jobs; /work?item=<key> — an item's drawer: issue gaps and thread, the spec packages a PR changes read at its head, the roadmap entry, a spec's tasks and open questions, a BACKLOG.md line |
| Spend | Costs (Claude usage as API-equivalent estimates set against the flat subscription as an effective discount — subscription.py, docs/OBSERVABILITY.md — metered API spend apart, and Actions minutes vs budget), Agent activity (/api/lake/review: local sessions + CI agent runs, findings, cost by repo, tool use) |
repos → their project's Runs tab; runs → GitHub |
| Observe | Traces (the lake + Phoenix: sync, extract sessions, export), Lines (every workflow with provenance and kill switch), Logs (Kibana), Metrics (Grafana), Code index (Qdrant search + harmonize + coverage) | a plane that is not running renders as an invitation to start it |
| Content | Content sites (the atlas), Voices (the fleet voice model voices/v1 — below) |
/content/:site — plan (narrative, pillar targets, add a pillar), suggestions (approve / reject), directives (move, add, file as issues — dry run, then confirm-gated apply), activity charts, documents. Every write goes to _data/editorial.yml in the working tree and shows its diff |
| Operate | Jobs, Operations (the allowlist, grouped), Toolbox (scripts, skills, kits), Terminal | /jobs/:id — live log, cancel, run again with the same parameters; /ops/:id — the parameter form, the loops it belongs to, its jobs |
| Settings | Config (_data/fleet.yml, one top-level block per page: /config/:section), Connect (on the public build: a GitHub token or a console), Credentials (this console's credentials, gh login, the token contract and ages, rotate from .env, Anthropic API keys, AI auth order) |
— |
The frame. The sidebar's sections fold: the one holding the current page opens itself and stays in view, the rest stay as you left them (this browser remembers), and a number beside a page says what needs attention there (Overview, Inbox, Health, Jobs), summed on a folded section. The palette opens on the pages this browser last visited. A page that throws is contained with the header and sidebar still up, a failed load offers Try again, a failed refresh keeps the last answer on screen under a warning, and when the console stops answering one banner says so and clears by itself. Below the md breakpoint the header's status chips sit at the foot of the sidebar. Enter belongs to the focused control and opens the selected row only when nothing has focus; sortable headers are buttons, every row that opens a page carries a real link, the first Tab reaches a skip link, and motion stops under prefers-reduced-motion.
Running an operation works the same from any button, form or palette pick. A GitHub-writing operation says in plain words what it will do and asks first (the server refuses a write without confirm=true anyway). The job then opens in a side drawer on its live log, so the page you were on stays put. A job that succeeds refreshes every document, because its output is new data in the working tree: once, when this tab started the job or was watching it run. Opening the log of a job that ended earlier refreshes nothing.
Reads are cheap on the second ask. Every committed signal is read through tools/fleetcore/yamlio.py: libyaml's parser, and one parse per version of a file, so /api/state no longer parses the same ten files (1.4 MB) for every request while the requests beside it wait. A changed file is seen at once; one changed in the last two seconds is parsed and not kept, because a filesystem's timestamps are coarser than two writes in a row. The Content-Security-Policy, built for every response, re-reads fleet.yml on the same rule. Responses are gzipped for a client that asks (/api/work is 770 KB of JSON, the page's script 1.3 MB); the /api/live/stream event stream is not, because a compressor would hold it back.
Jobs keep their history. The index (jobs.json) and every job's log live in DASH_CONSOLE_JOBS — under Docker the console-run volume, so a restart or a recreated container keeps them; a job that was running when the process died comes back interrupted. Jobs past the newest 200 are dropped with their logs, and Clear finished / Clear failed on the Jobs page (DELETE /api/jobs?status=…) forget finished jobs and delete their logs — never a running one. The page groups the list two ways: every run, newest first, filtered by status, operation group and text; or By operation, one row per operation with its latest result, run count and success rate. Three guards stop jobs that cannot succeed: the lake writers (lake-sync, lake-sessions, lake-export, observe-ship, content-sync — exclusive="lake") run one at a time, a second answering 409 with the job that holds the lake rather than dying on database is locked; Docker-backed operations (observe-up/down/reset) report themselves unavailable when this process has no docker compose and daemon — the case in the console's own container, which is never given the socket — with the host command to run instead; and loop-run (below) reports itself unavailable when no claude CLI is on this process's PATH — the console container and the devenv image have none — and holds a key per loop (loop:<loop>), so two local runs of one loop never interleave while different loops may run side by side.
Every job says what it is doing now (docs/job-status.md, HUB-064). Each time the console reads a job it derives a state (queued, running, stalled, done, failed), the seconds since it was sent (age_s) and since its log last grew (idle_s), and the reasons it may be slow: queue_wait (behind a job holding the same lock or the one GitHub-write slot), collector_lag (the live collector's sessions.json is stale), long_step (past the p90 of its operation's recent successful runs) and no_heartbeat. A running job whose log has not grown for 120 s (an operation's stall_s overrides it; loop-run and conflicts-resolve allow 600 s) reads stalled. GET /api/jobs/{id}/status answers one job without its log, GET /api/jobs rows carry the same fields, the MCP's job_status and jobs_list(state=…) read them, and the Jobs page shows a stalled badge, a Stalled tile and filter, the age and idle columns and the diagnostics. Nothing new is stored: jobs.json keeps its shape.
A loop's agent step, run here (loop-run; P2 of epic #484, docs/JEV.md). Every loop page shows the agent steps the JEV loop runner can run on this machine (each tools/jev/steps/<loop>/<step>.yml with a local: block, read through tools.jev itself) and offers Run locally beside Dispatch in CI (L on the page; the TUI's L runs the selected repo). The op is tools/dash loop run <loop> [step] --target <name> --json: the same spec, planner and prompt bytes CI renders, one capped attempt per item inside the § 13.8 sandbox, then the dry-run preview under .fleet/runs/<run_id>/ — nothing is filed. rehearse stops before the model call at $0 and needs no confirm; a live attempt spends Claude budget (API-equivalent, an estimate; held to budget.loops), so the confirm gate asks first and one confirmed job runs at a time. apply files the reviewed preview through the engine's own publish gate — the OPS remote-write path, constitution § 11.8 (amendment ops-remote-write-path, option (a) of #487): a GitHub write at tier high, refused without the confirm, the publish token probed with gh api user before anything is written, held to the reviewed bytes, never with --scheduled (the op never passes it) and never with rehearse; run_id publishes an earlier run's reviewed preview (tools/dash loop publish <run_id> [--item <key>] --apply), item naming the preview by its key — owner/repo, or owner/repo:path for the doctor's per-workflow items; never a registry name, which matches no preview — when the run has several, and without apply that call is the read-only "matches / differs" check. A step whose filer cannot file yet (can_apply false in the op's agent_steps: evolve and the agent fill until bamr87/bamr87#488's publish step lands) refuses apply before anything runs, in the op and in the engine alike, so no attempt is ever paid for a filing that could not happen. The MCP's console_run reaches the same op with confirm=true, so the gate is this console's. The engine's run record (--json) is parsed once, in tools/fleetcore/loopjob.py, into the fields the job page and the TUI render — status, spend with its label, model, turns, one row per item — and JEV_WORK_ROOT / JEV_RUNS_DIR pass through from the console's environment unchanged (they must point outside the hub and outside Claude's temp root, which the engine refuses). Test files point DASH_CONSOLE_JOBS at a temp dir before importing the console, because importing app builds a job manager on whatever directory that names.
The header's tree chip counts the hub's own uncommitted files: git status --ignore-submodules=dirty, so edits inside a submodule's working tree (which the hub cannot commit) stay out of it while a moved submodule pointer still counts. A plain git status walks all ~40 submodules and took 17 seconds over the Docker Desktop bind mount, past run_quiet's timeout, so the chip used to read "clean tree" while every poll stacked another walk. Concurrent /api/state polls now share one answer for ten seconds, a status that fails or times out reads "tree unknown", never "clean", and a timeout kills the command's whole process group. Under Docker the service runs with init: true: serve.py is PID 1 and never reaps processes it did not start, so orphaned children and timed-out healthcheck curls used to pile up as zombies (the stacked git walks pinned a CPU and were what timed the healthcheck out).
Refine — the harness itself, and the review queue¶
Harnesses → Refine (/refine, /api/refine; docs/HARNESS-REFINEMENT.md, ADR 0004 P2) is JEV capability three in the page, every part of it $0: Surface runs the harness-surface check over the hub (the context-file chain against its cap, every skill's frontmatter, the subagents, the hooks block's shape, every script a component names, the MCP file) and the sweep over every checked-out fleet repository, one row each with its problems; Plans shows one Propose–Probe–Compose plan per agent step (R = 4k rollouts, P = 3k sessions, the ceiling from the step's own budget.call_sites cap and harness_refinement.stage_usd, judged against this month's budget.loops, the tunable files a candidate may edit, the hard rules it may not, the domain's library) with the schedule unfolded on demand; Review queue lists every local loop-run attempt whose dry-run preview has not been filed — the preview and each body readable in place, Check it still matches (loop-run with run_id + item, $0) and Approve and file (run_id + item + apply: the engine's publish gate, constitution § 11.8, behind the confirm) beside it, disabled where the step's filer cannot file yet (#488); Evidence lists the trees refine-evidence built under .fleet/refine/ and opens any file of one, redacted as the proposer would read it; Library is the experience library (_data/harness_library), its uncommitted entries flagged, with the $0 reflector's form (Record a lesson → POST /api/refine/library, validated and leak-checked by tools.jev.library, written to the working tree, never committed). The ops are refine-surface, refine-plan, refine-evidence and refine-library-check (group refine, tools/dash refine …); each loop page with a local agent step lists refine-plan in its local half. The public build publishes the surface, the sweep, the plans (without the ledger position) and the library; the evidence trees and the review queue exist only on a console.
Sprints — the live expedite-sprint record¶
Harnesses → Sprints (/sprints, /api/sprints; constitution § 27.7, docs/EXPEDITE-SPRINTS.md) renders every record in _data/sprints/ (sprint/v1, the format): the record chosen with ?sprint=<slug> (the active one by default) with its spend against the cap (API-equivalent (estimate)), appetite, gates passed and trip wires as tiles, the phase strip, the three gates with who, when and the evidence, the items and pull requests, the trip wires, the DORA snapshot (a placeholder until #690) and the retro, then every sprint in a table. core.sprints_doc() reads them through tools/sprint_record.py, the same lint drift check (q) runs, so a record that breaks the standard shows its findings, and one that holds anything credential-shaped is withheld whole. It is read-only on purpose: a record changes only by a pull request, so there is no write route, and the public build publishes the same document. DASH_SPRINTS_DIR points it at another directory (the page's evidence was built from the test fixture that way). While no sprint is declared the page says how one starts.
The assistant¶
Operate → Assist (/assist, /api/assist, the assist op) answers a question about the fleet from the fleet's own data: one headless Claude Code session (tools/dash-gen ai-run, the prompt in assist.prompt.txt with the question and where it was asked from filled in) whose only MCP server is this console's own layer over stdio (--strict-mcp-config, pointed at DASH_CONSOLE_URL, the token inherited from the process environment, never a file or an argv), whose tools are mcp__fleet, Read, Grep and Glob on the hub checkout and whose denied list names every writing tool and the network, under --permission-mode dontAsk, --setting-sources user (the hub's own hooks stay out of it), the model, turn cap and dollar cap of _data/fleet.yml assistant: (the model an exact id, § 13.3), a wall clock, and --usage-limit skip. It spends, so it is confirm-gated like a live loop attempt (confirm: spend), runs one at a time (exclusive: assist), and every answer is a job: the question, the answer (rendered as Markdown through the site's sanitizer), the steps it took, the turns, the models and the cost (API-equivalent (estimate), from the result and outcome files ai-run wrote) are the job's assist view, on the Assist page's thread and on the job's page above the raw log, and the AI ledger holds its row like every other local run. The session holds no write tool: by itself it cannot start a job, file anything, edit a file or reach the network.
The docked assistant is the same op as a conversation beside the page (ADR 0013, web/src/assist/). The sparkle button in the header of every console page opens a panel in the shell's aside, beside the page and not over it. A message there continues a conversation: every message is still one capped session, and the console replays the earlier questions and answers into its prompt from its own records under the job directory, never from the request (conversation; assistant.conversation_messages caps the length). It goes through runOp like every other operation: the first message of a conversation gets the This spends Claude budget dialog, which states the envelope, and a later message that continues that confirmed conversation in the same tab is sent without asking again. A message also carries the page the person has open (page), which appends assist.page.txt to the prompt and attaches the page tools.
The page bridge (page_bridge.py, /api/assist/page…) is the one path between a session and an open tab, and it is a queue, not a remote control. A session's page tool asks the console for one of eight actions; the tab's own code (web/src/assist/pageBridge.ts) picks it up on a long poll, does it in the DOM as that person, and posts back what happened.
| Tool | Tier | What it does |
|---|---|---|
page_snapshot |
look | The route, the title, the page as an outline, every control with a ref (e12) and its state, any open dialog, recent page errors, the documents still loading or failed, the console's pages by path |
page_read(ref) |
look | The full text of one region the snapshot cut short |
page_data(key) |
look | A document the page loaded from the console API (its query cache), or the list of them |
page_highlight(ref, note) |
look | Scrolls an element into view and rings it for a few seconds |
page_navigate(path) |
act | Goes to an in-app path, never a URL |
page_click(ref), page_fill(ref, text), page_press(key) |
act | Uses one control, named by a ref from the last snapshot, never by a selector or a script |
What bounds it: the ceiling in _data/fleet.yml assistant.page_access (off, look, act); the mode the person picks in the dock for that tab (Look; Ask first, where each click, fill and key press is shown to them with the control ringed and waits up to 90 seconds for their yes; Act, which a reload does not remember); and sharing, which is the dock being open, so closing it ends the session. Two rules have no setting. Nothing is clicked or typed inside a modal dialog, in any mode, and while one is open nothing on the page behind it is used either: every confirming question this console asks is a Mantine modal (test_console.py holds that premise), so the yes on a GitHub write or a spend stays the person's, and Escape, which answers nothing, is the one key that works there. A secret field is never read and never filled, a link that leaves the console is the person's to open, and the dock itself is invisible to a session. The bridge checks every argument before the tab sees it, caps sessions, queue depth, commands per minute and result size, scrubs credential shapes from every result, and writes one audit line per command to .fleet/assist/page-audit.jsonl in the hub checkout (when, the session by prefix, docked or paired, the console's page or a fleet page and its origin, the action, its target, the mode, the outcome; a fill by its length, never its text). How the assistant is observed says where that line goes next.
Two kinds of session reach a page. The docked session is the one this console starts for a message: its MCP server process gets that page's session id in its environment, with the page scope and every other write surface pinned off (core._assist_mcp_config). A paired session is a Claude Code session you already have in a terminal or an editor with the fleet MCP server: switch pairing on in the dock, give it the code (eight characters, single use, ten minutes; wrong guesses lock pairing), and it calls page_attach. It gets the look tools by default and the act tools only when its server runs with HARNESS_MCP_SCOPES=page; the mode and the two rules apply to it the same way, and the dock says which session asked. The page tools exist on the stdio transport only.
Where it runs. Starting a session needs the claude CLI where the console runs. The console's container carries none, so there the dock says so and offers the two ways forward: pair a session, or run a console on the host (CONSOLE_PORT=4010 tools/dash console). assistant.enabled: false switches the op off everywhere, and with it page access.
Checking it without spending. assist_standin.py is a scripted stand-in for the CLI: linked onto a test console's PATH as claude, it takes the flags ai-run passes, starts the real MCP server from --mcp-config, calls a few page tools chosen by keywords in the question and prints the records ai-run parses. Everything but the reasoning is then real, at $0, and every answer says it came from a stand-in. It refuses to run unless DASH_AI_LEDGER names a scratch ledger. The HARNESS.md roadmap's "assistant in the console frontend" is this; a remote assistant (Grok Bot over the MCP HTTP transport) reaches the fleet tools, not the page tools.
Checking the model without a browser. assist_eval_console.py is the stand-in's mirror: it keeps the model real and records the page. It serves one case of the assistant's eval set (evals/console-assist/) on loopback, with the real broker (page_bridge.PageBridge) in front of a page played from the case's recording, and logs every request with what it answered; tools/evals.py grades that log. python3 tools/evals.py run console-assist --dry-run validates the set at $0; --canary runs five capped sessions on assistant.model and spends (docs/EVALS.md).
Fleet pages: the same bridge for every site and app¶
A page of any fleet site or app that carries the kit's payload (templates/assistant/, ADR 0014, UPS-AST) shares itself with this console the same way, from a small Assistant panel on that page. A Claude Code session paired with it (page_attach with the panel's code) then has the same page_* tools, and is told which repo and source file the page came from. tools/dash apps assist lists which adapter each repo's platform gets.
Such a page holds no console token, so its calls, POST /api/assist/fleet/<open|next|result|mode|pair|close>, take none. What admits it is its Origin: an address the registries declare for a fleet frontend (fleetcore.apps.target_origins: each frontend's entry_url and its dev ports in _data/ports.yml, a loopback port under both of its names). A session answers only to the origin that opened it, its id rides in the request body and never in the address, and these sessions have their own cap. DASH_CONSOLE_ASSIST_ORIGINS (comma-separated) admits more, for a fixture or a site not registered yet.
The ceiling is _data/fleet.yml assistant.fleet_pages: "off" refuses every fleet page, "look" lets a paired session read one, "act" lets the person on that page choose Look, Ask first or Act. The console starts no session of its own against a fleet page: it is reached by pairing only. The Assist page lists the fleet pages shared right now (Shared pages: the repo and source file, the origin, the mode, whether the page is listening, whether a session is paired, the commands so far), and its End stops one: POST /api/assist/shared-pages/end with the eight characters the list shows, behind the console token and not one of the token-free fleet routes. The session id, which is the capability, never leaves the broker to do it; an id two sessions share is refused, never guessed. The page's panel then says the sharing was ended from the console, a paired session's next page tool is refused with that reason, and one audit line records it.
A session's newest poll is the only one handed a command: a page that reloads or loads its next address leaves its last poll waiting with nobody behind it, and a command handed to that one would be lost.
How the assistant is observed¶
The assistant is agent local:console-assist in the agent inventory (_data/agents.yml, constitution § 29): registered with an owner, a switch (assistant.enabled), a cap (assistant.budget_usd) and a model (assistant.model), and held to the KPIs its kind declares. Every console operation that starts a Claude session names its agent (agent= in core.OPS), and test_console.py fails one that is not in the inventory.
It leaves these records, and one reader, tools/fleetcore/assistlog.py, reads the first two back for every surface:
| Record | Where | What it holds |
|---|---|---|
| A message | The AI ledger (~/.claude/ai-activity-ledger.json, source console assist), one row from tools/dash-gen ai-run |
The session id, model, tokens, cost and the cost's source, outcome, cap, duration |
| A page command | .fleet/assist/page-audit.jsonl (DASH_CONSOLE_PAGE_AUDIT overrides it; rotates once at 2 MB), one line from page_bridge.py, and the same line on the console's stderr as page-bridge audit {…}, which the log plane ships |
When, the session's first eight characters, dock, paired or operator, the console's page or a fleet page with its origin and repo, the action, its target, the mode, the outcome. Never typed text, never a session id |
| A job | The console's job store, on the Jobs page | The question, the page context, the log, the session's steps |
| A transcript | ~/.claude/projects/, written by Claude Code |
Every turn and tool call; tools/dash lake sessions reads it into the lake |
| Telemetry | Claude Code's own OpenTelemetry, when it is enabled | ai-run sets OTEL_RESOURCE_ATTRIBUTES to fleet.source=console-assist,fleet.call_site=local, so the session can be told from any other local one |
The surfaces, all read-only and all over the same document (assist-activity/v1):
- The Assist page: Shared pages, How it is observed (messages and page activity, for 7 days, 30 days or all time) and In the agent inventory. The published build shows the inventory entry only: activity is one machine's record.
GET /api/assist/activity?days=N&limit=Nand the MCP toolassist_activity.tools/dash apps assist activity [--days N] [--json]from a terminal, with no console running.tools/dash lake assistreads both records into the lake (page_audit,assist_runs) and reports them with the Claude Code sessions whose transcripts show a page tool call. A session that is also in the ledger was started by the console (docked); one that is not attached with a pairing code (paired). A paired session is the person's own, so it has no ledger row: its transcript is its cost record, and the lake prices it for its whole length. The dailycom.bamr87.harness-reviewjob runs this step.
An outcome of refused (the mode or the ceiling), page (one of the page's own rules, or an element that is gone), declined (the person) or timeout (nobody answered) is a no, and the page counts those apart from faults: they are the rules working.
Voices — the fleet voice model¶
Content → Voices (/voices) is the editor constitution § 23 rule 7 asks for: _data/voices/voices.yml (voices/v1, the voices, styles, personas and assignment rules lifehacker.dev and zer0-CMS read) is the only copy, and the page writes an edit back to it as a draft pull request, never to a database. GET /api/voices is the file with its tools/voices.py check errors, a drift banner when it differs from origin/main (read from the local remote-tracking ref, no network) and the schema's enums for the form. Defaults, each site's profile and each persona are forms (name, role, enabled, perspective, voice, tone and the other text fields, the style enums, topics cover and exclude, beats, repos); the assignment rules are a table (persona, activity, repos, cadence, order, the default last); a layer's other keys (bans, lifts, vocabulary, …) round-trip untouched. Preview (POST /api/voices/preview) renders the edit in the file's canonical layout (tools/voices.py render: fixed key order, the header comments kept, so the diff is the edit) and diffs it against origin/main with a plan id; it writes nothing. Dry run (POST /api/voices/stage) stages those bytes under the job dir, never the working tree, refusing an edit that fails the check, changes nothing or no longer matches its plan, then runs the voices-pr operation without apply: tools/voices.py pr --file <staged> --plan-id <id> prints the diff and the branch it would push. Open the draft PR is voices-pr with apply — the OPS remote-write path (constitution § 11.8): refused without the confirm, with scheduled or --scheduled, with a dirty engine (tools/voices.py or the schema uncommitted), while another chore/voices-* pull request is open, or when the open-PR list cannot be read; the publish token is probed with gh api user and handed to that subprocess only; the plan is re-checked against a fresh origin/main; the commit is built in a throwaway detached worktree and verified to change _data/voices/voices.yml alone, then one chore/voices-<date>-<plan> branch is pushed and one draft pull request opened. It never merges. The published page shows the model read-only.
GitHub, through the console's OAuth App¶
The GitHub page connects the console to GitHub through an OAuth App you register once (github_link.py):
- Create the app at github.com/settings/applications/new. Set the callback URL to
http://127.0.0.1/api/github/oauth/callback(GitHub accepts a loopback callback on any port), and tick Enable Device Flow. - Give the console its client ID, and optionally its secret, as
GITHUB_OAUTH_CLIENT_IDandGITHUB_OAUTH_CLIENT_SECRET. Paste them on the GitHub page, set them on the Credentials page, or put them in.env(compose passes both through). - Press Connect.
| Flow | Needs | How it goes |
|---|---|---|
| Device code (default) | the client ID | GitHub shows a short code; you type it at github.com/login/device and the console polls for the token, at most once per GitHub's interval. Works natively, in Docker and over SSH |
| Browser redirect | ID + secret | GitHub's authorize page, back to /api/github/oauth/callback. A single-use state minted by an authenticated request, plus PKCE (S256), protects the return. The callback cannot carry the console's bearer token, so the state is its guard |
The token never reaches the page. It goes where you chose: this console session (GH_TOKEN, inherited by every job, gone when the console stops), the gh CLI's login (gh auth login --with-token over stdin), or the session plus .env (explicit confirm). The console then acts as that account. It resolves its identity the way gh does (GH_TOKEN, then GITHUB_TOKEN, then gh's stored login), so the page, the jobs and the terminal dash agree. Disconnect clears the session token and, when the secret is known, revokes it at GitHub.
Repo management reads every repo the account can see, and writes only to fleet repos the hub owns: the registry's repos under the hub's owner, plus hub.repo and hub.shared. An external mirror such as microsoft/skills stays read-only. The writes are:
- Issues: open, comment, close (completed or not planned), reopen, add and remove labels.
- Pull requests: comment and label. The console never merges.
- Runs: re-run failed jobs, cancel.
- Workflows: enable and disable.
Each write states what it will do and asks first, and the server refuses one without confirm=true. Each is recorded in the action log on the GitHub page. Nothing merges, deletes, pushes or changes repo settings. DASH_CONSOLE_GITHUB_WRITES=off makes the surface read-only, and DASH_CONSOLE_AUTH=off also refuses connecting.
The app portal¶
Fleet → Apps (/apps, docs/FRONTEND-PLATFORM.md, ADR 0005) lists every frontend the registry declares and opens one inside the console at /apps/:id: the Live site or the Local dev stack on this machine, at the page's width or at one of the verify kit's device sizes, with a path box to move inside the app. GET /api/apps is fleetcore.apps.apps_view(): each frontend: block joined to its entry_url and to its local ports in _data/ports.yml, the ones its compose stack publishes or, for a devenv-hosted site (bamr87.github.io, lifehacker.dev, cv-pro, rewind-arcade), its port in the workspace block the hub's devenv container publishes. It is the document tools/dash apps prints, and it carries addresses only.
Whether an address answers is asked by the browser, because a frame loads from where the reader sits and not from this process: a stopped local stack shows the command that starts it (tools/dash dev up <project>), never an error page in a frame. The list checks every address only when a console is connected. The public build lists addresses, asks nothing on load, and checks a local stack only after the reader clicks, since a public page must not reach into a visitor's machine unasked.
A frame points only at a registry address plus a path inside it: the query string picks among an app's targets and never supplies a URL, and a path that would leave the app's own base address is dropped. Frames are sandboxed without top-navigation, so an app cannot take the console's tab. An app served from the page's own origin (the public build beside bamr87.github.io/<repo>/) is framed without allow-same-origin, so it cannot read what the page stores; such an app starts without its saved preferences and one that needs browser storage may not render there. The console's Content-Security-Policy names exactly the launcher's origins in frame-src and connect-src (fleetcore.apps.target_origins, held equal by test_console.py), so a new origin is a registry change. tools/dash apps check reports from a terminal whether each address answers, whether it moves to another origin and whether it may be framed.
The desktop: bashOS as the OS shell¶
Fleet → Desktop (/desktop, docs/FRONTEND-PLATFORM.md, ADR 0005) is the bashOS desktop in the browser: dotted paper, an icon for every fleet app, floating windows, a taskbar with a bashOS button. It is its own chrome, outside the console's sidebar. Three layers: the OS shell (the desktop and its windows), the App Shell every window shares (the Apps page's controls: where the app runs, a device size, a path, reload, open outside), and the app (a fleet frontend, framed under exactly the Apps page's rules).
The window state is bashOS's own layout reducer, web/src/vendor/bashos/shell.js, byte-identical to the one bashos gui runs (test_bashos_shell.py pins it): open, focus, move, resize, snap to an edge, minimize and restore, tile and cascade, at most eight windows. The icons are a dock beside the window area, so a maximized or tiled window never covers the launcher. Shift-click an icon for a second window of the same app (Live beside Local). ⌘\ cycles windows. The taskbar's link button copies a ?windows= address that reopens the desktop; a layout carries scene and app ids and geometry, never an address, and ids the registry does not declare are dropped. Beside the reducer's layout it carries what each app window shows (a: the target id, the device and the path inside the app), so Live beside Local reopens on its two targets; a target the app does not declare, a device outside the verify kit's matrix or a path that would leave the app's address falls back to the app's default. The tab's last layout, views included, comes back on reload. Below 900 px the desktop is a home screen: the icons, then one app at a time.
The console's own pages open as windows. The taskbar's bashOS button lists every page; the Console icon opens Overview; and with the Desktop on screen a pick in the palette opens a window instead of leaving. A page in a window is a frame of this same app: found framed (EMBEDDED, web/src/api/backend.ts), the page drops its header and sidebar, which is the reducer's plain experience, and tells the desktop its route, so the window is titled after the page it is on and a shared or restored layout reopens it there. For that the console's policy is frame-ancestors 'self': it may be framed by its own origin and by no other, a framed fleet app included (test_console.py). A window holds only a path whose first segment is a page in the navigation, never the Desktop itself, and a route message is heard only from this origin, from a frame in one of the desktop's windows. On a phone there is no taskbar, so the Console icon leaves for the classic console.
The Fleet icon opens every repo in the registry, grouped by the frontend component it has or is owed (doc.repos in /api/apps, tools/dash apps plan). A repo with no frontend opens a window that says which component it gets next; that window is the placeholder the generated repo app replaces. The colours are the bashOS GUI's paper palette, --os-* in /theme.css (fleetcore.theme.OS_TOKENS); inside a window the console's own roles apply.
The generated repo app¶
Every repo in the registry is an app, including the ones with no interface of their own (ADR 0005, phase F1). /apps/<id> frames a repo's frontend when the launcher can; otherwise it renders RepoApp, and so does a repo window on the Desktop: an Overview (description, stack, licence, health, CI, last commit, open work, the standards audit from _data/conformance.yml, automation, and how to get it), the README, Open work and Automation. A repo that is owed a different component (an editor extension's preview, a terminal UI, a frontend with no address) opens the same way and says which.
GET /api/project/<name>/readme reads the README from the repo's submodule checkout on this machine: the path is the registry's submodule_path and must sit directly under projects/, a symlink is not followed, and a file over 200,000 characters is cut and says so. In the page its relative links point at the file's neighbours on GitHub and its images become links, because the console loads images from its own origin only. The public snapshot never calls the route and publishes no README: some fleet repos are private, and one checked out on the build machine must not reach the public site.
Starting a local stack¶
A stopped Local target offers Start the stack in the App Shell, on the Apps page and in a Desktop window; a running one offers Logs and Stop the stack. They are the operations dev-up, dev-down and dev-logs: each takes one compose-hosted project from _data/ports.yml, never the hub (dash dev up hub would start a second core) and never --all. A start or stop holds that project's slot, and different projects run side by side. dev-logs prints the last 200 lines and ends, because a job with no end has no time limit; to follow live, run tools/dash dev logs <project> in a terminal. After a start the page asks the address every three seconds for 90 seconds and frames the app when it answers. Nothing starts on page load. A devenv-hosted Local target (its host is devenv) has no stack to start: it shows the docker compose exec … devenv … command from its _data/ports.yml start:, the same command as its .vscode/launch.json entry, to run from the hub's root with the core up.
These need Docker, so they run from a native console (tools/dash console). The core console's container has no socket on purpose, and there the page says so and shows the terminal command.
The Work board¶
Harnesses → Work board (/work, docs/WORK-BOARD.md) puts every open item in the fleet on six lanes (triage, ready, in flight, review, blocked, on hold), in the order the loops will take them, and marks what each loop's next run takes. Dragging stages a plan: within a lane it pins the order, across lanes it moves an issue (its agent: labels) or a roadmap spec (its status:), and across the P0–P3 columns it reprioritises. POST /api/work/preview redraws the board as the plan would leave it, cut lines and throughput included. Apply (POST /api/work/apply) asks once, then moves the labels through the same GitHub write path as the GitHub page (issue.labels: fleet-scoped, confirm-gated, logged). It writes _data/work_queue.yml and the roadmap.yml lines in the working tree, returns the diff, and commits nothing. A PR, a spec package and a BACKLOG.md item can be pinned and reprioritised but not moved, because their state belongs to the PR, spec.md and the append-only backlog. Spec packages and backlog items are read from submodule checkouts, so the public snapshot's board is read-only and has neither.
Per-project health on startup¶
_data/project_health.yml is gitignored and only dash-gen health writes it, so a fresh clone used to show blank health and red/amber/green 0/0/0. On startup the console checks it (with _data/project_health_meta.yml) and, when it is missing, undated, or older than harness.trip_wires.stale_data_days, starts the allowlisted health operation as an ordinary job. The job shows on the Jobs page and runs in the background. It is cancelled after CONSOLE_AUTO_HEALTH_TIMEOUT seconds (default 300). It needs a GitHub token like the manual operation does; without one it fails and the page stays as before. CONSOLE_AUTO_HEALTH=0 turns it off.
The terminal dash, inside the page¶
Operate → Terminal runs the real terminal dash (tools/tui/app.py, Textual), not a re-implementation. tui_bridge.py starts it on a pseudo-terminal and relays it over the /api/tui WebSocket, and xterm.js draws it in the TUI's own bashOS dark palette (/api/theme). It joins this process's runtime (DASH_CONSOLE_URL points back here), so a job its : palette starts appears on the Jobs page, behind the same allowlist and confirm gate. Its o / l keys open links in a new tab of this browser through a private OSC sequence, rather than on the machine running the console. At most CONSOLE_TUI_MAX (default 4) sessions run at once, and closing the page hangs up the session's whole process group.
No HTTP middleware sees a WebSocket handshake, and CORS does not apply to one, so the bridge makes its own checks before any process exists:
- the Host allowlist, repeated from the HTTP guard;
- the Origin must be this console's own page, which stops cross-site WebSocket hijacking (add a dev origin with
DASH_CONSOLE_ALLOWED_ORIGINS); - when
DASH_CONSOLE_TOKENis set, the first frame must carry it, because a browser cannot put a bearer token on a WebSocket.
tools/dash ops¶
tools/dash ops (ops_cli.py) runs the operation allowlist from a terminal, and the Claude Code slash commands (/harness:*, /loops:*, /console:*, .claude/README.md) run every stage through it. It is a surface, never a code path: the operations, their validation and the confirm gate are core.py's.
tools/dash ops list [--group G] # every operation, by group, with its gates
tools/dash ops show conflicts-resolve # what it runs, its parameters, why it may be unavailable here
tools/dash ops run loop-run loop=repo-scout target=kvlite rehearse=true
tools/dash ops run dispatch workflow=repo-scout fields.dry_run=true --explain # argv and gate; runs nothing
tools/dash ops run dispatch workflow=repo-scout fields.dry_run=true --confirm # a GitHub write: asked first
tools/dash ops loops # the loops table, each loop's operations and slash command
tools/dash ops jobs [<job-id>] # the running console's jobs, or follow one
A run goes to the running console when it answers at DASH_CONSOLE_URL, serves this checkout (/api/health's repo_root) and can run the operation itself; the job then shows on the Jobs page and in the terminal dash, and the console's locks apply. Otherwise it runs here in the foreground with the same argv, and refuses when a console job already holds the lock it needs. --here and --console force either. A gated call without --confirm exits 3 and prints what it would run; the other exits are in the module's docstring.
The operations the loop commands needed and the console lacked are in OPS too, on the loops' cards: agents (the agent inventory's check), pm (the PM review's views), conflicts (JEV's scan, triage and budget, read-only) and conflicts-resolve (resolve one pull request or sweep them all; a GitHub write unless dry_run), and evidence (one issue's evidence bundle). The loops table gained jev_conflicts and fleet_pm, and both workflows are dispatchable.
For AI agents: the MCP layer¶
The refinement is a read for agents too: refine_status (the whole document, or one section), refine_library (the lessons by loop and domain) and refine_reviews (the unfiled previews) are MCP tools of the layer, and the assistant itself reads the fleet through them (docs/mcp-layer.md).
tools/dash mcp serves the console's API as an MCP server — stdio for Claude Code and Cursor (registered in .mcp.json as fleet, which it absorbed from tools/fleetcore/mcp_server.py), or --http for remote agents such as Grok Bots on 127.0.0.1:4002/mcp with bearer auth (HARNESS_MCP_TOKEN; an opt-in compose sidecar under profile mcp, and --tunnel for a temporary public URL). Read tools cover the fleet, harness health, live activity, jobs and their status (job_status), spend, the lake (including lake_recall, a keyword search over past local sessions with redacted excerpts, from /api/lake/recall), the code index and the deep dive, plus raw telemetry inside hard limits: prom_query (PromQL over claude_code_* metrics only), logs_search (Elasticsearch logs-fleet.*, redacted) and traces_query (Phoenix project claude-code-otel), over /api/telemetry/{prom,logs,traces} (telemetry_query.py, docs/OBSERVABILITY.md); the write tools (run an op, cancel a job, a workflow kill switch) exist only with HARNESS_MCP_ALLOW_WRITES=1 and each needs confirm=true. HARNESS_MCP_SCOPES=jobs,work grants only the narrow, audited ones instead: job_dispatch / job_cancel for an allowlist of local $0 report ops, and work_apply for the Work board's priority, pins and notes after a work_preview the person approved. See docs/mcp-layer.md.
server.json is the server's MCP Registry manifest (constitution § 16.4): io.github.bamr87/fleet, the stdio launch through mcp.sh, and a version that must equal VERSION in mcp_layer/server.py (tools/test_mcp_servers_lint.py fails when the two differ). It is not published to the registry (docs/mcp-layer.md).
The public site¶
build-pages.sh builds this page a second way — base /bamr87/, VITE_STATIC=1 — and snapshot.py writes every GET document the page reads as a file beside it, rendered by the same functions the routes above call. That is what build-dash.yml publishes. It also adds the profile: Home, About, Experience, Portfolio, Writing, Services and Contact (site_docs.py, from _data/profile.yml and pages/), served here too at /api/site* and /api/data/{name}. CONSOLE_SITE=<key> builds one of the other sites _data/profile.yml declares under sites: — the same page under that site's title and mark, with the bashOS desktop as its front door where its settings say so (docs/CONSOLE-PAGES.md).
On that page, /connect lets a visitor add:
- A GitHub token. The page then makes this console's GitHub writes and workflow dispatches itself, from the browser, under the same rules.
- This console's URL and token.
remote_pageanswers CORS forhttps://bamr87.github.io(DASH_CONSOLE_PAGES_ORIGIN) only whileDASH_CONSOLE_TOKENis set, and the Terminal page's WebSocket follows the same rule. That origin is every Pages site the account has, so the token is what tells this one apart.
The snapshot never carries the lake, a credential (not even its presence), a local probe, a local path or a draft; test_pages.py holds each of those. /diagrams/<name>.html serves the archify diagrams the Harness health page embeds, sandboxed.
Keys¶
keys v1, from /api/keys (tools/fleetcore/keys.py), the table the TUI binds:
?shows the sheet, and:(or ⌘K) opens the palette: every page, project, loop, content site, config block and operation./focuses the page's search box,escgoes back,1–9jump to a section (1 is the profile), and]/[step through the pages.- On a list,
j/k/g/Gmove,enteropens the row's drill-down,o/l/yopen the repo, open the live site, or copy the link, andscycles the sort. rre-reads every document andRruns the live health refresh.Lon a loop's page opens Run locally for its agent step (theloop-runform).- Typing in a field, holding ctrl/⌘/alt, or focus inside the terminal leaves the key alone.
GitHub Projects (epic #468)¶
gh_projects.py reads Projects (v2) across every fleet owner and builds the linked graph; gh_projects_write.py plans write-back as a dry run and applies it only with HARNESS_PROJECTS_WRITES=1, confirm=true and the previewed plan_id, writing an audit line per op. Writes are off by default and never merge, delete or change settings (constitution § 11, docs/PROJECTS-FRAMEWORK.md § 3a). Tests: python3 tools/console/test_gh_projects.py (fixtures, no network).
The read half is served (P1, #470): GET /api/gh-projects is every owner in one document, each ok with its projects or scope_missing / error / skipped with the reason, and GET /api/gh-projects/{project_id}/items is one project's items, paged (limit, at most 500, and offset), filtered (status, kind, q) and capped at 500 items read, with capped saying so. Both read with PROJECTS_TOKEN, else the console's own GitHub identity, and name the token's source, never its value; both answer from a ten-minute cache, inside a sliding window of 60 GraphQL calls per ten minutes and a 15-second wall clock, and say partial past either. The MCP's gh_projects and gh_project_items return the same documents, summarised and bounded; Fleet → GitHub Projects (/gh-projects) shows the owners, a project picker, and the items as a table or a board grouped by the project's Status options. Everything here is GET only and never part of the public snapshot: a private project's title must not reach Pages, so the published page says it runs on a console.
The decision queue¶
GET /api/decisions answers "what waits on Amr?" for the whole fleet in one call (docs/DECISION-INDEX.md): needs-amr items, pull requests that change a constitution, an amendment or an ADR, failing or major Dependabot pull requests and ready-to-merge pull requests, each with its reason, plus a per-repo inventory. decision_index.py reads the fleet with three GraphQL searches and parallel merge-state batches under the console's own GitHub identity, keeps the result in .fleet/decisions/index.json (gitignored, owner-only) and serves it until decisions.ttl_s in _data/fleet.yml. Every answer returns inside a time budget (budget, default decisions.budget_s) and carries status — fresh, partial, stale, expired or unavailable — with warnings, errors and a hint, so a slow or unreachable GitHub yields a dated answer and never a hung request. The same document is tools/dash decisions --json and the MCP's decision_queue; the operations decisions and decisions-refresh print it as a job. It is read-only and is never part of the public snapshot, because the index can hold a private repo's titles. Tests: python3 tools/console/test_decision_index.py (an in-memory GitHub, no network).
The PR queue¶
Fleet → PR queue (/prs, GET /api/prs; docs/PR-QUEUE.md) is every open pull request of the hub and the registry repos in one table: the decision index's pull requests plus one batched detail read each (pr_queue.py, cached in .fleet/prqueue/, gitignored), modelled by tools/fleetcore/prqueue.py. Checks are collapsed per check to the latest run on the head commit, so a cancelled run followed by a success is green (a false red badge marks what GitHub still shows red); the gate column is tools/weekly/closeout.py's § 12.3 verdict and its reason; the merge column is the method the repo allows; and who moves next says Amr, an agent, a loop or the author, with what and why, and the 2026-11-15 triage comment's next action as a hint. Filters: who, repo, kind (security, Dependabot, release, fan-out batch, AI harness, ratification, draft), gated or not, and a fan-out batch by head branch.
Select rows (a click toggles one; the header box selects every row shown; Select the N shown adds them), choose an action and press Plan: POST /api/prs/plan reads each pull request from GitHub as it is now and returns its exact op or why it is skipped, under a deterministic plan_id, writing only the plan file. Apply runs prs-act (or prs-agent for the agent) with that id behind the confirm; the job plans again and refuses a plan whose pull requests moved, then records each result (GET /api/prs/result/{id}). The actions are mark ready, update branch, re-run cancelled or failed checks one at a time, post or edit the next-action comment, add needs-amr, a capped local Claude Code session per pull request (local:pr-queue-agent, confirm: spend), close and merge. Close and merge are refused while pr_queue.close.enabled and pr_queue.merge.enabled are false, which they stay until an amendment says a merge the maintainer confirms here is his own (§ 11.2, § 12.2). The MCP's pr_queue and pr_queue_plan read and plan; applying stays on this page. Never part of the public snapshot. Tests: python3 tools/test_fleetcore_prqueue.py, python3 tools/console/test_pr_queue.py.
What it refuses to do¶
- Run anything outside the allowlist in
core.py(OPS): parameters are validated by regex/range and become argv elements, never a shell string. A Config number field refusesinfandnanas well as a negative: a.infceiling would make every gate that holds spend inside it vacuous. The Terminal page runs exactly one program, the terminal dash, and that program submits its jobs through the same allowlist. - Write to GitHub without an explicit confirm (
apply,dispatch) — and only one such job runs at a time (constitution § 11.8, the OPS remote-write path). Spend Claude budget without one either: a liveloop-runattempt asks first. - File anything from a local loop run:
loop-runtakesapplyonly to refuse it (#487's § 11 decision is the maintainer's), and the preview it leaves under.fleet/runs/is filed from a terminal. - Write to a repo the hub does not own, or merge, delete or push through its GitHub page. Its GitHub writes are issues, runs and workflows, each confirmed and logged.
- Merge or close a pull request from the PR queue while
pr_queue.merge.enabled/pr_queue.close.enabledare false, apply a plan whose pull requests moved since its preview, force-push, or use--adminor--auto. - Be framed by another origin.
frame-ancestors 'self'admits this console's own Desktop and nothing else: not another site, not a fleet app it frames. - Frame or fetch an address the registry does not declare. The Apps page's frames and reachability checks go only to the launcher's origins, which the Content-Security-Policy lists one by one; there is no wildcard and no URL parameter.
- Publish a repo's README. The repo app reads it from a checkout on the operator's machine; the public snapshot carries none.
- Commit, push, or merge. Generated data lands in the working tree; you review it in git.
- Invent contract structure. The Config form edits declared keys only: a key
fleet.ymldoes not already carry is shown read-only, and the policy keys the file itself calls non-negotiable (rotation.hub_first,issue_pipeline.autonomy.never_merge) are not offered at all. - Let Django answer a request the FastAPI routes would refuse. The Django paths get the same Host check and bearer-token check first, from the same functions; only
/api/v1/healthz,readyzandversionare exempt from the token, and DEBUG is never on. - Hand a credential back. Values go in; names, presence and provenance come out. A token pasted for
ghtravels on stdin, and.envis written only on an explicit confirm — never if git tracks it. - Publish the lake.
.dash-lake/is gitignored (it holds run logs); traces go only to the Phoenix endpoint you configured, andPHOENIX_API_KEY, when set, is forwarded and never shown.
Files¶
core.py (logic, tested by test_console.py on PyYAML alone) · github_link.py (the OAuth App flows and fleet repo management, stdlib HTTP only) · decision_index.py (the decision queue and its local index, stdlib HTTP only) · claude_telemetry.py and telemetry_query.py (the read-only telemetry routes: the fixed /live document, and the capped, redacted prom_query / logs_search / traces_query queries, stdlib HTTP only) · pr_queue.py (the PR queue: the detail read and its cache, plans, applies and the agent session; tools/dash prs) · tui_bridge.py (the Terminal page's pty-over-WebSocket bridge and its handshake checks) · serve.py (TCP + Unix socket, one process) · dispatch.py (the ASGI entry point: Django's three prefixes, FastAPI for the rest) · backend/ (the Django project: settings, the admin, the health endpoints, manage.py) · app.py (FastAPI routes, the CSP, and the page fallback) · web/ (the page: React + Mantine, built to web/dist/) · run.sh · requirements.txt (always-latest; carries the OpenTelemetry SDK + OTLP/HTTP exporter for lake export, websockets for /api/tui, the TUI's own requirements, and httpx2, starlette's TestClient dependency, without which the DNS-rebinding test cannot run). design-system/ is the React package of the console's earlier hand-written look, kept for the Claude Design sync.
The page's policy is script-src 'self': the bundle has no inline script, so an injected <script> cannot run. Styles allow 'unsafe-inline' because Mantine and xterm.js set style attributes. /docs keeps the narrow frame policy because Swagger UI boots inline from a CDN.