@kortexya/reasoninglayer 4.1.0 → 4.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/README.md +1 -1
- package/dist/index.cjs +133 -26
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +441 -78
- package/dist/index.d.ts +441 -78
- package/dist/index.js +133 -26
- 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 = "4.
|
|
8
|
+
var SDK_VERSION = "4.2.0";
|
|
9
9
|
function resolveConfig(config) {
|
|
10
10
|
if (!config.baseUrl) {
|
|
11
11
|
throw new Error("ClientConfig.baseUrl is required");
|
|
@@ -11005,7 +11005,7 @@ var Ui = class {
|
|
|
11005
11005
|
...params
|
|
11006
11006
|
});
|
|
11007
11007
|
/**
|
|
11008
|
-
* @description Events: - `layout_ready` — LayoutSurface JSON - `component_ready` — {slot_id, descriptor} JSON - `data_chunk` — {slot_id, data} JSON (if data was loaded) - `complete` — {} POST /api/v1/ui/describe/stream
|
|
11008
|
+
* @description Events: - `layout_ready` — LayoutSurface JSON - `component_ready` — {slot_id, descriptor} JSON - `data_chunk` — {slot_id, data} JSON (if data was loaded) - `data_load_error` — {slot_id, error} JSON (if the data load failed; the error carries the typed `code`, `message` and `query`, #475) - `complete` — {} POST /api/v1/ui/describe/stream
|
|
11009
11009
|
*
|
|
11010
11010
|
* @tags ui
|
|
11011
11011
|
* @name DescribeUiStream
|
|
@@ -17784,6 +17784,7 @@ var RESPONSE_COMPONENTS = {
|
|
|
17784
17784
|
injection: [2, "InjectionSummaryDto"],
|
|
17785
17785
|
intent: [1, 0],
|
|
17786
17786
|
matched_templates: [2, { array: "QueryTemplateDto" }],
|
|
17787
|
+
notices: [1, { array: 0 }],
|
|
17787
17788
|
produced_term_ids: [1, { array: 0 }],
|
|
17788
17789
|
prompt_trace: [2, "PromptTraceDto"],
|
|
17789
17790
|
proof_trace: [2, "ProofTraceNodeDto"],
|
|
@@ -17967,6 +17968,7 @@ var RESPONSE_COMPONENTS = {
|
|
|
17967
17968
|
explanation: [1, 0]
|
|
17968
17969
|
}
|
|
17969
17970
|
},
|
|
17971
|
+
DataLoadErrorDto: { object: { code: [1, 0], message: [1, 0], query: [1, 0] } },
|
|
17970
17972
|
DataMixingStatsDto: {
|
|
17971
17973
|
object: {
|
|
17972
17974
|
negative_count: [1, 0],
|
|
@@ -18436,6 +18438,7 @@ var RESPONSE_COMPONENTS = {
|
|
|
18436
18438
|
chunks_processed: [1, 0],
|
|
18437
18439
|
document_id: [1, 0],
|
|
18438
18440
|
entities_extracted: [1, 0],
|
|
18441
|
+
entities_refused: [1, { array: "RefusedEntityDto" }],
|
|
18439
18442
|
processing_time_ms: [1, 0],
|
|
18440
18443
|
relations_extracted: [1, 0],
|
|
18441
18444
|
relations_integrated: [1, 0],
|
|
@@ -21267,9 +21270,11 @@ var RESPONSE_COMPONENTS = {
|
|
|
21267
21270
|
}
|
|
21268
21271
|
},
|
|
21269
21272
|
PromptTraceDto: { object: { llm_context: [1, "LlmContextTraceDto"], system_prompt: [1, 0] } },
|
|
21273
|
+
ProofConclusionDto: { object: { features: [1, { object: {} }], sort_id: [1, 0] } },
|
|
21270
21274
|
ProofDto: {
|
|
21271
21275
|
object: {
|
|
21272
21276
|
certainty: [1, 0],
|
|
21277
|
+
conclusion: [0, "ProofConclusionDto"],
|
|
21273
21278
|
kind: [1, 0],
|
|
21274
21279
|
subproofs: [0, { array: "ProofDto" }],
|
|
21275
21280
|
substitution: [1, "HomoiconicSubstitutionDto"]
|
|
@@ -22338,6 +22343,7 @@ var RESPONSE_COMPONENTS = {
|
|
|
22338
22343
|
SolutionDto: {
|
|
22339
22344
|
object: {
|
|
22340
22345
|
certainty: [1, 0],
|
|
22346
|
+
conclusion: [2, "ProofConclusionDto"],
|
|
22341
22347
|
matched_sorts: [0, { array: 0 }],
|
|
22342
22348
|
proof: [2, "ProofDto"],
|
|
22343
22349
|
residuated_sorts: [0, { array: 0 }],
|
|
@@ -23060,6 +23066,7 @@ var RESPONSE_COMPONENTS = {
|
|
|
23060
23066
|
UIAssemblyStatsDto: {
|
|
23061
23067
|
object: {
|
|
23062
23068
|
component_count: [1, 0],
|
|
23069
|
+
data_load_error: [2, "DataLoadErrorDto"],
|
|
23063
23070
|
included_features: [1, 0],
|
|
23064
23071
|
sort_name: [1, 0],
|
|
23065
23072
|
total_features: [1, 0],
|
|
@@ -23098,6 +23105,7 @@ var RESPONSE_COMPONENTS = {
|
|
|
23098
23105
|
UIGenerateResponse: {
|
|
23099
23106
|
object: {
|
|
23100
23107
|
data: [2, "DataPayloadDto"],
|
|
23108
|
+
data_load_errors: [0, { array: "DataLoadErrorDto" }],
|
|
23101
23109
|
data_sources: [0, { array: "DataSourcePayloadDto" }],
|
|
23102
23110
|
descriptor: [2, "UIDescriptorDto"],
|
|
23103
23111
|
diagnostics: [0, { array: 0 }],
|
|
@@ -24786,6 +24794,11 @@ var RESPONSE_OPERATIONS = {
|
|
|
24786
24794
|
path: "/api/v1/constraint-sessions/{session_id}",
|
|
24787
24795
|
responses: { 200: "ConstraintSessionStatusResponse" }
|
|
24788
24796
|
},
|
|
24797
|
+
getConversation: {
|
|
24798
|
+
method: "GET",
|
|
24799
|
+
path: "/api/v1/conversation/{id}",
|
|
24800
|
+
responses: { 200: "ConversationSummaryDto" }
|
|
24801
|
+
},
|
|
24789
24802
|
getConversationEntries: {
|
|
24790
24803
|
method: "GET",
|
|
24791
24804
|
path: "/api/v1/audit/entries/{conversation_id}",
|
|
@@ -29294,6 +29307,14 @@ function HomoiconicSubstitutionDtoFromApiToFront(dto) {
|
|
|
29294
29307
|
bindings: dto.bindings.map(BindingDtoFromApiToFront)
|
|
29295
29308
|
};
|
|
29296
29309
|
}
|
|
29310
|
+
function ProofConclusionDtoFromApiToFront(dto) {
|
|
29311
|
+
return {
|
|
29312
|
+
features: featuresFromApiToFront(dto.features),
|
|
29313
|
+
sortId: dto.sort_id,
|
|
29314
|
+
sortName: dto.sort_name ?? void 0,
|
|
29315
|
+
termId: dto.term_id ?? void 0
|
|
29316
|
+
};
|
|
29317
|
+
}
|
|
29297
29318
|
function ProofDtoFromApiToFront(dto) {
|
|
29298
29319
|
return {
|
|
29299
29320
|
kind: dto.kind,
|
|
@@ -29301,6 +29322,7 @@ function ProofDtoFromApiToFront(dto) {
|
|
|
29301
29322
|
ruleTermId: dto.rule_term_id,
|
|
29302
29323
|
ruleHeadTermId: dto.rule_head_term_id,
|
|
29303
29324
|
goalDisplay: dto.goal_display,
|
|
29325
|
+
conclusion: dto.conclusion ? ProofConclusionDtoFromApiToFront(dto.conclusion) : void 0,
|
|
29304
29326
|
ruleLabel: dto.rule_label,
|
|
29305
29327
|
substitution: HomoiconicSubstitutionDtoFromApiToFront(dto.substitution),
|
|
29306
29328
|
subproofs: dto.subproofs?.map(ProofDtoFromApiToFront),
|
|
@@ -29354,6 +29376,7 @@ function SolutionDtoFromApiToFront(dto) {
|
|
|
29354
29376
|
const solution = {
|
|
29355
29377
|
substitution: HomoiconicSubstitutionDtoFromApiToFront(dto.substitution),
|
|
29356
29378
|
proof: dto.proof ? ProofDtoFromApiToFront(dto.proof) : void 0,
|
|
29379
|
+
conclusion: dto.conclusion ? ProofConclusionDtoFromApiToFront(dto.conclusion) : void 0,
|
|
29357
29380
|
certainty: dto.certainty,
|
|
29358
29381
|
evidenceMatched: dto.evidence_matched ?? void 0,
|
|
29359
29382
|
evidenceRatio: dto.evidence_ratio ?? void 0,
|
|
@@ -30054,6 +30077,8 @@ var InferenceClient = class {
|
|
|
30054
30077
|
* engine-side head aggregator (see {@link RuleAggregatorDto}).
|
|
30055
30078
|
* @returns The created rule wrapped in an AddRuleResponse, with its
|
|
30056
30079
|
* {@link AddRuleResponse.etag} when the engine sends the `ETag` header.
|
|
30080
|
+
* @throws {@link ValidationError} before the request is sent, when `antecedents` is
|
|
30081
|
+
* not an array (a request built from untyped data) — `field` is `antecedents`.
|
|
30057
30082
|
* @throws {ApiError} If the rule is rejected or the request fails — 422 when
|
|
30058
30083
|
* it is unusable as written: a head or body antecedent naming a sort or
|
|
30059
30084
|
* term that does not exist (the message names it and its position — `the
|
|
@@ -30063,9 +30088,8 @@ var InferenceClient = class {
|
|
|
30063
30088
|
* cycle the program already had is not blamed on it), or a rule with no
|
|
30064
30089
|
* antecedents (`rule rejected: a rule needs at least one antecedent; a
|
|
30065
30090
|
* term with no antecedents is a fact — write it through POST
|
|
30066
|
-
* /api/v1/terms` — write a fact with `client.terms.createTerm`).
|
|
30067
|
-
*
|
|
30068
|
-
* plain-text 422. The refusal is a
|
|
30091
|
+
* /api/v1/terms` — write a fact with `client.terms.createTerm`). The
|
|
30092
|
+
* refusal is a
|
|
30069
30093
|
* plain {@link ApiError} with `status` 422 — not a `BadRequestError`
|
|
30070
30094
|
* (earlier engines answered an unknown head sort with 400), and not a
|
|
30071
30095
|
* `NamedConstraintViolationError`, which is reserved for a feature
|
|
@@ -30095,7 +30119,7 @@ var InferenceClient = class {
|
|
|
30095
30119
|
async addRule(request, requestOptions) {
|
|
30096
30120
|
const wireRequest = {
|
|
30097
30121
|
term: convertTermArg(request.term),
|
|
30098
|
-
antecedents: request.antecedents
|
|
30122
|
+
antecedents: convertAntecedents(request.antecedents, "antecedents"),
|
|
30099
30123
|
certainty: request.certainty,
|
|
30100
30124
|
aggregator: request.aggregator
|
|
30101
30125
|
};
|
|
@@ -30112,6 +30136,8 @@ var InferenceClient = class {
|
|
|
30112
30136
|
* @returns Whether the write would accept it (`ok`), every refusal with the
|
|
30113
30137
|
* status the write would answer, the NAF-safety warnings, and the rule as
|
|
30114
30138
|
* the write would build it.
|
|
30139
|
+
* @throws {@link ValidationError} before the request is sent, when `antecedents` is
|
|
30140
|
+
* not an array (a request built from untyped data) — `field` is `antecedents`.
|
|
30115
30141
|
* @throws {ApiError} If the request itself fails.
|
|
30116
30142
|
*
|
|
30117
30143
|
* @remarks
|
|
@@ -30136,7 +30162,7 @@ var InferenceClient = class {
|
|
|
30136
30162
|
async validateRule(request, requestOptions) {
|
|
30137
30163
|
const wireRequest = {
|
|
30138
30164
|
term: convertTermArg(request.term),
|
|
30139
|
-
antecedents: request.antecedents
|
|
30165
|
+
antecedents: convertAntecedents(request.antecedents, "antecedents"),
|
|
30140
30166
|
certainty: request.certainty,
|
|
30141
30167
|
aggregator: request.aggregator
|
|
30142
30168
|
};
|
|
@@ -30181,10 +30207,11 @@ var InferenceClient = class {
|
|
|
30181
30207
|
* @param requestOptions - Per-call request options.
|
|
30182
30208
|
* @returns What was written, and what was refused: `ruleTermIds` and
|
|
30183
30209
|
* `rulesAdded` for the accepted rules, `rejected` naming each refused one.
|
|
30184
|
-
* @throws {@link ApiError} 422 when the body is malformed
|
|
30185
|
-
*
|
|
30210
|
+
* @throws {@link ApiError} 422 when the body is malformed — a 422 never
|
|
30211
|
+
* means a refused row.
|
|
30186
30212
|
* @throws {@link ValidationError} before the request is sent, when a rule's
|
|
30187
|
-
* term cannot be encoded
|
|
30213
|
+
* term cannot be encoded, or a row has no `antecedents` array — `field`
|
|
30214
|
+
* names it as `rules[k].term`, `rules[k].antecedents` or
|
|
30188
30215
|
* `rules[k].antecedents[i]`.
|
|
30189
30216
|
*
|
|
30190
30217
|
* @remarks
|
|
@@ -30199,7 +30226,8 @@ var InferenceClient = class {
|
|
|
30199
30226
|
* number submitted. A row with an empty `antecedents` list is refused per
|
|
30200
30227
|
* row this way (`rule rejected: a rule needs at least one antecedent; …`)
|
|
30201
30228
|
* and is not counted in `rulesAdded` or `ruleTermIds`; a row with no
|
|
30202
|
-
* `antecedents`
|
|
30229
|
+
* `antecedents` array is refused before the request is sent, with a
|
|
30230
|
+
* `ValidationError` whose `field` is `rules[k].antecedents`. A rule that closes a
|
|
30203
30231
|
* NEW cycle through negation is refused the same way (the reason names the
|
|
30204
30232
|
* cycle's sorts), decided for every row before any row is written.
|
|
30205
30233
|
*
|
|
@@ -30213,9 +30241,9 @@ var InferenceClient = class {
|
|
|
30213
30241
|
*/
|
|
30214
30242
|
async bulkAddRules(request, requestOptions) {
|
|
30215
30243
|
const wireRequest = {
|
|
30216
|
-
rules: request.rules.map((r) => ({
|
|
30244
|
+
rules: request.rules.map((r, k) => ({
|
|
30217
30245
|
term: convertTermArg(r.term),
|
|
30218
|
-
antecedents: r.antecedents.
|
|
30246
|
+
antecedents: convertAntecedents(r.antecedents, `rules[${k}].antecedents`),
|
|
30219
30247
|
certainty: r.certainty,
|
|
30220
30248
|
aggregator: r.aggregator
|
|
30221
30249
|
}))
|
|
@@ -30401,7 +30429,8 @@ var InferenceClient = class {
|
|
|
30401
30429
|
* @throws {@link PreconditionRequiredError} 428 when `ifMatch` is omitted
|
|
30402
30430
|
* and the engine runs with `OSFKB_REQUIRE_IF_MATCH=1`.
|
|
30403
30431
|
* @throws {@link ValidationError} before the request is sent, when a term
|
|
30404
|
-
* cannot be encoded — `field` names it
|
|
30432
|
+
* cannot be encoded, or `antecedents` is not an array — `field` names it
|
|
30433
|
+
* (`term`, `antecedents`, `antecedents[i]`).
|
|
30405
30434
|
*
|
|
30406
30435
|
* @remarks
|
|
30407
30436
|
* A rule's id IS its conclusion term id, so an edit changes it by
|
|
@@ -30440,7 +30469,7 @@ var InferenceClient = class {
|
|
|
30440
30469
|
async replaceRule(ruleId, request, requestOptions) {
|
|
30441
30470
|
const wireRequest = {
|
|
30442
30471
|
term: convertTermArg(request.term),
|
|
30443
|
-
antecedents: request.antecedents
|
|
30472
|
+
antecedents: convertAntecedents(request.antecedents, "antecedents"),
|
|
30444
30473
|
certainty: request.certainty,
|
|
30445
30474
|
aggregator: request.aggregator
|
|
30446
30475
|
};
|
|
@@ -30950,6 +30979,12 @@ var InferenceClient = class {
|
|
|
30950
30979
|
function convertTermArg(input) {
|
|
30951
30980
|
return isPsiTermInput(input) ? toTermInputDto(input) : input;
|
|
30952
30981
|
}
|
|
30982
|
+
function convertAntecedents(antecedents, field) {
|
|
30983
|
+
if (!Array.isArray(antecedents)) {
|
|
30984
|
+
throw new ValidationError(`${field} must be an array of terms`, field);
|
|
30985
|
+
}
|
|
30986
|
+
return antecedents.map(convertTermArg);
|
|
30987
|
+
}
|
|
30953
30988
|
function withRuleEtag(body, headers) {
|
|
30954
30989
|
const etag = headers.get("etag");
|
|
30955
30990
|
return etag === null ? body : { ...body, etag };
|
|
@@ -37238,6 +37273,7 @@ function DocumentReceiptFromApiToFront(dto) {
|
|
|
37238
37273
|
function SessionDocumentFromApiToFront(dto) {
|
|
37239
37274
|
const out = { documentId: dto.document_id, status: dto.status };
|
|
37240
37275
|
if (dto.error != null) out.error = dto.error;
|
|
37276
|
+
if (dto.error_code != null) out.errorCode = dto.error_code;
|
|
37241
37277
|
if (dto.receipt != null) out.receipt = DocumentReceiptFromApiToFront(dto.receipt);
|
|
37242
37278
|
return out;
|
|
37243
37279
|
}
|
|
@@ -37351,6 +37387,7 @@ function DocumentStatsDtoFromApiToFront(dto) {
|
|
|
37351
37387
|
documentId: dto.document_id,
|
|
37352
37388
|
documentTermId: dto.document_term_id ?? void 0,
|
|
37353
37389
|
entitiesExtracted: dto.entities_extracted,
|
|
37390
|
+
entitiesRefused: dto.entities_refused.map(RefusedEntityDtoFromApiToFront),
|
|
37354
37391
|
processingTimeMs: dto.processing_time_ms,
|
|
37355
37392
|
relationsExtracted: dto.relations_extracted,
|
|
37356
37393
|
relationsIntegrated: dto.relations_integrated,
|
|
@@ -51200,10 +51237,14 @@ function LayoutSurfaceDtoFromApiToFront(dto) {
|
|
|
51200
51237
|
slots: dto.slots
|
|
51201
51238
|
};
|
|
51202
51239
|
}
|
|
51240
|
+
function DataLoadErrorFromApiToFront(dto) {
|
|
51241
|
+
return { code: dto.code, message: dto.message, query: dto.query };
|
|
51242
|
+
}
|
|
51203
51243
|
function UIAssemblyStatsDtoFromApiToFront(dto) {
|
|
51204
51244
|
return {
|
|
51205
51245
|
componentCount: dto.component_count,
|
|
51206
51246
|
dataRows: dto.data_rows ?? void 0,
|
|
51247
|
+
dataLoadError: dto.data_load_error ? DataLoadErrorFromApiToFront(dto.data_load_error) : void 0,
|
|
51207
51248
|
includedFeatures: dto.included_features,
|
|
51208
51249
|
osfqlExecuted: dto.osfql_executed ?? void 0,
|
|
51209
51250
|
sortName: dto.sort_name,
|
|
@@ -51352,6 +51393,9 @@ function UIGenerateResponseFromApiToFront(dto) {
|
|
|
51352
51393
|
if (dto.data_sources !== void 0) {
|
|
51353
51394
|
result.dataSources = dto.data_sources.map(UIDataSourcePayloadFromApiToFront);
|
|
51354
51395
|
}
|
|
51396
|
+
if (dto.data_load_errors !== void 0) {
|
|
51397
|
+
result.dataLoadErrors = dto.data_load_errors.map(DataLoadErrorFromApiToFront);
|
|
51398
|
+
}
|
|
51355
51399
|
if (dto.intents !== void 0) result.intents = dto.intents.map(UIGenerateIntentFromApiToFront);
|
|
51356
51400
|
if (dto.trace != null) result.trace = dto.trace.map(UIPipelineStageTraceFromApiToFront);
|
|
51357
51401
|
return result;
|
|
@@ -51599,6 +51643,34 @@ function ReasoningTraceDtoFromApiToFront(dto) {
|
|
|
51599
51643
|
llmCalls: dto.llm_calls
|
|
51600
51644
|
};
|
|
51601
51645
|
}
|
|
51646
|
+
function ConversationNoticeFromApiToFront(dto) {
|
|
51647
|
+
switch (dto.kind) {
|
|
51648
|
+
case "pruned_features":
|
|
51649
|
+
return {
|
|
51650
|
+
kind: dto.kind,
|
|
51651
|
+
message: dto.message,
|
|
51652
|
+
skipped: dto.skipped.map((s) => ({ feature: s.feature, sort: s.sort }))
|
|
51653
|
+
};
|
|
51654
|
+
case "value_grounding":
|
|
51655
|
+
return {
|
|
51656
|
+
kind: dto.kind,
|
|
51657
|
+
message: dto.message,
|
|
51658
|
+
substitutions: dto.substitutions.map((s) => ({
|
|
51659
|
+
feature: s.feature,
|
|
51660
|
+
from: s.from,
|
|
51661
|
+
sort: s.sort,
|
|
51662
|
+
to: s.to
|
|
51663
|
+
}))
|
|
51664
|
+
};
|
|
51665
|
+
case "retrieval_rescue":
|
|
51666
|
+
return {
|
|
51667
|
+
kind: dto.kind,
|
|
51668
|
+
message: dto.message,
|
|
51669
|
+
recordCount: dto.record_count,
|
|
51670
|
+
sorts: [...dto.sorts]
|
|
51671
|
+
};
|
|
51672
|
+
}
|
|
51673
|
+
}
|
|
51602
51674
|
function ConversationMessageResponseFromApiToFront(dto) {
|
|
51603
51675
|
return {
|
|
51604
51676
|
assistantMessage: dto.assistant_message,
|
|
@@ -51612,6 +51684,7 @@ function ConversationMessageResponseFromApiToFront(dto) {
|
|
|
51612
51684
|
producedTermIds: dto.produced_term_ids,
|
|
51613
51685
|
uiSortId: dto.ui_sort_id ?? void 0,
|
|
51614
51686
|
suggestions: dto.suggestions,
|
|
51687
|
+
notices: dto.notices.map(ConversationNoticeFromApiToFront),
|
|
51615
51688
|
claimAnnotations: dto.claim_annotations?.map(ClaimAnnotationDtoFromApiToFront) ?? void 0,
|
|
51616
51689
|
proofTrace: dto.proof_trace ? ProofTraceNodeDtoFromApiToFront(dto.proof_trace) : void 0,
|
|
51617
51690
|
uiCustomizations: dto.ui_customizations?.map(UICustomizationDtoFromApiToFront) ?? void 0,
|
|
@@ -51634,7 +51707,7 @@ function isJsonObject2(value) {
|
|
|
51634
51707
|
}
|
|
51635
51708
|
function isConversationMessageResponseDto(value) {
|
|
51636
51709
|
if (!isJsonObject2(value)) return false;
|
|
51637
|
-
return typeof Reflect.get(value, "assistant_message") === "string" && typeof Reflect.get(value, "conversation_id") === "string" && typeof Reflect.get(value, "intent") === "string" && typeof Reflect.get(value, "turn_id") === "string" && Array.isArray(Reflect.get(value, "produced_term_ids")) && Array.isArray(Reflect.get(value, "suggestions"));
|
|
51710
|
+
return typeof Reflect.get(value, "assistant_message") === "string" && typeof Reflect.get(value, "conversation_id") === "string" && typeof Reflect.get(value, "intent") === "string" && typeof Reflect.get(value, "turn_id") === "string" && Array.isArray(Reflect.get(value, "produced_term_ids")) && Array.isArray(Reflect.get(value, "suggestions")) && Array.isArray(Reflect.get(value, "notices"));
|
|
51638
51711
|
}
|
|
51639
51712
|
function decodeConversationMessage(payload) {
|
|
51640
51713
|
return isConversationMessageResponseDto(payload) ? ConversationMessageResponseFromApiToFront(payload) : null;
|
|
@@ -51987,6 +52060,37 @@ var ConversationClient = class {
|
|
|
51987
52060
|
});
|
|
51988
52061
|
return decodeResponse(response, ListConversationsResponseFromApiToFront);
|
|
51989
52062
|
}
|
|
52063
|
+
/**
|
|
52064
|
+
* Read one conversation's summary: the row {@link listConversations}
|
|
52065
|
+
* returns for it.
|
|
52066
|
+
*
|
|
52067
|
+
* @param conversationId - The conversation ID.
|
|
52068
|
+
* @param requestOptions - Per-call transport overrides.
|
|
52069
|
+
* @returns The summary, with its `kind` and `title`.
|
|
52070
|
+
* @throws {BadRequestError} `400` if the ID is malformed.
|
|
52071
|
+
* @throws {NotFoundError} `404` if the conversation is not the caller's.
|
|
52072
|
+
* @throws {ApiError} If the request fails.
|
|
52073
|
+
*
|
|
52074
|
+
* @remarks
|
|
52075
|
+
* Uses GET `/api/v1/conversation/{id}`. A caller that resumes a conversation
|
|
52076
|
+
* by ID learns its `kind` and `title` here without reading the whole listing.
|
|
52077
|
+
*
|
|
52078
|
+
* @example
|
|
52079
|
+
* ```typescript
|
|
52080
|
+
* const summary = await client.conversation.getConversation('conv-uuid');
|
|
52081
|
+
* console.log(`${summary.kind}: ${summary.title ?? '(untitled)'}`);
|
|
52082
|
+
* ```
|
|
52083
|
+
*/
|
|
52084
|
+
async getConversation(conversationId, requestOptions) {
|
|
52085
|
+
const response = await this.http.request({
|
|
52086
|
+
...toRequestParams(requestOptions),
|
|
52087
|
+
path: `/api/v1/conversation/${encodeURIComponent(conversationId)}`,
|
|
52088
|
+
method: "GET",
|
|
52089
|
+
secure: true,
|
|
52090
|
+
format: "json"
|
|
52091
|
+
});
|
|
52092
|
+
return decodeResponse(response, ConversationSummaryDtoFromApiToFront);
|
|
52093
|
+
}
|
|
51990
52094
|
/**
|
|
51991
52095
|
* List the registered comparison models so the UI can populate a
|
|
51992
52096
|
* selector / compare panel.
|
|
@@ -53534,10 +53638,12 @@ var UiClient = class {
|
|
|
53534
53638
|
* keys inside them — `params`, `props_override`, a `component`'s `props`
|
|
53535
53639
|
* (`dataKey`) and `initial_values` — reach the engine exactly as written.
|
|
53536
53640
|
*
|
|
53537
|
-
* The data load runs read-only OSFQL. A
|
|
53538
|
-
*
|
|
53539
|
-
*
|
|
53540
|
-
*
|
|
53641
|
+
* The data load runs read-only OSFQL. A load that fails, including a query
|
|
53642
|
+
* that writes the store, does not throw: the view renders without rows,
|
|
53643
|
+
* `stats.dataLoadError` carries the typed `code`, the `message` and the
|
|
53644
|
+
* `query`, and `stats.osfqlExecuted` is absent. Branch on `code`
|
|
53645
|
+
* (`data_load_writes`, `osfql_parse_error`, `osfql_compile_error`,
|
|
53646
|
+
* `osfql_execution_failed`), not on the message.
|
|
53541
53647
|
*
|
|
53542
53648
|
* A data view (table, graph, chart, map, timeline, matrix) names in
|
|
53543
53649
|
* `props.rowKey` the column in which each loaded row carries its term's id.
|
|
@@ -53577,8 +53683,8 @@ var UiClient = class {
|
|
|
53577
53683
|
* `delete_record` template, is not a UUID; if a `"sort_ref"` field's sort
|
|
53578
53684
|
* declares no entity range; if `sortName` names no sort of the tenant or
|
|
53579
53685
|
* contains a backtick; if `values` names a feature the sort does not
|
|
53580
|
-
* declare; if an `update_form`
|
|
53581
|
-
* `sortName
|
|
53686
|
+
* declare; if an `update_form` names a term the tenant does not hold, or a
|
|
53687
|
+
* term whose own sort `sortName` does not subsume; or if the request is malformed otherwise.
|
|
53582
53688
|
* @throws {ApiError} If the request fails otherwise.
|
|
53583
53689
|
*
|
|
53584
53690
|
* @remarks
|
|
@@ -53648,8 +53754,8 @@ var UiClient = class {
|
|
|
53648
53754
|
* endpoint abstains with live-schema suggestions. Data rows always come from OSFQL
|
|
53649
53755
|
* execution after certification — never from the model. The data source runs
|
|
53650
53756
|
* read-only OSFQL: a load query that writes the store is refused without an
|
|
53651
|
-
* exception, and the
|
|
53652
|
-
*
|
|
53757
|
+
* exception, and the failure is a `dataLoadErrors` entry (typed `code`,
|
|
53758
|
+
* `message`, `query`) instead of rows.
|
|
53653
53759
|
*
|
|
53654
53760
|
* A certified single-pattern data query is bound to its rows' term ids: the
|
|
53655
53761
|
* engine adds the identity binding to its root pattern (a note in
|
|
@@ -60797,8 +60903,9 @@ var AguiClient = class {
|
|
|
60797
60903
|
*
|
|
60798
60904
|
* A data load the run performs executes read-only OSFQL. A load query that
|
|
60799
60905
|
* writes the store is refused without an exception or a `RUN_ERROR`: the
|
|
60800
|
-
*
|
|
60801
|
-
*
|
|
60906
|
+
* run emits a `CUSTOM` event named `osfkb.data_load_error` whose `value` is
|
|
60907
|
+
* `{ code, message, query }`, and the `STATE_SNAPSHOT` carries the same
|
|
60908
|
+
* object at `osfkb.dataLoadError`; branch on `code`. No rows are loaded.
|
|
60802
60909
|
*
|
|
60803
60910
|
* @example
|
|
60804
60911
|
* ```typescript
|