@intellectif/lk-core 1.10.0 → 1.11.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 (80) hide show
  1. package/CHANGELOG.md +27 -0
  2. package/dist/{ai-zhc9yhRj.d.cts → ai-Cu17iVHa.d.cts} +429 -2
  3. package/dist/ai-Cu17iVHa.d.cts.map +1 -0
  4. package/dist/{ai-zhc9yhRj.d.ts → ai-Cu17iVHa.d.ts} +429 -2
  5. package/dist/ai-Cu17iVHa.d.ts.map +1 -0
  6. package/dist/ai-check.cjs +2 -2
  7. package/dist/ai-check.d.cts +1 -1
  8. package/dist/ai-check.d.ts +1 -1
  9. package/dist/ai-check.js +2 -2
  10. package/dist/{ai-writing-B1pKVkG7.cjs → ai-writing-C7f6aKNW.cjs} +27 -4
  11. package/dist/ai-writing-C7f6aKNW.cjs.map +1 -0
  12. package/dist/{ai-writing-DLvzBiZN.js → ai-writing-Dl1bJQbL.js} +22 -5
  13. package/dist/ai-writing-Dl1bJQbL.js.map +1 -0
  14. package/dist/{index-CxkqS62X.d.ts → index-B1zEN1Ur.d.ts} +25 -3
  15. package/dist/index-B1zEN1Ur.d.ts.map +1 -0
  16. package/dist/{index-Byar5VVs.d.ts → index-BTZWUwOe.d.ts} +2 -2
  17. package/dist/{index-Byar5VVs.d.ts.map → index-BTZWUwOe.d.ts.map} +1 -1
  18. package/dist/{index-f4YuMgFb.d.ts → index-BfUyl6ml.d.ts} +2 -2
  19. package/dist/{index-f4YuMgFb.d.ts.map → index-BfUyl6ml.d.ts.map} +1 -1
  20. package/dist/{index-DLsUnGHt.d.cts → index-CpamCGyZ.d.cts} +25 -3
  21. package/dist/index-CpamCGyZ.d.cts.map +1 -0
  22. package/dist/{index-BeC8tAWf.d.cts → index-DYnacygI.d.cts} +2 -2
  23. package/dist/{index-BeC8tAWf.d.cts.map → index-DYnacygI.d.cts.map} +1 -1
  24. package/dist/{index-Ccj8oL_E.d.cts → index-DjZ1vIVg.d.cts} +2 -2
  25. package/dist/{index-Ccj8oL_E.d.cts.map → index-DjZ1vIVg.d.cts.map} +1 -1
  26. package/dist/index.cjs +763 -6
  27. package/dist/index.cjs.map +1 -1
  28. package/dist/index.d.cts +189 -5
  29. package/dist/index.d.cts.map +1 -1
  30. package/dist/index.d.ts +189 -5
  31. package/dist/index.d.ts.map +1 -1
  32. package/dist/index.js +735 -7
  33. package/dist/index.js.map +1 -1
  34. package/dist/item-group-D7M3E7K2.cjs +1506 -0
  35. package/dist/item-group-D7M3E7K2.cjs.map +1 -0
  36. package/dist/item-group-uNAT5EX5.js +1338 -0
  37. package/dist/item-group-uNAT5EX5.js.map +1 -0
  38. package/dist/{registry-C9O9txy5.cjs → registry-RPfZZEqi.cjs} +28 -1
  39. package/dist/registry-RPfZZEqi.cjs.map +1 -0
  40. package/dist/{registry-Bw9grsCN.js → registry-kTqbi4Lb.js} +28 -1
  41. package/dist/registry-kTqbi4Lb.js.map +1 -0
  42. package/dist/{schemas-DcEAuAeU.cjs → schemas-C4V5wfOS.cjs} +3 -3
  43. package/dist/{schemas-DcEAuAeU.cjs.map → schemas-C4V5wfOS.cjs.map} +1 -1
  44. package/dist/{schemas-D14-tnNl.js → schemas-rDgIN4Vu.js} +3 -3
  45. package/dist/{schemas-D14-tnNl.js.map → schemas-rDgIN4Vu.js.map} +1 -1
  46. package/dist/schemas.cjs +3 -3
  47. package/dist/schemas.d.cts +1 -1
  48. package/dist/schemas.d.ts +1 -1
  49. package/dist/schemas.js +3 -3
  50. package/dist/{scoring-BGKdff2i.js → scoring-DshU9i7e.js} +49 -17
  51. package/dist/scoring-DshU9i7e.js.map +1 -0
  52. package/dist/{scoring-Db1CZeAn.cjs → scoring-KpYfR0lO.cjs} +49 -17
  53. package/dist/scoring-KpYfR0lO.cjs.map +1 -0
  54. package/dist/scoring.cjs +2 -2
  55. package/dist/scoring.d.cts +2 -2
  56. package/dist/scoring.d.ts +2 -2
  57. package/dist/scoring.js +2 -2
  58. package/dist/{xapi-DOAqH9__.cjs → xapi-CaM7f1sD.cjs} +2 -2
  59. package/dist/{xapi-DOAqH9__.cjs.map → xapi-CaM7f1sD.cjs.map} +1 -1
  60. package/dist/{xapi-BtBm8AWZ.js → xapi-fFq9KEXG.js} +2 -2
  61. package/dist/{xapi-BtBm8AWZ.js.map → xapi-fFq9KEXG.js.map} +1 -1
  62. package/dist/xapi.cjs +1 -1
  63. package/dist/xapi.d.cts +1 -1
  64. package/dist/xapi.d.ts +1 -1
  65. package/dist/xapi.js +1 -1
  66. package/package.json +1 -1
  67. package/dist/ai-writing-B1pKVkG7.cjs.map +0 -1
  68. package/dist/ai-writing-DLvzBiZN.js.map +0 -1
  69. package/dist/ai-zhc9yhRj.d.cts.map +0 -1
  70. package/dist/ai-zhc9yhRj.d.ts.map +0 -1
  71. package/dist/index-CxkqS62X.d.ts.map +0 -1
  72. package/dist/index-DLsUnGHt.d.cts.map +0 -1
  73. package/dist/item-group-C9boy5Mk.cjs +0 -513
  74. package/dist/item-group-C9boy5Mk.cjs.map +0 -1
  75. package/dist/item-group-Cqng1LPl.js +0 -453
  76. package/dist/item-group-Cqng1LPl.js.map +0 -1
  77. package/dist/registry-Bw9grsCN.js.map +0 -1
  78. package/dist/registry-C9O9txy5.cjs.map +0 -1
  79. package/dist/scoring-BGKdff2i.js.map +0 -1
  80. package/dist/scoring-Db1CZeAn.cjs.map +0 -1
