openvibers/openvibe.contracts Commits

A device command may carry turn_epoch: the robot's control epoch, so a device can refuse a command older than the newest turn halt (0.213.0) (#210)

OP OpenVibers committed 19 days ago · 48a74cdec5 · 4 files, +19 −0

Changes

ddiff --git a/CHANGELOG.md b/CHANGELOG.md
iindex 30723b1f..bcbe87d0 100644
---- a/CHANGELOG.md
++++ b/CHANGELOG.md
@@@ -32,6 +32,11 @@ the notes were in the tag and commit messages (`git tag -n1`).
- Chat's line is now "Chat with Vibe, friends and groups": Vibe, OpenVibe's assistant, lives at openvibe.chat/vibe
(OpenVibe.Chat#139).
- Service ids, domains, capabilities and events are unchanged: only what people read.
++- **`turn_epoch` on a device command** (`bot.device-message@1`, additive). This was the community LOOI driver's
++ reviewers' question A2. It carries the robot's control epoch when Bot decided the command: it rises when a queue turn
++ ends, is left or is paused by an owner takeover (OpenVibe.Bot#155), and Bot's halt for that change carries the new
++ value. A device or plugin may refuse a command older than the newest halt's epoch. It is milliseconds on Bot's
++ clock, so it keeps rising across Bot restarts. Older devices ignore it (Node's decoder skips unknown fields).
## 0.212.0 — 2026-10-24
ddiff --git a/contracts/bot/device-message.v1.json b/contracts/bot/device-message.v1.json
iindex 92249213..21c93ffc 100644
---- a/contracts/bot/device-message.v1.json
++++ b/contracts/bot/device-message.v1.json
@@@ -204,6 +204,11 @@
}
}
},
++ "turn_epoch": {
++ "type": "integer",
++ "minimum": 0,
++ "description": "The robot's control epoch when Bot decided this command (Bot#155): it rises each time a queue turn ends, is left or is paused by an owner takeover, and Bot's own halt for that change carries the new value. A device or plugin may refuse a command whose turn_epoch is lower than the newest halt's, defence in depth on top of Bot's own guarantee that nothing decided under a turn is sent after that turn's halt. Milliseconds on Bot's clock, so it keeps rising across Bot restarts. Absent from Bots before 0.213.0 and on robots without a turn queue."
++ },
"robot_id": {
"type": "string",
"pattern": "^rob_[0-9A-HJKMNP-TV-Z]{26}$"
ddiff --git a/generated/json-schema/bundle.json b/generated/json-schema/bundle.json
iindex 1a60adc6..3e37a4e9 100644
---- a/generated/json-schema/bundle.json
++++ b/generated/json-schema/bundle.json
@@@ -71772,6 +71772,11 @@
}
}
},
++ "turn_epoch": {
++ "type": "integer",
++ "minimum": 0,
++ "description": "The robot's control epoch when Bot decided this command (Bot#155): it rises each time a queue turn ends, is left or is paused by an owner takeover, and Bot's own halt for that change carries the new value. A device or plugin may refuse a command whose turn_epoch is lower than the newest halt's, defence in depth on top of Bot's own guarantee that nothing decided under a turn is sent after that turn's halt. Milliseconds on Bot's clock, so it keeps rising across Bot restarts. Absent from Bots before 0.213.0 and on robots without a turn queue."
++ },
"robot_id": {
"type": "string",
"pattern": "^rob_[0-9A-HJKMNP-TV-Z]{26}$"
ddiff --git a/generated/typescript/index.d.ts b/generated/typescript/index.d.ts
iindex c18b3814..6b051edf 100644
---- a/generated/typescript/index.d.ts
++++ b/generated/typescript/index.d.ts
@@@ -196857,6 +196857,10 @@ export type BotDeviceMessage =
subject?: string | null;
role: string;
};
++ /**
++ * The robot's control epoch when Bot decided this command (Bot#155): it rises each time a queue turn ends, is left or is paused by an owner takeover, and Bot's own halt for that change carries the new value. A device or plugin may refuse a command whose turn_epoch is lower than the newest halt's, defence in depth on top of Bot's own guarantee that nothing decided under a turn is sent after that turn's halt. Milliseconds on Bot's clock, so it keeps rising across Bot restarts. Absent from Bots before 0.213.0 and on robots without a turn queue.
++ */
++ turn_epoch?: number;
robot_id?: string;
/**
* OpenVibe.Node only: the driver to send it to.