@intellectif/lk-core 1.6.0 → 1.7.0
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 +20 -0
- package/dist/{ai-i3jwXnpX.d.cts → ai-B1wYrqcB.d.cts} +39 -15
- package/dist/ai-B1wYrqcB.d.cts.map +1 -0
- package/dist/{ai-i3jwXnpX.d.ts → ai-B1wYrqcB.d.ts} +39 -15
- package/dist/ai-B1wYrqcB.d.ts.map +1 -0
- package/dist/ai-check.cjs +13 -6
- package/dist/ai-check.cjs.map +1 -1
- package/dist/ai-check.d.cts +1 -5
- package/dist/ai-check.d.cts.map +1 -1
- package/dist/ai-check.d.ts +1 -5
- package/dist/ai-check.d.ts.map +1 -1
- package/dist/ai-check.js +13 -6
- package/dist/ai-check.js.map +1 -1
- package/dist/{ai-writing-OJ5m_1EB.js → ai-writing-B7oMCt66.js} +46 -43
- package/dist/ai-writing-B7oMCt66.js.map +1 -0
- package/dist/{ai-writing-C4YRVrFi.cjs → ai-writing-DrPTV3R2.cjs} +46 -43
- package/dist/ai-writing-DrPTV3R2.cjs.map +1 -0
- package/dist/{index-DeD8EI1D.d.ts → index-BM8LeDWn.d.cts} +2 -42
- package/dist/index-BM8LeDWn.d.cts.map +1 -0
- package/dist/{index-Uh1u57yq.d.cts → index-BTkMQtws.d.ts} +2 -42
- package/dist/index-BTkMQtws.d.ts.map +1 -0
- package/dist/{index-Dj92T76o.d.ts → index-BU99GFTl.d.ts} +2 -8
- package/dist/index-BU99GFTl.d.ts.map +1 -0
- package/dist/{index-WBHSrIUU.d.ts → index-BdXs4-en.d.ts} +5 -12
- package/dist/index-BdXs4-en.d.ts.map +1 -0
- package/dist/{index-CFRgZLhH.d.cts → index-DP9rvyOz.d.cts} +5 -12
- package/dist/index-DP9rvyOz.d.cts.map +1 -0
- package/dist/{index--U7hHV0s.d.cts → index-XCCoPoTU.d.cts} +2 -8
- package/dist/index-XCCoPoTU.d.cts.map +1 -0
- package/dist/index.cjs +13 -20
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +4 -70
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.ts +4 -70
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +13 -20
- package/dist/index.js.map +1 -1
- package/dist/{item-group-CQRbb8Rx.cjs → item-group-8P3WFuUK.cjs} +4 -6
- package/dist/{item-group-CQRbb8Rx.cjs.map → item-group-8P3WFuUK.cjs.map} +1 -1
- package/dist/{item-group-BbvvH_Ob.js → item-group-CeDk7mfM.js} +4 -6
- package/dist/{item-group-BbvvH_Ob.js.map → item-group-CeDk7mfM.js.map} +1 -1
- package/dist/{registry-B23o9UWh.js → registry-D92hz9iA.js} +60 -89
- package/dist/registry-D92hz9iA.js.map +1 -0
- package/dist/{registry-Ih5n4PVZ.cjs → registry-hzrkTeIT.cjs} +61 -91
- package/dist/registry-hzrkTeIT.cjs.map +1 -0
- package/dist/{schemas-Q2dyOgc2.cjs → schemas-BWeskONy.cjs} +5 -7
- package/dist/{schemas-Q2dyOgc2.cjs.map → schemas-BWeskONy.cjs.map} +1 -1
- package/dist/{schemas-yId-bJhD.js → schemas-C7TViWCg.js} +5 -7
- package/dist/{schemas-yId-bJhD.js.map → schemas-C7TViWCg.js.map} +1 -1
- package/dist/schemas.cjs +3 -3
- package/dist/schemas.d.cts +1 -1
- package/dist/schemas.d.ts +1 -1
- package/dist/schemas.js +3 -3
- package/dist/{scoring-CaPS6q8b.cjs → scoring-CtkCFyFT.cjs} +22 -42
- package/dist/{scoring-CaPS6q8b.cjs.map → scoring-CtkCFyFT.cjs.map} +1 -1
- package/dist/{scoring-CLMdk8i9.js → scoring-DD1GHcLI.js} +22 -42
- package/dist/{scoring-CLMdk8i9.js.map → scoring-DD1GHcLI.js.map} +1 -1
- package/dist/scoring.cjs +2 -2
- package/dist/scoring.d.cts +2 -2
- package/dist/scoring.d.ts +2 -2
- package/dist/scoring.js +2 -2
- package/dist/{xapi-BX0hvRRB.cjs → xapi-7btSpx6v.cjs} +5 -8
- package/dist/{xapi-BX0hvRRB.cjs.map → xapi-7btSpx6v.cjs.map} +1 -1
- package/dist/{xapi-Cdk9fTvV.js → xapi-Cgicg-zU.js} +5 -8
- package/dist/{xapi-Cdk9fTvV.js.map → xapi-Cgicg-zU.js.map} +1 -1
- package/dist/xapi.cjs +1 -1
- package/dist/xapi.d.cts +1 -1
- package/dist/xapi.d.ts +1 -1
- package/dist/xapi.js +1 -1
- package/package.json +2 -2
- package/dist/ai-i3jwXnpX.d.cts.map +0 -1
- package/dist/ai-i3jwXnpX.d.ts.map +0 -1
- package/dist/ai-writing-C4YRVrFi.cjs.map +0 -1
- package/dist/ai-writing-OJ5m_1EB.js.map +0 -1
- package/dist/index--U7hHV0s.d.cts.map +0 -1
- package/dist/index-CFRgZLhH.d.cts.map +0 -1
- package/dist/index-DeD8EI1D.d.ts.map +0 -1
- package/dist/index-Dj92T76o.d.ts.map +0 -1
- package/dist/index-Uh1u57yq.d.cts.map +0 -1
- package/dist/index-WBHSrIUU.d.ts.map +0 -1
- package/dist/registry-B23o9UWh.js.map +0 -1
- package/dist/registry-Ih5n4PVZ.cjs.map +0 -1
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { At as ActivityType, I as AiGradingJudgement, In as Grader, Jt as ItemOutcome, Ln as GraderConfiguration, Mn as CriterionScore, Nn as GradeRecord, Pn as GradeRouting, Pt as DictationData, Tt as ActivityData, Yt as LearnerResponse, _n as WrittenResponseData, gn as ValidationResult, in as ReadAloudData, pn as ScoringResult, sn as ReadAloudLearnerResponse, yn as WrittenResponseRubric } from "./ai-
|
|
2
|
-
//#region src/scoring/rounding.d.ts
|
|
1
|
+
import { At as ActivityType, I as AiGradingJudgement, In as Grader, Jt as ItemOutcome, Ln as GraderConfiguration, Mn as CriterionScore, Nn as GradeRecord, Pn as GradeRouting, Pt as DictationData, Tt as ActivityData, Yt as LearnerResponse, _n as WrittenResponseData, gn as ValidationResult, in as ReadAloudData, pn as ScoringResult, sn as ReadAloudLearnerResponse, yn as WrittenResponseRubric } from "./ai-B1wYrqcB.cjs";
|
|
3
2
|
/**
|
|
4
3
|
* Rounding for assessment scores.
|
|
5
4
|
*
|
|
@@ -58,8 +57,6 @@ interface Band {
|
|
|
58
57
|
* Returns `null` when the value reaches no band's minimum.
|
|
59
58
|
*/
|
|
60
59
|
declare function classifyBand(value: number, bands: readonly Band[]): Band | null;
|
|
61
|
-
//#endregion
|
|
62
|
-
//#region src/types/speech.d.ts
|
|
63
60
|
/**
|
|
64
61
|
* How the assessor classified a word against the reference text: `none`, read
|
|
65
62
|
* as written; `mispronunciation`, read but not well enough; `omission`, in the
|
|
@@ -289,8 +286,6 @@ interface WavInspectionPolicy {
|
|
|
289
286
|
/** The window length, in milliseconds. Finite, and above 0. */
|
|
290
287
|
frameMs: number;
|
|
291
288
|
}
|
|
292
|
-
//#endregion
|
|
293
|
-
//#region src/scoring/compose.d.ts
|
|
294
289
|
/**
|
|
295
290
|
* Sectioned assessment scoring — weights, per-section thresholds, and an
|
|
296
291
|
* explicit reason when an attempt fails.
|
|
@@ -446,8 +441,6 @@ interface AssessmentScore {
|
|
|
446
441
|
* `rejectedSlotIds`.
|
|
447
442
|
*/
|
|
448
443
|
declare function composeAssessmentScore(sections: readonly AssessmentSectionInput[], policy: CompositionPolicy): AssessmentScore;
|
|
449
|
-
//#endregion
|
|
450
|
-
//#region src/types/item-scoring.d.ts
|
|
451
444
|
/**
|
|
452
445
|
* How the questions on a paper are scored when a learner can try again or ask
|
|
453
446
|
* for hints: how many tries there are, which one counts, and what each try and
|
|
@@ -563,8 +556,6 @@ interface ItemTriesScore {
|
|
|
563
556
|
*/
|
|
564
557
|
tries: ItemTryScore[];
|
|
565
558
|
}
|
|
566
|
-
//#endregion
|
|
567
|
-
//#region src/grading.d.ts
|
|
568
559
|
/** Options for {@link gradeFromRubric}. */
|
|
569
560
|
interface GradeFromRubricOptions {
|
|
570
561
|
/**
|
|
@@ -652,8 +643,6 @@ declare function outcomeFromGrade(grade: GradeRecord): ItemOutcome;
|
|
|
652
643
|
declare function hasGrade(outcome: ItemOutcome): outcome is Extract<ItemOutcome, {
|
|
653
644
|
status: 'scored' | 'graded';
|
|
654
645
|
}>;
|
|
655
|
-
//#endregion
|
|
656
|
-
//#region src/scoring/assisted/calibration.d.ts
|
|
657
646
|
/** One response marked twice: by the model, and by a person — and, optionally, a second person. */
|
|
658
647
|
interface CalibrationPair {
|
|
659
648
|
/** The model's grade, from `gradeFromJudgement`: its `grader` names the model and the prompt. */
|
|
@@ -769,8 +758,6 @@ declare function calibrationReport(pairs: readonly CalibrationPair[], scope: Cal
|
|
|
769
758
|
ok: false;
|
|
770
759
|
reason: string;
|
|
771
760
|
};
|
|
772
|
-
//#endregion
|
|
773
|
-
//#region src/scoring/assisted/grade-from-judgement.d.ts
|
|
774
761
|
/** Options for {@link gradeFromJudgement}: those of `gradeFromRubric`, but the feedback is the model's. */
|
|
775
762
|
type GradeFromJudgementOptions = Omit<GradeFromRubricOptions, 'feedback'>;
|
|
776
763
|
/**
|
|
@@ -792,8 +779,6 @@ declare function gradeFromJudgement(judgement: AiGradingJudgement, data: Written
|
|
|
792
779
|
unscorable: true;
|
|
793
780
|
reason: string;
|
|
794
781
|
};
|
|
795
|
-
//#endregion
|
|
796
|
-
//#region src/scoring/assisted/routing.d.ts
|
|
797
782
|
/**
|
|
798
783
|
* The thresholds a calibration report must meet before a model's grade counts.
|
|
799
784
|
* The SDK has no default for any of them, as rounding has no default `dp`: a
|
|
@@ -887,8 +872,6 @@ declare function routeGrade(grade: GradeRecord, context: GradeRoutingContext): G
|
|
|
887
872
|
* attempt stays `provisional` until a person's grade replaces it.
|
|
888
873
|
*/
|
|
889
874
|
declare function outcomeFromRoutedGrade(grade: GradeRecord, routing: GradeRouting): ItemOutcome;
|
|
890
|
-
//#endregion
|
|
891
|
-
//#region src/scoring/dictation/align.d.ts
|
|
892
875
|
/** One transcript word, or one extra word the learner typed, after alignment. */
|
|
893
876
|
interface DictationWordAlignment {
|
|
894
877
|
/** `w<n>`, the 1-based position of a transcript word; absent for an extra word. */
|
|
@@ -966,8 +949,6 @@ declare function dictationReferenceWords(data: DictationReference): readonly (re
|
|
|
966
949
|
* own character similarity.
|
|
967
950
|
*/
|
|
968
951
|
declare function alignDictation(data: DictationReference, text: string): DictationAlignment;
|
|
969
|
-
//#endregion
|
|
970
|
-
//#region src/scoring/dictation/chars.d.ts
|
|
971
952
|
/** One code-point edit between a reference string and an attempt. */
|
|
972
953
|
interface DictationCharOp {
|
|
973
954
|
op: 'equal' | 'substitute' | 'missing' | 'extra';
|
|
@@ -988,8 +969,6 @@ interface DictationCharOp {
|
|
|
988
969
|
* scorer does not call it, and a display computes it once per result.
|
|
989
970
|
*/
|
|
990
971
|
declare function diffDictationChars(reference: string, attempt: string): DictationCharOp[];
|
|
991
|
-
//#endregion
|
|
992
|
-
//#region src/scoring/dictation/normalize.d.ts
|
|
993
972
|
/**
|
|
994
973
|
* The longest transcript a dictation accepts, in code points, before and after
|
|
995
974
|
* its equivalences are applied — and its rules may not grow it past twice
|
|
@@ -1016,8 +995,6 @@ declare const DICTATION_MAX_EQUIVALENCES = 100;
|
|
|
1016
995
|
* than this many, for the same reason.
|
|
1017
996
|
*/
|
|
1018
997
|
declare const DICTATION_MAX_ACCEPTED_TRANSCRIPTS = 10;
|
|
1019
|
-
//#endregion
|
|
1020
|
-
//#region src/scoring/item-scoring.d.ts
|
|
1021
998
|
/**
|
|
1022
999
|
* The policy that changes nothing: one try, nothing costs anything, the first
|
|
1023
1000
|
* try counts. What an absent policy resolves to, and exactly how questions were
|
|
@@ -1076,8 +1053,6 @@ declare function resolveItemScoringPolicy(policy: unknown): ResolvedItemScoringP
|
|
|
1076
1053
|
* positive and finite, `score` finite from 0 to it.
|
|
1077
1054
|
*/
|
|
1078
1055
|
declare function scoreTries(tries: readonly ItemTry[], policy?: ItemScoringPolicy | ResolvedItemScoringPolicy | null): ItemTriesScore;
|
|
1079
|
-
//#endregion
|
|
1080
|
-
//#region src/scoring/pass-threshold.d.ts
|
|
1081
1056
|
/** Default minimum scaled score required to pass when `passThreshold` is absent. */
|
|
1082
1057
|
declare const DEFAULT_PASS_THRESHOLD = 0.7;
|
|
1083
1058
|
/**
|
|
@@ -1093,8 +1068,6 @@ declare const DEFAULT_PASS_THRESHOLD = 0.7;
|
|
|
1093
1068
|
* always been.
|
|
1094
1069
|
*/
|
|
1095
1070
|
declare function computePassThreshold(activityData: ActivityData, score: number, rounding?: RoundingPolicy): boolean;
|
|
1096
|
-
//#endregion
|
|
1097
|
-
//#region src/scoring/speech/align.d.ts
|
|
1098
1071
|
/**
|
|
1099
1072
|
* Pairs the words of `assessment` with the words of `data.referenceText`, in
|
|
1100
1073
|
* reading order: what was read as written, what was mispronounced, what was
|
|
@@ -1143,8 +1116,6 @@ declare function computePassThreshold(activityData: ActivityData, score: number,
|
|
|
1143
1116
|
* {@link SpeechAssessment}; check it with `validateSpeechAssessment` first.
|
|
1144
1117
|
*/
|
|
1145
1118
|
declare function alignReadAloud(data: Pick<ReadAloudData, 'referenceText'>, assessment: SpeechAssessment): ReadAloudWordAlignment[];
|
|
1146
|
-
//#endregion
|
|
1147
|
-
//#region src/scoring/speech/assessment.d.ts
|
|
1148
1119
|
/**
|
|
1149
1120
|
* Checks that `value` is a well-formed {@link SpeechAssessment}. It answers
|
|
1150
1121
|
* rather than throwing: anything that is not one — a non-object, an unknown key
|
|
@@ -1173,8 +1144,6 @@ declare function alignReadAloud(data: Pick<ReadAloudData, 'referenceText'>, asse
|
|
|
1173
1144
|
* to a learner's recording is decided when it is graded.
|
|
1174
1145
|
*/
|
|
1175
1146
|
declare function validateSpeechAssessment(value: unknown): ValidationResult<SpeechAssessment>;
|
|
1176
|
-
//#endregion
|
|
1177
|
-
//#region src/scoring/speech/grade.d.ts
|
|
1178
1147
|
/**
|
|
1179
1148
|
* Grades a read-aloud take from a {@link SpeechAssessment} the application
|
|
1180
1149
|
* obtained, the response that was submitted, and the server's own measurement
|
|
@@ -1206,8 +1175,6 @@ declare function validateSpeechAssessment(value: unknown): ValidationResult<Spee
|
|
|
1206
1175
|
* simply be missing from the grade; grade against the full data server-side.
|
|
1207
1176
|
*/
|
|
1208
1177
|
declare function gradeReadAloud(data: ReadAloudData, response: ReadAloudLearnerResponse, assessment: SpeechAssessment | null, options: GradeReadAloudOptions): GradeRecord | SpeechUnscorable;
|
|
1209
|
-
//#endregion
|
|
1210
|
-
//#region src/scoring/speech/limits.d.ts
|
|
1211
1178
|
/**
|
|
1212
1179
|
* The longest reference text a read-aloud item accepts, in code points, before
|
|
1213
1180
|
* and after normalisation. It is the dictation transcript cap on purpose: the
|
|
@@ -1235,8 +1202,6 @@ declare const READ_ALOUD_MAX_DIMENSION_WEIGHT = 1000;
|
|
|
1235
1202
|
* written with, and what they spell once normalised.
|
|
1236
1203
|
*/
|
|
1237
1204
|
declare const SPEECH_ASSESSMENT_MAX_WORDS = 1000;
|
|
1238
|
-
//#endregion
|
|
1239
|
-
//#region src/scoring/speech/wav.d.ts
|
|
1240
1205
|
/**
|
|
1241
1206
|
* Reads a 16-bit PCM WAV and measures it: `durationMs`, `sampleRate`,
|
|
1242
1207
|
* `channels`, the loudest sample as `peakDbfs`, and `voicedMs`, the time in
|
|
@@ -1261,8 +1226,6 @@ declare const SPEECH_ASSESSMENT_MAX_WORDS = 1000;
|
|
|
1261
1226
|
* or `frameMs` is not a finite number above 0.
|
|
1262
1227
|
*/
|
|
1263
1228
|
declare function inspectWav(bytes: Uint8Array, policy: WavInspectionPolicy): WavInspection;
|
|
1264
|
-
//#endregion
|
|
1265
|
-
//#region src/scoring/unscorable.d.ts
|
|
1266
1229
|
/**
|
|
1267
1230
|
* Lifts a result that cannot be graded — a `SpeechUnscorable` from
|
|
1268
1231
|
* `gradeReadAloud`, or anything else carrying a `code` and a `reason` — into
|
|
@@ -1276,8 +1239,6 @@ declare function outcomeFromUnscorable(result: {
|
|
|
1276
1239
|
code: string;
|
|
1277
1240
|
reason: string;
|
|
1278
1241
|
}): ItemOutcome;
|
|
1279
|
-
//#endregion
|
|
1280
|
-
//#region src/scoring/index.d.ts
|
|
1281
1242
|
/**
|
|
1282
1243
|
* Options for {@link score} and {@link evaluate}. Additive: with none, both
|
|
1283
1244
|
* behave exactly as they always have.
|
|
@@ -1390,6 +1351,5 @@ interface ItemTriesOutcome {
|
|
|
1390
1351
|
* is everywhere else.
|
|
1391
1352
|
*/
|
|
1392
1353
|
declare function evaluateTries(data: ActivityData, responses: readonly LearnerResponse[], options?: EvaluateOptions): ItemTriesOutcome;
|
|
1393
|
-
//#endregion
|
|
1394
1354
|
export { hasGrade as $, diffDictationChars as A, Band as At, outcomeFromRoutedGrade as B, validateItemScoringPolicy as C, SpeechSyllable as Ct, DICTATION_MAX_TEXT_LENGTH as D, SpeechWordError as Dt, DICTATION_MAX_EQUIVALENCE_LENGTH as E, SpeechWord as Et, dictationReferenceWords as F, roundGrade as Ft, CalibrationReport as G, GradeFromJudgementOptions as H, CalibrationThresholds as I, TotalCalibration as J, CalibrationScope as K, GradeRoutingContext as L, DictationReference as M, RoundingPolicy as Mt, DictationWordAlignment as N, classifyBand as Nt, DICTATION_MAX_TRANSCRIPT_LENGTH as O, WavInspection as Ot, alignDictation as P, gte as Pt, gradeFromRubric as Q, GradeRoutingPolicy as R, scoreTries as S, SpeechPlausibilityPolicy as St, DICTATION_MAX_EQUIVALENCES as T, SpeechUnscorableCode as Tt, gradeFromJudgement as U, routeGrade as V, CalibrationPair as W, graderConfiguration as X, calibrationReport as Y, GradeFromRubricOptions as Z, DEFAULT_PASS_THRESHOLD as _, ReadAloudWordState as _t, evaluateTries as a, ItemTry as at, ITEM_SCORING_MAX_RETRIES as b, SpeechPhoneme as bt, inspectWav as c, AssessmentScore as ct, READ_ALOUD_MAX_SECONDS as d, PassFailureReason as dt, outcomeFromGrade as et, READ_ALOUD_MAX_TAKES as f, ScoredItem as ft, alignReadAloud as g, ReadAloudWordAlignment as gt, validateSpeechAssessment as h, GradeReadAloudOptions as ht, evaluate as i, ItemTriesScore as it, DictationAlignment as j, RoundingMode as jt, DictationCharOp as k, WavInspectionPolicy as kt, READ_ALOUD_MAX_DIMENSION_WEIGHT as l, AssessmentSectionInput as lt, gradeReadAloud as m, composeAssessmentScore as mt, ItemTriesOutcome as n, ItemScoringPolicy as nt, score as o, ItemTryScore as ot, SPEECH_ASSESSMENT_MAX_WORDS as p, SectionScore as pt, CriterionCalibration as q, ScoringOptions as r, ItemScoringPolicyIssue as rt, outcomeFromUnscorable as s, ResolvedItemScoringPolicy as st, EvaluateOptions as t, ItemScoringCount as tt, READ_ALOUD_MAX_REFERENCE_LENGTH as u, CompositionPolicy as ut, computePassThreshold as v, SpeechAssessment as vt, DICTATION_MAX_ACCEPTED_TRANSCRIPTS as w, SpeechUnscorable as wt, resolveItemScoringPolicy as x, SpeechPhonemeCandidate as xt, DEFAULT_ITEM_SCORING_POLICY as y, SpeechMeasurement as yt, inAuditSample as z };
|
|
1395
|
-
//# sourceMappingURL=index-
|
|
1355
|
+
//# sourceMappingURL=index-BM8LeDWn.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index-BM8LeDWn.d.cts","names":[],"sources":["../src/scoring/rounding.ts","../src/types/speech.ts","../src/scoring/compose.ts","../src/types/item-scoring.ts","../src/grading.ts","../src/scoring/assisted/calibration.ts","../src/scoring/assisted/grade-from-judgement.ts","../src/scoring/assisted/routing.ts","../src/scoring/dictation/align.ts","../src/scoring/dictation/chars.ts","../src/scoring/dictation/normalize.ts","../src/scoring/item-scoring.ts","../src/scoring/pass-threshold.ts","../src/scoring/speech/align.ts","../src/scoring/speech/assessment.ts","../src/scoring/speech/grade.ts","../src/scoring/speech/limits.ts","../src/scoring/speech/wav.ts","../src/scoring/unscorable.ts","../src/scoring/index.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;KAoBY;;UAGK;EACf,MAAM;;EAEN;;;;;;;;;iBAqFc,WAAW,eAAe,QAAQ;;;;;;;;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BACR,cAAc;;;;;;;;cClJJ;;cAGA;;cAGA;;;;;;cAOA;;;;;;;;;cAUA;;;;;;;;;;;;;;;;;;;;;;;;iBC8EG,WAAW,OAAO,YAAY,QAAQ,sBAAsB;;;;;;;;;;iBCtG5D,sBAAsB;EAAU;EAAc;IAAmB;;;;;UCsHhE;;;;;;;;;;;;;EAaf,WAAW;;;;;;UAOI,wBAAwB;;;;;;;;;;;;;;;;EAgBvC,UAAU;;;;;;;;;;;;;;;iBAgBI,MACd,cAAc,cACd,cAAc,cACd,iBAAiB,iBACjB,UAAU,iBACT;;;;;;;;;;;;;;;;;;;;;;iBA0Ca,SACd,MAAM,cACN,UAAU,iBACV,UAAU,kBACT;;UA0Ec;;;;;;;;EAQf,SAAS;;EAET;;;;;;EAMA,OAAO;;;;;;;;;;;;;;;;;iBAkBO,cACd,MAAM,cACN,oBAAoB,mBACpB,UAAU,kBACT"}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { At as ActivityType, I as AiGradingJudgement, In as Grader, Jt as ItemOutcome, Ln as GraderConfiguration, Mn as CriterionScore, Nn as GradeRecord, Pn as GradeRouting, Pt as DictationData, Tt as ActivityData, Yt as LearnerResponse, _n as WrittenResponseData, gn as ValidationResult, in as ReadAloudData, pn as ScoringResult, sn as ReadAloudLearnerResponse, yn as WrittenResponseRubric } from "./ai-
|
|
2
|
-
//#region src/scoring/rounding.d.ts
|
|
1
|
+
import { At as ActivityType, I as AiGradingJudgement, In as Grader, Jt as ItemOutcome, Ln as GraderConfiguration, Mn as CriterionScore, Nn as GradeRecord, Pn as GradeRouting, Pt as DictationData, Tt as ActivityData, Yt as LearnerResponse, _n as WrittenResponseData, gn as ValidationResult, in as ReadAloudData, pn as ScoringResult, sn as ReadAloudLearnerResponse, yn as WrittenResponseRubric } from "./ai-B1wYrqcB.js";
|
|
3
2
|
/**
|
|
4
3
|
* Rounding for assessment scores.
|
|
5
4
|
*
|
|
@@ -58,8 +57,6 @@ interface Band {
|
|
|
58
57
|
* Returns `null` when the value reaches no band's minimum.
|
|
59
58
|
*/
|
|
60
59
|
declare function classifyBand(value: number, bands: readonly Band[]): Band | null;
|
|
61
|
-
//#endregion
|
|
62
|
-
//#region src/types/speech.d.ts
|
|
63
60
|
/**
|
|
64
61
|
* How the assessor classified a word against the reference text: `none`, read
|
|
65
62
|
* as written; `mispronunciation`, read but not well enough; `omission`, in the
|
|
@@ -289,8 +286,6 @@ interface WavInspectionPolicy {
|
|
|
289
286
|
/** The window length, in milliseconds. Finite, and above 0. */
|
|
290
287
|
frameMs: number;
|
|
291
288
|
}
|
|
292
|
-
//#endregion
|
|
293
|
-
//#region src/scoring/compose.d.ts
|
|
294
289
|
/**
|
|
295
290
|
* Sectioned assessment scoring — weights, per-section thresholds, and an
|
|
296
291
|
* explicit reason when an attempt fails.
|
|
@@ -446,8 +441,6 @@ interface AssessmentScore {
|
|
|
446
441
|
* `rejectedSlotIds`.
|
|
447
442
|
*/
|
|
448
443
|
declare function composeAssessmentScore(sections: readonly AssessmentSectionInput[], policy: CompositionPolicy): AssessmentScore;
|
|
449
|
-
//#endregion
|
|
450
|
-
//#region src/types/item-scoring.d.ts
|
|
451
444
|
/**
|
|
452
445
|
* How the questions on a paper are scored when a learner can try again or ask
|
|
453
446
|
* for hints: how many tries there are, which one counts, and what each try and
|
|
@@ -563,8 +556,6 @@ interface ItemTriesScore {
|
|
|
563
556
|
*/
|
|
564
557
|
tries: ItemTryScore[];
|
|
565
558
|
}
|
|
566
|
-
//#endregion
|
|
567
|
-
//#region src/grading.d.ts
|
|
568
559
|
/** Options for {@link gradeFromRubric}. */
|
|
569
560
|
interface GradeFromRubricOptions {
|
|
570
561
|
/**
|
|
@@ -652,8 +643,6 @@ declare function outcomeFromGrade(grade: GradeRecord): ItemOutcome;
|
|
|
652
643
|
declare function hasGrade(outcome: ItemOutcome): outcome is Extract<ItemOutcome, {
|
|
653
644
|
status: 'scored' | 'graded';
|
|
654
645
|
}>;
|
|
655
|
-
//#endregion
|
|
656
|
-
//#region src/scoring/assisted/calibration.d.ts
|
|
657
646
|
/** One response marked twice: by the model, and by a person — and, optionally, a second person. */
|
|
658
647
|
interface CalibrationPair {
|
|
659
648
|
/** The model's grade, from `gradeFromJudgement`: its `grader` names the model and the prompt. */
|
|
@@ -769,8 +758,6 @@ declare function calibrationReport(pairs: readonly CalibrationPair[], scope: Cal
|
|
|
769
758
|
ok: false;
|
|
770
759
|
reason: string;
|
|
771
760
|
};
|
|
772
|
-
//#endregion
|
|
773
|
-
//#region src/scoring/assisted/grade-from-judgement.d.ts
|
|
774
761
|
/** Options for {@link gradeFromJudgement}: those of `gradeFromRubric`, but the feedback is the model's. */
|
|
775
762
|
type GradeFromJudgementOptions = Omit<GradeFromRubricOptions, 'feedback'>;
|
|
776
763
|
/**
|
|
@@ -792,8 +779,6 @@ declare function gradeFromJudgement(judgement: AiGradingJudgement, data: Written
|
|
|
792
779
|
unscorable: true;
|
|
793
780
|
reason: string;
|
|
794
781
|
};
|
|
795
|
-
//#endregion
|
|
796
|
-
//#region src/scoring/assisted/routing.d.ts
|
|
797
782
|
/**
|
|
798
783
|
* The thresholds a calibration report must meet before a model's grade counts.
|
|
799
784
|
* The SDK has no default for any of them, as rounding has no default `dp`: a
|
|
@@ -887,8 +872,6 @@ declare function routeGrade(grade: GradeRecord, context: GradeRoutingContext): G
|
|
|
887
872
|
* attempt stays `provisional` until a person's grade replaces it.
|
|
888
873
|
*/
|
|
889
874
|
declare function outcomeFromRoutedGrade(grade: GradeRecord, routing: GradeRouting): ItemOutcome;
|
|
890
|
-
//#endregion
|
|
891
|
-
//#region src/scoring/dictation/align.d.ts
|
|
892
875
|
/** One transcript word, or one extra word the learner typed, after alignment. */
|
|
893
876
|
interface DictationWordAlignment {
|
|
894
877
|
/** `w<n>`, the 1-based position of a transcript word; absent for an extra word. */
|
|
@@ -966,8 +949,6 @@ declare function dictationReferenceWords(data: DictationReference): readonly (re
|
|
|
966
949
|
* own character similarity.
|
|
967
950
|
*/
|
|
968
951
|
declare function alignDictation(data: DictationReference, text: string): DictationAlignment;
|
|
969
|
-
//#endregion
|
|
970
|
-
//#region src/scoring/dictation/chars.d.ts
|
|
971
952
|
/** One code-point edit between a reference string and an attempt. */
|
|
972
953
|
interface DictationCharOp {
|
|
973
954
|
op: 'equal' | 'substitute' | 'missing' | 'extra';
|
|
@@ -988,8 +969,6 @@ interface DictationCharOp {
|
|
|
988
969
|
* scorer does not call it, and a display computes it once per result.
|
|
989
970
|
*/
|
|
990
971
|
declare function diffDictationChars(reference: string, attempt: string): DictationCharOp[];
|
|
991
|
-
//#endregion
|
|
992
|
-
//#region src/scoring/dictation/normalize.d.ts
|
|
993
972
|
/**
|
|
994
973
|
* The longest transcript a dictation accepts, in code points, before and after
|
|
995
974
|
* its equivalences are applied — and its rules may not grow it past twice
|
|
@@ -1016,8 +995,6 @@ declare const DICTATION_MAX_EQUIVALENCES = 100;
|
|
|
1016
995
|
* than this many, for the same reason.
|
|
1017
996
|
*/
|
|
1018
997
|
declare const DICTATION_MAX_ACCEPTED_TRANSCRIPTS = 10;
|
|
1019
|
-
//#endregion
|
|
1020
|
-
//#region src/scoring/item-scoring.d.ts
|
|
1021
998
|
/**
|
|
1022
999
|
* The policy that changes nothing: one try, nothing costs anything, the first
|
|
1023
1000
|
* try counts. What an absent policy resolves to, and exactly how questions were
|
|
@@ -1076,8 +1053,6 @@ declare function resolveItemScoringPolicy(policy: unknown): ResolvedItemScoringP
|
|
|
1076
1053
|
* positive and finite, `score` finite from 0 to it.
|
|
1077
1054
|
*/
|
|
1078
1055
|
declare function scoreTries(tries: readonly ItemTry[], policy?: ItemScoringPolicy | ResolvedItemScoringPolicy | null): ItemTriesScore;
|
|
1079
|
-
//#endregion
|
|
1080
|
-
//#region src/scoring/pass-threshold.d.ts
|
|
1081
1056
|
/** Default minimum scaled score required to pass when `passThreshold` is absent. */
|
|
1082
1057
|
declare const DEFAULT_PASS_THRESHOLD = 0.7;
|
|
1083
1058
|
/**
|
|
@@ -1093,8 +1068,6 @@ declare const DEFAULT_PASS_THRESHOLD = 0.7;
|
|
|
1093
1068
|
* always been.
|
|
1094
1069
|
*/
|
|
1095
1070
|
declare function computePassThreshold(activityData: ActivityData, score: number, rounding?: RoundingPolicy): boolean;
|
|
1096
|
-
//#endregion
|
|
1097
|
-
//#region src/scoring/speech/align.d.ts
|
|
1098
1071
|
/**
|
|
1099
1072
|
* Pairs the words of `assessment` with the words of `data.referenceText`, in
|
|
1100
1073
|
* reading order: what was read as written, what was mispronounced, what was
|
|
@@ -1143,8 +1116,6 @@ declare function computePassThreshold(activityData: ActivityData, score: number,
|
|
|
1143
1116
|
* {@link SpeechAssessment}; check it with `validateSpeechAssessment` first.
|
|
1144
1117
|
*/
|
|
1145
1118
|
declare function alignReadAloud(data: Pick<ReadAloudData, 'referenceText'>, assessment: SpeechAssessment): ReadAloudWordAlignment[];
|
|
1146
|
-
//#endregion
|
|
1147
|
-
//#region src/scoring/speech/assessment.d.ts
|
|
1148
1119
|
/**
|
|
1149
1120
|
* Checks that `value` is a well-formed {@link SpeechAssessment}. It answers
|
|
1150
1121
|
* rather than throwing: anything that is not one — a non-object, an unknown key
|
|
@@ -1173,8 +1144,6 @@ declare function alignReadAloud(data: Pick<ReadAloudData, 'referenceText'>, asse
|
|
|
1173
1144
|
* to a learner's recording is decided when it is graded.
|
|
1174
1145
|
*/
|
|
1175
1146
|
declare function validateSpeechAssessment(value: unknown): ValidationResult<SpeechAssessment>;
|
|
1176
|
-
//#endregion
|
|
1177
|
-
//#region src/scoring/speech/grade.d.ts
|
|
1178
1147
|
/**
|
|
1179
1148
|
* Grades a read-aloud take from a {@link SpeechAssessment} the application
|
|
1180
1149
|
* obtained, the response that was submitted, and the server's own measurement
|
|
@@ -1206,8 +1175,6 @@ declare function validateSpeechAssessment(value: unknown): ValidationResult<Spee
|
|
|
1206
1175
|
* simply be missing from the grade; grade against the full data server-side.
|
|
1207
1176
|
*/
|
|
1208
1177
|
declare function gradeReadAloud(data: ReadAloudData, response: ReadAloudLearnerResponse, assessment: SpeechAssessment | null, options: GradeReadAloudOptions): GradeRecord | SpeechUnscorable;
|
|
1209
|
-
//#endregion
|
|
1210
|
-
//#region src/scoring/speech/limits.d.ts
|
|
1211
1178
|
/**
|
|
1212
1179
|
* The longest reference text a read-aloud item accepts, in code points, before
|
|
1213
1180
|
* and after normalisation. It is the dictation transcript cap on purpose: the
|
|
@@ -1235,8 +1202,6 @@ declare const READ_ALOUD_MAX_DIMENSION_WEIGHT = 1000;
|
|
|
1235
1202
|
* written with, and what they spell once normalised.
|
|
1236
1203
|
*/
|
|
1237
1204
|
declare const SPEECH_ASSESSMENT_MAX_WORDS = 1000;
|
|
1238
|
-
//#endregion
|
|
1239
|
-
//#region src/scoring/speech/wav.d.ts
|
|
1240
1205
|
/**
|
|
1241
1206
|
* Reads a 16-bit PCM WAV and measures it: `durationMs`, `sampleRate`,
|
|
1242
1207
|
* `channels`, the loudest sample as `peakDbfs`, and `voicedMs`, the time in
|
|
@@ -1261,8 +1226,6 @@ declare const SPEECH_ASSESSMENT_MAX_WORDS = 1000;
|
|
|
1261
1226
|
* or `frameMs` is not a finite number above 0.
|
|
1262
1227
|
*/
|
|
1263
1228
|
declare function inspectWav(bytes: Uint8Array, policy: WavInspectionPolicy): WavInspection;
|
|
1264
|
-
//#endregion
|
|
1265
|
-
//#region src/scoring/unscorable.d.ts
|
|
1266
1229
|
/**
|
|
1267
1230
|
* Lifts a result that cannot be graded — a `SpeechUnscorable` from
|
|
1268
1231
|
* `gradeReadAloud`, or anything else carrying a `code` and a `reason` — into
|
|
@@ -1276,8 +1239,6 @@ declare function outcomeFromUnscorable(result: {
|
|
|
1276
1239
|
code: string;
|
|
1277
1240
|
reason: string;
|
|
1278
1241
|
}): ItemOutcome;
|
|
1279
|
-
//#endregion
|
|
1280
|
-
//#region src/scoring/index.d.ts
|
|
1281
1242
|
/**
|
|
1282
1243
|
* Options for {@link score} and {@link evaluate}. Additive: with none, both
|
|
1283
1244
|
* behave exactly as they always have.
|
|
@@ -1390,6 +1351,5 @@ interface ItemTriesOutcome {
|
|
|
1390
1351
|
* is everywhere else.
|
|
1391
1352
|
*/
|
|
1392
1353
|
declare function evaluateTries(data: ActivityData, responses: readonly LearnerResponse[], options?: EvaluateOptions): ItemTriesOutcome;
|
|
1393
|
-
//#endregion
|
|
1394
1354
|
export { hasGrade as $, diffDictationChars as A, Band as At, outcomeFromRoutedGrade as B, validateItemScoringPolicy as C, SpeechSyllable as Ct, DICTATION_MAX_TEXT_LENGTH as D, SpeechWordError as Dt, DICTATION_MAX_EQUIVALENCE_LENGTH as E, SpeechWord as Et, dictationReferenceWords as F, roundGrade as Ft, CalibrationReport as G, GradeFromJudgementOptions as H, CalibrationThresholds as I, TotalCalibration as J, CalibrationScope as K, GradeRoutingContext as L, DictationReference as M, RoundingPolicy as Mt, DictationWordAlignment as N, classifyBand as Nt, DICTATION_MAX_TRANSCRIPT_LENGTH as O, WavInspection as Ot, alignDictation as P, gte as Pt, gradeFromRubric as Q, GradeRoutingPolicy as R, scoreTries as S, SpeechPlausibilityPolicy as St, DICTATION_MAX_EQUIVALENCES as T, SpeechUnscorableCode as Tt, gradeFromJudgement as U, routeGrade as V, CalibrationPair as W, graderConfiguration as X, calibrationReport as Y, GradeFromRubricOptions as Z, DEFAULT_PASS_THRESHOLD as _, ReadAloudWordState as _t, evaluateTries as a, ItemTry as at, ITEM_SCORING_MAX_RETRIES as b, SpeechPhoneme as bt, inspectWav as c, AssessmentScore as ct, READ_ALOUD_MAX_SECONDS as d, PassFailureReason as dt, outcomeFromGrade as et, READ_ALOUD_MAX_TAKES as f, ScoredItem as ft, alignReadAloud as g, ReadAloudWordAlignment as gt, validateSpeechAssessment as h, GradeReadAloudOptions as ht, evaluate as i, ItemTriesScore as it, DictationAlignment as j, RoundingMode as jt, DictationCharOp as k, WavInspectionPolicy as kt, READ_ALOUD_MAX_DIMENSION_WEIGHT as l, AssessmentSectionInput as lt, gradeReadAloud as m, composeAssessmentScore as mt, ItemTriesOutcome as n, ItemScoringPolicy as nt, score as o, ItemTryScore as ot, SPEECH_ASSESSMENT_MAX_WORDS as p, SectionScore as pt, CriterionCalibration as q, ScoringOptions as r, ItemScoringPolicyIssue as rt, outcomeFromUnscorable as s, ResolvedItemScoringPolicy as st, EvaluateOptions as t, ItemScoringCount as tt, READ_ALOUD_MAX_REFERENCE_LENGTH as u, CompositionPolicy as ut, computePassThreshold as v, SpeechAssessment as vt, DICTATION_MAX_ACCEPTED_TRANSCRIPTS as w, SpeechUnscorable as wt, resolveItemScoringPolicy as x, SpeechPhonemeCandidate as xt, DEFAULT_ITEM_SCORING_POLICY as y, SpeechMeasurement as yt, inAuditSample as z };
|
|
1395
|
-
//# sourceMappingURL=index-
|
|
1355
|
+
//# sourceMappingURL=index-BTkMQtws.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index-BTkMQtws.d.ts","names":[],"sources":["../src/scoring/rounding.ts","../src/types/speech.ts","../src/scoring/compose.ts","../src/types/item-scoring.ts","../src/grading.ts","../src/scoring/assisted/calibration.ts","../src/scoring/assisted/grade-from-judgement.ts","../src/scoring/assisted/routing.ts","../src/scoring/dictation/align.ts","../src/scoring/dictation/chars.ts","../src/scoring/dictation/normalize.ts","../src/scoring/item-scoring.ts","../src/scoring/pass-threshold.ts","../src/scoring/speech/align.ts","../src/scoring/speech/assessment.ts","../src/scoring/speech/grade.ts","../src/scoring/speech/limits.ts","../src/scoring/speech/wav.ts","../src/scoring/unscorable.ts","../src/scoring/index.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;KAoBY;;UAGK;EACf,MAAM;;EAEN;;;;;;;;;iBAqFc,WAAW,eAAe,QAAQ;;;;;;;;;iBA2DlC,IAAI,eAAe,mBAAmB,QAAQ;;UAK7C;EACf;;EAEA;;;;;;;;;;iBAWc,aAAa,eAAe,gBAAgB,SAAS;;;;;;KC5KzD;;UAGK;;EAEf;;EAEA;;;UAIe;;EAEf;;EAEA;;EAEA;;EA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EAAc;IAAmB;;;;;UCsHhE;;;;;;;;;;;;;EAaf,WAAW;;;;;;UAOI,wBAAwB;;;;;;;;;;;;;;;;EAgBvC,UAAU;;;;;;;;;;;;;;;iBAgBI,MACd,cAAc,cACd,cAAc,cACd,iBAAiB,iBACjB,UAAU,iBACT;;;;;;;;;;;;;;;;;;;;;;iBA0Ca,SACd,MAAM,cACN,UAAU,iBACV,UAAU,kBACT;;UA0Ec;;;;;;;;EAQf,SAAS;;EAET;;;;;;EAMA,OAAO;;;;;;;;;;;;;;;;;iBAkBO,cACd,MAAM,cACN,oBAAoB,mBACpB,UAAU,kBACT"}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { An as XAPIStatement, On as XAPIResult, Sn as XAPIActor, pn as ScoringResult, wn as XAPIContext } from "./ai-
|
|
2
|
-
//#region src/xapi/verbs.d.ts
|
|
1
|
+
import { An as XAPIStatement, On as XAPIResult, Sn as XAPIActor, pn as ScoringResult, wn as XAPIContext } from "./ai-B1wYrqcB.js";
|
|
3
2
|
/**
|
|
4
3
|
* The set of xAPI verbs emitted by SDK activities, keyed by a stable
|
|
5
4
|
* identifier mapped to its canonical xAPI verb IRI (xAPI 1.0.3 / ADL registry).
|
|
@@ -36,8 +35,6 @@ type XAPIVerbKey = keyof typeof XAPIVerb;
|
|
|
36
35
|
* `XAPIVerbObject.display` when the builder resolves a verb key.
|
|
37
36
|
*/
|
|
38
37
|
declare const XAPI_VERB_DISPLAY: Record<XAPIVerbKey, Record<string, string>>;
|
|
39
|
-
//#endregion
|
|
40
|
-
//#region src/xapi/builder.d.ts
|
|
41
38
|
/** Caller-supplied activity object descriptor (mapped to an xAPI Activity). */
|
|
42
39
|
interface XAPIObjectParams {
|
|
43
40
|
/** Activity IRI. */
|
|
@@ -132,8 +129,6 @@ declare const xAPIBuilder: {
|
|
|
132
129
|
declare function xapiDefinitionFor(data: {
|
|
133
130
|
type: string;
|
|
134
131
|
}): Partial<XAPIObjectParams>;
|
|
135
|
-
//#endregion
|
|
136
|
-
//#region src/xapi/validators.d.ts
|
|
137
132
|
/**
|
|
138
133
|
* Validates a constructed {@link XAPIStatement} against the xAPI 1.0.3
|
|
139
134
|
* structural contract.
|
|
@@ -148,6 +143,5 @@ declare function xapiDefinitionFor(data: {
|
|
|
148
143
|
* `XAPIValidationError` would be semantically cleaner — flagged for review.
|
|
149
144
|
*/
|
|
150
145
|
declare function validateXAPIStatement(statement: XAPIStatement): void;
|
|
151
|
-
//#endregion
|
|
152
146
|
export { XAPIObjectParams as a, xapiDefinitionFor as c, XAPI_VERB_DISPLAY as d, SubmittedStatementParams as i, XAPIVerb as l, AnsweredStatementParams as n, XAPIStatementParams as o, CompletedStatementParams as r, xAPIBuilder as s, validateXAPIStatement as t, XAPIVerbKey as u };
|
|
153
|
-
//# sourceMappingURL=index-
|
|
147
|
+
//# sourceMappingURL=index-BU99GFTl.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index-BU99GFTl.d.ts","names":[],"sources":["../src/xapi/verbs.ts","../src/xapi/builder.ts","../src/xapi/validators.ts"],"mappings":";;;;;cAIa;;;;;;;;;;;;;;;;;;;;;;;;;;KA2BD,2BAA2B;;;;;cAM1B,mBAAmB,OAAO,aAAa;;UCxBnC;;EAEf;EACA,OAAO;EACP,cAAc;;EAEd;;EAEA;;EAEA;;EAEA,UAAU;IAAQ;IAAY,cAAc;;;;UAI7B;EACf,OAAO;EACP,MAAM;EACN,QAAQ;EACR,SAAS;EACT,UAAU;;;UAIK;EACf,OAAO;EACP,QAAQ;EACR,eAAe;EACf;;EAEA;EACA,UAAU;EACV,mBAAmB;;;;;;;UAQJ;EACf,OAAO;EACP,QAAQ;EACR;;EAEA;EACA,UAAU;EACV,mBAAmB;;;UAIJ;EACf,OAAO;EACP,QAAQ;EACR,gBAAgB;EAChB;EACA,UAAU;EACV,mBAAmB;;;;;;;cAiGR;EACY,eAAA,QAAA,sBAAsB;EAoBd,uBAAA,QAAA,0BAA0B;;;;;;;EAqBzB,wBAAA,QAAA,2BAA2B;EAc3B,wBAAA,QAAA,2BAA2B;;;;;;;;;;;;;;;;iBA8B7C,kBAAkB;EAAQ;IAAiB,QAAQ;;;;;;;;;;;;;;iBClHnD,sBAAsB,WAAW"}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { At as ActivityType, Et as ActivityDataMap, Ot as ActivityMedia, gn as ValidationResult, nn as MultipleChoiceOptionMedia, st as ItemGroup } from "./ai-
|
|
2
|
-
//#region src/types/redacted.d.ts
|
|
1
|
+
import { At as ActivityType, Et as ActivityDataMap, Ot as ActivityMedia, gn as ValidationResult, nn as MultipleChoiceOptionMedia, st as ItemGroup } from "./ai-B1wYrqcB.js";
|
|
3
2
|
/**
|
|
4
3
|
* The learner-safe SHAPE of each built-in type.
|
|
5
4
|
*
|
|
@@ -78,6 +77,7 @@ interface RedactedMultipleChoiceOption {
|
|
|
78
77
|
/** A Multiple Choice item with the answer key, feedback and strategy removed. */
|
|
79
78
|
interface RedactedMultipleChoiceData extends RedactedItem {
|
|
80
79
|
type: 'multiple-choice';
|
|
80
|
+
instructions?: string | undefined;
|
|
81
81
|
question: string;
|
|
82
82
|
questionHtml?: string | undefined;
|
|
83
83
|
mode: 'single' | 'multi';
|
|
@@ -93,6 +93,7 @@ interface RedactedBlankConfig {
|
|
|
93
93
|
/** A Fill-in-the-Blanks item with every accepted answer removed. */
|
|
94
94
|
interface RedactedFillInTheBlanksData extends RedactedItem {
|
|
95
95
|
type: 'fill-in-the-blanks';
|
|
96
|
+
instructions?: string | undefined;
|
|
96
97
|
passage: string;
|
|
97
98
|
passageHtml?: string | undefined;
|
|
98
99
|
blanks: RedactedBlankConfig[];
|
|
@@ -139,6 +140,7 @@ interface RedactedGapSelectGap {
|
|
|
139
140
|
/** A Gap Select item the learner can still answer: choices intact, answer key gone. */
|
|
140
141
|
interface RedactedGapSelectData extends RedactedItem {
|
|
141
142
|
type: 'gap-select';
|
|
143
|
+
instructions?: string | undefined;
|
|
142
144
|
passage: string;
|
|
143
145
|
passageHtml?: string | undefined;
|
|
144
146
|
gaps: RedactedGapSelectGap[];
|
|
@@ -209,8 +211,6 @@ interface RedactedStimulus {
|
|
|
209
211
|
* ```
|
|
210
212
|
*/
|
|
211
213
|
type RedactedActivity = RedactedMultipleChoiceData | RedactedFillInTheBlanksData | RedactedWrittenResponseData | RedactedGapSelectData | RedactedDictationData | RedactedReadAloudData;
|
|
212
|
-
//#endregion
|
|
213
|
-
//#region src/schemas/item-group.d.ts
|
|
214
214
|
/**
|
|
215
215
|
* Validates an item group in full: the container and stimulus against
|
|
216
216
|
* {@link ItemGroupSchema}, then every item against the schema registered for
|
|
@@ -222,8 +222,6 @@ type RedactedActivity = RedactedMultipleChoiceData | RedactedFillInTheBlanksData
|
|
|
222
222
|
* not the first one that happened to throw.
|
|
223
223
|
*/
|
|
224
224
|
declare function validateItemGroup(data: unknown): ValidationResult<ItemGroup>;
|
|
225
|
-
//#endregion
|
|
226
|
-
//#region src/schemas/json-schema.d.ts
|
|
227
225
|
/**
|
|
228
226
|
* JSON Schema (Draft 7) for a `Stimulus`. Structural contract only — the
|
|
229
227
|
* kind/media/body consistency guards are Zod-only.
|
|
@@ -329,12 +327,8 @@ declare function jsonSchemaFor(type: string, options?: {
|
|
|
329
327
|
declare function contentJsonSchema(options?: {
|
|
330
328
|
target?: JsonSchemaTarget;
|
|
331
329
|
}): Record<string, unknown>;
|
|
332
|
-
//#endregion
|
|
333
|
-
//#region src/schemas/media.d.ts
|
|
334
330
|
/** The most turns a recording's `script` may hold. */
|
|
335
331
|
declare const SCRIPT_MAX_TURNS = 500;
|
|
336
|
-
//#endregion
|
|
337
|
-
//#region src/schemas/index.d.ts
|
|
338
332
|
/**
|
|
339
333
|
* Checks a piece of activity media — an item's `media`, a stimulus's, a
|
|
340
334
|
* dictation's `slowMedia` — on its own, the way `validateActivity` checks it
|
|
@@ -367,6 +361,5 @@ declare function validateOptionMedia(value: unknown): ValidationResult<MultipleC
|
|
|
367
361
|
* @throws UnknownActivityTypeError when `type` has no registered descriptor.
|
|
368
362
|
*/
|
|
369
363
|
declare function validateActivity<T extends ActivityType>(type: T, data: unknown): ValidationResult<ActivityDataMap[T]>;
|
|
370
|
-
//#endregion
|
|
371
364
|
export { RedactedStimulus as A, RedactedGapSelectChoice as C, RedactedMultipleChoiceOption as D, RedactedMultipleChoiceData as E, RedactedMultipleChoiceOptionMedia as O, RedactedGapSelectBank as S, RedactedGapSelectGap as T, RedactedActivity as _, JsonSchemaTarget as a, RedactedDictationSlowMedia as b, fillInTheBlanksJsonSchema as c, jsonSchemaFor as d, multipleChoiceJsonSchema as f, validateItemGroup as g, writtenResponseJsonSchema as h, SCRIPT_MAX_TURNS as i, RedactedWrittenResponseData as j, RedactedReadAloudData as k, gapSelectJsonSchema as l, stimulusJsonSchema as m, validateMedia as n, contentJsonSchema as o, readAloudJsonSchema as p, validateOptionMedia as r, dictationJsonSchema as s, validateActivity as t, itemGroupJsonSchema as u, RedactedBlankConfig as v, RedactedGapSelectData as w, RedactedFillInTheBlanksData as x, RedactedDictationData as y };
|
|
372
|
-
//# sourceMappingURL=index-
|
|
365
|
+
//# sourceMappingURL=index-BdXs4-en.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index-BdXs4-en.d.ts","names":[],"sources":["../src/types/redacted.ts","../src/schemas/item-group.ts","../src/schemas/json-schema.ts","../src/schemas/media.ts","../src/schemas/index.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;UAoBU;EACR;EACA;EACA;EACA;EACA;;;UAIQ;EACR;EACA;EACA;EACA;EACA;;;UAIQ;EACR;EACA;EACA;EACA;EACA,SAAS;EACT;EACA,WAAW;;;UAIH;EACR;EACA;;;UAIQ;EACR;EACA;EACA;EACA;EACA;EACA,QAAQ;EACR;EACA;EACA;EACA,KAAK;;;UAIU;EACf;EACA;EACA;EACA;;;UAIe;EACf;EACA;EACA,QAAQ;;;UAIO,mCAAmC;EAClD;EACA;EACA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ityDataMap, Ot as ActivityMedia, gn as ValidationResult, nn as MultipleChoiceOptionMedia, st as ItemGroup } from "./ai-
|
|
2
|
-
//#region src/types/redacted.d.ts
|
|
1
|
+
import { At as ActivityType, Et as ActivityDataMap, Ot as ActivityMedia, gn as ValidationResult, nn as MultipleChoiceOptionMedia, st as ItemGroup } from "./ai-B1wYrqcB.cjs";
|
|
3
2
|
/**
|
|
4
3
|
* The learner-safe SHAPE of each built-in type.
|
|
5
4
|
*
|
|
@@ -78,6 +77,7 @@ interface RedactedMultipleChoiceOption {
|
|
|
78
77
|
/** A Multiple Choice item with the answer key, feedback and strategy removed. */
|
|
79
78
|
interface RedactedMultipleChoiceData extends RedactedItem {
|
|
80
79
|
type: 'multiple-choice';
|
|
80
|
+
instructions?: string | undefined;
|
|
81
81
|
question: string;
|
|
82
82
|
questionHtml?: string | undefined;
|
|
83
83
|
mode: 'single' | 'multi';
|
|
@@ -93,6 +93,7 @@ interface RedactedBlankConfig {
|
|
|
93
93
|
/** A Fill-in-the-Blanks item with every accepted answer removed. */
|
|
94
94
|
interface RedactedFillInTheBlanksData extends RedactedItem {
|
|
95
95
|
type: 'fill-in-the-blanks';
|
|
96
|
+
instructions?: string | undefined;
|
|
96
97
|
passage: string;
|
|
97
98
|
passageHtml?: string | undefined;
|
|
98
99
|
blanks: RedactedBlankConfig[];
|
|
@@ -139,6 +140,7 @@ interface RedactedGapSelectGap {
|
|
|
139
140
|
/** A Gap Select item the learner can still answer: choices intact, answer key gone. */
|
|
140
141
|
interface RedactedGapSelectData extends RedactedItem {
|
|
141
142
|
type: 'gap-select';
|
|
143
|
+
instructions?: string | undefined;
|
|
142
144
|
passage: string;
|
|
143
145
|
passageHtml?: string | undefined;
|
|
144
146
|
gaps: RedactedGapSelectGap[];
|
|
@@ -209,8 +211,6 @@ interface RedactedStimulus {
|
|
|
209
211
|
* ```
|
|
210
212
|
*/
|
|
211
213
|
type RedactedActivity = RedactedMultipleChoiceData | RedactedFillInTheBlanksData | RedactedWrittenResponseData | RedactedGapSelectData | RedactedDictationData | RedactedReadAloudData;
|
|
212
|
-
//#endregion
|
|
213
|
-
//#region src/schemas/item-group.d.ts
|
|
214
214
|
/**
|
|
215
215
|
* Validates an item group in full: the container and stimulus against
|
|
216
216
|
* {@link ItemGroupSchema}, then every item against the schema registered for
|
|
@@ -222,8 +222,6 @@ type RedactedActivity = RedactedMultipleChoiceData | RedactedFillInTheBlanksData
|
|
|
222
222
|
* not the first one that happened to throw.
|
|
223
223
|
*/
|
|
224
224
|
declare function validateItemGroup(data: unknown): ValidationResult<ItemGroup>;
|
|
225
|
-
//#endregion
|
|
226
|
-
//#region src/schemas/json-schema.d.ts
|
|
227
225
|
/**
|
|
228
226
|
* JSON Schema (Draft 7) for a `Stimulus`. Structural contract only — the
|
|
229
227
|
* kind/media/body consistency guards are Zod-only.
|
|
@@ -329,12 +327,8 @@ declare function jsonSchemaFor(type: string, options?: {
|
|
|
329
327
|
declare function contentJsonSchema(options?: {
|
|
330
328
|
target?: JsonSchemaTarget;
|
|
331
329
|
}): Record<string, unknown>;
|
|
332
|
-
//#endregion
|
|
333
|
-
//#region src/schemas/media.d.ts
|
|
334
330
|
/** The most turns a recording's `script` may hold. */
|
|
335
331
|
declare const SCRIPT_MAX_TURNS = 500;
|
|
336
|
-
//#endregion
|
|
337
|
-
//#region src/schemas/index.d.ts
|
|
338
332
|
/**
|
|
339
333
|
* Checks a piece of activity media — an item's `media`, a stimulus's, a
|
|
340
334
|
* dictation's `slowMedia` — on its own, the way `validateActivity` checks it
|
|
@@ -367,6 +361,5 @@ declare function validateOptionMedia(value: unknown): ValidationResult<MultipleC
|
|
|
367
361
|
* @throws UnknownActivityTypeError when `type` has no registered descriptor.
|
|
368
362
|
*/
|
|
369
363
|
declare function validateActivity<T extends ActivityType>(type: T, data: unknown): ValidationResult<ActivityDataMap[T]>;
|
|
370
|
-
//#endregion
|
|
371
364
|
export { RedactedStimulus as A, RedactedGapSelectChoice as C, RedactedMultipleChoiceOption as D, RedactedMultipleChoiceData as E, RedactedMultipleChoiceOptionMedia as O, RedactedGapSelectBank as S, RedactedGapSelectGap as T, RedactedActivity as _, JsonSchemaTarget as a, RedactedDictationSlowMedia as b, fillInTheBlanksJsonSchema as c, jsonSchemaFor as d, multipleChoiceJsonSchema as f, validateItemGroup as g, writtenResponseJsonSchema as h, SCRIPT_MAX_TURNS as i, RedactedWrittenResponseData as j, RedactedReadAloudData as k, gapSelectJsonSchema as l, stimulusJsonSchema as m, validateMedia as n, contentJsonSchema as o, readAloudJsonSchema as p, validateOptionMedia as r, dictationJsonSchema as s, validateActivity as t, itemGroupJsonSchema as u, RedactedBlankConfig as v, RedactedGapSelectData as w, RedactedFillInTheBlanksData as x, RedactedDictationData as y };
|
|
372
|
-
//# sourceMappingURL=index-
|
|
365
|
+
//# sourceMappingURL=index-DP9rvyOz.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index-DP9rvyOz.d.cts","names":[],"sources":["../src/types/redacted.ts","../src/schemas/item-group.ts","../src/schemas/json-schema.ts","../src/schemas/media.ts","../src/schemas/index.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;UAoBU;EACR;EACA;EACA;EACA;EACA;;;UAIQ;EACR;EACA;EACA;EACA;EACA;;;UAIQ;EACR;EACA;EACA;EACA;EACA,SAAS;EACT;EACA,WAAW;;;UAIH;EACR;EACA;;;UAIQ;EACR;EACA;EACA;EACA;EACA;EACA,QAAQ;EACR;EACA;EACA;EACA,KAAK;;;UAIU;EACf;EACA;EACA;EACA;;;UAIe;EACf;EACA;EACA,QAAQ;;;UAIO,mCAAmC;EAClD;EACA;EACA;EACA;EACA;EACA,SAAS;EACT;EACA;;;UAIe;EACf;EACA;;;UAIe,oCAAoC;EACnD;EACA;EACA;EACA;EACA,QAAQ;EACR;;;UAIe,oCAAoC;EACnD;EACA;EACA;EACA;EACA;EACA;IAEM;MACE;MACA;MACA;MACA;QAAW;QAAe;;;IAE5B;;EAGN;EACA;;;UAIe;EACf;EACA;;;UAIe;EACf;EACA,SAAS;;;UAIM;EACf;EACA,UAAU;EACV;;;UAIe,8BAA8B;EAC7C;EACA;EACA;EACA;EACA,MAAM;EACN,QAAQ;EACR;EACA;EACA;;;UAIe;EACf;EACA;EACA;;;UAIe,8BAA8B;EAC7C;EACA,YAAY;EACZ;IAAU;;EACV;;;;;;;UAQe,8BAA8B;EAC7C;EACA;EACA;EACA;EACA,YAAY;EACZ;IACE;IACA;IACA;;EAEF;IACE;MACE;MACA;;;;;UAMW;EACf;EACA;EACA;EACA;EACA;EACA,QAAQ;EACR;EACA;;;;;;;;;;;;;;KAeU,mBACR,6BACA,8BACA,8BACA,wBACA,wBACA;;;;;;;;;;;iBCyMY,kBAAkB,gBAAgB,iBAAiB;;;;;cCnatD,oBAAoB;;;;;;;;cAWpB,qBAAqB;;;;;;;;;;;;;;;;;;cAqBrB,qBAAqB;;;;;;;;;;;cAcrB,qBAAqB;;;;;;;;;;cAarB,qBAAqB;cAIrB,0BAA0B;;;;;;cAY1B,2BAA2B;;;;;cAW3B,2BAA2B;;KAQ5B;;;;;;;;;;;;;;;;;iBAqBI,cACd,cACA;EAAW,SAAS;IACnB;;;;;;;;;;;;;;;;;;iBA4Ca,kBACd;EAAW,SAAS;IACnB;;cCzEU;;;;;;;;;;;iBCnDG,cAAc,iBAAiB,iBAAiB;;;;;;;;iBAWhD,oBAAoB,iBAAiB,iBAAiB;;;;;;;;;;;;;iBA8BtD,iBAAiB,UAAU,cACzC,MAAM,GACN,gBACC,iBAAiB,gBAAgB"}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { An as XAPIStatement, On as XAPIResult, Sn as XAPIActor, pn as ScoringResult, wn as XAPIContext } from "./ai-
|
|
2
|
-
//#region src/xapi/verbs.d.ts
|
|
1
|
+
import { An as XAPIStatement, On as XAPIResult, Sn as XAPIActor, pn as ScoringResult, wn as XAPIContext } from "./ai-B1wYrqcB.cjs";
|
|
3
2
|
/**
|
|
4
3
|
* The set of xAPI verbs emitted by SDK activities, keyed by a stable
|
|
5
4
|
* identifier mapped to its canonical xAPI verb IRI (xAPI 1.0.3 / ADL registry).
|
|
@@ -36,8 +35,6 @@ type XAPIVerbKey = keyof typeof XAPIVerb;
|
|
|
36
35
|
* `XAPIVerbObject.display` when the builder resolves a verb key.
|
|
37
36
|
*/
|
|
38
37
|
declare const XAPI_VERB_DISPLAY: Record<XAPIVerbKey, Record<string, string>>;
|
|
39
|
-
//#endregion
|
|
40
|
-
//#region src/xapi/builder.d.ts
|
|
41
38
|
/** Caller-supplied activity object descriptor (mapped to an xAPI Activity). */
|
|
42
39
|
interface XAPIObjectParams {
|
|
43
40
|
/** Activity IRI. */
|
|
@@ -132,8 +129,6 @@ declare const xAPIBuilder: {
|
|
|
132
129
|
declare function xapiDefinitionFor(data: {
|
|
133
130
|
type: string;
|
|
134
131
|
}): Partial<XAPIObjectParams>;
|
|
135
|
-
//#endregion
|
|
136
|
-
//#region src/xapi/validators.d.ts
|
|
137
132
|
/**
|
|
138
133
|
* Validates a constructed {@link XAPIStatement} against the xAPI 1.0.3
|
|
139
134
|
* structural contract.
|
|
@@ -148,6 +143,5 @@ declare function xapiDefinitionFor(data: {
|
|
|
148
143
|
* `XAPIValidationError` would be semantically cleaner — flagged for review.
|
|
149
144
|
*/
|
|
150
145
|
declare function validateXAPIStatement(statement: XAPIStatement): void;
|
|
151
|
-
//#endregion
|
|
152
146
|
export { XAPIObjectParams as a, xapiDefinitionFor as c, XAPI_VERB_DISPLAY as d, SubmittedStatementParams as i, XAPIVerb as l, AnsweredStatementParams as n, XAPIStatementParams as o, CompletedStatementParams as r, xAPIBuilder as s, validateXAPIStatement as t, XAPIVerbKey as u };
|
|
153
|
-
//# sourceMappingURL=index
|
|
147
|
+
//# sourceMappingURL=index-XCCoPoTU.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index-XCCoPoTU.d.cts","names":[],"sources":["../src/xapi/verbs.ts","../src/xapi/builder.ts","../src/xapi/validators.ts"],"mappings":";;;;;cAIa;;;;;;;;;;;;;;;;;;;;;;;;;;KA2BD,2BAA2B;;;;;cAM1B,mBAAmB,OAAO,aAAa;;UCxBnC;;EAEf;EACA,OAAO;EACP,cAAc;;EAEd;;EAEA;;EAEA;;EAEA,UAAU;IAAQ;IAAY,cAAc;;;;UAI7B;EACf,OAAO;EACP,MAAM;EACN,QAAQ;EACR,SAAS;EACT,UAAU;;;UAIK;EACf,OAAO;EACP,QAAQ;EACR,eAAe;EACf;;EAEA;EACA,UAAU;EACV,mBAAmB;;;;;;;UAQJ;EACf,OAAO;EACP,QAAQ;EACR;;EAEA;EACA,UAAU;EACV,mBAAmB;;;UAIJ;EACf,OAAO;EACP,QAAQ;EACR,gBAAgB;EAChB;EACA,UAAU;EACV,mBAAmB;;;;;;;cAiGR;EACY,eAAA,QAAA,sBAAsB;EAoBd,uBAAA,QAAA,0BAA0B;;;;;;;EAqBzB,wBAAA,QAAA,2BAA2B;EAc3B,wBAAA,QAAA,2BAA2B;;;;;;;;;;;;;;;;iBA8B7C,kBAAkB;EAAQ;IAAiB,QAAQ;;;;;;;;;;;;;;iBClHnD,sBAAsB,WAAW"}
|