run_command
Execute a named device command over serial/USB, build the frame, await and classify the response against expected behavior, with audited outcomes and optional session or replay support.
Instructions
Execute a named command from devices//commands/ with typed params: builds the frame, awaits the response and classifies the outcome (normal | exception | silence | timeout | checksum_error | malformed) against the command's declared expect (audited; an unmet expectation is an error carrying the full result JSON). Give session_id for an open session, or port to open an ephemeral one with the device's profile transport — port may be omitted when the profile declares a selector, and accepts replay:. Commands with risk=danger additionally require acknowledge_risk=true.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| port | No | Optional when session_id is given or the device profile has a selector | |
| device | Yes | ||
| params | No | ||
| command | Yes | ||
| session_id | No | ||
| acknowledge_risk | No | ||
| max_inline_bytes | No | Result JSONs longer than this many bytes are written in full to .openbaud/out/ and returned as a summary carrying a full_result path — keeps huge payloads out of your context. Raise it to force large results inline. |