Skip to content

9 Schema reference, v0.1

Generated from the reference models by uv run python -m openhal.protocol.schema. Do not edit it by hand. The JSON Schema is schema.json. Field names are as they travel on the wire.

9.1 Methods

MethodLevelParamsResult
hal/initializeCoreInitializeParamsInitializeResult
hal/devices/listCoreEmptyDevicesListResult
hal/devices/describeCoreDescribeParamsDescribeResult
hal/readCoreReadParamsReading
hal/readManyCoreReadManyParamsReadManyResult
hal/writeControlWriteParamsWriteDone or Pending
hal/dryRunControlDryRunParamsDryRunResult
hal/planCheckControlPlanCheckParamsPlanResult
hal/stopControlStopParamsStopResult
hal/unlockControl, human onlyUnlockParamsUnlockResult
hal/actionFullActionParamsActionDone or Pending
hal/confirmations/listFullConfirmationsListParamsConfirmationsListResult
hal/confirmations/approveFull, human onlyApproveParamsDecision
hal/confirmations/rejectFull, human onlyRejectParamsConfirmationRequest
hal/routines/listFullEmptyRoutinesListResult
hal/routines/dryRunFullRoutineDryRunParamsPlanResult
hal/audit/queryFullAuditQueryParamsAuditQueryResult

9.2 Notifications

NotificationSent byLevelParams
hal/valueHubCoreReading
hal/blockedHubControlBlockedParams
hal/stoppedHubControlStoppedParams
hal/deviceAddedHubCoreDeviceAddedParams
hal/deviceRemovedHubCoreDeviceRemovedParams
hal/confirmationRequestedHubFullConfirmationRequestedParams
hal/initializedClientCoreEmpty
hal/shutdownClientCoreEmpty

9.3 Errors

CodeNameKernel codesMeaning
-32700PARSE_ERRORInvalid JSON
-32600INVALID_REQUESTNot a JSON-RPC request
-32601METHOD_NOT_FOUNDUnknown method, or one above the hub's conformance level
-32602INVALID_PARAMSbad_requestParams don't match the schema
-32603INTERNAL_ERRORinternal_errorA bug in the hub
-32001NOT_INITIALIZEDhal/initialize hasn't run
-32002UNAUTHORIZEDMissing or unknown token
-32003SCOPE_DENIEDnot_permittedThe principal's token scope doesn't cover this device or method
-32004UNKNOWN_TARGETunknown_targetNo such device, channel or action
-32005DEVICE_UNAVAILABLEdevice_unavailableDisconnected or not ready
-32010LIMIT_EXCEEDEDabove_max, below_minOutside the device file's confirmed limits
-32011RATE_LIMITEDrate_limitedFaster than max_change_per_s allows right now
-32012INTERLOCK_BLOCKEDinterlockAn interlock or action requirement doesn't hold, or a value it needs is unknown
-32013CONFIRMATION_REQUIREDneeds_confirmationQueued for a person, data.requestId names the request
-32014STOPPEDstoppedThe hub is stopped until a person unlocks
-32015UNVERIFIED_LIMITSread_only_fileThe device file's limits aren't confirmed by a person, so it is read-only
-32016INVALID_VALUEbad_value, bad_stepWrong type, step, enum value or pattern
-32017WATCHDOG_TRIPPEDduration_exceededA watchdog budget is used up
-32018BUSYbusyAnother command holds the device
-32019QUEUE_FULLqueue_fullThe confirmation queue is full
-32020DRIVER_ERRORdriver_errorThe device or its protocol failed, and the channel is unknown until a readback
-32021MISCONFIGUREDmisconfigured, cannot_loosenThe hub's device files are inconsistent, or a change would loosen a confirmed limit
-32022REQUEST_CLOSEDexpired, rejectedThe confirmation request expired or was rejected
-32023UNIT_INVALIDbad_unitA missing, unknown or incompatible unit, or a value that isn't finite

9.4 Types

9.4.1 Action

FieldTypeRequiredDescription
kind"action"no
devicestringyesA device id, for example printer.
actionstringyesAn action, for example pause.
argsmap of Quantity or boolean or stringnoArguments by name. Numbers are Quantity objects.

9.4.2 ActionDone

FieldTypeRequiredDescription
status"done"no
resultActionOutcomeyes

9.4.3 ActionInfo

FieldTypeRequiredDescription
descriptionstring or nullno
argsmap of objectyes
requirelist of stringyes
effectslist of stringyes
confirmstringyes
suggestedbooleanyes
confirmedConfirmed or nullno

9.4.4 ActionOutcome

