Skip to main content

Module server

Module server 

Source
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§

OperatorCredential
Who an operator’s credential is checked against, as one start settled it.
StartError
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_FILE and 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_verifier is 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 commands a turn handed an image runs none of: a fresh look, and a recheck of the camera, which takes a fresh frame too.

Functions§

agent_config
The supervising agent’s configuration, as Server::start composes it.
agent_config_with
The supervising agent’s configuration, as Server::start_with_usage composes it: agent_config’s, handing each turn the usage, out of command_usage, of TURN_READS and 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.credential gives, which names the key, its replacement and the command that computes one, and never what the key holds.