@learnosity/lib-qti-converter 0.10.4

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.
@@ -0,0 +1,353 @@
1
+ # QTI Structural Elements
2
+
3
+ This document explains the converter's support for QTI's high-level structural elements: `<assessmentItem>`, `<assessmentTest>`, `<assessmentSection>`, and `<testPart>`.
4
+
5
+ ## Overview
6
+
7
+ QTI (Question & Test Interoperability) organizes content using a hierarchical structure:
8
+
9
+ ```
10
+ QTI Package (imsmanifest.xml)
11
+ ├── <assessmentTest> (optional) - The complete test/assessment
12
+ │ └── <testPart> - Major divisions of the test
13
+ │ └── <assessmentSection> - Logical groupings of items
14
+ │ └── <assessmentItemRef> - References to individual items
15
+ └── <assessmentItem> (required) - Individual questions/interactions
16
+ ```
17
+
18
+ ## `<assessmentItem>` - Individual Questions
19
+
20
+ **Support Level:** ✅ **Fully Supported**
21
+
22
+ The `<assessmentItem>` element represents a single question or interaction. This is the fundamental unit of content in QTI.
23
+
24
+ ### What We Support
25
+
26
+ - **All interaction types** - See [Supported Interactions](https://learnosity.github.io/lib-qti-converter/#/SUPPORTED_INTERACTIONS) for the complete list
27
+ - **Single-interaction items** - One question per item (most common)
28
+ - **Multi-interaction items** - Multiple questions in a single item (composite items)
29
+ - **Passage-only items** - Items containing only stimulus content (no interactions)
30
+ - **Response processing** - Correct answers and scoring
31
+ - **Metadata** - LOM (Learning Object Metadata) tags
32
+
33
+ ### Conversion Behavior
34
+
35
+ | Direction | Behavior |
36
+ | -------------------- | -------------------------------------------------------------------- |
37
+ | **QTI → Learnosity** | Each `<assessmentItem>` converts to a Learnosity Item JSON file |
38
+ | **Learnosity → QTI** | Each Learnosity Item JSON converts to an `<assessmentItem>` XML file |
39
+
40
+ ### Example Structure
41
+
42
+ ```xml
43
+ <assessmentItem identifier="item_001" title="Sample Question">
44
+ <responseDeclaration identifier="RESPONSE" cardinality="single" baseType="identifier">
45
+ <correctResponse>
46
+ <value>A</value>
47
+ </correctResponse>
48
+ </responseDeclaration>
49
+ <itemBody>
50
+ <choiceInteraction responseIdentifier="RESPONSE" maxChoices="1">
51
+ <prompt>What is 2 + 2?</prompt>
52
+ <simpleChoice identifier="A">4</simpleChoice>
53
+ <simpleChoice identifier="B">5</simpleChoice>
54
+ </choiceInteraction>
55
+ </itemBody>
56
+ </assessmentItem>
57
+ ```
58
+
59
+ ---
60
+
61
+ ## `<assessmentTest>` - Complete Tests
62
+
63
+ **Support Level:** ✅ **Supported** (with limitations)
64
+
65
+ The `<assessmentTest>` element represents a complete test or assessment containing multiple items organized into sections.
66
+
67
+ ### What We Support
68
+
69
+ - **Linear tests** - Items presented in a fixed order
70
+ - **Nonlinear tests** - Items can be navigated freely
71
+ - **Multiple sections** - Tests can have multiple `<assessmentSection>` elements
72
+ - **Item references** - `<assessmentItemRef>` elements linking to individual items
73
+ - **Test-level time limits** - `<timeLimits>` on the test
74
+
75
+ ### What We Don't Support (Yet)
76
+
77
+ - **Adaptive tests** - Tests that change based on student responses
78
+ - **Branching** - Conditional navigation between sections
79
+ - **Pre-conditions/branch rules** - Complex navigation logic
80
+ - **Outcome processing** - Custom scoring rules beyond simple summation
81
+
82
+ ### Conversion Behavior
83
+
84
+ | Direction | Behavior |
85
+ | -------------------- | ------------------------------------------------------------------- |
86
+ | **QTI → Learnosity** | `<assessmentTest>` converts to a Learnosity Activity JSON file |
87
+ | **Learnosity → QTI** | Learnosity Activity JSON converts to an `<assessmentTest>` XML file |
88
+
89
+ ### Example Structure
90
+
91
+ ```xml
92
+ <assessmentTest identifier="test_001" title="Sample Test">
93
+ <testPart identifier="part1" navigationMode="linear" submissionMode="simultaneous">
94
+ <assessmentSection identifier="section1" title="Section 1" visible="true">
95
+ <assessmentItemRef identifier="item_001" href="items/item_001.xml"/>
96
+ <assessmentItemRef identifier="item_002" href="items/item_002.xml"/>
97
+ </assessmentSection>
98
+ </testPart>
99
+ </assessmentTest>
100
+ ```
101
+
102
+ ---
103
+
104
+ ## `<assessmentSection>` - Logical Groupings
105
+
106
+ **Support Level:** ✅ **Fully Supported**
107
+
108
+ The `<assessmentSection>` element groups related items together within a test. Sections can have their own configuration for navigation, timing, and item ordering.
109
+
110
+ ### What We Support
111
+
112
+ - **Multiple sections per test** - Unlimited number of sections
113
+ - **Section titles** - Human-readable names for each section
114
+ - **Item shuffling** - `shuffle="true"` attribute to randomize item order
115
+ - **Section-level time limits** - `<timeLimits>` on individual sections
116
+ - **Visibility control** - `visible` attribute to show/hide sections
117
+
118
+ ### Mapping to Learnosity
119
+
120
+ Learnosity Activities can have **sections** that map directly to QTI `<assessmentSection>` elements. See [Learnosity Sections](https://learnosity.github.io/lib-qti-converter/#/LEARNOSITY_SECTIONS) for detailed mapping rules.
121
+
122
+ | Learnosity Section Config | QTI Equivalent |
123
+ | ------------------------------------------ | ------------------------------------ |
124
+ | `config.configuration.shuffle_items: true` | `<assessmentSection shuffle="true">` |
125
+ | `config.time.max_time` | `<timeLimits maxTime="...">` |
126
+ | `config.time.limit_type: "hard"` | `allowLateSubmission="false"` |
127
+
128
+ ### Example Structure
129
+
130
+ ```xml
131
+ <assessmentSection identifier="section1" title="Multiple Choice Questions" visible="true" shuffle="false">
132
+ <timeLimits maxTime="1800" allowLateSubmission="false"/>
133
+ <assessmentItemRef identifier="item_001" href="items/item_001.xml"/>
134
+ <assessmentItemRef identifier="item_002" href="items/item_002.xml"/>
135
+ </assessmentSection>
136
+ ```
137
+
138
+ ---
139
+
140
+ ## `<testPart>` - Major Test Divisions
141
+
142
+ **Support Level:** ✅ **Supported** (single testPart only)
143
+
144
+ The `<testPart>` element represents a major division of a test. Test parts control navigation mode and submission behavior.
145
+
146
+ ### What We Support
147
+
148
+ - **Single testPart per test** - One `<testPart>` containing all sections
149
+ - **Navigation modes:**
150
+ - `linear` - Items must be answered in order, no backward navigation
151
+ - `nonlinear` - Free navigation between items
152
+ - **Submission modes:**
153
+ - `simultaneous` - All items submitted together at the end
154
+ - `individual` - Items submitted one at a time
155
+
156
+ ### What We Don't Support (Yet)
157
+
158
+ - **Multiple testParts** - Tests with multiple parts (e.g., Part 1: Multiple Choice, Part 2: Essay)
159
+ - **Part-level time limits** - Time limits applied to an entire testPart
160
+
161
+ ### Conversion Behavior
162
+
163
+ When converting **Learnosity → QTI**, the converter automatically creates a single `<testPart>` and determines the navigation mode based on section configuration:
164
+
165
+ - If **any** section has `allow_backward: false` → `navigationMode="linear"`
166
+ - If **all** sections allow backward navigation → `navigationMode="nonlinear"`
167
+
168
+ ### Example Structure
169
+
170
+ ```xml
171
+ <testPart identifier="part1" navigationMode="linear" submissionMode="simultaneous">
172
+ <assessmentSection identifier="section1" title="Section 1" visible="true">
173
+ <assessmentItemRef identifier="item_001" href="items/item_001.xml"/>
174
+ </assessmentSection>
175
+ </testPart>
176
+ ```
177
+
178
+ ---
179
+
180
+ ## QTI Package Structure
181
+
182
+ A complete QTI package is a ZIP file containing:
183
+
184
+ 1. **`imsmanifest.xml`** - Package manifest listing all resources
185
+ 2. **`<assessmentTest>` XML files** (optional) - Test definitions
186
+ 3. **`<assessmentItem>` XML files** (required) - Individual questions
187
+ 4. **Asset files** (optional) - Images, audio, video, etc.
188
+
189
+ ### Package Types Supported
190
+
191
+ #### 1. Items-Only Package
192
+
193
+ **Support:** ✅ **Fully Supported**
194
+
195
+ A package containing only `<assessmentItem>` files, no `<assessmentTest>`.
196
+
197
+ ```
198
+ package.zip
199
+ ├── imsmanifest.xml
200
+ └── items/
201
+ ├── item_001.xml
202
+ ├── item_002.xml
203
+ └── item_003.xml
204
+ ```
205
+
206
+ **Use Case:** Item banks, standalone questions
207
+
208
+ #### 2. Test + Items Package
209
+
210
+ **Support:** ✅ **Fully Supported**
211
+
212
+ A package containing both `<assessmentTest>` and `<assessmentItem>` files.
213
+
214
+ ```
215
+ package.zip
216
+ ├── imsmanifest.xml
217
+ ├── test.xml (assessmentTest)
218
+ └── items/
219
+ ├── item_001.xml
220
+ ├── item_002.xml
221
+ └── item_003.xml
222
+ ```
223
+
224
+ **Use Case:** Complete assessments with structure
225
+
226
+ ---
227
+
228
+ ## Conversion Examples
229
+
230
+ ### Example 1: Items-Only Package → Learnosity Bundle
231
+
232
+ **Input:** QTI package with 3 standalone items
233
+
234
+ **CLI:**
235
+
236
+ ```bash
237
+ $ lcon qti-package-to-learnosity --in items-only.zip --out learnosity-bundle/
238
+ ```
239
+
240
+ **Output:**
241
+
242
+ ```
243
+ learnosity-bundle/
244
+ ├── manifest.json
245
+ └── items/
246
+ ├── item_001.json
247
+ ├── item_002.json
248
+ └── item_003.json
249
+ ```
250
+
251
+ **Library:**
252
+
253
+ ```typescript
254
+ const result = await convertQtiPackageToLearnosity({
255
+ inputPath: 'items-only.zip',
256
+ outputPath: 'learnosity-bundle/',
257
+ });
258
+ ```
259
+
260
+ **Result:** Each `<assessmentItem>` becomes a Learnosity Item JSON file. No Activity is created because there's no `<assessmentTest>`.
261
+
262
+ ---
263
+
264
+ ### Example 2: Test + Items Package → Learnosity Bundle
265
+
266
+ **Input:** QTI package with 1 test and 3 items
267
+
268
+ **CLI:**
269
+
270
+ ```bash
271
+ $ lcon qti-package-to-learnosity --in test-package.zip --out learnosity-bundle/
272
+ ```
273
+
274
+ **Output:**
275
+
276
+ ```
277
+ learnosity-bundle/
278
+ ├── manifest.json
279
+ ├── activities/
280
+ │ └── test_001.json
281
+ └── items/
282
+ ├── item_001.json
283
+ ├── item_002.json
284
+ └── item_003.json
285
+ ```
286
+
287
+ **Library:**
288
+
289
+ ```typescript
290
+ const result = await convertQtiPackageToLearnosity({
291
+ inputPath: 'test-package.zip',
292
+ outputPath: 'learnosity-bundle/',
293
+ });
294
+ ```
295
+
296
+ **Result:** The `<assessmentTest>` becomes a Learnosity Activity JSON file, and each `<assessmentItem>` becomes an Item JSON file.
297
+
298
+ ---
299
+
300
+ ### Example 3: Learnosity Bundle → QTI Package
301
+
302
+ **Input:** Learnosity bundle with 1 activity and 3 items
303
+
304
+ **CLI:**
305
+
306
+ ```bash
307
+ $ lcon learnosity-to-qti-package --in learnosity-bundle/ --out qti-package.zip
308
+ ```
309
+
310
+ **Output:**
311
+
312
+ ```
313
+ qti-package.zip
314
+ ├── imsmanifest.xml
315
+ ├── test.xml (assessmentTest)
316
+ └── items/
317
+ ├── item_001.xml
318
+ ├── item_002.xml
319
+ └── item_003.xml
320
+ ```
321
+
322
+ **Library:**
323
+
324
+ ```typescript
325
+ const result = convertLearnosityToQtiPackage({
326
+ inputPath: 'learnosity-bundle/',
327
+ outputPath: 'qti-package.zip',
328
+ qtiVersion: '2.2',
329
+ });
330
+ ```
331
+
332
+ **Result:** The Learnosity Activity becomes an `<assessmentTest>`, and each Item becomes an `<assessmentItem>`.
333
+
334
+ ---
335
+
336
+ ## Summary Table
337
+
338
+ | QTI Element | Support Level | Learnosity Equivalent | Notes |
339
+ | --------------------- | --------------------- | --------------------------- | --------------------------------- |
340
+ | `<assessmentItem>` | ✅ Fully Supported | Item JSON file | Individual questions |
341
+ | `<assessmentTest>` | ✅ Supported | Activity JSON file | Complete tests (linear/nonlinear) |
342
+ | `<assessmentSection>` | ✅ Fully Supported | Activity sections | Logical groupings with config |
343
+ | `<testPart>` | ✅ Supported (single) | Implicit (one per activity) | Navigation mode container |
344
+
345
+ ---
346
+
347
+ ## See Also
348
+
349
+ - [Supported Interactions](https://learnosity.github.io/lib-qti-converter/#/SUPPORTED_INTERACTIONS) - Complete list of QTI ↔ Learnosity interaction mappings
350
+ - [Learnosity Sections](https://learnosity.github.io/lib-qti-converter/#/LEARNOSITY_SECTIONS) - Detailed mapping of Learnosity sections to QTI structure
351
+ - [Learnosity Bundle Format](https://learnosity.github.io/lib-qti-converter/#/LEARNOSITY_BUNDLE_FORMAT) - Expected input format for Learnosity → QTI conversion
352
+ - [Examples](https://learnosity.github.io/lib-qti-converter/#/EXAMPLES) - CLI and programmatic usage examples
353
+ - [Diagnostics](https://learnosity.github.io/lib-qti-converter/#/DIAGNOSTICS) - Understanding diagnostic messages and the diagnostics file
@@ -0,0 +1,232 @@
1
+ # Roadmap
2
+
3
+ This document outlines planned features, known limitations, and completed work for the Learnosity QTI Converter.
4
+
5
+ ## High Priority
6
+
7
+ ### Support for responseProcessing-based Correct Responses
8
+
9
+ **Status:** Not Started
10
+ **Priority:** High
11
+
12
+ **Issue:** Some QTI files define correct responses in `<responseProcessing>` blocks instead of `<responseDeclaration>/<correctResponse>/<value>`. This is a valid QTI pattern but not currently supported.
13
+
14
+ **Example:**
15
+
16
+ ```xml
17
+ <responseDeclaration baseType="string" cardinality="single" identifier="RESPONSE1">
18
+ <mapping defaultValue="0.00" upperBound="1.00">
19
+ <mapEntry mappedValue="1"/> <!-- Missing mapKey attribute -->
20
+ </mapping>
21
+ </responseDeclaration>
22
+
23
+ <!-- Correct responses defined here instead: -->
24
+ <responseProcessing>
25
+ <responseCondition>
26
+ <responseIf>
27
+ <equal>
28
+ <variable identifier="RESPONSE1"/>
29
+ <baseValue baseType="float">1</baseValue> <!-- Correct answer -->
30
+ </equal>
31
+ <setOutcomeValue identifier="SCORE1">
32
+ <baseValue baseType="float">1</baseValue>
33
+ </setOutcomeValue>
34
+ </responseIf>
35
+ </responseCondition>
36
+ </responseProcessing>
37
+ ```
38
+
39
+ **Current Behavior:**
40
+
41
+ - Parser throws error: `responseDeclaration found for "RESPONSE1" but no correctResponse values. This QTI file may define correct responses in <responseProcessing> which is not currently supported.`
42
+
43
+ **Proposed Solution:**
44
+
45
+ 1. Add `<responseProcessing>` parsing to extract correct responses from `<responseCondition>` blocks
46
+ 2. Support both patterns:
47
+ - Standard: `<responseDeclaration>/<correctResponse>/<value>`
48
+ - Alternative: `<responseProcessing>/<responseCondition>/<baseValue>`
49
+ 3. Update parsers for all interaction types
50
+
51
+ ---
52
+
53
+ ## Medium Priority
54
+
55
+ ### Enhanced Metadata Support
56
+
57
+ - [x] Support Common Cartridge curriculum standards metadata (`csm:labelledGUID`)
58
+ - [ ] Support custom metadata fields beyond LOM classification/taxonPath
59
+ - [ ] Preserve QTI metadata in round-trip conversions
60
+
61
+ ### Improved Diagnostics
62
+
63
+ - [ ] Add more detailed error messages with suggestions
64
+ - [ ] Provide auto-fix suggestions for common issues
65
+
66
+ ---
67
+
68
+ ## Known Limitations
69
+
70
+ ### Unsupported QTI Interaction Types
71
+
72
+ The following QTI interaction types are not currently supported:
73
+
74
+ - `associateInteraction`
75
+ - `selectPointInteraction`
76
+ - `graphicOrderInteraction`
77
+ - `graphicAssociateInteraction`
78
+ - `sliderInteraction`
79
+ - `positionObjectInteraction`
80
+ - `customInteraction`
81
+
82
+ ### Unsupported Learnosity Features
83
+
84
+ The following Learnosity features are not supported in QTI conversion:
85
+
86
+ - `calculator` - No QTI equivalent
87
+ - `ruler` - No QTI equivalent
88
+ - `protractor` - No QTI equivalent
89
+ - `linereader` - No QTI equivalent
90
+
91
+ ---
92
+
93
+ ## Completed
94
+
95
+ ### v0.7.0 (Current Release)
96
+
97
+ ### ✅ Learnosity Activity Sections Support
98
+
99
+ - Full support for Learnosity activities with sections
100
+ - Section-based activities → Multiple QTI `<assessmentSection>` elements
101
+ - Flat activities → Single QTI `<assessmentSection>` with all items
102
+ - Section-level navigation modes (linear/nonlinear) → `<testPart navigationMode>`
103
+ - Section-level time limits (hard/soft) → `<timeLimits>` with `allowLateSubmission`
104
+ - Section-level item shuffling → `<assessmentSection shuffle>`
105
+ - Comprehensive documentation in `docs/LEARNOSITY_SECTIONS.md`
106
+ - 8 new unit tests covering all section features
107
+ - Support for both legacy (string array) and official (object array) item formats
108
+
109
+ ### v0.4.0
110
+
111
+ ### ✅ QTI Validation Tool
112
+
113
+ - `bin/validateQti.py` script for validating QTI XML files against XSD schemas
114
+ - Parallel validation using ProcessPoolExecutor for performance
115
+ - Detailed error reporting with line numbers
116
+ - Folder-based summary breakdown
117
+
118
+ ### ✅ File Upload and Drawing Support
119
+
120
+ - `fileupload` → `uploadInteraction` conversion
121
+ - `drawing` → `drawingInteraction` conversion
122
+ - MIME type mapping for file uploads
123
+ - Background image support for drawing questions
124
+
125
+ ### ✅ LOM Metadata Support
126
+
127
+ - Bidirectional LOM ↔ Learnosity tags mapping
128
+ - `lomParser.ts` extracts classification/taxonPath from LOM XML → Learnosity tags
129
+ - `mapTagsToLom()` converts Learnosity tags → LOM classification metadata
130
+ - Automatic LOM file discovery for QTI packages
131
+
132
+ ### ✅ Common Cartridge Curriculum Standards Metadata Support
133
+
134
+ - Parses `csm:labelledGUID` elements from Common Cartridge metadata in `imsmanifest.xml`
135
+ - Maps `<csm:label>` to Learnosity tag type and `<csm:GUID>` to tag name
136
+ - Namespace-aware parsing (works with any XML prefix)
137
+ - Automatic deduplication and whitespace normalization
138
+ - Merges with LOM metadata when both are present
139
+ - Comprehensive test coverage (9 tests)
140
+
141
+ ### v0.2.0
142
+
143
+ ### ✅ Unified Versioning
144
+
145
+ - Single source of truth in root package.json
146
+ - CLI and Core packages use 0.0.0 as placeholder
147
+ - Simpler version management
148
+
149
+ ### ✅ Config File Improvements
150
+
151
+ - Added `organisationId` and `mediaVault` to config schema
152
+ - Renamed `defaultOutDir` to `output` for clarity
153
+ - Removed unimplemented `strict` option
154
+ - Removed redundant `writeDiagnosticsFile` option
155
+ - Complete config documentation in all guides
156
+
157
+ ### ✅ Asset URL Transformation Enhancements
158
+
159
+ - UUID-based asset URLs (replaced MD5 hashing)
160
+ - `--mediavault` flag for media-vault subdomain support
161
+ - `--custom-asset-url` flag for custom CDN/asset server support
162
+ - Fixed organisationId not being passed to conversion functions
163
+ - Fixed duplicate asset URL transformations
164
+
165
+ ### ✅ Comprehensive Documentation
166
+
167
+ - Created SUPPORTED_INTERACTIONS.md with complete bidirectional mappings
168
+ - Documented all 10 QTI → Learnosity interaction mappings
169
+ - Documented all 16 Learnosity → QTI question type mappings
170
+ - Documented supported Learnosity features (sharedpassage, audioplayer, videoplayer)
171
+ - Enhanced config file documentation across all guides
172
+
173
+ ### ✅ Bug Fixes
174
+
175
+ - Fixed empty stimulus in MCQ, order, extendedText, match, graphicGapMatch parsers
176
+ - Fixed duplicate/split break tags in HTML content
177
+ - Fixed missing gapImg images in graphicGapMatch conversion
178
+ - Fixed CLI display of organisationId and mediaVault options
179
+
180
+ ### v0.1.0 and Earlier
181
+
182
+ ### ✅ All 10 QTI Interaction Types
183
+
184
+ - choiceInteraction → mcq
185
+ - textEntryInteraction → clozetext/shorttext
186
+ - extendedTextInteraction → longtextV2
187
+ - matchInteraction → choicematrix
188
+ - gapMatchInteraction → clozeassociation
189
+ - inlineChoiceInteraction → clozedropdown
190
+ - orderInteraction → orderlist
191
+ - hotspotInteraction → hotspot
192
+ - hottextInteraction → tokenhighlight
193
+ - graphicGapMatchInteraction → imageclozeassociationV2
194
+
195
+ ### ✅ Learnosity Features Support
196
+
197
+ - sharedpassage → assessmentStimulus
198
+ - audioplayer → HTML5 audio (QTI 2.2) or object (QTI 2.1)
199
+ - videoplayer → HTML5 video (QTI 2.2) or object (QTI 2.1)
200
+
201
+ ### ✅ QTI Package Support
202
+
203
+ - Full IMS Content Package support
204
+ - Manifest parsing and generation
205
+ - Asset extraction and packaging
206
+ - Multi-item test/activity conversion
207
+
208
+ ### ✅ CLI Features
209
+
210
+ - Interactive mode with prompts
211
+ - Multiple output formats (dir, zip, stdout)
212
+ - Flexible diagnostics output (stderr, file, both, none)
213
+ - Config file support
214
+ - Verbose mode for detailed diagnostics
215
+ - Pretty-print JSON/XML output
216
+
217
+ ### ✅ Core Features
218
+
219
+ - Bidirectional conversion (QTI ↔ Learnosity)
220
+ - QTI 2.1 and 2.2 support
221
+ - Comprehensive diagnostic reporting
222
+ - Source file tracking in diagnostics
223
+ - Round-trip conversion support
224
+
225
+ ### ✅ Library (Programmatic) API
226
+
227
+ - Zero-dependency bundled output via tsdown (all dependencies inlined)
228
+ - Dual usage: CLI (`lcon`) and library (`import { ... } from '@learnosity/lib-qti-converter'`)
229
+ - Single-item conversion: `convertQtiToLearnosity()`, `convertLearnosityToQti()`
230
+ - Package conversion: `convertQtiPackageToLearnosity()`, `convertLearnosityToQtiPackage()`
231
+ - Full TypeScript type exports for all options and result types
232
+ - Diagnostic utility functions: `hasErrors()`, `filterByLevel()`, `countByLevel()`, `formatDiagnosticsReport()`