@@ -1758,6 +1758,424 @@ interface DraftContext {
1758
1758
  */
1759
1759
  newId: () => string;
1760
1760
  }
1761
+ /**
1762
+ * Reading routes: guided practice in how a skilled candidate reads an exam
1763
+ * reading paper — where to look first, what to scan for, what to read
1764
+ * carefully, and how to decide — faded from a step-by-step walkthrough to the
1765
+ * learner working alone.
1766
+ *
1767
+ * A route is an ARRANGEMENT of an item group, as a timeline is: the passage
1768
+ * and its questions stay ordinary content, scored exactly as they are without
1769
+ * a route, and the route adds where each answer is justified in the text, the
1770
+ * question's key words with the passage's paraphrase of them, and the traps in
1771
+ * its options. Everything else — the steps, their order, what each highlights
1772
+ * — is planned from those facts by `planRoute`, so content never stores a
1773
+ * step that could go stale.
1774
+ *
1775
+ * Nothing in a route is a character offset. Places in the passage are QUOTES
1776
+ * of it (the W3C Web Annotation text-quote selector), so a route survives an
1777
+ * edit elsewhere in the passage, and an author writes it by copying words.
1778
+ */
1779
+ /**
1780
+ * Words copied from the passage (`stimulus.body`). A string is the quote
1781
+ * itself; the object form names which occurrence is meant when the words
1782
+ * appear more than once (1 is the first). Matching ignores differences in
1783
+ * whitespace and in curly versus straight quotation marks, nothing else.
1784
+ */
1785
+ type RouteQuote = string | {
1786
+ text: string;
1787
+ occurrence?: number;
1788
+ };
1789
+ /**
1790
+ * The reading strategies the SDK plans routes for. Each is the technique an
1791
+ * exam task rewards, not an exam: `tfng` serves IELTS True/False/Not Given,
1792
+ * `multiple-choice` serves IELTS multiple choice and Cambridge C1/C2 Part 5,
1793
+ * `gapped-text` serves Cambridge C1 Part 7 and C2 Part 6, and so on (see
1794
+ * `ROUTE_STRATEGIES`).
1795
+ */
1796
+ type RouteStrategyId = 'tfng' | 'ynng' | 'multiple-choice' | 'matching-headings' | 'matching-information' | 'matching-features' | 'multiple-matching' | 'sentence-endings' | 'completion' | 'summary-word-list' | 'gapped-text' | 'cross-text';
1797
+ /** One step of a strategy. Each has the same meaning in every strategy that uses it. */
1798
+ type RouteMoveId = 'read-instructions' | 'survey' | 'keywords' | 'predict' | 'locate' | 'read-around' | 'paraphrase' | 'decide' | 'eliminate' | 'cohesion' | 'check-answer' | 'compare-views';
1799
+ /**
1800
+ * Why a wrong option attracts candidates. Shown in the debrief beside the
1801
+ * place in the text it borrows from, so the learner sees the trap work.
1802
+ */
1803
+ type RouteTrapKind =
1804
+ /** Repeats words from the text, but the text says something else about them. */
1805
+ 'word-match' |
1806
+ /** Says the opposite of the text. */
1807
+ 'opposite' |
1808
+ /** Only part of it is supported by the text. */
1809
+ 'partial' |
1810
+ /** May be true in the world, but this text does not say it. */
1811
+ 'outside-knowledge' |
1812
+ /** Broader than what the text says. */
1813
+ 'too-general' |
1814
+ /** Matches one detail, not the whole idea. */
1815
+ 'too-specific' |
1816
+ /** True according to the text, but not an answer to this question. */
1817
+ 'not-the-question';
1818
+ /** A key word or phrase of the question, and what the passage says instead. */
1819
+ interface RouteKeyword {
1820
+ /** Words exactly as the question writes them: in its stem, its sentence or one of its options. */
1821
+ question: string;
1822
+ /** The passage's words for the same idea. Absent when the passage repeats the question's words. */
1823
+ passage?: RouteQuote;
1824
+ }
1825
+ /** A link inside the passage that decides a gapped-text answer: a reference word and what it refers to, a linker and what it joins. */
1826
+ interface RouteLink {
1827
+ from: RouteQuote;
1828
+ to: RouteQuote;
1829
+ }
1830
+ /** A wrong option or choice, and why it attracts. */
1831
+ interface RouteTrap {
1832
+ /** The multiple-choice option id, or the gap-select choice id. */
1833
+ optionId: string;
1834
+ kind: RouteTrapKind;
1835
+ /** Where in the passage the trap borrows its words from. */
1836
+ lure?: RouteQuote;
1837
+ }
1838
+ /**
1839
+ * One question of the paper: a multiple-choice item, or one blank of a
1840
+ * fill-in-the-blanks item, or one gap of a gap-select item — the unit an exam
1841
+ * awards one mark for.
1842
+ */
1843
+ interface RouteQuestion {
1844
+ /** The item's `id`. */
1845
+ itemId: string;
1846
+ /** The blank or gap id. Required for fill-in-the-blanks and gap-select; absent for multiple-choice. */
1847
+ partId?: string;
1848
+ strategy: RouteStrategyId;
1849
+ /**
1850
+ * Where the text justifies the answer. For a Not Given answer, where the text
1851
+ * discusses the topic without settling it — the place a candidate must read
1852
+ * to see that it does not.
1853
+ */
1854
+ evidence: RouteQuote[];
1855
+ /**
1856
+ * `any` (default): one of the quotes is enough. `all`: the answer needs every
1857
+ * one of them — a view in each of several texts, or two sentences read together.
1858
+ */
1859
+ evidenceMatch?: 'any' | 'all';
1860
+ keywords?: RouteKeyword[];
1861
+ links?: RouteLink[];
1862
+ /** The most words the answer may have (fill-in-the-blanks only). Every accepted answer must fit. */
1863
+ wordLimit?: number;
1864
+ traps?: RouteTrap[];
1865
+ /**
1866
+ * The author's own words for a step of this question, replacing the
1867
+ * strategy's (key: the step's move). At most 280 characters, and never the
1868
+ * answer.
1869
+ */
1870
+ notes?: Partial<Record<RouteMoveId, string>>;
1871
+ }
1872
+ /** A run of consecutive paragraphs that is one text or section of the stimulus. */
1873
+ interface RouteSection {
1874
+ /** Learner-visible label: "A", "Text 2", "Reviewer 1". */
1875
+ label: string;
1876
+ title?: string;
1877
+ /** How many paragraphs it spans, counted on from the previous section's last. */
1878
+ paragraphs: number;
1879
+ }
1880
+ /**
1881
+ * The route over an item group's passage. Lives on `ItemGroup.route`; an
1882
+ * lk-core that does not know it presents the group as an ordinary testlet,
1883
+ * with the same slots and grades.
1884
+ */
1885
+ interface ReadingRoute {
1886
+ routeVersion: '1.0';
1887
+ /** The number of the first question, as on the paper (IELTS Passage 2 starts at 14). Default 1. */
1888
+ startAt?: number;
1889
+ /**
1890
+ * Labels for the passage's paragraphs, in order — paragraphs are runs of text
1891
+ * separated by a blank line in `stimulus.body`. `""` leaves a paragraph
1892
+ * unlabelled. When given, one per paragraph.
1893
+ */
1894
+ paragraphLabels?: string[];
1895
+ /** The stimulus's texts or sections, when it has several (cross-text, multiple matching). Their paragraphs add up to the passage's. */
1896
+ sections?: RouteSection[];
1897
+ /** One per question of the group, in any order: numbering follows the items and their blanks or gaps. */
1898
+ questions: RouteQuestion[];
1899
+ }
1900
+ /**
1901
+ * How much the route shows for a strategy.
1902
+ *
1903
+ * - `walkthrough` — every step in turn, with what to look at highlighted and
1904
+ * why; at the decisive step the learner first predicts where to look.
1905
+ * - `coached` — each step named without its location; the learner finds the
1906
+ * evidence, and is shown it only after finding it or asking.
1907
+ * - `solo` — no steps; the learner answers alone and may mark the sentence
1908
+ * that justifies each answer. The route is shown in the debrief.
1909
+ */
1910
+ type RouteLevel = 'walkthrough' | 'coached' | 'solo';
1911
+ /** A stretch of `stimulus.body`, in UTF-16 indices: `body.slice(start, end)`. Computed, never stored. */
1912
+ interface TextRange {
1913
+ start: number;
1914
+ end: number;
1915
+ }
1916
+ /** A stretch of the passage with the words it covers. */
1917
+ interface QuotedRange extends TextRange {
1918
+ text: string;
1919
+ }
1920
+ /** A trapped option of a planned question. */
1921
+ interface PlannedTrap {
1922
+ optionId: string;
1923
+ kind: RouteTrapKind;
1924
+ /** The option's or choice's own text. */
1925
+ option?: string;
1926
+ /** Where in the passage it borrows from. */
1927
+ lure?: QuotedRange;
1928
+ }
1929
+ /** A question word and the passage's word for it, or a link inside the passage. */
1930
+ interface PlannedPair {
1931
+ /** Numbered from 1 within its question, so a highlight in the passage and one in the question can be matched. */
1932
+ index: number;
1933
+ /** The question's words. */
1934
+ question?: string;
1935
+ /** The passage's words for them. */
1936
+ passage?: QuotedRange;
1937
+ /** A link inside the passage: the words that point, and what they point to. */
1938
+ from?: QuotedRange;
1939
+ to?: QuotedRange;
1940
+ }
1941
+ interface PassageParagraph extends TextRange {
1942
+ index: number;
1943
+ label?: string;
1944
+ /** Index into `PassageLayout.sections`, when the route declares sections. */
1945
+ section?: number;
1946
+ }
1947
+ interface PassageSentence extends TextRange {
1948
+ index: number;
1949
+ paragraph: number;
1950
+ }
1951
+ interface PassageSection {
1952
+ label: string;
1953
+ title?: string;
1954
+ /** Index of its first and last paragraph. */
1955
+ first: number;
1956
+ last: number;
1957
+ }
1958
+ /** The passage cut into paragraphs and sentences, by the SDK's own deterministic rules (`ROUTE_SEGMENTER`). */
1959
+ interface PassageLayout {
1960
+ paragraphs: PassageParagraph[];
1961
+ sentences: PassageSentence[];
1962
+ sections: PassageSection[];
1963
+ }
1964
+ /** A route question with every quote resolved against the passage. */
1965
+ interface PlannedQuestion {
1966
+ /** `itemId`, or `itemId#partId` for a blank or gap. Names the question in traces and summaries. */
1967
+ key: string;
1968
+ itemId: string;
1969
+ partId?: string;
1970
+ /** Its number on the paper. */
1971
+ number: number;
1972
+ strategy: RouteStrategyId;
1973
+ level: RouteLevel;
1974
+ /** Empty in a redacted route. */
1975
+ evidence: TextRange[];
1976
+ evidenceMatch: 'any' | 'all';
1977
+ /** Sentences that hold evidence, in passage order. Locating any of them is finding it. */
1978
+ evidenceSentences: number[];
1979
+ /** Key words, then links, numbered in that order. */
1980
+ pairs: PlannedPair[];
1981
+ traps: PlannedTrap[];
1982
+ wordLimit?: number;
1983
+ notes: Partial<Record<RouteMoveId, string>>;
1984
+ }
1985
+ /** Which part of a question a step looks at. */
1986
+ type RouteQuestionPart = 'instructions' | 'question' | 'answer' | 'options';
1987
+ /**
1988
+ * One step of a planned route: what to look at, and what to do there. The
1989
+ * words for it come from `routeStepText`, or from a translation of it.
1990
+ */
1991
+ interface RouteStep {
1992
+ /** `survey`, or `<question key>/<move>`. Unique in a plan. */
1993
+ id: string;
1994
+ move: RouteMoveId;
1995
+ level: RouteLevel;
1996
+ /** The question it serves; absent for the passage-level `survey`. */
1997
+ question?: string;
1998
+ number?: number;
1999
+ strategy?: RouteStrategyId;
2000
+ /** Passage to highlight while the step is shown. */
2001
+ highlight: TextRange[];
2002
+ /** Passage the step points to more faintly: the sentences around the evidence, the openings to skim. */
2003
+ context: TextRange[];
2004
+ /**
2005
+ * Where the search happens: from the previous answer on, when answers follow
2006
+ * the order of the text, or the one paragraph a heading is for. Text outside
2007
+ * it is dimmed.
2008
+ */
2009
+ zone?: TextRange;
2010
+ /** The part of the question to look at. */
2011
+ part?: RouteQuestionPart;
2012
+ /** Words of the question to highlight in it. */
2013
+ phrases: string[];
2014
+ /** Question words and the passage's words for them, to show side by side. */
2015
+ pairs: PlannedPair[];
2016
+ /** The trapped options to point out, with where each borrows from. */
2017
+ traps: PlannedTrap[];
2018
+ /** `locate`: the learner selects the sentence they would read before anything is shown. */
2019
+ ask?: 'locate';
2020
+ /** The author's words for this step, replacing the strategy's. */
2021
+ note?: string;
2022
+ /** Facts the step's words name. */
2023
+ params: {
2024
+ /** Number of the previous question in a run whose answers follow the text order. */
2025
+ previous?: number;
2026
+ /** Label of the paragraph or section the step is about. */
2027
+ region?: string;
2028
+ wordLimit?: number;
2029
+ };
2030
+ }
2031
+ interface RoutePlan {
2032
+ layout: PassageLayout;
2033
+ questions: PlannedQuestion[];
2034
+ /** The guided steps, in order. Questions at `solo` have none. */
2035
+ steps: RouteStep[];
2036
+ /** The level each strategy in the route is presented at. */
2037
+ levels: Partial<Record<RouteStrategyId, RouteLevel>>;
2038
+ }
2039
+ /**
2040
+ * One thing the learner did, stamped with the host's clock (milliseconds).
2041
+ * Sentence numbers index `PassageLayout.sentences` of the passage the trace's
2042
+ * `passage` fingerprint names.
2043
+ */
2044
+ type RouteEvent = {
2045
+ at: number;
2046
+ type: 'started';
2047
+ levels: Partial<Record<RouteStrategyId, RouteLevel>>;
2048
+ } | {
2049
+ at: number;
2050
+ type: 'step';
2051
+ step: string;
2052
+ question?: string;
2053
+ } |
2054
+ /** A locate: the sentence the learner chose before being shown, and whether it holds evidence. */
2055
+ {
2056
+ at: number;
2057
+ type: 'located';
2058
+ question: string;
2059
+ sentence: number;
2060
+ hit: boolean;
2061
+ } |
2062
+ /** The learner asked to be shown where to look. */
2063
+ {
2064
+ at: number;
2065
+ type: 'shown';
2066
+ question: string;
2067
+ } |
2068
+ /** Solo: a sentence marked, or unmarked, as the evidence for an answer. */
2069
+ {
2070
+ at: number;
2071
+ type: 'marked';
2072
+ question: string;
2073
+ sentence: number;
2074
+ on: boolean;
2075
+ } |
2076
+ /** An answer handed in or changed for the last time before finishing. */
2077
+ {
2078
+ at: number;
2079
+ type: 'answered';
2080
+ question: string;
2081
+ } | {
2082
+ at: number;
2083
+ type: 'finished';
2084
+ };
2085
+ /** Everything the learner did in one route, for the host to store beside the attempt. */
2086
+ interface RouteTrace {
2087
+ traceVersion: '1';
2088
+ /** `fingerprint` of `stimulus.body`: the passage the sentence numbers refer to. */
2089
+ passage: string;
2090
+ events: RouteEvent[];
2091
+ }
2092
+ /** Whether a question was answered correctly, and what was answered — for the cause of a wrong one. */
2093
+ interface RouteAnswer {
2094
+ /** `null`: not answered. */
2095
+ correct: boolean | null;
2096
+ /** The option or choice chosen, for a multiple-choice or gap-select question. */
2097
+ chosen?: string;
2098
+ /** The words written, for a fill-in-the-blanks question. */
2099
+ written?: string;
2100
+ }
2101
+ /**
2102
+ * Why an answer was wrong, from what the learner did:
2103
+ *
2104
+ * - `search` — they did not find the evidence;
2105
+ * - `meaning` — they found it and still misread it;
2106
+ * - `trap` — they chose an option the author tagged as a trap;
2107
+ * - `limit` — they wrote more words than the question allows;
2108
+ * - `unanswered` — they gave no answer;
2109
+ * - `unknown` — answered alone without marking evidence, so nothing tells.
2110
+ */
2111
+ type RouteCause = 'search' | 'meaning' | 'trap' | 'limit' | 'unanswered' | 'unknown';
2112
+ interface RouteQuestionSummary {
2113
+ key: string;
2114
+ itemId: string;
2115
+ partId?: string;
2116
+ number: number;
2117
+ strategy: RouteStrategyId;
2118
+ level: RouteLevel;
2119
+ /**
2120
+ * Whether the learner found the evidence: the first sentence they chose at
2121
+ * a locate step, or the sentences they marked when answering alone (too
2122
+ * many marked is not finding it). `null`: never asked and nothing marked.
2123
+ */
2124
+ located: boolean | null;
2125
+ /** Sentences chosen at locate steps. */
2126
+ tries: number;
2127
+ /** Whether they asked to be shown where to look. */
2128
+ shown: boolean;
2129
+ correct: boolean | null;
2130
+ /** Why it was wrong; `null` when it was right. */
2131
+ cause: RouteCause | null;
2132
+ /** The option or choice the learner chose, for a multiple-choice or gap-select question. */
2133
+ chosen?: string;
2134
+ trap?: RouteTrapKind;
2135
+ /** Seconds spent on it, where the trace can tell. */
2136
+ seconds: number | null;
2137
+ }
2138
+ interface RouteStrategySummary {
2139
+ strategy: RouteStrategyId;
2140
+ level: RouteLevel;
2141
+ questions: number;
2142
+ correct: number;
2143
+ /** Questions where the evidence was found, of those where it could be told. */
2144
+ located: number;
2145
+ locatable: number;
2146
+ }
2147
+ interface RouteSummary {
2148
+ groupId: string;
2149
+ questions: RouteQuestionSummary[];
2150
+ strategies: RouteStrategySummary[];
2151
+ correct: number;
2152
+ total: number;
2153
+ /** Seconds from start to finish, pauses included. `null` before it finished. */
2154
+ seconds: number | null;
2155
+ }
2156
+ /** Where a learner stands with each strategy. The host stores it; the SDK only computes the next one. */
2157
+ interface RouteLearnerState {
2158
+ stateVersion: '1';
2159
+ strategies: Partial<Record<RouteStrategyId, {
2160
+ level: RouteLevel;
2161
+ streak: number;
2162
+ }>>;
2163
+ /**
2164
+ * Groups already counted, newest last. A second attempt at a passage is
2165
+ * memory of where the answers were, not skill, so it changes no level.
2166
+ */
2167
+ seen: string[];
2168
+ }
2169
+ interface RouteFadingOptions {
2170
+ /** Successes in a row that take one level of help away. Default 2. */
2171
+ promoteAfter?: number;
2172
+ /** Failures in a row that give one level back. Default 2. */
2173
+ demoteAfter?: number;
2174
+ /** The level of a strategy the learner has not met. Default `walkthrough`. */
2175
+ entry?: RouteLevel;
2176
+ /** How many group ids `seen` keeps. Default 500. */
2177
+ remember?: number;
2178
+ }
1761
2179
  /** What a stimulus primarily is. Drives validation and layout, never scoring. */
