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 (viaStartupParamError, propagated with?) and leaves the old instance running. - Storage-free. This is orchestration; it persists nothing itself.
Structs§
- Client
Form - The management form for a client instance. Mirrors
ServerFormagainst theopen_client/start_clientsurface. - Client
Prefill - Current client config used to prefill an update form.
- Form
Field - One editable field in an interactive form.
- Interactive
Form - An in-progress interactive create/update form.
- Server
Form - 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.
- Server
Prefill - 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).
- Update
Outcome - 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§
- Form
Target - Which operation an
InteractiveFormwill perform on submit.
Functions§
- client_
declared_ params - Declared startup parameters for a client protocol, or
Noneif it is not compiled into this build. - server_
declared_ params - Declared startup parameters for a server protocol, or
Noneif 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; aremote_addrorstartup_paramschange reconnects, everything else is applied in place. - update_
server - Update a running server by id, applying only the fields the caller set.