chore: establish hwlab l0 contract skeleton

This commit is contained in:
HWLAB Code Queue
2026-05-21 14:27:53 +00:00
commit 8f3069035f
41 changed files with 1732 additions and 0 deletions
+44
View File
@@ -0,0 +1,44 @@
# Capability Model
Box hardware is described with resources and capabilities.
## Resource
A box resource is a physical or simulated component that can be addressed by
the gateway:
- board
- power supply
- serial port
- network port
- relay
- sensor
- simulator endpoint
Resources carry lifecycle state such as `available`, `reserved`, `running`,
`maintenance`, or `offline`.
## Capability
A capability describes an action or measurement exposed by a resource. Examples:
- `power.cycle`
- `power.set_voltage`
- `serial.console`
- `network.link`
- `firmware.flash`
- `sensor.read`
Capabilities declare:
- direction: `input`, `output`, or `bidirectional`
- value type: `boolean`, `integer`, `number`, `string`, `object`, or `binary`
- optional unit
- constraints for allowed values or ranges
- whether the operation mutates hardware state
## Operation Binding
Hardware operations reference capabilities by `capabilityId` and resources by
`resourceId`. Implementations must not infer a capability from a free-form
operation name when a capability record exists.