openvibers/openvibe.contracts Commits
Contracts 0.176.0: person-owned resources can be controlled (common.owned-resource-control-request@1; bot, chat, openre, community resource.control) (#134)
OP OpenVibers committed 29 days ago · tag v0.176 · 0 files, +0 −0
**Person-owned resources can be controlled from OpenVibe.Services** (ADR-048 amendment 2026-10-15, step 8 phase 2, the control half). Robots, chat rooms, restream definitions and pastes are in the index as a person's own resources, but they had no actions: the control request is project-scoped and names resources by OVRN, which person-owned resources don't have.
**Changes:**
- **`common.owned-resource-control-request@1`** (new, in the catalog):
- `owned { kind, id }`: the index summary's kind and id (a prefixed ULID or the service's slug);
- `owner`: a `usr_` subject;
- `action`: delete, stop, suspend, resume or archive;
- `idempotency_key`, plus optional `on_behalf_of`, `params`, `confirmation_id`, `dry_run` and `trace_id`;
- no `project_id`.
It goes to the same `POST /api/v1/resources/control`, told apart by `owned`.
- **`contracts.resources.checkControlRequest`** takes either form and routes on `owned`. A person acting for someone else is refused. `checkOwnedControlRequest` is exported.
- **Capabilities** (active, first-party, sensitive), each listed in its service's manifest:
- `bot.resource.control`: stop (e-stop) and resume (clear);
- `chat.resource.control`: archive;
- `openre.resource.control`: suspend and resume (definition disabled or active);
- `community.resource.control`: delete a paste.
- **ADR-048:** a "Person-owned resources" section covering naming, who decides (the authority checks the owner it holds), gates, answers and actions.
- **Fixtures:** valid `bot-robot-stop` and `community-paste-delete-dry-run`; invalid `with-project`, `agent-owner` and `create`.
- **`test/bot-manifest.test.js`** mirrors Bot's STATUS.json with `bot.resource.control`; the Bot PR adds it there.
**Checks:** `npm test` passes all 20,043 checks. `compat.js v0.175.0` finds no breaking changes.
**Next:** each authority implements it (Bot, Chat, OpenRestream, Community); Network grants Services the four capabilities; Services offers the actions on "Your resources".
This commit has no diff to show.