@bitcobblers/wod-wiki-lang 0.45.2167 → 0.46.2168

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.
package/dist/index.d.cts CHANGED
@@ -1,7 +1,7 @@
1
1
  import { IMetric, MetricContainer, MetricOrigin, MetricType, IDialect, ICodeStatement, DialectAnalysis, TagIndex, ParsedCodeStatement, TagMetricContribution, IOutputStatement, OutputStatementType, BlockKey, TagReferenceMetadata, ScriptBlock, FenceDialect, Segment, AnalyticsGroup, StoredOutputStatement, OutputStatement } from '@bitcobblers/wod-wiki-core';
2
2
  export { ParseError } from '@bitcobblers/wod-wiki-core';
3
- import { R as ReferenceIndex, a as ReferenceResolutionDefaults, W as WhiteboardScript, I as IEquipment, b as IEffort, c as IEffortResolver, d as IEffortRegistry, E as EffortResolverOptions, e as EffortResolutionOptions, f as ResolvedEffort, g as EffortRegistrySource, h as EffortStorageAdapter, i as IRuntimeActionable, j as IEventBus, k as IRuntimeStack, l as IRuntimeClock, m as IJitCompiler, n as INowProvider, o as RuntimeStackOptions, p as RuntimeError, A as AnalyticsContext, q as IEvent, r as IRuntimeAction, O as OutputListener, U as Unsubscribe, s as IAnalyticsEngine, t as IRuntimeBlock, u as IBehaviorContext, B as BehaviorEventType, v as BehaviorEventListener, S as SubscribeOptions, w as Unsubscribe$1, x as OutputOptions, M as MemoryTag, y as IMemoryLocation, z as IRuntimeBehavior, C as IBlockContext, D as MetricVisibility, F as BlockLifecycleOptions, G as CompletionDecision, T as TimeSpan, H as IRuntimeMemory, J as TypedMemoryReference, K as MemorySearchCriteria, L as IMemoryReference, N as RuntimeStackLogger, P as StackObserver, Q as StackSnapshot, V as StackListener, X as MemoryTypeEnum, Y as IAnchorValue, Z as SoundProfile, _ as ButtonConfig, $ as IEventHandler, a0 as HandlerScope, a1 as IScriptRuntime, a2 as TestableBlockConfig, a3 as IRuntimeOptions, a4 as ScriptRuntime, a5 as EventHandlerOptions, a6 as EventCallback, a7 as TimerState, a8 as CalculationDefinition$1, a9 as IRealtimeProcessor, aa as ISummaryProcessor, ab as ProjectionResult, ac as DimVector, ad as CalcLine, ae as ExprNode, af as CalcScope } from './browserRuntimeNow-CnGciOM0.cjs';
4
- export { ag as BinaryOp, ah as ButtonVariant, ai as ButtonsState, aj as CalcNode, ak as CalcOrigin, al as CalcVariant, am as ChildrenStatusState, an as CompletionState, ao as DEFAULT_RESOLVER_OPTIONS, ap as DEFAULT_RUNTIME_OPTIONS, aq as DEFAULT_SOUND_PROFILE, ar as DIM_COUNT, as as DIM_ENERGY, at as DIM_LENGTH, au as DIM_MASS, av as DIM_TIME, aw as DIM_ZERO, ax as DISCIPLINE_FACTORS, ay as DisplayState, az as EFFORT_DISCIPLINES, aA as EFFORT_REGISTRY_ORIGINS, aB as EffortBaseAttributes, aC as EffortDerivation, aD as EffortDiscipline, aE as EffortMaterializer, aF as EffortResolvedFrom, aG as EquipmentStorageAdapter, aH as FenceDialect, aI as FragmentDisplayState, aJ as FragmentState, aK as IAnalyticsProcessorDescriptor, aL as IEquipmentRegistry, aM as INTENSITY_TIERS, aN as IScript, aO as IntensityTier, aP as InterceptMode, aQ as MemoryLocation, aR as MemoryType, aS as MemoryTypeMap, aT as MemoryValueOf, aU as NAMED_COMPOUNDS, aV as ReferenceCatalog, aW as ResolvedReferences, aX as RoundState, aY as RuntimeState, aZ as SEED_PRECEDENCE_RANK, a_ as ScriptRuntimeDependencies, a$ as SeedPrecedenceTier, b0 as SoundRule, b1 as SoundTriggerAnchor, b2 as SoundTriggerPoint, b3 as StackEvent, b4 as TimerDirection, b5 as VISIBILITY_ICONS, b6 as VISIBILITY_LABELS, b7 as addDim, b8 as compoundName, b9 as createBrowserRuntimeNow, ba as createReferenceIndex, bb as dedupeEntitiesByPrecedence, bc as dimEquals, bd as disciplineFactorFor, be as extractStatementRefs, bf as filterTagsByVisibility, bg as formatDim, bh as formatSoundTrigger, bi as frozenNow, bj as getMetricVisibility, bk as getRuntimeNowMs, bl as isDimensionless, bm as isEffortDiscipline, bn as isFragmentTag, bo as parseSoundTrigger, bp as resolveEntityRank, bq as resolveEntityTier, br as resolveProfileRules, bs as resolveSourceRank, bt as resolveSourceTier, bu as slugifyRefLabel, bv as subDim, bw as wallClockNow } from './browserRuntimeNow-CnGciOM0.cjs';
3
+ import { R as ReferenceIndex, a as ReferenceResolutionDefaults, W as WhiteboardScript, I as IEquipment, b as IEffort, c as IEffortResolver, d as IEffortRegistry, E as EffortResolverOptions, e as EffortResolutionOptions, f as ResolvedEffort, g as EffortRegistrySource, h as IEquipmentRegistry, i as EquipmentStorageAdapter, j as EffortStorageAdapter, k as IRuntimeActionable, l as IEventBus, m as IRuntimeStack, n as IRuntimeClock, o as IJitCompiler, p as INowProvider, q as RuntimeStackOptions, r as RuntimeError, A as AnalyticsContext, s as IEvent, t as IRuntimeAction, O as OutputListener, U as Unsubscribe, u as IAnalyticsEngine, v as IRuntimeBlock, w as IBehaviorContext, B as BehaviorEventType, x as BehaviorEventListener, S as SubscribeOptions, y as Unsubscribe$1, z as OutputOptions, M as MemoryTag, C as IMemoryLocation, D as IRuntimeBehavior, F as IBlockContext, G as MetricVisibility, H as BlockLifecycleOptions, J as CompletionDecision, T as TimeSpan, K as IRuntimeMemory, L as TypedMemoryReference, N as MemorySearchCriteria, P as IMemoryReference, Q as RuntimeStackLogger, V as StackObserver, X as StackSnapshot, Y as StackListener, Z as MemoryTypeEnum, _ as IAnchorValue, $ as SoundProfile, a0 as ButtonConfig, a1 as IEventHandler, a2 as HandlerScope, a3 as IScriptRuntime, a4 as TestableBlockConfig, a5 as IRuntimeOptions, a6 as ScriptRuntime, a7 as EventHandlerOptions, a8 as EventCallback, a9 as TimerState, aa as DimVector, ab as ExprNode, ac as CalculationDefinition, ad as IRealtimeProcessor, ae as ISummaryProcessor, af as CalcLine, ag as CalcScope, ah as ProjectionResult } from './browserRuntimeNow-BpEYjit5.cjs';
4
+ export { ai as BinaryOp, aj as ButtonVariant, ak as ButtonsState, al as CalcNode, am as CalcOrigin, an as CalcVariant, ao as ChildrenStatusState, ap as CompletionState, aq as DEFAULT_RESOLVER_OPTIONS, ar as DEFAULT_RUNTIME_OPTIONS, as as DEFAULT_SOUND_PROFILE, at as DIM_COUNT, au as DIM_ENERGY, av as DIM_LENGTH, aw as DIM_MASS, ax as DIM_TIME, ay as DIM_ZERO, az as DISCIPLINE_FACTORS, aA as DisplayState, aB as EFFORT_DISCIPLINES, aC as EFFORT_REGISTRY_ORIGINS, aD as EffortBaseAttributes, aE as EffortDerivation, aF as EffortDiscipline, aG as EffortMaterializer, aH as EffortResolvedFrom, aI as FenceDialect, aJ as FragmentDisplayState, aK as FragmentState, aL as IAnalyticsProcessorDescriptor, aM as INTENSITY_TIERS, aN as IScript, aO as IntensityTier, aP as InterceptMode, aQ as MemoryLocation, aR as MemoryType, aS as MemoryTypeMap, aT as MemoryValueOf, aU as NAMED_COMPOUNDS, aV as ReferenceCatalog, aW as ResolvedReferences, aX as RoundState, aY as RuntimeState, aZ as SEED_PRECEDENCE_RANK, a_ as ScriptRuntimeDependencies, a$ as SeedPrecedenceTier, b0 as SoundRule, b1 as SoundTriggerAnchor, b2 as SoundTriggerPoint, b3 as StackEvent, b4 as TimerDirection, b5 as VISIBILITY_ICONS, b6 as VISIBILITY_LABELS, b7 as addDim, b8 as compoundName, b9 as createBrowserRuntimeNow, ba as createReferenceIndex, bb as dedupeEntitiesByPrecedence, bc as dimEquals, bd as disciplineFactorFor, be as extractStatementRefs, bf as filterTagsByVisibility, bg as formatDim, bh as formatSoundTrigger, bi as frozenNow, bj as getMetricVisibility, bk as getRuntimeNowMs, bl as isDimensionless, bm as isEffortDiscipline, bn as isFragmentTag, bo as parseSoundTrigger, bp as resolveEntityRank, bq as resolveEntityTier, br as resolveProfileRules, bs as resolveSourceRank, bt as resolveSourceTier, bu as slugifyRefLabel, bv as subDim, bw as wallClockNow } from './browserRuntimeNow-BpEYjit5.cjs';
5
5
  import { Tree } from '@lezer/common';
