@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
package/dist/core/index.mjs
CHANGED
|
@@ -701,7 +701,7 @@ function parseCardElo(provenance) {
|
|
|
701
701
|
const match = eloEntry.reason.match(/card:\s*(\d+)/);
|
|
702
702
|
return match ? parseInt(match[1], 10) : void 0;
|
|
703
703
|
}
|
|
704
|
-
function buildRunReport(courseId, courseName, generatorName, generators, generatedCount, filters, allCards, selectedCards, userElo, hints) {
|
|
704
|
+
function buildRunReport(courseId, courseName, generatorName, generators, generatedCount, filters, allCards, selectedCards, userElo, hints, scoredCards) {
|
|
705
705
|
const selectedIds = new Set(selectedCards.map((c) => c.cardId));
|
|
706
706
|
const toReport = (card) => ({
|
|
707
707
|
cardId: card.cardId,
|
|
@@ -754,6 +754,23 @@ function buildRunReport(courseId, courseName, generatorName, generators, generat
|
|
|
754
754
|
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.`
|
|
755
755
|
};
|
|
756
756
|
}
|
|
757
|
+
const isUnselectedNew = (c) => !c.reviewID && !selectedIds.has(c.cardId);
|
|
758
|
+
const generatorScore = (c) => c.provenance[0]?.score ?? 0;
|
|
759
|
+
const keptIds = new Set(allCards.map((c) => c.cardId));
|
|
760
|
+
const hintExcluded = (c) => c.score > 0 && !keptIds.has(c.cardId);
|
|
761
|
+
let nextInLine;
|
|
762
|
+
for (const c of allCards) {
|
|
763
|
+
if (isUnselectedNew(c) && (!nextInLine || c.score > nextInLine.score)) nextInLine = c;
|
|
764
|
+
}
|
|
765
|
+
let topGenerated;
|
|
766
|
+
for (const c of scoredCards ?? allCards) {
|
|
767
|
+
if (!isUnselectedNew(c) || hintExcluded(c)) continue;
|
|
768
|
+
if (!topGenerated || generatorScore(c) > generatorScore(topGenerated)) topGenerated = c;
|
|
769
|
+
}
|
|
770
|
+
const unselectedNew = nextInLine || topGenerated ? {
|
|
771
|
+
...nextInLine ? { nextInLine: toReport(nextInLine) } : {},
|
|
772
|
+
...topGenerated && topGenerated.cardId !== nextInLine?.cardId ? { topGenerated: toReport(topGenerated) } : {}
|
|
773
|
+
} : void 0;
|
|
757
774
|
const reviewsSelected = selectedCards.filter((c) => getOrigin(c) === "review").length;
|
|
758
775
|
const newSelected = selectedCards.filter((c) => getOrigin(c) === "new").length;
|
|
759
776
|
return {
|
|
@@ -769,6 +786,7 @@ function buildRunReport(courseId, courseName, generatorName, generators, generat
|
|
|
769
786
|
reviewsSelected,
|
|
770
787
|
newSelected,
|
|
771
788
|
cards,
|
|
789
|
+
unselectedNew,
|
|
772
790
|
discardedTail
|
|
773
791
|
};
|
|
774
792
|
}
|
|
@@ -1867,7 +1885,8 @@ var init_generators = __esm({
|
|
|
1867
1885
|
// src/core/navigators/generators/prescribed.ts
|
|
1868
1886
|
var prescribed_exports = {};
|
|
1869
1887
|
__export(prescribed_exports, {
|
|
1870
|
-
default: () => PrescribedCardsGenerator
|
|
1888
|
+
default: () => PrescribedCardsGenerator,
|
|
1889
|
+
unmetIntroExposeTags: () => unmetIntroExposeTags
|
|
1871
1890
|
});
|
|
1872
1891
|
function dedupe(arr) {
|
|
1873
1892
|
return [...new Set(arr)];
|
|
@@ -1907,6 +1926,19 @@ function formatAge(ms) {
|
|
|
1907
1926
|
if (hours < 24) return `${hours}h`;
|
|
1908
1927
|
return `${Math.round(hours / 24)}d`;
|
|
1909
1928
|
}
|
|
1929
|
+
function unmetIntroExposeTags(tags, userTagElo, minCount) {
|
|
1930
|
+
if (minCount <= 0) return [];
|
|
1931
|
+
const exposeTags = new Set(tags.filter((tag) => tag.startsWith("gpc:expose:")));
|
|
1932
|
+
for (const tag of tags) {
|
|
1933
|
+
if (!tag.startsWith("gpc:intro:")) continue;
|
|
1934
|
+
const suffix = tag.slice("gpc:intro:".length);
|
|
1935
|
+
if (suffix) exposeTags.add(`gpc:expose:${suffix}`);
|
|
1936
|
+
}
|
|
1937
|
+
return [...exposeTags].filter((tag) => {
|
|
1938
|
+
const tagElo = userTagElo[tag];
|
|
1939
|
+
return !tagElo || tagElo.count < minCount;
|
|
1940
|
+
});
|
|
1941
|
+
}
|
|
1910
1942
|
function pickTopByScore(cards, limit) {
|
|
1911
1943
|
return [...cards].sort((a, b) => b.score - a.score || a.cardId.localeCompare(b.cardId)).slice(0, limit);
|
|
1912
1944
|
}
|
|
@@ -2205,6 +2237,7 @@ var init_prescribed = __esm({
|
|
|
2205
2237
|
freshnessWindowSessions: typeof raw.freshnessWindowSessions === "number" ? raw.freshnessWindowSessions : DEFAULT_FRESHNESS_WINDOW,
|
|
2206
2238
|
maxDirectTargetsPerRun: typeof raw.maxDirectTargetsPerRun === "number" ? raw.maxDirectTargetsPerRun : DEFAULT_MAX_DIRECT_PER_RUN,
|
|
2207
2239
|
maxSupportCardsPerRun: typeof raw.maxSupportCardsPerRun === "number" ? raw.maxSupportCardsPerRun : DEFAULT_MAX_SUPPORT_PER_RUN,
|
|
2240
|
+
introExposeMinCount: typeof raw.introExposeMinCount === "number" ? raw.introExposeMinCount : DEFAULT_MIN_COUNT,
|
|
2208
2241
|
hierarchyWalk: {
|
|
2209
2242
|
enabled: raw.hierarchyWalk?.enabled !== false,
|
|
2210
2243
|
maxDepth: typeof raw.hierarchyWalk?.maxDepth === "number" ? raw.hierarchyWalk.maxDepth : DEFAULT_HIERARCHY_DEPTH
|
|
@@ -2280,18 +2313,11 @@ var init_prescribed = __esm({
|
|
|
2280
2313
|
group.hierarchyWalk?.enabled !== false,
|
|
2281
2314
|
group.hierarchyWalk?.maxDepth ?? DEFAULT_HIERARCHY_DEPTH
|
|
2282
2315
|
);
|
|
2283
|
-
const
|
|
2284
|
-
|
|
2285
|
-
|
|
2286
|
-
|
|
2287
|
-
|
|
2288
|
-
exposeTags.add(`gpc:expose:${suffix}`);
|
|
2289
|
-
}
|
|
2290
|
-
}
|
|
2291
|
-
const unmetExposeTags = [...exposeTags].filter((tag) => {
|
|
2292
|
-
const tagElo = userTagElo[tag];
|
|
2293
|
-
return !tagElo || tagElo.count < DEFAULT_MIN_COUNT;
|
|
2294
|
-
});
|
|
2316
|
+
const unmetExposeTags = unmetIntroExposeTags(
|
|
2317
|
+
tags,
|
|
2318
|
+
userTagElo,
|
|
2319
|
+
group.introExposeMinCount ?? DEFAULT_MIN_COUNT
|
|
2320
|
+
);
|
|
2295
2321
|
if (unmetExposeTags.length > 0) {
|
|
2296
2322
|
unmetExposeTags.forEach((tag) => supportTags.add(tag));
|
|
2297
2323
|
}
|
|
@@ -4580,6 +4606,7 @@ var init_Pipeline = __esm({
|
|
|
4580
4606
|
}
|
|
4581
4607
|
logger.debug(`[Pipeline] Filter '${filter.name}': ${beforeScores.size} \u2192 ${cards.length} cards (\u2191${boosted} \u2193${penalized} =${passed})`);
|
|
4582
4608
|
}
|
|
4609
|
+
const scoredCards = cards;
|
|
4583
4610
|
cards = cards.filter((c) => c.score > 0);
|
|
4584
4611
|
const hints = this._ephemeralHints;
|
|
4585
4612
|
if (hints) {
|
|
@@ -4616,7 +4643,8 @@ var init_Pipeline = __esm({
|
|
|
4616
4643
|
cards,
|
|
4617
4644
|
result,
|
|
4618
4645
|
context.userElo,
|
|
4619
|
-
hints ?? void 0
|
|
4646
|
+
hints ?? void 0,
|
|
4647
|
+
scoredCards
|
|
4620
4648
|
);
|
|
4621
4649
|
captureRun(report);
|
|
4622
4650
|
} catch (e) {
|