Skip to main content

Module cockpit

Module cockpit 

Source
Expand description

The Cockpit web UI: a free, separately licensed, signed package kind.

It travels through the runtime channel like the Intelligence Runtime and is authenticated just as strictly (manifest, signature, archive, catalog and delegation), but it is never licence-bound, lives in its own store (cockpit-runtime[-production]) with its own activation record, and is re-authenticated as a Cockpit on every start.

One Cockpit per Engine dashboard process. It is started from a private copy of the authenticated bytes with a cleared environment and receives one JSON line on stdin (the start contract leanctx.cockpit-start/v1). It binds 127.0.0.1:0 and names its port as the first stdout line, {"listening":<port>}. The supervisor keeps stdin open for the Engine’s lifetime; the Cockpit ends at stdin EOF, at the latest when this process ends. A crash is restarted on the next request after a bounded backoff. No token is ever logged.

Structs§

CockpitEndpoint
Where the running Cockpit listens, and the token the dashboard’s proxy presents to it.
CockpitLaunch
What the dashboard knows about itself when it asks for the Cockpit.

Enums§

CockpitUnavailable
Why no Cockpit is available; the dashboard shows the matching fallback.

Functions§

availability
Whether a Cockpit could be started now, decided exactly as a start decides it (shipped bundle imported first, then authenticated), without starting one and without network. Lets a command fall back to its terminal report before it opens a browser on the install page.
available_or_installed
availability, but a missing Cockpit of an official build is installed first: the person asked to open it, and the Cockpit ships with LeanCTX.
cockpit_endpoint
The running Cockpit of this process, started when none runs. Holds the supervisor lock across a start, so concurrent callers share one start.
install_cockpit
Install-on-demand for lean-ctx cockpit: the same path as setup runtime sync-configured --kind cockpit. The caller has the user’s request to install; this downloads from the bundled channel.
install_from_cli
The --from form of lean-ctx cockpit install (args follow install); false when the arguments do not name one, so the caller installs from the channel. Exits non-zero on failure.
install_if_missing_in_background
install_if_missing on its own thread: an MCP or daemon start never waits for the download.
retire
Stop this process’s Cockpit, if any; the next request starts the currently activated package without waiting for a backoff.