@vue-skuilder/db 0.2.26 → 0.2.28
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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 +43 -15
- package/dist/core/index.js.map +1 -1
- package/dist/core/index.mjs +43 -15
- 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 +43 -15
- package/dist/impl/couch/index.js.map +1 -1
- package/dist/impl/couch/index.mjs +43 -15
- 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 +43 -21
- package/dist/impl/static/index.js.map +1 -1
- package/dist/impl/static/index.mjs +43 -21
- 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 +85 -36
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +85 -36
- 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/generators/prescribed.ts +43 -14
- 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/tests/core/navigators/prescribedIntroExposure.test.ts +29 -0
- package/tsup.config.ts +1 -0
|
@@ -776,7 +776,7 @@ function parseCardElo(provenance) {
|
|
|
776
776
|
const match = eloEntry.reason.match(/card:\s*(\d+)/);
|
|
777
777
|
return match ? parseInt(match[1], 10) : void 0;
|
|
778
778
|
}
|
|
779
|
-
function buildRunReport(courseId, courseName, generatorName, generators, generatedCount, filters, allCards, selectedCards, userElo, hints) {
|
|
779
|
+
function buildRunReport(courseId, courseName, generatorName, generators, generatedCount, filters, allCards, selectedCards, userElo, hints, scoredCards) {
|
|
780
780
|
const selectedIds = new Set(selectedCards.map((c) => c.cardId));
|
|
781
781
|
const toReport = (card) => ({
|
|
782
782
|
cardId: card.cardId,
|
|
@@ -829,6 +829,23 @@ function buildRunReport(courseId, courseName, generatorName, generators, generat
|
|
|
829
829
|
note: `${discardedTailCards.length} additional candidate(s) scored below the top ${DISCARDED_KEEP_TOP} near-misses and were not retained (score ${scoreMin.toExponential(2)}\u2013${scoreMax.toExponential(2)}${eloFragment}). Likely ELO-window pull remnants filtered out by hierarchy/lesson/priority gates.`
|
|
830
830
|
};
|
|
831
831
|
}
|
|
832
|
+
const isUnselectedNew = (c) => !c.reviewID && !selectedIds.has(c.cardId);
|
|
833
|
+
const generatorScore = (c) => c.provenance[0]?.score ?? 0;
|
|
834
|
+
const keptIds = new Set(allCards.map((c) => c.cardId));
|
|
835
|
+
const hintExcluded = (c) => c.score > 0 && !keptIds.has(c.cardId);
|
|
836
|
+
let nextInLine;
|
|
837
|
+
for (const c of allCards) {
|
|
838
|
+
if (isUnselectedNew(c) && (!nextInLine || c.score > nextInLine.score)) nextInLine = c;
|
|
839
|
+
}
|
|
840
|
+
let topGenerated;
|
|
841
|
+
for (const c of scoredCards ?? allCards) {
|
|
842
|
+
if (!isUnselectedNew(c) || hintExcluded(c)) continue;
|
|
843
|
+
if (!topGenerated || generatorScore(c) > generatorScore(topGenerated)) topGenerated = c;
|
|
844
|
+
}
|
|
845
|
+
const unselectedNew = nextInLine || topGenerated ? {
|
|
846
|
+
...nextInLine ? { nextInLine: toReport(nextInLine) } : {},
|
|
847
|
+
...topGenerated && topGenerated.cardId !== nextInLine?.cardId ? { topGenerated: toReport(topGenerated) } : {}
|
|
848
|
+
} : void 0;
|
|
832
849
|
const reviewsSelected = selectedCards.filter((c) => getOrigin(c) === "review").length;
|
|
833
850
|
const newSelected = selectedCards.filter((c) => getOrigin(c) === "new").length;
|
|
834
851
|
return {
|
|
@@ -844,6 +861,7 @@ function buildRunReport(courseId, courseName, generatorName, generators, generat
|
|
|
844
861
|
reviewsSelected,
|
|
845
862
|
newSelected,
|
|
846
863
|
cards,
|
|
864
|
+
unselectedNew,
|
|
847
865
|
discardedTail
|
|
848
866
|
};
|
|
849
867
|
}
|
|
@@ -1942,7 +1960,8 @@ var init_generators = __esm({
|
|
|
1942
1960
|
// src/core/navigators/generators/prescribed.ts
|
|
1943
1961
|
var prescribed_exports = {};
|
|
1944
1962
|
__export(prescribed_exports, {
|
|
1945
|
-
default: () => PrescribedCardsGenerator
|
|
1963
|
+
default: () => PrescribedCardsGenerator,
|
|
1964
|
+
unmetIntroExposeTags: () => unmetIntroExposeTags
|
|
1946
1965
|
});
|
|
1947
1966
|
function dedupe(arr) {
|
|
1948
1967
|
return [...new Set(arr)];
|
|
@@ -1982,6 +2001,19 @@ function formatAge(ms) {
|
|
|
1982
2001
|
if (hours < 24) return `${hours}h`;
|
|
1983
2002
|
return `${Math.round(hours / 24)}d`;
|
|
1984
2003
|
}
|
|
2004
|
+
function unmetIntroExposeTags(tags, userTagElo, minCount) {
|
|
2005
|
+
if (minCount <= 0) return [];
|
|
2006
|
+
const exposeTags = new Set(tags.filter((tag) => tag.startsWith("gpc:expose:")));
|
|
2007
|
+
for (const tag of tags) {
|
|
2008
|
+
if (!tag.startsWith("gpc:intro:")) continue;
|
|
2009
|
+
const suffix = tag.slice("gpc:intro:".length);
|
|
2010
|
+
if (suffix) exposeTags.add(`gpc:expose:${suffix}`);
|
|
2011
|
+
}
|
|
2012
|
+
return [...exposeTags].filter((tag) => {
|
|
2013
|
+
const tagElo = userTagElo[tag];
|
|
2014
|
+
return !tagElo || tagElo.count < minCount;
|
|
2015
|
+
});
|
|
2016
|
+
}
|
|
1985
2017
|
function pickTopByScore(cards, limit) {
|
|
1986
2018
|
return [...cards].sort((a, b) => b.score - a.score || a.cardId.localeCompare(b.cardId)).slice(0, limit);
|
|
1987
2019
|
}
|
|
@@ -2280,6 +2312,7 @@ var init_prescribed = __esm({
|
|
|
2280
2312
|
freshnessWindowSessions: typeof raw.freshnessWindowSessions === "number" ? raw.freshnessWindowSessions : DEFAULT_FRESHNESS_WINDOW,
|
|
2281
2313
|
maxDirectTargetsPerRun: typeof raw.maxDirectTargetsPerRun === "number" ? raw.maxDirectTargetsPerRun : DEFAULT_MAX_DIRECT_PER_RUN,
|
|
2282
2314
|
maxSupportCardsPerRun: typeof raw.maxSupportCardsPerRun === "number" ? raw.maxSupportCardsPerRun : DEFAULT_MAX_SUPPORT_PER_RUN,
|
|
2315
|
+
introExposeMinCount: typeof raw.introExposeMinCount === "number" ? raw.introExposeMinCount : DEFAULT_MIN_COUNT,
|
|
2283
2316
|
hierarchyWalk: {
|
|
2284
2317
|
enabled: raw.hierarchyWalk?.enabled !== false,
|
|
2285
2318
|
maxDepth: typeof raw.hierarchyWalk?.maxDepth === "number" ? raw.hierarchyWalk.maxDepth : DEFAULT_HIERARCHY_DEPTH
|
|
@@ -2355,18 +2388,11 @@ var init_prescribed = __esm({
|
|
|
2355
2388
|
group.hierarchyWalk?.enabled !== false,
|
|
2356
2389
|
group.hierarchyWalk?.maxDepth ?? DEFAULT_HIERARCHY_DEPTH
|
|
2357
2390
|
);
|
|
2358
|
-
const
|
|
2359
|
-
|
|
2360
|
-
|
|
2361
|
-
|
|
2362
|
-
|
|
2363
|
-
exposeTags.add(`gpc:expose:${suffix}`);
|
|
2364
|
-
}
|
|
2365
|
-
}
|
|
2366
|
-
const unmetExposeTags = [...exposeTags].filter((tag) => {
|
|
2367
|
-
const tagElo = userTagElo[tag];
|
|
2368
|
-
return !tagElo || tagElo.count < DEFAULT_MIN_COUNT;
|
|
2369
|
-
});
|
|
2391
|
+
const unmetExposeTags = unmetIntroExposeTags(
|
|
2392
|
+
tags,
|
|
2393
|
+
userTagElo,
|
|
2394
|
+
group.introExposeMinCount ?? DEFAULT_MIN_COUNT
|
|
2395
|
+
);
|
|
2370
2396
|
if (unmetExposeTags.length > 0) {
|
|
2371
2397
|
unmetExposeTags.forEach((tag) => supportTags.add(tag));
|
|
2372
2398
|
}
|
|
@@ -4409,6 +4435,7 @@ var init_Pipeline = __esm({
|
|
|
4409
4435
|
}
|
|
4410
4436
|
logger.debug(`[Pipeline] Filter '${filter.name}': ${beforeScores.size} \u2192 ${cards.length} cards (\u2191${boosted} \u2193${penalized} =${passed})`);
|
|
4411
4437
|
}
|
|
4438
|
+
const scoredCards = cards;
|
|
4412
4439
|
cards = cards.filter((c) => c.score > 0);
|
|
4413
4440
|
const hints = this._ephemeralHints;
|
|
4414
4441
|
if (hints) {
|
|
@@ -4445,7 +4472,8 @@ var init_Pipeline = __esm({
|
|
|
4445
4472
|
cards,
|
|
4446
4473
|
result,
|
|
4447
4474
|
context.userElo,
|
|
4448
|
-
hints ?? void 0
|
|
4475
|
+
hints ?? void 0,
|
|
4476
|
+
scoredCards
|
|
4449
4477
|
);
|
|
4450
4478
|
captureRun(report);
|
|
4451
4479
|
} catch (e) {
|