@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.
Files changed (82) hide show
  1. package/CHANGELOG.md +20 -0
  2. package/dist/{ai-i3jwXnpX.d.cts → ai-B1wYrqcB.d.cts} +39 -15
  3. package/dist/ai-B1wYrqcB.d.cts.map +1 -0
  4. package/dist/{ai-i3jwXnpX.d.ts → ai-B1wYrqcB.d.ts} +39 -15
  5. package/dist/ai-B1wYrqcB.d.ts.map +1 -0
  6. package/dist/ai-check.cjs +13 -6
  7. package/dist/ai-check.cjs.map +1 -1
  8. package/dist/ai-check.d.cts +1 -5
  9. package/dist/ai-check.d.cts.map +1 -1
  10. package/dist/ai-check.d.ts +1 -5
  11. package/dist/ai-check.d.ts.map +1 -1
  12. package/dist/ai-check.js +13 -6
  13. package/dist/ai-check.js.map +1 -1
  14. package/dist/{ai-writing-OJ5m_1EB.js → ai-writing-B7oMCt66.js} +46 -43
  15. package/dist/ai-writing-B7oMCt66.js.map +1 -0
  16. package/dist/{ai-writing-C4YRVrFi.cjs → ai-writing-DrPTV3R2.cjs} +46 -43
  17. package/dist/ai-writing-DrPTV3R2.cjs.map +1 -0
  18. package/dist/{index-DeD8EI1D.d.ts → index-BM8LeDWn.d.cts} +2 -42
  19. package/dist/index-BM8LeDWn.d.cts.map +1 -0
  20. package/dist/{index-Uh1u57yq.d.cts → index-BTkMQtws.d.ts} +2 -42
  21. package/dist/index-BTkMQtws.d.ts.map +1 -0
  22. package/dist/{index-Dj92T76o.d.ts → index-BU99GFTl.d.ts} +2 -8
  23. package/dist/index-BU99GFTl.d.ts.map +1 -0
  24. package/dist/{index-WBHSrIUU.d.ts → index-BdXs4-en.d.ts} +5 -12
  25. package/dist/index-BdXs4-en.d.ts.map +1 -0
  26. package/dist/{index-CFRgZLhH.d.cts → index-DP9rvyOz.d.cts} +5 -12
  27. package/dist/index-DP9rvyOz.d.cts.map +1 -0
  28. package/dist/{index--U7hHV0s.d.cts → index-XCCoPoTU.d.cts} +2 -8
  29. package/dist/index-XCCoPoTU.d.cts.map +1 -0
  30. package/dist/index.cjs +13 -20
  31. package/dist/index.cjs.map +1 -1
  32. package/dist/index.d.cts +4 -70
  33. package/dist/index.d.cts.map +1 -1
  34. package/dist/index.d.ts +4 -70
  35. package/dist/index.d.ts.map +1 -1
  36. package/dist/index.js +13 -20
  37. package/dist/index.js.map +1 -1
  38. package/dist/{item-group-CQRbb8Rx.cjs → item-group-8P3WFuUK.cjs} +4 -6
  39. package/dist/{item-group-CQRbb8Rx.cjs.map → item-group-8P3WFuUK.cjs.map} +1 -1
  40. package/dist/{item-group-BbvvH_Ob.js → item-group-CeDk7mfM.js} +4 -6
  41. package/dist/{item-group-BbvvH_Ob.js.map → item-group-CeDk7mfM.js.map} +1 -1
  42. package/dist/{registry-B23o9UWh.js → registry-D92hz9iA.js} +60 -89
  43. package/dist/registry-D92hz9iA.js.map +1 -0
  44. package/dist/{registry-Ih5n4PVZ.cjs → registry-hzrkTeIT.cjs} +61 -91
  45. package/dist/registry-hzrkTeIT.cjs.map +1 -0
  46. package/dist/{schemas-Q2dyOgc2.cjs → schemas-BWeskONy.cjs} +5 -7
  47. package/dist/{schemas-Q2dyOgc2.cjs.map → schemas-BWeskONy.cjs.map} +1 -1
  48. package/dist/{schemas-yId-bJhD.js → schemas-C7TViWCg.js} +5 -7
  49. package/dist/{schemas-yId-bJhD.js.map → schemas-C7TViWCg.js.map} +1 -1
  50. package/dist/schemas.cjs +3 -3
  51. package/dist/schemas.d.cts +1 -1
  52. package/dist/schemas.d.ts +1 -1
  53. package/dist/schemas.js +3 -3
  54. package/dist/{scoring-CaPS6q8b.cjs → scoring-CtkCFyFT.cjs} +22 -42
  55. package/dist/{scoring-CaPS6q8b.cjs.map → scoring-CtkCFyFT.cjs.map} +1 -1
  56. package/dist/{scoring-CLMdk8i9.js → scoring-DD1GHcLI.js} +22 -42
  57. package/dist/{scoring-CLMdk8i9.js.map → scoring-DD1GHcLI.js.map} +1 -1
  58. package/dist/scoring.cjs +2 -2
  59. package/dist/scoring.d.cts +2 -2
  60. package/dist/scoring.d.ts +2 -2
  61. package/dist/scoring.js +2 -2
  62. package/dist/{xapi-BX0hvRRB.cjs → xapi-7btSpx6v.cjs} +5 -8
  63. package/dist/{xapi-BX0hvRRB.cjs.map → xapi-7btSpx6v.cjs.map} +1 -1
  64. package/dist/{xapi-Cdk9fTvV.js → xapi-Cgicg-zU.js} +5 -8
  65. package/dist/{xapi-Cdk9fTvV.js.map → xapi-Cgicg-zU.js.map} +1 -1
  66. package/dist/xapi.cjs +1 -1
  67. package/dist/xapi.d.cts +1 -1
  68. package/dist/xapi.d.ts +1 -1
  69. package/dist/xapi.js +1 -1
  70. package/package.json +2 -2
  71. package/dist/ai-i3jwXnpX.d.cts.map +0 -1
  72. package/dist/ai-i3jwXnpX.d.ts.map +0 -1
  73. package/dist/ai-writing-C4YRVrFi.cjs.map +0 -1
  74. package/dist/ai-writing-OJ5m_1EB.js.map +0 -1
  75. package/dist/index--U7hHV0s.d.cts.map +0 -1
  76. package/dist/index-CFRgZLhH.d.cts.map +0 -1
  77. package/dist/index-DeD8EI1D.d.ts.map +0 -1
  78. package/dist/index-Dj92T76o.d.ts.map +0 -1
  79. package/dist/index-Uh1u57yq.d.cts.map +0 -1
  80. package/dist/index-WBHSrIUU.d.ts.map +0 -1
  81. package/dist/registry-B23o9UWh.js.map +0 -1
  82. package/dist/registry-Ih5n4PVZ.cjs.map +0 -1
