@kortexya/reasoninglayer 1.4.0 → 1.6.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
@@ -109,7 +109,7 @@ type JsonValue$1 = string | number | boolean | null | JsonValue$1[] | object;
109
109
  * This is the single source of truth for the version constant.
110
110
  * The `scripts/release.sh` script updates this value alongside `package.json`.
111
111
  */
112
- declare const SDK_VERSION = "1.4.0";
112
+ declare const SDK_VERSION = "1.6.0";
113
113
  /**
114
114
  * Authentication mode for the SDK.
115
115
  *
@@ -281,6 +281,44 @@ declare class HttpClient<SecurityDataType = unknown> {
281
281
  request: <T = any, E = any>({ body, secure, path, type, query, format, baseUrl, cancelToken, ...params }: FullRequestParams) => Promise<HttpResponse<T, E>>;
282
282
  }
283
283
 
284
+ /** A validation rule over a single parameter (externally tagged). */
285
+ type ActionParamRuleDto = {
286
+ /** String parameter, when present, must be non-empty. */
287
+ non_empty_string: {
288
+ param: string;
289
+ };
290
+ } | {
291
+ /** Integer parameter, when present, in `[min, max]`. */
292
+ int_range: {
293
+ /** @format int64 */
294
+ max: number;
295
+ /** @format int64 */
296
+ min: number;
297
+ param: string;
298
+ };
299
+ } | {
300
+ /** Real parameter, when present, in `[min, max]`. */
301
+ real_range: {
302
+ /** @format double */
303
+ max: number;
304
+ /** @format double */
305
+ min: number;
306
+ param: string;
307
+ };
308
+ } | {
309
+ /** String parameter, when present, must be one of `allowed`. */
310
+ one_of: {
311
+ allowed: string[];
312
+ param: string;
313
+ };
314
+ };
315
+ /** One action parameter projected from an [`ActionInputSpec`]. */
316
+ interface ActionParameterDto {
317
+ /** Parameter (input feature) name. */
318
+ name: string;
319
+ /** Whether the input is required. */
320
+ required: boolean;
321
+ }
284
322
  /** Reason why an action requires review */
