BotTurnEndedPayload bot.turn.ended@1

Generated at from openvibe-contracts v0.454.0 and openvibe-sdk v0.193.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.turn.ended.v1.json

bot.turn.ended v1 (OpenVibe.Bot server/domain/index.js handedOff). A queue robot's turn ended: its time ran out (turn_ended) or its holder left the line (turn_left). Bot halts the robot before the next turn. It never names the person. Envelope: subject { type: robot, id: <robot id> }, visibility internal, priority normal, actor service:bot.

Fields

FieldTypeRequiredDescriptionConstraints
robot_idstringyes
  • pattern ^rob_[0-9A-HJKMNP-TV-Z]{26}$
ownerstringThe robot owner's user subject.
  • pattern ^usr_[0-9A-HJKMNP-TV-Z]{26}$
reasonenumyes
  • one of "turn_ended", "turn_left"
guestbooleanyes
presses_usedintegerThe turn's presses (buttons, clicks on the video) spent; driving never counts.
  • minimum 0

Examples

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

Valid: ran-out
{
  "robot_id": "rob_01J8Z4M2Q0R7T9YV3K6N8P1W2X",
  "reason": "turn_ended",
  "guest": false,
  "presses_used": 3
}
Rejected: takeover-is-no-end
{
  "robot_id": "rob_01J8Z4M2Q0R7T9YV3K6N8P1W2X",
  "reason": "owner_takeover",
  "guest": false
}

Validate

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