BotCommandRefusedPayload bot.command.refused@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/events/payloads/bot.command.refused.v1.json

bot.command.refused v1 (OpenVibe.Bot server/domain/index.js auditCommand). The gate refused a command (role, allowlist, limits, policy, e-stop, cooldown, turn, device offline) or a device reported an e-stop for a robot it is not attached to (kind estop_state). reason is Bot's refusal code; ids, kinds and codes only, never the value. Envelope: subject { type: robot, id: <robot id> }, visibility internal, priority important, actor service:bot.

Fields

FieldTypeRequiredDescriptionConstraints
robot_idstringyes
  • pattern ^rob_[0-9A-HJKMNP-TV-Z]{26}$
kindstring | nullyes
reasonstring | nullyes
  • pattern ^bot\.[a-z_]+$
rolestring | nullyes

Examples

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

Valid: cooldown
{
  "robot_id": "rob_01J8Z4M2Q0R7T9YV3K6N8P1W2X",
  "kind": "drive",
  "reason": "bot.cooldown",
  "role": "operator"
}
Valid: device-estop-elsewhere
{
  "robot_id": "rob_01J8Z4M2Q0R7T9YV3K6N8P1W2X",
  "kind": "estop_state",
  "reason": "bot.forbidden",
  "role": null
}
Rejected: carries-value
{
  "robot_id": "rob_01J8Z4M2Q0R7T9YV3K6N8P1W2X",
  "kind": "drive",
  "reason": "bot.cooldown",
  "role": "operator",
  "value": {
    "throttle": 1
  }
}

Validate

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