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 five 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§
- Start
Error - Why this server did not start.
Constants§
- API_
CREDENTIAL_ FILE - The file, under the state directory, holding the API credential this server
generated for itself — read when
api.credentialis not configured, and written only when it is not there. - CLIENT_
CONFIG_ FILE - The file this server writes the address it took and the credential in force into, under the state directory, for the clients that run beside it.
- CONTEXT_
PROGRAM - The program a supervision turn runs to read its print’s context.
- 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.
Functions§
- agent_
config - The supervising agent’s configuration, as
Server::startcomposes it. - context_
command - The command a supervision turn runs to read its print’s context.