@kortexya/reasoninglayer 1.21.0 → 1.23.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/dist/index.cjs +785 -27
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +4018 -75
- package/dist/index.d.ts +4018 -75
- package/dist/index.js +785 -27
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -5,7 +5,7 @@ var __export = (target, all) => {
|
|
|
5
5
|
};
|
|
6
6
|
|
|
7
7
|
// src/config.ts
|
|
8
|
-
var SDK_VERSION = "1.
|
|
8
|
+
var SDK_VERSION = "1.23.0";
|
|
9
9
|
function resolveConfig(config) {
|
|
10
10
|
if (!config.baseUrl) {
|
|
11
11
|
throw new Error("ClientConfig.baseUrl is required");
|
|
@@ -956,7 +956,7 @@ var Sorts = class {
|
|
|
956
956
|
...params
|
|
957
957
|
});
|
|
958
958
|
/**
|
|
959
|
-
* @description # Authorization Requires X-Tenant-Id header. The sort must belong to the tenant. # Errors - 404 Not Found: Sort doesn't exist - 400 Bad Request: Sort has children (would orphan them)
|
|
959
|
+
* @description # Authorization Requires X-Tenant-Id header. The sort must belong to the tenant. # The terms Deletion already refuses to orphan a CHILD SORT, and says so (`"would orphan 1 child sort(s)"`). It said nothing about the sort's TERMS and left them behind: still listed by `GET /api/v1/terms`, carrying a `sort_id` that answers `404`, unreachable by sort, with no schema to validate against and nothing reporting the state (#213). A term pointing at a deleted sort is the same kind of orphan as a child sort, so it gets the same guard. The disposition is the caller's and is named in the query: `terms=refuse` (the default) refuses while the sort is inhabited and says how many terms hold it; `terms=delete` deletes them with it and reports the count. Neither is silent, which is the whole of what was wrong. # Errors - 404 Not Found: Sort doesn't exist - 400 Bad Request: Sort has children (would orphan them), or holds terms under the default `terms=refuse`
|
|
960
960
|
*
|
|
961
961
|
* @tags sorts
|
|
962
962
|
* @name DeleteSort
|
|
@@ -964,10 +964,27 @@ var Sorts = class {
|
|
|
964
964
|
* @request DELETE:/api/v1/sorts/{id}
|
|
965
965
|
* @secure
|
|
966
966
|
*/
|
|
967
|
-
deleteSort = (id, params = {}) => this.http.request({
|
|
967
|
+
deleteSort = (id, query, params = {}) => this.http.request({
|
|
968
968
|
path: `/api/v1/sorts/${id}`,
|
|
969
969
|
method: "DELETE",
|
|
970
|
+
query,
|
|
970
971
|
secure: true,
|
|
972
|
+
format: "json",
|
|
973
|
+
...params
|
|
974
|
+
});
|
|
975
|
+
/**
|
|
976
|
+
* No description
|
|
977
|
+
*
|
|
978
|
+
* @tags sorts
|
|
979
|
+
* @name GenerateSortProposals
|
|
980
|
+
* @summary Turn recurrent observations into proposed sorts for review.
|
|
981
|
+
* @request POST:/api/v1/sorts/proposals/generate
|
|
982
|
+
*/
|
|
983
|
+
generateSortProposals = (query, params = {}) => this.http.request({
|
|
984
|
+
path: `/api/v1/sorts/proposals/generate`,
|
|
985
|
+
method: "POST",
|
|
986
|
+
query,
|
|
987
|
+
format: "json",
|
|
971
988
|
...params
|
|
972
989
|
});
|
|
973
990
|
/**
|
|
@@ -1015,7 +1032,7 @@ var Sorts = class {
|
|
|
1015
1032
|
...params
|
|
1016
1033
|
});
|
|
1017
1034
|
/**
|
|
1018
|
-
* @description Per Definition IV.5 (Milanese & Pasi 2024):
|
|
1035
|
+
* @description Per Definition IV.5 (Milanese & Pasi, IEEE TFS 2024 — CC-BY manuscript in reasoninglayer-sources/pdf_sources/), verbatim: ≺∼· ≝ ((≺∼ .− ∼) ⊍ ⪯)⊕ The combined chain preorder ≺∼ of Definition IV.1 with every DIRECTLY-similar pair deleted (`.−` zeroes the pair — it is not an arithmetic difference), the crisp order unioned back, and the result re-closed. A chain survives when its ENDPOINTS are not directly similar: slasher ⪯ horror ∼₀.₅ thriller keeps 0.5 while (horror, thriller) itself answers 0 — two similar sorts meet through their GLB instead (Fig. 4c: horror ⩏ thriller = slasher). The combined ≺∼ — where a direct ∼ edge IS a step; the coarse retrieval mode of Example V.4 — backs equivalence classes and term substitutability internally. (History: the differencing form here is ORIGINAL and faithful; #203 swapped in the combined semantics, and a 2026-08-23 pass re-documented that as correct from secondary sources. The accepted manuscript settled it the other way.)
|
|
1019
1036
|
*
|
|
1020
1037
|
* @tags sorts
|
|
1021
1038
|
* @name GetPreorderDegree
|
|
@@ -1030,6 +1047,21 @@ var Sorts = class {
|
|
|
1030
1047
|
format: "json",
|
|
1031
1048
|
...params
|
|
1032
1049
|
});
|
|
1050
|
+
/**
|
|
1051
|
+
* @description Computed on the TENANT-VISIBLE hierarchy — unlike the legacy `equivalence-classes` route, which computes process-wide and filters (#114), so here αs and the order describe exactly the sorts the caller can see. Granularity per Example V.4: `combined` (Def. IV.1's ≺∼, default) or `similarity_deleted` (Def. IV.5's ≺∼·).
|
|
1052
|
+
*
|
|
1053
|
+
* @tags sorts
|
|
1054
|
+
* @name GetQuotientOrder
|
|
1055
|
+
* @summary Definition IV.9 in full over the caller's tenant lattice: the quotient classes with their degrees αs and the fuzzy partial order between them.
|
|
1056
|
+
* @request GET:/api/v1/sorts/quotient-order
|
|
1057
|
+
*/
|
|
1058
|
+
getQuotientOrder = (query, params = {}) => this.http.request({
|
|
1059
|
+
path: `/api/v1/sorts/quotient-order`,
|
|
1060
|
+
method: "GET",
|
|
1061
|
+
query,
|
|
1062
|
+
format: "json",
|
|
1063
|
+
...params
|
|
1064
|
+
});
|
|
1033
1065
|
/**
|
|
1034
1066
|
* @description With `?format=osfql` the sort is returned as its commented OSFQL `DEFINE` block (`text/plain`, `ETag` = SHA-256 of the body) instead of the JSON DTO — the single-sort companion of `GET /api/v1/sorts/schema`.
|
|
1035
1067
|
*
|
|
@@ -1138,6 +1170,20 @@ var Sorts = class {
|
|
|
1138
1170
|
format: "json",
|
|
1139
1171
|
...params
|
|
1140
1172
|
});
|
|
1173
|
+
/**
|
|
1174
|
+
* No description
|
|
1175
|
+
*
|
|
1176
|
+
* @tags sorts
|
|
1177
|
+
* @name ListObservations
|
|
1178
|
+
* @summary List the tenant's unknown-term observations.
|
|
1179
|
+
* @request GET:/api/v1/sorts/proposals
|
|
1180
|
+
*/
|
|
1181
|
+
listObservations = (params = {}) => this.http.request({
|
|
1182
|
+
path: `/api/v1/sorts/proposals`,
|
|
1183
|
+
method: "GET",
|
|
1184
|
+
format: "json",
|
|
1185
|
+
...params
|
|
1186
|
+
});
|
|
1141
1187
|
/**
|
|
1142
1188
|
* @description By default, system-defined sorts (built-in types like Thing, Person, etc.) are excluded from the response. Use `include_system=true` to include them.
|
|
1143
1189
|
*
|
|
@@ -1153,6 +1199,76 @@ var Sorts = class {
|
|
|
1153
1199
|
format: "json",
|
|
1154
1200
|
...params
|
|
1155
1201
|
});
|
|
1202
|
+
/**
|
|
1203
|
+
* @description The authoring half of the tenant's ubiquitous language: what a concept is called (`skos:prefLabel` stays the `name`), what else people call it (`altLabel`), what it means (`definition`), when to use it (`scopeNote`), what it sits beside (`related`), and whether it is still the term to use (`SortStatus`). Only fields present in the body mutate. Every referenced sort is resolved **before** anything is written, so a patch naming a concept that does not exist fails whole rather than half-applying.
|
|
1204
|
+
*
|
|
1205
|
+
* @tags sorts
|
|
1206
|
+
* @name PatchSort
|
|
1207
|
+
* @summary Curate one concept's vocabulary and lifecycle
|
|
1208
|
+
* @request PATCH:/api/v1/sorts/{id}
|
|
1209
|
+
* @secure
|
|
1210
|
+
*/
|
|
1211
|
+
patchSort = (id, data, params = {}) => this.http.request({
|
|
1212
|
+
path: `/api/v1/sorts/${id}`,
|
|
1213
|
+
method: "PATCH",
|
|
1214
|
+
body: data,
|
|
1215
|
+
secure: true,
|
|
1216
|
+
type: "application/json",
|
|
1217
|
+
format: "json",
|
|
1218
|
+
...params
|
|
1219
|
+
});
|
|
1220
|
+
/**
|
|
1221
|
+
* @description The feature-level twin of the sort rename `PATCH /api/v1/sorts/{id}` carries (#185), and it could not be built out of an add and a remove because removal did not exist (#213). Nominal for the SCHEMA: the declaration keeps everything it says and the position it holds in the declaration order, and every subsort that inherited it is renamed with it. It is NOT nominal for the DATA — a feature is keyed by name, not by id, so a term that binds the old name keeps its value under a name the sort no longer declares. That is well-sorted under the open world, which is why the count is reported rather than the rename refused; pass `cascade_terms` to move the values too. The new name is held to the same OSFQL identifier rule as a sort rename (#176), in the `feature_name` position — which admits no dot. Every bound constraint written over the renamed declaration moves with it. Renaming a sort's own OVERRIDE leaves it inheriting the ancestor's declaration under the OLD name, so nothing is un-declared and a cascade leaves the values alone — `still_declared` says so. A sort with more than 512 persisted subsorts is refused, for the same reason a removal is: an edit applied to part of a subtree can be neither finished nor undone. # Errors - 400 Bad Request: an unreadable name, a name already declared here or on a subsort, no such declaration, an inherited one, or a shared sort - 404 Not Found: no such sort for this tenant
|
|
1222
|
+
*
|
|
1223
|
+
* @tags sorts
|
|
1224
|
+
* @name PatchSortFeature
|
|
1225
|
+
* @summary Rename one feature declaration on a sort
|
|
1226
|
+
* @request PATCH:/api/v1/sorts/{id}/features/{feature}
|
|
1227
|
+
* @secure
|
|
1228
|
+
*/
|
|
1229
|
+
patchSortFeature = (id, feature, data, params = {}) => this.http.request({
|
|
1230
|
+
path: `/api/v1/sorts/${id}/features/${feature}`,
|
|
1231
|
+
method: "PATCH",
|
|
1232
|
+
body: data,
|
|
1233
|
+
secure: true,
|
|
1234
|
+
type: "application/json",
|
|
1235
|
+
format: "json",
|
|
1236
|
+
...params
|
|
1237
|
+
});
|
|
1238
|
+
/**
|
|
1239
|
+
* @description The analysis runs inside the hierarchy write lock (sync); the memory and audit writes happen strictly after the lock is released ([`SortDiscoveryOrchestrator::record`]), never under it.
|
|
1240
|
+
*
|
|
1241
|
+
* @tags sorts
|
|
1242
|
+
* @name ProposeSortsClosedLoop
|
|
1243
|
+
* @summary Run FCA sort discovery AND record the closed-loop trail (L5): every Proposed sort gets a memory decision-episode entry and a tamper-evident audit record, returned as receipts beside the analysis.
|
|
1244
|
+
* @request POST:/api/v1/sorts/discovery/propose
|
|
1245
|
+
*/
|
|
1246
|
+
proposeSortsClosedLoop = (data, params = {}) => this.http.request({
|
|
1247
|
+
path: `/api/v1/sorts/discovery/propose`,
|
|
1248
|
+
method: "POST",
|
|
1249
|
+
body: data,
|
|
1250
|
+
type: "application/json",
|
|
1251
|
+
format: "json",
|
|
1252
|
+
...params
|
|
1253
|
+
});
|
|
1254
|
+
/**
|
|
1255
|
+
* @description POST /api/v1/sorts/propose-structural-similarities Derives sort-proximity candidates from the lattice structure (exact Wu-Palmer by default; ancestor Jaccard or the Lorentz geometry on request) and enters them into the SAME review queue as the behavioural learner: `GET /learned-similarities` lists them (with their crisp-meet status as evidence), `…/approve` ratifies one into ∼, `…/reject` drops it. Nothing reaches the active ∼ relation without a reviewer — derived proximity is not a Def A.10 similarity (vision-keeper ruling 2026-08-30). # Authorization Requires X-Tenant-Id header; only pairs whose both ends are visible to the tenant are proposed.
|
|
1256
|
+
*
|
|
1257
|
+
* @tags sorts
|
|
1258
|
+
* @name ProposeStructuralSimilarities
|
|
1259
|
+
* @summary Propose structural similarity candidates for review
|
|
1260
|
+
* @request POST:/api/v1/sorts/propose-structural-similarities
|
|
1261
|
+
* @secure
|
|
1262
|
+
*/
|
|
1263
|
+
proposeStructuralSimilarities = (data, params = {}) => this.http.request({
|
|
1264
|
+
path: `/api/v1/sorts/propose-structural-similarities`,
|
|
1265
|
+
method: "POST",
|
|
1266
|
+
body: data,
|
|
1267
|
+
secure: true,
|
|
1268
|
+
type: "application/json",
|
|
1269
|
+
format: "json",
|
|
1270
|
+
...params
|
|
1271
|
+
});
|
|
1156
1272
|
/**
|
|
1157
1273
|
* @description POST /api/v1/sorts/learned-similarities/reject Rejects a proposed or conflicted learned similarity with a reason. Rejected similarities are not used in reasoning.
|
|
1158
1274
|
*
|
|
@@ -1169,6 +1285,23 @@ var Sorts = class {
|
|
|
1169
1285
|
format: "json",
|
|
1170
1286
|
...params
|
|
1171
1287
|
});
|
|
1288
|
+
/**
|
|
1289
|
+
* @description The operation `Sort::remove_feature` could always express and no route could reach: every `remove_feature` call in this crate before #213 was `PsiTerm::remove_feature`, which drops a VALUE from a term — a different operation on a different type. The only route that amended a declaration at all was the backfill inside `bulk_create_sorts`, and it merges: a batch naming only the features to keep leaves the others in place. The declaration is removed from this sort and from every subsort that inherited it. An INHERITED declaration is refused with the ancestor named — it belongs to the sort that introduced it, and removing the copy here would be undone by the next propagation. # The terms Removing a declaration does not invalidate the values written under it. OSF is open: a term may carry a feature its sort does not declare, and only a `@closed` sort says otherwise. So the terms are REPORTED (`terms_binding`) and left alone unless `cascade_terms` asks for the value to go with the declaration. Removing the sort's own OVERRIDE of an ancestor's declaration puts it back to INHERITING that one, so the feature is still declared and the values are still governed — `still_declared` says so, and a cascade leaves them alone. # What goes with it Every bound constraint written over the removed declaration (`CHECK valid_to <= person.death_date` names `valid_to`), because one left naming a feature the sort no longer declares stops applying and is still emitted into the DDL export. ⚠️ Not recoverable through the sort DTOs — the route back is OSFQL `CHECK ON <sort> (…)`. # Refused for a large subtree A sort with more than 512 persisted subsorts is refused: the edit has to reach every subsort that materialised the inherited copy, and one applied to part of a subtree can be neither finished nor undone. # Errors - 400 Bad Request: no such declaration, an inherited one, or a shared sort - 404 Not Found: no such sort for this tenant
|
|
1290
|
+
*
|
|
1291
|
+
* @tags sorts
|
|
1292
|
+
* @name RemoveSortFeature
|
|
1293
|
+
* @summary Remove one feature declaration from a sort
|
|
1294
|
+
* @request DELETE:/api/v1/sorts/{id}/features/{feature}
|
|
1295
|
+
* @secure
|
|
1296
|
+
*/
|
|
1297
|
+
removeSortFeature = (id, feature, query, params = {}) => this.http.request({
|
|
1298
|
+
path: `/api/v1/sorts/${id}/features/${feature}`,
|
|
1299
|
+
method: "DELETE",
|
|
1300
|
+
query,
|
|
1301
|
+
secure: true,
|
|
1302
|
+
format: "json",
|
|
1303
|
+
...params
|
|
1304
|
+
});
|
|
1172
1305
|
/**
|
|
1173
1306
|
* No description
|
|
1174
1307
|
*
|
|
@@ -2833,9 +2966,10 @@ var Ingestion = class {
|
|
|
2833
2966
|
* @request POST:/api/v1/ingest/document
|
|
2834
2967
|
* @secure
|
|
2835
2968
|
*/
|
|
2836
|
-
ingestDocument = (data, params = {}) => this.http.request({
|
|
2969
|
+
ingestDocument = (data, query, params = {}) => this.http.request({
|
|
2837
2970
|
path: `/api/v1/ingest/document`,
|
|
2838
2971
|
method: "POST",
|
|
2972
|
+
query,
|
|
2839
2973
|
body: data,
|
|
2840
2974
|
secure: true,
|
|
2841
2975
|
type: "application/json",
|
|
@@ -2887,7 +3021,7 @@ var Ingestion = class {
|
|
|
2887
3021
|
* @request POST:/api/v1/ingest/markdown
|
|
2888
3022
|
* @secure
|
|
2889
3023
|
*/
|
|
2890
|
-
ingestMarkdown = (
|
|
3024
|
+
ingestMarkdown = (data, query, params = {}) => this.http.request({
|
|
2891
3025
|
path: `/api/v1/ingest/markdown`,
|
|
2892
3026
|
method: "POST",
|
|
2893
3027
|
query,
|
|
@@ -2922,7 +3056,7 @@ var Ingestion = class {
|
|
|
2922
3056
|
* @request POST:/api/v1/ingest/rdf
|
|
2923
3057
|
* @secure
|
|
2924
3058
|
*/
|
|
2925
|
-
ingestRdf = (
|
|
3059
|
+
ingestRdf = (data, query, params = {}) => this.http.request({
|
|
2926
3060
|
path: `/api/v1/ingest/rdf`,
|
|
2927
3061
|
method: "POST",
|
|
2928
3062
|
query,
|
|
@@ -6773,6 +6907,24 @@ var Reasoning = class {
|
|
|
6773
6907
|
constructor(http) {
|
|
6774
6908
|
this.http = http;
|
|
6775
6909
|
}
|
|
6910
|
+
/**
|
|
6911
|
+
* @description POST /api/v1/assessment/ordinal
|
|
6912
|
+
*
|
|
6913
|
+
* @tags reasoning
|
|
6914
|
+
* @name AssessOrdinal
|
|
6915
|
+
* @summary Grade criteria against evidence on an ordinal scale.
|
|
6916
|
+
* @request POST:/api/v1/assessment/ordinal
|
|
6917
|
+
* @secure
|
|
6918
|
+
*/
|
|
6919
|
+
assessOrdinal = (data, params = {}) => this.http.request({
|
|
6920
|
+
path: `/api/v1/assessment/ordinal`,
|
|
6921
|
+
method: "POST",
|
|
6922
|
+
body: data,
|
|
6923
|
+
secure: true,
|
|
6924
|
+
type: "application/json",
|
|
6925
|
+
format: "json",
|
|
6926
|
+
...params
|
|
6927
|
+
});
|
|
6776
6928
|
/**
|
|
6777
6929
|
* @description POST /api/v1/reasoning/disentailment Disentailment A =/=> B means: "if A holds, then B must NOT hold". Returns whether the disentailment is violated — the conflict where the facts establish A and B follows anyway. This is hierarchy-aware and graded on the same footing as the entailment route, so a conflict reachable only through the sort lattice (a `contaminated` clause held by a `lead_paint` fact that subsumes it) is detected without that clause being supplied as a fact. `A ⇏ B` is violated exactly to the degree `A ⇒ B` is established, so `degree` here reports the complement: how strongly the disentailment still holds.
|
|
6778
6930
|
*
|
|
@@ -7995,6 +8147,22 @@ var Analysis = class {
|
|
|
7995
8147
|
constructor(http) {
|
|
7996
8148
|
this.http = http;
|
|
7997
8149
|
}
|
|
8150
|
+
/**
|
|
8151
|
+
* @description Enumerates formal concepts over the tenant's terms, scores each concept's extent against the target feature, and where a concept's own extent is too small to decide, climbs to the most specific generalization that can. Concepts defined by the target are refused as circular; concepts nothing above can certify are counted as abstentions.
|
|
8152
|
+
*
|
|
8153
|
+
* @tags analysis
|
|
8154
|
+
* @name AnalyzeCertifiedGeneralization
|
|
8155
|
+
* @summary Certify feature classes against a recorded outcome.
|
|
8156
|
+
* @request POST:/api/v1/analysis/certified-generalization
|
|
8157
|
+
*/
|
|
8158
|
+
analyzeCertifiedGeneralization = (data, params = {}) => this.http.request({
|
|
8159
|
+
path: `/api/v1/analysis/certified-generalization`,
|
|
8160
|
+
method: "POST",
|
|
8161
|
+
body: data,
|
|
8162
|
+
type: "application/json",
|
|
8163
|
+
format: "json",
|
|
8164
|
+
...params
|
|
8165
|
+
});
|
|
7998
8166
|
/**
|
|
7999
8167
|
* @description Runs Ganter's Next Closure algorithm on existing PsiTerms to discover formal concepts (feature-set intersections) not captured by existing sorts. Returns ranked recommendations with confidence scores and optional auto-creation. When `fuzzy_thresholds` is non-empty, also runs fuzzy FCA at each alpha-cut level.
|
|
8000
8168
|
*
|
|
@@ -8011,6 +8179,22 @@ var Analysis = class {
|
|
|
8011
8179
|
format: "json",
|
|
8012
8180
|
...params
|
|
8013
8181
|
});
|
|
8182
|
+
/**
|
|
8183
|
+
* @description Membership is containment of the intent's feature names, so definitions mined on one population score another without a shared context. This is what makes mined concepts usable as features on data the mining never saw.
|
|
8184
|
+
*
|
|
8185
|
+
* @tags analysis
|
|
8186
|
+
* @name AssignConceptFeatures
|
|
8187
|
+
* @summary Apply supplied feature definitions to the tenant's terms.
|
|
8188
|
+
* @request POST:/api/v1/analysis/concept-features/assign
|
|
8189
|
+
*/
|
|
8190
|
+
assignConceptFeatures = (data, params = {}) => this.http.request({
|
|
8191
|
+
path: `/api/v1/analysis/concept-features/assign`,
|
|
8192
|
+
method: "POST",
|
|
8193
|
+
body: data,
|
|
8194
|
+
type: "application/json",
|
|
8195
|
+
format: "json",
|
|
8196
|
+
...params
|
|
8197
|
+
});
|
|
8014
8198
|
/**
|
|
8015
8199
|
* @description Returns a [`RuleBaseCertificateDto`]: whether forward reasoning is guaranteed to halt (with the ranking-function depth bound), and whether it is order-independent (with the theorem discharged, or a concrete conflicting rule pair). The analysis is read-only over the tenant's knowledge base.
|
|
8016
8200
|
*
|
|
@@ -8067,6 +8251,102 @@ var Analysis = class {
|
|
|
8067
8251
|
format: "json",
|
|
8068
8252
|
...params
|
|
8069
8253
|
});
|
|
8254
|
+
/**
|
|
8255
|
+
* @description Each installed rule reads: *for any term of `subject_sort_id` carrying every feature in the conjunction, conclude `target_feature`* — at the conjunction's certified lower bound, which becomes the rule's fuzzy certainty. An empty `installed` list is an abstention: nothing certified at this bound, and the store is unchanged.
|
|
8256
|
+
*
|
|
8257
|
+
* @tags analysis
|
|
8258
|
+
* @name InstallConceptRules
|
|
8259
|
+
* @summary Mine the tenant's terms and install every certifying conjunction as a rule.
|
|
8260
|
+
* @request POST:/api/v1/analysis/concept-rules
|
|
8261
|
+
*/
|
|
8262
|
+
installConceptRules = (data, params = {}) => this.http.request({
|
|
8263
|
+
path: `/api/v1/analysis/concept-rules`,
|
|
8264
|
+
method: "POST",
|
|
8265
|
+
body: data,
|
|
8266
|
+
type: "application/json",
|
|
8267
|
+
format: "json",
|
|
8268
|
+
...params
|
|
8269
|
+
});
|
|
8270
|
+
/**
|
|
8271
|
+
* @description A candidate reached by neither kind of hypothesis comes back `undetermined_no_hypothesis`, and one reached by both comes back `undetermined_contradictory` — different facts, reported apart, because the second says the examples disagree and the first says they are silent.
|
|
8272
|
+
*
|
|
8273
|
+
* @tags analysis
|
|
8274
|
+
* @name LearnHypotheses
|
|
8275
|
+
* @summary Learn the descriptions of a class that no counter-example carries, and classify candidates against them.
|
|
8276
|
+
* @request POST:/api/v1/analysis/hypotheses
|
|
8277
|
+
*/
|
|
8278
|
+
learnHypotheses = (data, params = {}) => this.http.request({
|
|
8279
|
+
path: `/api/v1/analysis/hypotheses`,
|
|
8280
|
+
method: "POST",
|
|
8281
|
+
body: data,
|
|
8282
|
+
type: "application/json",
|
|
8283
|
+
format: "json",
|
|
8284
|
+
...params
|
|
8285
|
+
});
|
|
8286
|
+
/**
|
|
8287
|
+
* @description This is the symbolic object of symbolic data analysis: the unit of interest is the group, its description is interval-valued where its members differ, and — once stored — it is an ordinary sort. A candidate whose deciding feature was never measured comes back `residuated`, naming what it is waiting for, rather than being reported outside the cohort.
|
|
8288
|
+
*
|
|
8289
|
+
* @tags analysis
|
|
8290
|
+
* @name MaterializeCohort
|
|
8291
|
+
* @summary Store a group's shared description as a sort, and classify candidates against the cohort it becomes.
|
|
8292
|
+
* @request POST:/api/v1/analysis/cohorts
|
|
8293
|
+
*/
|
|
8294
|
+
materializeCohort = (data, params = {}) => this.http.request({
|
|
8295
|
+
path: `/api/v1/analysis/cohorts`,
|
|
8296
|
+
method: "POST",
|
|
8297
|
+
body: data,
|
|
8298
|
+
type: "application/json",
|
|
8299
|
+
format: "json",
|
|
8300
|
+
...params
|
|
8301
|
+
});
|
|
8302
|
+
/**
|
|
8303
|
+
* @description Searches the concept lattice downward from the top concept, scoring every conjunction on its own joint extent — not on a fold over its parts, which cannot recover an interaction. Conjunctions whose certified lower bound clears the population rate are returned strongest-first; an empty list is an abstention rather than a rate of zero.
|
|
8304
|
+
*
|
|
8305
|
+
* @tags analysis
|
|
8306
|
+
* @name MineConceptFeatures
|
|
8307
|
+
* @summary Mine the tenant's terms for conjunctions certifiably enriched for a target.
|
|
8308
|
+
* @request POST:/api/v1/analysis/concept-features
|
|
8309
|
+
*/
|
|
8310
|
+
mineConceptFeatures = (data, params = {}) => this.http.request({
|
|
8311
|
+
path: `/api/v1/analysis/concept-features`,
|
|
8312
|
+
method: "POST",
|
|
8313
|
+
body: data,
|
|
8314
|
+
type: "application/json",
|
|
8315
|
+
format: "json",
|
|
8316
|
+
...params
|
|
8317
|
+
});
|
|
8318
|
+
/**
|
|
8319
|
+
* @description The `accuracy_bound` is the reason to prefer this over a plain search: at zero the returned region is provably optimal, and above the caller's tolerance the honest reading is "not yet decided" rather than "here is the answer". `skipped` says how many terms could not be used, because a population that quietly shrank would make the bound optimistic.
|
|
8320
|
+
*
|
|
8321
|
+
* @tags analysis
|
|
8322
|
+
* @name MineIntervalPatterns
|
|
8323
|
+
* @summary Mine the numeric regions that best separate a class, and report how much better any region could still be.
|
|
8324
|
+
* @request POST:/api/v1/analysis/interval-patterns
|
|
8325
|
+
*/
|
|
8326
|
+
mineIntervalPatterns = (data, params = {}) => this.http.request({
|
|
8327
|
+
path: `/api/v1/analysis/interval-patterns`,
|
|
8328
|
+
method: "POST",
|
|
8329
|
+
body: data,
|
|
8330
|
+
type: "application/json",
|
|
8331
|
+
format: "json",
|
|
8332
|
+
...params
|
|
8333
|
+
});
|
|
8334
|
+
/**
|
|
8335
|
+
* @description A returned class with `generalized: true` and a `sort` naming neither of its members' sorts is the case this endpoint exists for: a point in the lattice that no attribute names, reached because the least upper bound of two sorts is a derivation in the hierarchy. An empty `classes` list is an abstention, not a rate of zero.
|
|
8336
|
+
*
|
|
8337
|
+
* @tags analysis
|
|
8338
|
+
* @name MineLggClasses
|
|
8339
|
+
* @summary Mine the tenant's terms for classes certifiably enriched for a target, generalizing by sort rather than by conjunction.
|
|
8340
|
+
* @request POST:/api/v1/analysis/lgg-classes
|
|
8341
|
+
*/
|
|
8342
|
+
mineLggClasses = (data, params = {}) => this.http.request({
|
|
8343
|
+
path: `/api/v1/analysis/lgg-classes`,
|
|
8344
|
+
method: "POST",
|
|
8345
|
+
body: data,
|
|
8346
|
+
type: "application/json",
|
|
8347
|
+
format: "json",
|
|
8348
|
+
...params
|
|
8349
|
+
});
|
|
8070
8350
|
/**
|
|
8071
8351
|
* @description The counterexample must have all premise features but lack at least one conclusion feature.
|
|
8072
8352
|
*
|
|
@@ -8083,6 +8363,22 @@ var Analysis = class {
|
|
|
8083
8363
|
format: "json",
|
|
8084
8364
|
...params
|
|
8085
8365
|
});
|
|
8366
|
+
/**
|
|
8367
|
+
* @description A returned concept with `generalized: true` and a `sort` naming none of its members' sorts is the case this endpoint exists for: a point in the lattice no attribute names, reached because the least upper bound of two sorts is a derivation in the hierarchy. Read `truncated` before reading `concepts` as "what the population contains". An empty `concepts` list is an abstention, not a rate of zero. ⚠️ `concepts[].lower_bound` is a **ranking key, not a certificate**: the search chose those concepts by looking at the very degrees the bound is computed on. Send a `holdout` to get claims — the search then sees only the selection half, and `certificates[]` carries bounds measured on data it never saw, corrected for the number of claims rather than the number searched.
|
|
8368
|
+
*
|
|
8369
|
+
* @tags analysis
|
|
8370
|
+
* @name SearchLattice
|
|
8371
|
+
* @summary Search the tenant's terms for concepts certifiably enriched for a target, spending a stated budget where the evidence is rather than in worklist order.
|
|
8372
|
+
* @request POST:/api/v1/analysis/lattice-search
|
|
8373
|
+
*/
|
|
8374
|
+
searchLattice = (data, params = {}) => this.http.request({
|
|
8375
|
+
path: `/api/v1/analysis/lattice-search`,
|
|
8376
|
+
method: "POST",
|
|
8377
|
+
body: data,
|
|
8378
|
+
type: "application/json",
|
|
8379
|
+
format: "json",
|
|
8380
|
+
...params
|
|
8381
|
+
});
|
|
8086
8382
|
/**
|
|
8087
8383
|
* @description Builds a formal context from the tenant's knowledge base terms and initializes the Ganter exploration protocol.
|
|
8088
8384
|
*
|
|
@@ -9020,7 +9316,7 @@ var Admin = class {
|
|
|
9020
9316
|
...params
|
|
9021
9317
|
});
|
|
9022
9318
|
/**
|
|
9023
|
-
* @description Explicitly creates a tenant's inference state and sort hierarchy, optionally seeding initial sorts. Idempotent. No X-Tenant-Id header required.
|
|
9319
|
+
* @description Explicitly creates a tenant's registry row, inference state and sort hierarchy, optionally seeding initial sorts and storing a display label. Idempotent. No X-Tenant-Id header required. Refuses a deleted tenant's UUID with 409 rather than resurrecting it.
|
|
9024
9320
|
*
|
|
9025
9321
|
* @tags admin
|
|
9026
9322
|
* @name CreateTenant
|
|
@@ -9036,11 +9332,41 @@ var Admin = class {
|
|
|
9036
9332
|
...params
|
|
9037
9333
|
});
|
|
9038
9334
|
/**
|
|
9039
|
-
* @description
|
|
9335
|
+
* @description Destructive self-service operation: clears every trace of the caller's own tenant's data, then tombstones its registry row. The tenant's UUID is refused everywhere with 410 afterwards and cannot be recreated. There is no un-delete.
|
|
9336
|
+
*
|
|
9337
|
+
* @tags admin
|
|
9338
|
+
* @name DeleteMyTenant
|
|
9339
|
+
* @summary Delete the authenticated tenant (wipe + tombstone)
|
|
9340
|
+
* @request POST:/api/v1/delete-tenant
|
|
9341
|
+
* @secure
|
|
9342
|
+
*/
|
|
9343
|
+
deleteMyTenant = (params = {}) => this.http.request({
|
|
9344
|
+
path: `/api/v1/delete-tenant`,
|
|
9345
|
+
method: "POST",
|
|
9346
|
+
secure: true,
|
|
9347
|
+
format: "json",
|
|
9348
|
+
...params
|
|
9349
|
+
});
|
|
9350
|
+
/**
|
|
9351
|
+
* @description Clears every trace of the tenant's data (identical to the clear-tenant wipe), then tombstones its registry row. A deleted tenant's UUID is refused everywhere with 410 and cannot be recreated (409). There is no un-delete.
|
|
9352
|
+
*
|
|
9353
|
+
* @tags admin
|
|
9354
|
+
* @name DeleteTenant
|
|
9355
|
+
* @summary Delete a tenant (wipe + tombstone)
|
|
9356
|
+
* @request DELETE:/api/v1/admin/tenants/{tenant_id}
|
|
9357
|
+
*/
|
|
9358
|
+
deleteTenant = (tenantId, params = {}) => this.http.request({
|
|
9359
|
+
path: `/api/v1/admin/tenants/${tenantId}`,
|
|
9360
|
+
method: "DELETE",
|
|
9361
|
+
format: "json",
|
|
9362
|
+
...params
|
|
9363
|
+
});
|
|
9364
|
+
/**
|
|
9365
|
+
* @description Returns every tenant registered in the tenant registry and not tombstoned, with its display label and term/session counts. A cleared tenant stays listed with zeroed counts; a deleted tenant is not listed. Requires the platform_admin role. Works in both PostgreSQL and in-memory modes.
|
|
9040
9366
|
*
|
|
9041
9367
|
* @tags admin
|
|
9042
9368
|
* @name ListTenants
|
|
9043
|
-
* @summary List all tenants
|
|
9369
|
+
* @summary List all live tenants
|
|
9044
9370
|
* @request GET:/api/v1/admin/tenants
|
|
9045
9371
|
*/
|
|
9046
9372
|
listTenants = (params = {}) => this.http.request({
|
|
@@ -9063,6 +9389,56 @@ var Admin = class {
|
|
|
9063
9389
|
format: "json",
|
|
9064
9390
|
...params
|
|
9065
9391
|
});
|
|
9392
|
+
/**
|
|
9393
|
+
* @description PLATFORM-scoped: a base is cross-tenant state, so only a platform admin may write it. Tenant deltas keep flowing through the Sentinel's pack surface (`/api/v1/sentinel/packs/...`), where D5 refuses any delta that loosens a base constraint.
|
|
9394
|
+
*
|
|
9395
|
+
* @tags admin
|
|
9396
|
+
* @name RegisterBasePack
|
|
9397
|
+
* @summary Register (or refresh) an industry BASE pack — the shared layer every tenant delta of that industry overlays (coupling plan WS7).
|
|
9398
|
+
* @request PUT:/api/v1/admin/packs/base
|
|
9399
|
+
*/
|
|
9400
|
+
registerBasePack = (data, params = {}) => this.http.request({
|
|
9401
|
+
path: `/api/v1/admin/packs/base`,
|
|
9402
|
+
method: "PUT",
|
|
9403
|
+
body: data,
|
|
9404
|
+
type: "text/plain",
|
|
9405
|
+
format: "json",
|
|
9406
|
+
...params
|
|
9407
|
+
});
|
|
9408
|
+
/**
|
|
9409
|
+
* @description Sets the caller's own tenant display label. `name: null` clears it. The label is metadata only — never unique, never a lookup key.
|
|
9410
|
+
*
|
|
9411
|
+
* @tags admin
|
|
9412
|
+
* @name RenameMyTenant
|
|
9413
|
+
* @summary Set, change, or clear the authenticated tenant's label
|
|
9414
|
+
* @request PATCH:/api/v1/tenants/me
|
|
9415
|
+
* @secure
|
|
9416
|
+
*/
|
|
9417
|
+
renameMyTenant = (data, params = {}) => this.http.request({
|
|
9418
|
+
path: `/api/v1/tenants/me`,
|
|
9419
|
+
method: "PATCH",
|
|
9420
|
+
body: data,
|
|
9421
|
+
secure: true,
|
|
9422
|
+
type: "application/json",
|
|
9423
|
+
format: "json",
|
|
9424
|
+
...params
|
|
9425
|
+
});
|
|
9426
|
+
/**
|
|
9427
|
+
* @description Sets the tenant's display label. `name: null` clears it. The label is metadata only — never unique, never a lookup key.
|
|
9428
|
+
*
|
|
9429
|
+
* @tags admin
|
|
9430
|
+
* @name RenameTenant
|
|
9431
|
+
* @summary Set, change, or clear a tenant's label
|
|
9432
|
+
* @request PATCH:/api/v1/admin/tenants/{tenant_id}
|
|
9433
|
+
*/
|
|
9434
|
+
renameTenant = (tenantId, data, params = {}) => this.http.request({
|
|
9435
|
+
path: `/api/v1/admin/tenants/${tenantId}`,
|
|
9436
|
+
method: "PATCH",
|
|
9437
|
+
body: data,
|
|
9438
|
+
type: "application/json",
|
|
9439
|
+
format: "json",
|
|
9440
|
+
...params
|
|
9441
|
+
});
|
|
9066
9442
|
/**
|
|
9067
9443
|
* @description Returns event-processing counters (submitted/processed/failed/in-flight), the materialization LSN, the last handler error (if any, truncated to 512 chars), the per-tenant materialization sentinel, the current derived-facts row count, and a racy hint about whether a rebuild is in flight. Intended for operator dashboards; the supervisor itself does not depend on this endpoint.
|
|
9068
9444
|
*
|
|
@@ -9111,6 +9487,76 @@ var Ontology = class {
|
|
|
9111
9487
|
constructor(http) {
|
|
9112
9488
|
this.http = http;
|
|
9113
9489
|
}
|
|
9490
|
+
/**
|
|
9491
|
+
* @description Every verdict is derived from the base itself — the lattice's parent edges, the feature bounds declared on sorts, and the disjointness rules the axiom integrator emitted. Nothing is trusted from the caller.
|
|
9492
|
+
*
|
|
9493
|
+
* @tags ontology
|
|
9494
|
+
* @name CheckOwl2
|
|
9495
|
+
* @summary Run the OWL 2 validators over the tenant's live ontology.
|
|
9496
|
+
* @request POST:/api/v1/ontology/checks/owl2
|
|
9497
|
+
* @secure
|
|
9498
|
+
*/
|
|
9499
|
+
checkOwl2 = (data, params = {}) => this.http.request({
|
|
9500
|
+
path: `/api/v1/ontology/checks/owl2`,
|
|
9501
|
+
method: "POST",
|
|
9502
|
+
body: data,
|
|
9503
|
+
secure: true,
|
|
9504
|
+
type: "application/json",
|
|
9505
|
+
format: "json",
|
|
9506
|
+
...params
|
|
9507
|
+
});
|
|
9508
|
+
/**
|
|
9509
|
+
* No description
|
|
9510
|
+
*
|
|
9511
|
+
* @tags ontology
|
|
9512
|
+
* @name CreateCompetencyQuestion
|
|
9513
|
+
* @summary Record a competency question.
|
|
9514
|
+
* @request POST:/api/v1/ontology/competency-questions
|
|
9515
|
+
* @secure
|
|
9516
|
+
*/
|
|
9517
|
+
createCompetencyQuestion = (data, params = {}) => this.http.request({
|
|
9518
|
+
path: `/api/v1/ontology/competency-questions`,
|
|
9519
|
+
method: "POST",
|
|
9520
|
+
body: data,
|
|
9521
|
+
secure: true,
|
|
9522
|
+
type: "application/json",
|
|
9523
|
+
format: "json",
|
|
9524
|
+
...params
|
|
9525
|
+
});
|
|
9526
|
+
/**
|
|
9527
|
+
* No description
|
|
9528
|
+
*
|
|
9529
|
+
* @tags ontology
|
|
9530
|
+
* @name EnrichOntology
|
|
9531
|
+
* @summary Propose external-ontology links. Writes nothing.
|
|
9532
|
+
* @request POST:/api/v1/ontology/enrich
|
|
9533
|
+
* @secure
|
|
9534
|
+
*/
|
|
9535
|
+
enrichOntology = (data, params = {}) => this.http.request({
|
|
9536
|
+
path: `/api/v1/ontology/enrich`,
|
|
9537
|
+
method: "POST",
|
|
9538
|
+
body: data,
|
|
9539
|
+
secure: true,
|
|
9540
|
+
type: "application/json",
|
|
9541
|
+
format: "json",
|
|
9542
|
+
...params
|
|
9543
|
+
});
|
|
9544
|
+
/**
|
|
9545
|
+
* No description
|
|
9546
|
+
*
|
|
9547
|
+
* @tags ontology
|
|
9548
|
+
* @name EvaluateCompetencyQuestions
|
|
9549
|
+
* @summary Run the accepted questions against the base.
|
|
9550
|
+
* @request POST:/api/v1/ontology/competency-questions/evaluate
|
|
9551
|
+
* @secure
|
|
9552
|
+
*/
|
|
9553
|
+
evaluateCompetencyQuestions = (params = {}) => this.http.request({
|
|
9554
|
+
path: `/api/v1/ontology/competency-questions/evaluate`,
|
|
9555
|
+
method: "POST",
|
|
9556
|
+
secure: true,
|
|
9557
|
+
format: "json",
|
|
9558
|
+
...params
|
|
9559
|
+
});
|
|
9114
9560
|
/**
|
|
9115
9561
|
* @description # Errors - 503 if no LLM is configured - 422 if the LLM returns invalid JSON after retries - 502 if the LLM service fails
|
|
9116
9562
|
*
|
|
@@ -9129,6 +9575,72 @@ var Ontology = class {
|
|
|
9129
9575
|
format: "json",
|
|
9130
9576
|
...params
|
|
9131
9577
|
});
|
|
9578
|
+
/**
|
|
9579
|
+
* No description
|
|
9580
|
+
*
|
|
9581
|
+
* @tags ontology
|
|
9582
|
+
* @name ListCompetencyQuestions
|
|
9583
|
+
* @summary Every competency question the tenant holds.
|
|
9584
|
+
* @request GET:/api/v1/ontology/competency-questions
|
|
9585
|
+
* @secure
|
|
9586
|
+
*/
|
|
9587
|
+
listCompetencyQuestions = (params = {}) => this.http.request({
|
|
9588
|
+
path: `/api/v1/ontology/competency-questions`,
|
|
9589
|
+
method: "GET",
|
|
9590
|
+
secure: true,
|
|
9591
|
+
format: "json",
|
|
9592
|
+
...params
|
|
9593
|
+
});
|
|
9594
|
+
/**
|
|
9595
|
+
* @description Every figure is derived from the tenant's live lattice and term store. A stage is `complete` only when its bar is actually met; nothing here trusts the caller.
|
|
9596
|
+
*
|
|
9597
|
+
* @tags ontology
|
|
9598
|
+
* @name OntologyPipelineStatus
|
|
9599
|
+
* @summary Per-stage completeness of the ontology pipeline, measured from the base
|
|
9600
|
+
* @request GET:/api/v1/ontology/pipeline/status
|
|
9601
|
+
* @secure
|
|
9602
|
+
*/
|
|
9603
|
+
ontologyPipelineStatus = (params = {}) => this.http.request({
|
|
9604
|
+
path: `/api/v1/ontology/pipeline/status`,
|
|
9605
|
+
method: "GET",
|
|
9606
|
+
secure: true,
|
|
9607
|
+
format: "json",
|
|
9608
|
+
...params
|
|
9609
|
+
});
|
|
9610
|
+
/**
|
|
9611
|
+
* No description
|
|
9612
|
+
*
|
|
9613
|
+
* @tags ontology
|
|
9614
|
+
* @name OntologyQualityReport
|
|
9615
|
+
* @summary Judge the tenant's ontology.
|
|
9616
|
+
* @request GET:/api/v1/ontology/quality-report
|
|
9617
|
+
* @secure
|
|
9618
|
+
*/
|
|
9619
|
+
ontologyQualityReport = (params = {}) => this.http.request({
|
|
9620
|
+
path: `/api/v1/ontology/quality-report`,
|
|
9621
|
+
method: "GET",
|
|
9622
|
+
secure: true,
|
|
9623
|
+
format: "json",
|
|
9624
|
+
...params
|
|
9625
|
+
});
|
|
9626
|
+
/**
|
|
9627
|
+
* No description
|
|
9628
|
+
*
|
|
9629
|
+
* @tags ontology
|
|
9630
|
+
* @name SetCompetencyQuestionStatus
|
|
9631
|
+
* @summary Accept or reject a question.
|
|
9632
|
+
* @request PATCH:/api/v1/ontology/competency-questions/{key}
|
|
9633
|
+
* @secure
|
|
9634
|
+
*/
|
|
9635
|
+
setCompetencyQuestionStatus = (key, data, params = {}) => this.http.request({
|
|
9636
|
+
path: `/api/v1/ontology/competency-questions/${key}`,
|
|
9637
|
+
method: "PATCH",
|
|
9638
|
+
body: data,
|
|
9639
|
+
secure: true,
|
|
9640
|
+
type: "application/json",
|
|
9641
|
+
format: "json",
|
|
9642
|
+
...params
|
|
9643
|
+
});
|
|
9132
9644
|
};
|
|
9133
9645
|
|
|
9134
9646
|
// src/api-spec/generated/Generation.ts
|
|
@@ -9579,6 +10091,22 @@ var Compliance = class {
|
|
|
9579
10091
|
format: "json",
|
|
9580
10092
|
...params
|
|
9581
10093
|
});
|
|
10094
|
+
/**
|
|
10095
|
+
* No description
|
|
10096
|
+
*
|
|
10097
|
+
* @tags compliance
|
|
10098
|
+
* @name GetEuAiActConformity
|
|
10099
|
+
* @summary `GET /api/v1/compliance/conformity`
|
|
10100
|
+
* @request GET:/api/v1/compliance/conformity
|
|
10101
|
+
* @secure
|
|
10102
|
+
*/
|
|
10103
|
+
getEuAiActConformity = (params = {}) => this.http.request({
|
|
10104
|
+
path: `/api/v1/compliance/conformity`,
|
|
10105
|
+
method: "GET",
|
|
10106
|
+
secure: true,
|
|
10107
|
+
format: "json",
|
|
10108
|
+
...params
|
|
10109
|
+
});
|
|
9582
10110
|
/**
|
|
9583
10111
|
* No description
|
|
9584
10112
|
*
|
|
@@ -12173,7 +12701,13 @@ function FeatureDescriptorDtoFromApiToFront(dto) {
|
|
|
12173
12701
|
name: dto.name,
|
|
12174
12702
|
expectedSort: dto.expected_sort ?? void 0,
|
|
12175
12703
|
expectedTypeHint: dto.expected_type_hint ?? void 0,
|
|
12176
|
-
|
|
12704
|
+
// The spec made this optional and documents the default explicitly:
|
|
12705
|
+
// "Defaults to `false` when absent." A relation is an appropriateness
|
|
12706
|
+
// declaration — it says what the value's sort must be, not that the
|
|
12707
|
+
// feature must be present — so the minimal relational descriptor omits it.
|
|
12708
|
+
// Kept non-optional on the SDK surface so a consumer never handles
|
|
12709
|
+
// `undefined` for a question the wire already answers.
|
|
12710
|
+
required: dto.required ?? false,
|
|
12177
12711
|
constraint: dto.constraint ? ConstraintDtoFromApiToFront(dto.constraint) : void 0
|
|
12178
12712
|
};
|
|
12179
12713
|
}
|
|
@@ -12299,6 +12833,8 @@ function BulkCreateSortsRequestFromFrontToApi(model) {
|
|
|
12299
12833
|
function BulkSortErrorFromApiToFront(dto) {
|
|
12300
12834
|
return {
|
|
12301
12835
|
name: dto.name,
|
|
12836
|
+
kind: dto.kind,
|
|
12837
|
+
sortCreated: dto.sort_created,
|
|
12302
12838
|
error: dto.error
|
|
12303
12839
|
};
|
|
12304
12840
|
}
|
|
@@ -17362,6 +17898,17 @@ function TrailEntryDtoFromApiToFront(dto) {
|
|
|
17362
17898
|
prevLower: dto.prev_lower,
|
|
17363
17899
|
prevUpper: dto.prev_upper
|
|
17364
17900
|
};
|
|
17901
|
+
case "term_creation":
|
|
17902
|
+
return {
|
|
17903
|
+
type: "term_creation",
|
|
17904
|
+
termId: dto.term_id
|
|
17905
|
+
};
|
|
17906
|
+
case "term_removal":
|
|
17907
|
+
return {
|
|
17908
|
+
type: "term_removal",
|
|
17909
|
+
termId: dto.term_id,
|
|
17910
|
+
sortId: dto.sort_id
|
|
17911
|
+
};
|
|
17365
17912
|
}
|
|
17366
17913
|
}
|
|
17367
17914
|
function ResiduationGoalDtoFromFrontToApi(model) {
|
|
@@ -20412,8 +20959,8 @@ var IngestionClient = class {
|
|
|
20412
20959
|
*/
|
|
20413
20960
|
async ingestRdf(request) {
|
|
20414
20961
|
const response = await this.api.ingestRdf(
|
|
20415
|
-
|
|
20416
|
-
|
|
20962
|
+
IngestRdfRequestFromFrontToApi(request),
|
|
20963
|
+
{ sync: request.sync ?? false }
|
|
20417
20964
|
);
|
|
20418
20965
|
return IngestRdfResponseFromApiToFront(response.data);
|
|
20419
20966
|
}
|
|
@@ -22739,6 +23286,8 @@ function DiscoveredSortDtoFromApiToFront(dto) {
|
|
|
22739
23286
|
description: dto.description,
|
|
22740
23287
|
features: dto.features.map(DiscoveredFeatureDtoFromApiToFront),
|
|
22741
23288
|
name: dto.name,
|
|
23289
|
+
sourceTypeKey: dto.source_type_key,
|
|
23290
|
+
sortName: dto.sort_name,
|
|
22742
23291
|
sourceName: dto.source_name,
|
|
22743
23292
|
suggestedParents: dto.suggested_parents
|
|
22744
23293
|
};
|
|
@@ -27042,6 +27591,7 @@ function ClearTenantResponseFromApiToFront(dto) {
|
|
|
27042
27591
|
function TenantInfoFromApiToFront(dto) {
|
|
27043
27592
|
return {
|
|
27044
27593
|
tenantId: dto.tenant_id,
|
|
27594
|
+
name: dto.name,
|
|
27045
27595
|
termCount: dto.term_count,
|
|
27046
27596
|
sessionCount: dto.session_count
|
|
27047
27597
|
};
|
|
@@ -27053,6 +27603,7 @@ function ListTenantsResponseFromApiToFront(dto) {
|
|
|
27053
27603
|
}
|
|
27054
27604
|
function CreateTenantRequestFromFrontToApi(model) {
|
|
27055
27605
|
return {
|
|
27606
|
+
name: model.name,
|
|
27056
27607
|
owner_user_id: model.ownerUserId,
|
|
27057
27608
|
seed_sorts: model.seedSorts,
|
|
27058
27609
|
tenant_id: model.tenantId
|
|
@@ -27062,7 +27613,25 @@ function CreateTenantResponseFromApiToFront(dto) {
|
|
|
27062
27613
|
return {
|
|
27063
27614
|
created: dto.created,
|
|
27064
27615
|
seededSorts: dto.seeded_sorts,
|
|
27065
|
-
tenantId: dto.tenant_id
|
|
27616
|
+
tenantId: dto.tenant_id,
|
|
27617
|
+
name: dto.name
|
|
27618
|
+
};
|
|
27619
|
+
}
|
|
27620
|
+
function DeleteTenantResponseFromApiToFront(dto) {
|
|
27621
|
+
return {
|
|
27622
|
+
...ClearTenantResponseFromApiToFront(dto),
|
|
27623
|
+
deletedAt: dto.deleted_at
|
|
27624
|
+
};
|
|
27625
|
+
}
|
|
27626
|
+
function UpdateTenantNameRequestFromFrontToApi(model) {
|
|
27627
|
+
return {
|
|
27628
|
+
name: model.name
|
|
27629
|
+
};
|
|
27630
|
+
}
|
|
27631
|
+
function UpdateTenantNameResponseFromApiToFront(dto) {
|
|
27632
|
+
return {
|
|
27633
|
+
tenantId: dto.tenant_id,
|
|
27634
|
+
name: dto.name
|
|
27066
27635
|
};
|
|
27067
27636
|
}
|
|
27068
27637
|
|
|
@@ -27213,6 +27782,128 @@ var AdminClient = class {
|
|
|
27213
27782
|
const response = await this.api.createTenant(CreateTenantRequestFromFrontToApi(request));
|
|
27214
27783
|
return CreateTenantResponseFromApiToFront(response.data);
|
|
27215
27784
|
}
|
|
27785
|
+
/**
|
|
27786
|
+
* Delete a tenant (platform-admin).
|
|
27787
|
+
*
|
|
27788
|
+
* @param tenantId - The UUID of the tenant to delete.
|
|
27789
|
+
* @returns The wipe report plus the tombstone outcome.
|
|
27790
|
+
* @throws {ApiError} `404` when no registry row exists for the UUID; `410`
|
|
27791
|
+
* when the tenant was already deleted; `403` without the `platform_admin`
|
|
27792
|
+
* role; `500` when the data reset failed (a partial wipe may have occurred).
|
|
27793
|
+
*
|
|
27794
|
+
* @remarks
|
|
27795
|
+
* **DESTRUCTIVE AND IRREVERSIBLE. There is no un-delete.**
|
|
27796
|
+
*
|
|
27797
|
+
* Clears every trace of the tenant's data (identical to the clear-tenant
|
|
27798
|
+
* wipe), then tombstones its registry row. The tenant stops existing:
|
|
27799
|
+
* every later request naming its UUID is refused with `410`, it disappears
|
|
27800
|
+
* from `listTenants`, and `createTenant` on the same UUID refuses with `409`
|
|
27801
|
+
* rather than resurrecting it. A fresh UUID is the workaround.
|
|
27802
|
+
*
|
|
27803
|
+
* This is not {@link clearTenantData}: a clear wipes the tenant's data but
|
|
27804
|
+
* the tenant continues to exist — its id stays valid, it can be re-populated,
|
|
27805
|
+
* and it is still listed with zeroed counts. A delete retires the id.
|
|
27806
|
+
*
|
|
27807
|
+
* @example
|
|
27808
|
+
* ```typescript
|
|
27809
|
+
* const result = await client.admin.deleteTenant('550e8400-e29b-41d4-a716-446655440000');
|
|
27810
|
+
* console.log(result.message);
|
|
27811
|
+
* console.log(`Deleted at: ${result.deletedAt}`);
|
|
27812
|
+
* ```
|
|
27813
|
+
*/
|
|
27814
|
+
async deleteTenant(tenantId) {
|
|
27815
|
+
const response = await this.api.deleteTenant(tenantId);
|
|
27816
|
+
return DeleteTenantResponseFromApiToFront(response.data);
|
|
27817
|
+
}
|
|
27818
|
+
/**
|
|
27819
|
+
* Delete the authenticated tenant (self-service).
|
|
27820
|
+
*
|
|
27821
|
+
* @returns The wipe report plus the tombstone outcome.
|
|
27822
|
+
* @throws {ApiError} `404` when the caller's tenant was never materialized;
|
|
27823
|
+
* `410` when it was already deleted; `500` when the data reset failed
|
|
27824
|
+
* (a partial wipe may have occurred).
|
|
27825
|
+
*
|
|
27826
|
+
* @remarks
|
|
27827
|
+
* **DESTRUCTIVE AND IRREVERSIBLE. There is no un-delete.**
|
|
27828
|
+
*
|
|
27829
|
+
* The self-service mirror of {@link deleteTenant}: the target tenant is
|
|
27830
|
+
* resolved server-side from the caller's own `X-Tenant-Id` header, never
|
|
27831
|
+
* from a path or body parameter, so it always deletes the authenticated
|
|
27832
|
+
* principal's own tenant. No `platform_admin` role is required. Afterwards
|
|
27833
|
+
* the tenant's UUID is refused with `410` everywhere and cannot be
|
|
27834
|
+
* recreated — the caller must switch to a different tenant id.
|
|
27835
|
+
*
|
|
27836
|
+
* This is not {@link clearMyTenantData}: a clear wipes the caller's data but
|
|
27837
|
+
* the tenant continues to exist. A delete retires the id permanently.
|
|
27838
|
+
*
|
|
27839
|
+
* @example
|
|
27840
|
+
* ```typescript
|
|
27841
|
+
* // Deletes the calling tenant's own identity — no tenant ID is passed.
|
|
27842
|
+
* const result = await client.admin.deleteMyTenant();
|
|
27843
|
+
* console.log(`Tenant retired at: ${result.deletedAt}`);
|
|
27844
|
+
* ```
|
|
27845
|
+
*/
|
|
27846
|
+
async deleteMyTenant() {
|
|
27847
|
+
const response = await this.api.deleteMyTenant();
|
|
27848
|
+
return DeleteTenantResponseFromApiToFront(response.data);
|
|
27849
|
+
}
|
|
27850
|
+
/**
|
|
27851
|
+
* Set, change, or clear a tenant's label (platform-admin).
|
|
27852
|
+
*
|
|
27853
|
+
* @param tenantId - The UUID of the tenant to rename.
|
|
27854
|
+
* @param request - The new label. `name: null` (or an empty request) clears it.
|
|
27855
|
+
* @returns The tenant id and the label now stored.
|
|
27856
|
+
* @throws {ApiError} `404` when no registry row exists for the UUID; `410`
|
|
27857
|
+
* when the tenant is deleted (its label is frozen); `422` when the name is
|
|
27858
|
+
* empty after trim or over 200 characters; `403` without the
|
|
27859
|
+
* `platform_admin` role.
|
|
27860
|
+
*
|
|
27861
|
+
* @remarks
|
|
27862
|
+
* The label is display metadata only: not unique, not a lookup key, never
|
|
27863
|
+
* parsed. The UUID remains the tenant's only identity. The stored label
|
|
27864
|
+
* survives a clear and leaves with a delete.
|
|
27865
|
+
*
|
|
27866
|
+
* @example
|
|
27867
|
+
* ```typescript
|
|
27868
|
+
* const result = await client.admin.renameTenant('550e8400-…', { name: 'Research' });
|
|
27869
|
+
* console.log(result.name); // the stored, trimmed label
|
|
27870
|
+
* ```
|
|
27871
|
+
*/
|
|
27872
|
+
async renameTenant(tenantId, request) {
|
|
27873
|
+
const response = await this.api.renameTenant(
|
|
27874
|
+
tenantId,
|
|
27875
|
+
UpdateTenantNameRequestFromFrontToApi(request)
|
|
27876
|
+
);
|
|
27877
|
+
return UpdateTenantNameResponseFromApiToFront(response.data);
|
|
27878
|
+
}
|
|
27879
|
+
/**
|
|
27880
|
+
* Set, change, or clear the authenticated tenant's label (self-service).
|
|
27881
|
+
*
|
|
27882
|
+
* @param request - The new label. `name: null` (or an empty request) clears it.
|
|
27883
|
+
* @returns The tenant id and the label now stored.
|
|
27884
|
+
* @throws {ApiError} `404` when the caller's tenant was never materialized;
|
|
27885
|
+
* `410` when it is deleted; `422` when the name is empty after trim or
|
|
27886
|
+
* over 200 characters.
|
|
27887
|
+
*
|
|
27888
|
+
* @remarks
|
|
27889
|
+
* The self-service mirror of {@link renameTenant}: the target tenant is
|
|
27890
|
+
* resolved server-side from the caller's own `X-Tenant-Id` header, so it
|
|
27891
|
+
* always renames the authenticated principal's own tenant. No
|
|
27892
|
+
* `platform_admin` role is required.
|
|
27893
|
+
*
|
|
27894
|
+
* @example
|
|
27895
|
+
* ```typescript
|
|
27896
|
+
* // Renames the calling tenant — no tenant ID is passed.
|
|
27897
|
+
* const result = await client.admin.renameMyTenant({ name: 'My workspace' });
|
|
27898
|
+
* console.log(result.name);
|
|
27899
|
+
* ```
|
|
27900
|
+
*/
|
|
27901
|
+
async renameMyTenant(request) {
|
|
27902
|
+
const response = await this.api.renameMyTenant(
|
|
27903
|
+
UpdateTenantNameRequestFromFrontToApi(request)
|
|
27904
|
+
);
|
|
27905
|
+
return UpdateTenantNameResponseFromApiToFront(response.data);
|
|
27906
|
+
}
|
|
27216
27907
|
};
|
|
27217
27908
|
|
|
27218
27909
|
// src/normalizers/image-extraction.ts
|
|
@@ -28628,6 +29319,10 @@ function OsfqlValueFromApiToFront(value) {
|
|
|
28628
29319
|
switch (value["type"]) {
|
|
28629
29320
|
case "null":
|
|
28630
29321
|
return { type: "null" };
|
|
29322
|
+
// The record does not carry the feature. No payload, and no `undefined`
|
|
29323
|
+
// either: dropping the key would hide the absence the answer is about.
|
|
29324
|
+
case "unbound":
|
|
29325
|
+
return { type: "unbound" };
|
|
28631
29326
|
case "integer":
|
|
28632
29327
|
return typeof payload === "number" ? { type: "integer", value: payload } : void 0;
|
|
28633
29328
|
case "float":
|
|
@@ -28755,6 +29450,36 @@ function OsfqlDiagnoseResponseFromApiToFront(dto) {
|
|
|
28755
29450
|
diagnostics: dto.diagnostics.map(OsfqlDiagnosticFromApiToFront)
|
|
28756
29451
|
};
|
|
28757
29452
|
}
|
|
29453
|
+
function OsfqlCatalogEntryFromApiToFront(dto) {
|
|
29454
|
+
return {
|
|
29455
|
+
id: dto.id,
|
|
29456
|
+
statement: dto.statement,
|
|
29457
|
+
family: dto.family,
|
|
29458
|
+
category: dto.category,
|
|
29459
|
+
subOps: dto.sub_ops,
|
|
29460
|
+
brief: dto.brief,
|
|
29461
|
+
full: dto.full,
|
|
29462
|
+
syntax: dto.syntax,
|
|
29463
|
+
examples: dto.examples,
|
|
29464
|
+
risk: dto.risk,
|
|
29465
|
+
execution: OsfqlCatalogExecutionFromApiToFront(dto.execution),
|
|
29466
|
+
uiAffinity: {
|
|
29467
|
+
display: dto.ui_affinity.display ?? void 0,
|
|
29468
|
+
action: dto.ui_affinity.action ?? void 0
|
|
29469
|
+
},
|
|
29470
|
+
returns: dto.returns,
|
|
29471
|
+
// Absent means "needs nothing", which is false for nearly every statement —
|
|
29472
|
+
// so an absent array is a wire-shape surprise, not a default. `?? []` keeps
|
|
29473
|
+
// the shipped type total; the engine sends the field for all entries.
|
|
29474
|
+
needs: dto.needs ?? [],
|
|
29475
|
+
pitfalls: dto.pitfalls ?? []
|
|
29476
|
+
};
|
|
29477
|
+
}
|
|
29478
|
+
function OsfqlCatalogExecutionFromApiToFront(dto) {
|
|
29479
|
+
if (dto === "Executes") return { status: "executes" };
|
|
29480
|
+
if (dto === "PlanOnly") return { status: "planOnly" };
|
|
29481
|
+
return { status: "partial", note: dto.Partial };
|
|
29482
|
+
}
|
|
28758
29483
|
|
|
28759
29484
|
// src/resources/osfql.ts
|
|
28760
29485
|
var OsfqlClient = class {
|
|
@@ -28867,24 +29592,34 @@ var OsfqlClient = class {
|
|
|
28867
29592
|
return OsfqlDiagnoseResponseFromApiToFront(response.data);
|
|
28868
29593
|
}
|
|
28869
29594
|
/**
|
|
28870
|
-
* Fetch the OSFQL statement catalog
|
|
29595
|
+
* Fetch the OSFQL statement catalog — the engine's own description of every
|
|
29596
|
+
* statement it implements.
|
|
28871
29597
|
*
|
|
28872
|
-
* @param category - Optional
|
|
28873
|
-
*
|
|
29598
|
+
* @param category - Optional filter: `read`, `write`, `control`, or `meta`
|
|
29599
|
+
* (case-insensitive). Omit for the whole catalog; an unrecognised value
|
|
29600
|
+
* yields an empty list rather than an error.
|
|
29601
|
+
* @returns One {@link OsfqlCatalogEntry} per statement.
|
|
28874
29602
|
* @throws {ApiError} If the request fails.
|
|
28875
29603
|
*
|
|
28876
29604
|
* @remarks
|
|
28877
|
-
*
|
|
28878
|
-
*
|
|
28879
|
-
*
|
|
28880
|
-
*
|
|
28881
|
-
*
|
|
29605
|
+
* The backend publishes a response schema for this endpoint, so the payload
|
|
29606
|
+
* is normalized like any other. It previously returned `unknown` because the
|
|
29607
|
+
* spec carried none — and because the endpoint answered HTTP 500 to every
|
|
29608
|
+
* request until `kortexya/reasoninglayer#176` repaired its response DTO, so
|
|
29609
|
+
* no caller had ever received a body to type.
|
|
29610
|
+
*
|
|
29611
|
+
* ⚠️ The enum VALUES mix casing deliberately and are preserved verbatim:
|
|
29612
|
+
* `risk` is snake_case (`additive_write`), while `family`, `category`,
|
|
29613
|
+
* `returns` and both halves of `uiAffinity` are PascalCase (`Query`, `Read`,
|
|
29614
|
+
* `Bindings`, `Table`). Only keys are camelCased.
|
|
28882
29615
|
*
|
|
28883
29616
|
* @example
|
|
28884
29617
|
* ```typescript
|
|
28885
|
-
* const catalog
|
|
28886
|
-
*
|
|
28887
|
-
*
|
|
29618
|
+
* const catalog = await client.osfql.catalog('write');
|
|
29619
|
+
* for (const entry of catalog) {
|
|
29620
|
+
* if (entry.execution.status === 'partial') {
|
|
29621
|
+
* console.warn(`${entry.id} is partial: ${entry.execution.note}`);
|
|
29622
|
+
* }
|
|
28888
29623
|
* }
|
|
28889
29624
|
* ```
|
|
28890
29625
|
*/
|
|
@@ -28896,7 +29631,7 @@ var OsfqlClient = class {
|
|
|
28896
29631
|
secure: true,
|
|
28897
29632
|
format: "json"
|
|
28898
29633
|
});
|
|
28899
|
-
return response.data;
|
|
29634
|
+
return response.data.map(OsfqlCatalogEntryFromApiToFront);
|
|
28900
29635
|
}
|
|
28901
29636
|
};
|
|
28902
29637
|
|
|
@@ -28939,7 +29674,28 @@ function SourceExcerptDtoFromApiToFront(dto) {
|
|
|
28939
29674
|
sourceDocument: wire.source_document ?? void 0
|
|
28940
29675
|
};
|
|
28941
29676
|
}
|
|
29677
|
+
function SchemaExcerptDtoFromApiToFront(dto) {
|
|
29678
|
+
return {
|
|
29679
|
+
sortName: dto.sort_name,
|
|
29680
|
+
featureNames: dto.feature_names
|
|
29681
|
+
};
|
|
29682
|
+
}
|
|
29683
|
+
function CitationCheckDtoFromApiToFront(dto) {
|
|
29684
|
+
return {
|
|
29685
|
+
marker: dto.marker,
|
|
29686
|
+
variable: dto.variable ?? void 0,
|
|
29687
|
+
assertedValue: dto.asserted_value ?? void 0,
|
|
29688
|
+
verdict: dto.verdict,
|
|
29689
|
+
repair: dto.repair ?? void 0,
|
|
29690
|
+
repairVariables: dto.repair_variables,
|
|
29691
|
+
observedValues: dto.observed_values,
|
|
29692
|
+
observedTotal: dto.observed_total,
|
|
29693
|
+
scope: dto.scope,
|
|
29694
|
+
scopeLabel: dto.scope_label ?? void 0
|
|
29695
|
+
};
|
|
29696
|
+
}
|
|
28942
29697
|
function ClaimAnnotationDtoFromApiToFront(dto) {
|
|
29698
|
+
const wire = dto;
|
|
28943
29699
|
return {
|
|
28944
29700
|
text: dto.text,
|
|
28945
29701
|
span: dto.span,
|
|
@@ -28947,8 +29703,10 @@ function ClaimAnnotationDtoFromApiToFront(dto) {
|
|
|
28947
29703
|
confidence: dto.confidence,
|
|
28948
29704
|
sourceTermIds: dto.source_term_ids,
|
|
28949
29705
|
sourceExcerpts: dto.source_excerpts?.map(SourceExcerptDtoFromApiToFront),
|
|
29706
|
+
schemaExcerpts: dto.schema_excerpts?.map(SchemaExcerptDtoFromApiToFront),
|
|
28950
29707
|
osfqlQuery: dto.osfql_query ?? void 0,
|
|
28951
|
-
derivationSummary: dto.derivation_summary ? DerivationSummaryDtoFromApiToFront(dto.derivation_summary) : void 0
|
|
29708
|
+
derivationSummary: dto.derivation_summary ? DerivationSummaryDtoFromApiToFront(dto.derivation_summary) : void 0,
|
|
29709
|
+
citationChecks: wire.citation_checks?.map(CitationCheckDtoFromApiToFront)
|
|
28952
29710
|
};
|
|
28953
29711
|
}
|
|
28954
29712
|
function ProofTraceNodeDtoFromApiToFront(dto) {
|