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

# git.machine@1 · OpenVibe.Services

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

# GitMachine `git.machine@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: git
- Visibility: public
- Status: active
- Compatibility: backward
- Schema: [`https://openvibe.network/contracts/git/machine.v1.json`](/docs/contracts/git.machine.json)

A computer published to OpenVibe.Git through Link, read-only. Link connects out to Git, sends its name and the repositories under the root the person chose in Link, and keeps watching: the page lists the machine and browses its tree, files and log through Link while it is online. The request never reaches the machine; Git only asks on a poll the machine opened. Nothing here is a write path.

## Fields

| Field | Type | Required | Description | Constraints |
| --- | --- | --- | --- | --- |
| `id` | string | yes | The machine's own id (mch\_<ULID>), minted by Git when the person connects it. | - `pattern ^mch_[0-9A-HJKMNP-TV-Z]{26}$` |
| `name` | string | yes | The computer's name, as Link knows it. | - `minLength 1`<br>- `maxLength 80` |
| `os` | string |  | linux, darwin or windows, for the page's small label. | - `maxLength 40` |
| `online` | boolean | yes | True when Link has checked in within the last thirty seconds. |  |
| `last_seen_at` | string | yes |  | - `format date-time` |
| `offline_since` | string \| null |  | When the machine was last seen before going offline; null while it is online. | - `format date-time` |
| `repos` | array of object | yes |  | - `maxItems 500`<br>- `items: no other fields` |
| `repos[].name` | string | yes | The folder's name, lower-case, the same rule as a Git repository name. | - `pattern ^[a-z0-9][a-z0-9._-]*$`<br>- `maxLength 100` |
| `repos[].branch` | string | yes | The branch checked out in that folder. | - `maxLength 255` |
| `repos[].head` | string | yes | The commit's full SHA (SHA-1, or SHA-256 when the repository uses it). | - `pattern ^[0-9a-f]{40}(?:[0-9a-f]{24})?$` |
| `repos[].head_subject` | string |  |  | - `maxLength 200` |
| `repos[].updated_at` | string |  | The commit's own date. | - `format date-time` |

## Examples

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

 Valid: offline

~~~~
{
  "id": "mch_01JQZ8M4T7Y2N5K3B6V9C1X0DB",
  "name": "ada-desktop",
  "online": false,
  "last_seen_at": "2026-11-09T17:00:00Z",
  "offline_since": "2026-11-09T17:00:00Z",
  "repos": []
}
~~~~

Valid: online

~~~~
{
  "id": "mch_01JQZ8M4T7Y2N5K3B6V9C1X0DA",
  "name": "ada-laptop",
  "os": "linux",
  "online": true,
  "last_seen_at": "2026-11-10T09:00:00Z",
  "offline_since": null,
  "repos": [
    {
      "name": "openvibe.codes",
      "branch": "main",
      "head": "0123456789abcdef0123456789abcdef01234567",
      "head_subject": "Speed up the feed",
      "updated_at": "2026-11-10T08:40:00Z"
    }
  ]
}
~~~~

Rejected: bad-repo-name

~~~~
{
  "id": "mch_01JQZ8M4T7Y2N5K3B6V9C1X0DA",
  "name": "ada-laptop",
  "online": true,
  "last_seen_at": "2026-11-10T09:00:00Z",
  "repos": [
    {
      "name": "../escape",
      "branch": "main",
      "head": "0123456789abcdef0123456789abcdef01234567"
    }
  ]
}
~~~~

Rejected: missing-repos

~~~~
{
  "id": "mch_01JQZ8M4T7Y2N5K3B6V9C1X0DA",
  "name": "ada-laptop",
  "online": true,
  "last_seen_at": "2026-11-10T09:00:00Z"
}
~~~~

## Validate

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