Repository navigation
feat(admin): /dispatch console opens, checks and signs in to the web console (#708) - #729
Merged
Merged
Conversation
…console (#708) Part of #708. An operator in pi types `/dispatch console` and gets the console's address, whether it is running and, with --link, a one-time sign-in link, all in one step. - `/dispatch console [page] [--link [name]] [--no-open]` is operator-typed only. Its output goes to the operator's notice, never to model context, and no tool exposes it. `page` is runs, fleet, insights, config, parked, audit or a run id. The address follows consolePageLines' rules. - Running or not: the worker's console probe (#728, the one rule doctor uses) asks /healthz on loopback or the socket only. "Not running" names `pi-dispatch-console serve` and `service install --console`. - --link mints a 60 s, single-use login code in-process for an operator token (asking which when there are several). It appends a `panel` audit row first, and pairs it with a `failed` row under the same ticket if the mint is refused. It mints only when the console answers as running, only in pi's TUI mode, and only where the codes directory is guarded. The link can carry a return page (`#<code>&next=/runs`), judged by the server and by the page script against the console's own pages. - On a local session (no SSH, a display, a TCP listener) the link is handed to the browser through a 0600 page in a 0700 temporary directory, so the code never appears in a process's arguments. The URL is always printed, and --no-open only prints. On Windows the opener uses url.dll so a URL holding & survives. - The login-codes directory joins the guarded files, as the tokens file is, judged by identity even before it exists. The console also refuses a code file that another account can read or owns, and one whose expiry exceeds the code's lifetime. Specs: REQ-ADMIN-VIA-PI-EXTENSION and DES-ADMIN-VIA-PI-EXTENSION (the subcommand; a browser only for it on a local session), OQ-024 (reopened and closed with the local-session rule), DES-OPERATOR-CONSOLE (the panel as a second minter, the return-path rule, threat 4 covering the login codes) and INT-CONSOLE-AUDIT-LOG are amended. UNCHANGED, checked: "binds no network port", the model-callable tool list and REQ-CONSOLE-SECURITY. Signed-off-by: Rob Boerman <robboerman@live.nl>
This was referenced Oct 21, 2026
Closed
Open
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #708 together with #728 (the console as a service, merged).
What it does
/dispatch console [page] [--link [name]] [--no-open], operator-typed only:runs,fleet,insights,config,parked,auditor a run id./healthzthrough the worker's console probe. That is the same rule doctor uses, and it contacts only loopback or the socket.--link. This mints a 60 s, single-use login code for an operator token, and asks which token when there are several.panelaudit row before the code exists, plus afailedrow under the same ticket if the mint is refused.--no-openonly prints.url.dll, so a URL holding&survives.Specs
REQ-ADMIN-VIA-PI-EXTENSIONandDES-ADMIN-VIA-PI-EXTENSION: the subcommand, and a browser only for it on a local session.OQ-024: reopened and closed again.DES-OPERATOR-CONSOLE: the panel as a second minter, the return-path rule, and threat 4.INT-CONSOLE-AUDIT-LOG.REQ-CONSOLE-SECURITY.Residuals (named in DES-OPERATOR-CONSOLE)
/tmp, so the operator opens the printed link instead.rundll32.bashremains the named residual for the guard, as for the tokens file.Verification
node admin/build.mjsbuilds.serve: the probe said running and not running, a--linkcode signed in and landed on/runs, a reused code got 401, and the audit chain verified.