---
title: "bot.command-result@1 · OpenVibe.Services"
canonical: "https://openvibe.services/docs/contracts/bot.command-result"
updated: null
---

# bot.command-result@1 · OpenVibe.Services

HTML: [bot.command-result@1 · OpenVibe.Services](https://openvibe.services/docs/contracts/bot.command-result)

# BotCommandResult `bot.command-result@1`

Generated at 2026-12-01 05:42:00 UTC from [`openvibe-contracts v0.454.0`](https://github.com/OpenVibers/OpenVibe.Contracts/tree/v0.454.0) and [`openvibe-sdk v0.193.0`](https://github.com/OpenVibers/OpenVibe.SDK/tree/v0.193.0).

- Version: 1.1.0
- Owner: bot
- Visibility: first-party
- Status: active
- Compatibility: backward
- Decision: [ADR-043](/docs/adr/ADR-043)
- Schema: [`https://openvibe.network/contracts/bot/command-result.v1.json`](/docs/contracts/bot.command-result.json)

bot.command-result@1: the command\_result frame OpenVibe.Bot answers a bot.command@1 with on the operator WebSocket (server/realtime.js). result: ack or nack (the device answered; reason is its fault code, latency\_ms the round trip), refused (the gate refused it; code is Bot's refusal code such as bot.cooldown or bot.device\_offline, and reason says why), expired (no answer before the deadline) or pending (the same id is still in flight). cached is true when a repeated id is answered from the first result. An ack of a computer command (exec, fs, screen) carries its answer in data. delivery says whether the command reached the machine (delivered, not\_delivered, uncertain); retry says whether repeating it is safe. Only not\_delivered is safe to repeat: a delivered command already ran, and an uncertain one may have. mixed (1.1.0): on a crowd robot a crowd member's drive is an input for the mixer, never a command of its own; steering says how many are steering.

## Fields

| Field | Type | Required | Description | Constraints |
| --- | --- | --- | --- | --- |
| `v` | const | yes |  | - `= 1` |
| `seq` | integer | yes |  | - `minimum 0` |
| `ts` | integer | yes |  | - `minimum 0` |
| `type` | const | yes |  | - `= "command_result"` |
| `id` | string | yes |  | - `minLength 1`<br>- `maxLength 64` |
| `result` | enum | yes |  | - `one of "ack", "nack", "refused", "expired", "pending", "mixed"` |
| `reason` | string \| null |  |  |  |
| `code` | string |  |  | - `pattern ^bot\.[a-z_]+$` |
| `latency_ms` | integer |  |  | - `minimum 0` |
| `cached` | boolean |  |  |  |
| `steering` | integer |  | With result mixed: how many people the crowd mixer holds a fresh drive from, this one included. | - `minimum 1`<br>- `maximum 10000` |
| `data` | object |  | A computer command's answer as the machine gave it (exec: exit\_code, stdout, stderr, truncated, timed\_out, duration\_ms; fs: entries, the stat, content\_b64, written, created; screen: format, width, height, content\_b64). Present only on an ack of exec, fs or screen. |  |
| `delivery` | enum |  | Whether the command reached the machine. Both senders and the device report it; absent means unknown. | - `one of "delivered", "not_delivered", "uncertain"` |
| `retry` | object |  | Whether repeating the command is safe. safe is true only when delivery is not\_delivered. | - `no other fields` |
| `retry.safe` | boolean | yes |  |  |
| `retry.reason` | string |  |  | - `minLength 1`<br>- `maxLength 500` |

## Examples

From the contract's own test fixtures: valid ones validate, rejected ones must fail.

 Valid: ack-with-data

~~~~
{
  "v": 1,
  "seq": 14,
  "ts": 1759600000120,
  "type": "command_result",
  "id": "op-30",
  "result": "ack",
  "reason": null,
  "latency_ms": 118,
  "data": {
    "exit_code": 0,
    "stdout": " M index.html\n",
    "stderr": "",
    "truncated": false,
    "timed_out": false,
    "duration_ms": 35
  }
}
~~~~

Valid: ack

~~~~
{
  "v": 1,
  "seq": 13,
  "ts": 1759600000013,
  "type": "command_result",
  "id": "op-7",
  "result": "ack",
  "reason": null,
  "latency_ms": 42
}
~~~~

Valid: cached-pending

~~~~
{
  "v": 1,
  "seq": 15,
  "ts": 1759600000015,
  "type": "command_result",
  "id": "op-9",
  "result": "pending",
  "cached": true
}
~~~~

Valid: delivered-no-retry

~~~~
{
  "v": 1,
  "seq": 16,
  "ts": 1759600000016,
  "type": "command_result",
  "id": "op-10",
  "result": "ack",
  "reason": null,
  "latency_ms": 87,
  "delivery": "delivered",
  "retry": {
    "safe": false,
    "reason": "the command already ran; repeating it runs it twice"
  }
}
~~~~

Valid: mixed

~~~~
{
  "v": 1,
  "seq": 21,
  "ts": 1759600000021,
  "type": "command_result",
  "id": "op-12",
  "result": "mixed",
  "steering": 7
}
~~~~

Valid: not-delivered-retry

~~~~
{
  "v": 1,
  "seq": 15,
  "ts": 1759600000015,
  "type": "command_result",
  "id": "op-9",
  "result": "expired",
  "reason": "no answer before the deadline; the machine never confirmed receipt",
  "delivery": "not_delivered",
  "retry": {
    "safe": true,
    "reason": "the command never reached the machine"
  }
}
~~~~

Valid: refused

~~~~
{
  "v": 1,
  "seq": 14,
  "ts": 1759600000014,
  "type": "command_result",
  "id": "op-8",
  "result": "refused",
  "code": "bot.device_offline",
  "reason": "the robot is offline"
}
~~~~

Rejected: bad-delivery

~~~~
{
  "v": 1,
  "seq": 17,
  "ts": 1759600000017,
  "type": "command_result",
  "id": "op-11",
  "result": "ack",
  "delivery": "maybe",
  "retry": {
    "safe": true
  }
}
~~~~

Rejected: mixed-steering-zero

~~~~
{
  "v": 1,
  "seq": 22,
  "ts": 1759600000022,
  "type": "command_result",
  "id": "op-13",
  "result": "mixed",
  "steering": 0
}
~~~~

Rejected: no-id

~~~~
{
  "v": 1,
  "seq": 17,
  "ts": 1759600000017,
  "type": "command_result",
  "result": "ack"
}
~~~~

Rejected: unknown-result

~~~~
{
  "v": 1,
  "seq": 16,
  "ts": 1759600000016,
  "type": "command_result",
  "id": "op-7",
  "result": "ok"
}
~~~~

## Validate

~~~~
const contracts = require('openvibe-contracts');
contracts.validate('bot.command-result@1', value);   // { valid, errors: [{ path, message }] }
~~~~
