RuntimeOffer platform.runtime-offer@1
Generated at from
openvibe-contracts v0.84.0 and
openvibe-sdk v0.26.0.
- Version
- 1.0.0
- Owner
- network
- Visibility
- public
- Status
- active
- Compatibility
- backward
- Decision
- ADR-034
- Schema
https://openvibe.network/contracts/platform/runtime-offer.v1.json
Available execution capacity for code on a node (T1 Universal Fabric; ADR-034 proposed).
Fields
| Field | Type | Required | Description | Constraints |
|---|---|---|---|---|
id | string | yes | ||
kind | enum | yes |
| |
region | string | yes | ||
node | string | yes | ||
limits | object | yes |
| |
limits.cpu_cores | number | yes |
| |
limits.memory_mb | integer | yes |
| |
limits.duration_seconds | integer |
| ||
limits.concurrency | integer |
| ||
price | object | yes |
| |
price.amount_usd | number | yes | Estimated USD |
|
price.unit | enum | yes |
| |
availability | enum | yes |
| |
constraints | array of string | yes |
Examples
From the contract's own test fixtures: valid ones validate, rejected ones must fail.
Valid: example
{
"id": "runtime-1",
"kind": "container",
"region": "us-west",
"node": "node-1",
"limits": {
"cpu_cores": 2,
"memory_mb": 4096,
"duration_seconds": 3600
},
"price": {
"amount_usd": 0.05,
"unit": "hour"
},
"availability": "available",
"constraints": [
"first-party"
]
}Rejected: missing-id
{
"kind": "container",
"region": "us-west",
"node": "node-1",
"limits": {
"cpu_cores": 2,
"memory_mb": 4096,
"duration_seconds": 3600
},
"price": {
"amount_usd": 0.05,
"unit": "hour"
},
"availability": "available",
"constraints": [
"first-party"
]
}Validate
const contracts = require('openvibe-contracts');
contracts.validate('platform.runtime-offer@1', value); // { valid, errors: [{ path, message }] }