@intellectif/lk-core 1.3.0 → 1.4.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 +14 -0
- package/dist/{ai-B222dtHH.d.ts → ai-CnmLPMzd.d.cts} +265 -2
- package/dist/ai-CnmLPMzd.d.cts.map +1 -0
- package/dist/{ai-B222dtHH.d.cts → ai-CnmLPMzd.d.ts} +265 -2
- package/dist/ai-CnmLPMzd.d.ts.map +1 -0
- package/dist/ai-check.cjs +101 -8
- package/dist/ai-check.cjs.map +1 -1
- package/dist/ai-check.d.cts +1 -1
- package/dist/ai-check.d.cts.map +1 -1
- package/dist/ai-check.d.ts +1 -1
- package/dist/ai-check.d.ts.map +1 -1
- package/dist/ai-check.js +101 -8
- package/dist/ai-check.js.map +1 -1
- package/dist/{ai-writing-CCBjTOM3.js → ai-writing-CPpH9Qxq.js} +126 -21
- package/dist/ai-writing-CPpH9Qxq.js.map +1 -0
- package/dist/{ai-writing-DCVkv4Zj.cjs → ai-writing-G6tnCGzw.cjs} +114 -3
- package/dist/ai-writing-G6tnCGzw.cjs.map +1 -0
- package/dist/{index-BWPRPIXL.d.ts → index-2nigSf4N.d.cts} +3 -217
- package/dist/index-2nigSf4N.d.cts.map +1 -0
- package/dist/{index-O4_ExlAD.d.cts → index-B54baFUA.d.ts} +3 -217
- package/dist/index-B54baFUA.d.ts.map +1 -0
- package/dist/{index-Dyu66R4-.d.cts → index-BAfEHCnD.d.cts} +2 -2
- package/dist/{index-Dyu66R4-.d.cts.map → index-BAfEHCnD.d.cts.map} +1 -1
- package/dist/{index-CXyOV8sm.d.cts → index-BqMXWuNC.d.cts} +2 -2
- package/dist/{index-CXyOV8sm.d.cts.map → index-BqMXWuNC.d.cts.map} +1 -1
- package/dist/{index-UGxRSopE.d.ts → index-CVWvymVb.d.ts} +2 -2
- package/dist/{index-UGxRSopE.d.ts.map → index-CVWvymVb.d.ts.map} +1 -1
- package/dist/{index-CegM8o15.d.ts → index-CcHDTxIZ.d.ts} +2 -2
- package/dist/{index-CegM8o15.d.ts.map → index-CcHDTxIZ.d.ts.map} +1 -1
- package/dist/index.cjs +2 -1
- package/dist/index.d.cts +35 -7
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.ts +35 -7
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -2
- package/dist/schemas.d.cts +1 -1
- package/dist/schemas.d.ts +1 -1
- package/dist/scoring.d.cts +2 -2
- package/dist/scoring.d.ts +2 -2
- package/dist/xapi.d.cts +1 -1
- package/dist/xapi.d.ts +1 -1
- package/package.json +1 -1
- package/dist/ai-B222dtHH.d.cts.map +0 -1
- package/dist/ai-B222dtHH.d.ts.map +0 -1
- package/dist/ai-writing-CCBjTOM3.js.map +0 -1
- package/dist/ai-writing-DCVkv4Zj.cjs.map +0 -1
- package/dist/index-BWPRPIXL.d.ts.map +0 -1
- package/dist/index-O4_ExlAD.d.cts.map +0 -1
|
@@ -1491,6 +1491,220 @@ interface DraftContext {
|
|
|
1491
1491
|
newId: () => string;
|
|
1492
1492
|
}
|
|
1493
1493
|
//#endregion
|
|
1494
|
+
//#region src/types/item-group.d.ts
|
|
1495
|
+
/** What a stimulus primarily is. Drives validation and layout, never scoring. */
|
|
1496
|
+
type StimulusKind = 'text' | 'audio' | 'video' | 'image' | 'mixed';
|
|
1497
|
+
/**
|
|
1498
|
+
* Shared material that several items refer to: a reading passage, a
|
|
1499
|
+
* recording, a chart. Modelled as CONTENT — it lives inside the item group
|
|
1500
|
+
* that carries it — so it works in a lesson quiz, a sequence and an exam
|
|
1501
|
+
* section alike, and needs no blueprint to exist.
|
|
1502
|
+
*
|
|
1503
|
+
* Learner-visible by definition: the point of a stimulus is that the learner
|
|
1504
|
+
* reads or hears it. The one exception is `transcript`, an author asset that
|
|
1505
|
+
* `redactItemGroup` removes.
|
|
1506
|
+
*/
|
|
1507
|
+
interface Stimulus {
|
|
1508
|
+
id: string;
|
|
1509
|
+
kind: StimulusKind;
|
|
1510
|
+
/** Optional heading (a passage title). */
|
|
1511
|
+
title?: string;
|
|
1512
|
+
/**
|
|
1513
|
+
* Plain-text body: the passage itself, or short instructions above media.
|
|
1514
|
+
* Required for `text` and `mixed`.
|
|
1515
|
+
*/
|
|
1516
|
+
body?: string;
|
|
1517
|
+
/**
|
|
1518
|
+
* Optional sanitised rich-HTML sidecar of `body`. Requires `body`, which is
|
|
1519
|
+
* the accessible fallback rendered when no sanitiser is supplied.
|
|
1520
|
+
*/
|
|
1521
|
+
bodyHtml?: string;
|
|
1522
|
+
/** The recording, video or image. Required for `audio`, `video`, `image` and `mixed`. */
|
|
1523
|
+
media?: ActivityMedia;
|
|
1524
|
+
/**
|
|
1525
|
+
* Author-only transcript of `media` — for item generation and grading,
|
|
1526
|
+
* never shown to the learner. Removed by `redactItemGroup`.
|
|
1527
|
+
*/
|
|
1528
|
+
transcript?: string;
|
|
1529
|
+
/** BCP 47 language tag of the material, when it differs from the items'. */
|
|
1530
|
+
locale?: string;
|
|
1531
|
+
/** Source credit, shown to the learner after the material. */
|
|
1532
|
+
attribution?: string;
|
|
1533
|
+
}
|
|
1534
|
+
/**
|
|
1535
|
+
* A quiz inside an interactive video: one moment of the video, and the
|
|
1536
|
+
* questions shown there. The video pauses when playback reaches `at`, and the
|
|
1537
|
+
* questions are shown one at a time, in `itemIds` order.
|
|
1538
|
+
*/
|
|
1539
|
+
interface TimelineCue {
|
|
1540
|
+
/** Unique within the timeline. Names the quiz in events, the contents panel and drafts. */
|
|
1541
|
+
id: string;
|
|
1542
|
+
/**
|
|
1543
|
+
* Seconds from the start of the video: finite and 0 or more. The SDK never
|
|
1544
|
+
* reads the video, so it cannot check this against the duration: a quiz at
|
|
1545
|
+
* or past the end opens when the video ends.
|
|
1546
|
+
*/
|
|
1547
|
+
at: number;
|
|
1548
|
+
/**
|
|
1549
|
+
* `id`s of items in this group, in the order the quiz shows them. Non-empty.
|
|
1550
|
+
* Every item of the group belongs to exactly one quiz.
|
|
1551
|
+
*/
|
|
1552
|
+
itemIds: string[];
|
|
1553
|
+
/** Optional heading shown above the questions. At most 120 characters. */
|
|
1554
|
+
title?: string;
|
|
1555
|
+
/**
|
|
1556
|
+
* Every question must be answered (practice) or submitted (exam) before
|
|
1557
|
+
* playback may pass `at`. Default false.
|
|
1558
|
+
*/
|
|
1559
|
+
required?: boolean;
|
|
1560
|
+
}
|
|
1561
|
+
/** A titled section of the video. */
|
|
1562
|
+
interface TimelineChapter {
|
|
1563
|
+
/** Seconds from the start: finite, 0 or more, strictly increasing across the list. */
|
|
1564
|
+
at: number;
|
|
1565
|
+
/** Non-empty after trimming; at most 120 characters. */
|
|
1566
|
+
title: string;
|
|
1567
|
+
}
|
|
1568
|
+
/**
|
|
1569
|
+
* The arrangement that turns an item group with a video stimulus into an
|
|
1570
|
+
* interactive video: when each quiz opens, the video's chapters, and how far
|
|
1571
|
+
* ahead a learner may seek.
|
|
1572
|
+
*
|
|
1573
|
+
* It lives on the container rather than inside `stimulus` because it describes
|
|
1574
|
+
* how THESE questions are arranged over the material, not the material itself.
|
|
1575
|
+
*/
|
|
1576
|
+
interface MediaTimeline {
|
|
1577
|
+
cues: TimelineCue[];
|
|
1578
|
+
chapters?: TimelineChapter[];
|
|
1579
|
+
/**
|
|
1580
|
+
* `free` (default): seek anywhere. `no-skip-ahead`: rewind freely, never past
|
|
1581
|
+
* the furthest point reached. Either way, playback never passes a `required`
|
|
1582
|
+
* quiz that is not finished.
|
|
1583
|
+
*/
|
|
1584
|
+
navigation?: 'free' | 'no-skip-ahead';
|
|
1585
|
+
}
|
|
1586
|
+
/**
|
|
1587
|
+
* Where a learner stands in an interactive video, stored by the host so the
|
|
1588
|
+
* video can resume. Kept apart from `AttemptState`, which holds answers by slot
|
|
1589
|
+
* and drops fields it does not know. Read it back through
|
|
1590
|
+
* `readMediaProgress`, never directly.
|
|
1591
|
+
*/
|
|
1592
|
+
interface MediaProgress {
|
|
1593
|
+
progressVersion: '1.0';
|
|
1594
|
+
/** Seconds: where playback last stood. */
|
|
1595
|
+
at: number;
|
|
1596
|
+
/**
|
|
1597
|
+
* Seconds: the furthest point reached. Decides how far `no-skip-ahead` lets
|
|
1598
|
+
* the learner seek, and how much of the transcript it shows.
|
|
1599
|
+
*/
|
|
1600
|
+
furthest: number;
|
|
1601
|
+
}
|
|
1602
|
+
/**
|
|
1603
|
+
* One stimulus serving several items. Two rules, both taken from observed
|
|
1604
|
+
* failures: a group is SHUFFLE-ATOMIC (shuffling a sequence moves the group
|
|
1605
|
+
* as one block — interleaving two passages' questions is the defect), and its
|
|
1606
|
+
* stimulus is presented persistently alongside every item, never behind a
|
|
1607
|
+
* toggle the learner must reopen per question.
|
|
1608
|
+
*
|
|
1609
|
+
* Generic over the item type so one shape describes a group of full activity
|
|
1610
|
+
* data (authoring, server) and a group of `redact()` projections (client)
|
|
1611
|
+
* without a cast at every boundary.
|
|
1612
|
+
*/
|
|
1613
|
+
interface ItemGroup<TItem = ActivityData> {
|
|
1614
|
+
schemaVersion: '1.0';
|
|
1615
|
+
type: 'item-group';
|
|
1616
|
+
id: string;
|
|
1617
|
+
title?: string;
|
|
1618
|
+
/**
|
|
1619
|
+
* Stable identity for this entry's slots, independent of where it sits in
|
|
1620
|
+
* the array. See {@link SequenceSlot.slotId}: without one, inserting a
|
|
1621
|
+
* question above this group re-maps every slot id beneath it, and stored
|
|
1622
|
+
* grades quietly start naming different questions.
|
|
1623
|
+
*/
|
|
1624
|
+
slotKey?: string;
|
|
1625
|
+
stimulus: Stimulus;
|
|
1626
|
+
/**
|
|
1627
|
+
* The items, in authored order. Non-empty; ids unique within the group; no
|
|
1628
|
+
* nested groups.
|
|
1629
|
+
*
|
|
1630
|
+
* An item may declare its own `slotKey`, for the same reason an entry can:
|
|
1631
|
+
* it pins the item's identity within the group (`"reading.q1"` rather than
|
|
1632
|
+
* `"reading.0"`), so inserting a question into a published group does not
|
|
1633
|
+
* re-map the ones after it.
|
|
1634
|
+
*/
|
|
1635
|
+
items: (TItem & {
|
|
1636
|
+
slotKey?: string;
|
|
1637
|
+
})[];
|
|
1638
|
+
/**
|
|
1639
|
+
* `none` (default) keeps authored order; `within-group` shuffles the items
|
|
1640
|
+
* among themselves under the sequence seed. Either way the group stays one
|
|
1641
|
+
* contiguous block.
|
|
1642
|
+
*/
|
|
1643
|
+
shuffle?: 'none' | 'within-group';
|
|
1644
|
+
/**
|
|
1645
|
+
* Makes the group an interactive video: the stimulus must be a video, every
|
|
1646
|
+
* item must be one of `INTERACTIVE_VIDEO_ITEM_TYPES`, and every item belongs
|
|
1647
|
+
* to exactly one quiz. Items are then presented in quiz order, never
|
|
1648
|
+
* shuffled. An older lk-core that does not know this field presents the same
|
|
1649
|
+
* items as an ordinary video testlet, with the same slots and grades.
|
|
1650
|
+
*/
|
|
1651
|
+
timeline?: MediaTimeline;
|
|
1652
|
+
}
|
|
1653
|
+
/**
|
|
1654
|
+
* What a sequence is made of: loose activities and item groups, in authored
|
|
1655
|
+
* order.
|
|
1656
|
+
*
|
|
1657
|
+
* A plain activity may carry `slotKey` here even though no activity SCHEMA
|
|
1658
|
+
* declares one, because a slot key describes an item's PLACE in a paper, not
|
|
1659
|
+
* its content — the same question keeps its own id in every paper it appears
|
|
1660
|
+
* in. Putting it on the entry rather than on the activity is what lets it be
|
|
1661
|
+
* authored without every activity type having to know about assessment
|
|
1662
|
+
* assembly. See {@link SequenceSlot.slotId}.
|
|
1663
|
+
*/
|
|
1664
|
+
type SequenceEntry<TItem = ActivityData> = (TItem & {
|
|
1665
|
+
slotKey?: string;
|
|
1666
|
+
}) | ItemGroup<TItem>;
|
|
1667
|
+
/** The group a presented slot belongs to. */
|
|
1668
|
+
interface SequenceSlotGroup {
|
|
1669
|
+
id: string;
|
|
1670
|
+
title?: string;
|
|
1671
|
+
stimulus: Stimulus;
|
|
1672
|
+
/** 0-based position of this slot within the group's PRESENTED order. */
|
|
1673
|
+
position: number;
|
|
1674
|
+
/** Number of slots in the group. */
|
|
1675
|
+
size: number;
|
|
1676
|
+
/** The group's timeline, when the group is an interactive video. */
|
|
1677
|
+
timeline?: MediaTimeline;
|
|
1678
|
+
/** The quiz this slot's item sits in, when the group is an interactive video. */
|
|
1679
|
+
cue?: TimelineCue;
|
|
1680
|
+
}
|
|
1681
|
+
/** One presented position in a flattened sequence. */
|
|
1682
|
+
interface SequenceSlot<TItem = ActivityData> {
|
|
1683
|
+
/**
|
|
1684
|
+
* Identity of the slot within the sequence definition — unique, and stable
|
|
1685
|
+
* under shuffling. Feed it to `composeAssessmentScore` as `slotId`.
|
|
1686
|
+
*
|
|
1687
|
+
* By default it is derived from the AUTHORED position (`"2"` for the third
|
|
1688
|
+
* top-level entry; `"2.1"` for the second item of that entry when it is a
|
|
1689
|
+
* group), so the same activity can appear in two entries and still be two
|
|
1690
|
+
* slots.
|
|
1691
|
+
*
|
|
1692
|
+
* **A positional id is only valid against one version of the entries
|
|
1693
|
+
* array.** Insert a question at the top of a published paper and every id
|
|
1694
|
+
* below it shifts: rows stored as `"3"` now name what used to be entry 2,
|
|
1695
|
+
* and a re-grade or a review render pairs each response with the wrong
|
|
1696
|
+
* question — silently, because the ids still look valid. For any content
|
|
1697
|
+
* whose slot ids you persist, give the entries an explicit `slotKey`; it is
|
|
1698
|
+
* used verbatim here and survives insertion, deletion and re-ordering.
|
|
1699
|
+
*/
|
|
1700
|
+
slotId: string;
|
|
1701
|
+
/** 0-based PRESENTED position, after shuffling. */
|
|
1702
|
+
index: number;
|
|
1703
|
+
activity: TItem;
|
|
1704
|
+
/** Present when the slot comes from an item group. */
|
|
1705
|
+
group?: SequenceSlotGroup;
|
|
1706
|
+
}
|
|
1707
|
+
//#endregion
|
|
1494
1708
|
//#region src/types/ai.d.ts
|
|
1495
1709
|
/**
|
|
1496
1710
|
* What an author allows AI to do for one item. Absent, or a feature left out,
|
|
@@ -1629,6 +1843,46 @@ interface AiDictationFacts extends AiFactsBase {
|
|
|
1629
1843
|
* learner saw it, what they answered, and — part by part — the SDK's verdict.
|
|
1630
1844
|
*/
|
|
1631
1845
|
type AiItemFacts = AiMultipleChoiceFacts | AiFillInTheBlanksFacts | AiGapSelectFacts | AiDictationFacts;
|
|
1846
|
+
/**
|
|
1847
|
+
* The item group a question sits in, as a renderer holds it: an `ItemGroup`,
|
|
1848
|
+
* a redacted one, a sequence slot's `group`, or a host's own object with the
|
|
1849
|
+
* same two fields. Structural, and read defensively, like
|
|
1850
|
+
* {@link AiActivityInput}: a group whose material cannot be read gives none.
|
|
1851
|
+
*/
|
|
1852
|
+
interface AiGroupInput {
|
|
1853
|
+
readonly title?: unknown;
|
|
1854
|
+
readonly stimulus?: unknown;
|
|
1855
|
+
}
|
|
1856
|
+
/**
|
|
1857
|
+
* What a model is told about the material of the group a question sits in:
|
|
1858
|
+
* what the learner reads and sees beside the question — a passage, or the
|
|
1859
|
+
* instructions a run of questions shares. Never a media address, and never
|
|
1860
|
+
* the author-only transcript: the same facts whether the group is whole or
|
|
1861
|
+
* redacted.
|
|
1862
|
+
*/
|
|
1863
|
+
interface AiMaterialFacts {
|
|
1864
|
+
/** What the material primarily is. */
|
|
1865
|
+
kind: StimulusKind;
|
|
1866
|
+
/** The material's heading, or the group's title when it has none. */
|
|
1867
|
+
title?: string;
|
|
1868
|
+
/**
|
|
1869
|
+
* The text beside the questions, as plain text: the passage, or the
|
|
1870
|
+
* instructions above a recording or image. Cut past `AI_MATERIAL_MAX_LENGTH`
|
|
1871
|
+
* code points, at a word boundary where there is one.
|
|
1872
|
+
*/
|
|
1873
|
+
text?: string;
|
|
1874
|
+
/** Present when `text` was cut: the model is given only its start. */
|
|
1875
|
+
truncated?: true;
|
|
1876
|
+
/** The recording, video or image, without its address. An image's `alt` says what it shows. */
|
|
1877
|
+
media?: {
|
|
1878
|
+
type: ActivityMedia['type'];
|
|
1879
|
+
alt?: string;
|
|
1880
|
+
};
|
|
1881
|
+
/** The source credit the learner sees after the material. */
|
|
1882
|
+
attribution?: string;
|
|
1883
|
+
/** The language of the material, when the author gave one. */
|
|
1884
|
+
locale?: string;
|
|
1885
|
+
}
|
|
1632
1886
|
/**
|
|
1633
1887
|
* Asks for an explanation of a graded answer. Sent after the SDK has graded
|
|
1634
1888
|
* it, so `grade` is always present, and an explanation that contradicts
|
|
@@ -1638,6 +1892,8 @@ interface AiExplanationRequest {
|
|
|
1638
1892
|
feature: 'explanation';
|
|
1639
1893
|
facts: AiItemFacts;
|
|
1640
1894
|
grade: AiGrade;
|
|
1895
|
+
/** The material of the group the question sits in; absent outside a group. */
|
|
1896
|
+
material?: AiMaterialFacts;
|
|
1641
1897
|
/** The language to answer in: the learner's interface language, when known. */
|
|
1642
1898
|
learnerLocale?: string;
|
|
1643
1899
|
}
|
|
@@ -1653,6 +1909,8 @@ interface AiHintRequest {
|
|
|
1653
1909
|
hintNumber: number;
|
|
1654
1910
|
/** The hints already shown for this item, oldest first. */
|
|
1655
1911
|
previousHints: string[];
|
|
1912
|
+
/** The material of the group the question sits in; absent outside a group. */
|
|
1913
|
+
material?: AiMaterialFacts;
|
|
1656
1914
|
learnerLocale?: string;
|
|
1657
1915
|
}
|
|
1658
1916
|
/** What produced an AI text, for the record a host keeps. */
|
|
@@ -1735,6 +1993,11 @@ interface AiWritingFeedbackRequest {
|
|
|
1735
1993
|
draftNumber: number;
|
|
1736
1994
|
/** The text of the feedback already shown on earlier drafts, oldest first. */
|
|
1737
1995
|
previousFeedback: string[];
|
|
1996
|
+
/**
|
|
1997
|
+
* The material of the group the task sits in — the text a summary is of —
|
|
1998
|
+
* absent outside a group.
|
|
1999
|
+
*/
|
|
2000
|
+
material?: AiMaterialFacts;
|
|
1738
2001
|
/** The language to write in: the learner's interface language, when known. */
|
|
1739
2002
|
learnerLocale?: string;
|
|
1740
2003
|
}
|
|
@@ -2150,5 +2413,5 @@ interface AiVideoDraft {
|
|
|
2150
2413
|
findings: ItemFinding[];
|
|
2151
2414
|
}
|
|
2152
2415
|
//#endregion
|
|
2153
|
-
export {
|
|
2154
|
-
//# sourceMappingURL=ai-
|
|
2416
|
+
export { AiWritingFeedbackRequest as $, ReadAloudDimension as $t, AiGapSelectFacts as A, InlineCorrection as An, DictationLearnerResponse as At, AiReadingFacts as B, InteractionEvent as Bt, AiDraftsCall as C, XAPIVerbObject as Cn, ActivityResult as Ct, AiFeature as D, GraderKind as Dn, DeferredScoringPartial as Dt, AiExplanationRequest as E, Grader as En, DeferredReason as Et, AiItemFacts as F, GapSelectBank as Ft, AiSupportedActivityType as G, MediaPlaybackPolicy as Gt, AiRefusal as H, ItemOutcome as Ht, AiMaterialFacts as I, GapSelectChoice as It, AiVideoDraft as J, MultipleChoiceLearnerResponse as Jt, AiTextResult as K, MediaTrack as Kt, AiMultipleChoiceFacts as L, GapSelectData as Lt, AiGrade as M, TextMatchResult as Mn, DictationTolerance as Mt, AiGroupInput as N, levenshteinDistance as Nn, FillInTheBlanksData as Nt, AiFillInTheBlanksFacts as O, GraderUsage as On, DictationData as Ot, AiHintRequest as P, matchText as Pn, FillInTheBlanksLearnerResponse as Pt, AiWritingFeedback as Q, ReadAloudData as Qt, AiOptionFact as R, GapSelectGap as Rt, AiDrafts as S, XAPIStatement as Sn, ActivityMedia as St, AiDraftsRun as T, GradeRecord as Tn, BlankConfig as Tt, AiRubricCriterionFact as U, LearnerResponse as Ut, AiReadingWordFact as V, InteractionKind as Vt, AiSoundFact as W, LearnerResponseMap as Wt, AiWritingCorrection as X, MultipleChoiceOptionMedia as Xt, AiWordFact as Y, MultipleChoiceOption as Yt, AiWritingFacts as Z, NativeControlHint as Zt, AiDraftCaption as _, XAPIContextActivities as _n, ItemFinding as _t, AiCoachingRequest as a, ScoringDetail as an, SequenceSlot as at, AiDraftSource as b, XAPIResult as bn, ActivityDataMap as bt, AiCriterionJudgement as c, ValidationError as cn, StimulusKind as ct, AiCritiqueFinding as d, WrittenResponseLearnerResponse as dn, DraftComplete as dt, ReadAloudDimensionWeight as en, AiWritingFeedbackResult as et, AiCritiqueFindingResult as f, WrittenResponseRubric as fn, DraftContext as ft, AiDictationFacts as g, XAPIContext as gn, DraftValidationResult as gt, AiCritiqueResult as h, XAPIConfig as hn, DraftSeverity as ht, AiCoaching as i, RecordingRef as in, SequenceEntry as it, AiGeneratedDraft as j, TextMatchPolicy as jn, DictationSlowMedia as jt, AiGapFact as k, GradingState as kn, DictationEquivalence as kt, AiCritique as l, ValidationResult as ln, TimelineChapter as lt, AiCritiqueRequest as m, XAPIActor as mn, DraftNotComplete as mt, AiActivityInput as n, ReadAloudSlowMedia as nn, MediaProgress as nt, AiCoachingResult as o, ScoringOutcome as on, SequenceSlotGroup as ot, AiCritiqueKind as p, WrittenResponseRubricCriterion as pn, DraftIssue as pt, AiVerdict as q, MultipleChoiceData as qt, AiBlankFact as r, RecordingBounds as rn, MediaTimeline as rt, AiCoachingWord as s, ScoringResult as sn, Stimulus as st, ActivityAiPermissions as t, ReadAloudLearnerResponse as tn, ItemGroup as tt, AiCritiqueField as u, WrittenResponseData as un, TimelineCue as ut, AiDraftProblem as v, XAPIError as vn, ItemFindingSeverity as vt, AiDraftsRequest as w, CriterionScore as wn, ActivityType as wt, AiDraftType as x, XAPIScore as xn, ActivityFeedback as xt, AiDraftSettings as y, XAPIObject as yn, ActivityData as yt, AiProvenance as z, GapSelectLearnerResponse as zt };
|
|
2417
|
+
//# sourceMappingURL=ai-CnmLPMzd.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ai-CnmLPMzd.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,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AEA;;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,5 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_ai_writing = require("./ai-writing-
|
|
2
|
+
const require_ai_writing = require("./ai-writing-G6tnCGzw.cjs");
|
|
3
3
|
const require_scoring = require("./scoring-B2_HEhMT.cjs");
|
|
4
4
|
//#region src/ai-check/cases.ts
|
|
5
5
|
/**
|
|
@@ -14,7 +14,10 @@ const require_scoring = require("./scoring-B2_HEhMT.cjs");
|
|
|
14
14
|
* - a passage with more than one blank, so a hint can be about the wrong one;
|
|
15
15
|
* - a short essay whose mistakes a model must quote exactly as the learner
|
|
16
16
|
* wrote them — straight apostrophes a model likes to curl, a mistake made
|
|
17
|
-
* twice — so a correction of words nobody wrote is caught
|
|
17
|
+
* twice — so a correction of words nobody wrote is caught;
|
|
18
|
+
* - questions in item groups: a reading passage that prints a question's
|
|
19
|
+
* answer, which a hint must point to without quoting, and a run of blanks
|
|
20
|
+
* whose instructions only the group states.
|
|
18
21
|
*/
|
|
19
22
|
const capital = {
|
|
20
23
|
schemaVersion: "1.0",
|
|
@@ -95,6 +98,86 @@ const listening = {
|
|
|
95
98
|
title: "Listen and type",
|
|
96
99
|
transcript: "The train leaves at half past nine."
|
|
97
100
|
};
|
|
101
|
+
/**
|
|
102
|
+
* A reading group: a passage, a question it answers word for word, and a
|
|
103
|
+
* summary of it. The question's answer is printed in the passage, so a hint
|
|
104
|
+
* that quotes the passage where it answers is refused.
|
|
105
|
+
*/
|
|
106
|
+
const TIDES = "Along most coasts the tide comes in twice a day. It is pulled by the moon: as the Earth turns, the ocean nearest the moon bulges towards it, and so does the ocean on the far side. The highest tides, called spring tides, come when the sun and the moon line up.";
|
|
107
|
+
const springTides = {
|
|
108
|
+
schemaVersion: "1.0",
|
|
109
|
+
type: "multiple-choice",
|
|
110
|
+
id: "ai-check-tides",
|
|
111
|
+
title: "Spring tides",
|
|
112
|
+
question: "When do the highest tides come?",
|
|
113
|
+
mode: "single",
|
|
114
|
+
scoringStrategy: "all-or-nothing",
|
|
115
|
+
options: [
|
|
116
|
+
{
|
|
117
|
+
id: "line-up",
|
|
118
|
+
text: "When the sun and the moon line up",
|
|
119
|
+
isCorrect: true
|
|
120
|
+
},
|
|
121
|
+
{
|
|
122
|
+
id: "full-moon",
|
|
123
|
+
text: "Only at full moon",
|
|
124
|
+
isCorrect: false
|
|
125
|
+
},
|
|
126
|
+
{
|
|
127
|
+
id: "winter",
|
|
128
|
+
text: "In winter",
|
|
129
|
+
isCorrect: false
|
|
130
|
+
}
|
|
131
|
+
]
|
|
132
|
+
};
|
|
133
|
+
const tidesSummary = {
|
|
134
|
+
schemaVersion: "1.0",
|
|
135
|
+
type: "written-response",
|
|
136
|
+
id: "ai-check-tides-summary",
|
|
137
|
+
title: "Summary",
|
|
138
|
+
prompt: "Summarise the text in one or two sentences.",
|
|
139
|
+
minWords: 10,
|
|
140
|
+
maxWords: 60,
|
|
141
|
+
languageTarget: "en-B1"
|
|
142
|
+
};
|
|
143
|
+
const tides = {
|
|
144
|
+
schemaVersion: "1.0",
|
|
145
|
+
type: "item-group",
|
|
146
|
+
id: "ai-check-tides-group",
|
|
147
|
+
title: "Part 2 — Reading",
|
|
148
|
+
stimulus: {
|
|
149
|
+
id: "ai-check-tides-text",
|
|
150
|
+
kind: "text",
|
|
151
|
+
title: "Tides",
|
|
152
|
+
body: TIDES
|
|
153
|
+
},
|
|
154
|
+
items: [springTides, tidesSummary]
|
|
155
|
+
};
|
|
156
|
+
/** A part whose questions share instructions the questions themselves never state. */
|
|
157
|
+
const formation = {
|
|
158
|
+
schemaVersion: "1.0",
|
|
159
|
+
type: "fill-in-the-blanks",
|
|
160
|
+
id: "ai-check-formation",
|
|
161
|
+
title: "Word formation",
|
|
162
|
+
passage: "She smiled {{a}} when she heard the news. (HAPPY)",
|
|
163
|
+
blanks: [{
|
|
164
|
+
id: "a",
|
|
165
|
+
acceptedAnswers: ["happily"]
|
|
166
|
+
}],
|
|
167
|
+
scoringStrategy: "all-or-nothing"
|
|
168
|
+
};
|
|
169
|
+
const formationPart = {
|
|
170
|
+
schemaVersion: "1.0",
|
|
171
|
+
type: "item-group",
|
|
172
|
+
id: "ai-check-formation-part",
|
|
173
|
+
title: "Part 1 — Word formation",
|
|
174
|
+
stimulus: {
|
|
175
|
+
id: "ai-check-formation-instructions",
|
|
176
|
+
kind: "text",
|
|
177
|
+
body: "Use the word in capitals at the end of each sentence to form a word that fits the gap."
|
|
178
|
+
},
|
|
179
|
+
items: [formation]
|
|
180
|
+
};
|
|
98
181
|
const weekend = {
|
|
99
182
|
schemaVersion: "1.0",
|
|
100
183
|
type: "written-response",
|
|
@@ -364,10 +447,11 @@ const READ_ALOUD_SETTINGS = {
|
|
|
364
447
|
}] }
|
|
365
448
|
};
|
|
366
449
|
/** Builds a case, failing loudly rather than shipping a case with no request. */
|
|
367
|
-
function explanationCase(id, about, data, response) {
|
|
450
|
+
function explanationCase(id, about, data, response, group) {
|
|
368
451
|
const request = require_ai_writing.aiExplanationRequest({
|
|
369
452
|
data,
|
|
370
|
-
response
|
|
453
|
+
response,
|
|
454
|
+
...group ? { group } : {}
|
|
371
455
|
});
|
|
372
456
|
if (request === null) throw new Error(`ai-check: no explanation request for "${id}"`);
|
|
373
457
|
return {
|
|
@@ -377,11 +461,12 @@ function explanationCase(id, about, data, response) {
|
|
|
377
461
|
request
|
|
378
462
|
};
|
|
379
463
|
}
|
|
380
|
-
function hintCase(id, about, data, response, previousHints = []) {
|
|
464
|
+
function hintCase(id, about, data, response, previousHints = [], group) {
|
|
381
465
|
const request = require_ai_writing.aiHintRequest({
|
|
382
466
|
data,
|
|
383
467
|
response,
|
|
384
|
-
previousHints
|
|
468
|
+
previousHints,
|
|
469
|
+
...group ? { group } : {}
|
|
385
470
|
});
|
|
386
471
|
if (request === null) throw new Error(`ai-check: no hint request for "${id}"`);
|
|
387
472
|
return {
|
|
@@ -391,11 +476,12 @@ function hintCase(id, about, data, response, previousHints = []) {
|
|
|
391
476
|
request
|
|
392
477
|
};
|
|
393
478
|
}
|
|
394
|
-
function writingCase(id, about, text, previousFeedback = [], learnerLocale) {
|
|
479
|
+
function writingCase(id, about, text, previousFeedback = [], learnerLocale, task = { data: weekend }) {
|
|
395
480
|
const request = require_ai_writing.aiWritingFeedbackRequest({
|
|
396
|
-
data:
|
|
481
|
+
data: task.data,
|
|
397
482
|
response: drafted(text),
|
|
398
483
|
previousFeedback,
|
|
484
|
+
...task.group ? { group: task.group } : {},
|
|
399
485
|
...learnerLocale !== void 0 ? { learnerLocale } : {}
|
|
400
486
|
});
|
|
401
487
|
if (request === null) throw new Error(`ai-check: no writing feedback request for "${id}"`);
|
|
@@ -478,6 +564,7 @@ function aiCheckCases() {
|
|
|
478
564
|
})),
|
|
479
565
|
explanationCase("dictation-near", "Typed the sentence with two words wrong", listening, wrote("The train leaves at half past five")),
|
|
480
566
|
explanationCase("dictation-correct", "Typed the sentence correctly", listening, wrote("The train leaves at half past nine.")),
|
|
567
|
+
explanationCase("mc-reading-wrong", "Chose 'Only at full moon', on a question about its group's passage", springTides, chose(["full-moon"]), tides),
|
|
481
568
|
hintCase("mc-hint-1", "Has not answered yet", capital, chose([])),
|
|
482
569
|
hintCase("mc-hint-2", "Asked again after choosing Seville", capital, chose(["seville"]), ["Think about where the government sits."]),
|
|
483
570
|
hintCase("fib-hint-1", "Both blanks empty", introduction, typed({})),
|
|
@@ -487,10 +574,16 @@ function aiCheckCases() {
|
|
|
487
574
|
}), ["Look again at the first blank."]),
|
|
488
575
|
hintCase("gap-hint-1", "Neither gap chosen, in Spanish", landscape, picked({})),
|
|
489
576
|
hintCase("gap-hint-2", "Asked again with the first gap wrong", landscape, picked({ g1: "campo" }), ["Piensa en la forma del terreno."]),
|
|
577
|
+
hintCase("mc-reading-hint", "Has not answered a question whose answer its group's passage prints", springTides, chose([]), [], tides),
|
|
578
|
+
hintCase("fib-formation-hint", "A word-formation blank, under the instructions its group gives", formation, typed({}), [], formationPart),
|
|
490
579
|
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."),
|
|
491
580
|
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."),
|
|
492
581
|
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."]),
|
|
493
582
|
writingCase("writing-feedback-in-spanish", "A first draft, with feedback asked for in Spanish", "Last weekend I visit my grandmother. She cook a big lunch and we eat together in the garden.", [], "es"),
|
|
583
|
+
writingCase("writing-summary", "A summary of its group's passage that gets the spring tides wrong", "The tide comes in twice a day because the moon pulls the ocean. The highest tides come only at full moon.", [], void 0, {
|
|
584
|
+
data: tidesSummary,
|
|
585
|
+
group: tides
|
|
586
|
+
}),
|
|
494
587
|
coachingCase("coaching-slips", "A reading with a mispronounced \"th\" and a word left out", { assessment: forecast(true) }),
|
|
495
588
|
coachingCase("coaching-clean", "A reading the engine marked correct throughout", { assessment: forecast(false) }),
|
|
496
589
|
coachingCase("coaching-from-grade", "The same slips, from a stored grade: marks without sounds", { fromGradeOnly: true }),
|