@kortexya/reasoninglayer 3.0.1 → 3.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.js CHANGED
@@ -5,7 +5,7 @@ var __export = (target, all) => {
5
5
  };
6
6
 
7
7
  // src/config.ts
8
- var SDK_VERSION = "3.0.1";
8
+ var SDK_VERSION = "3.2.0";
9
9
  function resolveConfig(config) {
10
10
  if (!config.baseUrl) {
11
11
  throw new Error("ClientConfig.baseUrl is required");
@@ -165,6 +165,21 @@ var OsfqlError = class extends ApiError {
165
165
  this.sortDeleteRefusal = failure.sortDeleteRefusal;
166
166
  }
167
167
  };
168
+ var NamedConstraintViolationError = class extends ApiError {
169
+ name = "NamedConstraintViolationError";
170
+ /** The feature whose constraint refused the write, when the engine names it. */
171
+ feature;
172
+ /** The constraint's name, when its author gave one. */
173
+ constraintName;
174
+ /** The constraint's message, when its author gave one. */
175
+ constraintMessage;
176
+ constructor(message, body, headers, refusal, errorCode) {
177
+ super(message, 422, body, headers, errorCode);
178
+ this.feature = refusal.feature;
179
+ this.constraintName = refusal.constraintName;
180
+ this.constraintMessage = refusal.constraintMessage;
181
+ }
182
+ };
168
183
  var RateLimitError = class extends ApiError {
169
184
  name = "RateLimitError";
170
185
  /** Seconds to wait before retrying, or null if not specified. */
@@ -288,6 +303,10 @@ function createApiError(status, body, headers) {
288
303
  if (rows !== null) {
289
304
  return new BulkRefusedError(message, body, headers, rows, errorCode);
290
305
  }
306
+ const named = namedConstraintRefusal(body);
307
+ if (named !== null) {
308
+ return new NamedConstraintViolationError(message, body, headers, named, errorCode);
309
+ }
291
310
  return new ApiError(message, status, body, headers, errorCode);
292
311
  }
293
312
  case 429: {
@@ -339,7 +358,9 @@ function bulkRefusalRows(body) {
339
358
  rows.push({
340
359
  index: row.index,
341
360
  message: row.message,
342
- ...typeof row.feature === "string" ? { feature: row.feature } : {}
361
+ ...typeof row.feature === "string" ? { feature: row.feature } : {},
362
+ ...typeof row.constraint_name === "string" ? { constraintName: row.constraint_name } : {},
363
+ ...typeof row.constraint_message === "string" ? { constraintMessage: row.constraint_message } : {}
343
364
  });
344
365
  }
345
366
  return rows.length > 0 ? rows : null;
@@ -367,6 +388,18 @@ function derivedFactRefusal(body) {
367
388
  repairs
368
389
  };
369
390
  }
391
+ function namedConstraintRefusal(body) {
392
+ if (typeof body !== "object" || body === null) return null;
393
+ const obj = body;
394
+ const constraintName = typeof obj.constraint_name === "string" ? obj.constraint_name : void 0;
395
+ const constraintMessage = typeof obj.constraint_message === "string" ? obj.constraint_message : void 0;
396
+ if (constraintName === void 0 && constraintMessage === void 0) return null;
397
+ return {
398
+ ...typeof obj.feature === "string" ? { feature: obj.feature } : {},
399
+ ...constraintName !== void 0 ? { constraintName } : {},
400
+ ...constraintMessage !== void 0 ? { constraintMessage } : {}
401
+ };
402
+ }
370
403
  function isConstraintViolationBody(body) {
371
404
  if (!isErrorBody(body)) return false;
372
405
  if (!("details" in body)) return false;
@@ -1274,6 +1307,24 @@ var Sorts = class {
1274
1307
  format: "json",
1275
1308
  ...params
1276
1309
  });
1310
+ /**
1311
+ * @description A `Proposed` sort becomes `Active`; a sort only flagged `needs_review` has the flag cleared. Anything else is not awaiting approval (409). Requires `Manage` on the sort under a gateway policy. Separation of duties is enforced here, by the engine that holds the proposal record: the acting user (`X-Authenticated-User`) who is the sort's recorded proposer (`SortStatus::Proposed { submitted_by }`) is refused with a coded 403 (`code: "separation_of_duties"`) naming the sort, and the refusal is recorded in the oversight ledger as a `rejected` decision on the action `sort.approve.refused` (#398). The gateway checks the steward permission at the project, where the roles live.
1312
+ *
1313
+ * @tags sorts
1314
+ * @name ApproveSort
1315
+ * @summary Approve a candidate sort
1316
+ * @request POST:/api/v1/sorts/{id}/approve
1317
+ * @secure
1318
+ */
1319
+ approveSort = (id, data, params = {}) => this.http.request({
1320
+ path: `/api/v1/sorts/${id}/approve`,
1321
+ method: "POST",
1322
+ body: data,
1323
+ secure: true,
1324
+ type: "application/json",
1325
+ format: "json",
1326
+ ...params
1327
+ });
1277
1328
  /**
1278
1329
  * @description POST /api/v1/sorts/bulk Creates multiple sorts in a single request, automatically resolving parent references by name. Sorts are topologically sorted to ensure parents are created before children. This is much faster than individual requests for large hierarchies. # Authorization Requires X-Tenant-Id header. The tenant_id field in the request body is ignored.
1279
1330
  *
@@ -1373,6 +1424,60 @@ var Sorts = class {
1373
1424
  format: "json",
1374
1425
  ...params
1375
1426
  });
1427
+ /**
1428
+ * @description Retires the sort, optionally in favour of a replacement (whose id or name is given), with a mandatory reason. Used both to reject a candidate after materialize and to retire an established concept.
1429
+ *
1430
+ * @tags sorts
1431
+ * @name DeprecateSort
1432
+ * @summary Deprecate (reject) a sort
1433
+ * @request POST:/api/v1/sorts/{id}/deprecate
1434
+ * @secure
1435
+ */
1436
+ deprecateSort = (id, data, params = {}) => this.http.request({
1437
+ path: `/api/v1/sorts/${id}/deprecate`,
1438
+ method: "POST",
1439
+ body: data,
1440
+ secure: true,
1441
+ type: "application/json",
1442
+ format: "json",
1443
+ ...params
1444
+ });
1445
+ /**
1446
+ * @description The steward's edit of where a concept sits: `add` and `remove` name parents by id or by name, and the sort keeps every other parent in its current order (added ones go last). The move itself is the one `PUT /api/v1/sorts/{id}/parents` runs (#292): the sort keeps its id and record, its subtree moves with it, the inherited declarations and the subsumption caches (GLB/LUB included) are repaired, and a refused move changes nothing. Requires `Manage` on the sort and on every parent added or removed under a gateway policy: a move changes who inherits access to the sort through a descendant grant. A change appends an `OversightDecision{modified}` to the audit ledger naming the reviewer. # Refused (422), with nothing changed An unknown parent, a parent to remove that is not one, an empty edit, the sort itself, a parent below the sort (a cycle), and every state the move would make contradictory (⊥): two cells of one disjoint facet, an inherited declaration no value satisfies, an own declaration weaker than a new ancestor's, a bound constraint left without its feature.
1447
+ *
1448
+ * @tags sorts
1449
+ * @name EditSortParents
1450
+ * @summary Add and remove parents of a sort
1451
+ * @request POST:/api/v1/sorts/{id}/parents
1452
+ * @secure
1453
+ */
1454
+ editSortParents = (id, data, params = {}) => this.http.request({
1455
+ path: `/api/v1/sorts/${id}/parents`,
1456
+ method: "POST",
1457
+ body: data,
1458
+ secure: true,
1459
+ type: "application/json",
1460
+ format: "json",
1461
+ ...params
1462
+ });
1463
+ /**
1464
+ * @description Formal Concept Analysis over sort × feature declaration, each declaration taken whole (name, range or type, constraint, requiredness, bound): every set of at least `min_sorts` sorts sharing at least two identical declarations is a candidate mixin. Deterministic; never writes. Accepting a proposal is creating the mixin (as a `proposed` sort) and re-parenting the members — the caller's decision: `POST /api/v1/scenarios/materialize` with the mixin and each member naming it as a parent does both, the moves going through the governed door of `POST /api/v1/sorts/{id}/parents`. A declaration a sort restates identically to an ancestor's is factored already and is never proposed again.
1465
+ *
1466
+ * @tags sorts
1467
+ * @name FactorSortShapes
1468
+ * @summary Propose mixin parents for shapes several sorts repeat unchanged
1469
+ * @request POST:/api/v1/sorts/discovery/factor
1470
+ * @secure
1471
+ */
1472
+ factorSortShapes = (data, params = {}) => this.http.request({
1473
+ path: `/api/v1/sorts/discovery/factor`,
1474
+ method: "POST",
1475
+ body: data,
1476
+ secure: true,
1477
+ type: "application/json",
1478
+ format: "json",
1479
+ ...params
1480
+ });
1376
1481
  /**
1377
1482
  * No description
1378
1483
  *
@@ -1721,7 +1826,7 @@ var Sorts = class {
1721
1826
  ...params
1722
1827
  });
1723
1828
  /**
1724
- * @description The body's `parents` REPLACES the sort's parent set; an empty list makes it a root. The sort keeps its id and its whole record — features, bounds, SKOS fields, annotations, status, provenance — and its subtree moves with it. Nothing is deleted and nothing is re-created. What depends on the ancestors is repaired for the sort and every subsort: the subsumption encoding, and the INHERITED feature declarations (a feature inherited from an old ancestor goes, one from a new ancestor comes; a declaration the sort makes itself is never touched). The response reports those changes, the terms whose sort now has different ancestors, and the rules naming a moved sort. The OSFQL spelling is `ALTER SORT <name> PARENTS (<parent>, …);` — the same move. # Refused, with nothing changed An unknown parent (or another tenant's), the sort itself, a parent below the sort (a cycle), a move past the depth cap, a facet violation, an own declaration weaker than a new ancestor's, a bound constraint left naming a feature a sort would stop inheriting, a declaration contradiction inherited from two new ancestors, a shared or authorization-schema sort, and a sort with more than 512 persisted subsorts. # Errors - 400 Bad Request: the move was refused; the message names the cause - 404 Not Found: no such sort for this tenant
1829
+ * @description The body's `parents` REPLACES the sort's parent set; an empty list makes it a root. The sort keeps its id and its whole record — features, bounds, SKOS fields, annotations, status, provenance — and its subtree moves with it. Nothing is deleted and nothing is re-created. What depends on the ancestors is repaired for the sort and every subsort: the subsumption encoding, and the INHERITED feature declarations (a feature inherited from an old ancestor goes, one from a new ancestor comes; a declaration the sort makes itself is never touched). The response reports those changes, the terms whose sort now has different ancestors, and the rules naming a moved sort. The OSFQL spelling is `ALTER SORT <name> PARENTS (<parent>, …);` — the same move. # Governed Requires `Manage` on the sort and on every parent the move adds or removes, and a move that changes anything appends an `OversightDecision{modified}` naming the reviewer — the same door `POST /sorts/{id}/parents` and OSFQL go through. # Refused, with nothing changed An unknown parent (or another tenant's), the sort itself, a parent below the sort (a cycle), a move past the depth cap, a facet violation, an own declaration weaker than a new ancestor's, a bound constraint left naming a feature a sort would stop inheriting, a declaration contradiction inherited from two new ancestors, a shared or authorization-schema sort, and a sort with more than 512 persisted subsorts. # Errors - 400 Bad Request: the move was refused; the message names the cause - 404 Not Found: no such sort for this tenant
1725
1830
  *
1726
1831
  * @tags sorts
1727
1832
  * @name ReparentSort
@@ -2591,6 +2696,24 @@ var Inference = class {
2591
2696
  format: "json",
2592
2697
  ...params
2593
2698
  });
2699
+ /**
2700
+ * @description Takes the body `POST /api/v1/inference/rules` takes and runs every check that write runs — sorts and referenced terms resolve, guard bounds compare with their declared types, nested negation, binders, range restriction (every conclusion variable bound by a POSITIVE antecedent), aggregator, and the homoiconic encoding itself — by building the rule into a scratch copy of the tenant's store. Nothing is written, persisted, or propagated. Stratification included: a rule that closes a NEW cycle through negation against the existing program is refused by both (a cycle the program already had is not blamed on it). `ok` is exactly whether the write would accept the rule; `refusals` names why not, with the status the write would answer. `warnings` adds what the write accepts but the program may not mean: variables only a `NOT` mentions (NAF safety).
2701
+ *
2702
+ * @tags inference
2703
+ * @name ValidateRule
2704
+ * @summary Validate a rule without writing it
2705
+ * @request POST:/api/v1/inference/rules/validate
2706
+ * @secure
2707
+ */
2708
+ validateRule = (data, params = {}) => this.http.request({
2709
+ path: `/api/v1/inference/rules/validate`,
2710
+ method: "POST",
2711
+ body: data,
2712
+ secure: true,
2713
+ type: "application/json",
2714
+ format: "json",
2715
+ ...params
2716
+ });
2594
2717
  };
2595
2718
 
2596
2719
  // src/api-spec/generated/Cognitive.ts
@@ -3200,11 +3323,11 @@ var CognitiveAgentsMessaging = class {
3200
3323
  * No description
3201
3324
  *
3202
3325
  * @tags Cognitive Agents - Messaging
3203
- * @name GetInbox
3326
+ * @name GetAgentInbox
3204
3327
  * @summary Get an agent's inbox.
3205
3328
  * @request POST:/api/v1/cognitive/agents/messages/inbox
3206
3329
  */
3207
- getInbox = (data, params = {}) => this.http.request({
3330
+ getAgentInbox = (data, params = {}) => this.http.request({
3208
3331
  path: `/api/v1/cognitive/agents/messages/inbox`,
3209
3332
  method: "POST",
3210
3333
  body: data,
@@ -8719,7 +8842,7 @@ var Scenarios = class {
8719
8842
  ...params
8720
8843
  });
8721
8844
  /**
8722
- * @description Materializes an already-generated GeneratedScenario verbatim (no LLM call): sorts, belief instances, rules, goal, and the ontology-declared engine pipeline. Used by the studio's build wizard to persist exactly what was reviewed so it is immediately queryable in chat.
8845
+ * @description Materializes an already-generated GeneratedScenario verbatim (no LLM call): sorts, belief instances, rules, goal, and the ontology-declared engine pipeline. Used by the studio's build wizard to persist exactly what was reviewed so it is immediately queryable in chat. An existing sort is reused and moved under any parent the scenario newly names for it, through the governed move of POST /sorts/{id}/parents; a refused move is reported in `warnings` and leaves the sort where it was.
8723
8846
  *
8724
8847
  * @tags scenarios
8725
8848
  * @name MaterializeScenario
@@ -9324,7 +9447,7 @@ var Synthetic = class {
9324
9447
  ...params
9325
9448
  });
9326
9449
  /**
9327
- * @description Uses principled strategies to create training examples that are negative (invalid) for specific, documented reasons: sort incompatibility, feature perturbation, cross-sort confusion, missing required features, and feature type mismatch. # Authorization Requires X-Tenant-Id header for tenant-scoped operations.
9450
+ * @description Uses principled strategies to create training examples that are negative (invalid) for specific, documented reasons: a violation of each declared feature constraint (named in `violated_constraint`), sort incompatibility, feature perturbation, cross-sort confusion, missing required features, and feature type mismatch. Proposed sorts are included — negatives exist to test a model before it is approved; deprecated sorts are not. # Authorization Requires X-Tenant-Id header for tenant-scoped operations.
9328
9451
  *
9329
9452
  * @tags synthetic
9330
9453
  * @name GenerateNegatives
@@ -10223,6 +10346,23 @@ var Ontology = class {
10223
10346
  format: "json",
10224
10347
  ...params
10225
10348
  });
10349
+ /**
10350
+ * @description The fluent term about `of` with the latest `valid_from` not after `at` (default: now). 404 when the sort is unknown or no state is recorded by then.
10351
+ *
10352
+ * @tags ontology
10353
+ * @name CurrentFluentValue
10354
+ * @summary Current value of a fluent
10355
+ * @request GET:/api/v1/fluents/current
10356
+ * @secure
10357
+ */
10358
+ currentFluentValue = (query, params = {}) => this.http.request({
10359
+ path: `/api/v1/fluents/current`,
10360
+ method: "GET",
10361
+ query,
10362
+ secure: true,
10363
+ format: "json",
10364
+ ...params
10365
+ });
10226
10366
  /**
10227
10367
  * No description
10228
10368
  *
@@ -10275,6 +10415,22 @@ var Ontology = class {
10275
10415
  format: "json",
10276
10416
  ...params
10277
10417
  });
10418
+ /**
10419
+ * No description
10420
+ *
10421
+ * @tags ontology
10422
+ * @name GetOntologyScope
10423
+ * @summary Read the ontology's scope.
10424
+ * @request GET:/api/v1/ontology/scope
10425
+ * @secure
10426
+ */
10427
+ getOntologyScope = (params = {}) => this.http.request({
10428
+ path: `/api/v1/ontology/scope`,
10429
+ method: "GET",
10430
+ secure: true,
10431
+ format: "json",
10432
+ ...params
10433
+ });
10278
10434
  /**
10279
10435
  * No description
10280
10436
  *
@@ -10323,6 +10479,24 @@ var Ontology = class {
10323
10479
  format: "json",
10324
10480
  ...params
10325
10481
  });
10482
+ /**
10483
+ * No description
10484
+ *
10485
+ * @tags ontology
10486
+ * @name PutOntologyScope
10487
+ * @summary Set the ontology's scope (replaces it).
10488
+ * @request PUT:/api/v1/ontology/scope
10489
+ * @secure
10490
+ */
10491
+ putOntologyScope = (data, params = {}) => this.http.request({
10492
+ path: `/api/v1/ontology/scope`,
10493
+ method: "PUT",
10494
+ body: data,
10495
+ secure: true,
10496
+ type: "application/json",
10497
+ format: "json",
10498
+ ...params
10499
+ });
10326
10500
  /**
10327
10501
  * No description
10328
10502
  *
@@ -10341,6 +10515,19 @@ var Ontology = class {
10341
10515
  format: "json",
10342
10516
  ...params
10343
10517
  });
10518
+ /**
10519
+ * No description
10520
+ *
10521
+ * @tags ontology
10522
+ * @name UpperOntology
10523
+ * @summary Serve an embedded upper-ontology seed (`bfo-2020` or `cco-facility`) — the same OWL the lattice-grounding aligner uses, offered to the guided builder's vocabulary stage as an anchor to reuse rather than reinvent.
10524
+ * @request GET:/api/v1/ontology/upper/{name}
10525
+ */
10526
+ upperOntology = (name, params = {}) => this.http.request({
10527
+ path: `/api/v1/ontology/upper/${name}`,
10528
+ method: "GET",
10529
+ ...params
10530
+ });
10344
10531
  };
10345
10532
 
10346
10533
  // src/api-spec/generated/Generation.ts
@@ -13630,6 +13817,31 @@ var OntologyExport = class {
13630
13817
  });
13631
13818
  };
13632
13819
 
13820
+ // src/api-spec/generated/Argumentation.ts
13821
+ var Argumentation = class {
13822
+ http;
13823
+ constructor(http) {
13824
+ this.http = http;
13825
+ }
13826
+ /**
13827
+ * No description
13828
+ *
13829
+ * @tags argumentation
13830
+ * @name EvaluateArgumentation
13831
+ * @request POST:/api/v1/argumentation/evaluate
13832
+ * @secure
13833
+ */
13834
+ evaluateArgumentation = (data, params = {}) => this.http.request({
13835
+ path: `/api/v1/argumentation/evaluate`,
13836
+ method: "POST",
13837
+ body: data,
13838
+ secure: true,
13839
+ type: "application/json",
13840
+ format: "json",
13841
+ ...params
13842
+ });
13843
+ };
13844
+
13633
13845
  // src/api-spec/generated/Embeddings.ts
13634
13846
  var Embeddings = class {
13635
13847
  http;
@@ -15086,7 +15298,9 @@ function BulkRowRefusalFromApiToFront(dto) {
15086
15298
  return {
15087
15299
  index: dto.index,
15088
15300
  message: dto.message,
15089
- ...dto.feature ? { feature: dto.feature } : {}
15301
+ ...dto.feature ? { feature: dto.feature } : {},
15302
+ ...dto.constraint_name != null ? { constraintName: dto.constraint_name } : {},
15303
+ ...dto.constraint_message != null ? { constraintMessage: dto.constraint_message } : {}
15090
15304
  };
15091
15305
  }
15092
15306
  function ClearTermsResponseFromApiToFront(dto) {
@@ -15202,6 +15416,7 @@ function TermVersionDtoFromApiToFront(dto) {
15202
15416
  if (dto.diff != null) out.diff = VersionDiffDtoFromApiToFront(dto.diff);
15203
15417
  if (dto.follows_a_gap !== void 0) out.followsAGap = dto.follows_a_gap;
15204
15418
  if (dto.forked_to != null) out.forkedTo = dto.forked_to;
15419
+ if (dto.seeded !== void 0) out.seeded = dto.seeded;
15205
15420
  return out;
15206
15421
  }
15207
15422
  function TermVersionsResponseFromApiToFront(dto) {
@@ -15242,6 +15457,8 @@ function ConstraintDtoFromFrontToApi(model) {
15242
15457
  function FeatureDescriptorDtoFromApiToFront(dto) {
15243
15458
  return {
15244
15459
  name: dto.name,
15460
+ description: dto.description ?? void 0,
15461
+ index: dto.index ?? void 0,
15245
15462
  expectedSort: dto.expected_sort ?? void 0,
15246
15463
  expectedTypeHint: dto.expected_type_hint ?? void 0,
15247
15464
  // The spec made this optional and documents the default explicitly:
@@ -15252,31 +15469,33 @@ function FeatureDescriptorDtoFromApiToFront(dto) {
15252
15469
  // `undefined` for a question the wire already answers.
15253
15470
  required: dto.required ?? false,
15254
15471
  constraint: dto.constraint ? ConstraintDtoFromApiToFront(dto.constraint) : void 0,
15472
+ constraintName: dto.constraint_name ?? void 0,
15473
+ constraintMessage: dto.constraint_message ?? void 0,
15255
15474
  key: dto.key,
15256
15475
  expectedSortName: dto.expected_sort_name ?? void 0,
15257
15476
  minCount: dto.min_count ?? void 0,
15258
15477
  maxCount: dto.max_count ?? void 0,
15259
15478
  cardinalityOrigin: dto.cardinality_origin ?? void 0,
15260
- annotations: definedRecord2(dto.annotations),
15261
- description: dto.description ?? void 0,
15262
- index: dto.index ?? void 0
15479
+ annotations: definedRecord2(dto.annotations)
15263
15480
  };
15264
15481
  }
15265
15482
  function FeatureDescriptorDtoFromFrontToApi(model) {
15266
15483
  return {
15267
15484
  name: model.name,
15485
+ description: model.description ?? void 0,
15486
+ index: model.index ?? void 0,
15268
15487
  expected_sort: model.expectedSort ?? void 0,
15269
15488
  expected_type_hint: model.expectedTypeHint ?? void 0,
15270
15489
  required: model.required,
15271
15490
  constraint: model.constraint ? ConstraintDtoFromFrontToApi(model.constraint) : void 0,
15491
+ constraint_name: model.constraintName ?? void 0,
15492
+ constraint_message: model.constraintMessage ?? void 0,
15272
15493
  key: model.key,
15273
15494
  expected_sort_name: model.expectedSortName ?? void 0,
15274
15495
  min_count: model.minCount ?? void 0,
15275
15496
  max_count: model.maxCount ?? void 0,
15276
15497
  cardinality_origin: model.cardinalityOrigin ?? void 0,
15277
- annotations: model.annotations,
15278
- description: model.description ?? void 0,
15279
- index: model.index ?? void 0
15498
+ annotations: model.annotations
15280
15499
  };
15281
15500
  }
15282
15501
  function CoextensiveDefinitionDtoFromApiToFront(dto) {
@@ -15383,6 +15602,12 @@ function SortInfoDtoFromApiToFront(dto) {
15383
15602
  name: dto.name ?? void 0
15384
15603
  };
15385
15604
  }
15605
+ function SortResponseFromApiToFront(dto) {
15606
+ return {
15607
+ sort: SortDtoFromApiToFront(dto.sort),
15608
+ wokenResiduations: dto.woken_residuations ?? void 0
15609
+ };
15610
+ }
15386
15611
  function SortListResponseFromApiToFront(dto) {
15387
15612
  return {
15388
15613
  sorts: dto.sorts.map(SortDtoFromApiToFront),
@@ -15721,11 +15946,38 @@ function SortIndexStatusResponseFromApiToFront(dto) {
15721
15946
  if (dto.last_indexed_count != null) out.lastIndexedCount = dto.last_indexed_count;
15722
15947
  return out;
15723
15948
  }
15724
- function DeprecateSortRequestFromFrontToApi(model) {
15725
- const out = { replacement: model.replacement };
15949
+ function ApproveSortRequestFromFrontToApi(model) {
15950
+ const out = {};
15726
15951
  if (model.reason !== void 0) out.reason = model.reason;
15727
15952
  return out;
15728
15953
  }
15954
+ function DeprecateSortRequestFromFrontToApi(model) {
15955
+ const out = { reason: model.reason };
15956
+ if (model.replacement !== void 0) out.replacement = model.replacement;
15957
+ return out;
15958
+ }
15959
+ function FactorSortsRequestFromFrontToApi(model) {
15960
+ const out = {};
15961
+ if (model.sortIds !== void 0) out.sort_ids = model.sortIds;
15962
+ if (model.minSorts !== void 0) out.min_sorts = model.minSorts;
15963
+ return out;
15964
+ }
15965
+ function FactorSharedFeatureFromApiToFront(dto) {
15966
+ const out = { name: dto.name, required: dto.required };
15967
+ if (dto.expected_sort != null) out.expectedSort = dto.expected_sort;
15968
+ if (dto.expected_type_hint != null) out.expectedTypeHint = dto.expected_type_hint;
15969
+ if (dto.constraint != null) out.constraint = ConstraintDtoFromApiToFront(dto.constraint);
15970
+ return out;
15971
+ }
15972
+ function FactorSortsResponseFromApiToFront(dto) {
15973
+ return {
15974
+ proposals: dto.proposals.map((p) => ({
15975
+ memberSorts: p.member_sorts.map((m) => ({ id: m.id, name: m.name })),
15976
+ sharedFeatures: p.shared_features.map(FactorSharedFeatureFromApiToFront),
15977
+ suggestedName: p.suggested_name
15978
+ }))
15979
+ };
15980
+ }
15729
15981
  function PatchSortRequestFromFrontToApi(model) {
15730
15982
  const out = {};
15731
15983
  if (model.name !== void 0) out.name = model.name;
@@ -15737,10 +15989,6 @@ function PatchSortRequestFromFrontToApi(model) {
15737
15989
  if (model.scopeNote !== void 0) out.scope_note = model.scopeNote;
15738
15990
  if (model.annotations !== void 0) out.annotations = model.annotations;
15739
15991
  if (model.worldMode !== void 0) out.world_mode = model.worldMode;
15740
- if (model.approveProposed !== void 0) out.approve_proposed = model.approveProposed;
15741
- if (model.deprecate !== void 0) {
15742
- out.deprecate = model.deprecate === null ? null : DeprecateSortRequestFromFrontToApi(model.deprecate);
15743
- }
15744
15992
  return out;
15745
15993
  }
15746
15994
  function DeleteSortOptionsFromFrontToApi(options) {
@@ -15763,6 +16011,14 @@ function DeleteSortResponseFromApiToFront(dto) {
15763
16011
  if (dto.rules_orphaned !== void 0) {
15764
16012
  out.rulesOrphaned = dto.rules_orphaned.map(SortReferencingRuleDtoFromApiToFront);
15765
16013
  }
16014
+ if (dto.sorts_deleted !== void 0) out.sortsDeleted = dto.sorts_deleted;
16015
+ return out;
16016
+ }
16017
+ function EditSortParentsRequestFromFrontToApi(model) {
16018
+ const out = {};
16019
+ if (model.add !== void 0) out.add = model.add;
16020
+ if (model.remove !== void 0) out.remove = model.remove;
16021
+ if (model.reason !== void 0) out.reason = model.reason;
15766
16022
  return out;
15767
16023
  }
15768
16024
  function SortReferencingRuleDtoFromApiToFront(dto) {
@@ -15930,8 +16186,8 @@ var SortsClient = class {
15930
16186
  return SortDtoFromApiToFront(response.data.sort);
15931
16187
  }
15932
16188
  /**
15933
- * Curate a sort's vocabulary and lifecycle: rename, describe, label,
15934
- * relate, annotate, approve or deprecate it.
16189
+ * Curate a sort's vocabulary: rename, describe, label, relate, annotate it,
16190
+ * or change its world mode.
15935
16191
  *
15936
16192
  * @param sortId - Sort UUID.
15937
16193
  * @param request - The fields to change. Only present fields mutate.
@@ -15968,6 +16224,109 @@ var SortsClient = class {
15968
16224
  );
15969
16225
  return SortDtoFromApiToFront(response.data.sort);
15970
16226
  }
16227
+ /**
16228
+ * Approve a candidate sort: promote it from `Proposed` to `Active`.
16229
+ *
16230
+ * @param sortId - Sort UUID.
16231
+ * @param request - Optionally, why the steward accepted it.
16232
+ * @returns The approved sort, and how much suspended work its declaration
16233
+ * released (`wokenResiduations`).
16234
+ * @throws {ForbiddenError} 403 when the caller holds no Manage grant on the
16235
+ * sort, or — with `code: "separation_of_duties"` in the body (see
16236
+ * `SortApprovalErrorCode`; read it with `errorBodyCode`) — when the
16237
+ * acting user (`authenticatedUser`) is the sort's recorded proposer.
16238
+ * Another steward can approve it.
16239
+ * @throws {NotFoundError} 404 when the sort does not exist.
16240
+ * @throws {ApiError} 409 when the sort is not awaiting approval.
16241
+ *
16242
+ * @remarks
16243
+ * Appends an approval decision to the compliance ledger, with the
16244
+ * authenticated user as reviewer. This replaced `approveProposed` on
16245
+ * {@link SortsClient.patchSort}, which the engine now refuses.
16246
+ *
16247
+ * Separation of duties is enforced by the engine: the proposer's own
16248
+ * approval is refused with the coded 403 and recorded in the oversight
16249
+ * ledger as a `rejected` decision on `sort.approve.refused`.
16250
+ *
16251
+ * @example
16252
+ * ```typescript
16253
+ * try {
16254
+ * const { sort, wokenResiduations } = await client.sorts.approveSort(sortId, {
16255
+ * reason: 'Matches the order lifecycle use case',
16256
+ * });
16257
+ * } catch (error) {
16258
+ * if (errorBodyCode(error) === 'separation_of_duties') {
16259
+ * // The acting user proposed this sort: ask another steward to approve it.
16260
+ * }
16261
+ * }
16262
+ * ```
16263
+ */
16264
+ async approveSort(sortId, request = {}, requestOptions) {
16265
+ const response = await this.sorts.approveSort(
16266
+ sortId,
16267
+ ApproveSortRequestFromFrontToApi(request),
16268
+ toRequestParams(requestOptions)
16269
+ );
16270
+ return SortResponseFromApiToFront(response.data);
16271
+ }
16272
+ /**
16273
+ * Deprecate a sort: reject a candidate, or retire an active concept,
16274
+ * optionally in favour of a replacement.
16275
+ *
16276
+ * @param sortId - Sort UUID.
16277
+ * @param request - Why (required), and the replacement's id or name.
16278
+ * @returns The deprecated sort.
16279
+ * @throws {BadRequestError} 400 when `reason` is empty or the replacement does not exist.
16280
+ * @throws {ForbiddenError} 403 when the caller holds no Manage grant on the sort.
16281
+ * @throws {NotFoundError} 404 when the sort does not exist.
16282
+ *
16283
+ * @remarks
16284
+ * Appends a rejection decision to the compliance ledger. `replacement`
16285
+ * accepts a sort id or a sort name in this tenant. This replaced the
16286
+ * `deprecate` arm of {@link SortsClient.patchSort}, which the engine now
16287
+ * refuses.
16288
+ *
16289
+ * @example
16290
+ * ```typescript
16291
+ * await client.sorts.deprecateSort(sortId, {
16292
+ * reason: 'Duplicate of customer',
16293
+ * replacement: 'customer',
16294
+ * });
16295
+ * ```
16296
+ */
16297
+ async deprecateSort(sortId, request, requestOptions) {
16298
+ const response = await this.sorts.deprecateSort(
16299
+ sortId,
16300
+ DeprecateSortRequestFromFrontToApi(request),
16301
+ toRequestParams(requestOptions)
16302
+ );
16303
+ return SortResponseFromApiToFront(response.data);
16304
+ }
16305
+ /**
16306
+ * Propose mixin parents for feature shapes several sorts repeat unchanged.
16307
+ *
16308
+ * @param request - Which sorts to analyse (default: all), and the least
16309
+ * number of sorts a proposal must cover (default and floor: 2).
16310
+ * @returns Candidate parents, most shared declarations first.
16311
+ * @throws {ApiError} If the request fails.
16312
+ *
16313
+ * @remarks
16314
+ * Deterministic and read-only: it groups sorts over identical feature +
16315
+ * constraint declarations. `suggestedName` is a placeholder to rename
16316
+ * before creating the parent.
16317
+ *
16318
+ * @example
16319
+ * ```typescript
16320
+ * const { proposals } = await client.sorts.factorSorts({ minSorts: 3 });
16321
+ * ```
16322
+ */
16323
+ async factorSorts(request = {}, requestOptions) {
16324
+ const response = await this.sorts.factorSortShapes(
16325
+ FactorSortsRequestFromFrontToApi(request),
16326
+ toRequestParams(requestOptions)
16327
+ );
16328
+ return FactorSortsResponseFromApiToFront(response.data);
16329
+ }
15971
16330
  /**
15972
16331
  * Delete a sort by ID.
15973
16332
  *
@@ -16079,6 +16438,47 @@ var SortsClient = class {
16079
16438
  );
16080
16439
  return SortDeletePreviewResponseFromApiToFront(response.data);
16081
16440
  }
16441
+ /**
16442
+ * Add and remove parents of a sort — a steward's governed move in the lattice.
16443
+ *
16444
+ * @param sortId - Sort UUID.
16445
+ * @param request - Parents to add and to remove (by id or by name), and why.
16446
+ * @returns The move's report — what moved, what each sort's inheritance
16447
+ * gained and lost, the terms and rules concerned — with the sort as it now
16448
+ * stands.
16449
+ * @throws {ForbiddenError} 403 without `Manage` on the sort and on every
16450
+ * parent added or removed.
16451
+ * @throws {NotFoundError} 404 when the sort does not exist.
16452
+ * @throws {ApiError} 422, with nothing changed, for an unknown parent, a
16453
+ * parent to remove that is not one, an empty edit, the sort itself, a
16454
+ * parent below the sort (a cycle), or any state the move would make
16455
+ * contradictory (⊥).
16456
+ *
16457
+ * @remarks
16458
+ * The sort keeps every other parent in its current order; added ones go last.
16459
+ * The move is the one {@link SortsClient.reparentSort} runs: the sort keeps
16460
+ * its id and record, its subtree moves with it, inherited declarations and
16461
+ * the subsumption caches are repaired. A change appends an oversight
16462
+ * decision to the audit ledger naming the reviewer.
16463
+ *
16464
+ * @example
16465
+ * ```typescript
16466
+ * const moved = await client.sorts.editSortParents(sortId, {
16467
+ * add: ['vehicle'],
16468
+ * remove: ['thing'],
16469
+ * reason: 'A truck is a vehicle',
16470
+ * });
16471
+ * console.log(moved.inheritanceChanges);
16472
+ * ```
16473
+ */
16474
+ async editSortParents(sortId, request, requestOptions) {
16475
+ const response = await this.sorts.editSortParents(
16476
+ sortId,
16477
+ EditSortParentsRequestFromFrontToApi(request),
16478
+ toRequestParams(requestOptions)
16479
+ );
16480
+ return SortReparentResponseFromApiToFront(response.data);
16481
+ }
16082
16482
  /**
16083
16483
  * Move a sort in the lattice: replace its parent set.
16084
16484
  *
@@ -17936,6 +18336,21 @@ function ResidualDerivationDtoFromApiToFront(dto) {
17936
18336
  function AddRuleResponseFromApiToFront(dto) {
17937
18337
  return { term: PsiTermDtoFromApiToFront(dto.term) };
17938
18338
  }
18339
+ function RuleValidationResponseFromApiToFront(dto) {
18340
+ const issue = (i) => ({
18341
+ kind: i.kind,
18342
+ message: i.message,
18343
+ ...i.status != null ? { status: i.status } : {}
18344
+ });
18345
+ const out = {
18346
+ ok: dto.ok,
18347
+ refusals: dto.refusals.map(issue),
18348
+ warnings: dto.warnings.map(issue)
18349
+ };
18350
+ if (dto.rule !== void 0)
18351
+ out.rule = dto.rule === null ? null : PsiTermDtoFromApiToFront(dto.rule);
18352
+ return out;
18353
+ }
17939
18354
  function AddFactResponseFromApiToFront(dto) {
17940
18355
  return { term: PsiTermDtoFromApiToFront(dto.term) };
17941
18356
  }
@@ -18481,7 +18896,8 @@ function RuleTermDraftDtoFromApiToFront(dto) {
18481
18896
  // The engine types each value as a scalar (`RuleDraftFeatureValueDto`) and
18482
18897
  // refuses a draft carrying anything else, so the map passes through; only
18483
18898
  // the generated `Partial` is narrowed to a total record.
18484
- features: definedRecordOrNullish(dto.features)
18899
+ features: definedRecordOrNullish(dto.features),
18900
+ ...dto.negated === true ? { negated: true } : {}
18485
18901
  };
18486
18902
  }
18487
18903
  function RuleDraftDtoFromApiToFront(dto) {
@@ -18555,11 +18971,23 @@ var InferenceClient = class {
18555
18971
  * @param request - Rule definition using TermInputDto. Set `aggregator` to declare an
18556
18972
  * engine-side head aggregator (see {@link RuleAggregatorDto}).
18557
18973
  * @returns The created rule wrapped in an AddRuleResponse.
18558
- * @throws {ApiError} If the rule is rejected or the request fails.
18974
+ * @throws {ApiError} If the rule is rejected or the request fails — 422 when
18975
+ * it is unusable as written: a head or body antecedent naming a sort or
18976
+ * term that does not exist (the message names it and its position — `the
18977
+ * head (conclusion)` or `body antecedent N`), a guard bound the declared
18978
+ * type cannot compare, a binder on the conclusion, or a rule that closes a
18979
+ * NEW cycle through negation (no stratification would order the program; a
18980
+ * cycle the program already had is not blamed on it). The refusal is a
18981
+ * plain {@link ApiError} with `status` 422 — not a `BadRequestError`
18982
+ * (earlier engines answered an unknown head sort with 400), and not a
18983
+ * `NamedConstraintViolationError`, which is reserved for a feature
18984
+ * constraint's refusal.
18559
18985
  *
18560
18986
  * @remarks
18561
18987
  * **Serialization format**: untagged `TermInputDto` / `FeatureInputValueDto`.
18562
18988
  *
18989
+ * Ask {@link InferenceClient.validateRule} first to learn every reason the
18990
+ * write would refuse, without writing.
18563
18991
  * A `{ termId }` reference to a term that is durable but not yet loaded
18564
18992
  * into the engine process resolves: the route loads the terms the request
18565
18993
  * names before it converts them.
@@ -18586,6 +19014,45 @@ var InferenceClient = class {
18586
19014
  );
18587
19015
  return AddRuleResponseFromApiToFront(response.data);
18588
19016
  }
19017
+ /**
19018
+ * Run every check {@link InferenceClient.addRule} runs — without writing.
19019
+ *
19020
+ * @param request - The same rule `addRule` takes.
19021
+ * @returns Whether the write would accept it (`ok`), every refusal with the
19022
+ * status the write would answer, the NAF-safety warnings, and the rule as
19023
+ * the write would build it.
19024
+ * @throws {ApiError} If the request itself fails.
19025
+ *
19026
+ * @remarks
19027
+ * The rule is built into a scratch copy of the tenant's store: sorts and
19028
+ * referenced terms resolve, guard bounds compare with their declared types,
19029
+ * nested negation, binders, range restriction, the aggregator, the
19030
+ * homoiconic encoding, and stratification (a NEW cycle through negation is
19031
+ * an `unstratifiable` refusal). Nothing is written, persisted or propagated.
19032
+ * **Serialization format**: untagged `TermInputDto` / `FeatureInputValueDto`.
19033
+ *
19034
+ * @example
19035
+ * ```typescript
19036
+ * const check = await client.inference.validateRule({
19037
+ * term: psi('adult', { name: Var('N') }),
19038
+ * antecedents: [psi('person', { name: Var('N') })],
19039
+ * });
19040
+ * if (!check.ok) for (const r of check.refusals) console.warn(r.kind, r.message);
19041
+ * ```
19042
+ */
19043
+ async validateRule(request, requestOptions) {
19044
+ const wireRequest = {
19045
+ term: convertTermArg(request.term),
19046
+ antecedents: request.antecedents?.map(convertTermArg),
19047
+ certainty: request.certainty,
19048
+ aggregator: request.aggregator
19049
+ };
19050
+ const response = await this.api.validateRule(
19051
+ AddRuleRequestFromFrontToApi(wireRequest),
19052
+ toRequestParams(requestOptions)
19053
+ );
19054
+ return RuleValidationResponseFromApiToFront(response.data);
19055
+ }
18589
19056
  /**
18590
19057
  * Add a fact.
18591
19058
  *
@@ -18622,7 +19089,9 @@ var InferenceClient = class {
18622
19089
  * its index in `request.rules`, with the engine's reason (for example
18623
19090
  * `rule head term did not resolve: it names sort \`x\`, which this
18624
19091
  * tenant's sort hierarchy does not define`). `rulesAdded` plus
18625
- * `rejected.length` equals the number submitted.
19092
+ * `rejected.length` equals the number submitted. A rule that closes a NEW
19093
+ * cycle through negation is refused the same way (the reason names the
19094
+ * cycle's sorts), decided for every row before any row is written.
18626
19095
  *
18627
19096
  * @example
18628
19097
  * ```typescript
@@ -19162,7 +19631,10 @@ var InferenceClient = class {
19162
19631
  * `{"type": "String", "value": "..."}` envelope. The engine refuses a model answer that
19163
19632
  * carries one, re-prompts, and answers 422 when the model keeps producing it. Each
19164
19633
  * {@link RuleTermDraftDto} maps directly onto a `TermInputDto` inline-by-sort-name
19165
- * term, so an approved draft can be handed straight to {@link addRule}.
19634
+ * term, so an approved draft can be handed straight to {@link addRule} — except an
19635
+ * antecedent with `negated: true`, which must be wrapped in the `negation` carrier
19636
+ * (`not(psi(sortName, features))`); sent bare, it would assert the positive
19637
+ * condition.
19166
19638
  *
19167
19639
  * Drafting is multi-turn: if `status` is `'needs_clarification'`, answer each question
19168
19640
  * and call again with the echoed `sessionId` and an `answers` map keyed by the question's
@@ -19405,6 +19877,7 @@ function NlQueryRequestFromFrontToApi(model) {
19405
19877
  mode: model.mode,
19406
19878
  tenant_id: model.tenantId,
19407
19879
  conversation_history: model.conversationHistory ?? void 0,
19880
+ focus_sorts: model.focusSorts ?? void 0,
19408
19881
  session_id: model.sessionId ?? void 0,
19409
19882
  exclude_domains: model.excludeDomains ?? void 0,
19410
19883
  focus_proposal: model.focusProposal ?? void 0,
@@ -19710,6 +20183,10 @@ var QueryClient = class {
19710
20183
  * @remarks
19711
20184
  * Plain JSON, no tagged/untagged value serialization.
19712
20185
  *
20186
+ * In llm mode, `focusSorts` names the sorts the question is about: each is
20187
+ * always in the schema the translator sees, even a sort built a moment ago
20188
+ * with no records, which the record-count ranking would otherwise cut.
20189
+ *
19713
20190
  * TRIZ mode (`mode: "triz"`) is multi-turn:
19714
20191
  * 1. A request with no `sessionId` opens a session, structures the problem
19715
20192
  * (reading any `images` first) and solves it. The response names the
@@ -21111,13 +21588,23 @@ var CognitiveClient = class {
21111
21588
  * Uses POST `/api/v1/cognitive/agents/messages/inbox`. The inbox is per-agent;
21112
21589
  * aggregate across a roster by calling this for each agent.
21113
21590
  */
21114
- async getInbox(request, requestOptions) {
21115
- const response = await this.messaging.getInbox(
21591
+ async getAgentInbox(request, requestOptions) {
21592
+ const response = await this.messaging.getAgentInbox(
21116
21593
  GetInboxRequestFromFrontToApi({ ...request, tenantId: this.tenantId }),
21117
21594
  toRequestParams(requestOptions)
21118
21595
  );
21119
21596
  return GetInboxResponseFromApiToFront(response.data);
21120
21597
  }
21598
+ /**
21599
+ * Get an agent's inbox.
21600
+ *
21601
+ * @deprecated Renamed to {@link CognitiveClient.getAgentInbox} when the engine
21602
+ * renamed the operation (`get_inbox` → `get_agent_inbox`); kept so existing
21603
+ * callers keep compiling. Same request, same response.
21604
+ */
21605
+ async getInbox(request, requestOptions) {
21606
+ return this.getAgentInbox(request, requestOptions);
21607
+ }
21121
21608
  // --- Feedback ---
21122
21609
  /**
21123
21610
  * Provide feedback on an agent result.
@@ -30773,6 +31260,8 @@ function GetScenarioResponseFromApiToFront(dto) {
30773
31260
  }
30774
31261
  function MaterializeScenarioRequestFromFrontToApi(model) {
30775
31262
  return {
31263
+ // Accepted: the scenario is opaque user data sent verbatim (RAW_BODY_HEADER,
31264
+ // #39); the engine validates its shape, so the SDK does not re-type it.
30776
31265
  scenario: model.scenario
30777
31266
  };
30778
31267
  }
@@ -30786,7 +31275,11 @@ function MaterializeScenarioResponseFromApiToFront(dto) {
30786
31275
  rulesCreated: dto.rules_created,
30787
31276
  sensorPointsCreated: dto.sensor_points_created,
30788
31277
  sortsCreated: dto.sorts_created,
30789
- warnings: dto.warnings
31278
+ warnings: dto.warnings,
31279
+ ...dto.competency_questions_created !== void 0 ? { competencyQuestionsCreated: dto.competency_questions_created } : {},
31280
+ ...dto.computed_features_created !== void 0 ? { computedFeaturesCreated: dto.computed_features_created } : {},
31281
+ ...dto.fluents_created !== void 0 ? { fluentsCreated: dto.fluents_created } : {},
31282
+ ...dto.proposed_sort_ids !== void 0 ? { proposedSortIds: dto.proposed_sort_ids } : {}
30790
31283
  };
30791
31284
  }
30792
31285
  function UpdateScenarioRequestFromFrontToApi(model) {
@@ -30906,6 +31399,19 @@ var ScenariosClient = class {
30906
31399
  * written. No value-level serialization split applies. Response fields are
30907
31400
  * normalized from snake_case to camelCase.
30908
31401
  *
31402
+ * Staged builder: sorts marked `proposed: true` land as `Proposed` candidates
31403
+ * (their ids in `proposedSortIds`, awaiting a steward's approval), and the
31404
+ * scenario's use cases and competency questions are recorded as `proposed`
31405
+ * competency questions.
31406
+ *
31407
+ * A sort (or fluent) may carry `provenance` — see {@link ScenarioSortProvenance} —
31408
+ * recorded as its origin; without it the sort is credited to the caller.
31409
+ *
31410
+ * An existing sort is reused, and moved under any parent the scenario newly names
31411
+ * for it through the same governed move as `SortsClient.editSortParents`. A move the
31412
+ * engine refuses leaves the sort where it was and is reported in `warnings`, not
31413
+ * as an error — read `warnings` after every call.
31414
+ *
30909
31415
  * @example
30910
31416
  * ```typescript
30911
31417
  * const result = await client.scenarios.materializeScenario({ scenario: generated });
@@ -32631,7 +33137,8 @@ function StartExplorationRequestFromFrontToApi(model) {
32631
33137
  max_concepts: model.maxConcepts,
32632
33138
  min_extent_size: model.minExtentSize,
32633
33139
  min_intent_size: model.minIntentSize,
32634
- max_terms: model.maxTerms
33140
+ max_terms: model.maxTerms,
33141
+ ...model.sortNames !== void 0 ? { sort_names: model.sortNames } : {}
32635
33142
  };
32636
33143
  }
32637
33144
  function StartExplorationResponseFromApiToFront(dto) {
@@ -33913,17 +34420,30 @@ function CheckDiversityResponseFromApiToFront(dto) {
33913
34420
  termsCompared: dto.terms_compared
33914
34421
  };
33915
34422
  }
34423
+ function ViolatedConstraintDtoFromApiToFront(dto) {
34424
+ return {
34425
+ feature: dto.feature,
34426
+ kind: dto.kind,
34427
+ ...dto.constraint_name != null ? { constraintName: dto.constraint_name } : {},
34428
+ ...dto.constraint_message != null ? { constraintMessage: dto.constraint_message } : {}
34429
+ };
34430
+ }
33916
34431
  function NegativeExampleDtoFromApiToFront(dto) {
33917
34432
  return {
33918
34433
  explanation: dto.explanation,
33919
34434
  rejectionReason: dto.rejection_reason,
33920
34435
  sortId: dto.sort_id,
33921
34436
  strategy: dto.strategy,
33922
- termId: dto.term_id
34437
+ termId: dto.term_id,
34438
+ ...dto.sort != null ? { sort: dto.sort } : {},
34439
+ ...dto.features != null ? { features: Object.fromEntries(Object.entries(dto.features)) } : {},
34440
+ ...dto.world_mode != null ? { worldMode: dto.world_mode } : {},
34441
+ ...dto.violated_constraint != null ? { violatedConstraint: ViolatedConstraintDtoFromApiToFront(dto.violated_constraint) } : {}
33923
34442
  };
33924
34443
  }
33925
34444
  function GenerateNegativesRequestFromFrontToApi(model) {
33926
34445
  return {
34446
+ enable_constraint_violation: model.enableConstraintViolation,
33927
34447
  enable_cross_sort_confusion: model.enableCrossSortConfusion,
33928
34448
  enable_feature_perturbation: model.enableFeaturePerturbation,
33929
34449
  enable_sort_incompatibility: model.enableSortIncompatibility,
@@ -34200,6 +34720,30 @@ var SyntheticClient = class {
34200
34720
  * @param request - Negative generation parameters including target sorts and strategy flags.
34201
34721
  * @returns Generated negative examples with provenance.
34202
34722
  * @throws {ApiError} If the request fails.
34723
+ *
34724
+ * @remarks
34725
+ * Each negative is invalid for a documented reason, named by its
34726
+ * `strategy`: a violation of each declared feature constraint
34727
+ * (`ConstraintViolation`, one negative per enum / range / pattern /
34728
+ * maximum-cardinality constraint, with the constraint in
34729
+ * `violatedConstraint`), sort incompatibility, feature perturbation,
34730
+ * cross-sort confusion, a missing required feature, or a feature type
34731
+ * mismatch. Set `enableConstraintViolation: false` to skip the first.
34732
+ *
34733
+ * Proposed sorts are included — negatives exist to test a model before it
34734
+ * is approved; deprecated sorts are not.
34735
+ *
34736
+ * @example
34737
+ * ```typescript
34738
+ * const { negatives } = await client.synthetic.generateNegatives({
34739
+ * targetSorts: [pizzaSortId],
34740
+ * });
34741
+ * for (const n of negatives) {
34742
+ * if (n.violatedConstraint) {
34743
+ * console.log(n.violatedConstraint.feature, n.violatedConstraint.constraintMessage);
34744
+ * }
34745
+ * }
34746
+ * ```
34203
34747
  */
34204
34748
  async generateNegatives(request, requestOptions) {
34205
34749
  const response = await this.api.generateNegatives(
@@ -35440,12 +35984,15 @@ var ImageExtractionClient = class {
35440
35984
 
35441
35985
  // src/normalizers/ontology.ts
35442
35986
  function GenerateOntologyRequestFromFrontToApi(model) {
35443
- return {
35987
+ const out = {
35444
35988
  answers: model.answers,
35445
35989
  prompt: model.prompt,
35446
35990
  session_id: model.sessionId,
35447
35991
  tenant_id: model.tenantId
35448
35992
  };
35993
+ if (model.stage !== void 0) out.stage = model.stage;
35994
+ if (model.draft !== void 0) out.draft = model.draft;
35995
+ return out;
35449
35996
  }
35450
35997
  function GenerateOntologyResponseFromApiToFront(dto) {
35451
35998
  if (dto.status === "needs_clarification") {
@@ -35456,6 +36003,15 @@ function GenerateOntologyResponseFromApiToFront(dto) {
35456
36003
  understood: dto.understood
35457
36004
  };
35458
36005
  }
36006
+ if (dto.status === "patch") {
36007
+ const out = {
36008
+ stage: dto.stage,
36009
+ patch: dto.patch,
36010
+ status: dto.status
36011
+ };
36012
+ if (dto.notes != null) out.notes = dto.notes;
36013
+ return out;
36014
+ }
35459
36015
  return {
35460
36016
  existingSortsCount: dto.existing_sorts_count,
35461
36017
  generationTimeMs: dto.generation_time_ms,
@@ -35517,18 +36073,28 @@ function PipelineStatusResponseFromApiToFront(dto) {
35517
36073
  };
35518
36074
  }
35519
36075
  function CompetencyQuestionFromApiToFront(dto) {
35520
- return {
36076
+ const out = {
35521
36077
  key: dto.key,
35522
36078
  question: dto.question,
35523
- osfql: dto.osfql,
35524
36079
  kind: dto.kind,
35525
36080
  origin: dto.origin,
35526
- status: dto.status,
35527
- expected: dto.expected
36081
+ osfql: dto.osfql,
36082
+ expected: dto.expected,
36083
+ status: dto.status
35528
36084
  };
36085
+ if (dto.description != null) out.description = dto.description;
36086
+ if (dto.use_case != null) out.useCase = dto.use_case;
36087
+ if (dto.sorts !== void 0) out.sorts = dto.sorts;
36088
+ return out;
35529
36089
  }
35530
36090
  function CreateCompetencyQuestionRequestFromFrontToApi(model) {
35531
- return { question: model.question, osfql: model.osfql, kind: model.kind };
36091
+ const out = { question: model.question };
36092
+ if (model.kind !== void 0) out.kind = model.kind;
36093
+ if (model.osfql !== void 0) out.osfql = model.osfql;
36094
+ if (model.description !== void 0) out.description = model.description;
36095
+ if (model.useCase !== void 0) out.use_case = model.useCase;
36096
+ if (model.sorts !== void 0) out.sorts = model.sorts;
36097
+ return out;
35532
36098
  }
35533
36099
  function ListCompetencyQuestionsResponseFromApiToFront(dto) {
35534
36100
  return {
@@ -35642,6 +36208,44 @@ function EnrichOntologyResponseFromApiToFront(dto) {
35642
36208
  applied: dto.applied
35643
36209
  };
35644
36210
  }
36211
+ function OntologyScopeFromFrontToApi(model) {
36212
+ const out = {
36213
+ purpose: model.purpose,
36214
+ dynamics: model.dynamics,
36215
+ write_mode: model.writeMode
36216
+ };
36217
+ if (model.inScope !== void 0) out.in_scope = model.inScope;
36218
+ if (model.outOfScope !== void 0) out.out_of_scope = model.outOfScope;
36219
+ if (model.deferred !== void 0) out.deferred = model.deferred;
36220
+ if (model.notes !== void 0) out.notes = model.notes;
36221
+ return out;
36222
+ }
36223
+ function OntologyScopeResponseFromApiToFront(dto) {
36224
+ const out = {
36225
+ purpose: dto.purpose,
36226
+ inScope: dto.in_scope ?? [],
36227
+ outOfScope: dto.out_of_scope ?? [],
36228
+ deferred: dto.deferred ?? [],
36229
+ dynamics: dto.dynamics,
36230
+ writeMode: dto.write_mode,
36231
+ updatedAt: dto.updated_at
36232
+ };
36233
+ if (dto.notes != null) out.notes = dto.notes;
36234
+ if (dto.updated_by != null) out.updatedBy = dto.updated_by;
36235
+ return out;
36236
+ }
36237
+ function CurrentFluentResponseFromApiToFront(dto) {
36238
+ const out = {
36239
+ sort: dto.sort,
36240
+ of: dto.of,
36241
+ at: dto.at,
36242
+ termId: dto.term_id,
36243
+ value: dto.value,
36244
+ validFrom: dto.valid_from
36245
+ };
36246
+ if (dto.generated_by != null) out.generatedBy = dto.generated_by;
36247
+ return out;
36248
+ }
35645
36249
 
35646
36250
  // src/resources/ontology.ts
35647
36251
  var OntologyClient = class {
@@ -35663,6 +36267,13 @@ var OntologyClient = class {
35663
36267
  * If the response status is `"needs_clarification"`, supply `sessionId`
35664
36268
  * and `answers` on the next call to complete the generation.
35665
36269
  *
36270
+ * Staged builder: with `stage` (and the current `draft`), the response is
36271
+ * `{ status: 'patch', stage, patch, notes? }` — that stage's scenario keys
36272
+ * alone, to merge into the draft.
36273
+ *
36274
+ * The body is sent verbatim (no key re-casing): `draft` is scenario JSON
36275
+ * whose nested keys include the user's own feature names.
36276
+ *
35666
36277
  * @example
35667
36278
  * ```typescript
35668
36279
  * // First call -- may need clarification
@@ -35678,12 +36289,20 @@ var OntologyClient = class {
35678
36289
  * answers: { priority_levels: '3' },
35679
36290
  * });
35680
36291
  * }
36292
+ *
36293
+ * // Staged: one stage's patch over the current draft
36294
+ * const step = await client.ontology.generate({
36295
+ * prompt: 'Build a customer support ticket system',
36296
+ * stage: 'sorts',
36297
+ * draft,
36298
+ * });
36299
+ * if (step.status === 'patch') Object.assign(draft, step.patch);
35681
36300
  * ```
35682
36301
  */
35683
36302
  async generate(request, requestOptions) {
35684
36303
  const response = await this.api.generate(
35685
36304
  GenerateOntologyRequestFromFrontToApi(request),
35686
- toRequestParams(requestOptions)
36305
+ mergeRequestParams({ headers: { [RAW_BODY_HEADER]: "1" } }, requestOptions)
35687
36306
  );
35688
36307
  return GenerateOntologyResponseFromApiToFront(response.data);
35689
36308
  }
@@ -35883,6 +36502,118 @@ var OntologyClient = class {
35883
36502
  );
35884
36503
  return EnrichOntologyResponseFromApiToFront(response.data);
35885
36504
  }
36505
+ /**
36506
+ * Read the ontology's scope.
36507
+ *
36508
+ * @returns The stored scope, or `null` when none has been set.
36509
+ * @throws {ApiError} If the request fails for a reason other than "no scope".
36510
+ *
36511
+ * @remarks
36512
+ * One scope per tenant, or per namespace when `X-Namespace-Id` is sent. The
36513
+ * engine answers 404 when none was set; that is an expected state for a new
36514
+ * ontology, so it reads as `null` rather than an error.
36515
+ *
36516
+ * @example
36517
+ * ```typescript
36518
+ * const scope = await client.ontology.getScope();
36519
+ * if (scope === null) {
36520
+ * // first visit: ask the user what the ontology is for
36521
+ * }
36522
+ * ```
36523
+ */
36524
+ async getScope(requestOptions) {
36525
+ try {
36526
+ const response = await this.api.getOntologyScope(toRequestParams(requestOptions));
36527
+ return OntologyScopeResponseFromApiToFront(response.data);
36528
+ } catch (error) {
36529
+ if (error instanceof ApiError && error.status === 404) {
36530
+ return null;
36531
+ }
36532
+ throw error;
36533
+ }
36534
+ }
36535
+ /**
36536
+ * Set the ontology's scope, replacing the stored one.
36537
+ *
36538
+ * @param scope - Purpose, coverage, dynamics and write mode.
36539
+ * @returns The stored scope with its provenance.
36540
+ * @throws {BadRequestError} If `purpose` is empty.
36541
+ *
36542
+ * @example
36543
+ * ```typescript
36544
+ * await client.ontology.putScope({
36545
+ * purpose: 'Answer questions about late deliveries',
36546
+ * inScope: ['orders', 'shipments'],
36547
+ * dynamics: 'dynamic',
36548
+ * writeMode: 'append',
36549
+ * });
36550
+ * ```
36551
+ */
36552
+ async putScope(scope, requestOptions) {
36553
+ const response = await this.api.putOntologyScope(
36554
+ OntologyScopeFromFrontToApi(scope),
36555
+ toRequestParams(requestOptions)
36556
+ );
36557
+ return OntologyScopeResponseFromApiToFront(response.data);
36558
+ }
36559
+ /**
36560
+ * Fetch an embedded upper-ontology seed as OWL RDF/XML.
36561
+ *
36562
+ * @param name - `bfo-2020` or `cco-facility`.
36563
+ * @returns The OWL document, as text.
36564
+ * @throws {NotFoundError} If the name is not an embedded upper ontology.
36565
+ *
36566
+ * @remarks
36567
+ * The same OWL the lattice-grounding aligner uses, offered as an anchor to
36568
+ * reuse rather than reinvent. The response is `application/rdf+xml`, not JSON.
36569
+ *
36570
+ * @example
36571
+ * ```typescript
36572
+ * const owl = await client.ontology.getUpperOntology('bfo-2020');
36573
+ * ```
36574
+ */
36575
+ async getUpperOntology(name, requestOptions) {
36576
+ const response = await this.api.http.request({
36577
+ ...toRequestParams(requestOptions),
36578
+ path: `/api/v1/ontology/upper/${encodeURIComponent(name)}`,
36579
+ method: "GET",
36580
+ format: "text"
36581
+ });
36582
+ return response.data;
36583
+ }
36584
+ /**
36585
+ * Read the state a fluent holds for an entity at an instant.
36586
+ *
36587
+ * @param query - The fluent sort, the entity's term id, and the instant (default now).
36588
+ * @returns The latest fluent term with `validFrom <= at`.
36589
+ * @throws {NotFoundError} If the fluent sort is unknown, or no state was recorded by `at`.
36590
+ * @throws {BadRequestError} If `at` is not RFC 3339.
36591
+ *
36592
+ * @remarks
36593
+ * The engine answers the same 404 for an unknown fluent sort and for an
36594
+ * entity with no state yet, so this throws rather than returning `null`:
36595
+ * the two cannot be told apart.
36596
+ *
36597
+ * @example
36598
+ * ```typescript
36599
+ * const status = await client.ontology.getCurrentFluent({
36600
+ * sort: 'order_status',
36601
+ * of: orderId,
36602
+ * });
36603
+ * console.log(status.value, status.validFrom);
36604
+ * ```
36605
+ */
36606
+ async getCurrentFluent(query, requestOptions) {
36607
+ const response = await this.api.currentFluentValue(
36608
+ {
36609
+ sort: query.sort,
36610
+ of: query.of,
36611
+ ...query.at !== void 0 ? { at: query.at } : {}
36612
+ },
36613
+ toRequestParams(requestOptions)
36614
+ );
36615
+ return CurrentFluentResponseFromApiToFront(response.data);
36616
+ }
35886
36617
  };
35887
36618
 
35888
36619
  // src/normalizers/generation.ts
@@ -38102,6 +38833,7 @@ function UIActionResponseFromApiToFront(dto) {
38102
38833
  error: dto.error ?? void 0,
38103
38834
  pendingReviewId: dto.pending_review_id ?? void 0,
38104
38835
  producedTermIds: dto.produced_term_ids,
38836
+ ...dto.retracted_term_ids !== void 0 ? { retractedTermIds: dto.retracted_term_ids } : {},
38105
38837
  requiresApproval: dto.requires_approval,
38106
38838
  requiresConfirmation: dto.requires_confirmation,
38107
38839
  retractedTermIds: dto.retracted_term_ids,
@@ -38479,15 +39211,20 @@ function TurnDtoFromApiToFront(dto) {
38479
39211
  claimAnnotations: dto.claim_annotations?.map(ClaimAnnotationDtoFromApiToFront),
38480
39212
  // Rows go through the same narrowing as the message response, so a reloaded
38481
39213
  // turn keeps its table with the same value types a live turn has.
38482
- queryResults: dto.query_results?.map(osfqlRowFromApiToFront) ?? void 0
39214
+ queryResults: dto.query_results?.map(osfqlRowFromApiToFront) ?? void 0,
39215
+ ...dto.payload !== void 0 && dto.payload !== null ? { payload: dto.payload } : {}
38483
39216
  };
38484
39217
  }
38485
39218
  function RecordTurnRequestFromFrontToApi(model) {
38486
- return {
39219
+ const out = {
38487
39220
  role: model.role,
38488
39221
  content: model.content,
38489
39222
  osfql: model.osfql
38490
39223
  };
39224
+ if (model.payload !== void 0) out.payload = model.payload;
39225
+ if (model.conversationKind !== void 0) out.conversation_kind = model.conversationKind;
39226
+ if (model.title !== void 0) out.title = model.title;
39227
+ return out;
38491
39228
  }
38492
39229
  function RecordTurnResponseFromApiToFront(dto) {
38493
39230
  return {
@@ -38500,7 +39237,9 @@ function ConversationSummaryDtoFromApiToFront(dto) {
38500
39237
  id: dto.id,
38501
39238
  sessionId: dto.session_id ?? void 0,
38502
39239
  createdAt: dto.created_at,
38503
- turnCount: dto.turn_count
39240
+ turnCount: dto.turn_count,
39241
+ ...dto.kind != null ? { kind: dto.kind } : {},
39242
+ ...dto.title != null ? { title: dto.title } : {}
38504
39243
  };
38505
39244
  }
38506
39245
  function ListConversationsResponseFromApiToFront(dto) {
@@ -38786,6 +39525,11 @@ var ConversationClient = class {
38786
39525
  * Request and response bodies use plain JSON scalars; no tagged/untagged value
38787
39526
  * serialization is involved. Turns recorded here are returned by {@link getTurns}.
38788
39527
  *
39528
+ * `payload` is opaque structured card state (drafts, questions, findings…),
39529
+ * stored verbatim and returned on the turn — so the body is sent without key
39530
+ * re-casing. `conversationKind` and `title` apply when the conversation is
39531
+ * created (`title` also later, while it has none); a surface uses
39532
+ * `conversationKind` to partition the shared history list.
38789
39533
  * The engine also offers each turn to the tenant's long-term memory. A turn the
38790
39534
  * memory policy refuses (for example text over 500 characters) is still
38791
39535
  * recorded and still answers `200`; it only does not enter memory.
@@ -38804,11 +39548,21 @@ var ConversationClient = class {
38804
39548
  * content: 'Done — split it into `auth/session.rs` and `auth/token.rs`.',
38805
39549
  * osfql: 'MATCH module(name: ?N);',
38806
39550
  * });
39551
+ *
39552
+ * // A surface with richer turns: its own history partition and card state.
39553
+ * await client.conversation.recordTurn('new', {
39554
+ * role: 'assistant',
39555
+ * content: 'Here is a draft scope.',
39556
+ * conversationKind: 'guided_ontology',
39557
+ * title: 'Pizza ontology',
39558
+ * payload: { card: 'scope_draft', draft: { purpose: 'Take pizza orders' } },
39559
+ * });
38807
39560
  * ```
38808
39561
  */
38809
39562
  async recordTurn(conversationId, request, requestOptions) {
38810
39563
  const response = await this.http.request({
38811
39564
  ...toRequestParams(requestOptions),
39565
+ headers: mergeRequestHeaders({ [RAW_BODY_HEADER]: "1" }, requestOptions),
38812
39566
  path: `/api/v1/conversation/${encodeURIComponent(conversationId)}/turns`,
38813
39567
  method: "POST",
38814
39568
  body: RecordTurnRequestFromFrontToApi(request),
@@ -47364,6 +48118,96 @@ var OntologyExportClient = class {
47364
48118
  }
47365
48119
  };
47366
48120
 
48121
+ // src/normalizers/argumentation.ts
48122
+ function ArgumentationEvaluateRequestFromFrontToApi(model) {
48123
+ const out = {
48124
+ claims: model.claims.map((c) => ({
48125
+ term_id: c.termId,
48126
+ ...c.id !== void 0 ? { id: c.id } : {}
48127
+ }))
48128
+ };
48129
+ if (model.preferences !== void 0) {
48130
+ out.preferences = model.preferences.map((p) => ({ preferred: p.preferred, over: p.over }));
48131
+ }
48132
+ if (model.retracted !== void 0) out.retracted = model.retracted;
48133
+ if (model.enableDerivation !== void 0) out.enable_derivation = model.enableDerivation;
48134
+ if (model.useTenantRules !== void 0) out.use_tenant_rules = model.useTenantRules;
48135
+ if (model.rulesOsfql !== void 0) out.rules_osfql = model.rulesOsfql;
48136
+ if (model.matchThreshold !== void 0) out.match_threshold = model.matchThreshold;
48137
+ return out;
48138
+ }
48139
+ function ArgumentationEvaluateResponseFromApiToFront(dto) {
48140
+ return {
48141
+ arguments: dto.arguments.map((a) => ({
48142
+ id: a.id,
48143
+ index: a.index,
48144
+ termId: a.term_id,
48145
+ text: a.text,
48146
+ label: a.label
48147
+ })),
48148
+ attacks: dto.attacks.map((a) => ({
48149
+ from: a.from,
48150
+ to: a.to,
48151
+ kind: a.kind,
48152
+ reason: a.reason,
48153
+ proved: a.proved
48154
+ })),
48155
+ grounded: {
48156
+ accepted: dto.grounded.accepted,
48157
+ rejected: dto.grounded.rejected,
48158
+ undecided: dto.grounded.undecided
48159
+ },
48160
+ questions: dto.questions.map((q) => ({ a: q.a, b: q.b, prompt: q.prompt })),
48161
+ warnings: dto.warnings ?? []
48162
+ };
48163
+ }
48164
+
48165
+ // src/resources/argumentation.ts
48166
+ var ArgumentationClient = class {
48167
+ /** @internal */
48168
+ api;
48169
+ /** @internal */
48170
+ constructor(api) {
48171
+ this.api = api;
48172
+ }
48173
+ /**
48174
+ * Evaluate a set of claims: label each argument and surface the conflicts
48175
+ * only the user can resolve.
48176
+ *
48177
+ * @param request - The claims, and the resolutions and retractions so far.
48178
+ * @returns Labelled arguments, evidence-carrying attacks, the grounded
48179
+ * extension, and one question per unresolved conflict.
48180
+ * @throws {BadRequestError} 400 when there are no claims, or a term or
48181
+ * preference id is unknown.
48182
+ * @throws {ApiError} 422 when `rulesOsfql` fails to parse, compile, or execute.
48183
+ *
48184
+ * @remarks
48185
+ * Multi-turn: answer a question by adding a {@link ArgumentPreference} and
48186
+ * evaluate again with the same argument ids; each preference deletes one
48187
+ * attack. Plain JSON on the wire — no tagged/untagged value split applies.
48188
+ *
48189
+ * @example
48190
+ * ```typescript
48191
+ * const turn = await client.argumentation.evaluate({
48192
+ * claims: [{ termId: a, id: 'a' }, { termId: b, id: 'b' }],
48193
+ * });
48194
+ * for (const q of turn.questions) console.log(q.prompt);
48195
+ *
48196
+ * const settled = await client.argumentation.evaluate({
48197
+ * claims: [{ termId: a, id: 'a' }, { termId: b, id: 'b' }],
48198
+ * preferences: [{ preferred: 'a', over: 'b' }],
48199
+ * });
48200
+ * ```
48201
+ */
48202
+ async evaluate(request, requestOptions) {
48203
+ const response = await this.api.evaluateArgumentation(
48204
+ ArgumentationEvaluateRequestFromFrontToApi(request),
48205
+ toRequestParams(requestOptions)
48206
+ );
48207
+ return ArgumentationEvaluateResponseFromApiToFront(response.data);
48208
+ }
48209
+ };
48210
+
47367
48211
  // src/normalizers/demo.ts
47368
48212
  function DemoSeedRequestFromFrontToApi(model) {
47369
48213
  const dto = {};
@@ -50395,6 +51239,8 @@ var ReasoningLayerClient = class {
50395
51239
  agui;
50396
51240
  /** Ontology export — OWL ontology and SHACL shapes projected from the sort lattice. */
50397
51241
  ontologyExport;
51242
+ /** Grounded argumentation — label conflicting claims and surface the questions only the user can settle. */
51243
+ argumentation;
50398
51244
  /** Demo substrate seeding — full SUMO + demo scenarios into the tenant substrate. */
50399
51245
  demo;
50400
51246
  /** Execution-free reward scoring for candidate queries (recall / precision). */
@@ -50536,7 +51382,8 @@ var ReasoningLayerClient = class {
50536
51382
  forecast: this.forecast,
50537
51383
  corpus: this.corpus,
50538
51384
  osfDiff: this.osfDiff,
50539
- conformance: this.conformance
51385
+ conformance: this.conformance,
51386
+ argumentation: this.argumentation
50540
51387
  };
50541
51388
  }
50542
51389
  /** Data ingestion and extraction operations — documents, sources, collections, images. */
@@ -50669,6 +51516,7 @@ var ReasoningLayerClient = class {
50669
51516
  const generatedGuardrail = encodePathParams(new Guardrail(generatedHttp));
50670
51517
  const generatedAgui = encodePathParams(new Agui(generatedHttp));
50671
51518
  const generatedOntologyExport = encodePathParams(new OntologyExport(generatedHttp));
51519
+ const generatedArgumentation = encodePathParams(new Argumentation(generatedHttp));
50672
51520
  this.sorts = new SortsClient(generatedSorts, generatedTypes, resolved.tenantId);
50673
51521
  this.terms = new TermsClient(generatedTerms);
50674
51522
  this.inference = new InferenceClient(generatedInference, resolved.tenantId);
@@ -50800,6 +51648,7 @@ var ReasoningLayerClient = class {
50800
51648
  this.guardrail = new GuardrailClient(generatedGuardrail);
50801
51649
  this.agui = new AguiClient(generatedAgui);
50802
51650
  this.ontologyExport = new OntologyExportClient(generatedOntologyExport);
51651
+ this.argumentation = new ArgumentationClient(generatedArgumentation);
50803
51652
  this.demo = new DemoClient(encodePathParams(new Demo(generatedHttp)));
50804
51653
  this.reward = new RewardClient(encodePathParams(new Reward(generatedHttp)));
50805
51654
  this.translation = new TranslationClient(
@@ -51131,6 +51980,9 @@ var speech_exports = {};
51131
51980
  // src/types/connectors.ts
51132
51981
  var connectors_exports = {};
51133
51982
 
51983
+ // src/types/argumentation.ts
51984
+ var argumentation_exports = {};
51985
+
51134
51986
  // src/types/cron.ts
51135
51987
  var cron_exports = {};
51136
51988
 
@@ -52731,6 +53583,6 @@ function errorBodyCode(error) {
52731
53583
  return typeof code === "string" ? code : void 0;
52732
53584
  }
52733
53585
 
52734
- export { ANY_ROLE, AUDIT_CAUSAL_REQUEST_HEADERS, AUDIT_RESPONSE_HEADERS, action_reviews_exports as ActionReviews, actions_exports as Actions, admin_exports as Admin, agui_exports as Agui, analysis_exports as Analysis, anonymization_exports as Anonymization, ApiError, audit_exports as Audit, AuthenticationError, authz_exports as Authz, BadRequestError, batch_exports as Batch, BulkRefusedError, cdl_exports as CDL, causal_exports as Causal, channels_exports as Channels, chase_exports as Chase, cognitive_exports as Cognitive, coherence_exports as Coherence, collections_exports as Collections, communities_exports as Communities, compliance_exports as Compliance, compliance_markings_exports as ComplianceMarkings, conformal_exports as Conformal, conformance_exports as Conformance, connectors_exports as Connectors, Constraint, ConstraintViolationError, constraints_exports as Constraints, control_exports as Control, conversation_exports as Conversation, corpus_exports as Corpus, cron_exports as Cron, dl_exports as DL, DeadlineExceededError, demo_exports as Demo, DerivedFactWriteError, discovery_exports as Discovery, document_check_exports as DocumentCheck, documents_exports as Documents, embeddings_exports as Embeddings, execution_exports as Execution, extract_exports as Extract, feasibility_exports as Feasibility, Flow, flow_networks_exports as FlowNetworks, ForbiddenError, forecast_exports as Forecast, functions_exports as Functions, fuzzy_exports as Fuzzy, FuzzyShape, generation_exports as Generation, Geometry, guardrail_exports as Guardrail, health_exports as Health, homoiconic_exports as Homoiconic, ilp_exports as ILP, image_extraction_exports as ImageExtraction, inbox_exports as Inbox, inference_exports as Inference, ingestion_exports as Ingestion, IngestionBatchSession, IngestionFailedError, IngestionQueueUnavailableError, IngestionSession, IngestionSessionHandle, InternalServerError, LP, ltn_exports as LTN, marketplace_exports as Marketplace, memory_exports as Memory, metrics_exports as Metrics, namespaces_exports as Namespaces, NetworkError, neuro_symbolic_exports as NeuroSymbolic, NotFoundError, ontology_exports as Ontology, ontology_alignment_exports as OntologyAlignment, ontology_bridge_exports as OntologyBridge, ontology_export_exports as OntologyExport, ontology_facade_exports as OntologyFacade, operations_exports as Operations, optimize_exports as Optimize, osf_diff_exports as OsfDiff, osfql_exports as Osfql, OsfqlError, oversight_exports as Oversight, pairing_exports as Pairing, plain_values_exports as PlainValues, platform_exports as Platform, plugins_exports as Plugins, PreconditionFailedError, PreconditionRequiredError, preferences_exports as Preferences, proof_engine_exports as ProofEngine, property_graph_exports as PropertyGraph, query_exports as Query, rag_exports as RAG, RateLimitError, reasoning_exports as Reasoning, ReasoningLayerClient, ReasoningLayerError, research_exports as Research, reviews_exports as Reviews, reward_exports as Reward, row_exports as Row, SDK_VERSION, sat_exports as Sat, scenarios_exports as Scenarios, scheduling_exports as Scheduling, ServiceUnavailableError, smt_exports as Smt, snapshots_exports as Snapshots, solver_exports as Solver, SortBuilder, sorts_exports as Sorts, sources_exports as Sources, spaces_exports as Spaces, sparql_exports as Sparql, speakers_exports as Speakers, speech_exports as Speech, statistical_exports as Statistical, streaming_exports as Streaming, subscriptions_exports as Subscriptions, synthetic_exports as Synthetic, temporal_exports as Temporal, terms_exports as Terms, thomas_exports as Thomas, TimeoutError, translation_exports as Translation, ui_exports as UI, USER_DATA_FIELDS, utilities_exports as Utilities, ValidationError, Value, values_exports as Values, verification_exports as Verification, vision_exports as Vision, visualization_exports as Visualization, WebSocketClient, WebSocketConnection, webhook_actions_exports as WebhookActions, aggregate, allen, bind, causalRequestHeaders, collect, constrained, decodeConversationMessage, discriminateFeatureValue, errorBodyCode, guard, isConstrainedPlainVar, isPsiTermInput, isTaggedValueDto, isUuid, not, paginateByOffset, paginateByPage, psi, readAuditHeaders, readCausalRefusal, sealPreimage, sortDeleteRefusalOf, toTaggedFeatures, toTaggedValue, toTermInputDto, toUntaggedFeatures, toUntaggedValue };
53586
+ export { ANY_ROLE, AUDIT_CAUSAL_REQUEST_HEADERS, AUDIT_RESPONSE_HEADERS, action_reviews_exports as ActionReviews, actions_exports as Actions, admin_exports as Admin, agui_exports as Agui, analysis_exports as Analysis, anonymization_exports as Anonymization, ApiError, argumentation_exports as Argumentation, audit_exports as Audit, AuthenticationError, authz_exports as Authz, BadRequestError, batch_exports as Batch, BulkRefusedError, cdl_exports as CDL, causal_exports as Causal, channels_exports as Channels, chase_exports as Chase, cognitive_exports as Cognitive, coherence_exports as Coherence, collections_exports as Collections, communities_exports as Communities, compliance_exports as Compliance, compliance_markings_exports as ComplianceMarkings, conformal_exports as Conformal, conformance_exports as Conformance, connectors_exports as Connectors, Constraint, ConstraintViolationError, constraints_exports as Constraints, control_exports as Control, conversation_exports as Conversation, corpus_exports as Corpus, cron_exports as Cron, dl_exports as DL, DeadlineExceededError, demo_exports as Demo, DerivedFactWriteError, discovery_exports as Discovery, document_check_exports as DocumentCheck, documents_exports as Documents, embeddings_exports as Embeddings, execution_exports as Execution, extract_exports as Extract, feasibility_exports as Feasibility, Flow, flow_networks_exports as FlowNetworks, ForbiddenError, forecast_exports as Forecast, functions_exports as Functions, fuzzy_exports as Fuzzy, FuzzyShape, generation_exports as Generation, Geometry, guardrail_exports as Guardrail, health_exports as Health, homoiconic_exports as Homoiconic, ilp_exports as ILP, image_extraction_exports as ImageExtraction, inbox_exports as Inbox, inference_exports as Inference, ingestion_exports as Ingestion, IngestionBatchSession, IngestionFailedError, IngestionQueueUnavailableError, IngestionSession, IngestionSessionHandle, InternalServerError, LP, ltn_exports as LTN, marketplace_exports as Marketplace, memory_exports as Memory, metrics_exports as Metrics, NamedConstraintViolationError, namespaces_exports as Namespaces, NetworkError, neuro_symbolic_exports as NeuroSymbolic, NotFoundError, ontology_exports as Ontology, ontology_alignment_exports as OntologyAlignment, ontology_bridge_exports as OntologyBridge, ontology_export_exports as OntologyExport, ontology_facade_exports as OntologyFacade, operations_exports as Operations, optimize_exports as Optimize, osf_diff_exports as OsfDiff, osfql_exports as Osfql, OsfqlError, oversight_exports as Oversight, pairing_exports as Pairing, plain_values_exports as PlainValues, platform_exports as Platform, plugins_exports as Plugins, PreconditionFailedError, PreconditionRequiredError, preferences_exports as Preferences, proof_engine_exports as ProofEngine, property_graph_exports as PropertyGraph, query_exports as Query, rag_exports as RAG, RateLimitError, reasoning_exports as Reasoning, ReasoningLayerClient, ReasoningLayerError, research_exports as Research, reviews_exports as Reviews, reward_exports as Reward, row_exports as Row, SDK_VERSION, sat_exports as Sat, scenarios_exports as Scenarios, scheduling_exports as Scheduling, ServiceUnavailableError, smt_exports as Smt, snapshots_exports as Snapshots, solver_exports as Solver, SortBuilder, sorts_exports as Sorts, sources_exports as Sources, spaces_exports as Spaces, sparql_exports as Sparql, speakers_exports as Speakers, speech_exports as Speech, statistical_exports as Statistical, streaming_exports as Streaming, subscriptions_exports as Subscriptions, synthetic_exports as Synthetic, temporal_exports as Temporal, terms_exports as Terms, thomas_exports as Thomas, TimeoutError, translation_exports as Translation, ui_exports as UI, USER_DATA_FIELDS, utilities_exports as Utilities, ValidationError, Value, values_exports as Values, verification_exports as Verification, vision_exports as Vision, visualization_exports as Visualization, WebSocketClient, WebSocketConnection, webhook_actions_exports as WebhookActions, aggregate, allen, bind, causalRequestHeaders, collect, constrained, decodeConversationMessage, discriminateFeatureValue, errorBodyCode, guard, isConstrainedPlainVar, isPsiTermInput, isTaggedValueDto, isUuid, not, paginateByOffset, paginateByPage, psi, readAuditHeaders, readCausalRefusal, sealPreimage, sortDeleteRefusalOf, toTaggedFeatures, toTaggedValue, toTermInputDto, toUntaggedFeatures, toUntaggedValue };
52735
53587
  //# sourceMappingURL=index.js.map
52736
53588
  //# sourceMappingURL=index.js.map