package/CHANGELOG.md CHANGED
@@ -1,5 +1,25 @@
1
1
  # @intellectif/lk-core
2
2
 
3
+ ## 1.7.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#122](https://github.com/intellectif/learning-kit/pull/122) [`4f59f0a`](https://github.com/intellectif/learning-kit/commit/4f59f0aee1868875a729af89a7ae275ff96bb218) Thanks [@diego28e](https://github.com/diego28e)! - **A question's own instructions**: multiple choice, fill in the blanks and gap select take an optional `instructions`, the task the learner reads before answering, as read aloud already does.
8
+
9
+ **Action required:** none, unless you already store a field under this name. Content is loose, so an `instructions` of your own on these three types validated before. It now has to be a string, and on a fill in the blanks or a gap select it may hold no `{{id}}` placeholder. Anything else fails validation at `instructions`. **No grade changes:** no scorer reads it, and the grade-stability corpus is unchanged.
10
+
11
+ - **What it is for:** "Complete the sentence. Use ONE word.", on a question served alone (an adaptive test's, or a bank shuffled across forms) where no item group can hold it. Instructions a run of questions shares stay in the group's text stimulus.
12
+ - **lk-core:**
13
+ - **The field.** `instructions?: string` on `MultipleChoiceData`, `FillInTheBlanksData` and `GapSelectData`, plain text. A `{{id}}` placeholder in a fill in the blanks' or a gap select's instructions is refused at `instructions`, since blanks and gaps live in the passage only.
14
+ - **Learner-visible.** `redact()` keeps it at every reveal level, and so do `withoutAuthorOnly()` and `redactItemGroup()`. `assertRedacted()` accepts it, and the `Redacted*` types carry it.
15
+ - **Schemas.** `jsonSchemaFor()` and `contentJsonSchema()` describe it.
16
+ - **AI help.** Hint and explanation facts carry `instructions` on these types, trimmed, apart from the question or the passage. A grouped question carries both its group's `material` and its own instructions. Tell your model that they are the task, not part of the text answered.
17
+ - **Drafts.** A model drafting these types may write `instructions`, and `checkAiDrafts` keeps them.
18
+ - **`@intellectif/lk-core/ai-check`** has one more case, `fib-instructions-hint`: the word-formation blank of `fib-formation-hint` served alone, with its task in its own instructions.
19
+ - **lk-react:** `<MultipleChoice>`, `<FillInTheBlanks>` and `<GapSelect>` draw the instructions first, before the media and the question or passage, in `.lk-mc-instructions`, `.lk-fib-instructions` or `.lk-gs-instructions`. The question's fieldset names them with `aria-describedby`. Blank instructions draw nothing. Inside `<ActivitySequence>`, a grouped question shows its group's material, then its own instructions. lk-react 23.3.0 peers on lk-core `^1.7.0`, so upgrade the two together.
20
+
21
+ Guide: https://github.com/intellectif/learning-kit/blob/main/docs/authoring.md#a-questions-own-instructions-17
22
+
3
23
  ## 1.6.0
4
24
 
5
25
  ### Minor Changes
@@ -1,4 +1,3 @@
1
- //#region src/scoring/text-match.d.ts
2
1
  /**
3
2
  * Configurable free-text answer matching (R3.3).
4
3
  *
@@ -63,8 +62,6 @@ declare function levenshteinDistance(a: string, b: string, max: number): number;
63
62
  * semantics: `trim` + locale-insensitive `toLowerCase` + strict equality.
64
63
  */
65
64
  declare function matchText(input: string, accepted: string | readonly string[], policy?: TextMatchPolicy): TextMatchResult;
66
- //#endregion
67
- //#region src/types/grading.d.ts
68
65
  /**
69
66
  * Lifecycle of a deferred grade. A grade exists only in the `graded` state;
70
67
  * every other state means "no grade, and here is why" — which is precisely the
@@ -243,8 +240,6 @@ interface GradeRecord {
243
240
  /** Where `routeGrade` sent this grade, and why, when it was routed. */
244
241
  routing?: GradeRouting;
245
242
  }
