@vue-skuilder/db 0.2.23 → 0.2.24
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/{contentSource-BvOpKUeU.d.ts → contentSource-Z9lQOuu5.d.ts} +51 -1
- package/dist/{contentSource-DT9NaX69.d.cts → contentSource-jBskhS2Y.d.cts} +51 -1
- package/dist/core/index.d.cts +3 -3
- package/dist/core/index.d.ts +3 -3
- package/dist/core/index.js.map +1 -1
- package/dist/core/index.mjs.map +1 -1
- package/dist/{dataLayerProvider-CY2B2lyW.d.ts → dataLayerProvider-CvSh3KW-.d.ts} +1 -1
- package/dist/{dataLayerProvider-wY6s_4x9.d.cts → dataLayerProvider-DbA3d_Pd.d.cts} +1 -1
- package/dist/impl/couch/index.d.cts +2 -2
- package/dist/impl/couch/index.d.ts +2 -2
- package/dist/impl/couch/index.js.map +1 -1
- package/dist/impl/couch/index.mjs.map +1 -1
- package/dist/impl/static/index.d.cts +2 -2
- package/dist/impl/static/index.d.ts +2 -2
- package/dist/impl/static/index.js.map +1 -1
- package/dist/impl/static/index.mjs.map +1 -1
- package/dist/index.d.cts +32 -7
- package/dist/index.d.ts +32 -7
- package/dist/index.js +169 -43
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +169 -43
- package/dist/index.mjs.map +1 -1
- package/package.json +3 -3
- package/src/core/types/studySession.ts +42 -0
- package/src/study/SessionController.ts +24 -1
- package/src/study/services/EloService.ts +78 -5
- package/src/study/services/ResponseProcessor.ts +79 -27
|
@@ -813,6 +813,15 @@ interface StudySessionDoc {
|
|
|
813
813
|
};
|
|
814
814
|
/** Bootstrap run plus every replan, in execution order. */
|
|
815
815
|
runs?: StudySessionRunSummary[];
|
|
816
|
+
/**
|
|
817
|
+
* Per-response ELO exchanges, in the order they resolved. One entry per
|
|
818
|
+
* ELO-updating response (first attempt of a presentation; retries don't
|
|
819
|
+
* move ELO). Flushed at close from an in-memory log — so `open`/`abandoned`
|
|
820
|
+
* sessions that never reached the close write carry none, and a same-card
|
|
821
|
+
* event still in flight at close may be missing. Absent on sessions
|
|
822
|
+
* recorded before this shipped.
|
|
823
|
+
*/
|
|
824
|
+
eloEvents?: SessionEloEvent[];
|
|
816
825
|
finalHints?: ReplanHints | null;
|
|
817
826
|
stateAtStart?: SessionStateSnapshot;
|
|
818
827
|
stateAtEnd?: SessionStateSnapshot;
|
|
@@ -844,6 +853,47 @@ interface StudySessionRunSummary {
|
|
|
844
853
|
note: string;
|
|
845
854
|
};
|
|
846
855
|
}
|
|
856
|
+
/**
|
|
857
|
+
* One learner↔card ELO exchange, captured at the moment it resolved so a
|
|
858
|
+
* session can be read as an ELO ledger (why did 88% accuracy net -1?). The
|
|
859
|
+
* exchange is otherwise write-once-and-discard: only the updated aggregates
|
|
860
|
+
* survive on the user/card docs, and ELO is path-dependent, so a response's
|
|
861
|
+
* move can't be reconstructed after the fact. Joins to a `CardRecord` by
|
|
862
|
+
* `cardId` + nearest `at`.
|
|
863
|
+
*/
|
|
864
|
+
interface SessionEloEvent {
|
|
865
|
+
/** Card this exchange was for. */
|
|
866
|
+
cardId: string;
|
|
867
|
+
/** ISO time the exchange resolved (fires just after the response record). */
|
|
868
|
+
at: string;
|
|
869
|
+
/**
|
|
870
|
+
* Global performance in [0,1] that drove the update. Note this is the ELO
|
|
871
|
+
* `userScore`, not raw correctness: the numeric path maps a correct answer
|
|
872
|
+
* to `0.5 + performance/2` (so a plain correct is 1.0, a graded-correct
|
|
873
|
+
* less) and a miss to 0; the tagged path uses `_global`.
|
|
874
|
+
*/
|
|
875
|
+
userScore: number;
|
|
876
|
+
/** Learner global ELO before → after this response. */
|
|
877
|
+
global: {
|
|
878
|
+
before: number;
|
|
879
|
+
after: number;
|
|
880
|
+
};
|
|
881
|
+
/** Card global ELO before → after (absent if the card ELO was unreadable). */
|
|
882
|
+
card?: {
|
|
883
|
+
before: number;
|
|
884
|
+
after: number;
|
|
885
|
+
};
|
|
886
|
+
/**
|
|
887
|
+
* Per-tag learner ELO before → after, for every tag the exchange touched.
|
|
888
|
+
* `score` is the per-tag performance applied, or null for a count-only
|
|
889
|
+
* exposure tag (`gpc:expose:*`) that increments count without moving ELO.
|
|
890
|
+
*/
|
|
891
|
+
tags?: Record<string, {
|
|
892
|
+
before: number;
|
|
893
|
+
after: number;
|
|
894
|
+
score: number | null;
|
|
895
|
+
}>;
|
|
896
|
+
}
|
|
847
897
|
/**
|
|
848
898
|
* Host-defined learner state at a session boundary. Keep it thin — this is
|
|
849
899
|
* written on every session, and the deltas between consecutive snapshots are
|
|
@@ -1712,4 +1762,4 @@ interface StudyContentSource {
|
|
|
1712
1762
|
}
|
|
1713
1763
|
declare function getStudySource(source: ContentSourceID, user: UserDBInterface): Promise<StudyContentSource>;
|
|
1714
1764
|
|
|
1715
|
-
export {
|
|
1765
|
+
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, 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 };
|
|
@@ -813,6 +813,15 @@ interface StudySessionDoc {
|
|
|
813
813
|
};
|
|
814
814
|
/** Bootstrap run plus every replan, in execution order. */
|
|
815
815
|
runs?: StudySessionRunSummary[];
|
|
816
|
+
/**
|
|
817
|
+
* Per-response ELO exchanges, in the order they resolved. One entry per
|
|
818
|
+
* ELO-updating response (first attempt of a presentation; retries don't
|
|
819
|
+
* move ELO). Flushed at close from an in-memory log — so `open`/`abandoned`
|
|
820
|
+
* sessions that never reached the close write carry none, and a same-card
|
|
821
|
+
* event still in flight at close may be missing. Absent on sessions
|
|
822
|
+
* recorded before this shipped.
|
|
823
|
+
*/
|
|
824
|
+
eloEvents?: SessionEloEvent[];
|
|
816
825
|
finalHints?: ReplanHints | null;
|
|
817
826
|
stateAtStart?: SessionStateSnapshot;
|
|
818
827
|
stateAtEnd?: SessionStateSnapshot;
|
|
@@ -844,6 +853,47 @@ interface StudySessionRunSummary {
|
|
|
844
853
|
note: string;
|
|
845
854
|
};
|
|
846
855
|
}
|
|
856
|
+
/**
|
|
857
|
+
* One learner↔card ELO exchange, captured at the moment it resolved so a
|
|
858
|
+
* session can be read as an ELO ledger (why did 88% accuracy net -1?). The
|
|
859
|
+
* exchange is otherwise write-once-and-discard: only the updated aggregates
|
|
860
|
+
* survive on the user/card docs, and ELO is path-dependent, so a response's
|
|
861
|
+
* move can't be reconstructed after the fact. Joins to a `CardRecord` by
|
|
862
|
+
* `cardId` + nearest `at`.
|
|
863
|
+
*/
|
|
864
|
+
interface SessionEloEvent {
|
|
865
|
+
/** Card this exchange was for. */
|
|
866
|
+
cardId: string;
|
|
867
|
+
/** ISO time the exchange resolved (fires just after the response record). */
|
|
868
|
+
at: string;
|
|
869
|
+
/**
|
|
870
|
+
* Global performance in [0,1] that drove the update. Note this is the ELO
|
|
871
|
+
* `userScore`, not raw correctness: the numeric path maps a correct answer
|
|
872
|
+
* to `0.5 + performance/2` (so a plain correct is 1.0, a graded-correct
|
|
873
|
+
* less) and a miss to 0; the tagged path uses `_global`.
|
|
874
|
+
*/
|
|
875
|
+
userScore: number;
|
|
876
|
+
/** Learner global ELO before → after this response. */
|
|
877
|
+
global: {
|
|
878
|
+
before: number;
|
|
879
|
+
after: number;
|
|
880
|
+
};
|
|
881
|
+
/** Card global ELO before → after (absent if the card ELO was unreadable). */
|
|
882
|
+
card?: {
|
|
883
|
+
before: number;
|
|
884
|
+
after: number;
|
|
885
|
+
};
|
|
886
|
+
/**
|
|
887
|
+
* Per-tag learner ELO before → after, for every tag the exchange touched.
|
|
888
|
+
* `score` is the per-tag performance applied, or null for a count-only
|
|
889
|
+
* exposure tag (`gpc:expose:*`) that increments count without moving ELO.
|
|
890
|
+
*/
|
|
891
|
+
tags?: Record<string, {
|
|
892
|
+
before: number;
|
|
893
|
+
after: number;
|
|
894
|
+
score: number | null;
|
|
895
|
+
}>;
|
|
896
|
+
}
|
|
847
897
|
/**
|
|
848
898
|
* Host-defined learner state at a session boundary. Keep it thin — this is
|
|
849
899
|
* written on every session, and the deltas between consecutive snapshots are
|
|
@@ -1712,4 +1762,4 @@ interface StudyContentSource {
|
|
|
1712
1762
|
}
|
|
1713
1763
|
declare function getStudySource(source: ContentSourceID, user: UserDBInterface): Promise<StudyContentSource>;
|
|
1714
1764
|
|
|
1715
|
-
export {
|
|
1765
|
+
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, 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 };
|
package/dist/core/index.d.cts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export {
|
|
3
|
-
export { D as DataLayerProvider } from '../dataLayerProvider-
|
|
1
|
+
import { as as LearnableWeight, O as UserOutcomeRecord, at as OrchestrationContext, W as WeightedCard, U as UserDBInterface, C as CourseDBInterface } from '../contentSource-jBskhS2Y.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-jBskhS2Y.cjs';
|
|
3
|
+
export { D as DataLayerProvider } from '../dataLayerProvider-DbA3d_Pd.cjs';
|
|
4
4
|
import { D as DocType, c as QuestionRecord, i as DocTypePrefixes, C as CardHistory, b as CardRecord } from '../types-legacy-CrwyZIvI.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-CrwyZIvI.cjs';
|
|
6
6
|
import { DataShape, ParsedCard } from '@vue-skuilder/common';
|
package/dist/core/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export {
|
|
3
|
-
export { D as DataLayerProvider } from '../dataLayerProvider-
|
|
1
|
+
import { as as LearnableWeight, O as UserOutcomeRecord, at as OrchestrationContext, W as WeightedCard, U as UserDBInterface, C as CourseDBInterface } from '../contentSource-Z9lQOuu5.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-Z9lQOuu5.js';
|
|
3
|
+
export { D as DataLayerProvider } from '../dataLayerProvider-CvSh3KW-.js';
|
|
4
4
|
import { D as DocType, c as QuestionRecord, i as DocTypePrefixes, C as CardHistory, b as CardRecord } from '../types-legacy-CrwyZIvI.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-CrwyZIvI.js';
|
|
6
6
|
import { DataShape, ParsedCard } from '@vue-skuilder/common';
|