FieldTypeRequiredDescription
devicestringyes
actionstringyes
argsmap of Quantity or boolean or stringyesThe arguments it ran with. Numbers are Quantity objects.

9.4.5 ActionParams

FieldTypeRequiredDescription
devicestringyesA device id, for example printer.
actionstringyesAn action, for example pause.
argsmap of Quantity or boolean or stringno

9.4.6 ApproveParams

FieldTypeRequiredDescription
requestIdstringyesA confirmation request id.

9.4.7 AuditEntry

FieldTypeRequiredDescription
seqintegeryes
atstringyesAn RFC 3339 time in UTC, for example 2026-10-24T14:02:00Z.
eventstringyes
principalstringyes
devicestring or nullno
targetstring or nullno
statusstring or nullno
codestring or nullno
bodyobjectyesThe entry's details. Text that quotes a device is a data block.
hashstringyes

9.4.8 AuditQueryParams

FieldTypeRequiredDescription
devicestring or nullno
statusstring or nullno
eventstring or nullno
sinceintegernoOnly entries after this sequence number.
limitintegerno

9.4.9 AuditQueryResult

FieldTypeRequiredDescription
entrieslist of AuditEntryyes

9.4.10 BlockedParams

FieldTypeRequiredDescription
devicestringyes
targetstringyes
errorErrorObjectyes

9.4.11 Capabilities

FieldTypeRequiredDescription
notificationslist of stringyesEvery notification this hub sends.

9.4.12 ConfirmationRequest

FieldTypeRequiredDescription
requestIdstringyes
status"pending" or "approved" or "rejected" or "expired" or "cancelled" or "blocked" or "done" or "failed"yes
commandWrite or Actionyes
requestedBystringyes
createdAtstringyesAn RFC 3339 time in UTC, for example 2026-10-24T14:02:00Z.
expiresAtstringyesAn RFC 3339 time in UTC, for example 2026-10-24T14:02:00Z.
decidedBystring or nullno

9.4.13 ConfirmationRequestedParams

FieldTypeRequiredDescription
requestConfirmationRequestyes

9.4.14 ConfirmationsListParams

FieldTypeRequiredDescription
status"pending" or "approved" or "rejected" or "expired" or "cancelled" or "blocked" or "done" or "failed" or nullnoLeave out to list pending requests.

9.4.15 ConfirmationsListResult

FieldTypeRequiredDescription
requestslist of ConfirmationRequestyes

9.4.16 Confirmed

A human confirmation of limits.

FieldTypeRequiredDescription
bystringyes
atstringyesThe date or time of the confirmation, as 2026-10-24.

9.4.17 Decision

The Safety Kernel's answer to one command. A blocked one carries its registry error.

FieldTypeRequiredDescription
status"allowed" or "blocked" or "needs_confirmation" or "done" or "pending" or "failed"yes
devicestringyes
targetstringyeswrite: or action:.
valueanyno
unitstring or nullno
errorErrorObject or nullno
requestIdstring or nullno

9.4.18 DescribeParams

FieldTypeRequiredDescription
devicestringyesA device id, for example printer.

9.4.19 DescribeResult

FieldTypeRequiredDescription
deviceDeviceDescriptionyes

9.4.20 DeviceAddedParams

FieldTypeRequiredDescription
deviceDeviceSummaryyes

9.4.21 DeviceDescription

A DeviceSummary plus channels, actions, safe state, interlocks, watchdog rules and limits provenance.

FieldTypeRequiredDescription
idstringyes
namestringyes
modelstring or nullno
manufacturerstring or nullno
driverstringyes
hazard"low" or "medium" or "high"yes
writablebooleanyesFalse until a person confirms every limit.
connectedbooleanyes
conformance"core" or "control" or "full"yesThe driver's declared conformance level.
verificationstringyesunverified, verified-on-simulator or verified-on-hardware.
unavailablestring or nullnoWhy the device can't take commands right now, or null when it can.
readmap of ReadChannelInfoyes
writemap of WriteChannelInfoyes
actionsmap of ActionInfoyes
safeStatelist of objectyes
interlockslist of InterlockInfoyes
watchdogWatchdogInfoyes
confirmedConfirmed or nullyesThe file-level confirmation of the limits.
unconfirmedlist of stringyesLimits no person has confirmed yet.
filestring or nullyesThe Device File, for example printer.hal.yaml.
notesstring or nullnoDevice File notes, inside a device-data block.

9.4.22 DeviceRemovedParams

FieldTypeRequiredDescription
devicestringyes

9.4.23 DeviceSummary

