Expand description
The composition root: the one place an implementation crate is named.
Everything below this file is written against the three ports and the
supervision domain’s store traits. This is where one implementation is
chosen for each — OctoPrint behind the printer port, Obico behind the
vision port, OneHarness behind the supervisor port, and SQLite behind
the store traits — and just check-repo refuses any other crate that names
one. The store is one implementation held once per aggregate: Stores::of
coerces the one SQLite store to each of the seven trait objects, and every
consumer below is handed the handle for the aggregate it names and no
other.
Server::start is that root. Server::start_with takes ports a caller
composed, which is how the tiers that stand in for a machine drive the real
surface without one; the two share every line after the ports exist, so what
a tier drives is the server this file starts.
Structs§
- Ports
- The four implementations one running server was composed from.
- Running
- One server, serving.
- Server
- The composition root.
Enums§
- Operator
Credential - Who an operator’s credential is checked against, as one start settled it.
- Start
Error - Why this server did not start.
Constants§
- API_
CREDENTIAL_ FILE - The file, under the state directory, a server before this one generated its
API credential into, as plaintext. A start converts it into
API_CREDENTIAL_VERIFIER_FILEand deletes it, so the credential it held keeps authenticating while nothing the service’s user can read holds it. - API_
CREDENTIAL_ VERIFIER_ FILE - The file, under the state directory, holding the verifier of the operator’s
credential — read when
api.credential_verifieris not configured. - CLIENT_
CONFIG_ FILE - The file, under the state directory, a server before this one wrote the address it took and the credential in force into. A start deletes it: a supervision turn runs as the service’s user and could read the operator’s credential out of it.
- CONTEXT_
PROGRAM - The program a supervision turn runs to read its print’s context.
- CREDENTIAL_
ISSUE - The command that gives an operator a credential, as every refusal and warning about one names it.
- CREDENTIAL_
VERIFIER - The command that prints the verifier of a credential an operator already holds.
- PROMPT_
FILE - The file name the agent’s prompt template is materialized under.
- SCHEMA_
FILE - The file name the assessment schema is materialized under.
- TURN_
PROMPT - The prompt template this program carries and materializes.
- TURN_
READS - The reads a supervision turn is handed the usage of, beside every action the safety envelope grants its role: the whole context, and a fresh look.
- WITHHELD_
BESIDE_ AN_ IMAGE - The reads a turn handed an image runs none of: a fresh look.
Functions§
- agent_
config - The supervising agent’s configuration, as
Server::startcomposes it. - agent_
config_ with - The supervising agent’s configuration, as
Server::start_with_usagecomposes it:agent_config’s, handing each turn the usage, out ofcommand_usage, ofTURN_READSand of each action the configured envelope grants the agent — what a check acts with, and no command it cannot ask for. - context_
command - The command a supervision turn runs to read its print’s context.
- gcode_
spool_ dir - Where each open print’s G-code is spooled, under a state directory.
- operator_
credential - The operator credential this start serves under, and the warnings it owes.
- plaintext_
credential_ warning - The warning every start under a plaintext
api.credentialgives, which names the key, its replacement and the command that computes one, and never what the key holds.