@vue-skuilder/db 0.2.26 → 0.2.28

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 (61) 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-BoFBwvYa.d.ts} +65 -98
  4. package/dist/{contentSource-D3c1fMAk.d.cts → contentSource-DpQqTG3m.d.cts} +65 -98
  5. package/dist/core/index.d.cts +6 -5
  6. package/dist/core/index.d.ts +6 -5
  7. package/dist/core/index.js +43 -15
  8. package/dist/core/index.js.map +1 -1
  9. package/dist/core/index.mjs +43 -15
  10. package/dist/core/index.mjs.map +1 -1
  11. package/dist/{dataLayerProvider-DaAootVV.d.ts → dataLayerProvider-D_LJT3F4.d.ts} +2 -8
  12. package/dist/{dataLayerProvider-CeLiFbHv.d.cts → dataLayerProvider-Dl3cAAvQ.d.cts} +2 -8
  13. package/dist/diagnostics/index.d.cts +370 -0
  14. package/dist/diagnostics/index.d.ts +370 -0
  15. package/dist/diagnostics/index.js +778 -0
  16. package/dist/diagnostics/index.js.map +1 -0
  17. package/dist/diagnostics/index.mjs +729 -0
  18. package/dist/diagnostics/index.mjs.map +1 -0
  19. package/dist/impl/couch/index.d.cts +4 -3
  20. package/dist/impl/couch/index.d.ts +4 -3
  21. package/dist/impl/couch/index.js +43 -15
  22. package/dist/impl/couch/index.js.map +1 -1
  23. package/dist/impl/couch/index.mjs +43 -15
  24. package/dist/impl/couch/index.mjs.map +1 -1
  25. package/dist/impl/static/index.d.cts +5 -5
  26. package/dist/impl/static/index.d.ts +5 -5
  27. package/dist/impl/static/index.js +43 -21
  28. package/dist/impl/static/index.js.map +1 -1
  29. package/dist/impl/static/index.mjs +43 -21
  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 +10 -9
  34. package/dist/index.d.ts +10 -9
  35. package/dist/index.js +85 -36
  36. package/dist/index.js.map +1 -1
  37. package/dist/index.mjs +85 -36
  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/dataLayerProvider.ts +3 -8
  47. package/src/core/navigators/Pipeline.ts +5 -2
  48. package/src/core/navigators/PipelineDebugger.ts +64 -16
  49. package/src/core/navigators/generators/prescribed.ts +43 -14
  50. package/src/core/navigators/index.ts +1 -0
  51. package/src/core/types/studySession.ts +37 -0
  52. package/src/diagnostics/dataset.ts +231 -0
  53. package/src/diagnostics/derive.ts +555 -0
  54. package/src/diagnostics/index.ts +24 -0
  55. package/src/diagnostics/loader.ts +191 -0
  56. package/src/diagnostics/text.ts +242 -0
  57. package/src/impl/couch/PouchDataLayerProvider.ts +0 -23
  58. package/src/impl/static/StaticDataLayerProvider.ts +0 -11
  59. package/src/study/SessionController.ts +56 -2
  60. package/tests/core/navigators/prescribedIntroExposure.test.ts +29 -0
  61. package/tsup.config.ts +1 -0
