Skip to main content

Module capability

Module capability 

Source
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 are None.
CapabilityRegistry
A set of known model profiles. Construct via default_registry or build a custom one in tests — there is intentionally no global singleton.
HardwareFeatures
Hardware features that change how reports are interpreted.

Enums§

AcsPolicy
Whether the Authorization Control System gates third-party control commands.
CameraTransport
How the camera is reached, which differs sharply by model.
ChamberTemperature
How a model’s chamber_temper report field should be interpreted.
ControlAssessment
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 (see Capabilities::control_assessment).
ControlPermit
Permission to send control commands (print start, heat, move, …).
ControlRefusal
Why control was refused — distinct reasons so a caller (CLI) can map them to exit codes and actionable messages.
DeveloperMode
Whether the printer’s “Developer Mode” (LAN-only control) is available at the queried firmware.
EvidenceGrade
How well-evidenced a model profile is. Audit metadata only — never used to decide control.
PushMode
Whether the printer pushes its full state each time (X1 class) or only deltas that the client must cache and merge (P1/A1 class).
RegistryStatus
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.