---
title: "network.machine-role@1 · OpenVibe.Services"
canonical: "https://openvibe.services/docs/contracts/network.machine-role"
updated: null
---

# network.machine-role@1 · OpenVibe.Services

HTML: [network.machine-role@1 · OpenVibe.Services](https://openvibe.services/docs/contracts/network.machine-role)

# NetworkMachineRole `network.machine-role@1`

Generated at 2026-11-13 06:25:48 UTC from [`openvibe-contracts v0.419.0`](https://github.com/OpenVibers/OpenVibe.Contracts/tree/v0.419.0) and [`openvibe-sdk v0.161.0`](https://github.com/OpenVibers/OpenVibe.SDK/tree/v0.161.0).

- Version: 1.0.0
- Owner: network
- Visibility: public
- Status: active
- Compatibility: backward
- Schema: [`https://openvibe.network/contracts/network/machine-role.v1.json`](/docs/contracts/network.machine-role.json)

network.machine-role@1: one role a machine can have (plan L34, step M4). A role is what the machine does for the network: a name for the owner, what it installs on the machine and what the hub shows. The catalogue is network.machine-roles@1; a role outside it is refused.

## Fields

| Field | Type | Required | Description | Constraints |
| --- | --- | --- | --- | --- |
| `id` | string | yes | The role's id: the product that owns it, then what it is (codes.worker, desks.host, ai.host, bot.robot). | - `pattern ^[a-z][a-z0-9-]*\.[a-z][a-z0-9-]*$` |
| `name` | string | yes | The role's name, in the owner's words. | - `maxLength 60` |
| `installs` | string | yes | What the role puts on the machine (the job runner, the desk sandbox, the local model server). | - `maxLength 200` |
| `shows` | string | yes | What the hub shows for a machine with this role. | - `maxLength 200` |

## Examples

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

 Valid: codes-worker

~~~~
{
  "id": "codes.worker",
  "name": "Codes worker",
  "installs": "the Codes job runner",
  "shows": "Runs your coding jobs"
}
~~~~

Rejected: missing-shows

~~~~
{
  "id": "codes.worker",
  "name": "Codes worker",
  "installs": "the Codes job runner"
}
~~~~

Rejected: no-dot

~~~~
{
  "id": "worker",
  "name": "Codes worker",
  "installs": "x",
  "shows": "y"
}
~~~~

## Validate

~~~~
const contracts = require('openvibe-contracts');
contracts.validate('network.machine-role@1', value);   // { valid, errors: [{ path, message }] }
~~~~
