@bitcobblers/wod-wiki-core 0.61.2259 → 0.62.2260

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
@@ -1187,6 +1187,8 @@ interface NoteProvenance {
1187
1187
  /** Epoch-ms timestamp when the clone was created. */
1188
1188
  clonedAt: number;
1189
1189
  }
1190
+ type NoteRetention = 'indexed' | 'cached' | 'schedule-pinned' | 'session-pinned';
1191
+ type NoteUpstreamStatus = 'live' | 'unsubscribed' | 'removed';
1190
1192
  interface Note {
1191
1193
  id: string;
1192
1194
  title: string;
@@ -1222,6 +1224,11 @@ interface Note {
1222
1224
  seedCommit?: string;
1223
1225
  /** Whether a user-owned notebook landing note (`notebook/{slug}`) publishes its member notes to the outbound Feed. */
1224
1226
  public?: boolean;
1227
+ /** Local retention tier for external/feed notes ('indexed' remote preview,
1228
+ * 'cached' locally materialized, or 'session-pinned' immutable archival copy). */
1229
+ retention?: NoteRetention;
1230
+ /** Lifecycle state of the upstream feed record when known. */
1231
+ upstreamStatus?: NoteUpstreamStatus;
1225
1232
  }
1226
1233
  interface Page {
1227
1234
  id: string;
@@ -1299,11 +1306,17 @@ type ResultOrigin = 'journal' | 'playground' | 'user';
1299
1306
  interface Session {
1300
1307
  id: string;
1301
1308
  noteId: string;
1309
+ /** Note `sourceRevision` pinned when this Session ran (matches NoteRevision [noteId, version]). */
1310
+ noteSourceRevision?: number;
1302
1311
  blockId: string;
1303
1312
  blockVersion: number;
1304
1313
  blockContentId?: string;
1305
1314
  origin?: ResultOrigin;
1306
1315
  pageId?: string;
1316
+ /** Mutable civil 'YYYY-MM-DD' training-day attribution on the Journal overlay. */
1317
+ sessionDate?: string;
1318
+ /** Optional pairing to a planned ScheduleItem fulfilled by this Session (1:N). */
1319
+ scheduleItemId?: string;
1307
1320
  /** Born in-progress at run start, completed when finalization commits. */
1308
1321
  status?: 'in-progress' | 'completed';
1309
1322
  /** When workout started */
@@ -1595,6 +1608,44 @@ interface Membership {
1595
1608
  createdAt: number;
1596
1609
  updatedAt?: number;
1597
1610
  }
1611
+ type ScheduleStatus = 'planned' | 'completed' | 'skipped' | 'moved';
1612
+ interface ScheduleItem {
1613
+ id: string;
1614
+ /** Local civil 'YYYY-MM-DD' training date. */
1615
+ date: string;
1616
+ noteId: string;
1617
+ /** Backing Journal Day Page UUID (`page` store) when present. */
1618
+ pageId?: string;
1619
+ /** Provenance Notebook identifier captured when scheduled. */
1620
+ sourceNotebookId?: string;
1621
+ /** Graceful fallback title when a scheduled remote Note is uncached offline. */
1622
+ fallbackTitle?: string;
1623
+ /** Optional single workout block within a multi-block Note. */
1624
+ blockId?: string;
1625
+ position: number;
1626
+ /** Optional session slot label (e.g. 'AM', 'PM', 'Warm-up'). */
1627
+ slot?: string;
1628
+ status: ScheduleStatus;
1629
+ /** Lightweight Day Cue stored on the instance without mutating the Note. */
1630
+ notes?: string;
1631
+ /** Previous date when rescheduled via status 'moved'. */
1632
+ movedFromDate?: string;
1633
+ createdAt: number;
1634
+ updatedAt: number;
1635
+ userId?: string;
1636
+ }
1637
+ interface NoteRevision {
1638
+ noteId: string;
1639
+ version: number;
1640
+ title: string;
1641
+ rawContent: string;
1642
+ tags?: string[];
1643
+ type?: NoteKind;
1644
+ notebookIds?: string[];
1645
+ blocks: Record<string, NoteBlock>;
1646
+ savedAt: number;
1647
+ userId?: string;
1648
+ }
1598
1649
 
1599
1650
  /**
1600
1651
  * Page placement — the resolved form of one `page_notes` junction row.
@@ -1682,6 +1733,23 @@ interface PlacementProjection {
1682
1733
  /** Project a note's placements onto the single-page fields. */
1683
1734
  declare function projectPlacements(placements: readonly NotePlacement[]): PlacementProjection;
1684
1735
 
1736
+ /**
1737
+ * Convert a duration/elapsed/total/time metric value into milliseconds.
1738
+ * Runtime and parser duration metrics (`DurationMetric`, `ElapsedMetric`,
1739
+ * `TotalMetric`) always carry milliseconds even when `unit` is omitted, so
1740
+ * unitless values on time-like types are treated as milliseconds — never `* 1000`.
1741
+ */
1742
+ declare function metricToMs(metric: {
1743
+ type?: IMetric['type'];
1744
+ value?: unknown;
1745
+ unit?: string;
1746
+ }): number | undefined;
1747
+ /**
1748
+ * Canonical rounded MM:SS (or H:MM:SS when >= 1 hour) duration formatter
1749
+ * shared across summary cards, spreadsheet grids, and stream cards.
1750
+ */
1751
+ declare function formatDurationMMSS(ms: number): string;
1752
+
1685
1753
  /**
1686
1754
  * State of a WOD block
1687
1755
  */
@@ -1819,6 +1887,43 @@ type NotebookOrigin = 'default' | 'user' | 'feed';
1819
1887
  declare function notebookSlugFromId(slugOrId: string): string;
1820
1888
  /** Normalize any notebook slug or id to the canonical `notebook/{slug}` form. */
1821
1889
  declare function toNotebookId(slugOrId: string): NotebookId;
1890
+ type NoteOwnershipKind = 'user' | 'feed' | 'system' | 'feed-archived';
1891
+ interface ResolvedNoteOwnership {
1892
+ kind: NoteOwnershipKind;
1893
+ /** Only `'user'` notes are editable in place. */
1894
+ editable: boolean;
1895
+ /** Only `'user'` notes outside non-publishable notebooks can publish. */
1896
+ canPublish: boolean;
1897
+ feedSourceId?: string;
1898
+ sourceNotebookId?: string;
1899
+ upstreamStatus?: NoteUpstreamStatus;
1900
+ }
1901
+ interface NoteOwnershipInput {
1902
+ id?: string;
1903
+ type?: string | null;
1904
+ seedOrigin?: string | null;
1905
+ feedOrigin?: string | null;
1906
+ feedSourceId?: string | null;
1907
+ sourceNotebookId?: string | null;
1908
+ notebookId?: string | null;
1909
+ notebookIds?: readonly string[] | null;
1910
+ sourceId?: string | null;
1911
+ sourcePath?: string | null;
1912
+ seedChunkId?: string | null;
1913
+ retention?: NoteRetention | null;
1914
+ upstreamStatus?: NoteUpstreamStatus | null;
1915
+ provenance?: {
1916
+ sourceNoteId?: string;
1917
+ feedSourceId?: string;
1918
+ sourceNotebookId?: string;
1919
+ } | null;
1920
+ }
1921
+ /**
1922
+ * Pure ownership classifier distinguishing user-authored notes, live feed
1923
+ * notes, system reference notes, and archived feed notes whose upstream feed
1924
+ * was unsubscribed or removed.
1925
+ */
1926
+ declare function resolveNoteOwnership(note: NoteOwnershipInput, notebookOrigin?: NotebookOrigin, resolvedNotebookId?: string): ResolvedNoteOwnership;
1822
1927
  /** Application-level editability rule (ticket 05): a note is editable when
1823
1928
  * its NOTEBOOK is user-owned. `notebookOrigin` is the origin of the note's
1824
1929
  * resolved notebook (`notebookOfItem` + the notebook registry) — feed-delivered
@@ -1827,11 +1932,7 @@ declare function toNotebookId(slugOrId: string): NotebookId;
1827
1932
  * provenance stamps. Without a resolved notebook origin the decision falls
1828
1933
  * back to the note's own stamps, which match the registry answer for every
1829
1934
  * importer-written row. */
1830
- declare function isNoteEditable(note: {
1831
- seedOrigin?: string | null;
1832
- feedOrigin?: string | null;
1833
- notebookId?: string | null;
1834
- }, notebookOrigin?: NotebookOrigin, resolvedNotebookId?: string): boolean;
1935
+ declare function isNoteEditable(note: NoteOwnershipInput, notebookOrigin?: NotebookOrigin, resolvedNotebookId?: string): boolean;
1835
1936
  interface BuiltinNotebookSpec {
1836
1937
  slug: string;
1837
1938
  notebookId: NotebookId;
@@ -1867,6 +1968,38 @@ declare const NOTEBOOK_TAG_PREFIX = "notebook:";
1867
1968
  declare const toNotebookTag: (notebookId: string) => string;
1868
1969
  declare const fromNotebookTag: (tag: string) => string | null;
1869
1970
  declare const isNotebookTag: (tag: string) => boolean;
1971
+ /** True when a note row is a Notebook landing page (`notebook/{slug}`). */
1972
+ declare function isNotebookLanding(note: {
1973
+ id: string;
1974
+ notebookId?: string | null;
1975
+ }): boolean;
1976
+ interface NotebookCapabilities {
1977
+ slug: string;
1978
+ isBuiltIn: boolean;
1979
+ isSystem: boolean;
1980
+ canEdit: boolean;
1981
+ canDelete: boolean;
1982
+ canTogglePublic: boolean;
1983
+ }
1984
+ /** Unified capability policy for Notebook edit, delete, and public-publish controls. */
1985
+ declare function getNotebookCapabilities(input: {
1986
+ slug?: string | null;
1987
+ notebookId?: string | null;
1988
+ id?: string | null;
1989
+ origin?: NotebookOrigin | string | null;
1990
+ feedId?: string | null;
1991
+ }): NotebookCapabilities;
1992
+ /** Count distinct non-landing member notes per `notebook/{slug}` across note fields and `notebook_links`. */
1993
+ declare function countNotesByNotebook<T extends {
1994
+ id: string;
1995
+ notebookId?: string | null;
1996
+ notebookIds?: readonly string[] | null;
1997
+ }>(notes: readonly T[], links?: readonly {
1998
+ notebookId: string;
1999
+ targetKind?: string;
2000
+ targetId?: string;
2001
+ noteId?: string;
2002
+ }[], resolveIds?: (note: T) => readonly string[]): Map<NotebookId, number>;
1870
2003
 
1871
2004
  /**
1872
2005
  * Represents a parsed workout script
@@ -2057,13 +2190,13 @@ declare function parseFrontmatterProps(lines: string[]): Record<string, string>;
2057
2190
  * Auto-generated build version metadata.
2058
2191
  * Do not edit directly; updated by scripts/stamp-version.ts
2059
2192
  */
2060
- declare const VERSION = "0.61.2259";
2061
- declare const GIT_SHA = "e65814e";
2062
- declare const BUILD_TIME = "2026-11-21T02:31:54.391Z";
2193
+ declare const VERSION = "0.62.2260";
2194
+ declare const GIT_SHA = "d3581b3";
2195
+ declare const BUILD_TIME = "2026-11-23T01:01:07.332Z";
2063
2196
  declare const SEMVER: {
2064
- readonly version: "0.61.2259";
2065
- readonly gitSha: "e65814e";
2066
- readonly buildTime: "2026-11-21T02:31:54.391Z";
2197
+ readonly version: "0.62.2260";
2198
+ readonly gitSha: "d3581b3";
2199
+ readonly buildTime: "2026-11-23T01:01:07.332Z";
2067
2200
  };
2068
2201
 
2069
2202
  interface NoteJsonlNote {
@@ -2078,6 +2211,7 @@ interface NoteJsonlNote {
2078
2211
  tags?: string[];
2079
2212
  type?: string;
2080
2213
  sourceId?: string;
2214
+ notebookIds?: string[];
2081
2215
  }
2082
2216
  interface ParseLoadRecord {
2083
2217
  id: string;
@@ -2095,6 +2229,9 @@ interface NoteTelemetryBundle {
2095
2229
  sessions: Session[];
2096
2230
  events: EventRecord[];
2097
2231
  revisions?: BlockRevision[];
2232
+ noteRevisions?: NoteRevision[];
2233
+ scheduleItems?: ScheduleItem[];
2234
+ notebookLinks?: NotebookLink[];
2098
2235
  parses?: ParseLoadRecord[];
2099
2236
  }
2100
2237
  interface NoteTelemetryBundleResult {
@@ -2106,8 +2243,13 @@ declare function streamNoteBundleToJsonlLines(bundles: Iterable<NoteTelemetryBun
2106
2243
  declare function parseNoteBundleFromJsonl(jsonlText: string): NoteTelemetryBundleResult;
2107
2244
 
2108
2245
  type PublicationVisibility = 'Private' | 'Published Note' | 'Published Note + Data';
2246
+ type PublicationStatusLabel = PublicationVisibility | 'Subscribed Feed' | 'Archived Feed' | 'System';
2109
2247
  interface PublicationVisibilitySummary {
2110
2248
  visibility: PublicationVisibility;
2249
+ /** Unambiguous status label that never labels non-owned notes (`kind !== 'user'`) as `'Private'`. */
2250
+ displayLabel?: PublicationStatusLabel;
2251
+ ownership?: ResolvedNoteOwnership;
2252
+ canPublish?: boolean;
2111
2253
  notebookPublic: boolean;
2112
2254
  publicSessions: number;
2113
2255
  totalSessions: number;
@@ -2115,7 +2257,8 @@ interface PublicationVisibilitySummary {
2115
2257
  notebookIds?: string[];
2116
2258
  publicNotebookIds?: string[];
2117
2259
  }
2118
- declare function isPublishableNotebookLanding(note: Pick<Note, 'id' | 'notebookId' | 'feedOrigin' | 'seedOrigin'>): boolean;
2260
+ declare function isPublishableNotebookLanding(note: Pick<Note, 'id' | 'notebookId' | 'feedOrigin' | 'seedOrigin' | 'retention' | 'upstreamStatus'>): boolean;
2261
+ declare function derivePublicationStatusLabel(visibility: PublicationVisibility, ownership?: Pick<ResolvedNoteOwnership, 'kind'>): PublicationStatusLabel;
2119
2262
  declare function derivePublicationVisibility(input: {
2120
2263
  notebookPublic?: boolean;
2121
2264
  publicSessions: number;
@@ -2123,6 +2266,8 @@ declare function derivePublicationVisibility(input: {
2123
2266
  notebookId?: string;
2124
2267
  notebookIds?: string[];
2125
2268
  publicNotebookIds?: string[];
2269
+ ownership?: ResolvedNoteOwnership;
2270
+ note?: NoteOwnershipInput;
2126
2271
  }): PublicationVisibilitySummary;
2127
2272
 
2128
- export { type AnalyticsDataPoint, type AnalyticsGraphConfig, type AnalyticsGroup, type Attachment, BUILD_TIME, BUILTIN_NOTEBOOKS, type BlockEffort, type BlockEquipment, type BlockIndexRow, BlockKey, type BlockRevision, type BuiltinNotebookSpec, type CatalogBackfillState, CodeMetadata, CodeStatement, DEFAULT_NOTEBOOK_SLUGS, type DefaultNotebookSlug, type DialectAnalysis, type DimensionKey, type DisplayStatus, type EventGrain, type EventRecord, type FeedCatalogTier, type FeedId, type FeedNotebookCatalogRow, type FeedOrigin, type FeedSourceCatalogRow, type FenceDialect, type FieldCatalogEntry, type FieldContribution, type FieldLeaf, type FieldRef, type FieldSourceRecord, type FieldValueKind, type FieldValueRecord, type FrontMatterSubtype, type FrontmatterPatchValue, GIT_SHA, type IBlockKey, type ICodeMetadata, type ICodeStatement, type IDialect, type IDialectTagDescriptor, type IMetric, type IMetricOwnershipResolver, type IMetricSource, type IOutputStatement, type IScript, type ITagSource, KNOWN_OUTPUT_TYPES, KNOWN_SECTION_WIDGETS, LEGACY_ORIGIN_TO_OWNERSHIP_LAYER, type LinkWidget, METRIC_OWNERSHIP_LAYER_CHAIN, type Membership, Metric, type MetricAction, MetricContainer, type MetricFilter, type MetricOrigin, type MetricOwnershipLayer, type MetricOwnershipLedger, type MetricOwnershipOutcome, type MetricOwnershipPromotionCandidate, type MetricOwnershipQuery, type MetricOwnershipResolvedContribution, type MetricOwnershipTypeExplanation, type MetricTemporal, MetricType, type MetricWithOptionalOwnershipLayer, NON_PUBLISHABLE_NOTEBOOK_SLUGS, NOTEBOOK_TAG_PREFIX, type Note, type NoteBlock, type NoteBlockChange, type NoteBlockKind, type NoteJsonlNote, type NoteKind, type NotePlacement, type NoteProvenance, type NoteTag, type NoteTelemetryBundle, type NoteTelemetryBundleResult, type Notebook, type NotebookId, type NotebookLink, type NotebookLinkTargetKind, type NotebookOrigin, type NullValueKind, type Origin, OutputStatement, type OutputStatementOptions, type OutputStatementType, type OverridePropertyKind, OwnershipResolver, type Page, type PageNote, type PageTarget, type ParseError, type ParseLoadRecord, ParsedCodeStatement, type ParsedFrontmatter, type PlacementProjection, type PublicationVisibility, type PublicationVisibilitySummary, READONLY_SYSTEM_NOTEBOOK_SLUGS, REFERENCE_METADATA_KEY, type ReconcileNoteBlocksOptions, type ReducerStats, type ReferenceDiagnostic, type ReferenceDiagnosticReason, type ReferenceKind, type ReferenceMatchKind, type ReferenceMetadata, type ReferenceRef, type ResultOrigin, SEMVER, SYSTEM_DEFAULT_OUTPUT_UNIT, type ScopedPropertyOverride, type ScriptBlock, type ScriptBlockState, type Section, type SectionDocument, type SectionRecognitionOptions, type SectionType, type Segment, type Session, type StoredOutputStatement, type SummaryCoverage, TAG_REFERENCE_METADATA_KEY, type Tag, type TagContribution, type TagDefinition, type TagFunctionContribution, type TagIndex, type TagMetricContribution, type TagReferenceMetadata, type TagTagContribution, type TagType, type TagTypeRecord, type TimeSpan, type TypedTagItem, UNIT_CATALOG, UnitConversionError, type UnitDefinition, type UnitErrorCode, VALID_FENCE_DIALECTS, VERSION, type VisualizerFilter, type VisualizerSize, type WorkoutResults, type WorkoutSectionType, actionableSectionKind, blockContentId, buildRawContent, calculateTotalLines, comparePlacements, convertViaCatalog, createMetricOwnershipLedger, createTagIndex, derivePublicationVisibility, detectScriptBlocks, dimensionKeyOf, extractBlockContent, extractFrontmatterTags, extractTypedFrontmatterTags, fieldRefFromKey, fieldRefKey, findBlockAtLine, flattenFieldLeaves, fromNotebookTag, getList, getMetricOwnershipLayer, getReferenceMetadata, getScalar, getTagReference, isNonPublishableNotebook, isNoteEditable, isNotebookTag, isPublishableNotebookLanding, isSystemReadOnlyNotebook, isWorkoutSectionType, lookupUnit, mapNoteBlockChanges, matchDialectFence, normalizeFieldComponent, normalizeFieldPath, notebookSlugFromId, orderPlacements, ownershipRank, parseDocumentSections, parseFlatProperties, parseFrontmatter, parseFrontmatterBody, parseFrontmatterCategories, parseFrontmatterProps, parseNoteBundleFromJsonl, patchFrontmatterProperty, projectPlacements, reconcileNoteBlocks, resolveLayer, resolvePlacements, runAffordance, serializeFrontmatter, serializeNoteBundleToJsonl, streamNoteBundleToJsonlLines, stripFrontmatter, systemDefaultUnit, toNotebookId, toNotebookTag, validateNoteBlocks, valueKindOf };
2273
+ export { type AnalyticsDataPoint, type AnalyticsGraphConfig, type AnalyticsGroup, type Attachment, BUILD_TIME, BUILTIN_NOTEBOOKS, type BlockEffort, type BlockEquipment, type BlockIndexRow, BlockKey, type BlockRevision, type BuiltinNotebookSpec, type CatalogBackfillState, CodeMetadata, CodeStatement, DEFAULT_NOTEBOOK_SLUGS, type DefaultNotebookSlug, type DialectAnalysis, type DimensionKey, type DisplayStatus, type EventGrain, type EventRecord, type FeedCatalogTier, type FeedId, type FeedNotebookCatalogRow, type FeedOrigin, type FeedSourceCatalogRow, type FenceDialect, type FieldCatalogEntry, type FieldContribution, type FieldLeaf, type FieldRef, type FieldSourceRecord, type FieldValueKind, type FieldValueRecord, type FrontMatterSubtype, type FrontmatterPatchValue, GIT_SHA, type IBlockKey, type ICodeMetadata, type ICodeStatement, type IDialect, type IDialectTagDescriptor, type IMetric, type IMetricOwnershipResolver, type IMetricSource, type IOutputStatement, type IScript, type ITagSource, KNOWN_OUTPUT_TYPES, KNOWN_SECTION_WIDGETS, LEGACY_ORIGIN_TO_OWNERSHIP_LAYER, type LinkWidget, METRIC_OWNERSHIP_LAYER_CHAIN, type Membership, Metric, type MetricAction, MetricContainer, type MetricFilter, type MetricOrigin, type MetricOwnershipLayer, type MetricOwnershipLedger, type MetricOwnershipOutcome, type MetricOwnershipPromotionCandidate, type MetricOwnershipQuery, type MetricOwnershipResolvedContribution, type MetricOwnershipTypeExplanation, type MetricTemporal, MetricType, type MetricWithOptionalOwnershipLayer, NON_PUBLISHABLE_NOTEBOOK_SLUGS, NOTEBOOK_TAG_PREFIX, type Note, type NoteBlock, type NoteBlockChange, type NoteBlockKind, type NoteJsonlNote, type NoteKind, type NoteOwnershipInput, type NoteOwnershipKind, type NotePlacement, type NoteProvenance, type NoteRetention, type NoteRevision, type NoteTag, type NoteTelemetryBundle, type NoteTelemetryBundleResult, type NoteUpstreamStatus, type Notebook, type NotebookCapabilities, type NotebookId, type NotebookLink, type NotebookLinkTargetKind, type NotebookOrigin, type NullValueKind, type Origin, OutputStatement, type OutputStatementOptions, type OutputStatementType, type OverridePropertyKind, OwnershipResolver, type Page, type PageNote, type PageTarget, type ParseError, type ParseLoadRecord, ParsedCodeStatement, type ParsedFrontmatter, type PlacementProjection, type PublicationStatusLabel, type PublicationVisibility, type PublicationVisibilitySummary, READONLY_SYSTEM_NOTEBOOK_SLUGS, REFERENCE_METADATA_KEY, type ReconcileNoteBlocksOptions, type ReducerStats, type ReferenceDiagnostic, type ReferenceDiagnosticReason, type ReferenceKind, type ReferenceMatchKind, type ReferenceMetadata, type ReferenceRef, type ResolvedNoteOwnership, type ResultOrigin, SEMVER, SYSTEM_DEFAULT_OUTPUT_UNIT, type ScheduleItem, type ScheduleStatus, type ScopedPropertyOverride, type ScriptBlock, type ScriptBlockState, type Section, type SectionDocument, type SectionRecognitionOptions, type SectionType, type Segment, type Session, type StoredOutputStatement, type SummaryCoverage, TAG_REFERENCE_METADATA_KEY, type Tag, type TagContribution, type TagDefinition, type TagFunctionContribution, type TagIndex, type TagMetricContribution, type TagReferenceMetadata, type TagTagContribution, type TagType, type TagTypeRecord, type TimeSpan, type TypedTagItem, UNIT_CATALOG, UnitConversionError, type UnitDefinition, type UnitErrorCode, VALID_FENCE_DIALECTS, VERSION, type VisualizerFilter, type VisualizerSize, type WorkoutResults, type WorkoutSectionType, actionableSectionKind, blockContentId, buildRawContent, calculateTotalLines, comparePlacements, convertViaCatalog, countNotesByNotebook, createMetricOwnershipLedger, createTagIndex, derivePublicationStatusLabel, derivePublicationVisibility, detectScriptBlocks, dimensionKeyOf, extractBlockContent, extractFrontmatterTags, extractTypedFrontmatterTags, fieldRefFromKey, fieldRefKey, findBlockAtLine, flattenFieldLeaves, formatDurationMMSS, fromNotebookTag, getList, getMetricOwnershipLayer, getNotebookCapabilities, getReferenceMetadata, getScalar, getTagReference, isNonPublishableNotebook, isNoteEditable, isNotebookLanding, isNotebookTag, isPublishableNotebookLanding, isSystemReadOnlyNotebook, isWorkoutSectionType, lookupUnit, mapNoteBlockChanges, matchDialectFence, metricToMs, normalizeFieldComponent, normalizeFieldPath, notebookSlugFromId, orderPlacements, ownershipRank, parseDocumentSections, parseFlatProperties, parseFrontmatter, parseFrontmatterBody, parseFrontmatterCategories, parseFrontmatterProps, parseNoteBundleFromJsonl, patchFrontmatterProperty, projectPlacements, reconcileNoteBlocks, resolveLayer, resolveNoteOwnership, resolvePlacements, runAffordance, serializeFrontmatter, serializeNoteBundleToJsonl, streamNoteBundleToJsonlLines, stripFrontmatter, systemDefaultUnit, toNotebookId, toNotebookTag, validateNoteBlocks, valueKindOf };
package/dist/index.d.ts CHANGED
@@ -1187,6 +1187,8 @@ interface NoteProvenance {
1187
1187
  /** Epoch-ms timestamp when the clone was created. */
1188
1188
  clonedAt: number;
1189
1189
  }
1190
+ type NoteRetention = 'indexed' | 'cached' | 'schedule-pinned' | 'session-pinned';
1191
+ type NoteUpstreamStatus = 'live' | 'unsubscribed' | 'removed';
1190
1192
  interface Note {
1191
1193
  id: string;
1192
1194
  title: string;
@@ -1222,6 +1224,11 @@ interface Note {
1222
1224
  seedCommit?: string;
1223
1225
  /** Whether a user-owned notebook landing note (`notebook/{slug}`) publishes its member notes to the outbound Feed. */
1224
1226
  public?: boolean;
1227
+ /** Local retention tier for external/feed notes ('indexed' remote preview,
1228
+ * 'cached' locally materialized, or 'session-pinned' immutable archival copy). */
1229
+ retention?: NoteRetention;
1230
+ /** Lifecycle state of the upstream feed record when known. */
1231
+ upstreamStatus?: NoteUpstreamStatus;
1225
1232
  }
1226
1233
  interface Page {
1227
1234
  id: string;
@@ -1299,11 +1306,17 @@ type ResultOrigin = 'journal' | 'playground' | 'user';
1299
1306
  interface Session {
1300
1307
  id: string;
1301
1308
  noteId: string;
1309
+ /** Note `sourceRevision` pinned when this Session ran (matches NoteRevision [noteId, version]). */
1310
+ noteSourceRevision?: number;
1302
1311
  blockId: string;
1303
1312
  blockVersion: number;
1304
1313
  blockContentId?: string;
1305
1314
  origin?: ResultOrigin;
1306
1315
  pageId?: string;
1316
+ /** Mutable civil 'YYYY-MM-DD' training-day attribution on the Journal overlay. */
1317
+ sessionDate?: string;
1318
+ /** Optional pairing to a planned ScheduleItem fulfilled by this Session (1:N). */
1319
+ scheduleItemId?: string;
1307
1320
  /** Born in-progress at run start, completed when finalization commits. */
1308
1321
  status?: 'in-progress' | 'completed';
1309
1322
  /** When workout started */
@@ -1595,6 +1608,44 @@ interface Membership {
1595
1608
  createdAt: number;
1596
1609
  updatedAt?: number;
1597
1610
  }
1611
+ type ScheduleStatus = 'planned' | 'completed' | 'skipped' | 'moved';
1612
+ interface ScheduleItem {
1613
+ id: string;
1614
+ /** Local civil 'YYYY-MM-DD' training date. */
1615
+ date: string;
1616
+ noteId: string;
1617
+ /** Backing Journal Day Page UUID (`page` store) when present. */
1618
+ pageId?: string;
1619
+ /** Provenance Notebook identifier captured when scheduled. */
1620
+ sourceNotebookId?: string;
1621
+ /** Graceful fallback title when a scheduled remote Note is uncached offline. */
1622
+ fallbackTitle?: string;
1623
+ /** Optional single workout block within a multi-block Note. */
1624
+ blockId?: string;
1625
+ position: number;
1626
+ /** Optional session slot label (e.g. 'AM', 'PM', 'Warm-up'). */
1627
+ slot?: string;
1628
+ status: ScheduleStatus;
1629
+ /** Lightweight Day Cue stored on the instance without mutating the Note. */
1630
+ notes?: string;
1631
+ /** Previous date when rescheduled via status 'moved'. */
1632
+ movedFromDate?: string;
1633
+ createdAt: number;
1634
+ updatedAt: number;
1635
+ userId?: string;
1636
+ }
1637
+ interface NoteRevision {
1638
+ noteId: string;
1639
+ version: number;
1640
+ title: string;
1641
+ rawContent: string;
1642
+ tags?: string[];
1643
+ type?: NoteKind;
1644
+ notebookIds?: string[];
1645
+ blocks: Record<string, NoteBlock>;
1646
+ savedAt: number;
1647
+ userId?: string;
1648
+ }
1598
1649
 
1599
1650
  /**
1600
1651
  * Page placement — the resolved form of one `page_notes` junction row.
@@ -1682,6 +1733,23 @@ interface PlacementProjection {
1682
1733
  /** Project a note's placements onto the single-page fields. */
1683
1734
  declare function projectPlacements(placements: readonly NotePlacement[]): PlacementProjection;
1684
1735
 
1736
+ /**
1737
+ * Convert a duration/elapsed/total/time metric value into milliseconds.
1738
+ * Runtime and parser duration metrics (`DurationMetric`, `ElapsedMetric`,
1739
+ * `TotalMetric`) always carry milliseconds even when `unit` is omitted, so
1740
+ * unitless values on time-like types are treated as milliseconds — never `* 1000`.
1741
+ */
1742
+ declare function metricToMs(metric: {
1743
+ type?: IMetric['type'];
1744
+ value?: unknown;
1745
+ unit?: string;
1746
+ }): number | undefined;
1747
+ /**
1748
+ * Canonical rounded MM:SS (or H:MM:SS when >= 1 hour) duration formatter
1749
+ * shared across summary cards, spreadsheet grids, and stream cards.
1750
+ */
1751
+ declare function formatDurationMMSS(ms: number): string;
1752
+
1685
1753
  /**
1686
1754
  * State of a WOD block
1687
1755
  */
@@ -1819,6 +1887,43 @@ type NotebookOrigin = 'default' | 'user' | 'feed';
1819
1887
  declare function notebookSlugFromId(slugOrId: string): string;
1820
1888
  /** Normalize any notebook slug or id to the canonical `notebook/{slug}` form. */
1821
1889
  declare function toNotebookId(slugOrId: string): NotebookId;
1890
+ type NoteOwnershipKind = 'user' | 'feed' | 'system' | 'feed-archived';
1891
+ interface ResolvedNoteOwnership {
1892
+ kind: NoteOwnershipKind;
1893
+ /** Only `'user'` notes are editable in place. */
1894
+ editable: boolean;
1895
+ /** Only `'user'` notes outside non-publishable notebooks can publish. */
1896
+ canPublish: boolean;
1897
+ feedSourceId?: string;
1898
+ sourceNotebookId?: string;
1899
+ upstreamStatus?: NoteUpstreamStatus;
1900
+ }
1901
+ interface NoteOwnershipInput {
1902
+ id?: string;
1903
+ type?: string | null;
1904
+ seedOrigin?: string | null;
1905
+ feedOrigin?: string | null;
1906
+ feedSourceId?: string | null;
1907
+ sourceNotebookId?: string | null;
1908
+ notebookId?: string | null;
1909
+ notebookIds?: readonly string[] | null;
1910
+ sourceId?: string | null;
1911
+ sourcePath?: string | null;
1912
+ seedChunkId?: string | null;
1913
+ retention?: NoteRetention | null;
1914
+ upstreamStatus?: NoteUpstreamStatus | null;
1915
+ provenance?: {
1916
+ sourceNoteId?: string;
1917
+ feedSourceId?: string;
1918
+ sourceNotebookId?: string;
1919
+ } | null;
1920
+ }
1921
+ /**
1922
+ * Pure ownership classifier distinguishing user-authored notes, live feed
1923
+ * notes, system reference notes, and archived feed notes whose upstream feed
1924
+ * was unsubscribed or removed.
1925
+ */
1926
+ declare function resolveNoteOwnership(note: NoteOwnershipInput, notebookOrigin?: NotebookOrigin, resolvedNotebookId?: string): ResolvedNoteOwnership;
1822
1927
  /** Application-level editability rule (ticket 05): a note is editable when
1823
1928
  * its NOTEBOOK is user-owned. `notebookOrigin` is the origin of the note's
1824
1929
  * resolved notebook (`notebookOfItem` + the notebook registry) — feed-delivered
@@ -1827,11 +1932,7 @@ declare function toNotebookId(slugOrId: string): NotebookId;
1827
1932
  * provenance stamps. Without a resolved notebook origin the decision falls
1828
1933
  * back to the note's own stamps, which match the registry answer for every
1829
1934
  * importer-written row. */
1830
- declare function isNoteEditable(note: {
1831
- seedOrigin?: string | null;
1832
- feedOrigin?: string | null;
1833
- notebookId?: string | null;
1834
- }, notebookOrigin?: NotebookOrigin, resolvedNotebookId?: string): boolean;
1935
+ declare function isNoteEditable(note: NoteOwnershipInput, notebookOrigin?: NotebookOrigin, resolvedNotebookId?: string): boolean;
1835
1936
  interface BuiltinNotebookSpec {
1836
1937
  slug: string;
1837
1938
  notebookId: NotebookId;
@@ -1867,6 +1968,38 @@ declare const NOTEBOOK_TAG_PREFIX = "notebook:";
1867
1968
  declare const toNotebookTag: (notebookId: string) => string;
1868
1969
  declare const fromNotebookTag: (tag: string) => string | null;
1869
1970
  declare const isNotebookTag: (tag: string) => boolean;
1971
+ /** True when a note row is a Notebook landing page (`notebook/{slug}`). */
1972
+ declare function isNotebookLanding(note: {
1973
+ id: string;
1974
+ notebookId?: string | null;
1975
+ }): boolean;
1976
+ interface NotebookCapabilities {
1977
+ slug: string;
1978
+ isBuiltIn: boolean;
1979
+ isSystem: boolean;
1980
+ canEdit: boolean;
1981
+ canDelete: boolean;
1982
+ canTogglePublic: boolean;
1983
+ }
1984
+ /** Unified capability policy for Notebook edit, delete, and public-publish controls. */
1985
+ declare function getNotebookCapabilities(input: {
1986
+ slug?: string | null;
1987
+ notebookId?: string | null;
1988
+ id?: string | null;
1989
+ origin?: NotebookOrigin | string | null;
1990
+ feedId?: string | null;
1991
+ }): NotebookCapabilities;
1992
+ /** Count distinct non-landing member notes per `notebook/{slug}` across note fields and `notebook_links`. */
1993
+ declare function countNotesByNotebook<T extends {
1994
+ id: string;
1995
+ notebookId?: string | null;
1996
+ notebookIds?: readonly string[] | null;
1997
+ }>(notes: readonly T[], links?: readonly {
1998
+ notebookId: string;
1999
+ targetKind?: string;
2000
+ targetId?: string;
2001
+ noteId?: string;
2002
+ }[], resolveIds?: (note: T) => readonly string[]): Map<NotebookId, number>;
1870
2003
 
1871
2004
  /**
1872
2005
  * Represents a parsed workout script
@@ -2057,13 +2190,13 @@ declare function parseFrontmatterProps(lines: string[]): Record<string, string>;
2057
2190
  * Auto-generated build version metadata.
2058
2191
  * Do not edit directly; updated by scripts/stamp-version.ts
2059
2192
  */
2060
- declare const VERSION = "0.61.2259";
2061
- declare const GIT_SHA = "e65814e";
2062
- declare const BUILD_TIME = "2026-11-21T02:31:54.391Z";
2193
+ declare const VERSION = "0.62.2260";
2194
+ declare const GIT_SHA = "d3581b3";
2195
+ declare const BUILD_TIME = "2026-11-23T01:01:07.332Z";
2063
2196
  declare const SEMVER: {
2064
- readonly version: "0.61.2259";
2065
- readonly gitSha: "e65814e";
2066
- readonly buildTime: "2026-11-21T02:31:54.391Z";
2197
+ readonly version: "0.62.2260";
2198
+ readonly gitSha: "d3581b3";
2199
+ readonly buildTime: "2026-11-23T01:01:07.332Z";
2067
2200
  };
2068
2201
 
2069
2202
  interface NoteJsonlNote {
@@ -2078,6 +2211,7 @@ interface NoteJsonlNote {
2078
2211
  tags?: string[];
2079
2212
  type?: string;
2080
2213
  sourceId?: string;
2214
+ notebookIds?: string[];
2081
2215
  }
2082
2216
  interface ParseLoadRecord {
2083
2217
  id: string;
@@ -2095,6 +2229,9 @@ interface NoteTelemetryBundle {
2095
2229
  sessions: Session[];
2096
2230
  events: EventRecord[];
2097
2231
  revisions?: BlockRevision[];
2232
+ noteRevisions?: NoteRevision[];
2233
+ scheduleItems?: ScheduleItem[];
2234
+ notebookLinks?: NotebookLink[];
2098
2235
  parses?: ParseLoadRecord[];
2099
2236
  }
2100
2237
  interface NoteTelemetryBundleResult {
@@ -2106,8 +2243,13 @@ declare function streamNoteBundleToJsonlLines(bundles: Iterable<NoteTelemetryBun
2106
2243
  declare function parseNoteBundleFromJsonl(jsonlText: string): NoteTelemetryBundleResult;
2107
2244
 
2108
2245
  type PublicationVisibility = 'Private' | 'Published Note' | 'Published Note + Data';
2246
+ type PublicationStatusLabel = PublicationVisibility | 'Subscribed Feed' | 'Archived Feed' | 'System';
2109
2247
  interface PublicationVisibilitySummary {
2110
2248
  visibility: PublicationVisibility;
2249
+ /** Unambiguous status label that never labels non-owned notes (`kind !== 'user'`) as `'Private'`. */
2250
+ displayLabel?: PublicationStatusLabel;
2251
+ ownership?: ResolvedNoteOwnership;
2252
+ canPublish?: boolean;
2111
2253
  notebookPublic: boolean;
2112
2254
  publicSessions: number;
2113
2255
  totalSessions: number;
@@ -2115,7 +2257,8 @@ interface PublicationVisibilitySummary {
2115
2257
  notebookIds?: string[];
2116
2258
  publicNotebookIds?: string[];
2117
2259
  }
2118
- declare function isPublishableNotebookLanding(note: Pick<Note, 'id' | 'notebookId' | 'feedOrigin' | 'seedOrigin'>): boolean;
2260
+ declare function isPublishableNotebookLanding(note: Pick<Note, 'id' | 'notebookId' | 'feedOrigin' | 'seedOrigin' | 'retention' | 'upstreamStatus'>): boolean;
2261
+ declare function derivePublicationStatusLabel(visibility: PublicationVisibility, ownership?: Pick<ResolvedNoteOwnership, 'kind'>): PublicationStatusLabel;
2119
2262
  declare function derivePublicationVisibility(input: {
2120
2263
  notebookPublic?: boolean;
2121
2264
  publicSessions: number;
@@ -2123,6 +2266,8 @@ declare function derivePublicationVisibility(input: {
2123
2266
  notebookId?: string;
2124
2267
  notebookIds?: string[];
2125
2268
  publicNotebookIds?: string[];
2269
+ ownership?: ResolvedNoteOwnership;
2270
+ note?: NoteOwnershipInput;
2126
2271
  }): PublicationVisibilitySummary;
2127
2272
 
2128
- export { type AnalyticsDataPoint, type AnalyticsGraphConfig, type AnalyticsGroup, type Attachment, BUILD_TIME, BUILTIN_NOTEBOOKS, type BlockEffort, type BlockEquipment, type BlockIndexRow, BlockKey, type BlockRevision, type BuiltinNotebookSpec, type CatalogBackfillState, CodeMetadata, CodeStatement, DEFAULT_NOTEBOOK_SLUGS, type DefaultNotebookSlug, type DialectAnalysis, type DimensionKey, type DisplayStatus, type EventGrain, type EventRecord, type FeedCatalogTier, type FeedId, type FeedNotebookCatalogRow, type FeedOrigin, type FeedSourceCatalogRow, type FenceDialect, type FieldCatalogEntry, type FieldContribution, type FieldLeaf, type FieldRef, type FieldSourceRecord, type FieldValueKind, type FieldValueRecord, type FrontMatterSubtype, type FrontmatterPatchValue, GIT_SHA, type IBlockKey, type ICodeMetadata, type ICodeStatement, type IDialect, type IDialectTagDescriptor, type IMetric, type IMetricOwnershipResolver, type IMetricSource, type IOutputStatement, type IScript, type ITagSource, KNOWN_OUTPUT_TYPES, KNOWN_SECTION_WIDGETS, LEGACY_ORIGIN_TO_OWNERSHIP_LAYER, type LinkWidget, METRIC_OWNERSHIP_LAYER_CHAIN, type Membership, Metric, type MetricAction, MetricContainer, type MetricFilter, type MetricOrigin, type MetricOwnershipLayer, type MetricOwnershipLedger, type MetricOwnershipOutcome, type MetricOwnershipPromotionCandidate, type MetricOwnershipQuery, type MetricOwnershipResolvedContribution, type MetricOwnershipTypeExplanation, type MetricTemporal, MetricType, type MetricWithOptionalOwnershipLayer, NON_PUBLISHABLE_NOTEBOOK_SLUGS, NOTEBOOK_TAG_PREFIX, type Note, type NoteBlock, type NoteBlockChange, type NoteBlockKind, type NoteJsonlNote, type NoteKind, type NotePlacement, type NoteProvenance, type NoteTag, type NoteTelemetryBundle, type NoteTelemetryBundleResult, type Notebook, type NotebookId, type NotebookLink, type NotebookLinkTargetKind, type NotebookOrigin, type NullValueKind, type Origin, OutputStatement, type OutputStatementOptions, type OutputStatementType, type OverridePropertyKind, OwnershipResolver, type Page, type PageNote, type PageTarget, type ParseError, type ParseLoadRecord, ParsedCodeStatement, type ParsedFrontmatter, type PlacementProjection, type PublicationVisibility, type PublicationVisibilitySummary, READONLY_SYSTEM_NOTEBOOK_SLUGS, REFERENCE_METADATA_KEY, type ReconcileNoteBlocksOptions, type ReducerStats, type ReferenceDiagnostic, type ReferenceDiagnosticReason, type ReferenceKind, type ReferenceMatchKind, type ReferenceMetadata, type ReferenceRef, type ResultOrigin, SEMVER, SYSTEM_DEFAULT_OUTPUT_UNIT, type ScopedPropertyOverride, type ScriptBlock, type ScriptBlockState, type Section, type SectionDocument, type SectionRecognitionOptions, type SectionType, type Segment, type Session, type StoredOutputStatement, type SummaryCoverage, TAG_REFERENCE_METADATA_KEY, type Tag, type TagContribution, type TagDefinition, type TagFunctionContribution, type TagIndex, type TagMetricContribution, type TagReferenceMetadata, type TagTagContribution, type TagType, type TagTypeRecord, type TimeSpan, type TypedTagItem, UNIT_CATALOG, UnitConversionError, type UnitDefinition, type UnitErrorCode, VALID_FENCE_DIALECTS, VERSION, type VisualizerFilter, type VisualizerSize, type WorkoutResults, type WorkoutSectionType, actionableSectionKind, blockContentId, buildRawContent, calculateTotalLines, comparePlacements, convertViaCatalog, createMetricOwnershipLedger, createTagIndex, derivePublicationVisibility, detectScriptBlocks, dimensionKeyOf, extractBlockContent, extractFrontmatterTags, extractTypedFrontmatterTags, fieldRefFromKey, fieldRefKey, findBlockAtLine, flattenFieldLeaves, fromNotebookTag, getList, getMetricOwnershipLayer, getReferenceMetadata, getScalar, getTagReference, isNonPublishableNotebook, isNoteEditable, isNotebookTag, isPublishableNotebookLanding, isSystemReadOnlyNotebook, isWorkoutSectionType, lookupUnit, mapNoteBlockChanges, matchDialectFence, normalizeFieldComponent, normalizeFieldPath, notebookSlugFromId, orderPlacements, ownershipRank, parseDocumentSections, parseFlatProperties, parseFrontmatter, parseFrontmatterBody, parseFrontmatterCategories, parseFrontmatterProps, parseNoteBundleFromJsonl, patchFrontmatterProperty, projectPlacements, reconcileNoteBlocks, resolveLayer, resolvePlacements, runAffordance, serializeFrontmatter, serializeNoteBundleToJsonl, streamNoteBundleToJsonlLines, stripFrontmatter, systemDefaultUnit, toNotebookId, toNotebookTag, validateNoteBlocks, valueKindOf };
2273
+ export { type AnalyticsDataPoint, type AnalyticsGraphConfig, type AnalyticsGroup, type Attachment, BUILD_TIME, BUILTIN_NOTEBOOKS, type BlockEffort, type BlockEquipment, type BlockIndexRow, BlockKey, type BlockRevision, type BuiltinNotebookSpec, type CatalogBackfillState, CodeMetadata, CodeStatement, DEFAULT_NOTEBOOK_SLUGS, type DefaultNotebookSlug, type DialectAnalysis, type DimensionKey, type DisplayStatus, type EventGrain, type EventRecord, type FeedCatalogTier, type FeedId, type FeedNotebookCatalogRow, type FeedOrigin, type FeedSourceCatalogRow, type FenceDialect, type FieldCatalogEntry, type FieldContribution, type FieldLeaf, type FieldRef, type FieldSourceRecord, type FieldValueKind, type FieldValueRecord, type FrontMatterSubtype, type FrontmatterPatchValue, GIT_SHA, type IBlockKey, type ICodeMetadata, type ICodeStatement, type IDialect, type IDialectTagDescriptor, type IMetric, type IMetricOwnershipResolver, type IMetricSource, type IOutputStatement, type IScript, type ITagSource, KNOWN_OUTPUT_TYPES, KNOWN_SECTION_WIDGETS, LEGACY_ORIGIN_TO_OWNERSHIP_LAYER, type LinkWidget, METRIC_OWNERSHIP_LAYER_CHAIN, type Membership, Metric, type MetricAction, MetricContainer, type MetricFilter, type MetricOrigin, type MetricOwnershipLayer, type MetricOwnershipLedger, type MetricOwnershipOutcome, type MetricOwnershipPromotionCandidate, type MetricOwnershipQuery, type MetricOwnershipResolvedContribution, type MetricOwnershipTypeExplanation, type MetricTemporal, MetricType, type MetricWithOptionalOwnershipLayer, NON_PUBLISHABLE_NOTEBOOK_SLUGS, NOTEBOOK_TAG_PREFIX, type Note, type NoteBlock, type NoteBlockChange, type NoteBlockKind, type NoteJsonlNote, type NoteKind, type NoteOwnershipInput, type NoteOwnershipKind, type NotePlacement, type NoteProvenance, type NoteRetention, type NoteRevision, type NoteTag, type NoteTelemetryBundle, type NoteTelemetryBundleResult, type NoteUpstreamStatus, type Notebook, type NotebookCapabilities, type NotebookId, type NotebookLink, type NotebookLinkTargetKind, type NotebookOrigin, type NullValueKind, type Origin, OutputStatement, type OutputStatementOptions, type OutputStatementType, type OverridePropertyKind, OwnershipResolver, type Page, type PageNote, type PageTarget, type ParseError, type ParseLoadRecord, ParsedCodeStatement, type ParsedFrontmatter, type PlacementProjection, type PublicationStatusLabel, type PublicationVisibility, type PublicationVisibilitySummary, READONLY_SYSTEM_NOTEBOOK_SLUGS, REFERENCE_METADATA_KEY, type ReconcileNoteBlocksOptions, type ReducerStats, type ReferenceDiagnostic, type ReferenceDiagnosticReason, type ReferenceKind, type ReferenceMatchKind, type ReferenceMetadata, type ReferenceRef, type ResolvedNoteOwnership, type ResultOrigin, SEMVER, SYSTEM_DEFAULT_OUTPUT_UNIT, type ScheduleItem, type ScheduleStatus, type ScopedPropertyOverride, type ScriptBlock, type ScriptBlockState, type Section, type SectionDocument, type SectionRecognitionOptions, type SectionType, type Segment, type Session, type StoredOutputStatement, type SummaryCoverage, TAG_REFERENCE_METADATA_KEY, type Tag, type TagContribution, type TagDefinition, type TagFunctionContribution, type TagIndex, type TagMetricContribution, type TagReferenceMetadata, type TagTagContribution, type TagType, type TagTypeRecord, type TimeSpan, type TypedTagItem, UNIT_CATALOG, UnitConversionError, type UnitDefinition, type UnitErrorCode, VALID_FENCE_DIALECTS, VERSION, type VisualizerFilter, type VisualizerSize, type WorkoutResults, type WorkoutSectionType, actionableSectionKind, blockContentId, buildRawContent, calculateTotalLines, comparePlacements, convertViaCatalog, countNotesByNotebook, createMetricOwnershipLedger, createTagIndex, derivePublicationStatusLabel, derivePublicationVisibility, detectScriptBlocks, dimensionKeyOf, extractBlockContent, extractFrontmatterTags, extractTypedFrontmatterTags, fieldRefFromKey, fieldRefKey, findBlockAtLine, flattenFieldLeaves, formatDurationMMSS, fromNotebookTag, getList, getMetricOwnershipLayer, getNotebookCapabilities, getReferenceMetadata, getScalar, getTagReference, isNonPublishableNotebook, isNoteEditable, isNotebookLanding, isNotebookTag, isPublishableNotebookLanding, isSystemReadOnlyNotebook, isWorkoutSectionType, lookupUnit, mapNoteBlockChanges, matchDialectFence, metricToMs, normalizeFieldComponent, normalizeFieldPath, notebookSlugFromId, orderPlacements, ownershipRank, parseDocumentSections, parseFlatProperties, parseFrontmatter, parseFrontmatterBody, parseFrontmatterCategories, parseFrontmatterProps, parseNoteBundleFromJsonl, patchFrontmatterProperty, projectPlacements, reconcileNoteBlocks, resolveLayer, resolveNoteOwnership, resolvePlacements, runAffordance, serializeFrontmatter, serializeNoteBundleToJsonl, streamNoteBundleToJsonlLines, stripFrontmatter, systemDefaultUnit, toNotebookId, toNotebookTag, validateNoteBlocks, valueKindOf };