Skip to main content

Module management

Module management 

Source
Expand description

Management surface for creating and updating servers and clients.

This module is the single source of truth for the shape of a server or client instance — every field the open_server / open_client actions and the MCP start_server / start_client tools accept — and for the two operations that surface takes: create (spawn a brand new instance) and update (mutate a running one, in place where possible, with a clean stop+start where a change genuinely requires rebinding).

Design rules (see the root CLAUDE.md):

  • No per-protocol logic here. Create routes through server_startup::start_server_from_action / client_startup::start_client_from_action; update reuses those same executors for the restart path. There is no per-protocol match statement.
  • Validate before mutating. Startup parameters are validated against the protocol’s get_startup_parameters() before the running instance is touched, so a bad update names the offending key (via StartupParamError, propagated with ?) and leaves the old instance running.
  • Storage-free. This is orchestration; it persists nothing itself.

Structs§

ClientForm
The management form for a client instance. Mirrors ServerForm against the open_client / start_client surface.
ClientPrefill
Current client config used to prefill an update form.
FormField
One editable field in an interactive form.
InteractiveForm
An in-progress interactive create/update form.
ServerForm
The management “form”: everything a caller can specify about a server instance. Optional fields mean “unspecified” — on create an unspecified field falls back to its protocol default, on update an unspecified field is left unchanged.
ServerPrefill
Current server config used to prefill an update form. A plain snapshot so the form builder stays decoupled from the live state types (and unit-testable).
UpdateOutcome
Outcome of an update: which instance it now is, and whether applying it required a stop+start (which drops live connections) rather than an in-place change.

Enums§

FormTarget
Which operation an InteractiveForm will perform on submit.

Functions§

client_declared_params
Declared startup parameters for a client protocol, or None if it is not compiled into this build.
server_declared_params
Declared startup parameters for a server protocol, or None if the protocol is not compiled into this build. Used by the TUI create form to show what a chosen protocol accepts.
update_client
Update a running client by id. Mirror of update_server: unknown id and bad params error cleanly without touching the instance; a remote_addr or startup_params change reconnects, everything else is applied in place.
update_server
Update a running server by id, applying only the fields the caller set.