RunSessionStartedPayload run.session.started@1

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

Version
1.0.0
Owner
run
Visibility
first-party
Status
active
Compatibility
backward
Schema
https://openvibe.network/contracts/events/payloads/run.session.started.v1.json

run.session.started v1 (OpenVibe.Run; the Desks plan's D6). A session's desk answered for the first time: it runs on its machine, and desk_seconds count from timings.started_at. The session as run.session@1 has it. Envelope: subject { type: session, id: <session id> }, visibility internal, priority low, actor service:run.

Fields

FieldTypeRequiredDescriptionConstraints
idhttps://openvibe.network/contracts/run/session.v1.json#/$defs/session_idyes
owneridentity.subject-refyes
viahttps://openvibe.network/contracts/run/session.v1.json#/properties/viayes
kindhttps://openvibe.network/contracts/run/session.v1.json#/properties/kindyes
stateconstyes
  • = "running"
sizehttps://openvibe.network/contracts/run/session.v1.json#/$defs/sizeyes
ttl_shttps://openvibe.network/contracts/run/session.v1.json#/properties/ttl_syes
idle_shttps://openvibe.network/contracts/run/session.v1.json#/properties/idle_syes
placementhttps://openvibe.network/contracts/run/session.v1.json#/$defs/placementyes
timingshttps://openvibe.network/contracts/run/session.v1.json#/$defs/timingsyes
endnullyes
usagehttps://openvibe.network/contracts/run/session.v1.json#/$defs/usageyes
idempotency_keyhttps://openvibe.network/contracts/run/session.v1.json#/properties/idempotency_keyyes
task_idhttps://openvibe.network/contracts/run/session.v1.json#/properties/task_id
curtainhttps://openvibe.network/contracts/run/session.v1.json#/properties/curtain

Examples

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

Valid: shared-host
{
  "id": "ses_01JD2C3D4E5F6G7H8J9K0MNPQR",
  "owner": {
    "type": "user",
    "id": "usr_01JAB2C3D4E5F6G7H8J9K0MNPQ"
  },
  "via": "service:actor",
  "kind": "browser",
  "state": "running",
  "size": {
    "width": 1280,
    "height": 800
  },
  "ttl_s": 3600,
  "idle_s": 900,
  "placement": {
    "machine": "dev_01J8Z4M2Q0R7T9YV3K6N8P1W2X",
    "desk": "desk-s0mnpqr",
    "trust": "community",
    "offer_id": "desk:dev_01J8Z4M2Q0R7T9YV3K6N8P1W2X",
    "region": "eu",
    "reasons": [
      "a shared desk host with room"
    ]
  },
  "timings": {
    "created_at": "2026-10-28T10:00:00Z",
    "started_at": "2026-10-28T10:00:04Z",
    "last_used_at": "2026-10-28T10:05:00Z",
    "ended_at": null
  },
  "end": null,
  "usage": {
    "desk_seconds": 296
  },
  "idempotency_key": null
}
Rejected: still-placing
{
  "id": "ses_01JD2C3D4E5F6G7H8J9K0MNPQR",
  "owner": {
    "type": "user",
    "id": "usr_01JAB2C3D4E5F6G7H8J9K0MNPQ"
  },
  "via": "service:actor",
  "kind": "browser",
  "state": "placing",
  "size": {
    "width": 1280,
    "height": 800
  },
  "ttl_s": 3600,
  "idle_s": 900,
  "placement": {
    "machine": "dev_01J8Z4M2Q0R7T9YV3K6N8P1W2X",
    "desk": "desk-s0mnpqr",
    "trust": "community",
    "offer_id": "desk:dev_01J8Z4M2Q0R7T9YV3K6N8P1W2X",
    "region": "eu",
    "reasons": [
      "a shared desk host with room"
    ]
  },
  "timings": {
    "created_at": "2026-10-28T10:00:00Z",
    "started_at": "2026-10-28T10:00:04Z",
    "last_used_at": "2026-10-28T10:05:00Z",
    "ended_at": null
  },
  "end": null,
  "usage": {
    "desk_seconds": 296
  },
  "idempotency_key": null
}

Validate

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