6
6
  import { LanguageSupport, LRLanguage } from '@codemirror/language';
7
7
  import { CompletionSource, Completion } from '@codemirror/autocomplete';
@@ -966,6 +966,34 @@ declare function documentToEquipment(doc: string, baseEquipment?: IEquipment): E
966
966
  * sourceId/sourcePath) are never serialized as YAML.
967
967
  */
968
968
  declare function equipmentToDocument(equipment: IEquipment): string;
969
+ interface TagPropertyDocument {
970
+ id: string;
971
+ slug: string;
972
+ label: string;
973
+ category: string;
974
+ aliases: string[];
975
+ metrics: Record<string, string | number | readonly string[]>;
976
+ summaries: Record<string, string>;
977
+ tags: string[];
978
+ functions: string[];
979
+ body?: string;
980
+ }
981
+ interface TagParseResult {
982
+ tag: TagPropertyDocument;
983
+ errors: string[];
984
+ }
985
+ declare function documentToTag(doc: string, defaultCategory?: string): TagParseResult;
986
+ declare function tagToDocument(tag: TagPropertyDocument): string;
987
+ interface TagCategoryPropertyDocument {
988
+ id?: string;
989
+ name: string;
990
+ label: string;
991
+ color?: string;
992
+ metrics?: Record<string, string | number>;
993
+ summaries?: Record<string, string>;
994
+ body?: string;
995
+ }
996
+ declare function tagCategoryToDocument(category: TagCategoryPropertyDocument): string;
969
997
 
970
998
  /**
971
999
  * Effort Resolver — Analytics Boundary
@@ -1025,46 +1053,60 @@ declare class InMemoryEffortRegistry implements IEffortRegistry {
1025
1053
  delete(slug: string): Promise<void>;
1026
1054
  }
1027
1055
 
1056
+ interface PropertyEntity {
1057
+ id: string;
1058
+ slug: string;
1059
+ label: string;
1060
+ aliases: string[];
1061
+ registrySource: 'bundled' | 'user' | 'synthetic-unresolved';
1062
+ sourceId?: string;
1063
+ }
1064
+ interface PropertyStorageAdapter<T extends PropertyEntity> {
1065
+ load(): Promise<T[]>;
1066
+ save(entity: T): Promise<void>;
1067
+ delete(slug: string): Promise<void>;
1068
+ }
1069
+ /**
1070
+ * Generic two-tier Property Note registry (bundled seed tier + user custom tier).
1071
+ * User definitions layer over bundled definitions of the same slug; lookups
1072
+ * run in O(1) by slug and normalized alias.
1073
+ */
1074
+ declare class CompositePropertyRegistry<T extends PropertyEntity> {
1075
+ protected readonly userItems: Map<string, T>;
1076
+ protected readonly bundledItems: Map<string, T>;
1077
+ protected initialized: boolean;
1078
+ protected readonly initialBundled?: Iterable<T>;
1079
+ protected readonly storage?: PropertyStorageAdapter<T>;
1080
+ constructor(options?: {
1081
+ bundled?: Iterable<T>;
1082
+ storage?: PropertyStorageAdapter<T>;
1083
+ });
1084
+ loadBundled(customBundled?: Iterable<T>): Promise<void>;
1085
+ isInitialized(): boolean;
1086
+ resolve(slug: string): T | null;
1087
+ resolveByAlias(label: string): T | null;
1088
+ list(): readonly T[];
1089
+ listByOrigin(origin: 'bundled' | 'user'): readonly T[];
1090
+ upsert(item: T): Promise<void>;
1091
+ delete(slug: string): Promise<void>;
1092
+ }
1093
+ declare class CompositeEquipmentRegistry extends CompositePropertyRegistry<IEquipment> implements IEquipmentRegistry {
1094
+ constructor(options?: {
1095
+ storage?: EquipmentStorageAdapter;
1096
+ });
1097
+ }
1098
+
1028
1099
  interface CompositeEffortRegistryOptions {
1029
1100
  /** Custom bundled efforts to seed the read-only tier (defaults to built-in bundled efforts). */
1030
1101
  bundled?: Iterable<IEffort>;
1031
1102
  /** Optional persistence adapter for user-defined efforts. */
1032
1103
  storage?: EffortStorageAdapter;
1033
1104
  }
