ResourceOffer platform.resource-offer@1

Generated at from openvibe-contracts v0.114.0 and openvibe-sdk v0.35.1.

Version
1.1.0
Owner
network
Visibility
first-party
Status
active
Compatibility
backward
Decision
ADR-034
Schema
https://openvibe.network/contracts/platform/resource-offer.v1.json

What one node or external provider can run right now (roadmap WS-Z9, decision 43): capabilities, multidimensional capacity, measured latencies, health and pricing. First-party only: it carries capacity the public node registry (network.node@1) deliberately leaves out.

Fields

FieldTypeRequiredDescriptionConstraints
offer_idstringyes
kindenumyes
  • one of "node", "provider", "storage", "delivery", "runtime", "agent", "harness"
node_idstringnetwork.node@1 id, for kind node
providerstringprovider or hosting company
adapterstringcarrier or provider adapter id, for kind provider (e.g. nats-v1, cf-queue-v1)
regionstringyes
cellstring
trustenumyesthe offer's trust class (ADR-046): first-party (operated by the OpenVibe network), user-owned (a person's own node, eligible only for workloads whose requirements name user-owned), partner, community or external
  • one of "first-party", "user-owned", "partner", "community", "external"
capabilitiesarray of stringyese.g. node:http, worker:browser, worker:ffmpeg, worker:ai-gpu, events:gateway, events:durable, object:r2. Kind harness: task:edit, task:review, task:browse, task:run, task:test and task:plan for the task kinds it takes (its detail's task_capabilities), and harness:mcp, harness:resume, harness:host-access and harness:long-autonomy for its detail's capabilities that are true. The `worker:<class>` names that map to platform.runtime-class@1 values are reserved for OpenVibe.Node's job worker, one per class: worker:function, worker:code, worker:browser, worker:linux, worker:desktop and worker:gpu ($defs.reservedWorkerCapabilities). A node advertises the name of each class it runs (Node's status.capabilities.worker); every other `worker:` name (worker:ffmpeg, worker:ai-gpu) is an ordinary capability name. Beside them, a kind harness names `runtime:<class>` for each platform.runtime-class@1 class it can run (runtime:function, runtime:code, runtime:browser, runtime:linux, runtime:desktop, runtime:gpu); these are ordinary capability names, not reserved, and OpenVibe.Codes already advertises the classes it offers.
  • items: pattern ^[a-z][a-z0-9-]*:[a-z0-9.-]+$
capacityobject
  • no other fields
capacity.cpuobject
  • no other fields
capacity.cpu.utilizationnumber
  • minimum 0
  • maximum 1
capacity.cpu.available_coresnumber
  • minimum 0
capacity.memoryobject
  • no other fields
capacity.memory.utilizationnumber
  • minimum 0
  • maximum 1
capacity.memory.available_mbnumber
  • minimum 0
capacity.networkobject
  • no other fields
capacity.network.ingress_mbpsnumber
  • minimum 0
capacity.network.egress_mbpsnumber
  • minimum 0
capacity.network.available_mbpsnumber
  • minimum 0
capacity.diskobject
  • no other fields
capacity.disk.iops_availablenumber
  • minimum 0
capacity.disk.scratch_gbnumber
  • minimum 0
capacity.disk.utilizationnumber
  • minimum 0
  • maximum 1
capacity.gpuobject
  • no other fields
capacity.gpu.typestring
capacity.gpu.vram_free_mbnumber
  • minimum 0
capacity.gpu.utilizationnumber
  • minimum 0
  • maximum 1
capacity.workersobjectfree worker slots by kind (browser, ffmpeg, ai, …)
capacity.queuesobjectqueue depth and age by name
capacity.event_loop_lag_msnumber
  • minimum 0
latency_msobjectmeasured p50/p95 by operation, e.g. publish_p95, ack_p95
healthobjectyes
  • no other fields
health.statusenumyes
  • one of "up", "degraded", "down", "draining"
health.error_ratenumber
  • minimum 0
  • maximum 1
