@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.cjs
CHANGED
|
@@ -7,7 +7,7 @@ var __export = (target, all) => {
|
|
|
7
7
|
};
|
|
8
8
|
|
|
9
9
|
// src/config.ts
|
|
10
|
-
var SDK_VERSION = "1.
|
|
10
|
+
var SDK_VERSION = "1.23.0";
|
|
11
11
|
function resolveConfig(config) {
|
|
12
12
|
if (!config.baseUrl) {
|
|
13
13
|
throw new Error("ClientConfig.baseUrl is required");
|
|
@@ -958,7 +958,7 @@ var Sorts = class {
|
|
|
958
958
|
...params
|
|
959
959
|
});
|
|
960
960
|
/**
|
|
961
|
-
* @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)
|
|
961
|
+
* @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`
|
|
962
962
|
*
|
|
963
963
|
* @tags sorts
|
|
964
964
|
* @name DeleteSort
|
|
@@ -966,10 +966,27 @@ var Sorts = class {
|
|
|
966
966
|
* @request DELETE:/api/v1/sorts/{id}
|
|
967
967
|
* @secure
|
|
968
968
|
*/
|
|
969
|
-
deleteSort = (id, params = {}) => this.http.request({
|
|
969
|
+
deleteSort = (id, query, params = {}) => this.http.request({
|
|
970
970
|
path: `/api/v1/sorts/${id}`,
|
|
971
971
|
method: "DELETE",
|
|
972
|
+
query,
|
|
972
973
|
secure: true,
|
|
974
|
+
format: "json",
|
|
975
|
+
...params
|
|
976
|
+
});
|
|
977
|
+
/**
|
|
978
|
+
* No description
|
|
979
|
+
*
|
|
980
|
+
* @tags sorts
|
|
981
|
+
* @name GenerateSortProposals
|
|
982
|
+
* @summary Turn recurrent observations into proposed sorts for review.
|
|
983
|
+
* @request POST:/api/v1/sorts/proposals/generate
|
|
984
|
+
*/
|
|
985
|
+
generateSortProposals = (query, params = {}) => this.http.request({
|
|
986
|
+
path: `/api/v1/sorts/proposals/generate`,
|
|
987
|
+
method: "POST",
|
|
988
|
+
query,
|
|
989
|
+
format: "json",
|
|
973
990
|
...params
|
|
974
991
|
});
|
|
975
992
|
/**
|
|
@@ -1017,7 +1034,7 @@ var Sorts = class {
|
|
|
1017
1034
|
...params
|
|
1018
1035
|
});
|
|
1019
1036
|
/**
|
|
1020
|
-
* @description Per Definition IV.5 (Milanese & Pasi 2024):
|
|
1037
|
+
* @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.)
|
|
1021
1038
|
*
|
|
1022
1039
|
* @tags sorts
|
|
1023
1040
|
* @name GetPreorderDegree
|
|
@@ -1032,6 +1049,21 @@ var Sorts = class {
|
|
|
1032
1049
|
format: "json",
|
|
1033
1050
|
...params
|
|
1034
1051
|
});
|
|
1052
|
+
/**
|
|
1053
|
+
* @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 ≺∼·).
|
|
1054
|
+
*
|
|
1055
|
+
* @tags sorts
|
|
1056
|
+
* @name GetQuotientOrder
|
|
1057
|
+
* @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.
|
|
1058
|
+
* @request GET:/api/v1/sorts/quotient-order
|
|
1059
|
+
*/
|
|
1060
|
+
getQuotientOrder = (query, params = {}) => this.http.request({
|
|
1061
|
+
path: `/api/v1/sorts/quotient-order`,
|
|
1062
|
+
method: "GET",
|
|
1063
|
+
query,
|
|
1064
|
+
format: "json",
|
|
1065
|
+
...params
|
|
1066
|
+
});
|
|
1035
1067
|
/**
|
|
1036
1068
|
* @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`.
|
|
1037
1069
|
*
|
|
@@ -1140,6 +1172,20 @@ var Sorts = class {
|
|
|
1140
1172
|
format: "json",
|
|
1141
1173
|
...params
|
|
1142
1174
|
});
|
|
1175
|
+
/**
|
|
1176
|
+
* No description
|
|
1177
|
+
*
|
|
1178
|
+
* @tags sorts
|
|
1179
|
+
* @name ListObservations
|
|
1180
|
+
* @summary List the tenant's unknown-term observations.
|
|
1181
|
+
* @request GET:/api/v1/sorts/proposals
|
|
1182
|
+
*/
|
|
1183
|
+
listObservations = (params = {}) => this.http.request({
|
|
1184
|
+
path: `/api/v1/sorts/proposals`,
|
|
1185
|
+
method: "GET",
|
|
1186
|
+
format: "json",
|
|
1187
|
+
...params
|
|
1188
|
+
});
|
|
1143
1189
|
/**
|
|
1144
1190
|
* @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.
|
|
1145
1191
|
*
|
|
@@ -1155,6 +1201,76 @@ var Sorts = class {
|
|
|
1155
1201
|
format: "json",
|
|
1156
1202
|
...params
|
|
1157
1203
|
});
|
|
1204
|
+
/**
|
|
1205
|
+
* @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.
|
|
1206
|
+
*
|
|
1207
|
+
* @tags sorts
|
|
1208
|
+
* @name PatchSort
|
|
1209
|
+
* @summary Curate one concept's vocabulary and lifecycle
|
|
1210
|
+
* @request PATCH:/api/v1/sorts/{id}
|
|
1211
|
+
* @secure
|
|
1212
|
+
*/
|
|
1213
|
+
patchSort = (id, data, params = {}) => this.http.request({
|
|
1214
|
+
path: `/api/v1/sorts/${id}`,
|
|
1215
|
+
method: "PATCH",
|
|
1216
|
+
body: data,
|
|
1217
|
+
secure: true,
|
|
1218
|
+
type: "application/json",
|
|
1219
|
+
format: "json",
|
|
1220
|
+
...params
|
|
1221
|
+
});
|
|
1222
|
+
/**
|
|
1223
|
+
* @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
|
|
1224
|
+
*
|
|
1225
|
+
* @tags sorts
|
|
1226
|
+
* @name PatchSortFeature
|
|
1227
|
+
* @summary Rename one feature declaration on a sort
|
|
1228
|
+
* @request PATCH:/api/v1/sorts/{id}/features/{feature}
|
|
1229
|
+
* @secure
|
|
1230
|
+
*/
|
|
1231
|
+
patchSortFeature = (id, feature, data, params = {}) => this.http.request({
|
|
1232
|
+
path: `/api/v1/sorts/${id}/features/${feature}`,
|
|
1233
|
+
method: "PATCH",
|
|
1234
|
+
body: data,
|
|
1235
|
+
secure: true,
|
|
1236
|
+
type: "application/json",
|
|
1237
|
+
format: "json",
|
|
1238
|
+
...params
|
|
1239
|
+
});
|
|
1240
|
+
/**
|
|
1241
|
+
* @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.
|
|
1242
|
+
*
|
|
1243
|
+
* @tags sorts
|
|
1244
|
+
* @name ProposeSortsClosedLoop
|
|
1245
|
+
* @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.
|
|
1246
|
+
* @request POST:/api/v1/sorts/discovery/propose
|
|
1247
|
+
*/
|
|
1248
|
+
proposeSortsClosedLoop = (data, params = {}) => this.http.request({
|
|
1249
|
+
path: `/api/v1/sorts/discovery/propose`,
|
|
1250
|
+
method: "POST",
|
|
1251
|
+
body: data,
|
|
1252
|
+
type: "application/json",
|
|
1253
|
+
format: "json",
|
|
1254
|
+
...params
|
|
1255
|
+
});
|
|
1256
|
+
/**
|
|
1257
|
+
* @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.
|
|
1258
|
+
*
|
|
1259
|
+
* @tags sorts
|
|
1260
|
+
* @name ProposeStructuralSimilarities
|
|
1261
|
+
* @summary Propose structural similarity candidates for review
|
|
1262
|
+
* @request POST:/api/v1/sorts/propose-structural-similarities
|
|
1263
|
+
* @secure
|
|
1264
|
+
*/
|
|
1265
|
+
proposeStructuralSimilarities = (data, params = {}) => this.http.request({
|
|
1266
|
+
path: `/api/v1/sorts/propose-structural-similarities`,
|
|
1267
|
+
method: "POST",
|
|
1268
|
+
body: data,
|
|
1269
|
+
secure: true,
|
|
1270
|
+
type: "application/json",
|
|
1271
|
+
format: "json",
|
|
1272
|
+
...params
|
|
1273
|
+
});
|
|
1158
1274
|
/**
|
|
1159
1275
|
* @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.
|
|
1160
1276
|
*
|
|
@@ -1171,6 +1287,23 @@ var Sorts = class {
|
|
|
1171
1287
|
format: "json",
|
|
1172
1288
|
...params
|
|
1173
1289
|
});
|
|
1290
|
+
/**
|
|
1291
|
+
* @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
|
|
1292
|
+
*
|
|
1293
|
+
* @tags sorts
|
|
1294
|
+
* @name RemoveSortFeature
|
|
1295
|
+
* @summary Remove one feature declaration from a sort
|
|
1296
|
+
* @request DELETE:/api/v1/sorts/{id}/features/{feature}
|
|
1297
|
+
* @secure
|
|
1298
|
+
*/
|
|
1299
|
+
removeSortFeature = (id, feature, query, params = {}) => this.http.request({
|
|
1300
|
+
path: `/api/v1/sorts/${id}/features/${feature}`,
|
|
1301
|
+
method: "DELETE",
|
|
1302
|
+
query,
|
|
1303
|
+
secure: true,
|
|
1304
|
+
format: "json",
|
|
1305
|
+
...params
|
|
1306
|
+
});
|
|
1174
1307
|
/**
|
|
1175
1308
|
* No description
|
|
1176
1309
|
*
|
|
@@ -2835,9 +2968,10 @@ var Ingestion = class {
|
|
|
2835
2968
|
* @request POST:/api/v1/ingest/document
|
|
2836
2969
|
* @secure
|
|
2837
2970
|
*/
|
|
2838
|
-
ingestDocument = (data, params = {}) => this.http.request({
|
|
2971
|
+
ingestDocument = (data, query, params = {}) => this.http.request({
|
|
2839
2972
|
path: `/api/v1/ingest/document`,
|
|
2840
2973
|
method: "POST",
|
|
2974
|
+
query,
|
|
2841
2975
|
body: data,
|
|
2842
2976
|
secure: true,
|
|
2843
2977
|
type: "application/json",
|
|
@@ -2889,7 +3023,7 @@ var Ingestion = class {
|
|
|
2889
3023
|
* @request POST:/api/v1/ingest/markdown
|
|
2890
3024
|
* @secure
|
|
2891
3025
|
*/
|
|
2892
|
-
ingestMarkdown = (
|
|
3026
|
+
ingestMarkdown = (data, query, params = {}) => this.http.request({
|
|
2893
3027
|
path: `/api/v1/ingest/markdown`,
|
|
2894
3028
|
method: "POST",
|
|
2895
3029
|
query,
|
|
@@ -2924,7 +3058,7 @@ var Ingestion = class {
|
|
|
2924
3058
|
* @request POST:/api/v1/ingest/rdf
|
|
2925
3059
|
* @secure
|
|
2926
3060
|
*/
|
|
2927
|
-
ingestRdf = (
|
|
3061
|
+
ingestRdf = (data, query, params = {}) => this.http.request({
|
|
2928
3062
|
path: `/api/v1/ingest/rdf`,
|
|
2929
3063
|
method: "POST",
|
|
2930
3064
|
query,
|
|
@@ -6775,6 +6909,24 @@ var Reasoning = class {
|
|
|
6775
6909
|
constructor(http) {
|
|
6776
6910
|
this.http = http;
|
|
6777
6911
|
}
|
|
6912
|
+
/**
|
|
6913
|
+
* @description POST /api/v1/assessment/ordinal
|
|
6914
|
+
*
|
|
6915
|
+
* @tags reasoning
|
|
6916
|
+
* @name AssessOrdinal
|
|
6917
|
+
* @summary Grade criteria against evidence on an ordinal scale.
|
|
6918
|
+
* @request POST:/api/v1/assessment/ordinal
|
|
6919
|
+
* @secure
|
|
6920
|
+
*/
|
|
6921
|
+
assessOrdinal = (data, params = {}) => this.http.request({
|
|
6922
|
+
path: `/api/v1/assessment/ordinal`,
|
|
6923
|
+
method: "POST",
|
|
6924
|
+
body: data,
|
|
6925
|
+
secure: true,
|
|
6926
|
+
type: "application/json",
|
|
6927
|
+
format: "json",
|
|
6928
|
+
...params
|
|
6929
|
+
});
|
|
6778
6930
|
/**
|
|
6779
6931
|
* @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.
|
|
6780
6932
|
*
|
|
@@ -7997,6 +8149,22 @@ var Analysis = class {
|
|
|
7997
8149
|
constructor(http) {
|
|
7998
8150
|
this.http = http;
|
|
7999
8151
|
}
|
|
8152
|
+
/**
|
|
8153
|
+
* @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.
|
|
8154
|
+
*
|
|
8155
|
+
* @tags analysis
|
|
8156
|
+
* @name AnalyzeCertifiedGeneralization
|
|
8157
|
+
* @summary Certify feature classes against a recorded outcome.
|
|
8158
|
+
* @request POST:/api/v1/analysis/certified-generalization
|
|
8159
|
+
*/
|
|
8160
|
+
analyzeCertifiedGeneralization = (data, params = {}) => this.http.request({
|
|
8161
|
+
path: `/api/v1/analysis/certified-generalization`,
|
|
8162
|
+
method: "POST",
|
|
8163
|
+
body: data,
|
|
8164
|
+
type: "application/json",
|
|
8165
|
+
format: "json",
|
|
8166
|
+
...params
|
|
8167
|
+
});
|
|
8000
8168
|
/**
|
|
8001
8169
|
* @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.
|
|
8002
8170
|
*
|
|
@@ -8013,6 +8181,22 @@ var Analysis = class {
|
|
|
8013
8181
|
format: "json",
|
|
8014
8182
|
...params
|
|
8015
8183
|
});
|
|
8184
|
+
/**
|
|
8185
|
+
* @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.
|
|
8186
|
+
*
|
|
8187
|
+
* @tags analysis
|
|
8188
|
+
* @name AssignConceptFeatures
|
|
8189
|
+
* @summary Apply supplied feature definitions to the tenant's terms.
|
|
8190
|
+
* @request POST:/api/v1/analysis/concept-features/assign
|
|
8191
|
+
*/
|
|
8192
|
+
assignConceptFeatures = (data, params = {}) => this.http.request({
|
|
8193
|
+
path: `/api/v1/analysis/concept-features/assign`,
|
|
8194
|
+
method: "POST",
|
|
8195
|
+
body: data,
|
|
8196
|
+
type: "application/json",
|
|
8197
|
+
format: "json",
|
|
8198
|
+
...params
|
|
8199
|
+
});
|
|
8016
8200
|
/**
|
|
8017
8201
|
* @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.
|
|
8018
8202
|
*
|
|
@@ -8069,6 +8253,102 @@ var Analysis = class {
|
|
|
8069
8253
|
format: "json",
|
|
8070
8254
|
...params
|
|
8071
8255
|
});
|
|
8256
|
+
/**
|
|
8257
|
+
* @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.
|
|
8258
|
+
*
|
|
8259
|
+
* @tags analysis
|
|
8260
|
+
* @name InstallConceptRules
|
|
8261
|
+
* @summary Mine the tenant's terms and install every certifying conjunction as a rule.
|
|
8262
|
+
* @request POST:/api/v1/analysis/concept-rules
|
|
8263
|
+
*/
|
|
8264
|
+
installConceptRules = (data, params = {}) => this.http.request({
|
|
8265
|
+
path: `/api/v1/analysis/concept-rules`,
|
|
8266
|
+
method: "POST",
|
|
8267
|
+
body: data,
|
|
8268
|
+
type: "application/json",
|
|
8269
|
+
format: "json",
|
|
8270
|
+
...params
|
|
8271
|
+
});
|
|
8272
|
+
/**
|
|
8273
|
+
* @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.
|
|
8274
|
+
*
|
|
8275
|
+
* @tags analysis
|
|
8276
|
+
* @name LearnHypotheses
|
|
8277
|
+
* @summary Learn the descriptions of a class that no counter-example carries, and classify candidates against them.
|
|
8278
|
+
* @request POST:/api/v1/analysis/hypotheses
|
|
8279
|
+
*/
|
|
8280
|
+
learnHypotheses = (data, params = {}) => this.http.request({
|
|
8281
|
+
path: `/api/v1/analysis/hypotheses`,
|
|
8282
|
+
method: "POST",
|
|
8283
|
+
body: data,
|
|
8284
|
+
type: "application/json",
|
|
8285
|
+
format: "json",
|
|
8286
|
+
...params
|
|
8287
|
+
});
|
|
8288
|
+
/**
|
|
8289
|
+
* @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.
|
|
8290
|
+
*
|
|
8291
|
+
* @tags analysis
|
|
8292
|
+
* @name MaterializeCohort
|
|
8293
|
+
* @summary Store a group's shared description as a sort, and classify candidates against the cohort it becomes.
|
|
8294
|
+
* @request POST:/api/v1/analysis/cohorts
|
|
8295
|
+
*/
|
|
8296
|
+
materializeCohort = (data, params = {}) => this.http.request({
|
|
8297
|
+
path: `/api/v1/analysis/cohorts`,
|
|
8298
|
+
method: "POST",
|
|
8299
|
+
body: data,
|
|
8300
|
+
type: "application/json",
|
|
8301
|
+
format: "json",
|
|
8302
|
+
...params
|
|
8303
|
+
});
|
|
8304
|
+
/**
|
|
8305
|
+
* @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.
|
|
8306
|
+
*
|
|
8307
|
+
* @tags analysis
|
|
8308
|
+
* @name MineConceptFeatures
|
|
8309
|
+
* @summary Mine the tenant's terms for conjunctions certifiably enriched for a target.
|
|
8310
|
+
* @request POST:/api/v1/analysis/concept-features
|
|
8311
|
+
*/
|
|
8312
|
+
mineConceptFeatures = (data, params = {}) => this.http.request({
|
|
8313
|
+
path: `/api/v1/analysis/concept-features`,
|
|
8314
|
+
method: "POST",
|
|
8315
|
+
body: data,
|
|
8316
|
+
type: "application/json",
|
|
8317
|
+
format: "json",
|
|
8318
|
+
...params
|
|
8319
|
+
});
|
|
8320
|
+
/**
|
|
8321
|
+
* @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.
|
|
8322
|
+
*
|
|
8323
|
+
* @tags analysis
|
|
8324
|
+
* @name MineIntervalPatterns
|
|
8325
|
+
* @summary Mine the numeric regions that best separate a class, and report how much better any region could still be.
|
|
8326
|
+
* @request POST:/api/v1/analysis/interval-patterns
|
|
8327
|
+
*/
|
|
8328
|
+
mineIntervalPatterns = (data, params = {}) => this.http.request({
|
|
8329
|
+
path: `/api/v1/analysis/interval-patterns`,
|
|
8330
|
+
method: "POST",
|
|
8331
|
+
body: data,
|
|
8332
|
+
type: "application/json",
|
|
8333
|
+
format: "json",
|
|
8334
|
+
...params
|
|
8335
|
+
});
|
|
8336
|
+
/**
|
|
8337
|
+
* @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.
|
|
8338
|
+
*
|
|
8339
|
+
* @tags analysis
|
|
8340
|
+
* @name MineLggClasses
|
|
8341
|
+
* @summary Mine the tenant's terms for classes certifiably enriched for a target, generalizing by sort rather than by conjunction.
|
|
8342
|
+
* @request POST:/api/v1/analysis/lgg-classes
|
|
8343
|
+
*/
|
|
8344
|
+
mineLggClasses = (data, params = {}) => this.http.request({
|
|
8345
|
+
path: `/api/v1/analysis/lgg-classes`,
|
|
8346
|
+
method: "POST",
|
|
8347
|
+
body: data,
|
|
8348
|
+
type: "application/json",
|
|
8349
|
+
format: "json",
|
|
8350
|
+
...params
|
|
8351
|
+
});
|
|
8072
8352
|
/**
|
|
8073
8353
|
* @description The counterexample must have all premise features but lack at least one conclusion feature.
|
|
8074
8354
|
*
|
|
@@ -8085,6 +8365,22 @@ var Analysis = class {
|
|
|
8085
8365
|
format: "json",
|
|
8086
8366
|
...params
|
|
8087
8367
|
});
|
|
8368
|
+
/**
|
|
8369
|
+
* @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.
|
|
8370
|
+
*
|
|
8371
|
+
* @tags analysis
|
|
8372
|
+
* @name SearchLattice
|
|
8373
|
+
* @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.
|
|
8374
|
+
* @request POST:/api/v1/analysis/lattice-search
|
|
8375
|
+
*/
|
|
8376
|
+
searchLattice = (data, params = {}) => this.http.request({
|
|
8377
|
+
path: `/api/v1/analysis/lattice-search`,
|
|
8378
|
+
method: "POST",
|
|
8379
|
+
body: data,
|
|
8380
|
+
type: "application/json",
|
|
8381
|
+
format: "json",
|
|
8382
|
+
...params
|
|
8383
|
+
});
|
|
8088
8384
|
/**
|
|
8089
8385
|
* @description Builds a formal context from the tenant's knowledge base terms and initializes the Ganter exploration protocol.
|
|
8090
8386
|
*
|
|
@@ -9022,7 +9318,7 @@ var Admin = class {
|
|
|
9022
9318
|
...params
|
|
9023
9319
|
});
|
|
9024
9320
|
/**
|
|
9025
|
-
* @description Explicitly creates a tenant's inference state and sort hierarchy, optionally seeding initial sorts. Idempotent. No X-Tenant-Id header required.
|
|
9321
|
+
* @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.
|
|
9026
9322
|
*
|
|
9027
9323
|
* @tags admin
|
|
9028
9324
|
* @name CreateTenant
|
|
@@ -9038,11 +9334,41 @@ var Admin = class {
|
|
|
9038
9334
|
...params
|
|
9039
9335
|
});
|
|
9040
9336
|
/**
|
|
9041
|
-
* @description
|
|
9337
|
+
* @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.
|
|
9338
|
+
*
|
|
9339
|
+
* @tags admin
|
|
9340
|
+
* @name DeleteMyTenant
|
|
9341
|
+
* @summary Delete the authenticated tenant (wipe + tombstone)
|
|
9342
|
+
* @request POST:/api/v1/delete-tenant
|
|
9343
|
+
* @secure
|
|
9344
|
+
*/
|
|
9345
|
+
deleteMyTenant = (params = {}) => this.http.request({
|
|
9346
|
+
path: `/api/v1/delete-tenant`,
|
|
9347
|
+
method: "POST",
|
|
9348
|
+
secure: true,
|
|
9349
|
+
format: "json",
|
|
9350
|
+
...params
|
|
9351
|
+
});
|
|
9352
|
+
/**
|
|
9353
|
+
* @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.
|
|
9354
|
+
*
|
|
9355
|
+
* @tags admin
|
|
9356
|
+
* @name DeleteTenant
|
|
9357
|
+
* @summary Delete a tenant (wipe + tombstone)
|
|
9358
|
+
* @request DELETE:/api/v1/admin/tenants/{tenant_id}
|
|
9359
|
+
*/
|
|
9360
|
+
deleteTenant = (tenantId, params = {}) => this.http.request({
|
|
9361
|
+
path: `/api/v1/admin/tenants/${tenantId}`,
|
|
9362
|
+
method: "DELETE",
|
|
9363
|
+
format: "json",
|
|
9364
|
+
...params
|
|
9365
|
+
});
|
|
9366
|
+
/**
|
|
9367
|
+
* @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.
|
|
9042
9368
|
*
|
|
9043
9369
|
* @tags admin
|
|
9044
9370
|
* @name ListTenants
|
|
9045
|
-
* @summary List all tenants
|
|
9371
|
+
* @summary List all live tenants
|
|
9046
9372
|
* @request GET:/api/v1/admin/tenants
|
|
9047
9373
|
*/
|
|
9048
9374
|
listTenants = (params = {}) => this.http.request({
|
|
@@ -9065,6 +9391,56 @@ var Admin = class {
|
|
|
9065
9391
|
format: "json",
|
|
9066
9392
|
...params
|
|
9067
9393
|
});
|
|
9394
|
+
/**
|
|
9395
|
+
* @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.
|
|
9396
|
+
*
|
|
9397
|
+
* @tags admin
|
|
9398
|
+
* @name RegisterBasePack
|
|
9399
|
+
* @summary Register (or refresh) an industry BASE pack — the shared layer every tenant delta of that industry overlays (coupling plan WS7).
|
|
9400
|
+
* @request PUT:/api/v1/admin/packs/base
|
|
9401
|
+
*/
|
|
9402
|
+
registerBasePack = (data, params = {}) => this.http.request({
|
|
9403
|
+
path: `/api/v1/admin/packs/base`,
|
|
9404
|
+
method: "PUT",
|
|
9405
|
+
body: data,
|
|
9406
|
+
type: "text/plain",
|
|
9407
|
+
format: "json",
|
|
9408
|
+
...params
|
|
9409
|
+
});
|
|
9410
|
+
/**
|
|
9411
|
+
* @description Sets the caller's own tenant display label. `name: null` clears it. The label is metadata only — never unique, never a lookup key.
|
|
9412
|
+
*
|
|
9413
|
+
* @tags admin
|
|
9414
|
+
* @name RenameMyTenant
|
|
9415
|
+
* @summary Set, change, or clear the authenticated tenant's label
|
|
9416
|
+
* @request PATCH:/api/v1/tenants/me
|
|
9417
|
+
* @secure
|
|
9418
|
+
*/
|
|
9419
|
+
renameMyTenant = (data, params = {}) => this.http.request({
|
|
9420
|
+
path: `/api/v1/tenants/me`,
|
|
9421
|
+
method: "PATCH",
|
|
9422
|
+
body: data,
|
|
9423
|
+
secure: true,
|
|
9424
|
+
type: "application/json",
|
|
9425
|
+
format: "json",
|
|
9426
|
+
...params
|
|
9427
|
+
});
|
|
9428
|
+
/**
|
|
9429
|
+
* @description Sets the tenant's display label. `name: null` clears it. The label is metadata only — never unique, never a lookup key.
|
|
9430
|
+
*
|
|
9431
|
+
* @tags admin
|
|
9432
|
+
* @name RenameTenant
|
|
9433
|
+
* @summary Set, change, or clear a tenant's label
|
|
9434
|
+
* @request PATCH:/api/v1/admin/tenants/{tenant_id}
|
|
9435
|
+
*/
|
|
9436
|
+
renameTenant = (tenantId, data, params = {}) => this.http.request({
|
|
9437
|
+
path: `/api/v1/admin/tenants/${tenantId}`,
|
|
9438
|
+
method: "PATCH",
|
|
9439
|
+
body: data,
|
|
9440
|
+
type: "application/json",
|
|
9441
|
+
format: "json",
|
|
9442
|
+
...params
|
|
9443
|
+
});
|
|
9068
9444
|
/**
|
|
9069
9445
|
* @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.
|
|
9070
9446
|
*
|
|
@@ -9113,6 +9489,76 @@ var Ontology = class {
|
|
|
9113
9489
|
constructor(http) {
|
|
9114
9490
|
this.http = http;
|
|
9115
9491
|
}
|
|
9492
|
+
/**
|
|
9493
|
+
* @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.
|
|
9494
|
+
*
|
|
9495
|
+
* @tags ontology
|
|
9496
|
+
* @name CheckOwl2
|
|
9497
|
+
* @summary Run the OWL 2 validators over the tenant's live ontology.
|
|
9498
|
+
* @request POST:/api/v1/ontology/checks/owl2
|
|
9499
|
+
* @secure
|
|
9500
|
+
*/
|
|
9501
|
+
checkOwl2 = (data, params = {}) => this.http.request({
|
|
9502
|
+
path: `/api/v1/ontology/checks/owl2`,
|
|
9503
|
+
method: "POST",
|
|
9504
|
+
body: data,
|
|
9505
|
+
secure: true,
|
|
9506
|
+
type: "application/json",
|
|
9507
|
+
format: "json",
|
|
9508
|
+
...params
|
|
9509
|
+
});
|
|
9510
|
+
/**
|
|
9511
|
+
* No description
|
|
9512
|
+
*
|
|
9513
|
+
* @tags ontology
|
|
9514
|
+
* @name CreateCompetencyQuestion
|
|
9515
|
+
* @summary Record a competency question.
|
|
9516
|
+
* @request POST:/api/v1/ontology/competency-questions
|
|
9517
|
+
* @secure
|
|
9518
|
+
*/
|
|
9519
|
+
createCompetencyQuestion = (data, params = {}) => this.http.request({
|
|
9520
|
+
path: `/api/v1/ontology/competency-questions`,
|
|
9521
|
+
method: "POST",
|
|
9522
|
+
body: data,
|
|
9523
|
+
secure: true,
|
|
9524
|
+
type: "application/json",
|
|
9525
|
+
format: "json",
|
|
9526
|
+
...params
|
|
9527
|
+
});
|
|
9528
|
+
/**
|
|
9529
|
+
* No description
|
|
9530
|
+
*
|
|
9531
|
+
* @tags ontology
|
|
9532
|
+
* @name EnrichOntology
|
|
9533
|
+
* @summary Propose external-ontology links. Writes nothing.
|
|
9534
|
+
* @request POST:/api/v1/ontology/enrich
|
|
9535
|
+
* @secure
|
|
9536
|
+
*/
|
|
9537
|
+
enrichOntology = (data, params = {}) => this.http.request({
|
|
9538
|
+
path: `/api/v1/ontology/enrich`,
|
|
9539
|
+
method: "POST",
|
|
9540
|
+
body: data,
|
|
9541
|
+
secure: true,
|
|
9542
|
+
type: "application/json",
|
|
9543
|
+
format: "json",
|
|
9544
|
+
...params
|
|
9545
|
+
});
|
|
9546
|
+
/**
|
|
9547
|
+
* No description
|
|
9548
|
+
*
|
|
9549
|
+
* @tags ontology
|
|
9550
|
+
* @name EvaluateCompetencyQuestions
|
|
9551
|
+
* @summary Run the accepted questions against the base.
|
|
9552
|
+
* @request POST:/api/v1/ontology/competency-questions/evaluate
|
|
9553
|
+
* @secure
|
|
9554
|
+
*/
|
|
9555
|
+
evaluateCompetencyQuestions = (params = {}) => this.http.request({
|
|
9556
|
+
path: `/api/v1/ontology/competency-questions/evaluate`,
|
|
9557
|
+
method: "POST",
|
|
9558
|
+
secure: true,
|
|
9559
|
+
format: "json",
|
|
9560
|
+
...params
|
|
9561
|
+
});
|
|
9116
9562
|
/**
|
|
9117
9563
|
* @description # Errors - 503 if no LLM is configured - 422 if the LLM returns invalid JSON after retries - 502 if the LLM service fails
|
|
9118
9564
|
*
|
|
@@ -9131,6 +9577,72 @@ var Ontology = class {
|
|
|
9131
9577
|
format: "json",
|
|
9132
9578
|
...params
|
|
9133
9579
|
});
|
|
9580
|
+
/**
|
|
9581
|
+
* No description
|
|
9582
|
+
*
|
|
9583
|
+
* @tags ontology
|
|
9584
|
+
* @name ListCompetencyQuestions
|
|
9585
|
+
* @summary Every competency question the tenant holds.
|
|
9586
|
+
* @request GET:/api/v1/ontology/competency-questions
|
|
9587
|
+
* @secure
|
|
9588
|
+
*/
|
|
9589
|
+
listCompetencyQuestions = (params = {}) => this.http.request({
|
|
9590
|
+
path: `/api/v1/ontology/competency-questions`,
|
|
9591
|
+
method: "GET",
|
|
9592
|
+
secure: true,
|
|
9593
|
+
format: "json",
|
|
9594
|
+
...params
|
|
9595
|
+
});
|
|
9596
|
+
/**
|
|
9597
|
+
* @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.
|
|
9598
|
+
*
|
|
9599
|
+
* @tags ontology
|
|
9600
|
+
* @name OntologyPipelineStatus
|
|
9601
|
+
* @summary Per-stage completeness of the ontology pipeline, measured from the base
|
|
9602
|
+
* @request GET:/api/v1/ontology/pipeline/status
|
|
9603
|
+
* @secure
|
|
9604
|
+
*/
|
|
9605
|
+
ontologyPipelineStatus = (params = {}) => this.http.request({
|
|
9606
|
+
path: `/api/v1/ontology/pipeline/status`,
|
|
9607
|
+
method: "GET",
|
|
9608
|
+
secure: true,
|
|
9609
|
+
format: "json",
|
|
9610
|
+
...params
|
|
9611
|
+
});
|
|
9612
|
+
/**
|
|
9613
|
+
* No description
|
|
9614
|
+
*
|
|
9615
|
+
* @tags ontology
|
|
9616
|
+
* @name OntologyQualityReport
|
|
9617
|
+
* @summary Judge the tenant's ontology.
|
|
9618
|
+
* @request GET:/api/v1/ontology/quality-report
|
|
9619
|
+
* @secure
|
|
9620
|
+
*/
|
|
9621
|
+
ontologyQualityReport = (params = {}) => this.http.request({
|
|
9622
|
+
path: `/api/v1/ontology/quality-report`,
|
|
9623
|
+
method: "GET",
|
|
9624
|
+
secure: true,
|
|
9625
|
+
format: "json",
|
|
9626
|
+
...params
|
|
9627
|
+
});
|
|
9628
|
+
/**
|
|
9629
|
+
* No description
|
|
9630
|
+
*
|
|
9631
|
+
* @tags ontology
|
|
9632
|
+
* @name SetCompetencyQuestionStatus
|
|
9633
|
+
* @summary Accept or reject a question.
|
|
9634
|
+
* @request PATCH:/api/v1/ontology/competency-questions/{key}
|
|
9635
|
+
* @secure
|
|
9636
|
+
*/
|
|
9637
|
+
setCompetencyQuestionStatus = (key, data, params = {}) => this.http.request({
|
|
9638
|
+
path: `/api/v1/ontology/competency-questions/${key}`,
|
|
9639
|
+
method: "PATCH",
|
|
9640
|
+
body: data,
|
|
9641
|
+
secure: true,
|
|
9642
|
+
type: "application/json",
|
|
9643
|
+
format: "json",
|
|
9644
|
+
...params
|
|
9645
|
+
});
|
|
9134
9646
|
};
|
|
9135
9647
|
|
|
9136
9648
|
// src/api-spec/generated/Generation.ts
|
|
@@ -9581,6 +10093,22 @@ var Compliance = class {
|
|
|
9581
10093
|
format: "json",
|
|
9582
10094
|
...params
|
|
9583
10095
|
});
|
|
10096
|
+
/**
|
|
10097
|
+
* No description
|
|
10098
|
+
*
|
|
10099
|
+
* @tags compliance
|
|
10100
|
+
* @name GetEuAiActConformity
|
|
10101
|
+
* @summary `GET /api/v1/compliance/conformity`
|
|
10102
|
+
* @request GET:/api/v1/compliance/conformity
|
|
10103
|
+
* @secure
|
|
10104
|
+
*/
|
|
10105
|
+
getEuAiActConformity = (params = {}) => this.http.request({
|
|
10106
|
+
path: `/api/v1/compliance/conformity`,
|
|
10107
|
+
method: "GET",
|
|
10108
|
+
secure: true,
|
|
10109
|
+
format: "json",
|
|
10110
|
+
...params
|
|
10111
|
+
});
|
|
9584
10112
|
/**
|
|
9585
10113
|
* No description
|
|
9586
10114
|
*
|
|
@@ -12175,7 +12703,13 @@ function FeatureDescriptorDtoFromApiToFront(dto) {
|
|
|
12175
12703
|
name: dto.name,
|
|
12176
12704
|
expectedSort: dto.expected_sort ?? void 0,
|
|
12177
12705
|
expectedTypeHint: dto.expected_type_hint ?? void 0,
|
|
12178
|
-
|
|
12706
|
+
// The spec made this optional and documents the default explicitly:
|
|
12707
|
+
// "Defaults to `false` when absent." A relation is an appropriateness
|
|
12708
|
+
// declaration — it says what the value's sort must be, not that the
|
|
12709
|
+
// feature must be present — so the minimal relational descriptor omits it.
|
|
12710
|
+
// Kept non-optional on the SDK surface so a consumer never handles
|
|
12711
|
+
// `undefined` for a question the wire already answers.
|
|
12712
|
+
required: dto.required ?? false,
|
|
12179
12713
|
constraint: dto.constraint ? ConstraintDtoFromApiToFront(dto.constraint) : void 0
|
|
12180
12714
|
};
|
|
12181
12715
|
}
|
|
@@ -12301,6 +12835,8 @@ function BulkCreateSortsRequestFromFrontToApi(model) {
|
|
|
12301
12835
|
function BulkSortErrorFromApiToFront(dto) {
|
|
12302
12836
|
return {
|
|
12303
12837
|
name: dto.name,
|
|
12838
|
+
kind: dto.kind,
|
|
12839
|
+
sortCreated: dto.sort_created,
|
|
12304
12840
|
error: dto.error
|
|
12305
12841
|
};
|
|
12306
12842
|
}
|
|
@@ -17364,6 +17900,17 @@ function TrailEntryDtoFromApiToFront(dto) {
|
|
|
17364
17900
|
prevLower: dto.prev_lower,
|
|
17365
17901
|
prevUpper: dto.prev_upper
|
|
17366
17902
|
};
|
|
17903
|
+
case "term_creation":
|
|
17904
|
+
return {
|
|
17905
|
+
type: "term_creation",
|
|
17906
|
+
termId: dto.term_id
|
|
17907
|
+
};
|
|
17908
|
+
case "term_removal":
|
|
17909
|
+
return {
|
|
17910
|
+
type: "term_removal",
|
|
17911
|
+
termId: dto.term_id,
|
|
17912
|
+
sortId: dto.sort_id
|
|
17913
|
+
};
|
|
17367
17914
|
}
|
|
17368
17915
|
}
|
|
17369
17916
|
function ResiduationGoalDtoFromFrontToApi(model) {
|
|
@@ -20414,8 +20961,8 @@ var IngestionClient = class {
|
|
|
20414
20961
|
*/
|
|
20415
20962
|
async ingestRdf(request) {
|
|
20416
20963
|
const response = await this.api.ingestRdf(
|
|
20417
|
-
|
|
20418
|
-
|
|
20964
|
+
IngestRdfRequestFromFrontToApi(request),
|
|
20965
|
+
{ sync: request.sync ?? false }
|
|
20419
20966
|
);
|
|
20420
20967
|
return IngestRdfResponseFromApiToFront(response.data);
|
|
20421
20968
|
}
|
|
@@ -22741,6 +23288,8 @@ function DiscoveredSortDtoFromApiToFront(dto) {
|
|
|
22741
23288
|
description: dto.description,
|
|
22742
23289
|
features: dto.features.map(DiscoveredFeatureDtoFromApiToFront),
|
|
22743
23290
|
name: dto.name,
|
|
23291
|
+
sourceTypeKey: dto.source_type_key,
|
|
23292
|
+
sortName: dto.sort_name,
|
|
22744
23293
|
sourceName: dto.source_name,
|
|
22745
23294
|
suggestedParents: dto.suggested_parents
|
|
22746
23295
|
};
|
|
@@ -27044,6 +27593,7 @@ function ClearTenantResponseFromApiToFront(dto) {
|
|
|
27044
27593
|
function TenantInfoFromApiToFront(dto) {
|
|
27045
27594
|
return {
|
|
27046
27595
|
tenantId: dto.tenant_id,
|
|
27596
|
+
name: dto.name,
|
|
27047
27597
|
termCount: dto.term_count,
|
|
27048
27598
|
sessionCount: dto.session_count
|
|
27049
27599
|
};
|
|
@@ -27055,6 +27605,7 @@ function ListTenantsResponseFromApiToFront(dto) {
|
|
|
27055
27605
|
}
|
|
27056
27606
|
function CreateTenantRequestFromFrontToApi(model) {
|
|
27057
27607
|
return {
|
|
27608
|
+
name: model.name,
|
|
27058
27609
|
owner_user_id: model.ownerUserId,
|
|
27059
27610
|
seed_sorts: model.seedSorts,
|
|
27060
27611
|
tenant_id: model.tenantId
|
|
@@ -27064,7 +27615,25 @@ function CreateTenantResponseFromApiToFront(dto) {
|
|
|
27064
27615
|
return {
|
|
27065
27616
|
created: dto.created,
|
|
27066
27617
|
seededSorts: dto.seeded_sorts,
|
|
27067
|
-
tenantId: dto.tenant_id
|
|
27618
|
+
tenantId: dto.tenant_id,
|
|
27619
|
+
name: dto.name
|
|
27620
|
+
};
|
|
27621
|
+
}
|
|
27622
|
+
function DeleteTenantResponseFromApiToFront(dto) {
|
|
27623
|
+
return {
|
|
27624
|
+
...ClearTenantResponseFromApiToFront(dto),
|
|
27625
|
+
deletedAt: dto.deleted_at
|
|
27626
|
+
};
|
|
27627
|
+
}
|
|
27628
|
+
function UpdateTenantNameRequestFromFrontToApi(model) {
|
|
27629
|
+
return {
|
|
27630
|
+
name: model.name
|
|
27631
|
+
};
|
|
27632
|
+
}
|
|
27633
|
+
function UpdateTenantNameResponseFromApiToFront(dto) {
|
|
27634
|
+
return {
|
|
27635
|
+
tenantId: dto.tenant_id,
|
|
27636
|
+
name: dto.name
|
|
27068
27637
|
};
|
|
27069
27638
|
}
|
|
27070
27639
|
|
|
@@ -27215,6 +27784,128 @@ var AdminClient = class {
|
|
|
27215
27784
|
const response = await this.api.createTenant(CreateTenantRequestFromFrontToApi(request));
|
|
27216
27785
|
return CreateTenantResponseFromApiToFront(response.data);
|
|
27217
27786
|
}
|
|
27787
|
+
/**
|
|
27788
|
+
* Delete a tenant (platform-admin).
|
|
27789
|
+
*
|
|
27790
|
+
* @param tenantId - The UUID of the tenant to delete.
|
|
27791
|
+
* @returns The wipe report plus the tombstone outcome.
|
|
27792
|
+
* @throws {ApiError} `404` when no registry row exists for the UUID; `410`
|
|
27793
|
+
* when the tenant was already deleted; `403` without the `platform_admin`
|
|
27794
|
+
* role; `500` when the data reset failed (a partial wipe may have occurred).
|
|
27795
|
+
*
|
|
27796
|
+
* @remarks
|
|
27797
|
+
* **DESTRUCTIVE AND IRREVERSIBLE. There is no un-delete.**
|
|
27798
|
+
*
|
|
27799
|
+
* Clears every trace of the tenant's data (identical to the clear-tenant
|
|
27800
|
+
* wipe), then tombstones its registry row. The tenant stops existing:
|
|
27801
|
+
* every later request naming its UUID is refused with `410`, it disappears
|
|
27802
|
+
* from `listTenants`, and `createTenant` on the same UUID refuses with `409`
|
|
27803
|
+
* rather than resurrecting it. A fresh UUID is the workaround.
|
|
27804
|
+
*
|
|
27805
|
+
* This is not {@link clearTenantData}: a clear wipes the tenant's data but
|
|
27806
|
+
* the tenant continues to exist — its id stays valid, it can be re-populated,
|
|
27807
|
+
* and it is still listed with zeroed counts. A delete retires the id.
|
|
27808
|
+
*
|
|
27809
|
+
* @example
|
|
27810
|
+
* ```typescript
|
|
27811
|
+
* const result = await client.admin.deleteTenant('550e8400-e29b-41d4-a716-446655440000');
|
|
27812
|
+
* console.log(result.message);
|
|
27813
|
+
* console.log(`Deleted at: ${result.deletedAt}`);
|
|
27814
|
+
* ```
|
|
27815
|
+
*/
|
|
27816
|
+
async deleteTenant(tenantId) {
|
|
27817
|
+
const response = await this.api.deleteTenant(tenantId);
|
|
27818
|
+
return DeleteTenantResponseFromApiToFront(response.data);
|
|
27819
|
+
}
|
|
27820
|
+
/**
|
|
27821
|
+
* Delete the authenticated tenant (self-service).
|
|
27822
|
+
*
|
|
27823
|
+
* @returns The wipe report plus the tombstone outcome.
|
|
27824
|
+
* @throws {ApiError} `404` when the caller's tenant was never materialized;
|
|
27825
|
+
* `410` when it was already deleted; `500` when the data reset failed
|
|
27826
|
+
* (a partial wipe may have occurred).
|
|
27827
|
+
*
|
|
27828
|
+
* @remarks
|
|
27829
|
+
* **DESTRUCTIVE AND IRREVERSIBLE. There is no un-delete.**
|
|
27830
|
+
*
|
|
27831
|
+
* The self-service mirror of {@link deleteTenant}: the target tenant is
|
|
27832
|
+
* resolved server-side from the caller's own `X-Tenant-Id` header, never
|
|
27833
|
+
* from a path or body parameter, so it always deletes the authenticated
|
|
27834
|
+
* principal's own tenant. No `platform_admin` role is required. Afterwards
|
|
27835
|
+
* the tenant's UUID is refused with `410` everywhere and cannot be
|
|
27836
|
+
* recreated — the caller must switch to a different tenant id.
|
|
27837
|
+
*
|
|
27838
|
+
* This is not {@link clearMyTenantData}: a clear wipes the caller's data but
|
|
27839
|
+
* the tenant continues to exist. A delete retires the id permanently.
|
|
27840
|
+
*
|
|
27841
|
+
* @example
|
|
27842
|
+
* ```typescript
|
|
27843
|
+
* // Deletes the calling tenant's own identity — no tenant ID is passed.
|
|
27844
|
+
* const result = await client.admin.deleteMyTenant();
|
|
27845
|
+
* console.log(`Tenant retired at: ${result.deletedAt}`);
|
|
27846
|
+
* ```
|
|
27847
|
+
*/
|
|
27848
|
+
async deleteMyTenant() {
|
|
27849
|
+
const response = await this.api.deleteMyTenant();
|
|
27850
|
+
return DeleteTenantResponseFromApiToFront(response.data);
|
|
27851
|
+
}
|
|
27852
|
+
/**
|
|
27853
|
+
* Set, change, or clear a tenant's label (platform-admin).
|
|
27854
|
+
*
|
|
27855
|
+
* @param tenantId - The UUID of the tenant to rename.
|
|
27856
|
+
* @param request - The new label. `name: null` (or an empty request) clears it.
|
|
27857
|
+
* @returns The tenant id and the label now stored.
|
|
27858
|
+
* @throws {ApiError} `404` when no registry row exists for the UUID; `410`
|
|
27859
|
+
* when the tenant is deleted (its label is frozen); `422` when the name is
|
|
27860
|
+
* empty after trim or over 200 characters; `403` without the
|
|
27861
|
+
* `platform_admin` role.
|
|
27862
|
+
*
|
|
27863
|
+
* @remarks
|
|
27864
|
+
* The label is display metadata only: not unique, not a lookup key, never
|
|
27865
|
+
* parsed. The UUID remains the tenant's only identity. The stored label
|
|
27866
|
+
* survives a clear and leaves with a delete.
|
|
27867
|
+
*
|
|
27868
|
+
* @example
|
|
27869
|
+
* ```typescript
|
|
27870
|
+
* const result = await client.admin.renameTenant('550e8400-…', { name: 'Research' });
|
|
27871
|
+
* console.log(result.name); // the stored, trimmed label
|
|
27872
|
+
* ```
|
|
27873
|
+
*/
|
|
27874
|
+
async renameTenant(tenantId, request) {
|
|
27875
|
+
const response = await this.api.renameTenant(
|
|
27876
|
+
tenantId,
|
|
27877
|
+
UpdateTenantNameRequestFromFrontToApi(request)
|
|
27878
|
+
);
|
|
27879
|
+
return UpdateTenantNameResponseFromApiToFront(response.data);
|
|
27880
|
+
}
|
|
27881
|
+
/**
|
|
27882
|
+
* Set, change, or clear the authenticated tenant's label (self-service).
|
|
27883
|
+
*
|
|
27884
|
+
* @param request - The new label. `name: null` (or an empty request) clears it.
|
|
27885
|
+
* @returns The tenant id and the label now stored.
|
|
27886
|
+
* @throws {ApiError} `404` when the caller's tenant was never materialized;
|
|
27887
|
+
* `410` when it is deleted; `422` when the name is empty after trim or
|
|
27888
|
+
* over 200 characters.
|
|
27889
|
+
*
|
|
27890
|
+
* @remarks
|
|
27891
|
+
* The self-service mirror of {@link renameTenant}: the target tenant is
|
|
27892
|
+
* resolved server-side from the caller's own `X-Tenant-Id` header, so it
|
|
27893
|
+
* always renames the authenticated principal's own tenant. No
|
|
27894
|
+
* `platform_admin` role is required.
|
|
27895
|
+
*
|
|
27896
|
+
* @example
|
|
27897
|
+
* ```typescript
|
|
27898
|
+
* // Renames the calling tenant — no tenant ID is passed.
|
|
27899
|
+
* const result = await client.admin.renameMyTenant({ name: 'My workspace' });
|
|
27900
|
+
* console.log(result.name);
|
|
27901
|
+
* ```
|
|
27902
|
+
*/
|
|
27903
|
+
async renameMyTenant(request) {
|
|
27904
|
+
const response = await this.api.renameMyTenant(
|
|
27905
|
+
UpdateTenantNameRequestFromFrontToApi(request)
|
|
27906
|
+
);
|
|
27907
|
+
return UpdateTenantNameResponseFromApiToFront(response.data);
|
|
27908
|
+
}
|
|
27218
27909
|
};
|
|
27219
27910
|
|
|
27220
27911
|
// src/normalizers/image-extraction.ts
|
|
@@ -28630,6 +29321,10 @@ function OsfqlValueFromApiToFront(value) {
|
|
|
28630
29321
|
switch (value["type"]) {
|
|
28631
29322
|
case "null":
|
|
28632
29323
|
return { type: "null" };
|
|
29324
|
+
// The record does not carry the feature. No payload, and no `undefined`
|
|
29325
|
+
// either: dropping the key would hide the absence the answer is about.
|
|
29326
|
+
case "unbound":
|
|
29327
|
+
return { type: "unbound" };
|
|
28633
29328
|
case "integer":
|
|
28634
29329
|
return typeof payload === "number" ? { type: "integer", value: payload } : void 0;
|
|
28635
29330
|
case "float":
|
|
@@ -28757,6 +29452,36 @@ function OsfqlDiagnoseResponseFromApiToFront(dto) {
|
|
|
28757
29452
|
diagnostics: dto.diagnostics.map(OsfqlDiagnosticFromApiToFront)
|
|
28758
29453
|
};
|
|
28759
29454
|
}
|
|
29455
|
+
function OsfqlCatalogEntryFromApiToFront(dto) {
|
|
29456
|
+
return {
|
|
29457
|
+
id: dto.id,
|
|
29458
|
+
statement: dto.statement,
|
|
29459
|
+
family: dto.family,
|
|
29460
|
+
category: dto.category,
|
|
29461
|
+
subOps: dto.sub_ops,
|
|
29462
|
+
brief: dto.brief,
|
|
29463
|
+
full: dto.full,
|
|
29464
|
+
syntax: dto.syntax,
|
|
29465
|
+
examples: dto.examples,
|
|
29466
|
+
risk: dto.risk,
|
|
29467
|
+
execution: OsfqlCatalogExecutionFromApiToFront(dto.execution),
|
|
29468
|
+
uiAffinity: {
|
|
29469
|
+
display: dto.ui_affinity.display ?? void 0,
|
|
29470
|
+
action: dto.ui_affinity.action ?? void 0
|
|
29471
|
+
},
|
|
29472
|
+
returns: dto.returns,
|
|
29473
|
+
// Absent means "needs nothing", which is false for nearly every statement —
|
|
29474
|
+
// so an absent array is a wire-shape surprise, not a default. `?? []` keeps
|
|
29475
|
+
// the shipped type total; the engine sends the field for all entries.
|
|
29476
|
+
needs: dto.needs ?? [],
|
|
29477
|
+
pitfalls: dto.pitfalls ?? []
|
|
29478
|
+
};
|
|
29479
|
+
}
|
|
29480
|
+
function OsfqlCatalogExecutionFromApiToFront(dto) {
|
|
29481
|
+
if (dto === "Executes") return { status: "executes" };
|
|
29482
|
+
if (dto === "PlanOnly") return { status: "planOnly" };
|
|
29483
|
+
return { status: "partial", note: dto.Partial };
|
|
29484
|
+
}
|
|
28760
29485
|
|
|
28761
29486
|
// src/resources/osfql.ts
|
|
28762
29487
|
var OsfqlClient = class {
|
|
@@ -28869,24 +29594,34 @@ var OsfqlClient = class {
|
|
|
28869
29594
|
return OsfqlDiagnoseResponseFromApiToFront(response.data);
|
|
28870
29595
|
}
|
|
28871
29596
|
/**
|
|
28872
|
-
* Fetch the OSFQL statement catalog
|
|
29597
|
+
* Fetch the OSFQL statement catalog — the engine's own description of every
|
|
29598
|
+
* statement it implements.
|
|
28873
29599
|
*
|
|
28874
|
-
* @param category - Optional
|
|
28875
|
-
*
|
|
29600
|
+
* @param category - Optional filter: `read`, `write`, `control`, or `meta`
|
|
29601
|
+
* (case-insensitive). Omit for the whole catalog; an unrecognised value
|
|
29602
|
+
* yields an empty list rather than an error.
|
|
29603
|
+
* @returns One {@link OsfqlCatalogEntry} per statement.
|
|
28876
29604
|
* @throws {ApiError} If the request fails.
|
|
28877
29605
|
*
|
|
28878
29606
|
* @remarks
|
|
28879
|
-
*
|
|
28880
|
-
*
|
|
28881
|
-
*
|
|
28882
|
-
*
|
|
28883
|
-
*
|
|
29607
|
+
* The backend publishes a response schema for this endpoint, so the payload
|
|
29608
|
+
* is normalized like any other. It previously returned `unknown` because the
|
|
29609
|
+
* spec carried none — and because the endpoint answered HTTP 500 to every
|
|
29610
|
+
* request until `kortexya/reasoninglayer#176` repaired its response DTO, so
|
|
29611
|
+
* no caller had ever received a body to type.
|
|
29612
|
+
*
|
|
29613
|
+
* ⚠️ The enum VALUES mix casing deliberately and are preserved verbatim:
|
|
29614
|
+
* `risk` is snake_case (`additive_write`), while `family`, `category`,
|
|
29615
|
+
* `returns` and both halves of `uiAffinity` are PascalCase (`Query`, `Read`,
|
|
29616
|
+
* `Bindings`, `Table`). Only keys are camelCased.
|
|
28884
29617
|
*
|
|
28885
29618
|
* @example
|
|
28886
29619
|
* ```typescript
|
|
28887
|
-
* const catalog
|
|
28888
|
-
*
|
|
28889
|
-
*
|
|
29620
|
+
* const catalog = await client.osfql.catalog('write');
|
|
29621
|
+
* for (const entry of catalog) {
|
|
29622
|
+
* if (entry.execution.status === 'partial') {
|
|
29623
|
+
* console.warn(`${entry.id} is partial: ${entry.execution.note}`);
|
|
29624
|
+
* }
|
|
28890
29625
|
* }
|
|
28891
29626
|
* ```
|
|
28892
29627
|
*/
|
|
@@ -28898,7 +29633,7 @@ var OsfqlClient = class {
|
|
|
28898
29633
|
secure: true,
|
|
28899
29634
|
format: "json"
|
|
28900
29635
|
});
|
|
28901
|
-
return response.data;
|
|
29636
|
+
return response.data.map(OsfqlCatalogEntryFromApiToFront);
|
|
28902
29637
|
}
|
|
28903
29638
|
};
|
|
28904
29639
|
|
|
@@ -28941,7 +29676,28 @@ function SourceExcerptDtoFromApiToFront(dto) {
|
|
|
28941
29676
|
sourceDocument: wire.source_document ?? void 0
|
|
28942
29677
|
};
|
|
28943
29678
|
}
|
|
29679
|
+
function SchemaExcerptDtoFromApiToFront(dto) {
|
|
29680
|
+
return {
|
|
29681
|
+
sortName: dto.sort_name,
|
|
29682
|
+
featureNames: dto.feature_names
|
|
29683
|
+
};
|
|
29684
|
+
}
|
|
29685
|
+
function CitationCheckDtoFromApiToFront(dto) {
|
|
29686
|
+
return {
|
|
29687
|
+
marker: dto.marker,
|
|
29688
|
+
variable: dto.variable ?? void 0,
|
|
29689
|
+
assertedValue: dto.asserted_value ?? void 0,
|
|
29690
|
+
verdict: dto.verdict,
|
|
29691
|
+
repair: dto.repair ?? void 0,
|
|
29692
|
+
repairVariables: dto.repair_variables,
|
|
29693
|
+
observedValues: dto.observed_values,
|
|
29694
|
+
observedTotal: dto.observed_total,
|
|
29695
|
+
scope: dto.scope,
|
|
29696
|
+
scopeLabel: dto.scope_label ?? void 0
|
|
29697
|
+
};
|
|
29698
|
+
}
|
|
28944
29699
|
function ClaimAnnotationDtoFromApiToFront(dto) {
|
|
29700
|
+
const wire = dto;
|
|
28945
29701
|
return {
|
|
28946
29702
|
text: dto.text,
|
|
28947
29703
|
span: dto.span,
|
|
@@ -28949,8 +29705,10 @@ function ClaimAnnotationDtoFromApiToFront(dto) {
|
|
|
28949
29705
|
confidence: dto.confidence,
|
|
28950
29706
|
sourceTermIds: dto.source_term_ids,
|
|
28951
29707
|
sourceExcerpts: dto.source_excerpts?.map(SourceExcerptDtoFromApiToFront),
|
|
29708
|
+
schemaExcerpts: dto.schema_excerpts?.map(SchemaExcerptDtoFromApiToFront),
|
|
28952
29709
|
osfqlQuery: dto.osfql_query ?? void 0,
|
|
28953
|
-
derivationSummary: dto.derivation_summary ? DerivationSummaryDtoFromApiToFront(dto.derivation_summary) : void 0
|
|
29710
|
+
derivationSummary: dto.derivation_summary ? DerivationSummaryDtoFromApiToFront(dto.derivation_summary) : void 0,
|
|
29711
|
+
citationChecks: wire.citation_checks?.map(CitationCheckDtoFromApiToFront)
|
|
28954
29712
|
};
|
|
28955
29713
|
}
|
|
28956
29714
|
function ProofTraceNodeDtoFromApiToFront(dto) {
|