@bitcobblers/wod-wiki-wql 0.35.2115 → 0.35.2117
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.cjs +227 -228
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +23 -46
- package/dist/index.d.ts +23 -46
- package/dist/index.mjs +229 -227
- package/dist/index.mjs.map +1 -1
- package/package.json +3 -3
package/dist/index.d.cts
CHANGED
|
@@ -2,7 +2,7 @@ import { LRParser } from '@lezer/lr';
|
|
|
2
2
|
import { LanguageSupport, HighlightStyle, LRLanguage } from '@codemirror/language';
|
|
3
3
|
import { Completion, CompletionContext, CompletionResult } from '@codemirror/autocomplete';
|
|
4
4
|
import { Extension } from '@codemirror/state';
|
|
5
|
-
import { SummaryCoverage, BlockIndexRow, Note, EventRecord, PageNote, Page, AnalyticsDataPoint, ResultOrigin, StoredOutputStatement } from '@bitcobblers/wod-wiki-core';
|
|
5
|
+
import { SummaryCoverage, BlockIndexRow, Note, EventRecord, PageNote, Page, AnalyticsDataPoint, ResultOrigin, StoredOutputStatement, NoteBlockChange } from '@bitcobblers/wod-wiki-core';
|
|
6
6
|
export { SYSTEM_DEFAULT_OUTPUT_UNIT, UnitConversionError, convertViaCatalog, dimensionKeyOf, lookupUnit, systemDefaultUnit } from '@bitcobblers/wod-wiki-core';
|
|
7
7
|
|
|
8
8
|
/**
|
|
@@ -981,6 +981,8 @@ interface EventStore {
|
|
|
981
981
|
/** Store surface for content queries (`:note`). */
|
|
982
982
|
interface NoteQueryStore {
|
|
983
983
|
getAllNotes(): Promise<Note[]>;
|
|
984
|
+
/** Scoped hydration of actionable block parents. */
|
|
985
|
+
getNotesByIds?(noteIds: readonly string[]): Promise<Note[]>;
|
|
984
986
|
getNoteIdsForTag(label: string): Promise<Set<string>>;
|
|
985
987
|
/** Note-tags label set of one note (moved here from FactQueryStore — it
|
|
986
988
|
* reads note tags, not facts). */
|
|
@@ -1116,8 +1118,6 @@ interface QueryServiceStores {
|
|
|
1116
1118
|
* seed importer materializes corpus rows into the same store). */
|
|
1117
1119
|
blockStore?: BlockQueryStore;
|
|
1118
1120
|
effortStore?: EffortQueryStore;
|
|
1119
|
-
/** Derived corpus-note projections (catalog/tag planes). */
|
|
1120
|
-
staticNoteStore?: NoteQueryStore;
|
|
1121
1121
|
/** Serves exercise containment rows (`block_efforts` store). */
|
|
1122
1122
|
blockEffortsStore?: {
|
|
1123
1123
|
getAllFromIndex(index: string, key: string): Promise<any[]>;
|
|
@@ -1364,14 +1364,13 @@ declare class QueryService {
|
|
|
1364
1364
|
private readonly noteStore;
|
|
1365
1365
|
private readonly blockStore;
|
|
1366
1366
|
private readonly effortStore;
|
|
1367
|
-
private readonly staticNoteStore?;
|
|
1368
1367
|
private readonly pageStore?;
|
|
1369
1368
|
private readonly relationStore?;
|
|
1370
1369
|
private readonly datasetStore?;
|
|
1371
1370
|
private blockEffortsStore;
|
|
1372
1371
|
private tagsStore;
|
|
1373
1372
|
private noteTagsStore;
|
|
1374
|
-
constructor(storesOrEventStore?: QueryServiceStores | EventStore, noteStore?: NoteQueryStore, blockStore?: BlockQueryStore, effortStore?: EffortQueryStore
|
|
1373
|
+
constructor(storesOrEventStore?: QueryServiceStores | EventStore, noteStore?: NoteQueryStore, blockStore?: BlockQueryStore, effortStore?: EffortQueryStore);
|
|
1375
1374
|
/** Windowed flat-fact fetch — the projected view over the event store. */
|
|
1376
1375
|
getFactsByTimeRange(start: number, end: number): Promise<AnalyticsDataPoint[]>;
|
|
1377
1376
|
runQuery(raw: string, options?: QueryOptions): Promise<QueryResult>;
|
|
@@ -1404,6 +1403,7 @@ declare class QueryService {
|
|
|
1404
1403
|
* is injected — one bundle read per run instead of a link/page read per
|
|
1405
1404
|
* matched note. */
|
|
1406
1405
|
private containersForNotes;
|
|
1406
|
+
private hydrateBlocks;
|
|
1407
1407
|
/**
|
|
1408
1408
|
* Execute a :block query against the derived block_index store.
|
|
1409
1409
|
*/
|
|
@@ -1725,10 +1725,9 @@ declare function resolveCanonicalMetricKey(projectionName: string): string;
|
|
|
1725
1725
|
interface SummaryFactIdentity {
|
|
1726
1726
|
noteId: string;
|
|
1727
1727
|
resultId: string;
|
|
1728
|
-
/**
|
|
1729
|
-
|
|
1730
|
-
|
|
1731
|
-
segmentVersion?: number;
|
|
1728
|
+
/** Actionable occurrence and saved revision that produced the result. */
|
|
1729
|
+
blockId?: string;
|
|
1730
|
+
blockVersion?: number;
|
|
1732
1731
|
/** Content-stable cross-note join key. */
|
|
1733
1732
|
blockContentId?: string;
|
|
1734
1733
|
/** Which surface produced the result; trend queries exclude 'playground' by default. */
|
|
@@ -1800,36 +1799,6 @@ declare function projectEventToFacts(record: EventRecord): AnalyticsDataPoint[];
|
|
|
1800
1799
|
*/
|
|
1801
1800
|
declare function eventsToStoredLogs(events: readonly EventRecord[]): StoredOutputStatement[];
|
|
1802
1801
|
|
|
1803
|
-
/**
|
|
1804
|
-
* Landing/catalog projection for a block row, derived from its sourceId route
|
|
1805
|
-
* (`collection:<catalog>/<item>`, `page:collection:<catalog>`,
|
|
1806
|
-
* `feed:feeds/<catalog>/…`) — never from `noteId`, which is a UUID for
|
|
1807
|
-
* imported notes. Legacy path-keyed rows keep deriving from the noteId stem
|
|
1808
|
-
* through `catalogOfItem` (undefined for UUID or no path); a bare
|
|
1809
|
-
* `collection:<catalog>` route is the legacy landing and gets its canonical
|
|
1810
|
-
* `page:collection:` sourceId.
|
|
1811
|
-
*/
|
|
1812
|
-
declare function staticCatalogRoute(block: Pick<BlockIndexRow, 'noteId' | 'sourceId'>): {
|
|
1813
|
-
landing: boolean;
|
|
1814
|
-
catalog?: string;
|
|
1815
|
-
sourceId?: string;
|
|
1816
|
-
};
|
|
1817
|
-
/**
|
|
1818
|
-
* Pure projection of a block_index into static Notes — one Note per distinct
|
|
1819
|
-
* noteId. `id` stays the canonical storage identity (UUID for imported rows);
|
|
1820
|
-
* `catalog` and feed-landing status come from the sourceId route, not
|
|
1821
|
-
* the noteId path. The catalog (e.g. `crossfit-girls`) is what the Library's
|
|
1822
|
-
* panel uses to target the `+ Filter → Catalog` menu.
|
|
1823
|
-
*/
|
|
1824
|
-
declare function staticNotesFromBlocks(blocks: BlockIndexRow[]): Note[];
|
|
1825
|
-
/**
|
|
1826
|
-
* Tag → noteIds index over a block index's frontmatter rows. Static-corpus
|
|
1827
|
-
* notes declare tags only in frontmatter `tags:`; this recovers the mapping
|
|
1828
|
-
* the note store needs to answer `tags:` clauses (issue #853 — the store
|
|
1829
|
-
* previously returned an empty set for every tag).
|
|
1830
|
-
*/
|
|
1831
|
-
declare function staticTagIndexFromBlocks(blocks: BlockIndexRow[]): Map<string, Set<string>>;
|
|
1832
|
-
|
|
1833
1802
|
/**
|
|
1834
1803
|
* Dashboard Note model (#898 map, format locked in #899).
|
|
1835
1804
|
*
|
|
@@ -2064,6 +2033,7 @@ declare function parseFrontmatterProps(lines: string[]): Record<string, string>;
|
|
|
2064
2033
|
* itself. Move/duplicate/remove operate on the whole group so the rendered
|
|
2065
2034
|
* card — title, question, chart — travels together.
|
|
2066
2035
|
*/
|
|
2036
|
+
|
|
2067
2037
|
interface WidgetSpec {
|
|
2068
2038
|
/** Card title — renders as a `## ` heading above the block. */
|
|
2069
2039
|
title?: string;
|
|
@@ -2099,6 +2069,13 @@ declare function appendWidget(raw: string, spec: WidgetSpec): string;
|
|
|
2099
2069
|
type WidgetOpResult = {
|
|
2100
2070
|
ok: true;
|
|
2101
2071
|
note: string;
|
|
2072
|
+
changes: NoteBlockChange[];
|
|
2073
|
+
retainedBlocks: Array<{
|
|
2074
|
+
from: number;
|
|
2075
|
+
to: number;
|
|
2076
|
+
nextFrom: number;
|
|
2077
|
+
nextTo: number;
|
|
2078
|
+
}>;
|
|
2102
2079
|
} | {
|
|
2103
2080
|
ok: false;
|
|
2104
2081
|
reason: 'not-found' | 'stale-body';
|
|
@@ -2142,13 +2119,13 @@ declare function migrateLegacyDashboardBodies(raw: string): string;
|
|
|
2142
2119
|
* Auto-generated build version metadata.
|
|
2143
2120
|
* Do not edit directly; updated by scripts/stamp-version.ts
|
|
2144
2121
|
*/
|
|
2145
|
-
declare const VERSION = "0.35.
|
|
2146
|
-
declare const GIT_SHA = "
|
|
2147
|
-
declare const BUILD_TIME = "2026-10-
|
|
2122
|
+
declare const VERSION = "0.35.2117";
|
|
2123
|
+
declare const GIT_SHA = "03d1dfc";
|
|
2124
|
+
declare const BUILD_TIME = "2026-10-12T20:08:12.374Z";
|
|
2148
2125
|
declare const SEMVER: {
|
|
2149
|
-
readonly version: "0.35.
|
|
2150
|
-
readonly gitSha: "
|
|
2151
|
-
readonly buildTime: "2026-10-
|
|
2126
|
+
readonly version: "0.35.2117";
|
|
2127
|
+
readonly gitSha: "03d1dfc";
|
|
2128
|
+
readonly buildTime: "2026-10-12T20:08:12.374Z";
|
|
2152
2129
|
};
|
|
2153
2130
|
|
|
2154
|
-
export { type Aggregator, type AnyParsedQuery, BUILD_TIME, type BlockQueryStore, CONTENT_GROUPING_DIMENSIONS, type CatalogFieldSuggestion, type CatalogValueSuggestion, type ComparisonOp, DASHBOARD_GRID_MAX_COLS, DASHBOARD_WIDGET_TYPES, DEFAULT_DASHBOARD_TITLE, DISCIPLINE_FACTORS, type DashboardDocument, type DashboardMeta, type DashboardParsedSection, type DashboardSectionInput, type DashboardToken, type DashboardWidget, type DashboardWidgetType, type DocumentAssignment, type DocumentDefaults, type DocumentFormula, type DocumentOutput, type DocumentResult, EFFORT_DISCIPLINES, type EffortDiscipline, type EffortQueryStore, type EventRowIdentity, type EventStore, type ExecutionContext, type FamilyRunPayload, type FindOptions, type FindPredicate, type FindQueryResult, type FormulaEvaluation, type FormulaEvaluator, GIT_SHA, type IEffort, type IFieldCatalog, type LinkWidget, type MetricPredicate, type NoteContainer, type NoteQueryStore, type NoteRelationBundle, type OperandValue, type OutputUnitResolution, PLANNED_WIDGET_TYPES, type PageSourceEntry, PageSourceRegistry, type ParsedAggregateQuery, type ParsedDocument, type ParsedFindQuery, type ParsedFrontmatter, type ParsedPipelineQuery, type ParsedRowsQuery, type ParsedWqlRollupSuffix, type ParsedWqlSuffixes, type ParsedWqlWindowSuffix, type PipelineOptions, type PipelineResult, type PipelineSink, type PipelineSource, type PointwiseInputs, type QueryDocument, QueryDocumentRunner$1 as QueryDocumentRunner, type QueryDocumentRunnerHost, type QueryDocumentRunnerOptions, type QueryOptions, type QueryResult, QueryService, type QueryServiceStores, type QueryWidgetSuffix, type QueryWindow, type ResolvedRange, type RowsPipes, type RowsQueryResult, type RowsRun, SEMVER, type Series, type SeriesPoint, QueryDocumentRunner as SharedQueryDocumentRunner, type SharedRunnerOptions, type SummaryFactIdentity, type SummaryFactSourceOutput, type TabularColumn, type TabularGroup, type TabularResult, type TagFilter, type TagValue, UNASSIGNED, type UnitBearingFact, type UnitFamily, VERSION, WQL_AGGREGATORS, WQL_CALC_TARGETS, WQL_CHART_HEADS, WQL_COMPARISON_OPS, WQL_CONTENT_FILTER_KEYS, WQL_CONTENT_ONLY_KEYS, WQL_DISPLAY_UNITS, WQL_EFFORT_FILTER_KEYS, WQL_FIND_TARGETS, WQL_FUNCTION_HEADS, WQL_GRAINS, WQL_INTENSITY_TIERS, WQL_KEYWORDS, WQL_METRIC_AGGREGATES, WQL_METRIC_FAMILIES, WQL_NOTE_DEFAULT_SOURCES, WQL_RESULT_PLANES, WQL_ROLLUP_PERIODS, WQL_SOURCES, WQL_SOURCE_HEADS, WQL_SOURCE_HEAD_SCOPES, WQL_SOURCE_VALUES, WQL_STANDARD_DATASETS, WQL_TAG_KEYS, WQL_TYPED_TAG_KEYS, WQL_TYPE_HEADS, WQL_VIRTUAL_DIMS, type WidgetOpResult, type WidgetSpan, type WidgetSpec, type WqlAggregator, type WqlCalcTarget, type WqlChartHead, type WqlComparisonOp, type WqlCompletionOptions, type WqlContentFilterKey, type WqlDisplayUnit, type WqlDomainOrder, type WqlDomainPredicate, type WqlDomainReadResult, type WqlFindTarget, type WqlFunctionHead, type WqlGrain, type WqlIntensityTier, type WqlKeyword, type WqlMetricAggregate, type WqlMetricFamily, type WqlResultPlane, type WqlRollupPeriod, type WqlSource, type WqlSourceHead, type WqlSourceValue, type WqlStandardDataset, type WqlTagKey, type WqlTypedTagKey, type WqlVirtualDim, allowedFilterTypesForTarget, appendSuffixes, appendWidget, buildDashboardDocument, buildDashboardScaffold, buildDrillDownQuery, captureContext, catalogOfItem, civilDateAdd, civilDateDiff, civilDateOf, civilDatesCoveredByRange, civilMonday, consumesRollupFacts, convertDisplay, createBuiltinFormulaEvaluator, dashboardSlug, defaultTokenValues, disciplineFactorFor, duplicateWidget, eventsToStoredLogs, extractDashboardTokens, extractFrontmatterTags, findTargetAdvisories, getList, getScalar, getUnitFamily, inRange, isAggregateQuery, isDashboardMeta, isDashboardWidgetType, isEffortDiscipline, isFindQuery, isPipelineQuery, isProposedMetric, migrateLegacyDashboardBodies, moveWidget, normalizeSummaryFacts, normalizeWql, parseDashboardNote, parseDocument, parseFlatProperties, parseFrontmatter, parseFrontmatterBody, parseFrontmatterCategories, parseFrontmatterProps, parseQuery, parseQueryWidgetSuffix, parseWqlSuffixes, projectEventToFacts, referencedTokens, removeWidget, renderWidgetGroup, resizeWidget, resolveCanonicalMetricKey, resolveOutputUnit, resolveWidgetType, resolveWindowRange, rowsParseError, serialize, serializeDocument, serializeFrontmatter, setDashboardTokenValue, sourceMatches, splitAtWhere,
|
|
2131
|
+
export { type Aggregator, type AnyParsedQuery, BUILD_TIME, type BlockQueryStore, CONTENT_GROUPING_DIMENSIONS, type CatalogFieldSuggestion, type CatalogValueSuggestion, type ComparisonOp, DASHBOARD_GRID_MAX_COLS, DASHBOARD_WIDGET_TYPES, DEFAULT_DASHBOARD_TITLE, DISCIPLINE_FACTORS, type DashboardDocument, type DashboardMeta, type DashboardParsedSection, type DashboardSectionInput, type DashboardToken, type DashboardWidget, type DashboardWidgetType, type DocumentAssignment, type DocumentDefaults, type DocumentFormula, type DocumentOutput, type DocumentResult, EFFORT_DISCIPLINES, type EffortDiscipline, type EffortQueryStore, type EventRowIdentity, type EventStore, type ExecutionContext, type FamilyRunPayload, type FindOptions, type FindPredicate, type FindQueryResult, type FormulaEvaluation, type FormulaEvaluator, GIT_SHA, type IEffort, type IFieldCatalog, type LinkWidget, type MetricPredicate, type NoteContainer, type NoteQueryStore, type NoteRelationBundle, type OperandValue, type OutputUnitResolution, PLANNED_WIDGET_TYPES, type PageSourceEntry, PageSourceRegistry, type ParsedAggregateQuery, type ParsedDocument, type ParsedFindQuery, type ParsedFrontmatter, type ParsedPipelineQuery, type ParsedRowsQuery, type ParsedWqlRollupSuffix, type ParsedWqlSuffixes, type ParsedWqlWindowSuffix, type PipelineOptions, type PipelineResult, type PipelineSink, type PipelineSource, type PointwiseInputs, type QueryDocument, QueryDocumentRunner$1 as QueryDocumentRunner, type QueryDocumentRunnerHost, type QueryDocumentRunnerOptions, type QueryOptions, type QueryResult, QueryService, type QueryServiceStores, type QueryWidgetSuffix, type QueryWindow, type ResolvedRange, type RowsPipes, type RowsQueryResult, type RowsRun, SEMVER, type Series, type SeriesPoint, QueryDocumentRunner as SharedQueryDocumentRunner, type SharedRunnerOptions, type SummaryFactIdentity, type SummaryFactSourceOutput, type TabularColumn, type TabularGroup, type TabularResult, type TagFilter, type TagValue, UNASSIGNED, type UnitBearingFact, type UnitFamily, VERSION, WQL_AGGREGATORS, WQL_CALC_TARGETS, WQL_CHART_HEADS, WQL_COMPARISON_OPS, WQL_CONTENT_FILTER_KEYS, WQL_CONTENT_ONLY_KEYS, WQL_DISPLAY_UNITS, WQL_EFFORT_FILTER_KEYS, WQL_FIND_TARGETS, WQL_FUNCTION_HEADS, WQL_GRAINS, WQL_INTENSITY_TIERS, WQL_KEYWORDS, WQL_METRIC_AGGREGATES, WQL_METRIC_FAMILIES, WQL_NOTE_DEFAULT_SOURCES, WQL_RESULT_PLANES, WQL_ROLLUP_PERIODS, WQL_SOURCES, WQL_SOURCE_HEADS, WQL_SOURCE_HEAD_SCOPES, WQL_SOURCE_VALUES, WQL_STANDARD_DATASETS, WQL_TAG_KEYS, WQL_TYPED_TAG_KEYS, WQL_TYPE_HEADS, WQL_VIRTUAL_DIMS, type WidgetOpResult, type WidgetSpan, type WidgetSpec, type WqlAggregator, type WqlCalcTarget, type WqlChartHead, type WqlComparisonOp, type WqlCompletionOptions, type WqlContentFilterKey, type WqlDisplayUnit, type WqlDomainOrder, type WqlDomainPredicate, type WqlDomainReadResult, type WqlFindTarget, type WqlFunctionHead, type WqlGrain, type WqlIntensityTier, type WqlKeyword, type WqlMetricAggregate, type WqlMetricFamily, type WqlResultPlane, type WqlRollupPeriod, type WqlSource, type WqlSourceHead, type WqlSourceValue, type WqlStandardDataset, type WqlTagKey, type WqlTypedTagKey, type WqlVirtualDim, allowedFilterTypesForTarget, appendSuffixes, appendWidget, buildDashboardDocument, buildDashboardScaffold, buildDrillDownQuery, captureContext, catalogOfItem, civilDateAdd, civilDateDiff, civilDateOf, civilDatesCoveredByRange, civilMonday, consumesRollupFacts, convertDisplay, createBuiltinFormulaEvaluator, dashboardSlug, defaultTokenValues, disciplineFactorFor, duplicateWidget, eventsToStoredLogs, extractDashboardTokens, extractFrontmatterTags, findTargetAdvisories, getList, getScalar, getUnitFamily, inRange, isAggregateQuery, isDashboardMeta, isDashboardWidgetType, isEffortDiscipline, isFindQuery, isPipelineQuery, isProposedMetric, migrateLegacyDashboardBodies, moveWidget, normalizeSummaryFacts, normalizeWql, parseDashboardNote, parseDocument, parseFlatProperties, parseFrontmatter, parseFrontmatterBody, parseFrontmatterCategories, parseFrontmatterProps, parseQuery, parseQueryWidgetSuffix, parseWqlSuffixes, projectEventToFacts, referencedTokens, removeWidget, renderWidgetGroup, resizeWidget, resolveCanonicalMetricKey, resolveOutputUnit, resolveWidgetType, resolveWindowRange, rowsParseError, serialize, serializeDocument, serializeFrontmatter, setDashboardTokenValue, sourceMatches, splitAtWhere, stripFrontmatter, substituteTokens, substituteTokens$1 as substituteTokensRaw, supportsWqlFilterKey, systemTimeZone, toEventRows, toSummaryEventRows, unknownTokensMessage, unknownWidgetTypeMessage, updateWidget, widgetBodyLine, widgetFenceTag, wql, wqlCompletion, wqlCompletionSource, wqlFilterKeys, wqlGroupingDimensions, wqlHighlightStyle, wqlLanguage, parser as wqlParser, wql_parser_terms as wqlTerms, zonedNoon, zonedStartOfDay };
|
package/dist/index.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import { LRParser } from '@lezer/lr';
|
|
|
2
2
|
import { LanguageSupport, HighlightStyle, LRLanguage } from '@codemirror/language';
|
|
3
3
|
import { Completion, CompletionContext, CompletionResult } from '@codemirror/autocomplete';
|
|
4
4
|
import { Extension } from '@codemirror/state';
|
|
5
|
-
import { SummaryCoverage, BlockIndexRow, Note, EventRecord, PageNote, Page, AnalyticsDataPoint, ResultOrigin, StoredOutputStatement } from '@bitcobblers/wod-wiki-core';
|
|
5
|
+
import { SummaryCoverage, BlockIndexRow, Note, EventRecord, PageNote, Page, AnalyticsDataPoint, ResultOrigin, StoredOutputStatement, NoteBlockChange } from '@bitcobblers/wod-wiki-core';
|
|
6
6
|
export { SYSTEM_DEFAULT_OUTPUT_UNIT, UnitConversionError, convertViaCatalog, dimensionKeyOf, lookupUnit, systemDefaultUnit } from '@bitcobblers/wod-wiki-core';
|
|
7
7
|
|
|
8
8
|
/**
|
|
@@ -981,6 +981,8 @@ interface EventStore {
|
|
|
981
981
|
/** Store surface for content queries (`:note`). */
|
|
982
982
|
interface NoteQueryStore {
|
|
983
983
|
getAllNotes(): Promise<Note[]>;
|
|
984
|
+
/** Scoped hydration of actionable block parents. */
|
|
985
|
+
getNotesByIds?(noteIds: readonly string[]): Promise<Note[]>;
|
|
984
986
|
getNoteIdsForTag(label: string): Promise<Set<string>>;
|
|
985
987
|
/** Note-tags label set of one note (moved here from FactQueryStore — it
|
|
986
988
|
* reads note tags, not facts). */
|
|
@@ -1116,8 +1118,6 @@ interface QueryServiceStores {
|
|
|
1116
1118
|
* seed importer materializes corpus rows into the same store). */
|
|
1117
1119
|
blockStore?: BlockQueryStore;
|
|
1118
1120
|
effortStore?: EffortQueryStore;
|
|
1119
|
-
/** Derived corpus-note projections (catalog/tag planes). */
|
|
1120
|
-
staticNoteStore?: NoteQueryStore;
|
|
1121
1121
|
/** Serves exercise containment rows (`block_efforts` store). */
|
|
1122
1122
|
blockEffortsStore?: {
|
|
1123
1123
|
getAllFromIndex(index: string, key: string): Promise<any[]>;
|
|
@@ -1364,14 +1364,13 @@ declare class QueryService {
|
|
|
1364
1364
|
private readonly noteStore;
|
|
1365
1365
|
private readonly blockStore;
|
|
1366
1366
|
private readonly effortStore;
|
|
1367
|
-
private readonly staticNoteStore?;
|
|
1368
1367
|
private readonly pageStore?;
|
|
1369
1368
|
private readonly relationStore?;
|
|
1370
1369
|
private readonly datasetStore?;
|
|
1371
1370
|
private blockEffortsStore;
|
|
1372
1371
|
private tagsStore;
|
|
1373
1372
|
private noteTagsStore;
|
|
1374
|
-
constructor(storesOrEventStore?: QueryServiceStores | EventStore, noteStore?: NoteQueryStore, blockStore?: BlockQueryStore, effortStore?: EffortQueryStore
|
|
1373
|
+
constructor(storesOrEventStore?: QueryServiceStores | EventStore, noteStore?: NoteQueryStore, blockStore?: BlockQueryStore, effortStore?: EffortQueryStore);
|
|
1375
1374
|
/** Windowed flat-fact fetch — the projected view over the event store. */
|
|
1376
1375
|
getFactsByTimeRange(start: number, end: number): Promise<AnalyticsDataPoint[]>;
|
|
1377
1376
|
runQuery(raw: string, options?: QueryOptions): Promise<QueryResult>;
|
|
@@ -1404,6 +1403,7 @@ declare class QueryService {
|
|
|
1404
1403
|
* is injected — one bundle read per run instead of a link/page read per
|
|
1405
1404
|
* matched note. */
|
|
1406
1405
|
private containersForNotes;
|
|
1406
|
+
private hydrateBlocks;
|
|
1407
1407
|
/**
|
|
1408
1408
|
* Execute a :block query against the derived block_index store.
|
|
1409
1409
|
*/
|
|
@@ -1725,10 +1725,9 @@ declare function resolveCanonicalMetricKey(projectionName: string): string;
|
|
|
1725
1725
|
interface SummaryFactIdentity {
|
|
1726
1726
|
noteId: string;
|
|
1727
1727
|
resultId: string;
|
|
1728
|
-
/**
|
|
1729
|
-
|
|
1730
|
-
|
|
1731
|
-
segmentVersion?: number;
|
|
1728
|
+
/** Actionable occurrence and saved revision that produced the result. */
|
|
1729
|
+
blockId?: string;
|
|
1730
|
+
blockVersion?: number;
|
|
1732
1731
|
/** Content-stable cross-note join key. */
|
|
1733
1732
|
blockContentId?: string;
|
|
1734
1733
|
/** Which surface produced the result; trend queries exclude 'playground' by default. */
|
|
@@ -1800,36 +1799,6 @@ declare function projectEventToFacts(record: EventRecord): AnalyticsDataPoint[];
|
|
|
1800
1799
|
*/
|
|
1801
1800
|
declare function eventsToStoredLogs(events: readonly EventRecord[]): StoredOutputStatement[];
|
|
1802
1801
|
|
|
1803
|
-
/**
|
|
1804
|
-
* Landing/catalog projection for a block row, derived from its sourceId route
|
|
1805
|
-
* (`collection:<catalog>/<item>`, `page:collection:<catalog>`,
|
|
1806
|
-
* `feed:feeds/<catalog>/…`) — never from `noteId`, which is a UUID for
|
|
1807
|
-
* imported notes. Legacy path-keyed rows keep deriving from the noteId stem
|
|
1808
|
-
* through `catalogOfItem` (undefined for UUID or no path); a bare
|
|
1809
|
-
* `collection:<catalog>` route is the legacy landing and gets its canonical
|
|
1810
|
-
* `page:collection:` sourceId.
|
|
1811
|
-
*/
|
|
1812
|
-
declare function staticCatalogRoute(block: Pick<BlockIndexRow, 'noteId' | 'sourceId'>): {
|
|
1813
|
-
landing: boolean;
|
|
1814
|
-
catalog?: string;
|
|
1815
|
-
sourceId?: string;
|
|
1816
|
-
};
|
|
1817
|
-
/**
|
|
1818
|
-
* Pure projection of a block_index into static Notes — one Note per distinct
|
|
1819
|
-
* noteId. `id` stays the canonical storage identity (UUID for imported rows);
|
|
1820
|
-
* `catalog` and feed-landing status come from the sourceId route, not
|
|
1821
|
-
* the noteId path. The catalog (e.g. `crossfit-girls`) is what the Library's
|
|
1822
|
-
* panel uses to target the `+ Filter → Catalog` menu.
|
|
1823
|
-
*/
|
|
1824
|
-
declare function staticNotesFromBlocks(blocks: BlockIndexRow[]): Note[];
|
|
1825
|
-
/**
|
|
1826
|
-
* Tag → noteIds index over a block index's frontmatter rows. Static-corpus
|
|
1827
|
-
* notes declare tags only in frontmatter `tags:`; this recovers the mapping
|
|
1828
|
-
* the note store needs to answer `tags:` clauses (issue #853 — the store
|
|
1829
|
-
* previously returned an empty set for every tag).
|
|
1830
|
-
*/
|
|
1831
|
-
declare function staticTagIndexFromBlocks(blocks: BlockIndexRow[]): Map<string, Set<string>>;
|
|
1832
|
-
|
|
1833
1802
|
/**
|
|
1834
1803
|
* Dashboard Note model (#898 map, format locked in #899).
|
|
1835
1804
|
*
|
|
@@ -2064,6 +2033,7 @@ declare function parseFrontmatterProps(lines: string[]): Record<string, string>;
|
|
|
2064
2033
|
* itself. Move/duplicate/remove operate on the whole group so the rendered
|
|
2065
2034
|
* card — title, question, chart — travels together.
|
|
2066
2035
|
*/
|
|
2036
|
+
|
|
2067
2037
|
interface WidgetSpec {
|
|
2068
2038
|
/** Card title — renders as a `## ` heading above the block. */
|
|
2069
2039
|
title?: string;
|
|
@@ -2099,6 +2069,13 @@ declare function appendWidget(raw: string, spec: WidgetSpec): string;
|
|
|
2099
2069
|
type WidgetOpResult = {
|
|
2100
2070
|
ok: true;
|
|
2101
2071
|
note: string;
|
|
2072
|
+
changes: NoteBlockChange[];
|
|
2073
|
+
retainedBlocks: Array<{
|
|
2074
|
+
from: number;
|
|
2075
|
+
to: number;
|
|
2076
|
+
nextFrom: number;
|
|
2077
|
+
nextTo: number;
|
|
2078
|
+
}>;
|
|
2102
2079
|
} | {
|
|
2103
2080
|
ok: false;
|
|
2104
2081
|
reason: 'not-found' | 'stale-body';
|
|
@@ -2142,13 +2119,13 @@ declare function migrateLegacyDashboardBodies(raw: string): string;
|
|
|
2142
2119
|
* Auto-generated build version metadata.
|
|
2143
2120
|
* Do not edit directly; updated by scripts/stamp-version.ts
|
|
2144
2121
|
*/
|
|
2145
|
-
declare const VERSION = "0.35.
|
|
2146
|
-
declare const GIT_SHA = "
|
|
2147
|
-
declare const BUILD_TIME = "2026-10-
|
|
2122
|
+
declare const VERSION = "0.35.2117";
|
|
2123
|
+
declare const GIT_SHA = "03d1dfc";
|
|
2124
|
+
declare const BUILD_TIME = "2026-10-12T20:08:12.374Z";
|
|
2148
2125
|
declare const SEMVER: {
|
|
2149
|
-
readonly version: "0.35.
|
|
2150
|
-
readonly gitSha: "
|
|
2151
|
-
readonly buildTime: "2026-10-
|
|
2126
|
+
readonly version: "0.35.2117";
|
|
2127
|
+
readonly gitSha: "03d1dfc";
|
|
2128
|
+
readonly buildTime: "2026-10-12T20:08:12.374Z";
|
|
2152
2129
|
};
|
|
2153
2130
|
|
|
2154
|
-
export { type Aggregator, type AnyParsedQuery, BUILD_TIME, type BlockQueryStore, CONTENT_GROUPING_DIMENSIONS, type CatalogFieldSuggestion, type CatalogValueSuggestion, type ComparisonOp, DASHBOARD_GRID_MAX_COLS, DASHBOARD_WIDGET_TYPES, DEFAULT_DASHBOARD_TITLE, DISCIPLINE_FACTORS, type DashboardDocument, type DashboardMeta, type DashboardParsedSection, type DashboardSectionInput, type DashboardToken, type DashboardWidget, type DashboardWidgetType, type DocumentAssignment, type DocumentDefaults, type DocumentFormula, type DocumentOutput, type DocumentResult, EFFORT_DISCIPLINES, type EffortDiscipline, type EffortQueryStore, type EventRowIdentity, type EventStore, type ExecutionContext, type FamilyRunPayload, type FindOptions, type FindPredicate, type FindQueryResult, type FormulaEvaluation, type FormulaEvaluator, GIT_SHA, type IEffort, type IFieldCatalog, type LinkWidget, type MetricPredicate, type NoteContainer, type NoteQueryStore, type NoteRelationBundle, type OperandValue, type OutputUnitResolution, PLANNED_WIDGET_TYPES, type PageSourceEntry, PageSourceRegistry, type ParsedAggregateQuery, type ParsedDocument, type ParsedFindQuery, type ParsedFrontmatter, type ParsedPipelineQuery, type ParsedRowsQuery, type ParsedWqlRollupSuffix, type ParsedWqlSuffixes, type ParsedWqlWindowSuffix, type PipelineOptions, type PipelineResult, type PipelineSink, type PipelineSource, type PointwiseInputs, type QueryDocument, QueryDocumentRunner$1 as QueryDocumentRunner, type QueryDocumentRunnerHost, type QueryDocumentRunnerOptions, type QueryOptions, type QueryResult, QueryService, type QueryServiceStores, type QueryWidgetSuffix, type QueryWindow, type ResolvedRange, type RowsPipes, type RowsQueryResult, type RowsRun, SEMVER, type Series, type SeriesPoint, QueryDocumentRunner as SharedQueryDocumentRunner, type SharedRunnerOptions, type SummaryFactIdentity, type SummaryFactSourceOutput, type TabularColumn, type TabularGroup, type TabularResult, type TagFilter, type TagValue, UNASSIGNED, type UnitBearingFact, type UnitFamily, VERSION, WQL_AGGREGATORS, WQL_CALC_TARGETS, WQL_CHART_HEADS, WQL_COMPARISON_OPS, WQL_CONTENT_FILTER_KEYS, WQL_CONTENT_ONLY_KEYS, WQL_DISPLAY_UNITS, WQL_EFFORT_FILTER_KEYS, WQL_FIND_TARGETS, WQL_FUNCTION_HEADS, WQL_GRAINS, WQL_INTENSITY_TIERS, WQL_KEYWORDS, WQL_METRIC_AGGREGATES, WQL_METRIC_FAMILIES, WQL_NOTE_DEFAULT_SOURCES, WQL_RESULT_PLANES, WQL_ROLLUP_PERIODS, WQL_SOURCES, WQL_SOURCE_HEADS, WQL_SOURCE_HEAD_SCOPES, WQL_SOURCE_VALUES, WQL_STANDARD_DATASETS, WQL_TAG_KEYS, WQL_TYPED_TAG_KEYS, WQL_TYPE_HEADS, WQL_VIRTUAL_DIMS, type WidgetOpResult, type WidgetSpan, type WidgetSpec, type WqlAggregator, type WqlCalcTarget, type WqlChartHead, type WqlComparisonOp, type WqlCompletionOptions, type WqlContentFilterKey, type WqlDisplayUnit, type WqlDomainOrder, type WqlDomainPredicate, type WqlDomainReadResult, type WqlFindTarget, type WqlFunctionHead, type WqlGrain, type WqlIntensityTier, type WqlKeyword, type WqlMetricAggregate, type WqlMetricFamily, type WqlResultPlane, type WqlRollupPeriod, type WqlSource, type WqlSourceHead, type WqlSourceValue, type WqlStandardDataset, type WqlTagKey, type WqlTypedTagKey, type WqlVirtualDim, allowedFilterTypesForTarget, appendSuffixes, appendWidget, buildDashboardDocument, buildDashboardScaffold, buildDrillDownQuery, captureContext, catalogOfItem, civilDateAdd, civilDateDiff, civilDateOf, civilDatesCoveredByRange, civilMonday, consumesRollupFacts, convertDisplay, createBuiltinFormulaEvaluator, dashboardSlug, defaultTokenValues, disciplineFactorFor, duplicateWidget, eventsToStoredLogs, extractDashboardTokens, extractFrontmatterTags, findTargetAdvisories, getList, getScalar, getUnitFamily, inRange, isAggregateQuery, isDashboardMeta, isDashboardWidgetType, isEffortDiscipline, isFindQuery, isPipelineQuery, isProposedMetric, migrateLegacyDashboardBodies, moveWidget, normalizeSummaryFacts, normalizeWql, parseDashboardNote, parseDocument, parseFlatProperties, parseFrontmatter, parseFrontmatterBody, parseFrontmatterCategories, parseFrontmatterProps, parseQuery, parseQueryWidgetSuffix, parseWqlSuffixes, projectEventToFacts, referencedTokens, removeWidget, renderWidgetGroup, resizeWidget, resolveCanonicalMetricKey, resolveOutputUnit, resolveWidgetType, resolveWindowRange, rowsParseError, serialize, serializeDocument, serializeFrontmatter, setDashboardTokenValue, sourceMatches, splitAtWhere,
|
|
2131
|
+
export { type Aggregator, type AnyParsedQuery, BUILD_TIME, type BlockQueryStore, CONTENT_GROUPING_DIMENSIONS, type CatalogFieldSuggestion, type CatalogValueSuggestion, type ComparisonOp, DASHBOARD_GRID_MAX_COLS, DASHBOARD_WIDGET_TYPES, DEFAULT_DASHBOARD_TITLE, DISCIPLINE_FACTORS, type DashboardDocument, type DashboardMeta, type DashboardParsedSection, type DashboardSectionInput, type DashboardToken, type DashboardWidget, type DashboardWidgetType, type DocumentAssignment, type DocumentDefaults, type DocumentFormula, type DocumentOutput, type DocumentResult, EFFORT_DISCIPLINES, type EffortDiscipline, type EffortQueryStore, type EventRowIdentity, type EventStore, type ExecutionContext, type FamilyRunPayload, type FindOptions, type FindPredicate, type FindQueryResult, type FormulaEvaluation, type FormulaEvaluator, GIT_SHA, type IEffort, type IFieldCatalog, type LinkWidget, type MetricPredicate, type NoteContainer, type NoteQueryStore, type NoteRelationBundle, type OperandValue, type OutputUnitResolution, PLANNED_WIDGET_TYPES, type PageSourceEntry, PageSourceRegistry, type ParsedAggregateQuery, type ParsedDocument, type ParsedFindQuery, type ParsedFrontmatter, type ParsedPipelineQuery, type ParsedRowsQuery, type ParsedWqlRollupSuffix, type ParsedWqlSuffixes, type ParsedWqlWindowSuffix, type PipelineOptions, type PipelineResult, type PipelineSink, type PipelineSource, type PointwiseInputs, type QueryDocument, QueryDocumentRunner$1 as QueryDocumentRunner, type QueryDocumentRunnerHost, type QueryDocumentRunnerOptions, type QueryOptions, type QueryResult, QueryService, type QueryServiceStores, type QueryWidgetSuffix, type QueryWindow, type ResolvedRange, type RowsPipes, type RowsQueryResult, type RowsRun, SEMVER, type Series, type SeriesPoint, QueryDocumentRunner as SharedQueryDocumentRunner, type SharedRunnerOptions, type SummaryFactIdentity, type SummaryFactSourceOutput, type TabularColumn, type TabularGroup, type TabularResult, type TagFilter, type TagValue, UNASSIGNED, type UnitBearingFact, type UnitFamily, VERSION, WQL_AGGREGATORS, WQL_CALC_TARGETS, WQL_CHART_HEADS, WQL_COMPARISON_OPS, WQL_CONTENT_FILTER_KEYS, WQL_CONTENT_ONLY_KEYS, WQL_DISPLAY_UNITS, WQL_EFFORT_FILTER_KEYS, WQL_FIND_TARGETS, WQL_FUNCTION_HEADS, WQL_GRAINS, WQL_INTENSITY_TIERS, WQL_KEYWORDS, WQL_METRIC_AGGREGATES, WQL_METRIC_FAMILIES, WQL_NOTE_DEFAULT_SOURCES, WQL_RESULT_PLANES, WQL_ROLLUP_PERIODS, WQL_SOURCES, WQL_SOURCE_HEADS, WQL_SOURCE_HEAD_SCOPES, WQL_SOURCE_VALUES, WQL_STANDARD_DATASETS, WQL_TAG_KEYS, WQL_TYPED_TAG_KEYS, WQL_TYPE_HEADS, WQL_VIRTUAL_DIMS, type WidgetOpResult, type WidgetSpan, type WidgetSpec, type WqlAggregator, type WqlCalcTarget, type WqlChartHead, type WqlComparisonOp, type WqlCompletionOptions, type WqlContentFilterKey, type WqlDisplayUnit, type WqlDomainOrder, type WqlDomainPredicate, type WqlDomainReadResult, type WqlFindTarget, type WqlFunctionHead, type WqlGrain, type WqlIntensityTier, type WqlKeyword, type WqlMetricAggregate, type WqlMetricFamily, type WqlResultPlane, type WqlRollupPeriod, type WqlSource, type WqlSourceHead, type WqlSourceValue, type WqlStandardDataset, type WqlTagKey, type WqlTypedTagKey, type WqlVirtualDim, allowedFilterTypesForTarget, appendSuffixes, appendWidget, buildDashboardDocument, buildDashboardScaffold, buildDrillDownQuery, captureContext, catalogOfItem, civilDateAdd, civilDateDiff, civilDateOf, civilDatesCoveredByRange, civilMonday, consumesRollupFacts, convertDisplay, createBuiltinFormulaEvaluator, dashboardSlug, defaultTokenValues, disciplineFactorFor, duplicateWidget, eventsToStoredLogs, extractDashboardTokens, extractFrontmatterTags, findTargetAdvisories, getList, getScalar, getUnitFamily, inRange, isAggregateQuery, isDashboardMeta, isDashboardWidgetType, isEffortDiscipline, isFindQuery, isPipelineQuery, isProposedMetric, migrateLegacyDashboardBodies, moveWidget, normalizeSummaryFacts, normalizeWql, parseDashboardNote, parseDocument, parseFlatProperties, parseFrontmatter, parseFrontmatterBody, parseFrontmatterCategories, parseFrontmatterProps, parseQuery, parseQueryWidgetSuffix, parseWqlSuffixes, projectEventToFacts, referencedTokens, removeWidget, renderWidgetGroup, resizeWidget, resolveCanonicalMetricKey, resolveOutputUnit, resolveWidgetType, resolveWindowRange, rowsParseError, serialize, serializeDocument, serializeFrontmatter, setDashboardTokenValue, sourceMatches, splitAtWhere, stripFrontmatter, substituteTokens, substituteTokens$1 as substituteTokensRaw, supportsWqlFilterKey, systemTimeZone, toEventRows, toSummaryEventRows, unknownTokensMessage, unknownWidgetTypeMessage, updateWidget, widgetBodyLine, widgetFenceTag, wql, wqlCompletion, wqlCompletionSource, wqlFilterKeys, wqlGroupingDimensions, wqlHighlightStyle, wqlLanguage, parser as wqlParser, wql_parser_terms as wqlTerms, zonedNoon, zonedStartOfDay };
|