@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.
Files changed (82) hide show
  1. package/dist/classroomDB-DLTtLZct.d.cts +86 -0
  2. package/dist/classroomDB-DLTtLZct.d.ts +86 -0
  3. package/dist/{contentSource-LPf044hY.d.ts → contentSource-B6FrSihy.d.cts} +282 -99
  4. package/dist/{contentSource-D3c1fMAk.d.cts → contentSource-CqJmbOZN.d.ts} +282 -99
  5. package/dist/core/index.d.cts +16 -92
  6. package/dist/core/index.d.ts +16 -92
  7. package/dist/core/index.js +607 -179
  8. package/dist/core/index.js.map +1 -1
  9. package/dist/core/index.mjs +606 -179
  10. package/dist/core/index.mjs.map +1 -1
  11. package/dist/{dataLayerProvider-DaAootVV.d.ts → dataLayerProvider-B9_UCvkR.d.ts} +2 -8
  12. package/dist/{dataLayerProvider-CeLiFbHv.d.cts → dataLayerProvider-DUxDqMtZ.d.cts} +2 -8
  13. package/dist/diagnostics/index.d.cts +443 -0
  14. package/dist/diagnostics/index.d.ts +443 -0
  15. package/dist/diagnostics/index.js +932 -0
  16. package/dist/diagnostics/index.js.map +1 -0
  17. package/dist/diagnostics/index.mjs +881 -0
  18. package/dist/diagnostics/index.mjs.map +1 -0
  19. package/dist/impl/couch/index.d.cts +13 -3
  20. package/dist/impl/couch/index.d.ts +13 -3
  21. package/dist/impl/couch/index.js +605 -179
  22. package/dist/impl/couch/index.js.map +1 -1
  23. package/dist/impl/couch/index.mjs +605 -179
  24. package/dist/impl/couch/index.mjs.map +1 -1
  25. package/dist/impl/static/index.d.cts +11 -5
  26. package/dist/impl/static/index.d.ts +11 -5
  27. package/dist/impl/static/index.js +602 -185
  28. package/dist/impl/static/index.js.map +1 -1
  29. package/dist/impl/static/index.mjs +602 -185
  30. package/dist/impl/static/index.mjs.map +1 -1
  31. package/dist/{index-BkBJlGDX.d.ts → index-CVGehe_t.d.ts} +1 -1
  32. package/dist/{index-D7WdMDAs.d.cts → index-Ktg72jKb.d.cts} +1 -1
  33. package/dist/index.d.cts +73 -11
  34. package/dist/index.d.ts +73 -11
  35. package/dist/index.js +696 -200
  36. package/dist/index.js.map +1 -1
  37. package/dist/index.mjs +683 -200
  38. package/dist/index.mjs.map +1 -1
  39. package/dist/{types-DjiFOZxJ.d.cts → types-D0oQeJAi.d.cts} +1 -1
  40. package/dist/{types-uJ2Xn3_X.d.ts → types-dXWfyz9B.d.ts} +1 -1
  41. package/dist/{types-legacy-CrwyZIvI.d.cts → types-legacy-BkOYOR6U.d.cts} +1 -1
  42. package/dist/{types-legacy-CrwyZIvI.d.ts → types-legacy-BkOYOR6U.d.ts} +1 -1
  43. package/dist/util/packer/index.d.cts +3 -3
  44. package/dist/util/packer/index.d.ts +3 -3
  45. package/package.json +15 -3
  46. package/src/core/interfaces/contentSource.ts +7 -0
  47. package/src/core/interfaces/dataLayerProvider.ts +3 -8
  48. package/src/core/navigators/Pipeline.ts +149 -14
  49. package/src/core/navigators/PipelineAssembler.ts +19 -40
  50. package/src/core/navigators/PipelineDebugger.ts +74 -17
  51. package/src/core/navigators/SrsDebugger.ts +37 -12
  52. package/src/core/navigators/defaults.ts +29 -5
  53. package/src/core/navigators/filters/WeightedFilter.ts +5 -1
  54. package/src/core/navigators/filters/eloDistance.ts +261 -76
  55. package/src/core/navigators/filters/hierarchyDefinition.ts +5 -1
  56. package/src/core/navigators/filters/index.ts +2 -2
  57. package/src/core/navigators/filters/interferenceMitigator.ts +5 -1
  58. package/src/core/navigators/filters/relativePriority.ts +5 -1
  59. package/src/core/navigators/filters/types.ts +24 -1
  60. package/src/core/navigators/filters/userTagPreference.ts +5 -1
  61. package/src/core/navigators/generators/elo.ts +23 -53
  62. package/src/core/navigators/generators/srs.ts +27 -124
  63. package/src/core/navigators/index.ts +32 -5
  64. package/src/core/navigators/pipelinePlan.ts +245 -0
  65. package/src/core/navigators/regulators.ts +230 -0
  66. package/src/core/types/studySession.ts +40 -0
  67. package/src/diagnostics/dataset.ts +242 -0
  68. package/src/diagnostics/derive.ts +555 -0
  69. package/src/diagnostics/index.ts +27 -0
  70. package/src/diagnostics/loader.ts +194 -0
  71. package/src/diagnostics/pipeline.ts +236 -0
  72. package/src/diagnostics/text.ts +265 -0
  73. package/src/impl/couch/PouchDataLayerProvider.ts +0 -23
  74. package/src/impl/couch/courseDB.ts +13 -0
  75. package/src/impl/static/StaticDataLayerProvider.ts +0 -11
  76. package/src/impl/static/courseDB.ts +9 -0
  77. package/src/index.ts +4 -0
  78. package/src/study/SessionController.ts +76 -2
  79. package/src/study/SessionOverlay.ts +7 -4
  80. package/tests/core/navigators/PipelineAssembler.test.ts +20 -5
  81. package/tests/core/navigators/eloDistanceFilter.test.ts +9 -9
  82. package/tsup.config.ts +1 -0
