VisionAlertPayload vision.alert@1

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

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

vision.alert v1 (OpenVibe.Vision): an owner-granted camera alert. Envelope: source vision, subject { type: user, id: <source owner> }, visibility subject. The payload names the watched source reference and the classes found with their confidence; it carries no image bytes and no person's identity.

Fields

FieldTypeRequiredDescriptionConstraints
kindenumyes
  • one of "object", "scene_change", "face"
source_refstringyes
  • minLength 1
  • maxLength 160
classesarray of stringyes
  • minItems 1
  • maxItems 20
  • items: maxLength 60
confidencenumber | nullyes
  • minimum 0
  • maximum 1
previous_refstring | null
  • maxLength 160
detected_atstringyes
  • format date-time

Examples

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

Valid: one
{
  "kind": "object",
  "source_ref": "cam:front-door",
  "classes": [
    "package"
  ],
  "confidence": 0.88,
  "detected_at": "2026-10-29T10:00:00.000Z"
}
Rejected: one
{
  "kind": "motion",
  "source_ref": "cam:front-door",
  "classes": [],
  "confidence": 2,
  "detected_at": "2026-10-29T10:00:00.000Z"
}

Validate

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