@bitcobblers/wod-wiki-engine 0.53.2204 → 0.54.2205
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/agent.cjs +6426 -0
- package/dist/agent.cjs.map +1 -0
- package/dist/agent.d.cts +851 -0
- package/dist/agent.d.ts +851 -0
- package/dist/agent.mjs +2701 -0
- package/dist/agent.mjs.map +1 -0
- package/dist/chunk-FSWOTQ5M.mjs +4492 -0
- package/dist/chunk-FSWOTQ5M.mjs.map +1 -0
- package/dist/index.cjs +6 -6
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +17 -370
- package/dist/index.d.ts +17 -370
- package/dist/index.mjs +4 -4493
- package/dist/index.mjs.map +1 -1
- package/dist/ir-CKImc4T0.d.cts +360 -0
- package/dist/ir-CKImc4T0.d.ts +360 -0
- package/package.json +13 -7
package/dist/index.d.cts
CHANGED
|
@@ -1,10 +1,12 @@
|
|
|
1
|
-
import { IDialect, EventRecord,
|
|
1
|
+
import { IDialect, EventRecord, NoteBlock, NoteTelemetryBundleResult, NoteTelemetryBundle, Note as Note$1, NotebookId, NotebookLinkTargetKind, Tag, TagTypeRecord, TagIndex, OverridePropertyKind, ScopedPropertyOverride } from '@bitcobblers/wod-wiki-core';
|
|
2
2
|
export * from '@bitcobblers/wod-wiki-core';
|
|
3
|
-
import { IRealtimeProcessor, ISummaryProcessor, IEffort,
|
|
3
|
+
import { IRealtimeProcessor, ISummaryProcessor, IEffort, IEquipment, ReferenceIndex } from '@bitcobblers/wod-wiki-lang';
|
|
4
4
|
export { ABSENT, AGGREGATE_BUILTINS, AUTHORITATIVE_CASTS, AmrapLogicStrategy, AnalyticsContext, AnalyticsEngine, AnalyticsProfileContext, AnalyticsResult, AnalyticsTransformer, BUILTIN_CALCS, BUNDLED_EFFORT_COUNT, BehaviorContext, BehaviorEventListener, BehaviorEventType, BlockBuilder, BlockContext, BlockLifecycleOptions, ButtonBehavior, CONSUMED_HINTS, CONSUMED_HINT_KEYS, CONTEXT_ATOMS, CalcDefinition, CalcEngine, CalcOrigin, CalcScope, CalculationDefinition, CalculationRegistry, CardioDialect, ChildSelectionBehavior, ChildrenStrategy, ChoiceGroupMetric, ClimbDialect, ClimbMetricType, CompletionDecision, CountdownTimerBehavior, CountupTimerBehavior, CrossFitDialect, DAY, DEFAULT_RESOLVER_OPTIONS, DEFAULT_RUNTIME_OPTIONS, DEFAULT_SOUND_PROFILE, DEFAULT_UNRESOLVED_EFFORT_MET, DIM_LENGTH, DIM_MASS, DIM_TIME, DIM_ZERO, DayRollup, DialectStack, DimVector, EFFORT_DATA_METRIC_TYPE, EFFORT_REGISTRY_ORIGINS, EffortBaseAttributes, EffortDerivation, EffortFallbackStrategy, EffortRegistrySource, EffortResolutionOptions, EffortResolver, EffortResolverOptions, ErrorAction, EventBus, EventCallback, EventHandlerOptions, ExecutionContext, ExecutionStatus, ExitBehavior, ExprNode, FixtureSyntaxError, GenericGroupStrategy, GenericLoopStrategy, GenericTimerStrategy, HabitsDialect, IAnalyticsEngine, IAnalyticsProcessorDescriptor, IAnalyticsProfile, IAnchorValue, IBehaviorContext, IBlockContext, ICastSubscription, IEffort, IEffortRegistry, IEffortResolver, IEvent, IEventBus, IEventHandler, IJitCompiler, ILookupTable, IMemoryLocation, IMemoryReference, IMetricPresentationPolicy, INTENSITY_TIERS, INowProvider, IRealtimeProcessor, IRuntimeAction, IRuntimeActionable, IRuntimeBehavior, IRuntimeBlock, IRuntimeBlockStrategy, IRuntimeClock, IRuntimeEventProvider, IRuntimeFactory, IRuntimeMemory, IRuntimeStack, IRuntimeSubscription, IScript, IScriptRuntime, ISummaryProcessor, InMemoryEffortRegistry, IntensityTier, InterceptMode, IntervalLogicStrategy, JitCompiler, LabelingBehavior, LineFormScope, LiteralKind, LocalRuntimeSubscription, LookupRegistry, MAX_TAG_CONTRIBUTION_DEPTH, MatchMode, MdTimerRuntime, MemoryEntry, MemoryLocation, MemoryTag, MemoryTypeEnum, MetricLine, MetricPresentationSurface, MetricPresentationToken, MetricRenderKind, MetricTone, MetricVisibility, MockClock, NextEvent, OutputEmitter, OutputListener, PRODUCTION_STRATEGIES, PopBlockAction, ProjectionResult, PropertyRuleInput, PropertySourceLayer, PushBlockAction, RegisterEventHandlerAction, Registry, ReportOutputBehavior, ReportOutputStrategy, ResolvedEffort, ResolvedEffortData, ResolvedTagContributions, RoundState, RoundsMetric, RuntimeAdapter, RuntimeBlock, RuntimeBlockOptions, RuntimeClock, RuntimeController, RuntimeError, RuntimeFactory, RuntimeLogger, RuntimeMemory, RuntimeObservers, RuntimeStack, RuntimeStackOptions, SEED_PRECEDENCE_RANK, SOUND_PLAY_EVENT, SOUND_PROFILE_METRIC, STORE_CALCS, STREAM_ATOMS, ScriptRuntime, ScriptRuntimeDependencies, SeedPrecedenceTier, SegmentWithMetadata, SessionRootStrategy, ShakeOutResult, SkippedDependencyDiagnostic, SnapshotClock, SoundProfile, SoundProfileBehavior, SoundRule, SoundStrategy, SoundTriggerAnchor, SoundTriggerPoint, StackEvent, StackListener, StackObserver, StackSnapshot, StackedDashboardWidgetDescriptor, StandardAnalyticsProfile, StartSessionAction, StartSessionOptions, StartWorkoutAction, StatementMetricDiff, SubscribeOptions, SubscriptionManager, TAG_MARKER_PREFIX, TestableBlockConfig, TimeSpan, TimerState, TwoPassEffortResolutionProcess, TypedMemoryReference, UNITS, UnitsDialect, UnregisterEventHandlerAction, Unsubscribe, VISIBILITY_ICONS, VISIBILITY_LABELS, Val, WhiteboardScript, WodDialect, YogaDialect, buildTooltip, bundledEfforts, calculateDuration, calculateElapsed, canonicalizeType, collapseUnresolvedChoices, compareStatement, compileLineForm, compilePropertySummaryCalcs, compoundName, computeColumnLabel, computeLabel, computeWorkloadRollups, createAnalyticsEngineForBlock, createCalcEngine, createCompiler, createDialectStack, createMetricPresentationPolicy, createMockClock, createParser, dailySessionLoads, dayBucket, dedupeEntitiesByPrecedence, dialectRegistry, dialectStack, diffStatement, evaluate, extractMetrics, extractPropertyRulesFromMeta, extractStatements, extractTagPropertyRules, findBestFuzzyMatch, findTagContributionCycles, findUnresolvedChoices, formatDurationCompact, formatDurationSmart, formatSecondsHHMMSS, formatSecondsMMSS, formatSoundTrigger, formatTime, formatTimeHHMMSS, formatTimeMMSS, formatTimePrecise, formatTimestamp, frozenNow, getAnalyticsFromLogs, getAnalyticsFromRuntime, getHints, getMetricVisibility, getRuntimeNowMs, hasHint, hintMetric, hintsToContainer, isCastSubscription, isChoiceResolved, isTimeLikeMetric, isWithinThreshold, levenshteinDistance, metricPresentation, normalizeForFuzzy, outputNodeId, outputNodeIds, parseCalcLine, parseExpression, parseMetricLine, parseScript, parseSoundTrigger, realtimeProcessorRegistry, renderMetric, resolveEntityRank, resolveEntityTier, resolveProfileRules, resolvePropertyDashboardWidgets, resolveSoundProfile, resolveSourceRank, resolveSourceTier, resolveTagContributions, roundToTenth, runMetricShakeOutQueue, strategyRegistry, summaryProcessorRegistry, tagContributionMetrics, tagMarkerSlug, tagMarkerSlugs, tagMarkerType, toStoredOutputStatement, truthy, wallClockNow, whiteboardParser, whiteboardScript, whiteboardScriptLanguage, writeChoiceSelection } from '@bitcobblers/wod-wiki-lang';
|
|
5
5
|
import { EventStore } from '@bitcobblers/wod-wiki-wql';
|
|
6
6
|
export { Aggregator, AnyParsedQuery, BlockQueryStore, BuildScopedDashboardOptions, ComparisonOp, DASHBOARD_GRID_MAX_COLS, DASHBOARD_WIDGET_TYPES, DEFAULT_DASHBOARD_TITLE, DEFAULT_NOTEBOOK_SLUGS, DashboardDocument, DashboardMeta, DashboardToken, DashboardWidget, EffortQueryStore, EntityScopeDescriptor, EntityScopeKind, EventStore, FeedCatalogQueryStore, FindOptions, FindPredicate, FindQueryResult, MetricPredicate, NoteQueryStore, NotebookId, PLANNED_WIDGET_TYPES, ParseQueryBlockOptions, ParsedAggregateQuery, ParsedFindQuery, ParsedPipelineQuery, ParsedRowsQuery, PipelineSink, PipelineSource, QueryBlockObject, QueryOptions, QueryResult, QuerySeriesSpec, QueryService, QueryServiceStores, QuerySortSpec, QueryViewKind, QueryWidgetSuffix, QueryWindow, ResolveEntityScopeInput, RowsQueryResult, RowsRun, ScalarOrParam, Series, SeriesPoint, TagFilter, TagValue, WQL_AGGREGATORS, WQL_CALC_TARGETS, WQL_CHART_HEADS, WQL_COMPARISON_OPS, WQL_CONTENT_FILTER_KEYS, WQL_DISPLAY_UNITS, WQL_FIND_TARGETS, WQL_FUNCTION_HEADS, WQL_GRAINS, WQL_INTENSITY_TIERS, WQL_KEYWORDS, WQL_METRIC_AGGREGATES, WQL_METRIC_FAMILIES, WQL_RESULT_PLANES, WQL_ROLLUP_PERIODS, WQL_SOURCES, WQL_SOURCE_HEADS, WQL_SOURCE_VALUES, WQL_STANDARD_DATASETS, WQL_TAG_KEYS, WQL_TYPED_TAG_KEYS, WQL_VIRTUAL_DIMS, WqlChartHead, WqlFindTarget, WqlSourceValue, bindQueryParams, buildDashboardDocument, buildDashboardFromScope, buildDashboardScaffold, buildWidgetsForWqlScope, collectQueryBlockParams, collectQueryParams, dashboardSlug, defaultTokenValues, extractDashboardTokens, extractNoteWqlOverride, isAggregateQuery, isDashboardMeta, isDashboardWidgetType, isDefaultShorthandQueryBlock, isFindQuery, isNoteEditable, isPipelineQuery, isYamlQueryBlockBody, normalizeWql, notebookOfItem, notebookSlugFromId, notebooksOfItem, parseFilterFragment, parseQuery, parseQueryBlock, parseQueryWidgetSuffix, parseWqlSuffixes, queryBlockAttributes, queryBlockToDocumentText, resolveEntityScope, resolveWidgetType, serialize, serializeQueryBlock, serializeQueryBlockFence, splitAtWhere, substituteTokens, toNotebookId, unknownTokensMessage, unknownWidgetTypeMessage, wql, wqlLanguage, wqlParser, wqlTerms } from '@bitcobblers/wod-wiki-wql';
|
|
7
|
-
import {
|
|
7
|
+
import { a as SeedRow, b as SeedManifest, c as SeedMetaRecord, N as NotebookIndex, d as FeedTreeReader, F as FeedTree } from './ir-CKImc4T0.cjs';
|
|
8
|
+
export { C as CANVAS_CHUNK_ID, e as ChunkKind, f as CorpusIRData, D as DASHBOARDS_CHUNK_ID, g as DirectoryHandleFeedTree, E as EFFORTS_CHUNK_ID, h as EQUIPMENT_CHUNK_ID, i as ExecutionLog, j as FeedFileStat, k as FeedPath, l as FeedTreeError, m as FeedTreeErrorCode, n as FeedTreeWriter, o as FetchLike, p as FileSystemDirectoryHandleLike, q as FileSystemFileHandleLike, r as FileSystemWritableLike, H as HttpFeedTree, I as IrKind, M as ManifestChunk, s as MemoryFeedTree, t as MetricNode, u as NotebookIndexSummary, v as PortabilityImportReport, P as PortableFileEntry, w as PrepareJournalSessionRunInput, x as PreparedJournalSessionRun, R as ResolvedUpstreamProvenance, y as SEED_BROADCAST_CHANNEL, z as SEED_NAMESPACE, A as SEED_REGISTERED_WIDGETS, B as SEED_SCHEMA, G as SeedRecordRef, S as StatementNode, W as WodWikiIRFile, J as buildNoteProvenance, K as buildStatementTree, L as canvasRouteSlug, O as cloneRemoteRecord, Q as createIRFile, T as decodeUtf8, U as emptySeedMeta, V as encodeUtf8, X as exportPortableFilesFromStorage, Y as feedIdOfMetaKey, Z as getNotePublicationSummary, _ as ingestPortableFilesIntoStorage, $ as isIRFile, a0 as normalizeFeedTreePath, a1 as notebookSlugForChunkId, a2 as prepareJournalSessionRun, a3 as previewRemoteNotebook, a4 as previewRemoteRecord, a5 as resolveUpstreamProvenance, a6 as seedMetaKey, a7 as seedNoteSourceId, a8 as seedPrecedenceRank, a9 as seedSourceTier, aa as setNotebookPublic, ab as setSessionPublic, ac as sha256HexAsync, ad as statementToNode } from './ir-CKImc4T0.cjs';
|
|
9
|
+
import { Session, Note, IStorage } from '@bitcobblers/wod-wiki-storage';
|
|
8
10
|
|
|
9
11
|
/**
|
|
10
12
|
* Language Pack API — umbrella sugar over per-package slices
|
|
@@ -49,68 +51,6 @@ declare function getRegisteredLanguagePacks(): LanguagePack[];
|
|
|
49
51
|
|
|
50
52
|
declare function inMemoryEventStore(events: readonly EventRecord[]): EventStore;
|
|
51
53
|
|
|
52
|
-
/**
|
|
53
|
-
* Pure JSON Intermediate Representation (IR) Schemas & Envelope
|
|
54
|
-
*
|
|
55
|
-
* Implements wayfinder #955 and research asset `docs/research/json-ir-schemas-2026-08-17.md`.
|
|
56
|
-
* Freezes the existing result vocabulary (QueryResult, RowsQueryResult, FindQueryResult,
|
|
57
|
-
* StoredOutputStatement, AnalyticsDataPoint, WorkoutResult, StatementNode) in a
|
|
58
|
-
* versioned envelope safe for JSON round-trips.
|
|
59
|
-
*/
|
|
60
|
-
|
|
61
|
-
type IrKind = 'fact-set' | 'result-set' | 'note-set' | 'corpus' | 'query-result' | 'find-result' | 'rows-result' | 'pipeline-result' | 'parse-tree' | 'execution-log';
|
|
62
|
-
/**
|
|
63
|
-
* Universal JSON envelope for all headless IR fixtures and output artifacts.
|
|
64
|
-
*/
|
|
65
|
-
interface WodWikiIRFile<T> {
|
|
66
|
-
$schema: 'https://wod-wiki.dev/ir/v1.json';
|
|
67
|
-
kind: IrKind;
|
|
68
|
-
generatedAt: number;
|
|
69
|
-
source: string;
|
|
70
|
-
data: T;
|
|
71
|
-
}
|
|
72
|
-
declare function createIRFile<T>(kind: IrKind, data: T, optionsOrSource?: string | {
|
|
73
|
-
source?: string;
|
|
74
|
-
generatedAt?: number;
|
|
75
|
-
}, generatedAt?: number): WodWikiIRFile<T>;
|
|
76
|
-
declare function isIRFile<T = unknown>(obj: unknown): obj is WodWikiIRFile<T>;
|
|
77
|
-
interface MetricNode {
|
|
78
|
-
type: string;
|
|
79
|
-
image?: string;
|
|
80
|
-
value?: unknown;
|
|
81
|
-
origin?: string;
|
|
82
|
-
}
|
|
83
|
-
interface StatementNode {
|
|
84
|
-
id: number;
|
|
85
|
-
type: 'statement' | 'duration' | 'rounds' | 'rest' | 'segment' | 'root';
|
|
86
|
-
raw: string;
|
|
87
|
-
from: number;
|
|
88
|
-
to: number;
|
|
89
|
-
metrics: MetricNode[];
|
|
90
|
-
hints?: string[];
|
|
91
|
-
children?: StatementNode[];
|
|
92
|
-
}
|
|
93
|
-
declare function statementToNode(stmt: ICodeStatement, idMap: Map<number, ICodeStatement>): StatementNode;
|
|
94
|
-
/** Builds a StatementNode tree from a parsed WhiteboardScript. */
|
|
95
|
-
declare function buildStatementTree(script: IScript): StatementNode;
|
|
96
|
-
interface ExecutionLog {
|
|
97
|
-
results: WorkoutResults;
|
|
98
|
-
logs: StoredOutputStatement[];
|
|
99
|
-
statements?: StoredOutputStatement[];
|
|
100
|
-
blockKey?: string;
|
|
101
|
-
sourceScript?: string;
|
|
102
|
-
}
|
|
103
|
-
interface CorpusIRData {
|
|
104
|
-
notes?: Note[];
|
|
105
|
-
revisions?: BlockRevision[];
|
|
106
|
-
blocks?: BlockIndexRow[];
|
|
107
|
-
results?: Session[];
|
|
108
|
-
facts?: AnalyticsDataPoint[];
|
|
109
|
-
efforts?: IEffort[];
|
|
110
|
-
logs?: StoredOutputStatement[];
|
|
111
|
-
tags?: Record<string, string[]>;
|
|
112
|
-
}
|
|
113
|
-
|
|
114
54
|
/**
|
|
115
55
|
* Import / Export exchange formats for notes and sessions.
|
|
116
56
|
*
|
|
@@ -146,7 +86,7 @@ declare function parseFrontmatterDateMs(raw: string | undefined): number | undef
|
|
|
146
86
|
*/
|
|
147
87
|
declare function injectIdentityFrontmatter(markdown: string, identity: NoteIdentity): string;
|
|
148
88
|
/** Export the exact authored Note source, with YAML frontmatter identity for re-import and Feed repositories. */
|
|
149
|
-
declare function composeNoteMarkdown(note: Note
|
|
89
|
+
declare function composeNoteMarkdown(note: Note): string;
|
|
150
90
|
interface ParsedNoteMarkdown {
|
|
151
91
|
id?: string;
|
|
152
92
|
title: string;
|
|
@@ -216,13 +156,13 @@ declare const SESSION_CSV_HEADER: ("duration" | "dialect" | "origin" | "noteId"
|
|
|
216
156
|
* one session anchor row (empty event columns). Import with
|
|
217
157
|
* {@link csvToSessionRows}.
|
|
218
158
|
*/
|
|
219
|
-
declare function sessionToCsv(session: Session
|
|
159
|
+
declare function sessionToCsv(session: Session, events: readonly EventRecord[]): string;
|
|
220
160
|
/** Parse one CSV line, honoring double-quoted fields (RFC 4180 subset). */
|
|
221
161
|
declare function parseCsvLine(line: string): string[];
|
|
222
162
|
/** Split CSV into records on newlines that are NOT inside quoted fields. */
|
|
223
163
|
declare function splitCsvRecords(csv: string): string[];
|
|
224
164
|
interface SessionImportRows {
|
|
225
|
-
session: Session
|
|
165
|
+
session: Session;
|
|
226
166
|
events: EventRecord[];
|
|
227
167
|
}
|
|
228
168
|
/**
|
|
@@ -247,127 +187,15 @@ declare function csvToTelemetryBundle(csv: string): NoteTelemetryBundleResult;
|
|
|
247
187
|
* Auto-generated build version metadata.
|
|
248
188
|
* Do not edit directly; updated by scripts/stamp-version.ts
|
|
249
189
|
*/
|
|
250
|
-
declare const VERSION = "0.
|
|
251
|
-
declare const GIT_SHA = "
|
|
252
|
-
declare const BUILD_TIME = "2026-11-
|
|
190
|
+
declare const VERSION = "0.54.2205";
|
|
191
|
+
declare const GIT_SHA = "1a0df57";
|
|
192
|
+
declare const BUILD_TIME = "2026-11-12T03:09:09.212Z";
|
|
253
193
|
declare const SEMVER: {
|
|
254
|
-
readonly version: "0.
|
|
255
|
-
readonly gitSha: "
|
|
256
|
-
readonly buildTime: "2026-11-
|
|
194
|
+
readonly version: "0.54.2205";
|
|
195
|
+
readonly gitSha: "1a0df57";
|
|
196
|
+
readonly buildTime: "2026-11-12T03:09:09.212Z";
|
|
257
197
|
};
|
|
258
198
|
|
|
259
|
-
declare const SEED_SCHEMA = 9;
|
|
260
|
-
declare const SEED_REGISTERED_WIDGETS: readonly string[];
|
|
261
|
-
declare const SEED_NAMESPACE = "1b671a64-40d5-491e-99b0-da01ff1f3341";
|
|
262
|
-
/** Source and all current derived rows commit as one chunk. */
|
|
263
|
-
interface SeedRow {
|
|
264
|
-
path: string;
|
|
265
|
-
content: string;
|
|
266
|
-
blocks: Record<string, NoteBlock>;
|
|
267
|
-
blockIndex: BlockIndexRow[];
|
|
268
|
-
blockEfforts: BlockEffort[];
|
|
269
|
-
blockEquipment: BlockEquipment[];
|
|
270
|
-
telemetry?: {
|
|
271
|
-
sessions: Session[];
|
|
272
|
-
events: EventRecord[];
|
|
273
|
-
};
|
|
274
|
-
commit?: string;
|
|
275
|
-
uuid?: string;
|
|
276
|
-
version?: number;
|
|
277
|
-
}
|
|
278
|
-
interface SeedRecordRef {
|
|
279
|
-
uuid: string;
|
|
280
|
-
path: string;
|
|
281
|
-
recordPath: string;
|
|
282
|
-
commit: string;
|
|
283
|
-
version: number;
|
|
284
|
-
sha256: string;
|
|
285
|
-
title?: string;
|
|
286
|
-
date?: number;
|
|
287
|
-
}
|
|
288
|
-
interface NotebookIndexSummary {
|
|
289
|
-
notebookId: string;
|
|
290
|
-
label: string;
|
|
291
|
-
category?: string;
|
|
292
|
-
description?: string;
|
|
293
|
-
indexPath: string;
|
|
294
|
-
version: number;
|
|
295
|
-
commit: string;
|
|
296
|
-
updatedAt?: string;
|
|
297
|
-
builtAt: string;
|
|
298
|
-
sha256: string;
|
|
299
|
-
bytes: number;
|
|
300
|
-
count: number;
|
|
301
|
-
}
|
|
302
|
-
interface NotebookIndex extends NotebookIndexSummary {
|
|
303
|
-
records: SeedRecordRef[];
|
|
304
|
-
}
|
|
305
|
-
type ChunkKind = 'notes';
|
|
306
|
-
interface ManifestChunk {
|
|
307
|
-
id: string;
|
|
308
|
-
path: string;
|
|
309
|
-
sha256: string;
|
|
310
|
-
bytes: number;
|
|
311
|
-
count: number;
|
|
312
|
-
kind?: ChunkKind;
|
|
313
|
-
records?: SeedRecordRef[];
|
|
314
|
-
}
|
|
315
|
-
interface SeedManifest {
|
|
316
|
-
name?: string;
|
|
317
|
-
description?: string;
|
|
318
|
-
repositoryUrl?: string;
|
|
319
|
-
schema: number;
|
|
320
|
-
version: number;
|
|
321
|
-
versionLabel?: string;
|
|
322
|
-
commit?: string;
|
|
323
|
-
dirty?: boolean;
|
|
324
|
-
builtAt: string;
|
|
325
|
-
chunks: ManifestChunk[];
|
|
326
|
-
notebooks?: NotebookIndexSummary[];
|
|
327
|
-
}
|
|
328
|
-
type SeedPrecedenceTier = 'core' | 'community' | 'imported' | 'user';
|
|
329
|
-
declare function seedSourceTier(sourceIdOrMetaKey?: string | null, explicitTier?: SeedPrecedenceTier): SeedPrecedenceTier;
|
|
330
|
-
declare function seedPrecedenceRank(sourceIdOrMetaKey?: string | null, explicitTier?: SeedPrecedenceTier): number;
|
|
331
|
-
interface SeedMetaRecord {
|
|
332
|
-
key: string;
|
|
333
|
-
schema: number;
|
|
334
|
-
seedVersion: number;
|
|
335
|
-
builtAt: string;
|
|
336
|
-
importedAt: number;
|
|
337
|
-
chunks: Record<string, {
|
|
338
|
-
sha256: string;
|
|
339
|
-
version?: number;
|
|
340
|
-
builtAt?: string;
|
|
341
|
-
importedAt?: number;
|
|
342
|
-
noteIds?: string[];
|
|
343
|
-
}>;
|
|
344
|
-
claim?: {
|
|
345
|
-
owner: string;
|
|
346
|
-
at: number;
|
|
347
|
-
} | null;
|
|
348
|
-
tier?: SeedPrecedenceTier;
|
|
349
|
-
}
|
|
350
|
-
declare const SEED_BROADCAST_CHANNEL = "wodwiki.seed";
|
|
351
|
-
declare const EFFORTS_CHUNK_ID = "efforts";
|
|
352
|
-
declare const EQUIPMENT_CHUNK_ID = "equipment";
|
|
353
|
-
declare const CANVAS_CHUNK_ID = "canvas";
|
|
354
|
-
declare const DASHBOARDS_CHUNK_ID = "dashboards";
|
|
355
|
-
declare function seedMetaKey(sourceId: string): string;
|
|
356
|
-
/**
|
|
357
|
-
* The feed identifier a checkpoint key names — the key's source id. The
|
|
358
|
-
* checkpoint key keeps its seed spelling (`seed:<id>`, a persisted wire
|
|
359
|
-
* format) and the broadcast channel keeps its own, so a feed's checkpoint
|
|
360
|
-
* IS the checkpoint its id writes.
|
|
361
|
-
*/
|
|
362
|
-
declare function feedIdOfMetaKey(metaKey: string): string;
|
|
363
|
-
declare function emptySeedMeta(key: string): SeedMetaRecord;
|
|
364
|
-
/** The notebook slug a notebook chunk id names — `notebook.<slug>`; the
|
|
365
|
-
* `_root` landing (a file directly under `markdown/notebooks/`) names no
|
|
366
|
-
* notebook. */
|
|
367
|
-
declare function notebookSlugForChunkId(chunkId: string): string | undefined;
|
|
368
|
-
declare function canvasRouteSlug(content: string): string | null;
|
|
369
|
-
declare function seedNoteSourceId(path: string, content: string, chunkId: string): string | undefined;
|
|
370
|
-
|
|
371
199
|
declare function seedNoteId(path: string): Promise<string>;
|
|
372
200
|
interface SeedChunkWrite {
|
|
373
201
|
chunkId: string | null;
|
|
@@ -485,97 +313,6 @@ interface FeedLandingData {
|
|
|
485
313
|
}
|
|
486
314
|
declare function renderFeedLandingHtml(data: FeedLandingData): string;
|
|
487
315
|
|
|
488
|
-
/**
|
|
489
|
-
* FeedTree — universal path-addressed byte tree port and runtime-agnostic adapters.
|
|
490
|
-
*
|
|
491
|
-
* Unifies:
|
|
492
|
-
* - MemoryFeedTree: in-memory tests, server snapshot staging, dirty diffs
|
|
493
|
-
* - HttpFeedTree: read-only fetch over GitHub Pages, custom peer URLs, and `wod server /feed/`
|
|
494
|
-
* - DirectoryHandleFeedTree: browser File System Access folder export/import
|
|
495
|
-
*/
|
|
496
|
-
type FeedPath = string;
|
|
497
|
-
type FeedTreeErrorCode = 'not-found' | 'unsupported' | 'read-only' | 'checksum' | 'layout' | 'permission';
|
|
498
|
-
declare class FeedTreeError extends Error {
|
|
499
|
-
readonly code: FeedTreeErrorCode;
|
|
500
|
-
constructor(code: FeedTreeErrorCode, message: string);
|
|
501
|
-
}
|
|
502
|
-
interface FeedFileStat {
|
|
503
|
-
bytes: number;
|
|
504
|
-
sha256?: string;
|
|
505
|
-
}
|
|
506
|
-
interface FeedTreeReader {
|
|
507
|
-
read(path: FeedPath): Promise<Uint8Array>;
|
|
508
|
-
stat(path: FeedPath): Promise<FeedFileStat | undefined>;
|
|
509
|
-
list?(prefix?: string): Promise<FeedPath[]>;
|
|
510
|
-
}
|
|
511
|
-
interface FeedTreeWriter {
|
|
512
|
-
write(path: FeedPath, bytes: Uint8Array): Promise<void>;
|
|
513
|
-
delete(path: FeedPath): Promise<void>;
|
|
514
|
-
}
|
|
515
|
-
interface FeedTree extends FeedTreeReader, FeedTreeWriter {
|
|
516
|
-
}
|
|
517
|
-
declare function encodeUtf8(text: string): Uint8Array;
|
|
518
|
-
declare function decodeUtf8(bytes: Uint8Array): string;
|
|
519
|
-
declare function normalizeFeedTreePath(rawPath: string): FeedPath;
|
|
520
|
-
declare function sha256HexAsync(input: Uint8Array | string): Promise<string>;
|
|
521
|
-
declare class MemoryFeedTree implements FeedTree {
|
|
522
|
-
private readonly store;
|
|
523
|
-
constructor(initial?: Readonly<Record<string, string | Uint8Array>>);
|
|
524
|
-
read(path: FeedPath): Promise<Uint8Array>;
|
|
525
|
-
readText(path: FeedPath): Promise<string>;
|
|
526
|
-
stat(path: FeedPath): Promise<FeedFileStat | undefined>;
|
|
527
|
-
write(path: FeedPath, bytes: Uint8Array): Promise<void>;
|
|
528
|
-
writeText(path: FeedPath, text: string): Promise<void>;
|
|
529
|
-
delete(path: FeedPath): Promise<void>;
|
|
530
|
-
list(prefix?: string): Promise<FeedPath[]>;
|
|
531
|
-
entries(): Array<[FeedPath, Uint8Array]>;
|
|
532
|
-
}
|
|
533
|
-
type FetchLike = (input: RequestInfo | URL, init?: RequestInit) => Promise<Response>;
|
|
534
|
-
declare class HttpFeedTree implements FeedTreeReader {
|
|
535
|
-
private readonly baseUrl;
|
|
536
|
-
private readonly fetchImpl;
|
|
537
|
-
constructor(baseUrl: string, fetchImpl?: FetchLike);
|
|
538
|
-
read(path: FeedPath): Promise<Uint8Array>;
|
|
539
|
-
readJson<T = unknown>(path: FeedPath): Promise<T>;
|
|
540
|
-
stat(path: FeedPath): Promise<FeedFileStat | undefined>;
|
|
541
|
-
}
|
|
542
|
-
/** Structural subset of the Web File System Access API so non-DOM builds need no ambient DOM types. */
|
|
543
|
-
interface FileSystemWritableLike {
|
|
544
|
-
write(data: Uint8Array): Promise<void>;
|
|
545
|
-
close(): Promise<void>;
|
|
546
|
-
}
|
|
547
|
-
interface FileSystemFileHandleLike {
|
|
548
|
-
readonly kind: 'file';
|
|
549
|
-
readonly name: string;
|
|
550
|
-
getFile(): Promise<{
|
|
551
|
-
arrayBuffer(): Promise<ArrayBuffer>;
|
|
552
|
-
size: number;
|
|
553
|
-
}>;
|
|
554
|
-
createWritable(): Promise<FileSystemWritableLike>;
|
|
555
|
-
}
|
|
556
|
-
interface FileSystemDirectoryHandleLike {
|
|
557
|
-
readonly kind: 'directory';
|
|
558
|
-
readonly name: string;
|
|
559
|
-
getDirectoryHandle(name: string, options?: {
|
|
560
|
-
create?: boolean;
|
|
561
|
-
}): Promise<FileSystemDirectoryHandleLike>;
|
|
562
|
-
getFileHandle(name: string, options?: {
|
|
563
|
-
create?: boolean;
|
|
564
|
-
}): Promise<FileSystemFileHandleLike>;
|
|
565
|
-
removeEntry(name: string, options?: {
|
|
566
|
-
recursive?: boolean;
|
|
567
|
-
}): Promise<void>;
|
|
568
|
-
}
|
|
569
|
-
declare class DirectoryHandleFeedTree implements FeedTree {
|
|
570
|
-
private readonly root;
|
|
571
|
-
constructor(root: FileSystemDirectoryHandleLike);
|
|
572
|
-
private resolveDir;
|
|
573
|
-
read(path: FeedPath): Promise<Uint8Array>;
|
|
574
|
-
stat(path: FeedPath): Promise<FeedFileStat | undefined>;
|
|
575
|
-
write(path: FeedPath, bytes: Uint8Array): Promise<void>;
|
|
576
|
-
delete(path: FeedPath): Promise<void>;
|
|
577
|
-
}
|
|
578
|
-
|
|
579
316
|
/**
|
|
580
317
|
* FeedPublisher — runtime-agnostic compiler from IStorage to any FeedTree.
|
|
581
318
|
*
|
|
@@ -648,43 +385,6 @@ declare function publishFeedFromStorage(storage: IStorage, tree: FeedTree, optio
|
|
|
648
385
|
*/
|
|
649
386
|
declare function checkUnpublishedFeedChanges(storage: IStorage, currentTree?: FeedTreeReader, options?: PublishFeedOptions): Promise<UnpublishedFeedStatus>;
|
|
650
387
|
|
|
651
|
-
/**
|
|
652
|
-
* VaultIngestor & PublicationManager — transactional Note/Telemetry ingestion,
|
|
653
|
-
* zero-import remote preview, single-Note cloning, and Publication Visibility
|
|
654
|
-
* controls over IStorage.
|
|
655
|
-
*/
|
|
656
|
-
|
|
657
|
-
declare function getNotePublicationSummary(storage: IStorage, noteId: string): Promise<PublicationVisibilitySummary>;
|
|
658
|
-
declare function setNotebookPublic(storage: IStorage, notebookIdOrSlug: string, isPublic: boolean): Promise<Note>;
|
|
659
|
-
declare function setSessionPublic(storage: IStorage, sessionId: string, isPublic: boolean): Promise<Session>;
|
|
660
|
-
declare function previewRemoteNotebook(reader: FeedTreeReader, indexPath: string): Promise<NotebookIndex>;
|
|
661
|
-
declare function previewRemoteRecord(reader: FeedTreeReader, recordPath: string): Promise<SeedRow>;
|
|
662
|
-
declare function cloneRemoteRecord(storage: IStorage, reader: FeedTreeReader, input: {
|
|
663
|
-
feedId: string;
|
|
664
|
-
record: SeedRecordRef;
|
|
665
|
-
targetNotebookId: string;
|
|
666
|
-
includePublicTelemetry?: boolean;
|
|
667
|
-
}): Promise<Note>;
|
|
668
|
-
interface PortableFileEntry {
|
|
669
|
-
path: string;
|
|
670
|
-
content: string;
|
|
671
|
-
}
|
|
672
|
-
interface PortabilityImportReport {
|
|
673
|
-
notesImported: number;
|
|
674
|
-
revisionsImported: number;
|
|
675
|
-
sessionsImported: number;
|
|
676
|
-
eventsImported: number;
|
|
677
|
-
errors: string[];
|
|
678
|
-
}
|
|
679
|
-
declare function exportPortableFilesFromStorage(storage: IStorage, options?: {
|
|
680
|
-
noteIds?: readonly string[];
|
|
681
|
-
telemetryFormat?: 'jsonl' | 'csv' | 'both';
|
|
682
|
-
}): Promise<PortableFileEntry[]>;
|
|
683
|
-
declare function ingestPortableFilesIntoStorage(storage: IStorage, files: readonly PortableFileEntry[], options?: {
|
|
684
|
-
defaultNotebookId?: string;
|
|
685
|
-
now?: number;
|
|
686
|
-
}): Promise<PortabilityImportReport>;
|
|
687
|
-
|
|
688
388
|
/**
|
|
689
389
|
* NotebookMembership — Deep module owning many-to-many Note and Session
|
|
690
390
|
* membership across Notebooks (`notebook_links` store + synchronized
|
|
@@ -716,7 +416,7 @@ interface PromoteNoteToNotebooksInput {
|
|
|
716
416
|
shareSessionsPublicly?: boolean;
|
|
717
417
|
}
|
|
718
418
|
interface PromoteNoteResult {
|
|
719
|
-
note: Note;
|
|
419
|
+
note: Note$1;
|
|
720
420
|
notebookIds: NotebookId[];
|
|
721
421
|
promotedSessionIds: string[];
|
|
722
422
|
}
|
|
@@ -746,59 +446,6 @@ declare function removeNoteFromNotebook(storage: IStorage, noteId: string, noteb
|
|
|
746
446
|
*/
|
|
747
447
|
declare function getNoteNotebooks(storage: IStorage, noteId: string): Promise<NotebookId[]>;
|
|
748
448
|
|
|
749
|
-
/**
|
|
750
|
-
* JournalSessionIntake — Deep module owning read-only workout cloning into
|
|
751
|
-
* `notebook/journal`, atomic Session pinning, and upstream Note provenance
|
|
752
|
-
* resolution.
|
|
753
|
-
*
|
|
754
|
-
* When a workout is started on ANY read-only Note (`seedOrigin === 'seed'`,
|
|
755
|
-
* `feedOrigin === 'feed'`, `notebook/defaults`, `notebook/guides`, or a
|
|
756
|
-
* subscribed Feed Notebook), this module atomically:
|
|
757
|
-
* 1. Clones the full Note (Markdown prose, frontmatter, all workout & widget
|
|
758
|
-
* blocks, and immutable `BlockRevision`s) into `notebook/journal`,
|
|
759
|
-
* 2. Places the cloned Note onto the requested calendar `Page` (`YYYY-MM-DD`),
|
|
760
|
-
* 3. Records structured `NoteProvenance` (`sourceNoteId`, `sourceVersion`,
|
|
761
|
-
* `sourceCommit`, `feedSourceId`, `sourceNotebookId`, `sourcePath`),
|
|
762
|
-
* 4. Pins the new `Session` to the corresponding block occurrence on the
|
|
763
|
-
* Journal clone — leaving the read-only upstream Note untouched.
|
|
764
|
-
*/
|
|
765
|
-
|
|
766
|
-
interface PrepareJournalSessionRunInput {
|
|
767
|
-
noteId: string;
|
|
768
|
-
blockId?: string;
|
|
769
|
-
sessionId?: string;
|
|
770
|
-
journalDate?: string;
|
|
771
|
-
startedAt?: number;
|
|
772
|
-
origin?: ResultOrigin;
|
|
773
|
-
}
|
|
774
|
-
interface PreparedJournalSessionRun {
|
|
775
|
-
note: Note;
|
|
776
|
-
revision: BlockRevision;
|
|
777
|
-
session: Session;
|
|
778
|
-
clonedFromReadOnly: boolean;
|
|
779
|
-
upstreamNoteId?: string;
|
|
780
|
-
}
|
|
781
|
-
interface ResolvedUpstreamProvenance {
|
|
782
|
-
exists: boolean;
|
|
783
|
-
sourceNoteId: string;
|
|
784
|
-
title?: string;
|
|
785
|
-
sourceVersion?: number;
|
|
786
|
-
currentUpstreamVersion?: number;
|
|
787
|
-
sourceCommit?: string;
|
|
788
|
-
feedSourceId?: string;
|
|
789
|
-
sourceNotebookId?: string;
|
|
790
|
-
sourcePath?: string;
|
|
791
|
-
}
|
|
792
|
-
declare function prepareJournalSessionRun(storage: IStorage, input: PrepareJournalSessionRunInput): Promise<PreparedJournalSessionRun>;
|
|
793
|
-
/**
|
|
794
|
-
* Resolve a cloned Note's upstream provenance against current storage.
|
|
795
|
-
* Returns `exists: true` while the original Note remains in storage (so UI can
|
|
796
|
-
* link directly to it), and `exists: false` with preserved metadata if the
|
|
797
|
-
* upstream Feed was later unsubscribed or removed.
|
|
798
|
-
*/
|
|
799
|
-
declare function resolveUpstreamProvenance(storage: IStorage, note: Pick<Note, 'provenance' | 'sourceId'>): Promise<ResolvedUpstreamProvenance | null>;
|
|
800
|
-
declare function buildNoteProvenance(sourceNote: Pick<Note, 'id' | 'seedVersion' | 'sourceRevision' | 'seedCommit' | 'feedSourceId' | 'sourcePath'>, sourceNotebookId: string | undefined, clonedAt: number): NoteProvenance;
|
|
801
|
-
|
|
802
449
|
/**
|
|
803
450
|
* ScopedPropertyInheritance — Deep module owning Property Note override storage,
|
|
804
451
|
* Notebook-scoped inheritance (`notebook/defaults` -> subscribed Feed or user
|
|
@@ -818,7 +465,7 @@ interface SaveScopedPropertyOverrideInput {
|
|
|
818
465
|
category?: string;
|
|
819
466
|
}
|
|
820
467
|
interface PropertyResolutionContext {
|
|
821
|
-
note?: Pick<Note, 'id' | 'notebookId' | 'notebookIds' | 'provenance' | 'feedSourceId' | 'sourceId' | 'sourcePath'>;
|
|
468
|
+
note?: Pick<Note$1, 'id' | 'notebookId' | 'notebookIds' | 'provenance' | 'feedSourceId' | 'sourceId' | 'sourcePath'>;
|
|
822
469
|
notebookId?: string;
|
|
823
470
|
mode?: PropertyInheritanceMode;
|
|
824
471
|
}
|
|
@@ -852,4 +499,4 @@ declare function promoteReferencedOverridesToNotebook(storage: IStorage, input:
|
|
|
852
499
|
tagSlugs?: Iterable<string>;
|
|
853
500
|
}): Promise<ScopedPropertyOverride[]>;
|
|
854
501
|
|
|
855
|
-
export { APP_ORIGIN, BUILD_TIME,
|
|
502
|
+
export { APP_ORIGIN, BUILD_TIME, type FeedLandingData, FeedTree, FeedTreeReader, GIT_SHA, type LandingNote, type LandingNotebook, type LanguagePack, type LanguagePackIdentity, type LanguagePackLangSlice, type LanguagePackUiSlice, NOTE_ID_FRONTMATTER_KEY, type NoteIdentity, NotebookIndex, PUBLISHED_FEED_META_KEY, type ParsedNoteMarkdown, type PromoteNoteResult, type PromoteNoteToNotebooksInput, type PropertyInheritanceMode, type PropertyResolutionContext, type PublishFeedOptions, type PublishFeedReport, type PublishedFeedCheckpoint, QR_SCRIPT_ID, type ResolvedScopedCatalog, SEMVER, SESSION_CSV_HEADER, type SaveScopedPropertyOverrideInput, type SeedChunkResult, type SeedChunkWrite, SeedManifest, SeedMetaRecord, SeedRow, type SessionImportRows, TELEMETRY_CSV_HEADER, type TypedTagItem, type UnpublishedFeedStatus, VERSION, applySeedChunk, assertNotebookIndex, assertSeedManifest, assertSeedRow, assertSeedRows, backfillFeedProvenance, checkUnpublishedFeedChanges, composeNoteMarkdown, createUserNotebookLanding, csvToEquipmentLabels, csvToSessionRows, csvToTelemetryBundle, defineLanguagePack, effortToMarkdown, equipmentToCsv, equipmentToMarkdown, extractNoteIdentity, extractTypedTags, getNoteNotebooks, getRegisteredLanguagePacks, inMemoryEventStore, injectIdentityFrontmatter, listLanguagePacks, listScopedPropertyOverrides, makeNotebookLinkId, makeScopedOverrideId, migrateNotebookVocabulary, parseCsvLine, parseFrontmatterDateMs, parseNoteMarkdown, promoteNoteToNotebooks, promoteReferencedOverridesToNotebook, publishFeedFromStorage, qrInlineScript, readFrontmatterMeta, registerLanguagePack, removeNoteFromNotebook, renderFeedLandingHtml, resolveScopedPropertyCatalog, saveScopedPropertyOverride, seedNoteId, sessionToCsv, setNoteNotebooks, splitCsvRecords, telemetryBundleToCsv, unregisterLanguagePack };
|