246
- //#endregion
247
- //#region src/types/xapi.d.ts
248
243
  /**
249
244
  * An xAPI Activity object — the thing a statement is about.
250
245
  * This SDK only builds Activity-type objects (xAPI 1.0.3 §4.1.4.1).
@@ -402,8 +397,6 @@ interface XAPIError {
402
397
  /** Human-readable error description. */
403
398
  message: string;
404
399
  }
405
- //#endregion
406
- //#region src/types/activity.d.ts
407
400
  /**
408
401
  * Maps each ActivityType string to its corresponding data shape.
409
402
  *
@@ -637,6 +630,13 @@ interface MultipleChoiceData {
637
630
  id: string;
638
631
  /** Human-readable title used in xAPI statements and error boundaries. */
639
632
  title: string;
633
+ /**
634
+ * Optional instructions shown to the learner, as plain text: the task, read
635
+ * before the question and never part of it ("Choose the correct option to
636
+ * complete the conversation."). Every AI request about the item carries them.
637
+ * Instructions a run of questions shares go in an item group's text stimulus.
638
+ */
639
+ instructions?: string;
640
640
  /** The question stem presented to the learner, as plain text. */
641
641
  question: string;
642
642
  /**
@@ -774,6 +774,14 @@ interface GapSelectData {
774
774
  id: string;
775
775
  /** Human-readable title used in xAPI statements and error boundaries. */
776
776
  title: string;
777
+ /**
778
+ * Optional instructions shown to the learner, as plain text: the task, read
779
+ * before the passage and never part of it ("Complete the sentence. Use ONE
780
+ * word."). Every AI request about the item carries them. A `{{id}}`
781
+ * placeholder here is refused: gaps live in the passage only. Instructions
782
+ * a run of questions shares go in an item group's text stimulus.
783
+ */
784
+ instructions?: string;
777
785
  /** Passage text containing `{{gap_id}}` placeholders. */
778
786
  passage: string;
779
787
  /**
@@ -831,6 +839,14 @@ interface FillInTheBlanksData {
831
839
  id: string;
832
840
  /** Human-readable title used in xAPI statements and error boundaries. */
833
841
  title: string;
842
+ /**
843
+ * Optional instructions shown to the learner, as plain text: the task, read
844
+ * before the passage and never part of it ("Complete the sentence. Use ONE
845
+ * word."). Every AI request about the item carries them. A `{{id}}`
846
+ * placeholder here is refused: blanks live in the passage only. Instructions
847
+ * a run of questions shares go in an item group's text stimulus.
848
+ */
849
+ instructions?: string;
834
850
  /** Passage text containing `{{blank_id}}` placeholders. */
835
851
  passage: string;
836
852
  /**
@@ -1538,8 +1554,6 @@ interface InteractionEvent {
1538
1554
  /** Additional event-specific data. */
1539
1555
  payload: Record<string, unknown>;
1540
1556
  }
1541
- //#endregion
1542
- //#region src/types/authoring.d.ts
1543
1557
  /**
1544
1558
  * Why a draft is not an activity yet.
1545
1559
  *
@@ -1614,8 +1628,6 @@ interface DraftContext {
1614
1628
  */
1615
1629
  newId: () => string;
1616
1630
  }
1617
- //#endregion
1618
- //#region src/types/item-group.d.ts
1619
1631
  /** What a stimulus primarily is. Drives validation and layout, never scoring. */
1620
1632
  type StimulusKind = 'text' | 'audio' | 'video' | 'image' | 'mixed';
1621
1633
  /**
@@ -1834,8 +1846,6 @@ interface SequenceSlot<TItem = ActivityData> {
1834
1846
  /** Present when the slot comes from an item group. */
1835
1847
  group?: SequenceSlotGroup;
1836
1848
  }
1837
- //#endregion
1838
- //#region src/types/ai.d.ts
1839
1849
  /**
1840
1850
  * What an author allows AI to do for one item. Absent, or a feature left out,
1841
1851
  * leaves the choice to the deployment. `false` switches a feature off for this
@@ -1903,6 +1913,11 @@ interface AiOptionFact {
1903
1913
  }
1904
1914
  interface AiMultipleChoiceFacts extends AiFactsBase {
1905
1915
  activityType: 'multiple-choice';
1916
+ /**
1917
+ * The item's instructions, when it has any: the task the learner reads
1918
+ * before the question. They say what to do, and are never part of the text answered.
1919
+ */
1920
+ instructions?: string;
1906
1921
  question: string;
1907
1922
  mode: 'single' | 'multi';
1908
1923
  options: AiOptionFact[];
@@ -1925,6 +1940,11 @@ interface AiBlankFact {
1925
1940
  }