@@ -0,0 +1,86 @@
1
+ import { CourseConfig, ClassroomConfig } from '@vue-skuilder/common';
2
+
3
+ /**
4
+ * Admin functionality
5
+ */
6
+ interface AdminDBInterface {
7
+ /**
8
+ * Get all users
9
+ */
10
+ getUsers(): Promise<PouchDB.Core.Document<{}>[]>;
11
+ /**
12
+ * Get all courses
13
+ */
14
+ getCourses(): Promise<CourseConfig[]>;
15
+ /**
16
+ * Remove a course
17
+ */
18
+ removeCourse(id: string): Promise<PouchDB.Core.Response>;
19
+ /**
20
+ * Get all classrooms
21
+ */
22
+ getClassrooms(): Promise<(ClassroomConfig & {
23
+ _id: string;
24
+ })[]>;
25
+ }
26
+
27
+ /**
28
+ * Classroom management
29
+ */
30
+ interface ClassroomDBInterface {
31
+ /**
32
+ * Get classroom config
33
+ */
34
+ getConfig(): ClassroomConfig;
35
+ /**
36
+ * Get assigned content
37
+ */
38
+ getAssignedContent(): Promise<AssignedContent[]>;
39
+ }
40
+ interface TeacherClassroomDBInterface extends ClassroomDBInterface {
41
+ /**
42
+ * For teacher interfaces: assign content
43
+ */
44
+ assignContent?(content: AssignedContent): Promise<boolean>;
45
+ /**
46
+ * For teacher interfaces: remove content
47
+ */
48
+ removeContent?(content: AssignedContent): Promise<void>;
49
+ }
50
+ /**
51
+ * Student-facing classroom interface.
52
+ * Content is accessed via StudyContentSource.getWeightedCards().
53
+ */
54
+ type StudentClassroomDBInterface = ClassroomDBInterface;
55
+ type AssignedContent = AssignedCourse | AssignedTag | AssignedCard;
56
+ interface AssignedTag extends ContentBase {
57
+ type: 'tag';
58
+ tagID: string;
59
+ }
60
+ interface AssignedCourse extends ContentBase {
61
+ type: 'course';
62
+ }
63
+ interface AssignedCard extends ContentBase {
64
+ type: 'card';
65
+ cardID: string;
66
+ }
67
+ interface ContentBase {
68
+ type: 'course' | 'tag' | 'card';
69
+ /**
70
+ * Username of the assigning teacher.
71
+ */
72
+ assignedBy: string;
73
+ /**
74
+ * Date the content was assigned.
75
+ */
76
+ assignedOn: moment.Moment;
77
+ /**
78
+ * A 'due' date for this assigned content, for scheduling content
79
+ * in advance. Content will not be actively pushed to students until
80
+ * this date.
81
+ */
82
+ activeOn: moment.Moment;
83
+ courseID: string;
84
+ }
85
+
86
+ export type { AdminDBInterface as A, ClassroomDBInterface as C, StudentClassroomDBInterface as S, TeacherClassroomDBInterface as T, AssignedContent as a, AssignedTag as b, AssignedCourse as c, AssignedCard as d };
@@ -0,0 +1,86 @@
1
+ import { CourseConfig, ClassroomConfig } from '@vue-skuilder/common';
2
+
3
+ /**
4
+ * Admin functionality
5
+ */
6
+ interface AdminDBInterface {
7
+ /**
8
+ * Get all users
9
+ */
10
+ getUsers(): Promise<PouchDB.Core.Document<{}>[]>;
11
+ /**
12
+ * Get all courses
13
+ */
14
+ getCourses(): Promise<CourseConfig[]>;
15
+ /**
16
+ * Remove a course
17
+ */
18
+ removeCourse(id: string): Promise<PouchDB.Core.Response>;
19
+ /**
20
+ * Get all classrooms
21
+ */
22
+ getClassrooms(): Promise<(ClassroomConfig & {
23
+ _id: string;
24
+ })[]>;
25
+ }
26
+
27
+ /**
28
+ * Classroom management
29
+ */
30
+ interface ClassroomDBInterface {
31
+ /**
32
+ * Get classroom config
33
+ */
34
+ getConfig(): ClassroomConfig;
35
+ /**
36
+ * Get assigned content
37
+ */
38
+ getAssignedContent(): Promise<AssignedContent[]>;
39
+ }
40
+ interface TeacherClassroomDBInterface extends ClassroomDBInterface {
41
+ /**
42
+ * For teacher interfaces: assign content
43
+ */
44
+ assignContent?(content: AssignedContent): Promise<boolean>;
45
+ /**
46
+ * For teacher interfaces: remove content
47
+ */
48
+ removeContent?(content: AssignedContent): Promise<void>;
49
+ }
50
+ /**
51
+ * Student-facing classroom interface.
52
+ * Content is accessed via StudyContentSource.getWeightedCards().
53
+ */
54
+ type StudentClassroomDBInterface = ClassroomDBInterface;
55
+ type AssignedContent = AssignedCourse | AssignedTag | AssignedCard;
56
+ interface AssignedTag extends ContentBase {
57
+ type: 'tag';
58
+ tagID: string;
59
+ }
60
+ interface AssignedCourse extends ContentBase {
61
+ type: 'course';
62
+ }
63
+ interface AssignedCard extends ContentBase {
64
+ type: 'card';
65
+ cardID: string;
66
+ }
67
+ interface ContentBase {
68
+ type: 'course' | 'tag' | 'card';
69
+ /**
70
+ * Username of the assigning teacher.
71
+ */
72
+ assignedBy: string;
73
+ /**
74
+ * Date the content was assigned.
75
+ */
76
+ assignedOn: moment.Moment;
77
+ /**
78
+ * A 'due' date for this assigned content, for scheduling content
79
+ * in advance. Content will not be actively pushed to students until
80
+ * this date.
81
+ */
82
+ activeOn: moment.Moment;
83
+ courseID: string;
84
+ }
85
+
86
+ export type { AdminDBInterface as A, ClassroomDBInterface as C, StudentClassroomDBInterface as S, TeacherClassroomDBInterface as T, AssignedContent as a, AssignedTag as b, AssignedCourse as c, AssignedCard as d };
@@ -1,89 +1,6 @@
1
- import { CourseConfig, ClassroomConfig, Status, SkuilderCourseData as SkuilderCourseData$1, CourseElo, DataShape, TagFilter } from '@vue-skuilder/common';
1
+ import { Status, CourseConfig, SkuilderCourseData as SkuilderCourseData$1, CourseElo, DataShape, TagFilter } from '@vue-skuilder/common';
2
2
  import { Moment } from 'moment';
