@bitcobblers/wod-wiki-core 0.51.2196 → 0.52.2198

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
@@ -1171,6 +1171,22 @@ interface BlockRevision {
1171
1171
  sport?: string;
1172
1172
  }
1173
1173
  type NoteKind = 'journal' | 'playground' | 'dashboard' | 'page' | 'note' | (string & {});
1174
+ interface NoteProvenance {
1175
+ /** Canonical UUID of the original Note at the time of cloning/execution. */
1176
+ sourceNoteId: string;
1177
+ /** Upstream seed/manifest version or source revision captured when cloned. */
1178
+ sourceVersion?: number;
1179
+ /** Git commit hash of the upstream publication when available. */
1180
+ sourceCommit?: string;
1181
+ /** Registered Feed id that delivered the upstream Note. */
1182
+ feedSourceId?: FeedId;
1183
+ /** Source Notebook id ('notebook/<slug>') for scoped override inheritance. */
1184
+ sourceNotebookId?: string;
1185
+ /** Original corpus path fallback if the upstream Note is later removed. */
1186
+ sourcePath?: string;
1187
+ /** Epoch-ms timestamp when the clone was created. */
1188
+ clonedAt: number;
1189
+ }
1174
1190
  interface Note {
1175
1191
  id: string;
1176
1192
  title: string;
@@ -1183,6 +1199,10 @@ interface Note {
1183
1199
  sourceId?: string;
1184
1200
  /** Canonical notebook identifier ('notebook/{slug}', e.g. 'notebook/journal', 'notebook/playground', 'notebook/guides'). */
1185
1201
  notebookId?: string;
1202
+ /** Many-to-many Notebook memberships linked to this Note (kept in sync with `notebook_links`). */
1203
+ notebookIds?: string[];
1204
+ /** Structured lineage back to an upstream read-only Note when cloned into the Journal or a user Notebook. */
1205
+ provenance?: NoteProvenance;
1186
1206
  tags?: string[];
1187
1207
  /** Artifact provenance — which published bundle this note came from.
1188
1208
  * Persisted field names; the artifact they describe is a **Seed**. */
@@ -1200,6 +1220,8 @@ interface Note {
1200
1220
  sourcePath?: string;
1201
1221
  /** Git commit hash in which this note was published or changed. */
1202
1222
  seedCommit?: string;
1223
+ /** Whether a user-owned notebook landing note (`notebook/{slug}`) publishes its member notes to the outbound Feed. */
1224
+ public?: boolean;
1203
1225
  }
1204
1226
  interface Page {
1205
1227
  id: string;
@@ -1299,6 +1321,37 @@ interface Session {
1299
1321
  /** Whether workout was completed or stopped early */
1300
1322
  completed: boolean;
1301
1323
  createdAt: number;
1324
+ /** Whether this Session's telemetry is published when its parent Note belongs to a public Notebook. */
1325
+ public?: boolean;
1326
+ /** Many-to-many Notebook memberships this Session is attached/promoted to. */
1327
+ notebookIds?: string[];
1328
+ }
1329
+ type NotebookLinkTargetKind = 'note' | 'session';
1330
+ interface NotebookLink {
1331
+ /** Deterministic key `${notebookId}:${targetKind}:${targetId}`. */
1332
+ id: string;
1333
+ notebookId: string;
1334
+ targetKind: NotebookLinkTargetKind;
1335
+ targetId: string;
1336
+ /** Owning Note UUID (`targetId` when `targetKind === 'note'`, `session.noteId` when `'session'`). */
1337
+ noteId: string;
1338
+ createdAt: number;
1339
+ }
1340
+ type OverridePropertyKind = 'effort' | 'equipment' | 'tag' | 'tag-type';
1341
+ interface ScopedPropertyOverride {
1342
+ /** Composite key `${notebookId}:${kind}:${slug}`. */
1343
+ id: string;
1344
+ notebookId: string;
1345
+ kind: OverridePropertyKind;
1346
+ slug: string;
1347
+ label: string;
1348
+ ownerNoteId: string;
1349
+ rawContent: string;
1350
+ /** Parsed entity payload (`IEffort`, `IEquipment`, `Tag`, or `TagTypeRecord`). */
1351
+ payload?: Record<string, unknown>;
1352
+ seedOrigin?: 'seed' | 'user';
1353
+ feedSourceId?: FeedId;
1354
+ updatedAt: number;
1302
1355
  }
1303
1356
  interface Attachment {
1304
1357
  id: string;
@@ -1491,7 +1544,7 @@ interface FieldSourceRecord {
1491
1544
  }
1492
1545
  /** One observed categorical value of a field (string/boolean only). */
1493
1546
  interface FieldValueRecord {
1494
- key: [string, string];
1547
+ key: string | [string, string];
1495
1548
  fieldId: string;
1496
1549
  value: string;
1497
1550
  sourceCount: number;
@@ -1751,9 +1804,13 @@ interface SectionDocument {
1751
1804
  */
1752
1805
 
1753
1806
  /** Predefined default notebook slugs always present in the application. */
1754
- declare const DEFAULT_NOTEBOOK_SLUGS: readonly ["journal", "playground", "defaults", "guides"];
1807
+ declare const DEFAULT_NOTEBOOK_SLUGS: readonly ["journal", "playground", "defaults", "custom", "guides"];
1755
1808
  type DefaultNotebookSlug = (typeof DEFAULT_NOTEBOOK_SLUGS)[number];
1756
1809
  type NotebookId = `notebook/${string}`;
1810
+ declare const READONLY_SYSTEM_NOTEBOOK_SLUGS: readonly ["defaults", "guides", "efforts", "equipment", "dashboards"];
1811
+ declare const NON_PUBLISHABLE_NOTEBOOK_SLUGS: readonly ["journal", "playground", "defaults", "custom", "guides", "efforts", "equipment", "dashboards"];
1812
+ declare function isSystemReadOnlyNotebook(slugOrId: string): boolean;
1813
+ declare function isNonPublishableNotebook(slugOrId: string): boolean;
1757
1814
  /** Where a notebook comes from. 'feed' = delivered by a feed (the feed that
1758
1815
  * delivers it is named by `feedEntryId`); 'user' = the user owns it;
1759
1816
  * 'default' = one of the predefined notebooks. */
@@ -1773,7 +1830,8 @@ declare function toNotebookId(slugOrId: string): NotebookId;
1773
1830
  declare function isNoteEditable(note: {
1774
1831
  seedOrigin?: string | null;
1775
1832
  feedOrigin?: string | null;
1776
- }, notebookOrigin?: NotebookOrigin): boolean;
1833
+ notebookId?: string | null;
1834
+ }, notebookOrigin?: NotebookOrigin, resolvedNotebookId?: string): boolean;
1777
1835
  interface BuiltinNotebookSpec {
1778
1836
  slug: string;
1779
1837
  notebookId: NotebookId;
@@ -1781,6 +1839,8 @@ interface BuiltinNotebookSpec {
1781
1839
  description: string;
1782
1840
  icon: string;
1783
1841
  href: string;
1842
+ readOnly?: boolean;
1843
+ publishable?: boolean;
1784
1844
  feedEntryId?: FeedId;
1785
1845
  seedChunkId?: string;
1786
1846
  }
@@ -1820,6 +1880,49 @@ interface IScript {
1820
1880
  getAt(index: number): ICodeStatement | undefined;
1821
1881
  }
1822
1882
 
1883
+ type FeedCatalogTier = 'core' | 'community' | 'imported' | 'user' | 'local';
1884
+ interface FeedSourceCatalogRow {
1885
+ id: FeedId;
1886
+ label: string;
1887
+ url: string;
1888
+ repositoryUrl?: string;
1889
+ description?: string;
1890
+ tier: FeedCatalogTier;
1891
+ subscribed: boolean;
1892
+ installed: boolean;
1893
+ notebookCount: number;
1894
+ itemCount: number;
1895
+ localVersion?: number;
1896
+ remoteVersion?: number;
1897
+ updateAvailable?: boolean;
1898
+ unpublishedChanges?: boolean;
1899
+ builtAt?: string;
1900
+ lastError?: string;
1901
+ }
1902
+ interface FeedNotebookCatalogRow {
1903
+ id: string;
1904
+ feedId: FeedId;
1905
+ feedLabel: string;
1906
+ feedUrl?: string;
1907
+ chunkId: string;
1908
+ slug: string;
1909
+ label: string;
1910
+ description?: string;
1911
+ category?: string;
1912
+ count: number;
1913
+ version?: number;
1914
+ commit?: string;
1915
+ sha256?: string;
1916
+ updatedAt?: string;
1917
+ builtAt?: string;
1918
+ indexPath?: string;
1919
+ subscribed: boolean;
1920
+ installed: boolean;
1921
+ origin: 'user' | 'default' | 'feed';
1922
+ public?: boolean;
1923
+ icon?: string;
1924
+ }
1925
+
1823
1926
  /**
1824
1927
  * Detects all WOD blocks in markdown content.
1825
1928
  * Recognises ```time and ```log as valid workout fences (optional :sport suffix).
@@ -1954,13 +2057,72 @@ declare function parseFrontmatterProps(lines: string[]): Record<string, string>;
1954
2057
  * Auto-generated build version metadata.
1955
2058
  * Do not edit directly; updated by scripts/stamp-version.ts
1956
2059
  */
1957
- declare const VERSION = "0.51.2196";
1958
- declare const GIT_SHA = "817bc28";
1959
- declare const BUILD_TIME = "2026-11-05T23:36:56.914Z";
2060
+ declare const VERSION = "0.52.2198";
2061
+ declare const GIT_SHA = "15e2fcb";
2062
+ declare const BUILD_TIME = "2026-11-11T15:07:53.492Z";
1960
2063
  declare const SEMVER: {
1961
- readonly version: "0.51.2196";
1962
- readonly gitSha: "817bc28";
1963
- readonly buildTime: "2026-11-05T23:36:56.914Z";
2064
+ readonly version: "0.52.2198";
2065
+ readonly gitSha: "15e2fcb";
2066
+ readonly buildTime: "2026-11-11T15:07:53.492Z";
1964
2067
  };
1965
2068
 
1966
- 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 FeedId, type FeedOrigin, 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, NOTEBOOK_TAG_PREFIX, type Note, type NoteBlock, type NoteBlockChange, type NoteBlockKind, type NoteKind, type NotePlacement, type NoteTag, type Notebook, type NotebookId, type NotebookOrigin, type NullValueKind, type Origin, OutputStatement, type OutputStatementOptions, type OutputStatementType, OwnershipResolver, type Page, type PageNote, type PageTarget, type ParseError, ParsedCodeStatement, type ParsedFrontmatter, type PlacementProjection, 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 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, detectScriptBlocks, dimensionKeyOf, extractBlockContent, extractFrontmatterTags, extractTypedFrontmatterTags, fieldRefFromKey, fieldRefKey, findBlockAtLine, flattenFieldLeaves, fromNotebookTag, getList, getMetricOwnershipLayer, getReferenceMetadata, getScalar, getTagReference, isNoteEditable, isNotebookTag, isWorkoutSectionType, lookupUnit, mapNoteBlockChanges, matchDialectFence, normalizeFieldComponent, normalizeFieldPath, notebookSlugFromId, orderPlacements, ownershipRank, parseDocumentSections, parseFlatProperties, parseFrontmatter, parseFrontmatterBody, parseFrontmatterCategories, parseFrontmatterProps, patchFrontmatterProperty, projectPlacements, reconcileNoteBlocks, resolveLayer, resolvePlacements, runAffordance, serializeFrontmatter, stripFrontmatter, systemDefaultUnit, toNotebookId, toNotebookTag, validateNoteBlocks, valueKindOf };
2069
+ interface NoteJsonlNote {
2070
+ id: string;
2071
+ title: string;
2072
+ createdAt: number;
2073
+ updatedAt: number;
2074
+ targetDate: number;
2075
+ rawContent: string;
2076
+ sourceRevision?: number;
2077
+ blocks?: Record<string, NoteBlock>;
2078
+ tags?: string[];
2079
+ type?: string;
2080
+ sourceId?: string;
2081
+ }
2082
+ interface ParseLoadRecord {
2083
+ id: string;
2084
+ noteId: string;
2085
+ blockId?: string;
2086
+ blockVersion?: number;
2087
+ stage: 'parse' | 'load';
2088
+ status: 'ok' | 'warning' | 'error';
2089
+ timestamp: number;
2090
+ diagnostics?: string[];
2091
+ metrics?: Record<string, unknown>;
2092
+ }
2093
+ interface NoteTelemetryBundle {
2094
+ note?: NoteJsonlNote;
2095
+ sessions: Session[];
2096
+ events: EventRecord[];
2097
+ revisions?: BlockRevision[];
2098
+ parses?: ParseLoadRecord[];
2099
+ }
2100
+ interface NoteTelemetryBundleResult {
2101
+ bundles: NoteTelemetryBundle[];
2102
+ errors: string[];
2103
+ }
2104
+ declare function serializeNoteBundleToJsonl(bundle: NoteTelemetryBundle): string;
2105
+ declare function streamNoteBundleToJsonlLines(bundles: Iterable<NoteTelemetryBundle> | AsyncIterable<NoteTelemetryBundle>): AsyncGenerator<string, void, unknown>;
2106
+ declare function parseNoteBundleFromJsonl(jsonlText: string): NoteTelemetryBundleResult;
2107
+
2108
+ type PublicationVisibility = 'Private' | 'Published Note' | 'Published Note + Data';
2109
+ interface PublicationVisibilitySummary {
2110
+ visibility: PublicationVisibility;
2111
+ notebookPublic: boolean;
2112
+ publicSessions: number;
2113
+ totalSessions: number;
2114
+ notebookId?: string;
2115
+ notebookIds?: string[];
2116
+ publicNotebookIds?: string[];
2117
+ }
2118
+ declare function isPublishableNotebookLanding(note: Pick<Note, 'id' | 'notebookId' | 'feedOrigin' | 'seedOrigin'>): boolean;
2119
+ declare function derivePublicationVisibility(input: {
2120
+ notebookPublic?: boolean;
2121
+ publicSessions: number;
2122
+ totalSessions: number;
2123
+ notebookId?: string;
2124
+ notebookIds?: string[];
2125
+ publicNotebookIds?: string[];
2126
+ }): PublicationVisibilitySummary;
2127
+
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 };
package/dist/index.d.ts CHANGED
@@ -1171,6 +1171,22 @@ interface BlockRevision {
1171
1171
  sport?: string;
1172
1172
  }
1173
1173
  type NoteKind = 'journal' | 'playground' | 'dashboard' | 'page' | 'note' | (string & {});
1174
+ interface NoteProvenance {
1175
+ /** Canonical UUID of the original Note at the time of cloning/execution. */
1176
+ sourceNoteId: string;
1177
+ /** Upstream seed/manifest version or source revision captured when cloned. */
1178
+ sourceVersion?: number;
1179
+ /** Git commit hash of the upstream publication when available. */
1180
+ sourceCommit?: string;
1181
+ /** Registered Feed id that delivered the upstream Note. */
1182
+ feedSourceId?: FeedId;
1183
+ /** Source Notebook id ('notebook/<slug>') for scoped override inheritance. */
1184
+ sourceNotebookId?: string;
1185
+ /** Original corpus path fallback if the upstream Note is later removed. */
1186
+ sourcePath?: string;
1187
+ /** Epoch-ms timestamp when the clone was created. */
1188
+ clonedAt: number;
1189
+ }
1174
1190
  interface Note {
1175
1191
  id: string;
1176
1192
  title: string;
@@ -1183,6 +1199,10 @@ interface Note {
1183
1199
  sourceId?: string;
1184
1200
  /** Canonical notebook identifier ('notebook/{slug}', e.g. 'notebook/journal', 'notebook/playground', 'notebook/guides'). */
1185
1201
  notebookId?: string;
1202
+ /** Many-to-many Notebook memberships linked to this Note (kept in sync with `notebook_links`). */
1203
+ notebookIds?: string[];
1204
+ /** Structured lineage back to an upstream read-only Note when cloned into the Journal or a user Notebook. */
1205
+ provenance?: NoteProvenance;
1186
1206
  tags?: string[];
1187
1207
  /** Artifact provenance — which published bundle this note came from.
1188
1208
  * Persisted field names; the artifact they describe is a **Seed**. */
@@ -1200,6 +1220,8 @@ interface Note {
1200
1220
  sourcePath?: string;
1201
1221
  /** Git commit hash in which this note was published or changed. */
1202
1222
  seedCommit?: string;
1223
+ /** Whether a user-owned notebook landing note (`notebook/{slug}`) publishes its member notes to the outbound Feed. */
1224
+ public?: boolean;
1203
1225
  }
1204
1226
  interface Page {
1205
1227
  id: string;
@@ -1299,6 +1321,37 @@ interface Session {
1299
1321
  /** Whether workout was completed or stopped early */
1300
1322
  completed: boolean;
1301
1323
  createdAt: number;
1324
+ /** Whether this Session's telemetry is published when its parent Note belongs to a public Notebook. */
1325
+ public?: boolean;
1326
+ /** Many-to-many Notebook memberships this Session is attached/promoted to. */
1327
+ notebookIds?: string[];
1328
+ }
1329
+ type NotebookLinkTargetKind = 'note' | 'session';
1330
+ interface NotebookLink {
1331
+ /** Deterministic key `${notebookId}:${targetKind}:${targetId}`. */
1332
+ id: string;
1333
+ notebookId: string;
1334
+ targetKind: NotebookLinkTargetKind;
1335
+ targetId: string;
1336
+ /** Owning Note UUID (`targetId` when `targetKind === 'note'`, `session.noteId` when `'session'`). */
1337
+ noteId: string;
1338
+ createdAt: number;
1339
+ }
1340
+ type OverridePropertyKind = 'effort' | 'equipment' | 'tag' | 'tag-type';
1341
+ interface ScopedPropertyOverride {
1342
+ /** Composite key `${notebookId}:${kind}:${slug}`. */
1343
+ id: string;
1344
+ notebookId: string;
1345
+ kind: OverridePropertyKind;
1346
+ slug: string;
1347
+ label: string;
1348
+ ownerNoteId: string;
1349
+ rawContent: string;
1350
+ /** Parsed entity payload (`IEffort`, `IEquipment`, `Tag`, or `TagTypeRecord`). */
1351
+ payload?: Record<string, unknown>;
1352
+ seedOrigin?: 'seed' | 'user';
1353
+ feedSourceId?: FeedId;
1354
+ updatedAt: number;
1302
1355
  }
1303
1356
  interface Attachment {
1304
1357
  id: string;
@@ -1491,7 +1544,7 @@ interface FieldSourceRecord {
1491
1544
  }
1492
1545
  /** One observed categorical value of a field (string/boolean only). */
1493
1546
  interface FieldValueRecord {
1494
- key: [string, string];
1547
+ key: string | [string, string];
1495
1548
  fieldId: string;
1496
1549
  value: string;
1497
1550
  sourceCount: number;
@@ -1751,9 +1804,13 @@ interface SectionDocument {
1751
1804
  */
1752
1805
 
1753
1806
  /** Predefined default notebook slugs always present in the application. */
1754
- declare const DEFAULT_NOTEBOOK_SLUGS: readonly ["journal", "playground", "defaults", "guides"];
1807
+ declare const DEFAULT_NOTEBOOK_SLUGS: readonly ["journal", "playground", "defaults", "custom", "guides"];
1755
1808
  type DefaultNotebookSlug = (typeof DEFAULT_NOTEBOOK_SLUGS)[number];
1756
1809
  type NotebookId = `notebook/${string}`;
1810
+ declare const READONLY_SYSTEM_NOTEBOOK_SLUGS: readonly ["defaults", "guides", "efforts", "equipment", "dashboards"];
1811
+ declare const NON_PUBLISHABLE_NOTEBOOK_SLUGS: readonly ["journal", "playground", "defaults", "custom", "guides", "efforts", "equipment", "dashboards"];
1812
+ declare function isSystemReadOnlyNotebook(slugOrId: string): boolean;
1813
+ declare function isNonPublishableNotebook(slugOrId: string): boolean;
1757
1814
  /** Where a notebook comes from. 'feed' = delivered by a feed (the feed that
1758
1815
  * delivers it is named by `feedEntryId`); 'user' = the user owns it;
1759
1816
  * 'default' = one of the predefined notebooks. */
@@ -1773,7 +1830,8 @@ declare function toNotebookId(slugOrId: string): NotebookId;
1773
1830
  declare function isNoteEditable(note: {
1774
1831
  seedOrigin?: string | null;
1775
1832
  feedOrigin?: string | null;
1776
- }, notebookOrigin?: NotebookOrigin): boolean;
1833
+ notebookId?: string | null;
1834
+ }, notebookOrigin?: NotebookOrigin, resolvedNotebookId?: string): boolean;
1777
1835
  interface BuiltinNotebookSpec {
1778
1836
  slug: string;
1779
1837
  notebookId: NotebookId;
@@ -1781,6 +1839,8 @@ interface BuiltinNotebookSpec {
1781
1839
  description: string;
1782
1840
  icon: string;
1783
1841
  href: string;
1842
+ readOnly?: boolean;
1843
+ publishable?: boolean;
1784
1844
  feedEntryId?: FeedId;
1785
1845
  seedChunkId?: string;
1786
1846
  }
@@ -1820,6 +1880,49 @@ interface IScript {
1820
1880
  getAt(index: number): ICodeStatement | undefined;
1821
1881
  }
1822
1882
 
1883
+ type FeedCatalogTier = 'core' | 'community' | 'imported' | 'user' | 'local';
1884
+ interface FeedSourceCatalogRow {
1885
+ id: FeedId;
1886
+ label: string;
1887
+ url: string;
1888
+ repositoryUrl?: string;
1889
+ description?: string;
1890
+ tier: FeedCatalogTier;
1891
+ subscribed: boolean;
1892
+ installed: boolean;
1893
+ notebookCount: number;
1894
+ itemCount: number;
1895
+ localVersion?: number;
1896
+ remoteVersion?: number;
1897
+ updateAvailable?: boolean;
1898
+ unpublishedChanges?: boolean;
1899
+ builtAt?: string;
1900
+ lastError?: string;
1901
+ }
1902
+ interface FeedNotebookCatalogRow {
1903
+ id: string;
1904
+ feedId: FeedId;
1905
+ feedLabel: string;
1906
+ feedUrl?: string;
1907
+ chunkId: string;
1908
+ slug: string;
1909
+ label: string;
1910
+ description?: string;
1911
+ category?: string;
1912
+ count: number;
1913
+ version?: number;
1914
+ commit?: string;
1915
+ sha256?: string;
1916
+ updatedAt?: string;
1917
+ builtAt?: string;
1918
+ indexPath?: string;
1919
+ subscribed: boolean;
1920
+ installed: boolean;
1921
+ origin: 'user' | 'default' | 'feed';
1922
+ public?: boolean;
1923
+ icon?: string;
1924
+ }
1925
+
1823
1926
  /**
1824
1927
  * Detects all WOD blocks in markdown content.
1825
1928
  * Recognises ```time and ```log as valid workout fences (optional :sport suffix).
@@ -1954,13 +2057,72 @@ declare function parseFrontmatterProps(lines: string[]): Record<string, string>;
1954
2057
  * Auto-generated build version metadata.
1955
2058
  * Do not edit directly; updated by scripts/stamp-version.ts
1956
2059
  */
1957
- declare const VERSION = "0.51.2196";
1958
- declare const GIT_SHA = "817bc28";
1959
- declare const BUILD_TIME = "2026-11-05T23:36:56.914Z";
2060
+ declare const VERSION = "0.52.2198";
2061
+ declare const GIT_SHA = "15e2fcb";
2062
+ declare const BUILD_TIME = "2026-11-11T15:07:53.492Z";
1960
2063
  declare const SEMVER: {
1961
- readonly version: "0.51.2196";
1962
- readonly gitSha: "817bc28";
1963
- readonly buildTime: "2026-11-05T23:36:56.914Z";
2064
+ readonly version: "0.52.2198";
2065
+ readonly gitSha: "15e2fcb";
2066
+ readonly buildTime: "2026-11-11T15:07:53.492Z";
1964
2067
  };
1965
2068
 
1966
- 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 FeedId, type FeedOrigin, 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, NOTEBOOK_TAG_PREFIX, type Note, type NoteBlock, type NoteBlockChange, type NoteBlockKind, type NoteKind, type NotePlacement, type NoteTag, type Notebook, type NotebookId, type NotebookOrigin, type NullValueKind, type Origin, OutputStatement, type OutputStatementOptions, type OutputStatementType, OwnershipResolver, type Page, type PageNote, type PageTarget, type ParseError, ParsedCodeStatement, type ParsedFrontmatter, type PlacementProjection, 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 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, detectScriptBlocks, dimensionKeyOf, extractBlockContent, extractFrontmatterTags, extractTypedFrontmatterTags, fieldRefFromKey, fieldRefKey, findBlockAtLine, flattenFieldLeaves, fromNotebookTag, getList, getMetricOwnershipLayer, getReferenceMetadata, getScalar, getTagReference, isNoteEditable, isNotebookTag, isWorkoutSectionType, lookupUnit, mapNoteBlockChanges, matchDialectFence, normalizeFieldComponent, normalizeFieldPath, notebookSlugFromId, orderPlacements, ownershipRank, parseDocumentSections, parseFlatProperties, parseFrontmatter, parseFrontmatterBody, parseFrontmatterCategories, parseFrontmatterProps, patchFrontmatterProperty, projectPlacements, reconcileNoteBlocks, resolveLayer, resolvePlacements, runAffordance, serializeFrontmatter, stripFrontmatter, systemDefaultUnit, toNotebookId, toNotebookTag, validateNoteBlocks, valueKindOf };
2069
+ interface NoteJsonlNote {
2070
+ id: string;
2071
+ title: string;
2072
+ createdAt: number;
2073
+ updatedAt: number;
2074
+ targetDate: number;
2075
+ rawContent: string;
2076
+ sourceRevision?: number;
2077
+ blocks?: Record<string, NoteBlock>;
2078
+ tags?: string[];
2079
+ type?: string;
2080
+ sourceId?: string;
2081
+ }
2082
+ interface ParseLoadRecord {
2083
+ id: string;
2084
+ noteId: string;
2085
+ blockId?: string;
2086
+ blockVersion?: number;
2087
+ stage: 'parse' | 'load';
2088
+ status: 'ok' | 'warning' | 'error';
2089
+ timestamp: number;
2090
+ diagnostics?: string[];
2091
+ metrics?: Record<string, unknown>;
2092
+ }
2093
+ interface NoteTelemetryBundle {
2094
+ note?: NoteJsonlNote;
2095
+ sessions: Session[];
2096
+ events: EventRecord[];
2097
+ revisions?: BlockRevision[];
2098
+ parses?: ParseLoadRecord[];
2099
+ }
2100
+ interface NoteTelemetryBundleResult {
2101
+ bundles: NoteTelemetryBundle[];
2102
+ errors: string[];
2103
+ }
2104
+ declare function serializeNoteBundleToJsonl(bundle: NoteTelemetryBundle): string;
2105
+ declare function streamNoteBundleToJsonlLines(bundles: Iterable<NoteTelemetryBundle> | AsyncIterable<NoteTelemetryBundle>): AsyncGenerator<string, void, unknown>;
2106
+ declare function parseNoteBundleFromJsonl(jsonlText: string): NoteTelemetryBundleResult;
2107
+
2108
+ type PublicationVisibility = 'Private' | 'Published Note' | 'Published Note + Data';
2109
+ interface PublicationVisibilitySummary {
2110
+ visibility: PublicationVisibility;
2111
+ notebookPublic: boolean;
2112
+ publicSessions: number;
2113
+ totalSessions: number;
2114
+ notebookId?: string;
2115
+ notebookIds?: string[];
2116
+ publicNotebookIds?: string[];
2117
+ }
2118
+ declare function isPublishableNotebookLanding(note: Pick<Note, 'id' | 'notebookId' | 'feedOrigin' | 'seedOrigin'>): boolean;
2119
+ declare function derivePublicationVisibility(input: {
2120
+ notebookPublic?: boolean;
2121
+ publicSessions: number;
2122
+ totalSessions: number;
2123
+ notebookId?: string;
2124
+ notebookIds?: string[];
2125
+ publicNotebookIds?: string[];
2126
+ }): PublicationVisibilitySummary;
2127
+
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 };