1034
- /**
1035
- * Composite Effort Registry — Two-Tier Lookup
1036
- *
1037
- * 1. User tier: loaded from storage adapter into memory
1038
- * 2. Bundled tier: shipped as read-only seed
1039
- *
1040
- * Lookup order: user wins over bundled.
1041
- * All lookups are O(1) in-memory after initialization.
1042
- */
1043
- declare class CompositeEffortRegistry implements IEffortRegistry {
1044
- private readonly userEfforts;
1045
- private readonly bundledEfforts;
1046
- private initialized;
1047
- private readonly initialBundled?;
1048
- private readonly storage?;
1105
+ declare class CompositeEffortRegistry extends CompositePropertyRegistry<IEffort> implements IEffortRegistry {
1049
1106
  constructor(options?: CompositeEffortRegistryOptions);
1050
- /**
1051
- * Initialize the registry:
1052
- * 1. Load bundled efforts into memory
1053
- * 2. Load user efforts from storage adapter into memory
1054
- *
1055
- * An explicit `customBundled` REPLACES the bundled tier — passing an empty
1056
- * set clears it — so a seed source removal never leaves stale bundled
1057
- * efforts cached. The no-argument call keeps the constructor/default set.
1058
- * Both tiers rebuild only AFTER a successful adapter load: a failed load
1059
- * propagates (readiness must never report over stale data), and deleted
1060
- * custom rows disappear because the user map is cleared too.
1061
- */
1062
1107
  loadBundled(customBundled?: Iterable<IEffort>): Promise<void>;
1063
1108
  /** True after loadBundled() has resolved */
1064
1109
  isInitialized(): boolean;
1065
- resolve(slug: string): IEffort | null;
1066
- resolveByAlias(label: string): IEffort | null;
1067
- list(): readonly IEffort[];
1068
1110
  listByOrigin(origin: EffortRegistrySource): readonly IEffort[];
1069
1111
  upsert(effort: IEffort): Promise<void>;
1070
1112
  delete(slug: string): Promise<void>;
@@ -4508,6 +4550,170 @@ declare class SubscriptionManager {
4508
4550
  dispose(): void;
4509
4551
  }
4510
4552
 
4553
+ /**
4554
+ * Dimension-aware value model for calc evaluation.
4555
+ *
4556
+ * Numbers carry a dimension vector and (optionally) the unit they were
4557
+ * measured in; arithmetic tracks vectors per spec §5.1. `absent` is the
4558
+ * missing-data value: it propagates through arithmetic, reads as `false` in
4559
+ * predicates (applicability decision, #848), and is what `has()` probes.
4560
+ */
4561
+
4562
+ type Val = {
4563
+ kind: 'number';
4564
+ value: number;
4565
+ dim: DimVector;
4566
+ unit?: string;
4567
+ } | {
4568
+ kind: 'string';
4569
+ value: string;
4570
+ } | {
4571
+ kind: 'series';
4572
+ points: Map<number, number>;
4573
+ dim: DimVector;
4574
+ unit?: string;
4575
+ } | {
4576
+ kind: 'period';
4577
+ days: number;
4578
+ } | {
4579
+ kind: 'absent';
4580
+ };
4581
+ declare const ABSENT: Val;
4582
+ declare function num(value: number, dim?: DimVector, unit?: string): Val;
4583
+ declare function str(value: string): Val;
4584
+ /** Predicate truthiness: absent → false; numbers → ≠ 0; strings → non-empty. */
4585
+ declare function truthy(v: Val): boolean;
4586
+
4587
+ /**
4588
+ * Expression evaluator for the composed calculations layer.
4589
+ *
4590
+ * The core owns arithmetic, comparison/logic, and the scalar function table
4591
+ * (min, max, abs, round, floor, ceil, clamp, convert, has). Everything
4592
+ * scope-dependent — metric refs, context nodes, stream aggregates, lookup(),
4593
+ * WQL atoms — resolves through the EvalContext, so the same evaluator serves
4594
+ * segment, workout, and store scopes (spec §3.1).
4595
+ */
4596
+
4597
+ declare class CalcEvalError extends Error {
4598
+ constructor(message: string);
4599
+ }
4600
+ interface EvalContext {
4601
+ /** Resolve a ref atom (metric, context node, library node). ABSENT when missing. */
4602
+ resolveRef(name: string): Val;
4603
+ /**
4604
+ * Extension functions (stream aggregates, lookup). Receives evaluated args
4605
+ * plus the raw arg nodes (aggregates need the filter node unevaluated).
4606
+ * Return undefined to signal "not mine" → CalcEvalError.
4607
+ */
4608
+ callFunction?(name: string, args: Val[], rawArgs: ExprNode[]): Val | undefined;
4609
+ /** Store-scope WQL selections (QueryService). Store scope only. */
4610
+ resolveWql?(node: Extract<ExprNode, {
4611
+ kind: 'wql';
4612
+ }>): Val;
4613
+ }
4614
+ declare function evaluate(node: ExprNode, ctx: EvalContext): Val;
4615
+
4616
+ /**
4617
+ * Lookup table registry (spec §4).
4618
+ *
4619
+ * Tables are adapters over heterogeneous sources (effort resolver, static
4620
+ * maps, user profile) exposing a uniform single-row lookup contract:
4621
+ * `lookup("table", keyExpr, "field")`. Registration is layered —
4622
+ * bundled → dialect → user — with later layers replacing earlier ones
4623
+ * (mirrors the Dialect Stack's personal-overrides-last rule). Miss behavior
4624
+ * is per-table: `absent` yields the absent value; `default-row` yields a
4625
+ * synthetic row so calcs never see a miss.
4626
+ */
4627
+
4628
+ interface LookupFieldDef {
4629
+ dimension: DimVector;
4630
+ type: 'number' | 'string';
4631
+ }
4632
+ interface ILookupTable {
4633
+ readonly id: string;
4634
+ readonly fields: Record<string, LookupFieldDef>;
4635
+ readonly missPolicy: 'absent' | 'default-row';
4636
+ /** Single-row lookup. `absent` tables return undefined on a miss. */
4637
+ get(key: string, field: string): Val | undefined;
4638
+ }
4639
+ type LookupLayer = 'bundled' | 'dialect' | 'user';
4640
+ declare class LookupRegistry {
4641
+ private readonly tables;
4642
+ /** Register a table; a later-or-equal layer replaces the existing entry. */
4643
+ register(table: ILookupTable, layer?: LookupLayer): void;
4644
+ get(tableId: string): ILookupTable | undefined;
4645
+ /** Field dimension for static checking; undefined when table/field unknown. */
4646
+ fieldDim(tableId: string, field: string): DimVector | undefined;
4647
+ /** Runtime lookup honoring the table's miss policy. */
4648
+ lookup(tableId: string, key: string, field: string): Val;
4649
+ /**
4650
+ * EvalContext `callFunction` implementation for `lookup("table", key, "field")`.
4651
+ * Compose with other extension functions (aggregates) at the engine layer.
4652
+ */
4653
+ readonly callFunction: EvalContext['callFunction'];
4654
+ }
4655
+
4656
+ /**
4657
+ * MetricShakeOutQueue — Two-stage dependency-ordered metric evaluation module.
4658
+ *
4659
+ * Collects static Metrics and statement-level Metric Equations (`metrics:`)
4660
+ * plus workout/query Summary Metrics (`summaries:`) across stacked Property
4661
+ * Notes in specificity precedence:
4662
+ * Statement/Runtime > Inline Tag > Effort > Equipment > Note Frontmatter > Tag Category
4663
+ *
4664
+ * Stage 1 (`plan`): resolves static metrics and compile-time equations in
4665
+ * topological waves, injects compiler hints, and defers equations whose
4666
+ * required inputs depend on runtime-only atoms (`elapsed`, `spans`, etc.).
4667
+ *
4668
+ * Stage 2 (`log`): resolves all remaining equations against the executed
4669
+ * statement metrics and emits a structured Skipped-Dependency Diagnostic
4670
+ * metric (`origin: 'diagnostic'`, `type: MetricType.Diagnostic`) for any
4671
+ * equation whose required inputs remain absent after the fixed-point pass.
4672
+ */
4673
+
4674
+ type PropertySourceLayer = 'statement' | 'tag' | 'effort' | 'equipment' | 'note' | 'category';
4675
+ interface PropertyRuleInput {
4676
+ readonly layer: Exclude<PropertySourceLayer, 'statement'>;
4677
+ readonly sourceSlug: string;
4678
+ readonly metrics?: Readonly<Record<string, string | number | readonly string[]>>;
4679
+ readonly summaries?: Readonly<Record<string, string>>;
4680
+ readonly hints?: Readonly<Record<string, unknown>>;
4681
+ }
4682
+ interface SkippedDependencyDiagnostic {
4683
+ readonly target: string;
4684
+ readonly expression: string;
4685
+ readonly sourceLayer: Exclude<PropertySourceLayer, 'statement'>;
4686
+ readonly sourceSlug: string;
4687
+ readonly missing: readonly string[];
4688
+ }
4689
+ interface ShakeOutResult {
4690
+ readonly resolved: readonly string[];
4691
+ readonly deferredRuntime: readonly string[];
4692
+ readonly diagnostics: readonly SkippedDependencyDiagnostic[];
4693
+ readonly inferredDims: Readonly<Record<string, DimVector>>;
4694
+ }
4695
+ interface ShakeOutQueueOptions {
4696
+ readonly stage: 'plan' | 'log';
4697
+ readonly sources: readonly PropertyRuleInput[];
4698
+ readonly lookups?: LookupRegistry;
4699
+ readonly lastEffortSlug?: string;
4700
+ }
4701
+ /**
4702
+ * Extract `metrics:` and `summaries:` maps from a parsed frontmatter record
4703
+ * (supporting both flat `metrics.foo` / `summaries.bar` keys and nested maps).
4704
+ */
4705
+ declare function extractPropertyRulesFromMeta(meta: Readonly<Record<string, unknown>>, layer: Exclude<PropertySourceLayer, 'statement'>, sourceSlug: string): PropertyRuleInput;
4706
+ /**
4707
+ * Compile `summaries:` equations across stacked Property Notes into workout-scope
4708
+ * `CalculationDefinition` records. Higher-precedence layers shadow lower layers
4709
+ * when both define the same summary key.
4710
+ */
4711
+ declare function compilePropertySummaryCalcs(sources: readonly PropertyRuleInput[]): CalculationDefinition[];
4712
+ /**
4713
+ * Run the two-stage Metric Shake-Out Queue on a statement's MetricContainer.
4714
+ */
4715
+ declare function runMetricShakeOutQueue(container: MetricContainer, options: ShakeOutQueueOptions): ShakeOutResult;
4716
+
4511
4717
  /**
4512
4718
  * Context used to select processors for a given workout.
4513
4719
  */
@@ -4532,7 +4738,7 @@ interface AnalyticsProfileContext {
4532
4738
  * User-authored composed calcs (#880), registered after the built-ins so
4533
4739
  * they override same-id built-ins and evaluate at high priority.
4534
4740
  */
4535
- calcs?: CalculationDefinition$1[];
4741
+ calcs?: CalculationDefinition[];
4536
4742
  /**
4537
4743
  * The tag catalogue — the tags a script can reference and the functions
4538
4744
  * they carry. A function a tag carries runs where that tag applies.
@@ -4543,6 +4749,8 @@ interface AnalyticsProfileContext {
4543
4749
  * profile applies.
4544
4750
  */
4545
4751
  activeTags?: readonly string[];
4752
+ /** Property Note metric/summary rules active for this run or block. */
4753
+ propertySources?: readonly PropertyRuleInput[];
4546
4754
  }
4547
4755
  /**
4548
4756
  * Profile that assembles the realtime and summary processor lists
@@ -4711,7 +4919,7 @@ interface CreateAnalyticsEngineOptions {
4711
4919
  vo2max?: number;
4712
4920
  };
4713
4921
  /** User-authored composed calcs (#880), registered after the built-ins. */
4714
- calcs?: CalculationDefinition$1[];
4922
+ calcs?: CalculationDefinition[];
4715
4923
  /**
4716
4924
  * The tag catalogue — the tags a script can reference and the functions
4717
4925
  * they carry.
@@ -4719,6 +4927,8 @@ interface CreateAnalyticsEngineOptions {
4719
4927
  tags?: TagIndex;
4720
4928
  /** Tags active for the whole run, whatever the segments say. */
4721
4929
  activeTags?: readonly string[];
4930
+ /** Property Note metric/summary rules active for this run or block. */
4931
+ propertySources?: readonly PropertyRuleInput[];
4722
4932
  }
4723
4933
  /**
4724
4934
  * Creates a fully-configured AnalyticsEngine for a workout block.
@@ -4801,64 +5011,6 @@ declare function resolveDominantOrigin(origins: MetricOrigin[]): MetricOrigin;
4801
5011
  */
4802
5012
  declare function extractMetrics(outputs: IOutputStatement[]): IMetric[];
4803
5013
 
4804
- interface CalculationDefinition {
4805
- readonly target: string;
4806
- readonly expression: string;
4807
- readonly raw: string;
4808
- readonly line: number;
4809
- readonly ast: ExpressionNode;
4810
- readonly sources: string[];
4811
- }
4812
- interface CalculateBlockParseError {
4813
- readonly line: number;
4814
- readonly raw: string;
4815
- readonly message: string;
4816
- }
4817
- interface CalculateBlockParseResult {
4818
- readonly definitions: CalculationDefinition[];
4819
- readonly errors: CalculateBlockParseError[];
4820
- }
4821
- type ExpressionNode = NumberNode | IdentifierNode | UnaryNode | BinaryNode | CallNode;
4822
- interface NumberNode {
4823
- readonly kind: 'number';
4824
- readonly value: number;
4825
- }
4826
- interface IdentifierNode {
4827
- readonly kind: 'identifier';
4828
- readonly name: string;
4829
- }
4830
- interface UnaryNode {
4831
- readonly kind: 'unary';
4832
- readonly operator: '+' | '-';
4833
- readonly argument: ExpressionNode;
4834
- }
4835
- interface BinaryNode {
4836
- readonly kind: 'binary';
4837
- readonly operator: '+' | '-' | '*' | '/' | '^';
4838
- readonly left: ExpressionNode;
4839
- readonly right: ExpressionNode;
4840
- }
4841
- interface CallNode {
4842
- readonly kind: 'call';
4843
- readonly name: string;
4844
- readonly args: ExpressionNode[];
4845
- }
4846
- declare class CalculateBlockProcessor implements ISummaryProcessor {
4847
- private readonly definitions;
4848
- readonly id = "calculate-block";
4849
- readonly name = "CalculateBlockProcessor";
4850
- constructor(definitions: readonly CalculationDefinition[]);
4851
- summarize(outputs: IOutputStatement[]): ProjectionResult[];
4852
- }
4853
- /**
4854
- * Parse a `calculate` block into assignment definitions.
4855
- */
4856
- declare function parseCalculateBlock(content: string): CalculateBlockParseResult;
4857
- /**
4858
- * Evaluate calculate definitions against runtime output statements.
4859
- */
4860
- declare function evaluateCalculateDefinitions(definitions: readonly CalculationDefinition[], outputs: readonly IOutputStatement[]): ProjectionResult[];
4861
-
4862
5014
  /**
4863
5015
  * Unit registry for the composed calculations layer.
4864
5016
  *
@@ -4899,40 +5051,6 @@ declare function composeMulUnit(a: string | undefined, aDim: DimVector, b: strin
4899
5051
  /** Compose units through `/` (`m` ÷ `s` → `m/s`). */
4900
5052
  declare function composeDivUnit(a: string | undefined, b: string | undefined, bDim: DimVector, resultDim: DimVector): string | undefined;
4901
5053
 
4902
- /**
4903
- * Dimension-aware value model for calc evaluation.
4904
- *
4905
- * Numbers carry a dimension vector and (optionally) the unit they were
4906
- * measured in; arithmetic tracks vectors per spec §5.1. `absent` is the
4907
- * missing-data value: it propagates through arithmetic, reads as `false` in
4908
- * predicates (applicability decision, #848), and is what `has()` probes.
4909
- */
4910
-
4911
- type Val = {
4912
- kind: 'number';
4913
- value: number;
4914
- dim: DimVector;
4915
- unit?: string;
4916
- } | {
4917
- kind: 'string';
4918
- value: string;
4919
- } | {
4920
- kind: 'series';
4921
- points: Map<number, number>;
4922
- dim: DimVector;
4923
- unit?: string;
4924
- } | {
4925
- kind: 'period';
4926
- days: number;
4927
- } | {
4928
- kind: 'absent';
4929
- };
4930
- declare const ABSENT: Val;
4931
- declare function num(value: number, dim?: DimVector, unit?: string): Val;
4932
- declare function str(value: string): Val;
4933
- /** Predicate truthiness: absent → false; numbers → ≠ 0; strings → non-empty. */
4934
- declare function truthy(v: Val): boolean;
4935
-
4936
5054
  /**
4937
5055
  * Hand-rolled parser for the calc expression language.
4938
5056
  *
@@ -4982,7 +5100,7 @@ interface LineFormScope {
4982
5100
  fences?: string[];
4983
5101
  }
4984
5102
  interface CompiledLineForm {
4985
- defs: CalculationDefinition$1[];
5103
+ defs: CalculationDefinition[];
4986
5104
  warnings: string[];
4987
5105
  }
4988
5106
  /**
@@ -5002,37 +5120,8 @@ declare function compileLineForm(src: string, defaultScope?: LineFormScope): Com
5002
5120
  * origins, units, output clauses, intermediate nodes).
5003
5121
  */
5004
5122
  /** First output node id (output.nodeId may be a single id or an array). */
5005
- declare function outputNodeId(def: CalculationDefinition$1): string | undefined;
5006
- declare function printCalculation(def: CalculationDefinition$1): string;
5007
-
5008
- /**
5009
- * Expression evaluator for the composed calculations layer.
5010
- *
5011
- * The core owns arithmetic, comparison/logic, and the scalar function table
5012
- * (min, max, abs, round, floor, ceil, clamp, convert, has). Everything
5013
- * scope-dependent — metric refs, context nodes, stream aggregates, lookup(),
5014
- * WQL atoms — resolves through the EvalContext, so the same evaluator serves
5015
- * segment, workout, and store scopes (spec §3.1).
5016
- */
5017
-
5018
- declare class CalcEvalError extends Error {
5019
- constructor(message: string);
5020
- }
5021
- interface EvalContext {
5022
- /** Resolve a ref atom (metric, context node, library node). ABSENT when missing. */
5023
- resolveRef(name: string): Val;
5024
- /**
5025
- * Extension functions (stream aggregates, lookup). Receives evaluated args
5026
- * plus the raw arg nodes (aggregates need the filter node unevaluated).
5027
- * Return undefined to signal "not mine" → CalcEvalError.
5028
- */
5029
- callFunction?(name: string, args: Val[], rawArgs: ExprNode[]): Val | undefined;
5030
- /** Store-scope WQL selections (QueryService). Store scope only. */
5031
- resolveWql?(node: Extract<ExprNode, {
5032
- kind: 'wql';
5033
- }>): Val;
5034
- }
5035
- declare function evaluate(node: ExprNode, ctx: EvalContext): Val;
5123
+ declare function outputNodeId(def: CalculationDefinition): string | undefined;
5124
+ declare function printCalculation(def: CalculationDefinition): string;
5036
5125
 
5037
5126
  /**
5038
5127
  * Static dimension checking, run at calc registration time (spec §5).
@@ -5072,46 +5161,6 @@ declare function validateOutputUnit(exprDim: DimVector, unit: string | undefined
5072
5161
  /** Full registration-time check for one calc line. Returns the computed vector. */
5073
5162
  declare function checkCalcLine(line: CalcLine, env: StaticEnv): DimVector;
5074
5163
 
5075
- /**
5076
- * Lookup table registry (spec §4).
5077
- *
5078
- * Tables are adapters over heterogeneous sources (effort resolver, static
5079
- * maps, user profile) exposing a uniform single-row lookup contract:
5080
- * `lookup("table", keyExpr, "field")`. Registration is layered —
5081
- * bundled → dialect → user — with later layers replacing earlier ones
5082
- * (mirrors the Dialect Stack's personal-overrides-last rule). Miss behavior
5083
- * is per-table: `absent` yields the absent value; `default-row` yields a
5084
- * synthetic row so calcs never see a miss.
5085
- */
5086
-
5087
- interface LookupFieldDef {
5088
- dimension: DimVector;
5089
- type: 'number' | 'string';
5090
- }
5091
- interface ILookupTable {
5092
- readonly id: string;
5093
- readonly fields: Record<string, LookupFieldDef>;
5094
- readonly missPolicy: 'absent' | 'default-row';
5095
- /** Single-row lookup. `absent` tables return undefined on a miss. */
5096
- get(key: string, field: string): Val | undefined;
5097
- }
5098
- type LookupLayer = 'bundled' | 'dialect' | 'user';
5099
- declare class LookupRegistry {
5100
- private readonly tables;
5101
- /** Register a table; a later-or-equal layer replaces the existing entry. */
5102
- register(table: ILookupTable, layer?: LookupLayer): void;
5103
- get(tableId: string): ILookupTable | undefined;
5104
- /** Field dimension for static checking; undefined when table/field unknown. */
5105
- fieldDim(tableId: string, field: string): DimVector | undefined;
5106
- /** Runtime lookup honoring the table's miss policy. */
5107
- lookup(tableId: string, key: string, field: string): Val;
5108
- /**
5109
- * EvalContext `callFunction` implementation for `lookup("table", key, "field")`.
5110
- * Compose with other extension functions (aggregates) at the engine layer.
5111
- */
5112
- readonly callFunction: EvalContext['callFunction'];
5113
- }
5114
-
5115
5164
  /**
5116
5165
  * Built-in lookup table adapters (spec §4.1).
5117
5166
  *
@@ -5177,22 +5226,24 @@ declare class CalculationRegistry {
5177
5226
  private readonly libraryDims;
5178
5227
  constructor(lookups: LookupRegistry);
5179
5228
  /** All registered calcs for a scope, registration order preserved. */
5180
- byScope(scope: CalcScope): CalculationDefinition$1[];
5181
- get(id: string): CalculationDefinition$1 | undefined;
5229
+ byScope(scope: CalcScope): CalculationDefinition[];
5230
+ get(id: string): CalculationDefinition | undefined;
5231
+ /** Register a custom statement-level metric dimension (e.g. from a Property Note). */
5232
+ registerAtom(name: string, dim?: DimVector): void;
5182
5233
  /**
5183
5234
  * Register a calculation. Compiles every node expression and predicate,
5184
5235
  * runs static dimension checking, and (for library calcs) publishes node
5185
5236
  * dimensions for dependent calcs. Throws CalcRegistrationError on any
5186
5237
  * violation.
5187
5238
  */
5188
- register(def: CalculationDefinition$1): void;
5239
+ register(def: CalculationDefinition): void;
5189
5240
  /** Parse + dimension-check every node and predicate in a variant. */
5190
5241
  private compileVariant;
5191
5242
  /** Static environment for a calc: siblings → library → stream → context. */
5192
5243
  private staticEnv;
5193
5244
  }
5194
5245
  /** Output node ids as an array regardless of the single/multi form. */
5195
- declare function outputNodeIds(def: CalculationDefinition$1): string[];
5246
+ declare function outputNodeIds(def: CalculationDefinition): string[];
5196
5247
 
5197
5248
  /**
5198
5249
  * Composed calculation engine — Phases 1 & 2 of the evaluation pipeline
@@ -5229,6 +5280,8 @@ interface CalcEngineDeps {
5229
5280
  tags?: TagIndex;
5230
5281
  /** Tags active for the whole run, whatever the segments say. */
5231
5282
  activeTags?: readonly string[];
5283
+ /** Property Note metric/summary rules active for this run or block. */
5284
+ propertySources?: readonly PropertyRuleInput[];
5232
5285
  }