1926
1941
  interface AiFillInTheBlanksFacts extends AiFactsBase {
1927
1942
  activityType: 'fill-in-the-blanks';
1943
+ /**
1944
+ * The item's instructions, when it has any: the task the learner reads
1945
+ * before the passage. They say what to do, and are never part of the text answered.
1946
+ */
1947
+ instructions?: string;
1928
1948
  /** The passage, each blank written as `[1]`, `[2]`… in passage order. */
1929
1949
  passage: string;
1930
1950
  blanks: AiBlankFact[];
@@ -1947,6 +1967,11 @@ interface AiGapFact {
1947
1967
  }
1948
1968
  interface AiGapSelectFacts extends AiFactsBase {
1949
1969
  activityType: 'gap-select';
1970
+ /**
1971
+ * The item's instructions, when it has any: the task the learner reads
1972
+ * before the passage. They say what to do, and are never part of the text answered.
1973
+ */
1974
+ instructions?: string;
1950
1975
  /** The passage, each gap written as `[1]`, `[2]`… in passage order. */
1951
1976
  passage: string;
1952
1977
  gaps: AiGapFact[];
@@ -2647,6 +2672,5 @@ interface AiVideoDraft {
2647
2672
  /** What `critiqueItemGroupDraft` says of it. */
2648
2673
  findings: ItemFinding[];
2649
2674
  }
2650
- //#endregion
2651
2675
  export { AiVerdict as $, MultipleChoiceData as $t, AiGapSelectFacts as A, XAPIStatement as An, ActivityType as At, AiHintRequest as B, GradingState as Bn, FillInTheBlanksLearnerResponse as Bt, AiDraftsCall as C, XAPIConfig as Cn, ItemFinding as Ct, AiFeature as D, XAPIObject as Dn, ActivityFeedback as Dt, AiExplanationRequest as E, XAPIError as En, ActivityDataMap as Et, AiGradingFacts as F, GradeRoutingReason as Fn, DictationEquivalence as Ft, AiProvenance as G, matchText as Gn, GapSelectLearnerResponse as Gt, AiMaterialFacts as H, TextMatchPolicy as Hn, GapSelectChoice as Ht, AiGradingJudgement as I, Grader as In, DictationLearnerResponse as It, AiRefusal as J, ItemOutcome as Jt, AiReadingFacts as K, InteractionEvent as Kt, AiGradingRequest as L, GraderConfiguration as Ln, DictationSlowMedia as Lt, AiGrade as M, CriterionScore as Mn, DeferredReason as Mt, AiGradedCriterion as N, GradeRecord as Nn, DeferredScoringPartial as Nt, AiFillInTheBlanksFacts as O, XAPIResult as On, ActivityMedia as Ot, AiGradingCriterionFact as P, GradeRouting as Pn, DictationData as Pt, AiTextResult as Q, MediaTrack as Qt, AiGradingRequestProblem as R, GraderKind as Rn, DictationTolerance as Rt, AiDrafts as S, XAPIActor as Sn, DraftValidationResult as St, AiDraftsRun as T, XAPIContextActivities as Tn, ActivityData as Tt, AiMultipleChoiceFacts as U, TextMatchResult as Un, GapSelectData as Ut, AiItemFacts as V, InlineCorrection as Vn, GapSelectBank as Vt, AiOptionFact as W, levenshteinDistance as Wn, GapSelectGap as Wt, AiSoundFact as X, LearnerResponseMap as Xt, AiRubricCriterionFact as Y, LearnerResponse as Yt, AiSupportedActivityType as Z, MediaPlaybackPolicy as Zt, AiDraftCaption as _, WrittenResponseData as _n, DraftComplete as _t, AiCoachingRequest as a, ReadAloudDimension as an, AiWritingFeedbackRequest as at, AiDraftSource as b, WrittenResponseRubricCriterion as bn, DraftNotComplete as bt, AiCriterionJudgement as c, ReadAloudSlowMedia as cn, MediaProgress as ct, AiCritiqueFinding as d, ScoringDetail as dn, SequenceSlot as dt, MultipleChoiceLearnerResponse as en, AiVideoDraft as et, AiCritiqueFindingResult as f, ScoringOutcome as fn, SequenceSlotGroup as ft, AiDictationFacts as g, ValidationResult as gn, TimelineCue as gt, AiCritiqueResult as h, ValidationError as hn, TimelineChapter as ht, AiCoaching as i, ReadAloudData as in, AiWritingFeedback as it, AiGeneratedDraft as j, XAPIVerbObject as jn, BlankConfig as jt, AiGapFact as k, XAPIScore as kn, ActivityResult as kt, AiCritique as l, RecordingBounds as ln, MediaTimeline as lt, AiCritiqueRequest as m, ScriptTurn as mn, StimulusKind as mt, AiActivityInput as n, MultipleChoiceOptionMedia as nn, AiWritingCorrection as nt, AiCoachingResult as o, ReadAloudDimensionWeight as on, AiWritingFeedbackResult as ot, AiCritiqueKind as p, ScoringResult as pn, Stimulus as pt, AiReadingWordFact as q, InteractionKind as qt, AiBlankFact as r, NativeControlHint as rn, AiWritingFacts as rt, AiCoachingWord as s, ReadAloudLearnerResponse as sn, ItemGroup as st, ActivityAiPermissions as t, MultipleChoiceOption as tn, AiWordFact as tt, AiCritiqueField as u, RecordingRef as un, SequenceEntry as ut, AiDraftProblem as v, WrittenResponseLearnerResponse as vn, DraftContext as vt, AiDraftsRequest as w, XAPIContext as wn, ItemFindingSeverity as wt, AiDraftType as x, WrittenResponseRubricLevel as xn, DraftSeverity as xt, AiDraftSettings as y, WrittenResponseRubric as yn, DraftIssue as yt, AiGroupInput as z, GraderUsage as zn, FillInTheBlanksData as zt };
2652
- //# sourceMappingURL=ai-i3jwXnpX.d.cts.map
2676
+ //# sourceMappingURL=ai-B1wYrqcB.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ai-B1wYrqcB.d.cts","names":[],"sources":["../src/scoring/text-match.ts","../src/types/grading.ts","../src/types/xapi.ts","../src/types/activity.ts","../src/types/authoring.ts","../src/types/item-group.ts","../src/types/ai.ts"],"mappings":";;;;;;;;UAQiB;;EAEf;;EAEA;;;;;;;EAOA;;EAEA;;EAEA;;EAEA;;EAEA;;;;;EAKA;;;;;;;;;;;;UAae;EACf;EACA;;;;;;iBAmDc,oBAAoB,WAAW,WAAW;;;;;;;;;;;iBAoC1C,UACd,eACA,sCACA,SAAQ,kBACP;;;;;;KCrHS;;;;;;;;;KAUA;;UAGK;EACf,MAAM;;EAEN;;EAEA;;EAEA;;;UAIe;EACf;EACA;EACA;;;UAIe;;EAEf;;;;;;EAMA;;;;;;;;;;;;;;;;EAgBA;;EAEA;;EAEA;;;;;;EAM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;;EAC3B,aAAa;EACb,QAAQ;;;;;;;;;;;;;;;;;KAoBE;;UAYK;EACf;EACA;;;;;;;UAQe;EACf;EACA;IACE;;IAEA,MAAM,SAAS;;IAEf,QAAQ;;;;;IAKR;MAAY;MAAgB;MAAc;;;IAE1C;;;EAGF;;;UAIe;;EAEf;EACA,MAAM;;EAEN;;EAEA;;;UAIe;EACf,UAAU;EACV,aAAa;EACb,QAAQ;;;;;;;UAQO,0BAA0B;EACzC;EACA;;;UAIe;EACf,UAAU;EACV,aAAa;EACb,QAAQ;;;;;;KASE;;;;;;KAaA;EACN;EAAgC;;EAChC;EAAkB;IAAQ;IAAe;IAAa;;;;UAG3C;EACf;EACA;EACA;EACA;;;UAIe;EACf;EACA;EACA;EACA;;;;;;;;;KAUU,kBAAkB,QAAQ,OAAO,aAAa,SAAS;;;;;;UAOlD;EACf;EACA;;;;;;IAME,eAAe;IACf;MACM;MAAgC;;MAChC;MAAkB,UAAU;;;IAElC;;IAEA;;IAEA;;IAEA;;;;;;;;;EASF,OAAO,SAAS;;EAEhB,WAAW;;;;;;EAMX;IACE;IACA,OAAO,SAAS;IAChB,UAAU;;;;UAKG;;EAEf;EACA,MAAM;;EAEN,OAAO;;EAEP,YAAY;;EAEZ,UAAU;;;;;;EAMV;;;;;;EAMA;IAAS;IAAe;;;EAExB,WAAW,SAAS;;;UAIL;;EAEf,QAAQ;;EAER,UAAU;EACV,aAAa;EACb,QAAQ;;;KAIE;EACN;EAAU,aAAa;EAAc,QAAQ;;EAC7C;EAAW,UAAU;EAAW;;;UAGrB;;EAEf,QAAQ;;EAER,UAAU;;EAEV,OAAO;;;;;;;;UASQ;;EAEf,OAAO;;EAEP,YAAY;;EAEZ,UAAU"}
@@ -1,4 +1,3 @@
1
- //#region src/scoring/text-match.d.ts
2
1
  /**
3
2
  * Configurable free-text answer matching (R3.3).
4
3
  *
@@ -63,8 +62,6 @@ declare function levenshteinDistance(a: string, b: string, max: number): number;
63
62
  * semantics: `trim` + locale-insensitive `toLowerCase` + strict equality.
64
63
  */
65
64
  declare function matchText(input: string, accepted: string | readonly string[], policy?: TextMatchPolicy): TextMatchResult;
66
- //#endregion
67
- //#region src/types/grading.d.ts
68
65
  /**
69
66
  * Lifecycle of a deferred grade. A grade exists only in the `graded` state;
70
67
  * every other state means "no grade, and here is why" — which is precisely the
@@ -243,8 +240,6 @@ interface GradeRecord {
243
240
  /** Where `routeGrade` sent this grade, and why, when it was routed. */
244
241
  routing?: GradeRouting;
245
242
  }
246
- //#endregion
247
- //#region src/types/xapi.d.ts
248
243
  /**
249
244
  * An xAPI Activity object — the thing a statement is about.
250
245
  * This SDK only builds Activity-type objects (xAPI 1.0.3 §4.1.4.1).
@@ -402,8 +397,6 @@ interface XAPIError {
402
397
  /** Human-readable error description. */
403
398
  message: string;
404
399
  }
