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
| Field | Type | Required | Description | Constraints |
|---|---|---|---|---|
robot_id | string | yes |
| |
owner | string | The robot owner's user subject. |
| |
reason | enum | yes |
| |
guest | boolean | yes | ||
presses_used | integer | The turn's presses (buttons, clicks on the video) spent; driving never counts. |
|
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 }] }