@intellectif/lk-core 1.10.0 → 1.10.1
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/CHANGELOG.md +16 -0
- package/dist/ai-check.cjs +2 -2
- package/dist/ai-check.js +2 -2
- package/dist/{ai-writing-DLvzBiZN.js → ai-writing-BaaiuU5t.js} +2 -2
- package/dist/{ai-writing-DLvzBiZN.js.map → ai-writing-BaaiuU5t.js.map} +1 -1
- package/dist/{ai-writing-B1pKVkG7.cjs → ai-writing-_wciTWaI.cjs} +2 -2
- package/dist/{ai-writing-B1pKVkG7.cjs.map → ai-writing-_wciTWaI.cjs.map} +1 -1
- package/dist/{index-DLsUnGHt.d.cts → index-BBmID0a6.d.cts} +24 -2
- package/dist/index-BBmID0a6.d.cts.map +1 -0
- package/dist/{index-CxkqS62X.d.ts → index-DGmcCid6.d.ts} +24 -2
- package/dist/index-DGmcCid6.d.ts.map +1 -0
- package/dist/index.cjs +4 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +3 -1
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -2
- package/dist/index.js.map +1 -1
- package/dist/{scoring-Db1CZeAn.cjs → scoring-Bmfu8RS5.cjs} +48 -16
- package/dist/scoring-Bmfu8RS5.cjs.map +1 -0
- package/dist/{scoring-BGKdff2i.js → scoring-hMsEMhCU.js} +48 -16
- package/dist/scoring-hMsEMhCU.js.map +1 -0
- package/dist/scoring.cjs +1 -1
- package/dist/scoring.d.cts +1 -1
- package/dist/scoring.d.ts +1 -1
- package/dist/scoring.js +1 -1
- package/package.json +1 -1
- package/dist/index-CxkqS62X.d.ts.map +0 -1
- package/dist/index-DLsUnGHt.d.cts.map +0 -1
- package/dist/scoring-BGKdff2i.js.map +0 -1
- package/dist/scoring-Db1CZeAn.cjs.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
# @intellectif/lk-core
|
|
2
2
|
|
|
3
|
+
## 1.10.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#157](https://github.com/intellectif/learning-kit/pull/157) [`9e00688`](https://github.com/intellectif/learning-kit/commit/9e00688efb5c21e307b61880de05ddb7ceea78ef) Thanks [@diego28e](https://github.com/diego28e)! - **A rounding policy is checked wherever it is passed: `roundGrade`, `gte`, `computePassThreshold`, `composeAssessmentScore` and `composeTimelineScore` refuse one they cannot apply**
|
|
8
|
+
|
|
9
|
+
**Action required:** only if a policy can reach these functions from untyped configuration. One with an unknown `mode`, or a `dp` that is not a whole number from 0 to 15, now throws a `RangeError` instead of rounding silently. Check stored policies before you upgrade, or catch the error where you compose.
|
|
10
|
+
|
|
11
|
+
- **What changed.** These functions take a `RoundingPolicy` directly and did not check it, unlike every `rounding` option (`score()`, `evaluate()`, `evaluateTries()`, `gradeFromRubric`, `gradeReadAloud`, `gradeSpeakingResponse`). `{ mode: 'half-up' }` with no `dp` computed `10 ** undefined`: `roundGrade` returned `NaN`, `gte` and `computePassThreshold` failed even a perfect score, and `composeAssessmentScore` recorded a `NaN` total, all with no error. They now share the options' check, so the same policy is refused everywhere with the same message, which names each field without serialising it.
|
|
12
|
+
- **A missing policy where one is required** (`roundGrade`, `gte`, a `CompositionPolicy` without `rounding`) throws that `RangeError` rather than a `TypeError`. `computePassThreshold(data, score, null)` compares raw, as with no policy.
|
|
13
|
+
- **Read once per call.** Each function reads the policy once and rounds every side from that copy, so a getter cannot round a score under one `dp` and its threshold under another.
|
|
14
|
+
- **Unchanged:** every well-formed policy returns exactly what it returned. All 819 grade vectors replay unchanged, and the types are the same.
|
|
15
|
+
- **Why a patch:** a fix with no API change. It changes the result only for policies outside `RoundingPolicy`'s documented contract, and those results were wrong.
|
|
16
|
+
|
|
17
|
+
Guide: https://github.com/intellectif/learning-kit/blob/main/docs/upgrading.md#1100--1101-lk-core
|
|
18
|
+
|
|
3
19
|
## 1.10.0
|
|
4
20
|
|
|
5
21
|
### Minor Changes
|
package/dist/ai-check.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_ai_writing = require("./ai-writing-
|
|
3
|
-
const require_scoring = require("./scoring-
|
|
2
|
+
const require_ai_writing = require("./ai-writing-_wciTWaI.cjs");
|
|
3
|
+
const require_scoring = require("./scoring-Bmfu8RS5.cjs");
|
|
4
4
|
// src/ai-check/cases.ts
|
|
5
5
|
/**
|
|
6
6
|
* The items the cases are built from. Small, ordinary language-course content
|
package/dist/ai-check.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { D as checkAiCritique, E as aiCritiqueRequest, Q as checkAiCoaching, Z as aiCoachingRequest, at as aiHintRequest, b as aiDraftsRequest, c as aiVariantsRequest, ct as checkAiExplanation, f as aiGradingRequest, l as checkAiVariants, lt as checkAiHint, m as checkAiGrading, n as checkAiWritingFeedback, rt as aiExplanationRequest, t as aiWritingFeedbackRequest, x as checkAiDrafts } from "./ai-writing-
|
|
2
|
-
import { s as gradeReadAloud } from "./scoring-
|
|
1
|
+
import { D as checkAiCritique, E as aiCritiqueRequest, Q as checkAiCoaching, Z as aiCoachingRequest, at as aiHintRequest, b as aiDraftsRequest, c as aiVariantsRequest, ct as checkAiExplanation, f as aiGradingRequest, l as checkAiVariants, lt as checkAiHint, m as checkAiGrading, n as checkAiWritingFeedback, rt as aiExplanationRequest, t as aiWritingFeedbackRequest, x as checkAiDrafts } from "./ai-writing-BaaiuU5t.js";
|
|
2
|
+
import { s as gradeReadAloud } from "./scoring-hMsEMhCU.js";
|
|
3
3
|
// src/ai-check/cases.ts
|
|
4
4
|
/**
|
|
5
5
|
* The items the cases are built from. Small, ordinary language-course content
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { $ as GROUP_CAPTIONS_REVEAL_DICTATION, A as keyPositionFinding, B as countWords, Ct as passageWithoutPlaceholders, Dt as PLACEHOLDER_RE, G as isMissingId, H as checkMedia, I as LEVEL_PROBABILITY_TOLERANCE, J as isUnwritten, K as isRecord$8, L as levelDistribution, M as normaliseFinding, N as policyFor, R as levelKey, St as numberedPassage, Tt as revealsAnswer, U as coveredPathsOf, V as DRAFT_ISSUE_SEVERITY, W as covers, X as pathKey, Y as issue, Z as refusesEmpty, a as readSchema, bt as containsWords, et as groupCaptionsField, gt as withValidationScope, it as UnknownActivityTypeError, j as finding, ot as alignDictation, q as isUnset, t as getActivityTypeDescriptor, v as SPEAKING_MEASURES, wt as placeholderOrder, xt as fold, z as readRubricLevels } from "./registry-Bw9grsCN.js";
|
|
2
|
-
import { C as canonicalJson, I as isGradeInRange, c as alignReadAloud, g as seededShuffle, l as validateSpeechAssessment, r as score, v as gradeFromRubric } from "./scoring-
|
|
2
|
+
import { C as canonicalJson, I as isGradeInRange, c as alignReadAloud, g as seededShuffle, l as validateSpeechAssessment, r as score, v as gradeFromRubric } from "./scoring-hMsEMhCU.js";
|
|
3
3
|
import { a as INTERACTIVE_VIDEO_ITEM_TYPES, i as validateItemGroup, t as ItemGroupSchema, u as isInteractiveVideoItemType } from "./item-group-Cqng1LPl.js";
|
|
4
4
|
// src/ai-material.ts
|
|
5
5
|
/**
|
|
@@ -5554,4 +5554,4 @@ function checkAiWritingFeedback(raw, request) {
|
|
|
5554
5554
|
}
|
|
5555
5555
|
export { AI_EXPLANATION_TYPES as $, validateDraft as A, optionSet as B, interactiveVideoFromDrafts as C, checkAiCritique as D, aiCritiqueRequest as E, validateItemGroupDraft as F, textsOf as G, shownScore as H, AI_VARIANT_LENGTH_BANDS as I, transcriptOf as J, listMediaRefs as K, AI_VARIANT_NEAR_COPY_THRESHOLD as L, createItemGroupDraft as M, critiqueDrafts as N, createDraft as O, critiqueItemGroupDraft as P, checkAiCoaching as Q, keysOf as R, generateDrafts as S, AI_CRITIQUE_MAX_FINDINGS as T, structureMisses as U, sharedAnswers as V, textSimilarity as W, AI_COACHING_MAX_WORDS as X, AI_COACHING_MAX_TIP_LENGTH as Y, aiCoachingRequest as Z, AI_DRAFTS_MAX_COUNT as _, AI_VARIANTS_MAX_REPAIRS as a, aiHintRequest as at, aiDraftsRequest as b, aiVariantsRequest as c, checkAiExplanation as ct, AI_GRADING_PROBABILITY_TOLERANCE as d, readAiTextResult as dt, AI_HINT_TYPES as et, aiGradingRequest as f, AI_MATERIAL_MAX_LENGTH as ft, AI_WRITING_MAX_FIELD_LENGTH as g, AI_WRITING_MAX_CORRECTIONS as h, AI_VARIANTS_MAX_MATERIAL_LENGTH as i, aiGradeOf as it, createInteractiveVideoDraft as j, critiqueDraft as k, checkAiVariants as l, checkAiHint as lt, checkAiGrading as m, checkAiWritingFeedback as n, aiAllowedByContent as nt, AI_VARIANT_CODE_SEVERITY as o, aiSupports as ot, aiSpeakingGradingRequest as p, mapMediaRefs as q, AI_VARIANTS_MAX_EXEMPLARS as r, aiExplanationRequest as rt, aiVariantsRepairRequest as s, buildAiFacts as st, aiWritingFeedbackRequest as t, AI_TEXT_MAX_LENGTH as tt, generateVariants as u, hintRevealsAnswer as ut, AI_DRAFTS_MAX_REPAIRS as v, AI_CRITIQUE_MAX_FIELD_LENGTH as w, checkAiDrafts as x, aiDraftsRepairRequest as y, lengthMisses as z };
|
|
5556
5556
|
|
|
5557
|
-
//# sourceMappingURL=ai-writing-
|
|
5557
|
+
//# sourceMappingURL=ai-writing-BaaiuU5t.js.map
|