@lessonkit/core 1.3.1 → 1.5.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/README.md CHANGED
@@ -6,12 +6,22 @@
6
6
 
7
7
  Headless types, identity helpers, telemetry pipeline, and runtime primitives shared across LessonKit.
8
8
 
9
+ ## When to install
10
+
11
+ - Custom headless runtime (no React UI)
12
+ - Telemetry plugins, batch pipelines, or custom tracking clients
13
+ - Validating IDs, URNs, and manifest fields in your own tooling
14
+
15
+ Most course authors only need `@lessonkit/react`, which re-exports common APIs.
16
+
9
17
  ## Install
10
18
 
11
19
  ```bash
12
20
  npm install @lessonkit/core
13
21
  ```
14
22
 
23
+ Requires Node.js **18+** minimum.
24
+
15
25
  ## Usage
16
26
 
17
27
  ```typescript
@@ -21,7 +31,16 @@ import {
21
31
  createTelemetryPipeline,
22
32
  createPluginRegistry,
23
33
  buildLessonkitUrn,
34
+ validateId,
24
35
  } from "@lessonkit/core";
36
+
37
+ const event = buildTelemetryEvent({
38
+ name: "quiz_answered",
39
+ courseId: "my-course",
40
+ lessonId: "lesson-1",
41
+ checkId: "check-1",
42
+ data: { correct: true, score: 1 },
43
+ });
25
44
  ```
26
45
 
27
46
  ## Exports
@@ -33,11 +52,18 @@ import {
33
52
  | Runtime | `createLessonkitRuntime`, progress and session helpers |
34
53
  | Plugins | `createPluginRegistry`, `defineTelemetryPlugin`, `defineAssessmentPlugin` |
35
54
 
36
- Machine-readable: `@lessonkit/core/telemetry-catalog.v1.json`, `identity-contract.v1.json`
55
+ Machine-readable: `@lessonkit/core/telemetry-catalog.v3.json` (current; v1–v3 retained), `identity-contract.v1.json`
56
+
57
+ ## Common issues
58
+
59
+ | Symptom | Fix |
60
+ | --- | --- |
61
+ | `buildTelemetryEvent` validation error | Ensure `courseId`, `lessonId`, and event-specific IDs match [identity rules](https://lessonkit.readthedocs.io/en/latest/reference/identity.html) |
62
+ | Plugin not firing | Register with `createPluginRegistry` and pass plugins in `LessonkitProvider` config |
37
63
 
38
64
  ## Docs
39
65
 
40
- [Core reference](https://lessonkit.readthedocs.io/en/latest/reference/core.html) · [Identity](https://lessonkit.readthedocs.io/en/latest/reference/identity.html) · [Telemetry](https://lessonkit.readthedocs.io/en/latest/reference/telemetry.html) · [Plugins](https://lessonkit.readthedocs.io/en/latest/reference/plugins.html)
66
+ [Core reference](https://lessonkit.readthedocs.io/en/latest/reference/core.html) · [Identity](https://lessonkit.readthedocs.io/en/latest/reference/identity.html) · [Telemetry](https://lessonkit.readthedocs.io/en/latest/reference/telemetry.html) · [Plugins](https://lessonkit.readthedocs.io/en/latest/reference/plugins.html) · [TypeDoc API index](https://lessonkit.readthedocs.io/en/latest/reference/api.html)
41
67
 
42
68
  ## License
43
69