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