285
323
  type ActionReviewReasonDto$1 = "requires_approval" | "high_risk" | "external_side_effect" | "low_confidence" | "first_use" | {
286
324
  /** Custom reason */
@@ -328,6 +366,49 @@ interface ActionReviewSummaryDto$1 {
328
366
  */
329
367
  total_pending: number;
330
368
  }
369
+ /** A declarative side-effect fired after the action applies. */
370
+ interface ActionSideEffectDto {
371
+ /** Notification body. */
372
+ body: string;
373
+ /** Delivery channel: `webhook`, `email`, `in_app`, or `browser_push`. */
374
+ channel: string;
375
+ /** Recipient/target (webhook URL or recipient address). */
376
+ target: string;
377
+ /** Notification title. */
378
+ title: string;
379
+ }
380
+ /** A typed, validated, RBAC-bound action schema. */
381
+ interface ActionTypeDefDto {
382
+ /** Action type name (the action sort). */
383
+ name: string;
384
+ /** Typed parameters. */
385
+ params?: ParamSpecDto[];
386
+ /** Roles required to apply this action (empty ⇒ unrestricted). */
387
+ required_roles?: string[];
388
+ /** Validation rules over parameters. */
389
+ rules?: ActionParamRuleDto[];
390
+ /** Side-effects to dispatch once the action applies. */
391
+ side_effects?: ActionSideEffectDto[];
392
+ }
393
+ /** One projected action type. */
394
+ interface ActionTypeDto {
395
+ /** Action sort name (Palantir action-type apiName). */
396
+ apiName: string;
397
+ /** Human-facing name (the action sort name). */
398
+ displayName: string;
399
+ /** Parameters — required inputs first, then optional. */
400
+ parameters: ActionParameterDto[];
401
+ }
402
+ /** Response for `GET /api/v1/ontology/action-types`. */
403
+ interface ActionTypeListResponse$1 {
404
+ /** The projected action types. */
405
+ actionTypes: ActionTypeDto[];
406
+ /**
407
+ * Number of action types returned.
408
+ * @min 0
409
+ */
410
+ count: number;
411
+ }
331
412
  /** Activation level DTO. */
332
413
  interface ActivationDto$1 {
333
414
  /**
@@ -774,6 +855,55 @@ interface AgentSubVerdictDto$1 {
774
855
  /** Per-agent verdict: "safe", "unsafe", "partial", or "residuated" */
775
856
  verdict: string;
776
857
  }
858
+ /** Request to align a domain ontology to an upper ontology. */
859
+ interface AlignOntologyRequest$1 {
860
+ /** Domain ontology to align, as OWL/RDF-XML. */
861
+ domain_owl: string;
862
+ /** Upper ontologies to align against. Defaults to `["BFO"]` when empty. */
863
+ targets?: string[];
864
+ }
865
+ /** Response from an ontology-alignment run. */
866
+ interface AlignOntologyResponse$1 {
867
+ /** Surfaced ⊥-conflicts among proposed candidates. */
868
+ conflicts: AlignmentConflictDto$1[];
869
+ /**
870
+ * Number of domain sorts considered.
871
+ * @min 0
872
+ */
873
+ domain_sorts: number;
874
+ /** The MAPPING artifact as Turtle (`skos:*` + `kortexya:confidence`). */
875
+ mapping_ttl: string;
876
+ /** Confirmed SKOS correspondences. */
877
+ matches: AlignmentMatchDto$1[];
878
+ /**
879
+ * Number of upper-ontology target sorts indexed.
880
+ * @min 0
881
+ */
882
+ target_sorts: number;
883
+ }
884
+ /**
885
+ * Two upper-ontology candidates a domain class cannot map to simultaneously
886
+ * (their lattice meet is ⊥ — e.g. disjoint BFO branches).
887
+ */
888
+ interface AlignmentConflictDto$1 {
889
+ /** Domain sort name whose candidates conflict. */
890
+ domain_sort: string;
891
+ /** The kept (higher-scored) candidate CURIE. */
892
+ target_a: string;
893
+ /** The rejected, incompatible candidate CURIE. */
894
+ target_b: string;
895
+ }
896
+ /** A confirmed SKOS correspondence from a domain class to an upper-ontology class. */
897
+ interface AlignmentMatchDto$1 {
898
+ /** Domain sort name. */
899
+ domain_sort: string;
900
+ /** SKOS relation: `exactMatch` / `broadMatch` / `narrowMatch` / `closeMatch`. */
901
+ match_type: string;
902
+ /** Upper-ontology class CURIE (e.g. the BFO IRI's CURIE form). */
903
+ target_curie: string;
904
+ /** Upper-ontology class label. */
905
+ target_label: string;
906
+ }
777
907
  /** Statistics for source text alignment quality */
778
908
  interface AlignmentStatsDto {
779
909
  /**
@@ -866,6 +996,43 @@ interface AppendResiduationsResponse$1 {
866
996
  /** @min 0 */
867
997
  total_residuations: number;
868
998
  }
999
+ /** Request body for `POST /api/v1/actions/apply`. */
1000
+ interface ApplyActionRequest$1 {
1001
+ /** The action schema to apply. */
1002
+ action: ActionTypeDefDto;
1003
+ /** Roles held by the caller (checked against `action.required_roles`). */
1004
+ caller_roles?: string[];
1005
+ /** Multi-term edits to commit atomically when the action is `Ready`. */
1006
+ edits?: TermEditDto[];
1007
+ /** Bound input features (`feature → JSON value`). */
1008
+ inputs?: Record<string, any>;
1009
+ }
1010
+ /** Outcome of applying an action (the `outcome` field discriminates). */
1011
+ type ApplyActionResponse$1 = {
1012
+ outcome: "applied";
1013
+ /**
1014
+ * Number of side-effects delivered successfully.
1015
+ * @min 0
1016
+ */
1017
+ side_effects_dispatched: number;
1018
+ /**
1019
+ * Number of side-effects whose delivery failed (apply still succeeded).
1020
+ * @min 0
1021
+ */
1022
+ side_effects_failed: number;
1023
+ } | {
1024
+ /** Names of the unbound required parameters. */
1025
+ missing: string[];
1026
+ outcome: "suspended";
1027
+ } | {
1028
+ outcome: "rejected";
1029
+ /** Human-readable reason. */
1030
+ reason: string;
1031
+ } | {
1032
+ outcome: "rolled_back";
1033
+ /** Human-readable cause. */
1034
+ reason: string;
1035
+ };
869
1036
  /** Request to apply arguments to a curried function */
870
1037
  interface ApplyCurriedRequest$1 {
871
1038
  arguments: PositionalArgumentDto$1[];
@@ -1155,6 +1322,14 @@ interface AssignmentDto {
1155
1322
  * Every cell in the input grid is classified as exactly one of these.
1156
1323
  */
1157
1324
  type AssignmentStatusDto = "confirmed_true" | "confirmed_false" | "free";
1325
+ /** Request body for `POST /api/v1/feasibility/sessions/{session_id}/assumptions`. */
1326
+ interface AssumptionRequest$1 {
1327
+ /**
1328
+ * The flat decision-variable index to assume `true`.
1329
+ * @min 0
1330
+ */
1331
+ var: number;
1332
+ }
1158
1333
  /** Attention target DTO. */
1159
1334
  type AttentionTargetDto$1 = {
1160
1335
  /** @format uuid */
@@ -1649,6 +1824,28 @@ interface BeliefDto$1 {
1649
1824
  }
1650
1825
  /** Binary operator for expressions */
1651
1826
  type BinaryOperatorDto$1 = "Add" | "Subtract" | "Multiply" | "Divide";
1827
+ /** Request to bind a sort to a SQL table. */
1828
+ interface BindSortRequest$1 {
1829
+ /** Column mappings: feature name to column spec. */
1830
+ columns: ColumnMappingDto$1[];
1831
+ /** Primary key column names. */
1832
+ key_columns?: string[];
1833
+ /** Sort name to bind. */
1834
+ sort_name: string;
1835
+ /** External source identifier. */
1836
+ source_id: string;
1837
+ /** SQL table name. */
1838
+ table_name: string;
1839
+ }
1840
+ /** Response from binding a sort to a SQL table. */
1841
+ interface BindSortResponse$1 {
1842
+ /** Whether the binding was successful. */
1843
+ bound: boolean;
1844
+ /** Sort name that was bound. */
1845
+ sort_name: string;
1846
+ /** SQL table the sort is bound to. */
1847
+ table_name: string;
1848
+ }
1652
1849
  /** Request to bind a term in the session */
1653
1850
  interface BindTermRequest$1 {
1654
1851
  features?: FeatureBindingDto$1[];
@@ -1722,6 +1919,22 @@ interface BindingDto$1 {
1722
1919
  */
1723
1920
  variable_term_id: string;
1724
1921
  }
1922
+ /** Summary of a single sort-table binding. */
1923
+ interface BindingSummaryDto$1 {
1924
+ /**
1925
+ * Number of bound features/columns.
1926
+ * @min 0
1927
+ */
1928
+ feature_count: number;
1929
+ /** Primary key column names. */
1930
+ key_columns: string[];
1931
+ /** Sort ID (UUID string). */
1932
+ sort_id: string;
1933
+ /** External source identifier. */
1934
+ source_id: string;
1935
+ /** SQL table name. */
1936
+ table_name: string;
1937
+ }
1725
1938
  /** Response with current bindings */
1726
1939
  interface BindingsResponse$1 {
1727
1940
  bindings: TermBindingDto$1[];
@@ -1748,6 +1961,64 @@ type BitwiseResponse = {
1748
1961
  reason: string;
1749
1962
  status: "fail";
1750
1963
  };
1964
+ /**
1965
+ * A boolean-valued expression for the [`TypedConstraintDto::Arithmetic`] escape
1966
+ * hatch (mirrors the domain `BoolExpr`). Tagged by `type`. `not`/`implies`/
1967
+ * `iff`/`xor` are convenience nodes; an empty `and` is true, an empty `or` is
1968
+ * false.
1969
+ */
1970
+ type BoolExprDto = {
1971
+ type: "lit";
1972
+ /** The polarity. */
1973
+ value: boolean;
1974
+ /**
1975
+ * The flat decision-variable index.
1976
+ * @min 0
1977
+ */
1978
+ var: number;
1979
+ } | {
1980
+ type: "const";
1981
+ /** The truth value. */
1982
+ value: boolean;
1983
+ } | {
1984
+ /** The negated expression. */
1985
+ expr: BoolExprDto;
1986
+ type: "not";
1987
+ } | {
1988
+ /** The conjuncts. */
1989
+ exprs: BoolExprDto[];
1990
+ type: "and";
1991
+ } | {
1992
+ /** The disjuncts. */
1993
+ exprs: BoolExprDto[];
1994
+ type: "or";
1995
+ } | {
1996
+ /** Antecedent. */
1997
+ left: BoolExprDto;
1998
+ /** Consequent. */
1999
+ right: BoolExprDto;
2000
+ type: "implies";
2001
+ } | {
2002
+ /** Left operand. */
2003
+ left: BoolExprDto;
2004
+ /** Right operand. */
2005
+ right: BoolExprDto;
2006
+ type: "iff";
2007
+ } | {
2008
+ /** Left operand. */
2009
+ left: BoolExprDto;
2010
+ /** Right operand. */
2011
+ right: BoolExprDto;
2012
+ type: "xor";
2013
+ } | {
2014
+ /** Left-hand linear expression. */
2015
+ left: LinExprDto;
2016
+ /** The relational operator. */
2017
+ op: RelOpDto$1;
2018
+ /** Right-hand linear expression. */
2019
+ right: LinExprDto;
2020
+ type: "compare";
2021
+ };
1751
2022
  /**
1752
2023
  * API representation of an OSF Bound Constraint
1753
2024
  *
@@ -2506,6 +2777,70 @@ interface ClarificationQuestionDto$1 {
2506
2777
  question: string;
2507
2778
  type: string;
2508
2779
  }
2780
+ /** Per-cell trichotomy, partitioned by class (flat cell indices). */
2781
+ interface ClassificationDto {
2782
+ /** Cells in no valid completion — gray these out. */
2783
+ confirmed_false: number[];
2784
+ /** Cells in every valid completion — forced/highlighted. */
2785
+ confirmed_true: number[];
2786
+ /** Cells that are a free choice. */
2787
+ sometimes: number[];
2788
+ }
2789
+ interface ClassificationLevelDto$1 {
2790
+ /**
2791
+ * @format int32
2792
+ * @min 0
2793
+ */
2794
+ level: number;
2795
+ name: string;
2796
+ }
2797
+ /**
2798
+ * Request body for `POST /api/v1/solver/classify`. Same fields as
2799
+ * `SolveProblemRequest` plus an optional list of variable names whose
2800
+ * classification is requested; omitting it classifies every binary
2801
+ * variable.
2802
+ */
2803
+ interface ClassifyProblemRequest$1 {
2804
+ constraints?: LinearConstraint$2[];
2805
+ /** @format double */
2806
+ gap_tolerance?: number | null;
2807
+ /**
2808
+ * Backend-selection hint. `Auto` (default) routes CP-SAT for fully
2809
+ * discrete problems and HiGHS for any continuous variable.
2810
+ */
2811
+ hint?: SolverHint$1;
2812
+ objective?: null | Objective$1;
2813
+ /**
2814
+ * @format int64
2815
+ * @min 0
2816
+ */
2817
+ time_limit_ms?: number | null;
2818
+ variables: VariableSpec$1[];
2819
+ /**
2820
+ * Variables to classify. Omit (or send empty) to classify every
2821
+ * binary variable.
2822
+ */
2823
+ variables_of_interest?: any[] | null;
2824
+ }
2825
+ /** Response body for `POST /api/v1/solver/classify`. */
2826
+ interface ClassifyProblemResponse$1 {
2827
+ /**
2828
+ * Variable-name → baseline solve value. Useful for displaying a
2829
+ * concrete witness alongside the classification.
2830
+ */
2831
+ baseline_values: Record<string, number>;
2832
+ /**
2833
+ * Variable-name → classification. Empty when baseline is
2834
+ * infeasible.
2835
+ */
2836
+ classifications: Record<string, VariableClassification$1>;
2837
+ message?: string | null;
2838
+ /** @format double */
2839
+ solve_time_ms: number;
2840
+ solver: string;
2841
+ /** Status reported by the solver. */
2842
+ status: SolutionStatus$1;
2843
+ }
2509
2844
  /** Request for safety classification (Phase 5). */
2510
2845
  interface ClassifySafetyRequest$1 {
2511
2846
  /** Text to classify for safety violations. */
@@ -2674,6 +3009,21 @@ interface CollectionResponse {
2674
3009
  /** Collection DTO */
2675
3010
  collection: CollectionDto$1;
2676
3011
  }
3012
+ /** Mapping between an OSF feature and a SQL column. */
3013
+ interface ColumnMappingDto$1 {
3014
+ /** SQL column name. */
3015
+ column: string;
3016
+ /** OSF feature name. */
3017
+ feature: string;
3018
+ /** Whether the column is nullable. */
3019
+ nullable?: boolean;
3020
+ /**
3021
+ * SQL type (e.g., "VARCHAR(255)", "INTEGER"). Omit or leave empty to have
3022
+ * the server introspect the real type from the registered source's live
3023
+ * schema (falls back to TEXT if the source isn't connected).
3024
+ */
3025
+ sql_type?: string;
3026
+ }
2677
3027
  /**
2678
3028
  * Request body for `POST /api/v1/flow-networks/{id}/commit` —
2679
3029
  * structural mutations applied in a single atomic step.
@@ -3041,6 +3391,40 @@ interface ConfirmResponseDto {
3041
3391
  }
3042
3392
  /** How to resolve feature conflicts when merging */
3043
3393
  type ConflictResolution$1 = "keep_existing" | "use_new" | "merge";
3394
+ /**
3395
+ * A concrete order-dependence counterexample: two rules that derive conflicting
3396
+ * values for a feature declared functional.
3397
+ */
3398
+ interface ConfluenceConflictDto {
3399
+ /** The two conflicting values the rules derive for the same entity. */
3400
+ conflicting_values: string[];
3401
+ /** The functional feature the two rules disagree on. */
3402
+ feature: string;
3403
+ /** The kind of conflict (currently always `"functional-dependency-violation"`). */
3404
+ kind: string;
3405
+ }
3406
+ /** Confluence (order-independence) half of the certificate. */
3407
+ interface ConfluenceDto {
3408
+ /** The concrete counterexample, when the rule base is not order-independent. */
3409
+ conflict?: null | ConfluenceConflictDto;
3410
+ /**
3411
+ * `true` iff forward reasoning produces the same result regardless of the
3412
+ * order rules fire in.
3413
+ */
3414
+ order_independent: boolean;
3415
+ /**
3416
+ * Why: `"monotone-least-fixpoint"`, `"congruence-closure"`, `"monotone-chase"`,
3417
+ * `"vacuous"`, `"branching"` (disjunctive rules explore multiple models), or
3418
+ * `"functional-conflict"` (a counterexample was found).
3419
+ */
3420
+ reason: string;
3421
+ /**
3422
+ * Number of rule interactions found (places one rule's output can trigger
3423
+ * another). All are order-safe when `order_independent` is `true`.
3424
+ * @min 0
3425
+ */
3426
+ rule_interactions: number;
3427
+ }
3044
3428
  /** A single constraint check in the verification result. */
3045
3429
  interface ConstraintCheckDto$1 {
3046
3430
  /** Description of the constraint. */
@@ -3211,6 +3595,8 @@ type ConstraintInputDto$1 = {
3211
3595
  relation: string;
3212
3596
  type: "Allen";
3213
3597
  };
3598
+ /** Comparison sense of a linear constraint. */
3599
+ type ConstraintSense$1 = "leq" | "geq" | "eq";
3214
3600
  /**
3215
3601
  * Session status information
3216
3602
  *
@@ -3771,6 +4157,66 @@ interface CreateStoreTermRequest$1 {
3771
4157
  features?: Record<string, object>;
3772
4158
  sort_id: string;
3773
4159
  }
4160
+ /**
4161
+ * Request to explicitly provision a new tenant.
4162
+ *
4163
+ * Until now tenants came into existence only implicitly, on first write. This
4164
+ * makes provisioning explicit: it materialises the tenant's inference state and
4165
+ * per-tenant sort hierarchy up front, and optionally seeds initial sorts. The
4166
+ * seeded sorts are real lattice insertions (not placeholders) — full
4167
+ * Marketplace-pack seeding is layered on later via the pack installer.
4168
+ */
4169
+ interface CreateTenantRequest$1 {
4170
+ /**
4171
+ * Optional owner user UUID for the tenant's initial state. Generated when omitted.
4172
+ * @format uuid
4173
+ */
4174
+ owner_user_id?: string | null;
4175
+ /** Optional sort names to seed into the new tenant's hierarchy as top-level sorts. */
4176
+ seed_sorts?: string[];
4177
+ /**
4178
+ * Optional explicit tenant UUID. A fresh UUID is generated when omitted.
4179
+ * @format uuid
4180
+ */
4181
+ tenant_id?: string | null;
4182
+ }
4183
+ /** Response for the create-tenant operation. */
4184
+ interface CreateTenantResponse$1 {
4185
+ /** `true` if the tenant was newly created; `false` if it already existed (idempotent). */
4186
+ created: boolean;
4187
+ /**
4188
+ * Number of seed sorts successfully inserted into the tenant hierarchy.
4189
+ * @min 0
4190
+ */
4191
+ seeded_sorts: number;
4192
+ /** The provisioned tenant UUID (echoes the request or the generated value). */
4193
+ tenant_id: string;
4194
+ }
4195
+ /** Request to create a term within a specific collection */
4196
+ interface CreateTermInCollectionRequest$1 {
4197
+ /**
4198
+ * Collection ID to add the term to
4199
+ * @format uuid
4200
+ */
4201
+ collection_id: string;
4202
+ /** Term features */
4203
+ features: Record<string, ValueDto$1>;
4204
+ /**
4205
+ * Namespace ID
4206
+ * @format uuid
4207
+ */
4208
+ namespace_id: string;
4209
+ /**
4210
+ * Sort ID for the term
4211
+ * @format uuid
4212
+ */
4213
+ sort_id: string;
4214
+ /**
4215
+ * Tenant ID
4216
+ * @format uuid
4217
+ */
4218
+ tenant_id: string;
4219
+ }
3774
4220
  /**
3775
4221
  * Request to create a term
3776
4222
  *
@@ -5535,6 +5981,11 @@ interface EmbeddingVerificationResponse$1 {
5535
5981
  /** Volume-specificity verification result. */
5536
5982
  specificity?: null | SpecificityDto$1;
5537
5983
  }
5984
+ /** Response to ending a session. */
5985
+ interface EndSchedulingResponse$1 {
5986
+ /** Whether a live session was removed. */
5987
+ ended: boolean;
5988
+ }
5538
5989
  /** Enriched health response with component statuses and build info */
5539
5990
  interface EnrichedHealthResponse$1 {
5540
5991
  /** Build info DTO */
@@ -6218,6 +6669,19 @@ interface ExternalActionSummaryDto$1 {
6218
6669
  /** Webhook URL */
6219
6670
  webhook_url: string;
6220
6671
  }
6672
+ /**
6673
+ * SKOS external-ontology alignment surfaced on a [`SortDto`] — e.g. a BFO/CCO
6674
+ * correspondence attached by the upper-ontology aligner. This makes each
6675
+ * alignment a live, queryable property of the sort, not a separate export.
6676
+ */
6677
+ interface ExternalMatchDto$1 {
6678
+ /** SKOS mapping relation: `exactMatch` | `closeMatch` | `broadMatch` | `narrowMatch`. */
6679
+ match_type: string;
6680
+ /** CURIE of the aligned external concept (e.g. `obo:BFO_0000023`). */
6681
+ ontology_id: string;
6682
+ /** How the match was discovered: `grounding` | `manual` | `import` | `inferred`. */
6683
+ source: string;
6684
+ }
6221
6685
  /**
6222
6686
  * Request to extract named entities from text using the tenant's sort hierarchy as labels.
6223
6687
  *
@@ -6583,10 +7047,16 @@ type FeatureConstraintDto = {
6583
7047
  interface FeatureDescriptorDto$1 {
6584
7048
  /** Custom OWL annotations for this feature (e.g., isIdentifier, unit, enumValues) */
6585
7049
  annotations?: Record<string, string>;
6586
- /** Optional constraint on the feature value */
7050
+ /**
7051
+ * Optional constraint on the feature value. Defaults to `None`
7052
+ * when absent so callers needn't send an explicit null.
7053
+ */
6587
7054
  constraint?: null | ConstraintDto$1;
6588
7055
  /**
6589
- * Expected sort for the feature value (for nested PSI-terms)
7056
+ * Expected sort for the feature value (for nested PSI-terms).
7057
+ * Optional — omit for a primitive/un-typed feature. Defaults to
7058
+ * `None` when absent from the request body so a minimal
7059
+ * `{"name", "required"}` descriptor deserializes.
6590
7060
  * @format uuid
6591
7061
  */
6592
7062
  expected_sort?: string | null;
@@ -6615,6 +7085,9 @@ interface FeatureDescriptorDto$1 {
6615
7085
  type FeatureInputValueDto$1 = {
6616
7086
  /** @format uuid */
6617
7087
  term_id: string;
7088
+ } | {
7089
+ /** @format uuid */
7090
+ sort_ref: string;
6618
7091
  } | {
6619
7092
  name: string;
6620
7093
  } | {
@@ -7108,6 +7581,15 @@ interface ForwardChainResponse$1 {
7108
7581
  */
7109
7582
  total_facts: number;
7110
7583
  }
7584
+ /** One migration item a human should review. */
7585
+ interface FoundryReviewItemDto$1 {
7586
+ /** What kind of item (`property_type`, `action_type`). */
7587
+ kind: string;
7588
+ /** The item's apiName. */
7589
+ name: string;
7590
+ /** Why it needs review. */
7591
+ reason: string;
7592
+ }
7111
7593
  /** Function body - what to compute */
7112
7594
  type FunctionBodyDto$1 = {
7113
7595
  type: "Value";
@@ -7129,6 +7611,57 @@ interface FunctionClauseDto$1 {
7129
7611
  guard?: null | GuardDto;
7130
7612
  parameters: PatternDto$1[];
7131
7613
  }
7614
+ /**
7615
+ * Typed signature summary for a single registered function.
7616
+ *
7617
+ * This is the OSF/LIFE realisation of a Palantir "Function Type" entry: a
7618
+ * function is a Ψ-term in the function sub-lattice, and its signature is the
7619
+ * arity plus the number of pattern-matched clauses (LIFE-style bidirectional
7620
+ * evaluation). Returned by the `GET /api/v1/functions` discovery endpoint so a
7621
+ * client (or the Studio Functions page) can enumerate callable functions
7622
+ * without evaluating them.
7623
+ */
7624
+ interface FunctionSummaryDto$1 {
7625
+ /**
7626
+ * Number of named arguments the function accepts.
7627
+ * @min 0
7628
+ */
7629
+ arity: number;
7630
+ /**
7631
+ * Number of pattern-matched clauses (tried in order during evaluation).
7632
+ * @min 0
7633
+ */
7634
+ clauses_count: number;
7635
+ /** Function name (the key used by `POST /functions/evaluate`). */
7636
+ name: string;
7637
+ }
7638
+ /** One projected function type. */
7639
+ interface FunctionTypeDto {
7640
+ /** Function name (Palantir function-type apiName). */
7641
+ apiName: string;
7642
+ /**
7643
+ * Number of named-feature parameters (the function's arity).
7644
+ * @min 0
7645
+ */
7646
+ arity: number;
7647
+ /**
7648
+ * Number of defining clauses (homoiconic rules) backing the function.
7649
+ * @min 0
7650
+ */
7651
+ clausesCount: number;
7652
+ /** Human-facing name (the function name). */
7653
+ displayName: string;
7654
+ }
7655
+ /** Response for `GET /api/v1/ontology/function-types`. */
7656
+ interface FunctionTypeListResponse$1 {
7657
+ /**
7658
+ * Number of function types returned.
7659
+ * @min 0
7660
+ */
7661
+ count: number;
7662
+ /** The projected function types, ordered by apiName. */
7663
+ functionTypes: FunctionTypeDto[];
7664
+ }
7132
7665
  /** Value type for literals */
7133
7666
  type FunctionValueDto$1 = {
7134
7667
  type: "Integer";
@@ -7595,6 +8128,16 @@ interface GFlowNetTrainResponse$1 {
7595
8128
  /** Whether training was triggered. */
7596
8129
  triggered: boolean;
7597
8130
  }
8131
+ interface GateRequest$1 {
8132
+ clearance: string;
8133
+ marking: string;
8134
+ }
8135
+ interface GateResponse$1 {
8136
+ clearance: string;
8137
+ decision: string;
8138
+ dominates: boolean;
8139
+ marking: string;
8140
+ }
7598
8141
  /**
7599
8142
  * GeneralConstraintDto
7600
8143
  * General constraint: Arithmetic, Basic {constraint_type, value}, Conjunction {constraints}, or Disjunction {constraints}
@@ -7848,6 +8391,27 @@ interface GenerationReportDto$1 {
7848
8391
  */
7849
8392
  validation_failures: number;
7850
8393
  }
8394
+ /**
8395
+ * Request body for `POST /api/v1/feasibility/sessions`. The
8396
+ * `choice_points` define the flat decision-variable layout (a binary choice ⇒
8397
+ * one boolean; an `n`-way choice ⇒ `n` one-hot vars + an implied exactly-one);
8398
+ * `constraints` are posted over those variables.
8399
+ */
8400
+ interface GenericModelRequest$1 {
8401
+ /** The decisions to explore, in order. Each must have `alternative_count ≥ 2`. */
8402
+ choice_points: ChoicePointDto$1[];
8403
+ /** The typed constraints over the flat decision variables. */
8404
+ constraints?: TypedConstraintDto[];
8405
+ /**
8406
+ * Optional linear objective to **maximize** (`Σ weight·var` over the true
8407
+ * decision variables), as `(var, weight)` terms. Empty ⇒ pure-feasibility
8408
+ * mode (the trichotomy over all feasible completions). Non-empty ⇒ optimize
8409
+ * mode: the trichotomy is taken over the **maximum-weight** completions and
8410
+ * the responses carry `total_score` (the optimum). A var absent from the
8411
+ * list has weight `0`; duplicate vars sum.
8412
+ */
8413
+ objective?: LinTermDto[];
8414
+ }
7851
8415
  /** Request to get agent state. */
7852
8416
  interface GetAgentStateRequest$1 {
7853
8417
  /**
@@ -8056,6 +8620,16 @@ interface GetResiduationsResponse$1 {
8056
8620
  residuations: ResiduationDetailDto$1[];
8057
8621
  term_id: string;
8058
8622
  }
8623
+ /** Response listing all rules for a tenant. */
8624
+ interface GetRulesResponse$1 {
8625
+ /**
8626
+ * Total count.
8627
+ * @min 0
8628
+ */
8629
+ count: number;
8630
+ /** The rules. */
8631
+ rules: RuleEntryDto$1[];
8632
+ }
8059
8633
  /** Response for GET /api/v1/scenarios/:id — retrieve a stored scenario. */
8060
8634
  interface GetScenarioResponse$1 {
8061
8635
  /** Agent TermId (if an agent was created). */
@@ -8508,6 +9082,28 @@ interface GroundTruthEntry$1 {
8508
9082
  term_id: string;
8509
9083
  }
8510
9084
  type GroundTruthStatus$1 = "Pending" | "Validated" | "Refuted" | "Unknown";
9085
+ /** Response from grounded NL schema generation. */
9086
+ interface GroundedSchemaResponse$1 {
9087
+ /**
9088
+ * Number of inference tools.
9089
+ * @min 0
9090
+ */
9091
+ inference_tools: number;
9092
+ /** Human-readable ontology summary. */
9093
+ ontology_summary: string;
9094
+ /**
9095
+ * Number of query tools generated.
9096
+ * @min 0
9097
+ */
9098
+ query_tools: number;
9099
+ /** System prompt for LLM grounding. */
9100
+ system_prompt: string;
9101
+ /**
9102
+ * Number of write tools generated.
9103
+ * @min 0
9104
+ */
9105
+ write_tools: number;
9106
+ }
8511
9107
  /** Statistics for entity grounding (linking to external ontologies) */
8512
9108
  interface GroundingStatsDto$1 {
8513
9109
  /**
@@ -8827,6 +9423,43 @@ interface ImpliesResponse$1 {
8827
9423
  /** True if implication holds (antecedent fails OR consequent succeeds) */
8828
9424
  result: boolean;
8829
9425
  }
9426
+ /** Request to import a Foundry ontology export (Q1.8). */
9427
+ interface ImportFoundryRequest$1 {
9428
+ /** The Foundry ontology export, as JSON. */
9429
+ foundry_json: string;
9430
+ }
9431
+ /** Response from a Foundry import: what was created + a mapped/review-needed report. */
9432
+ interface ImportFoundryResponse$1 {
9433
+ /**
9434
+ * Interface types mapped to (super) sorts.
9435
+ * @min 0
9436
+ */
9437
+ mapped_interface_types: number;
9438
+ /**
9439
+ * Link types mapped to referring features.
9440
+ * @min 0
9441
+ */
9442
+ mapped_links: number;
9443
+ /**
9444
+ * Object types mapped to sorts.
9445
+ * @min 0
9446
+ */
9447
+ mapped_object_types: number;
9448
+ /**
9449
+ * Properties mapped to features.
9450
+ * @min 0
9451
+ */
9452
+ mapped_properties: number;
9453
+ /**
9454
+ * Number of relations discovered from link types.
9455
+ * @min 0
9456
+ */
9457
+ relations_discovered: number;
9458
+ /** Items imported with a caveat or skipped — need human review. */
9459
+ review_needed: FoundryReviewItemDto$1[];
9460
+ /** Names of sorts created (object + interface types). */
9461
+ sorts_created: string[];
9462
+ }
8830
9463
  /** Request to import a module */
8831
9464
  interface ImportModuleRequest$1 {
8832
9465
  /** Optional alias for the import */
@@ -8843,6 +9476,23 @@ interface ImportModuleResponse$1 {
8843
9476
  importer_module: string;
8844
9477
  success: boolean;
8845
9478
  }
9479
+ /** Request to import an OWL/RDF ontology into the sort hierarchy. */
9480
+ interface ImportOwlRequest$1 {
9481
+ /** OWL/RDF XML content to import. */
9482
+ rdf_xml: string;
9483
+ }
9484
+ /** Response from an OWL ontology import. */
9485
+ interface ImportOwlResponse$1 {
9486
+ /** Names of reified sorts created (many-to-many with attributes). */
9487
+ reified_sorts_created: string[];
9488
+ /**
9489
+ * Number of relations discovered from OWL object properties.
9490
+ * @min 0
9491
+ */
9492
+ relations_discovered: number;
9493
+ /** Names of sorts created from OWL classes. */
9494
+ sorts_created: string[];
9495
+ }
8846
9496
  /** A message in the inbox. */
8847
9497
  interface InboxMessageDto {
8848
9498
  /** Message content (arbitrary JSON) */
@@ -9059,6 +9709,16 @@ interface IngestRdfRequest$1 {
9059
9709
  content: string;
9060
9710
  /** Format of the RDF content */
9061
9711
  format: RdfFormatDto$1;
9712
+ /**
9713
+ * Whether to materialise OWL/RDFS class & property *declarations*
9714
+ * (`:p a owl:DatatypeProperty`, `:C a owl:Class`) as queryable identity terms.
9715
+ *
9716
+ * Default `false` keeps declarations as schema (out of `?s ?p ?o`), the
9717
+ * established behaviour for ordinary ingest. Set `true` only for SPARQL OWL/RDFS
9718
+ * entailment workloads, where `?p a owl:DatatypeProperty` and `?c rdfs:subClassOf
9719
+ * ?d` must match declarations.
9720
+ */
9721
+ keep_declarations?: boolean;
9062
9722
  /** Whether to also parse OWL ontology from the content */
9063
9723
  parse_ontology?: boolean;
9064
9724
  /** Whether to also parse SHACL shapes from the content */
@@ -9610,6 +10270,29 @@ interface IntentionDto$1 {
9610
10270
  */
9611
10271
  status?: string;
9612
10272
  }
10273
+ /** One projected interface type — a non-maximal sort. */
10274
+ interface InterfaceTypeDto {
10275
+ /** Sort name (Palantir interface-type apiName). */
10276
+ apiName: string;
10277
+ /** Sort description, if any. */
10278
+ description?: string | null;
10279
+ /** Human-facing name (the sort name). */
10280
+ displayName: string;
10281
+ /** apiNames of supersorts that are themselves interfaces (extended interfaces). */
10282
+ extendsInterfaceTypes: string[];
10283
+ /** The appropriate scalar features that form the inherited contract. */
10284
+ properties: PropertyDto[];
10285
+ }
10286
+ /** Response for `GET /api/v1/ontology/interface-types`. */
10287
+ interface InterfaceTypeListResponse$1 {
10288
+ /**
10289
+ * Number of interface types returned.
10290
+ * @min 0
10291
+ */
10292
+ count: number;
10293
+ /** The projected interface types. */
10294
+ interfaceTypes: InterfaceTypeDto[];
10295
+ }
9613
10296
  interface InterventionObservationRequest$1 {
9614
10297
  /** Variables that changed after intervention */
9615
10298
  changed_variables: string[];
@@ -10352,6 +11035,73 @@ interface LeastSortsResponse {
10352
11035
  /** @format uuid */
10353
11036
  tenant_id: string;
10354
11037
  }
11038
+ /**
11039
+ * An integer-valued linear expression `constant + Σ coeff·var` over boolean
11040
+ * cells (each cell contributes its coefficient when set).
11041
+ */
11042
+ interface LinExprDto {
11043
+ /**
11044
+ * The constant addend.
11045
+ * @format int64
11046
+ */
11047
+ constant?: number;
11048
+ /** The `coeff·var` terms. */
11049
+ terms?: LinTermDto[];
11050
+ }
11051
+ /** One term `coeff · var` of a [`LinExprDto`]. */
11052
+ interface LinTermDto {
11053
+ /**
11054
+ * The integer coefficient.
11055
+ * @format int64
11056
+ */
11057
+ coeff: number;
11058
+ /**
11059
+ * The flat decision-variable index.
11060
+ * @min 0
11061
+ */
11062
+ var: number;
11063
+ }
11064
+ /**
11065
+ * A linear constraint `Σ coef_i · x_i (sense) rhs`. Variables not
11066
+ * referenced in `coefficients` are treated as if their coefficient is
11067
+ * zero.
11068
+ */
11069
+ interface LinearConstraint$2 {
11070
+ /** Variable-name → coefficient. */
11071
+ coefficients: Record<string, number>;
11072
+ /** Optional caller-supplied label, returned in error reports. */
11073
+ name?: string | null;
11074
+ /**
11075
+ * Right-hand side.
11076
+ * @format double
11077
+ */
11078
+ rhs: number;
11079
+ /** Comparison sense. */
11080
+ sense: ConstraintSense$1;
11081
+ }
11082
+ /** One projected link type — a referring feature from one sort to another. */
11083
+ interface LinkTypeDto {
11084
+ /** Qualified apiName `"<sort>.<feature>"`. */
11085
+ apiName: string;
11086
+ /** Cardinality — `ONE`, because OSF features are functional. */
11087
+ cardinality: string;
11088
+ /** The feature name. */
11089
+ displayName: string;
11090
+ /** The target object type (the feature's value sort). */
11091
+ linkedObjectTypeApiName: string;
11092
+ /** The source object type (the sort declaring the feature). */
11093
+ objectTypeApiName: string;
11094
+ }
11095
+ /** Response for `GET /api/v1/ontology/link-types`. */
11096
+ interface LinkTypeListResponse$1 {
11097
+ /**
11098
+ * Number of link types returned.
11099
+ * @min 0
11100
+ */
11101
+ count: number;
11102
+ /** The projected link types. */
11103
+ linkTypes: LinkTypeDto[];
11104
+ }
10355
11105
  /** Response for listing pending action reviews */
10356
11106
  interface ListActionReviewsResponse$1 {
10357
11107
  /** Whether there are more pages */
@@ -10374,6 +11124,11 @@ interface ListActionReviewsResponse$1 {
10374
11124
  */
10375
11125
  total: number;
10376
11126
  }
11127
+ /** Response listing all sort-table bindings. */
11128
+ interface ListBindingsResponse$1 {
11129
+ /** Active sort-table bindings. */
11130
+ bindings: BindingSummaryDto$1[];
11131
+ }
10377
11132
  /** Request to list available functions */
10378
11133
  interface ListEvalFunctionsRequest$1 {
10379
11134
  /** Optional category filter */
@@ -10398,6 +11153,16 @@ interface ListExternalActionsResponse$1 {
10398
11153
  */
10399
11154
  total: number;
10400
11155
  }
11156
+ /** Response from listing all functions registered for a tenant. */
11157
+ interface ListFunctionsResponse$1 {
11158
+ /** All functions registered for the requesting tenant, sorted by name. */
11159
+ functions: FunctionSummaryDto$1[];
11160
+ /**
11161
+ * Total count (equals `functions.len()`), surfaced for convenience.
11162
+ * @min 0
11163
+ */
11164
+ total: number;
11165
+ }
10401
11166
  /**
10402
11167
  * Response for listing saved goals.
10403
11168
  *
@@ -10438,6 +11203,9 @@ interface ListIngestionSessionsResponse$1 {
10438
11203
  */
10439
11204
  total: number;
10440
11205
  }
11206
+ interface ListLevelsResponse$1 {
11207
+ levels: ClassificationLevelDto$1[];
11208
+ }
10441
11209
  /** Response for listing patterns. */
10442
11210
  interface ListPatternsResponse$1 {
10443
11211
  /**
@@ -10526,6 +11294,16 @@ interface ListTenantsResponse$1 {
10526
11294
  /** All tenants that have data in the system */
10527
11295
  tenants: TenantInfo[];
10528
11296
  }
11297
+ /** A single literal `var = value` for a [`TypedConstraintDto::Forbid`] clause. */
11298
+ interface LitDto {
11299
+ /** The required polarity (`true` ⇒ the var is set, `false` ⇒ unset). */
11300
+ value: boolean;
11301
+ /**
11302
+ * The flat decision-variable index.
11303
+ * @min 0
11304
+ */
11305
+ var: number;
11306
+ }
10529
11307
  /**
10530
11308
  * A literal for NAF queries - a term with optional negation.
10531
11309
  *
@@ -10605,34 +11383,21 @@ interface MarkdownDocumentDto$1 {
10605
11383
  /** Optional metadata about the document */
10606
11384
  metadata?: null | DocumentMetadataDto$1;
10607
11385
  }
10608
- /** A matched entity from pure OSF search */
11386
+ /** An entity matched while resolving a stage. */
10609
11387
  interface MatchedEntityDto$1 {
10610
11388
  /**
10611
- * Community this entity belongs to
10612
- * @format uuid
10613
- */
10614
- community_id: string;
10615
- /** Key features as strings */
10616
- features: Record<string, string>;
10617
- /**
10618
- * Match degree (0.0-1.0)
11389
+ * Match confidence in [0, 1].
10619
11390
  * @format double
10620
11391
  */
10621
- match_degree: number;
10622
- /** Why this entity matched */
10623
- match_reason?: string | null;
10624
- /** Human-readable name (if available) */
10625
- name?: string | null;
10626
- /**
10627
- * Sort ID
10628
- * @format uuid
10629
- */
10630
- sort_id: string;
10631
- /**
10632
- * Term ID
10633
- * @format uuid
10634
- */
10635
- term_id: string;
11392
+ confidence: number;
11393
+ /** Why it matched (e.g. "exact", "fuzzy_glb", "salience"). */
11394
+ match_reason: string;
11395
+ /** Display label of the entity. */
11396
+ name: string;
11397
+ /** Sort name the entity belongs to. */
11398
+ sort_name: string;
11399
+ /** Optional TermId (string form). */
11400
+ term_id?: string | null;
10636
11401
  }
10637
11402
  /**
10638
11403
  * Snapshot of the per-tenant Phase 2 materialization sentinel for the
@@ -10724,6 +11489,59 @@ interface MaterializationSummaryDto$1 {
10724
11489
  */
10725
11490
  webhook_actions_created: number;
10726
11491
  }
11492
+ /**
11493
+ * Request body for `POST /api/v1/scenarios/materialize`.
11494
+ *
11495
+ * Materializes an already-generated scenario (e.g. the `scenario` payload from
11496
+ * `POST /api/v1/ontology/generate`) into the caller's knowledge base, exactly
11497
+ * as reviewed — sorts, belief instances, rules, goal, and the ontology-declared
11498
+ * engine pipeline. Unlike `create_scenario`, this does **not** call the LLM, so
11499
+ * the materialized graph is byte-for-byte what the client reviewed.
11500
+ */
11501
+ interface MaterializeScenarioRequest$1 {
11502
+ /** The domain `GeneratedScenario` JSON to materialize verbatim. */
11503
+ scenario: any;
11504
+ }
11505
+ /** Response for `POST /api/v1/scenarios/materialize`. */
11506
+ interface MaterializeScenarioResponse$1 {
11507
+ /**
11508
+ * Number of belief (instance) Ψ-terms created.
11509
+ * @min 0
11510
+ */
11511
+ beliefs_created: number;
11512
+ /**
11513
+ * Number of generic constraint terms created.
11514
+ * @min 0
11515
+ */
11516
+ constraints_created: number;
11517
+ /**
11518
+ * Number of ontology-declared `pipeline_stage` control-plane terms created.
11519
+ * @min 0
11520
+ */
11521
+ pipeline_stages_created: number;
11522
+ /**
11523
+ * Number of OSF relation edges (`Value::Reference` features) linking instances.
11524
+ * @min 0
11525
+ */
11526
+ relations_created: number;
11527
+ /**
11528
+ * Number of rule Ψ-terms created.
11529
+ * @min 0
11530
+ */
11531
+ rules_created: number;
11532
+ /**
11533
+ * Number of ontology-declared `llm_sensor_point` control-plane terms created.
11534
+ * @min 0
11535
+ */
11536
+ sensor_points_created: number;
11537
+ /**
11538
+ * Number of sorts created or reused.
11539
+ * @min 0
11540
+ */
11541
+ sorts_created: number;
11542
+ /** Non-fatal materialization warnings. */
11543
+ warnings: string[];
11544
+ }
10727
11545
  /** Request for math function */
10728
11546
  interface MathFunctionRequest$1 {
10729
11547
  /** Arguments (some may be uninstantiated for bidirectional solving) */
@@ -10973,6 +11791,81 @@ interface MetaSortsResponse$1 {
10973
11791
  * @format uuid
10974
11792
  */
10975
11793
  equality_constraint: string;
11794
+ /**
11795
+ * FD all-different constraint over a list of variables
11796
+ * @format uuid
11797
+ */
11798
+ fd_all_different_constraint: string;
11799
+ /**
11800
+ * FD arithmetic constraint
11801
+ * @format uuid
11802
+ */
11803
+ fd_arithmetic_constraint: string;
11804
+ /**
11805
+ * FD circuit (Hamiltonian) constraint
11806
+ * @format uuid
11807
+ */
11808
+ fd_circuit_constraint: string;
11809
+ /**
11810
+ * Parent sort for all CLP(FD) constraints
11811
+ * @format uuid
11812
+ */
11813
+ fd_constraint: string;
11814
+ /**
11815
+ * FD cumulative scheduling constraint
11816
+ * @format uuid
11817
+ */
11818
+ fd_cumulative_constraint: string;
11819
+ /**
11820
+ * FD disjunctive (no-overlap) constraint
11821
+ * @format uuid
11822
+ */
11823
+ fd_disjunctive_constraint: string;
11824
+ /**
11825
+ * FD domain constraint: variable ∈ [min, max]
11826
+ * @format uuid
11827
+ */
11828
+ fd_domain_constraint: string;
11829
+ /**
11830
+ * FD element constraint: list[index] = value
11831
+ * @format uuid
11832
+ */
11833
+ fd_element_constraint: string;
11834
+ /**
11835
+ * FD global-cardinality constraint
11836
+ * @format uuid
11837
+ */
11838
+ fd_global_cardinality_constraint: string;
11839
+ /**
11840
+ * FD in-set constraint: variable ∈ {values}
11841
+ * @format uuid
11842
+ */
11843
+ fd_in_constraint: string;
11844
+ /**
11845
+ * FD labeling: solve collected FD constraints
11846
+ * @format uuid
11847
+ */
11848
+ fd_labeling_constraint: string;
11849
+ /**
11850
+ * FD lex-chain constraint
11851
+ * @format uuid
11852
+ */
11853
+ fd_lex_chain_constraint: string;
11854
+ /**
11855
+ * FD reified constraint
11856
+ * @format uuid
11857
+ */
11858
+ fd_reified_constraint: string;
11859
+ /**
11860
+ * FD scalar-product constraint: Σ aᵢ·xᵢ ⋚ target
11861
+ * @format uuid
11862
+ */
11863
+ fd_scalar_product_constraint: string;
11864
+ /**
11865
+ * FD sum constraint: Σ vars ⋚ target
11866
+ * @format uuid
11867
+ */
11868
+ fd_sum_constraint: string;
10976
11869
  /**
10977
11870
  * Feature constraint (X.f .= Y)
10978
11871
  * @format uuid
@@ -10983,6 +11876,41 @@ interface MetaSortsResponse$1 {
10983
11876
  * @format uuid
10984
11877
  */
10985
11878
  findall_constraint: string;
11879
+ /**
11880
+ * Edge-classification (Dulmage-Mendelsohn) objective
11881
+ * @format uuid
11882
+ */
11883
+ flow_classify_edges_constraint: string;
11884
+ /**
11885
+ * Parent sort for all CLP(Flow) constraints
11886
+ * @format uuid
11887
+ */
11888
+ flow_constraint: string;
11889
+ /**
11890
+ * Flow-edge constraint: declares a capacitated directed edge
11891
+ * @format uuid
11892
+ */
11893
+ flow_edge_constraint: string;
11894
+ /**
11895
+ * Max-flow objective: bind `flow_value` to the source→sink flow
11896
+ * @format uuid
11897
+ */
11898
+ flow_max_constraint: string;
11899
+ /**
11900
+ * Min-cost-max-flow objective: bind flow value and total cost
11901
+ * @format uuid
11902
+ */
11903
+ flow_min_cost_max_flow_constraint: string;
11904
+ /**
11905
+ * Min-cut objective: bind cut value, edges, and partitions
11906
+ * @format uuid
11907
+ */
11908
+ flow_min_cut_constraint: string;
11909
+ /**
11910
+ * Flow-solve trigger: drains the flow store and runs the algorithm
11911
+ * @format uuid
11912
+ */
11913
+ flow_solve_constraint: string;
10986
11914
  /**
10987
11915
  * Forall constraint (universal quantification)
10988
11916
  * @format uuid
@@ -11627,7 +12555,7 @@ interface NeuroSymbolicStatusResponse$1 {
11627
12555
  status?: object | null;
11628
12556
  }
11629
12557
  /** Translation mode for NL queries */
11630
- type NlQueryMode$1 = "llm" | "constraint" | "cognitive" | "triz";
12558
+ type NlQueryMode$1 = "llm" | "constraint" | "cognitive" | "triz" | "grounded_sql";
11631
12559
  /** Natural language query request */
11632
12560
  interface NlQueryRequest$1 {
11633
12561
  /** Optional: confirm a TRIZ session (triggers invention pipeline) */
@@ -11683,7 +12611,14 @@ interface NlQueryResponse$1 {
11683
12611
  results: NlQueryResultItem$1[];
11684
12612
  /** Structured problem from TRIZ session (for user confirmation) */
11685
12613
  structured_problem?: any;
11686
- /** Whether the query was successful */
12614
+ /**
12615
+ * Whether the pipeline ran end-to-end without error.
12616
+ *
12617
+ * This is **not** a "found-results" flag — an empty `results` array
12618
+ * is a perfectly valid outcome for a query that ran fine but had
12619
+ * no matches in the term store. Use `results.is_empty()` to test
12620
+ * for empty matches, and check `error` for actual failures.
12621
+ */
11687
12622
  success: boolean;
11688
12623
  /** Tool call info (constraint mode) */
11689
12624
  tool_call?: null | ToolCallInfo$1;
@@ -11737,6 +12672,43 @@ type NumberValueDto$1 = {
11737
12672
  /** @format double */
11738
12673
  value: number;
11739
12674
  };
12675
+ /** One projected object type. */
12676
+ interface ObjectTypeDto {
12677
+ /** Sort name (Palantir object-type apiName). */
12678
+ apiName: string;
12679
+ /** Sort description, if any. */
12680
+ description?: string | null;
12681
+ /** Human-facing name (the sort name). */
12682
+ displayName: string;
12683
+ /** apiNames of the supersorts this sort refines (the interfaces it implements). */
12684
+ implementsInterfaceTypes: string[];
12685
+ /** Primary key — Ψ-terms are identified by their `TermId`. */
12686
+ primaryKey: string[];
12687
+ /** Appropriate scalar features projected as properties. */
12688
+ properties: PropertyDto[];
12689
+ /** Lifecycle status — always `ACTIVE` for a live sort. */
12690
+ status: string;
12691
+ }
12692
+ /** Response for `GET /api/v1/ontology/object-types`. */
12693
+ interface ObjectTypeListResponse$1 {
12694
+ /**
12695
+ * Number of object types returned.
12696
+ * @min 0
12697
+ */
12698
+ count: number;
12699
+ /** The projected object types. */
12700
+ objectTypes: ObjectTypeDto[];
12701
+ }
12702
+ /** Linear objective. Omit to run feasibility-only. */
12703
+ interface Objective$1 {
12704
+ coefficients?: Record<string, number>;
12705
+ /** @format double */
12706
+ constant?: number;
12707
+ /** Direction of the objective function. */
12708
+ sense: ObjectiveSense$1;
12709
+ }
12710
+ /** Direction of the objective function. */
12711
+ type ObjectiveSense$1 = "minimize" | "maximize";
11740
12712
  interface ObserveMultiRequest$1 {
11741
12713
  /** Map of variable name to value */
11742
12714
  observations: Record<string, number>;
@@ -12079,6 +13051,14 @@ interface OsfqlRequest$1 {
12079
13051
  * ```
12080
13052
  */
12081
13053
  query: string;
13054
+ /**
13055
+ * Opt into **reactive (streaming) mode**: after the program runs, any
13056
+ * suspended `AWAIT` demon whose trigger is now satisfied fires
13057
+ * automatically — no explicit `RELEASE RESIDUATIONS` needed. Defaults to
13058
+ * `false` (demons stay suspended until an explicit RELEASE), so existing
13059
+ * clients are byte-identical.
13060
+ */
13061
+ reactive?: boolean;
12082
13062
  }
12083
13063
  /** Response from executing an OSFQL program. */
12084
13064
  interface OsfqlResponse$1 {
@@ -12144,6 +13124,15 @@ interface OversightAlertDto$1 {
12144
13124
  */
12145
13125
  step_index: number;
12146
13126
  }
13127
+ /** A typed action parameter (named feature with an appropriateness type). */
13128
+ interface ParamSpecDto {
13129
+ /** Feature name. */
13130
+ name: string;
13131
+ /** Appropriateness type: `integer`, `real`, `string`, `boolean`, or `any`. */
13132
+ param_type: string;
13133
+ /** Whether the input must be bound for the action to be `Ready`. */
13134
+ required?: boolean;
13135
+ }
12147
13136
  /** Metadata extracted from a parsed document */
12148
13137
  interface ParsedDocumentMetadataDto$1 {
12149
13138
  /** Document author */
@@ -12845,6 +13834,20 @@ interface ProofTraceDto$1 {
12845
13834
  /** Suggested fixes from the proof engine */
12846
13835
  suggestions: FixSuggestionDto$1[];
12847
13836
  }
13837
+ /**
13838
+ * A projected property — one appropriate *scalar* feature of a sort.
13839
+ *
13840
+ * Referring features (whose value is another sort) are projected as
13841
+ * [`link_types`] instead, so they never appear here.
13842
+ */
13843
+ interface PropertyDto {
13844
+ /** The feature name (Palantir property apiName). */
13845
+ apiName: string;
13846
+ /** The declared value-type hint, or `"string"` when unspecified. */
13847
+ dataType: string;
13848
+ /** Whether the feature is required by the sort's appropriateness conditions. */
13849
+ required: boolean;
13850
+ }
12848
13851
  /** A single provenance entry mapping a citation to a source fact. */
12849
13852
  interface ProvenanceDto {
12850
13853
  /** Human-readable description of the source. */
@@ -13071,7 +14074,7 @@ interface QueueMetricsResponse {
13071
14074
  worker_utilization_pct?: number | null;
13072
14075
  }
13073
14076
  /** RDF format DTO */
13074
- type RdfFormatDto$1 = "turtle" | "n_triples" | "rdf_xml" | "json_ld";
14077
+ type RdfFormatDto$1 = "turtle" | "n_triples" | "rdf_xml" | "json_ld" | "trig" | "nquads";
13075
14078
  /** Request to re-extract entities from a document */
13076
14079
  interface ReExtractRequest$1 {
13077
14080
  /** Document ID to re-extract from */
@@ -13106,6 +14109,18 @@ interface ReExtractResponse {
13106
14109
  */
13107
14110
  pending_review_count: number;
13108
14111
  }
14112
+ interface ReadableTermDto$1 {
14113
+ id: string;
14114
+ marking: string;
14115
+ }
14116
+ interface ReadableTermsResponse$1 {
14117
+ clearance: string;
14118
+ readable: ReadableTermDto$1[];
14119
+ /** @min 0 */
14120
+ readable_count: number;
14121
+ /** @min 0 */
14122
+ withheld_count: number;
14123
+ }
13109
14124
  /** Response payload for `POST /api/v1/admin/derived-facts/rebuild/{tenant_id}`. */
13110
14125
  interface RebuildDerivedFactsResponse {
13111
14126
  /**
@@ -13649,7 +14664,7 @@ interface ResiduationGoalDto$1 {
13649
14664
  result_target?: string | null;
13650
14665
  }
13651
14666
  /** Kind of residuation to visualize */
13652
- type ResiduationKind$1 = "inference" | "fuzzy" | "extraction" | "all";
14667
+ type ResiduationKind$1 = "inference" | "fuzzy" | "extraction" | "naf_failure" | "all";
13653
14668
  /** Request for residuation check */
13654
14669
  interface ResiduationRequest$1 {
13655
14670
  /**
@@ -14483,6 +15498,18 @@ interface RuleAggregatorDto {
14483
15498
  /** Feature name whose value is aggregated within each group. */
14484
15499
  target: string;
14485
15500
  }
15501
+ /** The full certification result returned to the caller. */
15502
+ interface RuleBaseCertificateDto {
15503
+ /** The order-independence guarantee (or the conflicting rule pair). */
15504
+ confluence: ConfluenceDto;
15505
+ /**
15506
+ * `true` iff the rule base both terminates and is order-independent — the
15507
+ * complete "won't loop, order-independent" guarantee.
15508
+ */
15509
+ fully_certified: boolean;
15510
+ /** The termination guarantee (or why it could not be established). */
15511
+ termination: TerminationDto;
15512
+ }
14486
15513
  /** A rule clause (OSF clause) */
14487
15514
  interface RuleClauseDto$1 {
14488
15515
  /** Constraints on variables in this clause */
@@ -14511,6 +15538,23 @@ interface RuleDto$1 {
14511
15538
  id: string;
14512
15539
  is_fact: boolean;
14513
15540
  }
15541
+ /** A single rule entry with head, body, and optional certainty. */
15542
+ interface RuleEntryDto$1 {
15543
+ /** The body (antecedents) of the rule. */
15544
+ body: PsiTermDto$1[];
15545
+ /**
15546
+ * Optional certainty/confidence for the rule.
15547
+ * @format double
15548
+ */
15549
+ certainty?: number | null;
15550
+ /** The head (consequent) of the rule. */
15551
+ head: PsiTermDto$1;
15552
+ /**
15553
+ * Rule term ID.
15554
+ * @format uuid
15555
+ */
15556
+ rule_id: string;
15557
+ }
14514
15558
  /** Response with rule store info */
14515
15559
  interface RuleStoreResponse$1 {
14516
15560
  /** @min 0 */
@@ -14661,6 +15705,26 @@ interface ScenarioSummaryDto$1 {
14661
15705
  */
14662
15706
  sorts_created: number;
14663
15707
  }
15708
+ /**
15709
+ * Response to a pin: the cells whose class changed, plus the full updated
15710
+ * classification for convenience.
15711
+ */
15712
+ interface SchedulingDeltaResponse$1 {
15713
+ /** The full classification after the pin. */
15714
+ classification: ClassificationDto;
15715
+ /** Cells that became `confirmed_false` on this pin. */
15716
+ newly_confirmed_false: number[];
15717
+ /** Cells that became `confirmed_true` on this pin (incl. the pinned cell). */
15718
+ newly_confirmed_true: number[];
15719
+ /**
15720
+ * In optimize mode, the optimum `Σ weight·var` after this assumption;
15721
+ * absent for pure-feasibility models. The optimum can drop as pins shrink
15722
+ * the optimal set, so always trust `classification` (the full state) for
15723
+ * repaint — the optimize delta can also un-confirm cells.
15724
+ * @format int64
15725
+ */
15726
+ total_score?: number | null;
15727
+ }
14664
15728
  /**
14665
15729
  * A scheduling feasibility request.
14666
15730
  *
@@ -14752,6 +15816,20 @@ interface SchedulingOptimizeResponse$1 {
14752
15816
  */
14753
15817
  total_score: number;
14754
15818
  }
15819
+ /** Response carrying a session id and its current classification. */
15820
+ interface SchedulingSessionResponse$1 {
15821
+ /** The current per-cell trichotomy. */
15822
+ classification: ClassificationDto;
15823
+ /** Opaque session id. */
15824
+ session_id: string;
15825
+ /**
15826
+ * In optimize mode (the request carried an `objective`), the optimum
15827
+ * `Σ weight·var` over the optimal completions at the current pins; absent
15828
+ * for pure-feasibility models.
15829
+ * @format int64
15830
+ */
15831
+ total_score?: number | null;
15832
+ }
14755
15833
  /** Top-level request status. */
14756
15834
  type SchedulingStatusDto = "feasible" | "infeasible";
14757
15835
  /** Request to search communities */
@@ -15222,6 +16300,8 @@ interface SolutionDto$1 {
15222
16300
  /** The substitution that satisfies the query */
15223
16301
  substitution: HomoiconicSubstitutionDto$1;
15224
16302
  }
16303
+ /** Status reported by the solver. */
16304
+ type SolutionStatus$1 = "optimal" | "feasible" | "infeasible" | "unbounded" | "unknown";
15225
16305
  /** Request to solve a constraint problem */
15226
16306
  interface SolveConstraintRequest$1 {
15227
16307
  constraints: ArithmeticConstraintDto$1[];
@@ -15263,6 +16343,66 @@ interface SolveFlowNetworkResponse$1 {
15263
16343
  */
15264
16344
  total_flow?: number | null;
15265
16345
  }
16346
+ /** Request body for `POST /api/v1/solver/solve`. */
16347
+ interface SolveProblemRequest$1 {
16348
+ constraints?: LinearConstraint$2[];
16349
+ /**
16350
+ * Relative MIP gap tolerance (e.g. `0.01` for 1 %). `0.0` means
16351
+ * "solve to proven optimum".
16352
+ * @format double
16353
+ */
16354
+ gap_tolerance?: number | null;
16355
+ /**
16356
+ * Backend-selection hint. `Auto` (default) routes CP-SAT for fully
16357
+ * discrete problems and HiGHS for any continuous variable.
16358
+ */
16359
+ hint?: SolverHint$1;
16360
+ objective?: null | Objective$1;
16361
+ /**
16362
+ * Wall-clock limit per solve, in milliseconds. Defaults server-side
16363
+ * to 30 000.
16364
+ * @format int64
16365
+ * @min 0
16366
+ */
16367
+ time_limit_ms?: number | null;
16368
+ variables: VariableSpec$1[];
16369
+ }
16370
+ /** Response body for `POST /api/v1/solver/solve`. */
16371
+ interface SolveProblemResponse$1 {
16372
+ /** Optional diagnostic message (e.g. when status is `Unknown`). */
16373
+ message?: string | null;
16374
+ /** @format double */
16375
+ objective_value?: number | null;
16376
+ /**
16377
+ * Wall-clock solve time inside the solver service, in milliseconds.
16378
+ * @format double
16379
+ */
16380
+ solve_time_ms: number;
16381
+ /** `"cp_sat"` or `"highs"`. */
16382
+ solver: string;
16383
+ /** Status reported by the solver. */
16384
+ status: SolutionStatus$1;
16385
+ /** Variable-name → optimal value. Empty for infeasible/unbounded. */
16386
+ values: Record<string, number>;
16387
+ }
16388
+ /**
16389
+ * Response body for `GET /api/v1/solver/health`. Typed so the OpenAPI
16390
+ * audit (`openapi_audit::should_have_no_untyped_response_bodies`)
16391
+ * stays green — a liveness probe still gets a schema-described shape
16392
+ * rather than an opaque `serde_json::Value`.
16393
+ */
16394
+ interface SolverHealthResponse$1 {
16395
+ /**
16396
+ * Liveness marker — `"ok"` when the upstream solver service
16397
+ * responded with a 2xx to its `/health` endpoint.
16398
+ */
16399
+ status: string;
16400
+ }
16401
+ /**
16402
+ * Backend-selection hint. `Auto` (default) routes CP-SAT for fully
16403
+ * discrete problems and HiGHS for any continuous variable.
16404
+ */
16405
+ type SolverHint$1 = "auto" | "prefer_cp" | "prefer_lp";
15266
16406
  /** Response with ancestor sorts */
15267
16407
  interface SortAncestorsResponse {
15268
16408
  ancestors: SortInfoDto$1[];
@@ -15464,6 +16604,12 @@ interface SortDto$1 {
15464
16604
  bound_constraints?: BoundConstraintDto$1[];
15465
16605
  /** Human-readable description for semantic search */
15466
16606
  description?: string | null;
16607
+ /**
16608
+ * SKOS external-ontology alignments (e.g. BFO/CCO) attached to this sort.
16609
+ * Populated by the upper-ontology aligner; makes each correspondence a live,
16610
+ * queryable property of the sort rather than a separate static export.
16611
+ */
16612
+ external_matches?: ExternalMatchDto$1[];
15467
16613
  /** Feature declarations that define the sort's schema */
15468
16614
  feature_declarations?: FeatureDescriptorDto$1[];
15469
16615
  /**
@@ -16757,6 +17903,29 @@ interface TemporalPlanResponse$1 {
16757
17903
  /** Selected term IDs in temporal order */
16758
17904
  selected_term_ids: string[];
16759
17905
  }
17906
+ /**
17907
+ * A temporal rule over one agent's ordered slot timeline (mirrors the domain
17908
+ * `TemporalRule`). Tagged by `type`.
17909
+ */
17910
+ type TemporalRuleDto = {
17911
+ type: "no_consec";
17912
+ } | {
17913
+ /** Whether at most one slot may be worked per day. */
17914
+ max_1_shift_per_day: boolean;
17915
+ /**
17916
+ * Worked-slot (or worked-day) cap.
17917
+ * @min 0
17918
+ */
17919
+ max_days: number;
17920
+ type: "capacity";
17921
+ } | {
17922
+ /**
17923
+ * Maximum consecutive worked nights.
17924
+ * @min 0
17925
+ */
17926
+ k: number;
17927
+ type: "max_consecutive_nights";
17928
+ };
16760
17929
  /** Variable-length temporal feature sequence in row-major form. */
16761
17930
  interface TemporalSequenceDto {
16762
17931
  /** Row-major buffer of length `seq_len * input_dim`. */
@@ -16829,6 +17998,17 @@ interface TermDto$1 {
16829
17998
  */
16830
17999
  tenant_id: string;
16831
18000
  }
18001
+ /** One edit in the action's atomic multi-term batch. */
18002
+ type TermEditDto = {
18003
+ /** Create or overwrite a term (reuses the standard term-creation body). */
18004
+ put: CreateTermRequest$1;
18005
+ } | {
18006
+ /**
18007
+ * Remove an existing term by id.
18008
+ * @format uuid
18009
+ */
18010
+ remove: string;
18011
+ };
16832
18012
  /** Response for term existence check */
16833
18013
  interface TermExistsResponse {
16834
18014
  /** Whether the term exists */
@@ -16917,6 +18097,36 @@ interface TermTranslationDto {
16917
18097
  copied_id: string;
16918
18098
  original_id: string;
16919
18099
  }
18100
+ /** Termination half of the certificate. */
18101
+ interface TerminationDto {
18102
+ /**
18103
+ * Whether any rule invents fresh values (creating new entities), present only
18104
+ * when established via the ranking function.
18105
+ */
18106
+ creates_new_values?: boolean | null;
18107
+ /**
18108
+ * When termination could not be established and an obstruction was found, the
18109
+ * human-readable cycle of interacting positions that can grow without bound.
18110
+ */
18111
+ diverging_cycle?: any[] | null;
18112
+ /**
18113
+ * The deepest chain of freshly-created values any reasoning step can produce
18114
+ * (the ranking-function bound). `0` means the rules never invent new values
18115
+ * — reasoning is bounded by the existing data. Present only when terminating
18116
+ * via the ranking function.
18117
+ * @format int32
18118
+ * @min 0
18119
+ */
18120
+ max_recursion_depth?: number | null;
18121
+ /**
18122
+ * How termination was established: `"bounded-recursion"` (a ranking function
18123
+ * bounds value creation), `"decidable-fragment:<name>"` (a recognised
18124
+ * terminating rule class), or `"undetermined"`.
18125
+ */
18126
+ method: string;
18127
+ /** `true` iff forward reasoning is guaranteed to reach a fixpoint. */
18128
+ terminates: boolean;
18129
+ }
16920
18130
  /** Threshold-based weak anchor for an antecedent gate. */
16921
18131
  interface ThresholdAnchorDto {
16922
18132
  /**
@@ -17132,6 +18342,27 @@ interface TrajectoryStepDto$1 {
17132
18342
  /** Specific tool identifier (if different from action) */
17133
18343
  tool_used?: string | null;
17134
18344
  }
18345
+ /** Request to transpile an OSFQL query to SQL. */
18346
+ interface TranspileRequest$1 {
18347
+ /** SQL dialect: "postgres", "mysql", or "sqlite". */
18348
+ dialect?: string;
18349
+ /** OSFQL query to transpile. */
18350
+ osfql: string;
18351
+ }
18352
+ /** Response from OSFQL-to-SQL transpilation. */
18353
+ interface TranspileResponse$1 {
18354
+ /** Whether the entire plan is SQL-transpilable. */
18355
+ fully_transpilable: boolean;
18356
+ /**
18357
+ * Number of parameters in the generated SQL.
18358
+ * @min 0
18359
+ */
18360
+ param_count: number;
18361
+ /** Source ID the query targets. */
18362
+ source_id?: string | null;
18363
+ /** Generated SQL query. */
18364
+ sql: string;
18365
+ }
17135
18366
  /** Request for trigger dependency graph */
17136
18367
  interface TriggerDependencyRequest$1 {
17137
18368
  /** Whether to generate DOT output */
@@ -17213,6 +18444,63 @@ interface TrizRecordOutcomeResponse {
17213
18444
  */
17214
18445
  updated_confidence: number;
17215
18446
  }
18447
+ /**
18448
+ * One structured constraint over the flat decision variables (mirrors the
18449
+ * domain `TypedConstraint`). Tagged by `type`; variable ids are flat indices
18450
+ * the caller assigns (the choice-point layout defines the ranges).
18451
+ */
18452
+ type TypedConstraintDto = {
18453
+ /**
18454
+ * Optional upper bound (`null` = none).
18455
+ * @min 0
18456
+ */
18457
+ max?: number | null;
18458
+ /**
18459
+ * Lower bound (`0` = none).
18460
+ * @min 0
18461
+ */
18462
+ min: number;
18463
+ type: "global_cardinality";
18464
+ /** The variables summed. */
18465
+ vars: number[];
18466
+ } | {
18467
+ /** The literals of the clause. */
18468
+ lits: LitDto[];
18469
+ type: "forbid";
18470
+ } | {
18471
+ type: "pin";
18472
+ /**
18473
+ * The variable to fix `true`.
18474
+ * @min 0
18475
+ */
18476
+ var: number;
18477
+ } | {
18478
+ /** `available[L]` — `false` where the slot is structurally unavailable. */
18479
+ available: boolean[];
18480
+ /**
18481
+ * Days in the timeline.
18482
+ * @min 0
18483
+ */
18484
+ days: number;
18485
+ /** Temporal rules enforced over the timeline. */
18486
+ rules: TemporalRuleDto[];
18487
+ /**
18488
+ * Shifts per day.
18489
+ * @min 0
18490
+ */
18491
+ shifts: number;
18492
+ type: "regular";
18493
+ /** The agent's variables in slot order. */
18494
+ vars: number[];
18495
+ } | {
18496
+ type: "all_different";
18497
+ /** The mutually-exclusive variables. */
18498
+ vars: number[];
18499
+ } | {
18500
+ /** The boolean-valued expression asserted true. */
18501
+ expr: BoolExprDto;
18502
+ type: "arithmetic";
18503
+ };
17216
18504
  /** DTO for UIAction — all actions reference OSFQL execution */
17217
18505
  type UIActionDto$1 = {
17218
18506
  field_types: Record<string, string>;
@@ -17789,7 +19077,7 @@ type ValidationTypeDto$1 = {
17789
19077
  /**
17790
19078
  * ValueDto
17791
19079
  * Value in a term feature. Discriminated by 'type' field.
17792
- * Variants: String, Integer, Real, Boolean, Uninstantiated, Reference, List, FuzzyScalar, FuzzyNumber, Set.
19080
+ * Variants: String, Integer, Real, Boolean, Uninstantiated, Reference, SortId, List, FuzzyScalar, FuzzyNumber, Set.
17793
19081
  */
17794
19082
  type ValueDto$1 = {
17795
19083
  type: "String";
@@ -17811,9 +19099,19 @@ type ValueDto$1 = {
17811
19099
  type: "Reference";
17812
19100
  /** @format uuid */
17813
19101
  value: string;
19102
+ } | {
19103
+ type: "SortId";
19104
+ /** @format uuid */
19105
+ value: string;
17814
19106
  } | {
17815
19107
  type: "List";
17816
19108
  value: ValueDto$1[];
19109
+ } | {
19110
+ type: "Domain";
19111
+ value: ValueDto$1[];
19112
+ } | {
19113
+ type: "Choice";
19114
+ value: ValueDto$1[];
17817
19115
  } | {
17818
19116
  type: "FuzzyScalar";
17819
19117
  value: {
@@ -17871,6 +19169,17 @@ type ValuePatternDto$1 = {
17871
19169
  type: "bind";
17872
19170
  variable: string;
17873
19171
  };
19172
+ /**
19173
+ * Domain of a variable. CP-SAT handles `Integer` and `Binary`; HiGHS
19174
+ * handles all three. The solver service picks the backend based on the
19175
+ * `hint` field and the variable kinds present.
19176
+ */
19177
+ type VarKind$1 = "continuous" | "integer" | "binary";
19178
+ /**
19179
+ * Per-variable classification — the ILP analog of flow's edge
19180
+ * classification (Dulmage-Mendelsohn).
19181
+ */
19182
+ type VariableClassification$1 = "always_used" | "sometimes_used" | "never_used";
17874
19183
  /**
17875
19184
  * Feasibility of a single binary variable in the constraint space.
17876
19185
  *
@@ -17904,6 +19213,27 @@ interface VariableFeasibilityDto$1 {
17904
19213
  */
17905
19214
  verified?: boolean;
17906
19215
  }
19216
+ /**
19217
+ * A single decision variable. Names must be unique within a problem
19218
+ * and are echoed verbatim in the response `values` map.
19219
+ */
19220
+ interface VariableSpec$1 {
19221
+ /** Variable kind. Defaults to `Continuous`. */
19222
+ kind?: VarKind$1;
19223
+ /**
19224
+ * Lower bound. Use `f64::NEG_INFINITY` for unbounded below.
19225
+ * @format double
19226
+ */
19227
+ lower_bound?: number;
19228
+ /** Caller-chosen identifier. Must be unique. */
19229
+ name: string;
19230
+ /**
19231
+ * Upper bound. Use `f64::INFINITY` for unbounded above. Ignored
19232
+ * for `Binary` (forced to 1).
19233
+ * @format double
19234
+ */
19235
+ upper_bound?: number;
19236
+ }
17907
19237
  /** Result of verbalizing a single PsiTerm. */
17908
19238
  interface VerbalizationResultDto$1 {
17909
19239
  /**
@@ -20294,7 +21624,7 @@ declare namespace terms {
20294
21624
  }
20295
21625
 
20296
21626
  /** Translation mode for natural language queries. */
20297
- type NlQueryMode = 'llm' | 'constraint' | 'cognitive' | 'triz';
21627
+ type NlQueryMode = 'llm' | 'constraint' | 'cognitive' | 'triz' | 'grounded_sql';
20298
21628
  /** A result item from a natural language query. */
20299
21629
  interface NlQueryResultItem {
20300
21630
  /** Term ID. */
@@ -20349,20 +21679,16 @@ interface OsfSearchRequest {
20349
21679
  * A matched entity in a structured search result.
20350
21680
  */
20351
21681
  interface MatchedEntityDto {
20352
- /** Term ID. */
20353
- termId: string;
20354
- /** Sort ID. */
20355
- sortId: string;
20356
- /** Community this entity belongs to. */
20357
- communityId: string;
20358
- /** Human-readable name (if available). */
20359
- name?: string | null;
20360
- /** Key features as strings. */
20361
- features: Record<string, string>;
20362
- /** Match degree (0.0-1.0). */
20363
- matchDegree: number;
20364
- /** Why this entity matched. */
20365
- matchReason?: string | null;
21682
+ /** Match confidence in [0, 1]. */
21683
+ confidence: number;
21684
+ /** Why it matched (e.g. `"exact"`, `"fuzzy_glb"`, `"salience"`). */
21685
+ matchReason: string;
21686
+ /** Display label of the entity. */
21687
+ name: string;
21688
+ /** Sort name the entity belongs to. */
21689
+ sortName: string;
21690
+ /** Optional term ID (string form). */
21691
+ termId?: string | null;
20366
21692
  }
20367
21693
  /**
20368
21694
  * A discovered relation between entities in a structured search result.
@@ -21227,6 +22553,16 @@ declare class Inference<SecurityDataType = unknown> {
21227
22553
  * @secure
21228
22554
  */
21229
22555
  getMetaSorts: (params?: RequestParams) => Promise<HttpResponse<MetaSortsResponse$1, any>>;
22556
+ /**
22557
+ * @description # Authorization Requires X-Tenant-Id header.
22558
+ *
22559
+ * @tags inference
22560
+ * @name GetRules
22561
+ * @summary Get all rules (clauses with antecedents) for a tenant
22562
+ * @request GET:/api/v1/inference/rules/{tenant_id}
22563
+ * @secure
22564
+ */
22565
+ getRules: (tenantId: string, params?: RequestParams) => Promise<HttpResponse<GetRulesResponse$1, any>>;
21230
22566
  /**
21231
22567
  * @description # TRUE HOMOICONICITY Goals are Ψ-terms persisted to PostgreSQL. This endpoint returns all goals for the authenticated tenant with summary information. # Authorization Requires X-Tenant-Id header.
21232
22568
  *
@@ -21829,6 +23165,30 @@ interface ListGoalsResponse {
21829
23165
  /** List of saved goals. */
21830
23166
  goals: GoalSummaryDto[];
21831
23167
  }
23168
+ /**
23169
+ * A single stored rule (clause with antecedents).
23170
+ *
23171
+ * @remarks
23172
+ * Both `head` and `body` are homoiconic {@link PsiTermDto} values
23173
+ * (untagged feature-value representation).
23174
+ */
23175
+ interface RuleEntryDto {
23176
+ /** Rule term ID (UUID). */
23177
+ ruleId: string;
23178
+ /** The head (consequent) of the rule. */
23179
+ head: PsiTermDto;
23180
+ /** The body (antecedents) of the rule. */
23181
+ body: PsiTermDto[];
23182
+ /** Optional certainty/confidence for the rule. */
23183
+ certainty?: number | null;
23184
+ }
23185
+ /** Response listing all rules for a tenant. */
23186
+ interface GetRulesResponse {
23187
+ /** Total number of rules. */
23188
+ count: number;
23189
+ /** The rules (clauses with antecedents). */
23190
+ rules: RuleEntryDto[];
23191
+ }
21832
23192
  /**
21833
23193
  * Response listing the meta-sorts (built-in system sorts) for inference.
21834
23194
  *
@@ -22038,6 +23398,7 @@ type inference_ForwardChainResponse = ForwardChainResponse;
22038
23398
  type inference_FuzzyProveRequest = FuzzyProveRequest;
22039
23399
  type inference_FuzzyProveResponse = FuzzyProveResponse;
22040
23400
  type inference_GetFactsResponse = GetFactsResponse;
23401
+ type inference_GetRulesResponse = GetRulesResponse;
22041
23402
  type inference_GoalDto = GoalDto;
22042
23403
  type inference_GoalSummaryDto = GoalSummaryDto;
22043
23404
  type inference_GuardOp = GuardOp;
@@ -22049,12 +23410,13 @@ type inference_NafProveRequest = NafProveRequest;
22049
23410
  type inference_NafProveResponse = NafProveResponse;
22050
23411
  type inference_ProofDto = ProofDto;
22051
23412
  type inference_ProvenanceTagDto = ProvenanceTagDto;
23413
+ type inference_RuleEntryDto = RuleEntryDto;
22052
23414
  type inference_SolutionDto = SolutionDto;
22053
23415
  type inference_TaggedDerivedFact = TaggedDerivedFact;
22054
23416
  type inference_TaggedForwardChainRequest = TaggedForwardChainRequest;
22055
23417
  type inference_TaggedForwardChainResponse = TaggedForwardChainResponse;
22056
23418
  declare namespace inference {
22057
- 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_ClearFactsResponse as ClearFactsResponse, inference_ConstraintInputDto as ConstraintInputDto, inference_CreateGoalRequest as CreateGoalRequest, inference_CreateGoalResponse as CreateGoalResponse, inference_DeleteGoalResponse as DeleteGoalResponse, 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_GoalDto as GoalDto, inference_GoalSummaryDto as GoalSummaryDto, inference_GuardOp as GuardOp, inference_HomoiconicSubstitutionDto as HomoiconicSubstitutionDto, inference_ListGoalsResponse as ListGoalsResponse, inference_LiteralInputDto as LiteralInputDto, inference_MetaSortsResponse as MetaSortsResponse, inference_NafProveRequest as NafProveRequest, inference_NafProveResponse as NafProveResponse, inference_ProofDto as ProofDto, inference_ProvenanceTagDto as ProvenanceTagDto, inference_SolutionDto as SolutionDto, inference_TaggedDerivedFact as TaggedDerivedFact, inference_TaggedForwardChainRequest as TaggedForwardChainRequest, inference_TaggedForwardChainResponse as TaggedForwardChainResponse };
23419
+ 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_ClearFactsResponse as ClearFactsResponse, inference_ConstraintInputDto as ConstraintInputDto, inference_CreateGoalRequest as CreateGoalRequest, inference_CreateGoalResponse as CreateGoalResponse, inference_DeleteGoalResponse as DeleteGoalResponse, 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_MetaSortsResponse as MetaSortsResponse, inference_NafProveRequest as NafProveRequest, inference_NafProveResponse as NafProveResponse, inference_ProofDto as ProofDto, inference_ProvenanceTagDto as ProvenanceTagDto, inference_RuleEntryDto as RuleEntryDto, inference_SolutionDto as SolutionDto, inference_TaggedDerivedFact as TaggedDerivedFact, inference_TaggedForwardChainRequest as TaggedForwardChainRequest, inference_TaggedForwardChainResponse as TaggedForwardChainResponse };
22058
23420
  }
22059
23421
 
22060
23422
  /**
@@ -22130,6 +23492,28 @@ declare class InferenceClient {
22130
23492
  * @returns Clear result with facts_cleared count.
22131
23493
  */
22132
23494
  clearFacts(): Promise<ClearFactsResponse>;
23495
+ /**
23496
+ * Get all stored rules (clauses with antecedents) for the tenant.
23497
+ *
23498
+ * @returns Rules with a total count. Each rule's `head` and `body` are {@link PsiTermDto} values.
23499
+ * @throws {ApiError} If the request fails.
23500
+ *
23501
+ * @remarks
23502
+ * The tenant is taken from the client's configured tenant ID (used for the
23503
+ * `{tenant_id}` path parameter), matching the sibling fact-retrieval methods.
23504
+ *
23505
+ * Responses use the homoiconic {@link PsiTermDto} representation.
23506
+ *
23507
+ * @example
23508
+ * ```typescript
23509
+ * const result = await client.inference.getRules();
23510
+ * console.log(result.count); // number of stored rules
23511
+ * for (const rule of result.rules) {
23512
+ * console.log(rule.head.display, '<-', rule.body.map((b) => b.display));
23513
+ * }
23514
+ * ```
23515
+ */
23516
+ getRules(): Promise<GetRulesResponse>;
22133
23517
  /**
22134
23518
  * Query for matching data by searching rules and facts backwards from a goal pattern.
22135
23519
  *
@@ -25135,7 +26519,7 @@ type GlbLubOperation = 'glb' | 'lub';
25135
26519
  /**
25136
26520
  * Kind of residuation to visualize.
25137
26521
  */
25138
- type ResiduationKind = 'inference' | 'fuzzy' | 'extraction' | 'all';
26522
+ type ResiduationKind = 'inference' | 'fuzzy' | 'extraction' | 'naf_failure' | 'all';
25139
26523
  /**
25140
26524
  * State filter for residuation visualization.
25141
26525
  */
@@ -26386,6 +27770,16 @@ declare class Collections<SecurityDataType = unknown> {
26386
27770
  * @secure
26387
27771
  */
26388
27772
  createCollection: (data: CreateCollectionRequest$1, params?: RequestParams) => Promise<HttpResponse<CollectionResponse, void>>;
27773
+ /**
27774
+ * @description The term is created through the standard term path (sort validation + reactive constraints apply), then assigned to the collection so `query_terms_in_collection` can resolve it. The tenant is taken from the `X-Tenant-Id` header; `collection_id` comes from the request body.
27775
+ *
27776
+ * @tags collections
27777
+ * @name CreateTermInCollection
27778
+ * @summary Create a term scoped to a collection.
27779
+ * @request POST:/api/v1/terms/in-collection
27780
+ * @secure
27781
+ */
27782
+ createTermInCollection: (data: CreateTermInCollectionRequest$1, params?: RequestParams) => Promise<HttpResponse<TermResponse$1, void>>;
26389
27783
  /**
26390
27784
  * No description
26391
27785
  *
@@ -26466,12 +27860,46 @@ declare class Collections<SecurityDataType = unknown> {
26466
27860
  * @secure
26467
27861
  */
26468
27862
  listCollections: (namespaceId: string, params?: RequestParams) => Promise<HttpResponse<CollectionListResponse, void>>;
27863
+ /**
27864
+ * @description `?include_children=true` widens the result to the namespace subtree. `?from=<ns>` performs a cross-namespace query: terms are returned only if the `from` namespace may access this namespace under the visibility rules.
27865
+ *
27866
+ * @tags collections
27867
+ * @name ListNamespaceTerms
27868
+ * @summary List terms scoped to a namespace.
27869
+ * @request GET:/api/v1/namespaces/{namespace_id}/terms
27870
+ * @secure
27871
+ */
27872
+ listNamespaceTerms: (namespaceId: string, query?: {
27873
+ /**
27874
+ * Querying namespace (visibility gate)
27875
+ * @format uuid
27876
+ */
27877
+ from?: string;
27878
+ /** Include descendant namespaces */
27879
+ include_children?: boolean;
27880
+ }, params?: RequestParams) => Promise<HttpResponse<TermListResponse$1, void>>;
27881
+ /**
27882
+ * No description
27883
+ *
27884
+ * @tags collections
27885
+ * @name ListVisibleNamespaceTerms
27886
+ * @summary List the terms visible within a namespace's own hierarchy (the namespace plus all descendant namespaces). A namespace can always see terms inside its own subtree.
27887
+ * @request GET:/api/v1/namespaces/{namespace_id}/visible-terms
27888
+ * @secure
27889
+ */
27890
+ listVisibleNamespaceTerms: (namespaceId: string, query?: {
27891
+ /**
27892
+ * Querying namespace
27893
+ * @format uuid
27894
+ */
27895
+ from?: string;
27896
+ }, params?: RequestParams) => Promise<HttpResponse<TermListResponse$1, void>>;
26469
27897
  /**
26470
27898
  * No description
26471
27899
  *
26472
27900
  * @tags collections
26473
27901
  * @name QueryTermsByCollectionPath
26474
- * @summary Query terms by collection path prefix (placeholder - needs term integration)
27902
+ * @summary Query terms in every collection whose path matches a prefix within a namespace (e.g. `/projects/alpha` matches `/projects/alpha` and its sub-paths). Member terms of all matching collections are hydrated.
26475
27903
  * @request POST:/api/v1/collections/query/by-path
26476
27904
  * @secure
26477
27905
  */
@@ -26481,7 +27909,7 @@ declare class Collections<SecurityDataType = unknown> {
26481
27909
  *
26482
27910
  * @tags collections
26483
27911
  * @name QueryTermsInCollection
26484
- * @summary Query terms in a collection (placeholder - needs term integration)
27912
+ * @summary Query terms scoped to a collection (optionally including descendant collections). Resolves the collection's member terms and hydrates each from the tenant term store.
26485
27913
  * @request POST:/api/v1/collections/query/in-collection
26486
27914
  * @secure
26487
27915
  */
@@ -26498,6 +27926,27 @@ declare class Collections<SecurityDataType = unknown> {
26498
27926
  updateCollection: (id: string, data: UpdateCollectionRequest$1, params?: RequestParams) => Promise<HttpResponse<void, void>>;
26499
27927
  }
26500
27928
 
27929
+ /**
27930
+ * Request to create a term scoped to a collection.
27931
+ *
27932
+ * @remarks
27933
+ * Features use the tagged {@link ValueDto} format (`{"type": "String", "value": "hello"}`).
27934
+ * Use `Value.*` builders to construct feature values. The term is created through the
27935
+ * standard term path (sort validation + reactive constraints apply) and then assigned
27936
+ * to the collection.
27937
+ */
27938
+ interface CreateTermInCollectionRequest {
27939
+ /** Collection UUID to add the term to. */
27940
+ collectionId: string;
27941
+ /** Namespace UUID. */
27942
+ namespaceId: string;
27943
+ /** Sort (type) UUID for the term. */
27944
+ sortId: string;
27945
+ /** Tenant UUID. */
27946
+ tenantId: string;
27947
+ /** Named features with tagged values. */
27948
+ features: Record<string, ValueDto>;
27949
+ }
26501
27950
  /**
26502
27951
  * Request to create a collection.
26503
27952
  */
@@ -26544,9 +27993,10 @@ interface CollectionDto {
26544
27993
 
26545
27994
  type collections_CollectionDto = CollectionDto;
26546
27995
  type collections_CreateCollectionRequest = CreateCollectionRequest;
27996
+ type collections_CreateTermInCollectionRequest = CreateTermInCollectionRequest;
26547
27997
  type collections_UpdateCollectionRequest = UpdateCollectionRequest;
26548
27998
  declare namespace collections {
26549
- export type { collections_CollectionDto as CollectionDto, collections_CreateCollectionRequest as CreateCollectionRequest, collections_UpdateCollectionRequest as UpdateCollectionRequest };
27999
+ export type { collections_CollectionDto as CollectionDto, collections_CreateCollectionRequest as CreateCollectionRequest, collections_CreateTermInCollectionRequest as CreateTermInCollectionRequest, collections_UpdateCollectionRequest as UpdateCollectionRequest };
26550
28000
  }
26551
28001
 
26552
28002
  /**
@@ -26632,6 +28082,69 @@ declare class CollectionsClient {
26632
28082
  * @returns Array of root collections.
26633
28083
  */
26634
28084
  getRootCollections(namespaceId: string): Promise<CollectionDto[]>;
28085
+ /**
28086
+ * Create a term scoped to a collection.
28087
+ *
28088
+ * @param request - Term creation parameters, including the target collection.
28089
+ * @returns The created term wrapped in a {@link TermResponse}, including its
28090
+ * validation state and any witness proofs or residuated witnesses.
28091
+ * @throws {ApiError} If the request fails.
28092
+ *
28093
+ * @remarks
28094
+ * The term is created through the standard term path (sort validation +
28095
+ * reactive constraints apply), then assigned to the collection so that
28096
+ * collection queries can resolve it. Features use the tagged `ValueDto`
28097
+ * format — use `Value.*` builders to construct feature values. The tenant is
28098
+ * taken from the `X-Tenant-Id` header; `collectionId` comes from the request.
28099
+ *
28100
+ * @example
28101
+ * ```typescript
28102
+ * const result = await client.collections.createTermInCollection({
28103
+ * collectionId: 'coll-uuid',
28104
+ * namespaceId: 'ns-uuid',
28105
+ * sortId: 'sort-uuid',
28106
+ * tenantId: 'tenant-uuid',
28107
+ * features: { name: Value.string('Alice') },
28108
+ * });
28109
+ * console.log(result.term.id);
28110
+ * ```
28111
+ */
28112
+ createTermInCollection(request: CreateTermInCollectionRequest): Promise<TermResponse>;
28113
+ /**
28114
+ * List terms scoped to a namespace.
28115
+ *
28116
+ * @param namespaceId - Namespace UUID.
28117
+ * @returns The matching terms with a total count.
28118
+ * @throws {ApiError} If the request fails.
28119
+ *
28120
+ * @remarks
28121
+ * Features in the returned terms use the tagged `ValueDto` format.
28122
+ *
28123
+ * @example
28124
+ * ```typescript
28125
+ * const { terms, count } = await client.collections.listNamespaceTerms('ns-uuid');
28126
+ * console.log(`${count} terms`);
28127
+ * ```
28128
+ */
28129
+ listNamespaceTerms(namespaceId: string): Promise<TermListResponse>;
28130
+ /**
28131
+ * List the terms visible within a namespace's own hierarchy.
28132
+ *
28133
+ * @param namespaceId - Namespace UUID.
28134
+ * @returns The matching terms with a total count.
28135
+ * @throws {ApiError} If the request fails.
28136
+ *
28137
+ * @remarks
28138
+ * Returns terms inside the namespace plus all descendant namespaces; a
28139
+ * namespace can always see terms inside its own subtree. Features in the
28140
+ * returned terms use the tagged `ValueDto` format.
28141
+ *
28142
+ * @example
28143
+ * ```typescript
28144
+ * const { terms } = await client.collections.listVisibleNamespaceTerms('ns-uuid');
28145
+ * ```
28146
+ */
28147
+ listVisibleNamespaceTerms(namespaceId: string): Promise<TermListResponse>;
26635
28148
  /**
26636
28149
  * Query terms by collection path prefix.
26637
28150
  *
@@ -34660,6 +36173,16 @@ declare class Scenarios<SecurityDataType = unknown> {
34660
36173
  * @secure
34661
36174
  */
34662
36175
  listScenarios: (params?: RequestParams) => Promise<HttpResponse<ListScenariosResponse$1, any>>;
36176
+ /**
36177
+ * @description Materializes an already-generated GeneratedScenario verbatim (no LLM call): sorts, belief instances, rules, goal, and the ontology-declared engine pipeline. Used by the studio's build wizard to persist exactly what was reviewed so it is immediately queryable in chat.
36178
+ *
36179
+ * @tags scenarios
36180
+ * @name MaterializeScenario
36181
+ * @summary Materialize a pre-generated scenario into the knowledge base
36182
+ * @request POST:/api/v1/scenarios/materialize
36183
+ * @secure
36184
+ */
36185
+ materializeScenario: (data: MaterializeScenarioRequest$1, params?: RequestParams) => Promise<HttpResponse<MaterializeScenarioResponse$1, void>>;
34663
36186
  /**
34664
36187
  * @description Adds new sorts, beliefs, rules, constraints, guard constraints, temporal constraints, and/or webhook actions to an existing scenario without re-creating everything from scratch.
34665
36188
  *
@@ -34845,6 +36368,38 @@ interface GetScenarioResponse {
34845
36368
  /** Number of webhook actions created during materialization. */
34846
36369
  webhookActionsCreated: number;
34847
36370
  }
36371
+ /**
36372
+ * Request to materialize an already-generated scenario verbatim (no LLM call).
36373
+ *
36374
+ * @remarks
36375
+ * Used to persist a pre-generated `GeneratedScenario` exactly as reviewed.
36376
+ * The `scenario` field is the opaque domain `GeneratedScenario` JSON object.
36377
+ */
36378
+ interface MaterializeScenarioRequest {
36379
+ /** The domain `GeneratedScenario` JSON to materialize verbatim. */
36380
+ scenario: unknown;
36381
+ }
36382
+ /**
36383
+ * Response from materializing a pre-generated scenario.
36384
+ */
36385
+ interface MaterializeScenarioResponse {
36386
+ /** Number of belief (instance) Psi-terms created. */
36387
+ beliefsCreated: number;
36388
+ /** Number of generic constraint terms created. */
36389
+ constraintsCreated: number;
36390
+ /** Number of ontology-declared `pipeline_stage` control-plane terms created. */
36391
+ pipelineStagesCreated: number;
36392
+ /** Number of OSF relation edges (`Value::Reference` features) linking instances. */
36393
+ relationsCreated: number;
36394
+ /** Number of rule Psi-terms created. */
36395
+ rulesCreated: number;
36396
+ /** Number of ontology-declared `llm_sensor_point` control-plane terms created. */
36397
+ sensorPointsCreated: number;
36398
+ /** Number of sorts created or reused. */
36399
+ sortsCreated: number;
36400
+ /** Non-fatal materialization warnings. */
36401
+ warnings: string[];
36402
+ }
34848
36403
  /**
34849
36404
  * Request to incrementally update a scenario.
34850
36405
  *
@@ -34978,6 +36533,8 @@ type scenarios_GetScenarioResponse = GetScenarioResponse;
34978
36533
  type scenarios_LayerResultSummaryDto = LayerResultSummaryDto;
34979
36534
  type scenarios_ListScenariosResponse = ListScenariosResponse;
34980
36535
  type scenarios_MaterializationSummaryDto = MaterializationSummaryDto;
36536
+ type scenarios_MaterializeScenarioRequest = MaterializeScenarioRequest;
36537
+ type scenarios_MaterializeScenarioResponse = MaterializeScenarioResponse;
34981
36538
  type scenarios_ScenarioSummaryDto = ScenarioSummaryDto;
34982
36539
  type scenarios_UpdateScenarioRequest = UpdateScenarioRequest;
34983
36540
  type scenarios_UpdateScenarioResponse = UpdateScenarioResponse;
@@ -34985,7 +36542,7 @@ type scenarios_VerificationStepDto = VerificationStepDto;
34985
36542
  type scenarios_VerifyScenarioRequest = VerifyScenarioRequest;
34986
36543
  type scenarios_VerifyScenarioResponse = VerifyScenarioResponse;
34987
36544
  declare namespace scenarios {
34988
- export type { scenarios_ClarificationQuestionDto as ClarificationQuestionDto, scenarios_CreateScenarioRequest as CreateScenarioRequest, scenarios_CreateScenarioResponse as CreateScenarioResponse, scenarios_CycleOutcomeSummaryDto as CycleOutcomeSummaryDto, scenarios_FormalVerdictDto as FormalVerdictDto, scenarios_GetScenarioResponse as GetScenarioResponse, scenarios_LayerResultSummaryDto as LayerResultSummaryDto, scenarios_ListScenariosResponse as ListScenariosResponse, scenarios_MaterializationSummaryDto as MaterializationSummaryDto, scenarios_ScenarioSummaryDto as ScenarioSummaryDto, scenarios_UpdateScenarioRequest as UpdateScenarioRequest, scenarios_UpdateScenarioResponse as UpdateScenarioResponse, scenarios_VerificationStepDto as VerificationStepDto, scenarios_VerifyScenarioRequest as VerifyScenarioRequest, scenarios_VerifyScenarioResponse as VerifyScenarioResponse };
36545
+ export type { scenarios_ClarificationQuestionDto as ClarificationQuestionDto, scenarios_CreateScenarioRequest as CreateScenarioRequest, scenarios_CreateScenarioResponse as CreateScenarioResponse, scenarios_CycleOutcomeSummaryDto as CycleOutcomeSummaryDto, scenarios_FormalVerdictDto as FormalVerdictDto, scenarios_GetScenarioResponse as GetScenarioResponse, scenarios_LayerResultSummaryDto as LayerResultSummaryDto, scenarios_ListScenariosResponse as ListScenariosResponse, scenarios_MaterializationSummaryDto as MaterializationSummaryDto, scenarios_MaterializeScenarioRequest as MaterializeScenarioRequest, scenarios_MaterializeScenarioResponse as MaterializeScenarioResponse, scenarios_ScenarioSummaryDto as ScenarioSummaryDto, scenarios_UpdateScenarioRequest as UpdateScenarioRequest, scenarios_UpdateScenarioResponse as UpdateScenarioResponse, scenarios_VerificationStepDto as VerificationStepDto, scenarios_VerifyScenarioRequest as VerifyScenarioRequest, scenarios_VerifyScenarioResponse as VerifyScenarioResponse };
34989
36546
  }
34990
36547
 
34991
36548
  /**
@@ -35008,6 +36565,29 @@ declare class ScenariosClient {
35008
36565
  * @returns Created scenario (may include interactive questions).
35009
36566
  */
35010
36567
  create(request: CreateScenarioRequest): Promise<CreateScenarioResponse>;
36568
+ /**
36569
+ * Materialize an already-generated scenario verbatim (no LLM call).
36570
+ *
36571
+ * @param req - The pre-generated `GeneratedScenario` JSON to materialize.
36572
+ * @returns Counts of materialized sorts, beliefs, rules, relations, control-plane terms, and any non-fatal warnings.
36573
+ * @throws {ApiError} If the request fails (e.g., malformed scenario JSON).
36574
+ *
36575
+ * @remarks
36576
+ * Materializes the scenario exactly as provided: sorts, belief instances, rules,
36577
+ * goal, and the ontology-declared engine pipeline. Used to persist exactly what
36578
+ * was reviewed so it is immediately queryable.
36579
+ *
36580
+ * The `scenario` field is the opaque domain `GeneratedScenario` JSON object;
36581
+ * no value-level serialization split applies. Response fields are normalized
36582
+ * from snake_case to camelCase.
36583
+ *
36584
+ * @example
36585
+ * ```typescript
36586
+ * const result = await client.scenarios.materializeScenario({ scenario: generated });
36587
+ * console.log(result.sortsCreated, result.beliefsCreated, result.rulesCreated);
36588
+ * ```
36589
+ */
36590
+ materializeScenario(req: MaterializeScenarioRequest): Promise<MaterializeScenarioResponse>;
35011
36591
  /**
35012
36592
  * List all scenarios.
35013
36593
  *
@@ -36895,6 +38475,15 @@ declare class Analysis<SecurityDataType = unknown> {
36895
38475
  * @request POST:/api/v1/analysis/sort-discovery
36896
38476
  */
36897
38477
  analyzeSortDiscovery: (data: SortDiscoveryRequestDto, params?: RequestParams) => Promise<HttpResponse<SortDiscoveryResponseDto, void>>;
38478
+ /**
38479
+ * @description Returns a [`RuleBaseCertificateDto`]: whether forward reasoning is guaranteed to halt (with the ranking-function depth bound), and whether it is order-independent (with the theorem discharged, or a concrete conflicting rule pair). The analysis is read-only over the tenant's knowledge base.
38480
+ *
38481
+ * @tags analysis
38482
+ * @name CertifyRuleBase
38483
+ * @summary Certify the authenticated tenant's rule base.
38484
+ * @request GET:/api/v1/analysis/rule-base/certify
38485
+ */
38486
+ certifyRuleBase: (params?: RequestParams) => Promise<HttpResponse<RuleBaseCertificateDto, any>>;
36898
38487
  /**
36899
38488
  * @description The exploration must be complete (no more questions) before calling this. Creates appropriateness sorts in the hierarchy from the Duquenne-Guigues basis.
36900
38489
  *
@@ -37364,6 +38953,16 @@ declare class Functions<SecurityDataType = unknown> {
37364
38953
  * @secure
37365
38954
  */
37366
38955
  evaluateFunction: (data: EvaluateFunctionRequest$1, params?: RequestParams) => Promise<HttpResponse<EvaluateFunctionResponse$1, void>>;
38956
+ /**
38957
+ * @description This is the discovery counterpart to `register_function`/`evaluate_function`: it projects the tenant's slice of the function sub-lattice into a list of typed signatures (name + arity + clause count) without evaluating anything. The tenant is taken from the authenticated principal (never a body field), honouring the tenancy-scoping invariant.
38958
+ *
38959
+ * @tags functions
38960
+ * @name ListFunctions
38961
+ * @summary Handler to list all functions registered for the authenticated tenant.
38962
+ * @request GET:/api/v1/functions
38963
+ * @secure
38964
+ */
38965
+ listFunctions: (params?: RequestParams) => Promise<HttpResponse<ListFunctionsResponse$1, any>>;
37367
38966
  /**
37368
38967
  * No description
37369
38968
  *
@@ -37566,6 +39165,30 @@ type EvaluateFunctionResponse = {
37566
39165
  resultType: 'Suspend';
37567
39166
  reason: string;
37568
39167
  };
39168
+ /**
39169
+ * Summary of a single registered function.
39170
+ *
39171
+ * @remarks
39172
+ * A typed signature (name + arity + clause count) projected from the tenant's
39173
+ * slice of the function sub-lattice. Returned by {@link ListFunctionsResponse}.
39174
+ */
39175
+ interface FunctionSummaryDto {
39176
+ /** Number of named arguments the function accepts. */
39177
+ arity: number;
39178
+ /** Number of pattern-matched clauses (tried in order during evaluation). */
39179
+ clausesCount: number;
39180
+ /** Function name (the key used by `POST /functions/evaluate`). */
39181
+ name: string;
39182
+ }
39183
+ /**
39184
+ * Response listing all functions registered for the authenticated tenant.
39185
+ */
39186
+ interface ListFunctionsResponse {
39187
+ /** All functions registered for the requesting tenant, sorted by name. */
39188
+ functions: FunctionSummaryDto[];
39189
+ /** Total count (equals `functions.length`), surfaced for convenience. */
39190
+ total: number;
39191
+ }
37569
39192
 
37570
39193
  type functions_BinaryOperatorDto = BinaryOperatorDto;
37571
39194
  type functions_EvaluateFunctionRequest = EvaluateFunctionRequest;
@@ -37574,12 +39197,14 @@ type functions_ExpressionDto = ExpressionDto;
37574
39197
  type functions_FunctionBodyDto = FunctionBodyDto;
37575
39198
  type functions_FunctionClauseDto = FunctionClauseDto;
37576
39199
  type functions_FunctionGuardDto = FunctionGuardDto;
39200
+ type functions_FunctionSummaryDto = FunctionSummaryDto;
37577
39201
  type functions_FunctionValueDto = FunctionValueDto;
39202
+ type functions_ListFunctionsResponse = ListFunctionsResponse;
37578
39203
  type functions_PatternDto = PatternDto;
37579
39204
  type functions_RegisterFunctionRequest = RegisterFunctionRequest;
37580
39205
  type functions_RegisterFunctionResponse = RegisterFunctionResponse;
37581
39206
  declare namespace functions {
37582
- export type { functions_BinaryOperatorDto as BinaryOperatorDto, functions_EvaluateFunctionRequest as EvaluateFunctionRequest, functions_EvaluateFunctionResponse as EvaluateFunctionResponse, functions_ExpressionDto as ExpressionDto, functions_FunctionBodyDto as FunctionBodyDto, functions_FunctionClauseDto as FunctionClauseDto, functions_FunctionGuardDto as FunctionGuardDto, functions_FunctionValueDto as FunctionValueDto, functions_PatternDto as PatternDto, functions_RegisterFunctionRequest as RegisterFunctionRequest, functions_RegisterFunctionResponse as RegisterFunctionResponse };
39207
+ export type { functions_BinaryOperatorDto as BinaryOperatorDto, functions_EvaluateFunctionRequest as EvaluateFunctionRequest, functions_EvaluateFunctionResponse as EvaluateFunctionResponse, functions_ExpressionDto as ExpressionDto, functions_FunctionBodyDto as FunctionBodyDto, functions_FunctionClauseDto as FunctionClauseDto, functions_FunctionGuardDto as FunctionGuardDto, functions_FunctionSummaryDto as FunctionSummaryDto, functions_FunctionValueDto as FunctionValueDto, functions_ListFunctionsResponse as ListFunctionsResponse, functions_PatternDto as PatternDto, functions_RegisterFunctionRequest as RegisterFunctionRequest, functions_RegisterFunctionResponse as RegisterFunctionResponse };
37583
39208
  }
37584
39209
 
37585
39210
  /**
@@ -37684,6 +39309,30 @@ declare class FunctionsClient {
37684
39309
  * ```
37685
39310
  */
37686
39311
  evaluateFunction(request: EvaluateFunctionRequest): Promise<EvaluateFunctionResponse>;
39312
+ /**
39313
+ * List all functions registered for the authenticated tenant.
39314
+ *
39315
+ * @returns The registered functions as typed signatures (name, arity, clause count) plus a total count.
39316
+ * @throws {ApiError} If the request fails.
39317
+ *
39318
+ * @remarks
39319
+ * This is the discovery counterpart to {@link registerFunction} / {@link evaluateFunction}:
39320
+ * it projects the tenant's slice of the function sub-lattice into a list of typed
39321
+ * signatures without evaluating anything. The tenant is taken from the authenticated
39322
+ * principal (never a body field).
39323
+ *
39324
+ * Returns response-only camelCase types; no value serialization is involved.
39325
+ *
39326
+ * @example
39327
+ * ```typescript
39328
+ * const result = await client.functions.listFunctions();
39329
+ * console.log(result.total); // number of registered functions
39330
+ * for (const fn of result.functions) {
39331
+ * console.log(`${fn.name}/${fn.arity} (${fn.clausesCount} clauses)`);
39332
+ * }
39333
+ * ```
39334
+ */
39335
+ listFunctions(): Promise<ListFunctionsResponse>;
37687
39336
  }
37688
39337
 
37689
39338
  declare class WebhookActions<SecurityDataType = unknown> {
@@ -39662,6 +41311,15 @@ declare class Admin<SecurityDataType = unknown> {
39662
41311
  * @request POST:/api/v1/admin/clear-tenant/{tenant_id}
39663
41312
  */
39664
41313
  clearTenantData: (tenantId: string, params?: RequestParams) => Promise<HttpResponse<ClearTenantResponse$1, void>>;
41314
+ /**
41315
+ * @description Explicitly creates a tenant's inference state and sort hierarchy, optionally seeding initial sorts. Idempotent. No X-Tenant-Id header required.
41316
+ *
41317
+ * @tags admin
41318
+ * @name CreateTenant
41319
+ * @summary Provision a new tenant
41320
+ * @request POST:/api/v1/admin/tenants
41321
+ */
41322
+ createTenant: (data: CreateTenantRequest$1, params?: RequestParams) => Promise<HttpResponse<CreateTenantResponse$1, any>>;
39665
41323
  /**
39666
41324
  * @description Returns all tenant IDs that have terms or ingestion sessions, with counts. No X-Tenant-Id header required. Works in both PostgreSQL and in-memory modes.
39667
41325
  *
@@ -39767,13 +41425,48 @@ interface ListTenantsResponse {
39767
41425
  /** All tenants that have data in the system. */
39768
41426
  tenants: TenantInfoDto[];
39769
41427
  }
41428
+ /**
41429
+ * Request to provision a new tenant.
41430
+ *
41431
+ * @remarks
41432
+ * Provisioning is explicit and idempotent: it materializes the tenant's
41433
+ * inference state and per-tenant sort hierarchy up front, and optionally
41434
+ * seeds initial top-level sorts. All fields are optional — omitted UUIDs
41435
+ * are generated server-side.
41436
+ */
41437
+ interface CreateTenantRequest {
41438
+ /** Optional owner user UUID for the tenant's initial state. Generated when omitted. */
41439
+ ownerUserId?: string | null;
41440
+ /** Optional sort names to seed into the new tenant's hierarchy as top-level sorts. */
41441
+ seedSorts?: string[];
41442
+ /** Optional explicit tenant UUID. A fresh UUID is generated when omitted. */
41443
+ tenantId?: string | null;
41444
+ }
41445
+ /**
41446
+ * Response for the create-tenant operation.
41447
+ *
41448
+ * @remarks
41449
+ * Reports whether the tenant was newly created (vs. already existed, since the
41450
+ * operation is idempotent), how many seed sorts were inserted, and the
41451
+ * provisioned tenant UUID.
41452
+ */
41453
+ interface CreateTenantResponse {
41454
+ /** `true` if the tenant was newly created; `false` if it already existed (idempotent). */
41455
+ created: boolean;
41456
+ /** Number of seed sorts successfully inserted into the tenant hierarchy. */
41457
+ seededSorts: number;
41458
+ /** The provisioned tenant UUID (echoes the request or the generated value). */
41459
+ tenantId: string;
41460
+ }
39770
41461
 
39771
41462
  type admin_ClearTenantResponse = ClearTenantResponse;
41463
+ type admin_CreateTenantRequest = CreateTenantRequest;
41464
+ type admin_CreateTenantResponse = CreateTenantResponse;
39772
41465
  type admin_FactoryResetResponse = FactoryResetResponse;
39773
41466
  type admin_ListTenantsResponse = ListTenantsResponse;
39774
41467
  type admin_TenantInfoDto = TenantInfoDto;
39775
41468
  declare namespace admin {
39776
- export type { admin_ClearTenantResponse as ClearTenantResponse, admin_FactoryResetResponse as FactoryResetResponse, admin_ListTenantsResponse as ListTenantsResponse, admin_TenantInfoDto as TenantInfoDto };
41469
+ export type { admin_ClearTenantResponse as ClearTenantResponse, admin_CreateTenantRequest as CreateTenantRequest, admin_CreateTenantResponse as CreateTenantResponse, admin_FactoryResetResponse as FactoryResetResponse, admin_ListTenantsResponse as ListTenantsResponse, admin_TenantInfoDto as TenantInfoDto };
39777
41470
  }
39778
41471
 
39779
41472
  /**
@@ -39853,6 +41546,31 @@ declare class AdminClient {
39853
41546
  * ```
39854
41547
  */
39855
41548
  listTenants(): Promise<ListTenantsResponse>;
41549
+ /**
41550
+ * Provision a new tenant.
41551
+ *
41552
+ * @param request - Tenant provisioning parameters. All fields are optional;
41553
+ * omitted UUIDs are generated server-side and seed sorts default to none.
41554
+ * @returns Whether the tenant was newly created, how many seed sorts were
41555
+ * inserted, and the provisioned tenant UUID.
41556
+ * @throws {ApiError} If the request fails.
41557
+ *
41558
+ * @remarks
41559
+ * Explicitly creates a tenant's inference state and sort hierarchy, optionally
41560
+ * seeding initial top-level sorts. Idempotent — provisioning an existing tenant
41561
+ * returns `created: false`. No `X-Tenant-Id` header is required.
41562
+ *
41563
+ * @example
41564
+ * ```typescript
41565
+ * const result = await client.admin.createTenant({
41566
+ * seedSorts: ['Person', 'Organization'],
41567
+ * });
41568
+ * console.log(result.tenantId); // generated UUID
41569
+ * console.log(result.created); // true
41570
+ * console.log(result.seededSorts); // 2
41571
+ * ```
41572
+ */
41573
+ createTenant(request: CreateTenantRequest): Promise<CreateTenantResponse>;
39856
41574
  }
39857
41575
 
39858
41576
  declare class ImageExtraction<SecurityDataType = unknown> {
@@ -40659,7 +42377,7 @@ interface VariableBounds {
40659
42377
  * };
40660
42378
  * ```
40661
42379
  */
40662
- interface LinearConstraint {
42380
+ interface LinearConstraint$1 {
40663
42381
  /** Coefficients per variable. Missing variables have coefficient 0. */
40664
42382
  coefficients: LinearExpression;
40665
42383
  /** Comparison operator: <=, >=, or =. */
@@ -40706,7 +42424,7 @@ interface LinearProgramDefinition {
40706
42424
  /** Objective function to maximize or minimize. */
40707
42425
  objective: ObjectiveFunction;
40708
42426
  /** Linear constraints. */
40709
- constraints: LinearConstraint[];
42427
+ constraints: LinearConstraint$1[];
40710
42428
  /** Variable bounds. Variables not listed are unbounded. */
40711
42429
  bounds?: Record<string, VariableBounds>;
40712
42430
  }
@@ -40815,7 +42533,7 @@ interface KBOptimizationConfig {
40815
42533
  /** Whether all variables must be non-negative (default: false). */
40816
42534
  nonNegative?: boolean;
40817
42535
  /** Additional explicit constraints to add beyond those discovered from the KB. */
40818
- additionalConstraints?: LinearConstraint[];
42536
+ additionalConstraints?: LinearConstraint$1[];
40819
42537
  }
40820
42538
  /**
40821
42539
  * Result of a KB-driven optimization, including the discovered problem.
@@ -40835,7 +42553,6 @@ type optimize_KBOptimizationConfig = KBOptimizationConfig;
40835
42553
  type optimize_KBOptimizationResult = KBOptimizationResult;
40836
42554
  type optimize_KBResourceConstraint = KBResourceConstraint;
40837
42555
  type optimize_KBVariableSpec = KBVariableSpec;
40838
- type optimize_LinearConstraint = LinearConstraint;
40839
42556
  type optimize_LinearExpression = LinearExpression;
40840
42557
  type optimize_LinearProgramDefinition = LinearProgramDefinition;
40841
42558
  type optimize_ObjectiveFunction = ObjectiveFunction;
@@ -40845,7 +42562,7 @@ type optimize_OptimizationResult = OptimizationResult;
40845
42562
  type optimize_SolveOptions = SolveOptions;
40846
42563
  type optimize_VariableBounds = VariableBounds;
40847
42564
  declare namespace optimize {
40848
- export type { optimize_ConstraintOperator as ConstraintOperator, optimize_InfeasibleResult as InfeasibleResult, optimize_KBOptimizationConfig as KBOptimizationConfig, optimize_KBOptimizationResult as KBOptimizationResult, optimize_KBResourceConstraint as KBResourceConstraint, optimize_KBVariableSpec as KBVariableSpec, optimize_LinearConstraint as LinearConstraint, optimize_LinearExpression as LinearExpression, optimize_LinearProgramDefinition as LinearProgramDefinition, optimize_ObjectiveFunction as ObjectiveFunction, optimize_OptimalResult as OptimalResult, optimize_OptimizationDirection as OptimizationDirection, optimize_OptimizationResult as OptimizationResult, optimize_SolveOptions as SolveOptions, optimize_VariableBounds as VariableBounds };
42565
+ export type { optimize_ConstraintOperator as ConstraintOperator, optimize_InfeasibleResult as InfeasibleResult, optimize_KBOptimizationConfig as KBOptimizationConfig, optimize_KBOptimizationResult as KBOptimizationResult, optimize_KBResourceConstraint as KBResourceConstraint, optimize_KBVariableSpec as KBVariableSpec, LinearConstraint$1 as LinearConstraint, optimize_LinearExpression as LinearExpression, optimize_LinearProgramDefinition as LinearProgramDefinition, optimize_ObjectiveFunction as ObjectiveFunction, optimize_OptimalResult as OptimalResult, optimize_OptimizationDirection as OptimizationDirection, optimize_OptimizationResult as OptimizationResult, optimize_SolveOptions as SolveOptions, optimize_VariableBounds as VariableBounds };
40849
42566
  }
40850
42567
 
40851
42568
  /**
@@ -41952,6 +43669,17 @@ interface ConversationMessageResponse {
41952
43669
  intent: string;
41953
43670
  /** OSFQL that was executed (if any). */
41954
43671
  osfqlExecuted?: string | null;
43672
+ /**
43673
+ * True when {@link osfqlExecuted} is a constrained-regeneration *repair* of a query the
43674
+ * certify-or-abstain gate first rejected as hallucinated. Lets the UI surface that the answer
43675
+ * reflects a corrected query rather than the user's literal request.
43676
+ */
43677
+ repaired?: boolean;
43678
+ /**
43679
+ * The original, rejected OSFQL the LLM first proposed — present only when {@link repaired} is
43680
+ * true. Pairs with {@link osfqlExecuted} so the UI can show the `original → executed` diff.
43681
+ */
43682
+ originalOsfql?: string | null;
41955
43683
  /** Query results (if OSFQL was a MATCH). Each entry maps variable names to bound values. */
41956
43684
  queryResults?: Record<string, OsfqlValue>[] | null;
41957
43685
  /** IDs of terms produced by the OSFQL execution. */
@@ -42014,6 +43742,53 @@ interface ConversationTurnsResponse {
42014
43742
  conversationId: string;
42015
43743
  turns: TurnDto[];
42016
43744
  }
43745
+ /**
43746
+ * An entry in a session's focus stack — an entity ranked by ACT-R activation.
43747
+ */
43748
+ interface FocusEntryDto {
43749
+ /** Entity term ID (UUID string). */
43750
+ termId: string;
43751
+ /** Sort name of the entity. */
43752
+ sortName: string;
43753
+ /** Display label, if the entity has a name/label. */
43754
+ label?: string | null;
43755
+ /** Current ACT-R activation (salience). */
43756
+ activation: number;
43757
+ /** Rank (0 = most salient). */
43758
+ rank: number;
43759
+ }
43760
+ /**
43761
+ * A cross-turn coreference resolved within a session.
43762
+ */
43763
+ interface ResolvedCoreferenceDto {
43764
+ /** The referring-expression kind (from the LLM sensor). */
43765
+ expressionType: string;
43766
+ /** The resolved entity term ID, if any. */
43767
+ resolvedTermId?: string | null;
43768
+ /** The resolved entity's label, if any. */
43769
+ resolvedLabel?: string | null;
43770
+ /** Confidence (salience of the chosen candidate). */
43771
+ confidence: number;
43772
+ /** Whether the top two candidates were close (LLM tiebreaker advised). */
43773
+ ambiguous: boolean;
43774
+ }
43775
+ /**
43776
+ * Session memory snapshot for a conversation.
43777
+ *
43778
+ * @remarks
43779
+ * Inspects the session's focus stack (entities ranked by ACT-R activation) and
43780
+ * the cross-turn references resolved so far.
43781
+ */
43782
+ interface SessionGraphDto {
43783
+ /** Session ID (the conversation's UUID). */
43784
+ sessionId: string;
43785
+ /** Current turn number. */
43786
+ currentTurn: number;
43787
+ /** Entities ranked by current activation (most salient first). */
43788
+ focusStack: FocusEntryDto[];
43789
+ /** Cross-turn references resolved so far. */
43790
+ resolvedCoreferences: ResolvedCoreferenceDto[];
43791
+ }
42017
43792
 
42018
43793
  type conversation_ClaimAnnotationDto = ClaimAnnotationDto;
42019
43794
  type conversation_ConversationMessageRequest = ConversationMessageRequest;
@@ -42021,12 +43796,15 @@ type conversation_ConversationMessageResponse = ConversationMessageResponse;
42021
43796
  type conversation_ConversationSummaryDto = ConversationSummaryDto;
42022
43797
  type conversation_ConversationTurnsResponse = ConversationTurnsResponse;
42023
43798
  type conversation_DerivationSummaryDto = DerivationSummaryDto;
43799
+ type conversation_FocusEntryDto = FocusEntryDto;
42024
43800
  type conversation_ListConversationsResponse = ListConversationsResponse;
42025
43801
  type conversation_ProofTraceNodeDto = ProofTraceNodeDto;
43802
+ type conversation_ResolvedCoreferenceDto = ResolvedCoreferenceDto;
43803
+ type conversation_SessionGraphDto = SessionGraphDto;
42026
43804
  type conversation_TurnDto = TurnDto;
42027
43805
  type conversation_UICustomizationDto = UICustomizationDto;
42028
43806
  declare namespace conversation {
42029
- export type { conversation_ClaimAnnotationDto as ClaimAnnotationDto, conversation_ConversationMessageRequest as ConversationMessageRequest, conversation_ConversationMessageResponse as ConversationMessageResponse, conversation_ConversationSummaryDto as ConversationSummaryDto, conversation_ConversationTurnsResponse as ConversationTurnsResponse, conversation_DerivationSummaryDto as DerivationSummaryDto, conversation_ListConversationsResponse as ListConversationsResponse, conversation_ProofTraceNodeDto as ProofTraceNodeDto, SourceExcerptDto$1 as SourceExcerptDto, conversation_TurnDto as TurnDto, conversation_UICustomizationDto as UICustomizationDto };
43807
+ export type { conversation_ClaimAnnotationDto as ClaimAnnotationDto, 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_ProofTraceNodeDto as ProofTraceNodeDto, conversation_ResolvedCoreferenceDto as ResolvedCoreferenceDto, conversation_SessionGraphDto as SessionGraphDto, SourceExcerptDto$1 as SourceExcerptDto, conversation_TurnDto as TurnDto, conversation_UICustomizationDto as UICustomizationDto };
42030
43808
  }
42031
43809
 
42032
43810
  /**
@@ -42115,6 +43893,28 @@ declare class ConversationClient {
42115
43893
  * ```
42116
43894
  */
42117
43895
  getTurns(conversationId: string): Promise<ConversationTurnsResponse>;
43896
+ /**
43897
+ * Get the session memory graph for a conversation.
43898
+ *
43899
+ * @param conversationId - The conversation ID.
43900
+ * @returns The session's focus stack (entities ranked by ACT-R activation) and
43901
+ * the cross-turn coreferences resolved so far.
43902
+ * @throws {ApiError} If the request fails.
43903
+ *
43904
+ * @remarks
43905
+ * Inspects the session memory for a conversation: the focus stack (entities
43906
+ * ranked by ACT-R activation) and the cross-turn references resolved so far.
43907
+ *
43908
+ * @example
43909
+ * ```typescript
43910
+ * const graph = await client.conversation.getSessionGraph('conv-uuid');
43911
+ * console.log(`Turn ${graph.currentTurn}`);
43912
+ * for (const entry of graph.focusStack) {
43913
+ * console.log(`#${entry.rank} ${entry.label ?? entry.termId} (${entry.activation})`);
43914
+ * }
43915
+ * ```
43916
+ */
43917
+ getSessionGraph(conversationId: string): Promise<SessionGraphDto>;
42118
43918
  /**
42119
43919
  * Delete a conversation and all its turns.
42120
43920
  *
@@ -43715,6 +45515,2184 @@ declare class OperationsClient {
43715
45515
  antiUnify(request: AntiUnifyRequest): Promise<AntiUnifyResponse>;
43716
45516
  }
43717
45517
 
45518
+ declare class Actions<SecurityDataType = unknown> {
45519
+ http: HttpClient<SecurityDataType>;
45520
+ constructor(http: HttpClient<SecurityDataType>);
45521
+ /**
45522
+ * No description
45523
+ *
45524
+ * @tags actions
45525
+ * @name ApplyAction
45526
+ * @summary Apply a typed action transactionally.
45527
+ * @request POST:/api/v1/actions/apply
45528
+ * @secure
45529
+ */
45530
+ applyAction: (data: ApplyActionRequest$1, params?: RequestParams) => Promise<HttpResponse<ApplyActionResponse$1, ApplyActionResponse$1>>;
45531
+ }
45532
+
45533
+ /**
45534
+ * One scalar feature projected as an ontology property.
45535
+ *
45536
+ * @remarks
45537
+ * Projected from a sort's appropriateness conditions. Wire shape (`PropertyDto`)
45538
+ * uses camelCase field names (`apiName`, `dataType`).
45539
+ */
45540
+ interface Property {
45541
+ /** The feature name (Palantir property apiName). */
45542
+ apiName: string;
45543
+ /** The declared value-type hint, or `"string"` when unspecified. */
45544
+ dataType: string;
45545
+ /** Whether the feature is required by the sort's appropriateness conditions. */
45546
+ required: boolean;
45547
+ }
45548
+ /**
45549
+ * One action parameter projected from an action input spec.
45550
+ *
45551
+ * @remarks
45552
+ * Wire shape (`ActionParameterDto`) uses the same field names; this type is
45553
+ * shared with the {@link ActionType} projection.
45554
+ */
45555
+ interface ActionParameter {
45556
+ /** Parameter (input feature) name. */
45557
+ name: string;
45558
+ /** Whether the input is required. */
45559
+ required: boolean;
45560
+ }
45561
+ /**
45562
+ * One projected action type from the system action-spec catalog.
45563
+ *
45564
+ * @remarks
45565
+ * Wire shape (`ActionTypeDto`) uses camelCase field names
45566
+ * (`apiName`, `displayName`).
45567
+ */
45568
+ interface ActionType {
45569
+ /** Action sort name (Palantir action-type apiName). */
45570
+ apiName: string;
45571
+ /** Human-facing name (the action sort name). */
45572
+ displayName: string;
45573
+ /** Parameters — required inputs first, then optional. */
45574
+ parameters: ActionParameter[];
45575
+ }
45576
+ /**
45577
+ * Response for `GET /api/v1/ontology/action-types`.
45578
+ *
45579
+ * @remarks
45580
+ * Shared with the Actions domain via `./actions.js`.
45581
+ */
45582
+ interface ActionTypeListResponse {
45583
+ /** The projected action types. */
45584
+ actionTypes: ActionType[];
45585
+ /** Number of action types returned. */
45586
+ count: number;
45587
+ }
45588
+ /**
45589
+ * One projected function type from the tenant's function store.
45590
+ *
45591
+ * @remarks
45592
+ * Wire shape (`FunctionTypeDto`) uses camelCase field names
45593
+ * (`apiName`, `displayName`, `clausesCount`).
45594
+ */
45595
+ interface FunctionType {
45596
+ /** Function name (Palantir function-type apiName). */
45597
+ apiName: string;
45598
+ /** Number of named-feature parameters (the function's arity). */
45599
+ arity: number;
45600
+ /** Number of defining clauses (homoiconic rules) backing the function. */
45601
+ clausesCount: number;
45602
+ /** Human-facing name (the function name). */
45603
+ displayName: string;
45604
+ }
45605
+ /**
45606
+ * Response for `GET /api/v1/ontology/function-types`.
45607
+ */
45608
+ interface FunctionTypeListResponse {
45609
+ /** Number of function types returned. */
45610
+ count: number;
45611
+ /** The projected function types, ordered by apiName. */
45612
+ functionTypes: FunctionType[];
45613
+ }
45614
+ /**
45615
+ * One projected interface type from a non-maximal (abstract) sort.
45616
+ *
45617
+ * @remarks
45618
+ * Wire shape (`InterfaceTypeDto`) uses camelCase field names
45619
+ * (`apiName`, `displayName`, `extendsInterfaceTypes`).
45620
+ */
45621
+ interface InterfaceType {
45622
+ /** Sort name (Palantir interface-type apiName). */
45623
+ apiName: string;
45624
+ /** Sort description, if any. */
45625
+ description?: string | null;
45626
+ /** Human-facing name (the sort name). */
45627
+ displayName: string;
45628
+ /** apiNames of supersorts that are themselves interfaces (extended interfaces). */
45629
+ extendsInterfaceTypes: string[];
45630
+ /** The appropriate scalar features that form the inherited contract. */
45631
+ properties: Property[];
45632
+ }
45633
+ /**
45634
+ * Response for `GET /api/v1/ontology/interface-types`.
45635
+ */
45636
+ interface InterfaceTypeListResponse {
45637
+ /** Number of interface types returned. */
45638
+ count: number;
45639
+ /** The projected interface types. */
45640
+ interfaceTypes: InterfaceType[];
45641
+ }
45642
+ /**
45643
+ * One projected link type from a referring feature.
45644
+ *
45645
+ * @remarks
45646
+ * Wire shape (`LinkTypeDto`) uses camelCase field names
45647
+ * (`apiName`, `displayName`, `linkedObjectTypeApiName`, `objectTypeApiName`).
45648
+ */
45649
+ interface LinkType {
45650
+ /** Qualified apiName `"<sort>.<feature>"`. */
45651
+ apiName: string;
45652
+ /** Cardinality — `ONE`, because OSF features are functional. */
45653
+ cardinality: string;
45654
+ /** The feature name. */
45655
+ displayName: string;
45656
+ /** The target object type (the feature's value sort). */
45657
+ linkedObjectTypeApiName: string;
45658
+ /** The source object type (the sort declaring the feature). */
45659
+ objectTypeApiName: string;
45660
+ }
45661
+ /**
45662
+ * Response for `GET /api/v1/ontology/link-types`.
45663
+ */
45664
+ interface LinkTypeListResponse {
45665
+ /** Number of link types returned. */
45666
+ count: number;
45667
+ /** The projected link types. */
45668
+ linkTypes: LinkType[];
45669
+ }
45670
+ /**
45671
+ * One projected object type from a tenant sort.
45672
+ *
45673
+ * @remarks
45674
+ * Wire shape (`ObjectTypeDto`) uses camelCase field names
45675
+ * (`apiName`, `displayName`, `implementsInterfaceTypes`, `primaryKey`).
45676
+ */
45677
+ interface ObjectType {
45678
+ /** Sort name (Palantir object-type apiName). */
45679
+ apiName: string;
45680
+ /** Sort description, if any. */
45681
+ description?: string | null;
45682
+ /** Human-facing name (the sort name). */
45683
+ displayName: string;
45684
+ /** apiNames of the supersorts this sort refines (the interfaces it implements). */
45685
+ implementsInterfaceTypes: string[];
45686
+ /** Primary key — Ψ-terms are identified by their `TermId`. */
45687
+ primaryKey: string[];
45688
+ /** Appropriate scalar features projected as properties. */
45689
+ properties: Property[];
45690
+ /** Lifecycle status — always `ACTIVE` for a live sort. */
45691
+ status: string;
45692
+ }
45693
+ /**
45694
+ * Response for `GET /api/v1/ontology/object-types`.
45695
+ */
45696
+ interface ObjectTypeListResponse {
45697
+ /** Number of object types returned. */
45698
+ count: number;
45699
+ /** The projected object types. */
45700
+ objectTypes: ObjectType[];
45701
+ }
45702
+
45703
+ type ontologyFacade_ActionParameter = ActionParameter;
45704
+ type ontologyFacade_ActionType = ActionType;
45705
+ type ontologyFacade_ActionTypeListResponse = ActionTypeListResponse;
45706
+ type ontologyFacade_FunctionType = FunctionType;
45707
+ type ontologyFacade_FunctionTypeListResponse = FunctionTypeListResponse;
45708
+ type ontologyFacade_InterfaceType = InterfaceType;
45709
+ type ontologyFacade_InterfaceTypeListResponse = InterfaceTypeListResponse;
45710
+ type ontologyFacade_LinkType = LinkType;
45711
+ type ontologyFacade_LinkTypeListResponse = LinkTypeListResponse;
45712
+ type ontologyFacade_ObjectType = ObjectType;
45713
+ type ontologyFacade_ObjectTypeListResponse = ObjectTypeListResponse;
45714
+ type ontologyFacade_Property = Property;
45715
+ declare namespace ontologyFacade {
45716
+ export type { ontologyFacade_ActionParameter as ActionParameter, ontologyFacade_ActionType as ActionType, ontologyFacade_ActionTypeListResponse as ActionTypeListResponse, ontologyFacade_FunctionType as FunctionType, ontologyFacade_FunctionTypeListResponse as FunctionTypeListResponse, ontologyFacade_InterfaceType as InterfaceType, ontologyFacade_InterfaceTypeListResponse as InterfaceTypeListResponse, ontologyFacade_LinkType as LinkType, ontologyFacade_LinkTypeListResponse as LinkTypeListResponse, ontologyFacade_ObjectType as ObjectType, ontologyFacade_ObjectTypeListResponse as ObjectTypeListResponse, ontologyFacade_Property as Property };
45717
+ }
45718
+
45719
+ /**
45720
+ * One typed parameter of an action schema.
45721
+ *
45722
+ * @remarks
45723
+ * Wire shape (`ParamSpecDto`) uses snake_case (`param_type`).
45724
+ */
45725
+ interface ParamSpec {
45726
+ /** Feature name. */
45727
+ name: string;
45728
+ /** Appropriateness type: `integer`, `real`, `string`, `boolean`, or `any`. */
45729
+ paramType: string;
45730
+ /** Whether the input must be bound for the action to be `Ready`. */
45731
+ required?: boolean;
45732
+ }
45733
+ /**
45734
+ * A validation rule over an action's parameters.
45735
+ *
45736
+ * @remarks
45737
+ * Tagged discriminated union with `rule` as the discriminant. The wire shape
45738
+ * (`ActionParamRuleDto`) is externally tagged by rule name
45739
+ * (`non_empty_string`, `int_range`, `real_range`, `one_of`).
45740
+ */
45741
+ type ActionParamRule = {
45742
+ /** String parameter, when present, must be non-empty. */
45743
+ rule: 'non_empty_string';
45744
+ /** Parameter the rule applies to. */
45745
+ param: string;
45746
+ } | {
45747
+ /** Integer parameter, when present, in `[min, max]`. */
45748
+ rule: 'int_range';
45749
+ /** Parameter the rule applies to. */
45750
+ param: string;
45751
+ /** Inclusive lower bound. */
45752
+ min: number;
45753
+ /** Inclusive upper bound. */
45754
+ max: number;
45755
+ } | {
45756
+ /** Real parameter, when present, in `[min, max]`. */
45757
+ rule: 'real_range';
45758
+ /** Parameter the rule applies to. */
45759
+ param: string;
45760
+ /** Inclusive lower bound. */
45761
+ min: number;
45762
+ /** Inclusive upper bound. */
45763
+ max: number;
45764
+ } | {
45765
+ /** String parameter, when present, must be one of `allowed`. */
45766
+ rule: 'one_of';
45767
+ /** Parameter the rule applies to. */
45768
+ param: string;
45769
+ /** Permitted values. */
45770
+ allowed: string[];
45771
+ };
45772
+ /**
45773
+ * A declarative side-effect fired after the action applies.
45774
+ *
45775
+ * @remarks
45776
+ * Wire shape (`ActionSideEffectDto`) uses the same field names.
45777
+ */
45778
+ interface ActionSideEffect {
45779
+ /** Notification title. */
45780
+ title: string;
45781
+ /** Notification body. */
45782
+ body: string;
45783
+ /** Delivery channel: `webhook`, `email`, `in_app`, or `browser_push`. */
45784
+ channel: string;
45785
+ /** Recipient/target (webhook URL or recipient address). */
45786
+ target: string;
45787
+ }
45788
+ /**
45789
+ * A typed, validated, RBAC-bound action schema.
45790
+ *
45791
+ * @remarks
45792
+ * Wire shape (`ActionTypeDefDto`) uses snake_case for `required_roles` and
45793
+ * `side_effects`.
45794
+ */
45795
+ interface ActionTypeDef {
45796
+ /** Action type name (the action sort). */
45797
+ name: string;
45798
+ /** Typed parameters. */
45799
+ params?: ParamSpec[];
45800
+ /** Roles required to apply this action (empty ⇒ unrestricted). */
45801
+ requiredRoles?: string[];
45802
+ /** Validation rules over parameters. */
45803
+ rules?: ActionParamRule[];
45804
+ /** Side-effects to dispatch once the action applies. */
45805
+ sideEffects?: ActionSideEffect[];
45806
+ }
45807
+ /**
45808
+ * A multi-term edit committed atomically when an action is `Ready`.
45809
+ *
45810
+ * @remarks
45811
+ * Tagged discriminated union with `op` as the discriminant. The wire shape
45812
+ * (`TermEditDto`) is externally tagged (`{ put: ... }` or `{ remove: ... }`).
45813
+ * The `put` payload reuses the standard {@link CreateTermRequest} body.
45814
+ */
45815
+ type TermEdit = {
45816
+ /** Create or overwrite a term. */
45817
+ op: 'put';
45818
+ /** The term-creation body (tagged {@link ValueDto} features). */
45819
+ term: CreateTermRequest;
45820
+ } | {
45821
+ /** Remove an existing term by id. */
45822
+ op: 'remove';
45823
+ /** Term UUID to remove. */
45824
+ termId: string;
45825
+ };
45826
+ /**
45827
+ * Request to apply a typed action transactionally.
45828
+ *
45829
+ * @remarks
45830
+ * Wire shape (`ApplyActionRequest`) uses snake_case (`caller_roles`).
45831
+ * Bound inputs map feature names to arbitrary JSON values.
45832
+ */
45833
+ interface ApplyActionRequest {
45834
+ /** The action schema to apply. */
45835
+ action: ActionTypeDef;
45836
+ /** Bound input features (`feature → JSON value`). */
45837
+ inputs?: Record<string, JsonValue$1>;
45838
+ /** Roles held by the caller (checked against `action.requiredRoles`). */
45839
+ callerRoles?: string[];
45840
+ /** Multi-term edits to commit atomically when the action is `Ready`. */
45841
+ edits?: TermEdit[];
45842
+ }
45843
+ /**
45844
+ * Outcome of applying an action.
45845
+ *
45846
+ * @remarks
45847
+ * Tagged discriminated union with `outcome` as the discriminant. The wire
45848
+ * shape (`ApplyActionResponse`) uses the same discriminant with snake_case
45849
+ * fields (`side_effects_dispatched`, `side_effects_failed`).
45850
+ */
45851
+ type ApplyActionResponse = {
45852
+ /** The action applied successfully. */
45853
+ outcome: 'applied';
45854
+ /** Number of side-effects delivered successfully. */
45855
+ sideEffectsDispatched: number;
45856
+ /** Number of side-effects whose delivery failed (apply still succeeded). */
45857
+ sideEffectsFailed: number;
45858
+ } | {
45859
+ /** The action is waiting for required inputs to be bound. */
45860
+ outcome: 'suspended';
45861
+ /** Names of the unbound required parameters. */
45862
+ missing: string[];
45863
+ } | {
45864
+ /** The action was rejected before applying. */
45865
+ outcome: 'rejected';
45866
+ /** Human-readable reason. */
45867
+ reason: string;
45868
+ } | {
45869
+ /** The action applied then rolled back. */
45870
+ outcome: 'rolled_back';
45871
+ /** Human-readable cause. */
45872
+ reason: string;
45873
+ };
45874
+
45875
+ type actions_ActionParamRule = ActionParamRule;
45876
+ type actions_ActionParameter = ActionParameter;
45877
+ type actions_ActionSideEffect = ActionSideEffect;
45878
+ type actions_ActionType = ActionType;
45879
+ type actions_ActionTypeDef = ActionTypeDef;
45880
+ type actions_ActionTypeListResponse = ActionTypeListResponse;
45881
+ type actions_ApplyActionRequest = ApplyActionRequest;
45882
+ type actions_ApplyActionResponse = ApplyActionResponse;
45883
+ type actions_ParamSpec = ParamSpec;
45884
+ type actions_TermEdit = TermEdit;
45885
+ declare namespace actions {
45886
+ export type { actions_ActionParamRule as ActionParamRule, actions_ActionParameter as ActionParameter, actions_ActionSideEffect as ActionSideEffect, actions_ActionType as ActionType, actions_ActionTypeDef as ActionTypeDef, actions_ActionTypeListResponse as ActionTypeListResponse, actions_ApplyActionRequest as ApplyActionRequest, actions_ApplyActionResponse as ApplyActionResponse, actions_ParamSpec as ParamSpec, actions_TermEdit as TermEdit };
45887
+ }
45888
+
45889
+ /**
45890
+ * Resource client for applying typed actions.
45891
+ *
45892
+ * @remarks
45893
+ * Provides access to the transactional action-application endpoint. An action
45894
+ * is a typed, validated, RBAC-bound schema; applying it binds inputs, runs
45895
+ * parameter rules, commits any atomic term edits, and dispatches declarative
45896
+ * side-effects.
45897
+ *
45898
+ * Uses normalizers to convert between the SDK surface types (camelCase,
45899
+ * `op`/`rule`/`outcome`-discriminated unions) and the wire format
45900
+ * (snake_case, externally tagged unions) at the boundary.
45901
+ */
45902
+ declare class ActionsClient {
45903
+ /** @internal */
45904
+ private readonly api;
45905
+ /** @internal */
45906
+ constructor(api: Actions);
45907
+ /**
45908
+ * Apply a typed action transactionally.
45909
+ *
45910
+ * @param request - The action schema, bound inputs, caller roles, and any
45911
+ * atomic term edits to commit when the action is `Ready`.
45912
+ * @returns The outcome — `applied` (with side-effect dispatch counts),
45913
+ * `suspended` (with the unbound required parameters), `rejected`, or
45914
+ * `rolled_back` (each with a reason).
45915
+ * @throws {ApiError} If the request fails.
45916
+ *
45917
+ * @remarks
45918
+ * Calls `POST /api/v1/actions/apply`. The request is converted to the wire
45919
+ * format (snake_case fields such as `caller_roles`, externally tagged
45920
+ * `rules`/`edits`) before sending; the response is normalized back to the
45921
+ * `outcome`-discriminated SDK union.
45922
+ *
45923
+ * @example
45924
+ * ```typescript
45925
+ * const result = await client.actions.applyAction({
45926
+ * action: {
45927
+ * name: 'approve_invoice',
45928
+ * params: [{ name: 'invoice_id', paramType: 'string', required: true }],
45929
+ * requiredRoles: ['finance'],
45930
+ * },
45931
+ * inputs: { invoice_id: 'INV-42' },
45932
+ * callerRoles: ['finance'],
45933
+ * });
45934
+ * if (result.outcome === 'applied') {
45935
+ * console.log(result.sideEffectsDispatched);
45936
+ * } else if (result.outcome === 'suspended') {
45937
+ * console.log('missing', result.missing);
45938
+ * }
45939
+ * ```
45940
+ */
45941
+ applyAction(request: ApplyActionRequest): Promise<ApplyActionResponse>;
45942
+ }
45943
+
45944
+ declare class ComplianceMarkings<SecurityDataType = unknown> {
45945
+ http: HttpClient<SecurityDataType>;
45946
+ constructor(http: HttpClient<SecurityDataType>);
45947
+ /**
45948
+ * No description
45949
+ *
45950
+ * @tags compliance-markings
45951
+ * @name Gate
45952
+ * @summary `POST /api/v1/compliance/markings/gate` — may a reader holding `clearance` see data marked `marking`? Unknown level names yield 400.
45953
+ * @request POST:/api/v1/compliance/markings/gate
45954
+ * @secure
45955
+ */
45956
+ gate: (data: GateRequest$1, params?: RequestParams) => Promise<HttpResponse<GateResponse$1, void>>;
45957
+ /**
45958
+ * No description
45959
+ *
45960
+ * @tags compliance-markings
45961
+ * @name ListLevels
45962
+ * @summary `GET /api/v1/compliance/markings/levels` — the classification lattice.
45963
+ * @request GET:/api/v1/compliance/markings/levels
45964
+ * @secure
45965
+ */
45966
+ listLevels: (params?: RequestParams) => Promise<HttpResponse<ListLevelsResponse$1, any>>;
45967
+ /**
45968
+ * No description
45969
+ *
45970
+ * @tags compliance-markings
45971
+ * @name ReadableTerms
45972
+ * @summary `GET /api/v1/compliance/markings/readable-terms?clearance=` — the tenant's terms a requester holding `clearance` may read. Withheld (residuated) terms are absent and only counted. `clearance` defaults to `Unclassified`.
45973
+ * @request GET:/api/v1/compliance/markings/readable-terms
45974
+ * @secure
45975
+ */
45976
+ readableTerms: (query?: {
45977
+ /** Clearance level (defaults to Unclassified) */
45978
+ clearance?: string;
45979
+ }, params?: RequestParams) => Promise<HttpResponse<ReadableTermsResponse$1, void>>;
45980
+ }
45981
+
45982
+ /**
45983
+ * Request to evaluate a classification gate.
45984
+ *
45985
+ * @remarks
45986
+ * Sent to `POST /api/v1/compliance/markings/gate`. Asks whether a reader
45987
+ * holding `clearance` may see data marked `marking`. Both fields are
45988
+ * classification level names from the lattice (e.g. `"Unclassified"`,
45989
+ * `"Secret"`). Unknown level names yield a 400 error.
45990
+ */
45991
+ interface GateRequest {
45992
+ /** Classification level the reader holds. */
45993
+ clearance: string;
45994
+ /** Classification level the data is marked with. */
45995
+ marking: string;
45996
+ }
45997
+ /**
45998
+ * Result of a classification gate evaluation.
45999
+ *
46000
+ * @remarks
46001
+ * Returned by `POST /api/v1/compliance/markings/gate`. `dominates` is the
46002
+ * boolean verdict (does the clearance dominate the marking?); `decision` is
46003
+ * the human-readable rendering of that verdict.
46004
+ */
46005
+ interface GateResponse {
46006
+ /** The clearance level that was evaluated. */
46007
+ clearance: string;
46008
+ /** Human-readable gate decision. */
46009
+ decision: string;
46010
+ /** Whether the clearance dominates the marking (the access verdict). */
46011
+ dominates: boolean;
46012
+ /** The marking level that was evaluated. */
46013
+ marking: string;
46014
+ }
46015
+ /**
46016
+ * A single classification level in the lattice.
46017
+ *
46018
+ * @remarks
46019
+ * Returned as an element of {@link ListLevelsResponse}. `level` is the numeric
46020
+ * rank within the lattice (0 = least sensitive); `name` is the level's label.
46021
+ */
46022
+ interface ClassificationLevelDto {
46023
+ /** Numeric rank of the level within the lattice (0 = least sensitive). */
46024
+ level: number;
46025
+ /** Level name (e.g. "Unclassified", "Secret"). */
46026
+ name: string;
46027
+ }
46028
+ /**
46029
+ * The classification lattice.
46030
+ *
46031
+ * @remarks
46032
+ * Returned by `GET /api/v1/compliance/markings/levels`.
46033
+ */
46034
+ interface ListLevelsResponse {
46035
+ /** The classification levels, ordered by the lattice. */
46036
+ levels: ClassificationLevelDto[];
46037
+ }
46038
+ /**
46039
+ * A term the requester is cleared to read, with its marking.
46040
+ *
46041
+ * @remarks
46042
+ * Returned as an element of {@link ReadableTermsResponse}.
46043
+ */
46044
+ interface ReadableTermDto {
46045
+ /** Term ID (UUID). */
46046
+ id: string;
46047
+ /** Classification level the term is marked with. */
46048
+ marking: string;
46049
+ }
46050
+ /**
46051
+ * The tenant's terms a requester holding a given clearance may read.
46052
+ *
46053
+ * @remarks
46054
+ * Returned by `GET /api/v1/compliance/markings/readable-terms`. Withheld
46055
+ * (residuated) terms are absent from `readable` and only reflected in
46056
+ * `withheldCount`.
46057
+ */
46058
+ interface ReadableTermsResponse {
46059
+ /** The clearance level that was evaluated. */
46060
+ clearance: string;
46061
+ /** The readable terms with their markings. */
46062
+ readable: ReadableTermDto[];
46063
+ /** Number of terms the requester may read. */
46064
+ readableCount: number;
46065
+ /** Number of terms withheld (residuated) from the requester. */
46066
+ withheldCount: number;
46067
+ }
46068
+
46069
+ type complianceMarkings_ClassificationLevelDto = ClassificationLevelDto;
46070
+ type complianceMarkings_GateRequest = GateRequest;
46071
+ type complianceMarkings_GateResponse = GateResponse;
46072
+ type complianceMarkings_ListLevelsResponse = ListLevelsResponse;
46073
+ type complianceMarkings_ReadableTermDto = ReadableTermDto;
46074
+ type complianceMarkings_ReadableTermsResponse = ReadableTermsResponse;
46075
+ declare namespace complianceMarkings {
46076
+ export type { complianceMarkings_ClassificationLevelDto as ClassificationLevelDto, complianceMarkings_GateRequest as GateRequest, complianceMarkings_GateResponse as GateResponse, complianceMarkings_ListLevelsResponse as ListLevelsResponse, complianceMarkings_ReadableTermDto as ReadableTermDto, complianceMarkings_ReadableTermsResponse as ReadableTermsResponse };
46077
+ }
46078
+
46079
+ /**
46080
+ * Resource client for classification marking (clearance gating) operations.
46081
+ *
46082
+ * @remarks
46083
+ * Provides access to the compliance-markings endpoints, which evaluate the
46084
+ * classification lattice: whether a reader holding a clearance may see data
46085
+ * carrying a marking, the lattice of classification levels, and the tenant's
46086
+ * terms a given clearance may read.
46087
+ *
46088
+ * This is distinct from the broader `compliance` resource.
46089
+ *
46090
+ * Uses normalizers to convert between camelCase (SDK surface) and
46091
+ * snake_case (wire format) at the boundary.
46092
+ */
46093
+ declare class ComplianceMarkingsClient {
46094
+ /** @internal */
46095
+ private readonly api;
46096
+ /** @internal */
46097
+ constructor(api: ComplianceMarkings);
46098
+ /**
46099
+ * Evaluate whether a clearance may see data carrying a marking.
46100
+ *
46101
+ * @param request - The clearance and marking level names to evaluate.
46102
+ * @returns The gate decision, including the `dominates` verdict.
46103
+ * @throws {ApiError} If a level name is unknown (400) or the request fails.
46104
+ *
46105
+ * @remarks
46106
+ * Wire format is snake_case; both `clearance` and `marking` are
46107
+ * classification level names from the lattice.
46108
+ *
46109
+ * @example
46110
+ * ```typescript
46111
+ * const result = await client.complianceMarkings.gate({
46112
+ * clearance: 'Secret',
46113
+ * marking: 'Confidential',
46114
+ * });
46115
+ * console.log(result.dominates); // true
46116
+ * console.log(result.decision); // human-readable verdict
46117
+ * ```
46118
+ */
46119
+ gate(request: GateRequest): Promise<GateResponse>;
46120
+ /**
46121
+ * List the classification lattice.
46122
+ *
46123
+ * @returns The classification levels, ordered by the lattice.
46124
+ * @throws {ApiError} If the request fails.
46125
+ *
46126
+ * @remarks
46127
+ * Wire format is snake_case; each level carries a numeric `level` rank and a
46128
+ * `name`.
46129
+ *
46130
+ * @example
46131
+ * ```typescript
46132
+ * const { levels } = await client.complianceMarkings.listLevels();
46133
+ * console.log(levels.map((l) => l.name)); // ["Unclassified", "Confidential", ...]
46134
+ * ```
46135
+ */
46136
+ listLevels(): Promise<ListLevelsResponse>;
46137
+ /**
46138
+ * List the tenant's terms a requester holding a given clearance may read.
46139
+ *
46140
+ * @param clearance - Clearance level name. Defaults to `Unclassified` on the
46141
+ * backend when omitted.
46142
+ * @returns The readable terms and the readable/withheld counts.
46143
+ * @throws {ApiError} If the clearance name is unknown (400) or the request fails.
46144
+ *
46145
+ * @remarks
46146
+ * Wire format is snake_case (`readable_count`, `withheld_count`). Withheld
46147
+ * (residuated) terms are absent from `readable` and only reflected in
46148
+ * `withheldCount`. The `clearance` argument is passed as the optional
46149
+ * `clearance` query parameter.
46150
+ *
46151
+ * @example
46152
+ * ```typescript
46153
+ * const result = await client.complianceMarkings.readableTerms('Secret');
46154
+ * console.log(result.readableCount);
46155
+ * console.log(result.withheldCount);
46156
+ * console.log(result.readable.map((t) => t.id));
46157
+ * ```
46158
+ */
46159
+ readableTerms(clearance?: string): Promise<ReadableTermsResponse>;
46160
+ }
46161
+
46162
+ declare class Feasibility<SecurityDataType = unknown> {
46163
+ http: HttpClient<SecurityDataType>;
46164
+ constructor(http: HttpClient<SecurityDataType>);
46165
+ /**
46166
+ * No description
46167
+ *
46168
+ * @tags feasibility
46169
+ * @name AssumeFeasibilityVar
46170
+ * @summary Assume a flat decision variable `true` in a feasibility session; returns the trichotomy delta and the updated classification — the per-assumption click path for sessions begun via [`begin_feasibility_session`].
46171
+ * @request POST:/api/v1/feasibility/sessions/{session_id}/assumptions
46172
+ * @secure
46173
+ */
46174
+ assumeFeasibilityVar: (sessionId: string, data: AssumptionRequest$1, params?: RequestParams) => Promise<HttpResponse<SchedulingDeltaResponse$1, void>>;
46175
+ /**
46176
+ * No description
46177
+ *
46178
+ * @tags feasibility
46179
+ * @name BeginFeasibilitySession
46180
+ * @summary Begin a generic constraint-model feasibility session and return its id + the empty-assumptions trichotomy over `0..num_decision_vars`. The declarative-compiler interactive all-feasibilities surface — clicks assume flat variables via [`assume_feasibility_var`].
46181
+ * @request POST:/api/v1/feasibility/sessions
46182
+ * @secure
46183
+ */
46184
+ beginFeasibilitySession: (data: GenericModelRequest$1, params?: RequestParams) => Promise<HttpResponse<SchedulingSessionResponse$1, void>>;
46185
+ /**
46186
+ * No description
46187
+ *
46188
+ * @tags feasibility
46189
+ * @name EndFeasibilitySession
46190
+ * @summary End (drop) a feasibility session.
46191
+ * @request DELETE:/api/v1/feasibility/sessions/{session_id}
46192
+ * @secure
46193
+ */
46194
+ endFeasibilitySession: (sessionId: string, params?: RequestParams) => Promise<HttpResponse<EndSchedulingResponse$1, void>>;
46195
+ /**
46196
+ * No description
46197
+ *
46198
+ * @tags feasibility
46199
+ * @name GetFeasibilitySession
46200
+ * @summary Get a feasibility session's current classification.
46201
+ * @request GET:/api/v1/feasibility/sessions/{session_id}
46202
+ * @secure
46203
+ */
46204
+ getFeasibilitySession: (sessionId: string, params?: RequestParams) => Promise<HttpResponse<SchedulingSessionResponse$1, void>>;
46205
+ /**
46206
+ * No description
46207
+ *
46208
+ * @tags feasibility
46209
+ * @name RetractFeasibilityAssumption
46210
+ * @summary Retract the most recent assumption, restoring the prior classification (no re-solve).
46211
+ * @request DELETE:/api/v1/feasibility/sessions/{session_id}/assumptions/last
46212
+ * @secure
46213
+ */
46214
+ retractFeasibilityAssumption: (sessionId: string, params?: RequestParams) => Promise<HttpResponse<SchedulingSessionResponse$1, void>>;
46215
+ }
46216
+
46217
+ /**
46218
+ * Comparison sense of a {@link LinearConstraint}.
46219
+ *
46220
+ * @remarks
46221
+ * Wire values (snake_case): `"leq"`, `"geq"`, `"eq"`.
46222
+ */
46223
+ type ConstraintSense = 'leq' | 'geq' | 'eq';
46224
+ /**
46225
+ * Direction of an {@link Objective} function.
46226
+ *
46227
+ * @remarks
46228
+ * Wire values (snake_case): `"minimize"`, `"maximize"`.
46229
+ */
46230
+ type ObjectiveSense = 'minimize' | 'maximize';
46231
+ /**
46232
+ * Kind of a {@link VariableSpec} decision variable. Defaults server-side to
46233
+ * `"continuous"`.
46234
+ *
46235
+ * @remarks
46236
+ * Wire values (snake_case): `"continuous"`, `"integer"`, `"binary"`.
46237
+ */
46238
+ type VarKind = 'continuous' | 'integer' | 'binary';
46239
+ /**
46240
+ * Backend-selection hint. `"auto"` (default) routes CP-SAT for fully discrete
46241
+ * problems and HiGHS for any continuous variable.
46242
+ *
46243
+ * @remarks
46244
+ * Wire values (snake_case): `"auto"`, `"prefer_cp"`, `"prefer_lp"`.
46245
+ */
46246
+ type SolverHint = 'auto' | 'prefer_cp' | 'prefer_lp';
46247
+ /**
46248
+ * Status reported by the solver for a solve or classification.
46249
+ *
46250
+ * @remarks
46251
+ * Wire values (snake_case): `"optimal"`, `"feasible"`, `"infeasible"`,
46252
+ * `"unbounded"`, `"unknown"`.
46253
+ */
46254
+ type SolutionStatus = 'optimal' | 'feasible' | 'infeasible' | 'unbounded' | 'unknown';
46255
+ /**
46256
+ * Per-variable classification — the ILP analog of flow-network edge
46257
+ * classification (Dulmage-Mendelsohn).
46258
+ *
46259
+ * @remarks
46260
+ * Wire values (snake_case): `"always_used"`, `"sometimes_used"`,
46261
+ * `"never_used"`.
46262
+ */
46263
+ type VariableClassification = 'always_used' | 'sometimes_used' | 'never_used';
46264
+ /**
46265
+ * Relational operator used by the `compare` variant of a {@link BoolExpr}.
46266
+ *
46267
+ * @remarks
46268
+ * Wire values (snake_case): `"equal"`, `"not_equal"`, `"less_than"`,
46269
+ * `"less_than_or_equal"`, `"greater_than"`, `"greater_than_or_equal"`.
46270
+ */
46271
+ type RelOp = 'equal' | 'not_equal' | 'less_than' | 'less_than_or_equal' | 'greater_than' | 'greater_than_or_equal';
46272
+ /**
46273
+ * A single decision variable. Names must be unique within a problem and are
46274
+ * echoed verbatim in the response `values` map.
46275
+ *
46276
+ * @remarks
46277
+ * Wire shape (snake_case): `{ kind, lower_bound, name, upper_bound }`.
46278
+ */
46279
+ interface VariableSpec {
46280
+ /** Caller-chosen identifier. Must be unique. */
46281
+ name: string;
46282
+ /** Variable kind. Defaults to `"continuous"`. */
46283
+ kind?: VarKind;
46284
+ /** Lower bound. Use negative infinity for unbounded below. */
46285
+ lowerBound?: number;
46286
+ /** Upper bound. Use positive infinity for unbounded above. Ignored for `"binary"` (forced to 1). */
46287
+ upperBound?: number;
46288
+ }
46289
+ /**
46290
+ * A linear constraint `Σ coef_i · x_i (sense) rhs`. Variables not referenced in
46291
+ * `coefficients` are treated as if their coefficient is zero.
46292
+ *
46293
+ * @remarks
46294
+ * Wire shape (snake_case): `{ coefficients, name, rhs, sense }`. This is the
46295
+ * solver/feasibility linear-constraint model; it is distinct from the
46296
+ * `Optimize` namespace's `LinearConstraint`.
46297
+ */
46298
+ interface LinearConstraint {
46299
+ /** Variable-name → coefficient. */
46300
+ coefficients: Record<string, number>;
46301
+ /** Right-hand side. */
46302
+ rhs: number;
46303
+ /** Comparison sense. */
46304
+ sense: ConstraintSense;
46305
+ /** Optional caller-supplied label, returned in error reports. */
46306
+ name?: string | null;
46307
+ }
46308
+ /**
46309
+ * Objective function to optimize.
46310
+ *
46311
+ * @remarks
46312
+ * Wire shape (snake_case): `{ coefficients, constant, sense }`.
46313
+ */
46314
+ interface Objective {
46315
+ /** Direction of the objective function. */
46316
+ sense: ObjectiveSense;
46317
+ /** Variable-name → coefficient. */
46318
+ coefficients?: Record<string, number>;
46319
+ /** Constant addend. */
46320
+ constant?: number;
46321
+ }
46322
+ /**
46323
+ * One term `coeff · var` of a {@link LinExpr}.
46324
+ *
46325
+ * @remarks
46326
+ * Wire shape (snake_case): `{ coeff, var }`.
46327
+ */
46328
+ interface LinTerm {
46329
+ /** The integer coefficient. */
46330
+ coeff: number;
46331
+ /** The flat decision-variable index. */
46332
+ var: number;
46333
+ }
46334
+ /**
46335
+ * A linear expression `Σ coeff·var + constant` over flat decision-variable
46336
+ * indices.
46337
+ *
46338
+ * @remarks
46339
+ * Wire shape (snake_case): `{ constant, terms }`.
46340
+ */
46341
+ interface LinExpr {
46342
+ /** The constant addend. */
46343
+ constant?: number;
46344
+ /** The `coeff·var` terms. */
46345
+ terms?: LinTerm[];
46346
+ }
46347
+ /**
46348
+ * A literal over a flat decision-variable index, with a required polarity.
46349
+ *
46350
+ * @remarks
46351
+ * Wire shape (snake_case): `{ value, var }`.
46352
+ */
46353
+ interface Lit {
46354
+ /** The required polarity (`true` ⇒ the var is set, `false` ⇒ unset). */
46355
+ value: boolean;
46356
+ /** The flat decision-variable index. */
46357
+ var: number;
46358
+ }
46359
+ /**
46360
+ * A boolean-valued expression over flat decision-variable indices.
46361
+ *
46362
+ * @remarks
46363
+ * Tagged discriminated union keyed on `type`. Wire format (snake_case)
46364
+ * mirrors this shape verbatim.
46365
+ */
46366
+ type BoolExpr = {
46367
+ type: 'lit';
46368
+ value: boolean;
46369
+ var: number;
46370
+ } | {
46371
+ type: 'const';
46372
+ value: boolean;
46373
+ } | {
46374
+ type: 'not';
46375
+ expr: BoolExpr;
46376
+ } | {
46377
+ type: 'and';
46378
+ exprs: BoolExpr[];
46379
+ } | {
46380
+ type: 'or';
46381
+ exprs: BoolExpr[];
46382
+ } | {
46383
+ type: 'implies';
46384
+ left: BoolExpr;
46385
+ right: BoolExpr;
46386
+ } | {
46387
+ type: 'iff';
46388
+ left: BoolExpr;
46389
+ right: BoolExpr;
46390
+ } | {
46391
+ type: 'xor';
46392
+ left: BoolExpr;
46393
+ right: BoolExpr;
46394
+ } | {
46395
+ type: 'compare';
46396
+ left: LinExpr;
46397
+ op: RelOp;
46398
+ right: LinExpr;
46399
+ };
46400
+ /**
46401
+ * A temporal rule enforced over a `regular` timeline.
46402
+ *
46403
+ * @remarks
46404
+ * Tagged discriminated union keyed on `type`. Wire format (snake_case)
46405
+ * mirrors this shape verbatim.
46406
+ */
46407
+ type TemporalRule = {
46408
+ type: 'no_consec';
46409
+ } | {
46410
+ type: 'capacity';
46411
+ max1ShiftPerDay: boolean;
46412
+ maxDays: number;
46413
+ } | {
46414
+ type: 'max_consecutive_nights';
46415
+ k: number;
46416
+ };
46417
+ /**
46418
+ * A typed constraint over the flat decision variables.
46419
+ *
46420
+ * @remarks
46421
+ * Tagged discriminated union keyed on `type`. Wire format (snake_case)
46422
+ * mirrors this shape verbatim; the `regular` variant's `rules` use
46423
+ * {@link TemporalRule} and the `forbid`/`arithmetic` variants use {@link Lit} /
46424
+ * {@link BoolExpr}.
46425
+ */
46426
+ type TypedConstraint = {
46427
+ type: 'global_cardinality';
46428
+ vars: number[];
46429
+ min: number;
46430
+ max?: number | null;
46431
+ } | {
46432
+ type: 'forbid';
46433
+ lits: Lit[];
46434
+ } | {
46435
+ type: 'pin';
46436
+ var: number;
46437
+ } | {
46438
+ type: 'regular';
46439
+ vars: number[];
46440
+ days: number;
46441
+ shifts: number;
46442
+ available: boolean[];
46443
+ rules: TemporalRule[];
46444
+ } | {
46445
+ type: 'all_different';
46446
+ vars: number[];
46447
+ } | {
46448
+ type: 'arithmetic';
46449
+ expr: BoolExpr;
46450
+ };
46451
+ /**
46452
+ * A single decision over which to explore alternatives. Each must have
46453
+ * `alternativeCount ≥ 2`.
46454
+ *
46455
+ * @remarks
46456
+ * Wire shape (snake_case): `{ alternative_count, description, variable_name }`.
46457
+ */
46458
+ interface ChoicePoint {
46459
+ /** Number of alternatives. */
46460
+ alternativeCount: number;
46461
+ /** Description of what this choice represents. */
46462
+ description: string;
46463
+ /** Optional variable name for arithmetic constraints. */
46464
+ variableName?: string | null;
46465
+ }
46466
+ /**
46467
+ * A generic constraint-model request used to begin a feasibility session.
46468
+ *
46469
+ * @remarks
46470
+ * Wire shape (snake_case): `{ choice_points, constraints, objective }`. Owned here
46471
+ * as part of the shared cluster; consumed by the Feasibility domain.
46472
+ */
46473
+ interface GenericModelRequest {
46474
+ /** The decisions to explore, in order. Each must have `alternativeCount ≥ 2`. */
46475
+ choicePoints: ChoicePoint[];
46476
+ /** The typed constraints over the flat decision variables. */
46477
+ constraints?: TypedConstraint[];
46478
+ /**
46479
+ * Optional linear objective to **maximize** (`Σ weight·var` over the true
46480
+ * decision variables), as `(var, weight)` terms. Empty/omitted ⇒ pure-feasibility
46481
+ * mode (the trichotomy over all feasible completions). Non-empty ⇒ optimize mode:
46482
+ * the trichotomy is taken over the **maximum-weight** completions and the responses
46483
+ * carry `totalScore` (the optimum). A var absent from the list has weight `0`;
46484
+ * duplicate vars sum.
46485
+ */
46486
+ objective?: LinTerm[];
46487
+ }
46488
+ /**
46489
+ * Request body for `POST /api/v1/solver/solve`.
46490
+ *
46491
+ * @remarks
46492
+ * Wire shape (snake_case): `{ constraints, gap_tolerance, hint, objective,
46493
+ * time_limit_ms, variables }`.
46494
+ */
46495
+ interface SolveProblemRequest {
46496
+ /** The decision variables of the problem. */
46497
+ variables: VariableSpec[];
46498
+ /** Linear constraints over the variables. */
46499
+ constraints?: LinearConstraint[];
46500
+ /** Objective function; omit for a pure feasibility solve. */
46501
+ objective?: Objective | null;
46502
+ /** Backend-selection hint. */
46503
+ hint?: SolverHint;
46504
+ /** Relative MIP gap tolerance (e.g. `0.01` for 1%). `0.0` means solve to proven optimum. */
46505
+ gapTolerance?: number | null;
46506
+ /** Wall-clock limit per solve, in milliseconds. Defaults server-side to 30000. */
46507
+ timeLimitMs?: number | null;
46508
+ }
46509
+ /**
46510
+ * Response body for `POST /api/v1/solver/solve`.
46511
+ *
46512
+ * @remarks
46513
+ * Wire shape (snake_case): `{ message, objective_value, solve_time_ms, solver,
46514
+ * status, values }`.
46515
+ */
46516
+ interface SolveProblemResponse {
46517
+ /** Status reported by the solver. */
46518
+ status: SolutionStatus;
46519
+ /** `"cp_sat"` or `"highs"`. */
46520
+ solver: string;
46521
+ /** Variable-name → optimal value. Empty for infeasible/unbounded. */
46522
+ values: Record<string, number>;
46523
+ /** Objective value at the optimum, when an objective was supplied. */
46524
+ objectiveValue?: number | null;
46525
+ /** Wall-clock solve time inside the solver service, in milliseconds. */
46526
+ solveTimeMs: number;
46527
+ /** Optional diagnostic message (e.g. when status is `"unknown"`). */
46528
+ message?: string | null;
46529
+ }
46530
+ /**
46531
+ * Request body for `POST /api/v1/solver/classify`. Same fields as
46532
+ * {@link SolveProblemRequest} plus an optional list of variable names whose
46533
+ * classification is requested; omitting it classifies every binary variable.
46534
+ *
46535
+ * @remarks
46536
+ * Wire shape (snake_case): `{ constraints, gap_tolerance, hint, objective,
46537
+ * time_limit_ms, variables, variables_of_interest }`.
46538
+ */
46539
+ interface ClassifyProblemRequest {
46540
+ /** The decision variables of the problem. */
46541
+ variables: VariableSpec[];
46542
+ /** Linear constraints over the variables. */
46543
+ constraints?: LinearConstraint[];
46544
+ /** Objective function; omit for a pure feasibility classification. */
46545
+ objective?: Objective | null;
46546
+ /** Backend-selection hint. */
46547
+ hint?: SolverHint;
46548
+ /** Relative MIP gap tolerance. */
46549
+ gapTolerance?: number | null;
46550
+ /** Wall-clock limit per solve, in milliseconds. */
46551
+ timeLimitMs?: number | null;
46552
+ /** Variables to classify. Omit (or send empty) to classify every binary variable. */
46553
+ variablesOfInterest?: string[] | null;
46554
+ }
46555
+ /**
46556
+ * Response body for `POST /api/v1/solver/classify`.
46557
+ *
46558
+ * @remarks
46559
+ * Wire shape (snake_case): `{ baseline_values, classifications, message,
46560
+ * solve_time_ms, solver, status }`.
46561
+ */
46562
+ interface ClassifyProblemResponse {
46563
+ /** Status reported by the solver. */
46564
+ status: SolutionStatus;
46565
+ /** `"cp_sat"` or `"highs"`. */
46566
+ solver: string;
46567
+ /** Variable-name → classification. Empty when the baseline is infeasible. */
46568
+ classifications: Record<string, VariableClassification>;
46569
+ /** Variable-name → baseline solve value. A concrete witness alongside the classification. */
46570
+ baselineValues: Record<string, number>;
46571
+ /** Wall-clock solve time inside the solver service, in milliseconds. */
46572
+ solveTimeMs: number;
46573
+ /** Optional diagnostic message. */
46574
+ message?: string | null;
46575
+ }
46576
+ /**
46577
+ * Response body for `GET /api/v1/solver/health`.
46578
+ *
46579
+ * @remarks
46580
+ * Wire shape (snake_case): `{ status }`.
46581
+ */
46582
+ interface SolverHealthResponse {
46583
+ /** Liveness marker — `"ok"` when the upstream solver service is reachable. */
46584
+ status: string;
46585
+ }
46586
+
46587
+ type solver_BoolExpr = BoolExpr;
46588
+ type solver_ChoicePoint = ChoicePoint;
46589
+ type solver_ClassifyProblemRequest = ClassifyProblemRequest;
46590
+ type solver_ClassifyProblemResponse = ClassifyProblemResponse;
46591
+ type solver_ConstraintSense = ConstraintSense;
46592
+ type solver_GenericModelRequest = GenericModelRequest;
46593
+ type solver_LinExpr = LinExpr;
46594
+ type solver_LinTerm = LinTerm;
46595
+ type solver_LinearConstraint = LinearConstraint;
46596
+ type solver_Lit = Lit;
46597
+ type solver_Objective = Objective;
46598
+ type solver_ObjectiveSense = ObjectiveSense;
46599
+ type solver_RelOp = RelOp;
46600
+ type solver_SolutionStatus = SolutionStatus;
46601
+ type solver_SolveProblemRequest = SolveProblemRequest;
46602
+ type solver_SolveProblemResponse = SolveProblemResponse;
46603
+ type solver_SolverHealthResponse = SolverHealthResponse;
46604
+ type solver_SolverHint = SolverHint;
46605
+ type solver_TemporalRule = TemporalRule;
46606
+ type solver_TypedConstraint = TypedConstraint;
46607
+ type solver_VarKind = VarKind;
46608
+ type solver_VariableClassification = VariableClassification;
46609
+ type solver_VariableSpec = VariableSpec;
46610
+ declare namespace solver {
46611
+ export type { solver_BoolExpr as BoolExpr, solver_ChoicePoint as ChoicePoint, solver_ClassifyProblemRequest as ClassifyProblemRequest, solver_ClassifyProblemResponse as ClassifyProblemResponse, solver_ConstraintSense as ConstraintSense, solver_GenericModelRequest as GenericModelRequest, solver_LinExpr as LinExpr, solver_LinTerm as LinTerm, solver_LinearConstraint as LinearConstraint, solver_Lit as Lit, solver_Objective as Objective, solver_ObjectiveSense as ObjectiveSense, solver_RelOp as RelOp, solver_SolutionStatus as SolutionStatus, solver_SolveProblemRequest as SolveProblemRequest, solver_SolveProblemResponse as SolveProblemResponse, solver_SolverHealthResponse as SolverHealthResponse, solver_SolverHint as SolverHint, solver_TemporalRule as TemporalRule, solver_TypedConstraint as TypedConstraint, solver_VarKind as VarKind, solver_VariableClassification as VariableClassification, solver_VariableSpec as VariableSpec };
46612
+ }
46613
+
46614
+ /**
46615
+ * Request to assume a single flat decision variable `true` within a session.
46616
+ *
46617
+ * @remarks
46618
+ * Wire shape (snake_case): `{ var }`.
46619
+ */
46620
+ interface AssumptionRequest {
46621
+ /** The flat decision-variable index to assume `true`. */
46622
+ var: number;
46623
+ }
46624
+ /**
46625
+ * The per-cell trichotomy classification of a feasibility session.
46626
+ *
46627
+ * @remarks
46628
+ * Wire shape (snake_case): `{ confirmed_false, confirmed_true, sometimes }`.
46629
+ * Cells are referenced by flat decision-variable index.
46630
+ */
46631
+ interface Classification {
46632
+ /** Cells in every valid completion — forced/highlighted. */
46633
+ confirmedTrue: number[];
46634
+ /** Cells in no valid completion — gray these out. */
46635
+ confirmedFalse: number[];
46636
+ /** Cells that are a free choice. */
46637
+ sometimes: number[];
46638
+ }
46639
+ /**
46640
+ * Response carrying a session id and its current classification.
46641
+ *
46642
+ * @remarks
46643
+ * Wire shape (snake_case): `{ classification, session_id, total_score }`.
46644
+ */
46645
+ interface SchedulingSessionResponse {
46646
+ /** Opaque session id. */
46647
+ sessionId: string;
46648
+ /** The current per-cell trichotomy. */
46649
+ classification: Classification;
46650
+ /**
46651
+ * In optimize mode (the request carried an `objective`), the optimum
46652
+ * `Σ weight·var` over the optimal completions at the current pins; absent for
46653
+ * pure-feasibility models.
46654
+ */
46655
+ totalScore?: number | null;
46656
+ }
46657
+ /**
46658
+ * Response from assuming a variable: the full classification after the pin plus
46659
+ * the cells whose status changed.
46660
+ *
46661
+ * @remarks
46662
+ * Wire shape (snake_case): `{ classification, newly_confirmed_false,
46663
+ * newly_confirmed_true, total_score }`.
46664
+ */
46665
+ interface SchedulingDeltaResponse {
46666
+ /** The full classification after the pin. */
46667
+ classification: Classification;
46668
+ /** Cells that became `confirmedTrue` on this pin (incl. the pinned cell). */
46669
+ newlyConfirmedTrue: number[];
46670
+ /** Cells that became `confirmedFalse` on this pin. */
46671
+ newlyConfirmedFalse: number[];
46672
+ /**
46673
+ * In optimize mode, the optimum `Σ weight·var` after this assumption; absent
46674
+ * for pure-feasibility models. The optimum can drop as pins shrink the optimal
46675
+ * set, so always trust `classification` for repaint — the optimize delta can
46676
+ * also un-confirm cells.
46677
+ */
46678
+ totalScore?: number | null;
46679
+ }
46680
+ /**
46681
+ * Response from ending a feasibility session.
46682
+ *
46683
+ * @remarks
46684
+ * Wire shape (snake_case): `{ ended }`.
46685
+ */
46686
+ interface EndSchedulingResponse {
46687
+ /** Whether a live session was removed. */
46688
+ ended: boolean;
46689
+ }
46690
+
46691
+ type feasibility_AssumptionRequest = AssumptionRequest;
46692
+ type feasibility_Classification = Classification;
46693
+ type feasibility_EndSchedulingResponse = EndSchedulingResponse;
46694
+ type feasibility_SchedulingDeltaResponse = SchedulingDeltaResponse;
46695
+ type feasibility_SchedulingSessionResponse = SchedulingSessionResponse;
46696
+ declare namespace feasibility {
46697
+ export type { feasibility_AssumptionRequest as AssumptionRequest, feasibility_Classification as Classification, feasibility_EndSchedulingResponse as EndSchedulingResponse, feasibility_SchedulingDeltaResponse as SchedulingDeltaResponse, feasibility_SchedulingSessionResponse as SchedulingSessionResponse };
46698
+ }
46699
+
46700
+ /**
46701
+ * Resource client for interactive constraint-model feasibility sessions.
46702
+ *
46703
+ * @remarks
46704
+ * A session is begun from a generic constraint model
46705
+ * ({@link GenericModelRequest}) and returns its id plus the empty-assumptions
46706
+ * trichotomy over the flat decision variables. Each subsequent assumption pins
46707
+ * a variable `true` and returns the resulting classification delta; the most
46708
+ * recent assumption can be retracted without a re-solve.
46709
+ *
46710
+ * Uses normalizers to convert between camelCase (SDK surface) and snake_case
46711
+ * (wire format) at the boundary.
46712
+ */
46713
+ declare class FeasibilityClient {
46714
+ /** @internal */
46715
+ private readonly api;
46716
+ /** @internal */
46717
+ constructor(api: Feasibility);
46718
+ /**
46719
+ * Begin a generic constraint-model feasibility session.
46720
+ *
46721
+ * @param request - The constraint model: choice points and typed constraints
46722
+ * over the flat decision variables.
46723
+ * @returns The new session id and the empty-assumptions trichotomy.
46724
+ * @throws {ApiError} If the request fails.
46725
+ *
46726
+ * @remarks
46727
+ * Wraps `POST /api/v1/feasibility/sessions` (snake_case wire format).
46728
+ *
46729
+ * @example
46730
+ * ```typescript
46731
+ * const session = await client.feasibility.beginFeasibilitySession({
46732
+ * choicePoints: [{ alternativeCount: 2, description: 'shift A or B' }],
46733
+ * constraints: [{ type: 'all_different', vars: [0, 1] }],
46734
+ * });
46735
+ * console.log(session.sessionId);
46736
+ * console.log(session.classification.sometimes);
46737
+ * ```
46738
+ */
46739
+ beginFeasibilitySession(request: GenericModelRequest): Promise<SchedulingSessionResponse>;
46740
+ /**
46741
+ * Assume a flat decision variable `true` within a session.
46742
+ *
46743
+ * @param sessionId - The session id returned by
46744
+ * {@link FeasibilityClient.beginFeasibilitySession}.
46745
+ * @param request - The flat decision-variable index to pin `true`.
46746
+ * @returns The trichotomy delta and the updated classification.
46747
+ * @throws {ApiError} If the session does not exist or the request fails.
46748
+ *
46749
+ * @remarks
46750
+ * Wraps `POST /api/v1/feasibility/sessions/{session_id}/assumptions`
46751
+ * (snake_case wire format).
46752
+ *
46753
+ * @example
46754
+ * ```typescript
46755
+ * const delta = await client.feasibility.assumeFeasibilityVar(sessionId, { var: 0 });
46756
+ * console.log(delta.newlyConfirmedTrue);
46757
+ * console.log(delta.newlyConfirmedFalse);
46758
+ * ```
46759
+ */
46760
+ assumeFeasibilityVar(sessionId: string, request: AssumptionRequest): Promise<SchedulingDeltaResponse>;
46761
+ /**
46762
+ * Retract the most recent assumption, restoring the prior classification.
46763
+ *
46764
+ * @param sessionId - The session id.
46765
+ * @returns The restored classification (no re-solve is performed).
46766
+ * @throws {ApiError} If the session does not exist or the request fails.
46767
+ *
46768
+ * @remarks
46769
+ * Wraps `DELETE /api/v1/feasibility/sessions/{session_id}/assumptions/last`
46770
+ * (snake_case wire format).
46771
+ *
46772
+ * @example
46773
+ * ```typescript
46774
+ * const session = await client.feasibility.retractFeasibilityAssumption(sessionId);
46775
+ * console.log(session.classification.sometimes);
46776
+ * ```
46777
+ */
46778
+ retractFeasibilityAssumption(sessionId: string): Promise<SchedulingSessionResponse>;
46779
+ /**
46780
+ * Get a session's current classification.
46781
+ *
46782
+ * @param sessionId - The session id.
46783
+ * @returns The session id and its current trichotomy.
46784
+ * @throws {ApiError} If the session does not exist or the request fails.
46785
+ *
46786
+ * @remarks
46787
+ * Wraps `GET /api/v1/feasibility/sessions/{session_id}` (snake_case wire
46788
+ * format).
46789
+ *
46790
+ * @example
46791
+ * ```typescript
46792
+ * const session = await client.feasibility.getFeasibilitySession(sessionId);
46793
+ * console.log(session.classification.confirmedTrue);
46794
+ * ```
46795
+ */
46796
+ getFeasibilitySession(sessionId: string): Promise<SchedulingSessionResponse>;
46797
+ /**
46798
+ * End (drop) a feasibility session.
46799
+ *
46800
+ * @param sessionId - The session id.
46801
+ * @returns Whether a live session was removed.
46802
+ * @throws {ApiError} If the request fails.
46803
+ *
46804
+ * @remarks
46805
+ * Wraps `DELETE /api/v1/feasibility/sessions/{session_id}` (snake_case wire
46806
+ * format).
46807
+ *
46808
+ * @example
46809
+ * ```typescript
46810
+ * const result = await client.feasibility.endFeasibilitySession(sessionId);
46811
+ * console.log(result.ended); // true
46812
+ * ```
46813
+ */
46814
+ endFeasibilitySession(sessionId: string): Promise<EndSchedulingResponse>;
46815
+ }
46816
+
46817
+ declare class Solver<SecurityDataType = unknown> {
46818
+ http: HttpClient<SecurityDataType>;
46819
+ constructor(http: HttpClient<SecurityDataType>);
46820
+ /**
46821
+ * @description Returns per-variable always_used / sometimes_used / never_used classifications. Used by the rostering page to render the same trichotomy view-model as the flow-network scheduling page.
46822
+ *
46823
+ * @tags solver
46824
+ * @name ClassifyProblem
46825
+ * @summary Forward a classify request to the external solver service.
46826
+ * @request POST:/api/v1/solver/classify
46827
+ * @secure
46828
+ */
46829
+ classifyProblem: (data: ClassifyProblemRequest$1, params?: RequestParams) => Promise<HttpResponse<ClassifyProblemResponse$1, void>>;
46830
+ /**
46831
+ * No description
46832
+ *
46833
+ * @tags solver
46834
+ * @name SolveProblem
46835
+ * @summary Forward a solve request to the external solver service.
46836
+ * @request POST:/api/v1/solver/solve
46837
+ * @secure
46838
+ */
46839
+ solveProblem: (data: SolveProblemRequest$1, params?: RequestParams) => Promise<HttpResponse<SolveProblemResponse$1, void>>;
46840
+ /**
46841
+ * No description
46842
+ *
46843
+ * @tags solver
46844
+ * @name SolverHealth
46845
+ * @summary Liveness probe — forwards to the solver service's `/health` endpoint so callers can confirm the upstream is reachable from inside the backend's network.
46846
+ * @request GET:/api/v1/solver/health
46847
+ */
46848
+ solverHealth: (params?: RequestParams) => Promise<HttpResponse<SolverHealthResponse$1, void>>;
46849
+ }
46850
+
46851
+ /**
46852
+ * Resource client for the external constraint-solver service.
46853
+ *
46854
+ * @remarks
46855
+ * Forwards linear / mixed-integer constraint problems to the upstream solver
46856
+ * (CP-SAT or HiGHS, selected via {@link SolveProblemRequest.hint}) and returns
46857
+ * either an optimal solution or a per-variable always/sometimes/never-used
46858
+ * classification.
46859
+ *
46860
+ * Uses normalizers to convert between camelCase (SDK surface) and snake_case
46861
+ * (wire format) at the boundary.
46862
+ */
46863
+ declare class SolverClient {
46864
+ /** @internal */
46865
+ private readonly api;
46866
+ /** @internal */
46867
+ constructor(api: Solver);
46868
+ /**
46869
+ * Classify each variable as always-used, sometimes-used, or never-used
46870
+ * across the feasible (or optimal) region of a constraint problem.
46871
+ *
46872
+ * @param request - The problem: variables, constraints, optional objective,
46873
+ * solver hint, and the variables of interest to classify.
46874
+ * @returns The per-variable classifications plus a baseline witness solution.
46875
+ * @throws {ApiError} If the request fails or the solver service is unreachable.
46876
+ *
46877
+ * @remarks
46878
+ * Wraps `POST /api/v1/solver/classify` (snake_case wire format). Omit
46879
+ * `variablesOfInterest` to classify every binary variable.
46880
+ *
46881
+ * @example
46882
+ * ```typescript
46883
+ * const result = await client.solver.classifyProblem({
46884
+ * variables: [
46885
+ * { name: 'x', kind: 'binary' },
46886
+ * { name: 'y', kind: 'binary' },
46887
+ * ],
46888
+ * constraints: [
46889
+ * { coefficients: { x: 1, y: 1 }, sense: 'leq', rhs: 1 },
46890
+ * ],
46891
+ * });
46892
+ * console.log(result.status); // "optimal"
46893
+ * console.log(result.classifications); // { x: "sometimes_used", y: "sometimes_used" }
46894
+ * ```
46895
+ */
46896
+ classifyProblem(request: ClassifyProblemRequest): Promise<ClassifyProblemResponse>;
46897
+ /**
46898
+ * Solve a linear / mixed-integer constraint problem.
46899
+ *
46900
+ * @param request - The problem: variables, constraints, optional objective,
46901
+ * solver hint, gap tolerance, and time limit.
46902
+ * @returns The solution status, solver used, optimal variable values, and
46903
+ * objective value (when an objective was supplied).
46904
+ * @throws {ApiError} If the request fails or the solver service is unreachable.
46905
+ *
46906
+ * @remarks
46907
+ * Wraps `POST /api/v1/solver/solve` (snake_case wire format). Omit
46908
+ * `objective` for a pure feasibility solve.
46909
+ *
46910
+ * @example
46911
+ * ```typescript
46912
+ * const result = await client.solver.solveProblem({
46913
+ * variables: [
46914
+ * { name: 'chairs', kind: 'integer', lowerBound: 0 },
46915
+ * { name: 'tables', kind: 'integer', lowerBound: 0 },
46916
+ * ],
46917
+ * constraints: [
46918
+ * { coefficients: { chairs: 1, tables: 3 }, sense: 'leq', rhs: 12 },
46919
+ * ],
46920
+ * objective: { sense: 'maximize', coefficients: { chairs: 3, tables: 5 } },
46921
+ * });
46922
+ * console.log(result.status); // "optimal"
46923
+ * console.log(result.objectiveValue); // 20
46924
+ * ```
46925
+ */
46926
+ solveProblem(request: SolveProblemRequest): Promise<SolveProblemResponse>;
46927
+ /**
46928
+ * Liveness probe for the upstream solver service.
46929
+ *
46930
+ * @returns A status marker — `status` is `"ok"` when the upstream solver
46931
+ * service responded to its `/health` endpoint.
46932
+ * @throws {ApiError} If the request fails or the solver service is unreachable.
46933
+ *
46934
+ * @remarks
46935
+ * Wraps `GET /api/v1/solver/health` (snake_case wire format).
46936
+ *
46937
+ * @example
46938
+ * ```typescript
46939
+ * const health = await client.solver.solverHealth();
46940
+ * console.log(health.status); // "ok"
46941
+ * ```
46942
+ */
46943
+ solverHealth(): Promise<SolverHealthResponse>;
46944
+ }
46945
+
46946
+ declare class OntologyAlignment<SecurityDataType = unknown> {
46947
+ http: HttpClient<SecurityDataType>;
46948
+ constructor(http: HttpClient<SecurityDataType>);
46949
+ /**
46950
+ * No description
46951
+ *
46952
+ * @tags ontology_alignment
46953
+ * @name AlignOntology
46954
+ * @summary Align a domain ontology to the upper ontology (BFO-2020).
46955
+ * @request POST:/api/v1/ontology/align
46956
+ * @secure
46957
+ */
46958
+ alignOntology: (data: AlignOntologyRequest$1, params?: RequestParams) => Promise<HttpResponse<AlignOntologyResponse$1, void>>;
46959
+ }
46960
+
46961
+ /**
46962
+ * Request to align a domain ontology against one or more upper ontologies.
46963
+ *
46964
+ * @remarks
46965
+ * Sent to `POST /api/v1/ontology/align`. Wire format is snake_case
46966
+ * (`domain_owl`).
46967
+ */
46968
+ interface AlignOntologyRequest {
46969
+ /** Domain ontology to align, as OWL/RDF-XML. */
46970
+ domainOwl: string;
46971
+ /** Upper ontologies to align against. Defaults to `["BFO"]` when empty. */
46972
+ targets?: string[];
46973
+ }
46974
+ /**
46975
+ * A confirmed SKOS correspondence from a domain class to an upper-ontology class.
46976
+ */
46977
+ interface AlignmentMatchDto {
46978
+ /** Domain sort name. */
46979
+ domainSort: string;
46980
+ /** SKOS relation: `exactMatch` / `broadMatch` / `narrowMatch` / `closeMatch`. */
46981
+ matchType: string;
46982
+ /** Upper-ontology class CURIE (e.g. the BFO IRI's CURIE form). */
46983
+ targetCurie: string;
46984
+ /** Upper-ontology class label. */
46985
+ targetLabel: string;
46986
+ }
46987
+ /**
46988
+ * Two upper-ontology candidates a domain class cannot map to simultaneously
46989
+ * (their lattice meet is ⊥ — e.g. disjoint BFO branches).
46990
+ */
46991
+ interface AlignmentConflictDto {
46992
+ /** Domain sort name whose candidates conflict. */
46993
+ domainSort: string;
46994
+ /** The kept (higher-scored) candidate CURIE. */
46995
+ targetA: string;
46996
+ /** The rejected, incompatible candidate CURIE. */
46997
+ targetB: string;
46998
+ }
46999
+ /**
47000
+ * A SKOS external-ontology alignment attached to a sort.
47001
+ *
47002
+ * @remarks
47003
+ * Populated by the upper-ontology aligner so each correspondence is a live,
47004
+ * queryable property of the sort rather than a separate static export.
47005
+ */
47006
+ interface ExternalMatchDto {
47007
+ /** SKOS mapping relation: `exactMatch` | `closeMatch` | `broadMatch` | `narrowMatch`. */
47008
+ matchType: string;
47009
+ /** CURIE of the aligned external concept (e.g. `obo:BFO_0000023`). */
47010
+ ontologyId: string;
47011
+ /** How the match was discovered: `grounding` | `manual` | `import` | `inferred`. */
47012
+ source: string;
47013
+ }
47014
+ /**
47015
+ * Response from an ontology-alignment run.
47016
+ */
47017
+ interface AlignOntologyResponse {
47018
+ /** Surfaced ⊥-conflicts among proposed candidates. */
47019
+ conflicts: AlignmentConflictDto[];
47020
+ /** Number of domain sorts considered. */
47021
+ domainSorts: number;
47022
+ /** The MAPPING artifact as Turtle (`skos:*` + `kortexya:confidence`). */
47023
+ mappingTtl: string;
47024
+ /** Confirmed SKOS correspondences. */
47025
+ matches: AlignmentMatchDto[];
47026
+ /** Number of upper-ontology target sorts indexed. */
47027
+ targetSorts: number;
47028
+ }
47029
+
47030
+ type ontologyAlignment_AlignOntologyRequest = AlignOntologyRequest;
47031
+ type ontologyAlignment_AlignOntologyResponse = AlignOntologyResponse;
47032
+ type ontologyAlignment_AlignmentConflictDto = AlignmentConflictDto;
47033
+ type ontologyAlignment_AlignmentMatchDto = AlignmentMatchDto;
47034
+ type ontologyAlignment_ExternalMatchDto = ExternalMatchDto;
47035
+ declare namespace ontologyAlignment {
47036
+ export type { ontologyAlignment_AlignOntologyRequest as AlignOntologyRequest, ontologyAlignment_AlignOntologyResponse as AlignOntologyResponse, ontologyAlignment_AlignmentConflictDto as AlignmentConflictDto, ontologyAlignment_AlignmentMatchDto as AlignmentMatchDto, ontologyAlignment_ExternalMatchDto as ExternalMatchDto };
47037
+ }
47038
+
47039
+ /**
47040
+ * Resource client for ontology-alignment operations.
47041
+ *
47042
+ * @remarks
47043
+ * Provides access to the upper-ontology aligner, which maps a domain
47044
+ * ontology (OWL/RDF-XML) onto an upper ontology such as BFO-2020 and
47045
+ * surfaces SKOS correspondences and ⊥-conflicts.
47046
+ *
47047
+ * Uses normalizers to convert between camelCase (SDK surface) and
47048
+ * snake_case (wire format) at the boundary.
47049
+ */
47050
+ declare class OntologyAlignmentClient {
47051
+ /** @internal */
47052
+ private readonly api;
47053
+ /** @internal */
47054
+ constructor(api: OntologyAlignment);
47055
+ /**
47056
+ * Align a domain ontology to an upper ontology (e.g. BFO-2020).
47057
+ *
47058
+ * @param request - The domain ontology (OWL/RDF-XML) and optional target
47059
+ * upper ontologies to align against.
47060
+ * @returns The alignment result: confirmed SKOS matches, surfaced conflicts,
47061
+ * the MAPPING artifact as Turtle, and the counts of domain/target sorts.
47062
+ * @throws {ApiError} If the request fails.
47063
+ *
47064
+ * @remarks
47065
+ * Sent to `POST /api/v1/ontology/align`. The request and response use the
47066
+ * snake_case wire format (`domain_owl`, `mapping_ttl`, `domain_sorts`,
47067
+ * `target_sorts`); this client normalizes to/from camelCase at the boundary.
47068
+ * When `targets` is empty or omitted, the backend defaults to `["BFO"]`.
47069
+ *
47070
+ * @example
47071
+ * ```typescript
47072
+ * const result = await client.ontologyAlignment.alignOntology({
47073
+ * domainOwl: '<rdf:RDF>...</rdf:RDF>',
47074
+ * targets: ['BFO'],
47075
+ * });
47076
+ * console.log(result.matches.length); // confirmed correspondences
47077
+ * console.log(result.conflicts.length); // ⊥-conflicts to review
47078
+ * console.log(result.mappingTtl); // Turtle MAPPING artifact
47079
+ * ```
47080
+ */
47081
+ alignOntology(request: AlignOntologyRequest): Promise<AlignOntologyResponse>;
47082
+ }
47083
+
47084
+ declare class OntologyFacade<SecurityDataType = unknown> {
47085
+ http: HttpClient<SecurityDataType>;
47086
+ constructor(http: HttpClient<SecurityDataType>);
47087
+ /**
47088
+ * No description
47089
+ *
47090
+ * @tags ontology_facade
47091
+ * @name ListActionTypes
47092
+ * @summary List action types — projected from the system action-spec catalog.
47093
+ * @request GET:/api/v1/ontology/action-types
47094
+ * @secure
47095
+ */
47096
+ listActionTypes: (params?: RequestParams) => Promise<HttpResponse<ActionTypeListResponse$1, any>>;
47097
+ /**
47098
+ * No description
47099
+ *
47100
+ * @tags ontology_facade
47101
+ * @name ListFunctionTypes
47102
+ * @summary List function types — projected from the tenant's function store.
47103
+ * @request GET:/api/v1/ontology/function-types
47104
+ * @secure
47105
+ */
47106
+ listFunctionTypes: (params?: RequestParams) => Promise<HttpResponse<FunctionTypeListResponse$1, any>>;
47107
+ /**
47108
+ * No description
47109
+ *
47110
+ * @tags ontology_facade
47111
+ * @name ListInterfaceTypes
47112
+ * @summary List interface types — projected from non-maximal (abstract) sorts.
47113
+ * @request GET:/api/v1/ontology/interface-types
47114
+ * @secure
47115
+ */
47116
+ listInterfaceTypes: (params?: RequestParams) => Promise<HttpResponse<InterfaceTypeListResponse$1, any>>;
47117
+ /**
47118
+ * No description
47119
+ *
47120
+ * @tags ontology_facade
47121
+ * @name ListLinkTypes
47122
+ * @summary List link types — projected from referring features across the tenant's sorts.
47123
+ * @request GET:/api/v1/ontology/link-types
47124
+ * @secure
47125
+ */
47126
+ listLinkTypes: (params?: RequestParams) => Promise<HttpResponse<LinkTypeListResponse$1, any>>;
47127
+ /**
47128
+ * No description
47129
+ *
47130
+ * @tags ontology_facade
47131
+ * @name ListObjectTypes
47132
+ * @summary List object types — projected from the tenant's sorts.
47133
+ * @request GET:/api/v1/ontology/object-types
47134
+ * @secure
47135
+ */
47136
+ listObjectTypes: (params?: RequestParams) => Promise<HttpResponse<ObjectTypeListResponse$1, any>>;
47137
+ }
47138
+
47139
+ /**
47140
+ * Resource client for the ontology facade.
47141
+ *
47142
+ * @remarks
47143
+ * Provides read-only projections of the tenant's ontology in a Palantir-style
47144
+ * view — object types (sorts), interface types (abstract sorts), link types
47145
+ * (referring features), function types (the function store), and action types
47146
+ * (the system action-spec catalog).
47147
+ *
47148
+ * Uses normalizers to convert between the SDK surface types and the wire
47149
+ * format at the boundary.
47150
+ */
47151
+ declare class OntologyFacadeClient {
47152
+ /** @internal */
47153
+ private readonly api;
47154
+ /** @internal */
47155
+ constructor(api: OntologyFacade);
47156
+ /**
47157
+ * List action types projected from the system action-spec catalog.
47158
+ *
47159
+ * @returns The projected action types with a count.
47160
+ * @throws {ApiError} If the request fails.
47161
+ *
47162
+ * @remarks
47163
+ * Calls `GET /api/v1/ontology/action-types`. Wire fields are camelCase
47164
+ * (`actionTypes`, `apiName`, `displayName`).
47165
+ *
47166
+ * @example
47167
+ * ```typescript
47168
+ * const { actionTypes, count } = await client.ontologyFacade.listActionTypes();
47169
+ * console.log(count, actionTypes[0]?.apiName);
47170
+ * ```
47171
+ */
47172
+ listActionTypes(): Promise<ActionTypeListResponse>;
47173
+ /**
47174
+ * List function types projected from the tenant's function store.
47175
+ *
47176
+ * @returns The projected function types with a count, ordered by apiName.
47177
+ * @throws {ApiError} If the request fails.
47178
+ *
47179
+ * @remarks
47180
+ * Calls `GET /api/v1/ontology/function-types`. Wire fields are camelCase
47181
+ * (`functionTypes`, `apiName`, `clausesCount`).
47182
+ *
47183
+ * @example
47184
+ * ```typescript
47185
+ * const { functionTypes } = await client.ontologyFacade.listFunctionTypes();
47186
+ * console.log(functionTypes.map((f) => f.apiName));
47187
+ * ```
47188
+ */
47189
+ listFunctionTypes(): Promise<FunctionTypeListResponse>;
47190
+ /**
47191
+ * List interface types projected from non-maximal (abstract) sorts.
47192
+ *
47193
+ * @returns The projected interface types with a count.
47194
+ * @throws {ApiError} If the request fails.
47195
+ *
47196
+ * @remarks
47197
+ * Calls `GET /api/v1/ontology/interface-types`. Wire fields are camelCase
47198
+ * (`interfaceTypes`, `apiName`, `extendsInterfaceTypes`).
47199
+ *
47200
+ * @example
47201
+ * ```typescript
47202
+ * const { interfaceTypes } = await client.ontologyFacade.listInterfaceTypes();
47203
+ * console.log(interfaceTypes[0]?.extendsInterfaceTypes);
47204
+ * ```
47205
+ */
47206
+ listInterfaceTypes(): Promise<InterfaceTypeListResponse>;
47207
+ /**
47208
+ * List link types projected from referring features across the tenant's sorts.
47209
+ *
47210
+ * @returns The projected link types with a count.
47211
+ * @throws {ApiError} If the request fails.
47212
+ *
47213
+ * @remarks
47214
+ * Calls `GET /api/v1/ontology/link-types`. Wire fields are camelCase
47215
+ * (`linkTypes`, `apiName`, `linkedObjectTypeApiName`, `objectTypeApiName`).
47216
+ *
47217
+ * @example
47218
+ * ```typescript
47219
+ * const { linkTypes } = await client.ontologyFacade.listLinkTypes();
47220
+ * console.log(linkTypes[0]?.objectTypeApiName);
47221
+ * ```
47222
+ */
47223
+ listLinkTypes(): Promise<LinkTypeListResponse>;
47224
+ /**
47225
+ * List object types projected from the tenant's sorts.
47226
+ *
47227
+ * @returns The projected object types with a count.
47228
+ * @throws {ApiError} If the request fails.
47229
+ *
47230
+ * @remarks
47231
+ * Calls `GET /api/v1/ontology/object-types`. Wire fields are camelCase
47232
+ * (`objectTypes`, `apiName`, `implementsInterfaceTypes`, `primaryKey`).
47233
+ *
47234
+ * @example
47235
+ * ```typescript
47236
+ * const { objectTypes } = await client.ontologyFacade.listObjectTypes();
47237
+ * console.log(objectTypes.map((o) => o.apiName));
47238
+ * ```
47239
+ */
47240
+ listObjectTypes(): Promise<ObjectTypeListResponse>;
47241
+ }
47242
+
47243
+ declare class OntologyBridge<SecurityDataType = unknown> {
47244
+ http: HttpClient<SecurityDataType>;
47245
+ constructor(http: HttpClient<SecurityDataType>);
47246
+ /**
47247
+ * @description Creates a mapping between an OSF sort and a SQL table, enabling OSFQL-to-SQL transpilation for that sort.
47248
+ *
47249
+ * @tags ontology_bridge
47250
+ * @name BindSort
47251
+ * @summary Bind a sort to a SQL table with explicit column mappings.
47252
+ * @request POST:/api/v1/ontology/bindings
47253
+ * @secure
47254
+ */
47255
+ bindSort: (data: BindSortRequest$1, params?: RequestParams) => Promise<HttpResponse<BindSortResponse$1, void>>;
47256
+ /**
47257
+ * @description Produces query tools, write tools, and inference tools from the current sort hierarchy and SQL bindings, along with a system prompt suitable for grounding an LLM.
47258
+ *
47259
+ * @tags ontology_bridge
47260
+ * @name GroundedSchema
47261
+ * @summary Generate ontology-grounded NL tool schemas.
47262
+ * @request GET:/api/v1/ontology/grounded-schema
47263
+ * @secure
47264
+ */
47265
+ groundedSchema: (params?: RequestParams) => Promise<HttpResponse<GroundedSchemaResponse$1, any>>;
47266
+ /**
47267
+ * @description The "Palantir refugee on-ramp": parses a Foundry-shape ontology export and registers its object/interface types as sorts and link types as referring features (via the same path as OWL import). Returns the created sorts plus a report of what mapped and what needs review (unsupported property types, action types).
47268
+ *
47269
+ * @tags ontology_bridge
47270
+ * @name ImportFoundry
47271
+ * @summary Import a Foundry ontology export into the sort hierarchy (Q1.8).
47272
+ * @request POST:/api/v1/ontology/import-foundry
47273
+ * @secure
47274
+ */
47275
+ importFoundry: (data: ImportFoundryRequest$1, params?: RequestParams) => Promise<HttpResponse<ImportFoundryResponse$1, void>>;
47276
+ /**
47277
+ * @description Parses the OWL XML, converts classes to sorts, and registers them. Returns the created sort names and discovered relations.
47278
+ *
47279
+ * @tags ontology_bridge
47280
+ * @name ImportOwl
47281
+ * @summary Import an OWL/RDF ontology into the sort hierarchy.
47282
+ * @request POST:/api/v1/ontology/import
47283
+ * @secure
47284
+ */
47285
+ importOwl: (data: ImportOwlRequest$1, params?: RequestParams) => Promise<HttpResponse<ImportOwlResponse$1, void>>;
47286
+ /**
47287
+ * @description Returns all active bindings between OSF sorts and SQL tables.
47288
+ *
47289
+ * @tags ontology_bridge
47290
+ * @name ListBindings
47291
+ * @summary List all sort-table bindings.
47292
+ * @request GET:/api/v1/ontology/bindings
47293
+ * @secure
47294
+ */
47295
+ listBindings: (params?: RequestParams) => Promise<HttpResponse<ListBindingsResponse$1, any>>;
47296
+ /**
47297
+ * @description Parses the OSFQL query, compiles it, and transpiles the first `ScanBySort` operation to SQL using the current sort-table bindings.
47298
+ *
47299
+ * @tags ontology_bridge
47300
+ * @name Transpile
47301
+ * @summary Transpile an OSFQL query to SQL.
47302
+ * @request POST:/api/v1/ontology/transpile
47303
+ * @secure
47304
+ */
47305
+ transpile: (data: TranspileRequest$1, params?: RequestParams) => Promise<HttpResponse<TranspileResponse$1, void>>;
47306
+ /**
47307
+ * @description Unbinds a sort from its SQL table, disabling SQL transpilation for it.
47308
+ *
47309
+ * @tags ontology_bridge
47310
+ * @name UnbindSort
47311
+ * @summary Remove a sort-table binding.
47312
+ * @request DELETE:/api/v1/ontology/bindings/{sort_name}
47313
+ * @secure
47314
+ */
47315
+ unbindSort: (sortName: string, params?: RequestParams) => Promise<HttpResponse<void, void>>;
47316
+ }
47317
+
47318
+ /**
47319
+ * A column mapping between a SQL column and an OSF feature.
47320
+ *
47321
+ * @remarks
47322
+ * Used in {@link BindSortRequest}. Wire format is snake_case (`sql_type`).
47323
+ */
47324
+ interface ColumnMappingDto {
47325
+ /** SQL column name. */
47326
+ column: string;
47327
+ /** OSF feature name. */
47328
+ feature: string;
47329
+ /** Whether the column is nullable. */
47330
+ nullable?: boolean;
47331
+ /**
47332
+ * SQL type (e.g., "VARCHAR(255)", "INTEGER"). Omit or leave empty to have
47333
+ * the server introspect the real type from the registered source's live
47334
+ * schema (falls back to TEXT if the source isn't connected).
47335
+ */
47336
+ sqlType?: string;
47337
+ }
47338
+ /**
47339
+ * Request to bind an OSF sort to a SQL table with explicit column mappings.
47340
+ *
47341
+ * @remarks
47342
+ * Sent to `POST /api/v1/ontology/bindings`. Wire format is snake_case
47343
+ * (`key_columns`, `sort_name`, `source_id`, `table_name`).
47344
+ */
47345
+ interface BindSortRequest {
47346
+ /** Column mappings: feature name to column spec. */
47347
+ columns: ColumnMappingDto[];
47348
+ /** Primary key column names. */
47349
+ keyColumns?: string[];
47350
+ /** Sort name to bind. */
47351
+ sortName: string;
47352
+ /** External source identifier. */
47353
+ sourceId: string;
47354
+ /** SQL table name. */
47355
+ tableName: string;
47356
+ }
47357
+ /**
47358
+ * Response from binding a sort to a SQL table.
47359
+ */
47360
+ interface BindSortResponse {
47361
+ /** Whether the binding was successful. */
47362
+ bound: boolean;
47363
+ /** Sort name that was bound. */
47364
+ sortName: string;
47365
+ /** SQL table the sort is bound to. */
47366
+ tableName: string;
47367
+ }
47368
+ /**
47369
+ * Summary of a single active sort-table binding.
47370
+ */
47371
+ interface BindingSummaryDto {
47372
+ /** Number of bound features/columns. */
47373
+ featureCount: number;
47374
+ /** Primary key column names. */
47375
+ keyColumns: string[];
47376
+ /** Sort ID (UUID string). */
47377
+ sortId: string;
47378
+ /** External source identifier. */
47379
+ sourceId: string;
47380
+ /** SQL table name. */
47381
+ tableName: string;
47382
+ }
47383
+ /**
47384
+ * Response listing all active sort-table bindings.
47385
+ */
47386
+ interface ListBindingsResponse {
47387
+ /** Active sort-table bindings. */
47388
+ bindings: BindingSummaryDto[];
47389
+ }
47390
+ /**
47391
+ * Response from generating ontology-grounded NL tool schemas.
47392
+ */
47393
+ interface GroundedSchemaResponse {
47394
+ /** Number of inference tools. */
47395
+ inferenceTools: number;
47396
+ /** Human-readable ontology summary. */
47397
+ ontologySummary: string;
47398
+ /** Number of query tools generated. */
47399
+ queryTools: number;
47400
+ /** System prompt for LLM grounding. */
47401
+ systemPrompt: string;
47402
+ /** Number of write tools generated. */
47403
+ writeTools: number;
47404
+ }
47405
+ /**
47406
+ * Request to import a Foundry ontology export into the sort hierarchy.
47407
+ *
47408
+ * @remarks
47409
+ * Sent to `POST /api/v1/ontology/import-foundry`. Wire format is snake_case
47410
+ * (`foundry_json`).
47411
+ */
47412
+ interface ImportFoundryRequest {
47413
+ /** The Foundry ontology export, as JSON. */
47414
+ foundryJson: string;
47415
+ }
47416
+ /**
47417
+ * An item imported with a caveat or skipped — needs human review.
47418
+ */
47419
+ interface FoundryReviewItemDto {
47420
+ /** What kind of item (`property_type`, `action_type`). */
47421
+ kind: string;
47422
+ /** The item's apiName. */
47423
+ name: string;
47424
+ /** Why it needs review. */
47425
+ reason: string;
47426
+ }
47427
+ /**
47428
+ * Response from a Foundry import: what was created plus a mapped/review-needed report.
47429
+ */
47430
+ interface ImportFoundryResponse {
47431
+ /** Interface types mapped to (super) sorts. */
47432
+ mappedInterfaceTypes: number;
47433
+ /** Link types mapped to referring features. */
47434
+ mappedLinks: number;
47435
+ /** Object types mapped to sorts. */
47436
+ mappedObjectTypes: number;
47437
+ /** Properties mapped to features. */
47438
+ mappedProperties: number;
47439
+ /** Number of relations discovered from link types. */
47440
+ relationsDiscovered: number;
47441
+ /** Items imported with a caveat or skipped — need human review. */
47442
+ reviewNeeded: FoundryReviewItemDto[];
47443
+ /** Names of sorts created (object + interface types). */
47444
+ sortsCreated: string[];
47445
+ }
47446
+ /**
47447
+ * Request to import an OWL/RDF ontology into the sort hierarchy.
47448
+ *
47449
+ * @remarks
47450
+ * Sent to `POST /api/v1/ontology/import`. Wire format is snake_case (`rdf_xml`).
47451
+ */
47452
+ interface ImportOwlRequest {
47453
+ /** OWL/RDF XML content to import. */
47454
+ rdfXml: string;
47455
+ }
47456
+ /**
47457
+ * Response from an OWL ontology import.
47458
+ */
47459
+ interface ImportOwlResponse {
47460
+ /** Names of reified sorts created (many-to-many with attributes). */
47461
+ reifiedSortsCreated: string[];
47462
+ /** Number of relations discovered from OWL object properties. */
47463
+ relationsDiscovered: number;
47464
+ /** Names of sorts created from OWL classes. */
47465
+ sortsCreated: string[];
47466
+ }
47467
+ /**
47468
+ * Request to transpile an OSFQL query to SQL.
47469
+ *
47470
+ * @remarks
47471
+ * Sent to `POST /api/v1/ontology/transpile`. Wire format is snake_case
47472
+ * (the `osfql` and `dialect` fields are already lowercase).
47473
+ */
47474
+ interface TranspileRequest {
47475
+ /** SQL dialect: "postgres", "mysql", or "sqlite". */
47476
+ dialect?: string;
47477
+ /** OSFQL query to transpile. */
47478
+ osfql: string;
47479
+ }
47480
+ /**
47481
+ * Response from OSFQL-to-SQL transpilation.
47482
+ */
47483
+ interface TranspileResponse {
47484
+ /** Whether the entire plan is SQL-transpilable. */
47485
+ fullyTranspilable: boolean;
47486
+ /** Number of parameters in the generated SQL. */
47487
+ paramCount: number;
47488
+ /** Source ID the query targets. */
47489
+ sourceId?: string | null;
47490
+ /** Generated SQL query. */
47491
+ sql: string;
47492
+ }
47493
+
47494
+ type ontologyBridge_BindSortRequest = BindSortRequest;
47495
+ type ontologyBridge_BindSortResponse = BindSortResponse;
47496
+ type ontologyBridge_BindingSummaryDto = BindingSummaryDto;
47497
+ type ontologyBridge_ColumnMappingDto = ColumnMappingDto;
47498
+ type ontologyBridge_FoundryReviewItemDto = FoundryReviewItemDto;
47499
+ type ontologyBridge_GroundedSchemaResponse = GroundedSchemaResponse;
47500
+ type ontologyBridge_ImportFoundryRequest = ImportFoundryRequest;
47501
+ type ontologyBridge_ImportFoundryResponse = ImportFoundryResponse;
47502
+ type ontologyBridge_ImportOwlRequest = ImportOwlRequest;
47503
+ type ontologyBridge_ImportOwlResponse = ImportOwlResponse;
47504
+ type ontologyBridge_ListBindingsResponse = ListBindingsResponse;
47505
+ type ontologyBridge_TranspileRequest = TranspileRequest;
47506
+ type ontologyBridge_TranspileResponse = TranspileResponse;
47507
+ declare namespace ontologyBridge {
47508
+ export type { ontologyBridge_BindSortRequest as BindSortRequest, ontologyBridge_BindSortResponse as BindSortResponse, ontologyBridge_BindingSummaryDto as BindingSummaryDto, ontologyBridge_ColumnMappingDto as ColumnMappingDto, ontologyBridge_FoundryReviewItemDto as FoundryReviewItemDto, ontologyBridge_GroundedSchemaResponse as GroundedSchemaResponse, ontologyBridge_ImportFoundryRequest as ImportFoundryRequest, ontologyBridge_ImportFoundryResponse as ImportFoundryResponse, ontologyBridge_ImportOwlRequest as ImportOwlRequest, ontologyBridge_ImportOwlResponse as ImportOwlResponse, ontologyBridge_ListBindingsResponse as ListBindingsResponse, ontologyBridge_TranspileRequest as TranspileRequest, ontologyBridge_TranspileResponse as TranspileResponse };
47509
+ }
47510
+
47511
+ /**
47512
+ * Resource client for ontology-bridge operations.
47513
+ *
47514
+ * @remarks
47515
+ * Bridges the OSF sort hierarchy to external systems: binds sorts to SQL
47516
+ * tables, transpiles OSFQL queries to SQL, imports OWL/RDF and Foundry
47517
+ * ontologies into the sort hierarchy, and generates ontology-grounded NL
47518
+ * tool schemas for LLM grounding.
47519
+ *
47520
+ * Uses normalizers to convert between camelCase (SDK surface) and
47521
+ * snake_case (wire format) at the boundary.
47522
+ */
47523
+ declare class OntologyBridgeClient {
47524
+ /** @internal */
47525
+ private readonly api;
47526
+ /** @internal */
47527
+ constructor(api: OntologyBridge);
47528
+ /**
47529
+ * Bind a sort to a SQL table with explicit column mappings.
47530
+ *
47531
+ * @param request - The sort name, target table, source identifier, key
47532
+ * columns, and per-feature column mappings.
47533
+ * @returns Whether the binding succeeded plus the bound sort and table names.
47534
+ * @throws {ApiError} If the request fails.
47535
+ *
47536
+ * @remarks
47537
+ * Sent to `POST /api/v1/ontology/bindings`. Request/response use the
47538
+ * snake_case wire format (`sort_name`, `table_name`, `source_id`,
47539
+ * `key_columns`, `sql_type`); this client normalizes at the boundary.
47540
+ * Creates a mapping enabling OSFQL-to-SQL transpilation for that sort.
47541
+ *
47542
+ * @example
47543
+ * ```typescript
47544
+ * const result = await client.ontologyBridge.bindSort({
47545
+ * sortName: 'person',
47546
+ * tableName: 'people',
47547
+ * sourceId: 'warehouse',
47548
+ * keyColumns: ['id'],
47549
+ * columns: [
47550
+ * { feature: 'name', column: 'full_name' },
47551
+ * { feature: 'age', column: 'age', sqlType: 'INTEGER' },
47552
+ * ],
47553
+ * });
47554
+ * console.log(result.bound); // true
47555
+ * ```
47556
+ */
47557
+ bindSort(request: BindSortRequest): Promise<BindSortResponse>;
47558
+ /**
47559
+ * Generate ontology-grounded NL tool schemas.
47560
+ *
47561
+ * @returns Counts of query/write/inference tools, a human-readable ontology
47562
+ * summary, and a system prompt suitable for grounding an LLM.
47563
+ * @throws {ApiError} If the request fails.
47564
+ *
47565
+ * @remarks
47566
+ * Sent to `GET /api/v1/ontology/grounded-schema`. The response uses the
47567
+ * snake_case wire format (`query_tools`, `write_tools`, `inference_tools`,
47568
+ * `ontology_summary`, `system_prompt`); this client normalizes at the
47569
+ * boundary. Tools are derived from the current sort hierarchy and SQL
47570
+ * bindings.
47571
+ *
47572
+ * @example
47573
+ * ```typescript
47574
+ * const schema = await client.ontologyBridge.groundedSchema();
47575
+ * console.log(schema.queryTools); // number of query tools
47576
+ * console.log(schema.systemPrompt); // LLM grounding prompt
47577
+ * ```
47578
+ */
47579
+ groundedSchema(): Promise<GroundedSchemaResponse>;
47580
+ /**
47581
+ * Import a Foundry ontology export into the sort hierarchy.
47582
+ *
47583
+ * @param request - The Foundry ontology export, as a JSON string.
47584
+ * @returns The counts of mapped object/interface types, properties, links,
47585
+ * and discovered relations, the names of created sorts, and a list of
47586
+ * items needing human review.
47587
+ * @throws {ApiError} If the request fails.
47588
+ *
47589
+ * @remarks
47590
+ * Sent to `POST /api/v1/ontology/import-foundry`. Request/response use the
47591
+ * snake_case wire format (`foundry_json`, `mapped_object_types`,
47592
+ * `mapped_interface_types`, `mapped_properties`, `mapped_links`,
47593
+ * `relations_discovered`, `review_needed`, `sorts_created`); this client
47594
+ * normalizes at the boundary. Parses a Foundry-shape export and registers its
47595
+ * object/interface types as sorts and link types as referring features.
47596
+ *
47597
+ * @example
47598
+ * ```typescript
47599
+ * const result = await client.ontologyBridge.importFoundry({
47600
+ * foundryJson: foundryExportString,
47601
+ * });
47602
+ * console.log(result.sortsCreated); // names of created sorts
47603
+ * console.log(result.reviewNeeded); // items needing review
47604
+ * ```
47605
+ */
47606
+ importFoundry(request: ImportFoundryRequest): Promise<ImportFoundryResponse>;
47607
+ /**
47608
+ * Import an OWL/RDF ontology into the sort hierarchy.
47609
+ *
47610
+ * @param request - The OWL/RDF-XML content to import.
47611
+ * @returns The names of created sorts, the names of reified sorts created,
47612
+ * and the number of relations discovered from OWL object properties.
47613
+ * @throws {ApiError} If the request fails.
47614
+ *
47615
+ * @remarks
47616
+ * Sent to `POST /api/v1/ontology/import`. Request/response use the snake_case
47617
+ * wire format (`rdf_xml`, `sorts_created`, `reified_sorts_created`,
47618
+ * `relations_discovered`); this client normalizes at the boundary. Parses the
47619
+ * OWL XML, converts classes to sorts, and registers them.
47620
+ *
47621
+ * @example
47622
+ * ```typescript
47623
+ * const result = await client.ontologyBridge.importOwl({
47624
+ * rdfXml: '<rdf:RDF>...</rdf:RDF>',
47625
+ * });
47626
+ * console.log(result.sortsCreated); // names of sorts created
47627
+ * console.log(result.relationsDiscovered); // count of relations
47628
+ * ```
47629
+ */
47630
+ importOwl(request: ImportOwlRequest): Promise<ImportOwlResponse>;
47631
+ /**
47632
+ * List all sort-table bindings.
47633
+ *
47634
+ * @returns All active bindings between OSF sorts and SQL tables.
47635
+ * @throws {ApiError} If the request fails.
47636
+ *
47637
+ * @remarks
47638
+ * Sent to `GET /api/v1/ontology/bindings`. The response uses the snake_case
47639
+ * wire format (`feature_count`, `key_columns`, `sort_id`, `source_id`,
47640
+ * `table_name`); this client normalizes at the boundary.
47641
+ *
47642
+ * @example
47643
+ * ```typescript
47644
+ * const result = await client.ontologyBridge.listBindings();
47645
+ * for (const binding of result.bindings) {
47646
+ * console.log(binding.sortId, '->', binding.tableName);
47647
+ * }
47648
+ * ```
47649
+ */
47650
+ listBindings(): Promise<ListBindingsResponse>;
47651
+ /**
47652
+ * Transpile an OSFQL query to SQL.
47653
+ *
47654
+ * @param request - The OSFQL query and optional SQL dialect ("postgres",
47655
+ * "mysql", or "sqlite").
47656
+ * @returns The generated SQL, whether the entire plan is SQL-transpilable,
47657
+ * the parameter count, and the source ID the query targets.
47658
+ * @throws {ApiError} If the request fails.
47659
+ *
47660
+ * @remarks
47661
+ * Sent to `POST /api/v1/ontology/transpile`. The response uses the snake_case
47662
+ * wire format (`fully_transpilable`, `param_count`, `source_id`); this client
47663
+ * normalizes at the boundary. Parses and compiles the OSFQL query, then
47664
+ * transpiles the first `ScanBySort` operation to SQL using the current
47665
+ * sort-table bindings.
47666
+ *
47667
+ * @example
47668
+ * ```typescript
47669
+ * const result = await client.ontologyBridge.transpile({
47670
+ * osfql: 'MATCH person(name: ?N);',
47671
+ * dialect: 'postgres',
47672
+ * });
47673
+ * console.log(result.sql); // generated SQL
47674
+ * console.log(result.fullyTranspilable); // true if fully SQL-backed
47675
+ * ```
47676
+ */
47677
+ transpile(request: TranspileRequest): Promise<TranspileResponse>;
47678
+ /**
47679
+ * Remove a sort-table binding.
47680
+ *
47681
+ * @param sortName - The name of the sort to unbind.
47682
+ * @throws {ApiError} If the request fails.
47683
+ *
47684
+ * @remarks
47685
+ * Sent to `DELETE /api/v1/ontology/bindings/{sort_name}`. Unbinds a sort from
47686
+ * its SQL table, disabling SQL transpilation for it. Returns no body.
47687
+ *
47688
+ * @example
47689
+ * ```typescript
47690
+ * await client.ontologyBridge.unbindSort('person');
47691
+ * ```
47692
+ */
47693
+ unbindSort(sortName: string): Promise<void>;
47694
+ }
47695
+
43718
47696
  /** Core knowledge base operations — types, records, rules, functions, constraints, and queries. */
43719
47697
  interface CoreGroup {
43720
47698
  readonly types: SortsClient;
@@ -43908,6 +47886,20 @@ declare class ReasoningLayerClient {
43908
47886
  readonly compliance: ComplianceClient;
43909
47887
  /** Low-level term-graph operations (anti-unification / LGG). */
43910
47888
  readonly operations: OperationsClient;
47889
+ /** Typed-action engine — apply a typed action transactionally with multi-term edits. */
47890
+ readonly actions: ActionsClient;
47891
+ /** Classification/clearance gating over the marking lattice (compliance markings). */
47892
+ readonly complianceMarkings: ComplianceMarkingsClient;
47893
+ /** Interactive constraint-model feasibility sessions (assume/retract with trichotomy classification). */
47894
+ readonly feasibility: FeasibilityClient;
47895
+ /** External constraint solver — classify and solve generic optimization problems. */
47896
+ readonly solver: SolverClient;
47897
+ /** Ontology alignment to the upper ontology (BFO-2020). */
47898
+ readonly ontologyAlignment: OntologyAlignmentClient;
47899
+ /** Ontology facade — project object/link/interface/function/action types from the sort hierarchy. */
47900
+ readonly ontologyFacade: OntologyFacadeClient;
47901
+ /** Ontology bridge — OSF↔SQL bindings, OWL/Foundry import, OSFQL→SQL transpilation. */
47902
+ readonly ontologyBridge: OntologyBridgeClient;
43911
47903
  private _core?;
43912
47904
  private _ai?;
43913
47905
  private _reasoning?;
@@ -44934,7 +48926,7 @@ declare const LP: {
44934
48926
  * // { coefficients: { chairs: 1, tables: 3 }, op: '<=', rhs: 12, label: 'wood' }
44935
48927
  * ```
44936
48928
  */
44937
- readonly constraint: (coefficients: LinearExpression, op: ConstraintOperator, rhs: number, label?: string) => LinearConstraint;
48929
+ readonly constraint: (coefficients: LinearExpression, op: ConstraintOperator, rhs: number, label?: string) => LinearConstraint$1;
44938
48930
  /**
44939
48931
  * Create non-negativity bounds (>= 0) for the given variables.
44940
48932
  *
@@ -45382,4 +49374,4 @@ declare function toUntaggedFeatures(features: PlainFeatureMap): Record<string, F
45382
49374
  */
45383
49375
  declare function toTermInputDto(input: PsiTermInput | TermInputDto): TermInputDto;
45384
49376
 
45385
- export { ANY_ROLE, actionReviews as ActionReviews, type AddFactRequest, type AddFactResponse, type AddRuleRequest, type AddRuleResponse, admin as Admin, type AiGroup, analysis as Analysis, type AnalysisGroup, ApiError, type ApiResponse, type ArithmeticOp, type AuthConfig, AuthenticationError, type BackwardChainRequest, type BackwardChainResponse, BadRequestError, type BulkAddTermsRequest, type BulkAddTermsResponse, type BulkCreateSortsRequest, type BulkCreateSortsResponse, cdl as CDL, causal as Causal, type ClassifyEdgesInput, type ClassifyEdgesVars, type ClearTermsResponse, type ClientConfig, cognitive as Cognitive, collections as Collections, communities as Communities, type ComparisonOp, compliance as Compliance, type ConstrainedPlainVar, Constraint, ConstraintViolationError, constraints as Constraints, control as Control, conversation as Conversation, type ConversationMessageRequest, type ConversationMessageResponse, type ConversationSummaryDto, type ConversationTurnsResponse, type CoreGroup, type CreateResearchSessionRequest, type CreateResearchSessionResponse, type CreateSortRequest, type CreateTermRequest, type DataGroup, discovery as Discovery, type ErrorResponse$1 as ErrorResponse, execution as Execution, extract as Extract, type FeatureInputValueDto, type FeatureValueDto, Flow, type FlowProblem as FlowBuilderProblem, type FlowEdgeInput, type FlowEdgeOptions, flowNetworks as FlowNetworks, type FlowNode, type FlowProblemInputBase, ForbiddenError, type ForwardChainRequest, type ForwardChainResponse, functions as Functions, fuzzy as Fuzzy, FuzzyShape, type FuzzyShapeDto, generation as Generation, type GlbRequest, type GlbResponse, health as Health, homoiconic as Homoiconic, ilp as ILP, imageExtraction as ImageExtraction, inference as Inference, type IngestPaperRequest, type IngestPaperResponse, ingestion as Ingestion, IngestionFailedError, IngestionSession, type IngestionSyncOptions, type Interceptor, InternalServerError, type JsonValue$1 as JsonValue, LP, type ListConversationsResponse, type LubRequest, type LubResponse, type MaxFlowInput, type MaxFlowVars, type MinCostMaxFlowInput, type MinCostMaxFlowVars, type MinCutInput, type MinCutVars, namespaces as Namespaces, NetworkError, neuroSymbolic as NeuroSymbolic, NotFoundError, ontology as Ontology, type Operand, operations as Operations, optimize as Optimize, type OsfSearchRequest, type OsfSearchResponse, osfql as Osfql, type OsfqlRequest, type OsfqlResponse, type OsfqlValue, oversight as Oversight, type PaginationParams, type PaperMetadataDto, type PaperSource, type PlainFeatureMap, type PlainFeatureValue, plainValues as PlainValues, preferences as Preferences, proofEngine as ProofEngine, type PsiTermDto, type PsiTermInput, query as Query, rag as RAG, RateLimitError, type RateLimitInfo, reasoning as Reasoning, type ReasoningGroup, ReasoningLayerClient, ReasoningLayerError, type RequestOptions, research as Research, type ResearchContradictionsResponse, type ResearchCycleResponse, type ResearchFindingsResponse, type ResearchGapsResponse, type ResearchReportResponse, type ResearchSessionResponse, reviews as Reviews, row as Row, SDK_VERSION, scenarios as Scenarios, scheduling as Scheduling, type SearchPapersRequest, type SearchPapersResponse, SortBuilder, type SortDto, type SortInfoDto, sorts as Sorts, sources as Sources, spaces as Spaces, statistical as Statistical, synthetic as Synthetic, type SystemGroup, type TermDto, type TermInputArg, type TermInputDto, type TermListResponse, type TermPatternDto, type TermResponse, terms as Terms, TimeoutError, type TurnDto, type UpdateTermRequest, utilities as Utilities, ValidationError, Value, type ValueDto, values as Values, type VerifyClaimRequest, type VerifyClaimResponse, visualization as Visualization, WebSocketClient, WebSocketConnection, webhookActions as WebhookActions, type WorkflowGroup, allen, constrained, discriminateFeatureValue, guard, isConstrainedPlainVar, isPsiTermInput, isTaggedValueDto, isUuid, psi, toTaggedFeatures, toTaggedValue, toTermInputDto, toUntaggedFeatures, toUntaggedValue };
49377
+ export { ANY_ROLE, actionReviews as ActionReviews, actions as Actions, type AddFactRequest, type AddFactResponse, type AddRuleRequest, type AddRuleResponse, admin as Admin, type AiGroup, analysis as Analysis, type AnalysisGroup, ApiError, type ApiResponse, type ArithmeticOp, type AuthConfig, AuthenticationError, type BackwardChainRequest, type BackwardChainResponse, BadRequestError, type BulkAddTermsRequest, type BulkAddTermsResponse, type BulkCreateSortsRequest, type BulkCreateSortsResponse, cdl as CDL, causal as Causal, type ClassifyEdgesInput, type ClassifyEdgesVars, type ClearTermsResponse, type ClientConfig, cognitive as Cognitive, collections as Collections, communities as Communities, type ComparisonOp, compliance as Compliance, complianceMarkings as ComplianceMarkings, type ConstrainedPlainVar, Constraint, ConstraintViolationError, constraints as Constraints, control as Control, conversation as Conversation, type ConversationMessageRequest, type ConversationMessageResponse, type ConversationSummaryDto, type ConversationTurnsResponse, type CoreGroup, type CreateResearchSessionRequest, type CreateResearchSessionResponse, type CreateSortRequest, type CreateTermRequest, type DataGroup, discovery as Discovery, type ErrorResponse$1 as ErrorResponse, execution as Execution, extract as Extract, feasibility as Feasibility, type FeatureInputValueDto, type FeatureValueDto, Flow, type FlowProblem as FlowBuilderProblem, type FlowEdgeInput, type FlowEdgeOptions, flowNetworks as FlowNetworks, type FlowNode, type FlowProblemInputBase, ForbiddenError, type ForwardChainRequest, type ForwardChainResponse, functions as Functions, fuzzy as Fuzzy, FuzzyShape, type FuzzyShapeDto, generation as Generation, type GlbRequest, type GlbResponse, health as Health, homoiconic as Homoiconic, ilp as ILP, imageExtraction as ImageExtraction, inference as Inference, type IngestPaperRequest, type IngestPaperResponse, ingestion as Ingestion, IngestionFailedError, IngestionSession, type IngestionSyncOptions, type Interceptor, InternalServerError, type JsonValue$1 as JsonValue, LP, type ListConversationsResponse, type LubRequest, type LubResponse, type MaxFlowInput, type MaxFlowVars, type MinCostMaxFlowInput, type MinCostMaxFlowVars, type MinCutInput, type MinCutVars, namespaces as Namespaces, NetworkError, neuroSymbolic as NeuroSymbolic, NotFoundError, ontology as Ontology, ontologyAlignment as OntologyAlignment, ontologyBridge as OntologyBridge, ontologyFacade as OntologyFacade, type Operand, operations as Operations, optimize as Optimize, type OsfSearchRequest, type OsfSearchResponse, osfql as Osfql, type OsfqlRequest, type OsfqlResponse, type OsfqlValue, oversight as Oversight, type PaginationParams, type PaperMetadataDto, type PaperSource, type PlainFeatureMap, type PlainFeatureValue, plainValues as PlainValues, preferences as Preferences, proofEngine as ProofEngine, type PsiTermDto, type PsiTermInput, query as Query, rag as RAG, RateLimitError, type RateLimitInfo, reasoning as Reasoning, type ReasoningGroup, ReasoningLayerClient, ReasoningLayerError, type RequestOptions, research as Research, type ResearchContradictionsResponse, type ResearchCycleResponse, type ResearchFindingsResponse, type ResearchGapsResponse, type ResearchReportResponse, type ResearchSessionResponse, reviews as Reviews, row as Row, SDK_VERSION, scenarios as Scenarios, scheduling as Scheduling, type SearchPapersRequest, type SearchPapersResponse, solver as Solver, SortBuilder, type SortDto, type SortInfoDto, sorts as Sorts, sources as Sources, spaces as Spaces, statistical as Statistical, synthetic as Synthetic, type SystemGroup, type TermDto, type TermInputArg, type TermInputDto, type TermListResponse, type TermPatternDto, type TermResponse, terms as Terms, TimeoutError, type TurnDto, type UpdateTermRequest, utilities as Utilities, ValidationError, Value, type ValueDto, values as Values, type VerifyClaimRequest, type VerifyClaimResponse, visualization as Visualization, WebSocketClient, WebSocketConnection, webhookActions as WebhookActions, type WorkflowGroup, allen, constrained, discriminateFeatureValue, guard, isConstrainedPlainVar, isPsiTermInput, isTaggedValueDto, isUuid, psi, toTaggedFeatures, toTaggedValue, toTermInputDto, toUntaggedFeatures, toUntaggedValue };