405
- //#endregion
406
- //#region src/types/activity.d.ts
407
400
  /**
408
401
  * Maps each ActivityType string to its corresponding data shape.
409
402
  *
@@ -637,6 +630,13 @@ interface MultipleChoiceData {
637
630
  id: string;
638
631
  /** Human-readable title used in xAPI statements and error boundaries. */
639
632
  title: string;
633
+ /**
634
+ * Optional instructions shown to the learner, as plain text: the task, read
635
+ * before the question and never part of it ("Choose the correct option to
636
+ * complete the conversation."). Every AI request about the item carries them.
637
+ * Instructions a run of questions shares go in an item group's text stimulus.
638
+ */
639
+ instructions?: string;
640
640
  /** The question stem presented to the learner, as plain text. */
641
641
  question: string;
642
642
  /**
@@ -774,6 +774,14 @@ interface GapSelectData {
774
774
  id: string;
775
775
  /** Human-readable title used in xAPI statements and error boundaries. */
776
776
  title: string;
777
+ /**
778
+ * Optional instructions shown to the learner, as plain text: the task, read
779
+ * before the passage and never part of it ("Complete the sentence. Use ONE
780
+ * word."). Every AI request about the item carries them. A `{{id}}`
781
+ * placeholder here is refused: gaps live in the passage only. Instructions
782
+ * a run of questions shares go in an item group's text stimulus.
783
+ */
784
+ instructions?: string;
777
785
  /** Passage text containing `{{gap_id}}` placeholders. */
