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
| Field | Type | Required | Description | Constraints |
|---|---|---|---|---|
id | string | yes |
| |
watch_id | string | yes |
| |
check_run_id | string | yes |
| |
observed_at | string | yes |
| |
value | any | yes | The extracted value as the source stated it: text, a decimal number, a structured object. | |
value_hash | string | yes | SHA-256 hex of the canonical value. |
|
previous_hash | string | null | yes | SHA-256 of the previous observation's value; null for the first observation. |
|
changed | boolean | yes | ||
condition_met | boolean | yes | ||
snapshot | string | null | yes |
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 }] }