Skip to documentation
ReferenceEvent model

Event model

Inheritance and functions

Record the extension points without inventing their execution semantics.

Format definition

Define bounded conditions/effects and reproducible library composition instead of executable script text.

Scenario standard · Execution capabilities

Parameters

events.effects[].kind

"set-variable"

Optional; omitted means unspecified

The operation performed by this effect.

events.conditions[]

object

Optional; omitted means unspecified

All predicates must be true; empty all is explicitly true. No recursive or executable expression text.

events.conditions[].all[]

object

Optional; omitted means unspecified

Operand types must match the target. Boolean flags support only eq/ne; numeric comparisons use the variable's declared unit.

events.effects[].id

string

Optional; omitted means unspecified

Stable effect identifier referenced by states, actions, or schedules.

events.effects[].targetId

string

Optional; omitted means unspecified

The identifier of the variable or other entity changed by this effect.

events.effects[].value

number

Optional; omitted means unspecified

The resulting value, expressed in the target variable’s declared unit.

events.effects[].unit

string

Optional; omitted means unspecified

The target variable’s declared unit; effects cannot silently convert units.

dependencies[]

object

Optional; omitted means unspecified

Pinned library content; digest is 64 lowercase hex characters. Floating latest dependencies are prohibited.

composition.overrides[]

object

Optional; omitted means unspecified

Explicit overrides against a resolved dependency. Paths must exist; object/array values replace in full. No inferred deep merge.

Behavior and validation

  • Evaluate conditions against a frozen snapshot per operation. Unknown targets, wrong types, and unsupported operators invalidate the document. There is no network, filesystem, random, or arbitrary function execution.
  • Each effect kind has a closed operand shape: set-variable and trend-variable target numeric variables and require value/unit; set-flag targets a flag and requires boolean value; reveal and cancel-event prohibit value and unit; set-monitor-connection requires a Patient ID target, channel, and boolean value, and prohibits unit, durationSeconds, and interpolation. Consumers reject kind-specific fields that do not match the declared kind.
  • Effect ID arrays and action outcomes are ordered collections wherever this specification says operations or outcomes are ordered. Preserve their declared order; do not sort or deduplicate them during import or export.
  • Resolve dependencies topologically, reject cycles, verify bytes against pinned digests, then apply overrides in declared order. Duplicate writes to the same target/path are errors; do not silently choose a winner.
  • Exports for execution contain a fully resolved snapshot plus dependency provenance. Copy-versus-link is therefore settled at package creation; future library updates do not mutate an already exported scenario.

Shared format conventions · All format elements · Download specification

Implementation requirements

  • Library identity and dependency resolution.
  • Explicit override and merge precedence, including unknown fields.
  • Cycle detection and a policy for missing base definitions.
  • A constrained behavior language with deterministic execution and no implicit code evaluation.
  • Ordering rules for simultaneous state changes, timed events, results, and rewards.
  • Conformance examples that preserve content across implementations.