GamesModRevokedPayload games.mod.revoked@1

Generated at from openvibe-contracts v0.34.2 and openvibe-sdk v0.5.0.

Version
1.0.0
Owner
games
Visibility
first-party
Status
active
Compatibility
backward
Schema
https://openvibe.network/contracts/events/payloads/games.mod.revoked.v1.json

games.mod.revoked v1 (OpenVibe.Games apps/server/src/platform/gameEvents.ts modEvent, via ModRegistry.revoke in mods/registry.ts; POST /api/v1/mods/:id/revoke). Terminal: every active grant of the install was revoked and its status set to revoked; the runtime retracts the mod's announcements and props on the next tick. revoked_grants lists the grants that were active (may be empty); reason is the staff-supplied text (cut to 500 characters), absent when none was given. Not emitted again for an install that is already revoked. Written to Games' event_outbox in the same SQLite transaction as the registry and mod_audit rows (mods/registry.ts). The manifest, content pack, audit actor string and installer are left out. No consumer yet. Envelope: subject { type: mod, id: <mod.id> }, visibility internal, priority important, actor the staff member who made the change (user:<usr_...>), service:<client> for a principal token carrying games.mod.manage, or service:games (pre-subject staff token, editor key).

Fields

FieldTypeRequiredDescriptionConstraints
modobjectyesThe install, from its validated mods/mod-manifest.v1 manifest.
  • no other fields
mod.idstringyesMod id (manifest id). Also the envelope subject id.
  • pattern ^mod_[0-9A-HJKMNP-TV-Z]{26}$
mod.namestringyes
  • minLength 1
  • maxLength 80
mod.versionstringyesSemantic version of the installed release.
  • pattern ^(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)(-[0-9A-Za-z.-]+)?$
mod.targetstringyesManifest target. Games only accepts games.browser today (mods/manifest.ts checkForGames).
  • pattern ^[a-z][a-z0-9-]{1,39}\.[a-z][a-z0-9-]{1,39}$
mod.trust_tierenumyesInstall metadata set at install; never consulted by a grant check.
  • one of "unreviewed", "reviewed", "first-party"
revoked_grantsarray of stringyesGrants active before the revoke, sorted.
  • maxItems 64
  • unique items
  • items: pattern ^[a-z][a-z0-9_]*(\.[a-z0-9_]+){2,}$
reasonstring
  • minLength 1
  • maxLength 500

Examples

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

Valid: no-reason-no-grants
{
  "mod": {
    "id": "mod_01JAD3F5G7H9K1M3N5P7Q9R1S3",
    "name": "Town Square",
    "version": "1.0.0",
    "target": "games.browser",
    "trust_tier": "unreviewed"
  },
  "revoked_grants": []
}
Valid: with-reason
{
  "mod": {
    "id": "mod_01JAD3F5G7H9K1M3N5P7Q9R1S3",
    "name": "Town Square",
    "version": "1.0.0",
    "target": "games.browser",
    "trust_tier": "unreviewed"
  },
  "revoked_grants": [
    "games.prop.place",
    "games.world.announce"
  ],
  "reason": "Props block the market entrance"
}
Rejected: empty-reason
{
  "mod": {
    "id": "mod_01JAD3F5G7H9K1M3N5P7Q9R1S3",
    "name": "Town Square",
    "version": "1.0.0",
    "target": "games.browser",
    "trust_tier": "unreviewed"
  },
  "revoked_grants": [],
  "reason": ""
}
Rejected: missing-revoked-grants
{
  "mod": {
    "id": "mod_01JAD3F5G7H9K1M3N5P7Q9R1S3",
    "name": "Town Square",
    "version": "1.0.0",
    "target": "games.browser",
    "trust_tier": "unreviewed"
  },
  "reason": "test"
}
Rejected: reason-too-long
{
  "mod": {
    "id": "mod_01JAD3F5G7H9K1M3N5P7Q9R1S3",
    "name": "Town Square",
    "version": "1.0.0",
    "target": "games.browser",
    "trust_tier": "unreviewed"
  },
  "revoked_grants": [],
  "reason": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
}

Validate

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