@kortexya/reasoninglayer 4.2.1 → 5.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/README.md +21 -2
- package/dist/index.cjs +5591 -177
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +24788 -15573
- package/dist/index.d.ts +24788 -15573
- package/dist/index.js +5586 -178
- package/dist/index.js.map +1 -1
- package/package.json +4 -3
package/README.md
CHANGED
|
@@ -119,6 +119,7 @@ await client.inference.forwardChain({ maxIterations: 100 }, { timeoutMs: 600_000
|
|
|
119
119
|
| `audit` | Conversation audit chain | append, list, count, verify integrity |
|
|
120
120
|
| `analysis` | Analysis | FCA sort discovery, attribute exploration, rule-base certification |
|
|
121
121
|
| `compliance` | Compliance | audit receipts, EU AI Act conformity |
|
|
122
|
+
| `vocabulary` | Governed vocabulary | candidates, assessment, review, release, activation, label search |
|
|
122
123
|
|
|
123
124
|
A row per area, not per client — the SDK ships 100 resource clients in all.
|
|
124
125
|
|
|
@@ -233,11 +234,29 @@ try {
|
|
|
233
234
|
}
|
|
234
235
|
```
|
|
235
236
|
|
|
237
|
+
A governed vocabulary refusal (`client.vocabulary`) is a `VocabularyRefusedError` with a
|
|
238
|
+
closed `code`; branch on the code, not on the status:
|
|
239
|
+
|
|
240
|
+
```typescript
|
|
241
|
+
import { MutationOutcomeUnconfirmedError, VocabularyRefusedError } from '@kortexya/reasoninglayer';
|
|
242
|
+
|
|
243
|
+
try {
|
|
244
|
+
await steward.vocabulary.approve(candidateId, request, { idempotencyKey });
|
|
245
|
+
} catch (error) {
|
|
246
|
+
if (error instanceof MutationOutcomeUnconfirmedError) {
|
|
247
|
+
// Unknown outcome: repeat with the SAME key, or read error.recovery.
|
|
248
|
+
} else if (error instanceof VocabularyRefusedError) {
|
|
249
|
+
console.log(error.status, error.code); // e.g. 403 vocabulary_separation_of_duties
|
|
250
|
+
}
|
|
251
|
+
}
|
|
252
|
+
```
|
|
253
|
+
|
|
236
254
|
Error hierarchy:
|
|
237
255
|
|
|
238
256
|
```
|
|
239
257
|
ReasoningLayerError
|
|
240
258
|
+-- ApiError (HTTP 4xx/5xx: status, errorCode, body, headers) and its subclasses
|
|
259
|
+
| +-- VocabularyRefusedError (code, current, findings, conflicts, authority, plugin, refusal)
|
|
241
260
|
+-- TimeoutError
|
|
242
261
|
+-- ValidationError
|
|
243
262
|
+-- NetworkError
|
|
@@ -303,7 +322,7 @@ pnpm run typecheck # Type check (tsc --noEmit)
|
|
|
303
322
|
pnpm test # Run tests
|
|
304
323
|
pnpm run test:watch # Watch mode
|
|
305
324
|
pnpm run lint # Lint (eslint src/ tests/)
|
|
306
|
-
pnpm run test:ci # Full gate: typecheck + lint + test
|
|
325
|
+
pnpm run test:ci # Full gate: typecheck + lint + format + request options + normalizer drops + test
|
|
307
326
|
pnpm run update-api-spec [url] # Fetch backend OpenAPI spec + regenerate src/api-spec/generated/
|
|
308
327
|
pnpm run docs:build # Build documentation site
|
|
309
328
|
```
|
|
@@ -316,7 +335,7 @@ pnpm run docs:build # Build documentation site
|
|
|
316
335
|
|
|
317
336
|
| SDK Version | Min Backend Version | Node | Browser |
|
|
318
337
|
| ----------- | ------------------- | ---- | ------- |
|
|
319
|
-
|
|
|
338
|
+
| 5.0.0 | engine `feafe936f` | 20+ | ES2022+ |
|
|
320
339
|
|
|
321
340
|
## License
|
|
322
341
|
|