GitMachine git.machine@1

Generated at from openvibe-contracts v0.419.0 and openvibe-sdk v0.161.0.

Version
1.0.0
Owner
git
Visibility
public
Status
active
Compatibility
backward
Schema
https://openvibe.network/contracts/git/machine.v1.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

FieldTypeRequiredDescriptionConstraints
idstringyesThe machine's own id (mch_<ULID>), minted by Git when the person connects it.
  • pattern ^mch_[0-9A-HJKMNP-TV-Z]{26}$
namestringyesThe computer's name, as Link knows it.
  • minLength 1
  • maxLength 80
osstringlinux, darwin or windows, for the page's small label.
  • maxLength 40
onlinebooleanyesTrue when Link has checked in within the last thirty seconds.
last_seen_atstringyes
  • format date-time
offline_sincestring | nullWhen the machine was last seen before going offline; null while it is online.
  • format date-time
reposarray of objectyes
  • maxItems 500
  • items: no other fields
repos[].namestringyesThe folder's name, lower-case, the same rule as a Git repository name.
  • pattern ^[a-z0-9][a-z0-9._-]*$
  • maxLength 100
repos[].branchstringyesThe branch checked out in that folder.
  • maxLength 255
repos[].headstringyesThe 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_subjectstring
  • maxLength 200
repos[].updated_atstringThe 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 }] }