@bitcobblers/wod-wiki-lang 0.53.2204 → 0.55.2206

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -2587,6 +2587,10 @@ interface IAnalyticsEngine {
2587
2587
  * of the final values happens once via {@link finalize}.
2588
2588
  */
2589
2589
  setLiveOutputEmitter(emit: (outputs: IOutputStatement[]) => void): void;
2590
+ /** Optional runtime clock source for deterministic projection timestamps. */
2591
+ setNowProvider?(now: INowProvider): void;
2592
+ /** Current typed live Summary Metric projections (display-only, never persisted). */
2593
+ getLiveProjections?(): readonly ProjectionResult[];
2590
2594
  /** Run enrichment on a single output, then fire live projection update */
2591
2595
  run(output: IOutputStatement): IOutputStatement;
2592
2596
  /** Final projection pass — returns analytics output statements for summary */
@@ -2694,6 +2698,8 @@ interface IScriptRuntime extends IRuntimeActionable {
2694
2698
  * call it defensively (`runtime.getLiveAnalytics?.()`).
2695
2699
  */
2696
2700
  getLiveAnalytics?(): IOutputStatement[];
2701
+ /** Typed live Summary Metric projections from the attached AnalyticsEngine. */
2702
+ getLiveProjections?(): readonly ProjectionResult[];
2697
2703
  /**
2698
2704
  * Add an output statement to the collection and notify subscribers.
2699
2705
  * Used by BehaviorContext to emit outputs at any lifecycle point.
@@ -2810,6 +2816,7 @@ declare class ScriptRuntime implements IScriptRuntime {
2810
2816
  * Ephemeral Tier-2 (running-total) snapshot for live display; never persisted.
2811
2817
  */
2812
2818
  getLiveAnalytics(): IOutputStatement[];
2819
+ getLiveProjections(): readonly ProjectionResult[];
2813
2820
  /**
2814
2821
  * Add an output statement to the collection and notify subscribers.
2815
2822
  * Used by BehaviorContext to emit outputs at any lifecycle point.
@@ -2854,6 +2861,7 @@ declare class ScriptRuntime implements IScriptRuntime {
2854
2861
  * Timer direction for count-down vs count-up.
2855
2862
  */
2856
2863
  type TimerDirection = 'up' | 'down';
2864
+ type TimerPolarity = 'work' | 'rest';
2857
2865
  /**
2858
2866
  * Timer state stored in block memory.
2859
2867
  *
@@ -2876,6 +2884,10 @@ interface TimerState {
2876
2884
  readonly label: string;
2877
2885
  /** Timer role for UI prioritization */
2878
2886
  readonly role?: 'primary' | 'secondary' | 'auto' | 'hidden';
2887
+ /** True when user Next cannot skip this countdown before expiry. */
2888
+ readonly required?: boolean;
2889
+ /** Semantic polarity for Work vs Rest visual and priority handling. */
2890
+ readonly polarity?: TimerPolarity;
2879
2891
  }
2880
2892
  /**
2881
2893
  * Round state stored in memory.
@@ -3033,4 +3045,151 @@ declare function getRuntimeNowMs(): number;
3033
3045
  /** Creates an INowProvider that reads the browser sender-clock when available. */
3034
3046
  declare function createBrowserRuntimeNow(): INowProvider;
3035
3047
 
3036
- export { type SoundProfile as $, type AnalyticsContext as A, type BehaviorEventType as B, type IMemoryLocation as C, type IRuntimeBehavior as D, type EffortResolverOptions as E, type IBlockContext as F, type MetricVisibility as G, type BlockLifecycleOptions as H, type IEquipment as I, type CompletionDecision as J, type IRuntimeMemory as K, TypedMemoryReference as L, type MemoryTag as M, type MemorySearchCriteria as N, type OutputListener as O, type IMemoryReference as P, type RuntimeStackLogger as Q, type ReferenceIndex as R, type SubscribeOptions as S, TimeSpan as T, type Unsubscribe as U, type StackObserver as V, WhiteboardScript as W, type StackSnapshot as X, type StackListener as Y, MemoryTypeEnum as Z, type IAnchorValue as _, type ReferenceResolutionDefaults as a, type MemoryType as a$, type ButtonConfig as a0, type IEventHandler as a1, type HandlerScope as a2, type IScriptRuntime as a3, type TestableBlockConfig as a4, type IRuntimeOptions as a5, ScriptRuntime as a6, type EventHandlerOptions as a7, type EventCallback as a8, type TimerState as a9, DIM_COUNT as aA, DIM_ENERGY as aB, DIM_LENGTH as aC, DIM_MASS as aD, DIM_TIME as aE, DIM_ZERO as aF, DISCIPLINE_FACTORS as aG, type DisplayState as aH, EFFORT_DISCIPLINES as aI, EFFORT_REGISTRY_ORIGINS as aJ, type EffortBaseAttributes as aK, type EffortDerivation as aL, type EffortDiscipline as aM, type EffortMaterializer as aN, type EffortResolvedFrom as aO, type EvalContext as aP, type FenceDialect as aQ, type FragmentDisplayState as aR, type FragmentState as aS, type IAnalyticsProcessorDescriptor as aT, INTENSITY_TIERS as aU, type IScript as aV, type IntensityTier as aW, type InterceptMode as aX, type LookupFieldDef as aY, type LookupLayer as aZ, MemoryLocation as a_, type CalculationDefinition as aa, type PropertyRuleInput as ab, type IRealtimeProcessor as ac, type ISummaryProcessor as ad, type DimVector as ae, type CalcLine as af, type ExprNode as ag, type CalcScope as ah, type ILookupTable as ai, LookupRegistry as aj, type CalcRegistrationDiagnostic as ak, type ProjectionResult as al, ABSENT as am, type BinaryOp as an, type ButtonVariant as ao, type ButtonsState as ap, CalcEvalError as aq, type CalcNode as ar, type CalcOrigin as as, type CalcVariant as at, type ChildrenStatusState as au, type CompiledPropertySummaries as av, type CompletionState as aw, DEFAULT_RESOLVER_OPTIONS as ax, DEFAULT_RUNTIME_OPTIONS as ay, DEFAULT_SOUND_PROFILE as az, type IEffort as b, type MemoryTypeMap as b0, type MemoryValueOf as b1, NAMED_COMPOUNDS as b2, type PropertySourceLayer as b3, type ReferenceCatalog as b4, type ResolvedReferences as b5, type RoundState as b6, type RuntimeState as b7, SEED_PRECEDENCE_RANK as b8, type ScriptRuntimeDependencies as b9, filterTagsByVisibility as bA, formatDim as bB, formatSoundTrigger as bC, frozenNow as bD, getMetricVisibility as bE, getRuntimeNowMs as bF, isDimensionless as bG, isEffortDiscipline as bH, isFragmentTag as bI, num as bJ, parseSoundTrigger as bK, resolveEntityRank as bL, resolveEntityTier as bM, resolveProfileRules as bN, resolvePropertyDashboardWidgets as bO, resolveSourceRank as bP, resolveSourceTier as bQ, runMetricShakeOutQueue as bR, slugifyRefLabel as bS, str as bT, subDim as bU, truthy as bV, wallClockNow as bW, type SeedPrecedenceTier as ba, type ShakeOutQueueOptions as bb, type ShakeOutResult as bc, type SkippedDependencyDiagnostic as bd, type SoundRule as be, type SoundTriggerAnchor as bf, type SoundTriggerPoint as bg, type StackEvent as bh, type StackedDashboardWidgetDescriptor as bi, type TimerDirection as bj, VISIBILITY_ICONS as bk, VISIBILITY_LABELS as bl, type Val as bm, addDim as bn, compilePropertySummaryCalcs as bo, compilePropertySummaryCalcsWithDiagnostics as bp, compoundName as bq, createBrowserRuntimeNow as br, createReferenceIndex as bs, dedupeEntitiesByPrecedence as bt, dimEquals as bu, disciplineFactorFor as bv, evaluate as bw, extractPropertyRulesFromMeta as bx, extractStatementRefs as by, extractTagPropertyRules as bz, type IEffortResolver as c, type IEffortRegistry as d, type EffortResolutionOptions as e, type ResolvedEffort as f, type EffortRegistrySource as g, type IEquipmentRegistry as h, type EquipmentStorageAdapter as i, type EffortStorageAdapter as j, type IRuntimeActionable as k, type IEventBus as l, type IRuntimeStack as m, type IRuntimeClock as n, type IJitCompiler as o, type INowProvider as p, type RuntimeStackOptions as q, type RuntimeError as r, type IEvent as s, type IRuntimeAction as t, type IAnalyticsEngine as u, type IRuntimeBlock as v, type IBehaviorContext as w, type BehaviorEventListener as x, type Unsubscribe$1 as y, type OutputOptions as z };
3048
+ /**
3049
+ * SessionClockProjection — single deep module projecting live clock state,
3050
+ * semantic Work/Rest/Final5/Paused/Overrun polarity, required skip-lock
3051
+ * visibility, deduplicated secondary timers, immediate lookahead, and Effort
3052
+ * rep targets from an `IScriptRuntime`.
3053
+ *
3054
+ * Pure and DOM-free: runs identically in Tier 1 engine tests, browser React
3055
+ * views (Minimal, General, Detail), and the Cast frame projector.
3056
+ */
3057
+
3058
+ type SessionVisualPolarity = 'work' | 'rest' | 'final5' | 'paused' | 'overrun';
3059
+ type SessionExecutionStatus = 'idle' | 'running' | 'paused' | 'completed';
3060
+ interface SerializedTimerSpan {
3061
+ readonly started: number;
3062
+ readonly ended?: number;
3063
+ }
3064
+ interface ProjectedSecondaryTimer {
3065
+ readonly id: string;
3066
+ readonly label: string;
3067
+ readonly displayMs: number;
3068
+ readonly direction: TimerDirection;
3069
+ readonly durationMs?: number;
3070
+ readonly spans: readonly SerializedTimerSpan[];
3071
+ }
3072
+ interface ProjectedRepTarget {
3073
+ readonly occurrenceId: string;
3074
+ readonly blockKey: string;
3075
+ readonly sourceId?: number;
3076
+ readonly label: string;
3077
+ readonly target: number | null;
3078
+ readonly actual: number | null;
3079
+ }
3080
+ interface SessionClockFrame {
3081
+ readonly mainLabel: string;
3082
+ readonly subLabels?: string[];
3083
+ readonly displayMs: number;
3084
+ readonly direction: TimerDirection;
3085
+ readonly durationMs?: number;
3086
+ readonly activeSpans: readonly SerializedTimerSpan[];
3087
+ readonly basePolarity: TimerPolarity;
3088
+ readonly required: boolean;
3089
+ readonly sessionElapsedMs: number;
3090
+ readonly sessionSpans: readonly SerializedTimerSpan[];
3091
+ readonly polarity: SessionVisualPolarity;
3092
+ readonly isRequiredLockActive: boolean;
3093
+ readonly roundCurrent?: number;
3094
+ readonly roundTotal?: number;
3095
+ readonly roundLabel?: string;
3096
+ readonly secondaryTimers: ProjectedSecondaryTimer[];
3097
+ readonly upNext: string | null;
3098
+ readonly repTargets: ProjectedRepTarget[];
3099
+ readonly isRunning: boolean;
3100
+ readonly isPaused: boolean;
3101
+ readonly isNextDisabled: boolean;
3102
+ readonly skipFlash: boolean;
3103
+ readonly skipFlashKey: number;
3104
+ }
3105
+ interface SessionClockProjectionOptions {
3106
+ readonly nowMs?: number;
3107
+ readonly executionStatus?: SessionExecutionStatus;
3108
+ readonly canNextOverride?: boolean;
3109
+ readonly skipFlash?: boolean;
3110
+ readonly skipFlashKey?: number;
3111
+ }
3112
+ declare function resolveVisualPolarity(params: {
3113
+ readonly isPaused: boolean;
3114
+ readonly basePolarity: TimerPolarity;
3115
+ readonly direction: TimerDirection;
3116
+ readonly durationMs?: number;
3117
+ readonly displayMs: number;
3118
+ }): SessionVisualPolarity;
3119
+ declare function isRequiredCountdownLocked(params: {
3120
+ readonly isPaused: boolean;
3121
+ readonly required: boolean;
3122
+ readonly direction: TimerDirection;
3123
+ readonly durationMs?: number;
3124
+ readonly displayMs: number;
3125
+ }): boolean;
3126
+ interface SessionClockInputSignal {
3127
+ readonly skipFlash: boolean;
3128
+ readonly skipFlashKey: number;
3129
+ }
3130
+ /**
3131
+ * Shared runtime observer for stack changes, block memory mutations, and 3s
3132
+ * `timer:skip-attempt` flashes. Reused by both React (`useSessionClockProjection`)
3133
+ * and Cast (`SessionCastProjector`).
3134
+ */
3135
+ declare function observeSessionClockInputs(runtime: IScriptRuntime, onChange: (signal: SessionClockInputSignal) => void): () => void;
3136
+ /**
3137
+ * Pure span-based frame interpolation. Used by the stateless Cast receiver and
3138
+ * local animation loops to advance clock digits and polarity at 60fps without
3139
+ * holding live `IRuntimeBlock` references.
3140
+ */
3141
+ declare function interpolateSessionClockFrame(frame: SessionClockFrame, nowMs: number): SessionClockFrame;
3142
+ declare function projectSessionClock(runtime: IScriptRuntime | null | undefined, options?: SessionClockProjectionOptions): SessionClockFrame;
3143
+
3144
+ /**
3145
+ * LiveSessionTelemetry — single deep module projecting typed Summary Metrics
3146
+ * and round-over-round Effort split deltas from a live `IScriptRuntime`.
3147
+ *
3148
+ * Eliminates positional Label/Value pair unpacking and string-regex Metric
3149
+ * type guessing in UI callers, and produces plain serializable telemetry
3150
+ * frames ready for both browser views and the Cast frame projector.
3151
+ */
3152
+
3153
+ interface LiveSummaryMetric {
3154
+ readonly key: string;
3155
+ readonly label: string;
3156
+ readonly value: number;
3157
+ readonly unit: string;
3158
+ readonly metricType: MetricType | string;
3159
+ readonly origin?: MetricOrigin;
3160
+ }
3161
+ interface LiveRoundSplitRow {
3162
+ readonly id: string;
3163
+ readonly comparisonKey: string;
3164
+ readonly label: string;
3165
+ readonly elapsedMs: number;
3166
+ readonly round?: number;
3167
+ readonly totalRounds?: number;
3168
+ readonly deltaMs?: number;
3169
+ readonly deltaLabel?: string;
3170
+ }
3171
+ interface LiveSessionTelemetryFrame {
3172
+ readonly summaries: LiveSummaryMetric[];
3173
+ readonly splits: LiveRoundSplitRow[];
3174
+ }
3175
+ declare function projectLiveSessionTelemetry(runtime: IScriptRuntime | null | undefined): LiveSessionTelemetryFrame;
3176
+
3177
+ /**
3178
+ * ScriptOutlineProjection — projects the static authored statement tree alongside
3179
+ * the live runtime stack cursor without pre-compiling lazy JIT blocks.
3180
+ *
3181
+ * Also synthesizes a compact protocol format string (e.g. "20:00 AMRAP",
3182
+ * "3 Rounds", "21-15-9") from root statements for workout banners.
3183
+ */
3184
+
3185
+ type ScriptOutlineStatus = 'completed' | 'active' | 'upcoming';
3186
+ interface ScriptOutlineNode {
3187
+ readonly statementId: number;
3188
+ readonly depth: number;
3189
+ readonly label: string;
3190
+ readonly status: ScriptOutlineStatus;
3191
+ }
3192
+ declare function synthesizeWorkoutFormat(script: Pick<IScript, 'statements'> | null | undefined): string | undefined;
3193
+ declare function projectScriptOutline(runtime: IScriptRuntime | null | undefined): ScriptOutlineNode[];
3194
+
3195
+ export { type IAnchorValue as $, type AnalyticsContext as A, type BehaviorEventType as B, type IMemoryLocation as C, type IRuntimeBehavior as D, type EffortResolverOptions as E, type IBlockContext as F, type MetricVisibility as G, type BlockLifecycleOptions as H, type IEquipment as I, type CompletionDecision as J, type IRuntimeMemory as K, TypedMemoryReference as L, type MemoryTag as M, type MemorySearchCriteria as N, type OutputListener as O, type ProjectionResult as P, type IMemoryReference as Q, type ReferenceIndex as R, type SubscribeOptions as S, TimeSpan as T, type Unsubscribe as U, type RuntimeStackLogger as V, WhiteboardScript as W, type StackObserver as X, type StackSnapshot as Y, type StackListener as Z, MemoryTypeEnum as _, type ReferenceResolutionDefaults as a, type LiveSummaryMetric as a$, type TimerPolarity as a0, type SoundProfile as a1, type ButtonConfig as a2, type IEventHandler as a3, type HandlerScope as a4, type IScriptRuntime as a5, type TestableBlockConfig as a6, type IRuntimeOptions as a7, ScriptRuntime as a8, type EventHandlerOptions as a9, DEFAULT_SOUND_PROFILE as aA, DIM_COUNT as aB, DIM_ENERGY as aC, DIM_LENGTH as aD, DIM_MASS as aE, DIM_TIME as aF, DIM_ZERO as aG, DISCIPLINE_FACTORS as aH, type DisplayState as aI, EFFORT_DISCIPLINES as aJ, EFFORT_REGISTRY_ORIGINS as aK, type EffortBaseAttributes as aL, type EffortDerivation as aM, type EffortDiscipline as aN, type EffortMaterializer as aO, type EffortResolvedFrom as aP, type EvalContext as aQ, type FenceDialect as aR, type FragmentDisplayState as aS, type FragmentState as aT, type IAnalyticsProcessorDescriptor as aU, INTENSITY_TIERS as aV, type IScript as aW, type IntensityTier as aX, type InterceptMode as aY, type LiveRoundSplitRow as aZ, type LiveSessionTelemetryFrame as a_, type EventCallback as aa, type TimerState as ab, type CalculationDefinition as ac, type PropertyRuleInput as ad, type IRealtimeProcessor as ae, type ISummaryProcessor as af, type DimVector as ag, type CalcLine as ah, type ExprNode as ai, type CalcScope as aj, type ILookupTable as ak, LookupRegistry as al, type CalcRegistrationDiagnostic as am, ABSENT as an, type BinaryOp as ao, type ButtonVariant as ap, type ButtonsState as aq, CalcEvalError as ar, type CalcNode as as, type CalcOrigin as at, type CalcVariant as au, type ChildrenStatusState as av, type CompiledPropertySummaries as aw, type CompletionState as ax, DEFAULT_RESOLVER_OPTIONS as ay, DEFAULT_RUNTIME_OPTIONS as az, type IEffort as b, parseSoundTrigger as b$, type LookupFieldDef as b0, type LookupLayer as b1, MemoryLocation as b2, type MemoryType as b3, type MemoryTypeMap as b4, type MemoryValueOf as b5, NAMED_COMPOUNDS as b6, type ProjectedRepTarget as b7, type ProjectedSecondaryTimer as b8, type PropertySourceLayer as b9, type Val as bA, addDim as bB, compilePropertySummaryCalcs as bC, compilePropertySummaryCalcsWithDiagnostics as bD, compoundName as bE, createBrowserRuntimeNow as bF, createReferenceIndex as bG, dedupeEntitiesByPrecedence as bH, dimEquals as bI, disciplineFactorFor as bJ, evaluate as bK, extractPropertyRulesFromMeta as bL, extractStatementRefs as bM, extractTagPropertyRules as bN, filterTagsByVisibility as bO, formatDim as bP, formatSoundTrigger as bQ, frozenNow as bR, getMetricVisibility as bS, getRuntimeNowMs as bT, interpolateSessionClockFrame as bU, isDimensionless as bV, isEffortDiscipline as bW, isFragmentTag as bX, isRequiredCountdownLocked as bY, num as bZ, observeSessionClockInputs as b_, type ReferenceCatalog as ba, type ResolvedReferences as bb, type RoundState as bc, type RuntimeState as bd, SEED_PRECEDENCE_RANK as be, type ScriptOutlineNode as bf, type ScriptOutlineStatus as bg, type ScriptRuntimeDependencies as bh, type SeedPrecedenceTier as bi, type SerializedTimerSpan as bj, type SessionClockFrame as bk, type SessionClockInputSignal as bl, type SessionClockProjectionOptions as bm, type SessionExecutionStatus as bn, type SessionVisualPolarity as bo, type ShakeOutQueueOptions as bp, type ShakeOutResult as bq, type SkippedDependencyDiagnostic as br, type SoundRule as bs, type SoundTriggerAnchor as bt, type SoundTriggerPoint as bu, type StackEvent as bv, type StackedDashboardWidgetDescriptor as bw, type TimerDirection as bx, VISIBILITY_ICONS as by, VISIBILITY_LABELS as bz, type IEffortResolver as c, projectLiveSessionTelemetry as c0, projectScriptOutline as c1, projectSessionClock as c2, resolveEntityRank as c3, resolveEntityTier as c4, resolveProfileRules as c5, resolvePropertyDashboardWidgets as c6, resolveSourceRank as c7, resolveSourceTier as c8, resolveVisualPolarity as c9, runMetricShakeOutQueue as ca, slugifyRefLabel as cb, str as cc, subDim as cd, synthesizeWorkoutFormat as ce, truthy as cf, wallClockNow as cg, type IEffortRegistry as d, type EffortResolutionOptions as e, type ResolvedEffort as f, type EffortRegistrySource as g, type IEquipmentRegistry as h, type EquipmentStorageAdapter as i, type EffortStorageAdapter as j, type IRuntimeActionable as k, type IEventBus as l, type IRuntimeStack as m, type IRuntimeClock as n, type IJitCompiler as o, type INowProvider as p, type RuntimeStackOptions as q, type RuntimeError as r, type IEvent as s, type IRuntimeAction as t, type IAnalyticsEngine as u, type IRuntimeBlock as v, type IBehaviorContext as w, type BehaviorEventListener as x, type Unsubscribe$1 as y, type OutputOptions as z };
@@ -2587,6 +2587,10 @@ interface IAnalyticsEngine {
2587
2587
  * of the final values happens once via {@link finalize}.
2588
2588
  */
2589
2589
  setLiveOutputEmitter(emit: (outputs: IOutputStatement[]) => void): void;
2590
+ /** Optional runtime clock source for deterministic projection timestamps. */
2591
+ setNowProvider?(now: INowProvider): void;
2592
+ /** Current typed live Summary Metric projections (display-only, never persisted). */
2593
+ getLiveProjections?(): readonly ProjectionResult[];
2590
2594
  /** Run enrichment on a single output, then fire live projection update */
2591
2595
  run(output: IOutputStatement): IOutputStatement;
2592
2596
  /** Final projection pass — returns analytics output statements for summary */
@@ -2694,6 +2698,8 @@ interface IScriptRuntime extends IRuntimeActionable {
2694
2698
  * call it defensively (`runtime.getLiveAnalytics?.()`).
2695
2699
  */
2696
2700
  getLiveAnalytics?(): IOutputStatement[];
2701
+ /** Typed live Summary Metric projections from the attached AnalyticsEngine. */
2702
+ getLiveProjections?(): readonly ProjectionResult[];
2697
2703
  /**
2698
2704
  * Add an output statement to the collection and notify subscribers.
2699
2705
  * Used by BehaviorContext to emit outputs at any lifecycle point.
@@ -2810,6 +2816,7 @@ declare class ScriptRuntime implements IScriptRuntime {
2810
2816
  * Ephemeral Tier-2 (running-total) snapshot for live display; never persisted.
2811
2817
  */
2812
2818
  getLiveAnalytics(): IOutputStatement[];
2819
+ getLiveProjections(): readonly ProjectionResult[];
2813
2820
  /**
2814
2821
  * Add an output statement to the collection and notify subscribers.
2815
2822
  * Used by BehaviorContext to emit outputs at any lifecycle point.
@@ -2854,6 +2861,7 @@ declare class ScriptRuntime implements IScriptRuntime {
2854
2861
  * Timer direction for count-down vs count-up.
2855
2862
  */
2856
2863
  type TimerDirection = 'up' | 'down';
2864
+ type TimerPolarity = 'work' | 'rest';
2857
2865
  /**
2858
2866
  * Timer state stored in block memory.
2859
2867
  *
@@ -2876,6 +2884,10 @@ interface TimerState {
2876
2884
  readonly label: string;
2877
2885
  /** Timer role for UI prioritization */
2878
2886
  readonly role?: 'primary' | 'secondary' | 'auto' | 'hidden';
2887
+ /** True when user Next cannot skip this countdown before expiry. */
2888
+ readonly required?: boolean;
2889
+ /** Semantic polarity for Work vs Rest visual and priority handling. */
2890
+ readonly polarity?: TimerPolarity;
2879
2891
  }
2880
2892
  /**
2881
2893
  * Round state stored in memory.
@@ -3033,4 +3045,151 @@ declare function getRuntimeNowMs(): number;
3033
3045
  /** Creates an INowProvider that reads the browser sender-clock when available. */
3034
3046
  declare function createBrowserRuntimeNow(): INowProvider;
3035
3047
 
3036
- export { type SoundProfile as $, type AnalyticsContext as A, type BehaviorEventType as B, type IMemoryLocation as C, type IRuntimeBehavior as D, type EffortResolverOptions as E, type IBlockContext as F, type MetricVisibility as G, type BlockLifecycleOptions as H, type IEquipment as I, type CompletionDecision as J, type IRuntimeMemory as K, TypedMemoryReference as L, type MemoryTag as M, type MemorySearchCriteria as N, type OutputListener as O, type IMemoryReference as P, type RuntimeStackLogger as Q, type ReferenceIndex as R, type SubscribeOptions as S, TimeSpan as T, type Unsubscribe as U, type StackObserver as V, WhiteboardScript as W, type StackSnapshot as X, type StackListener as Y, MemoryTypeEnum as Z, type IAnchorValue as _, type ReferenceResolutionDefaults as a, type MemoryType as a$, type ButtonConfig as a0, type IEventHandler as a1, type HandlerScope as a2, type IScriptRuntime as a3, type TestableBlockConfig as a4, type IRuntimeOptions as a5, ScriptRuntime as a6, type EventHandlerOptions as a7, type EventCallback as a8, type TimerState as a9, DIM_COUNT as aA, DIM_ENERGY as aB, DIM_LENGTH as aC, DIM_MASS as aD, DIM_TIME as aE, DIM_ZERO as aF, DISCIPLINE_FACTORS as aG, type DisplayState as aH, EFFORT_DISCIPLINES as aI, EFFORT_REGISTRY_ORIGINS as aJ, type EffortBaseAttributes as aK, type EffortDerivation as aL, type EffortDiscipline as aM, type EffortMaterializer as aN, type EffortResolvedFrom as aO, type EvalContext as aP, type FenceDialect as aQ, type FragmentDisplayState as aR, type FragmentState as aS, type IAnalyticsProcessorDescriptor as aT, INTENSITY_TIERS as aU, type IScript as aV, type IntensityTier as aW, type InterceptMode as aX, type LookupFieldDef as aY, type LookupLayer as aZ, MemoryLocation as a_, type CalculationDefinition as aa, type PropertyRuleInput as ab, type IRealtimeProcessor as ac, type ISummaryProcessor as ad, type DimVector as ae, type CalcLine as af, type ExprNode as ag, type CalcScope as ah, type ILookupTable as ai, LookupRegistry as aj, type CalcRegistrationDiagnostic as ak, type ProjectionResult as al, ABSENT as am, type BinaryOp as an, type ButtonVariant as ao, type ButtonsState as ap, CalcEvalError as aq, type CalcNode as ar, type CalcOrigin as as, type CalcVariant as at, type ChildrenStatusState as au, type CompiledPropertySummaries as av, type CompletionState as aw, DEFAULT_RESOLVER_OPTIONS as ax, DEFAULT_RUNTIME_OPTIONS as ay, DEFAULT_SOUND_PROFILE as az, type IEffort as b, type MemoryTypeMap as b0, type MemoryValueOf as b1, NAMED_COMPOUNDS as b2, type PropertySourceLayer as b3, type ReferenceCatalog as b4, type ResolvedReferences as b5, type RoundState as b6, type RuntimeState as b7, SEED_PRECEDENCE_RANK as b8, type ScriptRuntimeDependencies as b9, filterTagsByVisibility as bA, formatDim as bB, formatSoundTrigger as bC, frozenNow as bD, getMetricVisibility as bE, getRuntimeNowMs as bF, isDimensionless as bG, isEffortDiscipline as bH, isFragmentTag as bI, num as bJ, parseSoundTrigger as bK, resolveEntityRank as bL, resolveEntityTier as bM, resolveProfileRules as bN, resolvePropertyDashboardWidgets as bO, resolveSourceRank as bP, resolveSourceTier as bQ, runMetricShakeOutQueue as bR, slugifyRefLabel as bS, str as bT, subDim as bU, truthy as bV, wallClockNow as bW, type SeedPrecedenceTier as ba, type ShakeOutQueueOptions as bb, type ShakeOutResult as bc, type SkippedDependencyDiagnostic as bd, type SoundRule as be, type SoundTriggerAnchor as bf, type SoundTriggerPoint as bg, type StackEvent as bh, type StackedDashboardWidgetDescriptor as bi, type TimerDirection as bj, VISIBILITY_ICONS as bk, VISIBILITY_LABELS as bl, type Val as bm, addDim as bn, compilePropertySummaryCalcs as bo, compilePropertySummaryCalcsWithDiagnostics as bp, compoundName as bq, createBrowserRuntimeNow as br, createReferenceIndex as bs, dedupeEntitiesByPrecedence as bt, dimEquals as bu, disciplineFactorFor as bv, evaluate as bw, extractPropertyRulesFromMeta as bx, extractStatementRefs as by, extractTagPropertyRules as bz, type IEffortResolver as c, type IEffortRegistry as d, type EffortResolutionOptions as e, type ResolvedEffort as f, type EffortRegistrySource as g, type IEquipmentRegistry as h, type EquipmentStorageAdapter as i, type EffortStorageAdapter as j, type IRuntimeActionable as k, type IEventBus as l, type IRuntimeStack as m, type IRuntimeClock as n, type IJitCompiler as o, type INowProvider as p, type RuntimeStackOptions as q, type RuntimeError as r, type IEvent as s, type IRuntimeAction as t, type IAnalyticsEngine as u, type IRuntimeBlock as v, type IBehaviorContext as w, type BehaviorEventListener as x, type Unsubscribe$1 as y, type OutputOptions as z };
3048
+ /**
3049
+ * SessionClockProjection — single deep module projecting live clock state,
3050
+ * semantic Work/Rest/Final5/Paused/Overrun polarity, required skip-lock
3051
+ * visibility, deduplicated secondary timers, immediate lookahead, and Effort
3052
+ * rep targets from an `IScriptRuntime`.
3053
+ *
3054
+ * Pure and DOM-free: runs identically in Tier 1 engine tests, browser React
3055
+ * views (Minimal, General, Detail), and the Cast frame projector.
3056
+ */
3057
+
3058
+ type SessionVisualPolarity = 'work' | 'rest' | 'final5' | 'paused' | 'overrun';
3059
+ type SessionExecutionStatus = 'idle' | 'running' | 'paused' | 'completed';
3060
+ interface SerializedTimerSpan {
3061
+ readonly started: number;
3062
+ readonly ended?: number;
3063
+ }
3064
+ interface ProjectedSecondaryTimer {
3065
+ readonly id: string;
3066
+ readonly label: string;
3067
+ readonly displayMs: number;
3068
+ readonly direction: TimerDirection;
3069
+ readonly durationMs?: number;
3070
+ readonly spans: readonly SerializedTimerSpan[];
3071
+ }
3072
+ interface ProjectedRepTarget {
3073
+ readonly occurrenceId: string;
3074
+ readonly blockKey: string;
3075
+ readonly sourceId?: number;
3076
+ readonly label: string;
3077
+ readonly target: number | null;
3078
+ readonly actual: number | null;
3079
+ }
3080
+ interface SessionClockFrame {
3081
+ readonly mainLabel: string;
3082
+ readonly subLabels?: string[];
3083
+ readonly displayMs: number;
3084
+ readonly direction: TimerDirection;
3085
+ readonly durationMs?: number;
3086
+ readonly activeSpans: readonly SerializedTimerSpan[];
3087
+ readonly basePolarity: TimerPolarity;
3088
+ readonly required: boolean;
3089
+ readonly sessionElapsedMs: number;
3090
+ readonly sessionSpans: readonly SerializedTimerSpan[];
3091
+ readonly polarity: SessionVisualPolarity;
3092
+ readonly isRequiredLockActive: boolean;
3093
+ readonly roundCurrent?: number;
3094
+ readonly roundTotal?: number;
3095
+ readonly roundLabel?: string;
3096
+ readonly secondaryTimers: ProjectedSecondaryTimer[];
3097
+ readonly upNext: string | null;
3098
+ readonly repTargets: ProjectedRepTarget[];
3099
+ readonly isRunning: boolean;
3100
+ readonly isPaused: boolean;
3101
+ readonly isNextDisabled: boolean;
3102
+ readonly skipFlash: boolean;
3103
+ readonly skipFlashKey: number;
3104
+ }
3105
+ interface SessionClockProjectionOptions {
3106
+ readonly nowMs?: number;
3107
+ readonly executionStatus?: SessionExecutionStatus;
3108
+ readonly canNextOverride?: boolean;
3109
+ readonly skipFlash?: boolean;
3110
+ readonly skipFlashKey?: number;
3111
+ }
3112
+ declare function resolveVisualPolarity(params: {
3113
+ readonly isPaused: boolean;
3114
+ readonly basePolarity: TimerPolarity;
3115
+ readonly direction: TimerDirection;
3116
+ readonly durationMs?: number;
3117
+ readonly displayMs: number;
3118
+ }): SessionVisualPolarity;
3119
+ declare function isRequiredCountdownLocked(params: {
3120
+ readonly isPaused: boolean;
3121
+ readonly required: boolean;
3122
+ readonly direction: TimerDirection;
3123
+ readonly durationMs?: number;
3124
+ readonly displayMs: number;
3125
+ }): boolean;
3126
+ interface SessionClockInputSignal {
3127
+ readonly skipFlash: boolean;
3128
+ readonly skipFlashKey: number;
3129
+ }
3130
+ /**
3131
+ * Shared runtime observer for stack changes, block memory mutations, and 3s
3132
+ * `timer:skip-attempt` flashes. Reused by both React (`useSessionClockProjection`)
3133
+ * and Cast (`SessionCastProjector`).
3134
+ */
3135
+ declare function observeSessionClockInputs(runtime: IScriptRuntime, onChange: (signal: SessionClockInputSignal) => void): () => void;
3136
+ /**
3137
+ * Pure span-based frame interpolation. Used by the stateless Cast receiver and
3138
+ * local animation loops to advance clock digits and polarity at 60fps without
3139
+ * holding live `IRuntimeBlock` references.
3140
+ */
3141
+ declare function interpolateSessionClockFrame(frame: SessionClockFrame, nowMs: number): SessionClockFrame;
3142
+ declare function projectSessionClock(runtime: IScriptRuntime | null | undefined, options?: SessionClockProjectionOptions): SessionClockFrame;
3143
+
3144
+ /**
3145
+ * LiveSessionTelemetry — single deep module projecting typed Summary Metrics
3146
+ * and round-over-round Effort split deltas from a live `IScriptRuntime`.
3147
+ *
3148
+ * Eliminates positional Label/Value pair unpacking and string-regex Metric
3149
+ * type guessing in UI callers, and produces plain serializable telemetry
3150
+ * frames ready for both browser views and the Cast frame projector.
3151
+ */
3152
+
3153
+ interface LiveSummaryMetric {
3154
+ readonly key: string;
3155
+ readonly label: string;
3156
+ readonly value: number;
3157
+ readonly unit: string;
3158
+ readonly metricType: MetricType | string;
3159
+ readonly origin?: MetricOrigin;
3160
+ }
3161
+ interface LiveRoundSplitRow {
3162
+ readonly id: string;
3163
+ readonly comparisonKey: string;
3164
+ readonly label: string;
3165
+ readonly elapsedMs: number;
3166
+ readonly round?: number;
3167
+ readonly totalRounds?: number;
3168
+ readonly deltaMs?: number;
3169
+ readonly deltaLabel?: string;
3170
+ }
3171
+ interface LiveSessionTelemetryFrame {
3172
+ readonly summaries: LiveSummaryMetric[];
3173
+ readonly splits: LiveRoundSplitRow[];
3174
+ }
3175
+ declare function projectLiveSessionTelemetry(runtime: IScriptRuntime | null | undefined): LiveSessionTelemetryFrame;
3176
+
3177
+ /**
3178
+ * ScriptOutlineProjection — projects the static authored statement tree alongside
3179
+ * the live runtime stack cursor without pre-compiling lazy JIT blocks.
3180
+ *
3181
+ * Also synthesizes a compact protocol format string (e.g. "20:00 AMRAP",
3182
+ * "3 Rounds", "21-15-9") from root statements for workout banners.
3183
+ */
3184
+
3185
+ type ScriptOutlineStatus = 'completed' | 'active' | 'upcoming';
3186
+ interface ScriptOutlineNode {
3187
+ readonly statementId: number;
3188
+ readonly depth: number;
3189
+ readonly label: string;
3190
+ readonly status: ScriptOutlineStatus;
3191
+ }
3192
+ declare function synthesizeWorkoutFormat(script: Pick<IScript, 'statements'> | null | undefined): string | undefined;
3193
+ declare function projectScriptOutline(runtime: IScriptRuntime | null | undefined): ScriptOutlineNode[];
3194
+
3195
+ export { type IAnchorValue as $, type AnalyticsContext as A, type BehaviorEventType as B, type IMemoryLocation as C, type IRuntimeBehavior as D, type EffortResolverOptions as E, type IBlockContext as F, type MetricVisibility as G, type BlockLifecycleOptions as H, type IEquipment as I, type CompletionDecision as J, type IRuntimeMemory as K, TypedMemoryReference as L, type MemoryTag as M, type MemorySearchCriteria as N, type OutputListener as O, type ProjectionResult as P, type IMemoryReference as Q, type ReferenceIndex as R, type SubscribeOptions as S, TimeSpan as T, type Unsubscribe as U, type RuntimeStackLogger as V, WhiteboardScript as W, type StackObserver as X, type StackSnapshot as Y, type StackListener as Z, MemoryTypeEnum as _, type ReferenceResolutionDefaults as a, type LiveSummaryMetric as a$, type TimerPolarity as a0, type SoundProfile as a1, type ButtonConfig as a2, type IEventHandler as a3, type HandlerScope as a4, type IScriptRuntime as a5, type TestableBlockConfig as a6, type IRuntimeOptions as a7, ScriptRuntime as a8, type EventHandlerOptions as a9, DEFAULT_SOUND_PROFILE as aA, DIM_COUNT as aB, DIM_ENERGY as aC, DIM_LENGTH as aD, DIM_MASS as aE, DIM_TIME as aF, DIM_ZERO as aG, DISCIPLINE_FACTORS as aH, type DisplayState as aI, EFFORT_DISCIPLINES as aJ, EFFORT_REGISTRY_ORIGINS as aK, type EffortBaseAttributes as aL, type EffortDerivation as aM, type EffortDiscipline as aN, type EffortMaterializer as aO, type EffortResolvedFrom as aP, type EvalContext as aQ, type FenceDialect as aR, type FragmentDisplayState as aS, type FragmentState as aT, type IAnalyticsProcessorDescriptor as aU, INTENSITY_TIERS as aV, type IScript as aW, type IntensityTier as aX, type InterceptMode as aY, type LiveRoundSplitRow as aZ, type LiveSessionTelemetryFrame as a_, type EventCallback as aa, type TimerState as ab, type CalculationDefinition as ac, type PropertyRuleInput as ad, type IRealtimeProcessor as ae, type ISummaryProcessor as af, type DimVector as ag, type CalcLine as ah, type ExprNode as ai, type CalcScope as aj, type ILookupTable as ak, LookupRegistry as al, type CalcRegistrationDiagnostic as am, ABSENT as an, type BinaryOp as ao, type ButtonVariant as ap, type ButtonsState as aq, CalcEvalError as ar, type CalcNode as as, type CalcOrigin as at, type CalcVariant as au, type ChildrenStatusState as av, type CompiledPropertySummaries as aw, type CompletionState as ax, DEFAULT_RESOLVER_OPTIONS as ay, DEFAULT_RUNTIME_OPTIONS as az, type IEffort as b, parseSoundTrigger as b$, type LookupFieldDef as b0, type LookupLayer as b1, MemoryLocation as b2, type MemoryType as b3, type MemoryTypeMap as b4, type MemoryValueOf as b5, NAMED_COMPOUNDS as b6, type ProjectedRepTarget as b7, type ProjectedSecondaryTimer as b8, type PropertySourceLayer as b9, type Val as bA, addDim as bB, compilePropertySummaryCalcs as bC, compilePropertySummaryCalcsWithDiagnostics as bD, compoundName as bE, createBrowserRuntimeNow as bF, createReferenceIndex as bG, dedupeEntitiesByPrecedence as bH, dimEquals as bI, disciplineFactorFor as bJ, evaluate as bK, extractPropertyRulesFromMeta as bL, extractStatementRefs as bM, extractTagPropertyRules as bN, filterTagsByVisibility as bO, formatDim as bP, formatSoundTrigger as bQ, frozenNow as bR, getMetricVisibility as bS, getRuntimeNowMs as bT, interpolateSessionClockFrame as bU, isDimensionless as bV, isEffortDiscipline as bW, isFragmentTag as bX, isRequiredCountdownLocked as bY, num as bZ, observeSessionClockInputs as b_, type ReferenceCatalog as ba, type ResolvedReferences as bb, type RoundState as bc, type RuntimeState as bd, SEED_PRECEDENCE_RANK as be, type ScriptOutlineNode as bf, type ScriptOutlineStatus as bg, type ScriptRuntimeDependencies as bh, type SeedPrecedenceTier as bi, type SerializedTimerSpan as bj, type SessionClockFrame as bk, type SessionClockInputSignal as bl, type SessionClockProjectionOptions as bm, type SessionExecutionStatus as bn, type SessionVisualPolarity as bo, type ShakeOutQueueOptions as bp, type ShakeOutResult as bq, type SkippedDependencyDiagnostic as br, type SoundRule as bs, type SoundTriggerAnchor as bt, type SoundTriggerPoint as bu, type StackEvent as bv, type StackedDashboardWidgetDescriptor as bw, type TimerDirection as bx, VISIBILITY_ICONS as by, VISIBILITY_LABELS as bz, type IEffortResolver as c, projectLiveSessionTelemetry as c0, projectScriptOutline as c1, projectSessionClock as c2, resolveEntityRank as c3, resolveEntityTier as c4, resolveProfileRules as c5, resolvePropertyDashboardWidgets as c6, resolveSourceRank as c7, resolveSourceTier as c8, resolveVisualPolarity as c9, runMetricShakeOutQueue as ca, slugifyRefLabel as cb, str as cc, subDim as cd, synthesizeWorkoutFormat as ce, truthy as cf, wallClockNow as cg, type IEffortRegistry as d, type EffortResolutionOptions as e, type ResolvedEffort as f, type EffortRegistrySource as g, type IEquipmentRegistry as h, type EquipmentStorageAdapter as i, type EffortStorageAdapter as j, type IRuntimeActionable as k, type IEventBus as l, type IRuntimeStack as m, type IRuntimeClock as n, type IJitCompiler as o, type INowProvider as p, type RuntimeStackOptions as q, type RuntimeError as r, type IEvent as s, type IRuntimeAction as t, type IAnalyticsEngine as u, type IRuntimeBlock as v, type IBehaviorContext as w, type BehaviorEventListener as x, type Unsubscribe$1 as y, type OutputOptions as z };