1762
2180
  type StimulusKind = 'text' | 'audio' | 'video' | 'image' | 'mixed';
1763
2181
  /**
@@ -1921,6 +2339,15 @@ interface ItemGroup<TItem = ActivityData> {
1921
2339
  * items as an ordinary video testlet, with the same slots and grades.
1922
2340
  */
1923
2341
  timeline?: MediaTimeline;
2342
+ /**
2343
+ * Makes the group a reading route: guided practice in how to read the passage
2344
+ * for its questions (see `ReadingRoute`). The stimulus must be a text, every
2345
+ * item one of `READING_ROUTE_ITEM_TYPES`, and the group neither shuffled nor
2346
+ * an interactive video. An older lk-core that does not know this field
2347
+ * presents the same items as an ordinary testlet, with the same slots and
2348
+ * grades.
2349
+ */
2350
+ route?: ReadingRoute;
1924
2351
  }
1925
2352
  /**
1926
2353
  * What a sequence is made of: loose activities and item groups, in authored
@@ -3124,5 +3551,5 @@ interface AiVariantsRun {
3124
3551
  /** Every call, in order: the first, then each repair. */
3125
3552
  calls: AiDraftsCall[];
3126
3553
  }
3127
- export { AiSpeakingGradingFacts as $, XAPIContextActivities as $n, ActivityType as $t, AiGapSelectFacts as A, ReadAloudLearnerResponse as An, SequenceSlot as At, AiGroupInput as B, SpeakingResponseLearnerResponse as Bn, DraftSeverity as Bt, AiDraftsCall as C, MultipleChoiceLearnerResponse as Cn, AiWritingFeedback as Ct, AiFeature as D, ReadAloudData as Dn, MediaProgress as Dt, AiExplanationRequest as E, NativeControlHint as En, ItemGroup as Et, AiGradingCriterionFact as F, ScoringOutcome as Fn, TimelineCue as Ft, AiOptionFact as G, WrittenResponseData as Gn, VersionFinding as Gt, AiItemFacts as H, SpeakingRubricCriterion as Hn, ItemFinding as Ht, AiGradingFacts as I, ScoringResult as In, DraftComplete as It, AiReadingWordFact as J, WrittenResponseRubricCriterion as Jn, ActivityData as Jt, AiProvenance as K, WrittenResponseLearnerResponse as Kn, VersionPaper as Kt, AiGradingJudgement as L, ScriptTurn as Ln, DraftContext as Lt, AiGeneratedVariant as M, RecordingBounds as Mn, Stimulus as Mt, AiGrade as N, RecordingRef as Nn, StimulusKind as Nt, AiFillInTheBlanksFacts as O, ReadAloudDimension as On, MediaTimeline as Ot, AiGradedCriterion as P, ScoringDetail as Pn, TimelineChapter as Pt, AiSpeakingCriterionFact as Q, XAPIContext as Qn, ActivityResult as Qt, AiGradingRequest as R, SpeakingMeasure as Rn, DraftIssue as Rt, AiDrafts as S, MultipleChoiceData as Sn, AiWritingFacts as St, AiDraftsRun as T, MultipleChoiceOptionMedia as Tn, AiWritingFeedbackResult as Tt, AiMaterialFacts as U, ValidationError as Un, ItemFindingSeverity as Ut, AiHintRequest as V, SpeakingRubric as Vn, DraftValidationResult as Vt, AiMultipleChoiceFacts as W, ValidationResult as Wn, VersionComparison as Wt, AiRubricCriterionFact as X, XAPIActor as Xn, ActivityFeedback as Xt, AiRefusal as Y, WrittenResponseRubricLevel as Yn, ActivityDataMap as Yt, AiSoundFact as Z, XAPIConfig as Zn, ActivityMedia as Zt, AiDraftCaption as _, ItemOutcome as _n, TextMatchResult as _r, AiVariantsRun as _t, AiCoachingRequest as a, DictationLearnerResponse as an, XAPIVerbObject as ar, AiVariantDifficulty as at, AiDraftSource as b, MediaPlaybackPolicy as bn, AiWordFact as bt, AiCriterionJudgement as c, FillInTheBlanksData as cn, GradeRouting as cr, AiVariantLevelFacts as ct, AiCritiqueFinding as d, GapSelectChoice as dn, GraderConfiguration as dr, AiVariantPair as dt, BlankConfig as en, XAPIError as er, AiSpeakingGradingRequest as et, AiCritiqueFindingResult as f, GapSelectData as fn, GraderKind as fr, AiVariantSkip as ft, AiDictationFacts as g, InteractionKind as gn, TextMatchPolicy as gr, AiVariantsRequest as gt, AiCritiqueResult as h, InteractionEvent as hn, InlineCorrection as hr, AiVariants as ht, AiCoaching as i, DictationEquivalence as in, XAPIStatement as ir, AiTextResult as it, AiGeneratedDraft as j, ReadAloudSlowMedia as jn, SequenceSlotGroup as jt, AiGapFact as k, ReadAloudDimensionWeight as kn, SequenceEntry as kt, AiCritique as l, FillInTheBlanksLearnerResponse as ln, GradeRoutingReason as lr, AiVariantMismatch as lt, AiCritiqueRequest as m, GapSelectLearnerResponse as mn, GradingState as mr, AiVariantTargets as mt, AiActivityInput as n, DeferredScoringPartial as nn, XAPIResult as nr, AiSpeakingMeasureFact as nt, AiCoachingResult as o, DictationSlowMedia as on, CriterionScore as or, AiVariantExemplarFacts as ot, AiCritiqueKind as p, GapSelectGap as pn, GraderUsage as pr, AiVariantSkipCode as pt, AiReadingFacts as q, WrittenResponseRubric as qn, VersionSlot as qt, AiBlankFact as r, DictationData as rn, XAPIScore as rr, AiSupportedActivityType as rt, AiCoachingWord as s, DictationTolerance as sn, GradeRecord as sr, AiVariantImage as st, ActivityAiPermissions as t, DeferredReason as tn, XAPIObject as tr, AiSpeakingGradingRequestProblem as tt, AiCritiqueField as u, GapSelectBank as un, Grader as ur, AiVariantMissing as ut, AiDraftProblem as v, LearnerResponse as vn, levenshteinDistance as vr, AiVerdict as vt, AiDraftsRequest as w, MultipleChoiceOption as wn, AiWritingFeedbackRequest as wt, AiDraftType as x, MediaTrack as xn, AiWritingCorrection as xt, AiDraftSettings as y, LearnerResponseMap as yn, matchText as yr, AiVideoDraft as yt, AiGradingRequestProblem as z, SpeakingResponseData as zn, DraftNotComplete as zt };
3128
- //# sourceMappingURL=ai-zhc9yhRj.d.ts.map
3554
+ export { AiSpeakingGradingFacts as $, MediaTrack as $n, RouteMoveId as $t, AiGapSelectFacts as A, ActivityResult as An, XAPIContext as Ar, SequenceSlot as At, AiGroupInput as B, FillInTheBlanksData as Bn, GradeRouting as Br, PlannedPair as Bt, AiDraftsCall as C, VersionFinding as Cn, WrittenResponseData as Cr, AiWritingFeedback as Ct, AiFeature as D, ActivityDataMap as Dn, WrittenResponseRubricLevel as Dr, MediaProgress as Dt, AiExplanationRequest as E, ActivityData as En, WrittenResponseRubricCriterion as Er, ItemGroup as Et, AiGradingCriterionFact as F, DictationData as Fn, XAPIScore as Fr, TimelineCue as Ft, AiOptionFact as G, GapSelectGap as Gn, GraderUsage as Gr, RouteAnswer as Gt, AiItemFacts as H, GapSelectBank as Hn, Grader as Hr, PlannedTrap as Ht, AiGradingFacts as I, DictationEquivalence as In, XAPIStatement as Ir, PassageLayout as It, AiReadingWordFact as J, InteractionKind as Jn, TextMatchPolicy as Jr, RouteFadingOptions as Jt, AiProvenance as K, GapSelectLearnerResponse as Kn, GradingState as Kr, RouteCause as Kt, AiGradingJudgement as L, DictationLearnerResponse as Ln, XAPIVerbObject as Lr, PassageParagraph as Lt, AiGeneratedVariant as M, BlankConfig as Mn, XAPIError as Mr, Stimulus as Mt, AiGrade as N, DeferredReason as Nn, XAPIObject as Nr, StimulusKind as Nt, AiFillInTheBlanksFacts as O, ActivityFeedback as On, XAPIActor as Or, MediaTimeline as Ot, AiGradedCriterion as P, DeferredScoringPartial as Pn, XAPIResult as Pr, TimelineChapter as Pt, AiSpeakingCriterionFact as Q, MediaPlaybackPolicy as Qn, RouteLink as Qt, AiGradingRequest as R, DictationSlowMedia as Rn, CriterionScore as Rr, PassageSection as Rt, AiDrafts as S, VersionComparison as Sn, ValidationResult as Sr, AiWritingFacts as St, AiDraftsRun as T, VersionSlot as Tn, WrittenResponseRubric as Tr, AiWritingFeedbackResult as Tt, AiMaterialFacts as U, GapSelectChoice as Un, GraderConfiguration as Ur, QuotedRange as Ut, AiHintRequest as V, FillInTheBlanksLearnerResponse as Vn, GradeRoutingReason as Vr, PlannedQuestion as Vt, AiMultipleChoiceFacts as W, GapSelectData as Wn, GraderKind as Wr, ReadingRoute as Wt, AiRubricCriterionFact as X, LearnerResponse as Xn, levenshteinDistance as Xr, RouteLearnerState as Xt, AiRefusal as Y, ItemOutcome as Yn, TextMatchResult as Yr, RouteKeyword as Yt, AiSoundFact as Z, LearnerResponseMap as Zn, matchText as Zr, RouteLevel as Zt, AiDraftCaption as _, DraftNotComplete as _n, SpeakingResponseData as _r, AiVariantsRun as _t, AiCoachingRequest as a, RouteSection as an, ReadAloudData as ar, AiVariantDifficulty as at, AiDraftSource as b, ItemFinding as bn, SpeakingRubricCriterion as br, AiWordFact as bt, AiCriterionJudgement as c, RouteStrategySummary as cn, ReadAloudLearnerResponse as cr, AiVariantLevelFacts as ct, AiCritiqueFinding as d, RouteTrap as dn, RecordingRef as dr, AiVariantPair as dt, RoutePlan as en, MultipleChoiceData as er, AiSpeakingGradingRequest as et, AiCritiqueFindingResult as f, RouteTrapKind as fn, ScoringDetail as fr, AiVariantSkip as ft, AiDictationFacts as g, DraftIssue as gn, SpeakingMeasure as gr, AiVariantsRequest as gt, AiCritiqueResult as h, DraftContext as hn, ScriptTurn as hr, AiVariants as ht, AiCoaching as i, RouteQuote as in, NativeControlHint as ir, AiTextResult as it, AiGeneratedDraft as j, ActivityType as jn, XAPIContextActivities as jr, SequenceSlotGroup as jt, AiGapFact as k, ActivityMedia as kn, XAPIConfig as kr, SequenceEntry as kt, AiCritique as l, RouteSummary as ln, ReadAloudSlowMedia as lr, AiVariantMismatch as lt, AiCritiqueRequest as m, DraftComplete as mn, ScoringResult as mr, AiVariantTargets as mt, AiActivityInput as n, RouteQuestionPart as nn, MultipleChoiceOption as nr, AiSpeakingMeasureFact as nt, AiCoachingResult as o, RouteStep as on, ReadAloudDimension as or, AiVariantExemplarFacts as ot, AiCritiqueKind as p, TextRange as pn, ScoringOutcome as pr, AiVariantSkipCode as pt, AiReadingFacts as q, InteractionEvent as qn, InlineCorrection as qr, RouteEvent as qt, AiBlankFact as r, RouteQuestionSummary as rn, MultipleChoiceOptionMedia as rr, AiSupportedActivityType as rt, AiCoachingWord as s, RouteStrategyId as sn, ReadAloudDimensionWeight as sr, AiVariantImage as st, ActivityAiPermissions as t, RouteQuestion as tn, MultipleChoiceLearnerResponse as tr, AiSpeakingGradingRequestProblem as tt, AiCritiqueField as u, RouteTrace as un, RecordingBounds as ur, AiVariantMissing as ut, AiDraftProblem as v, DraftSeverity as vn, SpeakingResponseLearnerResponse as vr, AiVerdict as vt, AiDraftsRequest as w, VersionPaper as wn, WrittenResponseLearnerResponse as wr, AiWritingFeedbackRequest as wt, AiDraftType as x, ItemFindingSeverity as xn, ValidationError as xr, AiWritingCorrection as xt, AiDraftSettings as y, DraftValidationResult as yn, SpeakingRubric as yr, AiVideoDraft as yt, AiGradingRequestProblem as z, DictationTolerance as zn, GradeRecord as zr, PassageSentence as zt };
3555
+ //# sourceMappingURL=ai-Cu17iVHa.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ai-Cu17iVHa.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/reading-route.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;;;;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;;;;;;;;UASQ;;EAEf,OAAO;;EAEP,YAAY;;EAEZ,UAAU;;;;;;;;KAWA;;;;;;UAOK;EACf;EACA;EACA;;;KAIU;;UASK;;EAEf;EACA,MAAM;EACN;;;;;;UAOe;;EAEf;;;;;;;EAOA,WAAW,SAAS;;EAEpB,SAAS,SAAS;EAClB,YAAY;;EAEZ;;EAEA;;;;;EAKA;IACE;IACA,YAAY;IACZ;IACA;;;EAGF;IAAoB;IAAc;;;;UAInB;;EAEf;EACA;;;;;;EAMA,SAAS,SAAS;;EAElB;EACA,SAAS;;;;;;UAOM;EACf;EACA;;EAEA;EACA;EACA;;;;;;;;;;UAWe;EACf;EACA;;IAEE,WAAW;;IAEX;IACA;;IAEA,YAAY;IACZ,aAAa;;;;;;IAMb;;IAEA,SAAS;;;;;IAKT;MAAU;MAAiB;;;IAE3B;;IAEA;;;EAGF,OAAO,SAAS;;EAEhB;;EAEA;;EAEA,WAAW;;EAEX;IAAoB;IAAmB;;;EAEvC;IAAwB;;;EAExB,SAAS;;;;;;EAMT;IACE;IACA,UAAU,SAAS;IACnB,UAAU;;;;;;;;UASG;EACf;EACA;EACA;EACA;;;UAIe;EACf;EACA;EACA;EACA;;;;;;;;UASe;EACf;EACA;EACA;EACA;;;UAIe;;EAEf;;EAEA;;EAEA,OAAO;;;;;;;EAOP;;EAEA,YAAY;;EAEZ,YAAY;;EAEZ,UAAU;;EAEV,OAAO;;EAEP,WAAW,SAAS;;;UAIL;;EAEf,UAAU;;EAEV,SAAS;;EAET,UAAU;EACV,aAAa;EACb,QAAQ;;;UAIO;;EAEf,UAAU;;EAEV,SAAS;;EAET,UAAU;;EAEV,SAAS;;EAET,OAAO"}
package/dist/ai-check.cjs CHANGED
@@ -1,6 +1,6 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_ai_writing = require("./ai-writing-B1pKVkG7.cjs");
3
- const require_scoring = require("./scoring-Db1CZeAn.cjs");
2
+ const require_ai_writing = require("./ai-writing-C7f6aKNW.cjs");
3
+ const require_scoring = require("./scoring-KpYfR0lO.cjs");
4
4
  // src/ai-check/cases.ts
