@more-ink/irt-edge 2.1.3 → 2.2.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 CHANGED
@@ -1,108 +1,131 @@
1
- # @more-ink/irt-edge
2
-
3
- ## 2.1.2
4
-
5
- ### Patch Changes
6
-
7
- - Require `timestamp` in `recordAnswer` / `recordAnswerOnly` requests and enforce validation in the API + SDK typings.
8
- - Keep `lastSeenAt` monotonic in bulk item updates (use max of existing vs. event timestamp).
9
- - Resetting an item now removes it from all skill item index sets.
10
- - Re-enabled Redis repo tests with updated MockRedis coverage.
11
-
12
- ## 2.0.1
13
-
14
- ### Patch Changes
15
-
16
- - Fix Redis diagnostics endpoint to accept both verbs and ship runtime deps in FC layer.
17
-
18
- ## 2.0.0
19
-
20
- ### Minor Changes
21
-
22
- - 8d8c76b: Add multi-skill recording support: the core engine now ingests multiple skill scores from a single item interaction, and irt-edge exposes a matching `/api/irt/answer-multi` endpoint plus SDK helpers.
23
-
24
- ### Patch Changes
25
-
26
- - Updated dependencies [8d8c76b]
27
- - @more-ink/irt-core@1.1.0
28
-
29
- ## Unreleased
30
-
31
- ### Minor Changes
32
-
33
- - Add `POST /api/irt/answer-multi` route plus SDK support (`recordMultiSkillAnswers`) to record several skill scores for the same item in one call, including docs and examples.
34
-
35
- ## 1.3.0
36
-
37
- ### Minor Changes
38
-
39
- - Add `recordAnswerOnly` endpoint + SDK method to record responses without requesting a next item, including updated REST route, types, and README docs.
40
-
41
- ## 1.2.1
42
-
43
- ### Patch Changes
44
-
45
- - Improve SDK typings with comprehensive JSDoc on every request and response shape, clarifying field semantics for IDE hovers and generated docs.
46
-
47
- ## 1.2.0
48
-
49
- ### Minor Changes
50
-
51
- - Add generic type parameter support for type-safe skill identifiers
52
-
53
- The SDK now supports generic type parameters (`TSkillId`) for compile-time type safety, following the same pattern as @more-ink/irt-core. This enables:
54
-
55
- - Type-safe skill identifiers with TypeScript union types or enums
56
- - IDE autocomplete for skill names
57
- - Compile-time validation preventing invalid skill identifiers
58
- - 100% backward compatible (defaults to `string`)
59
-
60
- Example usage:
61
-
62
- ```typescript
63
- type MySkills = "grammar" | "vocabulary" | "listening";
64
- const client = new IrtClient<MySkills>({ baseUrl: "..." });
65
-
66
- // TypeScript ensures skillId is valid at compile time
67
- await client.recordAnswer({
68
- userId: "user123",
69
- skillId: "grammar", // ✅ Type-checked
70
- itemId: "item456",
71
- score: 0.8,
72
- });
73
- ```
74
-
75
- All SDK types now support the generic parameter:
76
-
77
- - `IrtClient<TSkillId>`
78
- - `RecordAnswerRequest<TSkillId>`
79
- - `RecordAnswerResponse<TSkillId>`
80
- - `SelectNextItemRequest<TSkillId>`
81
- - `SelectNextItemResponse<TSkillId>`
82
- - `UserStateResponse<TSkillId>`
83
- - `ItemStateResponse<TSkillId>`
84
- - And all other related types
85
-
86
- ## 1.1.0
87
-
88
- ### Minor Changes
89
-
90
- - Initial SDK release: Add lightweight API client for JavaScript/TypeScript frontends
91
-
92
- - New `IrtClient` class for consuming IRT Edge API
93
- - Full TypeScript support with type definitions
94
- - Complete API methods: recordAnswer, selectNextItem, getUserState, getItemState, health
95
- - Zero runtime dependencies (only peer dependency on @more-ink/irt-core)
96
- - Comprehensive documentation and examples
97
- - Backend server code remains private (not published to npm)
98
-
99
- ## 1.0.0
100
-
101
- ### Major Changes
102
-
103
- - First major release
104
-
105
- ### Patch Changes
106
-
107
- - Updated dependencies
108
- - @more-ink/irt-core@1.0.0
1
+ # @more-ink/irt-edge
2
+
3
+ ## 2.2.0
4
+
5
+ ### Breaking Changes
6
+
7
+ - `IrtClientConfig` now requires a mandatory `namespace` field. All SDK calls must include a namespace to isolate data by exam type.
8
+ - `X-IRT-Namespace` header is enforced on every API request; requests without it return 400.
9
+
10
+ ### How to migrate
11
+
12
+ ```ts
13
+ // Before
14
+ const client = new IrtClient({ baseUrl: '...' })
15
+
16
+ // After
17
+ const client = new IrtClient({ namespace: 'pte', baseUrl: '...' })
18
+ ```
19
+
20
+ ### Internal Changes
21
+
22
+ - Redis keys are namespaced as `irt:{namespace}:...` for full data isolation per exam type.
23
+ - Postgres models include `namespace` with composite primary keys.
24
+ - Engine instances are created and cached per namespace on the server.
25
+
26
+ ## 2.1.2
27
+
28
+ ### Patch Changes
29
+
30
+ - Require `timestamp` in `recordAnswer` / `recordAnswerOnly` requests and enforce validation in the API + SDK typings.
31
+ - Keep `lastSeenAt` monotonic in bulk item updates (use max of existing vs. event timestamp).
32
+ - Resetting an item now removes it from all skill item index sets.
33
+ - Re-enabled Redis repo tests with updated MockRedis coverage.
34
+
35
+ ## 2.0.1
36
+
37
+ ### Patch Changes
38
+
39
+ - Fix Redis diagnostics endpoint to accept both verbs and ship runtime deps in FC layer.
40
+
41
+ ## 2.0.0
42
+
43
+ ### Minor Changes
44
+
45
+ - 8d8c76b: Add multi-skill recording support: the core engine now ingests multiple skill scores from a single item interaction, and irt-edge exposes a matching `/api/irt/answer-multi` endpoint plus SDK helpers.
46
+
47
+ ### Patch Changes
48
+
49
+ - Updated dependencies [8d8c76b]
50
+ - @more-ink/irt-core@1.1.0
51
+
52
+ ## Unreleased
53
+
54
+ ### Minor Changes
55
+
56
+ - Add `POST /api/irt/answer-multi` route plus SDK support (`recordMultiSkillAnswers`) to record several skill scores for the same item in one call, including docs and examples.
57
+
58
+ ## 1.3.0
59
+
60
+ ### Minor Changes
61
+
62
+ - Add `recordAnswerOnly` endpoint + SDK method to record responses without requesting a next item, including updated REST route, types, and README docs.
63
+
64
+ ## 1.2.1
65
+
66
+ ### Patch Changes
67
+
68
+ - Improve SDK typings with comprehensive JSDoc on every request and response shape, clarifying field semantics for IDE hovers and generated docs.
69
+
70
+ ## 1.2.0
71
+
72
+ ### Minor Changes
73
+
74
+ - Add generic type parameter support for type-safe skill identifiers
75
+
76
+ The SDK now supports generic type parameters (`TSkillId`) for compile-time type safety, following the same pattern as @more-ink/irt-core. This enables:
77
+
78
+ - Type-safe skill identifiers with TypeScript union types or enums
79
+ - IDE autocomplete for skill names
80
+ - Compile-time validation preventing invalid skill identifiers
81
+ - 100% backward compatible (defaults to `string`)
82
+
83
+ Example usage:
84
+
85
+ ```typescript
86
+ type MySkills = "grammar" | "vocabulary" | "listening";
87
+ const client = new IrtClient<MySkills>({ baseUrl: "..." });
88
+
89
+ // TypeScript ensures skillId is valid at compile time
90
+ await client.recordAnswer({
91
+ userId: "user123",
92
+ skillId: "grammar", // Type-checked
93
+ itemId: "item456",
94
+ score: 0.8,
95
+ });
96
+ ```
97
+
98
+ All SDK types now support the generic parameter:
99
+
100
+ - `IrtClient<TSkillId>`
101
+ - `RecordAnswerRequest<TSkillId>`
102
+ - `RecordAnswerResponse<TSkillId>`
103
+ - `SelectNextItemRequest<TSkillId>`
104
+ - `SelectNextItemResponse<TSkillId>`
105
+ - `UserStateResponse<TSkillId>`
106
+ - `ItemStateResponse<TSkillId>`
107
+ - And all other related types
108
+
109
+ ## 1.1.0
110
+
111
+ ### Minor Changes
112
+
113
+ - Initial SDK release: Add lightweight API client for JavaScript/TypeScript frontends
114
+
115
+ - New `IrtClient` class for consuming IRT Edge API
116
+ - Full TypeScript support with type definitions
117
+ - Complete API methods: recordAnswer, selectNextItem, getUserState, getItemState, health
118
+ - Zero runtime dependencies (only peer dependency on @more-ink/irt-core)
119
+ - Comprehensive documentation and examples
120
+ - Backend server code remains private (not published to npm)
121
+
122
+ ## 1.0.0
123
+
124
+ ### Major Changes
125
+
126
+ - First major release
127
+
128
+ ### Patch Changes
129
+
130
+ - Updated dependencies
131
+ - @more-ink/irt-core@1.0.0