@vue-skuilder/db 0.2.27 → 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.
- package/dist/classroomDB-DLTtLZct.d.cts +86 -0
- package/dist/classroomDB-DLTtLZct.d.ts +86 -0
- package/dist/{contentSource-LPf044hY.d.ts → contentSource-BoFBwvYa.d.ts} +65 -98
- package/dist/{contentSource-D3c1fMAk.d.cts → contentSource-DpQqTG3m.d.cts} +65 -98
- package/dist/core/index.d.cts +6 -5
- package/dist/core/index.d.ts +6 -5
- package/dist/core/index.js +22 -2
- package/dist/core/index.js.map +1 -1
- package/dist/core/index.mjs +22 -2
- package/dist/core/index.mjs.map +1 -1
- package/dist/{dataLayerProvider-DaAootVV.d.ts → dataLayerProvider-D_LJT3F4.d.ts} +2 -8
- package/dist/{dataLayerProvider-CeLiFbHv.d.cts → dataLayerProvider-Dl3cAAvQ.d.cts} +2 -8
- package/dist/diagnostics/index.d.cts +370 -0
- package/dist/diagnostics/index.d.ts +370 -0
- package/dist/diagnostics/index.js +778 -0
- package/dist/diagnostics/index.js.map +1 -0
- package/dist/diagnostics/index.mjs +729 -0
- package/dist/diagnostics/index.mjs.map +1 -0
- package/dist/impl/couch/index.d.cts +4 -3
- package/dist/impl/couch/index.d.ts +4 -3
- package/dist/impl/couch/index.js +22 -2
- package/dist/impl/couch/index.js.map +1 -1
- package/dist/impl/couch/index.mjs +22 -2
- package/dist/impl/couch/index.mjs.map +1 -1
- package/dist/impl/static/index.d.cts +5 -5
- package/dist/impl/static/index.d.ts +5 -5
- package/dist/impl/static/index.js +22 -8
- package/dist/impl/static/index.js.map +1 -1
- package/dist/impl/static/index.mjs +22 -8
- package/dist/impl/static/index.mjs.map +1 -1
- package/dist/{index-BkBJlGDX.d.ts → index-CVGehe_t.d.ts} +1 -1
- package/dist/{index-D7WdMDAs.d.cts → index-Ktg72jKb.d.cts} +1 -1
- package/dist/index.d.cts +10 -9
- package/dist/index.d.ts +10 -9
- package/dist/index.js +64 -23
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +64 -23
- package/dist/index.mjs.map +1 -1
- package/dist/{types-DjiFOZxJ.d.cts → types-D0oQeJAi.d.cts} +1 -1
- package/dist/{types-uJ2Xn3_X.d.ts → types-dXWfyz9B.d.ts} +1 -1
- package/dist/{types-legacy-CrwyZIvI.d.cts → types-legacy-BkOYOR6U.d.cts} +1 -1
- package/dist/{types-legacy-CrwyZIvI.d.ts → types-legacy-BkOYOR6U.d.ts} +1 -1
- package/dist/util/packer/index.d.cts +3 -3
- package/dist/util/packer/index.d.ts +3 -3
- package/package.json +15 -3
- package/src/core/interfaces/dataLayerProvider.ts +3 -8
- package/src/core/navigators/Pipeline.ts +5 -2
- package/src/core/navigators/PipelineDebugger.ts +64 -16
- package/src/core/navigators/index.ts +1 -0
- package/src/core/types/studySession.ts +37 -0
- package/src/diagnostics/dataset.ts +231 -0
- package/src/diagnostics/derive.ts +555 -0
- package/src/diagnostics/index.ts +24 -0
- package/src/diagnostics/loader.ts +191 -0
- package/src/diagnostics/text.ts +242 -0
- package/src/impl/couch/PouchDataLayerProvider.ts +0 -23
- package/src/impl/static/StaticDataLayerProvider.ts +0 -11
- package/src/study/SessionController.ts +56 -2
- 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 {
|
|
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,
|
|
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:
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
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 {
|
|
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 {
|
|
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,
|
|
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:
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
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 {
|
|
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 };
|
package/dist/core/index.d.cts
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
export {
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
export { A as AdminDBInterface, d as AssignedCard, a as AssignedContent, c as AssignedCourse, b as AssignedTag, C as ClassroomDBInterface, S as StudentClassroomDBInterface, T as TeacherClassroomDBInterface } from '../classroomDB-DLTtLZct.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
|
|
package/dist/core/index.d.ts
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
export {
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
export { A as AdminDBInterface, d as AssignedCard, a as AssignedContent, c as AssignedCourse, b as AssignedTag, C as ClassroomDBInterface, S as StudentClassroomDBInterface, T as TeacherClassroomDBInterface } from '../classroomDB-DLTtLZct.js';
|
|
2
|
+
import { 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
|
|