ModManifest mods.mod-manifest@1
Generated at from
openvibe-contracts v0.33.0 and
openvibe-sdk v0.5.0.
- Version
- 1.0.0
- Owner
- contracts
- Visibility
- public
- Status
- active
- Compatibility
- backward
- Decision
- ADR-013
- Schema
https://openvibe.network/contracts/mods/mod-manifest.v1.json
A mod as the platform knows it (ADR-013): who publishes it, which runtime runs it, which capabilities it asks for and the resources it may use. Requested capabilities are only a request: the install's approved subset is the grant, and trust tiers are install metadata that never change a grant check. The runtime-specific payload (a data pack, a script bundle) is not part of the manifest.
Fields
| Field | Type | Required | Description | Constraints |
|---|---|---|---|---|
id | string | yes | Stable mod id; its principal subject is mod:<id>. |
|
name | string | yes |
| |
version | string | yes | Semantic version of this release. |
|
description | string |
| ||
publisher | identity.subject-ref | yes | Who publishes the mod (a user or an app subject). | |
target | string | yes | Where the mod runs: <service>.<surface>, e.g. games.browser, games.source, live.overlay. |
|
runtime | string | yes | Runtime adapter and its major version, e.g. games-content@1 (declarative data pack) or source-quickjs@1. |
|
permissions | object | yes |
| |
permissions.capabilities | array of string | yes | Capability ids the mod asks for (3+ segments). The target runtime binds only those it implements, and only once granted. |
|
permissions.events | array of string | Event types the mod wants delivered to it. |
| |
permissions.modules | array of string | User-module namespaces the mod wants to read or write (a trailing .* names a family). |
| |
permissions.mediaNamespaces | array of string | Media namespaces the mod wants to read or write. |
| |
resources | object | yes | The budget the mod asks for. Runtimes meter it; the sandbox that enforces it lives in OpenVibe.Host (Stage C). |
|
resources.cpuMs | number | yes | CPU milliseconds per tick (game runtimes) or per request. |
|
resources.memoryMb | integer | yes |
| |
resources.storageMb | integer | yes |
| |
resources.outboundHosts | array of string | Hosts the mod may reach over the network. Empty or absent = none. |
| |
assets | media.media-ref | Assets the mod ships, as Media object references. |
| |
compatibility | object | yes |
| |
compatibility.runtime | string | yes | Semver range of the runtime this release works with, e.g. ">=1.0.0 <2.0.0". |
|
compatibility.contracts | string | Semver range of openvibe-contracts releases it was built against. |
| |
homepage | string |
|
Examples
From the contract's own test fixtures: valid ones validate, rejected ones must fail.
Valid: town-square
{
"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"
}
}Rejected: no-permissions
{
"id": "mod_01JABCDEFGHJKMNPQRSTVWXYZ0",
"name": "X",
"version": "1.0.0",
"publisher": {
"type": "user",
"id": "usr_01JABCDEFGHJKMNPQRSTVWXYZ0"
},
"target": "games.browser",
"runtime": "games-content@1",
"resources": {
"cpuMs": 1,
"memoryMb": 0,
"storageMb": 0
},
"compatibility": {
"runtime": ">=1.0.0"
}
}Validate
const contracts = require('openvibe-contracts');
contracts.validate('mods.mod-manifest@1', value); // { valid, errors: [{ path, message }] }