3
- import { S as SkuilderCourseData, i as DocTypePrefixes, D as DocType, Q as QualifiedCardID, T as TagStub, a as Tag, C as CardHistory, b as CardRecord, c as QuestionRecord } from './types-legacy-CrwyZIvI.js';
4
-
5
- /**
6
- * Admin functionality
7
- */
8
- interface AdminDBInterface {
9
- /**
10
- * Get all users
11
- */
12
- getUsers(): Promise<PouchDB.Core.Document<{}>[]>;
13
- /**
14
- * Get all courses
15
- */
16
- getCourses(): Promise<CourseConfig[]>;
17
- /**
18
- * Remove a course
19
- */
20
- removeCourse(id: string): Promise<PouchDB.Core.Response>;
21
- /**
22
- * Get all classrooms
23
- */
24
- getClassrooms(): Promise<(ClassroomConfig & {
25
- _id: string;
26
- })[]>;
27
- }
28
-
29
- /**
30
- * Classroom management
31
- */
32
- interface ClassroomDBInterface {
33
- /**
34
- * Get classroom config
35
- */
36
- getConfig(): ClassroomConfig;
37
- /**
38
- * Get assigned content
39
- */
40
- getAssignedContent(): Promise<AssignedContent[]>;
41
- }
42
- interface TeacherClassroomDBInterface extends ClassroomDBInterface {
43
- /**
44
- * For teacher interfaces: assign content
45
- */
46
- assignContent?(content: AssignedContent): Promise<boolean>;
47
- /**
48
- * For teacher interfaces: remove content
49
- */
50
- removeContent?(content: AssignedContent): Promise<void>;
51
- }
52
- /**
53
- * Student-facing classroom interface.
54
- * Content is accessed via StudyContentSource.getWeightedCards().
55
- */
56
- type StudentClassroomDBInterface = ClassroomDBInterface;
57
- type AssignedContent = AssignedCourse | AssignedTag | AssignedCard;
58
- interface AssignedTag extends ContentBase {
59
- type: 'tag';
60
- tagID: string;
61
- }
62
- interface AssignedCourse extends ContentBase {
63
- type: 'course';
64
- }
65
- interface AssignedCard extends ContentBase {
66
- type: 'card';
67
- cardID: string;
68
- }
69
- interface ContentBase {
70
- type: 'course' | 'tag' | 'card';
71
- /**
72
- * Username of the assigning teacher.
73
- */
74
- assignedBy: string;
75
- /**
76
- * Date the content was assigned.
77
- */
78
- assignedOn: moment.Moment;
79
- /**
80
- * A 'due' date for this assigned content, for scheduling content
81
- * in advance. Content will not be actively pushed to students until
82
- * this date.
83
- */
84
- activeOn: moment.Moment;
85
- courseID: string;
86
- }
3
+ import { S as SkuilderCourseData, f as DocTypePrefixes, D as DocType, d as QualifiedCardID, e as TagStub, T as Tag, c as CardHistory, b as CardRecord, Q as QuestionRecord } from './types-legacy-BkOYOR6U.js';
87
4
 
