@vue-skuilder/db 0.1.31-a → 0.1.31

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 (50) hide show
  1. package/dist/{contentSource-BmnmvH8C.d.ts → contentSource-Bdwkvqa8.d.ts} +35 -4
  2. package/dist/{contentSource-DfBbaLA-.d.cts → contentSource-DF1nUbPQ.d.cts} +35 -4
  3. package/dist/core/index.d.cts +48 -3
  4. package/dist/core/index.d.ts +48 -3
  5. package/dist/core/index.js +587 -56
  6. package/dist/core/index.js.map +1 -1
  7. package/dist/core/index.mjs +586 -56
  8. package/dist/core/index.mjs.map +1 -1
  9. package/dist/{dataLayerProvider-BeRXVMs5.d.cts → dataLayerProvider-BKmVoyJR.d.ts} +20 -1
  10. package/dist/{dataLayerProvider-CG9GfaAY.d.ts → dataLayerProvider-BQdfJuBN.d.cts} +20 -1
  11. package/dist/impl/couch/index.d.cts +156 -4
  12. package/dist/impl/couch/index.d.ts +156 -4
  13. package/dist/impl/couch/index.js +805 -47
  14. package/dist/impl/couch/index.js.map +1 -1
  15. package/dist/impl/couch/index.mjs +804 -47
  16. package/dist/impl/couch/index.mjs.map +1 -1
  17. package/dist/impl/static/index.d.cts +3 -2
  18. package/dist/impl/static/index.d.ts +3 -2
  19. package/dist/impl/static/index.js +542 -37
  20. package/dist/impl/static/index.js.map +1 -1
  21. package/dist/impl/static/index.mjs +542 -37
  22. package/dist/impl/static/index.mjs.map +1 -1
  23. package/dist/index.d.cts +64 -3
  24. package/dist/index.d.ts +64 -3
  25. package/dist/index.js +1040 -90
  26. package/dist/index.js.map +1 -1
  27. package/dist/index.mjs +1030 -81
  28. package/dist/index.mjs.map +1 -1
  29. package/docs/navigators-architecture.md +64 -5
  30. package/package.json +3 -3
  31. package/src/core/interfaces/contentSource.ts +6 -0
  32. package/src/core/interfaces/courseDB.ts +6 -0
  33. package/src/core/interfaces/dataLayerProvider.ts +20 -0
  34. package/src/core/navigators/Pipeline.ts +414 -9
  35. package/src/core/navigators/PipelineAssembler.ts +23 -18
  36. package/src/core/navigators/PipelineDebugger.ts +115 -1
  37. package/src/core/navigators/filters/hierarchyDefinition.ts +78 -8
  38. package/src/core/navigators/generators/prescribed.ts +95 -0
  39. package/src/core/navigators/index.ts +55 -10
  40. package/src/impl/common/BaseUserDB.ts +4 -1
  41. package/src/impl/couch/CourseSyncService.ts +356 -0
  42. package/src/impl/couch/PouchDataLayerProvider.ts +21 -1
  43. package/src/impl/couch/courseDB.ts +60 -13
  44. package/src/impl/couch/index.ts +1 -0
  45. package/src/impl/static/courseDB.ts +5 -0
  46. package/src/study/ItemQueue.ts +42 -0
  47. package/src/study/SessionController.ts +195 -22
  48. package/src/study/SpacedRepetition.ts +7 -2
  49. package/tests/core/navigators/Pipeline.test.ts +1 -1
  50. package/tests/core/navigators/PipelineAssembler.test.ts +15 -14
@@ -240,6 +240,11 @@ interface CourseDBInterface extends NavigationStrategyManager, StudyContentSourc
240
240
  * @returns Map from cardId to array of tag names
241
241
  */
242
242
  getAppliedTagsBatch(cardIds: string[]): Promise<Map<string, string[]>>;
243
+ /**
244
+ * Get all card IDs in the course.
245
+ * Used by diagnostics to scan the full card space.
246
+ */
247
+ getAllCardIds(): Promise<string[]>;
243
248
  /**
244
249
  * Add a tag to a card
245
250
  */