5
5
  /**
6
6
  * The items the cases are built from. Small, ordinary language-course content
@@ -1,4 +1,4 @@
1
- import { Ct as AiWritingFeedback, E as AiExplanationRequest, L as AiGradingJudgement, R as AiGradingRequest, S as AiDrafts, V as AiHintRequest, Y as AiRefusal, a as AiCoachingRequest, gt as AiVariantsRequest, ht as AiVariants, i as AiCoaching, it as AiTextResult, l as AiCritique, m as AiCritiqueRequest, w as AiDraftsRequest, wt as AiWritingFeedbackRequest } from "./ai-zhc9yhRj.cjs";
1
+ import { Ct as AiWritingFeedback, E as AiExplanationRequest, L as AiGradingJudgement, R as AiGradingRequest, S as AiDrafts, V as AiHintRequest, Y as AiRefusal, a as AiCoachingRequest, gt as AiVariantsRequest, ht as AiVariants, i as AiCoaching, it as AiTextResult, l as AiCritique, m as AiCritiqueRequest, w as AiDraftsRequest, wt as AiWritingFeedbackRequest } from "./ai-Cu17iVHa.cjs";
2
2
  /**
3
3
  * One call to make against a host's port, and what a learner was looking at
4
4
  * when the SDK would have made it.
@@ -1,4 +1,4 @@
1
- import { Ct as AiWritingFeedback, E as AiExplanationRequest, L as AiGradingJudgement, R as AiGradingRequest, S as AiDrafts, V as AiHintRequest, Y as AiRefusal, a as AiCoachingRequest, gt as AiVariantsRequest, ht as AiVariants, i as AiCoaching, it as AiTextResult, l as AiCritique, m as AiCritiqueRequest, w as AiDraftsRequest, wt as AiWritingFeedbackRequest } from "./ai-zhc9yhRj.js";
1
+ import { Ct as AiWritingFeedback, E as AiExplanationRequest, L as AiGradingJudgement, R as AiGradingRequest, S as AiDrafts, V as AiHintRequest, Y as AiRefusal, a as AiCoachingRequest, gt as AiVariantsRequest, ht as AiVariants, i as AiCoaching, it as AiTextResult, l as AiCritique, m as AiCritiqueRequest, w as AiDraftsRequest, wt as AiWritingFeedbackRequest } from "./ai-Cu17iVHa.js";
2
2
  /**
3
3
  * One call to make against a host's port, and what a learner was looking at
4
4
  * when the SDK would have made it.
package/dist/ai-check.js CHANGED
@@ -1,5 +1,5 @@
1
- import { D as checkAiCritique, E as aiCritiqueRequest, Q as checkAiCoaching, Z as aiCoachingRequest, at as aiHintRequest, b as aiDraftsRequest, c as aiVariantsRequest, ct as checkAiExplanation, f as aiGradingRequest, l as checkAiVariants, lt as checkAiHint, m as checkAiGrading, n as checkAiWritingFeedback, rt as aiExplanationRequest, t as aiWritingFeedbackRequest, x as checkAiDrafts } from "./ai-writing-DLvzBiZN.js";
2
- import { s as gradeReadAloud } from "./scoring-BGKdff2i.js";
1
+ import { $ as checkAiCoaching, D as checkAiCritique, E as aiCritiqueRequest, Q as aiCoachingRequest, b as aiDraftsRequest, c as aiVariantsRequest, f as aiGradingRequest, it as aiExplanationRequest, l as checkAiVariants, lt as checkAiExplanation, m as checkAiGrading, n as checkAiWritingFeedback, ot as aiHintRequest, t as aiWritingFeedbackRequest, ut as checkAiHint, x as checkAiDrafts } from "./ai-writing-Dl1bJQbL.js";
2
+ import { s as gradeReadAloud } from "./scoring-DshU9i7e.js";
3
3
  // src/ai-check/cases.ts
4
4
  /**
5
5
  * The items the cases are built from. Small, ordinary language-course content
@@ -1,6 +1,6 @@
1
- const require_registry = require("./registry-C9O9txy5.cjs");
2
- const require_scoring = require("./scoring-Db1CZeAn.cjs");
3
- const require_item_group = require("./item-group-C9boy5Mk.cjs");
1
+ const require_registry = require("./registry-RPfZZEqi.cjs");
2
+ const require_scoring = require("./scoring-KpYfR0lO.cjs");
3
+ const require_item_group = require("./item-group-D7M3E7K2.cjs");
4
4
  // src/ai-material.ts
5
5
  /**
6
6
  * What a model is told about the group a question sits in: the material the
@@ -1920,6 +1920,22 @@ function createInteractiveVideoDraft(context) {
1920
1920
  };
1921
1921
  }
1922
1922
  /**
1923
+ * A new, empty reading route for an editor to start from: an item group with
1924
+ * a text stimulus waiting for its passage, no questions, and a route with no
1925
+ * questions yet. Like every new draft it is `incomplete`.
1926
+ *
1927
+ * @throws Error when `newId` returns an empty or repeated id.
1928
+ */
1929
+ function createReadingRouteDraft(context) {
1930
+ return {
1931
+ ...createItemGroupDraft(context),
1932
+ route: {
1933
+ routeVersion: "1.0",
1934
+ questions: []
1935
+ }
1936
+ };
1937
+ }
1938
+ /**
1923
1939
  * Tells an unfinished testlet from a broken one — {@link validateDraft} for the
1924
1940
  * container that holds several questions around one passage or recording.
1925
1941
  *
@@ -2003,6 +2019,7 @@ function validateItemGroupDraftInScope(draft) {
2003
2019
  else if (require_registry.isUnset(draft.stimulus)) issues.push(require_registry.issue("ig_stimulus_required", ["stimulus"], "Add the passage, recording or image the questions are about."));
2004
2020
  issues.push(...checkItems(draft));
2005
2021
  if (draft.timeline !== void 0 && draft.timeline !== null) issues.push(...checkTimeline(draft));
2022
+ if (require_registry.isRecord(draft.route)) for (const found of require_item_group.routeIssues(draft)) issues.push(require_registry.issue(found.code, found.path, found.message));
2006
2023
  const captions = require_registry.groupCaptionsField(draft, (captionsUrl) => !require_registry.isUnwritten(captionsUrl));
2007
2024
  if (captions !== void 0) issues.push(require_registry.issue("dc_captions_not_allowed", [
2008
2025
  "stimulus",
@@ -5822,6 +5839,12 @@ Object.defineProperty(exports, "createItemGroupDraft", {
5822
5839
  return createItemGroupDraft;
5823
5840
  }
5824
5841
  });
5842
+ Object.defineProperty(exports, "createReadingRouteDraft", {
5843
+ enumerable: true,
5844
+ get: function() {
5845
+ return createReadingRouteDraft;
5846
+ }
5847
+ });
5825
5848
  Object.defineProperty(exports, "critiqueDraft", {
5826
5849
  enumerable: true,
5827
5850
  get: function() {
@@ -5949,4 +5972,4 @@ Object.defineProperty(exports, "validateItemGroupDraft", {
5949
5972
  }
5950
5973
  });
5951
5974
 
5952
- //# sourceMappingURL=ai-writing-B1pKVkG7.cjs.map
5975
+ //# sourceMappingURL=ai-writing-C7f6aKNW.cjs.map