@kortexya/reasoninglayer 1.27.0 → 1.28.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.d.ts CHANGED
@@ -130,7 +130,7 @@ type JsonValue$1 = string | number | boolean | null | JsonValue$1[] | object;
130
130
  * This is the single source of truth for the version constant.
131
131
  * The `scripts/release.sh` script updates this value alongside `package.json`.
132
132
  */
133
- declare const SDK_VERSION = "1.27.0";
133
+ declare const SDK_VERSION = "1.28.0";
134
134
  /**
135
135
  * Authentication mode for the SDK.
136
136
  *
@@ -3187,28 +3187,110 @@ interface BulkAddRulesResponse$1 {
3187
3187
  * Creates multiple terms in a single operation for efficiency.
3188
3188
  * This is much faster than creating terms one by one when you have many terms.
3189
3189
  *
3190
+ * The batch is ALL-OR-NOTHING: one refused entry refuses the whole batch and
3191
+ * nothing is written, and the refusal names EVERY refused row (#262).
3192
+ *
3193
+ * `dry_run` (#262) runs every check the real write runs — declarations,
3194
+ * coreference, events — and writes nothing. A clean dry run answers `200`
3195
+ * with the ids the entries WOULD carry; a refused one answers the same
3196
+ * `errors[]` body the real write answers with.
3197
+ *
3190
3198
  * # Tenant Context
3191
3199
  * The tenant is determined from the `X-Tenant-Id` header.
3192
3200
  */
3193
3201
  interface BulkAddTermsRequest$1 {
3194
- /** List of terms to create */
3195
- terms: CreateTermRequest$1[];
3202
+ /** Run every check the write runs, then write nothing. Default `false`. */
3203
+ dry_run?: boolean;
3204
+ /**
3205
+ * Write the entries this batch did not refuse, instead of refusing the
3206
+ * whole batch for one bad row. Default `false` — the all-or-nothing
3207
+ * verdict stays the default (#271).
3208
+ *
3209
+ * A real import holding one bad record had to be resent minus that record:
3210
+ * a second full call, a second full round of constraint evaluation, and a
3211
+ * window in which a survivor's reference target can be deleted between the
3212
+ * two. The engine already names every bad entry by index in one pass, so
3213
+ * it already knows which ones were fine.
3214
+ *
3215
+ * With `partial: true` the response is `201` when anything was written and
3216
+ * `422` when every row was refused; `term_ids` carries one id per ACCEPTED
3217
+ * row in request order, and `errors[]` names the refused ones by their
3218
+ * REQUEST index, so the positions reconstruct.
3219
+ *
3220
+ * ⚠️ Two failures stay batch-wide whatever this says, because neither can
3221
+ * be attributed to a row: the end-of-batch constraint propagation
3222
+ * (`409`, one verdict for the whole batch) and a persistence failure,
3223
+ * which reverts what the batch inserted (#239).
3224
+ */
3225
+ partial?: boolean;
3226
+ /**
3227
+ * List of terms to create. Each entry names its sort by `sort_id` or by
3228
+ * `sort_name` (#278).
3229
+ */
3230
+ terms: CreateTermInput$1[];
3196
3231
  }
3197
3232
  /** Response from bulk term addition */
3198
3233
  interface BulkAddTermsResponse$1 {
3234
+ /**
3235
+ * On a DRY RUN: the existing entities this batch would have merged into
3236
+ * through a `@key` coreference (#238), in request order of the entries
3237
+ * that coreferenced. These ids name terms that already exist, so they
3238
+ * survive the rollback and a caller may hold them.
3239
+ *
3240
+ * Absent on a real write, where every effective id is in
3241
+ * [`Self::term_ids`] already.
3242
+ */
3243
+ coreferenced_term_ids?: string[] | null;
3244
+ /**
3245
+ * `true` when nothing was written because the request carried
3246
+ * `dry_run: true` — every check ran, and nothing the checks decided was
3247
+ * written (#262).
3248
+ */
3249
+ dry_run: boolean;
3250
+ /**
3251
+ * Every row this batch refused, in request order, each naming its position
3252
+ * in the request's `terms` array (#271).
3253
+ *
3254
+ * Present only under `partial: true`, where a refusal no longer refuses
3255
+ * the batch. Without it a refused row answers `422` with the same list in
3256
+ * the error body, and nothing is written.
3257
+ */
3258
+ errors?: BulkRowRefusalDto[];
3199
3259
  /**
3200
3260
  * Processing time in milliseconds
3201
3261
  * @min 0
3202
3262
  */
3203
3263
  processing_time_ms: number;
3204
3264
  /**
3205
- * Effective term id per request position: the created id, or the EXISTING
3265
+ * How many rows were refused `errors.len()`, carried so a client can
3266
+ * test one number rather than the emptiness of a list.
3267
+ * @min 0
3268
+ */
3269
+ refused?: number;
3270
+ /**
3271
+ * Effective term id per WRITTEN entry: the created id, or the EXISTING
3206
3272
  * entity's id when the entry coreferenced into it through a `@key` feature
3207
3273
  * (#238). Always in request order.
3274
+ *
3275
+ * One id per request position on an all-or-nothing batch, which is the
3276
+ * default. Under `partial: true` it carries one id per ACCEPTED row, and
3277
+ * [`Self::errors`] names the refused positions — together they reconstruct
3278
+ * the request array (#271).
3279
+ *
3280
+ * ABSENT on a dry run (#268). A dry run rolls the store back, so an id it
3281
+ * minted for a fresh entry names nothing and can never name anything — a
3282
+ * second, real POST of the same body mints a different one. Answering the
3283
+ * vector anyway handed a caller dangling references in the very positions
3284
+ * this field documents as storable. The two positions whose id IS durable
3285
+ * — an entry that coreferenced into an existing entity — are reported
3286
+ * separately in [`Self::coreferenced_term_ids`], because a vector that is
3287
+ * truthful in some positions and fabricated in others is exactly the shape
3288
+ * that got those ids stored.
3208
3289
  */
3209
- term_ids: string[];
3290
+ term_ids?: string[] | null;
3210
3291
  /**
3211
- * Number of terms created
3292
+ * Number of terms created (on a dry run: the number the batch WOULD
3293
+ * create, fresh entries plus coreferenced ones)
3212
3294
  * @min 0
3213
3295
  */
3214
3296
  terms_added: number;
@@ -3461,6 +3543,29 @@ interface BulkReviewResponse {
3461
3543
  */
3462
3544
  success_count: number;
3463
3545
  }
3546
+ /**
3547
+ * One refused row of a bulk write (#262).
3548
+ *
3549
+ * The index is the row's position in the REQUEST array, so a client maps the
3550
+ * refusal back to the exact row it sent — not to a store id the caller never
3551
+ * named. `feature` is absent when the refusal is about the row as a whole
3552
+ * (a closed-world shape, a multiplicity bound, a ⊥ meet); the message always
3553
+ * carries it in prose.
3554
+ * `Deserialize` and `ToSchema` because a refused row also appears in a
3555
+ * SUCCESS body since #271: `partial: true` writes the rows it did not refuse
3556
+ * and reports the rest here, so this type crosses the wire in both directions.
3557
+ */
3558
+ interface BulkRowRefusalDto {
3559
+ /** The feature the refusal names, when it names one. */
3560
+ feature?: string | null;
3561
+ /**
3562
+ * The row's position in the request's `terms` array, zero-based.
3563
+ * @min 0
3564
+ */
3565
+ index: number;
3566
+ /** The refusal in words — the same message a single-term write answers with. */
3567
+ message: string;
3568
+ }
3464
3569
  /** Request to set multiple sort similarities in bulk */
3465
3570
  interface BulkSetSimilaritiesRequest$1 {
3466
3571
  /** List of similarity relations to set */
@@ -3541,7 +3646,7 @@ interface BulkSortError$1 {
3541
3646
  * re-classification. This enum is what a client reads instead; the message
3542
3647
  * stays human-facing.
3543
3648
  */
3544
- type BulkSortErrorKind$1 = "reserved_name" | "unreadable_name" | "unsatisfiable_declaration" | "unresolved_parent" | "unbound_relation";
3649
+ type BulkSortErrorKind$1 = "reserved_name" | "unreadable_name" | "unsatisfiable_declaration" | "unknown_type_hint" | "unresolved_parent" | "unbound_relation";
3545
3650
  /** Request to run ECE calibration. */
3546
3651
  interface CalibrateRequest$1 {
3547
3652
  /** Extraction predictions with confidence and correctness. */
@@ -3689,6 +3794,17 @@ interface CaptureSnapshotRequest$1 {
3689
3794
  max_entries?: number | null;
3690
3795
  request_path_pattern: string;
3691
3796
  }
3797
+ /**
3798
+ * Where a feature's multiplicity bound came from, and therefore whether a
3799
+ * write may be refused for breaking it (#258).
3800
+ *
3801
+ * The wire twin of `osfkb_domain::types::sort::CardinalityOrigin`. It exists
3802
+ * on this DTO because a READ renders `min_count`/`max_count`, and the ordinary
3803
+ * way to amend a sort is GET → edit → POST: without the origin beside the
3804
+ * bound, that round trip would promote every bound the EXTRACTION pipeline
3805
+ * inferred into a declared one and start refusing the ingestion that wrote it.
3806
+ */
3807
+ type CardinalityOriginDto$1 = "declared" | "inferred";
3692
3808
  /**
3693
3809
  * Schema-bearing mirror of the domain [`CatalogEntry`]: the response DTO.
3694
3810
  *
@@ -3738,6 +3854,20 @@ interface CatalogEntryDoc {
3738
3854
  full: string;
3739
3855
  /** Stable snake_case id, e.g. `"aggregate"`, `"insert_bulk"`. */
3740
3856
  id: string;
3857
+ /**
3858
+ * Whether this statement writes the store: `"never"`, `"always"`, or
3859
+ * `"depends"` when only the authored arguments can decide (an inline-write
3860
+ * `MATCH`, an `IF` whose branch writes, the effectful `CALL "action" WITH`
3861
+ * form).
3862
+ *
3863
+ * [`Self::category`] cannot answer this: `CHAIN` and `RELEASE
3864
+ * RESIDUATIONS` are `Control` and both write, while `MATCH` is `Read` and
3865
+ * writes whenever it carries an inline clause. A client reads this field
3866
+ * instead of keeping its own table of which process-control statements
3867
+ * write, and resolves `"depends"` through `POST /api/v1/osfql/preview`,
3868
+ * whose per-statement `mutates` is a concrete boolean (#266).
3869
+ */
3870
+ mutates: string;
3741
3871
  /**
3742
3872
  * The grounding ingredients the authoring stage must supply to write this
3743
3873
  * statement (`Sort`, `Features`, `Pattern`, `TermId`, …).
@@ -4933,7 +5063,7 @@ interface ClusteredObservationDto$1 {
4933
5063
  y: number;
4934
5064
  }
4935
5065
  /** A formula found coextensive with a sort's definition, and its evidence. */
4936
- interface CoextensiveDefinitionDto {
5066
+ interface CoextensiveDefinitionDto$1 {
4937
5067
  /** The alternative formula, rendered. */
4938
5068
  definition: string;
4939
5069
  /**
@@ -7318,6 +7448,42 @@ interface CreateTenantResponse$1 {
7318
7448
  /** The provisioned tenant UUID (echoes the request or the generated value). */
7319
7449
  tenant_id: string;
7320
7450
  }
7451
+ /**
7452
+ * A term write that names its sort by NAME rather than by id (#278).
7453
+ *
7454
+ * # Architectural context
7455
+ *
7456
+ * `POST /api/v1/inference/facts` and every OSFQL write take a sort name; the
7457
+ * term routes took only a UUID, so a caller holding names had to resolve every
7458
+ * sort first — on the bulk route, the one place the extra round trips cost
7459
+ * most, because it exists for volume.
7460
+ *
7461
+ * A separate struct rather than an optional field on [`CreateTermRequest`]:
7462
+ * both are `deny_unknown_fields`, so the untagged pair is decidable — a body
7463
+ * carrying `sort_id` cannot match this one and a body carrying `sort_name`
7464
+ * cannot match that one — and exactly one of the two is stated, which is the
7465
+ * #209 rule that one slot has one claimant.
7466
+ */
7467
+ interface CreateTermByNameRequest$1 {
7468
+ /** Features map */
7469
+ features: Partial<Record<string, ValueDto$1>>;
7470
+ /**
7471
+ * Optional client-supplied TermId, read exactly as
7472
+ * [`CreateTermRequest::id`].
7473
+ * @format uuid
7474
+ */
7475
+ id?: string | null;
7476
+ /**
7477
+ * Owner ID
7478
+ * @format uuid
7479
+ */
7480
+ owner_id: string;
7481
+ /**
7482
+ * The sort's name, resolved against the tenant's lattice. An unknown name
7483
+ * refuses the write; it never mints a sort.
7484
+ */
7485
+ sort_name: string;
7486
+ }
7321
7487
  /** Request to create a term within a specific collection */
7322
7488
  interface CreateTermInCollectionRequest$1 {
7323
7489
  /**
@@ -7343,6 +7509,14 @@ interface CreateTermInCollectionRequest$1 {
7343
7509
  */
7344
7510
  tenant_id: string;
7345
7511
  }
7512
+ /**
7513
+ * A term write, naming its sort by id or by name (#278).
7514
+ *
7515
+ * `CreateTermRequest` is declared FIRST so the by-id spelling is tried first;
7516
+ * variant order is load-bearing in an untagged enum (#232), even though these
7517
+ * two are made mutually exclusive by `deny_unknown_fields`.
7518
+ */
7519
+ type CreateTermInput$1 = CreateTermRequest$1 | CreateTermByNameRequest$1;
7346
7520
  /**
7347
7521
  * Request to create a term
7348
7522
  *
@@ -10496,8 +10670,15 @@ interface EvaluateFunctionRequest$1 {
10496
10670
  * @default 100
10497
10671
  */
10498
10672
  max_depth?: number;
10499
- /** @format uuid */
10500
- tenant_id: string;
10673
+ /**
10674
+ * OPTIONAL, and ignored when it agrees with `X-Tenant-Id`; a contradicting
10675
+ * value is refused with `function_tenant_mismatch`. Identical contract to
10676
+ * [`RegisterFunctionRequest::tenant_id`] — evaluate carried the same
10677
+ * required-and-ignored field, and fixing only register would have moved
10678
+ * the inconsistency one route over (#268).
10679
+ * @format uuid
10680
+ */
10681
+ tenant_id?: string | null;
10501
10682
  }
10502
10683
  /** Response from function evaluation */
10503
10684
  type EvaluateFunctionResponse$1 = {
@@ -11604,6 +11785,19 @@ type FeatureConstraintDto = {
11604
11785
  interface FeatureDescriptorDto$1 {
11605
11786
  /** Custom OWL annotations for this feature (e.g., isIdentifier, unit, enumValues) */
11606
11787
  annotations?: Partial<Record<string, string>>;
11788
+ /**
11789
+ * Where the bound above came from — `"declared"` or `"inferred"` (#258).
11790
+ *
11791
+ * A bound written through this door without the field is DECLARED, and the
11792
+ * write path refuses a term that breaks it. `"inferred"` records a bound
11793
+ * read out of an extracted axiom: it is carried, exported and diffed, and
11794
+ * it refuses nothing.
11795
+ *
11796
+ * A READ answers it beside the bound whenever the stored descriptor
11797
+ * records one, so the ordinary GET → edit → POST amendment of an extracted
11798
+ * sort sends the origin back unchanged and the bound keeps its standing.
11799
+ */
11800
+ cardinality_origin?: null | CardinalityOriginDto$1;
11607
11801
  /**
11608
11802
  * Optional constraint on the feature value. Defaults to `None`
11609
11803
  * when absent so callers needn't send an explicit null.
@@ -11636,9 +11830,27 @@ interface FeatureDescriptorDto$1 {
11636
11830
  */
11637
11831
  expected_sort_name?: string | null;
11638
11832
  /**
11639
- * Primitive type hint for LLM extraction (e.g., "DateTime", "Integer", "String", "Real")
11640
- * Used to tell the LLM what type of value to extract for this feature.
11641
- * If `expected_sort` is set, it takes precedence over this hint.
11833
+ * The value SHAPE this feature admits one word from the engine's one
11834
+ * type-hint vocabulary.
11835
+ *
11836
+ * Accepted words: `Integer`, `BigInteger`, `Real`, `String`, `Uri`,
11837
+ * `Boolean`, `Date`, `DateTime`, `List`, `Set`, `Fuzzy`, `FuzzyScalar`,
11838
+ * `FuzzyNumber`, `SortId`, `ExternalRef`, `Geometry`, `Measurement` — plus
11839
+ * the structured kinds `vector(<dim>)`, `timeseries(<scalar>)`, `geotime`
11840
+ * and `mediareference(<kind>)`. Every common alias is read too, case
11841
+ * insensitively (`int`, `bigint`, `double`, `text`, `bool`, `timestamp`,
11842
+ * `url`, …), so an OSFQL `DEFINE person (name: string)` and this field
11843
+ * declare the same thing.
11844
+ *
11845
+ * A READ always answers in the canonical spelling above, whatever the
11846
+ * caller wrote (#264). A word outside the vocabulary is refused with 422 at
11847
+ * declaration rather than silently enforced against every write forever.
11848
+ *
11849
+ * A feature whose value is another TERM declares `expected_sort` (or
11850
+ * `expected_sort_name`), which is the range; `expected_sort` takes
11851
+ * precedence over this hint.
11852
+ *
11853
+ * The vocabulary itself lives in `crates/domain/src/types/type_hint.rs`.
11642
11854
  */
11643
11855
  expected_type_hint?: string | null;
11644
11856
  /**
@@ -11662,12 +11874,22 @@ interface FeatureDescriptorDto$1 {
11662
11874
  */
11663
11875
  max_count?: number | null;
11664
11876
  /**
11665
- * Declared multiplicity bounds, when a cardinality constraint was extracted.
11877
+ * Declared multiplicity bounds, when a cardinality constraint was extracted
11878
+ * or declared.
11666
11879
  *
11667
11880
  * `required` is only a boolean — it cannot express "exactly two" or "at most
11668
11881
  * three". These surface the real bound so a caller (and the extraction
11669
11882
  * benchmark) can see WHICH cardinality was asserted, not merely that the
11670
11883
  * feature is present.
11884
+ *
11885
+ * Both have an OSFQL spelling since #269: `@card(min)` and
11886
+ * `@card(min, max)`, with `*` as the explicit unbounded maximum. So a sort
11887
+ * declared through either door reads back identically, and a schema export
11888
+ * of a JSON-authored sort is DDL that declares the same thing.
11889
+ *
11890
+ * ⚠️ A non-zero `min_count` IS [`Self::required`] — see that field. A
11891
+ * declaration stating both with different meanings is refused, not
11892
+ * corrected.
11671
11893
  * @format int32
11672
11894
  * @min 0
11673
11895
  */
@@ -11681,6 +11903,22 @@ interface FeatureDescriptorDto$1 {
11681
11903
  * declaration — it says what the value's sort must be, not that the
11682
11904
  * feature must be present — so the minimal relational descriptor is
11683
11905
  * `{"name": "issued_to", "expected_sort_name": "Client"}`.
11906
+ *
11907
+ * ⚠️ THE SAME STATEMENT AS `min_count >= 1` (#269). "Must be present" and
11908
+ * "must hold at least one value" are one fact at two resolutions, and the
11909
+ * engine keeps them consistent in both directions: `required: true` with
11910
+ * no `min_count` floors the minimum at 1, and **`min_count >= 1` derives
11911
+ * `required: true` whatever this field says**. The second is the documented
11912
+ * implication — and it cannot be refused instead, because this field is
11913
+ * `#[serde(default)]`, so an omitted `required` and an explicit
11914
+ * `"required": false` are indistinguishable here.
11915
+ *
11916
+ * `{"required": true, "min_count": 0}` IS refused, with a `400`: that pair
11917
+ * can only come from the wire, and it used to store `min_count: 1` in
11918
+ * silence. See [`FeatureDescriptorDto::cardinality_contradiction`].
11919
+ *
11920
+ * A consequence: there is no way to say "optional, but if present then at
11921
+ * least two". That needs a bound the descriptor does not carry.
11684
11922
  */
11685
11923
  required?: boolean;
11686
11924
  }
@@ -11716,6 +11954,7 @@ type FeatureInputValueDto$1 = {
11716
11954
  /**
11717
11955
  * Input for creating/referencing a term (TRUE HOMOICONICITY). Either:
11718
11956
  * - {term_id: UUID} to reference an existing term, OR
11957
+ * - {designator: {sort_name, features}} to address an existing term through its sort's @key, OR
11719
11958
  * - {sort_id: UUID, features: {...}} to define inline with sort ID, OR
11720
11959
  * - {sort_name: String, features: {...}} to define inline with sort name (resolved server-side)
11721
11960
  * An inline antecedent may carry binding: "?C" to name its own identity.
@@ -11769,6 +12008,7 @@ type FeatureTypeDto$1 = "string" | "integer" | "real" | "boolean" | "reference"
11769
12008
  * - number (f64)
11770
12009
  * - boolean
11771
12010
  * - null
12011
+ * - a whole PsiTermDto, for a reference the read surface hides (a negated antecedent's probed pattern)
11772
12012
  * - array of FeatureValueDto
11773
12013
  */
11774
12014
  type FeatureValueDto$1 = {
@@ -11783,11 +12023,12 @@ type FeatureValueDto$1 = {
11783
12023
  * - number (f64)
11784
12024
  * - boolean
11785
12025
  * - null
12026
+ * - a whole PsiTermDto, for a reference the read surface hides (a negated antecedent's probed pattern)
11786
12027
  * - array of FeatureValueDto
11787
12028
  */
11788
12029
  literal: FeatureValueDto$1;
11789
12030
  term_id: string;
11790
- } | string | number | boolean | null | FeatureValueDto$1[];
12031
+ } | PsiTermDto$1 | string | number | boolean | null | FeatureValueDto$1[];
11791
12032
  /** Request to finalize a live oversight session. */
11792
12033
  interface FinalizeSessionRequest {
11793
12034
  /** Optional execution log (for full provenance) */
@@ -11815,16 +12056,19 @@ interface FindBySortRequest$1 {
11815
12056
  */
11816
12057
  filter?: Partial<Record<string, string>> | null;
11817
12058
  /**
11818
- * Answer with the rule-DERIVED shadows too (#249).
12059
+ * Answer with the rule-DERIVED conclusions too (#249, #261).
12060
+ *
12061
+ * A rule's conclusion is a fresh Ψ-term of the conclusion's sort. A
12062
+ * conclusion of the browsed sort ITSELF is ALWAYS answered, whatever this
12063
+ * flag says. When the conclusion's sort is a proper SUBSORT of the browsed
12064
+ * one — the `confirmed_order < sales_order` shape — the conclusion is a
12065
+ * lattice member of the browsed sort, and the default browse hides it so
12066
+ * two orders read as two rows, not four; `true` reveals it. This is the
12067
+ * request-level twin of OSFQL `MATCH … INCLUDING DERIVED`, and every
12068
+ * returned term reports `origin` (and `derived_by`) either way.
11819
12069
  *
11820
- * A rule's conclusion is a fresh Ψ-term of the conclusion's sort. When
11821
- * that sort is a proper SUBSORT of the browsed one — the
11822
- * `confirmed_order < sales_order` shape — the conclusion is a lattice
11823
- * member of the browsed sort, and the default browse hides it so two
11824
- * orders read as two rows, not four. A conclusion of the browsed sort
11825
- * ITSELF is always answered. This is the request-level twin of OSFQL
11826
- * `MATCH … INCLUDING DERIVED`; every returned term reports `origin`
11827
- * either way.
12070
+ * The conclusions come from the tenant's RESIDENT store, which is where a
12071
+ * chain leaves them; the route doc says what that promises.
11828
12072
  */
11829
12073
  include_derived?: boolean;
11830
12074
  /**
@@ -11835,6 +12079,15 @@ interface FindBySortRequest$1 {
11835
12079
  * @min 0
11836
12080
  */
11837
12081
  limit?: number | null;
12082
+ /**
12083
+ * Zero-based index of the first term to return (default `0`). Mirrors
12084
+ * `TermListQuery.offset` on `GET /api/v1/terms` and pages the SAME
12085
+ * ordering: the result is ordered by term id before it is cut, so page 2
12086
+ * neither repeats nor skips a row of page 1. Honoured with or without
12087
+ * `limit` (#261).
12088
+ * @min 0
12089
+ */
12090
+ offset?: number | null;
11838
12091
  /**
11839
12092
  * Sort ID to search for (takes precedence over sort_name)
11840
12093
  * @format uuid
@@ -12244,6 +12497,31 @@ interface ForwardChainRequest$1 {
12244
12497
  * AUGMENTS the base — it never replaces it (#218).
12245
12498
  */
12246
12499
  initial_facts?: TermInputDto$1[];
12500
+ /**
12501
+ * KEEP the run's derivations in the tenant's store instead of rolling
12502
+ * them back, so a later `MATCH` reads them — the materialise-then-`MATCH`
12503
+ * shape a recursive rule needs, because a fresh backward chain drops the
12504
+ * deepest hop.
12505
+ *
12506
+ * Default: `false`, and "ephemeral" means ROLLED BACK, not merely
12507
+ * unwritten (#218): the handler removes every wrapper and inner copy the
12508
+ * run created before it answers. So a default run reports
12509
+ * `derived_count: N` and leaves the store exactly as it found it — **this
12510
+ * route is not a repair door**. To re-materialise a tenant, use OSFQL
12511
+ * `CHAIN;` or `POST /api/v1/admin/derived-facts/rebuild/{tenant_id}`
12512
+ * (#270).
12513
+ *
12514
+ * ⚠️ NOT durable, and it never was in any useful sense (#273). Inference
12515
+ * output is re-materialised, never stored — the same contract
12516
+ * `handlers::osfql_persist` documents for OSFQL `CHAIN`. The flag was
12517
+ * called `keep_derived` and did write to Postgres, but it wrote only
12518
+ * the `meta.clause` WRAPPER of each conclusion and never the inner ground
12519
+ * copy every reader returns, so the conclusion did not survive a restart
12520
+ * and the durable store kept a row referencing an id no row backed. The
12521
+ * write is gone; what the flag always really did — keep the derivations
12522
+ * resident — is what it says now.
12523
+ */
12524
+ keep_derived?: boolean;
12247
12525
  /**
12248
12526
  * Maximum facts to derive
12249
12527
  * @min 0
@@ -12257,12 +12535,34 @@ interface ForwardChainRequest$1 {
12257
12535
  */
12258
12536
  max_iterations?: number;
12259
12537
  /**
12260
- * TRUE HOMOICONICITY: Persist derived facts to PostgreSQL and add to homoiconic_rules.
12261
- * When true, derived facts become permanent facts/rules that survive server restart
12262
- * and are available for backward chaining.
12263
- * Default: false (derived facts are ephemeral, returned but not persisted)
12538
+ * A server-side deadline for this derivation, in milliseconds.
12539
+ *
12540
+ * The chainer checks it cooperatively — at every fixpoint-iteration
12541
+ * boundary, at every rule application, and inside each rule's own
12542
+ * candidate loop — and the route answers `504` when it passes. Clamped by
12543
+ * `OSFKB_FC_TIMEOUT_SECS`.
12544
+ *
12545
+ * Omitted = the derivation backstop (`OSFKB_FC_TIMEOUT_SECS`, default
12546
+ * 300 s). That is a SEPARATE knob from the safe-method backstop
12547
+ * (`OSFKB_REQUEST_TIMEOUT_SECS`, default 60 s): a full materialisation
12548
+ * over a large tenant is legitimately longer than a `GET` handler future.
12549
+ * The deadline is ON by default because this route is a POST, which the
12550
+ * request-deadline middleware never bounds, and one unbounded derivation
12551
+ * holds the tenant's hierarchy guard and term-store write guard for its
12552
+ * whole run.
12553
+ *
12554
+ * `0` is the explicit opt-out: no deadline at all, for a materialisation
12555
+ * longer than the backstop.
12556
+ *
12557
+ * A deadline does not change what the run keeps — `keep_derived` stays
12558
+ * the single switch (#218). A truncated `keep_derived: true` run keeps
12559
+ * the partial derivation it reached, so a re-run continues from it; a
12560
+ * truncated `keep_derived: false` run is rolled back and keeps nothing.
12561
+ * The `504` body says which happened.
12562
+ * @format int64
12563
+ * @min 0
12264
12564
  */
12265
- persist_derived?: boolean;
12565
+ timeout_ms?: number | null;
12266
12566
  }
12267
12567
  /** Response for forward chaining. */
12268
12568
  interface ForwardChainResponse$1 {
@@ -12279,16 +12579,22 @@ interface ForwardChainResponse$1 {
12279
12579
  */
12280
12580
  iterations: number;
12281
12581
  /**
12282
- * Materialization time in milliseconds
12582
+ * Derivations this run KEPT in the tenant's store — non-zero only when
12583
+ * the request carried `keep_derived: true`, since a default run rolls its
12584
+ * output back (#218).
12585
+ *
12586
+ * Counts `meta.clause` wrappers, which is one per conclusion. It counted
12587
+ * rows written to Postgres until #273, when that write was removed: it
12588
+ * stored only the wrapper and never the inner ground copy a reader
12589
+ * returns, so it made the conclusion survive nothing.
12283
12590
  * @min 0
12284
12591
  */
12285
- materialization_time_ms: number;
12592
+ kept_count?: number;
12286
12593
  /**
12287
- * TRUE HOMOICONICITY: Number of derived facts persisted to PostgreSQL
12288
- * (only populated when persist_derived=true in request)
12594
+ * Materialization time in milliseconds
12289
12595
  * @min 0
12290
12596
  */
12291
- persisted_count?: number;
12597
+ materialization_time_ms: number;
12292
12598
  /**
12293
12599
  * Provenance tags for derived facts (only populated when enable_provenance_tags=true).
12294
12600
  * Each tag maps a derived fact (by index into derived_facts) to its confidence score.
@@ -21319,6 +21625,16 @@ interface OsfSearchStatsDto$1 {
21319
21625
  */
21320
21626
  relations_discovered: number;
21321
21627
  }
21628
+ /**
21629
+ * Why the previewed program cannot run as one atomic unit, answered without
21630
+ * running it. The same verdict `POST /api/v1/osfql` would refuse with.
21631
+ */
21632
+ interface OsfqlAtomicRefusalDto {
21633
+ /** Machine-readable cause: `drop_sort_in_atomic_program`. */
21634
+ code: string;
21635
+ /** Human-readable explanation, identical to the run-time refusal. */
21636
+ message: string;
21637
+ }
21322
21638
  /** Request to diagnose an OSFQL program for contradictions / inconsistencies. */
21323
21639
  interface OsfqlDiagnoseRequest$1 {
21324
21640
  /**
@@ -21355,6 +21671,116 @@ interface OsfqlErrorResponse {
21355
21671
  */
21356
21672
  refusal?: null | OsfqlRefusalDto;
21357
21673
  }
21674
+ /**
21675
+ * The rows a destructive statement would affect, counted by running the
21676
+ * derived read-only `MATCH` against a snapshot — never against the live store.
21677
+ */
21678
+ interface OsfqlPreviewAffectedDto {
21679
+ /**
21680
+ * How the affected rows fall across sorts, most rows first (#271).
21681
+ *
21682
+ * Present for a statement whose reach is the whole tenant — `CLEAR FACTS`
21683
+ * — where a sample of ten rows says almost nothing and the shape of what
21684
+ * is about to go is the useful answer. Absent otherwise: for a targeted
21685
+ * `RETRACT` the sort is already in `sorts`, and repeating it per row would
21686
+ * be noise.
21687
+ */
21688
+ by_sort?: OsfqlPreviewSortCountDto[];
21689
+ /**
21690
+ * How many rows the statement would affect. `0` means zero rows, and it
21691
+ * is answered whenever the rows were counted; it is the ABSENCE of the
21692
+ * enclosing `affected` block that means "this statement has no
21693
+ * affected-row set" (a read, an additive write).
21694
+ * @min 0
21695
+ */
21696
+ count: number;
21697
+ /**
21698
+ * Whether [`count`](Self::count) is EXACT, or an upper bound.
21699
+ *
21700
+ * `false` for a statement nested under a condition the one-statement probe
21701
+ * cannot carry — a guard naming a variable an earlier statement bound is
21702
+ * free inside the probe, so folding it in would raise an unbound-variable
21703
+ * error and delete the count entirely. The probe then selects a SUPERSET
21704
+ * of what would go, and the honest rendering is "up to N rows" (#276).
21705
+ *
21706
+ * `true` for every top-level statement, and for a nested statement whose
21707
+ * enclosing conditions name only its own variables.
21708
+ */
21709
+ exact?: boolean;
21710
+ /**
21711
+ * Up to 10 sample rows, one map per matched row.
21712
+ *
21713
+ * Each row IDENTIFIES the row it stands for (#271): a `term_id` column,
21714
+ * the features the statement's own pattern projected, and the declaring
21715
+ * sort's `@key` features. Before that it echoed the pattern the caller had
21716
+ * just written — `RETRACT customer(tier: "gold")` over two gold customers
21717
+ * returned two identical `{"tier": "gold"}` rows, so a confirm dialog
21718
+ * could say "this deletes 2 rows" and not WHICH two.
21719
+ */
21720
+ sample_rows?: Partial<Record<string, OsfqlValueDto>>[];
21721
+ }
21722
+ /**
21723
+ * Response from previewing an OSFQL program: what each statement would do,
21724
+ * decided without running anything (#257).
21725
+ */
21726
+ interface OsfqlPreviewResponse$1 {
21727
+ /**
21728
+ * Why the program cannot run as one atomic unit, when it cannot and the
21729
+ * request runs atomically (the default). Absent otherwise.
21730
+ */
21731
+ atomic_refusal?: null | OsfqlAtomicRefusalDto;
21732
+ /**
21733
+ * Whether ANY statement of the program mutates the store — folding every
21734
+ * nested statement, so an `IF` whose branch writes reports `true`, and
21735
+ * including an inline-write `MATCH`, which classifies as a read (#266).
21736
+ */
21737
+ mutates: boolean;
21738
+ /** One entry per top-level statement, in document order. */
21739
+ statements: OsfqlPreviewStatementDto[];
21740
+ }
21741
+ /** One sort's share of an affected-row set (#271). */
21742
+ interface OsfqlPreviewSortCountDto {
21743
+ /**
21744
+ * How many of the affected rows are of this sort.
21745
+ * @min 0
21746
+ */
21747
+ count: number;
21748
+ /** The sort's name, or its id when the tenant's lattice cannot name it. */
21749
+ sort: string;
21750
+ }
21751
+ /** One statement of a previewed OSFQL program (recursive) */
21752
+ interface OsfqlPreviewStatementDto {
21753
+ /**
21754
+ * The rows a destructive statement would affect, counted by running the
21755
+ * derived read-only `MATCH` against a snapshot — never against the live store.
21756
+ */
21757
+ affected?: OsfqlPreviewAffectedDto;
21758
+ id: string;
21759
+ index: number;
21760
+ mutates: boolean;
21761
+ nested?: OsfqlPreviewStatementDto[];
21762
+ /**
21763
+ * Safety tier assigned per entry — a coarse pre-filter. The security boundary
21764
+ * re-derives the real tier per authored statement at execution (see the plan
21765
+ * §9.1); an entry with mixed sub-ops carries its most-dangerous dominant tier.
21766
+ *
21767
+ * WIRE: this enum is `snake_case` in JSON — DELIBERATELY, because it is the
21768
+ * `risk_tier` value on the descriptor-embedded `UIAction` wire contract
21769
+ * (`"targeted_destructive"`, `"additive_write"`, …) that `/ui/action` reads
21770
+ * back and the frontend maps to guardrail flows. `Deserialize` is required for
21771
+ * that same round-trip. A consequence is that the already-live
21772
+ * `GET /api/v1/osfql/catalog` endpoint now serializes its `risk` field
21773
+ * snake_case while sibling enums (`family`/`category`) remain PascalCase — an
21774
+ * intentional, documented casing mix in that DEBUG/introspection endpoint,
21775
+ * which has no in-app consumer (only the catalog handler + its mod re-export).
21776
+ * The sibling casing is left as-is to avoid a broader unannounced change to
21777
+ * that shipped endpoint's other fields.
21778
+ */
21779
+ risk: RiskTier$1;
21780
+ sorts: string[];
21781
+ source: string;
21782
+ statement: string;
21783
+ }
21358
21784
  /** A 0-based, UTF-16 source range (LSP-compatible). */
21359
21785
  interface OsfqlRangeDto {
21360
21786
  /**
@@ -23102,6 +23528,10 @@ interface ProvideFeedbackResponse$1 {
23102
23528
  * - `"constraint.*"` - Various constraint types (sort, feature, equality, etc.)
23103
23529
  * - `"variable"` - A logic variable with optional `_name`
23104
23530
  * - Any domain sort (person, document, etc.)
23531
+ * `PartialEq` is required by [`FeatureValueDto`], which derives it and now
23532
+ * carries a `PsiTermDto` in its `Term` variant (#267). The recursion is by
23533
+ * `Box`, and the OpenAPI schemas reference each other by `$ref` rather than
23534
+ * inlining, so neither the compiler nor the spec builder loops.
23105
23535
  */
23106
23536
  interface PsiTermDto$1 {
23107
23537
  /**
@@ -23461,17 +23891,56 @@ interface RebuildDerivedFactsResponse {
23461
23891
  * Per-tenant materialization LSN at the moment the response was
23462
23892
  * produced. Read-side caches consult this value to know whether
23463
23893
  * they have observed every successfully applied event.
23894
+ *
23895
+ * ⚠️ Read BEFORE the queued bootstrap runs, so it is the last COMPLETED
23896
+ * lsn, not this rebuild's.
23464
23897
  * @format int64
23465
23898
  * @min 0
23466
23899
  */
23467
23900
  materialization_lsn: number;
23468
23901
  /**
23469
- * Number of rows truncated from `derived_facts` for this tenant.
23902
+ * Derived TERMS the synchronous re-chain put back into the tenant's
23903
+ * RESIDENT store — the set every read surface answers from (#270).
23904
+ *
23905
+ * ⚠️ Terms, not distinct conclusions: one conclusion is materialised as a
23906
+ * `meta.clause` wrapper plus the literal-queryable inner copy a `MATCH`
23907
+ * reads, so the number here is larger than the row count a browse of the
23908
+ * conclusion sort returns. Read it as "the repair did work", not as a row
23909
+ * count.
23910
+ *
23911
+ * Non-zero means the tenant HAD drifted and is now repaired; `0` on a
23912
+ * healthy tenant means there was nothing provable that was not already
23913
+ * materialised. This is the field that makes the endpoint a repair rather
23914
+ * than a report: before #270 it truncated an empty durable table, queued
23915
+ * an event no reader observes, and answered `removed: 0` while the
23916
+ * materialised set stayed exactly as drifted as it was.
23917
+ *
23918
+ * ⚠️ ONE DIRECTION: it re-materialises what the rules prove and the store
23919
+ * lacks, and does not remove a conclusion the rules no longer support.
23920
+ * That is the write doors' truth maintenance (#241, #260), which runs on
23921
+ * the write that changed the premise — so a store where the two disagree
23922
+ * is a defect in that machinery, not a state this endpoint exists to mop
23923
+ * up.
23924
+ * @min 0
23925
+ */
23926
+ rematerialised: number;
23927
+ /**
23928
+ * Number of rows truncated from the DURABLE `derived_facts` table for
23929
+ * this tenant.
23930
+ *
23931
+ * ⚠️ Not a count any reader feels: no OSFQL `CHAIN` ever writes that
23932
+ * table, so a tenant built through OSFQL reports `0` here whatever its
23933
+ * materialised set holds, and no read surface consults it. The field that
23934
+ * describes what a reader will see is [`Self::rematerialised`] (#270).
23470
23935
  * @min 0
23471
23936
  */
23472
23937
  removed: number;
23473
23938
  /**
23474
23939
  * Number of `BootstrapRule` events queued to the supervisor.
23940
+ *
23941
+ * ⚠️ The size of the ruleset the queued bootstrap will process, not a
23942
+ * count of work that has finished. The bootstrap writes the durable
23943
+ * `derived_facts` table, which no read surface consults.
23475
23944
  * @min 0
23476
23945
  */
23477
23946
  rules_queued: number;
@@ -23845,8 +24314,24 @@ interface RegisterFunctionRequest$1 {
23845
24314
  arity: number;
23846
24315
  clauses: FunctionClauseDto$1[];
23847
24316
  name: string;
23848
- /** @format uuid */
23849
- tenant_id: string;
24317
+ /**
24318
+ * OPTIONAL, and ignored when it agrees with `X-Tenant-Id`: the tenant is
24319
+ * the authenticated principal's, never a body field.
24320
+ *
24321
+ * It was mandatory until #268, which made the route refuse a body without
24322
+ * it — a field the handler then discarded. That is the shape
24323
+ * `ReplaceFunctionRequest` had already rejected for `PUT`, and the
24324
+ * generated SDK documented `FunctionDraftDto` as "RegisterFunctionRequest
24325
+ * minus tenant_id" while the route demanded it, so the doc and the route
24326
+ * disagreed.
24327
+ *
24328
+ * A value that CONTRADICTS the header is refused with
24329
+ * `function_tenant_mismatch` rather than discarded: the isolation was
24330
+ * always right, but the caller was never told the request had said
24331
+ * something false.
24332
+ * @format uuid
24333
+ */
24334
+ tenant_id?: string | null;
23850
24335
  }
23851
24336
  /** Response from function registration */
23852
24337
  interface RegisterFunctionResponse$1 {
@@ -27848,7 +28333,7 @@ interface SortDto$1 {
27848
28333
  * equivalence **hypotheses** a curator confirms — never identities the
27849
28334
  * engine asserts.
27850
28335
  */
27851
- coextensive?: CoextensiveDefinitionDto[];
28336
+ coextensive?: CoextensiveDefinitionDto$1[];
27852
28337
  /**
27853
28338
  * The ONE defining formula of a *defined* sort, rendered
27854
28339
  * (`mod_3∘id(day) = 1`). `None` for a nominal sort. Without it a client
@@ -29961,6 +30446,22 @@ interface TermBindingDto$1 {
29961
30446
  }
29962
30447
  /** API representation of a term */
29963
30448
  interface TermDto$1 {
30449
+ /**
30450
+ * The rule that FIRST materialised this conclusion, `None` for an
30451
+ * asserted fact (#261). Read from the same `_derived_by` marker `origin`
30452
+ * is read from, and joinable with the rule id in
30453
+ * `GET /api/v1/inference/rules`.
30454
+ *
30455
+ * ⚠️ An ATTRIBUTION, not the proof set. A conclusion proved by a second
30456
+ * rule keeps the first materialiser's id, exactly as `derived_facts.rule_id`
30457
+ * does (#231). For every recorded firing, ask
30458
+ * `POST /api/v1/inference/backward-chain`.
30459
+ *
30460
+ * Response-only: every write door refuses `_derived_by`
30461
+ * (`is_engine_reserved_feature`), so a caller cannot assert provenance.
30462
+ * @format uuid
30463
+ */
30464
+ derived_by?: string | null;
29964
30465
  /**
29965
30466
  * Human-readable display name extracted from features under a total,
29966
30467
  * deterministic precedence: a feature the sort annotates `displayLabel`,
@@ -30026,6 +30527,7 @@ interface TermExistsResponse {
30026
30527
  * TermInputDto
30027
30528
  * Input for creating/referencing a term (TRUE HOMOICONICITY). Either:
30028
30529
  * - {term_id: UUID} to reference an existing term, OR
30530
+ * - {designator: {sort_name, features}} to address an existing term through its sort's @key, OR
30029
30531
  * - {sort_id: UUID, features: {...}} to define inline with sort ID, OR
30030
30532
  * - {sort_name: String, features: {...}} to define inline with sort name (resolved server-side)
30031
30533
  * An inline antecedent may carry binding: "?C" to name its own identity.
@@ -30033,6 +30535,8 @@ interface TermExistsResponse {
30033
30535
  type TermInputDto$1 = {
30034
30536
  /** @format uuid */
30035
30537
  term_id: string;
30538
+ } | {
30539
+ designator: object;
30036
30540
  } | {
30037
30541
  /** Binder naming this clause's own identity (`?C`), shared with every `{"name": "?C"}` in the rule — the OSFQL `?C: sort(...)` join */
30038
30542
  binding?: string;
@@ -30065,12 +30569,30 @@ interface TermListRequest {
30065
30569
  /** Response for term list operations */
30066
30570
  interface TermListResponse$1 {
30067
30571
  /**
30068
- * Total count
30572
+ * Rows in THIS page. Equal to `terms.len()`. The doc comment used to read
30573
+ * "Total count" and never meant it — every producer sets the page length
30574
+ * — so the true size moved to `total` rather than silently changing this
30575
+ * value under existing clients (#261).
30069
30576
  * @min 0
30070
30577
  */
30071
30578
  count: number;
30579
+ /**
30580
+ * A truthful remark about an answer a caller could otherwise misread —
30581
+ * today, the one case of an EMPTY answer for a sort whose membership is
30582
+ * derived (#261). Both `GET /api/v1/terms` and
30583
+ * `POST /api/v1/query/by-sort` set it, with the remedy each route can
30584
+ * honestly offer. Never an error and never a substitute for
30585
+ * one; ignore it and the rows beside it are still correct.
30586
+ */
30587
+ note?: string | null;
30072
30588
  /** List of terms */
30073
30589
  terms: TermDto$1[];
30590
+ /**
30591
+ * Rows the request matched BEFORE `offset`/`limit`. `None` on a route
30592
+ * that does not page. A counted size, never a search bound.
30593
+ * @min 0
30594
+ */
30595
+ total?: number | null;
30074
30596
  }
30075
30597
  /**
30076
30598
  * Provenance of a fact on a read surface (#250).
@@ -30393,6 +30915,19 @@ interface ThresholdAnchorDto {
30393
30915
  */
30394
30916
  threshold: number;
30395
30917
  }
30918
+ /**
30919
+ * A `504` body. `error` and `message` are unchanged from [`ErrorResponse`];
30920
+ * `error_type` is the discriminator `POST /api/v1/osfql` already publishes, so
30921
+ * a client handles ONE timeout contract across both routes (#252, #256).
30922
+ */
30923
+ interface TimeoutErrorResponse {
30924
+ /** The canonical status reason, `"Gateway Timeout"`. */
30925
+ error: string;
30926
+ /** Always `"timeout"`. */
30927
+ error_type: string;
30928
+ /** What was abandoned, and the knob that raises or removes the bound. */
30929
+ message: string;
30930
+ }
30396
30931
  /** Token usage from LLM API calls during ingestion */
30397
30932
  interface TokenUsageDto$1 {
30398
30933
  /**
@@ -31902,8 +32437,13 @@ type ValueDto$1 = {
31902
32437
  type: "Uninstantiated";
31903
32438
  } | {
31904
32439
  type: "Reference";
31905
- /** @format uuid */
31906
- value: string;
32440
+ /** The referenced term's id */
32441
+ value: string | {
32442
+ /** The @key feature values that pick one term out of that extent */
32443
+ features: Record<string, ValueDto$1>;
32444
+ /** The sort whose extent the designator addresses */
32445
+ sort_name: string;
32446
+ };
31907
32447
  } | {
31908
32448
  type: "SortId";
31909
32449
  /** @format uuid */
@@ -33238,10 +33778,67 @@ interface BooleanValue {
33238
33778
  interface UninstantiatedValue {
33239
33779
  type: 'Uninstantiated';
33240
33780
  }
33241
- /** A reference to another term by UUID. Produces `{"type": "Reference", "value": "uuid"}`. */
33781
+ /**
33782
+ * A designator that names a stored term by its `@key` values instead of by id.
33783
+ *
33784
+ * @remarks
33785
+ * The SDK surface spells the sort key `sortName`; the wire spells it
33786
+ * `sort_name`. `features` is a USER-KEYED map — its keys are the OSF feature
33787
+ * names the sort declares, so they are carried verbatim through the request
33788
+ * bridge (`features` is in `USER_DATA_FIELDS`) and a camelCase feature such as
33789
+ * `invoiceNumber` is NOT snake_cased.
33790
+ *
33791
+ * **Every named feature must be declared `@key` on that sort**, and the
33792
+ * designator must name at least one. Measured against the engine on
33793
+ * 2026-09-18:
33794
+ *
33795
+ * - a feature that is not `@key` →
33796
+ * `422 feature 'label' of sort 'nokey' is not a @key feature; a designator addresses a term only through its @key`
33797
+ * - an empty map →
33798
+ * `422 a reference designator for sort 'invoice' names no feature`
33799
+ * - an unknown sort →
33800
+ * `422 reference designator names unknown sort 'no_such_sort'`
33801
+ * - no term carrying the key →
33802
+ * `422 no term of sort 'invoice' carries @key 'number' = "INV-NOPE"; a reference designator names an existing term, it never creates one`
33803
+ *
33804
+ * @example
33805
+ * ```typescript
33806
+ * const designator: ReferenceDesignator = {
33807
+ * sortName: 'invoice',
33808
+ * features: { number: { type: 'String', value: 'INV-1' } },
33809
+ * };
33810
+ * ```
33811
+ */
33812
+ interface ReferenceDesignator {
33813
+ /** The sort whose extent the designator addresses. */
33814
+ sortName: string;
33815
+ /** The `@key` feature values that pick one term out of that extent. */
33816
+ features: Record<string, ValueDto>;
33817
+ }
33818
+ /**
33819
+ * A reference to another term, by UUID or by `@key` designator.
33820
+ *
33821
+ * @remarks
33822
+ * Produces `{"type": "Reference", "value": "uuid"}` for the id form and
33823
+ * `{"type": "Reference", "value": {"sort_name": "...", "features": {...}}}`
33824
+ * for the designator form.
33825
+ *
33826
+ * **The two forms are not interchangeable.** The designator is a WRITE-side
33827
+ * convenience: it RESOLVES to an existing term, and the engine refuses it when
33828
+ * nothing matches — it never mints the target. A READ always answers the
33829
+ * resolved UUID form, so a response never carries a designator. Measured on
33830
+ * 2026-09-18: a term written with
33831
+ * `{"type":"Reference","value":{"sort_name":"invoice","features":{"number":{"type":"String","value":"INV-1"}}}}`
33832
+ * reads back as `{"type":"Reference","value":"4641cbcb-79f4-413a-b4a4-2ba5d6bebf8d"}`
33833
+ * — the id of the invoice that already existed — and the invoice extent still
33834
+ * held exactly one term.
33835
+ *
33836
+ * See {@link ReferenceDesignator} for the refusals the designator form can
33837
+ * produce.
33838
+ */
33242
33839
  interface ReferenceValue {
33243
33840
  type: 'Reference';
33244
- value: string;
33841
+ value: string | ReferenceDesignator;
33245
33842
  }
33246
33843
  /**
33247
33844
  * A reference to a sort by UUID. Produces `{"type": "SortId", "value": "uuid"}`.
@@ -33861,6 +34458,7 @@ type values_Point2DGeometry = Point2DGeometry;
33861
34458
  type values_PolygonGeometry = PolygonGeometry;
33862
34459
  type values_PsiTermValue = PsiTermValue;
33863
34460
  type values_RealValue = RealValue;
34461
+ type values_ReferenceDesignator = ReferenceDesignator;
33864
34462
  type values_ReferenceValue = ReferenceValue;
33865
34463
  type values_SShapeShape = SShapeShape;
33866
34464
  type values_SetValue = SetValue;
@@ -33879,7 +34477,7 @@ type values_ValueDto = ValueDto;
33879
34477
  type values_VariableFeatureValue = VariableFeatureValue;
33880
34478
  type values_ZShapeShape = ZShapeShape;
33881
34479
  declare namespace values {
33882
- export type { values_BellShape as BellShape, values_BigIntegerValue as BigIntegerValue, values_BooleanValue as BooleanValue, values_BoundingBoxGeometry as BoundingBoxGeometry, values_CauchyShape as CauchyShape, values_ChoiceValue as ChoiceValue, values_CircleGeometry as CircleGeometry, values_CosineShape as CosineShape, values_CyclicGaussianShape as CyclicGaussianShape, values_DateTimeValue as DateTimeValue, values_DomainValue as DomainValue, values_ExternalRefValue as ExternalRefValue, values_FeatureTargetDto as FeatureTargetDto, values_FeatureValueDto as FeatureValueDto, values_FuzzyNumberValue as FuzzyNumberValue, values_FuzzyScalarValue as FuzzyScalarValue, values_FuzzyShapeDto as FuzzyShapeDto, values_GaussianProductShape as GaussianProductShape, values_GaussianShape as GaussianShape, values_GeometryDto as GeometryDto, values_GeometryValue as GeometryValue, values_IntegerValue as IntegerValue, values_ListValue as ListValue, values_LiteralFeatureValue as LiteralFeatureValue, values_MeasurementUnitDto as MeasurementUnitDto, values_MeasurementValue as MeasurementValue, values_PiShapeShape as PiShapeShape, values_PiecewiseLinearShape as PiecewiseLinearShape, values_Point2DGeometry as Point2DGeometry, values_PolygonGeometry as PolygonGeometry, values_PsiTermValue as PsiTermValue, values_RealValue as RealValue, values_ReferenceValue as ReferenceValue, values_SShapeShape as SShapeShape, values_SetValue as SetValue, values_SigmoidDifferenceShape as SigmoidDifferenceShape, values_SigmoidProductShape as SigmoidProductShape, values_SigmoidShape as SigmoidShape, values_SortIdValue as SortIdValue, values_SpikeShape as SpikeShape, values_StringValue as StringValue, values_TaggedFeatureValueDto as TaggedFeatureValueDto, values_TermRefFeatureValue as TermRefFeatureValue, values_TrapezoidalShape as TrapezoidalShape, values_TriangularShape as TriangularShape, values_UninstantiatedValue as UninstantiatedValue, values_ValueDto as ValueDto, values_VariableFeatureValue as VariableFeatureValue, values_ZShapeShape as ZShapeShape };
34480
+ export type { values_BellShape as BellShape, values_BigIntegerValue as BigIntegerValue, values_BooleanValue as BooleanValue, values_BoundingBoxGeometry as BoundingBoxGeometry, values_CauchyShape as CauchyShape, values_ChoiceValue as ChoiceValue, values_CircleGeometry as CircleGeometry, values_CosineShape as CosineShape, values_CyclicGaussianShape as CyclicGaussianShape, values_DateTimeValue as DateTimeValue, values_DomainValue as DomainValue, values_ExternalRefValue as ExternalRefValue, values_FeatureTargetDto as FeatureTargetDto, values_FeatureValueDto as FeatureValueDto, values_FuzzyNumberValue as FuzzyNumberValue, values_FuzzyScalarValue as FuzzyScalarValue, values_FuzzyShapeDto as FuzzyShapeDto, values_GaussianProductShape as GaussianProductShape, values_GaussianShape as GaussianShape, values_GeometryDto as GeometryDto, values_GeometryValue as GeometryValue, values_IntegerValue as IntegerValue, values_ListValue as ListValue, values_LiteralFeatureValue as LiteralFeatureValue, values_MeasurementUnitDto as MeasurementUnitDto, values_MeasurementValue as MeasurementValue, values_PiShapeShape as PiShapeShape, values_PiecewiseLinearShape as PiecewiseLinearShape, values_Point2DGeometry as Point2DGeometry, values_PolygonGeometry as PolygonGeometry, values_PsiTermValue as PsiTermValue, values_RealValue as RealValue, values_ReferenceDesignator as ReferenceDesignator, values_ReferenceValue as ReferenceValue, values_SShapeShape as SShapeShape, values_SetValue as SetValue, values_SigmoidDifferenceShape as SigmoidDifferenceShape, values_SigmoidProductShape as SigmoidProductShape, values_SigmoidShape as SigmoidShape, values_SortIdValue as SortIdValue, values_SpikeShape as SpikeShape, values_StringValue as StringValue, values_TaggedFeatureValueDto as TaggedFeatureValueDto, values_TermRefFeatureValue as TermRefFeatureValue, values_TrapezoidalShape as TrapezoidalShape, values_TriangularShape as TriangularShape, values_UninstantiatedValue as UninstantiatedValue, values_ValueDto as ValueDto, values_VariableFeatureValue as VariableFeatureValue, values_ZShapeShape as ZShapeShape };
33883
34481
  }
33884
34482
 
33885
34483
  /**
@@ -33918,20 +34516,58 @@ interface PsiTermDto {
33918
34516
  /**
33919
34517
  * Input type for specifying a term in inference requests.
33920
34518
  *
33921
- * A structural (untagged) union with three variants:
33922
- * 1. **Reference** — `{ term_id: string }` — reference an existing term by UUID
33923
- * 2. **Inline by sort ID** — `{ sort_id: string, features?: ... }` — define inline by sort UUID
33924
- * 3. **Inline by sort name** — `{ sort_name: string, features?: ... }` — define inline by sort name
34519
+ * A structural (untagged) union with four variants:
34520
+ * 1. **Reference** — `{ term_id: string }` — an existing term, by UUID
34521
+ * 2. **Designator** — `{ designator: { sort_name, features } }` — an existing term, by its sort's `@key`
34522
+ * 3. **Inline by sort ID** — `{ sort_id: string, features?: ... }` — define inline by sort UUID
34523
+ * 4. **Inline by sort name** — `{ sort_name: string, features?: ... }` — define inline by sort name
33925
34524
  *
33926
34525
  * @remarks
33927
34526
  * **Serialization format: Untagged (structural discrimination).**
33928
34527
  *
33929
- * The backend Rust type is `TermInputDto` in `dto/homoiconic.rs` with `#[serde(untagged)]`.
33930
- * The backend tries each variant in order: Reference, Inline, InlineByName.
34528
+ * The backend Rust type is `TermInputDto` in `dto/homoiconic.rs` with
34529
+ * `#[serde(untagged)]`, and it tries each variant in declaration order:
34530
+ * Reference, Designator, Inline, InlineByName.
33931
34531
  *
33932
34532
  * Use `TermInput.*` builders to construct these values safely.
33933
34533
  */
33934
- type TermInputDto = TermInputRef | TermInputInline | TermInputInlineByName;
34534
+ type TermInputDto = TermInputRef | TermInputDesignator | TermInputInline | TermInputInlineByName;
34535
+ /**
34536
+ * An existing term, addressed through its sort's `@key`.
34537
+ *
34538
+ * @remarks
34539
+ * The one variant that neither creates a term nor describes a pattern: it
34540
+ * NAMES a term that already exists, the way {@link TermInputRef} does, but by
34541
+ * the key a caller actually holds rather than by a UUID it does not.
34542
+ *
34543
+ * ⚠️ **Its `features` are TAGGED, inside an otherwise untagged union.** The
34544
+ * backend field is a `ReferenceDesignatorDto`, whose features are
34545
+ * `HashMap<String, ValueDto>` — the term-CRUD format. Measured 2026-09-19:
34546
+ * `{"designator":{"sort_name":"invoice","features":{"number":{"type":"String","value":"INV-1"}}}}`
34547
+ * resolves, while the untagged `{"number":"INV-1"}` is refused with
34548
+ * `422 data did not match any variant of untagged enum TermInputDto`. This is
34549
+ * the one place the two serialization formats meet, and the reason
34550
+ * {@link ReferenceDesignator} is reused here rather than restated.
34551
+ *
34552
+ * What it does, all measured:
34553
+ * - resolves to the term that already exists and mints nothing — `200`, and
34554
+ * the sort's extent is unchanged;
34555
+ * - a key matching nothing is refused: `no term of sort 'invoice' carries
34556
+ * @key 'number' = "NOPE"; a reference designator names an existing term, it
34557
+ * never creates one`;
34558
+ * - a NON-key feature is refused: `feature 'status' of sort 'invoice' is not a
34559
+ * @key feature; a designator addresses a term only through its @key`. A
34560
+ * designator is an address, not a filter.
34561
+ *
34562
+ * ⚠️ **A PATTERN door refuses it.** A rule antecedent answers `rule rejected:
34563
+ * antecedent 0 could not be resolved (a \`designator\` addresses an existing
34564
+ * term of sort \`invoice\` and this route does not resolve one…)`, and a
34565
+ * backward-chain goal answers `400 Invalid goal term`. A pattern has no extent
34566
+ * to address, so use {@link TermInputInline} there.
34567
+ */
34568
+ interface TermInputDesignator {
34569
+ designator: ReferenceDesignator;
34570
+ }
33935
34571
  /** Reference an existing term by UUID. */
33936
34572
  interface TermInputRef {
33937
34573
  termId: string;
@@ -34046,12 +34682,172 @@ type homoiconic_FeatureInputTermRef = FeatureInputTermRef;
34046
34682
  type homoiconic_FeatureInputValueDto = FeatureInputValueDto;
34047
34683
  type homoiconic_FeatureInputVariable = FeatureInputVariable;
34048
34684
  type homoiconic_PsiTermDto = PsiTermDto;
34685
+ type homoiconic_TermInputDesignator = TermInputDesignator;
34049
34686
  type homoiconic_TermInputDto = TermInputDto;
34050
34687
  type homoiconic_TermInputInline = TermInputInline;
34051
34688
  type homoiconic_TermInputInlineByName = TermInputInlineByName;
34052
34689
  type homoiconic_TermInputRef = TermInputRef;
34053
34690
  declare namespace homoiconic {
34054
- export type { homoiconic_FeatureInputConstrainedVariable as FeatureInputConstrainedVariable, homoiconic_FeatureInputInlineTerm as FeatureInputInlineTerm, homoiconic_FeatureInputInlineTermByName as FeatureInputInlineTermByName, homoiconic_FeatureInputSortRef as FeatureInputSortRef, homoiconic_FeatureInputTermRef as FeatureInputTermRef, homoiconic_FeatureInputValueDto as FeatureInputValueDto, homoiconic_FeatureInputVariable as FeatureInputVariable, homoiconic_PsiTermDto as PsiTermDto, homoiconic_TermInputDto as TermInputDto, homoiconic_TermInputInline as TermInputInline, homoiconic_TermInputInlineByName as TermInputInlineByName, homoiconic_TermInputRef as TermInputRef };
34691
+ export type { homoiconic_FeatureInputConstrainedVariable as FeatureInputConstrainedVariable, homoiconic_FeatureInputInlineTerm as FeatureInputInlineTerm, homoiconic_FeatureInputInlineTermByName as FeatureInputInlineTermByName, homoiconic_FeatureInputSortRef as FeatureInputSortRef, homoiconic_FeatureInputTermRef as FeatureInputTermRef, homoiconic_FeatureInputValueDto as FeatureInputValueDto, homoiconic_FeatureInputVariable as FeatureInputVariable, homoiconic_PsiTermDto as PsiTermDto, homoiconic_TermInputDesignator as TermInputDesignator, homoiconic_TermInputDto as TermInputDto, homoiconic_TermInputInline as TermInputInline, homoiconic_TermInputInlineByName as TermInputInlineByName, homoiconic_TermInputRef as TermInputRef };
34692
+ }
34693
+
34694
+ /**
34695
+ * A format-agnostic psi-term produced by the `psi()` builder.
34696
+ *
34697
+ * @remarks
34698
+ * Can be passed to both term CRUD methods (converted to tagged `ValueDto` format)
34699
+ * and inference methods (converted to untagged `TermInputDto` format).
34700
+ * The SDK handles the conversion automatically based on which method receives it.
34701
+ *
34702
+ * Distinguished from plain objects by the `__psiTerm` brand field, which is
34703
+ * stripped before serialization.
34704
+ *
34705
+ * @example
34706
+ * ```typescript
34707
+ * // Works with term CRUD:
34708
+ * await client.terms.createTerm({ sortId, ownerId, features: { name: "Alice" } });
34709
+ *
34710
+ * // Works with inference:
34711
+ * await client.inference.addFact({ term: psi("person", { name: "Alice" }) });
34712
+ * ```
34713
+ */
34714
+ /**
34715
+ * A psi-term identified by sort name.
34716
+ */
34717
+ interface PsiTermInputByName {
34718
+ /** @internal Brand field to distinguish from plain objects. Stripped before serialization. */
34719
+ readonly __psiTerm: true;
34720
+ /** Sort name for this term (resolved server-side). */
34721
+ readonly sortName: string;
34722
+ /** Features using plain JavaScript values. */
34723
+ readonly features?: PlainFeatureMap;
34724
+ /**
34725
+ * Binder naming this term's own identity (`?C`), from {@link bind}.
34726
+ *
34727
+ * @remarks
34728
+ * Only meaningful in an inference context, where it writes the OSFQL
34729
+ * `?C: sort(...)` join.
34730
+ */
34731
+ readonly binding?: string;
34732
+ }
34733
+ /**
34734
+ * A psi-term identified by sort ID (UUID).
34735
+ */
34736
+ interface PsiTermInputById {
34737
+ /** @internal Brand field to distinguish from plain objects. Stripped before serialization. */
34738
+ readonly __psiTerm: true;
34739
+ /** Sort ID (UUID) for this term. */
34740
+ readonly sortId: string;
34741
+ /** Features using plain JavaScript values. */
34742
+ readonly features?: PlainFeatureMap;
34743
+ /**
34744
+ * Binder naming this term's own identity (`?C`), from {@link bind}.
34745
+ *
34746
+ * @remarks
34747
+ * Only meaningful in an inference context, where it writes the OSFQL
34748
+ * `?C: sort(...)` join.
34749
+ */
34750
+ readonly binding?: string;
34751
+ }
34752
+ /**
34753
+ * A format-agnostic psi-term produced by the `psi()` builder.
34754
+ *
34755
+ * @remarks
34756
+ * Exactly one of `sortName` or `sortId` is present — enforced by the union type.
34757
+ * Can be passed to both term CRUD methods (converted to tagged `ValueDto` format)
34758
+ * and inference methods (converted to untagged `TermInputDto` format).
34759
+ * The SDK handles the conversion automatically based on which method receives it.
34760
+ *
34761
+ * Distinguished from plain objects by the `__psiTerm` brand field, which is
34762
+ * stripped before serialization.
34763
+ *
34764
+ * @example
34765
+ * ```typescript
34766
+ * // Works with term CRUD:
34767
+ * await client.terms.createTerm({ sortId, ownerId, features: { name: "Alice" } });
34768
+ *
34769
+ * // Works with inference:
34770
+ * await client.inference.addFact({ term: psi("person", { name: "Alice" }) });
34771
+ * ```
34772
+ */
34773
+ type PsiTermInput = PsiTermInputByName | PsiTermInputById;
34774
+ /**
34775
+ * A constrained variable for use in inference contexts.
34776
+ *
34777
+ * @remarks
34778
+ * Created via the `constrained()` helper. Distinguished from plain arrays
34779
+ * by the `__constrainedVar` brand field, which is stripped before serialization.
34780
+ *
34781
+ * @example
34782
+ * ```typescript
34783
+ * psi("eligible", { score: constrained("?S", guard("gt", 700)) })
34784
+ * ```
34785
+ */
34786
+ interface ConstrainedPlainVar {
34787
+ /** @internal Brand field. Stripped before serialization. */
34788
+ readonly __constrainedVar: true;
34789
+ /** Variable name (must start with "?"). */
34790
+ readonly name: string;
34791
+ /** Constraint as a TermInputDto or PsiTermInput. */
34792
+ readonly constraint: TermInputDto | PsiTermInput;
34793
+ }
34794
+ /**
34795
+ * A plain JavaScript value that the SDK auto-converts to the correct wire format.
34796
+ *
34797
+ * @remarks
34798
+ * The SDK converts this to either tagged `ValueDto` or untagged `FeatureInputValueDto`
34799
+ * depending on which resource client method receives it:
34800
+ *
34801
+ * - `string` — string value (or variable if `?`-prefixed in inference context)
34802
+ * - `number` — integer if `Number.isInteger()`, real otherwise
34803
+ * - `boolean` — boolean value
34804
+ * - `null` — uninstantiated
34805
+ * - `PsiTermInput` — nested inline term (from `psi()` builder)
34806
+ * - `ConstrainedPlainVar` — constrained variable (from `constrained()` helper)
34807
+ * - `PlainFeatureValue[]` — list of values
34808
+ * - `ValueDto` — passthrough (already in tagged format)
34809
+ * - `FeatureInputValueDto` — passthrough (already in untagged format)
34810
+ *
34811
+ * Fuzzy and set values cannot be expressed as plain JS values. Use `Value.fuzzyScalar()`,
34812
+ * `Value.fuzzyNumber()`, or `Value.set()` directly — they pass through unchanged.
34813
+ */
34814
+ type PlainFeatureValue = string | number | boolean | null | PsiTermInput | ConstrainedPlainVar | PlainFeatureValue[] | ValueDto | FeatureInputValueDto;
34815
+ /**
34816
+ * A feature map using plain JavaScript values.
34817
+ *
34818
+ * @remarks
34819
+ * Pass this to resource client methods. The SDK converts to the appropriate
34820
+ * wire format (tagged or untagged) based on which method is called.
34821
+ *
34822
+ * @example
34823
+ * ```typescript
34824
+ * const features: PlainFeatureMap = {
34825
+ * name: "Alice",
34826
+ * age: 30,
34827
+ * active: true,
34828
+ * salary: null, // uninstantiated
34829
+ * };
34830
+ * ```
34831
+ */
34832
+ type PlainFeatureMap = Record<string, PlainFeatureValue>;
34833
+ /**
34834
+ * Union of PsiTermInput or already-formatted TermInputDto.
34835
+ *
34836
+ * @remarks
34837
+ * Accepted by inference resource client methods that take term inputs.
34838
+ * If a `PsiTermInput` is passed, it is converted to `TermInputDto` internally.
34839
+ */
34840
+ type TermInputArg = PsiTermInput | TermInputDto;
34841
+
34842
+ type plainValues_ConstrainedPlainVar = ConstrainedPlainVar;
34843
+ type plainValues_PlainFeatureMap = PlainFeatureMap;
34844
+ type plainValues_PlainFeatureValue = PlainFeatureValue;
34845
+ type plainValues_PsiTermInput = PsiTermInput;
34846
+ type plainValues_PsiTermInputById = PsiTermInputById;
34847
+ type plainValues_PsiTermInputByName = PsiTermInputByName;
34848
+ type plainValues_TermInputArg = TermInputArg;
34849
+ declare namespace plainValues {
34850
+ export type { plainValues_ConstrainedPlainVar as ConstrainedPlainVar, plainValues_PlainFeatureMap as PlainFeatureMap, plainValues_PlainFeatureValue as PlainFeatureValue, plainValues_PsiTermInput as PsiTermInput, plainValues_PsiTermInputById as PsiTermInputById, plainValues_PsiTermInputByName as PsiTermInputByName, plainValues_TermInputArg as TermInputArg };
34055
34851
  }
34056
34852
 
34057
34853
  /**
@@ -34162,6 +34958,24 @@ interface TermDto {
34162
34958
  * is writing over a conclusion the engine will recompute.
34163
34959
  */
34164
34960
  origin?: TermOrigin;
34961
+ /**
34962
+ * The rule that FIRST materialised this conclusion, absent on an asserted
34963
+ * fact.
34964
+ *
34965
+ * @remarks
34966
+ * Joinable with the rule id from `client.inference.getRules()`, so a UI can
34967
+ * show "concluded by <rule>" beside a `derived` row instead of only "not
34968
+ * yours to edit".
34969
+ *
34970
+ * ⚠️ An ATTRIBUTION, not the proof set. A conclusion a second rule also
34971
+ * proves keeps the FIRST materialiser's id. For every recorded firing ask
34972
+ * `client.inference.backwardChain(...)`.
34973
+ *
34974
+ * Response-only. Every write door refuses the underlying `_derived_by`
34975
+ * marker, so a caller cannot assert provenance — sending it is a refusal,
34976
+ * not a shortcut.
34977
+ */
34978
+ derivedBy?: string;
34165
34979
  }
34166
34980
  /**
34167
34981
  * Response wrapper for term CRUD operations.
@@ -34195,7 +35009,52 @@ interface CreateTermRequest {
34195
35009
  ownerId: string;
34196
35010
  /** Named features with tagged values. */
34197
35011
  features: Record<string, ValueDto>;
35012
+ /**
35013
+ * A client-minted id for the new term.
35014
+ *
35015
+ * @remarks
35016
+ * Omit it and the engine mints one. Supplying it lets a batch reference the
35017
+ * ids it is itself creating — see {@link BulkAddTermsRequest}.
35018
+ */
35019
+ id?: string;
35020
+ }
35021
+ /**
35022
+ * A term write that names its sort by NAME rather than by id.
35023
+ *
35024
+ * @remarks
35025
+ * `POST /api/v1/inference/facts` and every OSFQL write have always taken a
35026
+ * sort name; the term routes took only a UUID, so a caller holding names had
35027
+ * to resolve every sort first — worst on the bulk route, the one place the
35028
+ * extra round trips cost most, because it exists for volume.
35029
+ *
35030
+ * Exactly one of the two spellings per entry. Both deny unknown fields on the
35031
+ * wire, so an entry carrying `sort_id` AND `sort_name` matches neither and is
35032
+ * refused — measured, `422 data did not match any variant of untagged enum
35033
+ * CreateTermInput`. A name this tenant does not declare is refused too, and it
35034
+ * never mints a sort: `422 unknown sort \`nosuch\`: this tenant declares no
35035
+ * sort by that name. Declare it first, or name the sort by \`sort_id\`.`
35036
+ *
35037
+ * **Serialization format**: features use the tagged {@link ValueDto} format,
35038
+ * like every term-CRUD route.
35039
+ */
35040
+ interface CreateTermByNameRequest {
35041
+ /** The sort's name, resolved against the tenant's lattice. */
35042
+ sortName: string;
35043
+ /** Owner user ID (UUID). */
35044
+ ownerId: string;
35045
+ /** Named features with tagged values. */
35046
+ features: Record<string, ValueDto>;
35047
+ /** A client-minted id, read exactly as {@link CreateTermRequest.id}. */
35048
+ id?: string;
34198
35049
  }
35050
+ /**
35051
+ * A term write, naming its sort by id or by name.
35052
+ *
35053
+ * @remarks
35054
+ * A single batch may mix the two spellings freely — measured, one bulk call
35055
+ * carrying one entry of each answered `201` with two ids.
35056
+ */
35057
+ type CreateTermInput = CreateTermRequest | CreateTermByNameRequest;
34199
35058
  /**
34200
35059
  * Request to update an existing term.
34201
35060
  *
@@ -34209,8 +35068,94 @@ interface UpdateTermRequest {
34209
35068
  }
34210
35069
  /** Request to bulk-create terms. */
34211
35070
  interface BulkAddTermsRequest {
34212
- /** Terms to create. */
34213
- terms: CreateTermRequest[];
35071
+ /** Terms to create, each naming its sort by id or by name. */
35072
+ terms: CreateTermInput[];
35073
+ /**
35074
+ * Run every check the write runs, then write nothing.
35075
+ *
35076
+ * @remarks
35077
+ * Conversion, declarations, coreference and events all run, inside the write
35078
+ * lock, and the store and facade are put back before the route answers.
35079
+ * Nothing persists, nothing is notified, no derivation is queued.
35080
+ *
35081
+ * A clean dry run answers the count the batch WOULD have produced and no
35082
+ * {@link BulkAddTermsResponse.termIds}: the rollback already discarded every
35083
+ * id it minted, and a later real write mints different ones — so the vector
35084
+ * would have named nothing. The ids that DO outlive a dry run are the
35085
+ * entities a `@key` coreference would have merged into, and those come back
35086
+ * as {@link BulkAddTermsResponse.coreferencedTermIds}.
35087
+ *
35088
+ * A refused dry run answers the same per-row refusals the real write answers
35089
+ * with, as {@link BulkRefusedError}.
35090
+ *
35091
+ * @defaultValue `false`
35092
+ */
35093
+ dryRun?: boolean;
35094
+ /**
35095
+ * Write the rows the checks did NOT refuse, instead of refusing the batch
35096
+ * because one row failed.
35097
+ *
35098
+ * @remarks
35099
+ * Without it a batch holding one bad record has to be resent minus that
35100
+ * record — a second full call, a second full round of constraint evaluation,
35101
+ * and a window in which a survivor's reference target can be deleted between
35102
+ * the two — although the engine already names every bad row by index in one
35103
+ * pass and therefore already knows which ones were fine.
35104
+ *
35105
+ * With it the answer is `201` when anything was written, and
35106
+ * {@link BulkAddTermsResponse.termIds} carries one id per ACCEPTED row with
35107
+ * {@link BulkAddTermsResponse.errors} beside it. When every row was refused
35108
+ * the answer is still a {@link BulkRefusedError}, because nothing was
35109
+ * written and that is a refusal.
35110
+ *
35111
+ * Two failures stay batch-wide even under this flag, because neither can be
35112
+ * attributed to a row: the end-of-batch constraint propagation answers one
35113
+ * `409` for the whole batch, and a persistence failure reverts what the
35114
+ * batch inserted.
35115
+ *
35116
+ * @defaultValue `false`
35117
+ */
35118
+ partial?: boolean;
35119
+ }
35120
+ /**
35121
+ * What {@link TermsClient.bulkCreateTerms} takes.
35122
+ *
35123
+ * @remarks
35124
+ * {@link BulkAddTermsRequest} with the features relaxed: each row's features
35125
+ * may be plain JS values (`"Alice"`, `30`, `true`, `null`, `[...]`), which the
35126
+ * client tags into {@link ValueDto} before it sends them. Pre-built `Value.*`
35127
+ * output passes through untouched.
35128
+ *
35129
+ * `dryRun` and `partial` are inherited from {@link BulkAddTermsRequest}, with
35130
+ * their meaning documented there.
35131
+ */
35132
+ interface BulkCreateTermsRequest extends Omit<BulkAddTermsRequest, 'terms'> {
35133
+ /** The rows to create, features as plain values or as `Value.*` output. */
35134
+ terms: CreateTermInputWithPlainFeatures[];
35135
+ }
35136
+ /**
35137
+ * A term write in either spelling, with features as plain JavaScript values.
35138
+ *
35139
+ * @remarks
35140
+ * The ergonomic form of {@link CreateTermInput}: the resource methods take
35141
+ * this and tag the features before they reach the wire. Naming the sort by
35142
+ * {@link CreateTermByNameRequest.sortName} or by
35143
+ * {@link CreateTermRequest.sortId} is the caller's choice per entry, and a
35144
+ * single batch may mix them.
35145
+ */
35146
+ type CreateTermInputWithPlainFeatures = (Omit<CreateTermRequest, 'features'> & {
35147
+ features: PlainFeatureMap;
35148
+ }) | (Omit<CreateTermByNameRequest, 'features'> & {
35149
+ features: PlainFeatureMap;
35150
+ });
35151
+ /** One row a bulk write refused, named by its position in the request. */
35152
+ interface BulkRowRefusal {
35153
+ /** Zero-based index into the request's `terms` array. */
35154
+ index: number;
35155
+ /** The refusal in words — the same message a single-term write answers with. */
35156
+ message: string;
35157
+ /** The feature the refusal names, when it names one. */
35158
+ feature?: string;
34214
35159
  }
34215
35160
  /** Response from clearing all terms for a tenant. */
34216
35161
  interface ClearTermsResponse {
@@ -34221,8 +35166,42 @@ interface ClearTermsResponse {
34221
35166
  }
34222
35167
  /** Response from bulk term creation. */
34223
35168
  interface BulkAddTermsResponse {
34224
- /** UUIDs of the created terms, in the same order as the request. */
34225
- termIds: string[];
35169
+ /**
35170
+ * Effective term id per accepted row, in request order.
35171
+ *
35172
+ * @remarks
35173
+ * The created id, or the EXISTING entity's id when the row coreferenced into
35174
+ * it through a `@key`. Absent on a dry run, where the ids were rolled back —
35175
+ * see {@link BulkAddTermsRequest.dryRun}. Under
35176
+ * {@link BulkAddTermsRequest.partial} it carries one id per ACCEPTED row, so
35177
+ * it is shorter than the request when {@link errors} is non-empty; use
35178
+ * `errors[].index` to map a refusal back to its row, never this array's
35179
+ * positions.
35180
+ */
35181
+ termIds?: string[];
35182
+ /** How many terms the write created (or would have created, on a dry run). */
35183
+ termsAdded: number;
35184
+ /** Whether the request asked for a dry run, echoed so an answer is self-describing. */
35185
+ dryRun: boolean;
35186
+ /** How many rows were refused. Absent when none were. */
35187
+ refused?: number;
35188
+ /**
35189
+ * The rows the write refused, each with its index in the request.
35190
+ *
35191
+ * @remarks
35192
+ * Present on a `201` under {@link BulkAddTermsRequest.partial}, where some
35193
+ * rows landed and some did not. When EVERY row was refused the route answers
35194
+ * a {@link BulkRefusedError} instead, which carries the same list.
35195
+ */
35196
+ errors?: BulkRowRefusal[];
35197
+ /**
35198
+ * Existing entities a `@key` coreference merged a row into.
35199
+ *
35200
+ * @remarks
35201
+ * These outlive a dry run, because they existed before it: they are the one
35202
+ * kind of id a dry run can honestly report.
35203
+ */
35204
+ coreferencedTermIds?: string[];
34226
35205
  /** Total processing time in milliseconds. */
34227
35206
  processingTimeMs: number;
34228
35207
  }
@@ -34403,7 +35382,12 @@ interface TermVersionsResponse {
34403
35382
 
34404
35383
  type terms_BulkAddTermsRequest = BulkAddTermsRequest;
34405
35384
  type terms_BulkAddTermsResponse = BulkAddTermsResponse;
35385
+ type terms_BulkCreateTermsRequest = BulkCreateTermsRequest;
35386
+ type terms_BulkRowRefusal = BulkRowRefusal;
34406
35387
  type terms_ClearTermsResponse = ClearTermsResponse;
35388
+ type terms_CreateTermByNameRequest = CreateTermByNameRequest;
35389
+ type terms_CreateTermInput = CreateTermInput;
35390
+ type terms_CreateTermInputWithPlainFeatures = CreateTermInputWithPlainFeatures;
34407
35391
  type terms_CreateTermRequest = CreateTermRequest;
34408
35392
  type terms_DeleteTermReport = DeleteTermReport;
34409
35393
  type terms_FeatureChangeDto = FeatureChangeDto;
@@ -34426,7 +35410,7 @@ type terms_VersionDiffDto = VersionDiffDto;
34426
35410
  type terms_WitnessInstantiationDto = WitnessInstantiationDto;
34427
35411
  type terms_WitnessProofDto = WitnessProofDto;
34428
35412
  declare namespace terms {
34429
- export type { terms_BulkAddTermsRequest as BulkAddTermsRequest, terms_BulkAddTermsResponse as BulkAddTermsResponse, terms_ClearTermsResponse as ClearTermsResponse, terms_CreateTermRequest as CreateTermRequest, terms_DeleteTermReport as DeleteTermReport, terms_FeatureChangeDto as FeatureChangeDto, terms_ReferencedTermSummary as ReferencedTermSummary, terms_ResidualWitnessDto as ResidualWitnessDto, terms_ResiduationDto as ResiduationDto, terms_TermDto as TermDto, terms_TermOrigin as TermOrigin, terms_TermReferencesDisposition as TermReferencesDisposition, terms_TermReferrerDto as TermReferrerDto, terms_TermReferrersResponse as TermReferrersResponse, terms_TermResponse as TermResponse, terms_TermState as TermState, terms_TermVersionDto as TermVersionDto, terms_TermVersionsResponse as TermVersionsResponse, terms_UpdateTermRequest as UpdateTermRequest, terms_ValidatedTermResponse as ValidatedTermResponse, terms_ValidatedUnifyResponse as ValidatedUnifyResponse, terms_VersionDiffDto as VersionDiffDto, terms_WitnessInstantiationDto as WitnessInstantiationDto, terms_WitnessProofDto as WitnessProofDto };
35413
+ export type { terms_BulkAddTermsRequest as BulkAddTermsRequest, terms_BulkAddTermsResponse as BulkAddTermsResponse, terms_BulkCreateTermsRequest as BulkCreateTermsRequest, terms_BulkRowRefusal as BulkRowRefusal, terms_ClearTermsResponse as ClearTermsResponse, terms_CreateTermByNameRequest as CreateTermByNameRequest, terms_CreateTermInput as CreateTermInput, terms_CreateTermInputWithPlainFeatures as CreateTermInputWithPlainFeatures, terms_CreateTermRequest as CreateTermRequest, terms_DeleteTermReport as DeleteTermReport, terms_FeatureChangeDto as FeatureChangeDto, terms_ReferencedTermSummary as ReferencedTermSummary, terms_ResidualWitnessDto as ResidualWitnessDto, terms_ResiduationDto as ResiduationDto, terms_TermDto as TermDto, terms_TermOrigin as TermOrigin, terms_TermReferencesDisposition as TermReferencesDisposition, terms_TermReferrerDto as TermReferrerDto, terms_TermReferrersResponse as TermReferrersResponse, terms_TermResponse as TermResponse, terms_TermState as TermState, terms_TermVersionDto as TermVersionDto, terms_TermVersionsResponse as TermVersionsResponse, terms_UpdateTermRequest as UpdateTermRequest, terms_ValidatedTermResponse as ValidatedTermResponse, terms_ValidatedUnifyResponse as ValidatedUnifyResponse, terms_VersionDiffDto as VersionDiffDto, terms_WitnessInstantiationDto as WitnessInstantiationDto, terms_WitnessProofDto as WitnessProofDto };
34430
35414
  }
34431
35415
 
34432
35416
  /**
@@ -34728,14 +35712,50 @@ interface BackwardChainResponse {
34728
35712
  interface ForwardChainRequest {
34729
35713
  /** Initial facts (optional — uses existing facts if not provided). */
34730
35714
  initialFacts?: TermInputDto[];
34731
- /** Whether to persist derived facts to storage. */
34732
- persistDerived?: boolean;
35715
+ /**
35716
+ * KEEP the run's derivations resident in the tenant's store instead of
35717
+ * rolling them back, so a later `MATCH` reads them.
35718
+ *
35719
+ * @remarks
35720
+ * Default `false`, and "ephemeral" means ROLLED BACK rather than merely
35721
+ * unwritten: the engine removes every wrapper and inner copy the run created
35722
+ * before it answers. So a default run reports a `derivedCount` and leaves the
35723
+ * store exactly as it found it — **forward chaining is not a repair door**.
35724
+ * To re-materialise a tenant use OSFQL `CHAIN;` or
35725
+ * {@link AdminClient.rebuildDerivedFacts}.
35726
+ *
35727
+ * Not durable, and never was: the engine's old write stored only the
35728
+ * `meta.clause` wrapper of each conclusion and never the inner ground copy a
35729
+ * reader returns, so nothing survived a restart. That write is gone, and the
35730
+ * flag now says what it always did. Named `persistDerived` until the engine
35731
+ * renamed the wire field to `keep_derived`.
35732
+ */
35733
+ keepDerived?: boolean;
34733
35734
  /** Whether to include provenance tags (confidence scores) in the response. */
34734
35735
  enableProvenanceTags?: boolean;
34735
35736
  /** Maximum number of derivation iterations. */
34736
35737
  maxIterations?: number;
34737
35738
  /** Maximum number of facts to derive. */
34738
35739
  maxFacts?: number;
35740
+ /**
35741
+ * A server-side deadline for this derivation, in milliseconds.
35742
+ *
35743
+ * @remarks
35744
+ * The chainer checks it cooperatively — at every fixpoint-iteration boundary,
35745
+ * at every rule application, and inside each rule's own candidate loop — and
35746
+ * the route answers `504` when it passes. Clamped by the engine's
35747
+ * `OSFKB_FC_TIMEOUT_SECS`.
35748
+ *
35749
+ * Omitted means that backstop (300 s by default), which is deliberately
35750
+ * longer than the safe-method one: a full materialisation over a large tenant
35751
+ * legitimately takes longer than a `GET` handler. `0` is the explicit opt-out.
35752
+ *
35753
+ * A deadline does not change what the run keeps — {@link keepDerived} stays
35754
+ * the single switch. A truncated `keepDerived: true` run keeps the partial
35755
+ * derivation it reached, so a re-run continues from it; a truncated default
35756
+ * run is rolled back and keeps nothing. The `504` body says which happened.
35757
+ */
35758
+ timeoutMs?: number | null;
34739
35759
  /**
34740
35760
  * Emit W3C PROV-O lineage for this run (default: `false`).
34741
35761
  *
@@ -34763,8 +35783,15 @@ interface ForwardChainResponse {
34763
35783
  totalFacts: number;
34764
35784
  /** Materialization time in milliseconds. */
34765
35785
  materializationTimeMs: number;
34766
- /** Number of derived facts persisted (only when persist_derived=true). */
34767
- persistedCount?: number;
35786
+ /**
35787
+ * Derivations this run KEPT in the tenant's store.
35788
+ *
35789
+ * @remarks
35790
+ * Non-zero only when the request carried `keepDerived: true`, since a default
35791
+ * run rolls its output back. Counts `meta.clause` wrappers, which is one per
35792
+ * conclusion.
35793
+ */
35794
+ keptCount?: number;
34768
35795
  /** Provenance tags for derived facts (only present when `enable_provenance_tags` was true). */
34769
35796
  provenanceTags?: ProvenanceTagDto[];
34770
35797
  }
@@ -35763,6 +36790,84 @@ declare namespace inference {
35763
36790
  export type { inference_AddFactRequest as AddFactRequest, inference_AddFactResponse as AddFactResponse, inference_AddRuleRequest as AddRuleRequest, inference_AddRuleResponse as AddRuleResponse, inference_AllenRelation as AllenRelation, inference_BackwardChainRequest as BackwardChainRequest, inference_BackwardChainResponse as BackwardChainResponse, inference_BayesianEffectDto as BayesianEffectDto, inference_BayesianPredictRequest as BayesianPredictRequest, inference_BayesianPredictResponse as BayesianPredictResponse, inference_BindingDto as BindingDto, inference_BulkAddFactsRequest as BulkAddFactsRequest, inference_BulkAddFactsResponse as BulkAddFactsResponse, inference_BulkAddRulesRequest as BulkAddRulesRequest, inference_BulkAddRulesResponse as BulkAddRulesResponse, inference_BulkFuzzyProveRequest as BulkFuzzyProveRequest, inference_BulkFuzzyProveResponse as BulkFuzzyProveResponse, inference_BulkRetractTermsRequest as BulkRetractTermsRequest, inference_BulkRetractTermsResponse as BulkRetractTermsResponse, inference_ClearFactsResponse as ClearFactsResponse, inference_ConstraintInputDto as ConstraintInputDto, inference_CreateGoalRequest as CreateGoalRequest, inference_CreateGoalResponse as CreateGoalResponse, inference_DeleteGoalResponse as DeleteGoalResponse, inference_DraftRulesRequest as DraftRulesRequest, inference_DraftRulesResponse as DraftRulesResponse, inference_FactConfidenceEntry as FactConfidenceEntry, inference_ForwardChainRequest as ForwardChainRequest, inference_ForwardChainResponse as ForwardChainResponse, inference_FuzzyProveRequest as FuzzyProveRequest, inference_FuzzyProveResponse as FuzzyProveResponse, inference_GetFactsResponse as GetFactsResponse, inference_GetRulesResponse as GetRulesResponse, inference_GoalDto as GoalDto, inference_GoalSummaryDto as GoalSummaryDto, inference_GuardOp as GuardOp, inference_HomoiconicSubstitutionDto as HomoiconicSubstitutionDto, inference_ListGoalsResponse as ListGoalsResponse, inference_LiteralInputDto as LiteralInputDto, inference_LogOddsAntecedentContributionDto as LogOddsAntecedentContributionDto, inference_LogOddsScoreDecompositionDto as LogOddsScoreDecompositionDto, inference_LogOddsWitnessDto as LogOddsWitnessDto, inference_MetaSortsResponse as MetaSortsResponse, inference_NafProveRequest as NafProveRequest, inference_NafProveResponse as NafProveResponse, inference_ProofDto as ProofDto, inference_ProofKind as ProofKind, inference_ProvenanceTagDto as ProvenanceTagDto, inference_ReplaceRuleResponse as ReplaceRuleResponse, inference_RuleAggregatorDto as RuleAggregatorDto, inference_RuleCertificationDelta as RuleCertificationDelta, inference_RuleDerivationsDisposition as RuleDerivationsDisposition, inference_RuleDraftClarificationQuestionDto as RuleDraftClarificationQuestionDto, inference_RuleDraftDto as RuleDraftDto, inference_RuleEntryDto as RuleEntryDto, inference_RuleNotWithdrawable as RuleNotWithdrawable, inference_RuleOrigin as RuleOrigin, inference_RuleTermDraftDto as RuleTermDraftDto, inference_RuleWithdrawalReport as RuleWithdrawalReport, inference_SolutionDto as SolutionDto, inference_TaggedDerivedFact as TaggedDerivedFact, inference_TaggedForwardChainRequest as TaggedForwardChainRequest, inference_TaggedForwardChainResponse as TaggedForwardChainResponse };
35764
36791
  }
35765
36792
 
36793
+ /**
36794
+ * Request to align a domain ontology against one or more upper ontologies.
36795
+ *
36796
+ * @remarks
36797
+ * Sent to `POST /api/v1/ontology/align`. Wire format is snake_case
36798
+ * (`domain_owl`).
36799
+ */
36800
+ interface AlignOntologyRequest {
36801
+ /** Domain ontology to align, as OWL/RDF-XML. */
36802
+ domainOwl: string;
36803
+ /** Upper ontologies to align against. Defaults to `["BFO"]` when empty. */
36804
+ targets?: string[];
36805
+ }
36806
+ /**
36807
+ * A confirmed SKOS correspondence from a domain class to an upper-ontology class.
36808
+ */
36809
+ interface AlignmentMatchDto {
36810
+ /** Domain sort name. */
36811
+ domainSort: string;
36812
+ /** SKOS relation: `exactMatch` / `broadMatch` / `narrowMatch` / `closeMatch`. */
36813
+ matchType: string;
36814
+ /** Upper-ontology class CURIE (e.g. the BFO IRI's CURIE form). */
36815
+ targetCurie: string;
36816
+ /** Upper-ontology class label. */
36817
+ targetLabel: string;
36818
+ }
36819
+ /**
36820
+ * Two upper-ontology candidates a domain class cannot map to simultaneously
36821
+ * (their lattice meet is ⊥ — e.g. disjoint BFO branches).
36822
+ */
36823
+ interface AlignmentConflictDto {
36824
+ /** Domain sort name whose candidates conflict. */
36825
+ domainSort: string;
36826
+ /** The kept (higher-scored) candidate CURIE. */
36827
+ targetA: string;
36828
+ /** The rejected, incompatible candidate CURIE. */
36829
+ targetB: string;
36830
+ }
36831
+ /**
36832
+ * A SKOS external-ontology alignment attached to a sort.
36833
+ *
36834
+ * @remarks
36835
+ * Populated by the upper-ontology aligner so each correspondence is a live,
36836
+ * queryable property of the sort rather than a separate static export.
36837
+ */
36838
+ interface ExternalMatchDto {
36839
+ /** SKOS mapping relation: `exactMatch` | `closeMatch` | `broadMatch` | `narrowMatch`. */
36840
+ matchType: string;
36841
+ /** CURIE of the aligned external concept (e.g. `obo:BFO_0000023`). */
36842
+ ontologyId: string;
36843
+ /** How the match was discovered: `grounding` | `manual` | `import` | `inferred`. */
36844
+ source: string;
36845
+ }
36846
+ /**
36847
+ * Response from an ontology-alignment run.
36848
+ */
36849
+ interface AlignOntologyResponse {
36850
+ /** Surfaced ⊥-conflicts among proposed candidates. */
36851
+ conflicts: AlignmentConflictDto[];
36852
+ /** Number of domain sorts considered. */
36853
+ domainSorts: number;
36854
+ /** The MAPPING artifact as Turtle (`skos:*` + `kortexya:confidence`). */
36855
+ mappingTtl: string;
36856
+ /** Confirmed SKOS correspondences. */
36857
+ matches: AlignmentMatchDto[];
36858
+ /** Number of upper-ontology target sorts indexed. */
36859
+ targetSorts: number;
36860
+ }
36861
+
36862
+ type ontologyAlignment_AlignOntologyRequest = AlignOntologyRequest;
36863
+ type ontologyAlignment_AlignOntologyResponse = AlignOntologyResponse;
36864
+ type ontologyAlignment_AlignmentConflictDto = AlignmentConflictDto;
36865
+ type ontologyAlignment_AlignmentMatchDto = AlignmentMatchDto;
36866
+ type ontologyAlignment_ExternalMatchDto = ExternalMatchDto;
36867
+ declare namespace ontologyAlignment {
36868
+ export type { ontologyAlignment_AlignOntologyRequest as AlignOntologyRequest, ontologyAlignment_AlignOntologyResponse as AlignOntologyResponse, ontologyAlignment_AlignmentConflictDto as AlignmentConflictDto, ontologyAlignment_AlignmentMatchDto as AlignmentMatchDto, ontologyAlignment_ExternalMatchDto as ExternalMatchDto };
36869
+ }
36870
+
35766
36871
  /**
35767
36872
  * How a sort was created. Tagged union discriminated by `"type"`.
35768
36873
  *
@@ -35906,6 +37011,14 @@ interface FeatureDescriptorDto {
35906
37011
  * Enforced only when the sort's {@link CreateSortRequest.worldMode} is
35907
37012
  * `closed`. On an open sort a missing feature residuates — it is
35908
37013
  * unconstrained, not absent — so `required: true` there constrains nothing.
37014
+ *
37015
+ * This is the same statement as `minCount >= 1` at a coarser resolution,
37016
+ * and the engine derives it: measured, a descriptor sent with
37017
+ * `{ minCount: 2, required: false }` reads back `"required": true`. The
37018
+ * implication runs one way only — `required: true` alone stores no
37019
+ * `minCount` — and the contradictory pair
37020
+ * `{ required: true, minCount: 0 }` is refused with a `400`. See
37021
+ * {@link FeatureDescriptorDto.minCount}.
35909
37022
  */
35910
37023
  required: boolean;
35911
37024
  /** Optional constraint on the feature's value. */
@@ -35925,7 +37038,140 @@ interface FeatureDescriptorDto {
35925
37038
  * later join is ambiguous.
35926
37039
  */
35927
37040
  key?: boolean;
37041
+ /**
37042
+ * The same target, named instead of identified — how an object relation is
37043
+ * declared when the target sort's id does not exist yet.
37044
+ *
37045
+ * @remarks
37046
+ * Resolved only by `POST /api/v1/sorts/bulk`
37047
+ * ({@link SortsClient.bulkCreateSorts}), which mints its ids server-side:
37048
+ * a relation between two sorts of the SAME batch has no id its caller
37049
+ * could write into {@link FeatureDescriptorDto.expectedSort}. The name is
37050
+ * matched against the batch's own name → id map and the tenant's existing
37051
+ * sorts.
37052
+ *
37053
+ * Measured — one bulk request declaring `Invoice.issued_to` with
37054
+ * `expectedSortName: 'Client'` alongside a `Client` definition reads back
37055
+ * `"expected_sort": "7e764fb0-…"`, the id of the `Client` the same batch
37056
+ * created. A name that resolves to nothing is reported in the response's
37057
+ * `errors` and the feature is left unbound; it is never silently dropped.
37058
+ *
37059
+ * `expectedSort` wins when both are given.
37060
+ */
37061
+ expectedSortName?: string | null;
37062
+ /**
37063
+ * The least number of values this feature must hold — the bound `required`
37064
+ * cannot express.
37065
+ *
37066
+ * @remarks
37067
+ * **`minCount` binds only under a closed world.** Measured against the
37068
+ * engine on a sort declaring `lines` with `minCount: 2, maxCount: 3`:
37069
+ *
37070
+ * | values written | `worldMode: 'open'` | `worldMode: 'closed'` |
37071
+ * | --- | --- | --- |
37072
+ * | 0 | 201 created | 422 `required feature 'lines' is missing` |
37073
+ * | 1 | 201 created | 422 `feature 'lines' holds 1 values, below its declared minimum of 2` |
37074
+ * | 2 | 201 created | 201 created |
37075
+ *
37076
+ * On an open sort a short or absent feature RESIDUATES — it is
37077
+ * unconstrained, not wrong — so a schema that means its minimum must also
37078
+ * say {@link CreateSortRequest.worldMode} `closed`.
37079
+ * {@link FeatureDescriptorDto.maxCount} needs no such help.
37080
+ *
37081
+ * **A non-zero `minCount` IS {@link FeatureDescriptorDto.required}.** The
37082
+ * engine keeps the two consistent in one direction only: measured,
37083
+ * `{ minCount: 2, required: false }` reads back `"required": true`, and
37084
+ * `{ minCount: 2 }` with no `required` also reads back `"required": true`.
37085
+ * The reverse does not hold — `{ required: true }` alone reads back with
37086
+ * NO `minCount` at all. And `{ required: true, minCount: 0 }` is refused
37087
+ * with a `400`: *"a feature that may hold no value at all is NOT
37088
+ * required"*.
37089
+ *
37090
+ * A `minCount` above {@link FeatureDescriptorDto.maxCount} is refused with
37091
+ * a `400` — *"declares min_count 5 above max_count 2, so no term could
37092
+ * ever satisfy it"* — rather than stored unsatisfiable.
37093
+ *
37094
+ * A read answers `0` here whenever only `maxCount` was declared: measured,
37095
+ * `{ maxCount: 3 }` reads back `{ min_count: 0, max_count: 3 }`.
37096
+ *
37097
+ * ⚠️ Enforcement is gated on
37098
+ * {@link FeatureDescriptorDto.cardinalityOrigin} — an `inferred` bound
37099
+ * refuses nothing. See that field.
37100
+ */
37101
+ minCount?: number | null;
37102
+ /**
37103
+ * The greatest number of values this feature may hold.
37104
+ *
37105
+ * @remarks
37106
+ * **`maxCount` binds under BOTH world modes**, unlike
37107
+ * {@link FeatureDescriptorDto.minCount}. Measured on a sort declaring
37108
+ * `lines` with `minCount: 2, maxCount: 3`, writing four values is refused
37109
+ * identically on an open and on a closed sort:
37110
+ * `422 Constraint violation: Feature 'lines' holds 4 values, above its
37111
+ * declared maximum of 3`. Over-supply is a contradiction whatever the
37112
+ * world assumption; under-supply is only missing information.
37113
+ *
37114
+ * `maxCount: 0` is accepted and reads back `{ min_count: 0, max_count: 0 }`
37115
+ * — a feature declared to hold no value.
37116
+ *
37117
+ * Omitting it is the unbounded maximum; the OSFQL spelling of the pair is
37118
+ * `@card(min)` / `@card(min, max)`, with `*` for unbounded.
37119
+ *
37120
+ * ⚠️ Enforcement is gated on
37121
+ * {@link FeatureDescriptorDto.cardinalityOrigin} — an `inferred` bound
37122
+ * refuses nothing. See that field.
37123
+ */
37124
+ maxCount?: number | null;
37125
+ /**
37126
+ * Where the bounds above came from, and therefore whether a write may be
37127
+ * refused for breaking them.
37128
+ *
37129
+ * @remarks
37130
+ * A bound sent without this field is `declared`: measured, a create
37131
+ * carrying `minCount: 2, maxCount: 3` and no origin reads back
37132
+ * `"cardinality_origin": "declared"`, and the write path then enforces it.
37133
+ *
37134
+ * `inferred` records a bound read out of an extracted axiom. It is
37135
+ * carried, exported and diffed — and it **refuses nothing**. Measured on a
37136
+ * `closed` sort declaring `lines` with `minCount: 2, maxCount: 3,
37137
+ * cardinalityOrigin: 'inferred'`, both a one-value write and a four-value
37138
+ * write answer `201`, where the same sort with a `declared` bound refuses
37139
+ * each. The derivation of `required` is off too: that descriptor reads
37140
+ * back `"required": false` beside `"min_count": 2`.
37141
+ *
37142
+ * Sending it back unchanged is the point of the field. The ordinary way to
37143
+ * amend a sort is read → edit → create, and without the origin beside the
37144
+ * bound that round trip would promote every bound the extraction pipeline
37145
+ * inferred into a declared one, and start refusing the ingestion that
37146
+ * wrote it.
37147
+ *
37148
+ * A word outside the two is refused with a `422` naming both.
37149
+ */
37150
+ cardinalityOrigin?: CardinalityOriginDto | null;
37151
+ /**
37152
+ * Custom OWL annotations on this feature — `isIdentifier`, `unit`,
37153
+ * `enumValues`, and whatever else the tenant's model needs.
37154
+ *
37155
+ * @remarks
37156
+ * The keys are DATA, so they survive the request body's snake_case
37157
+ * transform untouched. Measured: a create carrying
37158
+ * `annotations: { isIdentifier: 'true', unit: 'none' }` reads back
37159
+ * `"annotations": {"isIdentifier": "true", "unit": "none"}` — the
37160
+ * camelCase key intact.
37161
+ *
37162
+ * `key: true` is stored as the `unique` annotation, so this map echoes it.
37163
+ */
37164
+ annotations?: Record<string, string>;
35928
37165
  }
37166
+ /**
37167
+ * Where a feature's multiplicity bounds came from.
37168
+ *
37169
+ * @remarks
37170
+ * `declared` bounds are enforced on every write; `inferred` bounds are
37171
+ * carried and reported but refuse nothing. See
37172
+ * {@link FeatureDescriptorDto.cardinalityOrigin}.
37173
+ */
37174
+ type CardinalityOriginDto = 'declared' | 'inferred';
35929
37175
  /**
35930
37176
  * Inter-feature ordering constraint within a sort.
35931
37177
  *
@@ -36009,6 +37255,63 @@ interface SortDto {
36009
37255
  * the committed {@link SortDto.name}.
36010
37256
  */
36011
37257
  pluginLocalName?: string | null;
37258
+ /**
37259
+ * Synonyms (`skos:altLabel`) — the other words people use for this
37260
+ * concept, each of which resolves to it in label search, extraction and NL
37261
+ * query.
37262
+ *
37263
+ * @remarks
37264
+ * Written by {@link BulkSortDefinition.altLabels} and curated by
37265
+ * {@link PatchSortRequest.altLabels} / {@link PatchSortRequest.addAltLabels}.
37266
+ */
37267
+ altLabels?: string[];
37268
+ /**
37269
+ * Search-only labels (`skos:hiddenLabel`) — misspellings, abbreviations,
37270
+ * legacy terms. They resolve like synonyms but are never displayed.
37271
+ */
37272
+ hiddenLabels?: string[];
37273
+ /**
37274
+ * Usage guidance (`skos:scopeNote`) — when to reach for this concept
37275
+ * rather than a neighbouring one. The disambiguator for near-homonyms.
37276
+ */
37277
+ scopeNote?: string | null;
37278
+ /** Associative links (`skos:related`) — sort ids, non-hierarchical. */
37279
+ related?: string[];
37280
+ /**
37281
+ * The ONE defining formula of a *defined* sort, rendered
37282
+ * (`mod_3∘id(day) = 1`). `undefined` for a nominal sort.
37283
+ *
37284
+ * @remarks
37285
+ * Without it a client reading a generated class can only guess its meaning
37286
+ * from the name.
37287
+ */
37288
+ definition?: string | null;
37289
+ /**
37290
+ * Formulas observed coextensive with {@link SortDto.definition} on some
37291
+ * corpus, each with the number of examples it held over.
37292
+ *
37293
+ * @remarks
37294
+ * These are equivalence **hypotheses** a curator confirms — never
37295
+ * identities the engine asserts.
37296
+ */
37297
+ coextensive?: CoextensiveDefinitionDto[];
37298
+ /**
37299
+ * SKOS external-ontology alignments (BFO/CCO and the like) attached to this
37300
+ * sort by the upper-ontology aligner.
37301
+ */
37302
+ externalMatches?: ExternalMatchDto[];
37303
+ /**
37304
+ * Defined (functional) features — `feature = function(paths)`, computed
37305
+ * from the term rather than asserted on it, rendered one per entry.
37306
+ */
37307
+ featureEquations?: string[];
37308
+ }
37309
+ /** A formula found coextensive with a sort's definition, and its evidence. */
37310
+ interface CoextensiveDefinitionDto {
37311
+ /** The alternative formula, rendered. */
37312
+ definition: string;
37313
+ /** How many examples the coincidence was observed over. */
37314
+ exampleCount: number;
36012
37315
  }
36013
37316
  /**
36014
37317
  * Response wrapper for sort endpoints.
@@ -36020,13 +37323,25 @@ interface SortDto {
36020
37323
  interface SortResponse {
36021
37324
  /** The sort. */
36022
37325
  sort: SortDto;
37326
+ /**
37327
+ * Residuated work released by this write — present only when a proposed
37328
+ * sort was approved and suspensions were waiting on it.
37329
+ */
37330
+ wokenResiduations?: number | null;
36023
37331
  }
36024
37332
  /** Response for sort list operations. */
36025
37333
  interface SortListResponse {
36026
37334
  /** List of sorts. */
36027
37335
  sorts: SortDto[];
36028
- /** Total count. */
37336
+ /**
37337
+ * Sorts in **this** response — not the tenant total when pagination is
37338
+ * active. Use {@link SortListResponse.total} for that.
37339
+ */
36029
37340
  count: number;
37341
+ /** Total sorts the tenant owns after filters, across all pages. */
37342
+ total?: number;
37343
+ /** Offset of the first sort in this response. */
37344
+ offset?: number;
36030
37345
  }
36031
37346
  /**
36032
37347
  * Request to create a new sort.
@@ -36113,6 +37428,13 @@ interface BulkSortDefinition {
36113
37428
  features?: FeatureDescriptorDto[];
36114
37429
  /** Alternative labels / synonyms (e.g., HPO synonyms for semantic matching). */
36115
37430
  altLabels?: string[];
37431
+ /**
37432
+ * Search-only labels (`skos:hiddenLabel`) — misspellings, abbreviations,
37433
+ * legacy terms. They resolve like synonyms but are never displayed.
37434
+ */
37435
+ hiddenLabels?: string[];
37436
+ /** Usage guidance (`skos:scopeNote`) — when to reach for this concept. */
37437
+ scopeNote?: string | null;
36116
37438
  /** Human-readable description. */
36117
37439
  description?: string | null;
36118
37440
  /** The world assumption for this sort — `open` (default) or `closed`. */
@@ -36152,6 +37474,12 @@ type BulkSortErrorKind =
36152
37474
  * existing sort as it was — read `sortCreated`, not the kind alone.
36153
37475
  */
36154
37476
  | 'unsatisfiable_declaration'
37477
+ /**
37478
+ * A feature declares an `expectedTypeHint` this engine does not know, so
37479
+ * every term written with that feature would be refused whatever its value.
37480
+ * The message enumerates the hints the engine does know.
37481
+ */
37482
+ | 'unknown_type_hint'
36155
37483
  /** A parent this batch never created: a cycle, or a parent itself refused. */
36156
37484
  | 'unresolved_parent'
36157
37485
  /**
@@ -36717,6 +38045,41 @@ interface SearchSortsResponse {
36717
38045
  matches: SearchSortsMatch[];
36718
38046
  }
36719
38047
  /** Which sorts `GET /api/v1/sorts/schema` renders. */
38048
+ /**
38049
+ * The window and the filters over `GET /api/v1/sorts/tenant/{id}`.
38050
+ *
38051
+ * @remarks
38052
+ * A production tenant can own 1 M+ sorts (~500 MB uncompressed), which a
38053
+ * single response reliably fails to deliver — so `limit` + `offset` are how
38054
+ * a client streams the listing, and {@link SortListResponse.total} is how it
38055
+ * knows when to stop.
38056
+ */
38057
+ interface ListSortsQuery {
38058
+ /** Max sorts to return. Omitted means no cap. */
38059
+ limit?: number;
38060
+ /** Zero-based index of the first sort returned. */
38061
+ offset?: number;
38062
+ /**
38063
+ * Include system-defined sorts (`Thing`, `Person`, …).
38064
+ *
38065
+ * @remarks
38066
+ * Omitted defaults to false for an ordinary caller and true for a
38067
+ * reserved-write-exempt one (`policy_compiler` / `platform_admin`). An
38068
+ * explicit `false` is honoured for every caller.
38069
+ */
38070
+ includeSystem?: boolean;
38071
+ /** Only sorts an LLM extracted. */
38072
+ llmExtracted?: boolean;
38073
+ /** Only sorts flagged for human review. */
38074
+ needsReview?: boolean;
38075
+ /**
38076
+ * Only sorts whose name starts with one of these prefixes.
38077
+ *
38078
+ * @remarks
38079
+ * Comma-joined onto the wire, so several prefixes cost one request.
38080
+ */
38081
+ namePrefix?: string[];
38082
+ }
36720
38083
  interface SortsSchemaQuery {
36721
38084
  /** Only sorts flagged for human review. */
36722
38085
  needsReview?: boolean;
@@ -36785,6 +38148,8 @@ type sorts_BulkSetSimilaritiesResponse = BulkSetSimilaritiesResponse;
36785
38148
  type sorts_BulkSortDefinition = BulkSortDefinition;
36786
38149
  type sorts_BulkSortError = BulkSortError;
36787
38150
  type sorts_BulkSortErrorKind = BulkSortErrorKind;
38151
+ type sorts_CardinalityOriginDto = CardinalityOriginDto;
38152
+ type sorts_CoextensiveDefinitionDto = CoextensiveDefinitionDto;
36788
38153
  type sorts_ComputeGlbResponse = ComputeGlbResponse;
36789
38154
  type sorts_ComputeLubResponse = ComputeLubResponse;
36790
38155
  type sorts_ConstraintDto = ConstraintDto;
@@ -36811,6 +38176,7 @@ type sorts_LearnedSimilarityDto = LearnedSimilarityDto;
36811
38176
  type sorts_LearnedSimilarityListResponse = LearnedSimilarityListResponse;
36812
38177
  type sorts_LearnedSimilarityProvenanceDto = LearnedSimilarityProvenanceDto;
36813
38178
  type sorts_LearnedSimilarityStatusDto = LearnedSimilarityStatusDto;
38179
+ type sorts_ListSortsQuery = ListSortsQuery;
36814
38180
  type sorts_LubRequest = LubRequest;
36815
38181
  type sorts_LubResponse = LubResponse;
36816
38182
  type sorts_PatchSortFeatureRequest = PatchSortFeatureRequest;
@@ -36845,7 +38211,7 @@ type sorts_SortsSchemaQuery = SortsSchemaQuery;
36845
38211
  type sorts_UpdateReviewStatusRequest = UpdateReviewStatusRequest;
36846
38212
  type sorts_WorldModeDto = WorldModeDto;
36847
38213
  declare namespace sorts {
36848
- export type { sorts_ApproveLearnedSimilarityRequest as ApproveLearnedSimilarityRequest, sorts_ApproveLearnedSimilarityResponse as ApproveLearnedSimilarityResponse, sorts_BoundConstraintDto as BoundConstraintDto, sorts_BulkCreateSortsRequest as BulkCreateSortsRequest, sorts_BulkCreateSortsResponse as BulkCreateSortsResponse, sorts_BulkSetSimilaritiesRequest as BulkSetSimilaritiesRequest, sorts_BulkSetSimilaritiesResponse as BulkSetSimilaritiesResponse, sorts_BulkSortDefinition as BulkSortDefinition, sorts_BulkSortError as BulkSortError, sorts_BulkSortErrorKind as BulkSortErrorKind, sorts_ComputeGlbResponse as ComputeGlbResponse, sorts_ComputeLubResponse as ComputeLubResponse, sorts_ConstraintDto as ConstraintDto, sorts_CreateSortRequest as CreateSortRequest, sorts_DecodeGlbResponse as DecodeGlbResponse, sorts_DeleteSortResponse as DeleteSortResponse, sorts_DeleteSortRulesDisposition as DeleteSortRulesDisposition, sorts_DeleteSortTermsDisposition as DeleteSortTermsDisposition, sorts_DeprecateSortRequest as DeprecateSortRequest, sorts_EquivalenceClassDto as EquivalenceClassDto, sorts_FeatureDescriptorDto as FeatureDescriptorDto, sorts_GetEquivalenceClassesResponse as GetEquivalenceClassesResponse, sorts_GetFuzzySubsumptionRequest as GetFuzzySubsumptionRequest, sorts_GetFuzzySubsumptionResponse as GetFuzzySubsumptionResponse, sorts_GetPreorderDegreeRequest as GetPreorderDegreeRequest, sorts_GetPreorderDegreeResponse as GetPreorderDegreeResponse, sorts_GetSortSimilarityRequest as GetSortSimilarityRequest, sorts_GetSortSimilarityResponse as GetSortSimilarityResponse, sorts_GlbRequest as GlbRequest, sorts_GlbResponse as GlbResponse, sorts_LearnSortSimilaritiesRequest as LearnSortSimilaritiesRequest, sorts_LearnSortSimilaritiesResponse as LearnSortSimilaritiesResponse, sorts_LearnedSimilarityDto as LearnedSimilarityDto, sorts_LearnedSimilarityListResponse as LearnedSimilarityListResponse, sorts_LearnedSimilarityProvenanceDto as LearnedSimilarityProvenanceDto, sorts_LearnedSimilarityStatusDto as LearnedSimilarityStatusDto, sorts_LubRequest as LubRequest, sorts_LubResponse as LubResponse, sorts_PatchSortFeatureRequest as PatchSortFeatureRequest, sorts_PatchSortRequest as PatchSortRequest, sorts_RejectLearnedSimilarityRequest as RejectLearnedSimilarityRequest, sorts_RejectLearnedSimilarityResponse as RejectLearnedSimilarityResponse, sorts_RemoveSortFeatureOptions as RemoveSortFeatureOptions, sorts_SearchSortsBy as SearchSortsBy, sorts_SearchSortsMatch as SearchSortsMatch, sorts_SearchSortsRequest as SearchSortsRequest, sorts_SearchSortsResponse as SearchSortsResponse, sorts_SetFuzzySubsumptionRequest as SetFuzzySubsumptionRequest, sorts_SetFuzzySubsumptionResponse as SetFuzzySubsumptionResponse, sorts_SetSortSimilarityRequest as SetSortSimilarityRequest, sorts_SetSortSimilarityResponse as SetSortSimilarityResponse, sorts_SimilarityEntryDto as SimilarityEntryDto, sorts_SortCompareOperator as SortCompareOperator, sorts_SortCompareRequest as SortCompareRequest, sorts_SortCompareResponse as SortCompareResponse, sorts_SortDto as SortDto, sorts_SortFeatureEditResponse as SortFeatureEditResponse, sorts_SortIndexStatusResponse as SortIndexStatusResponse, sorts_SortInfoDto as SortInfoDto, sorts_SortListResponse as SortListResponse, sorts_SortOriginDto as SortOriginDto, sorts_SortReferenceKind as SortReferenceKind, sorts_SortReferencingRuleDto as SortReferencingRuleDto, sorts_SortResponse as SortResponse, sorts_SortSimilarityResponse as SortSimilarityResponse, sorts_SortStatusDto as SortStatusDto, sorts_SortsSchemaQuery as SortsSchemaQuery, sorts_UpdateReviewStatusRequest as UpdateReviewStatusRequest, sorts_WorldModeDto as WorldModeDto };
38214
+ export type { sorts_ApproveLearnedSimilarityRequest as ApproveLearnedSimilarityRequest, sorts_ApproveLearnedSimilarityResponse as ApproveLearnedSimilarityResponse, sorts_BoundConstraintDto as BoundConstraintDto, sorts_BulkCreateSortsRequest as BulkCreateSortsRequest, sorts_BulkCreateSortsResponse as BulkCreateSortsResponse, sorts_BulkSetSimilaritiesRequest as BulkSetSimilaritiesRequest, sorts_BulkSetSimilaritiesResponse as BulkSetSimilaritiesResponse, sorts_BulkSortDefinition as BulkSortDefinition, sorts_BulkSortError as BulkSortError, sorts_BulkSortErrorKind as BulkSortErrorKind, sorts_CardinalityOriginDto as CardinalityOriginDto, sorts_CoextensiveDefinitionDto as CoextensiveDefinitionDto, sorts_ComputeGlbResponse as ComputeGlbResponse, sorts_ComputeLubResponse as ComputeLubResponse, sorts_ConstraintDto as ConstraintDto, sorts_CreateSortRequest as CreateSortRequest, sorts_DecodeGlbResponse as DecodeGlbResponse, sorts_DeleteSortResponse as DeleteSortResponse, sorts_DeleteSortRulesDisposition as DeleteSortRulesDisposition, sorts_DeleteSortTermsDisposition as DeleteSortTermsDisposition, sorts_DeprecateSortRequest as DeprecateSortRequest, sorts_EquivalenceClassDto as EquivalenceClassDto, sorts_FeatureDescriptorDto as FeatureDescriptorDto, sorts_GetEquivalenceClassesResponse as GetEquivalenceClassesResponse, sorts_GetFuzzySubsumptionRequest as GetFuzzySubsumptionRequest, sorts_GetFuzzySubsumptionResponse as GetFuzzySubsumptionResponse, sorts_GetPreorderDegreeRequest as GetPreorderDegreeRequest, sorts_GetPreorderDegreeResponse as GetPreorderDegreeResponse, sorts_GetSortSimilarityRequest as GetSortSimilarityRequest, sorts_GetSortSimilarityResponse as GetSortSimilarityResponse, sorts_GlbRequest as GlbRequest, sorts_GlbResponse as GlbResponse, sorts_LearnSortSimilaritiesRequest as LearnSortSimilaritiesRequest, sorts_LearnSortSimilaritiesResponse as LearnSortSimilaritiesResponse, sorts_LearnedSimilarityDto as LearnedSimilarityDto, sorts_LearnedSimilarityListResponse as LearnedSimilarityListResponse, sorts_LearnedSimilarityProvenanceDto as LearnedSimilarityProvenanceDto, sorts_LearnedSimilarityStatusDto as LearnedSimilarityStatusDto, sorts_ListSortsQuery as ListSortsQuery, sorts_LubRequest as LubRequest, sorts_LubResponse as LubResponse, sorts_PatchSortFeatureRequest as PatchSortFeatureRequest, sorts_PatchSortRequest as PatchSortRequest, sorts_RejectLearnedSimilarityRequest as RejectLearnedSimilarityRequest, sorts_RejectLearnedSimilarityResponse as RejectLearnedSimilarityResponse, sorts_RemoveSortFeatureOptions as RemoveSortFeatureOptions, sorts_SearchSortsBy as SearchSortsBy, sorts_SearchSortsMatch as SearchSortsMatch, sorts_SearchSortsRequest as SearchSortsRequest, sorts_SearchSortsResponse as SearchSortsResponse, sorts_SetFuzzySubsumptionRequest as SetFuzzySubsumptionRequest, sorts_SetFuzzySubsumptionResponse as SetFuzzySubsumptionResponse, sorts_SetSortSimilarityRequest as SetSortSimilarityRequest, sorts_SetSortSimilarityResponse as SetSortSimilarityResponse, sorts_SimilarityEntryDto as SimilarityEntryDto, sorts_SortCompareOperator as SortCompareOperator, sorts_SortCompareRequest as SortCompareRequest, sorts_SortCompareResponse as SortCompareResponse, sorts_SortDto as SortDto, sorts_SortFeatureEditResponse as SortFeatureEditResponse, sorts_SortIndexStatusResponse as SortIndexStatusResponse, sorts_SortInfoDto as SortInfoDto, sorts_SortListResponse as SortListResponse, sorts_SortOriginDto as SortOriginDto, sorts_SortReferenceKind as SortReferenceKind, sorts_SortReferencingRuleDto as SortReferencingRuleDto, sorts_SortResponse as SortResponse, sorts_SortSimilarityResponse as SortSimilarityResponse, sorts_SortStatusDto as SortStatusDto, sorts_SortsSchemaQuery as SortsSchemaQuery, sorts_UpdateReviewStatusRequest as UpdateReviewStatusRequest, sorts_WorldModeDto as WorldModeDto };
36849
38215
  }
36850
38216
 
36851
38217
  /**
@@ -37045,11 +38411,52 @@ declare class SortsClient {
37045
38411
  */
37046
38412
  getSchema(query?: SortsSchemaQuery, requestOptions?: RequestOptions): Promise<string>;
37047
38413
  /**
37048
- * List all sorts.
38414
+ * List every sort the tenant owns.
37049
38415
  *
37050
- * @returns Array of sorts.
38416
+ * @param requestOptions - Per-call transport overrides.
38417
+ * @returns The sorts, each with its feature declarations.
38418
+ * @throws {ApiError} When the engine refuses the request.
38419
+ *
38420
+ * @remarks
38421
+ * This asks for the whole listing and keeps only the array. A production
38422
+ * tenant can own 1 M+ sorts (~500 MB uncompressed), which one response
38423
+ * cannot deliver — use {@link SortsClient.listSortsPage} to window it, to
38424
+ * filter it, or to read the `total` that says when to stop.
38425
+ *
38426
+ * @example
38427
+ * ```typescript
38428
+ * const sorts = await client.sorts.listSorts();
38429
+ * ```
37051
38430
  */
37052
38431
  listSorts(requestOptions?: RequestOptions): Promise<SortDto[]>;
38432
+ /**
38433
+ * List the tenant's sorts, keeping the envelope — `count`, `total` and
38434
+ * `offset` beside the page.
38435
+ *
38436
+ * @param query - The window and filters over the listing.
38437
+ * @param requestOptions - Per-call transport overrides.
38438
+ * @returns The page, its length, the tenant's filtered total and the
38439
+ * offset the page starts at.
38440
+ * @throws {ApiError} When the engine refuses the request.
38441
+ *
38442
+ * @remarks
38443
+ * `count` is the length of THIS page; `total` is what the tenant owns after
38444
+ * filters, across all pages. Measured against the engine on a tenant
38445
+ * holding three sorts, `GET /api/v1/sorts/tenant/{id}` answers
38446
+ * `{"count":3,"total":3,"offset":0}`.
38447
+ *
38448
+ * @example
38449
+ * ```typescript
38450
+ * let offset = 0;
38451
+ * for (;;) {
38452
+ * const page = await client.sorts.listSortsPage({ limit: 500, offset });
38453
+ * consume(page.sorts);
38454
+ * offset += page.count;
38455
+ * if (page.total === undefined || offset >= page.total) break;
38456
+ * }
38457
+ * ```
38458
+ */
38459
+ listSortsPage(query?: ListSortsQuery, requestOptions?: RequestOptions): Promise<SortListResponse>;
37053
38460
  /**
37054
38461
  * Bulk-create sorts with name-based parent references.
37055
38462
  *
@@ -37401,9 +38808,9 @@ declare class Terms<SecurityDataType = unknown> {
37401
38808
  * @request POST:/api/v1/terms
37402
38809
  * @secure
37403
38810
  */
37404
- addTerm: (data: CreateTermRequest$1, params?: RequestParams) => Promise<HttpResponse<TermResponse$1, void>>;
38811
+ addTerm: (data: CreateTermInput$1, params?: RequestParams) => Promise<HttpResponse<TermResponse$1, void>>;
37405
38812
  /**
37406
- * @description Creates multiple terms in a single operation for efficiency. This is optimized for high-volume data loading scenarios and skips individual witness validation (constraint propagation runs once at the end). # Performance - Terms are added to the domain store in a single lock acquisition - Constraint propagation runs once after all terms are added - Much faster than calling add_term N times # Declarations and all-or-nothing (#238, #239) Every entry is held to the same declarations as `POST /terms`, with the same `422`. One refusal — a declaration violation or a bound-constraint violation — refuses the WHOLE batch and puts the store and the facade back: fresh ids removed, coreferenced entities restored to their pre-batch description. A batch may reference the client-minted ids it is itself creating: the resolver is the resident store unioned with the batch's own ids. When such an id then coreferences through a `@key`, every designator of it in the same batch is rewritten to the entity it merged into — the reference names what the write actually produced, never an id the coreference removed. `term_ids` carries the EFFECTIVE id per request position — the created id, or the existing entity's id when the entry coreferenced through a `@key`. # Authorization Requires X-Tenant-Id header. The tenant_id is taken from the header.
38813
+ * @description Creates multiple terms in a single operation for efficiency. This is optimized for high-volume data loading scenarios and skips individual witness validation (constraint propagation runs once at the end). # Performance - Terms are added to the domain store in a single lock acquisition - Constraint propagation runs once after all terms are added - Much faster than calling add_term N times # Declarations and all-or-nothing (#238, #239, #262) Every entry is held to the same declarations as `POST /terms`, with the same `422`. One refusal — a declaration violation or a bound-constraint violation — refuses the WHOLE batch and puts the store and the facade back: fresh ids removed, coreferenced entities restored to their pre-batch description. The refusal NAMES THE ROWS (#262): the body carries `errors[]`, one entry per refused row, each with its `index` in the request's `terms` array and the `feature` the refusal is about when it names one, so a client repairs the exact rows it sent instead of guessing which one a single-message refusal meant. `partial: true` (#271) writes the rows the checks did NOT refuse instead of refusing the batch for one of them. A real import holding one bad record had to be resent minus that record — a second full call, a second full round of constraint evaluation, and a window in which a survivor's reference target can be deleted between the two — although the engine already names every bad entry by index in one pass and therefore already knows which ones were fine. The answer is `201` when anything was written, with `term_ids` carrying one id per ACCEPTED row and the same `errors[]` beside it; `422` when every row was refused, because nothing was written and that is a refusal. ⛔ Two failures stay batch-wide under `partial`, because neither can be attributed to a row, and the flag does not pretend otherwise: the end-of-batch constraint propagation answers ONE `409` for the whole batch (`facade.process_events`), and a persistence failure reverts what the batch inserted (#239). `dry_run: true` (#262) runs every check the real write runs — conversion, declarations, coreference, events — and writes nothing: the store and the facade are put back inside the write lock, nothing persists, nothing is notified, no derivation is queued. A clean dry run answers `200` with the count the batch would have produced and NO `term_ids` (#268): the rollback has already discarded every id it minted for a fresh entry, and a second, real POST of the same body mints different ones — so the vector named nothing, in the very positions the field documents as storable. The ids that DO outlive a dry run are the entities a `@key` coreference would have merged into, and those are answered separately as `coreferenced_term_ids`. A refused dry run answers the same `errors[]` body the real write answers with. A batch may reference the client-minted ids it is itself creating: the resolver is the resident store unioned with the batch's own ids. When such an id then coreferences through a `@key`, every designator of it in the same batch is rewritten to the entity it merged into — the reference names what the write actually produced, never an id the coreference removed. On a real write `term_ids` carries the EFFECTIVE id per request position — the created id, or the existing entity's id when the entry coreferenced through a `@key`. It is ABSENT on a dry run. # Authorization Requires X-Tenant-Id header. The tenant_id is taken from the header.
37407
38814
  *
37408
38815
  * @tags terms
37409
38816
  * @name BulkAddTerms
@@ -37464,6 +38871,8 @@ declare class Terms<SecurityDataType = unknown> {
37464
38871
  * @secure
37465
38872
  */
37466
38873
  listTerms: (query?: {
38874
+ /** Include the rule conclusions this process has materialised, each carrying `origin: derived` and `derived_by` (default true); send false for the asserted rows alone */
38875
+ include_derived?: boolean;
37467
38876
  /**
37468
38877
  * Max terms to return; omit for all, hard-capped at 10000
37469
38878
  * @min 0
@@ -37474,7 +38883,7 @@ declare class Terms<SecurityDataType = unknown> {
37474
38883
  * @min 0
37475
38884
  */
37476
38885
  offset?: number;
37477
- /** Only terms of this exact sort; omit for every sort */
38886
+ /** Only terms of this EXACT sort — a member of a subsort is not answered; omit for every sort */
37478
38887
  sort_name?: string;
37479
38888
  }, params?: RequestParams) => Promise<HttpResponse<TermListResponse$1, any>>;
37480
38889
  /**
@@ -37793,24 +39202,70 @@ interface OsfSearchResponse {
37793
39202
  stats: OsfSearchStatsDto;
37794
39203
  }
37795
39204
  /**
37796
- * Response wrapper for term list queries (e.g., `findBySort`).
39205
+ * A page of terms, with the size of the whole answer beside it.
37797
39206
  *
37798
39207
  * @remarks
37799
- * The SDK unwraps this internally, returning `TermDto[]` to the caller.
39208
+ * Returned as-is by {@link TermsClient.listTerms} and
39209
+ * {@link QueryClient.findBySortPage}. Read {@link total} to page, never
39210
+ * {@link count} — and read {@link note} before you tell a user an empty page
39211
+ * means an empty sort.
37800
39212
  */
37801
39213
  interface TermListResponse {
37802
- /** Matching terms. */
39214
+ /** The terms on this page. */
37803
39215
  terms: TermDto[];
37804
39216
  /**
37805
- * How many terms are in THIS page — not how many match in total.
39217
+ * How many terms are on THIS page — always `terms.length`, never the size of
39218
+ * the answer.
37806
39219
  *
37807
39220
  * @remarks
37808
39221
  * With no `limit` the two coincide, which is what made the old "Total count"
37809
- * reading look right. With `limit: 2` the engine answers `count: 2` at every
37810
- * offset, so treating it as a grand total stops a walk after one page.
37811
- * Measured against the live engine on 2026-09-11.
39222
+ * doc look right. Measured against the live engine on 2026-09-18: a tenant
39223
+ * holding 3 terms answered `GET /api/v1/terms?limit=1&offset=2` with
39224
+ * `{"count":1,"total":3}`. Paging off `count` stops the walk after one page;
39225
+ * page off {@link total}.
37812
39226
  */
37813
39227
  count: number;
39228
+ /**
39229
+ * How many terms the request matched BEFORE `offset` and `limit` — the size
39230
+ * of the answer, and the number to page against.
39231
+ *
39232
+ * @remarks
39233
+ * A counted size, never a search bound. Absent on a route that does not page
39234
+ * (the namespace listings), so a caller that must page should treat
39235
+ * `undefined` as "the endpoint does not report it" and fall back to the
39236
+ * short-page rule, which is what {@link TermsClient.iterateTerms} does.
39237
+ *
39238
+ * ⚠️ `total: 0` is not proof of an empty sort. See {@link note}.
39239
+ */
39240
+ total?: number;
39241
+ /**
39242
+ * The engine explaining an answer a caller would otherwise misread — today,
39243
+ * an EMPTY answer for a sort whose members exist only by derivation.
39244
+ *
39245
+ * @remarks
39246
+ * `GET /api/v1/terms` and `POST /api/v1/query/by-sort` neither chain nor
39247
+ * persist conclusions: they report the conclusions the process currently
39248
+ * HOLDS. For a rule-conclusion sort in a freshly started process that set is
39249
+ * empty, so the honest count is `0` — and `total: 0` off that route reads
39250
+ * like an authoritative "this sort has no members", which is false. `note`
39251
+ * is the engine saying so, and naming the routes that materialise the
39252
+ * conclusions.
39253
+ *
39254
+ * So: when the page is empty, surface `note` instead of "no results". It is
39255
+ * never an error, and never a substitute for one — ignore it and the rows
39256
+ * beside it are still correct.
39257
+ *
39258
+ * Measured 2026-09-18. A tenant with sort `widget`, subsort
39259
+ * `premium_widget`, one `widget` fact and the rule
39260
+ * `widget(name: ?N) → premium_widget(name: ?N)`:
39261
+ * `POST /api/v1/query/by-sort {"sort_name":"premium_widget"}` answered
39262
+ * `{"terms":[],"count":0,"total":0,"note":"`premium_widget` is a rule
39263
+ * conclusion sort: its members are derived. … An empty answer here does not
39264
+ * mean the sort has no members."}`. `GET
39265
+ * /api/v1/terms?sort_name=premium_widget` answered the same note. Before the
39266
+ * rule existed, the same empty query carried no note.
39267
+ */
39268
+ note?: string;
37814
39269
  }
37815
39270
  /**
37816
39271
  * Response wrapper for unification queries (e.g., `findUnifiable`).
@@ -37873,6 +39328,26 @@ interface FindBySortRequest {
37873
39328
  * pass 0) for no cap.
37874
39329
  */
37875
39330
  limit?: number | null;
39331
+ /**
39332
+ * Zero-based index of the first term to return.
39333
+ *
39334
+ * @remarks
39335
+ * Pages the same ordering `limit` cuts: the answer is ordered by term id
39336
+ * BEFORE the window is applied, so page 2 neither repeats nor skips a row of
39337
+ * page 1. Honoured with or without `limit`.
39338
+ *
39339
+ * Measured 2026-09-18 against a 2-member sort:
39340
+ * `{"sort_name":"widget","include_derived":true}` answered ids
39341
+ * `829ef5dc-…`, `d4f7a4f8-…` with `total: 2`; the same request plus
39342
+ * `{"limit":1,"offset":1}` answered `d4f7a4f8-…` alone, still `total: 2`.
39343
+ *
39344
+ * Reachable only through {@link QueryClient.findBySortPage} —
39345
+ * {@link QueryClient.findBySort} discards the envelope, so paging through it
39346
+ * gives you a window you cannot tell the end of.
39347
+ *
39348
+ * @defaultValue `0`
39349
+ */
39350
+ offset?: number | null;
37876
39351
  /**
37877
39352
  * Answer with the rule-DERIVED shadows too.
37878
39353
  *
@@ -37978,165 +39453,6 @@ declare namespace query {
37978
39453
  export type { query_BySortQueryRequest as BySortQueryRequest, query_ConversationTurnDto as ConversationTurnDto, query_DiscoveredRelationDto as DiscoveredRelationDto, query_FindBySortRequest as FindBySortRequest, MatchedEntityDto$1 as MatchedEntityDto, query_MissingInfoDto as MissingInfoDto, query_NlQueryMode as NlQueryMode, query_NlQueryRequest as NlQueryRequest, query_NlQueryResponse as NlQueryResponse, query_NlQueryResultItem as NlQueryResultItem, query_OsfSearchRequest as OsfSearchRequest, query_OsfSearchResponse as OsfSearchResponse, query_OsfSearchStatsDto as OsfSearchStatsDto, query_ResumptionOptionDto as ResumptionOptionDto, query_SuspendedQueryDto as SuspendedQueryDto, query_TermListResponse as TermListResponse, query_TermPatternDto as TermPatternDto, query_ToolCallInfo as ToolCallInfo, query_UnifiableQueryRequest as UnifiableQueryRequest, query_UnificationQueryResponse as UnificationQueryResponse, query_ValidateTermRequest as ValidateTermRequest, query_ValidatedUnifyRequest as ValidatedUnifyRequest };
37979
39454
  }
37980
39455
 
37981
- /**
37982
- * A format-agnostic psi-term produced by the `psi()` builder.
37983
- *
37984
- * @remarks
37985
- * Can be passed to both term CRUD methods (converted to tagged `ValueDto` format)
37986
- * and inference methods (converted to untagged `TermInputDto` format).
37987
- * The SDK handles the conversion automatically based on which method receives it.
37988
- *
37989
- * Distinguished from plain objects by the `__psiTerm` brand field, which is
37990
- * stripped before serialization.
37991
- *
37992
- * @example
37993
- * ```typescript
37994
- * // Works with term CRUD:
37995
- * await client.terms.createTerm({ sortId, ownerId, features: { name: "Alice" } });
37996
- *
37997
- * // Works with inference:
37998
- * await client.inference.addFact({ term: psi("person", { name: "Alice" }) });
37999
- * ```
38000
- */
38001
- /**
38002
- * A psi-term identified by sort name.
38003
- */
38004
- interface PsiTermInputByName {
38005
- /** @internal Brand field to distinguish from plain objects. Stripped before serialization. */
38006
- readonly __psiTerm: true;
38007
- /** Sort name for this term (resolved server-side). */
38008
- readonly sortName: string;
38009
- /** Features using plain JavaScript values. */
38010
- readonly features?: PlainFeatureMap;
38011
- /**
38012
- * Binder naming this term's own identity (`?C`), from {@link bind}.
38013
- *
38014
- * @remarks
38015
- * Only meaningful in an inference context, where it writes the OSFQL
38016
- * `?C: sort(...)` join.
38017
- */
38018
- readonly binding?: string;
38019
- }
38020
- /**
38021
- * A psi-term identified by sort ID (UUID).
38022
- */
38023
- interface PsiTermInputById {
38024
- /** @internal Brand field to distinguish from plain objects. Stripped before serialization. */
38025
- readonly __psiTerm: true;
38026
- /** Sort ID (UUID) for this term. */
38027
- readonly sortId: string;
38028
- /** Features using plain JavaScript values. */
38029
- readonly features?: PlainFeatureMap;
38030
- /**
38031
- * Binder naming this term's own identity (`?C`), from {@link bind}.
38032
- *
38033
- * @remarks
38034
- * Only meaningful in an inference context, where it writes the OSFQL
38035
- * `?C: sort(...)` join.
38036
- */
38037
- readonly binding?: string;
38038
- }
38039
- /**
38040
- * A format-agnostic psi-term produced by the `psi()` builder.
38041
- *
38042
- * @remarks
38043
- * Exactly one of `sortName` or `sortId` is present — enforced by the union type.
38044
- * Can be passed to both term CRUD methods (converted to tagged `ValueDto` format)
38045
- * and inference methods (converted to untagged `TermInputDto` format).
38046
- * The SDK handles the conversion automatically based on which method receives it.
38047
- *
38048
- * Distinguished from plain objects by the `__psiTerm` brand field, which is
38049
- * stripped before serialization.
38050
- *
38051
- * @example
38052
- * ```typescript
38053
- * // Works with term CRUD:
38054
- * await client.terms.createTerm({ sortId, ownerId, features: { name: "Alice" } });
38055
- *
38056
- * // Works with inference:
38057
- * await client.inference.addFact({ term: psi("person", { name: "Alice" }) });
38058
- * ```
38059
- */
38060
- type PsiTermInput = PsiTermInputByName | PsiTermInputById;
38061
- /**
38062
- * A constrained variable for use in inference contexts.
38063
- *
38064
- * @remarks
38065
- * Created via the `constrained()` helper. Distinguished from plain arrays
38066
- * by the `__constrainedVar` brand field, which is stripped before serialization.
38067
- *
38068
- * @example
38069
- * ```typescript
38070
- * psi("eligible", { score: constrained("?S", guard("gt", 700)) })
38071
- * ```
38072
- */
38073
- interface ConstrainedPlainVar {
38074
- /** @internal Brand field. Stripped before serialization. */
38075
- readonly __constrainedVar: true;
38076
- /** Variable name (must start with "?"). */
38077
- readonly name: string;
38078
- /** Constraint as a TermInputDto or PsiTermInput. */
38079
- readonly constraint: TermInputDto | PsiTermInput;
38080
- }
38081
- /**
38082
- * A plain JavaScript value that the SDK auto-converts to the correct wire format.
38083
- *
38084
- * @remarks
38085
- * The SDK converts this to either tagged `ValueDto` or untagged `FeatureInputValueDto`
38086
- * depending on which resource client method receives it:
38087
- *
38088
- * - `string` — string value (or variable if `?`-prefixed in inference context)
38089
- * - `number` — integer if `Number.isInteger()`, real otherwise
38090
- * - `boolean` — boolean value
38091
- * - `null` — uninstantiated
38092
- * - `PsiTermInput` — nested inline term (from `psi()` builder)
38093
- * - `ConstrainedPlainVar` — constrained variable (from `constrained()` helper)
38094
- * - `PlainFeatureValue[]` — list of values
38095
- * - `ValueDto` — passthrough (already in tagged format)
38096
- * - `FeatureInputValueDto` — passthrough (already in untagged format)
38097
- *
38098
- * Fuzzy and set values cannot be expressed as plain JS values. Use `Value.fuzzyScalar()`,
38099
- * `Value.fuzzyNumber()`, or `Value.set()` directly — they pass through unchanged.
38100
- */
38101
- type PlainFeatureValue = string | number | boolean | null | PsiTermInput | ConstrainedPlainVar | PlainFeatureValue[] | ValueDto | FeatureInputValueDto;
38102
- /**
38103
- * A feature map using plain JavaScript values.
38104
- *
38105
- * @remarks
38106
- * Pass this to resource client methods. The SDK converts to the appropriate
38107
- * wire format (tagged or untagged) based on which method is called.
38108
- *
38109
- * @example
38110
- * ```typescript
38111
- * const features: PlainFeatureMap = {
38112
- * name: "Alice",
38113
- * age: 30,
38114
- * active: true,
38115
- * salary: null, // uninstantiated
38116
- * };
38117
- * ```
38118
- */
38119
- type PlainFeatureMap = Record<string, PlainFeatureValue>;
38120
- /**
38121
- * Union of PsiTermInput or already-formatted TermInputDto.
38122
- *
38123
- * @remarks
38124
- * Accepted by inference resource client methods that take term inputs.
38125
- * If a `PsiTermInput` is passed, it is converted to `TermInputDto` internally.
38126
- */
38127
- type TermInputArg = PsiTermInput | TermInputDto;
38128
-
38129
- type plainValues_ConstrainedPlainVar = ConstrainedPlainVar;
38130
- type plainValues_PlainFeatureMap = PlainFeatureMap;
38131
- type plainValues_PlainFeatureValue = PlainFeatureValue;
38132
- type plainValues_PsiTermInput = PsiTermInput;
38133
- type plainValues_PsiTermInputById = PsiTermInputById;
38134
- type plainValues_PsiTermInputByName = PsiTermInputByName;
38135
- type plainValues_TermInputArg = TermInputArg;
38136
- declare namespace plainValues {
38137
- export type { plainValues_ConstrainedPlainVar as ConstrainedPlainVar, plainValues_PlainFeatureMap as PlainFeatureMap, plainValues_PlainFeatureValue as PlainFeatureValue, plainValues_PsiTermInput as PsiTermInput, plainValues_PsiTermInputById as PsiTermInputById, plainValues_PsiTermInputByName as PsiTermInputByName, plainValues_TermInputArg as TermInputArg };
38138
- }
38139
-
38140
39456
  /**
38141
39457
  * Resource client for record operations (create, read, update, delete typed records).
38142
39458
  *
@@ -38155,8 +39471,32 @@ interface ListTermsQuery {
38155
39471
  limit?: number;
38156
39472
  /** Zero-based index of the first term (default 0). */
38157
39473
  offset?: number;
38158
- /** Only terms of this exact sort; omit for every sort. */
39474
+ /**
39475
+ * Only terms of this EXACT sort; omit for every sort.
39476
+ *
39477
+ * @remarks
39478
+ * A member of a SUBSORT is not answered — this is an equality filter on the
39479
+ * term's own sort, not a lattice browse. For the polymorphic browse (a sort
39480
+ * and everything below it) use {@link QueryClient.findBySortPage}.
39481
+ */
38159
39482
  sortName?: string;
39483
+ /**
39484
+ * Include the rule conclusions this process has materialised.
39485
+ *
39486
+ * @remarks
39487
+ * ⚠️ The engine's default here is `true`, the OPPOSITE of
39488
+ * {@link FindBySortRequest.includeDerived}. Omit this and you get the
39489
+ * conclusions; send `false` for the asserted rows alone. Each conclusion
39490
+ * carries {@link TermDto.origin} `'derived'` and, when the engine recorded
39491
+ * one, {@link TermDto.derivedBy}.
39492
+ *
39493
+ * The route does not chain. It reports what the last chain left, so after a
39494
+ * restart the derived half is empty until something chains again.
39495
+ *
39496
+ * @defaultValue `true` (the engine's default — the SDK sends nothing when
39497
+ * this is omitted)
39498
+ */
39499
+ includeDerived?: boolean;
38160
39500
  }
38161
39501
  declare class TermsClient {
38162
39502
  /** @internal */
@@ -38198,9 +39538,7 @@ declare class TermsClient {
38198
39538
  * });
38199
39539
  * ```
38200
39540
  */
38201
- createTerm(request: Omit<CreateTermRequest, 'features'> & {
38202
- features: Record<string, PlainFeatureValue>;
38203
- }, requestOptions?: RequestOptions): Promise<TermResponse>;
39541
+ createTerm(request: CreateTermInputWithPlainFeatures, requestOptions?: RequestOptions): Promise<TermResponse>;
38204
39542
  /**
38205
39543
  * Get a term by ID, live or as it stood at an instant.
38206
39544
  *
@@ -38339,40 +39677,140 @@ declare class TermsClient {
38339
39677
  */
38340
39678
  termExists(termId: string, requestOptions?: RequestOptions): Promise<boolean>;
38341
39679
  /**
38342
- * Bulk-create terms.
39680
+ * Create many terms in one request, all-or-nothing by default.
38343
39681
  *
38344
- * @param request - Bulk creation request.
38345
- * @returns Bulk creation result with term UUIDs.
39682
+ * @param request - The rows, plus `dryRun` to check without writing and
39683
+ * `partial` to keep the rows that passed. Features may be plain JS values
39684
+ * or `Value.*` output.
39685
+ * @param requestOptions - Per-call request options.
39686
+ * @returns What was written (or, on a dry run, what WOULD be written):
39687
+ * `termsAdded`, `termIds` on a real write, `errors` beside them under
39688
+ * `partial`, `coreferencedTermIds` on a dry run.
39689
+ * @throws {@link BulkRefusedError} 422 when the batch was refused and
39690
+ * NOTHING was written. Read `error.rows` — one entry per refused row, each
39691
+ * naming its `index` in `request.terms`. This is the answer for a refused
39692
+ * default batch, for a refused dry run, and for a `partial` batch in which
39693
+ * every row was refused.
39694
+ * @throws {@link ApiError} 409 when the end-of-batch constraint propagation
39695
+ * refuses the batch as a whole. That verdict cannot be attributed to a row,
39696
+ * so `partial` does not split it.
39697
+ *
39698
+ * @remarks
39699
+ * **Serialization format: Tagged (`ValueDto`).** Plain feature values are
39700
+ * converted exactly as {@link TermsClient.createTerm} converts them.
39701
+ *
39702
+ * There are three outcomes, and they are distinguishable without reading a
39703
+ * status code:
39704
+ *
39705
+ * 1. **A clean write** — `201`. `termIds` holds one id per request row, in
39706
+ * request order; `termsAdded` equals its length; `errors` is absent.
39707
+ * Measured 2026-09-18, a 2-row clean batch:
39708
+ * `{"terms_added":2,"term_ids":["3d936f37-…","f4a77a0b-…"],
39709
+ * "processing_time_ms":38,"dry_run":false}`.
39710
+ * 2. **A partial write** — `201`, and only with `partial: true`. Some rows
39711
+ * landed. `termIds` holds one id per ACCEPTED row, so it is SHORTER than
39712
+ * `request.terms`, and `errors` sits beside it naming the refused ones.
39713
+ * Map a refusal back with `errors[].index`, never with a position in
39714
+ * `termIds`. Measured, a 2-row batch whose second row violates a declared
39715
+ * range:
39716
+ * `{"terms_added":1,"term_ids":["d6ba85e6-…"],"errors":[{"index":1,
39717
+ * "feature":"price","message":"Constraint violation: Feature 'price'
39718
+ * value violates its declared range/constraint"}],"refused":1,
39719
+ * "processing_time_ms":37,"dry_run":false}`.
39720
+ * 3. **A refusal** — `422`, thrown as {@link BulkRefusedError}. Nothing was
39721
+ * written. Measured, the same bad batch WITHOUT `partial`:
39722
+ * `{"code":"bulk_refused","message":"1 of 2 entries were refused; the
39723
+ * whole batch was refused and nothing was written","errors":[{"index":1,
39724
+ * "feature":"price","message":"Constraint violation: …"}]}`. With
39725
+ * `partial: true` and BOTH rows bad, the same `422`:
39726
+ * `"2 of 2 entries were refused; the whole batch was refused and nothing
39727
+ * was written"`.
39728
+ *
39729
+ * **`dryRun` runs every check and writes nothing**, and it answers in the
39730
+ * same two shapes. A clean dry run is `200` and reports NO `termIds` —
39731
+ * measured:
39732
+ * `{"terms_added":2,"coreferenced_term_ids":[],"processing_time_ms":0,
39733
+ * "dry_run":true}`. The absence is deliberate: the rollback discarded every
39734
+ * id it minted, a later real write mints different ones, so the vector would
39735
+ * name nothing. The ids that DO outlive a dry run are the existing entities
39736
+ * a `@key` coreference would have merged into, and they come back as
39737
+ * `coreferencedTermIds`. A dry run over a BAD batch throws
39738
+ * {@link BulkRefusedError} with the same per-row refusals a real write throws
39739
+ * — measured, identical body to outcome 3 — so a caller can validate an
39740
+ * import with one call and never touch the store.
39741
+ *
39742
+ * @example
39743
+ * ```typescript
39744
+ * // Validate an import without writing.
39745
+ * try {
39746
+ * const check = await client.terms.bulkCreateTerms({ terms: rows, dryRun: true });
39747
+ * console.log(`${check.termsAdded} rows would be written`); // no check.termIds
39748
+ * } catch (e) {
39749
+ * if (e instanceof BulkRefusedError) {
39750
+ * for (const row of e.rows) console.error(`row ${row.index}: ${row.message}`);
39751
+ * }
39752
+ * }
39753
+ *
39754
+ * // Write what passes, and report what did not.
39755
+ * const result = await client.terms.bulkCreateTerms({ terms: rows, partial: true });
39756
+ * console.log(`${result.termsAdded} written`, result.termIds);
39757
+ * for (const bad of result.errors ?? []) {
39758
+ * console.warn(`row ${bad.index} (${bad.feature}): ${bad.message}`);
39759
+ * }
39760
+ * ```
38346
39761
  */
38347
- bulkCreateTerms(request: {
38348
- terms: Array<Omit<CreateTermRequest, 'features'> & {
38349
- features: Record<string, PlainFeatureValue>;
38350
- }>;
38351
- }, requestOptions?: RequestOptions): Promise<BulkAddTermsResponse>;
39762
+ bulkCreateTerms(request: BulkCreateTermsRequest, requestOptions?: RequestOptions): Promise<BulkAddTermsResponse>;
38352
39763
  /**
38353
- * List terms for the authenticated tenant.
39764
+ * List one page of the tenant's terms, and say how many there are.
38354
39765
  *
38355
- * @param query - Optional paging and sort filter. Omit for every term.
38356
- * @returns The list of terms with total count.
38357
- * @throws {ApiError} If the request fails.
39766
+ * @param query - Paging, the sort filter, and `includeDerived`. Omit for
39767
+ * every term.
39768
+ * @param requestOptions - Per-call request options.
39769
+ * @returns The page in `terms`, its length in `count`, the size of the whole
39770
+ * answer in `total`, and an engine remark in `note`.
39771
+ * @throws {@link ApiError} If the request fails.
38358
39772
  *
38359
39773
  * @remarks
38360
- * Terms are enriched with sort names, display names, and referenced term summaries.
38361
- * Requires X-Tenant-Id header (set via client configuration).
38362
- * Uses the tagged {@link ValueDto} serialization format.
38363
- *
38364
- * `sortName` filters on the sort's committed name. For a plugin-contributed
38365
- * sort that is the namespaced form (`plugin:<plugin-name>:<local>`), which
38366
- * {@link SortDto.name} carries and {@link SortDto.pluginLocalName} maps back
38367
- * to the name its author wrote.
39774
+ * **Serialization format: Tagged (`ValueDto`).** Terms are enriched with sort
39775
+ * names, display names, and referenced-term summaries. Requires the
39776
+ * `X-Tenant-Id` header, which the client configuration sets.
39777
+ *
39778
+ * **Page off `total`, not `count`.** `count` is this page's length and
39779
+ * nothing else. Measured 2026-09-18 on a tenant holding 3 terms:
39780
+ * `GET /api/v1/terms?limit=1&offset=2` answered
39781
+ * `{"terms":[…one…],"count":1,"total":3}`. `total` is counted before the
39782
+ * window, so it is the number to compare an offset against.
39783
+ *
39784
+ * **When the page is empty, read `note` before you report "no results".**
39785
+ * The route neither chains nor persists conclusions, so for a sort whose
39786
+ * members exist only by derivation the honest answer in a freshly started
39787
+ * process is zero rows — and `total: 0` reads like an authoritative "no
39788
+ * members", which is false. Measured 2026-09-18, a tenant with `widget`,
39789
+ * subsort `premium_widget`, one `widget` fact and the rule
39790
+ * `widget(name: ?N) → premium_widget(name: ?N)`:
39791
+ * `GET /api/v1/terms?sort_name=premium_widget` answered
39792
+ * `{"terms":[],"count":0,"total":0,"note":"`premium_widget` is a rule
39793
+ * conclusion sort: its members are derived … An empty answer here does not
39794
+ * mean the sort has no members."}`. Without the rule, the same empty answer
39795
+ * carried no note.
39796
+ *
39797
+ * `sortName` filters on the sort's committed name, and on that sort EXACTLY
39798
+ * — a member of a subsort is not answered. For a plugin-contributed sort the
39799
+ * committed name is the namespaced form (`plugin:<plugin-name>:<local>`),
39800
+ * which {@link SortDto.name} carries and {@link SortDto.pluginLocalName}
39801
+ * maps back to the name its author wrote.
38368
39802
  *
38369
39803
  * @example
38370
39804
  * ```typescript
38371
- * const result = await client.terms.listTerms();
38372
- * console.log(`Found ${result.count} terms`);
39805
+ * const first = await client.terms.listTerms({ sortName: 'person', limit: 50 });
39806
+ * if (first.terms.length === 0 && first.note) console.info(first.note);
39807
+ * for (let offset = 50; offset < (first.total ?? 0); offset += 50) {
39808
+ * const page = await client.terms.listTerms({ sortName: 'person', limit: 50, offset });
39809
+ * // …
39810
+ * }
38373
39811
  *
38374
- * // Only the first page of one sort's terms.
38375
- * const page = await client.terms.listTerms({ sortName: 'person', limit: 50 });
39812
+ * // The asserted rows alone — the engine includes conclusions by default.
39813
+ * const asserted = await client.terms.listTerms({ includeDerived: false });
38376
39814
  * ```
38377
39815
  */
38378
39816
  listTerms(query?: ListTermsQuery, requestOptions?: RequestOptions): Promise<TermListResponse>;
@@ -38396,18 +39834,27 @@ declare class TermsClient {
38396
39834
  clearTerms(requestOptions?: RequestOptions): Promise<ClearTermsResponse>;
38397
39835
  /**
38398
39836
  * Create multiple records in a single request.
38399
- * Alias for {@link bulkCreateTerms}.
39837
+ * Alias for {@link TermsClient.bulkCreateTerms}.
38400
39838
  *
38401
- * @param request - Bulk creation request.
38402
- * @returns Bulk creation result with term UUIDs.
39839
+ * @param request - The rows, plus `dryRun` and `partial`.
39840
+ * @param requestOptions - Per-call request options.
39841
+ * @returns What was written, exactly as {@link TermsClient.bulkCreateTerms}
39842
+ * returns it.
39843
+ * @throws {@link BulkRefusedError} 422 when nothing was written.
39844
+ *
39845
+ * @remarks
39846
+ * **Serialization format: Tagged (`ValueDto`).** Same call, friendlier name
39847
+ * — read {@link TermsClient.bulkCreateTerms} for the three outcomes and for
39848
+ * what a dry run does and does not report.
38403
39849
  *
38404
- * @see bulkCreateTerms
39850
+ * @example
39851
+ * ```typescript
39852
+ * const result = await client.terms.createMany({ terms: rows, partial: true });
39853
+ * ```
39854
+ *
39855
+ * @see {@link TermsClient.bulkCreateTerms}
38405
39856
  */
38406
- createMany(request: {
38407
- terms: Array<Omit<CreateTermRequest, 'features'> & {
38408
- features: Record<string, PlainFeatureValue>;
38409
- }>;
38410
- }, requestOptions?: RequestOptions): Promise<BulkAddTermsResponse>;
39857
+ createMany(request: BulkCreateTermsRequest, requestOptions?: RequestOptions): Promise<BulkAddTermsResponse>;
38411
39858
  /**
38412
39859
  * Walk every matching term, a page at a time.
38413
39860
  *
@@ -38517,7 +39964,7 @@ declare class Inference<SecurityDataType = unknown> {
38517
39964
  */
38518
39965
  bulkRetractTerms: (data: BulkRetractTermsRequest$1, params?: RequestParams) => Promise<HttpResponse<BulkRetractTermsResponse$1, void>>;
38519
39966
  /**
38520
- * @description This drops the hydrated base facts, the forward-chain `persist_derived` facts and the residuation store, then forgets the hydration flag so the next request reloads the base facts from PostgreSQL. **It does not delete durable data.** The terms are the authority; this is their cache. That makes it the retraction primitive forward chaining otherwise lacks. Chaining is monotonic — delete a `blocks` edge and the derived "A blocks B" survives every later pass, so the KB keeps asserting a relationship the user removed. Clearing and re-chaining rebuilds the closure from the terms that actually exist. # History Until 2026-07-28 this handler enumerated every term in the tenant and deleted it from PostgreSQL, while calling itself "clear facts" and reporting `"Cleared N facts/rules"`. It is reachable with an ordinary tenant credential — unlike `/api/v1/admin/clear-tenant/{tenant_id}`, which gateways block — so a caller reading the name, the path or the response body had no way to know it was a tenant wipe. It destroyed a live tenant that way. Use `DELETE /api/v1/terms/{term_id}` to delete a term, and the admin route to wipe a tenant; deleting durable data must not be something an endpoint does as a side effect of its name. # Authorization Requires X-Tenant-Id header, and the path tenant must match it.
39967
+ * @description This drops the hydrated base facts, the forward-chain `keep_derived` facts and the residuation store, then forgets the hydration flag so the next request reloads the base facts from PostgreSQL. **It does not delete durable data.** The terms are the authority; this is their cache. That makes it the retraction primitive forward chaining otherwise lacks. Chaining is monotonic — delete a `blocks` edge and the derived "A blocks B" survives every later pass, so the KB keeps asserting a relationship the user removed. Clearing and re-chaining rebuilds the closure from the terms that actually exist. # History Until 2026-07-28 this handler enumerated every term in the tenant and deleted it from PostgreSQL, while calling itself "clear facts" and reporting `"Cleared N facts/rules"`. It is reachable with an ordinary tenant credential — unlike `/api/v1/admin/clear-tenant/{tenant_id}`, which gateways block — so a caller reading the name, the path or the response body had no way to know it was a tenant wipe. It destroyed a live tenant that way. Use `DELETE /api/v1/terms/{term_id}` to delete a term, and the admin route to wipe a tenant; deleting durable data must not be something an endpoint does as a side effect of its name. # Authorization Requires X-Tenant-Id header, and the path tenant must match it.
38521
39968
  *
38522
39969
  * @tags inference
38523
39970
  * @name ClearFacts
@@ -38591,7 +40038,7 @@ declare class Inference<SecurityDataType = unknown> {
38591
40038
  * @request POST:/api/v1/inference/forward-chain
38592
40039
  * @secure
38593
40040
  */
38594
- forwardChain: (data: ForwardChainRequest$1, params?: RequestParams) => Promise<HttpResponse<ForwardChainResponse$1, any>>;
40041
+ forwardChain: (data: ForwardChainRequest$1, params?: RequestParams) => Promise<HttpResponse<ForwardChainResponse$1, TimeoutErrorResponse>>;
38595
40042
  /**
38596
40043
  * @description Runs forward chaining with probabilistic provenance tags. Each derived fact carries a confidence value computed from the provenance semiring operations (noisy-or for disjunction, product for conjunction). This extends the standard forward chain endpoint by tracking how confidence propagates through rule application, enabling probabilistic reasoning over the knowledge base.
38597
40044
  *
@@ -38622,6 +40069,8 @@ declare class Inference<SecurityDataType = unknown> {
38622
40069
  * @secure
38623
40070
  */
38624
40071
  getFacts: (tenantId: string, query?: {
40072
+ /** Include the rule conclusions this process has materialised (default true); send false for the asserted rows alone */
40073
+ include_derived?: boolean;
38625
40074
  /**
38626
40075
  * Max facts to return; omit for all, hard-capped at 10000
38627
40076
  * @min 0
@@ -38923,7 +40372,19 @@ declare class InferenceClient {
38923
40372
  * Forward chaining starts from existing facts and applies rules to derive new facts,
38924
40373
  * repeating until no more new facts can be derived (fixpoint) or limits are reached.
38925
40374
  *
38926
- * If `persist_derived` is true, derived facts are permanently saved to the database.
40375
+ * `keepDerived: true` keeps the run's derivations RESIDENT so a later `MATCH`
40376
+ * reads them. A default run is rolled back, not merely unwritten — so this
40377
+ * route reports what it derived and leaves the store as it found it. Neither
40378
+ * setting is durable: to repair a tenant whose materialised set has drifted,
40379
+ * use OSFQL `CHAIN;` or {@link AdminClient.rebuildDerivedFacts}.
40380
+ *
40381
+ * `timeoutMs` is a server-side deadline in milliseconds, checked at every
40382
+ * fixpoint boundary and every rule application. Omitted means the engine's own
40383
+ * backstop (`OSFKB_FC_TIMEOUT_SECS`, 300 s by default); `0` opts out entirely.
40384
+ * The route answers `504` when the deadline passes, and the body says whether
40385
+ * a `keepDerived` run kept the partial derivation it had reached.
40386
+ *
40387
+ * @throws {ApiError} With status 504 when the derivation passed its deadline.
38927
40388
  */
38928
40389
  forwardChain(request: Omit<ForwardChainRequest, 'initialFacts'> & {
38929
40390
  initialFacts?: TermInputArg[];
@@ -39151,7 +40612,7 @@ declare class Query<SecurityDataType = unknown> {
39151
40612
  http: HttpClient<SecurityDataType>;
39152
40613
  constructor(http: HttpClient<SecurityDataType>);
39153
40614
  /**
39154
- * @description Returns all terms with the specified sort OR any of its subtypes. This implements proper OSF polymorphic query semantics where querying a parent sort returns all instances of that sort and its descendants. ## Resolving `sort_name` A name can denote more than one id (see `sort_name_candidates`), and no cheap probe tells which of them the query can actually answer from: on the production adapter `get_sort` and `get_sort_ids_by_names` are bare reads of an in-memory cache with no persistence fallback, while the query's own `get_compatible_sorts` does fall back to Postgres. Confirming a candidate with `get_sort` would therefore 404 every tenant sort created before the last restart — a guard strictly stricter than the thing it guards. So the candidates are **tried** against the real query; only `SortNotFound` moves on to the next, every other failure is returned as-is. A phantom id (minted into the tenant lattice by ingestion and never persisted, #138) cannot be returned: the query authority refuses it and the loop skips past it. When no candidate answers, the sort is not queryable and the honest reply is 404 naming the sort the CALLER asked for — never a 400 leaking an internal `SortId` the caller never supplied. Every candidate that answers **contributes**; the answer is their union, deduplicated by term id. Registration now keeps a tenant to one sort per name (#139), so two answering candidates mean rows a pre-fix engine left behind: one name, two sorts, and the tenant's terms of that type divided between them. Stopping at the first — what this route did — returned one half and reported nothing about the other, because an id the caller never supplied going unqueried raises no error. In the ordinary case exactly one candidate answers and the route runs exactly one term query, as it always did.
40615
+ * @description Returns all terms with the specified sort OR any of its subtypes. This implements proper OSF polymorphic query semantics where querying a parent sort returns all instances of that sort and its descendants. ## Resolving `sort_name` A name can denote more than one id (see `sort_name_candidates`), and no cheap probe tells which of them the query can actually answer from: on the production adapter `get_sort` and `get_sort_ids_by_names` are bare reads of an in-memory cache with no persistence fallback, while the query's own `get_compatible_sorts` does fall back to Postgres. Confirming a candidate with `get_sort` would therefore 404 every tenant sort created before the last restart — a guard strictly stricter than the thing it guards. So the candidates are **tried** against the real query; only `SortNotFound` moves on to the next, every other failure is returned as-is. A phantom id (minted into the tenant lattice by ingestion and never persisted, #138) cannot be returned: the query authority refuses it and the loop skips past it. When no candidate answers, the sort is not queryable and the honest reply is 404 naming the sort the CALLER asked for — never a 400 leaking an internal `SortId` the caller never supplied. Every candidate that answers **contributes**; the answer is their union, deduplicated by term id. Registration now keeps a tenant to one sort per name (#139), so two answering candidates mean rows a pre-fix engine left behind: one name, two sorts, and the tenant's terms of that type divided between them. Stopping at the first — what this route did — returned one half and reported nothing about the other, because an id the caller never supplied going unqueried raises no error. In the ordinary case exactly one candidate answers and the route runs exactly one term query, as it always did. ## Conclusions, and what this route promises The answer is the tenant's durable extension of the browse closure UNIONED with the conclusions this process currently HOLDS — the same set OSFQL `MATCH` reads. That is what makes a rule sort readable here at all: no OSFQL path persists a conclusion, so the durable half is empty for a sort whose members exist only by derivation (#261). This route does NOT chain. It reports what the last chain left, so: * after a restart the derived half is empty until something chains again — `CHAIN`, `PROVE`, a retraction's re-chain, or `POST /api/v1/inference/forward-chain`; * a conclusion whose premise was withdrawn through a door that runs no truth maintenance is still answered until the next chain (`docs/OPEN_DEFECTS.md` #82). `total` is the size of the answer before `offset`/`limit`, counted — never a search bound. Rows are ordered by term id, so a page is stable. When the answer is EMPTY and the browsed sort is a rule conclusion sort, `note` says so and names the routes that materialise the conclusions. A bare `total: 0` reads as an authoritative count, and for a rule sort in a freshly-started process it is the one answer a caller must not take at face value — the same confusion #261 was filed about, one state later.
39155
40616
  *
39156
40617
  * @tags query
39157
40618
  * @name FindBySort
@@ -39261,11 +40722,91 @@ declare class QueryClient {
39261
40722
  pattern: PlainTermPattern;
39262
40723
  }, requestOptions?: RequestOptions): Promise<TermDto[]>;
39263
40724
  /**
39264
- * Find terms by sort ID, sort name, or with optional filter.
40725
+ * Browse a sort and everything below it, one page at a time.
39265
40726
  *
39266
- * @param request - Query by sort request. Accepts sort_id (UUID),
39267
- * sort_name (human-readable), and optional filter for feature-based filtering.
39268
- * @returns Array of matching terms (tagged ValueDto format).
40727
+ * @param request - `sortId` (UUID) or `sortName`, an optional feature
40728
+ * `filter`, the `limit`/`offset` window, and `includeDerived`.
40729
+ * @param requestOptions - Per-call request options.
40730
+ * @returns The page in `terms`, its length in `count`, the size of the whole
40731
+ * answer in `total`, and an engine remark in `note`.
40732
+ * @throws {@link ApiError} 404 when no sort of that name is queryable for
40733
+ * the tenant.
40734
+ *
40735
+ * @remarks
40736
+ * **Serialization format: Tagged (`ValueDto`).** This is the polymorphic
40737
+ * browse: a query on a sort answers that sort AND every subsort of it, which
40738
+ * is what distinguishes it from {@link TermsClient.listTerms}'s exact
40739
+ * `sortName` filter.
40740
+ *
40741
+ * **Page off `total`.** `count` is this page's length. `total` is the number
40742
+ * of rows matched BEFORE `offset` and `limit`, counted rather than estimated.
40743
+ *
40744
+ * **A page is stable.** The answer is ordered by term id before the window
40745
+ * is applied, so page 2 neither repeats nor skips a row of page 1. Measured
40746
+ * 2026-09-18 against a 2-member sort:
40747
+ * `POST /api/v1/query/by-sort {"sort_name":"widget","include_derived":true}`
40748
+ * answered ids `829ef5dc-…` then `d4f7a4f8-…` with
40749
+ * `{"count":2,"total":2}`; the same request plus `{"limit":1,"offset":1}`
40750
+ * answered `d4f7a4f8-…` alone with `{"count":1,"total":2}` — the second row,
40751
+ * and the same total.
40752
+ *
40753
+ * **The route does not chain.** It answers the tenant's durable extension
40754
+ * UNIONED with the conclusions this process currently HOLDS. After a restart
40755
+ * the derived half is empty until something chains again. So when the page
40756
+ * is empty, read `note` rather than trusting `total: 0`: measured
40757
+ * 2026-09-18, a tenant with `widget`, subsort `premium_widget`, one `widget`
40758
+ * fact and the rule `widget(name: ?N) → premium_widget(name: ?N)`,
40759
+ * `{"sort_name":"premium_widget"}` answered
40760
+ * `{"terms":[],"count":0,"total":0,"note":"`premium_widget` is a rule
40761
+ * conclusion sort: its members are derived … Materialise them with OSFQL
40762
+ * CHAIN, POST /api/v1/inference/forward-chain, or POST
40763
+ * /api/v1/admin/derived-facts/rebuild/{tenant_id} … An empty answer here
40764
+ * does not mean the sort has no members."}`. Before the rule existed, the
40765
+ * same empty query carried no note.
40766
+ *
40767
+ * @example
40768
+ * ```typescript
40769
+ * const page = await client.query.findBySortPage({
40770
+ * sortName: 'sales_order',
40771
+ * includeDerived: true,
40772
+ * limit: 25,
40773
+ * offset: 0,
40774
+ * });
40775
+ * if (page.terms.length === 0 && page.note) console.info(page.note);
40776
+ * console.log(`${page.count} of ${page.total}`);
40777
+ * ```
40778
+ *
40779
+ * @see {@link QueryClient.findBySort} — the deprecated array-returning form.
40780
+ */
40781
+ findBySortPage(request: FindBySortRequest, requestOptions?: RequestOptions): Promise<TermListResponse>;
40782
+ /**
40783
+ * Browse a sort and everything below it, discarding the envelope.
40784
+ *
40785
+ * @deprecated Use {@link QueryClient.findBySortPage}, which returns the
40786
+ * engine's envelope. This method drops `count`, `total` and `note`, so a
40787
+ * caller cannot tell a full answer from a truncated one, cannot page, and
40788
+ * reads an empty array for a rule-conclusion sort with no way to see the
40789
+ * engine's explanation. It is kept so 1.27 callers keep compiling.
40790
+ *
40791
+ * @param request - `sortId` or `sortName`, an optional feature `filter`, the
40792
+ * `limit`/`offset` window, and `includeDerived`.
40793
+ * @param requestOptions - Per-call request options.
40794
+ * @returns The page's terms alone.
40795
+ * @throws {@link ApiError} 404 when no sort of that name is queryable for
40796
+ * the tenant.
40797
+ *
40798
+ * @remarks
40799
+ * **Serialization format: Tagged (`ValueDto`).** Identical request,
40800
+ * identical rows, identical ordering — see
40801
+ * {@link QueryClient.findBySortPage} for the measured ordering and paging
40802
+ * contract. The only difference is what is thrown away.
40803
+ *
40804
+ * @example
40805
+ * ```typescript
40806
+ * const terms = await client.query.findBySort({ sortName: 'sales_order' });
40807
+ * ```
40808
+ *
40809
+ * @see {@link QueryClient.findBySortPage}
39269
40810
  */
39270
40811
  findBySort(request: FindBySortRequest, requestOptions?: RequestOptions): Promise<TermDto[]>;
39271
40812
  /**
@@ -49597,6 +51138,51 @@ declare class ConstraintViolationError extends ApiError {
49597
51138
  readonly constraint: string | undefined;
49598
51139
  constructor(message: string, body: unknown, headers: Headers, errorCode?: string, termId?: string, feature?: string, constraint?: string);
49599
51140
  }
51141
+ /**
51142
+ * A bulk write the engine refused row by row (HTTP 422).
51143
+ *
51144
+ * @remarks
51145
+ * `POST /api/v1/terms/bulk` used to answer one message about a feature and
51146
+ * write nothing, so a client importing four thousand rows learned that
51147
+ * something, somewhere, was wrong. It now names every refused row by its index
51148
+ * in the request, and this error carries that list.
51149
+ *
51150
+ * Reached three ways, all of them this class:
51151
+ * - an ordinary batch where any row was refused (nothing was written);
51152
+ * - a `partial: true` batch where EVERY row was refused (again nothing was
51153
+ * written — a partial batch that landed something answers `201` instead, with
51154
+ * the refusals on {@link BulkAddTermsResponse.errors});
51155
+ * - a `dryRun: true` batch that would have been refused.
51156
+ *
51157
+ * Two failures are NOT this error, because neither can be attributed to a row:
51158
+ * the end-of-batch constraint propagation answers a
51159
+ * {@link ConstraintViolationError} for the whole batch, and a persistence
51160
+ * failure reverts what the batch inserted.
51161
+ *
51162
+ * @example
51163
+ * ```typescript
51164
+ * try {
51165
+ * await client.terms.bulkCreateTerms({ terms });
51166
+ * } catch (e) {
51167
+ * if (e instanceof BulkRefusedError) {
51168
+ * for (const row of e.rows) {
51169
+ * console.error(`row ${row.index}: ${row.message}`);
51170
+ * }
51171
+ * }
51172
+ * }
51173
+ * ```
51174
+ */
51175
+ declare class BulkRefusedError extends ApiError {
51176
+ name: string;
51177
+ /**
51178
+ * The refused rows, each naming its index in the request's `terms` array.
51179
+ *
51180
+ * @remarks
51181
+ * Never empty — the engine answers this shape only when it refused something.
51182
+ */
51183
+ readonly rows: readonly BulkRowRefusal[];
51184
+ constructor(message: string, body: unknown, headers: Headers, rows: readonly BulkRowRefusal[], errorCode?: string);
51185
+ }
49600
51186
  /**
49601
51187
  * Rate limit error (HTTP 429).
49602
51188
  *
@@ -62316,7 +63902,7 @@ declare class Admin<SecurityDataType = unknown> {
62316
63902
  */
62317
63903
  listTenants: (params?: RequestParams) => Promise<HttpResponse<ListTenantsResponse$1, void>>;
62318
63904
  /**
62319
- * @description Truncates the derived_facts table for the given tenant and queues a BootstrapAll event covering every analyzed rule. Asynchronous: returns the queue depth and current materialization LSN, not the final state. Concurrent rebuilds for the same tenant are rejected with 409 (per-tenant mutex). Full operational runbook (prerequisites, timings, monitoring, failure recovery, known limitations) lives in .claude/SUB_MS_FORWARD_CHAINING_STATUS.md, section 'Operator runbook — derived-facts rebuild'.
63905
+ * @description Re-materialises the tenant's conclusions SYNCHRONOUSLY: chains the resident store once, so every conclusion the rules prove and the store lacks comes back. `rematerialised` reports how many, and every read surface answers from that store — this is the one call that repairs a drifted tenant (#270). ONE DIRECTION: it does not remove a conclusion the rules no longer support, because the write doors' truth maintenance already does that on the write that changed the premise. It ALSO truncates the durable derived_facts table and queues a BootstrapAll event over every analyzed rule; that half is asynchronous, and `removed` / `rules_queued` / `materialization_lsn` describe it. Concurrent rebuilds for the same tenant are rejected with 409 (per-tenant mutex). Full operational runbook (prerequisites, timings, monitoring, failure recovery, known limitations) lives in .claude/SUB_MS_FORWARD_CHAINING_STATUS.md, section 'Operator runbook — derived-facts rebuild'.
62320
63906
  *
62321
63907
  * @tags admin
62322
63908
  * @name RebuildDerivedFacts
@@ -64950,6 +66536,375 @@ declare class Osfql<SecurityDataType = unknown> {
64950
66536
  /** Filter by category: read | write | control | meta */
64951
66537
  category?: string;
64952
66538
  }, params?: RequestParams) => Promise<HttpResponse<CatalogEntryDoc[], any>>;
66539
+ /**
66540
+ * @description Takes the same body as `POST /api/v1/osfql` (the `query` matters; `atomic` decides whether the answer reports the atomic refusal) and answers: - `mutates` — whether ANY statement writes, folding every nested statement, so an `IF` whose THEN or ELSE branch writes reports `true`, and including an inline-write `MATCH` a first-statement classification would read as safe; - `atomic_refusal` — why the program cannot run as one atomic unit, with the same code the run would refuse with (`drop_sort_in_atomic_program`); - `statements` — one entry per statement with the ENGINE's classification (catalog id, risk tier, and a per-statement `mutates` — not a client-side tokenizer), the exact source text, the sorts named, nested entries for IF branches and `WITH` continuations, and — for each destructive statement — the affected-row count and up to 10 sample rows. The per-statement `mutates` is what a write gate reads: `CHAIN` and `RELEASE RESIDUATIONS` report `true` although they classify as `process_control`, while `MARK`, `CUT` and `SPACE` report `false`. No client has to keep its own table of which process-control statements write; `GET /api/v1/osfql/catalog` carries the same verdict per entry as `never` / `always` / `depends` (#266). The classification comes from the engine's own parse; the counts come from a read-only `MATCH` derived from the destructive statement's pattern and run against a CLONE of the tenant. Nothing runs against the live store, so nothing observable happens in the tenant afterwards. # Examples ```json { "query": "MATCH person(name: ?N); RETRACT person(name: \"Bob\");" } ``` ```json { "query": "DROP SORT person; INSERT person(name: \"Bob\");" } ```
66541
+ *
66542
+ * @tags osfql
66543
+ * @name PreviewOsfql
66544
+ * @summary Preview an OSFQL program: what each statement would do, decided without running anything (#257).
66545
+ * @request POST:/api/v1/osfql/preview
66546
+ * @secure
66547
+ */
66548
+ previewOsfql: (data: OsfqlRequest$1, params?: RequestParams) => Promise<HttpResponse<OsfqlPreviewResponse$1, OsfqlErrorResponse>>;
66549
+ }
66550
+
66551
+ /**
66552
+ * Types for the UI resource (sort-driven UI descriptors).
66553
+ *
66554
+ * @module
66555
+ */
66556
+
66557
+ /** Layout mode for the UI surface. Re-exported from generated types (no camelCase diff). */
66558
+ type LayoutModeDto = LayoutModeDto$1;
66559
+ /**
66560
+ * One accumulated UI customization from a multi-turn conversation.
66561
+ *
66562
+ * Re-exported from the generated types: the wire shape is already snake_case
66563
+ * throughout (`customization_type`, `props_override`), so there is no camelCase
66564
+ * counterpart to hand-write. Typed as `unknown[]` until the backend described
66565
+ * this surface, which is why nothing checked what a caller put here.
66566
+ */
66567
+ type UICustomizationDto$1 = UICustomizationDto$2;
66568
+ /**
66569
+ * Safety tier the server assigns to an OSFQL statement carried by a UI action.
66570
+ *
66571
+ * @remarks
66572
+ * Wire values are `snake_case` (`"targeted_destructive"`, `"additive_write"`, …) —
66573
+ * re-exported from the generated types since there is no camelCase diff.
66574
+ *
66575
+ * The tier on a descriptor action is a coarse pre-filter: the server re-derives the
66576
+ * real tier per authored statement at execution time. Destructive tiers
66577
+ * (`targeted_destructive`, `bulk_destructive`) are refused unless the
66578
+ * {@link UIActionRequest.confirm} flag is set.
66579
+ *
66580
+ * @example
66581
+ * ```typescript
66582
+ * const tier: RiskTier = 'targeted_destructive';
66583
+ * ```
66584
+ */
66585
+ type RiskTier = RiskTier$1;
66586
+ /** Layout slot definition. */
66587
+ interface LayoutSlotDto {
66588
+ id: string;
66589
+ label: string;
66590
+ }
66591
+ /** Layout surface configuration. */
66592
+ interface LayoutSurfaceDto {
66593
+ id: string;
66594
+ layoutMode: LayoutModeDto;
66595
+ slots: LayoutSlotDto[];
66596
+ }
66597
+ /** Validation type (discriminated union). Re-exported from generated types. */
66598
+ type ValidationTypeDto = {
66599
+ type: 'required';
66600
+ } | {
66601
+ type: 'min';
66602
+ params: number;
66603
+ } | {
66604
+ type: 'max';
66605
+ params: number;
66606
+ } | {
66607
+ type: 'pattern';
66608
+ params: string;
66609
+ } | {
66610
+ type: 'one_of';
66611
+ params: string[];
66612
+ } | {
66613
+ type: 'value_type';
66614
+ params: string;
66615
+ } | {
66616
+ type: 'date_after';
66617
+ params: string;
66618
+ } | {
66619
+ type: 'date_before';
66620
+ params: string;
66621
+ };
66622
+ /** Validation rule for a UI component. */
66623
+ interface ValidationRuleDto {
66624
+ field: string;
66625
+ message: string;
66626
+ ruleType: ValidationTypeDto;
66627
+ }
66628
+ /**
66629
+ * UI action discriminated union.
66630
+ *
66631
+ * @remarks
66632
+ * Every variant carries a {@link RiskTier} (`riskTier`) and an optional catalog
66633
+ * `statementId` — the server derives both from the action kind and echoes them on
66634
+ * the descriptor. `run_osfql` is the catalog-authored variant: its `statementId` is
66635
+ * required because it names the catalog statement whose OSFQL template the action runs.
66636
+ */
66637
+ type UIActionDto = {
66638
+ type: 'submit_form';
66639
+ sortName: string;
66640
+ osfqlTemplate: string;
66641
+ fieldTypes: Record<string, string>;
66642
+ riskTier: RiskTier;
66643
+ statementId?: string | null;
66644
+ } | {
66645
+ type: 'load_data';
66646
+ osfqlQuery: string;
66647
+ riskTier: RiskTier;
66648
+ statementId?: string | null;
66649
+ } | {
66650
+ type: 'update_form';
66651
+ sortName: string;
66652
+ osfqlTemplate: string;
66653
+ fieldTypes: Record<string, string>;
66654
+ riskTier: RiskTier;
66655
+ statementId?: string | null;
66656
+ } | {
66657
+ type: 'delete_record';
66658
+ sortName: string;
66659
+ /** OSFQL template with `{field}` placeholders — present for feature-based deletes. */
66660
+ osfqlTemplate?: string | null;
66661
+ riskTier: RiskTier;
66662
+ statementId?: string | null;
66663
+ } | {
66664
+ type: 'trigger_inference';
66665
+ osfqlDerive: string;
66666
+ riskTier: RiskTier;
66667
+ statementId?: string | null;
66668
+ } | {
66669
+ type: 'navigate';
66670
+ sortId: string;
66671
+ viewMode: string;
66672
+ termId?: string | null;
66673
+ riskTier: RiskTier;
66674
+ statementId?: string | null;
66675
+ } | {
66676
+ type: 'refresh';
66677
+ riskTier: RiskTier;
66678
+ statementId?: string | null;
66679
+ } | {
66680
+ type: 'run_osfql';
66681
+ /** Catalog statement id whose OSFQL template this action runs. */
66682
+ statementId: string;
66683
+ /** Human-readable label for the catalog statement. */
66684
+ title: string;
66685
+ osfqlTemplate: string;
66686
+ fieldTypes: Record<string, string>;
66687
+ riskTier: RiskTier;
66688
+ };
66689
+ /** UI descriptor tree node (recursive). */
66690
+ interface UIDescriptorDto {
66691
+ actions?: UIActionDto[];
66692
+ bindingPath?: string;
66693
+ children?: UIDescriptorDto[];
66694
+ initialValues?: object;
66695
+ priority: number;
66696
+ props: object;
66697
+ slotId?: string;
66698
+ sort: string;
66699
+ validationRules?: ValidationRuleDto[];
66700
+ }
66701
+ /** Assembly statistics for a UI describe response. */
66702
+ interface UIAssemblyStatsDto {
66703
+ componentCount: number;
66704
+ dataRows?: number;
66705
+ includedFeatures: number;
66706
+ osfqlExecuted?: string | null;
66707
+ sortName: string;
66708
+ totalFeatures: number;
66709
+ viewMode: string;
66710
+ }
66711
+ /** Request to describe a UI for a sort. */
66712
+ interface UIDescribeRequest {
66713
+ customizations?: UICustomizationDto$1[] | null;
66714
+ loadData?: boolean;
66715
+ maxComponents?: number;
66716
+ maxDepth?: number;
66717
+ priorityThreshold?: number;
66718
+ query?: string | null;
66719
+ sessionId?: string | null;
66720
+ sortId: string;
66721
+ termId?: string | null;
66722
+ /** View mode: `"form"`, `"table"`, `"detail"`, `"card"`, `"tree"`. */
66723
+ viewMode?: string;
66724
+ }
66725
+ /** Response from a UI describe request. */
66726
+ interface UIDescribeResponse {
66727
+ data?: object;
66728
+ descriptor: UIDescriptorDto;
66729
+ layout: LayoutSurfaceDto;
66730
+ stats: UIAssemblyStatsDto;
66731
+ }
66732
+ /** Request to execute a UI action. */
66733
+ interface UIActionRequest {
66734
+ /** Action type: `"submit_form"`, `"update_form"`, `"delete_record"`, `"trigger_inference"`, `"run_osfql"`. */
66735
+ actionType: string;
66736
+ /**
66737
+ * Explicit go-ahead for destructive tiers. The server is the boundary: a destructive
66738
+ * statement without `confirm: true` is refused and nothing is mutated.
66739
+ */
66740
+ confirm?: boolean;
66741
+ /**
66742
+ * Preview only: classify and (for destructive tiers) return the affected-row preview
66743
+ * WITHOUT mutating. Defaults to `false`.
66744
+ */
66745
+ dryRun?: boolean;
66746
+ fieldTypes?: object | null;
66747
+ originalValues?: object | null;
66748
+ /** Raw OSFQL override — gated server-side, rejected with 400 unless explicitly enabled. */
66749
+ osfql?: string | null;
66750
+ /**
66751
+ * OSFQL template with `{field}` placeholders the server substitutes from `values`.
66752
+ * Used by `run_osfql` and by feature-based `delete_record`.
66753
+ */
66754
+ osfqlTemplate?: string | null;
66755
+ sortName?: string | null;
66756
+ /** Catalog statement id echoed from the descriptor action — audit/trace only. */
66757
+ statementId?: string | null;
66758
+ termId?: string | null;
66759
+ values?: object | null;
66760
+ }
66761
+ /** Preview of the rows a destructive statement would affect (dry-run only). */
66762
+ interface AffectedPreviewDto {
66763
+ /** Total number of rows the statement would match. */
66764
+ count: number;
66765
+ /** Up to 10 sample rows. */
66766
+ sampleRows?: object[];
66767
+ /** The destructive statement that WOULD run. */
66768
+ statement: string;
66769
+ }
66770
+ /** Response from executing a UI action. */
66771
+ interface UIActionResponse {
66772
+ /** Present on dry-run of a destructive statement: the rows it would hit. */
66773
+ affectedPreview?: AffectedPreviewDto | null;
66774
+ /** Read-back rows for `run_osfql` reads (goals, global gets, hierarchy, aggregates). */
66775
+ bindings?: unknown[] | null;
66776
+ diagnostics?: string[];
66777
+ /** Echo: `true` means this was a dry-run preview and nothing was mutated. */
66778
+ dryRun?: boolean;
66779
+ error?: string | null;
66780
+ /** Pending review id to surface/approve when {@link UIActionResponse.requiresApproval} is `true`. */
66781
+ pendingReviewId?: string | null;
66782
+ producedTermIds?: string[];
66783
+ /**
66784
+ * `true` means the action was enqueued for human approval and nothing was mutated.
66785
+ * Pairs with {@link UIActionResponse.pendingReviewId}.
66786
+ */
66787
+ requiresApproval?: boolean;
66788
+ /**
66789
+ * `true` means a destructive tier was refused for lack of `confirm: true`
66790
+ * (no mutation happened) — the caller should surface a confirmation flow.
66791
+ */
66792
+ requiresConfirmation?: boolean;
66793
+ /** Server-classified risk tier of the final statement. */
66794
+ riskTier?: RiskTier | null;
66795
+ success: boolean;
66796
+ }
66797
+ /**
66798
+ * Request to generate a certified UI specification from a natural-language prompt.
66799
+ *
66800
+ * @remarks
66801
+ * The pipeline is certify-or-abstain: an LLM proposes a component tree over the
66802
+ * {@link UiSort} vocabulary, the exact engine screens every component sort, data
66803
+ * binding, load query and action against the tenant's live schema, and either
66804
+ * certifies the spec, repairs it once, or abstains with suggestions. Rows always
66805
+ * come from OSFQL execution after certification — never from the model.
66806
+ *
66807
+ * The tenant is taken from the authenticated principal (never a body field).
66808
+ */
66809
+ interface UIGenerateRequest {
66810
+ /**
66811
+ * Allow write actions targeting sorts absent from the live schema
66812
+ * (default: `false` — a generated UI writing to nonexistent schema is a hallucination).
66813
+ */
66814
+ allowNewSorts?: boolean;
66815
+ /**
66816
+ * Iterate on an existing page: its latest version is embedded in the prompt as
66817
+ * "the current interface" and {@link UIGenerateRequest.prompt} becomes the change
66818
+ * instruction. The result saves as the page's next version.
66819
+ */
66820
+ basePage?: string | null;
66821
+ /**
66822
+ * Existing conversation to append this exchange to. Omit to start a new conversation.
66823
+ */
66824
+ conversationId?: string | null;
66825
+ /**
66826
+ * Frontend metadata: whether the generated app renders its write controls as live
66827
+ * (interactive) vs preview-only. Passed through untouched; the backend does not branch on it.
66828
+ */
66829
+ interactive?: boolean | null;
66830
+ /** Whether to execute the spec's load query and inline real rows (default: `true`). */
66831
+ loadData?: boolean;
66832
+ /** Maximum number of components (default: 120). */
66833
+ maxComponents?: number;
66834
+ /** Maximum nesting depth (default: 8). */
66835
+ maxDepth?: number;
66836
+ /**
66837
+ * Which generation pipeline to run: `"classic"` (default — single-call
66838
+ * certify-or-abstain) or `"catalog"` (the intent pipeline). Catalog mode only applies
66839
+ * to a fresh screen: iteration on a {@link UIGenerateRequest.basePage} always runs classic.
66840
+ */
66841
+ pipeline?: string | null;
66842
+ /** What the user wants ("a dashboard of drugs with name and dosage…"). */
66843
+ prompt: string;
66844
+ /** Save the certified spec as a named, versioned page. */
66845
+ saveAsPage?: string | null;
66846
+ /** Dev/debug: request the per-stage catalog-pipeline trace. */
66847
+ trace?: boolean | null;
66848
+ }
66849
+ /**
66850
+ * Certified prompt-to-UI generation response.
66851
+ *
66852
+ * @remarks
66853
+ * `verdict` is `"certified"`, `"repaired"`, or `"abstained"`. On abstention the
66854
+ * descriptor and layout are absent and `suggestions` carries live-schema alternatives.
66855
+ */
66856
+ interface UIGenerateResponse {
66857
+ /** Content-addressed certificate id for the accepted spec. */
66858
+ certificateId?: string;
66859
+ /** Engine-loaded data payload — always produced by OSFQL execution, never by the model. */
66860
+ data?: object;
66861
+ /** The certified component tree. Absent when the verdict is `"abstained"`. */
66862
+ descriptor?: UIDescriptorDto;
66863
+ /** Screening diagnostics (what was ungrounded, what the repair changed). */
66864
+ diagnostics?: unknown[];
66865
+ /** The certified layout surface. Absent when the verdict is `"abstained"`. */
66866
+ layout?: LayoutSurfaceDto;
66867
+ /** Saved page version, when {@link UIGenerateRequest.saveAsPage} was requested. */
66868
+ pageVersion?: number;
66869
+ /** Live-schema suggestions returned when the proposal is refused. */
66870
+ suggestions?: unknown[];
66871
+ /** `certified` | `repaired` | `abstained`. */
66872
+ verdict: string;
66873
+ }
66874
+ /** Complete hierarchy of UI component sorts. */
66875
+ type UiSort = UiSort$1;
66876
+ /** A single UI component in the catalog. */
66877
+ interface UICatalogEntry {
66878
+ category: string;
66879
+ sort: UiSort;
66880
+ }
66881
+ /** Response for the UI catalog endpoint. */
66882
+ interface UICatalogResponse {
66883
+ components: UICatalogEntry[];
66884
+ count: number;
66885
+ }
66886
+
66887
+ type ui_AffectedPreviewDto = AffectedPreviewDto;
66888
+ type ui_LayoutModeDto = LayoutModeDto;
66889
+ type ui_LayoutSlotDto = LayoutSlotDto;
66890
+ type ui_LayoutSurfaceDto = LayoutSurfaceDto;
66891
+ type ui_RiskTier = RiskTier;
66892
+ type ui_UIActionDto = UIActionDto;
66893
+ type ui_UIActionRequest = UIActionRequest;
66894
+ type ui_UIActionResponse = UIActionResponse;
66895
+ type ui_UIAssemblyStatsDto = UIAssemblyStatsDto;
66896
+ type ui_UICatalogEntry = UICatalogEntry;
66897
+ type ui_UICatalogResponse = UICatalogResponse;
66898
+ type ui_UIDescribeRequest = UIDescribeRequest;
66899
+ type ui_UIDescribeResponse = UIDescribeResponse;
66900
+ type ui_UIDescriptorDto = UIDescriptorDto;
66901
+ type ui_UIGenerateRequest = UIGenerateRequest;
66902
+ type ui_UIGenerateResponse = UIGenerateResponse;
66903
+ type ui_UiSort = UiSort;
66904
+ type ui_ValidationRuleDto = ValidationRuleDto;
66905
+ type ui_ValidationTypeDto = ValidationTypeDto;
66906
+ declare namespace ui {
66907
+ export type { ui_AffectedPreviewDto as AffectedPreviewDto, ui_LayoutModeDto as LayoutModeDto, ui_LayoutSlotDto as LayoutSlotDto, ui_LayoutSurfaceDto as LayoutSurfaceDto, ui_RiskTier as RiskTier, ui_UIActionDto as UIActionDto, ui_UIActionRequest as UIActionRequest, ui_UIActionResponse as UIActionResponse, ui_UIAssemblyStatsDto as UIAssemblyStatsDto, ui_UICatalogEntry as UICatalogEntry, ui_UICatalogResponse as UICatalogResponse, UICustomizationDto$1 as UICustomizationDto, ui_UIDescribeRequest as UIDescribeRequest, ui_UIDescribeResponse as UIDescribeResponse, ui_UIDescriptorDto as UIDescriptorDto, ui_UIGenerateRequest as UIGenerateRequest, ui_UIGenerateResponse as UIGenerateResponse, ui_UiSort as UiSort, ui_ValidationRuleDto as ValidationRuleDto, ui_ValidationTypeDto as ValidationTypeDto };
64953
66908
  }
64954
66909
 
64955
66910
  /**
@@ -65105,6 +67060,20 @@ type OsfqlValue = {
65105
67060
  } | {
65106
67061
  type: 'boolean';
65107
67062
  value: boolean;
67063
+ }
67064
+ /**
67065
+ * A UTC instant in its RFC 3339 `Z`-suffixed form — the binding of a
67066
+ * `date`/`timestamp` feature, or of a `MIN`/`MAX` aggregate over one.
67067
+ *
67068
+ * @remarks
67069
+ * The engine publishes this variant in `OsfqlValueDto`, so a `datetime`
67070
+ * binding, `FETCH` feature or preview sample-row column can carry it. It is
67071
+ * a `string` rather than a `Date` because the value is the engine's own
67072
+ * rendering and the SDK never reformats a response.
67073
+ */
67074
+ | {
67075
+ type: 'datetime';
67076
+ value: string;
65108
67077
  } | {
65109
67078
  type: 'list';
65110
67079
  value: OsfqlValue[];
@@ -65270,6 +67239,20 @@ interface OsfqlCatalogEntry {
65270
67239
  examples: string[];
65271
67240
  /** Safety tier, snake_case (e.g. `read`, `additive_write`). */
65272
67241
  risk: string;
67242
+ /**
67243
+ * Whether this statement writes the store: `never`, `always`, or `depends`
67244
+ * when only the authored arguments can decide.
67245
+ *
67246
+ * @remarks
67247
+ * {@link category} cannot answer this. `CHAIN` and `RELEASE RESIDUATIONS` are
67248
+ * `Control` and both write; `MATCH` is `Read` and writes whenever it carries
67249
+ * an inline clause. Read this field instead of keeping a table of which
67250
+ * process-control statements write.
67251
+ *
67252
+ * `depends` is resolved by {@link OsfqlClient.preview}, whose per-statement
67253
+ * `mutates` is a concrete boolean. Copied verbatim, like {@link risk}.
67254
+ */
67255
+ mutates: string;
65273
67256
  /** How far the engine executes this statement. */
65274
67257
  execution: OsfqlCatalogExecution;
65275
67258
  /** UI role — display and/or action. */
@@ -65285,20 +67268,269 @@ interface OsfqlCatalogEntry {
65285
67268
  /** Known gotchas and engine caveats for this statement. */
65286
67269
  pitfalls: string[];
65287
67270
  }
67271
+ /**
67272
+ * One sort's share of an affected-row set.
67273
+ *
67274
+ * @remarks
67275
+ * Produced only for a statement whose reach is the whole tenant — `CLEAR FACTS`
67276
+ * — where ten sample rows say almost nothing and the shape of what is about to
67277
+ * go is the useful answer.
67278
+ *
67279
+ * @example
67280
+ * ```typescript
67281
+ * const share: OsfqlPreviewSortCount = { sort: 'customer', count: 3 };
67282
+ * ```
67283
+ */
67284
+ interface OsfqlPreviewSortCount {
67285
+ /** The sort's name, or its id when the tenant's lattice cannot name it. */
67286
+ sort: string;
67287
+ /** How many of the affected rows are of this sort. */
67288
+ count: number;
67289
+ }
67290
+ /**
67291
+ * The rows a destructive statement would affect.
67292
+ *
67293
+ * @remarks
67294
+ * The engine counts them by deriving a read-only `MATCH` from the destructive
67295
+ * statement's own pattern and running it against a CLONE of the tenant. Nothing
67296
+ * runs against the live store.
67297
+ *
67298
+ * {@link exact} says whether {@link count} is the number of rows that would go,
67299
+ * or an upper bound. Measured 2026-09-19: for
67300
+ * `MATCH customer(name: ?N, spend: ?S); IF ?S > 60 THEN RETRACT customer(name: ?N);`
67301
+ * over three customers of which one has `spend > 60`, the nested `RETRACT`
67302
+ * answers `{count: 3, exact: false}` — the one-statement probe cannot carry the
67303
+ * `IF` condition, because `?S` is bound by an earlier statement and folding the
67304
+ * guard in would raise an unbound-variable error and lose the count entirely.
67305
+ * So the engine states the superset and marks it. `RETRACT customer(spend: 100)`
67306
+ * at the top level answers `{count: 1, exact: true}`.
67307
+ *
67308
+ * Read `exact` rather than guessing from nesting: a nested statement whose
67309
+ * enclosing conditions name only its own variables is exact too.
67310
+ *
67311
+ * @example
67312
+ * ```typescript
67313
+ * const affected: OsfqlPreviewAffected = {
67314
+ * count: 2,
67315
+ * sampleRows: [{ term_id: { type: 'term_ref', value: '…' }, tier: { type: 'string', value: 'gold' } }],
67316
+ * };
67317
+ * ```
67318
+ */
67319
+ interface OsfqlPreviewAffected {
67320
+ /**
67321
+ * How many rows the statement would affect.
67322
+ *
67323
+ * @remarks
67324
+ * `0` means zero rows, and it is answered whenever the rows were counted —
67325
+ * measured, both `RETRACT customer(name: "nobody")` against a populated sort
67326
+ * and `RETRACT event(at: ?T)` against an empty one answer
67327
+ * `{count: 0, exact: true}`. It is the absence of the whole
67328
+ * {@link OsfqlPreviewStatement.affected} block that means the statement has
67329
+ * no affected-row set at all.
67330
+ *
67331
+ * Exact unless {@link exact} says otherwise.
67332
+ */
67333
+ count: number;
67334
+ /**
67335
+ * Whether {@link count} is exact, or an upper bound.
67336
+ *
67337
+ * @remarks
67338
+ * `false` for a statement nested under a condition the engine's
67339
+ * one-statement probe cannot carry, where the probe selects a SUPERSET of
67340
+ * what would go — render it as "up to N rows". `true` for every top-level
67341
+ * statement, and for a nested statement whose enclosing conditions name only
67342
+ * its own variables.
67343
+ *
67344
+ * Absent from an older engine, where every count was effectively an upper
67345
+ * bound for a nested statement and exact otherwise.
67346
+ */
67347
+ exact?: boolean;
67348
+ /**
67349
+ * Up to 10 sample rows, one map per matched row.
67350
+ *
67351
+ * @remarks
67352
+ * Each row IDENTIFIES the row it stands for: a `term_id` column, the features
67353
+ * the statement's own pattern projected, and the declaring sort's `@key`
67354
+ * features. The keys are DATA — OSF feature names — so they are left
67355
+ * verbatim, never camelCased.
67356
+ *
67357
+ * Absent for a whole-tenant statement, which answers with {@link bySort}
67358
+ * instead.
67359
+ */
67360
+ sampleRows?: Record<string, OsfqlValue>[];
67361
+ /**
67362
+ * How the affected rows fall across sorts, most rows first.
67363
+ *
67364
+ * @remarks
67365
+ * Present for a whole-tenant statement (`CLEAR FACTS`). Absent for a targeted
67366
+ * `RETRACT`, whose sort is already in {@link OsfqlPreviewStatement.sorts}.
67367
+ */
67368
+ bySort?: OsfqlPreviewSortCount[];
67369
+ }
67370
+ /**
67371
+ * Why a previewed program cannot run as one atomic unit, answered without
67372
+ * running it.
67373
+ *
67374
+ * @remarks
67375
+ * The same verdict `POST /api/v1/osfql` would refuse the program with. Reported
67376
+ * only when the previewed request is atomic (the engine's default).
67377
+ *
67378
+ * @example
67379
+ * ```typescript
67380
+ * const refusal: OsfqlAtomicRefusal = {
67381
+ * code: 'drop_sort_in_atomic_program',
67382
+ * message: 'DROP SORT cannot take part in an atomic program: …',
67383
+ * };
67384
+ * ```
67385
+ */
67386
+ interface OsfqlAtomicRefusal {
67387
+ /** Machine-readable cause, e.g. `drop_sort_in_atomic_program`. */
67388
+ code: string;
67389
+ /** Human-readable explanation, identical to the run-time refusal. */
67390
+ message: string;
67391
+ }
67392
+ /**
67393
+ * One statement of a previewed OSFQL program.
67394
+ *
67395
+ * @remarks
67396
+ * The shape is **recursive**: {@link nested} carries the branches of an `IF`
67397
+ * and the continuations of a `WITH`. {@link index} is a single counter over the
67398
+ * whole program, not a position among siblings — an `IF` at index 1 whose two
67399
+ * branches are previewed carries nested entries at index 2 and 3.
67400
+ *
67401
+ * Read {@link mutates}, not {@link risk}, to decide whether a statement writes.
67402
+ * The two disagree by design, and both directions were measured:
67403
+ * `MATCH customer(name: ?N) INSERT vip(name: ?N)` is `risk: "read"` with
67404
+ * `mutates: true`; `MARK ?m1`, `CUT` and `SPACE CREATE ?S` are
67405
+ * `risk: "process_control"` with `mutates: false`, while `CHAIN` and
67406
+ * `RELEASE RESIDUATIONS` share that same tier and report `mutates: true`.
67407
+ *
67408
+ * @example
67409
+ * ```typescript
67410
+ * const statement: OsfqlPreviewStatement = {
67411
+ * index: 0,
67412
+ * id: 'retract',
67413
+ * statement: 'Retract',
67414
+ * risk: 'targeted_destructive',
67415
+ * mutates: true,
67416
+ * sorts: ['customer'],
67417
+ * source: 'RETRACT customer(tier: "gold")',
67418
+ * affected: { count: 2 },
67419
+ * };
67420
+ * ```
67421
+ */
67422
+ interface OsfqlPreviewStatement {
67423
+ /** Position in a single counter over the whole program, nested entries included. */
67424
+ index: number;
67425
+ /** Catalog id of the statement, e.g. `match`, `retract`, `clear_facts`. */
67426
+ id: string;
67427
+ /** Exact AST variant name, e.g. `Match`, `Retract`, `Clear`. */
67428
+ statement: string;
67429
+ /**
67430
+ * Safety tier the engine assigned this entry — a coarse pre-filter.
67431
+ *
67432
+ * @remarks
67433
+ * This is the real {@link RiskTier} union, because the preview route's own
67434
+ * schema publishes the enum. {@link OsfqlCatalogEntry.risk} beside it is a
67435
+ * plain `string` on purpose: the catalog's documented contract is that its
67436
+ * enum values are copied verbatim out of a DEBUG/introspection endpoint whose
67437
+ * fields mix casing, so narrowing it would make the SDK reject a value the
67438
+ * engine is free to add there. Do not "fix" either one to match the other.
67439
+ *
67440
+ * An entry with mixed sub-operations carries its most-dangerous dominant
67441
+ * tier, and the security boundary re-derives the real tier per authored
67442
+ * statement at execution — so this is a hint for the UI, never the gate.
67443
+ */
67444
+ risk: RiskTier;
67445
+ /** Whether THIS statement writes the store. The verdict a write gate reads. */
67446
+ mutates: boolean;
67447
+ /** The sort names the statement names. Empty for a statement that names none. */
67448
+ sorts: string[];
67449
+ /** The exact source text of the statement, without its terminating `;`. */
67450
+ source: string;
67451
+ /**
67452
+ * The rows the statement would affect.
67453
+ *
67454
+ * @remarks
67455
+ * Absent means the statement HAS no affected-row set — a read, or an additive
67456
+ * write, which adds rows rather than reaching existing ones. Measured
67457
+ * 2026-09-19: a `MATCH` and an `INSERT` carry no `affected` block, while a
67458
+ * destructive statement always carries one, `count: 0` included. So absence
67459
+ * is a statement about the KIND of statement, and the count is a statement
67460
+ * about the rows.
67461
+ *
67462
+ * This was ambiguous until the engine separated the two cases: a zero-row
67463
+ * `RETRACT` used to omit the block, so a confirm dialog could not tell "we
67464
+ * did not look" from "nothing will go". It can now.
67465
+ */
67466
+ affected?: OsfqlPreviewAffected;
67467
+ /**
67468
+ * The statements nested inside this one — the `THEN` and `ELSE` branches of
67469
+ * an `IF`, the continuations of a `WITH`. Absent when there are none.
67470
+ */
67471
+ nested?: OsfqlPreviewStatement[];
67472
+ }
67473
+ /**
67474
+ * Response from previewing an OSFQL program: what each statement would do,
67475
+ * decided without running anything.
67476
+ *
67477
+ * @remarks
67478
+ * Always HTTP 200 for a program that parses, including the empty program, which
67479
+ * answers `{ mutates: false, statements: [] }`. A program that does not parse is
67480
+ * HTTP 400 with an `OsfqlErrorResponse` body, surfaced as an `ApiError`.
67481
+ *
67482
+ * @example
67483
+ * ```typescript
67484
+ * const preview = await client.osfql.preview('RETRACT customer(tier: "gold");');
67485
+ * if (preview.mutates) {
67486
+ * const destructive = preview.statements.filter((s) => s.mutates);
67487
+ * console.log(destructive[0].affected?.count); // 2
67488
+ * }
67489
+ * ```
67490
+ */
67491
+ interface OsfqlPreviewResponse {
67492
+ /**
67493
+ * Whether ANY statement of the program mutates the store.
67494
+ *
67495
+ * @remarks
67496
+ * It folds every nested statement. Verified against the dev engine on
67497
+ * 2026-09-18: `MATCH customer(name: ?N, spend: ?S); IF ?S > 60 THEN RETRACT
67498
+ * customer(name: ?N);` answers `true`, and so does an `IF` whose only writing
67499
+ * branch is the `ELSE`. It also folds an inline-write `MATCH`, which a
67500
+ * first-statement classification would read as safe.
67501
+ */
67502
+ mutates: boolean;
67503
+ /** One entry per top-level statement, in document order. */
67504
+ statements: OsfqlPreviewStatement[];
67505
+ /**
67506
+ * Why the program cannot run as one atomic unit, when it cannot and the
67507
+ * previewed request is atomic (the default).
67508
+ *
67509
+ * @remarks
67510
+ * Absent — or `null` — otherwise. Previewing the same program with
67511
+ * `atomic: false` drops the field, because the refusal no longer applies.
67512
+ */
67513
+ atomicRefusal?: OsfqlAtomicRefusal | null;
67514
+ }
65288
67515
 
67516
+ type osfql_OsfqlAtomicRefusal = OsfqlAtomicRefusal;
65289
67517
  type osfql_OsfqlCatalogEntry = OsfqlCatalogEntry;
65290
67518
  type osfql_OsfqlCatalogExecution = OsfqlCatalogExecution;
65291
67519
  type osfql_OsfqlCatalogUiAffinity = OsfqlCatalogUiAffinity;
65292
67520
  type osfql_OsfqlDiagnoseRequest = OsfqlDiagnoseRequest;
65293
67521
  type osfql_OsfqlDiagnoseResponse = OsfqlDiagnoseResponse;
65294
67522
  type osfql_OsfqlDiagnostic = OsfqlDiagnostic;
67523
+ type osfql_OsfqlPreviewAffected = OsfqlPreviewAffected;
67524
+ type osfql_OsfqlPreviewResponse = OsfqlPreviewResponse;
67525
+ type osfql_OsfqlPreviewSortCount = OsfqlPreviewSortCount;
67526
+ type osfql_OsfqlPreviewStatement = OsfqlPreviewStatement;
65295
67527
  type osfql_OsfqlRange = OsfqlRange;
65296
67528
  type osfql_OsfqlRequest = OsfqlRequest;
65297
67529
  type osfql_OsfqlResponse = OsfqlResponse;
65298
67530
  type osfql_OsfqlTermValue = OsfqlTermValue;
65299
67531
  type osfql_OsfqlValue = OsfqlValue;
65300
67532
  declare namespace osfql {
65301
- export type { osfql_OsfqlCatalogEntry as OsfqlCatalogEntry, osfql_OsfqlCatalogExecution as OsfqlCatalogExecution, osfql_OsfqlCatalogUiAffinity as OsfqlCatalogUiAffinity, osfql_OsfqlDiagnoseRequest as OsfqlDiagnoseRequest, osfql_OsfqlDiagnoseResponse as OsfqlDiagnoseResponse, osfql_OsfqlDiagnostic as OsfqlDiagnostic, osfql_OsfqlRange as OsfqlRange, osfql_OsfqlRequest as OsfqlRequest, osfql_OsfqlResponse as OsfqlResponse, osfql_OsfqlTermValue as OsfqlTermValue, osfql_OsfqlValue as OsfqlValue };
67533
+ export type { osfql_OsfqlAtomicRefusal as OsfqlAtomicRefusal, osfql_OsfqlCatalogEntry as OsfqlCatalogEntry, osfql_OsfqlCatalogExecution as OsfqlCatalogExecution, osfql_OsfqlCatalogUiAffinity as OsfqlCatalogUiAffinity, osfql_OsfqlDiagnoseRequest as OsfqlDiagnoseRequest, osfql_OsfqlDiagnoseResponse as OsfqlDiagnoseResponse, osfql_OsfqlDiagnostic as OsfqlDiagnostic, osfql_OsfqlPreviewAffected as OsfqlPreviewAffected, osfql_OsfqlPreviewResponse as OsfqlPreviewResponse, osfql_OsfqlPreviewSortCount as OsfqlPreviewSortCount, osfql_OsfqlPreviewStatement as OsfqlPreviewStatement, osfql_OsfqlRange as OsfqlRange, osfql_OsfqlRequest as OsfqlRequest, osfql_OsfqlResponse as OsfqlResponse, osfql_OsfqlTermValue as OsfqlTermValue, osfql_OsfqlValue as OsfqlValue };
65302
67534
  }
65303
67535
 
65304
67536
  /**
@@ -65308,7 +67540,9 @@ declare namespace osfql {
65308
67540
  * Provides access to the OSFQL execution endpoint, which parses, compiles,
65309
67541
  * and executes OSFQL programs against the tenant-isolated knowledge base;
65310
67542
  * an ephemeral {@link OsfqlClient.diagnose} pass that reports contradictions without
65311
- * writing anything; and the {@link OsfqlClient.catalog} statement introspection endpoint.
67543
+ * writing anything; a {@link OsfqlClient.preview} pass that says what each statement
67544
+ * WOULD do, including the rows a destructive one would touch; and the
67545
+ * {@link OsfqlClient.catalog} statement introspection endpoint.
65312
67546
  *
65313
67547
  * Supported statement types include MATCH, INSERT, RETRACT, DERIVE, UNIFY,
65314
67548
  * DEFINE, AWAIT, COUNTERFACTUAL, and CAUSES.
@@ -65375,6 +67609,95 @@ declare class OsfqlClient {
65375
67609
  * ```
65376
67610
  */
65377
67611
  execute(query: string, options?: Omit<OsfqlRequest, 'query'>, requestOptions?: RequestOptions): Promise<OsfqlResponse>;
67612
+ /**
67613
+ * Preview an OSFQL program: what each statement would do, decided without
67614
+ * running anything.
67615
+ *
67616
+ * @param query - The OSFQL program text (one or more statements separated by `;`).
67617
+ * @param options - Optional request options. Only `atomic` changes the answer:
67618
+ * it decides whether `atomicRefusal` is reported. `reactive`, `maxRows` and
67619
+ * `timeoutMs` are accepted for wire parity with {@link execute} and are
67620
+ * ignored by the route.
67621
+ * @param requestOptions - Per-call transport options (timeout, signal, headers).
67622
+ * @returns The per-statement classification, the affected-row reports, and the
67623
+ * atomic refusal when there is one.
67624
+ * @throws {ApiError} If the program does not parse (HTTP 400, `OsfqlErrorResponse`),
67625
+ * or the request otherwise fails.
67626
+ * @throws {ReasoningLayerError} If a sample row carries a value that does not satisfy
67627
+ * the published {@link OsfqlValue} contract.
67628
+ *
67629
+ * @remarks
67630
+ * **Why call this instead of classifying the program client-side.** Three
67631
+ * answers only the engine's own parse can give:
67632
+ *
67633
+ * 1. **Per-statement `mutates`.** A client keeps no table of which
67634
+ * process-control statements write. Measured on the dev engine: `CHAIN` and
67635
+ * `RELEASE RESIDUATIONS` report `mutates: true`, while `MARK ?m1`, `CUT` and
67636
+ * `SPACE CREATE ?S` report `false` — all five are `risk: "process_control"`.
67637
+ * In the other direction, `MATCH customer(name: ?N) INSERT vip(name: ?N)`
67638
+ * is `risk: "read"` with `mutates: true`. Read `mutates`, never `risk`.
67639
+ * 2. **`affected.count` and `affected.sampleRows`.** Up to 10 rows, each
67640
+ * identifying itself with a `term_id` column and the declaring sort's
67641
+ * `@key` features, so a confirm dialog can say WHICH rows go, not just how
67642
+ * many. Counted by running a derived read-only `MATCH` against a clone of
67643
+ * the tenant. Verified: four destructive previews (`RETRACT`, `CLEAR FACTS`,
67644
+ * `DROP SORT`, `DEFINE`) left the tenant's fact count and its lattice
67645
+ * unchanged.
67646
+ * 3. **`atomicRefusal`.** The same `drop_sort_in_atomic_program` verdict
67647
+ * `POST /api/v1/osfql` would refuse the program with, answered before the
67648
+ * program runs.
67649
+ *
67650
+ * ⚠️ **The one thing a caller must NOT do: treat `affected.count` as the
67651
+ * number of rows the run will remove.** It is the reach of the statement's
67652
+ * PATTERN. For `MATCH customer(name: ?N, spend: ?S); IF ?S > 60 THEN RETRACT
67653
+ * customer(name: ?N);` over three customers of which one has `spend > 60`, the
67654
+ * nested `RETRACT` answers `count: 3` — the derived `MATCH customer(name: ?N)`
67655
+ * applies neither the `IF` condition nor the binding the earlier statement
67656
+ * gives `?N`. Present it as "up to N rows" for a nested statement or one that
67657
+ * reads a variable from an earlier statement.
67658
+ *
67659
+ * Two further measured facts. The top-level `mutates` DOES fold nested
67660
+ * statements now: the `IF` program above answers `true`, and so does an `IF`
67661
+ * whose only writing branch is the `ELSE` — the earlier defect where an `IF`
67662
+ * with a writing branch answered `false` is fixed. And `affected` being absent
67663
+ * is ambiguous: `RETRACT customer(tier: "bronze")` matching zero rows omits
67664
+ * the field entirely rather than answering `count: 0`, exactly as a read does.
67665
+ *
67666
+ * `statement.index` is a single counter over the whole program: an `IF` at
67667
+ * index 1 carries nested entries at index 2 and 3.
67668
+ *
67669
+ * Request serialization matches {@link execute} — `query` plus the optional
67670
+ * `atomic` / `reactive` / `max_rows` / `timeout_ms` keys. The program TEXT is
67671
+ * a string value, so the request bridge's snake_case pass does not touch it;
67672
+ * a `camelCase` feature name inside the query survives verbatim. Sample-row
67673
+ * KEYS are data and are not camelCased on the way back.
67674
+ *
67675
+ * @example
67676
+ * ```typescript
67677
+ * const preview = await client.osfql.preview(
67678
+ * 'MATCH customer(name: ?N); RETRACT customer(tier: "gold");'
67679
+ * );
67680
+ *
67681
+ * console.log(preview.mutates); // true
67682
+ * const writes = preview.statements.filter((s) => s.mutates);
67683
+ * console.log(writes[0].id); // "retract"
67684
+ * console.log(writes[0].risk); // "targeted_destructive"
67685
+ * console.log(writes[0].affected?.count); // 2
67686
+ * console.log(writes[0].affected?.sampleRows); // [{ term_id: …, tier: … }, …]
67687
+ *
67688
+ * // A DROP SORT cannot share an atomic program
67689
+ * const refused = await client.osfql.preview('DROP SORT widget; INSERT widget(label: "x");');
67690
+ * console.log(refused.atomicRefusal?.code); // "drop_sort_in_atomic_program"
67691
+ *
67692
+ * // Ask the same question without the atomic constraint
67693
+ * const loose = await client.osfql.preview(
67694
+ * 'DROP SORT widget; INSERT widget(label: "x");',
67695
+ * { atomic: false },
67696
+ * );
67697
+ * console.log(loose.atomicRefusal); // undefined
67698
+ * ```
67699
+ */
67700
+ preview(query: string, options?: Omit<OsfqlRequest, 'query'>, requestOptions?: RequestOptions): Promise<OsfqlPreviewResponse>;
65378
67701
  /**
65379
67702
  * Diagnose an OSFQL program for contradictions and inconsistencies.
65380
67703
  *
@@ -65736,7 +68059,7 @@ interface ReasoningTraceDto {
65736
68059
  /**
65737
68060
  * UI customization detected from a conversation response.
65738
68061
  */
65739
- interface UICustomizationDto$1 {
68062
+ interface UICustomizationDto {
65740
68063
  /** Type of customization. */
65741
68064
  customizationType: string;
65742
68065
  /** JSONPath-style target for modifications. */
@@ -65789,7 +68112,7 @@ interface ConversationMessageResponse {
65789
68112
  /** Proof tree for this response (populated when PROVE / backward chaining was used). */
65790
68113
  proofTrace?: ProofTraceNodeDto | null;
65791
68114
  /** UI customizations detected in this response (for multi-turn UI evolution). */
65792
- uiCustomizations?: UICustomizationDto$1[] | null;
68115
+ uiCustomizations?: UICustomizationDto[] | null;
65793
68116
  /**
65794
68117
  * Cognitive strategy used for this response (when RL training is active and a
65795
68118
  * cognitive agent exists for the tenant). Absent on plain conversation turns.
@@ -65993,8 +68316,9 @@ type conversation_ResolvedCoreferenceDto = ResolvedCoreferenceDto;
65993
68316
  type conversation_SchemaExcerptDto = SchemaExcerptDto;
65994
68317
  type conversation_SessionGraphDto = SessionGraphDto;
65995
68318
  type conversation_TurnDto = TurnDto;
68319
+ type conversation_UICustomizationDto = UICustomizationDto;
65996
68320
  declare namespace conversation {
65997
- export type { conversation_CitationCheckDto as CitationCheckDto, conversation_ClaimAnnotationDto as ClaimAnnotationDto, conversation_CognitiveStrategyDto as CognitiveStrategyDto, conversation_CompareModelDto as CompareModelDto, conversation_ConversationMessageRequest as ConversationMessageRequest, conversation_ConversationMessageResponse as ConversationMessageResponse, conversation_ConversationSummaryDto as ConversationSummaryDto, conversation_ConversationTurnsResponse as ConversationTurnsResponse, conversation_DerivationSummaryDto as DerivationSummaryDto, conversation_FocusEntryDto as FocusEntryDto, conversation_ListConversationsResponse as ListConversationsResponse, conversation_MatchedEntityDto as MatchedEntityDto, conversation_ProofTraceNodeDto as ProofTraceNodeDto, conversation_ReasoningStageDto as ReasoningStageDto, conversation_ReasoningTraceDto as ReasoningTraceDto, conversation_RecordTurnRequest as RecordTurnRequest, conversation_RecordTurnResponse as RecordTurnResponse, conversation_ResolvedCoreferenceDto as ResolvedCoreferenceDto, conversation_SchemaExcerptDto as SchemaExcerptDto, conversation_SessionGraphDto as SessionGraphDto, SourceExcerptDto$1 as SourceExcerptDto, conversation_TurnDto as TurnDto, UICustomizationDto$1 as UICustomizationDto };
68321
+ export type { conversation_CitationCheckDto as CitationCheckDto, conversation_ClaimAnnotationDto as ClaimAnnotationDto, conversation_CognitiveStrategyDto as CognitiveStrategyDto, conversation_CompareModelDto as CompareModelDto, conversation_ConversationMessageRequest as ConversationMessageRequest, conversation_ConversationMessageResponse as ConversationMessageResponse, conversation_ConversationSummaryDto as ConversationSummaryDto, conversation_ConversationTurnsResponse as ConversationTurnsResponse, conversation_DerivationSummaryDto as DerivationSummaryDto, conversation_FocusEntryDto as FocusEntryDto, conversation_ListConversationsResponse as ListConversationsResponse, conversation_MatchedEntityDto as MatchedEntityDto, conversation_ProofTraceNodeDto as ProofTraceNodeDto, conversation_ReasoningStageDto as ReasoningStageDto, conversation_ReasoningTraceDto as ReasoningTraceDto, conversation_RecordTurnRequest as RecordTurnRequest, conversation_RecordTurnResponse as RecordTurnResponse, conversation_ResolvedCoreferenceDto as ResolvedCoreferenceDto, conversation_SchemaExcerptDto as SchemaExcerptDto, conversation_SessionGraphDto as SessionGraphDto, SourceExcerptDto$1 as SourceExcerptDto, conversation_TurnDto as TurnDto, conversation_UICustomizationDto as UICustomizationDto };
65998
68322
  }
65999
68323
 
66000
68324
  /**
@@ -67778,366 +70102,6 @@ declare class Ui<SecurityDataType = unknown> {
67778
70102
  uiCatalog: (params?: RequestParams) => Promise<HttpResponse<UICatalogResponse$1, any>>;
67779
70103
  }
67780
70104
 
67781
- /**
67782
- * Types for the UI resource (sort-driven UI descriptors).
67783
- *
67784
- * @module
67785
- */
67786
-
67787
- /** Layout mode for the UI surface. Re-exported from generated types (no camelCase diff). */
67788
- type LayoutModeDto = LayoutModeDto$1;
67789
- /**
67790
- * One accumulated UI customization from a multi-turn conversation.
67791
- *
67792
- * Re-exported from the generated types: the wire shape is already snake_case
67793
- * throughout (`customization_type`, `props_override`), so there is no camelCase
67794
- * counterpart to hand-write. Typed as `unknown[]` until the backend described
67795
- * this surface, which is why nothing checked what a caller put here.
67796
- */
67797
- type UICustomizationDto = UICustomizationDto$2;
67798
- /**
67799
- * Safety tier the server assigns to an OSFQL statement carried by a UI action.
67800
- *
67801
- * @remarks
67802
- * Wire values are `snake_case` (`"targeted_destructive"`, `"additive_write"`, …) —
67803
- * re-exported from the generated types since there is no camelCase diff.
67804
- *
67805
- * The tier on a descriptor action is a coarse pre-filter: the server re-derives the
67806
- * real tier per authored statement at execution time. Destructive tiers
67807
- * (`targeted_destructive`, `bulk_destructive`) are refused unless the
67808
- * {@link UIActionRequest.confirm} flag is set.
67809
- *
67810
- * @example
67811
- * ```typescript
67812
- * const tier: RiskTier = 'targeted_destructive';
67813
- * ```
67814
- */
67815
- type RiskTier = RiskTier$1;
67816
- /** Layout slot definition. */
67817
- interface LayoutSlotDto {
67818
- id: string;
67819
- label: string;
67820
- }
67821
- /** Layout surface configuration. */
67822
- interface LayoutSurfaceDto {
67823
- id: string;
67824
- layoutMode: LayoutModeDto;
67825
- slots: LayoutSlotDto[];
67826
- }
67827
- /** Validation type (discriminated union). Re-exported from generated types. */
67828
- type ValidationTypeDto = {
67829
- type: 'required';
67830
- } | {
67831
- type: 'min';
67832
- params: number;
67833
- } | {
67834
- type: 'max';
67835
- params: number;
67836
- } | {
67837
- type: 'pattern';
67838
- params: string;
67839
- } | {
67840
- type: 'one_of';
67841
- params: string[];
67842
- } | {
67843
- type: 'value_type';
67844
- params: string;
67845
- } | {
67846
- type: 'date_after';
67847
- params: string;
67848
- } | {
67849
- type: 'date_before';
67850
- params: string;
67851
- };
67852
- /** Validation rule for a UI component. */
67853
- interface ValidationRuleDto {
67854
- field: string;
67855
- message: string;
67856
- ruleType: ValidationTypeDto;
67857
- }
67858
- /**
67859
- * UI action discriminated union.
67860
- *
67861
- * @remarks
67862
- * Every variant carries a {@link RiskTier} (`riskTier`) and an optional catalog
67863
- * `statementId` — the server derives both from the action kind and echoes them on
67864
- * the descriptor. `run_osfql` is the catalog-authored variant: its `statementId` is
67865
- * required because it names the catalog statement whose OSFQL template the action runs.
67866
- */
67867
- type UIActionDto = {
67868
- type: 'submit_form';
67869
- sortName: string;
67870
- osfqlTemplate: string;
67871
- fieldTypes: Record<string, string>;
67872
- riskTier: RiskTier;
67873
- statementId?: string | null;
67874
- } | {
67875
- type: 'load_data';
67876
- osfqlQuery: string;
67877
- riskTier: RiskTier;
67878
- statementId?: string | null;
67879
- } | {
67880
- type: 'update_form';
67881
- sortName: string;
67882
- osfqlTemplate: string;
67883
- fieldTypes: Record<string, string>;
67884
- riskTier: RiskTier;
67885
- statementId?: string | null;
67886
- } | {
67887
- type: 'delete_record';
67888
- sortName: string;
67889
- /** OSFQL template with `{field}` placeholders — present for feature-based deletes. */
67890
- osfqlTemplate?: string | null;
67891
- riskTier: RiskTier;
67892
- statementId?: string | null;
67893
- } | {
67894
- type: 'trigger_inference';
67895
- osfqlDerive: string;
67896
- riskTier: RiskTier;
67897
- statementId?: string | null;
67898
- } | {
67899
- type: 'navigate';
67900
- sortId: string;
67901
- viewMode: string;
67902
- termId?: string | null;
67903
- riskTier: RiskTier;
67904
- statementId?: string | null;
67905
- } | {
67906
- type: 'refresh';
67907
- riskTier: RiskTier;
67908
- statementId?: string | null;
67909
- } | {
67910
- type: 'run_osfql';
67911
- /** Catalog statement id whose OSFQL template this action runs. */
67912
- statementId: string;
67913
- /** Human-readable label for the catalog statement. */
67914
- title: string;
67915
- osfqlTemplate: string;
67916
- fieldTypes: Record<string, string>;
67917
- riskTier: RiskTier;
67918
- };
67919
- /** UI descriptor tree node (recursive). */
67920
- interface UIDescriptorDto {
67921
- actions?: UIActionDto[];
67922
- bindingPath?: string;
67923
- children?: UIDescriptorDto[];
67924
- initialValues?: object;
67925
- priority: number;
67926
- props: object;
67927
- slotId?: string;
67928
- sort: string;
67929
- validationRules?: ValidationRuleDto[];
67930
- }
67931
- /** Assembly statistics for a UI describe response. */
67932
- interface UIAssemblyStatsDto {
67933
- componentCount: number;
67934
- dataRows?: number;
67935
- includedFeatures: number;
67936
- osfqlExecuted?: string | null;
67937
- sortName: string;
67938
- totalFeatures: number;
67939
- viewMode: string;
67940
- }
67941
- /** Request to describe a UI for a sort. */
67942
- interface UIDescribeRequest {
67943
- customizations?: UICustomizationDto[] | null;
67944
- loadData?: boolean;
67945
- maxComponents?: number;
67946
- maxDepth?: number;
67947
- priorityThreshold?: number;
67948
- query?: string | null;
67949
- sessionId?: string | null;
67950
- sortId: string;
67951
- termId?: string | null;
67952
- /** View mode: `"form"`, `"table"`, `"detail"`, `"card"`, `"tree"`. */
67953
- viewMode?: string;
67954
- }
67955
- /** Response from a UI describe request. */
67956
- interface UIDescribeResponse {
67957
- data?: object;
67958
- descriptor: UIDescriptorDto;
67959
- layout: LayoutSurfaceDto;
67960
- stats: UIAssemblyStatsDto;
67961
- }
67962
- /** Request to execute a UI action. */
67963
- interface UIActionRequest {
67964
- /** Action type: `"submit_form"`, `"update_form"`, `"delete_record"`, `"trigger_inference"`, `"run_osfql"`. */
67965
- actionType: string;
67966
- /**
67967
- * Explicit go-ahead for destructive tiers. The server is the boundary: a destructive
67968
- * statement without `confirm: true` is refused and nothing is mutated.
67969
- */
67970
- confirm?: boolean;
67971
- /**
67972
- * Preview only: classify and (for destructive tiers) return the affected-row preview
67973
- * WITHOUT mutating. Defaults to `false`.
67974
- */
67975
- dryRun?: boolean;
67976
- fieldTypes?: object | null;
67977
- originalValues?: object | null;
67978
- /** Raw OSFQL override — gated server-side, rejected with 400 unless explicitly enabled. */
67979
- osfql?: string | null;
67980
- /**
67981
- * OSFQL template with `{field}` placeholders the server substitutes from `values`.
67982
- * Used by `run_osfql` and by feature-based `delete_record`.
67983
- */
67984
- osfqlTemplate?: string | null;
67985
- sortName?: string | null;
67986
- /** Catalog statement id echoed from the descriptor action — audit/trace only. */
67987
- statementId?: string | null;
67988
- termId?: string | null;
67989
- values?: object | null;
67990
- }
67991
- /** Preview of the rows a destructive statement would affect (dry-run only). */
67992
- interface AffectedPreviewDto {
67993
- /** Total number of rows the statement would match. */
67994
- count: number;
67995
- /** Up to 10 sample rows. */
67996
- sampleRows?: object[];
67997
- /** The destructive statement that WOULD run. */
67998
- statement: string;
67999
- }
68000
- /** Response from executing a UI action. */
68001
- interface UIActionResponse {
68002
- /** Present on dry-run of a destructive statement: the rows it would hit. */
68003
- affectedPreview?: AffectedPreviewDto | null;
68004
- /** Read-back rows for `run_osfql` reads (goals, global gets, hierarchy, aggregates). */
68005
- bindings?: unknown[] | null;
68006
- diagnostics?: string[];
68007
- /** Echo: `true` means this was a dry-run preview and nothing was mutated. */
68008
- dryRun?: boolean;
68009
- error?: string | null;
68010
- /** Pending review id to surface/approve when {@link UIActionResponse.requiresApproval} is `true`. */
68011
- pendingReviewId?: string | null;
68012
- producedTermIds?: string[];
68013
- /**
68014
- * `true` means the action was enqueued for human approval and nothing was mutated.
68015
- * Pairs with {@link UIActionResponse.pendingReviewId}.
68016
- */
68017
- requiresApproval?: boolean;
68018
- /**
68019
- * `true` means a destructive tier was refused for lack of `confirm: true`
68020
- * (no mutation happened) — the caller should surface a confirmation flow.
68021
- */
68022
- requiresConfirmation?: boolean;
68023
- /** Server-classified risk tier of the final statement. */
68024
- riskTier?: RiskTier | null;
68025
- success: boolean;
68026
- }
68027
- /**
68028
- * Request to generate a certified UI specification from a natural-language prompt.
68029
- *
68030
- * @remarks
68031
- * The pipeline is certify-or-abstain: an LLM proposes a component tree over the
68032
- * {@link UiSort} vocabulary, the exact engine screens every component sort, data
68033
- * binding, load query and action against the tenant's live schema, and either
68034
- * certifies the spec, repairs it once, or abstains with suggestions. Rows always
68035
- * come from OSFQL execution after certification — never from the model.
68036
- *
68037
- * The tenant is taken from the authenticated principal (never a body field).
68038
- */
68039
- interface UIGenerateRequest {
68040
- /**
68041
- * Allow write actions targeting sorts absent from the live schema
68042
- * (default: `false` — a generated UI writing to nonexistent schema is a hallucination).
68043
- */
68044
- allowNewSorts?: boolean;
68045
- /**
68046
- * Iterate on an existing page: its latest version is embedded in the prompt as
68047
- * "the current interface" and {@link UIGenerateRequest.prompt} becomes the change
68048
- * instruction. The result saves as the page's next version.
68049
- */
68050
- basePage?: string | null;
68051
- /**
68052
- * Existing conversation to append this exchange to. Omit to start a new conversation.
68053
- */
68054
- conversationId?: string | null;
68055
- /**
68056
- * Frontend metadata: whether the generated app renders its write controls as live
68057
- * (interactive) vs preview-only. Passed through untouched; the backend does not branch on it.
68058
- */
68059
- interactive?: boolean | null;
68060
- /** Whether to execute the spec's load query and inline real rows (default: `true`). */
68061
- loadData?: boolean;
68062
- /** Maximum number of components (default: 120). */
68063
- maxComponents?: number;
68064
- /** Maximum nesting depth (default: 8). */
68065
- maxDepth?: number;
68066
- /**
68067
- * Which generation pipeline to run: `"classic"` (default — single-call
68068
- * certify-or-abstain) or `"catalog"` (the intent pipeline). Catalog mode only applies
68069
- * to a fresh screen: iteration on a {@link UIGenerateRequest.basePage} always runs classic.
68070
- */
68071
- pipeline?: string | null;
68072
- /** What the user wants ("a dashboard of drugs with name and dosage…"). */
68073
- prompt: string;
68074
- /** Save the certified spec as a named, versioned page. */
68075
- saveAsPage?: string | null;
68076
- /** Dev/debug: request the per-stage catalog-pipeline trace. */
68077
- trace?: boolean | null;
68078
- }
68079
- /**
68080
- * Certified prompt-to-UI generation response.
68081
- *
68082
- * @remarks
68083
- * `verdict` is `"certified"`, `"repaired"`, or `"abstained"`. On abstention the
68084
- * descriptor and layout are absent and `suggestions` carries live-schema alternatives.
68085
- */
68086
- interface UIGenerateResponse {
68087
- /** Content-addressed certificate id for the accepted spec. */
68088
- certificateId?: string;
68089
- /** Engine-loaded data payload — always produced by OSFQL execution, never by the model. */
68090
- data?: object;
68091
- /** The certified component tree. Absent when the verdict is `"abstained"`. */
68092
- descriptor?: UIDescriptorDto;
68093
- /** Screening diagnostics (what was ungrounded, what the repair changed). */
68094
- diagnostics?: unknown[];
68095
- /** The certified layout surface. Absent when the verdict is `"abstained"`. */
68096
- layout?: LayoutSurfaceDto;
68097
- /** Saved page version, when {@link UIGenerateRequest.saveAsPage} was requested. */
68098
- pageVersion?: number;
68099
- /** Live-schema suggestions returned when the proposal is refused. */
68100
- suggestions?: unknown[];
68101
- /** `certified` | `repaired` | `abstained`. */
68102
- verdict: string;
68103
- }
68104
- /** Complete hierarchy of UI component sorts. */
68105
- type UiSort = UiSort$1;
68106
- /** A single UI component in the catalog. */
68107
- interface UICatalogEntry {
68108
- category: string;
68109
- sort: UiSort;
68110
- }
68111
- /** Response for the UI catalog endpoint. */
68112
- interface UICatalogResponse {
68113
- components: UICatalogEntry[];
68114
- count: number;
68115
- }
68116
-
68117
- type ui_AffectedPreviewDto = AffectedPreviewDto;
68118
- type ui_LayoutModeDto = LayoutModeDto;
68119
- type ui_LayoutSlotDto = LayoutSlotDto;
68120
- type ui_LayoutSurfaceDto = LayoutSurfaceDto;
68121
- type ui_RiskTier = RiskTier;
68122
- type ui_UIActionDto = UIActionDto;
68123
- type ui_UIActionRequest = UIActionRequest;
68124
- type ui_UIActionResponse = UIActionResponse;
68125
- type ui_UIAssemblyStatsDto = UIAssemblyStatsDto;
68126
- type ui_UICatalogEntry = UICatalogEntry;
68127
- type ui_UICatalogResponse = UICatalogResponse;
68128
- type ui_UICustomizationDto = UICustomizationDto;
68129
- type ui_UIDescribeRequest = UIDescribeRequest;
68130
- type ui_UIDescribeResponse = UIDescribeResponse;
68131
- type ui_UIDescriptorDto = UIDescriptorDto;
68132
- type ui_UIGenerateRequest = UIGenerateRequest;
68133
- type ui_UIGenerateResponse = UIGenerateResponse;
68134
- type ui_UiSort = UiSort;
68135
- type ui_ValidationRuleDto = ValidationRuleDto;
68136
- type ui_ValidationTypeDto = ValidationTypeDto;
68137
- declare namespace ui {
68138
- export type { ui_AffectedPreviewDto as AffectedPreviewDto, ui_LayoutModeDto as LayoutModeDto, ui_LayoutSlotDto as LayoutSlotDto, ui_LayoutSurfaceDto as LayoutSurfaceDto, ui_RiskTier as RiskTier, ui_UIActionDto as UIActionDto, ui_UIActionRequest as UIActionRequest, ui_UIActionResponse as UIActionResponse, ui_UIAssemblyStatsDto as UIAssemblyStatsDto, ui_UICatalogEntry as UICatalogEntry, ui_UICatalogResponse as UICatalogResponse, ui_UICustomizationDto as UICustomizationDto, ui_UIDescribeRequest as UIDescribeRequest, ui_UIDescribeResponse as UIDescribeResponse, ui_UIDescriptorDto as UIDescriptorDto, ui_UIGenerateRequest as UIGenerateRequest, ui_UIGenerateResponse as UIGenerateResponse, ui_UiSort as UiSort, ui_ValidationRuleDto as ValidationRuleDto, ui_ValidationTypeDto as ValidationTypeDto };
68139
- }
68140
-
68141
70105
  /**
68142
70106
  * Resource client for sort-driven UI descriptor operations.
68143
70107
  *
@@ -71839,84 +73803,6 @@ declare class OntologyAlignment<SecurityDataType = unknown> {
71839
73803
  alignOntology: (data: AlignOntologyRequest$1, params?: RequestParams) => Promise<HttpResponse<AlignOntologyResponse$1, void>>;
71840
73804
  }
71841
73805
 
71842
- /**
71843
- * Request to align a domain ontology against one or more upper ontologies.
71844
- *
71845
- * @remarks
71846
- * Sent to `POST /api/v1/ontology/align`. Wire format is snake_case
71847
- * (`domain_owl`).
71848
- */
71849
- interface AlignOntologyRequest {
71850
- /** Domain ontology to align, as OWL/RDF-XML. */
71851
- domainOwl: string;
71852
- /** Upper ontologies to align against. Defaults to `["BFO"]` when empty. */
71853
- targets?: string[];
71854
- }
71855
- /**
71856
- * A confirmed SKOS correspondence from a domain class to an upper-ontology class.
71857
- */
71858
- interface AlignmentMatchDto {
71859
- /** Domain sort name. */
71860
- domainSort: string;
71861
- /** SKOS relation: `exactMatch` / `broadMatch` / `narrowMatch` / `closeMatch`. */
71862
- matchType: string;
71863
- /** Upper-ontology class CURIE (e.g. the BFO IRI's CURIE form). */
71864
- targetCurie: string;
71865
- /** Upper-ontology class label. */
71866
- targetLabel: string;
71867
- }
71868
- /**
71869
- * Two upper-ontology candidates a domain class cannot map to simultaneously
71870
- * (their lattice meet is ⊥ — e.g. disjoint BFO branches).
71871
- */
71872
- interface AlignmentConflictDto {
71873
- /** Domain sort name whose candidates conflict. */
71874
- domainSort: string;
71875
- /** The kept (higher-scored) candidate CURIE. */
71876
- targetA: string;
71877
- /** The rejected, incompatible candidate CURIE. */
71878
- targetB: string;
71879
- }
71880
- /**
71881
- * A SKOS external-ontology alignment attached to a sort.
71882
- *
71883
- * @remarks
71884
- * Populated by the upper-ontology aligner so each correspondence is a live,
71885
- * queryable property of the sort rather than a separate static export.
71886
- */
71887
- interface ExternalMatchDto {
71888
- /** SKOS mapping relation: `exactMatch` | `closeMatch` | `broadMatch` | `narrowMatch`. */
71889
- matchType: string;
71890
- /** CURIE of the aligned external concept (e.g. `obo:BFO_0000023`). */
71891
- ontologyId: string;
71892
- /** How the match was discovered: `grounding` | `manual` | `import` | `inferred`. */
71893
- source: string;
71894
- }
71895
- /**
71896
- * Response from an ontology-alignment run.
71897
- */
71898
- interface AlignOntologyResponse {
71899
- /** Surfaced ⊥-conflicts among proposed candidates. */
71900
- conflicts: AlignmentConflictDto[];
71901
- /** Number of domain sorts considered. */
71902
- domainSorts: number;
71903
- /** The MAPPING artifact as Turtle (`skos:*` + `kortexya:confidence`). */
71904
- mappingTtl: string;
71905
- /** Confirmed SKOS correspondences. */
71906
- matches: AlignmentMatchDto[];
71907
- /** Number of upper-ontology target sorts indexed. */
71908
- targetSorts: number;
71909
- }
71910
-
71911
- type ontologyAlignment_AlignOntologyRequest = AlignOntologyRequest;
71912
- type ontologyAlignment_AlignOntologyResponse = AlignOntologyResponse;
71913
- type ontologyAlignment_AlignmentConflictDto = AlignmentConflictDto;
71914
- type ontologyAlignment_AlignmentMatchDto = AlignmentMatchDto;
71915
- type ontologyAlignment_ExternalMatchDto = ExternalMatchDto;
71916
- declare namespace ontologyAlignment {
71917
- export type { ontologyAlignment_AlignOntologyRequest as AlignOntologyRequest, ontologyAlignment_AlignOntologyResponse as AlignOntologyResponse, ontologyAlignment_AlignmentConflictDto as AlignmentConflictDto, ontologyAlignment_AlignmentMatchDto as AlignmentMatchDto, ontologyAlignment_ExternalMatchDto as ExternalMatchDto };
71918
- }
71919
-
71920
73806
  /**
71921
73807
  * Resource client for ontology-alignment operations.
71922
73808
  *
@@ -82772,20 +84658,58 @@ declare class ReasoningLayerClient {
82772
84658
  */
82773
84659
  declare const Value: {
82774
84660
  /**
82775
- * Create a reference to another term by UUID.
84661
+ * Create a reference to another stored term by its UUID, or by the `@key`
84662
+ * values that name it.
82776
84663
  *
82777
- * @param id - The UUID of the referenced term.
82778
- * @returns A tagged `ReferenceValue`: `{"type": "Reference", "value": "uuid"}`.
84664
+ * @param target - The referenced term's UUID, or a {@link ReferenceDesignator}
84665
+ * naming it through the `@key` features of its sort.
84666
+ * @returns A tagged `ReferenceValue`: `{"type": "Reference", "value": "uuid"}`
84667
+ * for the id form, `{"type":"Reference","value":{"sort_name":…,"features":…}}`
84668
+ * for the designator form.
84669
+ * @throws {@link ValidationError} when the designator carries an empty
84670
+ * `sortName`, or names no feature — the engine refuses both, so the builder
84671
+ * refuses them before the round trip.
82779
84672
  *
82780
84673
  * @remarks
82781
- * Serialization format: Tagged (ValueDto). Use with term CRUD, queries, fuzzy operations.
84674
+ * **Serialization format: Tagged (`ValueDto`).** Use with term CRUD, queries
84675
+ * and fuzzy operations. The homoiconic inference endpoints take the untagged
84676
+ * format and have no designator form.
84677
+ *
84678
+ * The two forms differ in what they can be used for:
84679
+ *
84680
+ * - The **UUID form** is what a read answers, and the only form that can
84681
+ * point at a term whose sort declares no `@key`.
84682
+ * - The **designator form** is WRITE-side only. It RESOLVES to a term that
84683
+ * already exists and never mints one: measured on 2026-09-18, writing
84684
+ * a `payment` whose `invoice` feature was
84685
+ * `Value.reference({ sortName: 'invoice', features: { number: { type: 'String', value: 'INV-1' } } })`
84686
+ * stored `{"type":"Reference","value":"4641cbcb-…"}` — the id of the single
84687
+ * existing invoice — and the invoice extent still held exactly one term. A
84688
+ * designator matching nothing is refused `422 no term of sort 'invoice'
84689
+ * carries @key 'number' = "INV-NOPE"; a reference designator names an
84690
+ * existing term, it never creates one`. The same refusal arrives from
84691
+ * `POST /api/v1/terms/bulk` as a `BulkRefusedError` naming the entry index.
84692
+ *
84693
+ * The designator's `features` keys are OSF feature names — user data, not
84694
+ * schema — and survive the request bridge verbatim, so a feature declared
84695
+ * `invoiceNumber` must be spelled `invoiceNumber` here. Sending the
84696
+ * snake_cased spelling is refused: `422 feature 'invoice_number' of sort
84697
+ * 'invoice' is not a @key feature; a designator addresses a term only through
84698
+ * its @key`.
82782
84699
  *
82783
84700
  * @example
82784
84701
  * ```typescript
84702
+ * // By id:
82785
84703
  * Value.reference("550e8400-e29b-41d4-a716-446655440000")
84704
+ *
84705
+ * // By @key, when the caller has the business key and not the UUID:
84706
+ * Value.reference({
84707
+ * sortName: 'invoice',
84708
+ * features: { number: { type: 'String', value: 'INV-1' } },
84709
+ * })
82786
84710
  * ```
82787
84711
  */
82788
- readonly reference: (id: string) => ReferenceValue;
84712
+ readonly reference: (target: string | ReferenceDesignator) => ReferenceValue;
82789
84713
  /**
82790
84714
  * Create a reference to a sort by UUID.
82791
84715
  *
@@ -84006,6 +85930,114 @@ declare function psi(sort: {
84006
85930
  * ```
84007
85931
  */
84008
85932
  declare function bind<T extends PsiTermInput>(name: string, term: T): T;
85933
+ /**
85934
+ * Negate an antecedent — negation as failure over the tenant's facts.
85935
+ *
85936
+ * @param clause - The pattern that must NOT be provable, from {@link psi}.
85937
+ * @returns The `negation` carrier term to put in a rule's `antecedents`.
85938
+ * @throws {@link ValidationError} when `clause` is itself a negation carrier.
85939
+ *
85940
+ * @remarks
85941
+ * **Serialization format: untagged `TermInputDto`.** A negated antecedent is
85942
+ * not a flag — it is an inline term of the reserved meta-sort `negation` whose
85943
+ * `clause` feature carries the probed pattern:
85944
+ *
85945
+ * ```json
85946
+ * {"sort_name":"negation","features":{"clause":{"sort_name":"payment","features":{"invoice_number":{"name":"?N"}}}}}
85947
+ * ```
85948
+ *
85949
+ * That is the shape `POST /api/v1/inference/rules` accepts, measured on
85950
+ * 2026-09-18. `GET /api/v1/inference/rules/{tenant}` reads it back as a body
85951
+ * entry of `sort_name: "negation"` whose `clause` feature is the nested pattern
85952
+ * term, `display: "NOT EXISTS payment(invoice_number: ?N)"`, and gives the rule
85953
+ * the OSFQL spelling
85954
+ * `DERIVE unpaid(number: ?N) WHEN invoice(number: ?N), NOT EXISTS payment(invoice_number: ?N);`.
85955
+ *
85956
+ * **One pattern per negation.** The chainers read the carrier exactly one
85957
+ * constraint deep. A nested `not(not(x))` IS accepted by the write route and
85958
+ * renders `NOT EXISTS NOT EXISTS …`, but derives nothing — measured, a rule
85959
+ * with a doubly negated antecedent produced zero rows where single negation
85960
+ * produced one — so this builder refuses it rather than let a rule fail
85961
+ * silently.
85962
+ *
85963
+ * The negated clause binds nothing. Every head variable must also appear in a
85964
+ * POSITIVE antecedent, or the rule is refused
85965
+ * `422 rule rejected: head variable(s) ?N not bound by any antecedent`. For the
85966
+ * same reason a {@link bind} binder inside the carrier has no identity to name,
85967
+ * and the nested-term conversion drops it.
85968
+ *
85969
+ * @example
85970
+ * ```typescript
85971
+ * import { not, psi } from '@kortexya/reasoninglayer';
85972
+ *
85973
+ * // "an invoice with no payment against it"
85974
+ * await client.inference.addRule({
85975
+ * term: psi('unpaid', { number: '?N' }),
85976
+ * antecedents: [
85977
+ * psi('invoice', { number: '?N' }),
85978
+ * not(psi('payment', { invoice_number: '?N' })),
85979
+ * ],
85980
+ * });
85981
+ * ```
85982
+ */
85983
+ declare function not(clause: PsiTermInput): PsiTermInputByName;
85984
+ /**
85985
+ * The aggregation operators the engine accepts on a rule head.
85986
+ *
85987
+ * @remarks
85988
+ * Any other word is refused with
85989
+ * `422 rule rejected: the aggregator operator \`median\` is not one of sum, max, min, count, first`
85990
+ * — measured on 2026-09-18.
85991
+ */
85992
+ type RuleAggregatorOp = 'sum' | 'max' | 'min' | 'count' | 'first';
85993
+ /**
85994
+ * Declare engine-side aggregation on a rule head.
85995
+ *
85996
+ * @param spec - The group key, the operator and the feature to aggregate.
85997
+ * @param spec.groupBy - Feature names that define the aggregation group. Proofs
85998
+ * agreeing on all of them are merged into one conclusion.
85999
+ * @param spec.op - One of the five operators in {@link RuleAggregatorOp}.
86000
+ * @param spec.target - The feature whose value is aggregated inside each group.
86001
+ * @returns The descriptor to pass as `addRule`'s `aggregator`.
86002
+ * @throws {@link ValidationError} when `groupBy` is empty, when a `groupBy`
86003
+ * entry or `target` is blank, or when `target` also appears in `groupBy` —
86004
+ * a feature cannot be both the group key and the aggregated value.
86005
+ *
86006
+ * @remarks
86007
+ * **Serialization format: snake_case wire keys.** The descriptor rides on the
86008
+ * REQUEST, not on the head: `POST /api/v1/inference/rules` takes it as a
86009
+ * top-level `aggregator` and the listing lifts it back onto the rule entry as
86010
+ * `{"group_by":["customer_id"],"op":"sum","target":"amount"}`, never as a
86011
+ * feature of the head. Measured on 2026-09-18 — the returned head's `features`
86012
+ * map holds only `customer_id`, `amount` and `when`.
86013
+ *
86014
+ * An aggregating rule has NO OSFQL spelling: the same listing omits `osfql`
86015
+ * entirely for it, while the negation rule beside it carried one. A UI must
86016
+ * disable "edit as text" for such a rule rather than guess.
86017
+ *
86018
+ * Without the descriptor the rule derives one conclusion PER PROOF; with it,
86019
+ * one per group. Measured: three `order` facts (`cust-a` 10.0, `cust-a` 32.5,
86020
+ * `cust-b` 7.25) under
86021
+ * `DERIVE total_spend(customer_id: ?C, amount: ?A) WHEN order(customer_id: ?C, amount: ?A)`
86022
+ * with `aggregate({ groupBy: ['customer_id'], op: 'sum', target: 'amount' })`
86023
+ * produced exactly two rows — `cust-a` 42.5 and `cust-b` 7.25.
86024
+ *
86025
+ * @example
86026
+ * ```typescript
86027
+ * import { aggregate, psi } from '@kortexya/reasoninglayer';
86028
+ *
86029
+ * await client.inference.addRule({
86030
+ * term: psi('total_spend', { customer_id: '?C', amount: '?A' }),
86031
+ * antecedents: [psi('order', { customer_id: '?C', amount: '?A' })],
86032
+ * aggregator: aggregate({ groupBy: ['customer_id'], op: 'sum', target: 'amount' }),
86033
+ * });
86034
+ * ```
86035
+ */
86036
+ declare function aggregate(spec: {
86037
+ groupBy: string[];
86038
+ op: RuleAggregatorOp;
86039
+ target: string;
86040
+ }): RuleAggregatorDto;
84009
86041
  /**
84010
86042
  * Create a constrained variable for use in `psi()` features.
84011
86043
  *
@@ -84591,4 +86623,4 @@ declare function toUntaggedFeatures(features: PlainFeatureMap): Record<string, F
84591
86623
  */
84592
86624
  declare function toTermInputDto(input: PsiTermInput | TermInputDto): TermInputDto;
84593
86625
 
84594
- export { ANY_ROLE, type ActValueDto, type ActionParamRule, type ActionParameter, type ActionReviewReasonDto, type ActionReviewReasonFilter, type ActionReviewResponse, type ActionReviewStatusDto, type ActionReviewSummaryDto, actionReviews as ActionReviews, type ActionSideEffect, type ActionType, type ActionTypeDef, type ActionTypeListResponse, actions as Actions, type ActivationDto, type AdaptiveModifyRequest, type AdaptiveModifyResponse, type AddBeliefRequest, type AddBeliefResponse, type AddCausalRelationRequest, type AddCausalRelationResponse, type AddCognitiveRuleRequest, type AddCognitiveRuleResponse, type AddConnectorRequest, type AddConnectorResponse, type AddConstraintsRequest, type AddConstraintsResponse, type AddExportRequest, type AddFactRequest, type AddFactResponse, type AddGoalRequest, type AddGoalResponse, type AddHtnMethodRequest, type AddHtnMethodResponse, type AddImportRequest, type AddPendingReviewRequest, type AddRuleRequest, type AddRuleResponse, type AddSymbolRequest, type AddSymbolResponse, admin as Admin, type AdmissibleDto, type AffectedPreviewDto, type AgentBeliefDto, type AgentConfigDto, type AgentEvent, type AgentEventHandlers, type AgentGoalDto, type AgentRecallAsOfRequest, type AgentRecallAsOfResponse, type AgentSpec, type AgentStateDto, type AgentSubVerdictDto, type AgentSubscription, type AgentTrajectoryRequest, type AgentTrajectoryResponse, agui as Agui, type AguiContextItem, type AguiEvent, type AguiFunctionCall, type AguiMessage, type AguiRole, type AguiRunOptions, type AguiTool, type AguiToolCall, type AiGroup, type AlcConcept, type AlignOntologyRequest, type AlignOntologyResponse, type AlignmentConflictDto, type AlignmentMatchDto, type AllenRelation, analysis as Analysis, type AnalysisGroup, type AnalyzeDocumentsRequest, type AnalyzeOptions, anonymization as Anonymization, type AnonymizationMode, type AnonymizeRequest, type AnonymizeResponse, type AntiUnifyBatchRequest, type AntiUnifyBatchResponse, type AntiUnifyRequest, type AntiUnifyResponse, ApiError, type ApiResponse, type AppendAuditEntryRequest, type AppendRequest, type AppendResiduationsRequest, type AppendResiduationsResponse, type ApplyActionRequest, type ApplyActionResponse, type ApplyCurriedRequest, type ApplyCurriedResponse, type ApplySnapshotResponse, type ApproveActionRequest, type ApproveEntityRequest, type ApproveLearnedSimilarityRequest, type ApproveLearnedSimilarityResponse, type ArchitectureInfoDto, type ArithOpDto, type ArithValueDto, type ArithmeticConstraintDto, type ArithmeticExprDto, type ArithmeticOp, type ArithmeticRecursionOp, type ArtifactDto, type AscRequest, type AssembleContextRequest, type AssembleContextResponse, type AssembledConceptDto, type AssembledRelationDto, type AssemblyTokenCountsDto, type AssertRuleRequest, type AssertRuleResponse, type AssignValueDto, type Assignment, type AssignmentMechanism, type AssignmentRowDto, type AssignmentStatus, type AssumptionAuditRequest, type AssumptionAuditResponse, type AssumptionRequest, type AsyncIngestionResponse, type AteEstimateRequest, type AteEstimateResponse, type AttentionTargetDto, type AttestationDto, audit as Audit, type AuditEntryDto, type AuditPage, type AuditRecord, type AuditSortField, type AuditSortOrder, type AuditedAssumptionDto, type AugmentationTargetDto, type AuthConfig, AuthenticationError, type AuthoringClarificationQuestionDto, authz as Authz, type AuthzAction, type AuthzDryRunRequest, type AuthzDryRunResponse, type AuthzEffect, type BacktrackResponse, type BacktrackTermStoreRequest, type BacktrackTermStoreResponse, type BacktrackableAssignRequest, type BacktrackableAssignResponse, type BackwardChainRequest, type BackwardChainResponse, BadRequestError, batch as Batch, type BatchCopyRequest, type BatchOperationDto, type BatchOperationResultDto, type BatchRequest, type BatchResponse, type BatchStringCompareRequest, type BayesianEffectDto, type BayesianPredictRequest, type BayesianPredictResponse, type BeliefDto, type BellShape, type BigIntegerValue, type BinaryOperatorDto, type BindSortRequest, type BindSortResponse, type BindTermRequest, type BindTermResponse, type BindVariableRequest, type BindVariableResponse, type BindVariablesRequest, type BindVariablesResponse, type BindingDto, type BindingSummaryDto, type BindingsResponse, type BitwiseOperationType, type BitwiseRequest, type BloomFilterStats, type BoolExpr, type BooleanValue, type BoundConstraintDto, type BoundingBoxGeometry, type BroadcastMessageRequest, type BroadcastMessageResponse, type BuildInfoDto, type BulkActionReviewResponse, type BulkAddFactsRequest, type BulkAddFactsResponse, type BulkAddRulesRequest, type BulkAddRulesResponse, type BulkAddTermsRequest, type BulkAddTermsResponse, type BulkApproveActionsRequest, type BulkApproveRequest, type BulkBindError, type BulkBindSortsRequest, type BulkBindSortsResponse, type BulkCreateSortsRequest, type BulkCreateSortsResponse, type BulkFuzzyProveRequest, type BulkFuzzyProveResponse, type BulkMergeRequest, type BulkRejectActionsRequest, type BulkRejectRequest, type BulkRetractTermsRequest, type BulkRetractTermsResponse, type BulkSetSimilaritiesRequest, type BulkSetSimilaritiesResponse, type BulkSortDefinition, type BulkSortError, type BulkSortErrorKind, type BySortQueryRequest, cdl as CDL, type CalibrateRequest, type CalibrationReportDto, type CalibrationSample, type CallOnceRequest, type CallOnceResponse, type CandidateMatchDto, type CaptureSnapshotRequest, type CascadeOptions, type CatalogPage, type CategoryProbabilityDto, type CauchyShape, causal as Causal, type CausalActionSpecDto, type CausalAnalyzeAssumptionsDto, type CausalAnalyzeDataDto, type CausalAnalyzeIndependenceTestDto, type CausalAnalyzePolicyDto, type CausalAnalyzeQuestionDto, type CausalAnalyzeQuestionKind, type CausalAnalyzeRegressionDto, type CausalAnalyzeRequest, type CausalAncestorRequest, type CausalAncestorResponse, type CausalAssumptionDto, type CausalChainDto, type CausalDecisionSpecDto, type CausalDerivationStepDto, type CausalEdgeDto, type CausalHedgeDto, type CausalProofTreeDto, type CausalRelationshipDto$1 as CausalRelationshipDto, type CausationProbabilitiesRequest, type CausationProbabilitiesResponse, type CausesRequest, type CausesResponse, type CdlComponentStatus, type CdlStatusResponse, type CdlVerificationDto, type CeilingDto, type CentralityRequest, type CentralityResponse, type CertificateDetail, type CertificateDto, type CertifiedForecast, chase as Chase, type ChaseArgDto, type ChaseAtomDto, type ChaseRunRequest, type ChaseRunResponse, type ChaseStepKindDto, type CheckDiversityRequest, type CheckDiversityResponse, type CheckDocumentRequest, type CheckDocumentResponse, type CheckFinding, type CheckSummary, type ChoicePoint, type ChoicePointDto, type ChoicePointMarkerResponse, type ChoiceSelection, type ChoiceValue, type ChrRequest, type ChunkFailureDto, type CircleGeometry, type CitationCheckDto, type CitationMarkerDto, type ClaimAnnotationDto, type ClaimAssessment, type ClaimCitation, type ClaimSubtype, type ClaimVerdict, type ClarificationQuestionDto, type Classification, type ClassificationLevelDto, type ClassifyEdgesInput, type ClassifyEdgesVars, type ClassifyProblemRequest, type ClassifyProblemResponse, type ClassifySafetyRequest, type ClassifySafetyResponse, type CleanupResponse, type CleanupSessionsResponse, type CleanupStaleSessionsParams, type ClearFactsResponse, type ClearTenantResponse, type ClearTermsResponse, type ClientConfig, type ClusteredAteRequest, type ClusteredObservationDto, cognitive as Cognitive, type CognitiveGoalDto, type CognitiveStrategyDto, type CognitiveTermInput, coherence as Coherence, type CoherenceAnalyzeRequest, type CoherenceAnalyzeResponse, type CoherenceClaimDto, type CoherenceInlineDocumentDto, type CoherenceSummaryDto, type CohesionRequest, type CohesionResponse, type CollectionDto, collections as Collections, type ColumnMappingDto, type CommitFlowNetworkRequest, type CommitRequest, type CommittedForecast, communities as Communities, type CommunityDetectionConfigDto, type CommunityDetectionStatsDto, type CommunityDto, type CommunityMatchDto, type CommunityReportDto, type CommunityReportSummaryDto, type CommunitySearchModeDto, type CommunitySearchStatsDto, type CommunityStatsDto, type CompareDocumentsRequest, type CompareModelDto, type ComparisonOp, type CompetitorForecast, compliance as Compliance, complianceMarkings as ComplianceMarkings, type ComponentDto, type ComponentHealthDto, type ComputeGlbResponse, type ComputeLubResponse, type ConceptMatchDto, type CondRequest, type CondResponse, type ConditionalBranchDto, type ConditionalIndependenceRequest, type ConditionalIndependenceResponse, type ConfirmResponse, type ConflictResolution, type ConfluenceConflictDto, type ConfluenceDto, conformal as Conformal, type ConformalCalibrateRequest, type ConformalCalibrateResponse, type ConformalPredictRequest, type ConformalPredictResponse, type ConformalPrediction, conformance as Conformance, type ConformanceCheckResponse, type ConformanceRepairResponse, type ConformanceRequest, type ConformityArticleDto, type ConformityResponse, type ConnectorInstance, type ConnectorType, connectors as Connectors, type ConstrainedGenerateRequest, type ConstrainedGenerateResponse, type ConstrainedPlainVar, Constraint, type ConstraintCheckDto, type ConstraintDto, type ConstraintGraphRequest, type ConstraintGraphResponse, type ConstraintGraphStats, type ConstraintInputDto, type ConstraintOperator, type ConstraintSense, type ConstraintSessionStatus, ConstraintViolationError, constraints as Constraints, type ContainmentVerificationDto, type ContinuousMediationObservationDto, type ContinuousObservationDto, type ContinuousTreatmentObservationDto, type ContradictionDto, type ContradictionResolutionDto, control as Control, type ControlNafRequest, conversation as Conversation, type ConversationMessageRequest, type ConversationMessageResponse, type ConversationSummaryDto, type ConversationTrainingConfigDto, type ConversationTurnDto, type ConversationTurnsResponse, type CoordinatedResourceSet, type CopyModeDto, type CopyTermRequest, type CoreGroup, corpus as Corpus, type CorpusBridgeEdge, type CorpusBridgesRequest, type CorpusBridgesResponse, type CorpusCommunitiesRequest, type CorpusCommunitiesResponse, type CorpusCommunity, type CorpusCommunityDocumentShare, type CorpusCrossCuttingItem, type CorpusCrossCuttingItemKind, type CorpusCrossCuttingKind, type CorpusCrossCuttingRequest, type CorpusCrossCuttingResponse, type CorpusDocumentNode, type CorpusEntityRef, type CorpusScope, type CorpusSharedEntity, type CorpusTreemapRow, type CorrectEntityRequest, type CorrectionRecordDto, type CorrelationRequest, type CorrelationResponse, type CosineShape, type CountAuditEntriesResponse, type CounterfactualRequest, type CounterfactualResponse, type CounterfactualTraceDto, type CoverageCertificate, type CreateAgentRequest, type CreateAgentResponse, type CreateChildNamespaceRequest, type CreateCognitiveSortRequest, type CreateCognitiveSortResponse, type CreateCollectionRequest, type CreateConstraintSessionRequest, type CreateConstraintSessionResponse, type CreateCurriedFunctionRequest, type CreateExecutionSessionRequest, type CreateFlowNetworkRequest, type CreateGoalRequest, type CreateGoalResponse, type CreateModuleRequest, type CreateModuleResponse, type CreateOversightSessionRequest, type CreateOversightSessionResponse, type CreateResearchSessionRequest, type CreateResearchSessionResponse, type CreateRootNamespaceRequest, type CreateRuleStoreRequest, type CreateScenarioRequest, type CreateScenarioResponse, type CreateSnapshotRequest, type CreateSortRequest, type CreateSpaceRequest, type CreateStoreTermRequest, type CreateSubscriptionRequest, type CreateSubscriptionResponse, type CreateTenantRequest, type CreateTenantResponse, type CreateTermInCollectionRequest, type CreateTermRequest, type CreateTermStoreRequest, type CreateVariableRequest, type CrossSectionForecast, type CtlCounterExample, type CtlFormula, type CuriosityTargetDto, type CurriedFunctionResponse, type CurryingContextResponse, type CutRequest, type CutResponse, type CycleDto, type CycleOutcomeDto, type CycleOutcomeSummaryDto, type CyclicGaussianShape, dl as DL, type DSeparatedRequest, type DSeparatedResponse, type DataGroup, type DataMixingStatsDto, type DataPointDto, type DatasetStatisticsDto, type DateTimeValue, type DecisionAuditRequest, type DecisionAuditResponse, type DeclareLatentVariableRequest, type DeclareLatentVariableResponse, type DecodeGlbResponse, type DeepCopyRequest, type DegreeDistributionDto, type DeleteAgentResponse, type DeleteGoalResponse, type DeletePlanRequest, type DeletePlanResponse, type DeleteSnapshotResponse, type DeleteSortResponse, type DeleteSortRulesDisposition, type DeleteSortTermsDisposition, type DeleteSpeakerRequest, type DeleteTenantResponse, type DeleteTermReport, type DeliveryStatusDto, demo as Demo, type DemoSeedRequest, type DemoSeedResponse, type DensityRatioDiagnosticDto, type DependentInfoDto, type DeprecateSortRequest, type DereferenceRequest, type DereferenceResponse, type DerivationSummaryDto, type DerivedInferenceRequest, type DerivedInferenceResponse, type DerivedInferenceResultDto, type DetectCommunitiesRequest, type DetectCommunitiesResponse, type DetectMissingAttributesRequest, type DiDValidationRequest, type DiDValidationResponse, type DiagnosticDto, type DiagnosticsResponse, type DifferentiableFcRequest, type DifferentiableFcResponse, type DiscoverCausalRequest, type DiscoverCausalResponse, type DiscoverEffectsRequest, type DiscoverEffectsResponse, type DiscoverEmlRequest, type DiscoverEmlResponse, type DiscoverSchemaRequest, type DiscoverSchemaResponse, type DiscoverableTypeDto, type DiscoveredFeatureDto, type DiscoveredRelationDto, type DiscoveredSortDto, type DiscoveredSourceRelationDto, discovery as Discovery, type DiscoveryConfigDto, type DiscoveryProofNodeDto, type DiscoveryProofStatsDto, type DiscoveryProofTreeDto, type DiscoveryStateDto, type DiscoveryStatusResponse, type DiscoveryStrategy, type DisentailmentRequest, type DisentailmentResponse, type DiversityAnalysisDto, type DlSatisfiableRequest, type DlSatisfiableResponse, type DlSubsumesRequest, type DlSubsumesResponse, type DmlAteRequest, type DocumentAnalysisReport, type DocumentBatchItem, type DocumentBatchResultDto, documentCheck as DocumentCheck, type DocumentExtractedEntity, type DocumentGraph, type DocumentGraphCommunity, type DocumentGraphEdge, type DocumentGraphNode, type DocumentGraphQuery, type DocumentInput, type DocumentMetadataDto, type DocumentParseStatsDto, type DocumentParser, type DocumentProgressDto, type DocumentProofStep, type DocumentQaPair, type DocumentRecord, type DocumentResult, type DocumentRuleResult, type DocumentRuleSeverity, type DocumentRuleStatus, type DocumentSource, type DocumentStatsDto, type DocumentStatus, type DocumentSummary, type DocumentType, type DocumentVersionsResponse, documents as Documents, type DomainValue, type DoseResponseRequest, type DoseResponseResponse, type DraftFunctionRequest, type DraftFunctionResponse, type DraftRulesRequest, type DraftRulesResponse, type DriveDeficitDto, type DriveDto, type DynamicAddSortRequest, type DynamicAddSortResponse, type DynamicDiscoveryRequest, type DynamicDiscoveryResponse, type DynamicQueryClauseDto, type DynamicQueryGroupDto, type DynamicQueryRequest, type DynamicQueryResponse, type DynamicQueryResultDto, type E2ETrainingRequest, type E2ETrainingResponse, type EdgeCapacityUpdate, type EdgeClass, type EdgeClassification, type EdgeFlow, type EdgeSpec, type EdgeTypeDto, type EffectDto$1 as EffectDto, type EffectPredictionDto, type EmbeddingRankRequest, type EmbeddingRankResponse, type EmbeddingVerificationResponse, embeddings as Embeddings, type EmlSample, type EncodeClipRequest, type EncodeClipResponse, type EncoderConfigOverrides, type EndSchedulingResponse, type EnforcementStrategy, type EnrichedHealthResponse, type EnrollSpeakerRequest, type EnrollSpeakerResponse, type EnrollVoiceRequest, type EntailmentRequest, type EntailmentResponse, type EntityDto, type EntityVerificationDetailDto, type EpisodeDto, type EpisodeOutcomeDto, type EpisodeStatsResponse, type EqLiteralDto, type EqualityAtomDto, type EquivalenceClass, type EquivalenceClassDto, type ErrorResponse$1 as ErrorResponse, type EvalBuiltinRequest, type EvalBuiltinResponse, type EvalFunctionInfoDto, type EvaluateFunctionRequest, type EvaluateFunctionResponse, type EvaluatePatternRequest, type EvaluatePatternResponse, type EvaluatedValueDto, type EvaluationResult, type EvidenceAssessmentRequest, type EvidenceAssessmentResponse, type EvidenceDerivationConfigDto, type EvidenceItemDto, type EvidenceItemSummaryDto, type EvidenceSourceDto, execution as Execution, type ExecutionGoalDto, type ExecutionSessionResponse, type ExecutionSessionStatsResponse, type ExecutionValueDto, type ExogenousNoiseDto, type ExplorationCompleteResponse, type ExplorationProgress, type ExplorationQuestion, type ExplorationStatusResponse, type ExportJsonlResponse, type ExpressionDto, type ExtendedAgentStateDto, type ExternalActionSummaryDto, type ExternalMatchDto, type ExternalRefValue, extract as Extract, type ExtractEntitiesRequest, type ExtractEntitiesResponse, type ExtractImageRequest, type ExtractImageResponse, type ExtractedEntityDto, type ExtractionPredictionDto, type ExtractionStatsDto, type ExtractionStrategy, type ExtractionStrategyAdaptive, type ExtractionStrategyHybrid, type ExtractionStrategyLlm, type ExtractionStrategyLocalNer, type ExtractionStrategySchemaGuided, type FactConfidenceEntry, type FactoryResetResponse, type FailedReviewDto, type FdDomainStateDto, feasibility as Feasibility, type FeatureBindingDto, type FeatureChangeDto, type FeatureConfigDto, type FeatureDescriptorDto, type FeatureFilterDto, type FeatureInputConstrainedVariable, type FeatureInputInlineTerm, type FeatureInputInlineTermByName, type FeatureInputSortRef, type FeatureInputTermRef, type FeatureInputValueDto, type FeatureInputVariable, type FeatureMismatchDto, type FeaturePair, type FeatureRequirementDto, type FeatureTargetDto, type FeatureTypeDto, type FeatureValueDto, type FinalizeOversightSessionRequest, type FindBySortRequest, type FindPlansRequest, type FindPlansResponse, type FindRulesRequest, type FindRulesResponse, type FindSimilarRequest, type FindallRequest, type FindallResponse, type FindingKind, type FindingSeverity, type FixSuggestionDto, Flow, type FlowAlgorithm, type FlowProblem as FlowBuilderProblem, type FlowEdgeInput, type FlowEdgeOptions, type FlowNetworkResponse, flowNetworks as FlowNetworks, type FlowNode, type FlowProblemInputBase, type FocusEntryDto, type ForallRequest, type ForallResponse, ForbiddenError, forecast as Forecast, type ForecastAbstention, type ForecastBody, type ForecastCertificate, type ForecastCoveringSet, type ForecastDomain, type ForecastDomainsResponse, type ForecastEntityInput, type ForecastRequest, type ForecastResponse, type FormalJudgeRefinementResponse, type FormalJudgeRequest, type FormalJudgeResponse, type FormalVerdictDto, type ForwardChainRequest, type ForwardChainResponse, type FoundryReviewItemDto, type FrameSummary, type FrequencyEstimate, type FrequencyRequest, type FrequencyResponse, type FrontDoorObservationDto, type FrontDoorRequest, type FrontDoorResponse, type FunctionBodyDto, type FunctionCaller, type FunctionCallerKind, type FunctionCallersDisposition, type FunctionClauseDto, type FunctionDefinitionSignature, type FunctionDraftDto, type FunctionGuardDto, type FunctionKindDto, type FunctionNotReplaceableDto, type FunctionSummaryDto, type FunctionType, type FunctionTypeListResponse, type FunctionValueDto, type FunctionWithdrawalReport, functions as Functions, fuzzy as Fuzzy, type FuzzyConceptLevel, type FuzzyMergeRequest, type FuzzyMergeResponse, type FuzzyNumberValue, type FuzzyProveRequest, type FuzzyProveResponse, type FuzzyScalarValue, type FuzzySearchResultItem, type FuzzySearchTopKRequest, type FuzzySearchTopKResponse, FuzzyShape, type FuzzyShapeDto, type FuzzySubsumptionRequest, type FuzzySubsumptionResponse, type FuzzyUnifyRequest, type FuzzyUnifyResponse, type GESResultDto, type GFlowNetSampleRequest, type GFlowNetSampleResponse, type GFlowNetTrainResponse, type GateRequest, type GateResponse, type GaussianProductShape, type GaussianShape, type GenMode, type GeneralConstraintDto, type GenerateDocumentRequest, type GenerateDocumentResponse, type GenerateNegativesRequest, type GenerateNegativesResponse, type GenerateOntologyRequest, type GenerateOntologyResponse, type GenerateSyntheticDataRequest, type GenerateSyntheticDataResponse, generation as Generation, type GenerationPromptRequest, type GenerationPromptResponse, type GenerationProvenanceDto, type GenerationReportDto, type GenerationVerificationDto, type GenericModelRequest, Geometry, type GeometryDto, type GeometryValue, type GetAgentDrivesRequest, type GetAgentStateRequest, type GetAgentStateResponse, type GetBindingsRequest, type GetCausalModelResponse, type GetEpisodeStatsRequest, type GetEquivalenceClassesResponse, type GetExtendedAgentStateRequest, type GetExtendedAgentStateResponse, type GetFactsResponse, type GetFunctionResponse, type GetFuzzySubsumptionRequest, type GetFuzzySubsumptionResponse, type GetInboxRequest, type GetInboxResponse, type GetMembershipsRequest, type GetMembershipsResponse, type GetPreorderDegreeRequest, type GetPreorderDegreeResponse, type GetResiduationsRequest, type GetResiduationsResponse, type GetRulesResponse, type GetScenarioResponse, type GetSortSimilarityRequest, type GetSortSimilarityResponse, type GetStoreTermRequest, type GetStoreTermResponse, type GlbLubComputationTrace, type GlbLubOperation, type GlbLubTraceRequest, type GlbLubTraceStep, type GlbRequest, type GlbResponse, type GlobalAssignRequest, type GlobalAssignResponse, type GlobalGetRequest, type GlobalGetResponse, type GlobalIncrementRequest, type GlobalIncrementResponse, type GoalDto, type GoalEvaluationResultDto, type GoalResiduationRequest, type GoalResiduationResponse, type GoalStackEntryDto, type GoalStackResponse, type GoalStatusUpdate, type GoalSummaryDto, type GraphEdgeDto, type GraphExportFormat, type GraphMetadataDto, type GraphNodeDto, type GraphSparqlQueryRequest, type GraphSparqlResults, type GroundTruthEntry, type GroundTruthStatus, type GroundedGenerateRequest, type GroundedGenerateResponse, type GroundedSchemaResponse, type GroundingStatsDto, type GroupedRankForecast, type GuardOp, guardrail as Guardrail, type GuardrailReport, type GuardrailRequest, type GuardrailSummary, health as Health, type HeavyHitterItem, type HeavyHittersRequest, type HeavyHittersResponse, type HipaaIdentifier, homoiconic as Homoiconic, type HomoiconicSubstitutionDto, type HorizonDto, type HtnMethodDto, type HyperedgeDto, type HyperedgeTypeDto, type HypergraphRequest, type HypergraphResponse, type HypergraphStats, ilp as ILP, type IdentificationRefDto, type IdentifyEffectRequest, type IdentifyEffectResponse, type ImageExtractedEntityDto, type ImageExtractedRelationDto, imageExtraction as ImageExtraction, type ImageExtractionStatsDto, type ImageSuggestedSortDto, type ImpasseDto, type Implication, type ImpliesRequest, type ImpliesResponse, type ImportFoundryRequest, type ImportFoundryResponse, type ImportModuleRequest, type ImportModuleResponse, type ImportOwlRequest, type ImportOwlResponse, type InboxMessageDto, type IncompleteDocumentDto, type InfeasibleResult, inference as Inference, type InfluenceDto, type IngestDocumentBatchRequest, type IngestDocumentBatchResponse, type IngestDocumentRequest, type IngestDocumentResponse, type IngestFromSourceRequest, type IngestFromSourceResponse, type IngestKifRequest, type IngestKifResponse, type IngestMarkdownBatchRequest, type IngestMarkdownRequest, type IngestMarkdownResponse, type IngestPaperRequest, type IngestPaperResponse, type IngestRdfRequest, type IngestRdfResponse, type IngestStepRequest, ingestion as Ingestion, type IngestionConfigDto, IngestionFailedError, type IngestionPollOptions, IngestionSession, type IngestionSessionResponse, type IngestionSessionStatusDto, type IngestionStatsDto, type IngestionSyncOptions, type InlineDocument, type InstallList, type InstallPluginRequest, type InstallPluginResponse, type InstallState, type InstallSummary, type IntegerValue, type IntegratedCycleOutcomeDto, type IntegratedEngineConfigDto, type IntegrationGroupDto, type IntegrityResponse, type IntentionDto, type InteractionGraphDto, type Interceptor, type InterfaceType, type InterfaceTypeListResponse, InternalServerError, type InterventionDto, type InterventionObservationRequest, type InterventionObservationResponse, type InterventionRecommendationDto, type InterventionRequest, type InterventionResponse, type InvokeActionRequest, type InvokeActionResponse, type IterationMetricDto, type JsonValue$1 as JsonValue, type JudgeConfigDto, type KAnonymityResult, type KAnonymityViolation, type KBOptimizationConfig, type KBOptimizationResult, type KBResourceConstraint, type KBVariableSpec, type KbChangeDto, type KbChangeType, type KeyProvenanceDto, type KnowledgeGapDto, type KripkeState, type KripkeTransition, LP, ltn as LTN, type LatticeStats, type LatticeVisualizationRequest, type LatticeVisualizationResponse, type LayerResultDto, type LayerResultSummaryDto, type LayoutAlgorithmDto, type LayoutDirectionDto, type LayoutHintsDto, type LayoutModeDto, type LayoutSlotDto, type LayoutSurfaceDto, type LazyEvalRequest, type LazyEvalResponse, type LearnFromCorrectionRequest, type LearnFromCorrectionResponse, type LearnPatternConfigDto, type LearnPatternRequest, type LearnPatternResponse, type LearnSortSimilaritiesRequest, type LearnSortSimilaritiesResponse, type LearnedPatternDto, type LearnedSimilarityDto, type LearnedSimilarityListResponse, type LearnedSimilarityProvenanceDto, type LearnedSimilarityStatusDto, type LedgerInfoDto, type LinExpr, type LinTerm, type LinearConstraint$1 as LinearConstraint, type LinearExpression, type LinearProgramDefinition, type LinkPredictionRequest, type LinkPredictionResponse, type LinkType, type LinkTypeListResponse, type ListActionReviewsOptions, type ListActionReviewsResponse, type ListAgentsResponse, type ListAuditEntriesQuery, type ListAuditEntriesResponse, type ListAuditOptions, type ListBindingsResponse, type ListCatalogParams, type ListConversationsResponse, type ListDocumentsQuery, type ListDocumentsResponse, type ListEnginesResponse, type ListEvalFunctionsRequest, type ListEvalFunctionsResponse, type ListExternalActionsResponse, type ListFunctionsResponse, type ListGoalsResponse, type ListIncompleteDocumentsResponse, type ListIngestionSessionsResponse, type ListInstallsParams, type ListLevelsResponse, type ListPatternsResponse, type ListPendingInvocationsResponse, type ListPendingReviewsOptions, type ListPreferencesResponse, type ListResearchSessionsResponse, type ListScenariosResponse, type ListSnapshotsResponse, type ListSourceTypesResponse, type ListSourcesResponse, type ListSpeakersResponse, type ListSubscriptionsResponse, type ListSymbolsRequest, type ListSymbolsResponse, type ListTablesResponse, type ListTenantsResponse, type ListTermsQuery, type ListValue, type ListVoicesResponse, type Lit, type LiteralFeatureValue, type LiteralInputDto, type LogOddsAntecedentContributionDto, type LogOddsScoreDecompositionDto, type LogOddsWitnessDto, type LtnAggregator, type LtnAggregatorKind, type LtnFeatureText, type LtnInstance, type LtnLearnedCertainty, type LtnPredicateExample, type LtnPredicateFit, type LtnPredicateTraining, type LtnQueryKind, type LtnQueryRequest, type LtnQueryResponse, type LtnRefuteRequest, type LtnRefuteResponse, type LtnRule, type LtnTrainRequest, type LtnTrainResponse, type LtnWitnessEntry, type LubRequest, type LubResponse, type MarkChoicePointRequest, type MarkMessagesReadRequest, type MarkMessagesReadResponse, type MarkPendingRequest, type MarkPendingResponse, type MarkRuleStoreRequest, type MarkRuleStoreResponse, type MarkTermStoreRequest, type MarkTermStoreResponse, type MarkdownDocumentDto, marketplace as Marketplace, type MarketplaceScope, type MatchedEntityDto$1 as MatchedEntityDto, type MaterializationSummaryDto, type MaterializeScenarioRequest, type MaterializeScenarioResponse, type MathFunctionRequest, type MathFunctionType, type MaxFlowInput, type MaxFlowVars, type MeasurementRole, type MeasurementUnitDto, type MeasurementValue, type MediationDmlRequest, type MediationEffectDto, type MediationObservationDto, type MediationRequest, type MediationResponse, type MeetPreservationDto, type MembershipDto, type MembershipRequest, type MembershipResponse, type MembershipResult, type MergeEntityRequest, type MetaSortsResponse, type MinCostMaxFlowInput, type MinCostMaxFlowVars, type MinCutInput, type MinCutReport, type MinCutVars, type MissingInfoDto, type ModifyActionRequest, type ModularArithRequest, type ModularOperationType, type MonadicFactDto, type MonadicFixpointRequest, type MonadicFixpointResponse, type MotivationStateDto, type MoveDto, type MultiMediationObservationDto, type MultiMediationRequest, type NafProveRequest, type NafProveResponse, type NafResponse, type NamespaceDto, type NamespaceListResponse, type NamespaceResponse, namespaces as Namespaces, type NegativeExampleDto, NetworkError, neuroSymbolic as NeuroSymbolic, type NeuroSymbolicStatusResponse, type NlQueryMode, type NlQueryRequest, type NlQueryResponse, type NlQueryResultItem, type NodeScore, type NodeTypeDto, NotFoundError, type NumberFormatDto, type NumberToStringRequest, type NumberValueDto, type NumberedPage, type NumberedPageReader, type OAuthCallbackQuery, type OAuthStartResponse, type ObjectType, type ObjectTypeListResponse, type Objective, type ObjectiveFunction, type ObjectiveSense, type ObservationDto, type ObservationalProbabilitiesDto, type ObserveMultiRequest, type ObserveMultiResponse, type ObservePairRequest, type ObservePairResponse, type ObserveSingleRequest, type ObserveSingleResponse, type OcrConfigDto, type OffsetPage, type OffsetPageReader, ontology as Ontology, ontologyAlignment as OntologyAlignment, ontologyBridge as OntologyBridge, type OntologyClarificationQuestionDto, ontologyExport as OntologyExport, type OntologyExportDocument, type OntologyExportFormat, type OntologyExportOptions, ontologyFacade as OntologyFacade, type OntologyRagRequest, type OntologyRagResponse, type OntologyRagStatsDto, type OpenSpeechSessionRequest, type OpenSpeechSessionResponse, type Operand, operations as Operations, type OptimalResult, type OptimizationDirection, type OptimizationResult, optimize as Optimize, type OrderedCombo, type OrientPairDiagnosticsDto, type OrientPairDirectionDto, type OrientPairFitDto, type OrientPairIndependenceTestRequest, type OrientPairRegressionBasisDto, type OrientPairRegressionRequest, type OrientPairRequest, type OrientPairResponse, type OrientPairVerdictDto, osfDiff as OsfDiff, type OsfDiffReport, type OsfDiffRequest, type OsfDiffResponse, type OsfDiffSelector, type OsfDiffSequenceReport, type OsfDiffSequenceRequest, type OsfDiffSequenceResponse, type OsfDiffTemporalRequest, type OsfSearchRequest, type OsfSearchResponse, type OsfSearchStatsDto, osfql as Osfql, type OsfqlCatalogEntry, type OsfqlCatalogExecution, type OsfqlCatalogUiAffinity, type OsfqlDiagnoseRequest, type OsfqlDiagnoseResponse, type OsfqlDiagnostic, type OsfqlRange, type OsfqlRequest, type OsfqlResponse, type OsfqlTermValue, type OsfqlValue, type OutputFormatDto, type OverlapDiagnosticDto, oversight as Oversight, type OversightAlertDto, type OversightSessionStatusResponse, type PaginateOptions, type PaginationParams, type PaperMetadataDto, type PaperRefDto, type PaperSearchResultDto, type PaperSource, type ParamSpec, type ParsedDocumentMetadataDto, type PartialCorrelationRequest, type PartialCorrelationResponse, type PatchSortFeatureRequest, type PatchSortRequest, type PathRequest, type PathResponse, type PathwaysDto, type PatternDto, type PatternSummaryDto, type PendingActionReviewDto, type PendingInvocationDto, type PendingReviewDto$1 as PendingReviewDto, type PiShapeShape, type PiecewiseLinearShape, type Pin, type PipelineQualityStatsDto, type PlainFeatureMap, type PlainFeatureValue, plainValues as PlainValues, type PlanMatchDto, type PluginDependency, type PluginDetail, type PluginManifest, type PluginSummary, type PluginVersion, type Point2DGeometry, type PolicyRowDto, type PolicyRuleDto, type PolicyValueRequest, type PolicyValueResponse, type PolygonGeometry, type PositionalArgumentDto, type PredictEffectRequest, type PredictEffectResponse, type PredictFromDiscoveryRequest, type PredictFromDiscoveryResponse, type PredictPreferencesRequest, type PredictPreferencesResponse, type PredictionEntry, type PredictionErrorDto, type PredictionInterval, type PredictionSnapshot, type Preference, type PreferenceDto, type PreferencePrediction, preferences as Preferences, type PrerequisiteInfoDto, type ProbabilityBoundDto, type ProofDto, proofEngine as ProofEngine, type ProofEngineCreateTermResponse, type ProofExportFormat, type ProofExportRequest, type ProofExportResponse, type ProofExportResult, type ProofKind, type ProofLiteralDto, type ProofNodeDto, type ProofStatisticsDto, type ProofTraceDto, type ProofTraceNodeDto, type Property, propertyGraph as PropertyGraph, type PropertyGraphErrorResponse, type PropertyGraphExecuteResponse, type PropertyGraphQueryRequest, type PropertyGraphTranslateResponse, type PropertyGraphValue, type ProvenanceStepDto, type ProvenanceTagDto, type ProvideFeedbackRequest, type ProvideFeedbackResponse, type PsiTermDto, type PsiTermInput, type PsiTermInputById, type PsiTermInputByName, type PsiTermValue, type PublishPluginRequest, type PublishPluginResponse, type PushGoalRequest, type PushGoalResponse, type QuasiIdentifier, query as Query, type QueryResultDto, type QueryTerm, rag as RAG, type RankedInstrument, RateLimitError, type RateLimitInfo, type RawGenerateRequest, type RawGenerateResponse, type RdfFormatDto, type ReExtractRequest, type ReachableDto, type ReachedEdgeDto, type ReachedStateDto, type ReadableTermDto, type ReadableTermsResponse, type RealValue, reasoning as Reasoning, type ReasoningGroup, ReasoningLayerClient, ReasoningLayerError, type ReasoningStageDto, type ReasoningTraceDto, type RecallEpisodesRequest, type RecallEpisodesResponse, type RecalledEpisodeDto, type RecordEpisodeRequest, type RecordEpisodeResponse, type RecordSafeHarborStatus, type RecordSelectionRequest, type RecordSelectionResponse, type RecordTurnRequest, type RecordTurnResponse, type ReferenceValue, type ReferencedTermSummary, type ReflectionQueryRequest, type ReflectionQueryResponse, type RefutationCheckDto, type RefutationObservationDto, type RefuteEstimateRequest, type RefuteEstimateResponse, type RefuteRequest, type RefuteResponse, type RegisterExternalActionRequest, type RegisterExternalActionResponse, type RegisterFunctionRequest, type RegisterFunctionResponse, type RegisterSourceRequest, type RegisterSourceResponse, type RegressionBasis, type RejectActionRequest, type RejectEntityRequest, type RejectLearnedSimilarityRequest, type RejectLearnedSimilarityResponse, type RelOp, type RelOpDto, type RelatedInfoDto, type RelationTypeDto, type RelationalArithRequest, type ReleaseResiduationsRequest, type ReleaseResiduationsResponse, type RemoveSortFeatureOptions, type ReplaceFunctionResponse, type ReplaceRuleResponse, type ReportVerificationDto, type RequestOptions, research as Research, type ResearchContradictionsResponse, type ResearchCycleResponse, type ResearchCycleResultDto, type ResearchFindingDto, type ResearchFindingsResponse, type ResearchGapsResponse, type ResearchReportResponse, type ResearchSessionResponse, type ResearchSessionStatusDto, type ResearchSessionSummaryDto, type ResearchStatisticsDto, type ResidualWitnessDto, type ResiduateGoalRequest, type ResiduateGoalResponse, type ResiduatedEntryDto, type ResiduatedFeatureDto, type ResiduatedTermDto, type ResiduationDetailDto, type ResiduationDto, type ResiduationGoalDto, type ResiduationKind, type ResiduationRequest, type ResiduationResponse, type ResiduationStateDto, type ResiduationStateFilter, type ResiduationStateRequest, type ResiduationStateResponse, type ResiduationStats, type ResolutionStrategyDto, type ResolveSymbolRequest, type ResolveSymbolResponse, type ResolvedCoreferenceDto, type ResourceCoordinationRequest, type ResourceCoordinationResponse, type ResourceSpec, type ResumeDocumentIngestionRequest, type ResumeDocumentIngestionResponse, type ResumptionOptionDto, type RetentionDto, type RetractRuleRequest, type RetractRuleResponse, type RetrievalStatsDto, type ReviewCandidateMatchDto, type ReviewReason, reviews as Reviews, reward as Reward, type RewardObjective, type RewardScoreRequest, type RewardScoreResponse, type RiskTier, type RlPolicyConfigDto, type RlPolicyWeightsDto, type RlPolicyWeightsUploadResponse, type RlTrainRequest, type RlTrainResponse, type RootCauseAnalysisRequest, type RootCauseAnalysisResponse, type RootCauseDto, type RootCauseWithProofResponse, row as Row, type RowIntegrateRequest, type RowIntegrateResponse, type RowMatchDto, type RowSearchRequest, type RowSearchResponse, type RowSimilarityRequest, type RowSimilarityResponse, type RowTypeDto, type RowUnifyRequest, type RowUnifyResponse, type RuleAggregatorDto, type RuleBaseCertificateDto, type RuleCertificationDelta, type RuleClauseDto, type RuleConstraintDto, type RuleDerivationsDisposition, type RuleDraftClarificationQuestionDto, type RuleDraftDto, type RuleDto, type RuleEntryDto, type RuleNotWithdrawable, type RuleOrigin, type RuleStoreResponse, type RuleTermDraftDto, type RuleUtilityDto, type RuleWithdrawalReport, type RunAgentRequest, type RunCycleRequest, type RunCycleResponse, type RunIntegratedCycleRequest, type RunIntegratedCycleResponse, SDK_VERSION, type SShapeShape, type SafeHarborSummary, type SafetyModelInfoDto, type SampledHypothesisDto, sat as Sat, type SatLiteralDto, type SatSatisfiableResult, type SatSolveRequest, type SatSolveResponse, type SatSolverStatsDto, type SatUnknownResult, type SatUnsatisfiableResult, type SatVerdict, type SaveWeightsResponse, type ScenarioSummaryDto, scenarios as Scenarios, scheduling as Scheduling, type SchedulingDeltaResponse, type SchedulingFeasibilityRequest, type SchedulingFeasibilityResponse, type SchedulingOptimizeRequest, type SchedulingOptimizeResponse, type SchedulingSessionResponse, type SchedulingStatus, type SchemaExcerptDto, type ScmCounterfactualRequest, type ScmCounterfactualResponse, type ScoreTermsRequest, type ScoreTermsResponse, type ScoredTerm, type SearchCatalogRequest, type SearchCatalogResponse, type SearchCommunitiesRequest, type SearchCommunitiesResponse, type SearchModeDto, type SearchPapersRequest, type SearchPapersResponse, type SearchSortsBy, type SearchSortsMatch, type SearchSortsRequest, type SearchSortsResponse, type SearchStatsDto, type SearchStrategyDto, type SendMessageRequest, type SendMessageResponse, type SensitivityDto, type SeriesEpochUnit, type SeriesMissingPolicy, type SeriesOperator, type SeriesTimeSource, type SeriesValueSource, type SeriesWindowSpec, type SessionGraphDto, type SessionProgressResponse, type SessionStatsResponse, type SetActionReviewConfigRequest, type SetActionReviewConfigResponse, type SetFeatureRequest, type SetFeatureResponse, type SetFuzzySubsumptionRequest, type SetFuzzySubsumptionResponse, type SetGoalStatusRequest, type SetGoalStatusResponse, type SetPreferenceRequest, type SetSortSimilarityRequest, type SetSortSimilarityResponse, type SetValue, type ShiftDemand, type ShiftEffectRequest, type ShiftEffectResponse, type SigmoidDifferenceShape, type SigmoidProductShape, type SigmoidShape, type SimilarityEntryDto, type SimilarityMatch, type SimilaritySearchResponse, type SimpleTgdDto, type SingleCopyRequest, type SketchDimensions, smt as Smt, type SmtCheckRequest, type SmtCheckResponse, type SmtFunctionApplicationDto, type SmtSatResult, type SmtUnknownResult, type SmtUnsatResult, type SmtVerdict, type SnapshotFilter, type SnapshotResponse, snapshots as Snapshots, type SoftUnifyRequest, type SoftUnifyResponse, type SolutionDto, type SolutionStatus, type SolveConstraintRequest, type SolveConstraintResponse, type SolveFlowNetworkRequest, type SolveFlowNetworkResponse, type SolveOptions, type SolveProblemRequest, type SolveProblemResponse, solver as Solver, type SolverHealthResponse, type SolverHint, type SortBoxRequest, type SortBoxResponse, SortBuilder, type SortCalibrationDto, type SortCompareOperator, type SortCompareRequest, type SortCompareResponse, type SortDiscoveryRequest, type SortDiscoveryResponse, type SortDto, type SortFeatureEditResponse, type SortIdValue, type SortIndexStatusResponse, type SortInfoDto, type SortListResponse, type SortOriginDto, type SortRecommendation, type SortReferenceKind, type SortReferencingRuleDto, type SortResponse, type SortSimilarityResponse, type SortStatusDto, type SortSuggestionDto, type SortSummaryDto, sorts as Sorts, type SortsSchemaQuery, type SourceDetailResponse, type SourceExcerptDto$1 as SourceExcerptDto, type SourceSummaryDto, type SourceTypeDto, type SourceWriteMode, sources as Sources, type SpaceConstraintDto, type SpaceResponse, type SpaceSearchRequest, type SpaceSearchResponse, type SpaceSolutionDto, type SpaceStatusDto, spaces as Spaces, sparql as Sparql, type SparqlAskResults, type SparqlBindingSet, type SparqlEntailmentRegime, type SparqlOrderByKey, type SparqlOsfqlLeaf, type SparqlPlanNode, type SparqlQueryForm, type SparqlQueryRequest, type SparqlQueryResults, type SparqlRdfTerm, type SparqlSelectResults, type SparqlTranslation, type SparqlTripleTermValue, type SparqlUpdateRequest, type SparqlUpdateTranslation, type SpeakerProfile, speakers as Speakers, type SpecificityDto, speech as Speech, type SpeechEngine, type SpikeShape, type StartExplorationRequest, type StartExplorationResponse, type StartIngestionSessionRequest, statistical as Statistical, type StatisticalSuccessResponse, type StepLogEntryDto, type StepVerificationResponse, type StorePlanRequest, type StorePlanResponse, streaming as Streaming, type StringCompareOperator, type StringComparePredicateRequest, type StringCompareRequest, type StringConcatRequest, type StringLengthRequest, type StringOpParams, type StringOpRequest, type StringOperationType, type StringValue, type StructuralAssignmentDto, type StructuredIngestionStatsDto, type SubscribeToKbRequest, type SubscribeToKbResponse, type SubscriptionDto, type SubscriptionEventKind, subscriptions as Subscriptions, type SubstringRequest, type SummaryResponse, type SuspendedQueryDto, type SymbolDto, type SymbolKindDto, type SymbolicResultDto, type SynthesizeRequest, type SynthesizeResponse, type SynthesizeSpeechRequest, synthetic as Synthetic, type SystemGroup, type TaggedDerivedFact, type TaggedFactDto, type TaggedFcRequest, type TaggedFcResponse, type TaggedFeatureValueDto, type TaggedForwardChainRequest, type TaggedForwardChainResponse, temporal as Temporal, type TemporalModelCheckRequest, type TemporalModelCheckResponse, type TemporalPlanRequest, type TemporalPlanResponse, type TemporalPoint, type TemporalRule, type TemporalSeries, type TemporalSeriesPoint, type TemporalSeriesRequest, type TemporalSeriesResponse, type TemporalSeriesSpec, type TemporalTrendSummary, type TenantInfoDto, type TermBindingDto, type TermDto, type TermEdit, type TermInputArg, type TermInputDto, type TermInputInline, type TermInputInlineByName, type TermInputRef, type TermListResponse, type TermOrigin, type TermPatternDto, type TermRefFeatureValue, type TermReferencesDisposition, type TermReferrerDto, type TermReferrersResponse, type TermResponse, type TermSetSelector, type TermState, type TermStoreSessionResponse, type TermVersionDto, type TermVersionsResponse, type TerminationDto, terms as Terms, type TestInput, thomas as Thomas, type ThomasPathwaysRequest, type ThomasStudyRequest, type ThomasStudyResponse, TimeoutError, type TokenUsageDto, type ToolCallInfo, type TraceEventDto, type TrailEntryDto, type TrainFromTracesResponse, type TrainingExample, type TrainingExampleDto, type TrainingTriggerResponse, type TrajectoryStepDto, type TranscribeSpeechRequest, type TranscribeSpeechResponse, type TranslateRdfRequest, type TranslateRdfResponse, type TranslateRequest, type TranslateResponse, type TranslatedRdfTermDto, translation as Translation, type TranspileRequest, type TranspileResponse, type TrapezoidalShape, type TriangularShape, type TriggerDependencyRequest, type TriggerDependencyResponse, type TurnDto, type TypedConstraint, ui as UI, type UIActionDto, type UIActionRequest, type UIActionResponse, type UIAssemblyStatsDto, type UICatalogEntry, type UICatalogResponse, type UICustomizationDto, type UIDescribeRequest, type UIDescribeResponse, type UIDescriptorDto, type UIGenerateRequest, type UIGenerateResponse, type UiSort, type UnaryOperatorDto, type UncertainEdgeDto, type UndoRequest, type UndoResponse, type UndoRuleStoreRequest, type UndoRuleStoreResponse, type UnifiableQueryRequest, type UnificationQueryResponse, type UnifyTermsRequest, type UnifyTermsResponse, type UninstantiatedValue, type UpdateCollectionRequest, type UpdateMetadataRequest, type UpdatePlanStatsRequest, type UpdatePlanStatsResponse, type UpdateReviewStatusRequest, type UpdateScenarioRequest, type UpdateScenarioResponse, type UpdateTenantNameRequest, type UpdateTenantNameResponse, type UpdateTermRequest, type UpdateVisibilityRequest, type UpgradeInstallRequest, utilities as Utilities, type ValidateTermRequest, type ValidatedTermResponse, type ValidatedUnifyRequest, type ValidatedUnifyResponse, ValidationError, type ValidationReportDto, type ValidationRuleDto, type ValidationTypeDto, Value, type ValueDto, type ValuePatternDto, values as Values, type VarKind, type VariableBounds, type VariableClassification, type VariableDto, type VariableFeasibilityDto, type VariableFeatureValue, type VariableSpec, type VerbalizationResultDto, type VerbalizeTermRequest, type VerbalizeTermResponse, verification as Verification, type VerificationStepDto, type VerifyClaimRequest, type VerifyClaimResponse, type VerifyFaithfulnessRequest, type VerifyFaithfulnessResponse, type VerifyResponse, type VerifyRoundTripRequest, type VerifyRoundTripResponse, type VerifyScenarioRequest, type VerifyScenarioResponse, type VersionDiffDto, type ViolationCountsDto, type ViolationDto, type VisibilityDto, vision as Vision, visualization as Visualization, type VisualizationGraphDto, type VoiceConsent, type VoiceProfile, type WaitingConditionDto, type WaitingConditionType, WebSocketClient, WebSocketConnection, webhookActions as WebhookActions, type WebhookCallbackRequest, type WebhookCallbackResponse, type WeightedFactDto, type WitnessInstantiationDto, type WitnessProofDto, type WorkflowGroup, type WorldModeDto, type YankPluginRequest, type YankPluginResponse, type ZShapeShape, allen, bind, collect, constrained, discriminateFeatureValue, guard, isConstrainedPlainVar, isPsiTermInput, isTaggedValueDto, isUuid, paginateByOffset, paginateByPage, psi, toTaggedFeatures, toTaggedValue, toTermInputDto, toUntaggedFeatures, toUntaggedValue };
86626
+ export { ANY_ROLE, type ActValueDto, type ActionParamRule, type ActionParameter, type ActionReviewReasonDto, type ActionReviewReasonFilter, type ActionReviewResponse, type ActionReviewStatusDto, type ActionReviewSummaryDto, actionReviews as ActionReviews, type ActionSideEffect, type ActionType, type ActionTypeDef, type ActionTypeListResponse, actions as Actions, type ActivationDto, type AdaptiveModifyRequest, type AdaptiveModifyResponse, type AddBeliefRequest, type AddBeliefResponse, type AddCausalRelationRequest, type AddCausalRelationResponse, type AddCognitiveRuleRequest, type AddCognitiveRuleResponse, type AddConnectorRequest, type AddConnectorResponse, type AddConstraintsRequest, type AddConstraintsResponse, type AddExportRequest, type AddFactRequest, type AddFactResponse, type AddGoalRequest, type AddGoalResponse, type AddHtnMethodRequest, type AddHtnMethodResponse, type AddImportRequest, type AddPendingReviewRequest, type AddRuleRequest, type AddRuleResponse, type AddSymbolRequest, type AddSymbolResponse, admin as Admin, type AdmissibleDto, type AffectedPreviewDto, type AgentBeliefDto, type AgentConfigDto, type AgentEvent, type AgentEventHandlers, type AgentGoalDto, type AgentRecallAsOfRequest, type AgentRecallAsOfResponse, type AgentSpec, type AgentStateDto, type AgentSubVerdictDto, type AgentSubscription, type AgentTrajectoryRequest, type AgentTrajectoryResponse, agui as Agui, type AguiContextItem, type AguiEvent, type AguiFunctionCall, type AguiMessage, type AguiRole, type AguiRunOptions, type AguiTool, type AguiToolCall, type AiGroup, type AlcConcept, type AlignOntologyRequest, type AlignOntologyResponse, type AlignmentConflictDto, type AlignmentMatchDto, type AllenRelation, analysis as Analysis, type AnalysisGroup, type AnalyzeDocumentsRequest, type AnalyzeOptions, anonymization as Anonymization, type AnonymizationMode, type AnonymizeRequest, type AnonymizeResponse, type AntiUnifyBatchRequest, type AntiUnifyBatchResponse, type AntiUnifyRequest, type AntiUnifyResponse, ApiError, type ApiResponse, type AppendAuditEntryRequest, type AppendRequest, type AppendResiduationsRequest, type AppendResiduationsResponse, type ApplyActionRequest, type ApplyActionResponse, type ApplyCurriedRequest, type ApplyCurriedResponse, type ApplySnapshotResponse, type ApproveActionRequest, type ApproveEntityRequest, type ApproveLearnedSimilarityRequest, type ApproveLearnedSimilarityResponse, type ArchitectureInfoDto, type ArithOpDto, type ArithValueDto, type ArithmeticConstraintDto, type ArithmeticExprDto, type ArithmeticOp, type ArithmeticRecursionOp, type ArtifactDto, type AscRequest, type AssembleContextRequest, type AssembleContextResponse, type AssembledConceptDto, type AssembledRelationDto, type AssemblyTokenCountsDto, type AssertRuleRequest, type AssertRuleResponse, type AssignValueDto, type Assignment, type AssignmentMechanism, type AssignmentRowDto, type AssignmentStatus, type AssumptionAuditRequest, type AssumptionAuditResponse, type AssumptionRequest, type AsyncIngestionResponse, type AteEstimateRequest, type AteEstimateResponse, type AttentionTargetDto, type AttestationDto, audit as Audit, type AuditEntryDto, type AuditPage, type AuditRecord, type AuditSortField, type AuditSortOrder, type AuditedAssumptionDto, type AugmentationTargetDto, type AuthConfig, AuthenticationError, type AuthoringClarificationQuestionDto, authz as Authz, type AuthzAction, type AuthzDryRunRequest, type AuthzDryRunResponse, type AuthzEffect, type BacktrackResponse, type BacktrackTermStoreRequest, type BacktrackTermStoreResponse, type BacktrackableAssignRequest, type BacktrackableAssignResponse, type BackwardChainRequest, type BackwardChainResponse, BadRequestError, batch as Batch, type BatchCopyRequest, type BatchOperationDto, type BatchOperationResultDto, type BatchRequest, type BatchResponse, type BatchStringCompareRequest, type BayesianEffectDto, type BayesianPredictRequest, type BayesianPredictResponse, type BeliefDto, type BellShape, type BigIntegerValue, type BinaryOperatorDto, type BindSortRequest, type BindSortResponse, type BindTermRequest, type BindTermResponse, type BindVariableRequest, type BindVariableResponse, type BindVariablesRequest, type BindVariablesResponse, type BindingDto, type BindingSummaryDto, type BindingsResponse, type BitwiseOperationType, type BitwiseRequest, type BloomFilterStats, type BoolExpr, type BooleanValue, type BoundConstraintDto, type BoundingBoxGeometry, type BroadcastMessageRequest, type BroadcastMessageResponse, type BuildInfoDto, type BulkActionReviewResponse, type BulkAddFactsRequest, type BulkAddFactsResponse, type BulkAddRulesRequest, type BulkAddRulesResponse, type BulkAddTermsRequest, type BulkAddTermsResponse, type BulkApproveActionsRequest, type BulkApproveRequest, type BulkBindError, type BulkBindSortsRequest, type BulkBindSortsResponse, type BulkCreateSortsRequest, type BulkCreateSortsResponse, type BulkCreateTermsRequest, type BulkFuzzyProveRequest, type BulkFuzzyProveResponse, type BulkMergeRequest, BulkRefusedError, type BulkRejectActionsRequest, type BulkRejectRequest, type BulkRetractTermsRequest, type BulkRetractTermsResponse, type BulkRowRefusal, type BulkSetSimilaritiesRequest, type BulkSetSimilaritiesResponse, type BulkSortDefinition, type BulkSortError, type BulkSortErrorKind, type BySortQueryRequest, cdl as CDL, type CalibrateRequest, type CalibrationReportDto, type CalibrationSample, type CallOnceRequest, type CallOnceResponse, type CandidateMatchDto, type CaptureSnapshotRequest, type CardinalityOriginDto, type CascadeOptions, type CatalogPage, type CategoryProbabilityDto, type CauchyShape, causal as Causal, type CausalActionSpecDto, type CausalAnalyzeAssumptionsDto, type CausalAnalyzeDataDto, type CausalAnalyzeIndependenceTestDto, type CausalAnalyzePolicyDto, type CausalAnalyzeQuestionDto, type CausalAnalyzeQuestionKind, type CausalAnalyzeRegressionDto, type CausalAnalyzeRequest, type CausalAncestorRequest, type CausalAncestorResponse, type CausalAssumptionDto, type CausalChainDto, type CausalDecisionSpecDto, type CausalDerivationStepDto, type CausalEdgeDto, type CausalHedgeDto, type CausalProofTreeDto, type CausalRelationshipDto$1 as CausalRelationshipDto, type CausationProbabilitiesRequest, type CausationProbabilitiesResponse, type CausesRequest, type CausesResponse, type CdlComponentStatus, type CdlStatusResponse, type CdlVerificationDto, type CeilingDto, type CentralityRequest, type CentralityResponse, type CertificateDetail, type CertificateDto, type CertifiedForecast, chase as Chase, type ChaseArgDto, type ChaseAtomDto, type ChaseRunRequest, type ChaseRunResponse, type ChaseStepKindDto, type CheckDiversityRequest, type CheckDiversityResponse, type CheckDocumentRequest, type CheckDocumentResponse, type CheckFinding, type CheckSummary, type ChoicePoint, type ChoicePointDto, type ChoicePointMarkerResponse, type ChoiceSelection, type ChoiceValue, type ChrRequest, type ChunkFailureDto, type CircleGeometry, type CitationCheckDto, type CitationMarkerDto, type ClaimAnnotationDto, type ClaimAssessment, type ClaimCitation, type ClaimSubtype, type ClaimVerdict, type ClarificationQuestionDto, type Classification, type ClassificationLevelDto, type ClassifyEdgesInput, type ClassifyEdgesVars, type ClassifyProblemRequest, type ClassifyProblemResponse, type ClassifySafetyRequest, type ClassifySafetyResponse, type CleanupResponse, type CleanupSessionsResponse, type CleanupStaleSessionsParams, type ClearFactsResponse, type ClearTenantResponse, type ClearTermsResponse, type ClientConfig, type ClusteredAteRequest, type ClusteredObservationDto, type CoextensiveDefinitionDto, cognitive as Cognitive, type CognitiveGoalDto, type CognitiveStrategyDto, type CognitiveTermInput, coherence as Coherence, type CoherenceAnalyzeRequest, type CoherenceAnalyzeResponse, type CoherenceClaimDto, type CoherenceInlineDocumentDto, type CoherenceSummaryDto, type CohesionRequest, type CohesionResponse, type CollectionDto, collections as Collections, type ColumnMappingDto, type CommitFlowNetworkRequest, type CommitRequest, type CommittedForecast, communities as Communities, type CommunityDetectionConfigDto, type CommunityDetectionStatsDto, type CommunityDto, type CommunityMatchDto, type CommunityReportDto, type CommunityReportSummaryDto, type CommunitySearchModeDto, type CommunitySearchStatsDto, type CommunityStatsDto, type CompareDocumentsRequest, type CompareModelDto, type ComparisonOp, type CompetitorForecast, compliance as Compliance, complianceMarkings as ComplianceMarkings, type ComponentDto, type ComponentHealthDto, type ComputeGlbResponse, type ComputeLubResponse, type ConceptMatchDto, type CondRequest, type CondResponse, type ConditionalBranchDto, type ConditionalIndependenceRequest, type ConditionalIndependenceResponse, type ConfirmResponse, type ConflictResolution, type ConfluenceConflictDto, type ConfluenceDto, conformal as Conformal, type ConformalCalibrateRequest, type ConformalCalibrateResponse, type ConformalPredictRequest, type ConformalPredictResponse, type ConformalPrediction, conformance as Conformance, type ConformanceCheckResponse, type ConformanceRepairResponse, type ConformanceRequest, type ConformityArticleDto, type ConformityResponse, type ConnectorInstance, type ConnectorType, connectors as Connectors, type ConstrainedGenerateRequest, type ConstrainedGenerateResponse, type ConstrainedPlainVar, Constraint, type ConstraintCheckDto, type ConstraintDto, type ConstraintGraphRequest, type ConstraintGraphResponse, type ConstraintGraphStats, type ConstraintInputDto, type ConstraintOperator, type ConstraintSense, type ConstraintSessionStatus, ConstraintViolationError, constraints as Constraints, type ContainmentVerificationDto, type ContinuousMediationObservationDto, type ContinuousObservationDto, type ContinuousTreatmentObservationDto, type ContradictionDto, type ContradictionResolutionDto, control as Control, type ControlNafRequest, conversation as Conversation, type ConversationMessageRequest, type ConversationMessageResponse, type ConversationSummaryDto, type ConversationTrainingConfigDto, type ConversationTurnDto, type ConversationTurnsResponse, type CoordinatedResourceSet, type CopyModeDto, type CopyTermRequest, type CoreGroup, corpus as Corpus, type CorpusBridgeEdge, type CorpusBridgesRequest, type CorpusBridgesResponse, type CorpusCommunitiesRequest, type CorpusCommunitiesResponse, type CorpusCommunity, type CorpusCommunityDocumentShare, type CorpusCrossCuttingItem, type CorpusCrossCuttingItemKind, type CorpusCrossCuttingKind, type CorpusCrossCuttingRequest, type CorpusCrossCuttingResponse, type CorpusDocumentNode, type CorpusEntityRef, type CorpusScope, type CorpusSharedEntity, type CorpusTreemapRow, type CorrectEntityRequest, type CorrectionRecordDto, type CorrelationRequest, type CorrelationResponse, type CosineShape, type CountAuditEntriesResponse, type CounterfactualRequest, type CounterfactualResponse, type CounterfactualTraceDto, type CoverageCertificate, type CreateAgentRequest, type CreateAgentResponse, type CreateChildNamespaceRequest, type CreateCognitiveSortRequest, type CreateCognitiveSortResponse, type CreateCollectionRequest, type CreateConstraintSessionRequest, type CreateConstraintSessionResponse, type CreateCurriedFunctionRequest, type CreateExecutionSessionRequest, type CreateFlowNetworkRequest, type CreateGoalRequest, type CreateGoalResponse, type CreateModuleRequest, type CreateModuleResponse, type CreateOversightSessionRequest, type CreateOversightSessionResponse, type CreateResearchSessionRequest, type CreateResearchSessionResponse, type CreateRootNamespaceRequest, type CreateRuleStoreRequest, type CreateScenarioRequest, type CreateScenarioResponse, type CreateSnapshotRequest, type CreateSortRequest, type CreateSpaceRequest, type CreateStoreTermRequest, type CreateSubscriptionRequest, type CreateSubscriptionResponse, type CreateTenantRequest, type CreateTenantResponse, type CreateTermByNameRequest, type CreateTermInCollectionRequest, type CreateTermInput, type CreateTermInputWithPlainFeatures, type CreateTermRequest, type CreateTermStoreRequest, type CreateVariableRequest, type CrossSectionForecast, type CtlCounterExample, type CtlFormula, type CuriosityTargetDto, type CurriedFunctionResponse, type CurryingContextResponse, type CutRequest, type CutResponse, type CycleDto, type CycleOutcomeDto, type CycleOutcomeSummaryDto, type CyclicGaussianShape, dl as DL, type DSeparatedRequest, type DSeparatedResponse, type DataGroup, type DataMixingStatsDto, type DataPointDto, type DatasetStatisticsDto, type DateTimeValue, type DecisionAuditRequest, type DecisionAuditResponse, type DeclareLatentVariableRequest, type DeclareLatentVariableResponse, type DecodeGlbResponse, type DeepCopyRequest, type DegreeDistributionDto, type DeleteAgentResponse, type DeleteGoalResponse, type DeletePlanRequest, type DeletePlanResponse, type DeleteSnapshotResponse, type DeleteSortResponse, type DeleteSortRulesDisposition, type DeleteSortTermsDisposition, type DeleteSpeakerRequest, type DeleteTenantResponse, type DeleteTermReport, type DeliveryStatusDto, demo as Demo, type DemoSeedRequest, type DemoSeedResponse, type DensityRatioDiagnosticDto, type DependentInfoDto, type DeprecateSortRequest, type DereferenceRequest, type DereferenceResponse, type DerivationSummaryDto, type DerivedInferenceRequest, type DerivedInferenceResponse, type DerivedInferenceResultDto, type DetectCommunitiesRequest, type DetectCommunitiesResponse, type DetectMissingAttributesRequest, type DiDValidationRequest, type DiDValidationResponse, type DiagnosticDto, type DiagnosticsResponse, type DifferentiableFcRequest, type DifferentiableFcResponse, type DiscoverCausalRequest, type DiscoverCausalResponse, type DiscoverEffectsRequest, type DiscoverEffectsResponse, type DiscoverEmlRequest, type DiscoverEmlResponse, type DiscoverSchemaRequest, type DiscoverSchemaResponse, type DiscoverableTypeDto, type DiscoveredFeatureDto, type DiscoveredRelationDto, type DiscoveredSortDto, type DiscoveredSourceRelationDto, discovery as Discovery, type DiscoveryConfigDto, type DiscoveryProofNodeDto, type DiscoveryProofStatsDto, type DiscoveryProofTreeDto, type DiscoveryStateDto, type DiscoveryStatusResponse, type DiscoveryStrategy, type DisentailmentRequest, type DisentailmentResponse, type DiversityAnalysisDto, type DlSatisfiableRequest, type DlSatisfiableResponse, type DlSubsumesRequest, type DlSubsumesResponse, type DmlAteRequest, type DocumentAnalysisReport, type DocumentBatchItem, type DocumentBatchResultDto, documentCheck as DocumentCheck, type DocumentExtractedEntity, type DocumentGraph, type DocumentGraphCommunity, type DocumentGraphEdge, type DocumentGraphNode, type DocumentGraphQuery, type DocumentInput, type DocumentMetadataDto, type DocumentParseStatsDto, type DocumentParser, type DocumentProgressDto, type DocumentProofStep, type DocumentQaPair, type DocumentRecord, type DocumentResult, type DocumentRuleResult, type DocumentRuleSeverity, type DocumentRuleStatus, type DocumentSource, type DocumentStatsDto, type DocumentStatus, type DocumentSummary, type DocumentType, type DocumentVersionsResponse, documents as Documents, type DomainValue, type DoseResponseRequest, type DoseResponseResponse, type DraftFunctionRequest, type DraftFunctionResponse, type DraftRulesRequest, type DraftRulesResponse, type DriveDeficitDto, type DriveDto, type DynamicAddSortRequest, type DynamicAddSortResponse, type DynamicDiscoveryRequest, type DynamicDiscoveryResponse, type DynamicQueryClauseDto, type DynamicQueryGroupDto, type DynamicQueryRequest, type DynamicQueryResponse, type DynamicQueryResultDto, type E2ETrainingRequest, type E2ETrainingResponse, type EdgeCapacityUpdate, type EdgeClass, type EdgeClassification, type EdgeFlow, type EdgeSpec, type EdgeTypeDto, type EffectDto$1 as EffectDto, type EffectPredictionDto, type EmbeddingRankRequest, type EmbeddingRankResponse, type EmbeddingVerificationResponse, embeddings as Embeddings, type EmlSample, type EncodeClipRequest, type EncodeClipResponse, type EncoderConfigOverrides, type EndSchedulingResponse, type EnforcementStrategy, type EnrichedHealthResponse, type EnrollSpeakerRequest, type EnrollSpeakerResponse, type EnrollVoiceRequest, type EntailmentRequest, type EntailmentResponse, type EntityDto, type EntityVerificationDetailDto, type EpisodeDto, type EpisodeOutcomeDto, type EpisodeStatsResponse, type EqLiteralDto, type EqualityAtomDto, type EquivalenceClass, type EquivalenceClassDto, type ErrorResponse$1 as ErrorResponse, type EvalBuiltinRequest, type EvalBuiltinResponse, type EvalFunctionInfoDto, type EvaluateFunctionRequest, type EvaluateFunctionResponse, type EvaluatePatternRequest, type EvaluatePatternResponse, type EvaluatedValueDto, type EvaluationResult, type EvidenceAssessmentRequest, type EvidenceAssessmentResponse, type EvidenceDerivationConfigDto, type EvidenceItemDto, type EvidenceItemSummaryDto, type EvidenceSourceDto, execution as Execution, type ExecutionGoalDto, type ExecutionSessionResponse, type ExecutionSessionStatsResponse, type ExecutionValueDto, type ExogenousNoiseDto, type ExplorationCompleteResponse, type ExplorationProgress, type ExplorationQuestion, type ExplorationStatusResponse, type ExportJsonlResponse, type ExpressionDto, type ExtendedAgentStateDto, type ExternalActionSummaryDto, type ExternalMatchDto, type ExternalRefValue, extract as Extract, type ExtractEntitiesRequest, type ExtractEntitiesResponse, type ExtractImageRequest, type ExtractImageResponse, type ExtractedEntityDto, type ExtractionPredictionDto, type ExtractionStatsDto, type ExtractionStrategy, type ExtractionStrategyAdaptive, type ExtractionStrategyHybrid, type ExtractionStrategyLlm, type ExtractionStrategyLocalNer, type ExtractionStrategySchemaGuided, type FactConfidenceEntry, type FactoryResetResponse, type FailedReviewDto, type FdDomainStateDto, feasibility as Feasibility, type FeatureBindingDto, type FeatureChangeDto, type FeatureConfigDto, type FeatureDescriptorDto, type FeatureFilterDto, type FeatureInputConstrainedVariable, type FeatureInputInlineTerm, type FeatureInputInlineTermByName, type FeatureInputSortRef, type FeatureInputTermRef, type FeatureInputValueDto, type FeatureInputVariable, type FeatureMismatchDto, type FeaturePair, type FeatureRequirementDto, type FeatureTargetDto, type FeatureTypeDto, type FeatureValueDto, type FinalizeOversightSessionRequest, type FindBySortRequest, type FindPlansRequest, type FindPlansResponse, type FindRulesRequest, type FindRulesResponse, type FindSimilarRequest, type FindallRequest, type FindallResponse, type FindingKind, type FindingSeverity, type FixSuggestionDto, Flow, type FlowAlgorithm, type FlowProblem as FlowBuilderProblem, type FlowEdgeInput, type FlowEdgeOptions, type FlowNetworkResponse, flowNetworks as FlowNetworks, type FlowNode, type FlowProblemInputBase, type FocusEntryDto, type ForallRequest, type ForallResponse, ForbiddenError, forecast as Forecast, type ForecastAbstention, type ForecastBody, type ForecastCertificate, type ForecastCoveringSet, type ForecastDomain, type ForecastDomainsResponse, type ForecastEntityInput, type ForecastRequest, type ForecastResponse, type FormalJudgeRefinementResponse, type FormalJudgeRequest, type FormalJudgeResponse, type FormalVerdictDto, type ForwardChainRequest, type ForwardChainResponse, type FoundryReviewItemDto, type FrameSummary, type FrequencyEstimate, type FrequencyRequest, type FrequencyResponse, type FrontDoorObservationDto, type FrontDoorRequest, type FrontDoorResponse, type FunctionBodyDto, type FunctionCaller, type FunctionCallerKind, type FunctionCallersDisposition, type FunctionClauseDto, type FunctionDefinitionSignature, type FunctionDraftDto, type FunctionGuardDto, type FunctionKindDto, type FunctionNotReplaceableDto, type FunctionSummaryDto, type FunctionType, type FunctionTypeListResponse, type FunctionValueDto, type FunctionWithdrawalReport, functions as Functions, fuzzy as Fuzzy, type FuzzyConceptLevel, type FuzzyMergeRequest, type FuzzyMergeResponse, type FuzzyNumberValue, type FuzzyProveRequest, type FuzzyProveResponse, type FuzzyScalarValue, type FuzzySearchResultItem, type FuzzySearchTopKRequest, type FuzzySearchTopKResponse, FuzzyShape, type FuzzyShapeDto, type FuzzySubsumptionRequest, type FuzzySubsumptionResponse, type FuzzyUnifyRequest, type FuzzyUnifyResponse, type GESResultDto, type GFlowNetSampleRequest, type GFlowNetSampleResponse, type GFlowNetTrainResponse, type GateRequest, type GateResponse, type GaussianProductShape, type GaussianShape, type GenMode, type GeneralConstraintDto, type GenerateDocumentRequest, type GenerateDocumentResponse, type GenerateNegativesRequest, type GenerateNegativesResponse, type GenerateOntologyRequest, type GenerateOntologyResponse, type GenerateSyntheticDataRequest, type GenerateSyntheticDataResponse, generation as Generation, type GenerationPromptRequest, type GenerationPromptResponse, type GenerationProvenanceDto, type GenerationReportDto, type GenerationVerificationDto, type GenericModelRequest, Geometry, type GeometryDto, type GeometryValue, type GetAgentDrivesRequest, type GetAgentStateRequest, type GetAgentStateResponse, type GetBindingsRequest, type GetCausalModelResponse, type GetEpisodeStatsRequest, type GetEquivalenceClassesResponse, type GetExtendedAgentStateRequest, type GetExtendedAgentStateResponse, type GetFactsResponse, type GetFunctionResponse, type GetFuzzySubsumptionRequest, type GetFuzzySubsumptionResponse, type GetInboxRequest, type GetInboxResponse, type GetMembershipsRequest, type GetMembershipsResponse, type GetPreorderDegreeRequest, type GetPreorderDegreeResponse, type GetResiduationsRequest, type GetResiduationsResponse, type GetRulesResponse, type GetScenarioResponse, type GetSortSimilarityRequest, type GetSortSimilarityResponse, type GetStoreTermRequest, type GetStoreTermResponse, type GlbLubComputationTrace, type GlbLubOperation, type GlbLubTraceRequest, type GlbLubTraceStep, type GlbRequest, type GlbResponse, type GlobalAssignRequest, type GlobalAssignResponse, type GlobalGetRequest, type GlobalGetResponse, type GlobalIncrementRequest, type GlobalIncrementResponse, type GoalDto, type GoalEvaluationResultDto, type GoalResiduationRequest, type GoalResiduationResponse, type GoalStackEntryDto, type GoalStackResponse, type GoalStatusUpdate, type GoalSummaryDto, type GraphEdgeDto, type GraphExportFormat, type GraphMetadataDto, type GraphNodeDto, type GraphSparqlQueryRequest, type GraphSparqlResults, type GroundTruthEntry, type GroundTruthStatus, type GroundedGenerateRequest, type GroundedGenerateResponse, type GroundedSchemaResponse, type GroundingStatsDto, type GroupedRankForecast, type GuardOp, guardrail as Guardrail, type GuardrailReport, type GuardrailRequest, type GuardrailSummary, health as Health, type HeavyHitterItem, type HeavyHittersRequest, type HeavyHittersResponse, type HipaaIdentifier, homoiconic as Homoiconic, type HomoiconicSubstitutionDto, type HorizonDto, type HtnMethodDto, type HyperedgeDto, type HyperedgeTypeDto, type HypergraphRequest, type HypergraphResponse, type HypergraphStats, ilp as ILP, type IdentificationRefDto, type IdentifyEffectRequest, type IdentifyEffectResponse, type ImageExtractedEntityDto, type ImageExtractedRelationDto, imageExtraction as ImageExtraction, type ImageExtractionStatsDto, type ImageSuggestedSortDto, type ImpasseDto, type Implication, type ImpliesRequest, type ImpliesResponse, type ImportFoundryRequest, type ImportFoundryResponse, type ImportModuleRequest, type ImportModuleResponse, type ImportOwlRequest, type ImportOwlResponse, type InboxMessageDto, type IncompleteDocumentDto, type InfeasibleResult, inference as Inference, type InfluenceDto, type IngestDocumentBatchRequest, type IngestDocumentBatchResponse, type IngestDocumentRequest, type IngestDocumentResponse, type IngestFromSourceRequest, type IngestFromSourceResponse, type IngestKifRequest, type IngestKifResponse, type IngestMarkdownBatchRequest, type IngestMarkdownRequest, type IngestMarkdownResponse, type IngestPaperRequest, type IngestPaperResponse, type IngestRdfRequest, type IngestRdfResponse, type IngestStepRequest, ingestion as Ingestion, type IngestionConfigDto, IngestionFailedError, type IngestionPollOptions, IngestionSession, type IngestionSessionResponse, type IngestionSessionStatusDto, type IngestionStatsDto, type IngestionSyncOptions, type InlineDocument, type InstallList, type InstallPluginRequest, type InstallPluginResponse, type InstallState, type InstallSummary, type IntegerValue, type IntegratedCycleOutcomeDto, type IntegratedEngineConfigDto, type IntegrationGroupDto, type IntegrityResponse, type IntentionDto, type InteractionGraphDto, type Interceptor, type InterfaceType, type InterfaceTypeListResponse, InternalServerError, type InterventionDto, type InterventionObservationRequest, type InterventionObservationResponse, type InterventionRecommendationDto, type InterventionRequest, type InterventionResponse, type InvokeActionRequest, type InvokeActionResponse, type IterationMetricDto, type JsonValue$1 as JsonValue, type JudgeConfigDto, type KAnonymityResult, type KAnonymityViolation, type KBOptimizationConfig, type KBOptimizationResult, type KBResourceConstraint, type KBVariableSpec, type KbChangeDto, type KbChangeType, type KeyProvenanceDto, type KnowledgeGapDto, type KripkeState, type KripkeTransition, LP, ltn as LTN, type LatticeStats, type LatticeVisualizationRequest, type LatticeVisualizationResponse, type LayerResultDto, type LayerResultSummaryDto, type LayoutAlgorithmDto, type LayoutDirectionDto, type LayoutHintsDto, type LayoutModeDto, type LayoutSlotDto, type LayoutSurfaceDto, type LazyEvalRequest, type LazyEvalResponse, type LearnFromCorrectionRequest, type LearnFromCorrectionResponse, type LearnPatternConfigDto, type LearnPatternRequest, type LearnPatternResponse, type LearnSortSimilaritiesRequest, type LearnSortSimilaritiesResponse, type LearnedPatternDto, type LearnedSimilarityDto, type LearnedSimilarityListResponse, type LearnedSimilarityProvenanceDto, type LearnedSimilarityStatusDto, type LedgerInfoDto, type LinExpr, type LinTerm, type LinearConstraint$1 as LinearConstraint, type LinearExpression, type LinearProgramDefinition, type LinkPredictionRequest, type LinkPredictionResponse, type LinkType, type LinkTypeListResponse, type ListActionReviewsOptions, type ListActionReviewsResponse, type ListAgentsResponse, type ListAuditEntriesQuery, type ListAuditEntriesResponse, type ListAuditOptions, type ListBindingsResponse, type ListCatalogParams, type ListConversationsResponse, type ListDocumentsQuery, type ListDocumentsResponse, type ListEnginesResponse, type ListEvalFunctionsRequest, type ListEvalFunctionsResponse, type ListExternalActionsResponse, type ListFunctionsResponse, type ListGoalsResponse, type ListIncompleteDocumentsResponse, type ListIngestionSessionsResponse, type ListInstallsParams, type ListLevelsResponse, type ListPatternsResponse, type ListPendingInvocationsResponse, type ListPendingReviewsOptions, type ListPreferencesResponse, type ListResearchSessionsResponse, type ListScenariosResponse, type ListSnapshotsResponse, type ListSortsQuery, type ListSourceTypesResponse, type ListSourcesResponse, type ListSpeakersResponse, type ListSubscriptionsResponse, type ListSymbolsRequest, type ListSymbolsResponse, type ListTablesResponse, type ListTenantsResponse, type ListTermsQuery, type ListValue, type ListVoicesResponse, type Lit, type LiteralFeatureValue, type LiteralInputDto, type LogOddsAntecedentContributionDto, type LogOddsScoreDecompositionDto, type LogOddsWitnessDto, type LtnAggregator, type LtnAggregatorKind, type LtnFeatureText, type LtnInstance, type LtnLearnedCertainty, type LtnPredicateExample, type LtnPredicateFit, type LtnPredicateTraining, type LtnQueryKind, type LtnQueryRequest, type LtnQueryResponse, type LtnRefuteRequest, type LtnRefuteResponse, type LtnRule, type LtnTrainRequest, type LtnTrainResponse, type LtnWitnessEntry, type LubRequest, type LubResponse, type MarkChoicePointRequest, type MarkMessagesReadRequest, type MarkMessagesReadResponse, type MarkPendingRequest, type MarkPendingResponse, type MarkRuleStoreRequest, type MarkRuleStoreResponse, type MarkTermStoreRequest, type MarkTermStoreResponse, type MarkdownDocumentDto, marketplace as Marketplace, type MarketplaceScope, type MatchedEntityDto$1 as MatchedEntityDto, type MaterializationSummaryDto, type MaterializeScenarioRequest, type MaterializeScenarioResponse, type MathFunctionRequest, type MathFunctionType, type MaxFlowInput, type MaxFlowVars, type MeasurementRole, type MeasurementUnitDto, type MeasurementValue, type MediationDmlRequest, type MediationEffectDto, type MediationObservationDto, type MediationRequest, type MediationResponse, type MeetPreservationDto, type MembershipDto, type MembershipRequest, type MembershipResponse, type MembershipResult, type MergeEntityRequest, type MetaSortsResponse, type MinCostMaxFlowInput, type MinCostMaxFlowVars, type MinCutInput, type MinCutReport, type MinCutVars, type MissingInfoDto, type ModifyActionRequest, type ModularArithRequest, type ModularOperationType, type MonadicFactDto, type MonadicFixpointRequest, type MonadicFixpointResponse, type MotivationStateDto, type MoveDto, type MultiMediationObservationDto, type MultiMediationRequest, type NafProveRequest, type NafProveResponse, type NafResponse, type NamespaceDto, type NamespaceListResponse, type NamespaceResponse, namespaces as Namespaces, type NegativeExampleDto, NetworkError, neuroSymbolic as NeuroSymbolic, type NeuroSymbolicStatusResponse, type NlQueryMode, type NlQueryRequest, type NlQueryResponse, type NlQueryResultItem, type NodeScore, type NodeTypeDto, NotFoundError, type NumberFormatDto, type NumberToStringRequest, type NumberValueDto, type NumberedPage, type NumberedPageReader, type OAuthCallbackQuery, type OAuthStartResponse, type ObjectType, type ObjectTypeListResponse, type Objective, type ObjectiveFunction, type ObjectiveSense, type ObservationDto, type ObservationalProbabilitiesDto, type ObserveMultiRequest, type ObserveMultiResponse, type ObservePairRequest, type ObservePairResponse, type ObserveSingleRequest, type ObserveSingleResponse, type OcrConfigDto, type OffsetPage, type OffsetPageReader, ontology as Ontology, ontologyAlignment as OntologyAlignment, ontologyBridge as OntologyBridge, type OntologyClarificationQuestionDto, ontologyExport as OntologyExport, type OntologyExportDocument, type OntologyExportFormat, type OntologyExportOptions, ontologyFacade as OntologyFacade, type OntologyRagRequest, type OntologyRagResponse, type OntologyRagStatsDto, type OpenSpeechSessionRequest, type OpenSpeechSessionResponse, type Operand, operations as Operations, type OptimalResult, type OptimizationDirection, type OptimizationResult, optimize as Optimize, type OrderedCombo, type OrientPairDiagnosticsDto, type OrientPairDirectionDto, type OrientPairFitDto, type OrientPairIndependenceTestRequest, type OrientPairRegressionBasisDto, type OrientPairRegressionRequest, type OrientPairRequest, type OrientPairResponse, type OrientPairVerdictDto, osfDiff as OsfDiff, type OsfDiffReport, type OsfDiffRequest, type OsfDiffResponse, type OsfDiffSelector, type OsfDiffSequenceReport, type OsfDiffSequenceRequest, type OsfDiffSequenceResponse, type OsfDiffTemporalRequest, type OsfSearchRequest, type OsfSearchResponse, type OsfSearchStatsDto, osfql as Osfql, type OsfqlAtomicRefusal, type OsfqlCatalogEntry, type OsfqlCatalogExecution, type OsfqlCatalogUiAffinity, type OsfqlDiagnoseRequest, type OsfqlDiagnoseResponse, type OsfqlDiagnostic, type OsfqlPreviewAffected, type OsfqlPreviewResponse, type OsfqlPreviewSortCount, type OsfqlPreviewStatement, type OsfqlRange, type OsfqlRequest, type OsfqlResponse, type OsfqlTermValue, type OsfqlValue, type OutputFormatDto, type OverlapDiagnosticDto, oversight as Oversight, type OversightAlertDto, type OversightSessionStatusResponse, type PaginateOptions, type PaginationParams, type PaperMetadataDto, type PaperRefDto, type PaperSearchResultDto, type PaperSource, type ParamSpec, type ParsedDocumentMetadataDto, type PartialCorrelationRequest, type PartialCorrelationResponse, type PatchSortFeatureRequest, type PatchSortRequest, type PathRequest, type PathResponse, type PathwaysDto, type PatternDto, type PatternSummaryDto, type PendingActionReviewDto, type PendingInvocationDto, type PendingReviewDto$1 as PendingReviewDto, type PiShapeShape, type PiecewiseLinearShape, type Pin, type PipelineQualityStatsDto, type PlainFeatureMap, type PlainFeatureValue, plainValues as PlainValues, type PlanMatchDto, type PluginDependency, type PluginDetail, type PluginManifest, type PluginSummary, type PluginVersion, type Point2DGeometry, type PolicyRowDto, type PolicyRuleDto, type PolicyValueRequest, type PolicyValueResponse, type PolygonGeometry, type PositionalArgumentDto, type PredictEffectRequest, type PredictEffectResponse, type PredictFromDiscoveryRequest, type PredictFromDiscoveryResponse, type PredictPreferencesRequest, type PredictPreferencesResponse, type PredictionEntry, type PredictionErrorDto, type PredictionInterval, type PredictionSnapshot, type Preference, type PreferenceDto, type PreferencePrediction, preferences as Preferences, type PrerequisiteInfoDto, type ProbabilityBoundDto, type ProofDto, proofEngine as ProofEngine, type ProofEngineCreateTermResponse, type ProofExportFormat, type ProofExportRequest, type ProofExportResponse, type ProofExportResult, type ProofKind, type ProofLiteralDto, type ProofNodeDto, type ProofStatisticsDto, type ProofTraceDto, type ProofTraceNodeDto, type Property, propertyGraph as PropertyGraph, type PropertyGraphErrorResponse, type PropertyGraphExecuteResponse, type PropertyGraphQueryRequest, type PropertyGraphTranslateResponse, type PropertyGraphValue, type ProvenanceStepDto, type ProvenanceTagDto, type ProvideFeedbackRequest, type ProvideFeedbackResponse, type PsiTermDto, type PsiTermInput, type PsiTermInputById, type PsiTermInputByName, type PsiTermValue, type PublishPluginRequest, type PublishPluginResponse, type PushGoalRequest, type PushGoalResponse, type QuasiIdentifier, query as Query, type QueryResultDto, type QueryTerm, rag as RAG, type RankedInstrument, RateLimitError, type RateLimitInfo, type RawGenerateRequest, type RawGenerateResponse, type RdfFormatDto, type ReExtractRequest, type ReachableDto, type ReachedEdgeDto, type ReachedStateDto, type ReadableTermDto, type ReadableTermsResponse, type RealValue, reasoning as Reasoning, type ReasoningGroup, ReasoningLayerClient, ReasoningLayerError, type ReasoningStageDto, type ReasoningTraceDto, type RecallEpisodesRequest, type RecallEpisodesResponse, type RecalledEpisodeDto, type RecordEpisodeRequest, type RecordEpisodeResponse, type RecordSafeHarborStatus, type RecordSelectionRequest, type RecordSelectionResponse, type RecordTurnRequest, type RecordTurnResponse, type ReferenceDesignator, type ReferenceValue, type ReferencedTermSummary, type ReflectionQueryRequest, type ReflectionQueryResponse, type RefutationCheckDto, type RefutationObservationDto, type RefuteEstimateRequest, type RefuteEstimateResponse, type RefuteRequest, type RefuteResponse, type RegisterExternalActionRequest, type RegisterExternalActionResponse, type RegisterFunctionRequest, type RegisterFunctionResponse, type RegisterSourceRequest, type RegisterSourceResponse, type RegressionBasis, type RejectActionRequest, type RejectEntityRequest, type RejectLearnedSimilarityRequest, type RejectLearnedSimilarityResponse, type RelOp, type RelOpDto, type RelatedInfoDto, type RelationTypeDto, type RelationalArithRequest, type ReleaseResiduationsRequest, type ReleaseResiduationsResponse, type RemoveSortFeatureOptions, type ReplaceFunctionResponse, type ReplaceRuleResponse, type ReportVerificationDto, type RequestOptions, research as Research, type ResearchContradictionsResponse, type ResearchCycleResponse, type ResearchCycleResultDto, type ResearchFindingDto, type ResearchFindingsResponse, type ResearchGapsResponse, type ResearchReportResponse, type ResearchSessionResponse, type ResearchSessionStatusDto, type ResearchSessionSummaryDto, type ResearchStatisticsDto, type ResidualWitnessDto, type ResiduateGoalRequest, type ResiduateGoalResponse, type ResiduatedEntryDto, type ResiduatedFeatureDto, type ResiduatedTermDto, type ResiduationDetailDto, type ResiduationDto, type ResiduationGoalDto, type ResiduationKind, type ResiduationRequest, type ResiduationResponse, type ResiduationStateDto, type ResiduationStateFilter, type ResiduationStateRequest, type ResiduationStateResponse, type ResiduationStats, type ResolutionStrategyDto, type ResolveSymbolRequest, type ResolveSymbolResponse, type ResolvedCoreferenceDto, type ResourceCoordinationRequest, type ResourceCoordinationResponse, type ResourceSpec, type ResumeDocumentIngestionRequest, type ResumeDocumentIngestionResponse, type ResumptionOptionDto, type RetentionDto, type RetractRuleRequest, type RetractRuleResponse, type RetrievalStatsDto, type ReviewCandidateMatchDto, type ReviewReason, reviews as Reviews, reward as Reward, type RewardObjective, type RewardScoreRequest, type RewardScoreResponse, type RiskTier, type RlPolicyConfigDto, type RlPolicyWeightsDto, type RlPolicyWeightsUploadResponse, type RlTrainRequest, type RlTrainResponse, type RootCauseAnalysisRequest, type RootCauseAnalysisResponse, type RootCauseDto, type RootCauseWithProofResponse, row as Row, type RowIntegrateRequest, type RowIntegrateResponse, type RowMatchDto, type RowSearchRequest, type RowSearchResponse, type RowSimilarityRequest, type RowSimilarityResponse, type RowTypeDto, type RowUnifyRequest, type RowUnifyResponse, type RuleAggregatorDto, type RuleAggregatorOp, type RuleBaseCertificateDto, type RuleCertificationDelta, type RuleClauseDto, type RuleConstraintDto, type RuleDerivationsDisposition, type RuleDraftClarificationQuestionDto, type RuleDraftDto, type RuleDto, type RuleEntryDto, type RuleNotWithdrawable, type RuleOrigin, type RuleStoreResponse, type RuleTermDraftDto, type RuleUtilityDto, type RuleWithdrawalReport, type RunAgentRequest, type RunCycleRequest, type RunCycleResponse, type RunIntegratedCycleRequest, type RunIntegratedCycleResponse, SDK_VERSION, type SShapeShape, type SafeHarborSummary, type SafetyModelInfoDto, type SampledHypothesisDto, sat as Sat, type SatLiteralDto, type SatSatisfiableResult, type SatSolveRequest, type SatSolveResponse, type SatSolverStatsDto, type SatUnknownResult, type SatUnsatisfiableResult, type SatVerdict, type SaveWeightsResponse, type ScenarioSummaryDto, scenarios as Scenarios, scheduling as Scheduling, type SchedulingDeltaResponse, type SchedulingFeasibilityRequest, type SchedulingFeasibilityResponse, type SchedulingOptimizeRequest, type SchedulingOptimizeResponse, type SchedulingSessionResponse, type SchedulingStatus, type SchemaExcerptDto, type ScmCounterfactualRequest, type ScmCounterfactualResponse, type ScoreTermsRequest, type ScoreTermsResponse, type ScoredTerm, type SearchCatalogRequest, type SearchCatalogResponse, type SearchCommunitiesRequest, type SearchCommunitiesResponse, type SearchModeDto, type SearchPapersRequest, type SearchPapersResponse, type SearchSortsBy, type SearchSortsMatch, type SearchSortsRequest, type SearchSortsResponse, type SearchStatsDto, type SearchStrategyDto, type SendMessageRequest, type SendMessageResponse, type SensitivityDto, type SeriesEpochUnit, type SeriesMissingPolicy, type SeriesOperator, type SeriesTimeSource, type SeriesValueSource, type SeriesWindowSpec, type SessionGraphDto, type SessionProgressResponse, type SessionStatsResponse, type SetActionReviewConfigRequest, type SetActionReviewConfigResponse, type SetFeatureRequest, type SetFeatureResponse, type SetFuzzySubsumptionRequest, type SetFuzzySubsumptionResponse, type SetGoalStatusRequest, type SetGoalStatusResponse, type SetPreferenceRequest, type SetSortSimilarityRequest, type SetSortSimilarityResponse, type SetValue, type ShiftDemand, type ShiftEffectRequest, type ShiftEffectResponse, type SigmoidDifferenceShape, type SigmoidProductShape, type SigmoidShape, type SimilarityEntryDto, type SimilarityMatch, type SimilaritySearchResponse, type SimpleTgdDto, type SingleCopyRequest, type SketchDimensions, smt as Smt, type SmtCheckRequest, type SmtCheckResponse, type SmtFunctionApplicationDto, type SmtSatResult, type SmtUnknownResult, type SmtUnsatResult, type SmtVerdict, type SnapshotFilter, type SnapshotResponse, snapshots as Snapshots, type SoftUnifyRequest, type SoftUnifyResponse, type SolutionDto, type SolutionStatus, type SolveConstraintRequest, type SolveConstraintResponse, type SolveFlowNetworkRequest, type SolveFlowNetworkResponse, type SolveOptions, type SolveProblemRequest, type SolveProblemResponse, solver as Solver, type SolverHealthResponse, type SolverHint, type SortBoxRequest, type SortBoxResponse, SortBuilder, type SortCalibrationDto, type SortCompareOperator, type SortCompareRequest, type SortCompareResponse, type SortDiscoveryRequest, type SortDiscoveryResponse, type SortDto, type SortFeatureEditResponse, type SortIdValue, type SortIndexStatusResponse, type SortInfoDto, type SortListResponse, type SortOriginDto, type SortRecommendation, type SortReferenceKind, type SortReferencingRuleDto, type SortResponse, type SortSimilarityResponse, type SortStatusDto, type SortSuggestionDto, type SortSummaryDto, sorts as Sorts, type SortsSchemaQuery, type SourceDetailResponse, type SourceExcerptDto$1 as SourceExcerptDto, type SourceSummaryDto, type SourceTypeDto, type SourceWriteMode, sources as Sources, type SpaceConstraintDto, type SpaceResponse, type SpaceSearchRequest, type SpaceSearchResponse, type SpaceSolutionDto, type SpaceStatusDto, spaces as Spaces, sparql as Sparql, type SparqlAskResults, type SparqlBindingSet, type SparqlEntailmentRegime, type SparqlOrderByKey, type SparqlOsfqlLeaf, type SparqlPlanNode, type SparqlQueryForm, type SparqlQueryRequest, type SparqlQueryResults, type SparqlRdfTerm, type SparqlSelectResults, type SparqlTranslation, type SparqlTripleTermValue, type SparqlUpdateRequest, type SparqlUpdateTranslation, type SpeakerProfile, speakers as Speakers, type SpecificityDto, speech as Speech, type SpeechEngine, type SpikeShape, type StartExplorationRequest, type StartExplorationResponse, type StartIngestionSessionRequest, statistical as Statistical, type StatisticalSuccessResponse, type StepLogEntryDto, type StepVerificationResponse, type StorePlanRequest, type StorePlanResponse, streaming as Streaming, type StringCompareOperator, type StringComparePredicateRequest, type StringCompareRequest, type StringConcatRequest, type StringLengthRequest, type StringOpParams, type StringOpRequest, type StringOperationType, type StringValue, type StructuralAssignmentDto, type StructuredIngestionStatsDto, type SubscribeToKbRequest, type SubscribeToKbResponse, type SubscriptionDto, type SubscriptionEventKind, subscriptions as Subscriptions, type SubstringRequest, type SummaryResponse, type SuspendedQueryDto, type SymbolDto, type SymbolKindDto, type SymbolicResultDto, type SynthesizeRequest, type SynthesizeResponse, type SynthesizeSpeechRequest, synthetic as Synthetic, type SystemGroup, type TaggedDerivedFact, type TaggedFactDto, type TaggedFcRequest, type TaggedFcResponse, type TaggedFeatureValueDto, type TaggedForwardChainRequest, type TaggedForwardChainResponse, temporal as Temporal, type TemporalModelCheckRequest, type TemporalModelCheckResponse, type TemporalPlanRequest, type TemporalPlanResponse, type TemporalPoint, type TemporalRule, type TemporalSeries, type TemporalSeriesPoint, type TemporalSeriesRequest, type TemporalSeriesResponse, type TemporalSeriesSpec, type TemporalTrendSummary, type TenantInfoDto, type TermBindingDto, type TermDto, type TermEdit, type TermInputArg, type TermInputDesignator, type TermInputDto, type TermInputInline, type TermInputInlineByName, type TermInputRef, type TermListResponse, type TermOrigin, type TermPatternDto, type TermRefFeatureValue, type TermReferencesDisposition, type TermReferrerDto, type TermReferrersResponse, type TermResponse, type TermSetSelector, type TermState, type TermStoreSessionResponse, type TermVersionDto, type TermVersionsResponse, type TerminationDto, terms as Terms, type TestInput, thomas as Thomas, type ThomasPathwaysRequest, type ThomasStudyRequest, type ThomasStudyResponse, TimeoutError, type TokenUsageDto, type ToolCallInfo, type TraceEventDto, type TrailEntryDto, type TrainFromTracesResponse, type TrainingExample, type TrainingExampleDto, type TrainingTriggerResponse, type TrajectoryStepDto, type TranscribeSpeechRequest, type TranscribeSpeechResponse, type TranslateRdfRequest, type TranslateRdfResponse, type TranslateRequest, type TranslateResponse, type TranslatedRdfTermDto, translation as Translation, type TranspileRequest, type TranspileResponse, type TrapezoidalShape, type TriangularShape, type TriggerDependencyRequest, type TriggerDependencyResponse, type TurnDto, type TypedConstraint, ui as UI, type UIActionDto, type UIActionRequest, type UIActionResponse, type UIAssemblyStatsDto, type UICatalogEntry, type UICatalogResponse, type UICustomizationDto$1 as UICustomizationDto, type UIDescribeRequest, type UIDescribeResponse, type UIDescriptorDto, type UIGenerateRequest, type UIGenerateResponse, type UiSort, type UnaryOperatorDto, type UncertainEdgeDto, type UndoRequest, type UndoResponse, type UndoRuleStoreRequest, type UndoRuleStoreResponse, type UnifiableQueryRequest, type UnificationQueryResponse, type UnifyTermsRequest, type UnifyTermsResponse, type UninstantiatedValue, type UpdateCollectionRequest, type UpdateMetadataRequest, type UpdatePlanStatsRequest, type UpdatePlanStatsResponse, type UpdateReviewStatusRequest, type UpdateScenarioRequest, type UpdateScenarioResponse, type UpdateTenantNameRequest, type UpdateTenantNameResponse, type UpdateTermRequest, type UpdateVisibilityRequest, type UpgradeInstallRequest, utilities as Utilities, type ValidateTermRequest, type ValidatedTermResponse, type ValidatedUnifyRequest, type ValidatedUnifyResponse, ValidationError, type ValidationReportDto, type ValidationRuleDto, type ValidationTypeDto, Value, type ValueDto, type ValuePatternDto, values as Values, type VarKind, type VariableBounds, type VariableClassification, type VariableDto, type VariableFeasibilityDto, type VariableFeatureValue, type VariableSpec, type VerbalizationResultDto, type VerbalizeTermRequest, type VerbalizeTermResponse, verification as Verification, type VerificationStepDto, type VerifyClaimRequest, type VerifyClaimResponse, type VerifyFaithfulnessRequest, type VerifyFaithfulnessResponse, type VerifyResponse, type VerifyRoundTripRequest, type VerifyRoundTripResponse, type VerifyScenarioRequest, type VerifyScenarioResponse, type VersionDiffDto, type ViolationCountsDto, type ViolationDto, type VisibilityDto, vision as Vision, visualization as Visualization, type VisualizationGraphDto, type VoiceConsent, type VoiceProfile, type WaitingConditionDto, type WaitingConditionType, WebSocketClient, WebSocketConnection, webhookActions as WebhookActions, type WebhookCallbackRequest, type WebhookCallbackResponse, type WeightedFactDto, type WitnessInstantiationDto, type WitnessProofDto, type WorkflowGroup, type WorldModeDto, type YankPluginRequest, type YankPluginResponse, type ZShapeShape, aggregate, allen, bind, collect, constrained, discriminateFeatureValue, guard, isConstrainedPlainVar, isPsiTermInput, isTaggedValueDto, isUuid, not, paginateByOffset, paginateByPage, psi, toTaggedFeatures, toTaggedValue, toTermInputDto, toUntaggedFeatures, toUntaggedValue };