88
5
  interface DataLayerResult {
89
6
  status: Status;
@@ -579,6 +496,19 @@ interface FilterImpact {
579
496
  passed: number;
580
497
  removed: number;
581
498
  }
499
+ /** One card as retained in a {@link PipelineRunReport}. */
500
+ interface RunReportCard {
501
+ cardId: string;
502
+ courseId: string;
503
+ origin: 'new' | 'review' | 'unknown';
504
+ generator?: string;
505
+ finalScore: number;
506
+ /** Card's ELO (parsed from ELO generator provenance, if available) */
507
+ cardElo?: number;
508
+ provenance: StrategyContribution[];
509
+ tags?: string[];
510
+ selected: boolean;
511
+ }
582
512
  /**
583
513
  * Complete record of a single pipeline execution.
584
514
  */
@@ -613,18 +543,21 @@ interface PipelineRunReport {
613
543
  * rather than retained verbatim — each retained card carries a multi-KB
614
544
  * provenance trail, and the tail is typically hundreds of cards per run.
615
545
  */
616
- cards: Array<{
617
- cardId: string;
618
- courseId: string;
619
- origin: 'new' | 'review' | 'unknown';
620
- generator?: string;
621
- finalScore: number;
622
- /** Card's ELO (parsed from ELO generator provenance, if available) */
623
- cardElo?: number;
624
- provenance: StrategyContribution[];
625
- tags?: string[];
626
- selected: boolean;
627
- }>;
546
+ cards: RunReportCard[];
547
+ /**
548
+ * The two unselected non-review cards most worth explaining when a run
549
+ * picks no new content. Non-review means no `reviewID`, so prescribed and
550
+ * required cards count (their `origin` reads `'unknown'`).
551
+ *
552
+ * - `nextInLine`: highest final score. How close new content came.
553
+ * - `topGenerated`: highest generator score, zero-scored cards included.
554
+ * Its provenance shows which filter sank it. Omitted when it is the same
555
+ * card as `nextInLine`.
556
+ */
557
+ unselectedNew?: {
558
+ nextInLine?: RunReportCard;
559
+ topGenerated?: RunReportCard;
560
+ };
628
561
  /**
629
562
  * Summary of the discarded tail of the candidate pool — cards that were
630
563
  * generated and scored but neither selected nor retained in `cards`.
@@ -852,6 +785,40 @@ interface StudySessionRunSummary {
852
785
  eloRange?: [number, number];
853
786
  note: string;
854
787
  };
788
+ /**
789
+ * The selected cards, then the top few unselected ones, each in score
790
+ * order. The lowest selected score against the first runner-up is this
791
+ * run's cutoff.
792
+ */
793
+ cards?: StudySessionRunCard[];
794
+ /**
795
+ * The unselected non-review cards most worth explaining, with their
796
+ * score-changing provenance. See `PipelineRunReport.unselectedNew`.
797
+ */
798
+ unselectedNew?: {
799
+ nextInLine?: StudySessionRunCardTrail;
800
+ topGenerated?: StudySessionRunCardTrail;
801
+ };
802
+ }
803
+ /** A card as persisted on a run. `origin` is as counted in `newSelected`/`reviewsSelected`. */
804
+ interface StudySessionRunCard {
805
+ cardId: string;
806
+ origin: 'new' | 'review' | 'unknown';
807
+ generator?: string;
808
+ score: number;
809
+ selected: boolean;
810
+ }
811
+ /**
812
+ * A card plus the provenance entries that changed its score, in order.
813
+ * `'passed'` entries are dropped. Strategy ids are dropped (the name is kept).
814
+ */
815
+ interface StudySessionRunCardTrail extends StudySessionRunCard {
816
+ trail: Array<{
817
+ strategyName: string;
818
+ action: StrategyContribution['action'];
819
+ score: number;
820
+ reason: string;
821
+ }>;
855
822
  }
856
823
  /**
857
824
  * One learner↔card ELO exchange, captured at the moment it resolved so a
@@ -1784,4 +1751,4 @@ interface StudyContentSource {
1784
1751
  }
1785
1752
  declare function getStudySource(source: ContentSourceID, user: UserDBInterface): Promise<StudyContentSource>;
1786
1753
 
1787
- export { HYDRATION_MARKER_ID as $, type AdminDBInterface as A, type UserCourseSettings as B, type CourseDBInterface as C, type DataLayerResult as D, type UserCourseSetting as E, type UsrCrsDataInterface as F, type GeneratorResult as G, type ClassroomRegistrationDesignation as H, type ClassroomRegistration as I, type ClassroomRegistrationDoc as J, type SessionTrackingData as K, type UserConfig as L, type ActivityRecord as M, type CourseRegistration as N, type UserOutcomeRecord as O, type StudySessionDoc as P, type StudySessionRunSummary as Q, type ReplanHints as R, type StudySessionItem as S, type TeacherClassroomDBInterface as T, type UserDBInterface as U, type SessionStateSnapshot as V, type WeightedCard as W, makeStudySessionId as X, newSessionId as Y, type UserHydrationState as Z, type UserHydrationStatus as _, type UserDBReader as a, type HydrationMarker as a0, type NavigatorConstructor as a1, registerNavigator as a2, getRegisteredNavigator as a3, hasRegisteredNavigator as a4, getRegisteredNavigatorRole as a5, getRegisteredNavigatorNames as a6, initializeNavigatorRegistry as a7, type StrategyContribution as a8, getCardOrigin as a9, getStreak as aA, getLapses as aB, Navigators as aa, NavigatorRole as ab, NavigatorRoles as ac, isGenerator as ad, isFilter as ae, type CardGenerator as af, type GeneratorContext as ag, type CardGeneratorFactory as ah, pipelineDebugAPI as ai, mountPipelineDebugger as aj, getActivePipeline as ak, setDebugSessionId as al, getRunsForSession as am, drainCapturedRuns as an, type PipelineRunReport as ao, type GeneratorSummary as ap, type FilterImpact as aq, type PipelineForecaster as ar, type LearnableWeight as as, type OrchestrationContext as at, computeDeviation as au, computeSpread as av, computeEffectiveWeight as aw, createOrchestrationContext as ax, type DocumentUpdater as ay, newInterval as az, 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 SessionEloEvent as t, type SessionStateSnapshotProvider as u, type AssignedTag as v, type AssignedCourse as w, type AssignedCard as x, type UserDBWriter as y, type UserDBAuthenticator as z };
1754
+ export { getRegisteredNavigatorRole as $, type UserCourseSetting as A, type UsrCrsDataInterface as B, type CourseDBInterface as C, type DataLayerResult as D, type ClassroomRegistrationDesignation as E, type ClassroomRegistration as F, type GeneratorResult as G, type ClassroomRegistrationDoc as H, type SessionTrackingData as I, type UserConfig as J, type ActivityRecord as K, type CourseRegistration as L, type UserOutcomeRecord as M, makeStudySessionId as N, newSessionId as O, type UserHydrationState as P, type UserHydrationStatus as Q, type ReplanHints as R, type StudySessionDoc as S, HYDRATION_MARKER_ID as T, type UserDBInterface as U, type HydrationMarker as V, type WeightedCard as W, type NavigatorConstructor as X, registerNavigator as Y, getRegisteredNavigator as Z, hasRegisteredNavigator as _, type CoursesDBInterface as a, getRegisteredNavigatorNames as a0, initializeNavigatorRegistry as a1, type StrategyContribution as a2, getCardOrigin as a3, Navigators as a4, NavigatorRole as a5, NavigatorRoles as a6, isGenerator as a7, isFilter as a8, type CardGenerator as a9, type GeneratorContext as aa, type CardGeneratorFactory as ab, pipelineDebugAPI as ac, mountPipelineDebugger as ad, getActivePipeline as ae, setDebugSessionId as af, getRunsForSession as ag, drainCapturedRuns as ah, type PipelineRunReport as ai, type RunReportCard as aj, type GeneratorSummary as ak, type FilterImpact as al, type PipelineForecaster as am, type LearnableWeight as an, type OrchestrationContext as ao, computeDeviation as ap, computeSpread as aq, computeEffectiveWeight as ar, createOrchestrationContext as as, type DocumentUpdater as at, newInterval as au, getStreak as av, getLapses as aw, type ScheduledCard as b, type CourseRegistrationDoc as c, type SessionStateSnapshot as d, type StudySessionRunSummary as e, type SessionEloEvent as f, type StudySessionRunCard as g, type StudySessionRunCardTrail as h, type CourseInfo as i, type StudySessionItem as j, type ContentNavigationStrategyData as k, ContentNavigator as l, type StudyContentSource as m, type StudySessionFailedItem as n, type StudySessionFailedNewItem as o, type StudySessionFailedReviewItem as p, type StudySessionNewItem as q, type StudySessionReviewItem as r, isReview as s, type ContentSourceID as t, getStudySource as u, type SessionStateSnapshotProvider as v, type UserDBReader as w, type UserDBWriter as x, type UserDBAuthenticator as y, type UserCourseSettings as z };
@@ -1,89 +1,6 @@
1
- import { CourseConfig, ClassroomConfig, Status, SkuilderCourseData as SkuilderCourseData$1, CourseElo, DataShape, TagFilter } from '@vue-skuilder/common';
1
+ import { Status, CourseConfig, SkuilderCourseData as SkuilderCourseData$1, CourseElo, DataShape, TagFilter } from '@vue-skuilder/common';
2
2
  import { Moment } from 'moment';
3
- import { S as SkuilderCourseData, i as DocTypePrefixes, D as DocType, Q as QualifiedCardID, T as TagStub, a as Tag, C as CardHistory, b as CardRecord, c as QuestionRecord } from './types-legacy-CrwyZIvI.cjs';
4
-
5
- /**
6
- * Admin functionality
7
- */
8
- interface AdminDBInterface {
9
- /**
10
- * Get all users
11
- */
12
- getUsers(): Promise<PouchDB.Core.Document<{}>[]>;
13
- /**
14
- * Get all courses
15
- */
16
- getCourses(): Promise<CourseConfig[]>;
17
- /**
18
- * Remove a course
19
- */
20
- removeCourse(id: string): Promise<PouchDB.Core.Response>;
21
- /**
22
- * Get all classrooms
23
- */
24
- getClassrooms(): Promise<(ClassroomConfig & {
25
- _id: string;
26
- })[]>;
27
- }
28
-
29
- /**
30
- * Classroom management
31
- */
32
- interface ClassroomDBInterface {
33
- /**
34
- * Get classroom config
35
- */
36
- getConfig(): ClassroomConfig;
37
- /**
38
- * Get assigned content
39
- */
40
- getAssignedContent(): Promise<AssignedContent[]>;
41
- }
42
- interface TeacherClassroomDBInterface extends ClassroomDBInterface {
43
- /**
44
- * For teacher interfaces: assign content
45
- */
46
- assignContent?(content: AssignedContent): Promise<boolean>;
47
- /**
48
- * For teacher interfaces: remove content
49
- */
50
- removeContent?(content: AssignedContent): Promise<void>;
51
- }
52
- /**
53
- * Student-facing classroom interface.
54
- * Content is accessed via StudyContentSource.getWeightedCards().
55
- */
56
- type StudentClassroomDBInterface = ClassroomDBInterface;
57
- type AssignedContent = AssignedCourse | AssignedTag | AssignedCard;
58
- interface AssignedTag extends ContentBase {
59
- type: 'tag';
60
- tagID: string;
61
- }
62
- interface AssignedCourse extends ContentBase {
63
- type: 'course';
64
- }
65
- interface AssignedCard extends ContentBase {
66
- type: 'card';
67
- cardID: string;
68
- }
69
- interface ContentBase {
70
- type: 'course' | 'tag' | 'card';
71
- /**
72
- * Username of the assigning teacher.
73
- */
74
- assignedBy: string;
75
- /**
76
- * Date the content was assigned.
77
- */
78
- assignedOn: moment.Moment;
79
- /**
80
- * A 'due' date for this assigned content, for scheduling content
81
- * in advance. Content will not be actively pushed to students until
82
- * this date.
83
- */
84
- activeOn: moment.Moment;
85
- courseID: string;
86
- }
3
+ import { S as SkuilderCourseData, f as DocTypePrefixes, D as DocType, d as QualifiedCardID, e as TagStub, T as Tag, c as CardHistory, b as CardRecord, Q as QuestionRecord } from './types-legacy-BkOYOR6U.cjs';
87
4
 
88
5
  interface DataLayerResult {
89
6
  status: Status;
@@ -579,6 +496,19 @@ interface FilterImpact {
579
496
  passed: number;
580
497
  removed: number;
581
498
  }
499
+ /** One card as retained in a {@link PipelineRunReport}. */
500
+ interface RunReportCard {
501
+ cardId: string;
502
+ courseId: string;
503
+ origin: 'new' | 'review' | 'unknown';
504
+ generator?: string;
505
+ finalScore: number;
506
+ /** Card's ELO (parsed from ELO generator provenance, if available) */
507
+ cardElo?: number;
508
+ provenance: StrategyContribution[];
509
+ tags?: string[];
510
+ selected: boolean;
511
+ }
582
512
  /**
583
513
  * Complete record of a single pipeline execution.
584
514
  */
@@ -613,18 +543,21 @@ interface PipelineRunReport {
613
543
  * rather than retained verbatim — each retained card carries a multi-KB
614
544
  * provenance trail, and the tail is typically hundreds of cards per run.
615
545
  */
616
- cards: Array<{
617
- cardId: string;
618
- courseId: string;
619
- origin: 'new' | 'review' | 'unknown';
620
- generator?: string;
621
- finalScore: number;
622
- /** Card's ELO (parsed from ELO generator provenance, if available) */
623
- cardElo?: number;
624
- provenance: StrategyContribution[];
625
- tags?: string[];
626
- selected: boolean;
627
- }>;
546
+ cards: RunReportCard[];
547
+ /**
548
+ * The two unselected non-review cards most worth explaining when a run
549
+ * picks no new content. Non-review means no `reviewID`, so prescribed and
550
+ * required cards count (their `origin` reads `'unknown'`).
551
+ *
552
+ * - `nextInLine`: highest final score. How close new content came.
553
+ * - `topGenerated`: highest generator score, zero-scored cards included.
554
+ * Its provenance shows which filter sank it. Omitted when it is the same
555
+ * card as `nextInLine`.
556
+ */
557
+ unselectedNew?: {
558
+ nextInLine?: RunReportCard;
559
+ topGenerated?: RunReportCard;
560
+ };
628
561
  /**
629
562
  * Summary of the discarded tail of the candidate pool — cards that were
630
563
  * generated and scored but neither selected nor retained in `cards`.
@@ -852,6 +785,40 @@ interface StudySessionRunSummary {
852
785
  eloRange?: [number, number];
853
786
  note: string;
854
787
  };
788
+ /**
789
+ * The selected cards, then the top few unselected ones, each in score
790
+ * order. The lowest selected score against the first runner-up is this
791
+ * run's cutoff.
792
+ */
793
+ cards?: StudySessionRunCard[];
794
+ /**
795
+ * The unselected non-review cards most worth explaining, with their
796
+ * score-changing provenance. See `PipelineRunReport.unselectedNew`.
797
+ */
798
+ unselectedNew?: {
799
+ nextInLine?: StudySessionRunCardTrail;
800
+ topGenerated?: StudySessionRunCardTrail;
801
+ };
802
+ }
803
+ /** A card as persisted on a run. `origin` is as counted in `newSelected`/`reviewsSelected`. */
804
+ interface StudySessionRunCard {
805
+ cardId: string;
806
+ origin: 'new' | 'review' | 'unknown';
807
+ generator?: string;
808
+ score: number;
809
+ selected: boolean;
810
+ }
811
+ /**
812
+ * A card plus the provenance entries that changed its score, in order.
813
+ * `'passed'` entries are dropped. Strategy ids are dropped (the name is kept).
814
+ */
815
+ interface StudySessionRunCardTrail extends StudySessionRunCard {
816
+ trail: Array<{
817
+ strategyName: string;
818
+ action: StrategyContribution['action'];
819
+ score: number;
820
+ reason: string;
821
+ }>;
855
822
  }
856
823
  /**
857
824
  * One learner↔card ELO exchange, captured at the moment it resolved so a
@@ -1784,4 +1751,4 @@ interface StudyContentSource {
1784
1751
  }
1785
1752
  declare function getStudySource(source: ContentSourceID, user: UserDBInterface): Promise<StudyContentSource>;
1786
1753
 
1787
- export { HYDRATION_MARKER_ID as $, type AdminDBInterface as A, type UserCourseSettings as B, type CourseDBInterface as C, type DataLayerResult as D, type UserCourseSetting as E, type UsrCrsDataInterface as F, type GeneratorResult as G, type ClassroomRegistrationDesignation as H, type ClassroomRegistration as I, type ClassroomRegistrationDoc as J, type SessionTrackingData as K, type UserConfig as L, type ActivityRecord as M, type CourseRegistration as N, type UserOutcomeRecord as O, type StudySessionDoc as P, type StudySessionRunSummary as Q, type ReplanHints as R, type StudySessionItem as S, type TeacherClassroomDBInterface as T, type UserDBInterface as U, type SessionStateSnapshot as V, type WeightedCard as W, makeStudySessionId as X, newSessionId as Y, type UserHydrationState as Z, type UserHydrationStatus as _, type UserDBReader as a, type HydrationMarker as a0, type NavigatorConstructor as a1, registerNavigator as a2, getRegisteredNavigator as a3, hasRegisteredNavigator as a4, getRegisteredNavigatorRole as a5, getRegisteredNavigatorNames as a6, initializeNavigatorRegistry as a7, type StrategyContribution as a8, getCardOrigin as a9, getStreak as aA, getLapses as aB, Navigators as aa, NavigatorRole as ab, NavigatorRoles as ac, isGenerator as ad, isFilter as ae, type CardGenerator as af, type GeneratorContext as ag, type CardGeneratorFactory as ah, pipelineDebugAPI as ai, mountPipelineDebugger as aj, getActivePipeline as ak, setDebugSessionId as al, getRunsForSession as am, drainCapturedRuns as an, type PipelineRunReport as ao, type GeneratorSummary as ap, type FilterImpact as aq, type PipelineForecaster as ar, type LearnableWeight as as, type OrchestrationContext as at, computeDeviation as au, computeSpread as av, computeEffectiveWeight as aw, createOrchestrationContext as ax, type DocumentUpdater as ay, newInterval as az, 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 SessionEloEvent as t, type SessionStateSnapshotProvider as u, type AssignedTag as v, type AssignedCourse as w, type AssignedCard as x, type UserDBWriter as y, type UserDBAuthenticator as z };
1754
+ export { getRegisteredNavigatorRole as $, type UserCourseSetting as A, type UsrCrsDataInterface as B, type CourseDBInterface as C, type DataLayerResult as D, type ClassroomRegistrationDesignation as E, type ClassroomRegistration as F, type GeneratorResult as G, type ClassroomRegistrationDoc as H, type SessionTrackingData as I, type UserConfig as J, type ActivityRecord as K, type CourseRegistration as L, type UserOutcomeRecord as M, makeStudySessionId as N, newSessionId as O, type UserHydrationState as P, type UserHydrationStatus as Q, type ReplanHints as R, type StudySessionDoc as S, HYDRATION_MARKER_ID as T, type UserDBInterface as U, type HydrationMarker as V, type WeightedCard as W, type NavigatorConstructor as X, registerNavigator as Y, getRegisteredNavigator as Z, hasRegisteredNavigator as _, type CoursesDBInterface as a, getRegisteredNavigatorNames as a0, initializeNavigatorRegistry as a1, type StrategyContribution as a2, getCardOrigin as a3, Navigators as a4, NavigatorRole as a5, NavigatorRoles as a6, isGenerator as a7, isFilter as a8, type CardGenerator as a9, type GeneratorContext as aa, type CardGeneratorFactory as ab, pipelineDebugAPI as ac, mountPipelineDebugger as ad, getActivePipeline as ae, setDebugSessionId as af, getRunsForSession as ag, drainCapturedRuns as ah, type PipelineRunReport as ai, type RunReportCard as aj, type GeneratorSummary as ak, type FilterImpact as al, type PipelineForecaster as am, type LearnableWeight as an, type OrchestrationContext as ao, computeDeviation as ap, computeSpread as aq, computeEffectiveWeight as ar, createOrchestrationContext as as, type DocumentUpdater as at, newInterval as au, getStreak as av, getLapses as aw, type ScheduledCard as b, type CourseRegistrationDoc as c, type SessionStateSnapshot as d, type StudySessionRunSummary as e, type SessionEloEvent as f, type StudySessionRunCard as g, type StudySessionRunCardTrail as h, type CourseInfo as i, type StudySessionItem as j, type ContentNavigationStrategyData as k, ContentNavigator as l, type StudyContentSource as m, type StudySessionFailedItem as n, type StudySessionFailedNewItem as o, type StudySessionFailedReviewItem as p, type StudySessionNewItem as q, type StudySessionReviewItem as r, isReview as s, type ContentSourceID as t, getStudySource as u, type SessionStateSnapshotProvider as v, type UserDBReader as w, type UserDBWriter as x, type UserDBAuthenticator as y, type UserCourseSettings as z };
@@ -1,8 +1,9 @@
1
- import { as as LearnableWeight, O as UserOutcomeRecord, at as OrchestrationContext, W as WeightedCard, U as UserDBInterface, 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, s as CourseRegistrationDoc, b as CoursesDBInterface, aq as FilterImpact, ag as GeneratorContext, G as GeneratorResult, ap as GeneratorSummary, $ as HYDRATION_MARKER_ID, a0 as HydrationMarker, a1 as NavigatorConstructor, ab as NavigatorRole, ac as NavigatorRoles, aa as Navigators, ar as PipelineForecaster, ao as PipelineRunReport, R as ReplanHints, j as ScheduledCard, t as SessionEloEvent, V as SessionStateSnapshot, u as SessionStateSnapshotProvider, K as SessionTrackingData, a8 as StrategyContribution, i as StudentClassroomDBInterface, h as StudyContentSource, P as StudySessionDoc, k as StudySessionFailedItem, l as StudySessionFailedNewItem, m as StudySessionFailedReviewItem, S as StudySessionItem, 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, F as UsrCrsDataInterface, au as computeDeviation, aw as computeEffectiveWeight, av as computeSpread, ax as createOrchestrationContext, an as drainCapturedRuns, ak as getActivePipeline, a9 as getCardOrigin, a3 as getRegisteredNavigator, a6 as getRegisteredNavigatorNames, a5 as getRegisteredNavigatorRole, am as getRunsForSession, r as getStudySource, a4 as hasRegisteredNavigator, a7 as initializeNavigatorRegistry, ae as isFilter, ad as isGenerator, p as isReview, X as makeStudySessionId, aj as mountPipelineDebugger, Y as newSessionId, ai as pipelineDebugAPI, a2 as registerNavigator, al as setDebugSessionId } from '../contentSource-D3c1fMAk.cjs';
3
- export { D as DataLayerProvider } from '../dataLayerProvider-CeLiFbHv.cjs';
4
- import { D as DocType, c as QuestionRecord, i as DocTypePrefixes, C as CardHistory, b as CardRecord } from '../types-legacy-CrwyZIvI.cjs';
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-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 { an as LearnableWeight, M as UserOutcomeRecord, ao as OrchestrationContext, W as WeightedCard, U as UserDBInterface, C as CourseDBInterface } from '../contentSource-DpQqTG3m.cjs';
3
+ export { K as ActivityRecord, a9 as CardGenerator, ab as CardGeneratorFactory, F as ClassroomRegistration, E as ClassroomRegistrationDesignation, H as ClassroomRegistrationDoc, k as ContentNavigationStrategyData, l as ContentNavigator, t as ContentSourceID, i as CourseInfo, L as CourseRegistration, c as CourseRegistrationDoc, a as CoursesDBInterface, al as FilterImpact, aa as GeneratorContext, G as GeneratorResult, ak as GeneratorSummary, T as HYDRATION_MARKER_ID, V as HydrationMarker, X as NavigatorConstructor, a5 as NavigatorRole, a6 as NavigatorRoles, a4 as Navigators, am as PipelineForecaster, ai as PipelineRunReport, R as ReplanHints, aj as RunReportCard, b as ScheduledCard, f as SessionEloEvent, d as SessionStateSnapshot, v as SessionStateSnapshotProvider, I as SessionTrackingData, a2 as StrategyContribution, m as StudyContentSource, S as StudySessionDoc, n as StudySessionFailedItem, o as StudySessionFailedNewItem, p as StudySessionFailedReviewItem, j as StudySessionItem, q as StudySessionNewItem, r as StudySessionReviewItem, g as StudySessionRunCard, h as StudySessionRunCardTrail, e as StudySessionRunSummary, J as UserConfig, A as UserCourseSetting, z as UserCourseSettings, y as UserDBAuthenticator, w as UserDBReader, x as UserDBWriter, P as UserHydrationState, Q as UserHydrationStatus, B as UsrCrsDataInterface, ap as computeDeviation, ar as computeEffectiveWeight, aq as computeSpread, as as createOrchestrationContext, ah as drainCapturedRuns, ae as getActivePipeline, a3 as getCardOrigin, Z as getRegisteredNavigator, a0 as getRegisteredNavigatorNames, $ as getRegisteredNavigatorRole, ag as getRunsForSession, u as getStudySource, _ as hasRegisteredNavigator, a1 as initializeNavigatorRegistry, a8 as isFilter, a7 as isGenerator, s as isReview, N as makeStudySessionId, ad as mountPipelineDebugger, O as newSessionId, ac as pipelineDebugAPI, Y as registerNavigator, af as setDebugSessionId } from '../contentSource-DpQqTG3m.cjs';
4
+ export { D as DataLayerProvider } from '../dataLayerProvider-Dl3cAAvQ.cjs';
5
+ import { D as DocType, Q as QuestionRecord, f as DocTypePrefixes, c as CardHistory, b as CardRecord } from '../types-legacy-BkOYOR6U.cjs';
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.cjs';
6
7
  import { DataShape, ParsedCard } from '@vue-skuilder/common';
7
8
  import 'moment';
8
9
 
@@ -1,8 +1,9 @@
1
- import { as as LearnableWeight, O as UserOutcomeRecord, at as OrchestrationContext, W as WeightedCard, U as UserDBInterface, 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, s as CourseRegistrationDoc, b as CoursesDBInterface, aq as FilterImpact, ag as GeneratorContext, G as GeneratorResult, ap as GeneratorSummary, $ as HYDRATION_MARKER_ID, a0 as HydrationMarker, a1 as NavigatorConstructor, ab as NavigatorRole, ac as NavigatorRoles, aa as Navigators, ar as PipelineForecaster, ao as PipelineRunReport, R as ReplanHints, j as ScheduledCard, t as SessionEloEvent, V as SessionStateSnapshot, u as SessionStateSnapshotProvider, K as SessionTrackingData, a8 as StrategyContribution, i as StudentClassroomDBInterface, h as StudyContentSource, P as StudySessionDoc, k as StudySessionFailedItem, l as StudySessionFailedNewItem, m as StudySessionFailedReviewItem, S as StudySessionItem, 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, F as UsrCrsDataInterface, au as computeDeviation, aw as computeEffectiveWeight, av as computeSpread, ax as createOrchestrationContext, an as drainCapturedRuns, ak as getActivePipeline, a9 as getCardOrigin, a3 as getRegisteredNavigator, a6 as getRegisteredNavigatorNames, a5 as getRegisteredNavigatorRole, am as getRunsForSession, r as getStudySource, a4 as hasRegisteredNavigator, a7 as initializeNavigatorRegistry, ae as isFilter, ad as isGenerator, p as isReview, X as makeStudySessionId, aj as mountPipelineDebugger, Y as newSessionId, ai as pipelineDebugAPI, a2 as registerNavigator, al as setDebugSessionId } from '../contentSource-LPf044hY.js';
3
- export { D as DataLayerProvider } from '../dataLayerProvider-DaAootVV.js';
4
- import { D as DocType, c as QuestionRecord, i as DocTypePrefixes, C as CardHistory, b as CardRecord } from '../types-legacy-CrwyZIvI.js';
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-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 { an as LearnableWeight, M as UserOutcomeRecord, ao as OrchestrationContext, W as WeightedCard, U as UserDBInterface, C as CourseDBInterface } from '../contentSource-BoFBwvYa.js';
3
+ export { K as ActivityRecord, a9 as CardGenerator, ab as CardGeneratorFactory, F as ClassroomRegistration, E as ClassroomRegistrationDesignation, H as ClassroomRegistrationDoc, k as ContentNavigationStrategyData, l as ContentNavigator, t as ContentSourceID, i as CourseInfo, L as CourseRegistration, c as CourseRegistrationDoc, a as CoursesDBInterface, al as FilterImpact, aa as GeneratorContext, G as GeneratorResult, ak as GeneratorSummary, T as HYDRATION_MARKER_ID, V as HydrationMarker, X as NavigatorConstructor, a5 as NavigatorRole, a6 as NavigatorRoles, a4 as Navigators, am as PipelineForecaster, ai as PipelineRunReport, R as ReplanHints, aj as RunReportCard, b as ScheduledCard, f as SessionEloEvent, d as SessionStateSnapshot, v as SessionStateSnapshotProvider, I as SessionTrackingData, a2 as StrategyContribution, m as StudyContentSource, S as StudySessionDoc, n as StudySessionFailedItem, o as StudySessionFailedNewItem, p as StudySessionFailedReviewItem, j as StudySessionItem, q as StudySessionNewItem, r as StudySessionReviewItem, g as StudySessionRunCard, h as StudySessionRunCardTrail, e as StudySessionRunSummary, J as UserConfig, A as UserCourseSetting, z as UserCourseSettings, y as UserDBAuthenticator, w as UserDBReader, x as UserDBWriter, P as UserHydrationState, Q as UserHydrationStatus, B as UsrCrsDataInterface, ap as computeDeviation, ar as computeEffectiveWeight, aq as computeSpread, as as createOrchestrationContext, ah as drainCapturedRuns, ae as getActivePipeline, a3 as getCardOrigin, Z as getRegisteredNavigator, a0 as getRegisteredNavigatorNames, $ as getRegisteredNavigatorRole, ag as getRunsForSession, u as getStudySource, _ as hasRegisteredNavigator, a1 as initializeNavigatorRegistry, a8 as isFilter, a7 as isGenerator, s as isReview, N as makeStudySessionId, ad as mountPipelineDebugger, O as newSessionId, ac as pipelineDebugAPI, Y as registerNavigator, af as setDebugSessionId } from '../contentSource-BoFBwvYa.js';
4
+ export { D as DataLayerProvider } from '../dataLayerProvider-D_LJT3F4.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