FieldTypeRequiredDescription
idstringyes
namestringyes
modelstring or nullno
manufacturerstring or nullno
driverstringyes
hazard"low" or "medium" or "high"yes
writablebooleanyesFalse until a person confirms every limit.
connectedbooleanyes
conformance"core" or "control" or "full"yesThe driver's declared conformance level.
verificationstringyesunverified, verified-on-simulator or verified-on-hardware.
unavailablestring or nullnoWhy the device can't take commands right now, or null when it can.

9.4.24 DevicesListResult

FieldTypeRequiredDescription
deviceslist of DeviceSummaryyes

9.4.25 DryRunParams

FieldTypeRequiredDescription
commandslist of Write or Actionyes

9.4.26 DryRunResult

FieldTypeRequiredDescription
decisionslist of Decisionyes

9.4.27 Empty

Params for methods that take none.

No fields.

9.4.28 ErrorData

error.data. name is the registry name clients branch on. Fields that don't apply are left out.

FieldTypeRequiredDescription
namestringyesThe registry name, for example LIMIT_EXCEEDED.
kernelCodestring or nullnoThe Safety Kernel's code, for example above_max.
kernelMessagestring or nullnoThe Safety Kernel's own message.
devicestring or nullno
channelstring or nullno
actionstring or nullno
argumentstring or nullnoThe action argument the error is about.
limitQuantity or nullnoThe limit that applied, such as 100 % or 20 %/s.
requestedQuantity or boolean or integer or number or string or nullnoWhat was asked for, a Quantity in the limit's unit when it had one, otherwise as sent.
runsinteger or nullnoHow many runs an action's max_runs allows per window.
perQuantity or nullnoThe window of an action's max_runs.
interlockstring or nullnoThe reason the device file gives for an interlock.
expectedQuantity or nullnoThe shape a number sent as one string should take.
filestring or nullnoThe Device File, for example printer.hal.yaml.
confirmedBystring or nullnoWho confirmed the limit.
confirmedAtstring or nullnoWhen the limit was confirmed, as 2026-10-24.
requestIdstring or nullno
tightenedBystring or nullnoWho tightened the session limit that applied.

Other fields may be added in later versions.

9.4.29 ErrorObject

The JSON-RPC error member.

FieldTypeRequiredDescription
codeintegeryesThe registry number, stable across versions.
messagestringyesThe human-readable reason, formed from data.
dataErrorData or nullno

9.4.30 Failure

FieldTypeRequiredDescription
jsonrpc"2.0"no
idinteger or string or nullyes
errorErrorObjectyes

9.4.31 Info

clientInfo and hubInfo.

FieldTypeRequiredDescription
namestringyes
versionstringyes

9.4.32 InitializeParams

FieldTypeRequiredDescription
protocolVersionstringyesThe newest version the client supports, a number such as 0.1.
clientInfoInfoyes
tokenstring or nullnoThe bearer token, if not sent as a header.

9.4.33 InitializeResult

FieldTypeRequiredDescription
protocolVersionstringyesThe version the hub answers with, such as 0.1.
hubInfoInfoyes
conformance"core" or "control" or "full"yes
principalPrincipalInfoyes
capabilitiesCapabilitiesyes

9.4.34 InterlockInfo

FieldTypeRequiredDescription
ifstringyes
requirestringyes
messagestring or nullno

9.4.35 LogEntry

One message in the Inspector's log, from GET /v1/rpc/log.

FieldTypeRequiredDescription
seqintegeryes
atnumberyes
direction"in" or "out"yes
clientstring or nullno
principalstring or nullno
messageanyyes

9.4.36 MaxDurationInfo

FieldTypeRequiredDescription
whenstringyes
forSnumberyes
resetAfterSnumber or nullno
thenanyyes

9.4.37 Notification

A JSON-RPC notification. It has no id and gets no response.

FieldTypeRequiredDescription
jsonrpc"2.0"yes
methodstringyes
paramsobject or nullno

9.4.38 Pending

FieldTypeRequiredDescription
status"pending"no
requestIdstringyes
expiresInSnumberyes

9.4.39 PlanCheckParams

FieldTypeRequiredDescription
stepslist of Write or Action or Waityes

9.4.40 PlanResult

FieldTypeRequiredDescription
okbooleanyesTrue only when every Decision is allowed and problems is empty.
decisionslist of Decisionyes
problemslist of stringyes

9.4.41 PrincipalInfo

FieldTypeRequiredDescription
kind"human" or "agent" or "routine" or "system"yes
namestringyes
scope"read" or "control_low" or "control_medium"yes

