Expand description
The one configuration file a running supervisor reads, and its validation.
§Every field this program takes is declared once, here
ConfigField is that declaration: one variant per configured value, each
carrying the dotted key it is spelled under. Two things read it rather than
restating it — the refusal a bad value produces names its field through it,
and this crate’s own tier walks it, driving a server against a configuration
in which each field in turn is unacceptable. A field added to the shapes
below and not to ConfigField::ALL fails that tier’s own coverage check,
so the walk cannot fall behind the type.
§Validation happens at startup, and names the field
A value that cannot work is refused where it is configured rather than at
the first request that needs it, and the refusal carries the field’s own key
so an operator editing the file knows which line to change. That includes
the two values only the machine can rule on: an OctoPrint address nothing
answers at and a key that instance refuses are both configuration mistakes,
and crate::Server::start refuses them naming
ConfigField::OctoprintUrl and ConfigField::OctoprintApiKey.
§The ingress answer bound
Obico’s webhook notification plugin posts best-effort with a short timeout
and does not retry, so this server answers its ingress before the handling
completes and inside a bound it declares here. The shipped default is
DEFAULT_INGRESS_ANSWER_BOUND_MS and the timeout it must stay below is
OBICO_POSTING_TIMEOUT_MS; AGENTS.md’s “The Obico ingress answer bound”
records that number, where it was read and why the default is where it is,
and just check-repo refuses a tree in which the two disagree.
§The API credential
Every request beneath the versioned prefix carries one credential, and
ApiCredential is it. api.credential names it outright; left out, the
composition root generates one into the state directory the first time it
starts and reuses it after. Either way it is held in a type neither
rendering of which shows it, and the one comparison a presented credential
is admitted by is ApiCredential::admits.
Structs§
- ApiCredential
- The credential every request to a versioned operation must carry.
- ApiSection
- What a caller of the versioned API authenticates with, as written down.
- Config
File - The whole configuration file, exactly as it is written down.
- Ingress
Section - What the
Obicoingress requires and how fast it answers, as written down. - Octoprint
Section - Where the
OctoPrintinstance is and what it is like, as written down. - Server
Config - One running server’s validated configuration.
- Shared
Secret - The shared secret the ingress requires of every post.
- Sign
InConfig - The two values signing a harness in reads, and nothing else.
- Supervisor
Section - How the supervising agent is reached, as written down.
Enums§
- Config
Error - Why this server will not start under the configuration it was given.
- Config
Field - Every value this program is configured with, and the key it is spelled under.
Constants§
- ASSETS_
DIRECTORY - The directory under the state directory this server materializes the
supervising agent’s prompt template and assessment schema into. The skill
is not among them: it is installed with
SKILL_INSTALLand configured bysupervisor.skill_path. - DEFAULT_
INGRESS_ ANSWER_ BOUND_ MS - The answer bound this repository ships, in milliseconds.
- FAN_
VOCABULARY - The vocabulary
OctoprintSection::fantakes, spelled as the operator writes it. - GENERATED_
CREDENTIAL_ BYTES - How many random bytes a credential this server generates is drawn from.
- OBICO_
POSTING_ TIMEOUT_ MS - The timeout
Obico’s own webhook notification plugin posts under. - REDACTED
- What a secret renders as, wherever a value carrying one is rendered.
- SKILL_
INSTALL - How the supervising agent’s skill is installed, and what names it after.
Functions§
- plainly_
written - A resolved path, written the way its own platform’s tools write it.