5233
5286
  declare class CalcEngine implements IRealtimeProcessor, ISummaryProcessor {
5234
5287
  private readonly registry;
@@ -5305,8 +5358,8 @@ declare class CalcEngine implements IRealtimeProcessor, ISummaryProcessor {
5305
5358
 
5306
5359
  /** Shared rest/pause exclusion filter constant (§10.6). */
5307
5360
  declare const REST_EXCLUSION = "rest|pause|rest-*";
5308
- declare const BUILTIN_CALCS: CalculationDefinition$1[];
5309
- declare const STORE_CALCS: CalculationDefinition$1[];
5361
+ declare const BUILTIN_CALCS: CalculationDefinition[];
5362
+ declare const STORE_CALCS: CalculationDefinition[];
5310
5363
 
5311
5364
  /**
5312
5365
  * Factory for a fully-seeded composed calculation stack: lookup registry
@@ -5319,13 +5372,15 @@ interface CalcStackOptions {
5319
5372
  effortResolver: IEffortResolver;
5320
5373
  userProfile?: IProfileSource;
5321
5374
  /** Extra/override calcs (dialect, user) registered after the built-ins. */
5322
- calcs?: CalculationDefinition$1[];
5375
+ calcs?: CalculationDefinition[];
5323
5376
  /**
5324
5377
  * The tag catalogue. A function a tag carries runs where that tag applies.
5325
5378
  */
5326
5379
  tags?: TagIndex;
5327
5380
  /** Tags active for the whole run, whatever the segments say. */
5328
5381
  activeTags?: readonly string[];
5382
+ /** Property Note metric/summary rules active for this run or block. */
5383
+ propertySources?: readonly PropertyRuleInput[];
5329
5384
  }
5330
5385
  interface CalcStack {
5331
5386
  lookups: LookupRegistry;
@@ -5339,7 +5394,7 @@ interface CalcDiagnostic {
5339
5394
  message: string;
5340
5395
  }
5341
5396
  interface CalcAnalysis {
5342
- defs: CalculationDefinition$1[];
5397
+ defs: CalculationDefinition[];
5343
5398
  diagnostics: CalcDiagnostic[];
5344
5399
  dim: DimVector | undefined;
5345
5400
  compound: string | undefined;
@@ -5473,4 +5528,4 @@ declare function diffStatement(expected: MetricLine[], actual: readonly IMetric[
5473
5528
  */
5474
5529
  declare function compareStatement(expectations: MetricLine[], actual: readonly IMetric[], mode: MatchMode): string[];
5475
5530
 
5476
- export { ABSENT, AGGREGATE_BUILTINS, AUTHORITATIVE_CASTS, AbortSessionAction, type ActionDescriptor, type ActionPrimitive, AmrapLogicStrategy, AnalyticsContext, AnalyticsEngine, type AnalyticsProfileContext, type AnalyticsResult, AnalyticsTransformer, BUILTIN_CALCS, BUNDLED_EFFORT_COUNT, BehaviorContext, BehaviorEventListener, BehaviorEventType, BlockBuilder, BlockContext, BlockLifecycleOptions, ButtonBehavior, ButtonConfig, COMPLETION_PROPERTY_KEYS, CONSUMED_HINTS, CONSUMED_HINT_KEYS, CONTEXT_ATOMS, type CalcAnalysis, CalculationDefinition$1 as CalcDefinition, type CalcDiagnostic, CalcEngine, type CalcEngineDeps, CalcEvalError, CalcLine, CalcParseError, CalcRegistrationError, CalcScope, type CalcStack, type CalcStackOptions, type UnitDef as CalcUnitDef, CalcUnitError, type CalculationDefinition as CalculateBlockDefinition, type CalculateBlockParseError, type CalculateBlockParseResult, CalculateBlockProcessor, CalculationDefinition$1 as CalculationDefinition, CalculationRegistry, CardioDialect, ChildSelectionBehavior, type ChildSelectionConfig, type ChildSelectionLoopCondition, ChildrenStrategy, ChoiceGroupMetric, ClearChildrenAction, ClimbDialect, type ClimbGradeMetricValue, type ClimbGradeSystem, ClimbMetricType, CompileAndPushBlockAction, type CompiledLineForm, CompletionDecision, CompletionTimestampBehavior, type CompletionValueOption, type CompletionValueSource, CompositeEffortRegistry, type CompositeEffortRegistryOptions, type ControlsConfig, type CountdownMode, CountdownTimerBehavior, type CountdownTimerConfig, CountupTimerBehavior, type CountupTimerConfig, type CreateAnalyticsEngineOptions, type CreateAnalyticsEngineResult, CrossFitDialect, DAY, DEFAULT_UNRESOLVED_EFFORT_MET, type DayRollup, DialectStack, DimVector, type Dimension, type DurationPrimitive, EFFORT_DATA_METRIC_TYPE, EffortBlock, type EffortBlockConfig, EffortFallbackStrategy, type EffortPrimitive, EffortRegistrySource, EffortResolutionOptions, EffortResolver, EffortResolverOptions, EffortStorageAdapter, EmitEventAction, EmitSystemOutputAction, type EquipmentParseResult, ErrorAction, type EvalContext, EventBus, EventCallback, EventHandlerOptions, type EventHandlerRegistration, ExecutionContext, type ExecutionSnapshot, type ExecutionStatus, ExitBehavior, type ExitConfig, ExprNode, FixtureSyntaxError, type FuzzyCandidate, GenericGroupStrategy, GenericLoopStrategy, GenericTimerStrategy, HabitsDialect, type HeadingPrimitive, IAnalyticsEngine, type IAnalyticsProfile, IAnchorValue, IBehaviorContext, IBlockContext, type ICastSubscription, IEffort, IEffortRegistry, IEffortResolver, IEquipment, IEvent, IEventBus, IEventHandler, IJitCompiler, type ILookupTable, IMemoryLocation, IMemoryReference, type IMetricPresentationPolicy, INowProvider, type IProfileSource, IRealtimeProcessor, IRuntimeAction, IRuntimeActionable, IRuntimeBehavior, IRuntimeBlock, type IRuntimeBlockStrategy, IRuntimeClock, type IRuntimeEventProvider, type IRuntimeFactory, IRuntimeMemory, IRuntimeStack, type IRuntimeSubscription, IScriptRuntime, ISummaryProcessor, InMemoryEffortRegistry, IntervalLogicStrategy, JitCompiler, LabelingBehavior, type LabelingConfig, type LapPrimitive, type LineFormScope, type LineLocator, type LiteralKind, LocalEventProvider, LocalRuntimeSubscription, type LogLevel, type LoggableOutput, type LookupFieldDef, type LookupLayer, LookupRegistry, MAX_TAG_CONTRIBUTION_DEPTH, type MatchMode, MdTimerRuntime, type MemoryEntry, MemoryTag, MemoryTypeEnum, type MetricLine, type MetricObjectPrimitive, type MetricPresentationSurface, type MetricPresentationToken, MetricPromotionBehavior, type MetricPromotionConfig, type MetricRenderKind, type MetricTone, MetricVisibility, type MockClock, NextAction, NextEvent, NextEventHandler, OutputEmitter, OutputListener, PRODUCTION_STRATEGIES, PROPERTY_KEY_TO_METRIC_TYPE, type ParseOptions, type ParseReferences, type ParseResult, type ParserConfig, PopBlockAction, ProjectionResult, type PromotionRule, type PropertyPrimitive, PushBlockAction, PushRestBlockAction, type QuantityPrimitive, REFERENCE_PAIR_KEYS, REST_EXCLUSION, RPE_LABELS, RUNTIME_LOG_SUBJECT_WIDTH, ReferenceIndex, ReferenceResolutionDefaults, RegisterEventHandlerAction, Registry, ReportOutputBehavior, type ReportOutputConfig, ReportOutputStrategy, ResolvedEffort, type ResolvedEffortData, type ResolvedTagContributions, RestBlock, type RestBlockConfig, type RoundSchemePrimitive, RoundsMetric, type RoundsPrimitive, RuntimeAdapter, RuntimeBlock, type RuntimeBlockOptions, RuntimeBuilder, type RuntimeButton, RuntimeClock, type RuntimeController, type RuntimeControls, RuntimeError, RuntimeFactory, type RuntimeLogEntry, RuntimeLogger, RuntimeMemory, type RuntimeMemoryLocation, RuntimeObservers, RuntimeStack, RuntimeStackOptions, SOUND_PLAY_EVENT, SOUND_PROFILE_METRIC, STANDARD_UNITS, STORE_CALCS, STREAM_ATOMS, STRUCTURAL_EFFORT_WORDS, ScriptRuntime, type SegmentWithMetadata, SessionRootBlock, type SessionRootConfig, SessionRootStrategy, SnapshotClock, SoundProfile, SoundProfileBehavior, type SoundProfileBehaviorConfig, SoundStrategy, type SourceInput, type SpanList, SpanTrackingBehavior, StackListener, StackObserver, StackSnapshot, StandardAnalyticsProfile, StartSessionAction, type StartSessionOptions, StartWorkoutAction, type StartWorkoutOptions, type StatementMetricDiff, type StaticEnv, type StreamAtomDef, SubscribeOptions, SubscriptionManager, type SyntaxFacts, type SyntaxMeta, type SyntaxPrimitive, type SyntaxStatement, TAG_MARKER_PREFIX, type TagRefPrimitive, TestableBlockConfig, type TextPrimitive, ThrowError, ThrowErrorAction, TimeSpan, TimerState, TwoPassEffortResolutionProcess, TypedMemoryReference, UNITS, type UnitDef$1 as UnitDef, type UnitMatch, UnitRegistry, UnitSet, UnitsDialect, UnregisterEventHandlerAction, Unsubscribe, UpdateNextPreviewAction, type Val, WaitingToStartBlock, WaitingToStartInjectorBehavior, WhiteboardScript, type WhiteboardScriptCompletionOptions, type WhiteboardScriptSnippet, WodDialect, YogaDialect, addAliasToEffort, applyTemplateDefaults, buildStaticLookups, buildTooltip, bundledEfforts, calculateElapsed, canonicalizeType, checkCalcLine, classifyStatements, closeCurrentSpan, collapseUnresolvedChoices, commonFixtureSet, compareStatement, compileLineForm, composeDivUnit, composeMulUnit, computeColumnLabel, computeLabel, computeWorkloadRollups, convertScalar, createAnalyticsEngineForBlock, createCalcEngine, createCalcStack, createCompiler, createDialectStack, createDisciplinesTable, createEffortTable, createLineLocator, createPolicy as createMetricPresentationPolicy, createMockClock, createParser, createProfileTable, createRpeLabelsTable, dailySessionLoads, dayBucket, dialectRegistry, dialectStack, diffStatement, documentToEffort, documentToEquipment, effortToDocument, equipmentToDocument, evaluate, evaluateCalculateDefinitions, extractEffortData, extractMetrics, extractStatements, extractStatementsRaw, extractSyntaxFacts, findBestFuzzyMatch, findTagContributionCycles, findUnresolvedChoices, fixtureBackSquat, fixtureBurpee, fixturePlank, fixtureRowing, fixtureRunning, fixtureUserCustom, fixtureUserOverride, formatDuration, formatRuntimeLogLine, formatRuntimeLogRule, formatRuntimeTimestamp, metricsToLabel as fragmentsToLabel, fullFixtureSet, fuseUnits, fuseUnitsInMetrics, getAnalyticsFromLogs, getAnalyticsFromRuntime, getHints, getUnit, hasHint, hintMetric, hintsToContainer, inferDim, isCastSubscription, isChoiceResolved, isTimeLikeMetric, isWithinThreshold, levenshteinDistance, metricPresentation, mutateTimerSpans, normalizeForFuzzy, num, openSpan, outputNodeId, outputNodeIds, padRuntimeLogEvent, padRuntimeLogSubject, parseCalcLine, parseCalculateBlock, parseEffortFile, parseEquipmentFile, parseExpression, parseMetricLine, parseScript, printCalculation, readNestedSection, readTimer, realtimeProcessorRegistry, renderMetric, resolveDominantOrigin, resolveSoundProfile, resolveTagContributions, snippetCompletions, startSpan, str, strategyRegistry, summaryProcessorRegistry, tagContributionMetrics, tagMarkerSlug, tagMarkerSlugs, tagMarkerType, toStoredOutputStatement, truthy, validateOutputUnit, parser as whiteboardParser, whiteboardScript, whiteboardScriptCompletion, whiteboardScriptCompletionSource, whiteboardScriptLanguage, whiteboardScriptSnippets, writeChoiceSelection };
5531
+ export { ABSENT, AGGREGATE_BUILTINS, AUTHORITATIVE_CASTS, AbortSessionAction, type ActionDescriptor, type ActionPrimitive, AmrapLogicStrategy, AnalyticsContext, AnalyticsEngine, type AnalyticsProfileContext, type AnalyticsResult, AnalyticsTransformer, BUILTIN_CALCS, BUNDLED_EFFORT_COUNT, BehaviorContext, BehaviorEventListener, BehaviorEventType, BlockBuilder, BlockContext, BlockLifecycleOptions, ButtonBehavior, ButtonConfig, COMPLETION_PROPERTY_KEYS, CONSUMED_HINTS, CONSUMED_HINT_KEYS, CONTEXT_ATOMS, type CalcAnalysis, CalculationDefinition as CalcDefinition, type CalcDiagnostic, CalcEngine, type CalcEngineDeps, CalcEvalError, CalcLine, CalcParseError, CalcRegistrationError, CalcScope, type CalcStack, type CalcStackOptions, type UnitDef as CalcUnitDef, CalcUnitError, CalculationDefinition, CalculationRegistry, CardioDialect, ChildSelectionBehavior, type ChildSelectionConfig, type ChildSelectionLoopCondition, ChildrenStrategy, ChoiceGroupMetric, ClearChildrenAction, ClimbDialect, type ClimbGradeMetricValue, type ClimbGradeSystem, ClimbMetricType, CompileAndPushBlockAction, type CompiledLineForm, CompletionDecision, CompletionTimestampBehavior, type CompletionValueOption, type CompletionValueSource, CompositeEffortRegistry, type CompositeEffortRegistryOptions, CompositeEquipmentRegistry, CompositePropertyRegistry, type ControlsConfig, type CountdownMode, CountdownTimerBehavior, type CountdownTimerConfig, CountupTimerBehavior, type CountupTimerConfig, type CreateAnalyticsEngineOptions, type CreateAnalyticsEngineResult, CrossFitDialect, DAY, DEFAULT_UNRESOLVED_EFFORT_MET, type DayRollup, DialectStack, DimVector, type Dimension, type DurationPrimitive, EFFORT_DATA_METRIC_TYPE, EffortBlock, type EffortBlockConfig, EffortFallbackStrategy, type EffortPrimitive, EffortRegistrySource, EffortResolutionOptions, EffortResolver, EffortResolverOptions, EffortStorageAdapter, EmitEventAction, EmitSystemOutputAction, type EquipmentParseResult, EquipmentStorageAdapter, ErrorAction, type EvalContext, EventBus, EventCallback, EventHandlerOptions, type EventHandlerRegistration, ExecutionContext, type ExecutionSnapshot, type ExecutionStatus, ExitBehavior, type ExitConfig, ExprNode, FixtureSyntaxError, type FuzzyCandidate, GenericGroupStrategy, GenericLoopStrategy, GenericTimerStrategy, HabitsDialect, type HeadingPrimitive, IAnalyticsEngine, type IAnalyticsProfile, IAnchorValue, IBehaviorContext, IBlockContext, type ICastSubscription, IEffort, IEffortRegistry, IEffortResolver, IEquipment, IEquipmentRegistry, IEvent, IEventBus, IEventHandler, IJitCompiler, type ILookupTable, IMemoryLocation, IMemoryReference, type IMetricPresentationPolicy, INowProvider, type IProfileSource, IRealtimeProcessor, IRuntimeAction, IRuntimeActionable, IRuntimeBehavior, IRuntimeBlock, type IRuntimeBlockStrategy, IRuntimeClock, type IRuntimeEventProvider, type IRuntimeFactory, IRuntimeMemory, IRuntimeStack, type IRuntimeSubscription, IScriptRuntime, ISummaryProcessor, InMemoryEffortRegistry, IntervalLogicStrategy, JitCompiler, LabelingBehavior, type LabelingConfig, type LapPrimitive, type LineFormScope, type LineLocator, type LiteralKind, LocalEventProvider, LocalRuntimeSubscription, type LogLevel, type LoggableOutput, type LookupFieldDef, type LookupLayer, LookupRegistry, MAX_TAG_CONTRIBUTION_DEPTH, type MatchMode, MdTimerRuntime, type MemoryEntry, MemoryTag, MemoryTypeEnum, type MetricLine, type MetricObjectPrimitive, type MetricPresentationSurface, type MetricPresentationToken, MetricPromotionBehavior, type MetricPromotionConfig, type MetricRenderKind, type MetricTone, MetricVisibility, type MockClock, NextAction, NextEvent, NextEventHandler, OutputEmitter, OutputListener, PRODUCTION_STRATEGIES, PROPERTY_KEY_TO_METRIC_TYPE, type ParseOptions, type ParseReferences, type ParseResult, type ParserConfig, PopBlockAction, ProjectionResult, type PromotionRule, type PropertyEntity, type PropertyPrimitive, type PropertyRuleInput, type PropertySourceLayer, type PropertyStorageAdapter, PushBlockAction, PushRestBlockAction, type QuantityPrimitive, REFERENCE_PAIR_KEYS, REST_EXCLUSION, RPE_LABELS, RUNTIME_LOG_SUBJECT_WIDTH, ReferenceIndex, ReferenceResolutionDefaults, RegisterEventHandlerAction, Registry, ReportOutputBehavior, type ReportOutputConfig, ReportOutputStrategy, ResolvedEffort, type ResolvedEffortData, type ResolvedTagContributions, RestBlock, type RestBlockConfig, type RoundSchemePrimitive, RoundsMetric, type RoundsPrimitive, RuntimeAdapter, RuntimeBlock, type RuntimeBlockOptions, RuntimeBuilder, type RuntimeButton, RuntimeClock, type RuntimeController, type RuntimeControls, RuntimeError, RuntimeFactory, type RuntimeLogEntry, RuntimeLogger, RuntimeMemory, type RuntimeMemoryLocation, RuntimeObservers, RuntimeStack, RuntimeStackOptions, SOUND_PLAY_EVENT, SOUND_PROFILE_METRIC, STANDARD_UNITS, STORE_CALCS, STREAM_ATOMS, STRUCTURAL_EFFORT_WORDS, ScriptRuntime, type SegmentWithMetadata, SessionRootBlock, type SessionRootConfig, SessionRootStrategy, type ShakeOutQueueOptions, type ShakeOutResult, type SkippedDependencyDiagnostic, SnapshotClock, SoundProfile, SoundProfileBehavior, type SoundProfileBehaviorConfig, SoundStrategy, type SourceInput, type SpanList, SpanTrackingBehavior, StackListener, StackObserver, StackSnapshot, StandardAnalyticsProfile, StartSessionAction, type StartSessionOptions, StartWorkoutAction, type StartWorkoutOptions, type StatementMetricDiff, type StaticEnv, type StreamAtomDef, SubscribeOptions, SubscriptionManager, type SyntaxFacts, type SyntaxMeta, type SyntaxPrimitive, type SyntaxStatement, TAG_MARKER_PREFIX, type TagCategoryPropertyDocument, type TagParseResult, type TagPropertyDocument, type TagRefPrimitive, TestableBlockConfig, type TextPrimitive, ThrowError, ThrowErrorAction, TimeSpan, TimerState, TwoPassEffortResolutionProcess, TypedMemoryReference, UNITS, type UnitDef$1 as UnitDef, type UnitMatch, UnitRegistry, UnitSet, UnitsDialect, UnregisterEventHandlerAction, Unsubscribe, UpdateNextPreviewAction, type Val, WaitingToStartBlock, WaitingToStartInjectorBehavior, WhiteboardScript, type WhiteboardScriptCompletionOptions, type WhiteboardScriptSnippet, WodDialect, YogaDialect, addAliasToEffort, applyTemplateDefaults, buildStaticLookups, buildTooltip, bundledEfforts, calculateElapsed, canonicalizeType, checkCalcLine, classifyStatements, closeCurrentSpan, collapseUnresolvedChoices, commonFixtureSet, compareStatement, compileLineForm, compilePropertySummaryCalcs, composeDivUnit, composeMulUnit, computeColumnLabel, computeLabel, computeWorkloadRollups, convertScalar, createAnalyticsEngineForBlock, createCalcEngine, createCalcStack, createCompiler, createDialectStack, createDisciplinesTable, createEffortTable, createLineLocator, createPolicy as createMetricPresentationPolicy, createMockClock, createParser, createProfileTable, createRpeLabelsTable, dailySessionLoads, dayBucket, dialectRegistry, dialectStack, diffStatement, documentToEffort, documentToEquipment, documentToTag, effortToDocument, equipmentToDocument, evaluate, extractEffortData, extractMetrics, extractPropertyRulesFromMeta, extractStatements, extractStatementsRaw, extractSyntaxFacts, findBestFuzzyMatch, findTagContributionCycles, findUnresolvedChoices, fixtureBackSquat, fixtureBurpee, fixturePlank, fixtureRowing, fixtureRunning, fixtureUserCustom, fixtureUserOverride, formatDuration, formatRuntimeLogLine, formatRuntimeLogRule, formatRuntimeTimestamp, metricsToLabel as fragmentsToLabel, fullFixtureSet, fuseUnits, fuseUnitsInMetrics, getAnalyticsFromLogs, getAnalyticsFromRuntime, getHints, getUnit, hasHint, hintMetric, hintsToContainer, inferDim, isCastSubscription, isChoiceResolved, isTimeLikeMetric, isWithinThreshold, levenshteinDistance, metricPresentation, mutateTimerSpans, normalizeForFuzzy, num, openSpan, outputNodeId, outputNodeIds, padRuntimeLogEvent, padRuntimeLogSubject, parseCalcLine, parseEffortFile, parseEquipmentFile, parseExpression, parseMetricLine, parseScript, printCalculation, readNestedSection, readTimer, realtimeProcessorRegistry, renderMetric, resolveDominantOrigin, resolveSoundProfile, resolveTagContributions, runMetricShakeOutQueue, snippetCompletions, startSpan, str, strategyRegistry, summaryProcessorRegistry, tagCategoryToDocument, tagContributionMetrics, tagMarkerSlug, tagMarkerSlugs, tagMarkerType, tagToDocument, toStoredOutputStatement, truthy, validateOutputUnit, parser as whiteboardParser, whiteboardScript, whiteboardScriptCompletion, whiteboardScriptCompletionSource, whiteboardScriptLanguage, whiteboardScriptSnippets, writeChoiceSelection };