Skip to content

ConsoleConfigOptions

Defined in: console-sdk/src/config/types.ts:76

Options accepted by createConsoleConfig() (SDK_PLAN.md §3.1.3). Every field is optional; zero config IS the config — no keys, no auth, no backend. Cross-cutting host concerns (telemetry, error reporting) enter once here, never through hook arguments.

optional athlete?: object

Defined in: console-sdk/src/config/types.ts:133

Athlete parameters the firmware uses (SDK_PLAN.md row 78’s console-facing remnant): weight feeds calorie computation; units feed display defaults. Pushed to consoles on connect and changeable per session — profile MANAGEMENT (forms, persistence, server) is the app’s. No defaults: when absent, nothing is pushed.

optional heightCm?: number

Athlete height in centimeters.

optional sex?: "male" | "female"

Athlete sex as consumed by the firmware’s calorie model.

optional units?: DisplayUnits

Default display units pushed during connection setup.

optional weightKg?: number

Athlete weight in kilograms (drives console calorie computation).


optional capture?: object

Defined in: console-sdk/src/config/types.ts:126

Workout capture defaults. sampleRateSeconds default: 0.5.

optional sampleRateSeconds?: number


optional diagnostics?: object

Defined in: console-sdk/src/config/types.ts:169

Dev diagnostics (replaces PayloadLogger — SDK_PLAN.md rows 84–85). Never writes files. rawPackets default: false; when enabled, a bounded in-memory ring backs useDiagnostics() and each packet is also handed to the optional onRawPacket log sink.

optional onRawPacket?: (packet) => void

RawPacketInfo

void

optional rawPackets?: boolean


optional firmware?: object

Defined in: console-sdk/src/config/types.ts:149

Firmware environment (replaces the unreturned setEnvironment setter — SDK_PLAN.md row 71). The manifestUrl fetch is the SDK’s ONLY network touch: unauthenticated, via global fetch (override with fetch for tests/proxies). channel default: 'prod'; manifestUrl defaults to the channel’s production CDN root.

optional channel?: "prod" | "dev"

optional fetch?: (input, init?) => Promise<Response>

RequestInfo

RequestInit

Promise<Response>

optional manifestUrl?: string


optional fleet?: object

Defined in: console-sdk/src/config/types.ts:94

Fleet policy — declarative replacement for the MDM flag/blocklist choreography (SDK_PLAN.md rows 7–10).

optional autoReconnect?: object

Automatic reconnection policy for saved devices.

optional duringWorkout?: boolean

Reconnect even mid-workout for devices in the active session. Default: true.

optional enabled?: boolean

Master switch. Default: true.

optional autoScan?: object

Background scan scheduling (needed by auto-reconnect).

optional cooldownMs?: number

Minimum pause between background scans in milliseconds. Default: 15_000.

optional enabled?: boolean

Master switch. Default: true.

optional inWorkoutCooldownMultiplier?: number

Divisor applied to the cooldown during a workout (cooldown ÷ N). Default: 3.

optional postDisconnectDebounceMs?: number

Debounce before the post-disconnect immediate scan, in milliseconds. Default: 3_000 (field-proven timing).

optional connectTimeoutMs?: number

Per-attempt connect timeout in milliseconds. Default: 15_000.

optional maxDevices?: number

Maximum simultaneously connected devices. Default: 4.

optional onePerModality?: boolean

Enforce the one-machine-per-type constraint. Default: true.


optional onError?: (error, context) => void

Defined in: console-sdk/src/config/types.ts:163

Fired once per failure for cross-cutting toasts/reporting (TanStack QueryCache precedent). Cancellations are documented non-failures and are excluded.

ConsoleSdkError

ErrorContext

void


optional storage?: StorageAdapter

Defined in: console-sdk/src/config/types.ts:90

Persistence for saved devices (the SDK’s only durable state — workout results are values the consumer owns, §3.6.6). Default: auto-detects @react-native-async-storage/async-storage (optional peer); if absent, falls back to memoryStorage() with a one-time dev warning that saved devices won’t persist. Explicit adapters: '@rogue/console-sdk/storage/async-storage' and (testing) memoryStorage().


optional telemetry?: TelemetrySink

Defined in: console-sdk/src/config/types.ts:158

Cross-cutting host integration (replaces VaderSDKInstance threading & setRemoteLogger — SDK_PLAN.md row 86). Construction-time dependency injection: a host-owned sink the SDK calls out to.


optional transport?: ConsoleTransport

Defined in: console-sdk/src/config/types.ts:81

Device I/O boundary. Default: createBleTransport() (wraps ble-plx; SDK_PLAN.md §3.10, §4.3) — applied lazily inside the provider runtime, never constructed by the inert config factory. Tests/demos: createSimulatedTransport() (§3.11).