@vue-skuilder/db 0.2.27 → 0.2.29
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/classroomDB-DLTtLZct.d.cts +86 -0
- package/dist/classroomDB-DLTtLZct.d.ts +86 -0
- package/dist/{contentSource-LPf044hY.d.ts → contentSource-B6FrSihy.d.cts} +282 -99
- package/dist/{contentSource-D3c1fMAk.d.cts → contentSource-CqJmbOZN.d.ts} +282 -99
- package/dist/core/index.d.cts +16 -92
- package/dist/core/index.d.ts +16 -92
- package/dist/core/index.js +607 -179
- package/dist/core/index.js.map +1 -1
- package/dist/core/index.mjs +606 -179
- package/dist/core/index.mjs.map +1 -1
- package/dist/{dataLayerProvider-DaAootVV.d.ts → dataLayerProvider-B9_UCvkR.d.ts} +2 -8
- package/dist/{dataLayerProvider-CeLiFbHv.d.cts → dataLayerProvider-DUxDqMtZ.d.cts} +2 -8
- package/dist/diagnostics/index.d.cts +443 -0
- package/dist/diagnostics/index.d.ts +443 -0
- package/dist/diagnostics/index.js +932 -0
- package/dist/diagnostics/index.js.map +1 -0
- package/dist/diagnostics/index.mjs +881 -0
- package/dist/diagnostics/index.mjs.map +1 -0
- package/dist/impl/couch/index.d.cts +13 -3
- package/dist/impl/couch/index.d.ts +13 -3
- package/dist/impl/couch/index.js +605 -179
- package/dist/impl/couch/index.js.map +1 -1
- package/dist/impl/couch/index.mjs +605 -179
- package/dist/impl/couch/index.mjs.map +1 -1
- package/dist/impl/static/index.d.cts +11 -5
- package/dist/impl/static/index.d.ts +11 -5
- package/dist/impl/static/index.js +602 -185
- package/dist/impl/static/index.js.map +1 -1
- package/dist/impl/static/index.mjs +602 -185
- package/dist/impl/static/index.mjs.map +1 -1
- package/dist/{index-BkBJlGDX.d.ts → index-CVGehe_t.d.ts} +1 -1
- package/dist/{index-D7WdMDAs.d.cts → index-Ktg72jKb.d.cts} +1 -1
- package/dist/index.d.cts +73 -11
- package/dist/index.d.ts +73 -11
- package/dist/index.js +696 -200
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +683 -200
- package/dist/index.mjs.map +1 -1
- package/dist/{types-DjiFOZxJ.d.cts → types-D0oQeJAi.d.cts} +1 -1
- package/dist/{types-uJ2Xn3_X.d.ts → types-dXWfyz9B.d.ts} +1 -1
- package/dist/{types-legacy-CrwyZIvI.d.cts → types-legacy-BkOYOR6U.d.cts} +1 -1
- package/dist/{types-legacy-CrwyZIvI.d.ts → types-legacy-BkOYOR6U.d.ts} +1 -1
- package/dist/util/packer/index.d.cts +3 -3
- package/dist/util/packer/index.d.ts +3 -3
- package/package.json +15 -3
- package/src/core/interfaces/contentSource.ts +7 -0
- package/src/core/interfaces/dataLayerProvider.ts +3 -8
- package/src/core/navigators/Pipeline.ts +149 -14
- package/src/core/navigators/PipelineAssembler.ts +19 -40
- package/src/core/navigators/PipelineDebugger.ts +74 -17
- package/src/core/navigators/SrsDebugger.ts +37 -12
- package/src/core/navigators/defaults.ts +29 -5
- package/src/core/navigators/filters/WeightedFilter.ts +5 -1
- package/src/core/navigators/filters/eloDistance.ts +261 -76
- package/src/core/navigators/filters/hierarchyDefinition.ts +5 -1
- package/src/core/navigators/filters/index.ts +2 -2
- package/src/core/navigators/filters/interferenceMitigator.ts +5 -1
- package/src/core/navigators/filters/relativePriority.ts +5 -1
- package/src/core/navigators/filters/types.ts +24 -1
- package/src/core/navigators/filters/userTagPreference.ts +5 -1
- package/src/core/navigators/generators/elo.ts +23 -53
- package/src/core/navigators/generators/srs.ts +27 -124
- package/src/core/navigators/index.ts +32 -5
- package/src/core/navigators/pipelinePlan.ts +245 -0
- package/src/core/navigators/regulators.ts +230 -0
- package/src/core/types/studySession.ts +40 -0
- package/src/diagnostics/dataset.ts +242 -0
- package/src/diagnostics/derive.ts +555 -0
- package/src/diagnostics/index.ts +27 -0
- package/src/diagnostics/loader.ts +194 -0
- package/src/diagnostics/pipeline.ts +236 -0
- package/src/diagnostics/text.ts +265 -0
- package/src/impl/couch/PouchDataLayerProvider.ts +0 -23
- package/src/impl/couch/courseDB.ts +13 -0
- package/src/impl/static/StaticDataLayerProvider.ts +0 -11
- package/src/impl/static/courseDB.ts +9 -0
- package/src/index.ts +4 -0
- package/src/study/SessionController.ts +76 -2
- package/src/study/SessionOverlay.ts +7 -4
- package/tests/core/navigators/PipelineAssembler.test.ts +20 -5
- package/tests/core/navigators/eloDistanceFilter.test.ts +9 -9
- package/tsup.config.ts +1 -0
package/dist/core/index.d.ts
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
export {
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
export { A as AdminDBInterface, d as AssignedCard, a as AssignedContent, c as AssignedCourse, b as AssignedTag, C as ClassroomDBInterface, S as StudentClassroomDBInterface, T as TeacherClassroomDBInterface } from '../classroomDB-DLTtLZct.js';
|
|
2
|
+
import { av as LearnableWeight, T as UserOutcomeRecord, aw as OrchestrationContext, W as WeightedCard, C as CourseDBInterface } from '../contentSource-CqJmbOZN.js';
|
|
3
|
+
export { P as ActivityRecord, ae as CardFilter, ag as CardFilterFactory, ah as CardGenerator, aj as CardGeneratorFactory, K as ClassroomRegistration, J as ClassroomRegistrationDesignation, L as ClassroomRegistrationDoc, b as ContentNavigationStrategyData, m as ContentNavigator, v as ContentSourceID, k as CourseInfo, Q as CourseRegistration, d as CourseRegistrationDoc, a as CoursesDBInterface, af as FilterContext, at as FilterImpact, F as FilterKind, ai as GeneratorContext, G as GeneratorResult, as as GeneratorSummary, _ as HYDRATION_MARKER_ID, $ as HydrationMarker, a0 as NavigatorConstructor, N as NavigatorRole, ab as NavigatorRoles, aa as Navigators, au as PipelineForecaster, aq as PipelineRunReport, n as ReplanHints, ar as RunReportCard, c as ScheduledCard, h as SessionEloEvent, e as SessionStateSnapshot, x as SessionStateSnapshotProvider, M as SessionTrackingData, a8 as StrategyContribution, o as StudyContentSource, S as StudySessionDoc, p as StudySessionFailedItem, q as StudySessionFailedNewItem, r as StudySessionFailedReviewItem, l as StudySessionItem, s as StudySessionNewItem, t as StudySessionReviewItem, i as StudySessionRunCard, j as StudySessionRunCardTrail, f as StudySessionRunSummary, O as UserConfig, H as UserCourseSetting, E as UserCourseSettings, B as UserDBAuthenticator, U as UserDBInterface, z as UserDBReader, A as UserDBWriter, Y as UserHydrationState, Z as UserHydrationStatus, I as UsrCrsDataInterface, ax as computeDeviation, az as computeEffectiveWeight, ay as computeSpread, aA as createOrchestrationContext, ap as drainCapturedRuns, am as getActivePipeline, a9 as getCardOrigin, a5 as getRegisteredFilterKind, a2 as getRegisteredNavigator, a6 as getRegisteredNavigatorNames, a4 as getRegisteredNavigatorRole, ao as getRunsForSession, w as getStudySource, a3 as hasRegisteredNavigator, a7 as initializeNavigatorRegistry, ad as isFilter, ac as isGenerator, u as isReview, V as makeStudySessionId, al as mountPipelineDebugger, X as newSessionId, ak as pipelineDebugAPI, a1 as registerNavigator, an as setDebugSessionId } from '../contentSource-CqJmbOZN.js';
|
|
4
|
+
export { D as DataLayerProvider } from '../dataLayerProvider-B9_UCvkR.js';
|
|
5
|
+
import { D as DocType, Q as QuestionRecord, f as DocTypePrefixes, c as CardHistory, b as CardRecord } from '../types-legacy-BkOYOR6U.js';
|
|
6
|
+
export { C as CardData, g as CourseListData, h as DataShapeData, a as DisplayableData, F as Field, G as GuestUsername, d as QualifiedCardID, i as QuestionData, S as SkuilderCourseData, T as Tag, e as TagStub, l as log } from '../types-legacy-BkOYOR6U.js';
|
|
6
7
|
import { DataShape, ParsedCard } from '@vue-skuilder/common';
|
|
7
8
|
import 'moment';
|
|
8
9
|
|
|
@@ -229,13 +230,18 @@ interface SrsBacklogDebug {
|
|
|
229
230
|
scheduledTotal: number;
|
|
230
231
|
/** Reviews eligible (due) right now. */
|
|
231
232
|
dueNow: number;
|
|
232
|
-
/** Healthy
|
|
233
|
+
/** Healthy review mass (card-equivalents); the multiplier is ×1.0 at or below it. */
|
|
233
234
|
healthyBacklog: number;
|
|
234
|
-
/**
|
|
235
|
+
/**
|
|
236
|
+
* Review mass: the due reviews' filtered scores against a reference, each at
|
|
237
|
+
* most 1. Set by the regulator stage; null until it has run.
|
|
238
|
+
*/
|
|
239
|
+
reviewMass: number | null;
|
|
240
|
+
/** Multiplier the regulator stage applied to every due review this run (>= 1.0, unbounded). */
|
|
235
241
|
backlogMultiplier: number;
|
|
236
|
-
/** Exponential growth-rate base the multiplier climbs by per multiple of
|
|
242
|
+
/** Exponential growth-rate base the multiplier climbs by per multiple of healthy mass in excess. */
|
|
237
243
|
backlogGrowthRate: number;
|
|
238
|
-
/** Highest review score
|
|
244
|
+
/** Highest review urgency score from the SRS generator (before filters and regulators); null if none due. */
|
|
239
245
|
topReviewScore: number | null;
|
|
240
246
|
/** Human-readable time until the next review comes due, or null if some are due now. */
|
|
241
247
|
nextDueIn: string | null;
|
|
@@ -294,88 +300,6 @@ declare function getStrategyPressureDebug(): StrategyPressureDebug[];
|
|
|
294
300
|
/** Drop all captured snapshots (called on session start, alongside pipeline history). */
|
|
295
301
|
declare function clearStrategyPressureDebug(): void;
|
|
296
302
|
|
|
297
|
-
/**
|
|
298
|
-
* Shared context available to all filters in a pipeline.
|
|
299
|
-
*
|
|
300
|
-
* Built once per getWeightedCards() call and passed to each filter.
|
|
301
|
-
* This avoids repeated lookups for common data like user ELO.
|
|
302
|
-
*/
|
|
303
|
-
interface FilterContext {
|
|
304
|
-
/** User database interface */
|
|
305
|
-
user: UserDBInterface;
|
|
306
|
-
/** Course database interface */
|
|
307
|
-
course: CourseDBInterface;
|
|
308
|
-
/** User's global ELO score for this course */
|
|
309
|
-
userElo: number;
|
|
310
|
-
/** Orchestration context for evolutionary weighting */
|
|
311
|
-
orchestration?: OrchestrationContext;
|
|
312
|
-
}
|
|
313
|
-
/**
|
|
314
|
-
* A filter that transforms a list of weighted cards.
|
|
315
|
-
*
|
|
316
|
-
* Filters are pure transforms - they receive cards and context,
|
|
317
|
-
* and return a modified list of cards. No delegate wrapping,
|
|
318
|
-
* no side effects beyond provenance tracking.
|
|
319
|
-
*
|
|
320
|
-
* ## Implementation Guidelines
|
|
321
|
-
*
|
|
322
|
-
* 1. **Append provenance**: Every filter should add a StrategyContribution
|
|
323
|
-
* entry documenting its decision for each card.
|
|
324
|
-
*
|
|
325
|
-
* 2. **Use multipliers**: Adjust scores by multiplying, not replacing.
|
|
326
|
-
* This ensures filter order doesn't matter.
|
|
327
|
-
*
|
|
328
|
-
* 3. **Score 0 for exclusion**: To exclude a card, set score to 0.
|
|
329
|
-
* Don't filter it out - let provenance show why it was excluded.
|
|
330
|
-
*
|
|
331
|
-
* 4. **Don't sort**: The Pipeline handles final sorting.
|
|
332
|
-
* Filters just transform scores.
|
|
333
|
-
*
|
|
334
|
-
* ## Example Implementation
|
|
335
|
-
*
|
|
336
|
-
* ```typescript
|
|
337
|
-
* const myFilter: CardFilter = {
|
|
338
|
-
* name: 'My Filter',
|
|
339
|
-
* async transform(cards, context) {
|
|
340
|
-
* return cards.map(card => {
|
|
341
|
-
* const multiplier = computeMultiplier(card, context);
|
|
342
|
-
* const newScore = card.score * multiplier;
|
|
343
|
-
* return {
|
|
344
|
-
* ...card,
|
|
345
|
-
* score: newScore,
|
|
346
|
-
* provenance: [...card.provenance, {
|
|
347
|
-
* strategy: 'myFilter',
|
|
348
|
-
* strategyName: 'My Filter',
|
|
349
|
-
* strategyId: 'MY_FILTER',
|
|
350
|
-
* action: multiplier < 1 ? 'penalized' : 'passed',
|
|
351
|
-
* score: newScore,
|
|
352
|
-
* reason: 'Explanation of decision'
|
|
353
|
-
* }]
|
|
354
|
-
* };
|
|
355
|
-
* });
|
|
356
|
-
* }
|
|
357
|
-
* };
|
|
358
|
-
* ```
|
|
359
|
-
*/
|
|
360
|
-
interface CardFilter {
|
|
361
|
-
/** Human-readable name for this filter */
|
|
362
|
-
name: string;
|
|
363
|
-
/**
|
|
364
|
-
* Transform a list of weighted cards.
|
|
365
|
-
*
|
|
366
|
-
* @param cards - Cards to transform (already scored by generator)
|
|
367
|
-
* @param context - Shared context (user, course, userElo, etc.)
|
|
368
|
-
* @returns Transformed cards with updated scores and provenance
|
|
369
|
-
*/
|
|
370
|
-
transform(cards: WeightedCard[], context: FilterContext): Promise<WeightedCard[]>;
|
|
371
|
-
}
|
|
372
|
-
/**
|
|
373
|
-
* Factory function type for creating filters from configuration.
|
|
374
|
-
*
|
|
375
|
-
* Used by PipelineAssembler to instantiate filters from strategy documents.
|
|
376
|
-
*/
|
|
377
|
-
type CardFilterFactory<TConfig = unknown> = (config: TConfig) => CardFilter;
|
|
378
|
-
|
|
379
303
|
interface DiversityRerankOptions {
|
|
380
304
|
/**
|
|
381
305
|
* How hard repetition is penalised. Larger → steeper demotion of repeated
|
|
@@ -594,4 +518,4 @@ declare const userDBDebugAPI: {
|
|
|
594
518
|
*/
|
|
595
519
|
declare function mountUserDBDebugger(): void;
|
|
596
520
|
|
|
597
|
-
export { type BulkCardProcessorConfig,
|
|
521
|
+
export { type BulkCardProcessorConfig, CardHistory, CardRecord, CourseDBInterface, DIVERSITY_FLOOR, DIVERSITY_STRENGTH, type DiversityRerankOptions, DocType, DocTypePrefixes, type GradientObservation, type GradientResult, type ImportResult, LearnableWeight, Loggable, OrchestrationContext, type PeriodUpdateInput, type PeriodUpdateResult, type PressureGaugeDebug, QuestionRecord, type SignalConfig, type SrsBacklogDebug, type StrategyLearningState, type StrategyPressureDebug, type StrategyStateDoc, type StrategyStateId, UserOutcomeRecord, WeightedCard, aggregateOutcomesForGradient, areQuestionRecords, buildStrategyStateId, captureStrategyPressure, clearSrsBacklogDebug, clearStrategyPressureDebug, computeOutcomeSignal, computeStrategyGradient, diversityRerank, docIsDeleted, getCardHistoryID, getDefaultLearnableWeight, getSrsBacklogDebug, getStrategyPressureDebug, importParsedCards, isQuestionRecord, mountUserDBDebugger, parseCardHistoryID, recordUserOutcome, runPeriodUpdate, scoreAccuracyInZone, updateLearningState, updateStrategyWeight, userDBDebugAPI, validateProcessorConfig };
|