WatchObservation watch.observation@1

Generated at from openvibe-contracts v0.107.0 and openvibe-sdk v0.26.0.

Version
1.0.0
Owner
watch
Visibility
first-party
Status
planned
Compatibility
backward
Schema
https://openvibe.network/contracts/watch/observation.v1.json

watch.observation@1: one value a check recorded for a watch (plan T18): what was extracted, when, from which check run, and whether it changed or met the condition. value is the extracted value exactly as the source stated it, never inferred; snapshot is a capped copy of the raw body kept according to the watch's retention. Rows are immutable.

Fields

FieldTypeRequiredDescriptionConstraints
idstringyes
  • pattern ^wco_[0-9A-HJKMNP-TV-Z]{26}$
watch_idstringyes
  • pattern ^wch_[0-9A-HJKMNP-TV-Z]{26}$
check_run_idstringyes
  • pattern ^ckr_[0-9A-HJKMNP-TV-Z]{26}$
observed_atstringyes
  • format date-time
valueanyyesThe extracted value as the source stated it: text, a decimal number, a structured object.
value_hashstringyesSHA-256 hex of the canonical value.
  • pattern ^[0-9a-f]{64}$
previous_hashstring | nullyesSHA-256 of the previous observation's value; null for the first observation.
  • pattern ^[0-9a-f]{64}$
changedbooleanyes
condition_metbooleanyes
snapshotstring | nullyes

Examples

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

Valid: price-changed
{
  "id": "wco_01JAB2C3D4E5F6G7H8J9K0MNPS",
  "watch_id": "wch_01JAB2C3D4E5F6G7H8J9K0MNPQ",
  "check_run_id": "ckr_01JAB2C3D4E5F6G7H8J9K0MNPT",
  "observed_at": "2026-10-05T09:00:00.000Z",
  "value": 189.99,
  "value_hash": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
  "previous_hash": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb",
  "changed": true,
  "condition_met": true,
  "snapshot": "{\"price\":189.99,\"currency\":\"USD\"}"
}
Rejected: missing-check-run
{
  "id": "wco_01JAB2C3D4E5F6G7H8J9K0MNPS",
  "watch_id": "wch_01JAB2C3D4E5F6G7H8J9K0MNPQ",
  "observed_at": "2026-10-05T09:00:00.000Z",
  "value": 189.99,
  "value_hash": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
  "previous_hash": null,
  "changed": true,
  "condition_met": true,
  "snapshot": null
}

Validate

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