WorkoutControls
Defined in: console-sdk/src/session/types.ts:578
The always-available workout lifecycle verbs (SDK_PLAN.md §3.6.5). A flat
hook so buttons wire without narrowing. Per the paired-verb contract
(§3.8.3), the bare verbs NEVER reject — failure routes into the snapshot
(startError, phase 'failed') — while the *Async twins reject with a
typed SessionError for imperative composition.
Methods
Section titled “Methods”abandon()
Section titled “abandon()”abandon(
options?):Promise<void>
Defined in: console-sdk/src/session/types.ts:618
Abandons without a normal finish. keep: 'partial' applies RM-743
partial-capture semantics (partialResult populated with whatever
reconciled); default 'discard'.
Parameters
Section titled “Parameters”options?
Section titled “options?”"discard" | "partial"
Returns
Section titled “Returns”Promise<void>
dismiss()
Section titled “dismiss()”dismiss():
void
Defined in: console-sdk/src/session/types.ts:625
Returns a terminal session (completed/aborted/failed) to idle and
releases session-scoped streams. Optional when the next action is another
start() (which implicitly dismisses a terminal session) — required only
to release session-scoped streams while staying on a terminal screen.
Returns
Section titled “Returns”void
end():
Promise<WorkoutResult|null>
Defined in: console-sdk/src/session/types.ts:610
Ends the session gracefully: parallel stop-all, stop-verify, final split
commit, and record reconciliation (RM-558/621/647/743 semantics), then
phase 'completed' with the reconciled result. Resolves the
WorkoutResult, or null on failure (failure lands in the
snapshot: phase 'failed').
Returns
Section titled “Returns”Promise<WorkoutResult | null>
endAsync()
Section titled “endAsync()”endAsync():
Promise<WorkoutResult>
Defined in: console-sdk/src/session/types.ts:612
Rejecting twin of end ('session/wrong-phase', …).
Returns
Section titled “Returns”Promise<WorkoutResult>
pause()
Section titled “pause()”pause():
Promise<void>
Defined in: console-sdk/src/session/types.ts:600
Pauses a running session; a wrong-phase call is a dev-warned no-op.
Returns
Section titled “Returns”Promise<void>
resume()
Section titled “resume()”resume():
Promise<void>
Defined in: console-sdk/src/session/types.ts:602
Resumes a paused session; a wrong-phase call is a dev-warned no-op.
Returns
Section titled “Returns”Promise<void>
start()
Section titled “start()”start(
input):Promise<boolean>
Defined in: console-sdk/src/session/types.ts:588
Programs and starts a session. Resolves true once all devices are armed
and the session is running; resolves false on failure, with the
SessionError mirrored into startError — NEVER rejects
(§3.8.3). Calling start() while a previous session sits in a TERMINAL
phase (completed/aborted/failed) implicitly dismiss()es it first;
'session/already-active' is reserved for
arming/running/resting/paused/finalizing.
Parameters
Section titled “Parameters”Returns
Section titled “Returns”Promise<boolean>
startAsync()
Section titled “startAsync()”startAsync(
input):Promise<void>
Defined in: console-sdk/src/session/types.ts:594
Rejecting twin of start for imperative composition. Rejects with
'session/arm-failed' (carrying armed: DeviceId[]),
'session/already-active', or 'session/invalid-plan'.
Parameters
Section titled “Parameters”Returns
Section titled “Returns”Promise<void>
Properties
Section titled “Properties”isStarting
Section titled “isStarting”isStarting:
boolean
Defined in: console-sdk/src/session/types.ts:596
true while a start()/startAsync() is in flight.
startError
Section titled “startError”startError:
SessionError|null
Defined in: console-sdk/src/session/types.ts:598
The last start failure, cleared on the next start()/startAsync().