@@ -1,4 +1,4 @@
1
- import { P as PackerConfig, a as PackedCourseData, S as StaticCourseManifest } from './types-uJ2Xn3_X.js';
1
+ import { P as PackerConfig, a as PackedCourseData, S as StaticCourseManifest } from './types-dXWfyz9B.js';
2
2
 
3
3
  /**
4
4
  * Abstraction for file system operations needed by the migrator.
@@ -1,4 +1,4 @@
1
- import { P as PackerConfig, a as PackedCourseData, S as StaticCourseManifest } from './types-DjiFOZxJ.cjs';
1
+ import { P as PackerConfig, a as PackedCourseData, S as StaticCourseManifest } from './types-D0oQeJAi.cjs';
2
2
 
3
3
  /**
4
4
  * Abstraction for file system operations needed by the migrator.
package/dist/index.d.cts CHANGED
@@ -1,15 +1,16 @@
1
- import { U as UserDBInterface, s as CourseRegistrationDoc, t as SessionEloEvent, S as StudySessionItem, W as WeightedCard, R as ReplanHints, h as StudyContentSource, u as SessionStateSnapshotProvider, G as GeneratorResult, C as CourseDBInterface } from './contentSource-D3c1fMAk.cjs';
2
- export { M as ActivityRecord, A as AdminDBInterface, x as AssignedCard, g as AssignedContent, w as AssignedCourse, v as AssignedTag, af as CardGenerator, ah as CardGeneratorFactory, c as ClassroomDBInterface, I as ClassroomRegistration, H as ClassroomRegistrationDesignation, J as ClassroomRegistrationDoc, e as ContentNavigationStrategyData, f as ContentNavigator, q as ContentSourceID, d as CourseInfo, N as CourseRegistration, b as CoursesDBInterface, ay as DocumentUpdater, aq as FilterImpact, ag as GeneratorContext, ap as GeneratorSummary, $ as HYDRATION_MARKER_ID, a0 as HydrationMarker, as as LearnableWeight, a1 as NavigatorConstructor, ab as NavigatorRole, ac as NavigatorRoles, aa as Navigators, at as OrchestrationContext, ar as PipelineForecaster, ao as PipelineRunReport, j as ScheduledCard, V as SessionStateSnapshot, K as SessionTrackingData, a8 as StrategyContribution, i as StudentClassroomDBInterface, P as StudySessionDoc, k as StudySessionFailedItem, l as StudySessionFailedNewItem, m as StudySessionFailedReviewItem, n as StudySessionNewItem, o as StudySessionReviewItem, Q as StudySessionRunSummary, T as TeacherClassroomDBInterface, L as UserConfig, E as UserCourseSetting, B as UserCourseSettings, z as UserDBAuthenticator, a as UserDBReader, y as UserDBWriter, Z as UserHydrationState, _ as UserHydrationStatus, O as UserOutcomeRecord, F as UsrCrsDataInterface, au as computeDeviation, aw as computeEffectiveWeight, av as computeSpread, ax as createOrchestrationContext, an as drainCapturedRuns, ak as getActivePipeline, a9 as getCardOrigin, aB as getLapses, a3 as getRegisteredNavigator, a6 as getRegisteredNavigatorNames, a5 as getRegisteredNavigatorRole, am as getRunsForSession, aA as getStreak, r as getStudySource, a4 as hasRegisteredNavigator, a7 as initializeNavigatorRegistry, ae as isFilter, ad as isGenerator, p as isReview, X as makeStudySessionId, aj as mountPipelineDebugger, az as newInterval, Y as newSessionId, ai as pipelineDebugAPI, a2 as registerNavigator, al as setDebugSessionId } from './contentSource-D3c1fMAk.cjs';
3
- import { D as DataLayerProvider } from './dataLayerProvider-CeLiFbHv.cjs';
4
- import { C as CardHistory, b as CardRecord, c as QuestionRecord } from './types-legacy-CrwyZIvI.cjs';
5
- export { d as CardData, e as CourseListData, g as DataShapeData, f as DisplayableData, D as DocType, i as DocTypePrefixes, F as Field, G as GuestUsername, Q as QualifiedCardID, h as QuestionData, S as SkuilderCourseData, a as Tag, T as TagStub, l as log } from './types-legacy-CrwyZIvI.cjs';
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.cjs';
2
+ import { U as UserDBInterface, d as CourseRegistrationDoc, h as SessionEloEvent, l as StudySessionItem, W as WeightedCard, n as ReplanHints, o as StudyContentSource, x as SessionStateSnapshotProvider, G as GeneratorResult, N as NavigatorRole, b as ContentNavigationStrategyData, F as FilterKind, y as RegulatorConfig, C as CourseDBInterface } from './contentSource-B6FrSihy.cjs';
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, m as ContentNavigator, v as ContentSourceID, k as CourseInfo, Q as CourseRegistration, a as CoursesDBInterface, aB as DEFAULT_REGULATOR_CONFIG, aM as DocumentUpdater, af as FilterContext, at as FilterImpact, ai as GeneratorContext, as as GeneratorSummary, _ as HYDRATION_MARKER_ID, $ as HydrationMarker, aF as INTAKE_CLOCK_KEY, aE as IntakeClockState, av as LearnableWeight, a0 as NavigatorConstructor, ab as NavigatorRoles, aa as Navigators, aw as OrchestrationContext, au as PipelineForecaster, aq as PipelineRunReport, g as RegulatorName, R as RegulatorReading, ar as RunReportCard, c as ScheduledCard, e as SessionStateSnapshot, M as SessionTrackingData, a8 as StrategyContribution, S as StudySessionDoc, p as StudySessionFailedItem, q as StudySessionFailedNewItem, r as StudySessionFailedReviewItem, 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, z as UserDBReader, A as UserDBWriter, Y as UserHydrationState, Z as UserHydrationStatus, T as UserOutcomeRecord, I as UsrCrsDataInterface, aL as applyReading, ax as computeDeviation, az as computeEffectiveWeight, ay as computeSpread, aA as createOrchestrationContext, ap as drainCapturedRuns, aH as frozenMsAt, am as getActivePipeline, a9 as getCardOrigin, aP as getLapses, a5 as getRegisteredFilterKind, a2 as getRegisteredNavigator, a6 as getRegisteredNavigatorNames, a4 as getRegisteredNavigatorRole, ao as getRunsForSession, aO as getStreak, w as getStudySource, a3 as hasRegisteredNavigator, a7 as initializeNavigatorRegistry, aI as intakeHours, aK as intakeReading, ad as isFilter, ac as isGenerator, u as isReview, V as makeStudySessionId, al as mountPipelineDebugger, aN as newInterval, X as newSessionId, ak as pipelineDebugAPI, a1 as registerNavigator, aG as resetIntakeClock, aD as reviewMassReading, aC as reviewWeight, an as setDebugSessionId, aJ as stepIntakeClock } from './contentSource-B6FrSihy.cjs';
4
+ import { D as DataLayerProvider } from './dataLayerProvider-DUxDqMtZ.cjs';
5
+ import { c as CardHistory, b as CardRecord, Q as QuestionRecord } from './types-legacy-BkOYOR6U.cjs';
6
+ export { C as CardData, g as CourseListData, h as DataShapeData, a as DisplayableData, D as DocType, f as DocTypePrefixes, 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.cjs';
6
7
  import { SrsBacklogDebug, StrategyPressureDebug, Loggable } from './core/index.cjs';
7
- export { BulkCardProcessorConfig, CardFilter, CardFilterFactory, DIVERSITY_FLOOR, DIVERSITY_STRENGTH, DiversityRerankOptions, FilterContext, GradientObservation, GradientResult, ImportResult, PeriodUpdateInput, PeriodUpdateResult, PressureGaugeDebug, SignalConfig, StrategyLearningState, StrategyStateDoc, StrategyStateId, 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 } from './core/index.cjs';
8
+ export { BulkCardProcessorConfig, DIVERSITY_FLOOR, DIVERSITY_STRENGTH, DiversityRerankOptions, GradientObservation, GradientResult, ImportResult, PeriodUpdateInput, PeriodUpdateResult, PressureGaugeDebug, SignalConfig, StrategyLearningState, StrategyStateDoc, StrategyStateId, 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 } from './core/index.cjs';
8
9
  import { TaggedPerformance, TagFilter, DataShape, CourseConfig } from '@vue-skuilder/common';
9
- import { S as StaticCourseManifest } from './types-DjiFOZxJ.cjs';
10
- export { A as AttachmentData, C as ChunkMetadata, D as DesignDocument, I as IndexMetadata, a as PackedCourseData, P as PackerConfig } from './types-DjiFOZxJ.cjs';
11
- import { F as FileSystemAdapter } from './index-D7WdMDAs.cjs';
12
- export { C as CouchDBToStaticPacker, a as FileStats, b as FileSystemError } from './index-D7WdMDAs.cjs';
10
+ import { S as StaticCourseManifest } from './types-D0oQeJAi.cjs';
11
+ export { A as AttachmentData, C as ChunkMetadata, D as DesignDocument, I as IndexMetadata, a as PackedCourseData, P as PackerConfig } from './types-D0oQeJAi.cjs';
12
+ import { F as FileSystemAdapter } from './index-Ktg72jKb.cjs';
13
+ export { C as CouchDBToStaticPacker, a as FileStats, b as FileSystemError } from './index-Ktg72jKb.cjs';
13
14
  import moment from 'moment';
14
15
 
15
16
  /**
@@ -1333,6 +1334,67 @@ declare const sessionDebugAPI: {
1333
1334
  */