health.checked_atstring
  • format date-time
pricingobjectyes
  • no other fields
pricing.modelenumyes
  • one of "prepaid", "per-request", "per-byte", "per-operation", "per-second", "free-allowance", "mixed"
pricing.marginal_usd_per_unitnumber
  • minimum 0
pricing.unitstring
pricing.rate_cardstringplatform.rate-card id when the price comes from one
updated_atstringyes
  • format date-time
detailobjectThe kind's own offer: platform.storage-offer@1, platform.delivery-offer@1, platform.runtime-offer@1, platform.agent-offer@1 or platform.harness-offer@1 for those kinds; absent for kind node and provider.

Examples

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

Valid: agent
{
  "offer_id": "off_agent_1",
  "kind": "agent",
  "provider": "example",
  "region": "us-west",
  "trust": "first-party",
  "capabilities": [
    "agent:model-1"
  ],
  "health": {
    "status": "up"
  },
  "pricing": {
    "model": "per-operation"
  },
  "updated_at": "2026-10-02T00:00:00Z",
  "detail": {
    "id": "agent-1",
    "harness": "harness-1",
    "provider": "example-ai",
    "model": "model-1",
    "context_limits": {
      "input_tokens": 128000,
      "output_tokens": 8192
    },
    "concurrency": 4,
    "price_per_1k_tokens": {
      "fresh_usd": 0.003,
      "cached_usd": 0.001,
      "output_usd": 0.01
    },
    "availability_windows": []
  }
}
Valid: delivery
{
  "offer_id": "off_delivery_1",
  "kind": "delivery",
  "provider": "example",
  "region": "us-west",
  "trust": "first-party",
  "capabilities": [
    "delivery:hls"
  ],
  "health": {
    "status": "up"
  },
  "pricing": {
    "model": "per-operation"
  },
  "updated_at": "2026-10-02T00:00:00Z",
  "detail": {
    "id": "delivery-1",
    "transports": [
      "http",
      "hls"
    ],
    "regions": [
      "us-west"
    ],
    "edge": true,
    "node": "node-1",
    "price_per_gb_usd": 0.02,
    "price_per_request_usd": 0.00001,
    "cache_rules": {
      "enabled": true,
      "ttl_seconds": 300,
      "max_object_mb": 100
    }
  }
}
Valid: harness-task-routing
{
  "offer_id": "off_harness_2",
  "kind": "harness",
  "provider": "example",
  "region": "us-west",
  "trust": "first-party",
  "capabilities": [
    "task:edit",
    "task:review",
    "harness:mcp"
  ],
  "health": {
    "status": "up"
  },
  "pricing": {
    "model": "per-operation"
  },
  "updated_at": "2026-10-02T00:00:00Z",
  "detail": {
    "id": "harness-2",
    "name": "Example Agent",
    "provider": "example-ai",
    "capabilities": {
      "host_access": false,
      "mcp": true,
      "long_autonomy": false,
      "resume": false
    },
    "address": {
      "kind": "cli",
      "target": "example-agent"
    },
    "price": {
      "amount_usd": 0.1,
      "unit": "hour"
    },
    "limits": {
      "max_duration_seconds": 7200,
      "max_concurrent_runs": 4,
      "max_context_tokens": 128000
    },
    "task_capabilities": [
      "edit",
      "review"
    ],
    "runtime_needs": [
      "git",
      "node"
    ],
    "byo_key": false,
    "success_rate": 0.92
  }
}
Valid: harness
{
  "offer_id": "off_harness_1",
  "kind": "harness",
  "provider": "example",
  "region": "us-west",
  "trust": "first-party",
  "capabilities": [
    "harness:cli"
  ],
  "health": {
    "status": "up"
  },
  "pricing": {
    "model": "per-operation"
  },
  "updated_at": "2026-10-02T00:00:00Z",
  "detail": {
    "id": "harness-1",
    "name": "Example Agent",
    "provider": "example-ai",
    "capabilities": {
      "host_access": true,
      "mcp": true,
      "long_autonomy": true,
      "resume": true
    },
    "address": {
      "kind": "cli",
      "target": "example-agent"
    },
    "price": {
      "amount_usd": 0.1,
      "unit": "hour"
    },
    "limits": {
      "max_duration_seconds": 7200,
      "max_concurrent_runs": 4,
      "max_context_tokens": 128000
    }
  }
}
Valid: owned-node
{
  "offer_id": "off_oregon_1",
  "kind": "node",
  "node_id": "ovh-oregon-1",
  "provider": "ovh",
  "region": "us-west",
  "cell": "wnam-1",
  "trust": "first-party",
  "capabilities": [
    "node:http",
    "worker:browser",
    "worker:ffmpeg",
    "events:durable"
  ],
  "capacity": {
    "cpu": {
      "utilization": 0.31,
      "available_cores": 5.5
    },
    "memory": {
      "available_mb": 18300
    },
    "workers": {
      "browser": 6,
      "ffmpeg": 3
    },
    "queues": {
      "media-jobs": {
        "depth": 2,
        "oldest_ms": 40
      }
    }
  },
  "latency_ms": {
    "publish_p95": 3.1
  },
  "health": {
    "status": "up"
  },
  "pricing": {
    "model": "prepaid",
    "marginal_usd_per_unit": 0,
    "unit": "job"
  },
  "updated_at": "2026-09-28T23:00:00Z"
}
Valid: provider
{
  "offer_id": "off_cf_queue",
  "kind": "provider",
  "provider": "cloudflare",
  "adapter": "cf-queue-v1",
  "region": "global",
  "trust": "external",
  "capabilities": [
    "events:queue",
    "events:durable"
  ],
  "health": {
    "status": "up",
    "error_rate": 0.0001
  },
  "pricing": {
    "model": "per-operation",
    "rate_card": "rc_cf_queue_ops"
  },
  "updated_at": "2026-09-28T23:00:00Z"
}
Valid: runtime
{
  "offer_id": "off_runtime_1",
  "kind": "runtime",
  "provider": "example",
  "region": "us-west",
  "trust": "first-party",
  "capabilities": [
    "runtime:container"
  ],
  "health": {
    "status": "up"
  },
  "pricing": {
    "model": "per-operation"
  },
  "updated_at": "2026-10-02T00:00:00Z",
  "detail": {
    "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"
    ]
  }
}
Valid: storage
{
  "offer_id": "off_storage_1",
  "kind": "storage",
  "provider": "example",
  "region": "us-west",
  "trust": "first-party",
  "capabilities": [
    "object:r2"
  ],
  "health": {
    "status": "up"
  },
  "pricing": {
    "model": "per-operation"
  },
  "updated_at": "2026-10-02T00:00:00Z",
  "detail": {
    "id": "storage-1",
    "class": "warm",
    "capacity_gb": 1000,
    "price_per_gb_month_usd": 0.02,
    "price_per_operation_usd": 0.00001,
    "region": "us-west",
    "node": "node-1",
    "durability": {
      "replicas": 3,
      "target_nines": 9
    },
    "lifecycle_rules": [
      {
        "after_days": 90,
        "action": "transition",
        "target_class": "cold"
      }
    ]
  }
}
Valid: user-owned-node
{
  "offer_id": "off_user_node_1",
  "kind": "node",
  "node_id": "usr-node-1",
  "provider": "self",
  "region": "home",
  "trust": "user-owned",
  "capabilities": [
    "node:http",
    "worker:function",
    "worker:ai-gpu"
  ],
  "capacity": {
    "cpu": {
      "utilization": 0.1,
      "available_cores": 8
    },
    "memory": {
      "available_mb": 32000
    },
    "gpu": {
      "type": "rtx-4090",
      "vram_free_mb": 20000,
      "utilization": 0
    }
  },
  "latency_ms": {
    "publish_p95": 20
  },
  "health": {
    "status": "up"
  },
  "pricing": {
    "model": "free-allowance"
  },
  "updated_at": "2026-10-03T00:00:00Z"
}
Valid: worker-classes
{
  "offer_id": "off_worker_node_1",
  "kind": "node",
  "node_id": "worker-node-1",
  "provider": "self",
  "region": "home",
  "trust": "user-owned",
  "capabilities": [
    "node:http",
    "worker:function",
    "worker:code",
    "worker:browser",
    "worker:linux",
    "worker:desktop",
    "worker:gpu"
  ],
  "capacity": {
    "workers": {
      "function": 2,
      "code": 1,
      "browser": 1,
      "linux": 1,
      "desktop": 1,
      "gpu": 1
    }
  },
  "health": {
    "status": "up"
  },
  "pricing": {
    "model": "per-second",
    "marginal_usd_per_unit": 0.0001,
    "unit": "s"
  },
  "updated_at": "2026-10-03T00:00:00Z"
}
Rejected: bad-capability
{
  "offer_id": "x",
  "kind": "node",
  "region": "us-west",
  "trust": "first-party",
  "capabilities": [
    "Browser"
  ],
  "health": {
    "status": "up"
  },
  "pricing": {
    "model": "prepaid"
  },
  "updated_at": "2026-09-28T23:00:00Z"
}
Rejected: missing-health
{
  "offer_id": "x",
  "kind": "node",
  "region": "us-west",
  "trust": "first-party",
  "capabilities": [
    "node:http"
  ],
  "pricing": {
    "model": "prepaid"
  },
  "updated_at": "2026-09-28T23:00:00Z"
}
Rejected: node-with-detail
{
  "offer_id": "off_oregon_1",
  "kind": "node",
  "node_id": "ovh-oregon-1",
  "provider": "ovh",
  "region": "us-west",
  "cell": "wnam-1",
  "trust": "first-party",
  "capabilities": [
    "node:http",
    "worker:browser",
    "worker:ffmpeg",
    "events:durable"
  ],
  "capacity": {
    "cpu": {
      "utilization": 0.31,
      "available_cores": 5.5
    },
    "memory": {
      "available_mb": 18300
    },
    "workers": {
      "browser": 6,
      "ffmpeg": 3
    },
    "queues": {
      "media-jobs": {
        "depth": 2,
        "oldest_ms": 40
      }
    }
  },
  "latency_ms": {
    "publish_p95": 3.1
  },
  "health": {
    "status": "up"
  },
  "pricing": {
    "model": "prepaid",
    "marginal_usd_per_unit": 0,
    "unit": "job"
  },
  "updated_at": "2026-09-28T23:00:00Z",
  "detail": {
    "id": "storage-1",
    "class": "warm",
    "capacity_gb": 1000,
    "price_per_gb_month_usd": 0.02,
    "price_per_operation_usd": 0.00001,
    "region": "us-west",
    "node": "node-1",
    "durability": {
      "replicas": 3,
      "target_nines": 9
    },
    "lifecycle_rules": [
      {
        "after_days": 90,
        "action": "transition",
        "target_class": "cold"
      }
    ]
  }
}
Rejected: storage-without-detail
{
  "offer_id": "off_storage_1",
  "kind": "storage",
  "provider": "example",
  "region": "us-west",
  "trust": "first-party",
  "capabilities": [
    "object:r2"
  ],
  "health": {
    "status": "up"
  },
  "pricing": {
    "model": "per-operation"
  },
  "updated_at": "2026-10-02T00:00:00Z"
}
Rejected: unknown-trust
{
  "offer_id": "off_stranger_1",
  "kind": "node",
  "node_id": "stranger-node-1",
  "provider": "self",
  "region": "home",
  "trust": "stranger",
  "capabilities": [
    "node:http",
    "worker:function"
  ],
  "health": {
    "status": "up"
  },
  "pricing": {
    "model": "free-allowance"
  },
  "updated_at": "2026-10-03T00:00:00Z"
}

Validate

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