hwcontract
v0.6.1Judge hardware timing/serial against a contract: pass/marginal/fail (WS2812, DShot, logs)
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
list_contracts
List bundled contract templates, names, kinds, installed paths, and capture adapter requirements. No hardware.
judge_contract
Judge observations against a timing contract -> PASS/MARGINAL/FAIL/MISSING. No hardware; use for replay or when an adapter already captured.
| Parameter | Type | Description |
|---|---|---|
contract_path * | string | |
observations * | array |
capture_ws2812
Capture the WS2812 data line via sigrok and return measured pulse-width observations (T0H/T1H/...).
| Parameter | Type | Description |
|---|---|---|
channel | string | |
driver | string | |
samplerate | number | |
samples | number |
check_ws2812
Capture a live WS2812 signal AND judge it against a contract in one call. The one-shot an agent reaches for.
| Parameter | Type | Description |
|---|---|---|
contract_path * | string | |
channel | string | |
driver | string | |
samplerate | number | |
samples | number |
check_dshot
Capture a live DShot600 ESC signal AND judge it against a contract in one call.
| Parameter | Type | Description |
|---|---|---|
contract_path * | string | |
channel | string | |
driver | string | |
samplerate | number | |
samples | number |
judge_serial
Judge a captured serial log against expect/forbid patterns. No hardware; use for replay or logs another tool already captured.
| Parameter | Type | Description |
|---|---|---|
contract_path * | string | |
log * | string |
judge_events
Judge decoded hardware events against an events contract's temporal assertions (when/require/within, forbid/while/before). Events: [{source, type, start_ns, end_ns, fields}].
| Parameter | Type | Description |
|---|---|---|
contract_path * | string | |
events * | array |
check_serial
Read a serial port for N seconds AND judge its log against a contract's expect/forbid patterns.
| Parameter | Type | Description |
|---|---|---|
contract_path * | string | |
port * | string | |
baud | number | |
seconds | number |