StartWorkoutInput
StartWorkoutInput = {
devices:DeviceId|RoleAssignment;kind:"free";splitEvery?:Quantity;target?:WorkoutTarget;targets?:PerformanceTargets; } | {devices:DeviceId|RoleAssignment;intervals: readonlyIntervalSpec[];kind:"intervals";mode?:"broadcast"|"sequential";rounds?:number|"unlimited"; }
Defined in: console-sdk/src/session/types.ts:203
What to program a workout session with (SDK_PLAN.md §3.6.5). This IS the
complete programming vocabulary (re-scope): higher-level workout models
(e.g. the Rogue app’s WPT prescriptions) live app-side and RESOLVE to this
input before calling start() — the SDK never learns their vocabulary.
devices is either a single DeviceId (the N=1 convenience) or a
modality-keyed RoleAssignment (the general fleet form).
Union Members
Section titled “Union Members”Type Literal
Section titled “Type Literal”{ devices: DeviceId | RoleAssignment; kind: "free"; splitEvery?: Quantity; target?: WorkoutTarget; targets?: PerformanceTargets; }
devices
Section titled “devices”devices:
DeviceId|RoleAssignment
One device, or a modality-keyed assignment.
kind:
"free"
splitEvery?
Section titled “splitEvery?”
optionalsplitEvery?:Quantity
Emit a split every N distance/time/calories.
target?
Section titled “target?”
optionaltarget?:WorkoutTarget
Whole-workout target; omit for just row/ride/ski.
targets?
Section titled “targets?”
optionaltargets?:PerformanceTargets
Optional whole-workout performance targets. Only targets.pace is
programmed to the console; the rest are app-scored pass-through values.
Type Literal
Section titled “Type Literal”{ devices: DeviceId | RoleAssignment; intervals: readonly IntervalSpec[]; kind: "intervals"; mode?: "broadcast" | "sequential"; rounds?: number | "unlimited"; }
devices
Section titled “devices”devices:
DeviceId|RoleAssignment
One device, or a modality-keyed assignment.
intervals
Section titled “intervals”intervals: readonly
IntervalSpec[]
The interval program (broadcast or role-scoped; never mixed).
kind:
"intervals"
optionalmode?:"broadcast"|"sequential"
Multi-machine choreography (SDK_PLAN.md §3.6.5).
broadcast(parallel, role-less): every device runs the program SIMULTANEOUSLY (two-athletes-racing). Intervals must be role-less. This is the DEFAULT whenmodeis omitted AND every interval is role-less, so existing broadcast callers are unaffected.sequential(relay, role-scoped): ONE athlete moves machine-to-machine; only the active role’s console runs while the others HOLD. Every interval must be role-scoped.
A role-scoped plan MUST declare mode explicitly (no default); a
broadcast plan with any role, or a sequential plan with a missing
role, rejects with 'session/invalid-plan'.
rounds?
Section titled “rounds?”
optionalrounds?:number|"unlimited"
Number of rounds; 'unlimited' hides the ≥255 firmware encoding.