Skip to main content

Module server_api

Module server_api 

Source
Expand description

Feature 020 V11, symforge::server_api — the public server entry (C5: the keyword flip executed, the entry wired).

The contract’s four atoms name this module: run, ServerExit, ServerBootstrapError, and the module itself, public behind the frozen feature=server availability gate (the embed-v11 projection excludes it). run dispatches the whole symforge CLI through cli::entry::run_main — the binary is a shim over this door, and the retired raw module surface is no longer reachable from outside the crate.

Structs§

ServerBootstrapError
Why the server could not come up. OPAQUE by contract (C1 ruling): the frozen record pins kind: "struct" with no public fields and has_nonpublic_fields: true, so external code can neither construct one nor match it exhaustively — every future refusal cause is non-breaking.

Enums§

ServerExit
How a completed server run ended. The two variants are TRANSCRIBED from the frozen contract record — an earlier draft invented a Clean variant here, the exact T043 failure mode, caught by T049’s consumer fixtures and corrected against public-api-v11.json.

Functions§

run
The contract entry point: run the symforge CLI with args (argv\[0\] included). Dispatches every subcommand exactly as the binary always has — daemon, serve, stdio MCP, init/setup/admin/hook/trust/update — and maps the typed outcome onto the contract shapes. Argument-parse failures follow CLI convention (clap prints usage and exits).