mBm / mbm2

PREVIEW DOCUMENTATION · RELEASE PENDING

Client and Runtime

Part Responsibility Runs where
mbm2 Draws the terminal UI, reads local TUI preferences, sends requests Your terminal
mbm serve Serves sessions, tools, providers and events Your machine or an operator's server
Console Handles accounts, licences and payment console.mbm.mn in your browser

This preview describes the connection implemented by the client, not a published installer or a promise that a remote server is available. The client and server are separate processes. The console is not the runtime API and the TUI does not collect console credentials or payment details (docs/01-product/platform-map.md §1, cmd/mbm-tui/main.go:124-173).

Choose A Connection

Local:   terminal -> mbm2 -> spawned mbm serve -> project sessions
Remote:  terminal -> mbm2 -> existing server -> server-side project sessions
Mode Command Server lifetime
Local mbm2 --dir /path/to/project The client starts mbm serve and stops its child when the client exits
Existing server mbm2 --attach https://server.example --dir /server/project The operator starts it; quitting the client does not stop it

For local mode, install or otherwise provide the separate mbm server binary on PATH, or set MBM_SERVER_BIN to its path. The public mbm2 installation and checksum instructions remain pending release verification. mbm2 is not an alias for mbm (docs/06-flow/local-spawn-flow.md §Binary resolution, cmd/mbm-tui/flags.go:94-112).

For an existing server, obtain its URL, credentials and project directory from its operator. --dir selects the directory for instance requests; a remote path need not exist on your machine. If a path does exist locally, the client changes its working directory to it first (cmd/mbm-tui/main.go:251-265). Use an HTTPS URL with a trusted certificate for a remote connection. Do not use --insecure to make an untrusted connection appear healthy.

What Crosses The Boundary

Direction Data Result
Client to runtime Authenticated HTTP requests scoped to the directory The runtime reads or changes server-owned state
Runtime to client Global and directory SSE events The client updates the visible session and connection state
Client to console Browser navigation, not a TUI API request Account and billing actions stay with the console

The client connects using HTTP Basic auth and sends the directory with instance requests (docs/03-contract/server-contract.md §1). After the first frame it subscribes to GET /global/event and GET /event; on connection it reconciles server state. An interrupted event stream retries and reconciles rather than treating a locally displayed session as the source of truth (docs/06-flow/attach-flow.md §ASCII Diagram, docs/02-architecture/architecture.md §4.3). A remote connection can therefore show different sessions if you attach to another server or select another directory.

If It Does Not Connect

Symptom Check first
Local start cannot find a server Confirm mbm is on PATH, or point MBM_SERVER_BIN at the trusted server binary
Remote connection fails Confirm the operator's URL, credentials, TLS certificate and reachability
Expected session is missing Check the server URL and --dir before creating another session

An explicit --session <id> validates that session before the TUI starts; a missing session or unreachable server is reported instead of opening an empty replacement (cmd/mbm-tui/main.go:178-191). See your first session for the initial prompt and continuation commands. No public download link is offered until the P9 release artefacts and checksums are verified.