NodeCapabilities platform.node-capabilities@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/node-capabilities.v1.json
Node hardware, placement regions, tags, and operating costs (T1 Universal Fabric; ADR-034 proposed).
Fields
| Field | Type | Required | Description | Constraints |
|---|---|---|---|---|
node_id | string | yes | ||
cpu | object | yes |
| |
cpu.cores | number | yes |
| |
cpu.threads | integer |
| ||
arch | string | yes | CPU architecture | |
memory_mb | integer | yes |
| |
gpu | object |
| ||
gpu.model | string | yes | ||
gpu.count | integer | yes |
| |
gpu.vram_mb | integer |
| ||
storage | object | yes |
| |
storage.capacity_gb | number | yes |
| |
storage.available_gb | number |
| ||
storage.kind | string | |||
network | object | yes |
| |
network.ingress_mbps | number | yes |
| |
network.egress_mbps | number | yes |
| |
regions | array of string | yes |
| |
tags | array of string | yes | ||
costs | object | yes |
| |
costs.per_hour_usd | number | yes | Estimated USD |
|
costs.egress_per_gb_usd | number | Estimated USD |
|
Examples
From the contract's own test fixtures: valid ones validate, rejected ones must fail.
Valid: example
{
"node_id": "node-1",
"cpu": {
"cores": 8,
"threads": 16
},
"arch": "x86_64",
"memory_mb": 16384,
"gpu": {
"model": "L4",
"count": 1,
"vram_mb": 24576
},
"storage": {
"capacity_gb": 500,
"available_gb": 300,
"kind": "ssd"
},
"network": {
"ingress_mbps": 1000,
"egress_mbps": 1000
},
"regions": [
"us-west"
],
"tags": [
"gpu",
"edge"
],
"costs": {
"per_hour_usd": 0.2,
"egress_per_gb_usd": 0.01
}
}Rejected: missing-node_id
{
"cpu": {
"cores": 8,
"threads": 16
},
"arch": "x86_64",
"memory_mb": 16384,
"gpu": {
"model": "L4",
"count": 1,
"vram_mb": 24576
},
"storage": {
"capacity_gb": 500,
"available_gb": 300,
"kind": "ssd"
},
"network": {
"ingress_mbps": 1000,
"egress_mbps": 1000
},
"regions": [
"us-west"
],
"tags": [
"gpu",
"edge"
],
"costs": {
"per_hour_usd": 0.2,
"egress_per_gb_usd": 0.01
}
}Validate
const contracts = require('openvibe-contracts');
contracts.validate('platform.node-capabilities@1', value); // { valid, errors: [{ path, message }] }