@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 +131 -108
- package/README.md +530 -526
- package/examples/sdk-usage.ts +131 -130
- package/package.json +53 -53
- package/sdk/client.d.ts +4 -0
- package/sdk/client.d.ts.map +1 -1
- package/sdk/client.js +9 -0
- package/sdk/client.js.map +1 -1
- package/sdk/index.d.ts +2 -0
- package/sdk/index.d.ts.map +1 -1
- package/sdk/index.js +2 -0
- package/sdk/index.js.map +1 -1
- package/sdk/types.d.ts +5 -0
- package/sdk/types.d.ts.map +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,108 +1,131 @@
|
|
|
1
|
-
# @more-ink/irt-edge
|
|
2
|
-
|
|
3
|
-
## 2.
|
|
4
|
-
|
|
5
|
-
###
|
|
6
|
-
|
|
7
|
-
-
|
|
8
|
-
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
###
|
|
21
|
-
|
|
22
|
-
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
-
|
|
34
|
-
|
|
35
|
-
##
|
|
36
|
-
|
|
37
|
-
###
|
|
38
|
-
|
|
39
|
-
-
|
|
40
|
-
|
|
41
|
-
##
|
|
42
|
-
|
|
43
|
-
###
|
|
44
|
-
|
|
45
|
-
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
-
|
|
79
|
-
-
|
|
80
|
-
-
|
|
81
|
-
- `
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
-
|
|
108
|
-
|
|
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
|