@vue-skuilder/db 0.1.31-a → 0.1.31-b
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-DfBbaLA-.d.cts → contentSource-B7nXusjk.d.cts} +19 -4
- package/dist/{contentSource-BmnmvH8C.d.ts → contentSource-ygoFw9oV.d.ts} +19 -4
- package/dist/core/index.d.cts +17 -3
- package/dist/core/index.d.ts +17 -3
- package/dist/core/index.js +77 -6
- package/dist/core/index.js.map +1 -1
- package/dist/core/index.mjs +76 -6
- package/dist/core/index.mjs.map +1 -1
- package/dist/{dataLayerProvider-BeRXVMs5.d.cts → dataLayerProvider-BW7HvkMt.d.cts} +1 -1
- package/dist/{dataLayerProvider-CG9GfaAY.d.ts → dataLayerProvider-BfXUVDuG.d.ts} +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 +75 -6
- package/dist/impl/couch/index.js.map +1 -1
- package/dist/impl/couch/index.mjs +75 -6
- 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 +75 -6
- package/dist/impl/static/index.js.map +1 -1
- package/dist/impl/static/index.mjs +75 -6
- package/dist/impl/static/index.mjs.map +1 -1
- package/dist/index.d.cts +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.js +92 -18
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +82 -9
- package/dist/index.mjs.map +1 -1
- package/docs/navigators-architecture.md +64 -5
- package/package.json +3 -3
- package/src/core/navigators/PipelineDebugger.ts +80 -0
- package/src/core/navigators/index.ts +43 -10
- package/src/study/SpacedRepetition.ts +4 -1
|
@@ -742,10 +742,15 @@ type NavigatorConstructor = new (user: UserDBInterface, course: CourseDBInterfac
|
|
|
742
742
|
* Call this to make a navigator available for instantiation by
|
|
743
743
|
* ContentNavigator.create() without relying on dynamic imports.
|
|
744
744
|
*
|
|
745
|
-
*
|
|
745
|
+
* Passing a `role` is optional for built-in navigators (whose roles are in
|
|
746
|
+
* the hardcoded `NavigatorRoles` record), but **required** for consumer-
|
|
747
|
+
* defined navigators that need to participate in pipeline assembly.
|
|
748
|
+
*
|
|
749
|
+
* @param implementingClass - The class name (e.g., 'elo', 'letterGatingFilter')
|
|
746
750
|
* @param constructor - The navigator class constructor
|
|
751
|
+
* @param role - Optional pipeline role (GENERATOR or FILTER)
|
|
747
752
|
*/
|
|
748
|
-
declare function registerNavigator(implementingClass: string, constructor: NavigatorConstructor): void;
|
|
753
|
+
declare function registerNavigator(implementingClass: string, constructor: NavigatorConstructor, role?: NavigatorRole): void;
|
|
749
754
|
/**
|
|
750
755
|
* Get a navigator constructor from the registry.
|
|
751
756
|
*
|
|
@@ -760,6 +765,13 @@ declare function getRegisteredNavigator(implementingClass: string): NavigatorCon
|
|
|
760
765
|
* @returns true if registered, false otherwise
|
|
761
766
|
*/
|
|
762
767
|
declare function hasRegisteredNavigator(implementingClass: string): boolean;
|
|
768
|
+
/**
|
|
769
|
+
* Get the registered role for a navigator, if one was provided at registration.
|
|
770
|
+
*
|
|
771
|
+
* @param implementingClass - The class name to look up
|
|
772
|
+
* @returns The role, or undefined if not registered or no role was specified
|
|
773
|
+
*/
|
|
774
|
+
declare function getRegisteredNavigatorRole(implementingClass: string): NavigatorRole | undefined;
|
|
763
775
|
/**
|
|
764
776
|
* Get all registered navigator names.
|
|
765
777
|
* Useful for debugging and testing.
|
|
@@ -925,7 +937,10 @@ declare function isGenerator(impl: string): boolean;
|
|
|
925
937
|
/**
|
|
926
938
|
* Check if a navigator implementation is a filter.
|
|
927
939
|
*
|
|
928
|
-
*
|
|
940
|
+
* Checks the built-in NavigatorRoles enum first, then falls back to the
|
|
941
|
+
* navigator registry for consumer-registered navigators.
|
|
942
|
+
*
|
|
943
|
+
* @param impl - Navigator implementation name (e.g., 'elo', 'letterGatingFilter')
|
|
929
944
|
* @returns true if the navigator is a filter, false otherwise
|
|
930
945
|
*/
|
|
931
946
|
declare function isFilter(impl: string): boolean;
|
|
@@ -1084,4 +1099,4 @@ interface StudyContentSource {
|
|
|
1084
1099
|
}
|
|
1085
1100
|
declare function getStudySource(source: ContentSourceID, user: UserDBInterface): Promise<StudyContentSource>;
|
|
1086
1101
|
|
|
1087
|
-
export {
|
|
1102
|
+
export { NavigatorRoles as $, type AdminDBInterface as A, type UsrCrsDataInterface as B, type CourseDBInterface as C, type DataLayerResult as D, type ClassroomRegistrationDesignation as E, type ClassroomRegistration as F, type ClassroomRegistrationDoc as G, type SessionTrackingData as H, type UserConfig as I, type ActivityRecord as J, type CourseRegistration as K, type UserOutcomeRecord as L, registerNavigator as M, type NavigatorConstructor as N, getRegisteredNavigator as O, hasRegisteredNavigator as P, getRegisteredNavigatorRole as Q, getRegisteredNavigatorNames as R, type StudySessionItem as S, type TeacherClassroomDBInterface as T, type UserDBInterface as U, initializeNavigatorRegistry as V, type WeightedCard as W, type StrategyContribution as X, getCardOrigin as Y, Navigators as Z, NavigatorRole as _, type UserDBReader as a, isGenerator as a0, isFilter as a1, type LearnableWeight as a2, type OrchestrationContext as a3, computeDeviation as a4, computeSpread as a5, computeEffectiveWeight as a6, createOrchestrationContext as a7, type DocumentUpdater as a8, newInterval as a9, type CoursesDBInterface as b, type ClassroomDBInterface as c, type CourseInfo as d, type ContentNavigationStrategyData as e, ContentNavigator as f, type AssignedContent as g, type StudyContentSource as h, type StudentClassroomDBInterface as i, type ScheduledCard as j, type StudySessionFailedItem as k, type StudySessionFailedNewItem as l, type StudySessionFailedReviewItem as m, type StudySessionNewItem as n, type StudySessionReviewItem as o, isReview as p, type ContentSourceID as q, getStudySource as r, type CourseRegistrationDoc as s, type AssignedTag as t, type AssignedCourse as u, type AssignedCard as v, type UserDBWriter as w, type UserDBAuthenticator as x, type UserCourseSettings as y, type UserCourseSetting as z };
|
|
@@ -742,10 +742,15 @@ type NavigatorConstructor = new (user: UserDBInterface, course: CourseDBInterfac
|
|
|
742
742
|
* Call this to make a navigator available for instantiation by
|
|
743
743
|
* ContentNavigator.create() without relying on dynamic imports.
|
|
744
744
|
*
|
|
745
|
-
*
|
|
745
|
+
* Passing a `role` is optional for built-in navigators (whose roles are in
|
|
746
|
+
* the hardcoded `NavigatorRoles` record), but **required** for consumer-
|
|
747
|
+
* defined navigators that need to participate in pipeline assembly.
|
|
748
|
+
*
|
|
749
|
+
* @param implementingClass - The class name (e.g., 'elo', 'letterGatingFilter')
|
|
746
750
|
* @param constructor - The navigator class constructor
|
|
751
|
+
* @param role - Optional pipeline role (GENERATOR or FILTER)
|
|
747
752
|
*/
|
|
748
|
-
declare function registerNavigator(implementingClass: string, constructor: NavigatorConstructor): void;
|
|
753
|
+
declare function registerNavigator(implementingClass: string, constructor: NavigatorConstructor, role?: NavigatorRole): void;
|
|
749
754
|
/**
|
|
750
755
|
* Get a navigator constructor from the registry.
|
|
751
756
|
*
|
|
@@ -760,6 +765,13 @@ declare function getRegisteredNavigator(implementingClass: string): NavigatorCon
|
|
|
760
765
|
* @returns true if registered, false otherwise
|
|
761
766
|
*/
|
|
762
767
|
declare function hasRegisteredNavigator(implementingClass: string): boolean;
|
|
768
|
+
/**
|
|
769
|
+
* Get the registered role for a navigator, if one was provided at registration.
|
|
770
|
+
*
|
|
771
|
+
* @param implementingClass - The class name to look up
|
|
772
|
+
* @returns The role, or undefined if not registered or no role was specified
|
|
773
|
+
*/
|
|
774
|
+
declare function getRegisteredNavigatorRole(implementingClass: string): NavigatorRole | undefined;
|
|
763
775
|
/**
|
|
764
776
|
* Get all registered navigator names.
|
|
765
777
|
* Useful for debugging and testing.
|
|
@@ -925,7 +937,10 @@ declare function isGenerator(impl: string): boolean;
|
|
|
925
937
|
/**
|
|
926
938
|
* Check if a navigator implementation is a filter.
|
|
927
939
|
*
|
|
928
|
-
*
|
|
940
|
+
* Checks the built-in NavigatorRoles enum first, then falls back to the
|
|
941
|
+
* navigator registry for consumer-registered navigators.
|
|
942
|
+
*
|
|
943
|
+
* @param impl - Navigator implementation name (e.g., 'elo', 'letterGatingFilter')
|
|
929
944
|
* @returns true if the navigator is a filter, false otherwise
|
|
930
945
|
*/
|
|
931
946
|
declare function isFilter(impl: string): boolean;
|
|
@@ -1084,4 +1099,4 @@ interface StudyContentSource {
|
|
|
1084
1099
|
}
|
|
1085
1100
|
declare function getStudySource(source: ContentSourceID, user: UserDBInterface): Promise<StudyContentSource>;
|
|
1086
1101
|
|
|
1087
|
-
export {
|
|
1102
|
+
export { NavigatorRoles as $, type AdminDBInterface as A, type UsrCrsDataInterface as B, type CourseDBInterface as C, type DataLayerResult as D, type ClassroomRegistrationDesignation as E, type ClassroomRegistration as F, type ClassroomRegistrationDoc as G, type SessionTrackingData as H, type UserConfig as I, type ActivityRecord as J, type CourseRegistration as K, type UserOutcomeRecord as L, registerNavigator as M, type NavigatorConstructor as N, getRegisteredNavigator as O, hasRegisteredNavigator as P, getRegisteredNavigatorRole as Q, getRegisteredNavigatorNames as R, type StudySessionItem as S, type TeacherClassroomDBInterface as T, type UserDBInterface as U, initializeNavigatorRegistry as V, type WeightedCard as W, type StrategyContribution as X, getCardOrigin as Y, Navigators as Z, NavigatorRole as _, type UserDBReader as a, isGenerator as a0, isFilter as a1, type LearnableWeight as a2, type OrchestrationContext as a3, computeDeviation as a4, computeSpread as a5, computeEffectiveWeight as a6, createOrchestrationContext as a7, type DocumentUpdater as a8, newInterval as a9, type CoursesDBInterface as b, type ClassroomDBInterface as c, type CourseInfo as d, type ContentNavigationStrategyData as e, ContentNavigator as f, type AssignedContent as g, type StudyContentSource as h, type StudentClassroomDBInterface as i, type ScheduledCard as j, type StudySessionFailedItem as k, type StudySessionFailedNewItem as l, type StudySessionFailedReviewItem as m, type StudySessionNewItem as n, type StudySessionReviewItem as o, isReview as p, type ContentSourceID as q, getStudySource as r, type CourseRegistrationDoc as s, type AssignedTag as t, type AssignedCourse as u, type AssignedCard as v, type UserDBWriter as w, type UserDBAuthenticator as x, type UserCourseSettings as y, type UserCourseSetting as z };
|
package/dist/core/index.d.cts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export { J as ActivityRecord, A as AdminDBInterface, v as AssignedCard, g as AssignedContent, u as AssignedCourse, t as AssignedTag, c as ClassroomDBInterface, F as ClassroomRegistration, E as ClassroomRegistrationDesignation, G as ClassroomRegistrationDoc, e as ContentNavigationStrategyData, f as ContentNavigator, q as ContentSourceID, d as CourseInfo, K as CourseRegistration, s as CourseRegistrationDoc, b as CoursesDBInterface, N as NavigatorConstructor,
|
|
3
|
-
export { D as DataLayerProvider } from '../dataLayerProvider-
|
|
1
|
+
import { a2 as LearnableWeight, L as UserOutcomeRecord, a3 as OrchestrationContext, W as WeightedCard, U as UserDBInterface, C as CourseDBInterface, X as StrategyContribution } from '../contentSource-B7nXusjk.cjs';
|
|
2
|
+
export { J as ActivityRecord, A as AdminDBInterface, v as AssignedCard, g as AssignedContent, u as AssignedCourse, t as AssignedTag, c as ClassroomDBInterface, F as ClassroomRegistration, E as ClassroomRegistrationDesignation, G as ClassroomRegistrationDoc, e as ContentNavigationStrategyData, f as ContentNavigator, q as ContentSourceID, d as CourseInfo, K as CourseRegistration, s as CourseRegistrationDoc, b as CoursesDBInterface, N as NavigatorConstructor, _ as NavigatorRole, $ as NavigatorRoles, Z as Navigators, j as ScheduledCard, H as SessionTrackingData, i as StudentClassroomDBInterface, h as StudyContentSource, k as StudySessionFailedItem, l as StudySessionFailedNewItem, m as StudySessionFailedReviewItem, S as StudySessionItem, n as StudySessionNewItem, o as StudySessionReviewItem, T as TeacherClassroomDBInterface, I as UserConfig, z as UserCourseSetting, y as UserCourseSettings, x as UserDBAuthenticator, a as UserDBReader, w as UserDBWriter, B as UsrCrsDataInterface, a4 as computeDeviation, a6 as computeEffectiveWeight, a5 as computeSpread, a7 as createOrchestrationContext, Y as getCardOrigin, O as getRegisteredNavigator, R as getRegisteredNavigatorNames, Q as getRegisteredNavigatorRole, r as getStudySource, P as hasRegisteredNavigator, V as initializeNavigatorRegistry, a1 as isFilter, a0 as isGenerator, p as isReview, M as registerNavigator } from '../contentSource-B7nXusjk.cjs';
|
|
3
|
+
export { D as DataLayerProvider } from '../dataLayerProvider-BW7HvkMt.cjs';
|
|
4
4
|
import { D as DocType, i as QuestionRecord, b as DocTypePrefixes, C as CardHistory, c as CardRecord } from '../types-legacy-JXDxinpU.cjs';
|
|
5
5
|
export { d as CardData, e as CourseListData, g as DataShapeData, f as DisplayableData, F as Field, G as GuestUsername, Q as QualifiedCardID, h as QuestionData, S as SkuilderCourseData, a as Tag, T as TagStub, l as log } from '../types-legacy-JXDxinpU.cjs';
|
|
6
6
|
import { DataShape, ParsedCard } from '@vue-skuilder/common';
|
|
@@ -463,6 +463,20 @@ declare const pipelineDebugAPI: {
|
|
|
463
463
|
* Clear run history.
|
|
464
464
|
*/
|
|
465
465
|
clear(): void;
|
|
466
|
+
/**
|
|
467
|
+
* Show the navigator registry: all registered classes and their roles.
|
|
468
|
+
*
|
|
469
|
+
* Useful for verifying that consumer-defined navigators were registered
|
|
470
|
+
* before pipeline assembly.
|
|
471
|
+
*/
|
|
472
|
+
showRegistry(): void;
|
|
473
|
+
/**
|
|
474
|
+
* Show strategy documents from the last pipeline run and how they mapped
|
|
475
|
+
* to the registry.
|
|
476
|
+
*
|
|
477
|
+
* If no runs are captured yet, falls back to showing just the registry.
|
|
478
|
+
*/
|
|
479
|
+
showStrategies(): void;
|
|
466
480
|
/**
|
|
467
481
|
* Show help.
|
|
468
482
|
*/
|
package/dist/core/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export { J as ActivityRecord, A as AdminDBInterface, v as AssignedCard, g as AssignedContent, u as AssignedCourse, t as AssignedTag, c as ClassroomDBInterface, F as ClassroomRegistration, E as ClassroomRegistrationDesignation, G as ClassroomRegistrationDoc, e as ContentNavigationStrategyData, f as ContentNavigator, q as ContentSourceID, d as CourseInfo, K as CourseRegistration, s as CourseRegistrationDoc, b as CoursesDBInterface, N as NavigatorConstructor,
|
|
3
|
-
export { D as DataLayerProvider } from '../dataLayerProvider-
|
|
1
|
+
import { a2 as LearnableWeight, L as UserOutcomeRecord, a3 as OrchestrationContext, W as WeightedCard, U as UserDBInterface, C as CourseDBInterface, X as StrategyContribution } from '../contentSource-ygoFw9oV.js';
|
|
2
|
+
export { J as ActivityRecord, A as AdminDBInterface, v as AssignedCard, g as AssignedContent, u as AssignedCourse, t as AssignedTag, c as ClassroomDBInterface, F as ClassroomRegistration, E as ClassroomRegistrationDesignation, G as ClassroomRegistrationDoc, e as ContentNavigationStrategyData, f as ContentNavigator, q as ContentSourceID, d as CourseInfo, K as CourseRegistration, s as CourseRegistrationDoc, b as CoursesDBInterface, N as NavigatorConstructor, _ as NavigatorRole, $ as NavigatorRoles, Z as Navigators, j as ScheduledCard, H as SessionTrackingData, i as StudentClassroomDBInterface, h as StudyContentSource, k as StudySessionFailedItem, l as StudySessionFailedNewItem, m as StudySessionFailedReviewItem, S as StudySessionItem, n as StudySessionNewItem, o as StudySessionReviewItem, T as TeacherClassroomDBInterface, I as UserConfig, z as UserCourseSetting, y as UserCourseSettings, x as UserDBAuthenticator, a as UserDBReader, w as UserDBWriter, B as UsrCrsDataInterface, a4 as computeDeviation, a6 as computeEffectiveWeight, a5 as computeSpread, a7 as createOrchestrationContext, Y as getCardOrigin, O as getRegisteredNavigator, R as getRegisteredNavigatorNames, Q as getRegisteredNavigatorRole, r as getStudySource, P as hasRegisteredNavigator, V as initializeNavigatorRegistry, a1 as isFilter, a0 as isGenerator, p as isReview, M as registerNavigator } from '../contentSource-ygoFw9oV.js';
|
|
3
|
+
export { D as DataLayerProvider } from '../dataLayerProvider-BfXUVDuG.js';
|
|
4
4
|
import { D as DocType, i as QuestionRecord, b as DocTypePrefixes, C as CardHistory, c as CardRecord } from '../types-legacy-JXDxinpU.js';
|
|
5
5
|
export { d as CardData, e as CourseListData, g as DataShapeData, f as DisplayableData, F as Field, G as GuestUsername, Q as QualifiedCardID, h as QuestionData, S as SkuilderCourseData, a as Tag, T as TagStub, l as log } from '../types-legacy-JXDxinpU.js';
|
|
6
6
|
import { DataShape, ParsedCard } from '@vue-skuilder/common';
|
|
@@ -463,6 +463,20 @@ declare const pipelineDebugAPI: {
|
|
|
463
463
|
* Clear run history.
|
|
464
464
|
*/
|
|
465
465
|
clear(): void;
|
|
466
|
+
/**
|
|
467
|
+
* Show the navigator registry: all registered classes and their roles.
|
|
468
|
+
*
|
|
469
|
+
* Useful for verifying that consumer-defined navigators were registered
|
|
470
|
+
* before pipeline assembly.
|
|
471
|
+
*/
|
|
472
|
+
showRegistry(): void;
|
|
473
|
+
/**
|
|
474
|
+
* Show strategy documents from the last pipeline run and how they mapped
|
|
475
|
+
* to the registry.
|
|
476
|
+
*
|
|
477
|
+
* If no runs are captured yet, falls back to showing just the registry.
|
|
478
|
+
*/
|
|
479
|
+
showStrategies(): void;
|
|
466
480
|
/**
|
|
467
481
|
* Show help.
|
|
468
482
|
*/
|
package/dist/core/index.js
CHANGED
|
@@ -813,6 +813,7 @@ var MAX_RUNS, runHistory, pipelineDebugAPI;
|
|
|
813
813
|
var init_PipelineDebugger = __esm({
|
|
814
814
|
"src/core/navigators/PipelineDebugger.ts"() {
|
|
815
815
|
"use strict";
|
|
816
|
+
init_navigators();
|
|
816
817
|
init_logger();
|
|
817
818
|
MAX_RUNS = 10;
|
|
818
819
|
runHistory = [];
|
|
@@ -955,6 +956,66 @@ var init_PipelineDebugger = __esm({
|
|
|
955
956
|
runHistory.length = 0;
|
|
956
957
|
logger.info("[Pipeline Debug] Run history cleared.");
|
|
957
958
|
},
|
|
959
|
+
/**
|
|
960
|
+
* Show the navigator registry: all registered classes and their roles.
|
|
961
|
+
*
|
|
962
|
+
* Useful for verifying that consumer-defined navigators were registered
|
|
963
|
+
* before pipeline assembly.
|
|
964
|
+
*/
|
|
965
|
+
showRegistry() {
|
|
966
|
+
const names = getRegisteredNavigatorNames();
|
|
967
|
+
if (names.length === 0) {
|
|
968
|
+
logger.info("[Pipeline Debug] Navigator registry is empty.");
|
|
969
|
+
return;
|
|
970
|
+
}
|
|
971
|
+
console.group("\u{1F4E6} Navigator Registry");
|
|
972
|
+
console.table(
|
|
973
|
+
names.map((name) => {
|
|
974
|
+
const registryRole = getRegisteredNavigatorRole(name);
|
|
975
|
+
const builtinRole = NavigatorRoles[name];
|
|
976
|
+
const effectiveRole = builtinRole || registryRole || "\u26A0\uFE0F NONE";
|
|
977
|
+
const source = builtinRole ? "built-in" : registryRole ? "consumer" : "unclassified";
|
|
978
|
+
return {
|
|
979
|
+
name,
|
|
980
|
+
role: effectiveRole,
|
|
981
|
+
source,
|
|
982
|
+
isGenerator: isGenerator(name),
|
|
983
|
+
isFilter: isFilter(name)
|
|
984
|
+
};
|
|
985
|
+
})
|
|
986
|
+
);
|
|
987
|
+
console.groupEnd();
|
|
988
|
+
},
|
|
989
|
+
/**
|
|
990
|
+
* Show strategy documents from the last pipeline run and how they mapped
|
|
991
|
+
* to the registry.
|
|
992
|
+
*
|
|
993
|
+
* If no runs are captured yet, falls back to showing just the registry.
|
|
994
|
+
*/
|
|
995
|
+
showStrategies() {
|
|
996
|
+
this.showRegistry();
|
|
997
|
+
if (runHistory.length === 0) {
|
|
998
|
+
logger.info("[Pipeline Debug] No pipeline runs captured yet \u2014 cannot show strategy doc mapping.");
|
|
999
|
+
return;
|
|
1000
|
+
}
|
|
1001
|
+
const run = runHistory[0];
|
|
1002
|
+
console.group("\u{1F50C} Pipeline Strategy Mapping (last run)");
|
|
1003
|
+
logger.info(`Generator: ${run.generatorName}`);
|
|
1004
|
+
if (run.generators && run.generators.length > 0) {
|
|
1005
|
+
for (const g of run.generators) {
|
|
1006
|
+
logger.info(` \u{1F4E5} ${g.name}: ${g.cardCount} cards (${g.newCount} new, ${g.reviewCount} reviews)`);
|
|
1007
|
+
}
|
|
1008
|
+
}
|
|
1009
|
+
if (run.filters.length > 0) {
|
|
1010
|
+
logger.info("Filters:");
|
|
1011
|
+
for (const f of run.filters) {
|
|
1012
|
+
logger.info(` \u{1F538} ${f.name}: \u2191${f.boosted} \u2193${f.penalized} =${f.passed} \u2715${f.removed}`);
|
|
1013
|
+
}
|
|
1014
|
+
} else {
|
|
1015
|
+
logger.info("Filters: (none)");
|
|
1016
|
+
}
|
|
1017
|
+
console.groupEnd();
|
|
1018
|
+
},
|
|
958
1019
|
/**
|
|
959
1020
|
* Show help.
|
|
960
1021
|
*/
|
|
@@ -967,6 +1028,8 @@ Commands:
|
|
|
967
1028
|
.showRun(id|index) Show summary of a specific run (by index or ID suffix)
|
|
968
1029
|
.showCard(cardId) Show provenance trail for a specific card
|
|
969
1030
|
.explainReviews() Analyze why reviews were/weren't selected
|
|
1031
|
+
.showRegistry() Show navigator registry (classes + roles)
|
|
1032
|
+
.showStrategies() Show registry + strategy mapping from last run
|
|
970
1033
|
.listRuns() List all captured runs in table format
|
|
971
1034
|
.export() Export run history as JSON for bug reports
|
|
972
1035
|
.clear() Clear run history
|
|
@@ -3181,6 +3244,7 @@ __export(navigators_exports, {
|
|
|
3181
3244
|
getCardOrigin: () => getCardOrigin,
|
|
3182
3245
|
getRegisteredNavigator: () => getRegisteredNavigator,
|
|
3183
3246
|
getRegisteredNavigatorNames: () => getRegisteredNavigatorNames,
|
|
3247
|
+
getRegisteredNavigatorRole: () => getRegisteredNavigatorRole,
|
|
3184
3248
|
hasRegisteredNavigator: () => hasRegisteredNavigator,
|
|
3185
3249
|
initializeNavigatorRegistry: () => initializeNavigatorRegistry,
|
|
3186
3250
|
isFilter: () => isFilter,
|
|
@@ -3189,16 +3253,19 @@ __export(navigators_exports, {
|
|
|
3189
3253
|
pipelineDebugAPI: () => pipelineDebugAPI,
|
|
3190
3254
|
registerNavigator: () => registerNavigator
|
|
3191
3255
|
});
|
|
3192
|
-
function registerNavigator(implementingClass, constructor) {
|
|
3193
|
-
navigatorRegistry.set(implementingClass, constructor);
|
|
3194
|
-
logger.debug(`[NavigatorRegistry] Registered: ${implementingClass}`);
|
|
3256
|
+
function registerNavigator(implementingClass, constructor, role) {
|
|
3257
|
+
navigatorRegistry.set(implementingClass, { constructor, role });
|
|
3258
|
+
logger.debug(`[NavigatorRegistry] Registered: ${implementingClass}${role ? ` (${role})` : ""}`);
|
|
3195
3259
|
}
|
|
3196
3260
|
function getRegisteredNavigator(implementingClass) {
|
|
3197
|
-
return navigatorRegistry.get(implementingClass);
|
|
3261
|
+
return navigatorRegistry.get(implementingClass)?.constructor;
|
|
3198
3262
|
}
|
|
3199
3263
|
function hasRegisteredNavigator(implementingClass) {
|
|
3200
3264
|
return navigatorRegistry.has(implementingClass);
|
|
3201
3265
|
}
|
|
3266
|
+
function getRegisteredNavigatorRole(implementingClass) {
|
|
3267
|
+
return navigatorRegistry.get(implementingClass)?.role;
|
|
3268
|
+
}
|
|
3202
3269
|
function getRegisteredNavigatorNames() {
|
|
3203
3270
|
return Array.from(navigatorRegistry.keys());
|
|
3204
3271
|
}
|
|
@@ -3244,10 +3311,12 @@ function getCardOrigin(card) {
|
|
|
3244
3311
|
return "new";
|
|
3245
3312
|
}
|
|
3246
3313
|
function isGenerator(impl) {
|
|
3247
|
-
|
|
3314
|
+
if (NavigatorRoles[impl] === "generator" /* GENERATOR */) return true;
|
|
3315
|
+
return getRegisteredNavigatorRole(impl) === "generator" /* GENERATOR */;
|
|
3248
3316
|
}
|
|
3249
3317
|
function isFilter(impl) {
|
|
3250
|
-
|
|
3318
|
+
if (NavigatorRoles[impl] === "filter" /* FILTER */) return true;
|
|
3319
|
+
return getRegisteredNavigatorRole(impl) === "filter" /* FILTER */;
|
|
3251
3320
|
}
|
|
3252
3321
|
var navigatorRegistry, Navigators, NavigatorRole, NavigatorRoles, ContentNavigator;
|
|
3253
3322
|
var init_navigators = __esm({
|
|
@@ -6160,6 +6229,7 @@ __export(core_exports, {
|
|
|
6160
6229
|
getDefaultLearnableWeight: () => getDefaultLearnableWeight,
|
|
6161
6230
|
getRegisteredNavigator: () => getRegisteredNavigator,
|
|
6162
6231
|
getRegisteredNavigatorNames: () => getRegisteredNavigatorNames,
|
|
6232
|
+
getRegisteredNavigatorRole: () => getRegisteredNavigatorRole,
|
|
6163
6233
|
getStudySource: () => getStudySource,
|
|
6164
6234
|
hasRegisteredNavigator: () => hasRegisteredNavigator,
|
|
6165
6235
|
importParsedCards: () => importParsedCards,
|
|
@@ -6224,6 +6294,7 @@ init_core();
|
|
|
6224
6294
|
getDefaultLearnableWeight,
|
|
6225
6295
|
getRegisteredNavigator,
|
|
6226
6296
|
getRegisteredNavigatorNames,
|
|
6297
|
+
getRegisteredNavigatorRole,
|
|
6227
6298
|
getStudySource,
|
|
6228
6299
|
hasRegisteredNavigator,
|
|
6229
6300
|
importParsedCards,
|