@kortexya/reasoninglayer 6.1.0 → 6.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +168 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +305 -3
- package/dist/index.d.ts +305 -3
- package/dist/index.js +168 -2
- 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 = "6.
|
|
8
|
+
var SDK_VERSION = "6.2.0";
|
|
9
9
|
function resolveConfig(config) {
|
|
10
10
|
if (!config.baseUrl) {
|
|
11
11
|
throw new Error("ClientConfig.baseUrl is required");
|
|
@@ -9781,6 +9781,22 @@ var Analysis = class {
|
|
|
9781
9781
|
format: "json",
|
|
9782
9782
|
...params
|
|
9783
9783
|
});
|
|
9784
|
+
/**
|
|
9785
|
+
* @description Computes the concepts of the population's schema-presence context under the declared bounds and, when asked, its observed implication basis; the export carries the incidence, the bounds and each result's completeness so an importer can replay all of it.
|
|
9786
|
+
*
|
|
9787
|
+
* @tags analysis
|
|
9788
|
+
* @name ExportFca
|
|
9789
|
+
* @summary Export the FCA of an explicit population.
|
|
9790
|
+
* @request POST:/api/v1/analysis/fca-exports
|
|
9791
|
+
*/
|
|
9792
|
+
exportFca = (data, params = {}) => this.http.request({
|
|
9793
|
+
path: `/api/v1/analysis/fca-exports`,
|
|
9794
|
+
method: "POST",
|
|
9795
|
+
body: data,
|
|
9796
|
+
type: "application/json",
|
|
9797
|
+
format: "json",
|
|
9798
|
+
...params
|
|
9799
|
+
});
|
|
9784
9800
|
/**
|
|
9785
9801
|
* No description
|
|
9786
9802
|
*
|
|
@@ -10030,6 +10046,22 @@ var Analysis = class {
|
|
|
10030
10046
|
format: "json",
|
|
10031
10047
|
...params
|
|
10032
10048
|
});
|
|
10049
|
+
/**
|
|
10050
|
+
* @description Replays the export natively: decodes its context, recomputes a graded incidence from its degrees and cut, recomputes its concepts and basis under its declared bounds, and requires each claim, completeness included, to equal its recomputation; every object must name a source term of the caller's tenant. A refusal accepts nothing and names its reason.
|
|
10051
|
+
*
|
|
10052
|
+
* @tags analysis
|
|
10053
|
+
* @name VerifyFcaExport
|
|
10054
|
+
* @summary Verify an FCA export for import into the caller's tenant.
|
|
10055
|
+
* @request POST:/api/v1/analysis/fca-exports/verify
|
|
10056
|
+
*/
|
|
10057
|
+
verifyFcaExport = (data, params = {}) => this.http.request({
|
|
10058
|
+
path: `/api/v1/analysis/fca-exports/verify`,
|
|
10059
|
+
method: "POST",
|
|
10060
|
+
body: data,
|
|
10061
|
+
type: "application/json",
|
|
10062
|
+
format: "json",
|
|
10063
|
+
...params
|
|
10064
|
+
});
|
|
10033
10065
|
};
|
|
10034
10066
|
|
|
10035
10067
|
// src/api-spec/generated/Functions.ts
|
|
@@ -20705,6 +20737,7 @@ var RESPONSE_COMPONENTS = {
|
|
|
20705
20737
|
document_id: [1, 0],
|
|
20706
20738
|
entities_extracted: [1, 0],
|
|
20707
20739
|
entities_refused: [1, { array: "RefusedEntityDto" }],
|
|
20740
|
+
fca_discovery: [2, "FcaIngestionReportDto"],
|
|
20708
20741
|
processing_time_ms: [1, 0],
|
|
20709
20742
|
relations_extracted: [1, 0],
|
|
20710
20743
|
relations_integrated: [1, 0],
|
|
@@ -21295,6 +21328,50 @@ var RESPONSE_COMPONENTS = {
|
|
|
21295
21328
|
}
|
|
21296
21329
|
},
|
|
21297
21330
|
FailedReviewDto: { object: { reason: [1, 0], review_id: [1, 0] } },
|
|
21331
|
+
FcaBasisClaimDto: {
|
|
21332
|
+
object: {
|
|
21333
|
+
complete: [1, 0],
|
|
21334
|
+
implications: [1, { array: "FcaImplicationRecordDto" }],
|
|
21335
|
+
max_candidates: [1, 0],
|
|
21336
|
+
max_work: [1, 0]
|
|
21337
|
+
}
|
|
21338
|
+
},
|
|
21339
|
+
FcaConceptClaimDto: {
|
|
21340
|
+
object: {
|
|
21341
|
+
complete: [1, 0],
|
|
21342
|
+
concepts: [1, { array: "FcaConceptRecordDto" }],
|
|
21343
|
+
max_concepts: [1, 0],
|
|
21344
|
+
max_visited_concepts: [1, 0],
|
|
21345
|
+
max_work: [1, 0],
|
|
21346
|
+
min_extent_size: [1, 0],
|
|
21347
|
+
min_intent_size: [1, 0]
|
|
21348
|
+
}
|
|
21349
|
+
},
|
|
21350
|
+
FcaConceptRecordDto: { object: { extent: [1, { array: 0 }], intent: [1, { array: 0 }] } },
|
|
21351
|
+
FcaContextDto: {
|
|
21352
|
+
object: {
|
|
21353
|
+
attributes: [1, { array: 0 }],
|
|
21354
|
+
incidence: [1, { array: { array: 0 } }],
|
|
21355
|
+
objects: [1, { array: 0 }],
|
|
21356
|
+
version: [1, 0]
|
|
21357
|
+
}
|
|
21358
|
+
},
|
|
21359
|
+
FcaExportDto: {
|
|
21360
|
+
object: {
|
|
21361
|
+
basis: [2, "FcaBasisClaimDto"],
|
|
21362
|
+
concepts: [1, "FcaConceptClaimDto"],
|
|
21363
|
+
context: [1, "FcaContextDto"],
|
|
21364
|
+
graded: [2, "FcaGradedIncidenceDto"],
|
|
21365
|
+
version: [1, 0]
|
|
21366
|
+
}
|
|
21367
|
+
},
|
|
21368
|
+
FcaGradedDegreeDto: { object: { attribute: [1, 0], degree: [1, 0] } },
|
|
21369
|
+
FcaGradedIncidenceDto: {
|
|
21370
|
+
object: { alpha: [1, 0], degrees: [1, { array: { array: "FcaGradedDegreeDto" } }] }
|
|
21371
|
+
},
|
|
21372
|
+
FcaImplicationRecordDto: {
|
|
21373
|
+
object: { conclusion: [1, { array: 0 }], premise: [1, { array: 0 }] }
|
|
21374
|
+
},
|
|
21298
21375
|
FcaIngestionRecommendationDto: {
|
|
21299
21376
|
object: {
|
|
21300
21377
|
confidence: [1, 0],
|
|
@@ -26310,6 +26387,9 @@ var RESPONSE_COMPONENTS = {
|
|
|
26310
26387
|
}
|
|
26311
26388
|
},
|
|
26312
26389
|
VerificationStepDto: { object: { description: [1, 0], name: [1, 0], passed: [1, 0] } },
|
|
26390
|
+
VerifiedFcaImportDto: {
|
|
26391
|
+
object: { concepts: [1, 0], concepts_complete: [1, 0], sources: [1, { array: 0 }] }
|
|
26392
|
+
},
|
|
26313
26393
|
VerifyClaimResponse: {
|
|
26314
26394
|
object: {
|
|
26315
26395
|
contradicting_count: [1, 0],
|
|
@@ -27860,6 +27940,11 @@ var RESPONSE_OPERATIONS = {
|
|
|
27860
27940
|
path: "/api/v1/dsr/{id}/export",
|
|
27861
27941
|
responses: { 200: "DsrExportResponse" }
|
|
27862
27942
|
},
|
|
27943
|
+
exportFca: {
|
|
27944
|
+
method: "POST",
|
|
27945
|
+
path: "/api/v1/analysis/fca-exports",
|
|
27946
|
+
responses: { 200: "FcaExportDto" }
|
|
27947
|
+
},
|
|
27863
27948
|
exportJsonl: {
|
|
27864
27949
|
method: "POST",
|
|
27865
27950
|
path: "/api/v1/synthetic/export-jsonl",
|
|
@@ -30633,6 +30718,11 @@ var RESPONSE_OPERATIONS = {
|
|
|
30633
30718
|
path: "/api/v1/synthetic/verify-faithfulness",
|
|
30634
30719
|
responses: { 200: "VerifyFaithfulnessResponse" }
|
|
30635
30720
|
},
|
|
30721
|
+
verifyFcaExport: {
|
|
30722
|
+
method: "POST",
|
|
30723
|
+
path: "/api/v1/analysis/fca-exports/verify",
|
|
30724
|
+
responses: { 200: "VerifiedFcaImportDto" }
|
|
30725
|
+
},
|
|
30636
30726
|
verifyIntegrity: {
|
|
30637
30727
|
method: "POST",
|
|
30638
30728
|
path: "/api/v1/audit/verify-integrity",
|
|
@@ -41353,7 +41443,8 @@ function DocumentStatsDtoFromApiToFront(dto) {
|
|
|
41353
41443
|
relationsIntegrated: dto.relations_integrated,
|
|
41354
41444
|
sortNames: dto.sort_names,
|
|
41355
41445
|
termIds: dto.term_ids,
|
|
41356
|
-
totalTokens: dto.total_tokens
|
|
41446
|
+
totalTokens: dto.total_tokens,
|
|
41447
|
+
fcaDiscovery: dto.fca_discovery ? FcaIngestionReportFromApiToFront(dto.fca_discovery) : void 0
|
|
41357
41448
|
};
|
|
41358
41449
|
}
|
|
41359
41450
|
function SessionStatsResponseFromApiToFront(dto) {
|
|
@@ -49780,6 +49871,28 @@ function SortLicenceResponseFromApiToFront(dto) {
|
|
|
49780
49871
|
installedRules: dto.installed_rules
|
|
49781
49872
|
};
|
|
49782
49873
|
}
|
|
49874
|
+
function FcaExportRequestFromFrontToApi(model) {
|
|
49875
|
+
return {
|
|
49876
|
+
term_ids: model.termIds,
|
|
49877
|
+
max_concepts: model.maxConcepts,
|
|
49878
|
+
min_extent_size: model.minExtentSize,
|
|
49879
|
+
min_intent_size: model.minIntentSize,
|
|
49880
|
+
max_work: model.maxWork,
|
|
49881
|
+
max_visited_concepts: model.maxVisitedConcepts,
|
|
49882
|
+
include_basis: model.includeBasis,
|
|
49883
|
+
basis_max_work: model.basisMaxWork,
|
|
49884
|
+
basis_max_candidates: model.basisMaxCandidates
|
|
49885
|
+
};
|
|
49886
|
+
}
|
|
49887
|
+
function VerifiedFcaImportFromApiToFront(dto) {
|
|
49888
|
+
return {
|
|
49889
|
+
sources: dto.sources,
|
|
49890
|
+
concepts: dto.concepts,
|
|
49891
|
+
conceptsComplete: dto.concepts_complete,
|
|
49892
|
+
implications: dto.implications ?? null,
|
|
49893
|
+
basisComplete: dto.basis_complete ?? null
|
|
49894
|
+
};
|
|
49895
|
+
}
|
|
49783
49896
|
function ConfluenceConflictDtoFromApiToFront(dto) {
|
|
49784
49897
|
return {
|
|
49785
49898
|
kind: dto.kind,
|
|
@@ -50095,6 +50208,59 @@ var AnalysisClient = class {
|
|
|
50095
50208
|
);
|
|
50096
50209
|
return decodeResponse(response, SortLicenceResponseFromApiToFront);
|
|
50097
50210
|
}
|
|
50211
|
+
/**
|
|
50212
|
+
* Export the native FCA of an explicit population.
|
|
50213
|
+
*
|
|
50214
|
+
* @param request - The population and the enumeration (and basis) bounds.
|
|
50215
|
+
* @param requestOptions - Per-call request options.
|
|
50216
|
+
* @returns The replayable export, in its wire form.
|
|
50217
|
+
* @throws {BadRequestError} 400 for an invalid population or budgets beyond
|
|
50218
|
+
* the supported limits.
|
|
50219
|
+
*
|
|
50220
|
+
* @remarks
|
|
50221
|
+
* The engine computes the concepts of the population's schema-presence
|
|
50222
|
+
* context under the declared bounds and, when asked, its observed
|
|
50223
|
+
* implication basis; the export carries the incidence, the bounds and each
|
|
50224
|
+
* result's completeness so an importer can replay all of it with
|
|
50225
|
+
* {@link verifyFcaExport}.
|
|
50226
|
+
*
|
|
50227
|
+
* @example
|
|
50228
|
+
* ```typescript
|
|
50229
|
+
* const exported = await client.analysis.exportFca({ termIds, includeBasis: true });
|
|
50230
|
+
* const verified = await client.analysis.verifyFcaExport(exported);
|
|
50231
|
+
* console.log(verified.concepts, verified.conceptsComplete);
|
|
50232
|
+
* ```
|
|
50233
|
+
*/
|
|
50234
|
+
async exportFca(request, requestOptions) {
|
|
50235
|
+
const response = await this.api.exportFca(
|
|
50236
|
+
FcaExportRequestFromFrontToApi(request),
|
|
50237
|
+
toRequestParams(requestOptions)
|
|
50238
|
+
);
|
|
50239
|
+
return decodeResponse(response, (dto) => dto);
|
|
50240
|
+
}
|
|
50241
|
+
/**
|
|
50242
|
+
* Verify an FCA export for import into the caller's tenant.
|
|
50243
|
+
*
|
|
50244
|
+
* @param fcaExport - The export, exactly as {@link exportFca} returned it.
|
|
50245
|
+
* @param requestOptions - Per-call request options.
|
|
50246
|
+
* @returns What native replay reproduced.
|
|
50247
|
+
* @throws {BadRequestError} 400 when the declared bounds or universe exceed
|
|
50248
|
+
* the supported limits.
|
|
50249
|
+
* @throws {ApiError} 422 (`status` 422, `errorCode` `fca_export_refused`) when
|
|
50250
|
+
* a claim, the incidence or the scope does not survive native replay;
|
|
50251
|
+
* nothing is accepted.
|
|
50252
|
+
*
|
|
50253
|
+
* @remarks
|
|
50254
|
+
* The engine decodes the export's context, recomputes a graded incidence
|
|
50255
|
+
* from its degrees and cut, recomputes its concepts and basis under its
|
|
50256
|
+
* declared bounds, and requires each claim, completeness included, to equal
|
|
50257
|
+
* its recomputation; every object must name a source term of the caller's
|
|
50258
|
+
* tenant.
|
|
50259
|
+
*/
|
|
50260
|
+
async verifyFcaExport(fcaExport, requestOptions) {
|
|
50261
|
+
const response = await this.api.verifyFcaExport(fcaExport, toRequestParams(requestOptions));
|
|
50262
|
+
return decodeResponse(response, VerifiedFcaImportFromApiToFront);
|
|
50263
|
+
}
|
|
50098
50264
|
/**
|
|
50099
50265
|
* Invite a gateway human user to an exploration session.
|
|
50100
50266
|
*
|