BotCommand bot.command@1
Generated at from
openvibe-contracts v0.97.0 and
openvibe-sdk v0.26.0.
- Version
- 1.0.0
- Owner
- bot
- Visibility
- first-party
- Status
- active
- Compatibility
- backward
- Decision
- ADR-043
- Schema
https://openvibe.network/contracts/bot/command.v1.json
bot.command@1: an operator's command frame on OpenVibe.Bot's operator WebSocket (wss://openvibe.bot/control, after join; server/realtime.js onOperatorCommand). id is the operator's idempotency key (at most 64 characters; Bot mints one when it is missing): a repeated id answers with the first result. Bot's gate stamps the robot, the operator and the role, builds the value from the robot profile's commands (clamped by the owner's limits) and sets the deadline; ms asks for a duration within max_command_ms. Answered by one command_result frame (bot.command-result@1).
Fields
| Field | Type | Required | Description | Constraints |
|---|---|---|---|---|
v | const |
| ||
seq | integer |
| ||
ts | integer |
| ||
type | const | yes |
| |
id | string |
| ||
kind | enum | yes |
| |
value | object | |||
ms | integer |
|
Examples
From the contract's own test fixtures: valid ones validate, rejected ones must fail.
Valid: drive
{
"v": 1,
"seq": 12,
"ts": 1759600000000,
"type": "command",
"id": "op-7",
"kind": "drive",
"value": {
"throttle": 0.5,
"steer": -0.2
},
"ms": 300
}Valid: halt
{
"type": "command",
"kind": "halt"
}Rejected: stamped-operator
{
"type": "command",
"kind": "drive",
"value": {},
"operator": {
"subject": "usr_01J8Z4P7T3W9Y1AC5N8R0S4V6X",
"role": "owner"
}
}Rejected: unknown-kind
{
"type": "command",
"kind": "self_destruct"
}Validate
const contracts = require('openvibe-contracts');
contracts.validate('bot.command@1', value); // { valid, errors: [{ path, message }] }