You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Console API: /api/v1 read endpoints from the route table, under sign-in #1754
#1753 (Spec: the Console API). Governing decision: ADR 0026.
What to build
The Console serves its read views as JSON under /api/v1, to a signed-in session and on --no-sign-in. Every entry in the Console's route table, which already pairs each page route with its CLI command, gains an API path and exactly one scope (read, security or act). Each read view's handler produces the value its CLI twin prints with --json. The page renders that value as HTML, and /api/v1/... returns it unchanged as JSON. So the page is a client of the same handlers, and it stays server-rendered with htmx.
The read views covered: the Inbox (status), a Command's details (child Ticket runs, stages, waterfall, Command log, Session traces), History, Lanes, Stages, metrics, Scores, Bug origins, Experiments and cron jobs, with Other-account Commands exactly as status shows them. Errors are JSON bodies: 401 when unauthenticated, and the CLI's own refusals with their message. Action routes keep working as today. Their API twins come in a later Ticket.
Acceptance criteria
Every route-table entry declares an API path under /api/v1 and one scope, and the CLI-parity test fails when an entry lacks either (with a should-panic twin, as today).
An HTTP test over fixture records asserts that /api/v1 returns JSON equal to the CLI twin's --json output, for the Inbox and for a Command's details at least, and for every read view through the shared handler.
A signed-in session and --no-sign-in both reach /api/v1. An unauthenticated request gets a 401 JSON body, not the sign-in page.
Reads are GETs. No API GET changes anything.
The page looks and behaves as before (the existing Console tests and site browser tests pass).
docs/guide.md gains a short "Console API" section describing /api/v1 and its JSON-equals-CLI rule.
Activity
JacobStephens2 commentedon Nov 5, 2026
Closed by #1776, merged into issue-1753 by a thirdshift Ticket run with Self-merge.