1334
1335
  declare function mountSessionDebugger(): void;
1335
1336
 
1337
+ type PlannedNavigatorOrigin =
1338
+ /** From the course's strategy documents. */
1339
+ 'strategy-doc'
1340
+ /** Added by the assembler because the course declared none of its kind. */
1341
+ | 'assembler-default'
1342
+ /** Part of the fallback pipeline for a course with no strategy documents. */
1343
+ | 'default-pipeline';
1344
+ interface PlannedNavigator {
1345
+ role: NavigatorRole;
1346
+ origin: PlannedNavigatorOrigin;
1347
+ /** The name runs report this navigator under (generator summaries, filter impacts). */
1348
+ name: string;
1349
+ implementingClass: string;
1350
+ /** The strategy document: the course's own, or the default the assembler supplies. */
1351
+ strategy: ContentNavigationStrategyData;
1352
+ /**
1353
+ * Filters only: the kind its class declares (`static kind`), read from the
1354
+ * navigator registry. Undefined if undeclared, which runs as a gate.
1355
+ */
1356
+ kind?: FilterKind;
1357
+ }
1358
+ interface SkippedStrategy {
1359
+ strategy: ContentNavigationStrategyData;
1360
+ reason: string;
1361
+ }
1362
+ interface PipelinePlan {
1363
+ /** Assembled from strategy documents, or the fallback for a course with none. */
1364
+ kind: 'assembled' | 'default';
1365
+ generators: PlannedNavigator[];
1366
+ /** In run order. */
1367
+ filters: PlannedNavigator[];
1368
+ skipped: SkippedStrategy[];
1369
+ warnings: string[];
1370
+ /** Consequences of the plan worth knowing that aren't errors. */
1371
+ notes: string[];
1372
+ /** The regulator stage's settings (see regulators.ts). */
1373
+ regulators: RegulatorConfig;
1374
+ }
1375
+ type PipelineStageKey = 'generate' | 'filter' | 'drop-zero' | 'regulate' | 'hints' | 'diversity' | 'select';
1376
+ /** One step of a pipeline run, in order. Shared by views and text exports. */
1377
+ interface PipelineStageInfo {
1378
+ key: PipelineStageKey;
1379
+ title: string;
1380
+ summary: string;
1381
+ }
1382
+ /**
1383
+ * The steps every pipeline run takes, in order (`Pipeline.getWeightedCards`).
1384
+ * `generate` and `filter` are where a plan's navigators run; the rest are
1385
+ * fixed framework behaviour.
1386
+ */
1387
+ declare const PIPELINE_STAGES: readonly PipelineStageInfo[];
1388
+ /**
1389
+ * Plan the pipeline a course's strategy documents assemble into.
1390
+ *
1391
+ * Mirrors the assembly rules: generators keep document order, with ELO and SRS
1392
+ * added when absent; an ELO distance filter is added when absent; filters run
1393
+ * sorted by name; unknown implementing classes are skipped with a warning. With no documents at all, describes the default
1394
+ * pipeline that `createDefaultPipeline` builds instead.
1395
+ */
1396
+ declare function planPipeline(strategies: ContentNavigationStrategyData[], courseId: string): PipelinePlan;
1397
+
1336
1398
  interface CourseLookupDoc {
1337
1399
  _id: string;
1338
1400
  _rev: string;
@@ -1585,4 +1647,4 @@ interface CouchDbUserDoc extends PouchDB.Authentication.User {
1585
1647
  entitlements: UserEntitlements;
1586
1648
  }
1587
1649
 
1588
- export { type ActiveSessionHandle, type AggregatedDocument, type AttachmentUploadResult, CardHistory, type CardPresentation, CardRecord, type CouchDbUserDoc, CourseDBInterface, CourseLookup, CourseRegistrationDoc, type CustomQuestionsData, DEFAULT_MIGRATION_OPTIONS, type DataLayerConfig, DataLayerProvider, type DocumentCounts, ENV, type Entitlement, FileSystemAdapter, GeneratorResult, Loggable, type MigrationOptions, type MigrationResult, type MixerCardInfo, type MixerRunReport, NOT_SET, type OutcomeObserver, type ProcessedDataShape, type ProcessedQuestionData, QuestionRecord, type QueueSnapshot, QuotaRoundRobinMixer, REVIEW_TIME_FORMAT, ReplanHints, type ReplanOptions, type ResponseResult, type RestoreProgress, type SessionAction, SessionController, type SessionControls, type SessionDebugSnapshot, type SessionDebugTarget, type SessionDrawnCardDebug, SessionEloEvent, type SessionOutcome, type SessionQueueDebug, type SessionQueueItemDebug, type SessionRunReport, SessionStateSnapshotProvider, type SourceBatch, type SourceMixer, type SourceSelectionBreakdown, type SourceSummary, SrsBacklogDebug, StaticCourseManifest, type StaticCourseValidation, StaticToCouchDBMigrator, StrategyPressureDebug, StudyContentSource, StudySessionItem, type StudySessionRecord, TagFilteredContentSource, type UserAccountStatus, UserDBInterface, type UserEntitlements, type ValidationIssue, type ValidationResult, WeightedCard, _resetDataLayer, captureMixerRun, clearStaleSessionDebugState, endSessionTracking, ensureAppDataDirectory, getActiveController, getAppDataDirectory, getDataLayer, getDbPath, initializeDataDirectory, initializeDataLayer, isDataShapeRegistered, isDataShapeSchemaAvailable, isQuestionTypeRegistered, makeScheduledCardId, mixerDebugAPI, mountMixerDebugger, mountSessionDebugger, processCustomQuestionsData, recordCardPresentation, registerActiveController, registerBlanksCard, registerCustomQuestionTypes, registerDataShape, registerQuestionType, registerSeedData, removeCustomQuestionTypes, removeDataShape, removeQuestionType, sessionDebugAPI, snapshotQueues, startSessionTracking, toggleSessionOverlay, validateMigration, validateStaticCourse };
1650
+ export { type ActiveSessionHandle, type AggregatedDocument, type AttachmentUploadResult, CardHistory, type CardPresentation, CardRecord, ContentNavigationStrategyData, type CouchDbUserDoc, CourseDBInterface, CourseLookup, CourseRegistrationDoc, type CustomQuestionsData, DEFAULT_MIGRATION_OPTIONS, type DataLayerConfig, DataLayerProvider, type DocumentCounts, ENV, type Entitlement, FileSystemAdapter, FilterKind, GeneratorResult, Loggable, type MigrationOptions, type MigrationResult, type MixerCardInfo, type MixerRunReport, NOT_SET, NavigatorRole, type OutcomeObserver, PIPELINE_STAGES, type PipelinePlan, type PipelineStageInfo, type PipelineStageKey, type PlannedNavigator, type PlannedNavigatorOrigin, type ProcessedDataShape, type ProcessedQuestionData, QuestionRecord, type QueueSnapshot, QuotaRoundRobinMixer, REVIEW_TIME_FORMAT, RegulatorConfig, ReplanHints, type ReplanOptions, type ResponseResult, type RestoreProgress, type SessionAction, SessionController, type SessionControls, type SessionDebugSnapshot, type SessionDebugTarget, type SessionDrawnCardDebug, SessionEloEvent, type SessionOutcome, type SessionQueueDebug, type SessionQueueItemDebug, type SessionRunReport, SessionStateSnapshotProvider, type SkippedStrategy, type SourceBatch, type SourceMixer, type SourceSelectionBreakdown, type SourceSummary, SrsBacklogDebug, StaticCourseManifest, type StaticCourseValidation, StaticToCouchDBMigrator, StrategyPressureDebug, StudyContentSource, StudySessionItem, type StudySessionRecord, TagFilteredContentSource, type UserAccountStatus, UserDBInterface, type UserEntitlements, type ValidationIssue, type ValidationResult, WeightedCard, _resetDataLayer, captureMixerRun, clearStaleSessionDebugState, endSessionTracking, ensureAppDataDirectory, getActiveController, getAppDataDirectory, getDataLayer, getDbPath, initializeDataDirectory, initializeDataLayer, isDataShapeRegistered, isDataShapeSchemaAvailable, isQuestionTypeRegistered, makeScheduledCardId, mixerDebugAPI, mountMixerDebugger, mountSessionDebugger, planPipeline, processCustomQuestionsData, recordCardPresentation, registerActiveController, registerBlanksCard, registerCustomQuestionTypes, registerDataShape, registerQuestionType, registerSeedData, removeCustomQuestionTypes, removeDataShape, removeQuestionType, sessionDebugAPI, snapshotQueues, startSessionTracking, toggleSessionOverlay, validateMigration, validateStaticCourse };
package/dist/index.d.ts CHANGED
@@ -1,15 +1,16 @@
1
- import { U as UserDBInterface, s as CourseRegistrationDoc, t as SessionEloEvent, S as StudySessionItem, W as WeightedCard, R as ReplanHints, h as StudyContentSource, u as SessionStateSnapshotProvider, G as GeneratorResult, C as CourseDBInterface } from './contentSource-LPf044hY.js';
2
- export { M as ActivityRecord, A as AdminDBInterface, x as AssignedCard, g as AssignedContent, w as AssignedCourse, v as AssignedTag, af as CardGenerator, ah as CardGeneratorFactory, c as ClassroomDBInterface, I as ClassroomRegistration, H as ClassroomRegistrationDesignation, J as ClassroomRegistrationDoc, e as ContentNavigationStrategyData, f as ContentNavigator, q as ContentSourceID, d as CourseInfo, N as CourseRegistration, b as CoursesDBInterface, ay as DocumentUpdater, aq as FilterImpact, ag as GeneratorContext, ap as GeneratorSummary, $ as HYDRATION_MARKER_ID, a0 as HydrationMarker, as as LearnableWeight, a1 as NavigatorConstructor, ab as NavigatorRole, ac as NavigatorRoles, aa as Navigators, at as OrchestrationContext, ar as PipelineForecaster, ao as PipelineRunReport, j as ScheduledCard, V as SessionStateSnapshot, K as SessionTrackingData, a8 as StrategyContribution, i as StudentClassroomDBInterface, P as StudySessionDoc, k as StudySessionFailedItem, l as StudySessionFailedNewItem, m as StudySessionFailedReviewItem, n as StudySessionNewItem, o as StudySessionReviewItem, Q as StudySessionRunSummary, T as TeacherClassroomDBInterface, L as UserConfig, E as UserCourseSetting, B as UserCourseSettings, z as UserDBAuthenticator, a as UserDBReader, y as UserDBWriter, Z as UserHydrationState, _ as UserHydrationStatus, O as UserOutcomeRecord, F as UsrCrsDataInterface, au as computeDeviation, aw as computeEffectiveWeight, av as computeSpread, ax as createOrchestrationContext, an as drainCapturedRuns, ak as getActivePipeline, a9 as getCardOrigin, aB as getLapses, a3 as getRegisteredNavigator, a6 as getRegisteredNavigatorNames, a5 as getRegisteredNavigatorRole, am as getRunsForSession, aA as getStreak, r as getStudySource, a4 as hasRegisteredNavigator, a7 as initializeNavigatorRegistry, ae as isFilter, ad as isGenerator, p as isReview, X as makeStudySessionId, aj as mountPipelineDebugger, az as newInterval, Y as newSessionId, ai as pipelineDebugAPI, a2 as registerNavigator, al as setDebugSessionId } from './contentSource-LPf044hY.js';
3
- import { D as DataLayerProvider } from './dataLayerProvider-DaAootVV.js';
4
- import { C as CardHistory, b as CardRecord, c as QuestionRecord } from './types-legacy-CrwyZIvI.js';
5
- export { d as CardData, e as CourseListData, g as DataShapeData, f as DisplayableData, D as DocType, i as DocTypePrefixes, F as Field, G as GuestUsername, Q as QualifiedCardID, h as QuestionData, S as SkuilderCourseData, a as Tag, T as TagStub, l as log } from './types-legacy-CrwyZIvI.js';
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 { U as UserDBInterface, d as CourseRegistrationDoc, h as SessionEloEvent, l as StudySessionItem, W as WeightedCard, n as ReplanHints, o as StudyContentSource, x as SessionStateSnapshotProvider, G as GeneratorResult, N as NavigatorRole, b as ContentNavigationStrategyData, F as FilterKind, y as RegulatorConfig, 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, m as ContentNavigator, v as ContentSourceID, k as CourseInfo, Q as CourseRegistration, a as CoursesDBInterface, aB as DEFAULT_REGULATOR_CONFIG, aM as DocumentUpdater, af as FilterContext, at as FilterImpact, ai as GeneratorContext, as as GeneratorSummary, _ as HYDRATION_MARKER_ID, $ as HydrationMarker, aF as INTAKE_CLOCK_KEY, aE as IntakeClockState, av as LearnableWeight, a0 as NavigatorConstructor, ab as NavigatorRoles, aa as Navigators, aw as OrchestrationContext, au as PipelineForecaster, aq as PipelineRunReport, g as RegulatorName, R as RegulatorReading, ar as RunReportCard, c as ScheduledCard, e as SessionStateSnapshot, M as SessionTrackingData, a8 as StrategyContribution, S as StudySessionDoc, p as StudySessionFailedItem, q as StudySessionFailedNewItem, r as StudySessionFailedReviewItem, 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, z as UserDBReader, A as UserDBWriter, Y as UserHydrationState, Z as UserHydrationStatus, T as UserOutcomeRecord, I as UsrCrsDataInterface, aL as applyReading, ax as computeDeviation, az as computeEffectiveWeight, ay as computeSpread, aA as createOrchestrationContext, ap as drainCapturedRuns, aH as frozenMsAt, am as getActivePipeline, a9 as getCardOrigin, aP as getLapses, a5 as getRegisteredFilterKind, a2 as getRegisteredNavigator, a6 as getRegisteredNavigatorNames, a4 as getRegisteredNavigatorRole, ao as getRunsForSession, aO as getStreak, w as getStudySource, a3 as hasRegisteredNavigator, a7 as initializeNavigatorRegistry, aI as intakeHours, aK as intakeReading, ad as isFilter, ac as isGenerator, u as isReview, V as makeStudySessionId, al as mountPipelineDebugger, aN as newInterval, X as newSessionId, ak as pipelineDebugAPI, a1 as registerNavigator, aG as resetIntakeClock, aD as reviewMassReading, aC as reviewWeight, an as setDebugSessionId, aJ as stepIntakeClock } from './contentSource-CqJmbOZN.js';
4
+ import { D as DataLayerProvider } from './dataLayerProvider-B9_UCvkR.js';
5
+ import { c as CardHistory, b as CardRecord, Q as QuestionRecord } from './types-legacy-BkOYOR6U.js';
6
+ export { C as CardData, g as CourseListData, h as DataShapeData, a as DisplayableData, D as DocType, f as DocTypePrefixes, 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 { SrsBacklogDebug, StrategyPressureDebug, Loggable } from './core/index.js';
7
- export { BulkCardProcessorConfig, CardFilter, CardFilterFactory, DIVERSITY_FLOOR, DIVERSITY_STRENGTH, DiversityRerankOptions, FilterContext, GradientObservation, GradientResult, ImportResult, PeriodUpdateInput, PeriodUpdateResult, PressureGaugeDebug, SignalConfig, StrategyLearningState, StrategyStateDoc, StrategyStateId, 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 } from './core/index.js';
8
+ export { BulkCardProcessorConfig, DIVERSITY_FLOOR, DIVERSITY_STRENGTH, DiversityRerankOptions, GradientObservation, GradientResult, ImportResult, PeriodUpdateInput, PeriodUpdateResult, PressureGaugeDebug, SignalConfig, StrategyLearningState, StrategyStateDoc, StrategyStateId, 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 } from './core/index.js';
8
9
  import { TaggedPerformance, TagFilter, DataShape, CourseConfig } from '@vue-skuilder/common';
9
- import { S as StaticCourseManifest } from './types-uJ2Xn3_X.js';
10
- export { A as AttachmentData, C as ChunkMetadata, D as DesignDocument, I as IndexMetadata, a as PackedCourseData, P as PackerConfig } from './types-uJ2Xn3_X.js';
11
- import { F as FileSystemAdapter } from './index-BkBJlGDX.js';
12
- export { C as CouchDBToStaticPacker, a as FileStats, b as FileSystemError } from './index-BkBJlGDX.js';
10
+ import { S as StaticCourseManifest } from './types-dXWfyz9B.js';
11
+ export { A as AttachmentData, C as ChunkMetadata, D as DesignDocument, I as IndexMetadata, a as PackedCourseData, P as PackerConfig } from './types-dXWfyz9B.js';
12
+ import { F as FileSystemAdapter } from './index-CVGehe_t.js';
13
+ export { C as CouchDBToStaticPacker, a as FileStats, b as FileSystemError } from './index-CVGehe_t.js';
13
14
  import moment from 'moment';
14
15
 
15
16
  /**
@@ -1333,6 +1334,67 @@ declare const sessionDebugAPI: {
1333
1334
  */
1334
1335
  declare function mountSessionDebugger(): void;
1335
1336
 
1337
+ type PlannedNavigatorOrigin =
1338
+ /** From the course's strategy documents. */
1339
+ 'strategy-doc'
1340
+ /** Added by the assembler because the course declared none of its kind. */
1341
+ | 'assembler-default'
1342
+ /** Part of the fallback pipeline for a course with no strategy documents. */
1343
+ | 'default-pipeline';
1344
+ interface PlannedNavigator {
1345
+ role: NavigatorRole;
1346
+ origin: PlannedNavigatorOrigin;
1347
+ /** The name runs report this navigator under (generator summaries, filter impacts). */
1348
+ name: string;
1349
+ implementingClass: string;
1350
+ /** The strategy document: the course's own, or the default the assembler supplies. */
1351
+ strategy: ContentNavigationStrategyData;
1352
+ /**
1353
+ * Filters only: the kind its class declares (`static kind`), read from the
1354
+ * navigator registry. Undefined if undeclared, which runs as a gate.
1355
+ */
1356
+ kind?: FilterKind;
1357
+ }
1358
+ interface SkippedStrategy {
1359
+ strategy: ContentNavigationStrategyData;
1360
+ reason: string;
1361
+ }
1362
+ interface PipelinePlan {
1363
+ /** Assembled from strategy documents, or the fallback for a course with none. */
1364
+ kind: 'assembled' | 'default';
1365
+ generators: PlannedNavigator[];
1366
+ /** In run order. */
1367
+ filters: PlannedNavigator[];
1368
+ skipped: SkippedStrategy[];
1369
+ warnings: string[];
1370
+ /** Consequences of the plan worth knowing that aren't errors. */
1371
+ notes: string[];
1372
+ /** The regulator stage's settings (see regulators.ts). */
1373
+ regulators: RegulatorConfig;
1374
+ }
1375
+ type PipelineStageKey = 'generate' | 'filter' | 'drop-zero' | 'regulate' | 'hints' | 'diversity' | 'select';
1376
+ /** One step of a pipeline run, in order. Shared by views and text exports. */
1377
+ interface PipelineStageInfo {
1378
+ key: PipelineStageKey;
1379
+ title: string;
1380
+ summary: string;
1381
+ }
1382
+ /**
1383
+ * The steps every pipeline run takes, in order (`Pipeline.getWeightedCards`).
1384
+ * `generate` and `filter` are where a plan's navigators run; the rest are
1385
+ * fixed framework behaviour.
1386
+ */
1387
+ declare const PIPELINE_STAGES: readonly PipelineStageInfo[];
1388
+ /**
1389
+ * Plan the pipeline a course's strategy documents assemble into.
1390
+ *
1391
+ * Mirrors the assembly rules: generators keep document order, with ELO and SRS
1392
+ * added when absent; an ELO distance filter is added when absent; filters run
1393
+ * sorted by name; unknown implementing classes are skipped with a warning. With no documents at all, describes the default
1394
+ * pipeline that `createDefaultPipeline` builds instead.
1395
+ */
1396
+ declare function planPipeline(strategies: ContentNavigationStrategyData[], courseId: string): PipelinePlan;
1397
+
1336
1398
  interface CourseLookupDoc {
1337
1399
  _id: string;
1338
1400
  _rev: string;
@@ -1585,4 +1647,4 @@ interface CouchDbUserDoc extends PouchDB.Authentication.User {
1585
1647
  entitlements: UserEntitlements;
1586
1648
  }
1587
1649
 
1588
- export { type ActiveSessionHandle, type AggregatedDocument, type AttachmentUploadResult, CardHistory, type CardPresentation, CardRecord, type CouchDbUserDoc, CourseDBInterface, CourseLookup, CourseRegistrationDoc, type CustomQuestionsData, DEFAULT_MIGRATION_OPTIONS, type DataLayerConfig, DataLayerProvider, type DocumentCounts, ENV, type Entitlement, FileSystemAdapter, GeneratorResult, Loggable, type MigrationOptions, type MigrationResult, type MixerCardInfo, type MixerRunReport, NOT_SET, type OutcomeObserver, type ProcessedDataShape, type ProcessedQuestionData, QuestionRecord, type QueueSnapshot, QuotaRoundRobinMixer, REVIEW_TIME_FORMAT, ReplanHints, type ReplanOptions, type ResponseResult, type RestoreProgress, type SessionAction, SessionController, type SessionControls, type SessionDebugSnapshot, type SessionDebugTarget, type SessionDrawnCardDebug, SessionEloEvent, type SessionOutcome, type SessionQueueDebug, type SessionQueueItemDebug, type SessionRunReport, SessionStateSnapshotProvider, type SourceBatch, type SourceMixer, type SourceSelectionBreakdown, type SourceSummary, SrsBacklogDebug, StaticCourseManifest, type StaticCourseValidation, StaticToCouchDBMigrator, StrategyPressureDebug, StudyContentSource, StudySessionItem, type StudySessionRecord, TagFilteredContentSource, type UserAccountStatus, UserDBInterface, type UserEntitlements, type ValidationIssue, type ValidationResult, WeightedCard, _resetDataLayer, captureMixerRun, clearStaleSessionDebugState, endSessionTracking, ensureAppDataDirectory, getActiveController, getAppDataDirectory, getDataLayer, getDbPath, initializeDataDirectory, initializeDataLayer, isDataShapeRegistered, isDataShapeSchemaAvailable, isQuestionTypeRegistered, makeScheduledCardId, mixerDebugAPI, mountMixerDebugger, mountSessionDebugger, processCustomQuestionsData, recordCardPresentation, registerActiveController, registerBlanksCard, registerCustomQuestionTypes, registerDataShape, registerQuestionType, registerSeedData, removeCustomQuestionTypes, removeDataShape, removeQuestionType, sessionDebugAPI, snapshotQueues, startSessionTracking, toggleSessionOverlay, validateMigration, validateStaticCourse };
1650
+ export { type ActiveSessionHandle, type AggregatedDocument, type AttachmentUploadResult, CardHistory, type CardPresentation, CardRecord, ContentNavigationStrategyData, type CouchDbUserDoc, CourseDBInterface, CourseLookup, CourseRegistrationDoc, type CustomQuestionsData, DEFAULT_MIGRATION_OPTIONS, type DataLayerConfig, DataLayerProvider, type DocumentCounts, ENV, type Entitlement, FileSystemAdapter, FilterKind, GeneratorResult, Loggable, type MigrationOptions, type MigrationResult, type MixerCardInfo, type MixerRunReport, NOT_SET, NavigatorRole, type OutcomeObserver, PIPELINE_STAGES, type PipelinePlan, type PipelineStageInfo, type PipelineStageKey, type PlannedNavigator, type PlannedNavigatorOrigin, type ProcessedDataShape, type ProcessedQuestionData, QuestionRecord, type QueueSnapshot, QuotaRoundRobinMixer, REVIEW_TIME_FORMAT, RegulatorConfig, ReplanHints, type ReplanOptions, type ResponseResult, type RestoreProgress, type SessionAction, SessionController, type SessionControls, type SessionDebugSnapshot, type SessionDebugTarget, type SessionDrawnCardDebug, SessionEloEvent, type SessionOutcome, type SessionQueueDebug, type SessionQueueItemDebug, type SessionRunReport, SessionStateSnapshotProvider, type SkippedStrategy, type SourceBatch, type SourceMixer, type SourceSelectionBreakdown, type SourceSummary, SrsBacklogDebug, StaticCourseManifest, type StaticCourseValidation, StaticToCouchDBMigrator, StrategyPressureDebug, StudyContentSource, StudySessionItem, type StudySessionRecord, TagFilteredContentSource, type UserAccountStatus, UserDBInterface, type UserEntitlements, type ValidationIssue, type ValidationResult, WeightedCard, _resetDataLayer, captureMixerRun, clearStaleSessionDebugState, endSessionTracking, ensureAppDataDirectory, getActiveController, getAppDataDirectory, getDataLayer, getDbPath, initializeDataDirectory, initializeDataLayer, isDataShapeRegistered, isDataShapeSchemaAvailable, isQuestionTypeRegistered, makeScheduledCardId, mixerDebugAPI, mountMixerDebugger, mountSessionDebugger, planPipeline, processCustomQuestionsData, recordCardPresentation, registerActiveController, registerBlanksCard, registerCustomQuestionTypes, registerDataShape, registerQuestionType, registerSeedData, removeCustomQuestionTypes, removeDataShape, removeQuestionType, sessionDebugAPI, snapshotQueues, startSessionTracking, toggleSessionOverlay, validateMigration, validateStaticCourse };