@vue-skuilder/db 0.2.21 → 0.2.22
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-BMxsujRu.d.cts → contentSource-B1pqryv6.d.ts} +82 -2
- package/dist/{contentSource-Bazgkf4C.d.ts → contentSource-CpTxVrFx.d.cts} +82 -2
- package/dist/core/index.d.cts +16 -6
- package/dist/core/index.d.ts +16 -6
- package/dist/core/index.js +79 -4
- package/dist/core/index.js.map +1 -1
- package/dist/core/index.mjs +74 -4
- package/dist/core/index.mjs.map +1 -1
- package/dist/{dataLayerProvider-Bt-D6xas.d.ts → dataLayerProvider-BZqH27f4.d.ts} +1 -1
- package/dist/{dataLayerProvider-DifVCcIS.d.cts → dataLayerProvider-D4c7iUc_.d.cts} +1 -1
- package/dist/impl/couch/index.d.cts +3 -3
- package/dist/impl/couch/index.d.ts +3 -3
- package/dist/impl/couch/index.js +63 -4
- package/dist/impl/couch/index.js.map +1 -1
- package/dist/impl/couch/index.mjs +63 -4
- package/dist/impl/couch/index.mjs.map +1 -1
- package/dist/impl/static/index.d.cts +4 -4
- package/dist/impl/static/index.d.ts +4 -4
- package/dist/impl/static/index.js +63 -4
- package/dist/impl/static/index.js.map +1 -1
- package/dist/impl/static/index.mjs +63 -4
- package/dist/impl/static/index.mjs.map +1 -1
- package/dist/{index-k9NFHpS1.d.cts → index-DGApnUZ-.d.cts} +1 -1
- package/dist/{index-BLLT5BYE.d.ts → index-rmNIwnkV.d.ts} +1 -1
- package/dist/index.d.cts +51 -14
- package/dist/index.d.ts +51 -14
- package/dist/index.js +231 -12
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +226 -12
- package/dist/index.mjs.map +1 -1
- package/dist/{types-CHgpWQAY.d.ts → types-B-Y3aoi5.d.ts} +1 -1
- package/dist/{types-legacy-4tlwHnXo.d.cts → types-legacy-BytY5eAR.d.cts} +9 -1
- package/dist/{types-legacy-4tlwHnXo.d.ts → types-legacy-BytY5eAR.d.ts} +9 -1
- package/dist/{types-BFUa1pa3.d.cts → types-r6fyuWP2.d.cts} +1 -1
- package/dist/util/packer/index.d.cts +3 -3
- package/dist/util/packer/index.d.ts +3 -3
- package/package.json +3 -3
- package/src/core/index.ts +1 -0
- package/src/core/interfaces/userDB.ts +7 -0
- package/src/core/navigators/PipelineDebugger.ts +41 -1
- package/src/core/navigators/index.ts +3 -0
- package/src/core/types/studySession.ts +100 -0
- package/src/core/types/types-legacy.ts +8 -0
- package/src/impl/common/BaseUserDB.ts +36 -0
- package/src/study/SessionController.ts +179 -2
- package/src/study/SessionDebugger.ts +4 -3
- package/src/study/SessionOverlay.ts +1 -0
- package/src/study/services/ResponseProcessor.ts +32 -4
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { CourseConfig, ClassroomConfig, Status, SkuilderCourseData as SkuilderCourseData$1, CourseElo, DataShape, TagFilter } from '@vue-skuilder/common';
|
|
2
2
|
import { Moment } from 'moment';
|
|
3
|
-
import { S as SkuilderCourseData, b as DocTypePrefixes, D as DocType, Q as QualifiedCardID, T as TagStub, a as Tag, C as CardHistory, c as CardRecord } from './types-legacy-
|
|
3
|
+
import { S as SkuilderCourseData, b as DocTypePrefixes, D as DocType, Q as QualifiedCardID, T as TagStub, a as Tag, C as CardHistory, c as CardRecord } from './types-legacy-BytY5eAR.js';
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* Admin functionality
|
|
@@ -423,6 +423,82 @@ interface UserOutcomeRecord {
|
|
|
423
423
|
};
|
|
424
424
|
}
|
|
425
425
|
|
|
426
|
+
/**
|
|
427
|
+
* Durable per-sitting record. Join target for `CardRecord.sessionId`.
|
|
428
|
+
*
|
|
429
|
+
* Written twice: `open` at `prepareSession()`, overwritten at termination.
|
|
430
|
+
*/
|
|
431
|
+
interface StudySessionDoc {
|
|
432
|
+
/** `SESSION::{courseId}::{userId}::{sessionId}` */
|
|
433
|
+
_id: string;
|
|
434
|
+
_rev?: string;
|
|
435
|
+
docType: DocType.STUDY_SESSION;
|
|
436
|
+
sessionId: string;
|
|
437
|
+
courseId: string;
|
|
438
|
+
userId: string;
|
|
439
|
+
/** Session construction time, not first-card time. */
|
|
440
|
+
startTime: string;
|
|
441
|
+
endTime?: string;
|
|
442
|
+
/**
|
|
443
|
+
* `closed` — ran to natural termination.
|
|
444
|
+
* `abandoned` — host tore the study view down mid-session.
|
|
445
|
+
* `open` — never closed: tab closed, reload, crash. No tally or end state.
|
|
446
|
+
*/
|
|
447
|
+
status: 'open' | 'closed' | 'abandoned';
|
|
448
|
+
plannedSeconds: number;
|
|
449
|
+
config: {
|
|
450
|
+
defaultBatchLimit: number;
|
|
451
|
+
sourceCount: number;
|
|
452
|
+
initHints?: ReplanHints | null;
|
|
453
|
+
};
|
|
454
|
+
/** Queue depths after the bootstrap run, before the first draw. */
|
|
455
|
+
initialQueues: {
|
|
456
|
+
supplyQ: number;
|
|
457
|
+
failedQ: number;
|
|
458
|
+
};
|
|
459
|
+
tally?: {
|
|
460
|
+
/** Distinct cards; a re-presented failed card counts once. */
|
|
461
|
+
cardsPresented: number;
|
|
462
|
+
/** Total responses, including repeat attempts on one card. */
|
|
463
|
+
responses: number;
|
|
464
|
+
correct: number;
|
|
465
|
+
incorrect: number;
|
|
466
|
+
failedQRemaining: number;
|
|
467
|
+
secondsRemaining: number;
|
|
468
|
+
};
|
|
469
|
+
/** Bootstrap run plus every replan, in execution order. */
|
|
470
|
+
runs?: StudySessionRunSummary[];
|
|
471
|
+
finalHints?: ReplanHints | null;
|
|
472
|
+
stateAtStart?: SessionStateSnapshot;
|
|
473
|
+
stateAtEnd?: SessionStateSnapshot;
|
|
474
|
+
}
|
|
475
|
+
interface StudySessionRunSummary {
|
|
476
|
+
/** Joins to `PipelineRunReport.runId` while that run is still in memory. */
|
|
477
|
+
runId: string;
|
|
478
|
+
at: string;
|
|
479
|
+
/** `'bootstrap'`, a replan's label, or `'(auto)'`. */
|
|
480
|
+
label: string;
|
|
481
|
+
mode?: string;
|
|
482
|
+
generatedCount: number;
|
|
483
|
+
finalCount: number;
|
|
484
|
+
reviewsSelected: number;
|
|
485
|
+
newSelected: number;
|
|
486
|
+
}
|
|
487
|
+
/**
|
|
488
|
+
* Host-defined learner state at a session boundary. Keep it thin — this is
|
|
489
|
+
* written on every session, and the deltas between consecutive snapshots are
|
|
490
|
+
* what it's read for.
|
|
491
|
+
*/
|
|
492
|
+
type SessionStateSnapshot = Record<string, unknown>;
|
|
493
|
+
/**
|
|
494
|
+
* Invoked at session open and close. Errors and slow calls are absorbed by
|
|
495
|
+
* the controller.
|
|
496
|
+
*/
|
|
497
|
+
type SessionStateSnapshotProvider = (phase: 'start' | 'end') => SessionStateSnapshot | Promise<SessionStateSnapshot>;
|
|
498
|
+
/** Stable across the open and close writes, unlike a timestamp-keyed id. */
|
|
499
|
+
declare function makeStudySessionId(courseId: string, userId: string, sessionId: string): string;
|
|
500
|
+
declare function newSessionId(): string;
|
|
501
|
+
|
|
426
502
|
/**
|
|
427
503
|
* User database hydration.
|
|
428
504
|
*
|
|
@@ -568,6 +644,8 @@ interface UserDBReader {
|
|
|
568
644
|
* Get user's pending reviews
|
|
569
645
|
*/
|
|
570
646
|
getPendingReviews(courseId?: string): Promise<ScheduledCard[]>;
|
|
647
|
+
/** Study-session records for a course, newest session-start first. */
|
|
648
|
+
getStudySessions(courseId?: string): Promise<StudySessionDoc[]>;
|
|
571
649
|
/**
|
|
572
650
|
* Get all scheduled reviews due within the next `daysCount` days —
|
|
573
651
|
* including ones not yet due. `getPendingReviews` is the `daysCount = 0`
|
|
@@ -686,6 +764,8 @@ interface UserDBWriter extends DocumentUpdater {
|
|
|
686
764
|
* Record a user learning outcome for evolutionary orchestration.
|
|
687
765
|
*/
|
|
688
766
|
putUserOutcome(record: UserOutcomeRecord): Promise<void>;
|
|
767
|
+
/** Write or overwrite a study-session record. */
|
|
768
|
+
putStudySession(doc: StudySessionDoc): Promise<void>;
|
|
689
769
|
}
|
|
690
770
|
/**
|
|
691
771
|
* Authentication and account management operations
|
|
@@ -1349,4 +1429,4 @@ interface StudyContentSource {
|
|
|
1349
1429
|
}
|
|
1350
1430
|
declare function getStudySource(source: ContentSourceID, user: UserDBInterface): Promise<StudyContentSource>;
|
|
1351
1431
|
|
|
1352
|
-
export {
|
|
1432
|
+
export { type HydrationMarker as $, type AdminDBInterface as A, type UserCourseSetting as B, type CourseDBInterface as C, type DataLayerResult as D, type UsrCrsDataInterface as E, type ClassroomRegistrationDesignation as F, type GeneratorResult as G, type ClassroomRegistration as H, type ClassroomRegistrationDoc as I, type SessionTrackingData as J, type UserConfig as K, type ActivityRecord as L, type CourseRegistration as M, type UserOutcomeRecord as N, type StudySessionDoc as O, type StudySessionRunSummary as P, type SessionStateSnapshot as Q, type ReplanHints as R, type StudySessionItem as S, type TeacherClassroomDBInterface as T, type UserDBInterface as U, makeStudySessionId as V, type WeightedCard as W, newSessionId as X, type UserHydrationState as Y, type UserHydrationStatus as Z, HYDRATION_MARKER_ID as _, type UserDBReader as a, type NavigatorConstructor as a0, registerNavigator as a1, getRegisteredNavigator as a2, hasRegisteredNavigator as a3, getRegisteredNavigatorRole as a4, getRegisteredNavigatorNames as a5, initializeNavigatorRegistry as a6, type StrategyContribution as a7, getCardOrigin as a8, Navigators as a9, NavigatorRole as aa, NavigatorRoles as ab, isGenerator as ac, isFilter as ad, type CardGenerator as ae, type GeneratorContext as af, type CardGeneratorFactory as ag, type LearnableWeight as ah, type OrchestrationContext as ai, computeDeviation as aj, computeSpread as ak, computeEffectiveWeight as al, createOrchestrationContext as am, type DocumentUpdater as an, newInterval as ao, 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 SessionStateSnapshotProvider as t, type AssignedTag as u, type AssignedCourse as v, type AssignedCard as w, type UserDBWriter as x, type UserDBAuthenticator as y, type UserCourseSettings as z };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { CourseConfig, ClassroomConfig, Status, SkuilderCourseData as SkuilderCourseData$1, CourseElo, DataShape, TagFilter } from '@vue-skuilder/common';
|
|
2
2
|
import { Moment } from 'moment';
|
|
3
|
-
import { S as SkuilderCourseData, b as DocTypePrefixes, D as DocType, Q as QualifiedCardID, T as TagStub, a as Tag, C as CardHistory, c as CardRecord } from './types-legacy-
|
|
3
|
+
import { S as SkuilderCourseData, b as DocTypePrefixes, D as DocType, Q as QualifiedCardID, T as TagStub, a as Tag, C as CardHistory, c as CardRecord } from './types-legacy-BytY5eAR.cjs';
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* Admin functionality
|
|
@@ -423,6 +423,82 @@ interface UserOutcomeRecord {
|
|
|
423
423
|
};
|
|
424
424
|
}
|
|
425
425
|
|
|
426
|
+
/**
|
|
427
|
+
* Durable per-sitting record. Join target for `CardRecord.sessionId`.
|
|
428
|
+
*
|
|
429
|
+
* Written twice: `open` at `prepareSession()`, overwritten at termination.
|
|
430
|
+
*/
|
|
431
|
+
interface StudySessionDoc {
|
|
432
|
+
/** `SESSION::{courseId}::{userId}::{sessionId}` */
|
|
433
|
+
_id: string;
|
|
434
|
+
_rev?: string;
|
|
435
|
+
docType: DocType.STUDY_SESSION;
|
|
436
|
+
sessionId: string;
|
|
437
|
+
courseId: string;
|
|
438
|
+
userId: string;
|
|
439
|
+
/** Session construction time, not first-card time. */
|
|
440
|
+
startTime: string;
|
|
441
|
+
endTime?: string;
|
|
442
|
+
/**
|
|
443
|
+
* `closed` — ran to natural termination.
|
|
444
|
+
* `abandoned` — host tore the study view down mid-session.
|
|
445
|
+
* `open` — never closed: tab closed, reload, crash. No tally or end state.
|
|
446
|
+
*/
|
|
447
|
+
status: 'open' | 'closed' | 'abandoned';
|
|
448
|
+
plannedSeconds: number;
|
|
449
|
+
config: {
|
|
450
|
+
defaultBatchLimit: number;
|
|
451
|
+
sourceCount: number;
|
|
452
|
+
initHints?: ReplanHints | null;
|
|
453
|
+
};
|
|
454
|
+
/** Queue depths after the bootstrap run, before the first draw. */
|
|
455
|
+
initialQueues: {
|
|
456
|
+
supplyQ: number;
|
|
457
|
+
failedQ: number;
|
|
458
|
+
};
|
|
459
|
+
tally?: {
|
|
460
|
+
/** Distinct cards; a re-presented failed card counts once. */
|
|
461
|
+
cardsPresented: number;
|
|
462
|
+
/** Total responses, including repeat attempts on one card. */
|
|
463
|
+
responses: number;
|
|
464
|
+
correct: number;
|
|
465
|
+
incorrect: number;
|
|
466
|
+
failedQRemaining: number;
|
|
467
|
+
secondsRemaining: number;
|
|
468
|
+
};
|
|
469
|
+
/** Bootstrap run plus every replan, in execution order. */
|
|
470
|
+
runs?: StudySessionRunSummary[];
|
|
471
|
+
finalHints?: ReplanHints | null;
|
|
472
|
+
stateAtStart?: SessionStateSnapshot;
|
|
473
|
+
stateAtEnd?: SessionStateSnapshot;
|
|
474
|
+
}
|
|
475
|
+
interface StudySessionRunSummary {
|
|
476
|
+
/** Joins to `PipelineRunReport.runId` while that run is still in memory. */
|
|
477
|
+
runId: string;
|
|
478
|
+
at: string;
|
|
479
|
+
/** `'bootstrap'`, a replan's label, or `'(auto)'`. */
|
|
480
|
+
label: string;
|
|
481
|
+
mode?: string;
|
|
482
|
+
generatedCount: number;
|
|
483
|
+
finalCount: number;
|
|
484
|
+
reviewsSelected: number;
|
|
485
|
+
newSelected: number;
|
|
486
|
+
}
|
|
487
|
+
/**
|
|
488
|
+
* Host-defined learner state at a session boundary. Keep it thin — this is
|
|
489
|
+
* written on every session, and the deltas between consecutive snapshots are
|
|
490
|
+
* what it's read for.
|
|
491
|
+
*/
|
|
492
|
+
type SessionStateSnapshot = Record<string, unknown>;
|
|
493
|
+
/**
|
|
494
|
+
* Invoked at session open and close. Errors and slow calls are absorbed by
|
|
495
|
+
* the controller.
|
|
496
|
+
*/
|
|
497
|
+
type SessionStateSnapshotProvider = (phase: 'start' | 'end') => SessionStateSnapshot | Promise<SessionStateSnapshot>;
|
|
498
|
+
/** Stable across the open and close writes, unlike a timestamp-keyed id. */
|
|
499
|
+
declare function makeStudySessionId(courseId: string, userId: string, sessionId: string): string;
|
|
500
|
+
declare function newSessionId(): string;
|
|
501
|
+
|
|
426
502
|
/**
|
|
427
503
|
* User database hydration.
|
|
428
504
|
*
|
|
@@ -568,6 +644,8 @@ interface UserDBReader {
|
|
|
568
644
|
* Get user's pending reviews
|
|
569
645
|
*/
|
|
570
646
|
getPendingReviews(courseId?: string): Promise<ScheduledCard[]>;
|
|
647
|
+
/** Study-session records for a course, newest session-start first. */
|
|
648
|
+
getStudySessions(courseId?: string): Promise<StudySessionDoc[]>;
|
|
571
649
|
/**
|
|
572
650
|
* Get all scheduled reviews due within the next `daysCount` days —
|
|
573
651
|
* including ones not yet due. `getPendingReviews` is the `daysCount = 0`
|
|
@@ -686,6 +764,8 @@ interface UserDBWriter extends DocumentUpdater {
|
|
|
686
764
|
* Record a user learning outcome for evolutionary orchestration.
|
|
687
765
|
*/
|
|
688
766
|
putUserOutcome(record: UserOutcomeRecord): Promise<void>;
|
|
767
|
+
/** Write or overwrite a study-session record. */
|
|
768
|
+
putStudySession(doc: StudySessionDoc): Promise<void>;
|
|
689
769
|
}
|
|
690
770
|
/**
|
|
691
771
|
* Authentication and account management operations
|
|
@@ -1349,4 +1429,4 @@ interface StudyContentSource {
|
|
|
1349
1429
|
}
|
|
1350
1430
|
declare function getStudySource(source: ContentSourceID, user: UserDBInterface): Promise<StudyContentSource>;
|
|
1351
1431
|
|
|
1352
|
-
export {
|
|
1432
|
+
export { type HydrationMarker as $, type AdminDBInterface as A, type UserCourseSetting as B, type CourseDBInterface as C, type DataLayerResult as D, type UsrCrsDataInterface as E, type ClassroomRegistrationDesignation as F, type GeneratorResult as G, type ClassroomRegistration as H, type ClassroomRegistrationDoc as I, type SessionTrackingData as J, type UserConfig as K, type ActivityRecord as L, type CourseRegistration as M, type UserOutcomeRecord as N, type StudySessionDoc as O, type StudySessionRunSummary as P, type SessionStateSnapshot as Q, type ReplanHints as R, type StudySessionItem as S, type TeacherClassroomDBInterface as T, type UserDBInterface as U, makeStudySessionId as V, type WeightedCard as W, newSessionId as X, type UserHydrationState as Y, type UserHydrationStatus as Z, HYDRATION_MARKER_ID as _, type UserDBReader as a, type NavigatorConstructor as a0, registerNavigator as a1, getRegisteredNavigator as a2, hasRegisteredNavigator as a3, getRegisteredNavigatorRole as a4, getRegisteredNavigatorNames as a5, initializeNavigatorRegistry as a6, type StrategyContribution as a7, getCardOrigin as a8, Navigators as a9, NavigatorRole as aa, NavigatorRoles as ab, isGenerator as ac, isFilter as ad, type CardGenerator as ae, type GeneratorContext as af, type CardGeneratorFactory as ag, type LearnableWeight as ah, type OrchestrationContext as ai, computeDeviation as aj, computeSpread as ak, computeEffectiveWeight as al, createOrchestrationContext as am, type DocumentUpdater as an, newInterval as ao, 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 SessionStateSnapshotProvider as t, type AssignedTag as u, type AssignedCourse as v, type AssignedCard as w, type UserDBWriter as x, type UserDBAuthenticator as y, type UserCourseSettings as z };
|
package/dist/core/index.d.cts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export {
|
|
3
|
-
export { D as DataLayerProvider } from '../dataLayerProvider-
|
|
4
|
-
import { D as DocType, d as QuestionRecord, b as DocTypePrefixes, C as CardHistory, c as CardRecord } from '../types-legacy-
|
|
5
|
-
export { e as CardData, f as CourseListData, h as DataShapeData, g as DisplayableData, F as Field, G as GuestUsername, Q as QualifiedCardID, i as QuestionData, S as SkuilderCourseData, a as Tag, T as TagStub, l as log } from '../types-legacy-
|
|
1
|
+
import { ah as LearnableWeight, N as UserOutcomeRecord, ai as OrchestrationContext, W as WeightedCard, U as UserDBInterface, C as CourseDBInterface, R as ReplanHints, a7 as StrategyContribution } from '../contentSource-CpTxVrFx.cjs';
|
|
2
|
+
export { L as ActivityRecord, A as AdminDBInterface, w as AssignedCard, g as AssignedContent, v as AssignedCourse, u as AssignedTag, ae as CardGenerator, ag as CardGeneratorFactory, c as ClassroomDBInterface, H as ClassroomRegistration, F as ClassroomRegistrationDesignation, I as ClassroomRegistrationDoc, e as ContentNavigationStrategyData, f as ContentNavigator, q as ContentSourceID, d as CourseInfo, M as CourseRegistration, s as CourseRegistrationDoc, b as CoursesDBInterface, af as GeneratorContext, G as GeneratorResult, _ as HYDRATION_MARKER_ID, $ as HydrationMarker, a0 as NavigatorConstructor, aa as NavigatorRole, ab as NavigatorRoles, a9 as Navigators, j as ScheduledCard, Q as SessionStateSnapshot, t as SessionStateSnapshotProvider, J as SessionTrackingData, i as StudentClassroomDBInterface, h as StudyContentSource, O as StudySessionDoc, k as StudySessionFailedItem, l as StudySessionFailedNewItem, m as StudySessionFailedReviewItem, S as StudySessionItem, n as StudySessionNewItem, o as StudySessionReviewItem, P as StudySessionRunSummary, T as TeacherClassroomDBInterface, K as UserConfig, B as UserCourseSetting, z as UserCourseSettings, y as UserDBAuthenticator, a as UserDBReader, x as UserDBWriter, Y as UserHydrationState, Z as UserHydrationStatus, E as UsrCrsDataInterface, aj as computeDeviation, al as computeEffectiveWeight, ak as computeSpread, am as createOrchestrationContext, a8 as getCardOrigin, a2 as getRegisteredNavigator, a5 as getRegisteredNavigatorNames, a4 as getRegisteredNavigatorRole, r as getStudySource, a3 as hasRegisteredNavigator, a6 as initializeNavigatorRegistry, ad as isFilter, ac as isGenerator, p as isReview, V as makeStudySessionId, X as newSessionId, a1 as registerNavigator } from '../contentSource-CpTxVrFx.cjs';
|
|
3
|
+
export { D as DataLayerProvider } from '../dataLayerProvider-D4c7iUc_.cjs';
|
|
4
|
+
import { D as DocType, d as QuestionRecord, b as DocTypePrefixes, C as CardHistory, c as CardRecord } from '../types-legacy-BytY5eAR.cjs';
|
|
5
|
+
export { e as CardData, f as CourseListData, h as DataShapeData, g as DisplayableData, F as Field, G as GuestUsername, Q as QualifiedCardID, i as QuestionData, S as SkuilderCourseData, a as Tag, T as TagStub, l as log } from '../types-legacy-BytY5eAR.cjs';
|
|
6
6
|
import { DataShape, ParsedCard } from '@vue-skuilder/common';
|
|
7
7
|
import 'moment';
|
|
8
8
|
|
|
@@ -496,6 +496,8 @@ interface FilterImpact {
|
|
|
496
496
|
*/
|
|
497
497
|
interface PipelineRunReport {
|
|
498
498
|
runId: string;
|
|
499
|
+
/** Absent for runs fired outside a session (forecasts, editor probes). */
|
|
500
|
+
sessionId?: string;
|
|
499
501
|
timestamp: Date;
|
|
500
502
|
courseId: string;
|
|
501
503
|
courseName?: string;
|
|
@@ -555,6 +557,14 @@ interface PipelineRunReport {
|
|
|
555
557
|
note: string;
|
|
556
558
|
};
|
|
557
559
|
}
|
|
560
|
+
declare function setDebugSessionId(sessionId: string | undefined): void;
|
|
561
|
+
/** Take and clear the runs captured since the previous call, in execution order. */
|
|
562
|
+
declare function drainCapturedRuns(): PipelineRunReport[];
|
|
563
|
+
/**
|
|
564
|
+
* Runs for `sessionId`, oldest first. Bounded by {@link MAX_RUNS} — the
|
|
565
|
+
* complete record is `StudySessionDoc.runs`.
|
|
566
|
+
*/
|
|
567
|
+
declare function getRunsForSession(sessionId: string): PipelineRunReport[];
|
|
558
568
|
/**
|
|
559
569
|
* Console API object exposed on window.skuilder.pipeline
|
|
560
570
|
*/
|
|
@@ -852,4 +862,4 @@ declare const userDBDebugAPI: {
|
|
|
852
862
|
*/
|
|
853
863
|
declare function mountUserDBDebugger(): void;
|
|
854
864
|
|
|
855
|
-
export { type BulkCardProcessorConfig, type CardFilter, type CardFilterFactory, CardHistory, CardRecord, CourseDBInterface, DIVERSITY_FLOOR, DIVERSITY_STRENGTH, type DiversityRerankOptions, DocType, DocTypePrefixes, type FilterContext, type FilterImpact, type GeneratorSummary, type GradientObservation, type GradientResult, type ImportResult, LearnableWeight, Loggable, OrchestrationContext, type PeriodUpdateInput, type PeriodUpdateResult, type PipelineForecaster, type PipelineRunReport, type PressureGaugeDebug, QuestionRecord, ReplanHints, type SignalConfig, type SrsBacklogDebug, StrategyContribution, type StrategyLearningState, type StrategyPressureDebug, type StrategyStateDoc, type StrategyStateId, UserDBInterface, UserOutcomeRecord, WeightedCard, aggregateOutcomesForGradient, areQuestionRecords, buildStrategyStateId, captureStrategyPressure, clearSrsBacklogDebug, clearStrategyPressureDebug, computeOutcomeSignal, computeStrategyGradient, diversityRerank, docIsDeleted, getActivePipeline, getCardHistoryID, getDefaultLearnableWeight, getSrsBacklogDebug, getStrategyPressureDebug, importParsedCards, isQuestionRecord, mountPipelineDebugger, mountUserDBDebugger, parseCardHistoryID, pipelineDebugAPI, recordUserOutcome, runPeriodUpdate, scoreAccuracyInZone, updateLearningState, updateStrategyWeight, userDBDebugAPI, validateProcessorConfig };
|
|
865
|
+
export { type BulkCardProcessorConfig, type CardFilter, type CardFilterFactory, CardHistory, CardRecord, CourseDBInterface, DIVERSITY_FLOOR, DIVERSITY_STRENGTH, type DiversityRerankOptions, DocType, DocTypePrefixes, type FilterContext, type FilterImpact, type GeneratorSummary, type GradientObservation, type GradientResult, type ImportResult, LearnableWeight, Loggable, OrchestrationContext, type PeriodUpdateInput, type PeriodUpdateResult, type PipelineForecaster, type PipelineRunReport, type PressureGaugeDebug, QuestionRecord, ReplanHints, type SignalConfig, type SrsBacklogDebug, StrategyContribution, type StrategyLearningState, type StrategyPressureDebug, type StrategyStateDoc, type StrategyStateId, UserDBInterface, UserOutcomeRecord, WeightedCard, aggregateOutcomesForGradient, areQuestionRecords, buildStrategyStateId, captureStrategyPressure, clearSrsBacklogDebug, clearStrategyPressureDebug, computeOutcomeSignal, computeStrategyGradient, diversityRerank, docIsDeleted, drainCapturedRuns, getActivePipeline, getCardHistoryID, getDefaultLearnableWeight, getRunsForSession, getSrsBacklogDebug, getStrategyPressureDebug, importParsedCards, isQuestionRecord, mountPipelineDebugger, mountUserDBDebugger, parseCardHistoryID, pipelineDebugAPI, recordUserOutcome, runPeriodUpdate, scoreAccuracyInZone, setDebugSessionId, updateLearningState, updateStrategyWeight, userDBDebugAPI, validateProcessorConfig };
|
package/dist/core/index.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export {
|
|
3
|
-
export { D as DataLayerProvider } from '../dataLayerProvider-
|
|
4
|
-
import { D as DocType, d as QuestionRecord, b as DocTypePrefixes, C as CardHistory, c as CardRecord } from '../types-legacy-
|
|
5
|
-
export { e as CardData, f as CourseListData, h as DataShapeData, g as DisplayableData, F as Field, G as GuestUsername, Q as QualifiedCardID, i as QuestionData, S as SkuilderCourseData, a as Tag, T as TagStub, l as log } from '../types-legacy-
|
|
1
|
+
import { ah as LearnableWeight, N as UserOutcomeRecord, ai as OrchestrationContext, W as WeightedCard, U as UserDBInterface, C as CourseDBInterface, R as ReplanHints, a7 as StrategyContribution } from '../contentSource-B1pqryv6.js';
|
|
2
|
+
export { L as ActivityRecord, A as AdminDBInterface, w as AssignedCard, g as AssignedContent, v as AssignedCourse, u as AssignedTag, ae as CardGenerator, ag as CardGeneratorFactory, c as ClassroomDBInterface, H as ClassroomRegistration, F as ClassroomRegistrationDesignation, I as ClassroomRegistrationDoc, e as ContentNavigationStrategyData, f as ContentNavigator, q as ContentSourceID, d as CourseInfo, M as CourseRegistration, s as CourseRegistrationDoc, b as CoursesDBInterface, af as GeneratorContext, G as GeneratorResult, _ as HYDRATION_MARKER_ID, $ as HydrationMarker, a0 as NavigatorConstructor, aa as NavigatorRole, ab as NavigatorRoles, a9 as Navigators, j as ScheduledCard, Q as SessionStateSnapshot, t as SessionStateSnapshotProvider, J as SessionTrackingData, i as StudentClassroomDBInterface, h as StudyContentSource, O as StudySessionDoc, k as StudySessionFailedItem, l as StudySessionFailedNewItem, m as StudySessionFailedReviewItem, S as StudySessionItem, n as StudySessionNewItem, o as StudySessionReviewItem, P as StudySessionRunSummary, T as TeacherClassroomDBInterface, K as UserConfig, B as UserCourseSetting, z as UserCourseSettings, y as UserDBAuthenticator, a as UserDBReader, x as UserDBWriter, Y as UserHydrationState, Z as UserHydrationStatus, E as UsrCrsDataInterface, aj as computeDeviation, al as computeEffectiveWeight, ak as computeSpread, am as createOrchestrationContext, a8 as getCardOrigin, a2 as getRegisteredNavigator, a5 as getRegisteredNavigatorNames, a4 as getRegisteredNavigatorRole, r as getStudySource, a3 as hasRegisteredNavigator, a6 as initializeNavigatorRegistry, ad as isFilter, ac as isGenerator, p as isReview, V as makeStudySessionId, X as newSessionId, a1 as registerNavigator } from '../contentSource-B1pqryv6.js';
|
|
3
|
+
export { D as DataLayerProvider } from '../dataLayerProvider-BZqH27f4.js';
|
|
4
|
+
import { D as DocType, d as QuestionRecord, b as DocTypePrefixes, C as CardHistory, c as CardRecord } from '../types-legacy-BytY5eAR.js';
|
|
5
|
+
export { e as CardData, f as CourseListData, h as DataShapeData, g as DisplayableData, F as Field, G as GuestUsername, Q as QualifiedCardID, i as QuestionData, S as SkuilderCourseData, a as Tag, T as TagStub, l as log } from '../types-legacy-BytY5eAR.js';
|
|
6
6
|
import { DataShape, ParsedCard } from '@vue-skuilder/common';
|
|
7
7
|
import 'moment';
|
|
8
8
|
|
|
@@ -496,6 +496,8 @@ interface FilterImpact {
|
|
|
496
496
|
*/
|
|
497
497
|
interface PipelineRunReport {
|
|
498
498
|
runId: string;
|
|
499
|
+
/** Absent for runs fired outside a session (forecasts, editor probes). */
|
|
500
|
+
sessionId?: string;
|
|
499
501
|
timestamp: Date;
|
|
500
502
|
courseId: string;
|
|
501
503
|
courseName?: string;
|
|
@@ -555,6 +557,14 @@ interface PipelineRunReport {
|
|
|
555
557
|
note: string;
|
|
556
558
|
};
|
|
557
559
|
}
|
|
560
|
+
declare function setDebugSessionId(sessionId: string | undefined): void;
|
|
561
|
+
/** Take and clear the runs captured since the previous call, in execution order. */
|
|
562
|
+
declare function drainCapturedRuns(): PipelineRunReport[];
|
|
563
|
+
/**
|
|
564
|
+
* Runs for `sessionId`, oldest first. Bounded by {@link MAX_RUNS} — the
|
|
565
|
+
* complete record is `StudySessionDoc.runs`.
|
|
566
|
+
*/
|
|
567
|
+
declare function getRunsForSession(sessionId: string): PipelineRunReport[];
|
|
558
568
|
/**
|
|
559
569
|
* Console API object exposed on window.skuilder.pipeline
|
|
560
570
|
*/
|
|
@@ -852,4 +862,4 @@ declare const userDBDebugAPI: {
|
|
|
852
862
|
*/
|
|
853
863
|
declare function mountUserDBDebugger(): void;
|
|
854
864
|
|
|
855
|
-
export { type BulkCardProcessorConfig, type CardFilter, type CardFilterFactory, CardHistory, CardRecord, CourseDBInterface, DIVERSITY_FLOOR, DIVERSITY_STRENGTH, type DiversityRerankOptions, DocType, DocTypePrefixes, type FilterContext, type FilterImpact, type GeneratorSummary, type GradientObservation, type GradientResult, type ImportResult, LearnableWeight, Loggable, OrchestrationContext, type PeriodUpdateInput, type PeriodUpdateResult, type PipelineForecaster, type PipelineRunReport, type PressureGaugeDebug, QuestionRecord, ReplanHints, type SignalConfig, type SrsBacklogDebug, StrategyContribution, type StrategyLearningState, type StrategyPressureDebug, type StrategyStateDoc, type StrategyStateId, UserDBInterface, UserOutcomeRecord, WeightedCard, aggregateOutcomesForGradient, areQuestionRecords, buildStrategyStateId, captureStrategyPressure, clearSrsBacklogDebug, clearStrategyPressureDebug, computeOutcomeSignal, computeStrategyGradient, diversityRerank, docIsDeleted, getActivePipeline, getCardHistoryID, getDefaultLearnableWeight, getSrsBacklogDebug, getStrategyPressureDebug, importParsedCards, isQuestionRecord, mountPipelineDebugger, mountUserDBDebugger, parseCardHistoryID, pipelineDebugAPI, recordUserOutcome, runPeriodUpdate, scoreAccuracyInZone, updateLearningState, updateStrategyWeight, userDBDebugAPI, validateProcessorConfig };
|
|
865
|
+
export { type BulkCardProcessorConfig, type CardFilter, type CardFilterFactory, CardHistory, CardRecord, CourseDBInterface, DIVERSITY_FLOOR, DIVERSITY_STRENGTH, type DiversityRerankOptions, DocType, DocTypePrefixes, type FilterContext, type FilterImpact, type GeneratorSummary, type GradientObservation, type GradientResult, type ImportResult, LearnableWeight, Loggable, OrchestrationContext, type PeriodUpdateInput, type PeriodUpdateResult, type PipelineForecaster, type PipelineRunReport, type PressureGaugeDebug, QuestionRecord, ReplanHints, type SignalConfig, type SrsBacklogDebug, StrategyContribution, type StrategyLearningState, type StrategyPressureDebug, type StrategyStateDoc, type StrategyStateId, UserDBInterface, UserOutcomeRecord, WeightedCard, aggregateOutcomesForGradient, areQuestionRecords, buildStrategyStateId, captureStrategyPressure, clearSrsBacklogDebug, clearStrategyPressureDebug, computeOutcomeSignal, computeStrategyGradient, diversityRerank, docIsDeleted, drainCapturedRuns, getActivePipeline, getCardHistoryID, getDefaultLearnableWeight, getRunsForSession, getSrsBacklogDebug, getStrategyPressureDebug, importParsedCards, isQuestionRecord, mountPipelineDebugger, mountUserDBDebugger, parseCardHistoryID, pipelineDebugAPI, recordUserOutcome, runPeriodUpdate, scoreAccuracyInZone, setDebugSessionId, updateLearningState, updateStrategyWeight, userDBDebugAPI, validateProcessorConfig };
|
package/dist/core/index.js
CHANGED
|
@@ -125,6 +125,7 @@ var init_types_legacy = __esm({
|
|
|
125
125
|
DocType2["STRATEGY_STATE"] = "STRATEGY_STATE";
|
|
126
126
|
DocType2["USER_OUTCOME"] = "USER_OUTCOME";
|
|
127
127
|
DocType2["STRATEGY_LEARNING_STATE"] = "STRATEGY_LEARNING_STATE";
|
|
128
|
+
DocType2["STUDY_SESSION"] = "STUDY_SESSION";
|
|
128
129
|
return DocType2;
|
|
129
130
|
})(DocType || {});
|
|
130
131
|
DocTypePrefixes = {
|
|
@@ -141,7 +142,8 @@ var init_types_legacy = __esm({
|
|
|
141
142
|
["NAVIGATION_STRATEGY" /* NAVIGATION_STRATEGY */]: "NAVIGATION_STRATEGY",
|
|
142
143
|
["STRATEGY_STATE" /* STRATEGY_STATE */]: "STRATEGY_STATE",
|
|
143
144
|
["USER_OUTCOME" /* USER_OUTCOME */]: "USER_OUTCOME",
|
|
144
|
-
["STRATEGY_LEARNING_STATE" /* STRATEGY_LEARNING_STATE */]: "STRATEGY_LEARNING_STATE"
|
|
145
|
+
["STRATEGY_LEARNING_STATE" /* STRATEGY_LEARNING_STATE */]: "STRATEGY_LEARNING_STATE",
|
|
146
|
+
["STUDY_SESSION" /* STUDY_SESSION */]: "SESSION"
|
|
145
147
|
};
|
|
146
148
|
}
|
|
147
149
|
});
|
|
@@ -817,10 +819,13 @@ __export(PipelineDebugger_exports, {
|
|
|
817
819
|
buildRunReport: () => buildRunReport,
|
|
818
820
|
captureRun: () => captureRun,
|
|
819
821
|
clearRunHistory: () => clearRunHistory,
|
|
822
|
+
drainCapturedRuns: () => drainCapturedRuns,
|
|
820
823
|
getActivePipeline: () => getActivePipeline,
|
|
824
|
+
getRunsForSession: () => getRunsForSession,
|
|
821
825
|
mountPipelineDebugger: () => mountPipelineDebugger,
|
|
822
826
|
pipelineDebugAPI: () => pipelineDebugAPI,
|
|
823
|
-
registerPipelineForDebug: () => registerPipelineForDebug
|
|
827
|
+
registerPipelineForDebug: () => registerPipelineForDebug,
|
|
828
|
+
setDebugSessionId: () => setDebugSessionId
|
|
824
829
|
});
|
|
825
830
|
function registerPipelineForDebug(pipeline) {
|
|
826
831
|
_activePipeline = pipeline;
|
|
@@ -828,8 +833,20 @@ function registerPipelineForDebug(pipeline) {
|
|
|
828
833
|
function getActivePipeline() {
|
|
829
834
|
return _activePipeline;
|
|
830
835
|
}
|
|
836
|
+
function setDebugSessionId(sessionId) {
|
|
837
|
+
_currentSessionId = sessionId;
|
|
838
|
+
}
|
|
839
|
+
function drainCapturedRuns() {
|
|
840
|
+
const drained = _pendingRuns;
|
|
841
|
+
_pendingRuns = [];
|
|
842
|
+
return drained;
|
|
843
|
+
}
|
|
844
|
+
function getRunsForSession(sessionId) {
|
|
845
|
+
return runHistory.filter((r) => r.sessionId === sessionId).reverse();
|
|
846
|
+
}
|
|
831
847
|
function clearRunHistory() {
|
|
832
848
|
runHistory.length = 0;
|
|
849
|
+
_pendingRuns = [];
|
|
833
850
|
}
|
|
834
851
|
function getOrigin(card) {
|
|
835
852
|
const firstEntry = card.provenance[0];
|
|
@@ -844,12 +861,15 @@ function captureRun(report) {
|
|
|
844
861
|
const fullReport = {
|
|
845
862
|
...report,
|
|
846
863
|
runId: `run-${Date.now()}-${Math.random().toString(36).slice(2, 8)}`,
|
|
864
|
+
sessionId: _currentSessionId,
|
|
847
865
|
timestamp: /* @__PURE__ */ new Date()
|
|
848
866
|
};
|
|
849
867
|
runHistory.unshift(fullReport);
|
|
850
868
|
if (runHistory.length > MAX_RUNS) {
|
|
851
869
|
runHistory.pop();
|
|
852
870
|
}
|
|
871
|
+
_pendingRuns.push(fullReport);
|
|
872
|
+
return fullReport;
|
|
853
873
|
}
|
|
854
874
|
function parseCardElo(provenance) {
|
|
855
875
|
const eloEntry = provenance.find((p) => p.strategy === "elo");
|
|
@@ -1177,7 +1197,7 @@ function mountPipelineDebugger() {
|
|
|
1177
1197
|
win.skuilder = win.skuilder || {};
|
|
1178
1198
|
win.skuilder.pipeline = pipelineDebugAPI;
|
|
1179
1199
|
}
|
|
1180
|
-
var _activePipeline, MAX_RUNS, runHistory, DISCARDED_KEEP_TOP, _uiContainer, _selectedRunIndex, _cardSearchQuery, pipelineDebugAPI;
|
|
1200
|
+
var _activePipeline, MAX_RUNS, runHistory, _currentSessionId, _pendingRuns, DISCARDED_KEEP_TOP, _uiContainer, _selectedRunIndex, _cardSearchQuery, pipelineDebugAPI;
|
|
1181
1201
|
var init_PipelineDebugger = __esm({
|
|
1182
1202
|
"src/core/navigators/PipelineDebugger.ts"() {
|
|
1183
1203
|
"use strict";
|
|
@@ -1186,6 +1206,7 @@ var init_PipelineDebugger = __esm({
|
|
|
1186
1206
|
_activePipeline = null;
|
|
1187
1207
|
MAX_RUNS = 10;
|
|
1188
1208
|
runHistory = [];
|
|
1209
|
+
_pendingRuns = [];
|
|
1189
1210
|
DISCARDED_KEEP_TOP = 25;
|
|
1190
1211
|
_uiContainer = null;
|
|
1191
1212
|
_selectedRunIndex = null;
|
|
@@ -5409,11 +5430,13 @@ __export(navigators_exports, {
|
|
|
5409
5430
|
clearSrsBacklogDebug: () => clearSrsBacklogDebug,
|
|
5410
5431
|
clearStrategyPressureDebug: () => clearStrategyPressureDebug,
|
|
5411
5432
|
diversityRerank: () => diversityRerank,
|
|
5433
|
+
drainCapturedRuns: () => drainCapturedRuns,
|
|
5412
5434
|
getActivePipeline: () => getActivePipeline,
|
|
5413
5435
|
getCardOrigin: () => getCardOrigin,
|
|
5414
5436
|
getRegisteredNavigator: () => getRegisteredNavigator,
|
|
5415
5437
|
getRegisteredNavigatorNames: () => getRegisteredNavigatorNames,
|
|
5416
5438
|
getRegisteredNavigatorRole: () => getRegisteredNavigatorRole,
|
|
5439
|
+
getRunsForSession: () => getRunsForSession,
|
|
5417
5440
|
getSrsBacklogDebug: () => getSrsBacklogDebug,
|
|
5418
5441
|
getStrategyPressureDebug: () => getStrategyPressureDebug,
|
|
5419
5442
|
hasRegisteredNavigator: () => hasRegisteredNavigator,
|
|
@@ -5422,7 +5445,8 @@ __export(navigators_exports, {
|
|
|
5422
5445
|
isGenerator: () => isGenerator,
|
|
5423
5446
|
mountPipelineDebugger: () => mountPipelineDebugger,
|
|
5424
5447
|
pipelineDebugAPI: () => pipelineDebugAPI,
|
|
5425
|
-
registerNavigator: () => registerNavigator
|
|
5448
|
+
registerNavigator: () => registerNavigator,
|
|
5449
|
+
setDebugSessionId: () => setDebugSessionId
|
|
5426
5450
|
});
|
|
5427
5451
|
function registerNavigator(implementingClass, constructor, role) {
|
|
5428
5452
|
navigatorRegistry.set(implementingClass, { constructor, role });
|
|
@@ -7880,6 +7904,32 @@ Currently logged-in as ${this._username}.`
|
|
|
7880
7904
|
};
|
|
7881
7905
|
await this.localDB.put(doc);
|
|
7882
7906
|
}
|
|
7907
|
+
/**
|
|
7908
|
+
* Open and close write the same `_id`, so the 409 path is the expected
|
|
7909
|
+
* route for the second write, not an error case.
|
|
7910
|
+
*/
|
|
7911
|
+
async putStudySession(doc) {
|
|
7912
|
+
try {
|
|
7913
|
+
await this.localDB.put(doc);
|
|
7914
|
+
} catch (err) {
|
|
7915
|
+
if (err.status === 409) {
|
|
7916
|
+
const existing = await this.localDB.get(doc._id);
|
|
7917
|
+
await this.localDB.put({ ...doc, _rev: existing._rev });
|
|
7918
|
+
} else {
|
|
7919
|
+
throw err;
|
|
7920
|
+
}
|
|
7921
|
+
}
|
|
7922
|
+
}
|
|
7923
|
+
async getStudySessions(courseId) {
|
|
7924
|
+
const prefix = courseId ? `${DocTypePrefixes["STUDY_SESSION" /* STUDY_SESSION */]}::${courseId}::` : `${DocTypePrefixes["STUDY_SESSION" /* STUDY_SESSION */]}::`;
|
|
7925
|
+
const keys = getStartAndEndKeys(prefix);
|
|
7926
|
+
const res = await this.localDB.allDocs({
|
|
7927
|
+
startkey: keys.startkey,
|
|
7928
|
+
endkey: keys.endkey,
|
|
7929
|
+
include_docs: true
|
|
7930
|
+
});
|
|
7931
|
+
return res.rows.map((r) => r.doc).filter((d) => !!d).sort((a, b) => b.startTime.localeCompare(a.startTime));
|
|
7932
|
+
}
|
|
7883
7933
|
async putUserOutcome(record) {
|
|
7884
7934
|
try {
|
|
7885
7935
|
await this.localDB.put(record);
|
|
@@ -8200,6 +8250,20 @@ var init_userOutcome = __esm({
|
|
|
8200
8250
|
}
|
|
8201
8251
|
});
|
|
8202
8252
|
|
|
8253
|
+
// src/core/types/studySession.ts
|
|
8254
|
+
function makeStudySessionId(courseId, userId, sessionId) {
|
|
8255
|
+
return `${DocTypePrefixes["STUDY_SESSION" /* STUDY_SESSION */]}::${courseId}::${userId}::${sessionId}`;
|
|
8256
|
+
}
|
|
8257
|
+
function newSessionId() {
|
|
8258
|
+
return `session-${Date.now()}-${Math.random().toString(36).slice(2, 8)}`;
|
|
8259
|
+
}
|
|
8260
|
+
var init_studySession = __esm({
|
|
8261
|
+
"src/core/types/studySession.ts"() {
|
|
8262
|
+
"use strict";
|
|
8263
|
+
init_types_legacy();
|
|
8264
|
+
}
|
|
8265
|
+
});
|
|
8266
|
+
|
|
8203
8267
|
// src/core/types/hydration.ts
|
|
8204
8268
|
var HYDRATION_MARKER_ID;
|
|
8205
8269
|
var init_hydration = __esm({
|
|
@@ -8708,6 +8772,7 @@ __export(core_exports, {
|
|
|
8708
8772
|
createOrchestrationContext: () => createOrchestrationContext,
|
|
8709
8773
|
diversityRerank: () => diversityRerank,
|
|
8710
8774
|
docIsDeleted: () => docIsDeleted,
|
|
8775
|
+
drainCapturedRuns: () => drainCapturedRuns,
|
|
8711
8776
|
getActivePipeline: () => getActivePipeline,
|
|
8712
8777
|
getCardHistoryID: () => getCardHistoryID,
|
|
8713
8778
|
getCardOrigin: () => getCardOrigin,
|
|
@@ -8715,6 +8780,7 @@ __export(core_exports, {
|
|
|
8715
8780
|
getRegisteredNavigator: () => getRegisteredNavigator,
|
|
8716
8781
|
getRegisteredNavigatorNames: () => getRegisteredNavigatorNames,
|
|
8717
8782
|
getRegisteredNavigatorRole: () => getRegisteredNavigatorRole,
|
|
8783
|
+
getRunsForSession: () => getRunsForSession,
|
|
8718
8784
|
getSrsBacklogDebug: () => getSrsBacklogDebug,
|
|
8719
8785
|
getStrategyPressureDebug: () => getStrategyPressureDebug,
|
|
8720
8786
|
getStudySource: () => getStudySource,
|
|
@@ -8726,14 +8792,17 @@ __export(core_exports, {
|
|
|
8726
8792
|
isQuestionRecord: () => isQuestionRecord,
|
|
8727
8793
|
isReview: () => isReview,
|
|
8728
8794
|
log: () => log,
|
|
8795
|
+
makeStudySessionId: () => makeStudySessionId,
|
|
8729
8796
|
mountPipelineDebugger: () => mountPipelineDebugger,
|
|
8730
8797
|
mountUserDBDebugger: () => mountUserDBDebugger,
|
|
8798
|
+
newSessionId: () => newSessionId,
|
|
8731
8799
|
parseCardHistoryID: () => parseCardHistoryID,
|
|
8732
8800
|
pipelineDebugAPI: () => pipelineDebugAPI,
|
|
8733
8801
|
recordUserOutcome: () => recordUserOutcome,
|
|
8734
8802
|
registerNavigator: () => registerNavigator,
|
|
8735
8803
|
runPeriodUpdate: () => runPeriodUpdate,
|
|
8736
8804
|
scoreAccuracyInZone: () => scoreAccuracyInZone,
|
|
8805
|
+
setDebugSessionId: () => setDebugSessionId,
|
|
8737
8806
|
updateLearningState: () => updateLearningState,
|
|
8738
8807
|
updateStrategyWeight: () => updateStrategyWeight,
|
|
8739
8808
|
userDBDebugAPI: () => userDBDebugAPI,
|
|
@@ -8747,6 +8816,7 @@ var init_core = __esm({
|
|
|
8747
8816
|
init_user();
|
|
8748
8817
|
init_strategyState();
|
|
8749
8818
|
init_userOutcome();
|
|
8819
|
+
init_studySession();
|
|
8750
8820
|
init_hydration();
|
|
8751
8821
|
init_Loggable();
|
|
8752
8822
|
init_util();
|
|
@@ -8784,6 +8854,7 @@ init_core();
|
|
|
8784
8854
|
createOrchestrationContext,
|
|
8785
8855
|
diversityRerank,
|
|
8786
8856
|
docIsDeleted,
|
|
8857
|
+
drainCapturedRuns,
|
|
8787
8858
|
getActivePipeline,
|
|
8788
8859
|
getCardHistoryID,
|
|
8789
8860
|
getCardOrigin,
|
|
@@ -8791,6 +8862,7 @@ init_core();
|
|
|
8791
8862
|
getRegisteredNavigator,
|
|
8792
8863
|
getRegisteredNavigatorNames,
|
|
8793
8864
|
getRegisteredNavigatorRole,
|
|
8865
|
+
getRunsForSession,
|
|
8794
8866
|
getSrsBacklogDebug,
|
|
8795
8867
|
getStrategyPressureDebug,
|
|
8796
8868
|
getStudySource,
|
|
@@ -8802,14 +8874,17 @@ init_core();
|
|
|
8802
8874
|
isQuestionRecord,
|
|
8803
8875
|
isReview,
|
|
8804
8876
|
log,
|
|
8877
|
+
makeStudySessionId,
|
|
8805
8878
|
mountPipelineDebugger,
|
|
8806
8879
|
mountUserDBDebugger,
|
|
8880
|
+
newSessionId,
|
|
8807
8881
|
parseCardHistoryID,
|
|
8808
8882
|
pipelineDebugAPI,
|
|
8809
8883
|
recordUserOutcome,
|
|
8810
8884
|
registerNavigator,
|
|
8811
8885
|
runPeriodUpdate,
|
|
8812
8886
|
scoreAccuracyInZone,
|
|
8887
|
+
setDebugSessionId,
|
|
8813
8888
|
updateLearningState,
|
|
8814
8889
|
updateStrategyWeight,
|
|
8815
8890
|
userDBDebugAPI,
|