Expand description
Firmware capability / quirk registry.
API and hardware behaviour vary by (model, firmware). resolve looks a
model and firmware up in a CapabilityRegistry and returns the known
Capabilities; unknown facts are simply None.
§Two separated concerns
- Descriptive capabilities (push mode, camera transport, hardware features) describe how to talk to and interpret a printer. We register these even for models we’ve only documented, so discovery/status work.
- The control boundary (may we send control commands, and under what
firmware gating) is a safety decision. It is granted only for models we
are confident enough about; an unknown model, a firmware newer than we
know, or a model without a confirmed control boundary all refuse control
(see
Capabilities::control_permission).
Provenance (EvidenceGrade) travels per model profile as audit
metadata; it is deliberately not consulted by control_permission
(per-fact provenance was rejected as over-engineering — safety lives in the
control boundary, not in a confidence tag).
Structs§
- Capabilities
- Resolved capabilities for a
(model, firmware). Unknown facts areNone. - Capability
Registry - A set of known model profiles. Construct via
default_registryor build a custom one in tests — there is intentionally no global singleton. - Hardware
Features - Hardware features that change how reports are interpreted.
Enums§
- AcsPolicy
- Whether the Authorization Control System gates third-party control commands.
- Camera
Transport - How the camera is reached, which differs sharply by model.
- Chamber
Temperature - How a model’s
chamber_temperreport field should be interpreted. - Control
Assessment - A soft, agent-facing verdict on whether control is expected to work. Unlike
Capabilities::control_permission, firmware newer than known is a warning, not a refusal (seeCapabilities::control_assessment). - Control
Permit - Permission to send control commands (print start, heat, move, …).
- Control
Refusal - Why control was refused — distinct reasons so a caller (CLI) can map them to exit codes and actionable messages.
- Developer
Mode - Whether the printer’s “Developer Mode” (LAN-only control) is available at the queried firmware.
- Evidence
Grade - How well-evidenced a model profile is. Audit metadata only — never used to decide control.
- Push
Mode - Whether the printer pushes its full state each time (X1 class) or only deltas that the client must cache and merge (P1/A1 class).
- Registry
Status - How well the registry matched a
(model, firmware)query.
Functions§
- default_
registry - The built-in registry of known models.
- resolve
- Resolve capabilities for a
(model, firmware). A pure function over an explicit registry — no globals, no I/O — so it is trivially testable.