@@ -742,10 +747,15 @@ type NavigatorConstructor = new (user: UserDBInterface, course: CourseDBInterfac
742
747
  * Call this to make a navigator available for instantiation by
743
748
  * ContentNavigator.create() without relying on dynamic imports.
744
749
  *
745
- * @param implementingClass - The class name (e.g., 'elo', 'hierarchyDefinition')
750
+ * Passing a `role` is optional for built-in navigators (whose roles are in
751
+ * the hardcoded `NavigatorRoles` record), but **required** for consumer-
752
+ * defined navigators that need to participate in pipeline assembly.
753
+ *
754
+ * @param implementingClass - The class name (e.g., 'elo', 'letterGatingFilter')
746
755
  * @param constructor - The navigator class constructor
756
+ * @param role - Optional pipeline role (GENERATOR or FILTER)
747
757
  */
748
- declare function registerNavigator(implementingClass: string, constructor: NavigatorConstructor): void;
758
+ declare function registerNavigator(implementingClass: string, constructor: NavigatorConstructor, role?: NavigatorRole): void;
749
759
  /**
750
760
  * Get a navigator constructor from the registry.
751
761
  *
@@ -760,6 +770,13 @@ declare function getRegisteredNavigator(implementingClass: string): NavigatorCon
760
770
  * @returns true if registered, false otherwise
761
771
  */
762
772
  declare function hasRegisteredNavigator(implementingClass: string): boolean;
773
+ /**
774
+ * Get the registered role for a navigator, if one was provided at registration.
775
+ *
776
+ * @param implementingClass - The class name to look up
777
+ * @returns The role, or undefined if not registered or no role was specified
778
+ */
779
+ declare function getRegisteredNavigatorRole(implementingClass: string): NavigatorRole | undefined;
763
780
  /**
764
781
  * Get all registered navigator names.
765
782
  * Useful for debugging and testing.
@@ -896,6 +913,7 @@ declare function getCardOrigin(card: WeightedCard): 'new' | 'review' | 'failed';
896
913
  declare enum Navigators {
897
914
  ELO = "elo",
898
915
  SRS = "srs",
916
+ PRESCRIBED = "prescribed",
899
917
  HIERARCHY = "hierarchyDefinition",
900
918
  INTERFERENCE = "interferenceMitigator",
901
919
  RELATIVE_PRIORITY = "relativePriority",
@@ -925,7 +943,10 @@ declare function isGenerator(impl: string): boolean;
925
943
  /**
926
944
  * Check if a navigator implementation is a filter.
927
945
  *
928
- * @param impl - Navigator implementation name (e.g., 'elo', 'hierarchyDefinition')
946
+ * Checks the built-in NavigatorRoles enum first, then falls back to the
947
+ * navigator registry for consumer-registered navigators.
948
+ *
949
+ * @param impl - Navigator implementation name (e.g., 'elo', 'letterGatingFilter')
929
950
  * @returns true if the navigator is a filter, false otherwise
930
951
  */
931
952
  declare function isFilter(impl: string): boolean;
@@ -1023,6 +1044,11 @@ declare abstract class ContentNavigator implements StudyContentSource {
1023
1044
  * @returns Cards sorted by score descending, with provenance trails
1024
1045
  */
1025
1046
  getWeightedCards(_limit: number): Promise<WeightedCard[]>;
1047
+ /**
1048
+ * Set ephemeral hints for the next pipeline run.
1049
+ * No-op for non-Pipeline navigators. Pipeline overrides this.
1050
+ */
1051
+ setEphemeralHints(_hints: Record<string, unknown>): void;
1026
1052
  }
1027
1053
 
1028
1054
  type StudySessionFailedItem = StudySessionFailedNewItem | StudySessionFailedReviewItem;
@@ -1081,7 +1107,12 @@ interface StudyContentSource {
1081
1107
  * Used for recording learning outcomes.
1082
1108
  */
1083
1109
  getOrchestrationContext?(): Promise<OrchestrationContext>;
1110
+ /**
1111
+ * Set ephemeral hints for the next pipeline run.
1112
+ * No-op for sources that don't support hints.
1113
+ */
1114
+ setEphemeralHints?(hints: Record<string, unknown>): void;
1084
1115
  }
1085
1116
  declare function getStudySource(source: ContentSourceID, user: UserDBInterface): Promise<StudyContentSource>;
1086
1117
 
1087
- export { isGenerator as $, type AdminDBInterface as A, type UsrCrsDataInterface as B, type CourseDBInterface as C, type DataLayerResult as D, type ClassroomRegistrationDesignation as E, type ClassroomRegistration as F, type ClassroomRegistrationDoc as G, type SessionTrackingData as H, type UserConfig as I, type ActivityRecord as J, type CourseRegistration as K, type UserOutcomeRecord as L, registerNavigator as M, type NavigatorConstructor as N, getRegisteredNavigator as O, hasRegisteredNavigator as P, getRegisteredNavigatorNames as Q, initializeNavigatorRegistry as R, type StudySessionItem as S, type TeacherClassroomDBInterface as T, type UserDBInterface as U, type StrategyContribution as V, type WeightedCard as W, getCardOrigin as X, Navigators as Y, NavigatorRole as Z, NavigatorRoles as _, type UserDBReader as a, isFilter as a0, type LearnableWeight as a1, type OrchestrationContext as a2, computeDeviation as a3, computeSpread as a4, computeEffectiveWeight as a5, createOrchestrationContext as a6, type DocumentUpdater as a7, newInterval as a8, type CoursesDBInterface as b, type ClassroomDBInterface as c, type CourseInfo as d, type ContentNavigationStrategyData as e, ContentNavigator as f, type AssignedContent as g, type StudyContentSource as h, type StudentClassroomDBInterface as i, type ScheduledCard as j, type StudySessionFailedItem as k, type StudySessionFailedNewItem as l, type StudySessionFailedReviewItem as m, type StudySessionNewItem as n, type StudySessionReviewItem as o, isReview as p, type ContentSourceID as q, getStudySource as r, type CourseRegistrationDoc as s, type AssignedTag as t, type AssignedCourse as u, type AssignedCard as v, type UserDBWriter as w, type UserDBAuthenticator as x, type UserCourseSettings as y, type UserCourseSetting as z };
1118
+ export { NavigatorRoles as $, type AdminDBInterface as A, type UsrCrsDataInterface as B, type CourseDBInterface as C, type DataLayerResult as D, type ClassroomRegistrationDesignation as E, type ClassroomRegistration as F, type ClassroomRegistrationDoc as G, type SessionTrackingData as H, type UserConfig as I, type ActivityRecord as J, type CourseRegistration as K, type UserOutcomeRecord as L, registerNavigator as M, type NavigatorConstructor as N, getRegisteredNavigator as O, hasRegisteredNavigator as P, getRegisteredNavigatorRole as Q, getRegisteredNavigatorNames as R, type StudySessionItem as S, type TeacherClassroomDBInterface as T, type UserDBInterface as U, initializeNavigatorRegistry as V, type WeightedCard as W, type StrategyContribution as X, getCardOrigin as Y, Navigators as Z, NavigatorRole as _, type UserDBReader as a, isGenerator as a0, isFilter as a1, type LearnableWeight as a2, type OrchestrationContext as a3, computeDeviation as a4, computeSpread as a5, computeEffectiveWeight as a6, createOrchestrationContext as a7, type DocumentUpdater as a8, newInterval as a9, type CoursesDBInterface as b, type ClassroomDBInterface as c, type CourseInfo as d, type ContentNavigationStrategyData as e, ContentNavigator as f, type AssignedContent as g, type StudyContentSource as h, type StudentClassroomDBInterface as i, type ScheduledCard as j, type StudySessionFailedItem as k, type StudySessionFailedNewItem as l, type StudySessionFailedReviewItem as m, type StudySessionNewItem as n, type StudySessionReviewItem as o, isReview as p, type ContentSourceID as q, getStudySource as r, type CourseRegistrationDoc as s, type AssignedTag as t, type AssignedCourse as u, type AssignedCard as v, type UserDBWriter as w, type UserDBAuthenticator as x, type UserCourseSettings as y, type UserCourseSetting as z };
@@ -240,6 +240,11 @@ interface CourseDBInterface extends NavigationStrategyManager, StudyContentSourc
240
240
  * @returns Map from cardId to array of tag names
241
241
  */
242
242
  getAppliedTagsBatch(cardIds: string[]): Promise<Map<string, string[]>>;
243
+ /**
244
+ * Get all card IDs in the course.
245
+ * Used by diagnostics to scan the full card space.
246
+ */
247
+ getAllCardIds(): Promise<string[]>;
243
248
  /**
244
249
  * Add a tag to a card
245
250
  */
@@ -742,10 +747,15 @@ type NavigatorConstructor = new (user: UserDBInterface, course: CourseDBInterfac
742
747
  * Call this to make a navigator available for instantiation by
743
748
  * ContentNavigator.create() without relying on dynamic imports.
744
749
  *
745
- * @param implementingClass - The class name (e.g., 'elo', 'hierarchyDefinition')
750
+ * Passing a `role` is optional for built-in navigators (whose roles are in
751
+ * the hardcoded `NavigatorRoles` record), but **required** for consumer-
752
+ * defined navigators that need to participate in pipeline assembly.
753
+ *
754
+ * @param implementingClass - The class name (e.g., 'elo', 'letterGatingFilter')
746
755
  * @param constructor - The navigator class constructor
756
+ * @param role - Optional pipeline role (GENERATOR or FILTER)
747
757
  */
748
- declare function registerNavigator(implementingClass: string, constructor: NavigatorConstructor): void;
758
+ declare function registerNavigator(implementingClass: string, constructor: NavigatorConstructor, role?: NavigatorRole): void;
749
759
  /**
750
760
  * Get a navigator constructor from the registry.
751
761
  *
@@ -760,6 +770,13 @@ declare function getRegisteredNavigator(implementingClass: string): NavigatorCon
760
770
  * @returns true if registered, false otherwise
761
771
  */
762
772
  declare function hasRegisteredNavigator(implementingClass: string): boolean;
773
+ /**
774
+ * Get the registered role for a navigator, if one was provided at registration.
775
+ *
776
+ * @param implementingClass - The class name to look up
777
+ * @returns The role, or undefined if not registered or no role was specified
778
+ */
779
+ declare function getRegisteredNavigatorRole(implementingClass: string): NavigatorRole | undefined;
763
780
  /**
764
781
  * Get all registered navigator names.
765
782
  * Useful for debugging and testing.
@@ -896,6 +913,7 @@ declare function getCardOrigin(card: WeightedCard): 'new' | 'review' | 'failed';
896
913
  declare enum Navigators {
897
914
  ELO = "elo",
898
915
  SRS = "srs",
916
+ PRESCRIBED = "prescribed",
899
917
  HIERARCHY = "hierarchyDefinition",
900
918
  INTERFERENCE = "interferenceMitigator",
901
919
  RELATIVE_PRIORITY = "relativePriority",
@@ -925,7 +943,10 @@ declare function isGenerator(impl: string): boolean;
925
943
  /**
926
944
  * Check if a navigator implementation is a filter.
927
945
  *
928
- * @param impl - Navigator implementation name (e.g., 'elo', 'hierarchyDefinition')
946
+ * Checks the built-in NavigatorRoles enum first, then falls back to the
947
+ * navigator registry for consumer-registered navigators.
948
+ *
949
+ * @param impl - Navigator implementation name (e.g., 'elo', 'letterGatingFilter')
929
950
  * @returns true if the navigator is a filter, false otherwise
930
951
  */
931
952
  declare function isFilter(impl: string): boolean;
@@ -1023,6 +1044,11 @@ declare abstract class ContentNavigator implements StudyContentSource {
1023
1044
  * @returns Cards sorted by score descending, with provenance trails
1024
1045
  */
1025
1046
  getWeightedCards(_limit: number): Promise<WeightedCard[]>;
1047
+ /**
1048
+ * Set ephemeral hints for the next pipeline run.
1049
+ * No-op for non-Pipeline navigators. Pipeline overrides this.
1050
+ */
1051
+ setEphemeralHints(_hints: Record<string, unknown>): void;
1026
1052
  }
1027
1053
 
1028
1054
  type StudySessionFailedItem = StudySessionFailedNewItem | StudySessionFailedReviewItem;
@@ -1081,7 +1107,12 @@ interface StudyContentSource {
1081
1107
  * Used for recording learning outcomes.
1082
1108
  */
1083
1109
  getOrchestrationContext?(): Promise<OrchestrationContext>;
1110
+ /**
1111
+ * Set ephemeral hints for the next pipeline run.
1112
+ * No-op for sources that don't support hints.
1113
+ */
1114
+ setEphemeralHints?(hints: Record<string, unknown>): void;
1084
1115
  }
1085
1116
  declare function getStudySource(source: ContentSourceID, user: UserDBInterface): Promise<StudyContentSource>;
1086
1117
 
1087
- export { isGenerator as $, type AdminDBInterface as A, type UsrCrsDataInterface as B, type CourseDBInterface as C, type DataLayerResult as D, type ClassroomRegistrationDesignation as E, type ClassroomRegistration as F, type ClassroomRegistrationDoc as G, type SessionTrackingData as H, type UserConfig as I, type ActivityRecord as J, type CourseRegistration as K, type UserOutcomeRecord as L, registerNavigator as M, type NavigatorConstructor as N, getRegisteredNavigator as O, hasRegisteredNavigator as P, getRegisteredNavigatorNames as Q, initializeNavigatorRegistry as R, type StudySessionItem as S, type TeacherClassroomDBInterface as T, type UserDBInterface as U, type StrategyContribution as V, type WeightedCard as W, getCardOrigin as X, Navigators as Y, NavigatorRole as Z, NavigatorRoles as _, type UserDBReader as a, isFilter as a0, type LearnableWeight as a1, type OrchestrationContext as a2, computeDeviation as a3, computeSpread as a4, computeEffectiveWeight as a5, createOrchestrationContext as a6, type DocumentUpdater as a7, newInterval as a8, type CoursesDBInterface as b, type ClassroomDBInterface as c, type CourseInfo as d, type ContentNavigationStrategyData as e, ContentNavigator as f, type AssignedContent as g, type StudyContentSource as h, type StudentClassroomDBInterface as i, type ScheduledCard as j, type StudySessionFailedItem as k, type StudySessionFailedNewItem as l, type StudySessionFailedReviewItem as m, type StudySessionNewItem as n, type StudySessionReviewItem as o, isReview as p, type ContentSourceID as q, getStudySource as r, type CourseRegistrationDoc as s, type AssignedTag as t, type AssignedCourse as u, type AssignedCard as v, type UserDBWriter as w, type UserDBAuthenticator as x, type UserCourseSettings as y, type UserCourseSetting as z };
1118
+ export { NavigatorRoles as $, type AdminDBInterface as A, type UsrCrsDataInterface as B, type CourseDBInterface as C, type DataLayerResult as D, type ClassroomRegistrationDesignation as E, type ClassroomRegistration as F, type ClassroomRegistrationDoc as G, type SessionTrackingData as H, type UserConfig as I, type ActivityRecord as J, type CourseRegistration as K, type UserOutcomeRecord as L, registerNavigator as M, type NavigatorConstructor as N, getRegisteredNavigator as O, hasRegisteredNavigator as P, getRegisteredNavigatorRole as Q, getRegisteredNavigatorNames as R, type StudySessionItem as S, type TeacherClassroomDBInterface as T, type UserDBInterface as U, initializeNavigatorRegistry as V, type WeightedCard as W, type StrategyContribution as X, getCardOrigin as Y, Navigators as Z, NavigatorRole as _, type UserDBReader as a, isGenerator as a0, isFilter as a1, type LearnableWeight as a2, type OrchestrationContext as a3, computeDeviation as a4, computeSpread as a5, computeEffectiveWeight as a6, createOrchestrationContext as a7, type DocumentUpdater as a8, newInterval as a9, type CoursesDBInterface as b, type ClassroomDBInterface as c, type CourseInfo as d, type ContentNavigationStrategyData as e, ContentNavigator as f, type AssignedContent as g, type StudyContentSource as h, type StudentClassroomDBInterface as i, type ScheduledCard as j, type StudySessionFailedItem as k, type StudySessionFailedNewItem as l, type StudySessionFailedReviewItem as m, type StudySessionNewItem as n, type StudySessionReviewItem as o, isReview as p, type ContentSourceID as q, getStudySource as r, type CourseRegistrationDoc as s, type AssignedTag as t, type AssignedCourse as u, type AssignedCard as v, type UserDBWriter as w, type UserDBAuthenticator as x, type UserCourseSettings as y, type UserCourseSetting as z };
@@ -1,6 +1,6 @@
1
- import { a1 as LearnableWeight, L as UserOutcomeRecord, a2 as OrchestrationContext, W as WeightedCard, U as UserDBInterface, C as CourseDBInterface, V as StrategyContribution } from '../contentSource-DfBbaLA-.cjs';
2
- export { J as ActivityRecord, A as AdminDBInterface, v as AssignedCard, g as AssignedContent, u as AssignedCourse, t as AssignedTag, c as ClassroomDBInterface, F as ClassroomRegistration, E as ClassroomRegistrationDesignation, G as ClassroomRegistrationDoc, e as ContentNavigationStrategyData, f as ContentNavigator, q as ContentSourceID, d as CourseInfo, K as CourseRegistration, s as CourseRegistrationDoc, b as CoursesDBInterface, N as NavigatorConstructor, Z as NavigatorRole, _ as NavigatorRoles, Y as Navigators, j as ScheduledCard, H as SessionTrackingData, i as StudentClassroomDBInterface, h as StudyContentSource, k as StudySessionFailedItem, l as StudySessionFailedNewItem, m as StudySessionFailedReviewItem, S as StudySessionItem, n as StudySessionNewItem, o as StudySessionReviewItem, T as TeacherClassroomDBInterface, I as UserConfig, z as UserCourseSetting, y as UserCourseSettings, x as UserDBAuthenticator, a as UserDBReader, w as UserDBWriter, B as UsrCrsDataInterface, a3 as computeDeviation, a5 as computeEffectiveWeight, a4 as computeSpread, a6 as createOrchestrationContext, X as getCardOrigin, O as getRegisteredNavigator, Q as getRegisteredNavigatorNames, r as getStudySource, P as hasRegisteredNavigator, R as initializeNavigatorRegistry, a0 as isFilter, $ as isGenerator, p as isReview, M as registerNavigator } from '../contentSource-DfBbaLA-.cjs';
3
- export { D as DataLayerProvider } from '../dataLayerProvider-BeRXVMs5.cjs';
1
+ import { a2 as LearnableWeight, L as UserOutcomeRecord, a3 as OrchestrationContext, W as WeightedCard, U as UserDBInterface, C as CourseDBInterface, X as StrategyContribution } from '../contentSource-DF1nUbPQ.cjs';
2
+ export { J as ActivityRecord, A as AdminDBInterface, v as AssignedCard, g as AssignedContent, u as AssignedCourse, t as AssignedTag, c as ClassroomDBInterface, F as ClassroomRegistration, E as ClassroomRegistrationDesignation, G as ClassroomRegistrationDoc, e as ContentNavigationStrategyData, f as ContentNavigator, q as ContentSourceID, d as CourseInfo, K as CourseRegistration, s as CourseRegistrationDoc, b as CoursesDBInterface, N as NavigatorConstructor, _ as NavigatorRole, $ as NavigatorRoles, Z as Navigators, j as ScheduledCard, H as SessionTrackingData, i as StudentClassroomDBInterface, h as StudyContentSource, k as StudySessionFailedItem, l as StudySessionFailedNewItem, m as StudySessionFailedReviewItem, S as StudySessionItem, n as StudySessionNewItem, o as StudySessionReviewItem, T as TeacherClassroomDBInterface, I as UserConfig, z as UserCourseSetting, y as UserCourseSettings, x as UserDBAuthenticator, a as UserDBReader, w as UserDBWriter, B as UsrCrsDataInterface, a4 as computeDeviation, a6 as computeEffectiveWeight, a5 as computeSpread, a7 as createOrchestrationContext, Y as getCardOrigin, O as getRegisteredNavigator, R as getRegisteredNavigatorNames, Q as getRegisteredNavigatorRole, r as getStudySource, P as hasRegisteredNavigator, V as initializeNavigatorRegistry, a1 as isFilter, a0 as isGenerator, p as isReview, M as registerNavigator } from '../contentSource-DF1nUbPQ.cjs';
3
+ export { D as DataLayerProvider } from '../dataLayerProvider-BQdfJuBN.cjs';
4
4
  import { D as DocType, i as QuestionRecord, b as DocTypePrefixes, C as CardHistory, c as CardRecord } from '../types-legacy-JXDxinpU.cjs';
5
5
  export { d as CardData, e as CourseListData, g as DataShapeData, f as DisplayableData, 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-JXDxinpU.cjs';
6
6
  import { DataShape, ParsedCard } from '@vue-skuilder/common';
@@ -383,6 +383,27 @@ interface CardGenerator {
383
383
  */
384
384
  type CardGeneratorFactory<TConfig = unknown> = (config: TConfig) => CardGenerator;
385
385
 
386
+ /**
387
+ * Diagnosis of the full card space for the current user.
388
+ */
389
+ interface CardSpaceDiagnosis {
390
+ totalCards: number;
391
+ threshold: number;
392
+ wellIndicated: number;
393
+ encountered: number;
394
+ wellIndicatedNew: number;
395
+ byType: Record<string, {
396
+ total: number;
397
+ wellIndicated: number;
398
+ new: number;
399
+ }>;
400
+ filterBreakdown: Array<{
401
+ name: string;
402
+ wellIndicated: number;
403
+ }>;
404
+ elapsedMs: number;
405
+ }
406
+
386
407
  /**
387
408
  * Summary of a single generator's contribution.
388
409
  */
@@ -424,6 +445,7 @@ interface PipelineRunReport {
424
445
  origin: 'new' | 'review' | 'unknown';
425
446
  finalScore: number;
426
447
  provenance: StrategyContribution[];
448
+ tags?: string[];
427
449
  selected: boolean;
428
450
  }>;
429
451
  }
@@ -463,6 +485,29 @@ declare const pipelineDebugAPI: {
463
485
  * Clear run history.
464
486
  */
465
487
  clear(): void;
488
+ /**
489
+ * Show the navigator registry: all registered classes and their roles.
490
+ *
491
+ * Useful for verifying that consumer-defined navigators were registered
492
+ * before pipeline assembly.
493
+ */
494
+ showRegistry(): void;
495
+ /**
496
+ * Show strategy documents from the last pipeline run and how they mapped
497
+ * to the registry.
498
+ *
499
+ * If no runs are captured yet, falls back to showing just the registry.
500
+ */
501
+ showStrategies(): void;
502
+ /**
503
+ * Scan the full card space through the filter chain for the current user.
504
+ *
505
+ * Reports how many cards are well-indicated and how many are new.
506
+ * Use this to understand how the search space grows during onboarding.
507
+ *
508
+ * @param threshold - Score threshold for "well indicated" (default 0.10)
509
+ */
510
+ diagnoseCardSpace(threshold?: number): Promise<CardSpaceDiagnosis | null>;
466
511
  /**
467
512
  * Show help.
468
513
  */
@@ -1,6 +1,6 @@
1
- import { a1 as LearnableWeight, L as UserOutcomeRecord, a2 as OrchestrationContext, W as WeightedCard, U as UserDBInterface, C as CourseDBInterface, V as StrategyContribution } from '../contentSource-BmnmvH8C.js';
2
- export { J as ActivityRecord, A as AdminDBInterface, v as AssignedCard, g as AssignedContent, u as AssignedCourse, t as AssignedTag, c as ClassroomDBInterface, F as ClassroomRegistration, E as ClassroomRegistrationDesignation, G as ClassroomRegistrationDoc, e as ContentNavigationStrategyData, f as ContentNavigator, q as ContentSourceID, d as CourseInfo, K as CourseRegistration, s as CourseRegistrationDoc, b as CoursesDBInterface, N as NavigatorConstructor, Z as NavigatorRole, _ as NavigatorRoles, Y as Navigators, j as ScheduledCard, H as SessionTrackingData, i as StudentClassroomDBInterface, h as StudyContentSource, k as StudySessionFailedItem, l as StudySessionFailedNewItem, m as StudySessionFailedReviewItem, S as StudySessionItem, n as StudySessionNewItem, o as StudySessionReviewItem, T as TeacherClassroomDBInterface, I as UserConfig, z as UserCourseSetting, y as UserCourseSettings, x as UserDBAuthenticator, a as UserDBReader, w as UserDBWriter, B as UsrCrsDataInterface, a3 as computeDeviation, a5 as computeEffectiveWeight, a4 as computeSpread, a6 as createOrchestrationContext, X as getCardOrigin, O as getRegisteredNavigator, Q as getRegisteredNavigatorNames, r as getStudySource, P as hasRegisteredNavigator, R as initializeNavigatorRegistry, a0 as isFilter, $ as isGenerator, p as isReview, M as registerNavigator } from '../contentSource-BmnmvH8C.js';
3
- export { D as DataLayerProvider } from '../dataLayerProvider-CG9GfaAY.js';
1
+ import { a2 as LearnableWeight, L as UserOutcomeRecord, a3 as OrchestrationContext, W as WeightedCard, U as UserDBInterface, C as CourseDBInterface, X as StrategyContribution } from '../contentSource-Bdwkvqa8.js';
2
+ export { J as ActivityRecord, A as AdminDBInterface, v as AssignedCard, g as AssignedContent, u as AssignedCourse, t as AssignedTag, c as ClassroomDBInterface, F as ClassroomRegistration, E as ClassroomRegistrationDesignation, G as ClassroomRegistrationDoc, e as ContentNavigationStrategyData, f as ContentNavigator, q as ContentSourceID, d as CourseInfo, K as CourseRegistration, s as CourseRegistrationDoc, b as CoursesDBInterface, N as NavigatorConstructor, _ as NavigatorRole, $ as NavigatorRoles, Z as Navigators, j as ScheduledCard, H as SessionTrackingData, i as StudentClassroomDBInterface, h as StudyContentSource, k as StudySessionFailedItem, l as StudySessionFailedNewItem, m as StudySessionFailedReviewItem, S as StudySessionItem, n as StudySessionNewItem, o as StudySessionReviewItem, T as TeacherClassroomDBInterface, I as UserConfig, z as UserCourseSetting, y as UserCourseSettings, x as UserDBAuthenticator, a as UserDBReader, w as UserDBWriter, B as UsrCrsDataInterface, a4 as computeDeviation, a6 as computeEffectiveWeight, a5 as computeSpread, a7 as createOrchestrationContext, Y as getCardOrigin, O as getRegisteredNavigator, R as getRegisteredNavigatorNames, Q as getRegisteredNavigatorRole, r as getStudySource, P as hasRegisteredNavigator, V as initializeNavigatorRegistry, a1 as isFilter, a0 as isGenerator, p as isReview, M as registerNavigator } from '../contentSource-Bdwkvqa8.js';
3
+ export { D as DataLayerProvider } from '../dataLayerProvider-BKmVoyJR.js';
4
4
  import { D as DocType, i as QuestionRecord, b as DocTypePrefixes, C as CardHistory, c as CardRecord } from '../types-legacy-JXDxinpU.js';
5
5
  export { d as CardData, e as CourseListData, g as DataShapeData, f as DisplayableData, 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-JXDxinpU.js';
6
6
  import { DataShape, ParsedCard } from '@vue-skuilder/common';
@@ -383,6 +383,27 @@ interface CardGenerator {
383
383
  */
384
384
  type CardGeneratorFactory<TConfig = unknown> = (config: TConfig) => CardGenerator;
385
385
 
386
+ /**
387
+ * Diagnosis of the full card space for the current user.
388
+ */
389
+ interface CardSpaceDiagnosis {
390
+ totalCards: number;
391
+ threshold: number;
392
+ wellIndicated: number;
393
+ encountered: number;
394
+ wellIndicatedNew: number;
395
+ byType: Record<string, {
396
+ total: number;
397
+ wellIndicated: number;
398
+ new: number;
399
+ }>;
400
+ filterBreakdown: Array<{
401
+ name: string;
402
+ wellIndicated: number;
403
+ }>;
404
+ elapsedMs: number;
405
+ }
406
+
386
407
  /**
387
408
  * Summary of a single generator's contribution.
388
409
  */
@@ -424,6 +445,7 @@ interface PipelineRunReport {
424
445
  origin: 'new' | 'review' | 'unknown';
425
446
  finalScore: number;
426
447
  provenance: StrategyContribution[];
448
+ tags?: string[];
427
449
  selected: boolean;
428
450
  }>;
429
451
  }
@@ -463,6 +485,29 @@ declare const pipelineDebugAPI: {
463
485
  * Clear run history.
464
486
  */
465
487
  clear(): void;
488
+ /**
489
+ * Show the navigator registry: all registered classes and their roles.
490
+ *
491
+ * Useful for verifying that consumer-defined navigators were registered
492
+ * before pipeline assembly.
493
+ */
494
+ showRegistry(): void;
495
+ /**
496
+ * Show strategy documents from the last pipeline run and how they mapped
497
+ * to the registry.
498
+ *
499
+ * If no runs are captured yet, falls back to showing just the registry.
500
+ */
501
+ showStrategies(): void;
502
+ /**
503
+ * Scan the full card space through the filter chain for the current user.
504
+ *
505
+ * Reports how many cards are well-indicated and how many are new.
506
+ * Use this to understand how the search space grows during onboarding.
507
+ *
508
+ * @param threshold - Score threshold for "well indicated" (default 0.10)
509
+ */
510
+ diagnoseCardSpace(threshold?: number): Promise<CardSpaceDiagnosis | null>;
466
511
  /**
467
512
  * Show help.
468
513
  */