778
786
  passage: string;
779
787
  /**
@@ -831,6 +839,14 @@ interface FillInTheBlanksData {
831
839
  id: string;
832
840
  /** Human-readable title used in xAPI statements and error boundaries. */
833
841
  title: string;
842
+ /**
843
+ * Optional instructions shown to the learner, as plain text: the task, read
844
+ * before the passage and never part of it ("Complete the sentence. Use ONE
845
+ * word."). Every AI request about the item carries them. A `{{id}}`
846
+ * placeholder here is refused: blanks live in the passage only. Instructions
847
+ * a run of questions shares go in an item group's text stimulus.
848
+ */
849
+ instructions?: string;
834
850
  /** Passage text containing `{{blank_id}}` placeholders. */
835
851
  passage: string;
836
852
  /**
@@ -1538,8 +1554,6 @@ interface InteractionEvent {
1538
1554
  /** Additional event-specific data. */
1539
1555
  payload: Record<string, unknown>;
1540
1556
  }
1541
- //#endregion
1542
- //#region src/types/authoring.d.ts
1543
1557
  /**
1544
1558
  * Why a draft is not an activity yet.
1545
1559
  *
@@ -1614,8 +1628,6 @@ interface DraftContext {
1614
1628
  */
1615
1629
  newId: () => string;
1616
1630
  }
1617
- //#endregion
1618
- //#region src/types/item-group.d.ts
1619
1631
  /** What a stimulus primarily is. Drives validation and layout, never scoring. */
1620
1632
  type StimulusKind = 'text' | 'audio' | 'video' | 'image' | 'mixed';
1621
1633
  /**
@@ -1834,8 +1846,6 @@ interface SequenceSlot<TItem = ActivityData> {
1834
1846
  /** Present when the slot comes from an item group. */
1835
1847
  group?: SequenceSlotGroup;
1836
1848
  }
1837
- //#endregion
1838
- //#region src/types/ai.d.ts
1839
1849
  /**
1840
1850
  * What an author allows AI to do for one item. Absent, or a feature left out,
1841
1851
  * leaves the choice to the deployment. `false` switches a feature off for this
@@ -1903,6 +1913,11 @@ interface AiOptionFact {
1903
1913
  }
1904
1914
  interface AiMultipleChoiceFacts extends AiFactsBase {
1905
1915
  activityType: 'multiple-choice';
1916
+ /**
1917
+ * The item's instructions, when it has any: the task the learner reads
1918
+ * before the question. They say what to do, and are never part of the text answered.
1919
+ */
1920
+ instructions?: string;
1906
1921
  question: string;
1907
1922
  mode: 'single' | 'multi';
1908
1923
  options: AiOptionFact[];
@@ -1925,6 +1940,11 @@ interface AiBlankFact {
1925
1940
  }
