IntervalSpec
Defined in: console-sdk/src/session/types.ts:171
One entry in a structured interval program (SDK_PLAN.md §3.6.5).
role is the leg → device binding, NOT the mode signal — the plan’s
choreography is chosen by the explicit intervals.mode discriminator
(StartWorkoutInput), never inferred from role presence:
- In
broadcastmode every device runs each interval simultaneously androleMUST be omitted (a broadcast plan is role-less; valid at any N — the same role-less input that drives one rower drives a rower + bike pair with zero changes, the binding constraint §1.3). - In
sequentialmoderoleselects which console runs this leg, the turn hands off to the next leg’s role after it, androleMUST be present on every interval;SessionProgress.activeDeviceIdis non-null only in this mode.
The mode ↔ role coherence rules (a broadcast plan with any role, a
sequential plan with a missing role, or a role-scoped plan with no mode)
reject with 'session/invalid-plan'.
Properties
Section titled “Properties”
optionalrest?:Rest
Defined in: console-sdk/src/session/types.ts:184
Rest after the work segment; defaults to { kind: 'untilUserContinues' }.
optionalrole?:Modality
Defined in: console-sdk/src/session/types.ts:177
sequential mode: the modality whose console runs this leg (turn-based).
broadcast mode: omit it (every device runs the interval). All intervals
in one plan must agree with the plan’s mode.
targets?
Section titled “targets?”
optionaltargets?:PerformanceTargets
Defined in: console-sdk/src/session/types.ts:189
Optional performance targets for the work segment. Only targets.pace is
programmed to the console; the rest are app-scored pass-through values.
work: {
kind:"distance";meters:number; } | {kind:"time";seconds:number; } | {calories:number;kind:"calories"; }
Defined in: console-sdk/src/session/types.ts:179
The work segment: a distance, a duration, or a calorie goal.