9.4.42 Quantity

A number and its unit (ADR 0016), for example {"value": 20, "unit": "s"}.

FieldTypeRequiredDescription
valueinteger or numberyes
unitstringyes

9.4.43 ReadChannelInfo

FieldTypeRequiredDescription
typestringyes
unitstring or nullno
everySnumber or nullno
streambooleanno
rangelist of number or nullno
valueslist of string or nullno

9.4.44 ReadFailure

FieldTypeRequiredDescription
devicestringyes
channelstringyes
errorErrorObjectyes

9.4.45 ReadManyParams

FieldTypeRequiredDescription
itemslist of ReadParamsyes

9.4.46 ReadManyResult

FieldTypeRequiredDescription
readingslist of Reading or ReadFailureyes

9.4.47 ReadParams

FieldTypeRequiredDescription
devicestringyesA device id, for example printer.
channelstringyesA channel, for example bed_target.

9.4.48 Reading

FieldTypeRequiredDescription
devicestringyes
channelstringyes
valueanyyesA number in unit, a bool or text. Text is inside a device-data block.
unitstring or nullno
atstringyesAn RFC 3339 time in UTC, for example 2026-10-24T14:02:00Z.
suspectbooleannoTrue when the reading lies outside the channel's range.

9.4.49 RejectParams

FieldTypeRequiredDescription
requestIdstringyesA confirmation request id.
reasonstring or nullno

9.4.50 Request

A JSON-RPC request. It has an id and expects a response.

FieldTypeRequiredDescription
jsonrpc"2.0"yes
idinteger or stringyes
methodstringyes
paramsobject or nullno

9.4.51 RoutineDryRunParams

FieldTypeRequiredDescription
routineIdstringyes

9.4.52 RoutineSummary

FieldTypeRequiredDescription
idstringyes
kindstringyes
enabledbooleanyes
sha256stringyes
deviceslist of stringyes
maxHazardstring or nullno
triggerslist of stringyes
disabledReasonstring or nullno

9.4.53 RoutinesListResult

FieldTypeRequiredDescription
routineslist of RoutineSummaryyes

9.4.54 StopDevice

FieldTypeRequiredDescription
devicestringyes
statusstringyessafe, partial, failed, no_safe_state or pending.
detailstringyes

9.4.55 StopParams

FieldTypeRequiredDescription
reasonstring or nullno

9.4.56 StopResult

FieldTypeRequiredDescription
deviceslist of StopDeviceyes

9.4.57 StoppedDevice

FieldTypeRequiredDescription
devicestringyes
statusstringyes

9.4.58 StoppedParams

FieldTypeRequiredDescription
reasonstringyes
bystringyes
deviceslist of StoppedDeviceyes

9.4.59 Success

FieldTypeRequiredDescription
jsonrpc"2.0"no
idinteger or stringyes
resultobjectyes

9.4.60 UnlockParams

FieldTypeRequiredDescription
phrasestringyesType unlock.

9.4.61 UnlockResult

FieldTypeRequiredDescription
okbooleanyes

9.4.62 Wait

FieldTypeRequiredDescription
kind"wait"no
durationQuantityyesA time such as 2 s, at most 1 h.

9.4.63 WatchdogInfo

FieldTypeRequiredDescription
heartbeatSnumberyes
onLossstring or nullno
maxDurationlist of MaxDurationInfoyes

9.4.64 Write

FieldTypeRequiredDescription
kind"write"no
devicestringyesA device id, for example printer.
channelstringyesA channel, for example bed_target.
valuestring or boolean or integer or numberyes
unitstring or nullno

9.4.65 WriteChannelInfo

FieldTypeRequiredDescription
typestringyes
unitstring or nullno
minnumber or nullno
maxnumber or nullno
stepnumber or nullno
maxChangePerSnumber or nullno
valueslist of string or nullno
maxLengthinteger or nullno
patternstring or nullno
confirmstringyesnone, confirm or confirm-each-time.
suggestedbooleanyesTrue while the limits are a suggestion no person has confirmed.
confirmedConfirmed or nullnoWho confirmed this channel's limits.

9.4.66 WriteDone

FieldTypeRequiredDescription
status"done"no
devicestringyes
channelstringyes
valueanyyes
unitstring or nullno

9.4.67 WriteParams

FieldTypeRequiredDescription
devicestringyesA device id, for example printer.
channelstringyesA channel, for example bed_target.
valuestring or boolean or integer or numberyesA number, a bool, an enum value or text.
unitstring or nullnoThe unit of a number, such as %.