1926
1941
  interface AiFillInTheBlanksFacts extends AiFactsBase {
1927
1942
  activityType: 'fill-in-the-blanks';
1943
+ /**
1944
+ * The item's instructions, when it has any: the task the learner reads
1945
+ * before the passage. They say what to do, and are never part of the text answered.
1946
+ */
1947
+ instructions?: string;
1928
1948
  /** The passage, each blank written as `[1]`, `[2]`… in passage order. */
1929
1949
  passage: string;
1930
1950
  blanks: AiBlankFact[];
@@ -1947,6 +1967,11 @@ interface AiGapFact {
1947
1967
  }
1948
1968
  interface AiGapSelectFacts extends AiFactsBase {
1949
1969
  activityType: 'gap-select';
1970
+ /**
1971
+ * The item's instructions, when it has any: the task the learner reads
1972
+ * before the passage. They say what to do, and are never part of the text answered.
1973
+ */
1974
+ instructions?: string;
1950
1975
  /** The passage, each gap written as `[1]`, `[2]`… in passage order. */
1951
1976
  passage: string;
1952
1977
  gaps: AiGapFact[];
@@ -2647,6 +2672,5 @@ interface AiVideoDraft {
2647
2672
  /** What `critiqueItemGroupDraft` says of it. */
2648
2673
  findings: ItemFinding[];
2649
2674
  }
2650
- //#endregion
2651
2675
  export { AiVerdict as $, MultipleChoiceData as $t, AiGapSelectFacts as A, XAPIStatement as An, ActivityType as At, AiHintRequest as B, GradingState as Bn, FillInTheBlanksLearnerResponse as Bt, AiDraftsCall as C, XAPIConfig as Cn, ItemFinding as Ct, AiFeature as D, XAPIObject as Dn, ActivityFeedback as Dt, AiExplanationRequest as E, XAPIError as En, ActivityDataMap as Et, AiGradingFacts as F, GradeRoutingReason as Fn, DictationEquivalence as Ft, AiProvenance as G, matchText as Gn, GapSelectLearnerResponse as Gt, AiMaterialFacts as H, TextMatchPolicy as Hn, GapSelectChoice as Ht, AiGradingJudgement as I, Grader as In, DictationLearnerResponse as It, AiRefusal as J, ItemOutcome as Jt, AiReadingFacts as K, InteractionEvent as Kt, AiGradingRequest as L, GraderConfiguration as Ln, DictationSlowMedia as Lt, AiGrade as M, CriterionScore as Mn, DeferredReason as Mt, AiGradedCriterion as N, GradeRecord as Nn, DeferredScoringPartial as Nt, AiFillInTheBlanksFacts as O, XAPIResult as On, ActivityMedia as Ot, AiGradingCriterionFact as P, GradeRouting as Pn, DictationData as Pt, AiTextResult as Q, MediaTrack as Qt, AiGradingRequestProblem as R, GraderKind as Rn, DictationTolerance as Rt, AiDrafts as S, XAPIActor as Sn, DraftValidationResult as St, AiDraftsRun as T, XAPIContextActivities as Tn, ActivityData as Tt, AiMultipleChoiceFacts as U, TextMatchResult as Un, GapSelectData as Ut, AiItemFacts as V, InlineCorrection as Vn, GapSelectBank as Vt, AiOptionFact as W, levenshteinDistance as Wn, GapSelectGap as Wt, AiSoundFact as X, LearnerResponseMap as Xt, AiRubricCriterionFact as Y, LearnerResponse as Yt, AiSupportedActivityType as Z, MediaPlaybackPolicy as Zt, AiDraftCaption as _, WrittenResponseData as _n, DraftComplete as _t, AiCoachingRequest as a, ReadAloudDimension as an, AiWritingFeedbackRequest as at, AiDraftSource as b, WrittenResponseRubricCriterion as bn, DraftNotComplete as bt, AiCriterionJudgement as c, ReadAloudSlowMedia as cn, MediaProgress as ct, AiCritiqueFinding as d, ScoringDetail as dn, SequenceSlot as dt, MultipleChoiceLearnerResponse as en, AiVideoDraft as et, AiCritiqueFindingResult as f, ScoringOutcome as fn, SequenceSlotGroup as ft, AiDictationFacts as g, ValidationResult as gn, TimelineCue as gt, AiCritiqueResult as h, ValidationError as hn, TimelineChapter as ht, AiCoaching as i, ReadAloudData as in, AiWritingFeedback as it, AiGeneratedDraft as j, XAPIVerbObject as jn, BlankConfig as jt, AiGapFact as k, XAPIScore as kn, ActivityResult as kt, AiCritique as l, RecordingBounds as ln, MediaTimeline as lt, AiCritiqueRequest as m, ScriptTurn as mn, StimulusKind as mt, AiActivityInput as n, MultipleChoiceOptionMedia as nn, AiWritingCorrection as nt, AiCoachingResult as o, ReadAloudDimensionWeight as on, AiWritingFeedbackResult as ot, AiCritiqueKind as p, ScoringResult as pn, Stimulus as pt, AiReadingWordFact as q, InteractionKind as qt, AiBlankFact as r, NativeControlHint as rn, AiWritingFacts as rt, AiCoachingWord as s, ReadAloudLearnerResponse as sn, ItemGroup as st, ActivityAiPermissions as t, MultipleChoiceOption as tn, AiWordFact as tt, AiCritiqueField as u, RecordingRef as un, SequenceEntry as ut, AiDraftProblem as v, WrittenResponseLearnerResponse as vn, DraftContext as vt, AiDraftsRequest as w, XAPIContext as wn, ItemFindingSeverity as wt, AiDraftType as x, WrittenResponseRubricLevel as xn, DraftSeverity as xt, AiDraftSettings as y, WrittenResponseRubric as yn, DraftIssue as yt, AiGroupInput as z, GraderUsage as zn, FillInTheBlanksData as zt };
2652
- //# sourceMappingURL=ai-i3jwXnpX.d.ts.map
2676
+ //# sourceMappingURL=ai-B1wYrqcB.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ai-B1wYrqcB.d.ts","names":[],"sources":["../src/scoring/text-match.ts","../src/types/grading.ts","../src/types/xapi.ts","../src/types/activity.ts","../src/types/authoring.ts","../src/types/item-group.ts","../src/types/ai.ts"],"mappings":";;;;;;;;UAQiB;;EAEf;;EAEA;;;;;;;EAOA;;EAEA;;EAEA;;EAEA;;EAEA;;;;;EAKA;;;;;;;;;;;;UAae;EACf;EACA;;;;;;iBAmDc,oBAAoB,WAAW,WAAW;;;;;;;;;;;iBAoC1C,UACd,eACA,sCACA,SAAQ,kBACP;;;;;;KCrHS;;;;;;;;;KAUA;;UAGK;EACf,MAAM;;EAEN;;EAEA;;EAEA;;;UAIe;EACf;EACA;EACA;;;UAIe;;EAEf;;;;;;EAMA;;;;;;;;;;;;;;;;EAgBA;;EAEA;;EAEA;;;;;;EAMA;;EAEA;;;;;;;EAOA;;;;;;;UAQe;;EAEf;;EAEA;;EAEA;;EAEA;;;;;;;;;;;;;;;;;;KAmBU;;UASK;;EAEf;;EAEA,SAAS;;EAET;IAAgB;IAAoB;;;;UAIrB;;E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gB;MAAc;;;IAE1C;;;EAGF;;;UAIe;;EAEf;EACA,MAAM;;EAEN;;EAEA;;;UAIe;EACf,UAAU;EACV,aAAa;EACb,QAAQ;;;;;;;UAQO,0BAA0B;EACzC;EACA;;;UAIe;EACf,UAAU;EACV,aAAa;EACb,QAAQ;;;;;;KASE;;;;;;KAaA;EACN;EAAgC;;EAChC;EAAkB;IAAQ;IAAe;IAAa;;;;UAG3C;EACf;EACA;EACA;EACA;;;UAIe;EACf;EACA;EACA;EACA;;;;;;;;;KAUU,kBAAkB,QAAQ,OAAO,aAAa,SAAS;;;;;;UAOlD;EACf;EACA;;;;;;IAME,eAAe;IACf;MACM;MAAgC;;MAChC;MAAkB,UAAU;;;IAElC;;IAEA;;IAEA;;IAEA;;;;;;;;;EASF,OAAO,SAAS;;EAEhB,WAAW;;;;;;EAMX;IACE;IACA,OAAO,SAAS;IAChB,UAAU;;;;UAKG;;EAEf;EACA,MAAM;;EAEN,OAAO;;EAEP,YAAY;;EAEZ,UAAU;;;;;;EAMV;;;;;;EAMA;IAAS;IAAe;;;EAExB,WAAW,SAAS;;;UAIL;;EAEf,QAAQ;;EAER,UAAU;EACV,aAAa;EACb,QAAQ;;;KAIE;EACN;EAAU,aAAa;EAAc,QAAQ;;EAC7C;EAAW,UAAU;EAAW;;;UAGrB;;EAEf,QAAQ;;EAER,UAAU;;EAEV,OAAO;;;;;;;;UASQ;;EAEf,OAAO;;EAEP,YAAY;;EAEZ,UAAU"}
package/dist/ai-check.cjs CHANGED
@@ -1,7 +1,7 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_ai_writing = require("./ai-writing-C4YRVrFi.cjs");
3
- const require_scoring = require("./scoring-CaPS6q8b.cjs");
4
- //#region src/ai-check/cases.ts
2
+ const require_ai_writing = require("./ai-writing-DrPTV3R2.cjs");
3
+ const require_scoring = require("./scoring-CtkCFyFT.cjs");
4
+ // src/ai-check/cases.ts
5
5
  /**
6
6
  * The items the cases are built from. Small, ordinary language-course content
7
7
  * — and deliberately awkward in the places a model slips:
@@ -18,6 +18,8 @@ const require_scoring = require("./scoring-CaPS6q8b.cjs");
18
18
  * - questions in item groups: a reading passage that prints a question's
19
19
  * answer, which a hint must point to without quoting, and a run of blanks
20
20
  * whose instructions only the group states;
21
+ * - the same blank served alone, as an adaptive test serves it, whose task
22
+ * only its own instructions state;
21
23
  * - essays to grade on a rubric of three criteria, two judged on levels and
22
24
  * one on a score, so a grade that drops a criterion or leaves a scale is
23
25
  * caught.
@@ -181,6 +183,12 @@ const formationPart = {
181
183
  },
182
184
  items: [formation]
183
185
  };
186
+ /** The same blank served alone, as an adaptive test serves it: the task is in its own instructions. */
187
+ const formationAlone = {
188
+ ...formation,
189
+ id: "ai-check-formation-alone",
190
+ instructions: "Use the word in capitals at the end of the sentence to form a word that fits the gap."
191
+ };
184
192
  const weekend = {
185
193
  schemaVersion: "1.0",
186
194
  type: "written-response",
@@ -706,6 +714,7 @@ function aiCheckCases() {
706
714
  hintCase("gap-hint-2", "Asked again with the first gap wrong", landscape, picked({ g1: "campo" }), ["Piensa en la forma del terreno."]),
707
715
  hintCase("mc-reading-hint", "Has not answered a question whose answer its group's passage prints", springTides, chose([]), [], tides),
708
716
  hintCase("fib-formation-hint", "A word-formation blank, under the instructions its group gives", formation, typed({}), [], formationPart),
717
+ hintCase("fib-instructions-hint", "The same blank served alone, under its own instructions", formationAlone, typed({})),
709
718
  writingCase("writing-mistakes", "A first draft with tense, article and agreement mistakes", "Last weekend I go to the market and buyed a apple. My friends was there too, so we don't go home early. Then I go to the cinema."),
710
719
  writingCase("writing-clean", "A first draft with no mistakes to correct", "Last weekend I went to the market and bought an apple. My friends were there too, so we stayed until the evening. Then we went to the cinema."),
711
720
  writingCase("writing-revised", "A second draft that fixed some mistakes", "Last weekend I went to the market and bought a apple. My friends was there too, so we didn't go home early.", ["Check your past tenses: \"go\" and \"buyed\" should be past forms."]),
@@ -793,8 +802,7 @@ function aiCheckCases() {
793
802
  gradingCase("grading-in-spanish", "The essay with mistakes, with comments asked for in Spanish", "Last weekend I go to the market and buyed a apple. My friends was there too, so we don't go home early. Then I go to the cinema.", { learnerLocale: "es" })
794
803
  ];
795
804
  }
796
- //#endregion
797
- //#region src/ai-check/index.ts
805
+ // src/ai-check/index.ts
798
806
  /**
799
807
  * A test kit for the prompts behind your AI ports.
800
808
  *
@@ -1037,7 +1045,6 @@ function formatAiCheckReport(report) {
1037
1045
  }
1038
1046
  return lines.join("\n");
1039
1047
  }
1040
- //#endregion
1041
1048
  exports.aiCheckCases = aiCheckCases;
1042
1049
  exports.formatAiCheckReport = formatAiCheckReport;
1043
1050
  exports.runAiCheck = runAiCheck;