GamesModManageRequest games.mod-manage-request@1
Generated at from
openvibe-contracts v0.53.0 and
openvibe-sdk v0.11.0.
- Version
- 1.0.0
- Owner
- games
- Visibility
- first-party
- Status
- active
- Compatibility
- backward
- Schema
https://openvibe.network/contracts/games/mod-manage-request.v1.json
games.mod-manage-request@1: bodies of games.mod.manage on OpenVibe.Games (staff: an owner/admin session, or a service token with games.mod.manage). POST /api/v1/mods installs a mod: { manifest, pack?, approve?, trustTier?, enable? } — manifest is a mods.mod-manifest@1 the Games runtime can run (games.browser, games-content@1); pack is its games-content@1 data (announcements and props, validated strictly: unknown keys refused); approve lists at most 64 requested capabilities to grant; trustTier is unreviewed (default), reviewed or first-party; enable true starts it enabled. A mod already installed is 409 mod.exists. POST /api/v1/mods/:id/grants: { capability }. POST /api/v1/mods/:id/revoke: { reason? } (terminal). POST /api/v1/mods/:id/enable|disable take an empty JSON object or no body; DELETE /api/v1/mods/:id/grants/:capability and GET /api/v1/mods/:id/audit take no body. Bodies are at most 256 KB; unknown top-level fields are ignored.
Fields
This schema has no named fields.
Examples
From the contract's own test fixtures: valid ones validate, rejected ones must fail.
Valid: grant
{
"capability": "games.prop.place"
}Valid: install
{
"manifest": {
"id": "mod_01JABCDEFGHJKMNPQRSTVWXYZ0",
"name": "Town Square",
"version": "1.0.0",
"description": "A public workbench and a greeting.",
"publisher": {
"type": "user",
"id": "usr_01JABCDEFGHJKMNPQRSTVWXYZ0"
},
"target": "games.browser",
"runtime": "games-content@1",
"permissions": {
"capabilities": [
"games.world.announce",
"games.prop.place"
]
},
"resources": {
"cpuMs": 1,
"memoryMb": 0,
"storageMb": 0
},
"compatibility": {
"runtime": ">=1.0.0 <2.0.0"
}
},
"pack": {
"announcements": [
{
"text": "Welcome to the town square.",
"everySeconds": 900
}
]
},
"approve": [
"games.world.announce"
],
"trustTier": "reviewed",
"enable": true
}Valid: revoke
{
"reason": "abusive announcements"
}Rejected: unknown-pack-section
{
"manifest": {
"id": "mod_01JABCDEFGHJKMNPQRSTVWXYZ0",
"name": "Town Square",
"version": "1.0.0",
"description": "A public workbench and a greeting.",
"publisher": {
"type": "user",
"id": "usr_01JABCDEFGHJKMNPQRSTVWXYZ0"
},
"target": "games.browser",
"runtime": "games-content@1",
"permissions": {
"capabilities": [
"games.world.announce",
"games.prop.place"
]
},
"resources": {
"cpuMs": 1,
"memoryMb": 0,
"storageMb": 0
},
"compatibility": {
"runtime": ">=1.0.0 <2.0.0"
}
},
"pack": {
"music": []
},
"capability": 5,
"reason": 7
}Validate
const contracts = require('openvibe-contracts');
contracts.validate('games.mod-manage-request@1', value); // { valid, errors: [{ path, message }] }