@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 CHANGED
@@ -316,7 +316,7 @@ pnpm run docs:build # Build documentation site
316
316
 
317
317
  | SDK Version | Min Backend Version | Node | Browser |
318
318
  | ----------- | ------------------- | ---- | ------- |
319
- | 4.1.0 | engine `308ed2a25` | 20+ | ES2022+ |
319
+ | 4.2.0 | engine `cfd780622` | 20+ | ES2022+ |
320
320
 
321
321
  ## License
322
322
 
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 = "4.1.0";
10
+ var SDK_VERSION = "4.2.0";
11
11
  function resolveConfig(config) {
12
12
  if (!config.baseUrl) {
13
13
  throw new Error("ClientConfig.baseUrl is required");
@@ -11007,7 +11007,7 @@ var Ui = class {
11007
11007
  ...params
11008
11008
  });
11009
11009
  /**
11010
- * @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
11010
+ * @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
11011
11011
  *
11012
11012
  * @tags ui
11013
11013
  * @name DescribeUiStream
@@ -17786,6 +17786,7 @@ var RESPONSE_COMPONENTS = {
17786
17786
  injection: [2, "InjectionSummaryDto"],
17787
17787
  intent: [1, 0],
17788
17788
  matched_templates: [2, { array: "QueryTemplateDto" }],
17789
+ notices: [1, { array: 0 }],
17789
17790
  produced_term_ids: [1, { array: 0 }],
17790
17791
  prompt_trace: [2, "PromptTraceDto"],
17791
17792
  proof_trace: [2, "ProofTraceNodeDto"],
@@ -17969,6 +17970,7 @@ var RESPONSE_COMPONENTS = {
17969
17970
  explanation: [1, 0]
17970
17971
  }
17971
17972
  },
17973
+ DataLoadErrorDto: { object: { code: [1, 0], message: [1, 0], query: [1, 0] } },
17972
17974
  DataMixingStatsDto: {
17973
17975
  object: {
17974
17976
  negative_count: [1, 0],
@@ -18438,6 +18440,7 @@ var RESPONSE_COMPONENTS = {
18438
18440
  chunks_processed: [1, 0],
18439
18441
  document_id: [1, 0],
18440
18442
  entities_extracted: [1, 0],
18443
+ entities_refused: [1, { array: "RefusedEntityDto" }],
18441
18444
  processing_time_ms: [1, 0],
18442
18445
  relations_extracted: [1, 0],
18443
18446
  relations_integrated: [1, 0],
@@ -21269,9 +21272,11 @@ var RESPONSE_COMPONENTS = {
21269
21272
  }
21270
21273
  },
21271
21274
  PromptTraceDto: { object: { llm_context: [1, "LlmContextTraceDto"], system_prompt: [1, 0] } },
21275
+ ProofConclusionDto: { object: { features: [1, { object: {} }], sort_id: [1, 0] } },
21272
21276
  ProofDto: {
21273
21277
  object: {
21274
21278
  certainty: [1, 0],
21279
+ conclusion: [0, "ProofConclusionDto"],
21275
21280
  kind: [1, 0],
21276
21281
  subproofs: [0, { array: "ProofDto" }],
21277
21282
  substitution: [1, "HomoiconicSubstitutionDto"]
@@ -22340,6 +22345,7 @@ var RESPONSE_COMPONENTS = {
22340
22345
  SolutionDto: {
22341
22346
  object: {
22342
22347
  certainty: [1, 0],
22348
+ conclusion: [2, "ProofConclusionDto"],
22343
22349
  matched_sorts: [0, { array: 0 }],
22344
22350
  proof: [2, "ProofDto"],
22345
22351
  residuated_sorts: [0, { array: 0 }],
@@ -23062,6 +23068,7 @@ var RESPONSE_COMPONENTS = {
23062
23068
  UIAssemblyStatsDto: {
23063
23069
  object: {
23064
23070
  component_count: [1, 0],
23071
+ data_load_error: [2, "DataLoadErrorDto"],
23065
23072
  included_features: [1, 0],
23066
23073
  sort_name: [1, 0],
23067
23074
  total_features: [1, 0],
@@ -23100,6 +23107,7 @@ var RESPONSE_COMPONENTS = {
23100
23107
  UIGenerateResponse: {
23101
23108
  object: {
23102
23109
  data: [2, "DataPayloadDto"],
23110
+ data_load_errors: [0, { array: "DataLoadErrorDto" }],
23103
23111
  data_sources: [0, { array: "DataSourcePayloadDto" }],
23104
23112
  descriptor: [2, "UIDescriptorDto"],
23105
23113
  diagnostics: [0, { array: 0 }],
@@ -24788,6 +24796,11 @@ var RESPONSE_OPERATIONS = {
24788
24796
  path: "/api/v1/constraint-sessions/{session_id}",
24789
24797
  responses: { 200: "ConstraintSessionStatusResponse" }
24790
24798
  },
24799
+ getConversation: {
24800
+ method: "GET",
24801
+ path: "/api/v1/conversation/{id}",
24802
+ responses: { 200: "ConversationSummaryDto" }
24803
+ },
24791
24804
  getConversationEntries: {
24792
24805
  method: "GET",
24793
24806
  path: "/api/v1/audit/entries/{conversation_id}",
@@ -29296,6 +29309,14 @@ function HomoiconicSubstitutionDtoFromApiToFront(dto) {
29296
29309
  bindings: dto.bindings.map(BindingDtoFromApiToFront)
29297
29310
  };
29298
29311
  }
29312
+ function ProofConclusionDtoFromApiToFront(dto) {
29313
+ return {
29314
+ features: featuresFromApiToFront(dto.features),
29315
+ sortId: dto.sort_id,
29316
+ sortName: dto.sort_name ?? void 0,
29317
+ termId: dto.term_id ?? void 0
29318
+ };
29319
+ }
29299
29320
  function ProofDtoFromApiToFront(dto) {
29300
29321
  return {
29301
29322
  kind: dto.kind,
@@ -29303,6 +29324,7 @@ function ProofDtoFromApiToFront(dto) {
29303
29324
  ruleTermId: dto.rule_term_id,
29304
29325
  ruleHeadTermId: dto.rule_head_term_id,
29305
29326
  goalDisplay: dto.goal_display,
29327
+ conclusion: dto.conclusion ? ProofConclusionDtoFromApiToFront(dto.conclusion) : void 0,
29306
29328
  ruleLabel: dto.rule_label,
29307
29329
  substitution: HomoiconicSubstitutionDtoFromApiToFront(dto.substitution),
29308
29330
  subproofs: dto.subproofs?.map(ProofDtoFromApiToFront),
@@ -29356,6 +29378,7 @@ function SolutionDtoFromApiToFront(dto) {
29356
29378
  const solution = {
29357
29379
  substitution: HomoiconicSubstitutionDtoFromApiToFront(dto.substitution),
29358
29380
  proof: dto.proof ? ProofDtoFromApiToFront(dto.proof) : void 0,
29381
+ conclusion: dto.conclusion ? ProofConclusionDtoFromApiToFront(dto.conclusion) : void 0,
29359
29382
  certainty: dto.certainty,
29360
29383
  evidenceMatched: dto.evidence_matched ?? void 0,
29361
29384
  evidenceRatio: dto.evidence_ratio ?? void 0,
@@ -30056,6 +30079,8 @@ var InferenceClient = class {
30056
30079
  * engine-side head aggregator (see {@link RuleAggregatorDto}).
30057
30080
  * @returns The created rule wrapped in an AddRuleResponse, with its
30058
30081
  * {@link AddRuleResponse.etag} when the engine sends the `ETag` header.
30082
+ * @throws {@link ValidationError} before the request is sent, when `antecedents` is
30083
+ * not an array (a request built from untyped data) — `field` is `antecedents`.
30059
30084
  * @throws {ApiError} If the rule is rejected or the request fails — 422 when
30060
30085
  * it is unusable as written: a head or body antecedent naming a sort or
30061
30086
  * term that does not exist (the message names it and its position — `the
@@ -30065,9 +30090,8 @@ var InferenceClient = class {
30065
30090
  * cycle the program already had is not blamed on it), or a rule with no
30066
30091
  * antecedents (`rule rejected: a rule needs at least one antecedent; a
30067
30092
  * term with no antecedents is a fact — write it through POST
30068
- * /api/v1/terms` — write a fact with `client.terms.createTerm`). A body
30069
- * with no `antecedents` key at all is refused by the body decoder with a
30070
- * plain-text 422. The refusal is a
30093
+ * /api/v1/terms` — write a fact with `client.terms.createTerm`). The
30094
+ * refusal is a
30071
30095
  * plain {@link ApiError} with `status` 422 — not a `BadRequestError`
30072
30096
  * (earlier engines answered an unknown head sort with 400), and not a
30073
30097
  * `NamedConstraintViolationError`, which is reserved for a feature
@@ -30097,7 +30121,7 @@ var InferenceClient = class {
30097
30121
  async addRule(request, requestOptions) {
30098
30122
  const wireRequest = {
30099
30123
  term: convertTermArg(request.term),
30100
- antecedents: request.antecedents.map(convertTermArg),
30124
+ antecedents: convertAntecedents(request.antecedents, "antecedents"),
30101
30125
  certainty: request.certainty,
30102
30126
  aggregator: request.aggregator
30103
30127
  };
@@ -30114,6 +30138,8 @@ var InferenceClient = class {
30114
30138
  * @returns Whether the write would accept it (`ok`), every refusal with the
30115
30139
  * status the write would answer, the NAF-safety warnings, and the rule as
30116
30140
  * the write would build it.
30141
+ * @throws {@link ValidationError} before the request is sent, when `antecedents` is
30142
+ * not an array (a request built from untyped data) — `field` is `antecedents`.
30117
30143
  * @throws {ApiError} If the request itself fails.
30118
30144
  *
30119
30145
  * @remarks
@@ -30138,7 +30164,7 @@ var InferenceClient = class {
30138
30164
  async validateRule(request, requestOptions) {
30139
30165
  const wireRequest = {
30140
30166
  term: convertTermArg(request.term),
30141
- antecedents: request.antecedents.map(convertTermArg),
30167
+ antecedents: convertAntecedents(request.antecedents, "antecedents"),
30142
30168
  certainty: request.certainty,
30143
30169
  aggregator: request.aggregator
30144
30170
  };
@@ -30183,10 +30209,11 @@ var InferenceClient = class {
30183
30209
  * @param requestOptions - Per-call request options.
30184
30210
  * @returns What was written, and what was refused: `ruleTermIds` and
30185
30211
  * `rulesAdded` for the accepted rules, `rejected` naming each refused one.
30186
- * @throws {@link ApiError} 422 when the body is malformed (for example a row
30187
- * with no `antecedents` key) — a 422 never means a refused row.
30212
+ * @throws {@link ApiError} 422 when the body is malformed — a 422 never
30213
+ * means a refused row.
30188
30214
  * @throws {@link ValidationError} before the request is sent, when a rule's
30189
- * term cannot be encoded — `field` names it as `rules[k].term` or
30215
+ * term cannot be encoded, or a row has no `antecedents` array — `field`
30216
+ * names it as `rules[k].term`, `rules[k].antecedents` or
30190
30217
  * `rules[k].antecedents[i]`.
30191
30218
  *
30192
30219
  * @remarks
@@ -30201,7 +30228,8 @@ var InferenceClient = class {
30201
30228
  * number submitted. A row with an empty `antecedents` list is refused per
30202
30229
  * row this way (`rule rejected: a rule needs at least one antecedent; …`)
30203
30230
  * and is not counted in `rulesAdded` or `ruleTermIds`; a row with no
30204
- * `antecedents` key fails the whole batch with a 422. A rule that closes a
30231
+ * `antecedents` array is refused before the request is sent, with a
30232
+ * `ValidationError` whose `field` is `rules[k].antecedents`. A rule that closes a
30205
30233
  * NEW cycle through negation is refused the same way (the reason names the
30206
30234
  * cycle's sorts), decided for every row before any row is written.
30207
30235
  *
@@ -30215,9 +30243,9 @@ var InferenceClient = class {
30215
30243
  */
30216
30244
  async bulkAddRules(request, requestOptions) {
30217
30245
  const wireRequest = {
30218
- rules: request.rules.map((r) => ({
30246
+ rules: request.rules.map((r, k) => ({
30219
30247
  term: convertTermArg(r.term),
30220
- antecedents: r.antecedents.map(convertTermArg),
30248
+ antecedents: convertAntecedents(r.antecedents, `rules[${k}].antecedents`),
30221
30249
  certainty: r.certainty,
30222
30250
  aggregator: r.aggregator
30223
30251
  }))
@@ -30403,7 +30431,8 @@ var InferenceClient = class {
30403
30431
  * @throws {@link PreconditionRequiredError} 428 when `ifMatch` is omitted
30404
30432
  * and the engine runs with `OSFKB_REQUIRE_IF_MATCH=1`.
30405
30433
  * @throws {@link ValidationError} before the request is sent, when a term
30406
- * cannot be encoded — `field` names it (`term`, `antecedents[i]`).
30434
+ * cannot be encoded, or `antecedents` is not an array — `field` names it
30435
+ * (`term`, `antecedents`, `antecedents[i]`).
30407
30436
  *
30408
30437
  * @remarks
30409
30438
  * A rule's id IS its conclusion term id, so an edit changes it by
@@ -30442,7 +30471,7 @@ var InferenceClient = class {
30442
30471
  async replaceRule(ruleId, request, requestOptions) {
30443
30472
  const wireRequest = {
30444
30473
  term: convertTermArg(request.term),
30445
- antecedents: request.antecedents.map(convertTermArg),
30474
+ antecedents: convertAntecedents(request.antecedents, "antecedents"),
30446
30475
  certainty: request.certainty,
30447
30476
  aggregator: request.aggregator
30448
30477
  };
@@ -30952,6 +30981,12 @@ var InferenceClient = class {
30952
30981
  function convertTermArg(input) {
30953
30982
  return isPsiTermInput(input) ? toTermInputDto(input) : input;
30954
30983
  }
30984
+ function convertAntecedents(antecedents, field) {
30985
+ if (!Array.isArray(antecedents)) {
30986
+ throw new ValidationError(`${field} must be an array of terms`, field);
30987
+ }
30988
+ return antecedents.map(convertTermArg);
30989
+ }
30955
30990
  function withRuleEtag(body, headers) {
30956
30991
  const etag = headers.get("etag");
30957
30992
  return etag === null ? body : { ...body, etag };
@@ -37240,6 +37275,7 @@ function DocumentReceiptFromApiToFront(dto) {
37240
37275
  function SessionDocumentFromApiToFront(dto) {
37241
37276
  const out = { documentId: dto.document_id, status: dto.status };
37242
37277
  if (dto.error != null) out.error = dto.error;
37278
+ if (dto.error_code != null) out.errorCode = dto.error_code;
37243
37279
  if (dto.receipt != null) out.receipt = DocumentReceiptFromApiToFront(dto.receipt);
37244
37280
  return out;
37245
37281
  }
@@ -37353,6 +37389,7 @@ function DocumentStatsDtoFromApiToFront(dto) {
37353
37389
  documentId: dto.document_id,
37354
37390
  documentTermId: dto.document_term_id ?? void 0,
37355
37391
  entitiesExtracted: dto.entities_extracted,
37392
+ entitiesRefused: dto.entities_refused.map(RefusedEntityDtoFromApiToFront),
37356
37393
  processingTimeMs: dto.processing_time_ms,
37357
37394
  relationsExtracted: dto.relations_extracted,
37358
37395
  relationsIntegrated: dto.relations_integrated,
@@ -51202,10 +51239,14 @@ function LayoutSurfaceDtoFromApiToFront(dto) {
51202
51239
  slots: dto.slots
51203
51240
  };
51204
51241
  }
51242
+ function DataLoadErrorFromApiToFront(dto) {
51243
+ return { code: dto.code, message: dto.message, query: dto.query };
51244
+ }
51205
51245
  function UIAssemblyStatsDtoFromApiToFront(dto) {
51206
51246
  return {
51207
51247
  componentCount: dto.component_count,
51208
51248
  dataRows: dto.data_rows ?? void 0,
51249
+ dataLoadError: dto.data_load_error ? DataLoadErrorFromApiToFront(dto.data_load_error) : void 0,
51209
51250
  includedFeatures: dto.included_features,
51210
51251
  osfqlExecuted: dto.osfql_executed ?? void 0,
51211
51252
  sortName: dto.sort_name,
@@ -51354,6 +51395,9 @@ function UIGenerateResponseFromApiToFront(dto) {
51354
51395
  if (dto.data_sources !== void 0) {
51355
51396
  result.dataSources = dto.data_sources.map(UIDataSourcePayloadFromApiToFront);
51356
51397
  }
51398
+ if (dto.data_load_errors !== void 0) {
51399
+ result.dataLoadErrors = dto.data_load_errors.map(DataLoadErrorFromApiToFront);
51400
+ }
51357
51401
  if (dto.intents !== void 0) result.intents = dto.intents.map(UIGenerateIntentFromApiToFront);
51358
51402
  if (dto.trace != null) result.trace = dto.trace.map(UIPipelineStageTraceFromApiToFront);
51359
51403
  return result;
@@ -51601,6 +51645,34 @@ function ReasoningTraceDtoFromApiToFront(dto) {
51601
51645
  llmCalls: dto.llm_calls
51602
51646
  };
51603
51647
  }
51648
+ function ConversationNoticeFromApiToFront(dto) {
51649
+ switch (dto.kind) {
51650
+ case "pruned_features":
51651
+ return {
51652
+ kind: dto.kind,
51653
+ message: dto.message,
51654
+ skipped: dto.skipped.map((s) => ({ feature: s.feature, sort: s.sort }))
51655
+ };
51656
+ case "value_grounding":
51657
+ return {
51658
+ kind: dto.kind,
51659
+ message: dto.message,
51660
+ substitutions: dto.substitutions.map((s) => ({
51661
+ feature: s.feature,
51662
+ from: s.from,
51663
+ sort: s.sort,
51664
+ to: s.to
51665
+ }))
51666
+ };
51667
+ case "retrieval_rescue":
51668
+ return {
51669
+ kind: dto.kind,
51670
+ message: dto.message,
51671
+ recordCount: dto.record_count,
51672
+ sorts: [...dto.sorts]
51673
+ };
51674
+ }
51675
+ }
51604
51676
  function ConversationMessageResponseFromApiToFront(dto) {
51605
51677
  return {
51606
51678
  assistantMessage: dto.assistant_message,
@@ -51614,6 +51686,7 @@ function ConversationMessageResponseFromApiToFront(dto) {
51614
51686
  producedTermIds: dto.produced_term_ids,
51615
51687
  uiSortId: dto.ui_sort_id ?? void 0,
51616
51688
  suggestions: dto.suggestions,
51689
+ notices: dto.notices.map(ConversationNoticeFromApiToFront),
51617
51690
  claimAnnotations: dto.claim_annotations?.map(ClaimAnnotationDtoFromApiToFront) ?? void 0,
51618
51691
  proofTrace: dto.proof_trace ? ProofTraceNodeDtoFromApiToFront(dto.proof_trace) : void 0,
51619
51692
  uiCustomizations: dto.ui_customizations?.map(UICustomizationDtoFromApiToFront) ?? void 0,
@@ -51636,7 +51709,7 @@ function isJsonObject2(value) {
51636
51709
  }
51637
51710
  function isConversationMessageResponseDto(value) {
51638
51711
  if (!isJsonObject2(value)) return false;
51639
- 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"));
51712
+ 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"));
51640
51713
  }
51641
51714
  function decodeConversationMessage(payload) {
51642
51715
  return isConversationMessageResponseDto(payload) ? ConversationMessageResponseFromApiToFront(payload) : null;
@@ -51989,6 +52062,37 @@ var ConversationClient = class {
51989
52062
  });
51990
52063
  return decodeResponse(response, ListConversationsResponseFromApiToFront);
51991
52064
  }
52065
+ /**
52066
+ * Read one conversation's summary: the row {@link listConversations}
52067
+ * returns for it.
52068
+ *
52069
+ * @param conversationId - The conversation ID.
52070
+ * @param requestOptions - Per-call transport overrides.
52071
+ * @returns The summary, with its `kind` and `title`.
52072
+ * @throws {BadRequestError} `400` if the ID is malformed.
52073
+ * @throws {NotFoundError} `404` if the conversation is not the caller's.
52074
+ * @throws {ApiError} If the request fails.
52075
+ *
52076
+ * @remarks
52077
+ * Uses GET `/api/v1/conversation/{id}`. A caller that resumes a conversation
52078
+ * by ID learns its `kind` and `title` here without reading the whole listing.
52079
+ *
52080
+ * @example
52081
+ * ```typescript
52082
+ * const summary = await client.conversation.getConversation('conv-uuid');
52083
+ * console.log(`${summary.kind}: ${summary.title ?? '(untitled)'}`);
52084
+ * ```
52085
+ */
52086
+ async getConversation(conversationId, requestOptions) {
52087
+ const response = await this.http.request({
52088
+ ...toRequestParams(requestOptions),
52089
+ path: `/api/v1/conversation/${encodeURIComponent(conversationId)}`,
52090
+ method: "GET",
52091
+ secure: true,
52092
+ format: "json"
52093
+ });
52094
+ return decodeResponse(response, ConversationSummaryDtoFromApiToFront);
52095
+ }
51992
52096
  /**
51993
52097
  * List the registered comparison models so the UI can populate a
51994
52098
  * selector / compare panel.
@@ -53536,10 +53640,12 @@ var UiClient = class {
53536
53640
  * keys inside them — `params`, `props_override`, a `component`'s `props`
53537
53641
  * (`dataKey`) and `initial_values` — reach the engine exactly as written.
53538
53642
  *
53539
- * The data load runs read-only OSFQL. A query that writes the store is
53540
- * refused without an exception: the answer's `stats.osfqlExecuted` starts
53541
- * with `FAILED:` (`FAILED: <query> — a data load runs read-only OSFQL, and this query writes the store; run it through POST /api/v1/ui/action or POST /api/v1/osfql`) and no rows load. Read a `FAILED:` value as a refused
53542
- * load, not as an empty result.
53643
+ * The data load runs read-only OSFQL. A load that fails, including a query
53644
+ * that writes the store, does not throw: the view renders without rows,
53645
+ * `stats.dataLoadError` carries the typed `code`, the `message` and the
53646
+ * `query`, and `stats.osfqlExecuted` is absent. Branch on `code`
53647
+ * (`data_load_writes`, `osfql_parse_error`, `osfql_compile_error`,
53648
+ * `osfql_execution_failed`), not on the message.
53543
53649
  *
53544
53650
  * A data view (table, graph, chart, map, timeline, matrix) names in
53545
53651
  * `props.rowKey` the column in which each loaded row carries its term's id.
@@ -53579,8 +53685,8 @@ var UiClient = class {
53579
53685
  * `delete_record` template, is not a UUID; if a `"sort_ref"` field's sort
53580
53686
  * declares no entity range; if `sortName` names no sort of the tenant or
53581
53687
  * contains a backtick; if `values` names a feature the sort does not
53582
- * declare; if an `update_form`'s term is held under another sort than
53583
- * `sortName`; or if the request is malformed otherwise.
53688
+ * declare; if an `update_form` names a term the tenant does not hold, or a
53689
+ * term whose own sort `sortName` does not subsume; or if the request is malformed otherwise.
53584
53690
  * @throws {ApiError} If the request fails otherwise.
53585
53691
  *
53586
53692
  * @remarks
@@ -53650,8 +53756,8 @@ var UiClient = class {
53650
53756
  * endpoint abstains with live-schema suggestions. Data rows always come from OSFQL
53651
53757
  * execution after certification — never from the model. The data source runs
53652
53758
  * read-only OSFQL: a load query that writes the store is refused without an
53653
- * exception, and the load reports `FAILED: <query> — a data load runs read-only
53654
- * OSFQL, …` instead of rows.
53759
+ * exception, and the failure is a `dataLoadErrors` entry (typed `code`,
53760
+ * `message`, `query`) instead of rows.
53655
53761
  *
53656
53762
  * A certified single-pattern data query is bound to its rows' term ids: the
53657
53763
  * engine adds the identity binding to its root pattern (a note in
@@ -60799,8 +60905,9 @@ var AguiClient = class {
60799
60905
  *
60800
60906
  * A data load the run performs executes read-only OSFQL. A load query that
60801
60907
  * writes the store is refused without an exception or a `RUN_ERROR`: the
60802
- * load reports `FAILED: <query> — a data load runs read-only OSFQL, …` in
60803
- * place of rows.
60908
+ * run emits a `CUSTOM` event named `osfkb.data_load_error` whose `value` is
60909
+ * `{ code, message, query }`, and the `STATE_SNAPSHOT` carries the same
60910
+ * object at `osfkb.dataLoadError`; branch on `code`. No rows are loaded.
60804
60911
  *
60805
60912
  * @example
60806
60913
  * ```typescript