@kortexya/reasoninglayer 1.17.0 → 1.19.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.cts 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.17.0";
112
+ declare const SDK_VERSION = "1.19.0";
113
113
  /**
114
114
  * Authentication mode for the SDK.
115
115
  *
@@ -253,13 +253,7 @@ interface HttpResponse<D extends unknown, E extends unknown = unknown> extends R
253
253
  error: E;
254
254
  }
255
255
  type CancelToken = Symbol | string | number;
256
- declare enum ContentType {
257
- Json = "application/json",
258
- JsonApi = "application/vnd.api+json",
259
- FormData = "multipart/form-data",
260
- UrlEncoded = "application/x-www-form-urlencoded",
261
- Text = "text/plain"
262
- }
256
+ type ContentType = "application/json" | "application/vnd.api+json" | "multipart/form-data" | "application/x-www-form-urlencoded" | "text/plain";
263
257
  declare class HttpClient<SecurityDataType = unknown> {
264
258
  baseUrl: string;
265
259
  private securityData;
@@ -401,9 +395,9 @@ type ActionReviewStatusDto$1 = "pending" | "approved" | "rejected" | "modified"
401
395
  /** Summary statistics for pending action reviews */
402
396
  interface ActionReviewSummaryDto$1 {
403
397
  /** Breakdown by action sort */
404
- by_action_sort: Record<string, number>;
398
+ by_action_sort: Partial<Record<string, number>>;
405
399
  /** Breakdown by review reason */
406
- by_reason: Record<string, number>;
400
+ by_reason: Partial<Record<string, number>>;
407
401
  /**
408
402
  * Reviews expiring soon (< 15 minutes)
409
403
  * @min 0
@@ -620,14 +614,14 @@ interface AddConnectorResponse$1 {
620
614
  }
621
615
  /** Request to add constraints to an existing session */
622
616
  interface AddConstraintsRequest$1 {
623
- bindings?: object | null;
617
+ bindings?: Partial<Record<string, number>> | null;
624
618
  constraints: GeneralConstraintDto$1[];
625
619
  }
626
620
  /** Response from adding constraints */
627
621
  interface AddConstraintsResponse$1 {
628
622
  /** @min 0 */
629
623
  added_count: number;
630
- current_bindings: Record<string, number>;
624
+ current_bindings: Partial<Record<string, number>>;
631
625
  message?: string | null;
632
626
  /** @min 0 */
633
627
  satisfied_count: number;
@@ -731,7 +725,7 @@ interface AddPendingReviewRequest$1 {
731
725
  /** @format double */
732
726
  confidence: number;
733
727
  entity_id: string;
734
- features: Record<string, any>;
728
+ features: Partial<Record<string, any>>;
735
729
  /** @format uuid */
736
730
  owner_id: string;
737
731
  /** Reason why an entity requires review */
@@ -807,6 +801,13 @@ interface AgUiContextItem {
807
801
  /** The value. */
808
802
  value?: string;
809
803
  }
804
+ /** A function invocation inside a tool call. */
805
+ interface AgUiFunctionCall {
806
+ /** JSON-encoded arguments. */
807
+ arguments?: string;
808
+ /** Function name. */
809
+ name: string;
810
+ }
810
811
  /** A conversation message. */
811
812
  interface AgUiMessage {
812
813
  /** Text content. */
@@ -818,7 +819,7 @@ interface AgUiMessage {
818
819
  /** For `tool` messages: the call this message answers. */
819
820
  toolCallId?: string | null;
820
821
  /** Tool calls issued by an assistant message. */
821
- toolCalls?: any[] | null;
822
+ toolCalls?: AgUiToolCall[] | null;
822
823
  }
823
824
  /** A frontend tool definition offered by the client. */
824
825
  interface AgUiTool {
@@ -829,6 +830,15 @@ interface AgUiTool {
829
830
  /** JSON Schema of the tool parameters. */
830
831
  parameters?: any;
831
832
  }
833
+ /** A tool call embedded in an assistant message. */
834
+ interface AgUiToolCall {
835
+ /** The function invocation. */
836
+ function: AgUiFunctionCall;
837
+ /** Tool call id. */
838
+ id: string;
839
+ /** Call type (`function`). */
840
+ type?: string;
841
+ }
832
842
  /** Belief state DTO. */
833
843
  interface AgentBeliefDto$1 {
834
844
  /**
@@ -837,7 +847,7 @@ interface AgentBeliefDto$1 {
837
847
  */
838
848
  confidence: number;
839
849
  /** Features as key-value pairs (excluding confidence and source) */
840
- features?: Record<string, JsonValue>;
850
+ features?: Partial<Record<string, JsonValue>>;
841
851
  /** Sort name of the belief */
842
852
  sort_name: string;
843
853
  /** Source */
@@ -882,7 +892,7 @@ interface AgentGoalDto$1 {
882
892
  */
883
893
  attempts: number;
884
894
  /** User-facing features (excluding internal: agent_id, status, priority, attempts, goal_sort, confidence, source, when) */
885
- features?: Record<string, JsonValue>;
895
+ features?: Partial<Record<string, JsonValue>>;
886
896
  /** Sort name of the goal (e.g. "tech_conference_plan") */
887
897
  goal_sort?: string | null;
888
898
  /**
@@ -1229,7 +1239,7 @@ type AnonymizationMode$1 = {
1229
1239
  * Quasi-identifier field definitions. At least one entry required.
1230
1240
  * Key = field name; value = generalisation strategy.
1231
1241
  */
1232
- quasi_identifiers: Record<string, object>;
1242
+ quasi_identifiers: Partial<Record<string, object>>;
1233
1243
  type: "k_anonymity";
1234
1244
  } | {
1235
1245
  /**
@@ -1238,7 +1248,7 @@ type AnonymizationMode$1 = {
1238
1248
  * heuristics). Providing explicit mappings is more reliable for
1239
1249
  * domain-specific schemas.
1240
1250
  */
1241
- field_identifiers?: Record<string, object>;
1251
+ field_identifiers?: Partial<Record<string, object>>;
1242
1252
  type: "safe_harbor";
1243
1253
  };
1244
1254
  /** Request body for `POST /api/v1/anonymize`. */
@@ -1256,7 +1266,7 @@ interface AnonymizeRequest$1 {
1256
1266
  * caller (e.g. `"42"`) to remain format-agnostic at the API boundary.
1257
1267
  * Maximum 10 000 records per request.
1258
1268
  */
1259
- records: Record<string, string>[];
1269
+ records: Partial<Record<string, string>>[];
1260
1270
  }
1261
1271
  /** Response body for `POST /api/v1/anonymize`. */
1262
1272
  interface AnonymizeResponse$1 {
@@ -1272,7 +1282,7 @@ interface AnonymizeResponse$1 {
1272
1282
  * Harbor, PHI fields within each record are replaced with
1273
1283
  * `"[SUPPRESSED]"` — no records are removed.
1274
1284
  */
1275
- output_records: Record<string, string>[];
1285
+ output_records: Partial<Record<string, string>>[];
1276
1286
  /**
1277
1287
  * Safe Harbor de-identification summary. Present when mode is
1278
1288
  * `safe_harbor`; null otherwise.
@@ -1364,8 +1374,8 @@ interface AntiUnifyResponse$1 {
1364
1374
  lgg_term_id: string;
1365
1375
  }
1366
1376
  interface AppendRequest$1 {
1367
- data_versions?: Record<string, string>;
1368
- extra?: Record<string, any>;
1377
+ data_versions?: Partial<Record<string, string>>;
1378
+ extra?: Partial<Record<string, any>>;
1369
1379
  request_hash: string;
1370
1380
  request_path: string;
1371
1381
  response_hash: string;
@@ -1393,7 +1403,7 @@ interface ApplyActionRequest$1 {
1393
1403
  /** Multi-term edits to commit atomically when the action is `Ready`. */
1394
1404
  edits?: TermEditDto[];
1395
1405
  /** Bound input features (`feature → JSON value`). */
1396
- inputs?: Record<string, any>;
1406
+ inputs?: Partial<Record<string, any>>;
1397
1407
  }
1398
1408
  /** Outcome of applying an action (the `outcome` field discriminates). */
1399
1409
  type ApplyActionResponse$1 = {
@@ -1612,7 +1622,7 @@ interface AssembleContextResponseDto {
1612
1622
  }
1613
1623
  /** Assembled concept DTO */
1614
1624
  interface AssembledConceptDto$1 {
1615
- features: Record<string, string>;
1625
+ features: Partial<Record<string, string>>;
1616
1626
  name: string;
1617
1627
  /** @format double */
1618
1628
  relevance: number;
@@ -1949,8 +1959,8 @@ interface AuditPage$1 {
1949
1959
  */
1950
1960
  interface AuditRecord$1 {
1951
1961
  actor?: null | UserId;
1952
- data_versions: Record<string, string>;
1953
- extra: Record<string, object>;
1962
+ data_versions: Partial<Record<string, string>>;
1963
+ extra: Partial<Record<string, object>>;
1954
1964
  git_revision: string;
1955
1965
  id: AuditRecordId;
1956
1966
  prev_hash: string;
@@ -2022,7 +2032,7 @@ interface AugmentationTargetDto$1 {
2022
2032
  * `ontology/generate` question contract so frontends reuse one form).
2023
2033
  */
2024
2034
  interface AuthoringClarificationQuestionDto$1 {
2025
- choices?: any[] | null;
2035
+ choices?: string[] | null;
2026
2036
  default?: string | null;
2027
2037
  field: string;
2028
2038
  id: string;
@@ -2047,7 +2057,7 @@ interface AuthzDryRunRequest$1 {
2047
2057
  * sort lattice (an unknown sort name resolves to no ancestors, matching
2048
2058
  * the contract's "empty if unknown").
2049
2059
  */
2050
- sortAncestors?: any[] | null;
2060
+ sortAncestors?: string[] | null;
2051
2061
  /**
2052
2062
  * Term features for row-level evaluation, as a plain JSON object
2053
2063
  * (string / number / boolean / array values). Omit (or `null`) for a
@@ -2381,7 +2391,7 @@ type BayesianEffectDto$1 = {
2381
2391
  d: number;
2382
2392
  shape: "pi_shape";
2383
2393
  } | {
2384
- points: any[][];
2394
+ points: [number, number][];
2385
2395
  shape: "piecewise_linear";
2386
2396
  };
2387
2397
  /**
@@ -2472,7 +2482,7 @@ interface BayesianPredictResponse$1 {
2472
2482
  */
2473
2483
  interface BeliefDto$1 {
2474
2484
  /** Features as key-value pairs (raw JSON values) */
2475
- features?: Record<string, JsonValue>;
2485
+ features?: Partial<Record<string, JsonValue>>;
2476
2486
  /**
2477
2487
  * Sort name for the belief (for human-friendly input)
2478
2488
  * Kept as "sort" for backward compatibility with existing clients
@@ -2543,12 +2553,12 @@ interface BindVariableResponse$1 {
2543
2553
  }
2544
2554
  /** Request to bind variables in a session */
2545
2555
  interface BindVariablesRequest$1 {
2546
- bindings: Record<string, number>;
2556
+ bindings: Partial<Record<string, number>>;
2547
2557
  }
2548
2558
  /** Response from binding variables */
2549
2559
  interface BindVariablesResponse$1 {
2550
2560
  all_satisfied: boolean;
2551
- current_bindings: Record<string, number>;
2561
+ current_bindings: Partial<Record<string, number>>;
2552
2562
  message?: string | null;
2553
2563
  /** @min 0 */
2554
2564
  newly_satisfied: number;
@@ -2590,6 +2600,15 @@ interface BindingSummaryDto$1 {
2590
2600
  feature_count: number;
2591
2601
  /** Primary key column names. */
2592
2602
  key_columns: string[];
2603
+ /**
2604
+ * Where those key columns came from, and what that implies for the
2605
+ * durability of ids derived from them (#131).
2606
+ *
2607
+ * The column names cannot say it: `["title"]` looks identical whether a
2608
+ * uniqueness constraint backs it or an operator ticked it, and those two
2609
+ * have opposite durability.
2610
+ */
2611
+ key_provenance: KeyProvenanceDto;
2593
2612
  /** Sort ID (UUID string). */
2594
2613
  sort_id: string;
2595
2614
  /**
@@ -2991,7 +3010,7 @@ interface BulkCreateSortsResponse$1 {
2991
3010
  /** Any errors encountered (sort name -> error message) */
2992
3011
  errors?: BulkSortError$1[];
2993
3012
  /** Mapping of sort name -> sort ID */
2994
- sort_ids: Record<string, string>;
3013
+ sort_ids: Partial<Record<string, string>>;
2995
3014
  }
2996
3015
  /**
2997
3016
  * Request for bulk fuzzy inference - multiple goals in one HTTP request.
@@ -3005,7 +3024,7 @@ interface BulkFuzzyProveRequest$1 {
3005
3024
  * Array of saved goal IDs to load and prove.
3006
3025
  * Either `goals` or `goal_ids` must be provided, but not both.
3007
3026
  */
3008
- goal_ids?: any[] | null;
3027
+ goal_ids?: string[] | null;
3009
3028
  /**
3010
3029
  * Array of goals to prove (each goal is a TermInputDto).
3011
3030
  * Either `goals` or `goal_ids` must be provided, but not both.
@@ -3046,7 +3065,7 @@ interface BulkFuzzyProveResponse$1 {
3046
3065
  * TRUE HOMOICONICITY: Goal IDs if goals were saved (when save_goals=true).
3047
3066
  * In the same order as the request goals.
3048
3067
  */
3049
- goal_ids?: any[] | null;
3068
+ goal_ids?: string[] | null;
3050
3069
  /** Results for each goal, in the same order as the request */
3051
3070
  results: FuzzyProveResponse$1[];
3052
3071
  /**
@@ -3148,7 +3167,7 @@ interface BulkRetractTermsResponse {
3148
3167
  /** Response from bulk review actions */
3149
3168
  interface BulkReviewResponse {
3150
3169
  /** Review IDs that failed with reasons */
3151
- failed_ids: any[][];
3170
+ failed_ids: [string, string][];
3152
3171
  /**
3153
3172
  * Number of reviews that failed
3154
3173
  * @min 0
@@ -3200,7 +3219,7 @@ interface CalibrateRequest$1 {
3200
3219
  /** Extraction predictions with confidence and correctness. */
3201
3220
  predictions: ExtractionPredictionDto$1[];
3202
3221
  /** Sort ID to name mapping. */
3203
- sort_names: Record<string, string>;
3222
+ sort_names: Partial<Record<string, string>>;
3204
3223
  }
3205
3224
  /** ECE calibration report. */
3206
3225
  interface CalibrationReportDto$1 {
@@ -3233,7 +3252,7 @@ interface CalibrationSampleDto {
3233
3252
  * Per-class predicted probabilities / scores produced by the classifier.
3234
3253
  * The `true_label` key must be present. Each value must be in `[0, 1]`.
3235
3254
  */
3236
- class_scores: Record<string, number>;
3255
+ class_scores: Partial<Record<string, number>>;
3237
3256
  /** Caller-assigned identifier for this sample. */
3238
3257
  input_id: string;
3239
3258
  /** Ground-truth class label for this sample. */
@@ -3271,7 +3290,7 @@ interface CandidateEntityDto {
3271
3290
  */
3272
3291
  confidence?: number;
3273
3292
  /** Extracted features, by name. */
3274
- features?: Record<string, CandidateValueDto>;
3293
+ features?: Partial<Record<string, CandidateValueDto>>;
3275
3294
  /** Batch-local id, used to attach relations to this entity. */
3276
3295
  local_id: string;
3277
3296
  /** Sort name this entity claims. */
@@ -3402,7 +3421,7 @@ interface CausalActionSpecDto$1 {
3402
3421
  }
3403
3422
  interface CausalAnalyzeAssumptionsDto$1 {
3404
3423
  /** Discovery method allow-list. Defaults to all supported discovery methods. */
3405
- allowed_methods?: any[] | null;
3424
+ allowed_methods?: string[] | null;
3406
3425
  /** Assignment mechanism for effect/decision questions. Default: observed. */
3407
3426
  assignment?: null | AssignmentMechanismDto;
3408
3427
  /** ANM independence-test config. */
@@ -4032,7 +4051,7 @@ type ClaimVerdictDto = {
4032
4051
  };
4033
4052
  /** Clarification question DTO (reused from ontology_generate pattern). */
4034
4053
  interface ClarificationQuestionDto$1 {
4035
- choices?: any[] | null;
4054
+ choices?: string[] | null;
4036
4055
  default?: string | null;
4037
4056
  field: string;
4038
4057
  id: string;
@@ -4082,7 +4101,7 @@ interface ClassifyProblemRequest$1 {
4082
4101
  * Variables to classify. Omit (or send empty) to classify every
4083
4102
  * binary variable.
4084
4103
  */
4085
- variables_of_interest?: any[] | null;
4104
+ variables_of_interest?: string[] | null;
4086
4105
  }
4087
4106
  /** Response body for `POST /api/v1/solver/classify`. */
4088
4107
  interface ClassifyProblemResponse$1 {
@@ -4090,12 +4109,12 @@ interface ClassifyProblemResponse$1 {
4090
4109
  * Variable-name → baseline solve value. Useful for displaying a
4091
4110
  * concrete witness alongside the classification.
4092
4111
  */
4093
- baseline_values: Record<string, number>;
4112
+ baseline_values: Partial<Record<string, number>>;
4094
4113
  /**
4095
4114
  * Variable-name → classification. Empty when baseline is
4096
4115
  * infeasible.
4097
4116
  */
4098
- classifications: Record<string, VariableClassification$1>;
4117
+ classifications: Partial<Record<string, VariableClassification$1>>;
4099
4118
  message?: string | null;
4100
4119
  /** @format double */
4101
4120
  solve_time_ms: number;
@@ -4116,7 +4135,7 @@ interface ClassifySafetyRequest$1 {
4116
4135
  /** Response for safety classification. */
4117
4136
  interface ClassifySafetyResponse$1 {
4118
4137
  /** Per-category activations. */
4119
- category_activations: Record<string, number>;
4138
+ category_activations: Partial<Record<string, number>>;
4120
4139
  /**
4121
4140
  * Elapsed time in milliseconds.
4122
4141
  * @format int64
@@ -4126,9 +4145,9 @@ interface ClassifySafetyResponse$1 {
4126
4145
  /** Model architecture info. */
4127
4146
  model_info: SafetyModelInfoDto$1;
4128
4147
  /** Per-question binary decisions. */
4129
- question_decisions: Record<string, boolean>;
4148
+ question_decisions: Partial<Record<string, boolean>>;
4130
4149
  /** Per-question probabilities. */
4131
- question_probabilities: Record<string, number>;
4150
+ question_probabilities: Partial<Record<string, number>>;
4132
4151
  }
4133
4152
  /** Response for cleanup operations */
4134
4153
  interface CleanupResponse$1 {
@@ -4307,7 +4326,7 @@ interface ClusteredObservationDto$1 {
4307
4326
  */
4308
4327
  interface CognitiveTermInput$1 {
4309
4328
  /** Features as key-value pairs (raw JSON values) */
4310
- features?: Record<string, JsonValue>;
4329
+ features?: Partial<Record<string, JsonValue>>;
4311
4330
  /**
4312
4331
  * Sort name (for human-friendly input)
4313
4332
  * Kept as "sort" for backward compatibility with existing clients
@@ -4340,7 +4359,7 @@ interface CoherenceAnalyzeRequestDto {
4340
4359
  */
4341
4360
  rules_osfql?: string | null;
4342
4361
  /** Explicit claim term ids, in reading order (highest precedence). */
4343
- term_ids?: any[] | null;
4362
+ term_ids?: string[] | null;
4344
4363
  /**
4345
4364
  * Consult the tenant KB's homoiconic rules in the derivation layer.
4346
4365
  * Default true (rules ARE the tenant's declared constraints; an empty
@@ -4833,11 +4852,11 @@ interface ComputeLubResponse$1 {
4833
4852
  interface ConceptMatchDto$1 {
4834
4853
  canonical_name: string;
4835
4854
  concept_id: string;
4836
- features: Record<string, any>;
4855
+ features: Partial<Record<string, any>>;
4837
4856
  /** @format double */
4838
4857
  match_degree: number;
4839
4858
  match_reason: string;
4840
- name_variants?: object | null;
4859
+ name_variants?: Partial<Record<string, string>> | null;
4841
4860
  source_ids: string[];
4842
4861
  }
4843
4862
  /** Request for conditional execution */
@@ -5356,10 +5375,10 @@ interface ConstraintSessionStatusResponse {
5356
5375
  constraint_count: number;
5357
5376
  /** @format date-time */
5358
5377
  created_at: string;
5359
- current_bindings: Record<string, number>;
5378
+ current_bindings: Partial<Record<string, number>>;
5360
5379
  /** @format date-time */
5361
5380
  last_accessed: string;
5362
- metadata: Record<string, string>;
5381
+ metadata: Partial<Record<string, string>>;
5363
5382
  /** @min 0 */
5364
5383
  satisfied_count: number;
5365
5384
  /** @format uuid */
@@ -5440,6 +5459,72 @@ interface ContinuousTreatmentObservationDto$1 {
5440
5459
  */
5441
5460
  y: number;
5442
5461
  }
5462
+ /** A detected contradiction between two claims. */
5463
+ interface Contradiction {
5464
+ /** OSFKB term ID of the first claim. */
5465
+ claim_a_id: string;
5466
+ /**
5467
+ * Papers the first claim was extracted from.
5468
+ *
5469
+ * Without it "these two claims disagree" is unactionable — a reader cannot
5470
+ * tell which literature each side comes from.
5471
+ * Defaulted so sessions persisted before attribution existed still load.
5472
+ */
5473
+ claim_a_sources?: PaperRef[];
5474
+ /** OSFKB term ID of the second claim. */
5475
+ claim_b_id: string;
5476
+ /**
5477
+ * Papers the second claim was extracted from.
5478
+ *
5479
+ * Defaulted so sessions persisted before attribution existed still load.
5480
+ */
5481
+ claim_b_sources?: PaperRef[];
5482
+ /**
5483
+ * Disentailment confidence score.
5484
+ * @format double
5485
+ */
5486
+ confidence: number;
5487
+ /** Explanation of the contradiction. */
5488
+ explanation: string;
5489
+ /** Resolution of the contradiction, if resolved via evidence comparison. */
5490
+ resolution?: null | ContradictionResolution;
5491
+ /** Statement of the first claim. */
5492
+ statement_a: string;
5493
+ /** Statement of the second claim. */
5494
+ statement_b: string;
5495
+ }
5496
+ /**
5497
+ * Resolution of a detected contradiction based on evidence strength comparison.
5498
+ *
5499
+ * When two claims contradict each other, we compare their evidence assessment
5500
+ * scores to determine which claim is better supported. The claim with stronger
5501
+ * evidence is preferred; the weaker one is dismissed.
5502
+ */
5503
+ interface ContradictionResolution {
5504
+ /**
5505
+ * Confidence in the resolution (0.0-1.0).
5506
+ * @format double
5507
+ */
5508
+ confidence: number;
5509
+ /** ID of the dismissed claim (weaker evidence). */
5510
+ dismissed_claim_id: string;
5511
+ /**
5512
+ * Truthfulness score of the dismissed claim.
5513
+ * @format double
5514
+ */
5515
+ dismissed_truthfulness: number;
5516
+ /** Human-readable explanation of the resolution. */
5517
+ explanation: string;
5518
+ /** ID of the preferred claim (stronger evidence). */
5519
+ preferred_claim_id: string;
5520
+ /**
5521
+ * Truthfulness score of the preferred claim.
5522
+ * @format double
5523
+ */
5524
+ preferred_truthfulness: number;
5525
+ /** Strategy used to resolve the contradiction. */
5526
+ strategy: ResolutionStrategy;
5527
+ }
5443
5528
  /**
5444
5529
  * Configuration for training on conversation data.
5445
5530
  *
@@ -5491,6 +5576,11 @@ interface ConversationTrainingConfigDto$1 {
5491
5576
  */
5492
5577
  use_real_conversations?: boolean;
5493
5578
  }
5579
+ /** Conversation turn in request format */
5580
+ interface ConversationTurnDto$1 {
5581
+ content: string;
5582
+ role: string;
5583
+ }
5494
5584
  /** A single coordinated resource set (N resources matched together) */
5495
5585
  interface CoordinatedResourceSet$1 {
5496
5586
  /**
@@ -5572,7 +5662,7 @@ interface CorpusScopeDto {
5572
5662
  /** Collection path (exact match) to scope to. */
5573
5663
  collection?: string | null;
5574
5664
  /** Explicit document ids (overrides `collection` when present). */
5575
- document_ids?: any[] | null;
5665
+ document_ids?: string[] | null;
5576
5666
  /**
5577
5667
  * Max documents in scope (default 200, hard cap 1000).
5578
5668
  * @min 0
@@ -5582,7 +5672,7 @@ interface CorpusScopeDto {
5582
5672
  /** Request to correct an entity before approval */
5583
5673
  interface CorrectEntityRequest$1 {
5584
5674
  /** Corrected features */
5585
- features?: object | null;
5675
+ features?: Partial<Record<string, any>> | null;
5586
5676
  /** Correction notes */
5587
5677
  notes?: string | null;
5588
5678
  /**
@@ -5644,13 +5734,13 @@ interface CorrelationResponse$1 {
5644
5734
  */
5645
5735
  interface CounterExampleDto {
5646
5736
  /** Present for `"lasso"`: the repeating cycle (re-enters at its first state). */
5647
- cycle?: any[] | null;
5737
+ cycle?: number[] | null;
5648
5738
  /** Discriminator: `"finite_path"` or `"lasso"`. */
5649
5739
  kind: string;
5650
5740
  /** Present for `"lasso"`: finite prefix before the cycle begins. */
5651
- prefix?: any[] | null;
5741
+ prefix?: number[] | null;
5652
5742
  /** Present for `"finite_path"`: sequence of state IDs showing the failure. */
5653
- trace?: any[] | null;
5743
+ trace?: number[] | null;
5654
5744
  }
5655
5745
  /** Request to evaluate a counterfactual query */
5656
5746
  interface CounterfactualRequest$1 {
@@ -5661,7 +5751,7 @@ interface CounterfactualRequest$1 {
5661
5751
  /** Consequent: the variable we're querying in the counterfactual world */
5662
5752
  consequent_variable: string;
5663
5753
  /** Factual evidence (observed values in the actual world) */
5664
- evidence: Record<string, any>;
5754
+ evidence: Partial<Record<string, any>>;
5665
5755
  }
5666
5756
  /** Response for counterfactual query */
5667
5757
  interface CounterfactualResponse$1 {
@@ -5814,7 +5904,7 @@ interface CreateCollectionRequest$1 {
5814
5904
  */
5815
5905
  interface CreateConstraintSessionRequest$1 {
5816
5906
  description?: string | null;
5817
- metadata?: object | null;
5907
+ metadata?: Partial<Record<string, string>> | null;
5818
5908
  name?: string | null;
5819
5909
  }
5820
5910
  /** Request to create a curried function */
@@ -5923,6 +6013,40 @@ interface CreateModuleResponse$1 {
5923
6013
  module_name: string;
5924
6014
  success: boolean;
5925
6015
  }
6016
+ /** Request to create a new research session. */
6017
+ interface CreateResearchSessionRequest$1 {
6018
+ /**
6019
+ * Maximum number of research cycles (overrides config default).
6020
+ * @min 0
6021
+ */
6022
+ max_cycles?: number | null;
6023
+ /**
6024
+ * Maximum number of papers to ingest (overrides config default).
6025
+ * @min 0
6026
+ */
6027
+ max_papers?: number | null;
6028
+ /** Restrict paper search to specific sources. */
6029
+ paper_sources?: string[] | null;
6030
+ /** The research question to investigate. */
6031
+ question: string;
6032
+ }
6033
+ /** Response after creating a research session (matches SDK's `CreateResearchSessionResponse`). */
6034
+ interface CreateResearchSessionResponse$1 {
6035
+ /** When the session was created (ISO 8601). */
6036
+ created_at: string;
6037
+ /** The research question. */
6038
+ question: string;
6039
+ /**
6040
+ * The assigned session ID.
6041
+ * @format uuid
6042
+ */
6043
+ session_id: string;
6044
+ /**
6045
+ * Current session status — the phase name alone; see
6046
+ * [`ResearchSessionStatusLabel`].
6047
+ */
6048
+ status: ResearchSessionStatusLabel;
6049
+ }
5926
6050
  /**
5927
6051
  * Request to create a root namespace
5928
6052
  *
@@ -5945,7 +6069,7 @@ interface CreateScenarioRequest$1 {
5945
6069
  /** Optional custom agent name. */
5946
6070
  agent_name?: string | null;
5947
6071
  /** Answers to clarification questions (2nd call in multi-turn flow). */
5948
- answers?: object | null;
6072
+ answers?: Partial<Record<string, string>> | null;
5949
6073
  /** Whether to create a cognitive agent from the scenario. */
5950
6074
  create_agent?: boolean;
5951
6075
  /** Whether to generate curriculum stages. */
@@ -6061,7 +6185,7 @@ interface CreateSpaceRequest$1 {
6061
6185
  /** Request to create a term in the term store */
6062
6186
  interface CreateStoreTermRequest$1 {
6063
6187
  /** Optional features to set on the term */
6064
- features?: Record<string, object>;
6188
+ features?: Partial<Record<string, object>>;
6065
6189
  sort_id: string;
6066
6190
  }
6067
6191
  /**
@@ -6107,7 +6231,7 @@ interface CreateTermInCollectionRequest$1 {
6107
6231
  */
6108
6232
  collection_id: string;
6109
6233
  /** Term features */
6110
- features: Record<string, ValueDto$1>;
6234
+ features: Partial<Record<string, ValueDto$1>>;
6111
6235
  /**
6112
6236
  * Namespace ID
6113
6237
  * @format uuid
@@ -6132,7 +6256,7 @@ interface CreateTermInCollectionRequest$1 {
6132
6256
  */
6133
6257
  interface CreateTermRequest$1 {
6134
6258
  /** Features map */
6135
- features: Record<string, ValueDto$1>;
6259
+ features: Partial<Record<string, ValueDto$1>>;
6136
6260
  /**
6137
6261
  * Optional client-supplied TermId. When present, the term is created
6138
6262
  * with that id; if a term with that id already exists in the tenant,
@@ -6328,7 +6452,7 @@ interface DataMixingStatsDto$1 {
6328
6452
  */
6329
6453
  real_ratio: number;
6330
6454
  /** Per-sort coverage counts. */
6331
- sort_coverage: Record<string, number>;
6455
+ sort_coverage: Partial<Record<string, number>>;
6332
6456
  /**
6333
6457
  * Number of synthetic examples.
6334
6458
  * @min 0
@@ -6345,6 +6469,17 @@ interface DataMixingStatsDto$1 {
6345
6469
  */
6346
6470
  total_count: number;
6347
6471
  }
6472
+ interface DataNeededDto {
6473
+ /**
6474
+ * Additional samples needed
6475
+ * @min 0
6476
+ */
6477
+ samples_needed: number;
6478
+ /** First variable */
6479
+ var_x: string;
6480
+ /** Second variable */
6481
+ var_y: string;
6482
+ }
6348
6483
  /** A single data point in the time series. */
6349
6484
  interface DataPointDto$1 {
6350
6485
  /**
@@ -6353,16 +6488,16 @@ interface DataPointDto$1 {
6353
6488
  */
6354
6489
  timestamp: string;
6355
6490
  /** Feature values. */
6356
- values: Record<string, number>;
6491
+ values: Partial<Record<string, number>>;
6357
6492
  }
6358
6493
  /** Statistics for an enhanced training dataset. */
6359
6494
  interface DatasetStatisticsDto$1 {
6360
6495
  /** Examples by format (Extraction, QA, FillBlank, etc.). */
6361
- by_format: Record<string, number>;
6496
+ by_format: Partial<Record<string, number>>;
6362
6497
  /** Examples by sort name. */
6363
- by_sort: Record<string, number>;
6498
+ by_sort: Partial<Record<string, number>>;
6364
6499
  /** Examples by source type (real, synthetic, verbalized, enhanced_negative). */
6365
- by_source: Record<string, number>;
6500
+ by_source: Partial<Record<string, number>>;
6366
6501
  /** Diversity analysis summary (if computed). */
6367
6502
  diversity_summary?: null | DiversityAnalysisDto$1;
6368
6503
  /**
@@ -6565,14 +6700,14 @@ interface DegreeDistributionDto$1 {
6565
6700
  */
6566
6701
  avg_node_degree: number;
6567
6702
  /** Hyperedge size histogram (size -> count) */
6568
- hyperedge_sizes: Record<number, number>;
6703
+ hyperedge_sizes: Partial<Record<number, number>>;
6569
6704
  /**
6570
6705
  * Maximum node degree
6571
6706
  * @min 0
6572
6707
  */
6573
6708
  max_node_degree: number;
6574
6709
  /** Node degree histogram (degree -> count) */
6575
- node_degrees: Record<number, number>;
6710
+ node_degrees: Partial<Record<number, number>>;
6576
6711
  }
6577
6712
  /** Response from deleting a cognitive agent. */
6578
6713
  interface DeleteAgentResponse$1 {
@@ -6732,7 +6867,7 @@ interface DerivedInferenceResultDto$1 {
6732
6867
  /** @format float */
6733
6868
  match_score: number;
6734
6869
  proceed: boolean;
6735
- sort_predictions: Record<string, number>;
6870
+ sort_predictions: Partial<Record<string, number>>;
6736
6871
  }
6737
6872
  /** Request to detect communities from existing terms */
6738
6873
  interface DetectCommunitiesRequest$1 {
@@ -6843,7 +6978,7 @@ interface DiscoverCausalRequest$1 {
6843
6978
  }
6844
6979
  interface DiscoverCausalResponse$1 {
6845
6980
  /** Data still needed (if discovery incomplete) */
6846
- data_needed?: any[] | null;
6981
+ data_needed?: DataNeededDto[] | null;
6847
6982
  /** Message explaining the result */
6848
6983
  message: string;
6849
6984
  /** Discovered causal relationships */
@@ -6897,7 +7032,7 @@ interface DiscoverEffectsResponse$1 {
6897
7032
  */
6898
7033
  root_sort_id: string;
6899
7034
  /** Created sort IDs (regime -> sort). */
6900
- sort_ids: Record<string, string>;
7035
+ sort_ids: Partial<Record<string, string>>;
6901
7036
  /** Whether discovery succeeded. */
6902
7037
  success: boolean;
6903
7038
  /**
@@ -6963,7 +7098,7 @@ interface DiscoverSchemaRequest$1 {
6963
7098
  * Conjoins with the source config's `exclude_tables`; an exclusion always
6964
7099
  * wins over an inclusion.
6965
7100
  */
6966
- exclude_types?: any[] | null;
7101
+ exclude_types?: string[] | null;
6967
7102
  /** Whether to include sample data in response (default: true) */
6968
7103
  include_sample_data?: boolean;
6969
7104
  /**
@@ -6983,7 +7118,7 @@ interface DiscoverSchemaRequest$1 {
6983
7118
  * `GET /api/v1/sources/{id}/tables` **without re-registering the source**
6984
7119
  * (#66, Gap 2).
6985
7120
  */
6986
- type_filter?: any[] | null;
7121
+ type_filter?: string[] | null;
6987
7122
  }
6988
7123
  /** Response from schema discovery. */
6989
7124
  interface DiscoverSchemaResponse$1 {
@@ -7032,6 +7167,16 @@ interface DiscoveredFeatureDto$1 {
7032
7167
  constraints?: string[];
7033
7168
  /** Human-readable description */
7034
7169
  description?: string | null;
7170
+ /**
7171
+ * Which authority made this field the identifier, and what that key
7172
+ * therefore guarantees (#131). Present exactly when `is_identifier`.
7173
+ *
7174
+ * `is_identifier` alone says a field earned the role without saying why,
7175
+ * and the why is what decides whether ids derived from it survive a
7176
+ * rebuild of the source: a uniqueness constraint does, a graph's internal
7177
+ * record id does not.
7178
+ */
7179
+ identifier_provenance?: null | KeyProvenanceDto;
7035
7180
  /** Whether the field is a primary key/identifier */
7036
7181
  is_identifier: boolean;
7037
7182
  /** Whether the field is a relation */
@@ -7257,7 +7402,7 @@ interface DisentailmentResponse$1 {
7257
7402
  /** Diversity analysis summary. */
7258
7403
  interface DiversityAnalysisDto$1 {
7259
7404
  /** Distribution of examples across buckets (near, medium, far, unrelated). */
7260
- bucket_counts: Record<string, number>;
7405
+ bucket_counts: Partial<Record<string, number>>;
7261
7406
  /** Whether diversity is balanced (no bucket has >60% of pairs). */
7262
7407
  is_balanced: boolean;
7263
7408
  /**
@@ -7982,7 +8127,7 @@ interface DoseResponseResponse$1 {
7982
8127
  /** Request an AI draft of a function from a natural-language description. */
7983
8128
  interface DraftFunctionRequest$1 {
7984
8129
  /** Answers to clarification questions (2nd call). */
7985
- answers?: object | null;
8130
+ answers?: Partial<Record<string, string>> | null;
7986
8131
  /** A prior draft to revise (refine loop) — the model treats it as the base. */
7987
8132
  current_draft?: null | FunctionDraftDto$1;
7988
8133
  /** What the function should do, in plain language. */
@@ -8016,7 +8161,7 @@ type DraftFunctionResponse$1 = {
8016
8161
  /** Request an AI draft of one or more inference rules. */
8017
8162
  interface DraftRulesRequest$1 {
8018
8163
  /** Answers to clarification questions (2nd call). */
8019
- answers?: object | null;
8164
+ answers?: Partial<Record<string, string>> | null;
8020
8165
  /** The desired rule(s), in plain language. */
8021
8166
  description: string;
8022
8167
  /** Session ID for multi-turn clarification (client-echoed; stateless server). */
@@ -8182,7 +8327,7 @@ interface DynamicDiscoveryRequest$1 {
8182
8327
  * Tiers are ordered from past to future (tier 0 = earliest).
8183
8328
  * Reference: Andrews et al. (2024) Int. J. Epidemiol.
8184
8329
  */
8185
- temporal_tiers?: any[] | null;
8330
+ temporal_tiers?: string[][] | null;
8186
8331
  /** Enable active learning recommendations (default: true) */
8187
8332
  use_active_learning?: boolean | null;
8188
8333
  /** Enable GES refinement (default: true) */
@@ -8193,7 +8338,7 @@ interface DynamicDiscoveryResponse$1 {
8193
8338
  * Edge posteriors (for Hybrid/MCMC strategies)
8194
8339
  * Maps (from, to) -> probability
8195
8340
  */
8196
- edge_posteriors?: any[] | null;
8341
+ edge_posteriors?: EdgePosteriorDto[] | null;
8197
8342
  /** GES refinement result */
8198
8343
  ges_result?: null | GESResultDto$1;
8199
8344
  /** Proof tree for audit trail */
@@ -8206,7 +8351,7 @@ interface DynamicDiscoveryResponse$1 {
8206
8351
  * Skeleton edges (for Hybrid strategy)
8207
8352
  * These are edges discovered by PC that passed CI tests
8208
8353
  */
8209
- skeleton?: any[] | null;
8354
+ skeleton?: [string, string][] | null;
8210
8355
  /** Current state of discovery */
8211
8356
  state: DiscoveryStateDto$1;
8212
8357
  /** Strategy used for discovery */
@@ -8233,7 +8378,7 @@ interface DynamicQueryGroupDto$1 {
8233
8378
  /** Entities in this group */
8234
8379
  entities: DynamicQueryResultDto$1[];
8235
8380
  /** Group key values */
8236
- key: Record<string, any>;
8381
+ key: Partial<Record<string, any>>;
8237
8382
  }
8238
8383
  /**
8239
8384
  * Request for dynamic query building
@@ -8281,9 +8426,9 @@ interface DynamicQueryResponse$1 {
8281
8426
  /** A result from dynamic query */
8282
8427
  interface DynamicQueryResultDto$1 {
8283
8428
  /** Variable bindings (from Bind patterns) */
8284
- bindings?: Record<string, any>;
8429
+ bindings?: Partial<Record<string, any>>;
8285
8430
  /** Matched/projected features */
8286
- features: Record<string, any>;
8431
+ features: Partial<Record<string, any>>;
8287
8432
  /**
8288
8433
  * Entity ID
8289
8434
  * @format uuid
@@ -8356,6 +8501,19 @@ interface EdgeCapacityUpdateDto {
8356
8501
  /** Edge label declared at construction or via a prior commit. */
8357
8502
  label: string;
8358
8503
  }
8504
+ /** Edge feasibility class. */
8505
+ type EdgeClassDto = "always_used" | "never_used" | "sometimes_used";
8506
+ /** Per-edge classification. */
8507
+ interface EdgeClassificationDto {
8508
+ /** Class string: `"always_used"`, `"never_used"`, `"sometimes_used"`. */
8509
+ class: EdgeClassDto;
8510
+ /** Source node name. */
8511
+ from: string;
8512
+ /** Caller-supplied label, if any. */
8513
+ label?: string | null;
8514
+ /** Destination node name. */
8515
+ to: string;
8516
+ }
8359
8517
  /** Flow snapshot for a single forward edge. */
8360
8518
  interface EdgeFlowDto {
8361
8519
  /**
@@ -8375,6 +8533,17 @@ interface EdgeFlowDto {
8375
8533
  /** Destination node name. */
8376
8534
  to: string;
8377
8535
  }
8536
+ interface EdgePosteriorDto {
8537
+ /** Source variable */
8538
+ from: string;
8539
+ /**
8540
+ * Posterior probability of this edge direction
8541
+ * @format double
8542
+ */
8543
+ probability: number;
8544
+ /** Target variable */
8545
+ to: string;
8546
+ }
8378
8547
  /** Edge type in the graph */
8379
8548
  type EdgeTypeDto$1 = "subtype" | "multiple_inheritance" | "glb_path" | "lub_path" | "constraint_dependency" | "propagation" | "feature" | "coreference" | "trigger_dependency" | "relation_source" | "relation_target" | "identity" | "derivation" | {
8380
8549
  custom: string;
@@ -8504,7 +8673,7 @@ type EffectDto$1 = {
8504
8673
  };
8505
8674
  } | {
8506
8675
  piecewise_linear: {
8507
- points: any[][];
8676
+ points: [number, number][];
8508
8677
  };
8509
8678
  };
8510
8679
  interface EffectPredictionDto$1 {
@@ -8515,6 +8684,24 @@ interface EffectPredictionDto$1 {
8515
8684
  /** @format double */
8516
8685
  std_dev: number;
8517
8686
  }
8687
+ /** Rank request: one query, and the candidates to score against it. */
8688
+ interface EmbeddingRankRequest$1 {
8689
+ /**
8690
+ * Candidate texts. Scored in place — the response is index-aligned with
8691
+ * this list, so the caller can zip it back onto whatever it retrieved.
8692
+ */
8693
+ candidates: string[];
8694
+ /** The text every candidate is scored against. */
8695
+ query: string;
8696
+ }
8697
+ /** Rank response: one cosine similarity per candidate, in request order. */
8698
+ interface EmbeddingRankResponse$1 {
8699
+ /**
8700
+ * Cosine similarity in `[-1.0, 1.0]`, same length and same order as
8701
+ * `candidates`. A candidate with no scoreable text scores `0.0`.
8702
+ */
8703
+ scores: number[];
8704
+ }
8518
8705
  /** Response for the embedding verification endpoint. */
8519
8706
  interface EmbeddingVerificationResponse$1 {
8520
8707
  /** Whether box embeddings are available. */
@@ -8541,7 +8728,7 @@ interface EmbeddingVerificationResponse$1 {
8541
8728
  /** A single training sample. */
8542
8729
  interface EmlSampleDto {
8543
8730
  /** Variable name → value (e.g. `{"x": 1.5}`). */
8544
- inputs: Record<string, number>;
8731
+ inputs: Partial<Record<string, number>>;
8545
8732
  /**
8546
8733
  * Target output value.
8547
8734
  * @format double
@@ -8758,7 +8945,7 @@ interface EntailmentResponse$1 {
8758
8945
  /** A lightweight entity representation for verification requests. */
8759
8946
  interface EntityDto$1 {
8760
8947
  /** Feature name-value pairs. */
8761
- features: Record<string, any>;
8948
+ features: Partial<Record<string, any>>;
8762
8949
  /**
8763
8950
  * Sort ID this entity belongs to.
8764
8951
  * @format uuid
@@ -9195,7 +9382,7 @@ interface EvidenceDerivationConfigDto$1 {
9195
9382
  * Relations whose polarity depends on the target entity's sort.
9196
9383
  * Maps relation name → list of target sort names that make it negative.
9197
9384
  */
9198
- context_dependent_relations?: Record<string, string[]>;
9385
+ context_dependent_relations?: Partial<Record<string, string[]>>;
9199
9386
  /**
9200
9387
  * Default quality weight for NER-derived evidence (0.0-1.0).
9201
9388
  * @format double
@@ -9215,6 +9402,20 @@ interface EvidenceItemDto$1 {
9215
9402
  * @format double
9216
9403
  */
9217
9404
  contribution: number;
9405
+ /**
9406
+ * The evidence term's own human-readable sentence, when it has one.
9407
+ *
9408
+ * Without this the only identity an evidence row carried was `term_id`, so
9409
+ * every consumer rendered supporting evidence as `Evidence item <uuid>`
9410
+ * while the term itself held e.g. *"Aspirin reduces_risk_of Cardiovascular
9411
+ * Disease"* — the assessment path reported its own findings unreadably
9412
+ * (#138). Resolved from the term under the same deterministic display-name
9413
+ * precedence `TermDto.display_name` uses, so the two never disagree.
9414
+ *
9415
+ * Optional and omitted when empty: a consumer written before this field
9416
+ * existed deserializes the response unchanged and keeps its own fallback.
9417
+ */
9418
+ description?: string | null;
9218
9419
  /**
9219
9420
  * Quality weight of this evidence (0.0-1.0)
9220
9421
  * @format double
@@ -9228,6 +9429,40 @@ interface EvidenceItemDto$1 {
9228
9429
  */
9229
9430
  term_id: string;
9230
9431
  }
9432
+ /** Summary of a single evidence item. */
9433
+ interface EvidenceItemSummary {
9434
+ /**
9435
+ * Contribution to the overall assessment.
9436
+ * @format double
9437
+ */
9438
+ contribution: number;
9439
+ /** Description of the evidence. */
9440
+ description: string;
9441
+ /** DOI of the paper providing this evidence. */
9442
+ paper_doi?: string | null;
9443
+ /**
9444
+ * Stable key of the paper providing this evidence.
9445
+ *
9446
+ * Present even when the paper has no DOI, which `paper_doi` cannot cover.
9447
+ * Defaulted so sessions persisted before attribution existed still load.
9448
+ */
9449
+ paper_key?: string | null;
9450
+ /**
9451
+ * Title of the paper providing this evidence, for display.
9452
+ *
9453
+ * Defaulted so sessions persisted before attribution existed still load.
9454
+ */
9455
+ paper_title?: string | null;
9456
+ /**
9457
+ * Quality weight (0.0-1.0).
9458
+ * @format double
9459
+ */
9460
+ quality_weight: number;
9461
+ /** Whether this evidence supports the claim. */
9462
+ supports: boolean;
9463
+ /** OSFKB term ID of the evidence. */
9464
+ term_id: string;
9465
+ }
9231
9466
  /** Evidence source DTO */
9232
9467
  type EvidenceSourceDto$1 = {
9233
9468
  relation_term_id?: string | null;
@@ -9520,7 +9755,7 @@ interface ExtractEntitiesRequest$1 {
9520
9755
  * Optional list of specific labels (sort names) to use for extraction.
9521
9756
  * If not provided, all tenant sort names are used as labels.
9522
9757
  */
9523
- labels?: any[] | null;
9758
+ labels?: string[] | null;
9524
9759
  /** The text to extract entities from */
9525
9760
  text: string;
9526
9761
  }
@@ -9948,7 +10183,7 @@ type FeatureConstraintDto = {
9948
10183
  /** API representation of a feature descriptor */
9949
10184
  interface FeatureDescriptorDto$1 {
9950
10185
  /** Custom OWL annotations for this feature (e.g., isIdentifier, unit, enumValues) */
9951
- annotations?: Record<string, string>;
10186
+ annotations?: Partial<Record<string, string>>;
9952
10187
  /**
9953
10188
  * Optional constraint on the feature value. Defaults to `None`
9954
10189
  * when absent so callers needn't send an explicit null.
@@ -10092,7 +10327,7 @@ interface FindBySortRequest$1 {
10092
10327
  * expected string value. Only terms whose features match ALL entries are
10093
10328
  * returned. Omit or pass an empty map to disable filtering.
10094
10329
  */
10095
- filter?: object | null;
10330
+ filter?: Partial<Record<string, string>> | null;
10096
10331
  /**
10097
10332
  * Optional cap on the number of returned terms. When set, the handler
10098
10333
  * truncates the post-filter result list to this many terms. Useful for
@@ -10326,7 +10561,7 @@ interface ForecastRequestDto {
10326
10561
  * Decimal odds aligned to `entities`; enables the grouped-rank odds blend
10327
10562
  * when the model carries one.
10328
10563
  */
10329
- odds?: any[] | null;
10564
+ odds?: number[] | null;
10330
10565
  /**
10331
10566
  * Grouped-rank: ordered combinations to return (default 5).
10332
10567
  * @min 0
@@ -10385,7 +10620,7 @@ interface FormalJudgeRequest$1 {
10385
10620
  * Risk categories from the benchmark dataset (e.g., ["Lead to property loss", "Violate laws"])
10386
10621
  * Used by the 3-agent per-task decomposition pipeline to generate task-specific atomic conditions.
10387
10622
  */
10388
- risk_categories?: any[] | null;
10623
+ risk_categories?: string[] | null;
10389
10624
  /**
10390
10625
  * Agent execution trajectory (ordered list of tool calls + results)
10391
10626
  * Paper Table 5: `trajectory.tool_calls`
@@ -10413,7 +10648,7 @@ interface FormalJudgeResponse$1 {
10413
10648
  * Keys are fact type names (e.g., "ToolCallAttempted", "FabricatedContent"),
10414
10649
  * values are true/false for each atomic fact.
10415
10650
  */
10416
- deception_fact_map?: object | null;
10651
+ deception_fact_map?: Partial<Record<string, boolean>> | null;
10417
10652
  /** Deception predicates that triggered (paper §B.6: φ1-φ4) */
10418
10653
  detected_deception_predicates?: string[];
10419
10654
  /**
@@ -10852,6 +11087,24 @@ interface FunctionsVisualizationResponse {
10852
11087
  */
10853
11088
  graph: VisualizationGraphDto$1;
10854
11089
  }
11090
+ /** Summary of fuzzy concept enumeration at one alpha-cut level. */
11091
+ interface FuzzyConceptLevelDto {
11092
+ /**
11093
+ * Alpha threshold for this level
11094
+ * @format double
11095
+ */
11096
+ alpha: number;
11097
+ /**
11098
+ * Number of concepts discovered at this threshold
11099
+ * @min 0
11100
+ */
11101
+ concept_count: number;
11102
+ /**
11103
+ * Number of concepts novel at this level (not found at higher alpha)
11104
+ * @min 0
11105
+ */
11106
+ novel_at_this_level: number;
11107
+ }
10855
11108
  /** Request for fuzzy merge operation */
10856
11109
  interface FuzzyMergeRequest$1 {
10857
11110
  /**
@@ -10929,7 +11182,7 @@ interface FuzzyProveRequest$1 {
10929
11182
  * a diagnosis — another patient's fact of the same sort never does. A fact lacking the
10930
11183
  * feature is unconstrained (open world). Empty/absent ⇒ tenant-wide (legacy) behavior.
10931
11184
  */
10932
- scope?: Record<string, string>;
11185
+ scope?: Partial<Record<string, string>>;
10933
11186
  /**
10934
11187
  * T-norm strategy: "min", "product", or "lukasiewicz"
10935
11188
  * @default "min"
@@ -11096,7 +11349,7 @@ type FuzzyShapeDto$1 = {
11096
11349
  kind: "PiShape";
11097
11350
  } | {
11098
11351
  kind: "PiecewiseLinear";
11099
- points: any[][];
11352
+ points: [number, number][];
11100
11353
  };
11101
11354
  /** Request for fuzzy subsumption check */
11102
11355
  interface FuzzySubsumptionRequest$1 {
@@ -11305,7 +11558,7 @@ type GeneralConstraintDto$1 = object;
11305
11558
  /** Request body for `POST /api/v1/generate`. */
11306
11559
  interface GenerateDocumentRequest$1 {
11307
11560
  /** Additional metadata to guide generation (passed through to the backend). */
11308
- metadata?: Record<string, string>;
11561
+ metadata?: Partial<Record<string, string>>;
11309
11562
  /**
11310
11563
  * Target modality for the output artifact.
11311
11564
  * Currently only `"text"` is supported.
@@ -11369,7 +11622,7 @@ interface GenerateNegativesResponse$1 {
11369
11622
  /** Request body for ontology generation. */
11370
11623
  interface GenerateOntologyRequest$1 {
11371
11624
  /** Answers to clarification questions (2nd call). */
11372
- answers?: object | null;
11625
+ answers?: Partial<Record<string, string>> | null;
11373
11626
  /** The user's task description. */
11374
11627
  prompt: string;
11375
11628
  /** Session ID for multi-turn clarification. */
@@ -11518,7 +11771,7 @@ interface GenerationPromptResponse$1 {
11518
11771
  /** Generation statistics report. */
11519
11772
  interface GenerationReportDto$1 {
11520
11773
  /** Counts per generation method. */
11521
- by_method: Record<string, number>;
11774
+ by_method: Partial<Record<string, number>>;
11522
11775
  /**
11523
11776
  * Number of forward-chained derived facts.
11524
11777
  * @min 0
@@ -11875,6 +12128,68 @@ interface GetScenarioResponse$1 {
11875
12128
  */
11876
12129
  webhook_actions_created: number;
11877
12130
  }
12131
+ /**
12132
+ * Full research session state (matches SDK's `ResearchSessionResponse`).
12133
+ *
12134
+ * Returned by GET /research/sessions/{id}.
12135
+ */
12136
+ interface GetSessionResponse {
12137
+ /** When the session was created (ISO 8601). */
12138
+ created_at: string;
12139
+ /** Results from each completed cycle. */
12140
+ cycles: ResearchCycleResultDto$1[];
12141
+ /** Error message if status is Failed. */
12142
+ error?: string | null;
12143
+ /** Papers ingested so far (full metadata including title, authors, DOI, URL). */
12144
+ papers: PaperMetadataDto$1[];
12145
+ /** The research question. */
12146
+ question: string;
12147
+ /**
12148
+ * Session ID.
12149
+ * @format uuid
12150
+ */
12151
+ session_id: string;
12152
+ /**
12153
+ * Current session status — the phase name alone; see
12154
+ * [`ResearchSessionStatusLabel`].
12155
+ */
12156
+ status: ResearchSessionStatusLabel;
12157
+ /**
12158
+ * Total contradictions.
12159
+ * @min 0
12160
+ */
12161
+ total_contradictions: number;
12162
+ /**
12163
+ * Total findings.
12164
+ * @min 0
12165
+ */
12166
+ total_findings: number;
12167
+ /**
12168
+ * Total knowledge gaps.
12169
+ * @min 0
12170
+ */
12171
+ total_gaps: number;
12172
+ /**
12173
+ * Total papers ingested.
12174
+ * @min 0
12175
+ */
12176
+ total_papers_ingested: number;
12177
+ /**
12178
+ * Total papers retrieved from external APIs, including by the cycle
12179
+ * currently running.
12180
+ *
12181
+ * Live throughout a run, like every other counter here. `cycles` reports a
12182
+ * cycle's retrieval only once that cycle completes — minutes after the
12183
+ * papers arrived — so a consumer deriving the figure from `cycles` alone
12184
+ * renders `0` over a visibly growing paper list for most of a session
12185
+ * (#143). This is the field to read for "how many papers has this run
12186
+ * found"; `cycles[].papers_retrieved` remains the per-cycle breakdown.
12187
+ * @min 0
12188
+ */
12189
+ total_papers_retrieved: number;
12190
+ /** When the session was last updated (ISO 8601). */
12191
+ updated_at: string;
12192
+ }
11878
12193
  /** Request to get direct sort similarity */
11879
12194
  interface GetSortSimilarityRequest$1 {
11880
12195
  /**
@@ -11913,7 +12228,7 @@ interface GetStoreTermRequest$1 {
11913
12228
  /** Response with term details */
11914
12229
  interface GetStoreTermResponse$1 {
11915
12230
  bound_to?: string | null;
11916
- features: Record<string, object>;
12231
+ features: Partial<Record<string, object>>;
11917
12232
  is_variable: boolean;
11918
12233
  sort_id: string;
11919
12234
  term_id: string;
@@ -12015,7 +12330,7 @@ interface GlobalIncrementResponse$1 {
12015
12330
  */
12016
12331
  interface GoalDto$1 {
12017
12332
  /** Features as key-value pairs (raw JSON values) */
12018
- features?: Record<string, JsonValue>;
12333
+ features?: Partial<Record<string, JsonValue>>;
12019
12334
  /**
12020
12335
  * Sort name for the goal (for human-friendly input)
12021
12336
  * Kept as "sort" for backward compatibility with existing clients
@@ -12198,7 +12513,7 @@ interface GraphEdgeDto$1 {
12198
12513
  /** Optional edge label */
12199
12514
  label?: string | null;
12200
12515
  /** Additional properties */
12201
- properties?: Record<string, string>;
12516
+ properties?: Partial<Record<string, string>>;
12202
12517
  /** Source node ID */
12203
12518
  source: string;
12204
12519
  /** Target node ID */
@@ -12219,7 +12534,7 @@ interface GraphMetadataDto$1 {
12219
12534
  */
12220
12535
  edge_count: number;
12221
12536
  /** Additional metadata */
12222
- extra?: Record<string, string>;
12537
+ extra?: Partial<Record<string, string>>;
12223
12538
  /**
12224
12539
  * Total number of hyperedges
12225
12540
  * @min 0
@@ -12257,7 +12572,7 @@ interface GraphNodeDto$1 {
12257
12572
  /** Type of node */
12258
12573
  node_type: NodeTypeDto$1;
12259
12574
  /** Additional properties */
12260
- properties?: Record<string, string>;
12575
+ properties?: Partial<Record<string, string>>;
12261
12576
  /**
12262
12577
  * Size of the node (for rendering)
12263
12578
  * @format double
@@ -12630,7 +12945,7 @@ interface HyperedgeDto$1 {
12630
12945
  /** Whether the nodes are ordered */
12631
12946
  ordered: boolean;
12632
12947
  /** Additional properties */
12633
- properties?: Record<string, string>;
12948
+ properties?: Partial<Record<string, string>>;
12634
12949
  /**
12635
12950
  * Optional source term ID
12636
12951
  * @format uuid
@@ -12708,7 +13023,7 @@ interface HypergraphResponse$1 {
12708
13023
  * to `1.0`. Renderers are expected to map this to polygon fill
12709
13024
  * opacity so audit-ability is visually obvious.
12710
13025
  */
12711
- provenance_tags?: Record<string, number>;
13026
+ provenance_tags?: Partial<Record<string, number>>;
12712
13027
  /** Statistics */
12713
13028
  stats: HypergraphStats$1;
12714
13029
  }
@@ -12775,7 +13090,7 @@ interface IdentifyEffectRequest$1 {
12775
13090
  /** Response for effect identification */
12776
13091
  interface IdentifyEffectResponse$1 {
12777
13092
  /** The adjustment set, when the estimand is an adjustment form */
12778
- adjustment_set?: any[] | null;
13093
+ adjustment_set?: string[] | null;
12779
13094
  /** Every assumption the result consumes */
12780
13095
  assumptions: CausalAssumptionDto$1[];
12781
13096
  /** Ψ-term id of the persisted identification certificate */
@@ -12800,7 +13115,7 @@ interface IdentifyEffectResponse$1 {
12800
13115
  * criterion. Prefer these covariates when your data has them:
12801
13116
  * the estimation gate accepts either certified set.
12802
13117
  */
12803
- optimal_adjustment_set?: any[] | null;
13118
+ optimal_adjustment_set?: string[] | null;
12804
13119
  /** Outcome variable */
12805
13120
  outcome: string;
12806
13121
  /** Refusal reason, when not identifiable */
@@ -12856,7 +13171,7 @@ interface ImageExtractedEntityDto$1 {
12856
13171
  */
12857
13172
  confidence: number;
12858
13173
  /** Features extracted for this entity (key → value) */
12859
- features: Record<string, any>;
13174
+ features: Partial<Record<string, any>>;
12860
13175
  /** Local ID within the extraction (e.g., "e1", "e2") */
12861
13176
  local_id: string;
12862
13177
  /** Text mentions/labels found in the image for this entity */
@@ -12906,6 +13221,15 @@ interface ImageExtractionStatsDto$1 {
12906
13221
  */
12907
13222
  sorts_reused: number;
12908
13223
  }
13224
+ /** Image input for multimodal TRIZ analysis */
13225
+ interface ImageInputDto {
13226
+ /** Base64-encoded image data */
13227
+ data: string;
13228
+ /** Optional description of the image */
13229
+ description?: string;
13230
+ /** MIME type (e.g., "image/png", "image/jpeg") */
13231
+ mime: string;
13232
+ }
12909
13233
  /** A new sort (type) suggested by the vision LLM based on visual patterns. */
12910
13234
  interface ImageSuggestedSortDto$1 {
12911
13235
  /** Feature names suggested for this sort */
@@ -13193,7 +13517,7 @@ interface IngestFromSourceRequest$1 {
13193
13517
  */
13194
13518
  records_per_document?: number;
13195
13519
  /** Which types/tables to ingest (None = all) */
13196
- type_filter?: any[] | null;
13520
+ type_filter?: string[] | null;
13197
13521
  }
13198
13522
  /** Response from structured data ingestion. */
13199
13523
  interface IngestFromSourceResponse$1 {
@@ -13250,7 +13574,7 @@ interface IngestKifRequest$1 {
13250
13574
  * `[relation, arg1, arg2, …]` of constant names. When present, the response's
13251
13575
  * `provable` field reports whether the goal is entailed by the imported axioms.
13252
13576
  */
13253
- query?: any[] | null;
13577
+ query?: string[] | null;
13254
13578
  }
13255
13579
  /** Response body for `POST /api/v1/ingest/kif`. */
13256
13580
  interface IngestKifResponse$1 {
@@ -13305,9 +13629,9 @@ interface IngestKifResponse$1 {
13305
13629
  * The non-firing residue broken down by *why* it does not fire (shape tag → count) — the
13306
13630
  * higher-order / modal tail that no first-order rule engine reduces, made auditable.
13307
13631
  */
13308
- residue_by_shape: Record<string, number>;
13632
+ residue_by_shape: Partial<Record<string, number>>;
13309
13633
  /** A few concrete example forms per residue shape, for auditing the irreducible tail. */
13310
- residue_examples: Record<string, string[]>;
13634
+ residue_examples: Partial<Record<string, string[]>>;
13311
13635
  /**
13312
13636
  * All `=>` / `<=>` implications imported.
13313
13637
  * @min 0
@@ -13366,6 +13690,39 @@ interface IngestMarkdownRequest$1 {
13366
13690
  */
13367
13691
  owner_id: string;
13368
13692
  }
13693
+ /** Request to ingest a paper (matches SDK's `IngestPaperRequest`). */
13694
+ interface IngestPaperRequest$1 {
13695
+ /** Paper identifier (DOI, PMID, arXiv ID, or URL). */
13696
+ identifier: string;
13697
+ /** Type of identifier: "doi", "pmid", "arxiv_id", or "url". */
13698
+ identifier_type: string;
13699
+ /**
13700
+ * Session ID to associate ingestion with (optional).
13701
+ * @format uuid
13702
+ */
13703
+ session_id?: string | null;
13704
+ }
13705
+ /** Response after ingesting a paper (matches SDK's `IngestPaperResponse`). */
13706
+ interface IngestPaperResponse$1 {
13707
+ /**
13708
+ * Number of claims extracted.
13709
+ * @format int32
13710
+ * @min 0
13711
+ */
13712
+ claims_extracted: number;
13713
+ /**
13714
+ * Number of entities extracted.
13715
+ * @format int32
13716
+ * @min 0
13717
+ */
13718
+ entities_extracted: number;
13719
+ /** Error message if ingestion failed. */
13720
+ error?: string | null;
13721
+ /** Paper metadata (if resolved). */
13722
+ metadata?: null | PaperMetadataDto$1;
13723
+ /** Whether ingestion succeeded. */
13724
+ success: boolean;
13725
+ }
13369
13726
  /** Request to ingest RDF/OWL data */
13370
13727
  interface IngestRdfRequest$1 {
13371
13728
  /**
@@ -13778,7 +14135,7 @@ interface InlineDocumentDto {
13778
14135
  /** Inline Ψ-term feature payload for a single prediction. */
13779
14136
  interface InlineInferenceTermDto {
13780
14137
  /** Per-antecedent flat feature vectors. */
13781
- antecedent_features: Record<string, number[]>;
14138
+ antecedent_features: Partial<Record<string, number[]>>;
13782
14139
  /** Temporal feature sequence for the conclusion gate. */
13783
14140
  temporal_features: TemporalSequenceDto;
13784
14141
  }
@@ -14067,14 +14424,14 @@ interface IntegrationGroupDto$1 {
14067
14424
  */
14068
14425
  group_similarity: number;
14069
14426
  /** Matching feature values (the "join key" values) */
14070
- match_key: Record<string, any>;
14427
+ match_key: Partial<Record<string, any>>;
14071
14428
  /**
14072
14429
  * ID of newly created merged entity (if create_merged was true)
14073
14430
  * @format uuid
14074
14431
  */
14075
14432
  merged_entity_id?: string | null;
14076
14433
  /** Merged features (if create_merged was true) */
14077
- merged_features?: object | null;
14434
+ merged_features?: Partial<Record<string, any>> | null;
14078
14435
  }
14079
14436
  /** BDI Intention DTO. */
14080
14437
  interface IntentionDto$1 {
@@ -14150,7 +14507,7 @@ interface InterventionObservationResponse$1 {
14150
14507
  */
14151
14508
  remaining_uncertain_count: number;
14152
14509
  /** Edges that were resolved by this intervention */
14153
- resolved_edges: any[][];
14510
+ resolved_edges: [string, string][];
14154
14511
  /** Success flag */
14155
14512
  success: boolean;
14156
14513
  }
@@ -14207,7 +14564,7 @@ interface InvokeActionRequest$1 {
14207
14564
  /** Name of the action to invoke */
14208
14565
  action_name: string;
14209
14566
  /** Input values for the action */
14210
- inputs?: Record<string, any>;
14567
+ inputs?: Partial<Record<string, any>>;
14211
14568
  /**
14212
14569
  * Tenant context
14213
14570
  * @format uuid
@@ -14312,6 +14669,68 @@ type KbChangeDto$1 = {
14312
14669
  term2: string;
14313
14670
  type: "Coreference";
14314
14671
  };
14672
+ /**
14673
+ * Where a key came from, and what it therefore guarantees (#131).
14674
+ *
14675
+ * Emitted on a binding listing and beside a discovered identifier, so the two
14676
+ * answers an operator needs before ingesting — *is this key guaranteed?* and
14677
+ * *do the term ids survive a rebuild of the source?* — are readable without
14678
+ * inferring anything from a column's name.
14679
+ */
14680
+ interface KeyProvenanceDto {
14681
+ /**
14682
+ * Which side settled the key: `discovery`, `client`, `nobody` (a keyless
14683
+ * binding), or `unrecorded`.
14684
+ */
14685
+ chosen_by: string;
14686
+ /**
14687
+ * Whether term ids built from this key survive a rebuild of the source:
14688
+ * `survives_source_rebuild` or `lifetime_scoped`.
14689
+ *
14690
+ * Absent for a client-supplied key, where it depends on which column was
14691
+ * nominated and nothing declares that — and for a keyless or unrecorded
14692
+ * binding, where there is nothing to answer about.
14693
+ */
14694
+ durability?: string | null;
14695
+ /**
14696
+ * One sentence stating what this key source means, for an operator who
14697
+ * does not know the vocabulary.
14698
+ */
14699
+ explanation: string;
14700
+ /**
14701
+ * Whether some authority guarantees the key identifies exactly one
14702
+ * record. Absent where the question has no answer — a keyless binding, or
14703
+ * a provenance that was never recorded.
14704
+ */
14705
+ guaranteed_unique?: boolean | null;
14706
+ /**
14707
+ * Which authority chose the key. One of `source_constraint`,
14708
+ * `synthetic_record_id`, `sequence_default`, `schema_declared_identifier`,
14709
+ * `naming_convention`, `sampled_uniqueness`, `client_supplied`, `keyless`,
14710
+ * `unrecorded`.
14711
+ *
14712
+ * The six discovery levels are reported directly rather than nested
14713
+ * under a "discovered" wrapper, so one field answers "which of the key
14714
+ * sources is this".
14715
+ */
14716
+ source: string;
14717
+ }
14718
+ /** A knowledge gap identified by goal residuation analysis. */
14719
+ interface KnowledgeGap {
14720
+ /**
14721
+ * Information gain score (higher = more valuable to fill).
14722
+ * @format double
14723
+ */
14724
+ info_gain: number;
14725
+ /** Rule head names that need this sort. */
14726
+ needed_by: string[];
14727
+ /** The sort name that is missing. */
14728
+ sort_name: string;
14729
+ /** Auto-generated search query to fill the gap. */
14730
+ suggested_search_query?: string | null;
14731
+ /** What would resolve this gap. */
14732
+ wake_trigger: string;
14733
+ }
14315
14734
  /** One state in the Kripke model. */
14316
14735
  interface KripkeStateDto {
14317
14736
  /**
@@ -14341,7 +14760,7 @@ interface KripkeTransitionDto {
14341
14760
  /** One labelled training Ψ-term. */
14342
14761
  interface LabelledTermDto {
14343
14762
  /** Per-antecedent flat feature vectors. */
14344
- antecedent_features: Record<string, number[]>;
14763
+ antecedent_features: Partial<Record<string, number[]>>;
14345
14764
  /** Ground-truth label for the conclusion sort. */
14346
14765
  label: MortalityLabelDto;
14347
14766
  /** Temporal feature sequence for the conclusion gate. */
@@ -14585,7 +15004,7 @@ interface LayoutHintsDto$1 {
14585
15004
  /** Preferred layout algorithm */
14586
15005
  algorithm: LayoutAlgorithmDto$1;
14587
15006
  /** Cluster definitions */
14588
- clusters?: Record<string, string[]>;
15007
+ clusters?: Partial<Record<string, string[]>>;
14589
15008
  /** Direction for hierarchical layouts */
14590
15009
  direction?: null | LayoutDirectionDto$1;
14591
15010
  /**
@@ -14662,7 +15081,7 @@ interface LearnFromCorrectionRequest$1 {
14662
15081
  */
14663
15082
  agent_id: string;
14664
15083
  /** The correct answer pattern (as Ψ-term features, raw JSON values) */
14665
- correct_pattern: Record<string, JsonValue>;
15084
+ correct_pattern: Partial<Record<string, JsonValue>>;
14666
15085
  /** Optional: The sort of the correct answer */
14667
15086
  correct_sort?: string | null;
14668
15087
  /**
@@ -14938,7 +15357,7 @@ interface LinTermDto {
14938
15357
  */
14939
15358
  interface LinearConstraint$2 {
14940
15359
  /** Variable-name → coefficient. */
14941
- coefficients: Record<string, number>;
15360
+ coefficients: Partial<Record<string, number>>;
14942
15361
  /** Optional caller-supplied label, returned in error reports. */
14943
15362
  name?: string | null;
14944
15363
  /**
@@ -15194,6 +15613,11 @@ interface ListPendingReviewsResponse {
15194
15613
  interface ListPreferencesResponseDto {
15195
15614
  preferences: PreferenceDto$1[];
15196
15615
  }
15616
+ /** Returned by GET /research/sessions — the tenant's sessions, newest first. */
15617
+ interface ListResearchSessionsResponse$1 {
15618
+ /** Session summaries. */
15619
+ sessions: ResearchSessionSummaryDto$1[];
15620
+ }
15197
15621
  /** Response for GET /api/v1/scenarios — list all scenarios. */
15198
15622
  interface ListScenariosResponse$1 {
15199
15623
  /** List of scenario summaries, sorted by most recent first. */
@@ -15270,7 +15694,7 @@ interface ListTenantsResponse$1 {
15270
15694
  /** Response listing a tenant's cloned voices and the available preset voices. */
15271
15695
  interface ListVoicesResponse$1 {
15272
15696
  /** Preset speaker names per engine, from the loaded checkpoints. */
15273
- presets: Record<string, string[]>;
15697
+ presets: Partial<Record<string, string[]>>;
15274
15698
  /** Voices this tenant has enrolled. */
15275
15699
  voices: VoiceProfileDto[];
15276
15700
  }
@@ -15351,26 +15775,58 @@ interface LtnQueryRequest$1 {
15351
15775
  * Ψ-term feature text to embed into the input vector when `features` is
15352
15776
  * absent and an embedding backend is configured (`ground`).
15353
15777
  */
15354
- feature_text?: any[] | null;
15778
+ feature_text?: {
15779
+ /** Feature name. */
15780
+ name: string;
15781
+ /** Feature value (free text). */
15782
+ value: string;
15783
+ }[] | null;
15355
15784
  /** An explicit input feature vector for the queried individual (`ground`). */
15356
- features?: any[] | null;
15785
+ features?: number[] | null;
15357
15786
  /** The unseen instances to score (`generalisation`). */
15358
- instances?: any[] | null;
15787
+ instances?: {
15788
+ /** The individual to score. */
15789
+ individual: string;
15790
+ /**
15791
+ * Its membership degree in the formula's sort, in `[0, 1]`.
15792
+ * @format double
15793
+ */
15794
+ membership: number;
15795
+ }[] | null;
15359
15796
  /** `"ground"`, `"truth"`, `"value"`, or `"generalisation"`. */
15360
15797
  kind: string;
15361
15798
  /** The neural predicate name (`ground`). */
15362
15799
  predicate?: string | null;
15363
15800
  /** The formula's rules (`truth`, `value`). */
15364
- rules?: any[] | null;
15801
+ rules?: {
15802
+ /**
15803
+ * The rule's initial homoiconic certainty in `[0, 1]` (default `1.0`).
15804
+ * @format double
15805
+ */
15806
+ certainty?: number | null;
15807
+ /** The individual bound to the clause's variable. */
15808
+ individual: string;
15809
+ /**
15810
+ * `individual`'s fuzzy membership degree in `sort`, in `[0, 1]`.
15811
+ * @format double
15812
+ */
15813
+ membership: number;
15814
+ /**
15815
+ * The sort the clause constrains, by name. Minted as a child of the
15816
+ * root sort within this request's self-contained theory. Absent ⇒ the
15817
+ * root sort (`thing`) is used.
15818
+ */
15819
+ sort?: string | null;
15820
+ }[] | null;
15365
15821
  /** The formula's sort, by name (`generalisation`). Absent ⇒ the root sort. */
15366
15822
  sort?: string | null;
15367
15823
  }
15368
15824
  /** The tagged-union query result. The populated fields depend on `kind`. */
15369
15825
  interface LtnQueryResponse$1 {
15370
15826
  /** The per-rule learned certainties (`value`). */
15371
- certainties?: any[] | null;
15827
+ certainties?: number[] | null;
15372
15828
  /** Per-instance truth degrees, in request order (`generalisation`). */
15373
- generalisation?: any[] | null;
15829
+ generalisation?: number[] | null;
15374
15830
  /**
15375
15831
  * The grounded truth degree (`ground`, when not residuated).
15376
15832
  * @format double
@@ -15388,7 +15844,7 @@ interface LtnQueryResponse$1 {
15388
15844
  * the grounding is waiting on (an unembedded individual, an unregistered
15389
15845
  * predicate).
15390
15846
  */
15391
- residuation_triggers?: any[] | null;
15847
+ residuation_triggers?: string[] | null;
15392
15848
  /**
15393
15849
  * The formula's truth degree (`truth`).
15394
15850
  * @format double
@@ -15497,7 +15953,15 @@ interface LtnRefuteResponse$1 {
15497
15953
  * The counter-example certainty assignment over the KB rules
15498
15954
  * (`refuted`).
15499
15955
  */
15500
- witness?: any[] | null;
15956
+ witness?: {
15957
+ /**
15958
+ * The certainty value at the counter-example grounding.
15959
+ * @format double
15960
+ */
15961
+ certainty: number;
15962
+ /** The KB rule's bound individual (echoes the request KB rule). */
15963
+ individual: string;
15964
+ }[] | null;
15501
15965
  }
15502
15966
  /** Request to train rule certainties (and, optionally, a neural predicate). */
15503
15967
  interface LtnTrainRequest$1 {
@@ -16948,7 +17412,7 @@ interface MissingInfoDto$1 {
16948
17412
  /** Request to modify and approve an action */
16949
17413
  interface ModifyActionRequest$1 {
16950
17414
  /** Modified input parameters (will override suggested params) */
16951
- modified_params: Record<string, any>;
17415
+ modified_params: Partial<Record<string, any>>;
16952
17416
  /** Optional notes about the modification */
16953
17417
  notes?: string | null;
16954
17418
  /**
@@ -17207,16 +17671,16 @@ interface NlQueryRequest$1 {
17207
17671
  /** Optional: confirm a TRIZ session (triggers invention pipeline) */
17208
17672
  confirm_session?: boolean | null;
17209
17673
  /** Optional conversation history for context (llm mode only) */
17210
- conversation_history?: any[] | null;
17674
+ conversation_history?: ConversationTurnDto$1[] | null;
17211
17675
  /** Optional: domain names to exclude from results */
17212
- exclude_domains?: any[] | null;
17676
+ exclude_domains?: string[] | null;
17213
17677
  /**
17214
17678
  * Optional: focus on a specific proposal index (0-based) for refinement
17215
17679
  * @min 0
17216
17680
  */
17217
17681
  focus_proposal?: number | null;
17218
17682
  /** Optional images for multimodal TRIZ analysis (base64-encoded) */
17219
- images?: any[] | null;
17683
+ images?: ImageInputDto[] | null;
17220
17684
  /** Translation mode: "llm" (default), "constraint", or "cognitive" */
17221
17685
  mode?: NlQueryMode$1;
17222
17686
  /** The natural language question */
@@ -17274,7 +17738,7 @@ interface NlQueryResponse$1 {
17274
17738
  /** Result item from NL query */
17275
17739
  interface NlQueryResultItem$1 {
17276
17740
  /** Features as key-value pairs */
17277
- features: Record<string, any>;
17741
+ features: Partial<Record<string, any>>;
17278
17742
  /**
17279
17743
  * Term ID
17280
17744
  * @format uuid
@@ -17363,7 +17827,7 @@ interface ObjectTypeListResponse$1 {
17363
17827
  }
17364
17828
  /** Linear objective. Omit to run feasibility-only. */
17365
17829
  interface Objective$1 {
17366
- coefficients?: Record<string, number>;
17830
+ coefficients?: Partial<Record<string, number>>;
17367
17831
  /** @format double */
17368
17832
  constant?: number;
17369
17833
  /** Direction of the objective function. */
@@ -17407,7 +17871,7 @@ interface ObservationalProbabilitiesDto$1 {
17407
17871
  }
17408
17872
  interface ObserveMultiRequest$1 {
17409
17873
  /** Map of variable name to value */
17410
- observations: Record<string, number>;
17874
+ observations: Partial<Record<string, number>>;
17411
17875
  }
17412
17876
  interface ObserveMultiResponse$1 {
17413
17877
  /** Success flag */
@@ -17477,7 +17941,7 @@ interface OcrConfigDto$1 {
17477
17941
  }
17478
17942
  /** Clarification question DTO for the API response. */
17479
17943
  interface OntologyClarificationQuestionDto$1 {
17480
- choices?: any[] | null;
17944
+ choices?: string[] | null;
17481
17945
  default?: string | null;
17482
17946
  field: string;
17483
17947
  id: string;
@@ -17495,7 +17959,7 @@ interface OntologyRagRequestDto {
17495
17959
  * Optional: Map of concept_id → numeric value (e.g., mastery, score, confidence)
17496
17960
  * The interpretation of these values is domain-specific
17497
17961
  */
17498
- concept_values?: object | null;
17962
+ concept_values?: Partial<Record<string, number>> | null;
17499
17963
  /**
17500
17964
  * Feature configuration - allows caller to specify feature names
17501
17965
  * If not provided, uses defaults (requires, teaches, related, etc.)
@@ -18127,7 +18591,7 @@ interface OsfqlRequest$1 {
18127
18591
  /** Response from executing an OSFQL program. */
18128
18592
  interface OsfqlResponse$1 {
18129
18593
  /** Variable bindings from MATCH queries. */
18130
- bindings: Record<string, OsfqlValueDto>[];
18594
+ bindings: Partial<Record<string, OsfqlValueDto>>[];
18131
18595
  /** IDs of newly defined sorts (from DEFINE statements). */
18132
18596
  defined_sort_ids?: string[];
18133
18597
  /** Diagnostic messages from the execution pipeline. */
@@ -18137,7 +18601,7 @@ interface OsfqlResponse$1 {
18137
18601
  * resolved to a nested Ψ-term (`OsfqlValueDto::Term`, coreference inlined). A document IS a
18138
18602
  * Ψ-term — there is no separate document type. Omitted when the program has no `FETCH`.
18139
18603
  */
18140
- fetched?: Record<string, OsfqlValueDto>[];
18604
+ fetched?: Partial<Record<string, OsfqlValueDto>>[];
18141
18605
  /** IDs of produced/modified terms (from INSERT, DERIVE, etc.). */
18142
18606
  produced_term_ids: string[];
18143
18607
  /**
@@ -18228,6 +18692,79 @@ interface OversightAlertDto$1 {
18228
18692
  */
18229
18693
  step_index: number;
18230
18694
  }
18695
+ /** Metadata about a scientific paper (matches SDK's `PaperMetadataDto`). */
18696
+ interface PaperMetadataDto$1 {
18697
+ /** Abstract text. */
18698
+ abstract_text?: string | null;
18699
+ /** arXiv ID. */
18700
+ arxiv_id?: string | null;
18701
+ /** Author names. */
18702
+ authors: string[];
18703
+ /**
18704
+ * Citation count.
18705
+ * @format int32
18706
+ * @min 0
18707
+ */
18708
+ citation_count?: number | null;
18709
+ /** Digital Object Identifier. */
18710
+ doi?: string | null;
18711
+ /** URL to full text. */
18712
+ full_text_url?: string | null;
18713
+ /** Journal or venue name. */
18714
+ journal?: string | null;
18715
+ /**
18716
+ * Stable paper identity (`doi:…`, `pmid:…`, `arxiv:…` or `title:…`).
18717
+ *
18718
+ * The one field on this DTO that is guaranteed present for every paper —
18719
+ * `doi`, `pmid` and `arxiv_id` are each optional. It is the join key
18720
+ * between a paper listed here and the `paper_key` carried by findings,
18721
+ * evidence items and contradiction sides, which is what lets a client
18722
+ * render "this claim comes from that paper" without a second lookup.
18723
+ */
18724
+ paper_key: string;
18725
+ /** PubMed ID. */
18726
+ pmid?: string | null;
18727
+ /** Source database. */
18728
+ source: PaperSource$1;
18729
+ /** Paper title. */
18730
+ title: string;
18731
+ /**
18732
+ * Publication year.
18733
+ * @format int32
18734
+ * @min 0
18735
+ */
18736
+ year?: number | null;
18737
+ }
18738
+ /**
18739
+ * A citable reference to the paper a statement came from.
18740
+ *
18741
+ * Everything the pipeline produces is keyed internally by OSFKB term UUIDs,
18742
+ * which no consumer can resolve back to a document. `PaperRef` is the
18743
+ * human- and machine-resolvable counterpart: `paper_key` is the stable
18744
+ * identity produced by `PaperMetadata::paper_key`, and `doi`/`title` are
18745
+ * carried alongside so a reader never has to make a second lookup to render
18746
+ * the citation.
18747
+ */
18748
+ interface PaperRef {
18749
+ /** DOI of the paper, when it has one. */
18750
+ doi?: string | null;
18751
+ /** Stable paper identity (`doi:…`, `pmid:…`, `arxiv:…` or `title:…`). */
18752
+ paper_key: string;
18753
+ /** Paper title, for display. */
18754
+ title: string;
18755
+ }
18756
+ /** A search result with relevance score (matches SDK's `PaperSearchResultDto`). */
18757
+ interface PaperSearchResultDto$1 {
18758
+ /** Paper metadata. */
18759
+ metadata: PaperMetadataDto$1;
18760
+ /**
18761
+ * Relevance score (0.0-1.0).
18762
+ * @format double
18763
+ */
18764
+ relevance_score?: number | null;
18765
+ }
18766
+ /** Source of paper metadata. */
18767
+ type PaperSource$1 = "PubMed" | "SemanticScholar" | "CrossRef" | "ArXiv";
18231
18768
  /** A typed action parameter (named feature with an appropriateness type). */
18232
18769
  interface ParamSpecDto {
18233
18770
  /** Feature name. */
@@ -18310,7 +18847,7 @@ interface PathResponse$1 {
18310
18847
  */
18311
18848
  component_count: number;
18312
18849
  /** The shortest path as a node sequence (source..=target), if reachable. */
18313
- path?: any[] | null;
18850
+ path?: string[] | null;
18314
18851
  }
18315
18852
  /** Pattern for matching function arguments */
18316
18853
  type PatternDto$1 = {
@@ -18403,14 +18940,14 @@ interface PendingActionReviewDto$1 {
18403
18940
  /** Current status */
18404
18941
  status: ActionReviewStatusDto$1;
18405
18942
  /** Suggested input parameters for the action */
18406
- suggested_params: Record<string, any>;
18943
+ suggested_params: Partial<Record<string, any>>;
18407
18944
  }
18408
18945
  /** Summary of a pending invocation. */
18409
18946
  interface PendingInvocationDto$1 {
18410
18947
  /** Action name */
18411
18948
  action_name: string;
18412
18949
  /** Input values */
18413
- inputs: Record<string, any>;
18950
+ inputs: Partial<Record<string, any>>;
18414
18951
  /** Invocation ID */
18415
18952
  invocation_id: string;
18416
18953
  /** When invoked (ISO 8601) */
@@ -18443,7 +18980,7 @@ interface PendingReviewEntityDto {
18443
18980
  /** Candidate matches for deduplication */
18444
18981
  candidates: ReviewCandidateMatchDto$1[];
18445
18982
  /** Character interval in source text where entity was found (start, end) */
18446
- char_interval?: any[] | null;
18983
+ char_interval?: number[] | null;
18447
18984
  /**
18448
18985
  * Extraction confidence score (0.0 - 1.0)
18449
18986
  * @format double
@@ -18454,7 +18991,7 @@ interface PendingReviewEntityDto {
18454
18991
  /** Entity local ID (from extraction) */
18455
18992
  entity_id: string;
18456
18993
  /** Extracted features as key-value pairs */
18457
- features: Record<string, any>;
18994
+ features: Partial<Record<string, any>>;
18458
18995
  /** Why this entity needs review */
18459
18996
  reason: ReviewReason$1;
18460
18997
  /**
@@ -18812,7 +19349,7 @@ interface PredictEffectResponse$1 {
18812
19349
  * ALL effects as FuzzyNumbers (multi-parameter drug design)
18813
19350
  * Keys: effect_potency, effect_lipophilicity, effect_metabolic_stability, etc.
18814
19351
  */
18815
- all_effects?: Record<string, EffectDto$1>;
19352
+ all_effects?: Partial<Record<string, EffectDto$1>>;
18816
19353
  /**
18817
19354
  * Combined confidence/degree from Bayesian merging
18818
19355
  * @format double
@@ -18842,7 +19379,7 @@ interface PredictEffectResponse$1 {
18842
19379
  /** Request to predict effect for a query point. */
18843
19380
  interface PredictFromDiscoveryRequest$1 {
18844
19381
  /** Current feature values. */
18845
- current_values: Record<string, number>;
19382
+ current_values: Partial<Record<string, number>>;
18846
19383
  /**
18847
19384
  * The root sort ID from discovery.
18848
19385
  * @format uuid
@@ -18867,7 +19404,7 @@ interface PredictFromDiscoveryResponse$1 {
18867
19404
  */
18868
19405
  avg_similarity: number;
18869
19406
  /** Predicted effects by horizon. */
18870
- predictions: Record<string, EffectPredictionDto$1>;
19407
+ predictions: Partial<Record<string, EffectPredictionDto$1>>;
18871
19408
  /**
18872
19409
  * Query time in milliseconds.
18873
19410
  * @min 0
@@ -19211,7 +19748,7 @@ interface PropertyGraphErrorResponse$1 {
19211
19748
  /** Execution response for a GQL/Cypher/Gremlin query after lowering to OSFQL. */
19212
19749
  interface PropertyGraphExecuteResponse$1 {
19213
19750
  /** Variable bindings returned by OSFQL `MATCH`. */
19214
- bindings: Record<string, OsfqlValueDto>[];
19751
+ bindings: Partial<Record<string, OsfqlValueDto>>[];
19215
19752
  /** Sort ids produced by `DEFINE`; normally empty for property-graph compatibility. */
19216
19753
  defined_sort_ids: string[];
19217
19754
  /** Diagnostics emitted by the OSFQL executor. */
@@ -19262,6 +19799,17 @@ interface ProvenanceDto {
19262
19799
  */
19263
19800
  source_fact_id: string;
19264
19801
  }
19802
+ /** A step in the provenance chain linking a finding to its sources. */
19803
+ interface ProvenanceStep {
19804
+ /** Description of what happened at this step. */
19805
+ description: string;
19806
+ /** OSFKB entity ID involved in this step. */
19807
+ entity_id?: string | null;
19808
+ /** Type of step: "extraction", "inference", "assessment". */
19809
+ step_type: string;
19810
+ /** Timestamp of this step (ISO 8601). */
19811
+ timestamp?: string | null;
19812
+ }
19265
19813
  /**
19266
19814
  * Provenance tag for a derived fact from tagged forward chaining.
19267
19815
  * Maps a derived fact (by index) to its probabilistic confidence score.
@@ -19352,7 +19900,7 @@ interface PsiTermDto$1 {
19352
19900
  * - constraint.sort: `{var: Uuid, sort_id: Uuid}`
19353
19901
  * - variable: `{_name?: String}`
19354
19902
  */
19355
- features: Record<string, FeatureValueDto$1>;
19903
+ features: Partial<Record<string, FeatureValueDto$1>>;
19356
19904
  /**
19357
19905
  * Sort ID (for programmatic use)
19358
19906
  * @format uuid
@@ -19454,7 +20002,7 @@ type QueryTerm$1 = {
19454
20002
  term_id: string;
19455
20003
  type: "by_id";
19456
20004
  } | {
19457
- features: Record<string, ValueDto$1>;
20005
+ features: Partial<Record<string, ValueDto$1>>;
19458
20006
  /** @format uuid */
19459
20007
  sort_id: string;
19460
20008
  type: "inline";
@@ -19536,7 +20084,7 @@ interface ReExtractRequest$1 {
19536
20084
  /** Use different extraction strategy */
19537
20085
  extraction_strategy?: string | null;
19538
20086
  /** Focus on specific sorts */
19539
- focus_sorts?: any[] | null;
20087
+ focus_sorts?: string[] | null;
19540
20088
  /** Specific prompt/instructions for extraction */
19541
20089
  instructions?: string | null;
19542
20090
  /**
@@ -19886,7 +20434,7 @@ interface RegisterExternalActionRequest$1 {
19886
20434
  /** Unique name for this action (becomes the sort name) */
19887
20435
  name: string;
19888
20436
  /** Optional input features with default values */
19889
- optional_inputs?: Record<string, any>;
20437
+ optional_inputs?: Partial<Record<string, any>>;
19890
20438
  /** Output feature names (bound after callback) */
19891
20439
  outputs?: string[];
19892
20440
  /** Required input feature names */
@@ -20168,6 +20716,22 @@ interface RepairHintDto {
20168
20716
  /** The feature or predicate the hint applies to. */
20169
20717
  target: string;
20170
20718
  }
20719
+ /** Oversight verification result for the report. */
20720
+ interface ReportVerification {
20721
+ /**
20722
+ * Computation time in milliseconds.
20723
+ * @format int64
20724
+ * @min 0
20725
+ */
20726
+ computation_time_ms: number;
20727
+ /**
20728
+ * Overall verification score (0.0-1.0).
20729
+ * @format double
20730
+ */
20731
+ score: number;
20732
+ /** Overall verdict: "safe", "unsafe", "undetermined". */
20733
+ verdict: string;
20734
+ }
20171
20735
  /** Request to reprocess failed documents */
20172
20736
  interface ReprocessFailedRequest {
20173
20737
  /**
@@ -20189,10 +20753,320 @@ interface ReprocessFailedResponse {
20189
20753
  /** @min 0 */
20190
20754
  requeued_count: number;
20191
20755
  }
20756
+ /** Response with contradictions. */
20757
+ interface ResearchContradictionsResponse$1 {
20758
+ /** All detected contradictions. */
20759
+ contradictions: Contradiction[];
20760
+ /**
20761
+ * Session ID.
20762
+ * @format uuid
20763
+ */
20764
+ session_id: string;
20765
+ /**
20766
+ * Total number of contradictions.
20767
+ * @min 0
20768
+ */
20769
+ total: number;
20770
+ }
20771
+ /** Results from a single research cycle (matches SDK's `ResearchCycleResultDto`). */
20772
+ interface ResearchCycleResultDto$1 {
20773
+ /**
20774
+ * Claims merged via entailment detection.
20775
+ * @min 0
20776
+ */
20777
+ claims_merged?: number;
20778
+ /**
20779
+ * Claims verified.
20780
+ * @min 0
20781
+ */
20782
+ claims_verified: number;
20783
+ /**
20784
+ * Contradictions detected.
20785
+ * @min 0
20786
+ */
20787
+ contradictions_detected: number;
20788
+ /**
20789
+ * Contradictions resolved via evidence comparison.
20790
+ * @min 0
20791
+ */
20792
+ contradictions_resolved?: number;
20793
+ /**
20794
+ * Cycle number (1-indexed).
20795
+ * @format int32
20796
+ * @min 0
20797
+ */
20798
+ cycle_number: number;
20799
+ /**
20800
+ * Knowledge gaps detected at start of cycle.
20801
+ * @min 0
20802
+ */
20803
+ gaps_detected: number;
20804
+ /**
20805
+ * Gaps resolved during this cycle.
20806
+ * @min 0
20807
+ */
20808
+ gaps_resolved: number;
20809
+ /**
20810
+ * Papers successfully ingested.
20811
+ * @min 0
20812
+ */
20813
+ papers_ingested: number;
20814
+ /**
20815
+ * Papers retrieved from external APIs.
20816
+ * @min 0
20817
+ */
20818
+ papers_retrieved: number;
20819
+ /**
20820
+ * Processing time for this cycle in milliseconds.
20821
+ * @format int64
20822
+ * @min 0
20823
+ */
20824
+ processing_time_ms: number;
20825
+ /** Search queries used. */
20826
+ search_queries: string[];
20827
+ }
20828
+ /**
20829
+ * Error response body.
20830
+ *
20831
+ * Registered in the workspace OpenAPI document as `ResearchErrorResponse`.
20832
+ * `osfkb-api` already publishes a component named `ErrorResponse`, and
20833
+ * `utoipa`'s merge takes only what the target does not already have — an
20834
+ * unrenamed component here would be dropped silently and every research error
20835
+ * response would `$ref` the api crate's type instead. The two happen to have
20836
+ * the same shape today; nothing keeps them that way.
20837
+ */
20838
+ interface ResearchErrorResponse {
20839
+ /** Error message. */
20840
+ error: string;
20841
+ }
20842
+ /** A verified research finding. */
20843
+ interface ResearchFinding {
20844
+ /** OSFKB term ID of the claim. */
20845
+ claim_id: string;
20846
+ /** Evidence items contradicting the claim. */
20847
+ contradicting_evidence: EvidenceItemSummary[];
20848
+ /** Assessment label ("Strongly Supported", "Contradicted", etc.). */
20849
+ label: string;
20850
+ /** Full provenance chain from source to finding. */
20851
+ provenance_chain: ProvenanceStep[];
20852
+ /** Whether the assessment was residuated (suspended due to insufficient evidence). */
20853
+ residuated: boolean;
20854
+ /** Specific features that are residuated, enabling targeted gap filling. */
20855
+ residuated_features?: ResiduatedFeature[];
20856
+ /** Reason for residuation if applicable. */
20857
+ residuation_reason?: string | null;
20858
+ /**
20859
+ * Papers the claim was extracted from.
20860
+ *
20861
+ * `claim_id` is an OSFKB term UUID and is not resolvable by a consumer;
20862
+ * this is what makes the finding citable. Resolved by walking the claim's
20863
+ * term id through the session's paper→term links, so a claim drawn from
20864
+ * several papers carries several refs, in link order.
20865
+ * Defaulted so sessions persisted before attribution existed still load.
20866
+ */
20867
+ sources?: PaperRef[];
20868
+ /** The claim statement. */
20869
+ statement: string;
20870
+ /** Evidence items supporting the claim. */
20871
+ supporting_evidence: EvidenceItemSummary[];
20872
+ /**
20873
+ * Evidence assessment truthfulness score (0.0-1.0).
20874
+ * @format double
20875
+ */
20876
+ truthfulness: number;
20877
+ }
20878
+ /** Response with research findings. */
20879
+ interface ResearchFindingsResponse$1 {
20880
+ /** All verified findings. */
20881
+ findings: ResearchFinding[];
20882
+ /**
20883
+ * Session ID.
20884
+ * @format uuid
20885
+ */
20886
+ session_id: string;
20887
+ /**
20888
+ * Total number of findings.
20889
+ * @min 0
20890
+ */
20891
+ total: number;
20892
+ }
20893
+ /** Response with knowledge gaps. */
20894
+ interface ResearchGapsResponse$1 {
20895
+ /** All detected knowledge gaps. */
20896
+ gaps: KnowledgeGap[];
20897
+ /**
20898
+ * Session ID.
20899
+ * @format uuid
20900
+ */
20901
+ session_id: string;
20902
+ /**
20903
+ * Total number of gaps.
20904
+ * @min 0
20905
+ */
20906
+ total: number;
20907
+ }
20908
+ /** Response with the research report (matches SDK's `ResearchReportResponse`). */
20909
+ interface ResearchReportResponse$1 {
20910
+ /** Detected contradictions. */
20911
+ contradictions: Contradiction[];
20912
+ /** Findings with provenance. */
20913
+ findings: ResearchFinding[];
20914
+ /** Generated report content (markdown). */
20915
+ generated_content?: string | null;
20916
+ /** Unresolved knowledge gaps. */
20917
+ knowledge_gaps: KnowledgeGap[];
20918
+ /** The research question. */
20919
+ question: string;
20920
+ /**
20921
+ * Session ID.
20922
+ * @format uuid
20923
+ */
20924
+ session_id: string;
20925
+ /** Research statistics. */
20926
+ statistics: ResearchStatisticsDto$1;
20927
+ /** Executive summary. */
20928
+ summary: string;
20929
+ /** Oversight verification result. */
20930
+ verification?: null | ReportVerification;
20931
+ }
20932
+ /**
20933
+ * The wire spelling of a session's status: the phase name alone, without the
20934
+ * payload [`ResearchSessionStatus::Failed`] carries.
20935
+ *
20936
+ * The domain status is an externally-tagged enum with data on one variant, so
20937
+ * it serializes as `{"Failed":{"error":"…"}}` — a shape no consumer wants on a
20938
+ * field named `status`, and one that changes shape between variants. This is
20939
+ * the flat projection the API has always sent (`"Created"`, `"Failed"`, …);
20940
+ * a `Failed` session's message travels separately, in
20941
+ * [`GetSessionResponse::error`].
20942
+ *
20943
+ * **It is a type, not a `String`, so that it reaches the OpenAPI document as a
20944
+ * closed enum.** As a `String` the spec said "any string", and every generated
20945
+ * client had to hand-maintain the list of eight — a list with nothing checking
20946
+ * it against this match. The TypeScript SDK's `ResearchSessionStatusDto` union
20947
+ * is now generated from this declaration, so adding a variant here propagates
20948
+ * instead of drifting (#144).
20949
+ */
20950
+ type ResearchSessionStatusLabel = "Created" | "Bootstrapping" | "Retrieving" | "Ingesting" | "Verifying" | "Reporting" | "Completed" | "Failed";
20951
+ /** One row in the session list (GET /research/sessions). */
20952
+ interface ResearchSessionSummaryDto$1 {
20953
+ /** When the session was created (ISO 8601). */
20954
+ created_at: string;
20955
+ /** The research question. */
20956
+ question: string;
20957
+ /**
20958
+ * Session ID.
20959
+ * @format uuid
20960
+ */
20961
+ session_id: string;
20962
+ /**
20963
+ * Current session status — the phase name alone; see
20964
+ * [`ResearchSessionStatusLabel`].
20965
+ */
20966
+ status: ResearchSessionStatusLabel;
20967
+ /**
20968
+ * Total contradictions.
20969
+ * @min 0
20970
+ */
20971
+ total_contradictions: number;
20972
+ /**
20973
+ * Total findings.
20974
+ * @min 0
20975
+ */
20976
+ total_findings: number;
20977
+ /**
20978
+ * Total knowledge gaps.
20979
+ * @min 0
20980
+ */
20981
+ total_gaps: number;
20982
+ /**
20983
+ * Total papers ingested.
20984
+ * @min 0
20985
+ */
20986
+ total_papers_ingested: number;
20987
+ /**
20988
+ * Total papers retrieved from external APIs, including by the cycle
20989
+ * currently running — the list view's half of the same live progress
20990
+ * [`GetSessionResponse::total_papers_retrieved`] carries.
20991
+ * @min 0
20992
+ */
20993
+ total_papers_retrieved: number;
20994
+ /** When the session was last updated (ISO 8601). */
20995
+ updated_at: string;
20996
+ }
20997
+ /** Statistics DTO for API responses (matches SDK's `ResearchStatisticsDto`). */
20998
+ interface ResearchStatisticsDto$1 {
20999
+ /**
21000
+ * Claims merged via entailment detection.
21001
+ * @format int32
21002
+ * @min 0
21003
+ */
21004
+ claims_merged?: number;
21005
+ /**
21006
+ * Contradictions resolved via evidence comparison.
21007
+ * @format int32
21008
+ * @min 0
21009
+ */
21010
+ contradictions_resolved?: number;
21011
+ /**
21012
+ * Knowledge gaps remaining.
21013
+ * @format int32
21014
+ * @min 0
21015
+ */
21016
+ gaps_remaining: number;
21017
+ /**
21018
+ * Knowledge gaps resolved.
21019
+ * @format int32
21020
+ * @min 0
21021
+ */
21022
+ gaps_resolved: number;
21023
+ /**
21024
+ * Total claims extracted.
21025
+ * @format int32
21026
+ * @min 0
21027
+ */
21028
+ total_claims_extracted: number;
21029
+ /**
21030
+ * Total claims verified.
21031
+ * @format int32
21032
+ * @min 0
21033
+ */
21034
+ total_claims_verified: number;
21035
+ /**
21036
+ * Total contradictions detected.
21037
+ * @format int32
21038
+ * @min 0
21039
+ */
21040
+ total_contradictions: number;
21041
+ /**
21042
+ * Total number of research cycles.
21043
+ * @format int32
21044
+ * @min 0
21045
+ */
21046
+ total_cycles: number;
21047
+ /**
21048
+ * Total papers successfully ingested.
21049
+ * @format int32
21050
+ * @min 0
21051
+ */
21052
+ total_papers_ingested: number;
21053
+ /**
21054
+ * Total papers retrieved from external APIs.
21055
+ * @format int32
21056
+ * @min 0
21057
+ */
21058
+ total_papers_retrieved: number;
21059
+ /**
21060
+ * Total processing time in milliseconds.
21061
+ * @format int64
21062
+ * @min 0
21063
+ */
21064
+ total_processing_time_ms: number;
21065
+ }
20192
21066
  /** Residuated witness waiting for information */
20193
21067
  interface ResidualWitnessDto$1 {
20194
21068
  /** Partial bindings found so far */
20195
- partial_bindings: Record<string, string>;
21069
+ partial_bindings: Partial<Record<string, string>>;
20196
21070
  /** What would trigger re-evaluation */
20197
21071
  trigger: string;
20198
21072
  /** ID of the witness that couldn't be satisfied yet */
@@ -20229,6 +21103,24 @@ interface ResiduatedEntry {
20229
21103
  /** What would resolve this: "Provide a fact with sort <name>" */
20230
21104
  wake_trigger: string;
20231
21105
  }
21106
+ /**
21107
+ * A feature that is residuated (suspended due to missing data).
21108
+ *
21109
+ * Tracks per-feature residuation rather than binary residuation at the claim level.
21110
+ * Each residuated feature represents a specific piece of missing information that,
21111
+ * if resolved, would strengthen or change the claim assessment.
21112
+ */
21113
+ interface ResiduatedFeature {
21114
+ /** Feature name that is missing or incomplete. */
21115
+ feature_name: string;
21116
+ /**
21117
+ * Information gain from resolving this feature (0.0-1.0).
21118
+ * @format double
21119
+ */
21120
+ info_gain: number;
21121
+ /** What sort/type would satisfy this feature. */
21122
+ needed_sort?: string | null;
21123
+ }
20232
21124
  /** A residuated term */
20233
21125
  interface ResiduatedTermDto$1 {
20234
21126
  /**
@@ -20264,7 +21156,7 @@ interface ResiduationDetailDto$1 {
20264
21156
  /** A residuation (witness that couldn't be satisfied yet) */
20265
21157
  interface ResiduationDto$1 {
20266
21158
  /** Partial bindings found so far */
20267
- partial_bindings: Record<string, string>;
21159
+ partial_bindings: Partial<Record<string, string>>;
20268
21160
  /** What would trigger re-evaluation */
20269
21161
  trigger: string;
20270
21162
  /** ID of the witness that residuated */
@@ -20360,6 +21252,8 @@ interface ResiduationStats$1 {
20360
21252
  */
20361
21253
  total: number;
20362
21254
  }
21255
+ /** Strategy used to resolve a contradiction between two claims. */
21256
+ type ResolutionStrategy = "EvidenceStrength" | "EvidenceCount" | "Unresolvable";
20363
21257
  /** Request to resolve a qualified name */
20364
21258
  interface ResolveSymbolRequest$1 {
20365
21259
  /** Qualified name (e.g., "module#symbol" or just "symbol") */
@@ -20591,7 +21485,7 @@ interface ReviewCandidateMatchDto$1 {
20591
21485
  /** Display name for the candidate */
20592
21486
  display_name: string;
20593
21487
  /** Key features for comparison */
20594
- features: Record<string, any>;
21488
+ features: Partial<Record<string, any>>;
20595
21489
  /**
20596
21490
  * Similarity score (0.0 - 1.0)
20597
21491
  * @format double
@@ -20612,9 +21506,9 @@ type ReviewStatus = "pending" | "approved" | "rejected" | "corrected" | "merged"
20612
21506
  /** Summary statistics for pending reviews */
20613
21507
  interface ReviewSummaryDto {
20614
21508
  /** Breakdown by reason */
20615
- by_reason: Record<string, number>;
21509
+ by_reason: Partial<Record<string, number>>;
20616
21510
  /** Breakdown by sort */
20617
- by_sort: Record<string, number>;
21511
+ by_sort: Partial<Record<string, number>>;
20618
21512
  /**
20619
21513
  * Entities with high confidence (>0.8)
20620
21514
  * @min 0
@@ -20637,7 +21531,7 @@ interface ReviewSummaryDto {
20637
21531
  */
20638
21532
  interface RewardScoreRequest$1 {
20639
21533
  /** Feature → value constraints, as `[["maker","Tesla"], ...]`. Optional. */
20640
- constraints?: any[][];
21534
+ constraints?: [string, string][];
20641
21535
  /**
20642
21536
  * Bounded sample size used the first time this tenant's model is mined. Optional.
20643
21537
  * @min 0
@@ -20915,7 +21809,7 @@ interface RlTrainResponse$1 {
20915
21809
  /** Contrastive losses from encoder training (empty if no encoder) */
20916
21810
  contrastive_losses?: number[];
20917
21811
  /** Conversation-specific metrics when training on conversation environment */
20918
- conversation_decisions?: Record<string, number>;
21812
+ conversation_decisions?: Partial<Record<string, number>>;
20919
21813
  /**
20920
21814
  * Auto-curriculum adjustments
20921
21815
  * @min 0
@@ -20953,14 +21847,14 @@ interface RlTrainResponse$1 {
20953
21847
  */
20954
21848
  expert_avg_entropy?: number;
20955
21849
  /** Average expert weights (empty map if gating disabled) */
20956
- expert_avg_weights?: Record<string, number>;
21850
+ expert_avg_weights?: Partial<Record<string, number>>;
20957
21851
  /**
20958
21852
  * Expert collapse recoveries count
20959
21853
  * @min 0
20960
21854
  */
20961
21855
  expert_collapse_recoveries?: number;
20962
21856
  /** Final expert weights at end of training */
20963
- expert_final_weights?: Record<string, number>;
21857
+ expert_final_weights?: Partial<Record<string, number>>;
20964
21858
  /**
20965
21859
  * Final contrastive temperature after feedback adaptation
20966
21860
  * @format float
@@ -20982,14 +21876,14 @@ interface RlTrainResponse$1 {
20982
21876
  */
20983
21877
  imagination_transitions?: number;
20984
21878
  /** Mode distribution (how often each cognitive mode was selected) */
20985
- mode_distribution?: Record<string, number>;
21879
+ mode_distribution?: Partial<Record<string, number>>;
20986
21880
  /**
20987
21881
  * Number of peer demonstrations consumed from self-play trajectory exchange
20988
21882
  * @min 0
20989
21883
  */
20990
21884
  peer_demonstrations_consumed?: number;
20991
21885
  /** Plasticity phase transitions observed (episode, phase) */
20992
- plasticity_phase_transitions?: any[][];
21886
+ plasticity_phase_transitions?: [number, number][];
20993
21887
  /**
20994
21888
  * Number of reactive decisions from deliberation scaling
20995
21889
  * @min 0
@@ -21126,7 +22020,7 @@ interface RowIntegrateResponse$1 {
21126
22020
  /** A matched entity from row search */
21127
22021
  interface RowMatchDto$1 {
21128
22022
  /** All features of the entity */
21129
- features: Record<string, any>;
22023
+ features: Partial<Record<string, any>>;
21130
22024
  /**
21131
22025
  * Entity ID
21132
22026
  * @format uuid
@@ -21440,6 +22334,23 @@ interface RunIntegratedCycleResponse$1 {
21440
22334
  /** Outcome of the integrated cycle */
21441
22335
  outcome: IntegratedCycleOutcomeDto$1;
21442
22336
  }
22337
+ /** Response from running a research cycle (matches SDK's `ResearchCycleResponse`). */
22338
+ interface RunResearchCycleResponse {
22339
+ /** Whether the session has converged (no more cycles needed). */
22340
+ converged: boolean;
22341
+ /** Results from this cycle. */
22342
+ cycle: ResearchCycleResultDto$1;
22343
+ /**
22344
+ * Session ID.
22345
+ * @format uuid
22346
+ */
22347
+ session_id: string;
22348
+ /**
22349
+ * Current session status — the phase name alone; see
22350
+ * [`ResearchSessionStatusLabel`].
22351
+ */
22352
+ status: ResearchSessionStatusLabel;
22353
+ }
21443
22354
  /** Aggregated Safe Harbor result across the record batch. */
21444
22355
  interface SafeHarborSummary$1 {
21445
22356
  /**
@@ -21512,7 +22423,7 @@ interface SatSolveResponse$1 {
21512
22423
  * When `result` is `"satisfiable"`: the Boolean assignment for each variable
21513
22424
  * (index 0 = `model[0]`, etc.). Absent otherwise.
21514
22425
  */
21515
- model?: any[] | null;
22426
+ model?: boolean[] | null;
21516
22427
  /** Satisfiability verdict. */
21517
22428
  result: SatVerdict$1;
21518
22429
  /** Solver statistics (decisions, conflicts, propagations, restarts). */
@@ -21691,11 +22602,11 @@ interface ScmCounterfactualRequest$1 {
21691
22602
  /** Deterministic structural assignments */
21692
22603
  assignments: StructuralAssignmentDto$1[];
21693
22604
  /** The FACTUAL evidence (what was actually observed) */
21694
- evidence: Record<string, number>;
22605
+ evidence: Partial<Record<string, number>>;
21695
22606
  /** Exogenous noise variables with their distributions */
21696
22607
  exogenous: ExogenousNoiseDto$1[];
21697
22608
  /** The hypothetical interventions do(V = v) */
21698
- interventions: Record<string, number>;
22609
+ interventions: Partial<Record<string, number>>;
21699
22610
  /** The variable whose counterfactual distribution is queried */
21700
22611
  query: string;
21701
22612
  }
@@ -21785,6 +22696,28 @@ interface SearchCommunitiesResponse$1 {
21785
22696
  * that do not send a `mode` field.
21786
22697
  */
21787
22698
  type SearchModeDto$1 = "solutions" | "feasibility";
22699
+ /** Request to search for papers. */
22700
+ interface SearchPapersRequest$1 {
22701
+ /**
22702
+ * Maximum number of results.
22703
+ * @min 0
22704
+ */
22705
+ max_results?: number | null;
22706
+ /** Search query string. */
22707
+ query: string;
22708
+ /** Restrict to specific sources (e.g., ["PubMed", "SemanticScholar"]). */
22709
+ sources?: string[] | null;
22710
+ }
22711
+ /** Response from paper search (matches SDK's `SearchPapersResponse`). */
22712
+ interface SearchPapersResponse$1 {
22713
+ /** Search results. */
22714
+ results: PaperSearchResultDto$1[];
22715
+ /**
22716
+ * Total results found (may exceed returned count).
22717
+ * @min 0
22718
+ */
22719
+ total_found: number;
22720
+ }
21788
22721
  /** Request to search for solutions */
21789
22722
  interface SearchRequest {
21790
22723
  /**
@@ -21840,7 +22773,7 @@ type SearchResponse = {
21840
22773
  * Per-variable feasibility. Key is the variable name as registered
21841
22774
  * in the space's choice points.
21842
22775
  */
21843
- variables: Record<string, VariableFeasibilityDto$1>;
22776
+ variables: Partial<Record<string, VariableFeasibilityDto$1>>;
21844
22777
  };
21845
22778
  /**
21846
22779
  * PG-direct name search across the tenant's sorts. Used by the
@@ -22046,7 +22979,7 @@ interface SessionStatusResponse {
22046
22979
  */
22047
22980
  interface SetActionReviewConfigRequest$1 {
22048
22981
  /** Action sorts that always require approval */
22049
- always_require_approval?: any[] | null;
22982
+ always_require_approval?: string[] | null;
22050
22983
  /**
22051
22984
  * Default timeout for reviews, in seconds
22052
22985
  * @format int64
@@ -22066,7 +22999,7 @@ interface SetActionReviewConfigRequest$1 {
22066
22999
  */
22067
23000
  max_pending_reviews?: number | null;
22068
23001
  /** Action sorts that never require approval (override) */
22069
- never_require_approval?: any[] | null;
23002
+ never_require_approval?: string[] | null;
22070
23003
  }
22071
23004
  /** Response after applying the action-review configuration. */
22072
23005
  interface SetActionReviewConfigResponse$1 {
@@ -22196,7 +23129,7 @@ interface ShiftDemandInput {
22196
23129
  * by any eligible agent. Role names must match tags used in
22197
23130
  * [`AgentInput::roles`].
22198
23131
  */
22199
- role_minimums?: Record<string, number>;
23132
+ role_minimums?: Partial<Record<string, number>>;
22200
23133
  /** @min 0 */
22201
23134
  shift: number;
22202
23135
  /**
@@ -22426,7 +23359,7 @@ interface SmtCheckResponse$1 {
22426
23359
  *
22427
23360
  * `true` → this equality holds in the model; `false` → it does not hold.
22428
23361
  */
22429
- assignments?: object | null;
23362
+ assignments?: Partial<Record<number, boolean>> | null;
22430
23363
  /** Satisfiability verdict. */
22431
23364
  result: SmtVerdict$1;
22432
23365
  /** Reason string for `"unknown"` results. Absent otherwise. */
@@ -22546,11 +23479,11 @@ type SolutionStatus$1 = "optimal" | "feasible" | "infeasible" | "unbounded" | "u
22546
23479
  /** Request to solve a constraint problem */
22547
23480
  interface SolveConstraintRequest$1 {
22548
23481
  constraints: ArithmeticConstraintDto$1[];
22549
- initial_bindings?: object | null;
23482
+ initial_bindings?: Partial<Record<string, number>> | null;
22550
23483
  }
22551
23484
  /** Response from solving a constraint problem */
22552
23485
  interface SolveConstraintResponse$1 {
22553
- bindings: Record<string, number>;
23486
+ bindings: Partial<Record<string, number>>;
22554
23487
  message?: string | null;
22555
23488
  success: boolean;
22556
23489
  suspended_constraints: string[];
@@ -22568,7 +23501,7 @@ interface SolveFlowNetworkResponse$1 {
22568
23501
  /** Echo of the algorithm dispatched. */
22569
23502
  algorithm: FlowAlgorithmDto;
22570
23503
  /** Per-edge classification (classify_* algorithms only). */
22571
- classifications?: any[] | null;
23504
+ classifications?: EdgeClassificationDto[] | null;
22572
23505
  /** Per-edge flow snapshot. */
22573
23506
  edge_flows: EdgeFlowDto[];
22574
23507
  /** Min-cut partition (min_cut algorithm only). */
@@ -22624,7 +23557,7 @@ interface SolveProblemResponse$1 {
22624
23557
  /** Status reported by the solver. */
22625
23558
  status: SolutionStatus$1;
22626
23559
  /** Variable-name → optimal value. Empty for infeasible/unbounded. */
22627
- values: Record<string, number>;
23560
+ values: Partial<Record<string, number>>;
22628
23561
  }
22629
23562
  /**
22630
23563
  * Response body for `GET /api/v1/solver/health`. Typed so the OpenAPI
@@ -22710,9 +23643,9 @@ interface SortBoxResponse$1 {
22710
23643
  */
22711
23644
  log_volume?: number | null;
22712
23645
  /** Maximum coordinates of the box. */
22713
- max_coords?: any[] | null;
23646
+ max_coords?: number[] | null;
22714
23647
  /** Minimum coordinates of the box. */
22715
- min_coords?: any[] | null;
23648
+ min_coords?: number[] | null;
22716
23649
  /** The sort name that was looked up. */
22717
23650
  sort_name: string;
22718
23651
  }
@@ -22729,7 +23662,7 @@ interface SortCalibrationDto$1 {
22729
23662
  */
22730
23663
  ece: number;
22731
23664
  /** Feature-level ECE (if computed). */
22732
- feature_ece: Record<string, number>;
23665
+ feature_ece: Partial<Record<string, number>>;
22733
23666
  /** Whether the sort is overconfident. */
22734
23667
  is_overconfident: boolean;
22735
23668
  /** Whether the sort is underconfident. */
@@ -22848,7 +23781,7 @@ interface SortDiscoveryResponseDto {
22848
23781
  */
22849
23782
  concepts_matching_existing: number;
22850
23783
  /** Fuzzy concept levels (only present when fuzzy_thresholds was non-empty) */
22851
- fuzzy_levels?: any[] | null;
23784
+ fuzzy_levels?: FuzzyConceptLevelDto[] | null;
22852
23785
  /**
22853
23786
  * Novel concepts discovered (potential new sorts)
22854
23787
  * @min 0
@@ -22879,7 +23812,7 @@ interface SortDiscoveryResponseDto {
22879
23812
  /** API representation of a sort with full OSF schema */
22880
23813
  interface SortDto$1 {
22881
23814
  /** Custom OWL annotations (e.g., icon, color) */
22882
- annotations?: Record<string, string>;
23815
+ annotations?: Partial<Record<string, string>>;
22883
23816
  /** Bound constraints on feature values */
22884
23817
  bound_constraints?: BoundConstraintDto$1[];
22885
23818
  /** Human-readable description for semantic search */
@@ -23533,7 +24466,7 @@ interface SpaceSolutionDto$1 {
23533
24466
  /** The choices made at each choice point */
23534
24467
  choices: ChoiceSelection$1[];
23535
24468
  /** Trace events (e.g., LIFE feature creation) */
23536
- events?: any[] | null;
24469
+ events?: TraceEventDto$1[] | null;
23537
24470
  /** ID of the space containing this solution */
23538
24471
  space_id: string;
23539
24472
  /** Status (should be Succeeded) */
@@ -24041,8 +24974,8 @@ interface SummaryResponse$1 {
24041
24974
  * @min 0
24042
24975
  */
24043
24976
  n_records: number;
24044
- per_actor: Record<string, number>;
24045
- per_request_path: Record<string, number>;
24977
+ per_actor: Partial<Record<string, number>>;
24978
+ per_request_path: Partial<Record<string, number>>;
24046
24979
  tenant_id: string;
24047
24980
  ts_first?: string | null;
24048
24981
  ts_last?: string | null;
@@ -24498,7 +25431,7 @@ interface TemporalPlanRequest$1 {
24498
25431
  * Optional fields that must have unique values across selections (e.g., ["cuisine"])
24499
25432
  * When None or empty, allows same term to be selected multiple times
24500
25433
  */
24501
- no_repeat_fields?: any[] | null;
25434
+ no_repeat_fields?: string[] | null;
24502
25435
  /**
24503
25436
  * Number of terms to select (e.g., 7 for weekly plan)
24504
25437
  * @min 0
@@ -24523,7 +25456,7 @@ interface TemporalPlanRequest$1 {
24523
25456
  * Optional quality scores for top-k selection (term_id -> score)
24524
25457
  * When provided, selects highest-quality diverse candidates
24525
25458
  */
24526
- top_k?: object | null;
25459
+ top_k?: Partial<Record<string, number>> | null;
24527
25460
  }
24528
25461
  /** Response from temporal planning */
24529
25462
  interface TemporalPlanResponse$1 {
@@ -24659,7 +25592,7 @@ interface TermDto$1 {
24659
25592
  */
24660
25593
  display_name?: string | null;
24661
25594
  /** Features map */
24662
- features: Record<string, ValueDto$1>;
25595
+ features: Partial<Record<string, ValueDto$1>>;
24663
25596
  /**
24664
25597
  * Term ID
24665
25598
  * @format uuid
@@ -24674,7 +25607,7 @@ interface TermDto$1 {
24674
25607
  * Summaries of referenced terms — maps UUID string to display info.
24675
25608
  * Enriched at API layer via DomainTermStore lookups, zero extra I/O.
24676
25609
  */
24677
- referenced_terms?: Record<string, ReferencedTermSummary$1>;
25610
+ referenced_terms?: Partial<Record<string, ReferencedTermSummary$1>>;
24678
25611
  /**
24679
25612
  * Sort ID
24680
25613
  * @format uuid
@@ -24752,7 +25685,7 @@ interface TermListResponse$1 {
24752
25685
  /** Term pattern for unification queries */
24753
25686
  interface TermPatternDto$1 {
24754
25687
  /** Features to match */
24755
- features: Record<string, ValueDto$1>;
25688
+ features: Partial<Record<string, ValueDto$1>>;
24756
25689
  /**
24757
25690
  * Sort ID of the pattern
24758
25691
  * @format uuid
@@ -24798,7 +25731,7 @@ interface TerminationDto {
24798
25731
  * When termination could not be established and an obstruction was found, the
24799
25732
  * human-readable cycle of interacting positions that can grow without bound.
24800
25733
  */
24801
- diverging_cycle?: any[] | null;
25734
+ diverging_cycle?: string[] | null;
24802
25735
  /**
24803
25736
  * The deepest chain of freshly-created values any reasoning step can produce
24804
25737
  * (the ranking-function bound). `0` means the rules never invent new values
@@ -24824,7 +25757,7 @@ interface TestInputDto {
24824
25757
  * calibration. Each value must be in `[0, 1]`. At least one
24825
25758
  * class entry required.
24826
25759
  */
24827
- class_scores: Record<string, number>;
25760
+ class_scores: Partial<Record<string, number>>;
24828
25761
  /** Caller-assigned identifier echoed in the response. */
24829
25762
  input_id: string;
24830
25763
  }
@@ -24934,6 +25867,17 @@ interface ToolCallInfo$1 {
24934
25867
  /** Tool name that was invoked */
24935
25868
  name: string;
24936
25869
  }
25870
+ /** Trace event payload */
25871
+ interface TraceEventDto$1 {
25872
+ assignment: string;
25873
+ /** 'feature_created' | 'feature_verified' | 'feature_conflict' */
25874
+ event_type: string;
25875
+ /** @format int64 */
25876
+ id: number;
25877
+ /** @format int64 */
25878
+ value_label: number;
25879
+ variable?: string | null;
25880
+ }
24937
25881
  /** Trail entry DTO */
24938
25882
  type TrailEntryDto$1 = {
24939
25883
  feature_name: string;
@@ -25142,7 +26086,7 @@ interface TranslateRdfRequest$1 {
25142
26086
  */
25143
26087
  interface TranslateRdfResponse$1 {
25144
26088
  /** The document's `@prefix` declarations (`prefix → namespace IRI`). */
25145
- prefixes: Record<string, string>;
26089
+ prefixes: Partial<Record<string, string>>;
25146
26090
  /** Distinct sort names referenced by the produced terms. */
25147
26091
  sorts: string[];
25148
26092
  /**
@@ -25353,7 +26297,7 @@ type TypedConstraintDto = {
25353
26297
  * the new `RunOsfql` variant, since the tier is fixed by kind for the others).
25354
26298
  */
25355
26299
  type UIActionDto$1 = {
25356
- field_types: Record<string, string>;
26300
+ field_types: Partial<Record<string, string>>;
25357
26301
  osfql_template: string;
25358
26302
  /**
25359
26303
  * Safety tier assigned per entry — a coarse pre-filter. The security boundary
@@ -25399,7 +26343,7 @@ type UIActionDto$1 = {
25399
26343
  statement_id?: string | null;
25400
26344
  type: "load_data";
25401
26345
  } | {
25402
- field_types: Record<string, string>;
26346
+ field_types: Partial<Record<string, string>>;
25403
26347
  osfql_template: string;
25404
26348
  /**
25405
26349
  * Safety tier assigned per entry — a coarse pre-filter. The security boundary
@@ -25513,7 +26457,7 @@ type UIActionDto$1 = {
25513
26457
  statement_id?: string | null;
25514
26458
  type: "refresh";
25515
26459
  } | {
25516
- field_types: Record<string, string>;
26460
+ field_types: Partial<Record<string, string>>;
25517
26461
  osfql_template: string;
25518
26462
  /**
25519
26463
  * Safety tier assigned per entry — a coarse pre-filter. The security boundary
@@ -25559,9 +26503,9 @@ interface UIActionRequest$1 {
25559
26503
  */
25560
26504
  dry_run?: boolean;
25561
26505
  /** Field type metadata (field_name → type hint like "string", "integer", "boolean") */
25562
- field_types?: object | null;
26506
+ field_types?: Partial<Record<string, string>> | null;
25563
26507
  /** Original field values for update operations (used for RETRACT to identify the term) */
25564
- original_values?: object | null;
26508
+ original_values?: Partial<Record<string, any>> | null;
25565
26509
  /**
25566
26510
  * Raw OSFQL override (if provided, used directly instead of building from
25567
26511
  * values). Gated: rejected with 400 unless `OSFKB_UI_RAW_OSFQL=1`.
@@ -25580,14 +26524,14 @@ interface UIActionRequest$1 {
25580
26524
  /** Term ID for update/delete operations */
25581
26525
  term_id?: string | null;
25582
26526
  /** Field values for submit/update (field_name → JSON value) */
25583
- values?: object | null;
26527
+ values?: Partial<Record<string, any>> | null;
25584
26528
  }
25585
26529
  /** Response from executing a UI action */
25586
26530
  interface UIActionResponse$1 {
25587
26531
  /** Present on dry-run of RETRACT/UPDATE: the rows the statement would hit. */
25588
26532
  affected_preview?: null | AffectedPreviewDto$1;
25589
26533
  /** Read-back rows for `run_osfql` reads (GOALS/GET GLOBAL/HIERARCHY/AGGREGATE). */
25590
- bindings?: any[] | null;
26534
+ bindings?: object[] | null;
25591
26535
  /** Diagnostics from OSFQL execution */
25592
26536
  diagnostics?: string[];
25593
26537
  /** Echo: true means this was a dry-run preview and nothing was mutated. */
@@ -25652,10 +26596,33 @@ interface UICatalogResponse$1 {
25652
26596
  */
25653
26597
  count: number;
25654
26598
  }
26599
+ /**
26600
+ * A single UI customization instruction from the frontend.
26601
+ *
26602
+ * Customizations are accumulated across chat turns and sent alongside
26603
+ * the describe request. The assembly service applies them as patches
26604
+ * on top of the base descriptor generated from the sort definition.
26605
+ */
26606
+ interface UICustomizationDto$2 {
26607
+ /** Component descriptor for add_component / add_tab */
26608
+ component?: null | UIDescriptorDto$1;
26609
+ /** Type of customization */
26610
+ customization_type: string;
26611
+ /** Layout mode for change_layout */
26612
+ layout_mode?: null | LayoutModeDto$1;
26613
+ /** Additional params (label, column name, style values, etc.) */
26614
+ params?: Partial<Record<string, any>> | null;
26615
+ /** Props to override on an existing component */
26616
+ props_override?: Partial<Record<string, any>> | null;
26617
+ /** JSONPath-style target for modifications (e.g., "children[0].props") */
26618
+ target_path?: string | null;
26619
+ /** Target slot for component additions/removals */
26620
+ target_slot?: string | null;
26621
+ }
25655
26622
  /** Request to generate a UI descriptor for a sort. */
25656
26623
  interface UIDescribeRequest$1 {
25657
26624
  /** Accumulated UI customizations from multi-turn conversation */
25658
- customizations?: any[] | null;
26625
+ customizations?: UICustomizationDto$2[] | null;
25659
26626
  /** Whether to load data via OSFQL (Table/Detail views, default: true) */
25660
26627
  load_data?: boolean;
25661
26628
  /**
@@ -25810,7 +26777,7 @@ interface UIGenerateResponse$1 {
25810
26777
  type UiSort$1 = "app" | "page" | "dashboard" | "grid" | "flex" | "stack" | "box" | "card" | "divider" | "spacer" | "navbar" | "sidebar" | "tabs" | "tab_panel" | "breadcrumbs" | "menu" | "menu_item" | "link" | "router" | "route" | "data_table" | "column" | "list" | "list_item" | "tree" | "tree_node" | "chart" | "stat" | "badge" | "avatar" | "icon" | "image" | "video" | "text" | "heading" | "paragraph" | "code" | "markdown" | "label" | "form" | "form_field" | "input" | "textarea" | "select" | "option" | "checkbox" | "radio" | "radio_group" | "toggle" | "slider" | "date_picker" | "time_picker" | "date_range_picker" | "file_upload" | "color_picker" | "autocomplete" | "search_input" | "button" | "button_group" | "icon_button" | "fab" | "dropdown_button" | "modal" | "dialog" | "drawer" | "popover" | "tooltip" | "toast" | "alert" | "progress" | "spinner" | "skeleton" | "accordion" | "accordion_item" | "collapsible" | "carousel" | "drag_drop_zone" | "draggable" | "drop_target" | "resizable" | "sortable_list" | "command_palette" | "wizard" | "wizard_step" | "timeline" | "timeline_item" | "kanban_board" | "kanban_column" | "kanban_card" | "calendar" | "rich_text_editor" | "conditional" | "for_each" | "show" | "suspense" | "error_boundary" | "portal" | "data_source" | "computed" | "state" | "effect" | "on_event" | "on_click" | "on_submit" | "on_change" | "sequence" | "navigate" | "api_call" | "set_state" | "show_toast" | "open_modal" | "close_modal" | "animate" | "transition" | "keyframes" | "auth_provider" | "protected_route" | "login_form" | "logout_button" | "user_profile" | "permission_gate" | "session_timeout" | "i18n_provider" | "trans" | "language_switcher" | "locale_date" | "locale_number" | "locale_currency" | "bidi" | "responsive" | "show_on_breakpoint" | "hide_on_breakpoint" | "container_query" | "aspect_ratio" | "theme_provider" | "theme_toggle" | "css_var" | "styled" | "color_scheme" | "screen_reader_only" | "skip_link" | "focus_trap" | "live_region" | "keyboard_nav" | "accessible_label" | "focus_ring" | "virtual_list" | "virtual_grid" | "virtual_table" | "infinite_scroll" | "lazy_load" | "code_split" | "prefetch" | "offline_indicator" | "sync_status" | "cache_control" | "background_sync" | "install_prompt" | "update_available" | "undo_provider" | "undo_button" | "redo_button" | "history_browser" | "snapshot" | "restore_point" | "hotkey" | "shortcut_hint" | "key_combo" | "shortcut_scope" | "global_search" | "search_results" | "search_highlight" | "search_filters" | "recent_searches" | "copy_button" | "paste_handler" | "share_button" | "qr_code" | "export_button" | "print_button" | "print_only" | "screen_only" | "pdf_preview" | "presence_indicator" | "cursor_overlay" | "typing_indicator" | "conflict_resolver" | "realtime_diff" | "notification_center" | "push_notification" | "inbox" | "unread_badge" | "notification_settings" | "debug_panel" | "state_inspector" | "perf_monitor" | "network_inspector" | "error_reporter" | "position" | "layer" | "overlay" | "fixed" | "sticky" | "form_state_provider" | "field_error" | "validation_schema" | "async_validator" | "cross_field_validation" | "pagination" | "cursor_pagination" | "load_more" | "page_size_selector" | "search_params" | "route_params" | "deep_link" | "url_state" | "query_binding" | "scroll_container" | "scroll_snap" | "scroll_lock" | "scroll_restore" | "scroll_to" | "scroll_spy" | "selection_provider" | "selectable" | "selection_actions" | "range_selection" | "gesture_handler" | "swipe_action" | "pinch_zoom" | "long_press" | "pan_gesture" | "multi_touch" | "file_download" | "file_preview" | "file_progress" | "file_browser" | "drop_zone" | "image_cropper" | "animation_controller" | "animation_timeline" | "spring" | "motion_value" | "animate_presence" | "stagger" | "focus_scope" | "focus_manager" | "auto_focus" | "restore_focus" | "merge_conflict" | "conflict_resolution" | "version_indicator" | "tenant_provider" | "tenant_switcher" | "tenant_branding" | "audit_log" | "activity_feed" | "change_history" | "feature_gate" | "feature_provider" | "beta_badge" | "experiment" | "variant" | "experiment_provider" | "analytics" | "page_view" | "click_tracker" | "event_tracker" | "rate_limit_indicator" | "maintenance_mode" | "system_status" | "scheduled_downtime" | "document_head" | "meta_tag" | "document_title" | "open_graph" | "structured_data" | "video_call" | "audio_call" | "screen_share" | "media_stream" | "camera_capture" | "audio_recorder" | "canvas2_d" | "web_g_l" | "drawing_canvas" | "signature_pad" | "geolocation" | "device_orientation" | "camera" | "barcode_scanner" | "local_storage_binding" | "session_storage_binding" | "indexed_db_binding";
25811
26778
  interface UncertainEdgeDto$1 {
25812
26779
  /** Possible directions */
25813
- possible_directions: any[][];
26780
+ possible_directions: [string, string][];
25814
26781
  /**
25815
26782
  * Uncertainty score (0 = certain, 1 = completely uncertain)
25816
26783
  * @format double
@@ -26069,7 +27036,7 @@ interface UpdateSortReviewRequest {
26069
27036
  /** Request to update a term */
26070
27037
  interface UpdateTermRequest$1 {
26071
27038
  /** Features to update */
26072
- features: Record<string, ValueDto$1>;
27039
+ features: Partial<Record<string, ValueDto$1>>;
26073
27040
  }
26074
27041
  /** Request to update namespace visibility */
26075
27042
  interface UpdateVisibilityRequest$1 {
@@ -26497,10 +27464,55 @@ interface VerificationStepDto$1 {
26497
27464
  /** Whether this step passed verification. */
26498
27465
  passed: boolean;
26499
27466
  }
27467
+ /** Request to verify a specific claim (matches SDK's `VerifyClaimRequest`). */
27468
+ interface VerifyClaimRequest$1 {
27469
+ /** Claim term ID (UUID). */
27470
+ claim_term_id: string;
27471
+ /** Evidence sort ID (UUID). */
27472
+ evidence_sort_id: string;
27473
+ /**
27474
+ * Session whose knowledge base holds the claim, if any.
27475
+ *
27476
+ * A session's terms live under a tenant of its own (the session id), so a
27477
+ * claim minted by a research run is invisible to a lookup against the
27478
+ * configured tenant — without this the route could not reach any session's
27479
+ * claims at all (#137). Absent, the claim is looked up under the configured
27480
+ * tenant, which is where a caller working outside a session put it.
27481
+ *
27482
+ * The session must belong to the caller's tenant; a session id from another
27483
+ * tenant is refused exactly as it is on every other by-id route.
27484
+ * @format uuid
27485
+ */
27486
+ session_id?: string | null;
27487
+ }
27488
+ /** Response from claim verification (matches SDK's `VerifyClaimResponse`). */
27489
+ interface VerifyClaimResponse$1 {
27490
+ /**
27491
+ * Number of contradicting evidence items.
27492
+ * @min 0
27493
+ */
27494
+ contradicting_count: number;
27495
+ /** Assessment label. */
27496
+ label: string;
27497
+ /** Whether assessment was residuated. */
27498
+ residuated: boolean;
27499
+ /** Reason for residuation. */
27500
+ residuation_reason?: string | null;
27501
+ /**
27502
+ * Number of supporting evidence items.
27503
+ * @min 0
27504
+ */
27505
+ supporting_count: number;
27506
+ /**
27507
+ * Truthfulness score (0.0-1.0).
27508
+ * @format double
27509
+ */
27510
+ truthfulness: number;
27511
+ }
26500
27512
  /** Request to verify faithfulness of generated text against source entities. */
26501
27513
  interface VerifyFaithfulnessRequest$1 {
26502
27514
  /** Extracted entity features (from generated text). */
26503
- extracted: Record<string, string>;
27515
+ extracted: Partial<Record<string, string>>;
26504
27516
  /**
26505
27517
  * Minimum entity recovery rate (default: 0.5).
26506
27518
  * @format double
@@ -26512,7 +27524,7 @@ interface VerifyFaithfulnessRequest$1 {
26512
27524
  */
26513
27525
  min_score?: number | null;
26514
27526
  /** Original entity features (source of truth). */
26515
- original: Record<string, string>;
27527
+ original: Partial<Record<string, string>>;
26516
27528
  }
26517
27529
  /** Response from faithfulness verification. */
26518
27530
  interface VerifyFaithfulnessResponse$1 {
@@ -26798,7 +27810,7 @@ interface WebhookCallbackRequest$1 {
26798
27810
  */
26799
27811
  notify_tenant_id?: string | null;
26800
27812
  /** Output values to bind to the Ψ-term features */
26801
- outputs?: Record<string, any>;
27813
+ outputs?: Partial<Record<string, any>>;
26802
27814
  /** Status of the action: "success", "failed", or "cancelled" */
26803
27815
  status: string;
26804
27816
  }
@@ -26836,7 +27848,7 @@ interface WitnessInstantiationDto$1 {
26836
27848
  * The bindings that satisfy the witness
26837
27849
  * e.g., {"?Y": "bob"} for grandparent witness ∃Y. parent(X,Y) ∧ parent(Y,Z)
26838
27850
  */
26839
- bindings: Record<string, string>;
27851
+ bindings: Partial<Record<string, string>>;
26840
27852
  /**
26841
27853
  * Confidence in the witness (1.0 = certain)
26842
27854
  * @format double
@@ -26850,7 +27862,7 @@ interface WitnessInstantiationDto$1 {
26850
27862
  /** Witness proof for a term */
26851
27863
  interface WitnessProofDto$1 {
26852
27864
  /** Variable bindings that satisfy the witness */
26853
- bindings: Record<string, string>;
27865
+ bindings: Partial<Record<string, string>>;
26854
27866
  /**
26855
27867
  * Confidence/certainty of the proof
26856
27868
  * @format double
@@ -29054,6 +30066,18 @@ declare namespace terms {
29054
30066
  export type { terms_BulkAddTermsRequest as BulkAddTermsRequest, terms_BulkAddTermsResponse as BulkAddTermsResponse, terms_ClearTermsResponse as ClearTermsResponse, terms_CreateTermRequest as CreateTermRequest, terms_ReferencedTermSummary as ReferencedTermSummary, terms_ResidualWitnessDto as ResidualWitnessDto, terms_ResiduationDto as ResiduationDto, terms_TermDto as TermDto, terms_TermResponse as TermResponse, terms_TermState as TermState, terms_UpdateTermRequest as UpdateTermRequest, terms_ValidatedTermResponse as ValidatedTermResponse, terms_ValidatedUnifyResponse as ValidatedUnifyResponse, terms_WitnessInstantiationDto as WitnessInstantiationDto, terms_WitnessProofDto as WitnessProofDto };
29055
30067
  }
29056
30068
 
30069
+ /**
30070
+ * One prior turn of a conversation, passed as context to an `llm`-mode query.
30071
+ *
30072
+ * Both fields are single words on the wire, so this is the same shape in both
30073
+ * directions. It was typed `unknown` until the backend described the surface.
30074
+ */
30075
+ interface ConversationTurnDto {
30076
+ /** Who produced the turn — `"user"` or `"assistant"`. */
30077
+ role: string;
30078
+ /** The turn's text. */
30079
+ content: string;
30080
+ }
29057
30081
  /** Translation mode for natural language queries. */
29058
30082
  type NlQueryMode = 'llm' | 'constraint' | 'cognitive' | 'triz' | 'grounded_sql';
29059
30083
  /** A result item from a natural language query. */
@@ -29307,7 +30331,7 @@ interface NlQueryRequest {
29307
30331
  /** Tenant ID for the query. */
29308
30332
  tenantId: string;
29309
30333
  /** Optional conversation history for context (llm mode only). */
29310
- conversationHistory?: unknown[] | null;
30334
+ conversationHistory?: ConversationTurnDto[] | null;
29311
30335
  /** Optional session ID for cognitive mode (persists agent learning across queries). */
29312
30336
  sessionId?: string | null;
29313
30337
  }
@@ -29336,6 +30360,7 @@ interface NlQueryResponse {
29336
30360
  }
29337
30361
 
29338
30362
  type query_BySortQueryRequest = BySortQueryRequest;
30363
+ type query_ConversationTurnDto = ConversationTurnDto;
29339
30364
  type query_DiscoveredRelationDto = DiscoveredRelationDto;
29340
30365
  type query_FindBySortRequest = FindBySortRequest;
29341
30366
  type query_MissingInfoDto = MissingInfoDto;
@@ -29356,7 +30381,7 @@ type query_UnificationQueryResponse = UnificationQueryResponse;
29356
30381
  type query_ValidateTermRequest = ValidateTermRequest;
29357
30382
  type query_ValidatedUnifyRequest = ValidatedUnifyRequest;
29358
30383
  declare namespace query {
29359
- export type { query_BySortQueryRequest as BySortQueryRequest, query_DiscoveredRelationDto as DiscoveredRelationDto, query_FindBySortRequest as FindBySortRequest, MatchedEntityDto$1 as MatchedEntityDto, query_MissingInfoDto as MissingInfoDto, query_NlQueryMode as NlQueryMode, query_NlQueryRequest as NlQueryRequest, query_NlQueryResponse as NlQueryResponse, query_NlQueryResultItem as NlQueryResultItem, query_OsfSearchRequest as OsfSearchRequest, query_OsfSearchResponse as OsfSearchResponse, query_OsfSearchStatsDto as OsfSearchStatsDto, query_ResumptionOptionDto as ResumptionOptionDto, query_SuspendedQueryDto as SuspendedQueryDto, query_TermListResponse as TermListResponse, query_TermPatternDto as TermPatternDto, query_ToolCallInfo as ToolCallInfo, query_UnifiableQueryRequest as UnifiableQueryRequest, query_UnificationQueryResponse as UnificationQueryResponse, query_ValidateTermRequest as ValidateTermRequest, query_ValidatedUnifyRequest as ValidatedUnifyRequest };
30384
+ export type { query_BySortQueryRequest as BySortQueryRequest, query_ConversationTurnDto as ConversationTurnDto, query_DiscoveredRelationDto as DiscoveredRelationDto, query_FindBySortRequest as FindBySortRequest, MatchedEntityDto$1 as MatchedEntityDto, query_MissingInfoDto as MissingInfoDto, query_NlQueryMode as NlQueryMode, query_NlQueryRequest as NlQueryRequest, query_NlQueryResponse as NlQueryResponse, query_NlQueryResultItem as NlQueryResultItem, query_OsfSearchRequest as OsfSearchRequest, query_OsfSearchResponse as OsfSearchResponse, query_OsfSearchStatsDto as OsfSearchStatsDto, query_ResumptionOptionDto as ResumptionOptionDto, query_SuspendedQueryDto as SuspendedQueryDto, query_TermListResponse as TermListResponse, query_TermPatternDto as TermPatternDto, query_ToolCallInfo as ToolCallInfo, query_UnifiableQueryRequest as UnifiableQueryRequest, query_UnificationQueryResponse as UnificationQueryResponse, query_ValidateTermRequest as ValidateTermRequest, query_ValidatedUnifyRequest as ValidatedUnifyRequest };
29360
30385
  }
29361
30386
 
29362
30387
  /**
@@ -31414,7 +32439,7 @@ declare class Query<SecurityDataType = unknown> {
31414
32439
  http: HttpClient<SecurityDataType>;
31415
32440
  constructor(http: HttpClient<SecurityDataType>);
31416
32441
  /**
31417
- * @description Returns all terms with the specified sort OR any of its subtypes. This implements proper OSF polymorphic query semantics where querying a parent sort returns all instances of that sort and its descendants.
32442
+ * @description Returns all terms with the specified sort OR any of its subtypes. This implements proper OSF polymorphic query semantics where querying a parent sort returns all instances of that sort and its descendants. ## Resolving `sort_name` A name can denote more than one id (see `sort_name_candidates`), and no cheap probe tells which of them the query can actually answer from: on the production adapter `get_sort` and `get_sort_ids_by_names` are bare reads of an in-memory cache with no persistence fallback, while the query's own `get_compatible_sorts` does fall back to Postgres. Confirming a candidate with `get_sort` would therefore 404 every tenant sort created before the last restart — a guard strictly stricter than the thing it guards. So the candidates are **tried** against the real query; only `SortNotFound` moves on to the next, every other failure is returned as-is. A phantom id (minted into the tenant lattice by ingestion and never persisted, #138) cannot be returned: the query authority refuses it and the loop skips past it. When no candidate answers, the sort is not queryable and the honest reply is 404 naming the sort the CALLER asked for — never a 400 leaking an internal `SortId` the caller never supplied. Every candidate that answers **contributes**; the answer is their union, deduplicated by term id. Registration now keeps a tenant to one sort per name (#139), so two answering candidates mean rows a pre-fix engine left behind: one name, two sorts, and the tenant's terms of that type divided between them. Stopping at the first — what this route did — returned one half and reported nothing about the other, because an id the caller never supplied going unqueried raises no error. In the ordinary case exactly one candidate answers and the route runs exactly one term query, as it always did.
31418
32443
  *
31419
32444
  * @tags query
31420
32445
  * @name FindBySort
@@ -31992,11 +33017,11 @@ declare class CognitiveAgentsMessaging<SecurityDataType = unknown> {
31992
33017
  * No description
31993
33018
  *
31994
33019
  * @tags Cognitive Agents - Messaging
31995
- * @name SendMessage
33020
+ * @name SendAgentMessage
31996
33021
  * @summary Send a message to another agent.
31997
33022
  * @request POST:/api/v1/cognitive/agents/messages
31998
33023
  */
31999
- sendMessage: (data: SendMessageRequest$1, params?: RequestParams) => Promise<HttpResponse<SendMessageResponse$1, void>>;
33024
+ sendAgentMessage: (data: SendMessageRequest$1, params?: RequestParams) => Promise<HttpResponse<SendMessageResponse$1, void>>;
32000
33025
  }
32001
33026
 
32002
33027
  declare class CognitiveAgentsPlanLibrary<SecurityDataType = unknown> {
@@ -34736,12 +35761,12 @@ declare class Constraints<SecurityDataType = unknown> {
34736
35761
  * No description
34737
35762
  *
34738
35763
  * @tags constraints
34739
- * @name CreateSession
35764
+ * @name CreateConstraintSession
34740
35765
  * @summary Create a new constraint session
34741
35766
  * @request POST:/api/v1/constraint-sessions
34742
35767
  * @secure
34743
35768
  */
34744
- createSession: (data: CreateConstraintSessionRequest$1, params?: RequestParams) => Promise<HttpResponse<CreateSessionResponse, void>>;
35769
+ createConstraintSession: (data: CreateConstraintSessionRequest$1, params?: RequestParams) => Promise<HttpResponse<CreateSessionResponse, void>>;
34745
35770
  /**
34746
35771
  * No description
34747
35772
  *
@@ -34756,12 +35781,12 @@ declare class Constraints<SecurityDataType = unknown> {
34756
35781
  * No description
34757
35782
  *
34758
35783
  * @tags constraints
34759
- * @name GetSessionStatus
35784
+ * @name GetConstraintSessionStatus
34760
35785
  * @summary Get status of a constraint session
34761
35786
  * @request GET:/api/v1/constraint-sessions/{session_id}
34762
35787
  * @secure
34763
35788
  */
34764
- getSessionStatus: (sessionId: string, params?: RequestParams) => Promise<HttpResponse<ConstraintSessionStatusResponse, void>>;
35789
+ getConstraintSessionStatus: (sessionId: string, params?: RequestParams) => Promise<HttpResponse<ConstraintSessionStatusResponse, void>>;
34765
35790
  /**
34766
35791
  * No description
34767
35792
  *
@@ -35495,8 +36520,14 @@ interface ConstraintSessionStatus {
35495
36520
  interface AddConstraintsRequest {
35496
36521
  /** Constraints to add. */
35497
36522
  constraints: GeneralConstraintDto[];
35498
- /** Optional variable bindings. */
35499
- bindings?: Record<string, unknown> | null;
36523
+ /**
36524
+ * Optional variable bindings.
36525
+ *
36526
+ * Values are the integers a finite-domain variable takes. Typed `unknown`
36527
+ * until the generated contract said otherwise, so nothing checked what a
36528
+ * caller put here.
36529
+ */
36530
+ bindings?: Record<string, number> | null;
35500
36531
  }
35501
36532
  /**
35502
36533
  * Response from adding constraints to a session.
@@ -43301,6 +44332,19 @@ interface EvidenceAssessmentRequest {
43301
44332
  interface EvidenceItemDto {
43302
44333
  /** Contribution to the assessment (quality * support direction). */
43303
44334
  contribution: number;
44335
+ /**
44336
+ * The evidence term's own human-readable sentence, e.g.
44337
+ * `"Aspirin reduces_risk_of Cancer"`.
44338
+ *
44339
+ * `termId` is a UUID no consumer can render, so without this an evidence row
44340
+ * could only be shown as `Evidence item <uuid>`. The backend resolves it from
44341
+ * the term under the same display-name precedence `TermDto.displayName` uses,
44342
+ * so the sentence shown here and the one shown for the term never disagree.
44343
+ *
44344
+ * `null` when talking to a backend that predates evidence descriptions, or
44345
+ * when the evidence term carries no description of its own.
44346
+ */
44347
+ description?: string | null;
43304
44348
  /** Quality weight of this evidence (0.0-1.0). */
43305
44349
  qualityWeight: number;
43306
44350
  /** Whether this evidence supports (true) or contradicts (false) the subject. */
@@ -43579,6 +44623,13 @@ declare class ReasoningClient {
43579
44623
  /**
43580
44624
  * Assess the truthfulness/validity of a subject based on related evidence.
43581
44625
  *
44626
+ * @remarks
44627
+ * Each item in the supporting/contradicting breakdown carries a
44628
+ * `description` — the evidence term's own sentence,
44629
+ * e.g. `"Aspirin reduces_risk_of Cancer"` — so evidence can be rendered
44630
+ * without a second lookup by `termId`. It is `null` against a backend that
44631
+ * predates the field.
44632
+ *
43582
44633
  * @param request - Evidence assessment request.
43583
44634
  * @returns Assessment result with truthfulness score, label, and evidence breakdown.
43584
44635
  */
@@ -49449,11 +50500,11 @@ declare class Oversight<SecurityDataType = unknown> {
49449
50500
  * @description Create a new live oversight session.
49450
50501
  *
49451
50502
  * @tags oversight
49452
- * @name CreateSession
50503
+ * @name CreateOversightSession
49453
50504
  * @summary POST /api/v1/oversight/sessions
49454
50505
  * @request POST:/api/v1/oversight/sessions
49455
50506
  */
49456
- createSession: (data: CreateSessionRequest, params?: RequestParams) => Promise<HttpResponse<CreateSessionResponse, void>>;
50507
+ createOversightSession: (data: CreateSessionRequest, params?: RequestParams) => Promise<HttpResponse<CreateSessionResponse, void>>;
49457
50508
  /**
49458
50509
  * @description Finalize a live oversight session, running full verification and returning the final verdict.
49459
50510
  *
@@ -49467,11 +50518,11 @@ declare class Oversight<SecurityDataType = unknown> {
49467
50518
  * @description Get the current status of a live oversight session.
49468
50519
  *
49469
50520
  * @tags oversight
49470
- * @name GetSessionStatus
50521
+ * @name GetOversightSessionStatus
49471
50522
  * @summary GET /api/v1/oversight/sessions/:session_id/status
49472
50523
  * @request GET:/api/v1/oversight/sessions/{session_id}/status
49473
50524
  */
49474
- getSessionStatus: (sessionId: string, params?: RequestParams) => Promise<HttpResponse<SessionStatusResponse, void>>;
50525
+ getOversightSessionStatus: (sessionId: string, params?: RequestParams) => Promise<HttpResponse<SessionStatusResponse, void>>;
49475
50526
  /**
49476
50527
  * @description Ingest a single trajectory step and return incremental verification result.
49477
50528
  *
@@ -51792,12 +52843,12 @@ declare class Synthetic<SecurityDataType = unknown> {
51792
52843
  * @description Computes per-sort and per-feature Expected Calibration Error, identifies augmentation targets, and allocates exponential budgets for targeted synthetic data generation.
51793
52844
  *
51794
52845
  * @tags synthetic
51795
- * @name Calibrate
52846
+ * @name CalibrateSynthetic
51796
52847
  * @summary Run ECE calibration on extraction predictions.
51797
52848
  * @request POST:/api/v1/synthetic/calibrate
51798
52849
  * @secure
51799
52850
  */
51800
- calibrate: (data: CalibrateRequest$1, params?: RequestParams) => Promise<HttpResponse<CalibrationReportDto$1, void>>;
52851
+ calibrateSynthetic: (data: CalibrateRequest$1, params?: RequestParams) => Promise<HttpResponse<CalibrationReportDto$1, void>>;
51801
52852
  /**
51802
52853
  * @description Computes structural similarity using Wu-Palmer sort distance and Jaccard feature overlap. Returns novelty score and closest match. # Authorization Requires X-Tenant-Id header for tenant-scoped operations.
51803
52854
  *
@@ -54732,7 +55783,7 @@ interface OntologyRagRequest {
54732
55783
  * Optional map of concept_id to numeric value (e.g., mastery, score, confidence).
54733
55784
  * The interpretation of these values is domain-specific.
54734
55785
  */
54735
- conceptValues?: Record<string, unknown> | null;
55786
+ conceptValues?: Record<string, number> | null;
54736
55787
  /**
54737
55788
  * Feature configuration -- allows caller to specify feature names.
54738
55789
  * If not provided, uses defaults.
@@ -56501,7 +57552,7 @@ interface ReasoningTraceDto {
56501
57552
  /**
56502
57553
  * UI customization detected from a conversation response.
56503
57554
  */
56504
- interface UICustomizationDto {
57555
+ interface UICustomizationDto$1 {
56505
57556
  /** Type of customization. */
56506
57557
  customizationType: string;
56507
57558
  /** JSONPath-style target for modifications. */
@@ -56554,7 +57605,7 @@ interface ConversationMessageResponse {
56554
57605
  /** Proof tree for this response (populated when PROVE / backward chaining was used). */
56555
57606
  proofTrace?: ProofTraceNodeDto | null;
56556
57607
  /** UI customizations detected in this response (for multi-turn UI evolution). */
56557
- uiCustomizations?: UICustomizationDto[] | null;
57608
+ uiCustomizations?: UICustomizationDto$1[] | null;
56558
57609
  /**
56559
57610
  * Cognitive strategy used for this response (when RL training is active and a
56560
57611
  * cognitive agent exists for the tenant). Absent on plain conversation turns.
@@ -56756,9 +57807,8 @@ type conversation_RecordTurnResponse = RecordTurnResponse;
56756
57807
  type conversation_ResolvedCoreferenceDto = ResolvedCoreferenceDto;
56757
57808
  type conversation_SessionGraphDto = SessionGraphDto;
56758
57809
  type conversation_TurnDto = TurnDto;
56759
- type conversation_UICustomizationDto = UICustomizationDto;
56760
57810
  declare namespace conversation {
56761
- export type { conversation_ClaimAnnotationDto as ClaimAnnotationDto, conversation_CognitiveStrategyDto as CognitiveStrategyDto, conversation_CompareModelDto as CompareModelDto, conversation_ConversationMessageRequest as ConversationMessageRequest, conversation_ConversationMessageResponse as ConversationMessageResponse, conversation_ConversationSummaryDto as ConversationSummaryDto, conversation_ConversationTurnsResponse as ConversationTurnsResponse, conversation_DerivationSummaryDto as DerivationSummaryDto, conversation_FocusEntryDto as FocusEntryDto, conversation_ListConversationsResponse as ListConversationsResponse, conversation_MatchedEntityDto as MatchedEntityDto, conversation_ProofTraceNodeDto as ProofTraceNodeDto, conversation_ReasoningStageDto as ReasoningStageDto, conversation_ReasoningTraceDto as ReasoningTraceDto, conversation_RecordTurnRequest as RecordTurnRequest, conversation_RecordTurnResponse as RecordTurnResponse, conversation_ResolvedCoreferenceDto as ResolvedCoreferenceDto, conversation_SessionGraphDto as SessionGraphDto, SourceExcerptDto$1 as SourceExcerptDto, conversation_TurnDto as TurnDto, conversation_UICustomizationDto as UICustomizationDto };
57811
+ export type { conversation_ClaimAnnotationDto as ClaimAnnotationDto, conversation_CognitiveStrategyDto as CognitiveStrategyDto, conversation_CompareModelDto as CompareModelDto, conversation_ConversationMessageRequest as ConversationMessageRequest, conversation_ConversationMessageResponse as ConversationMessageResponse, conversation_ConversationSummaryDto as ConversationSummaryDto, conversation_ConversationTurnsResponse as ConversationTurnsResponse, conversation_DerivationSummaryDto as DerivationSummaryDto, conversation_FocusEntryDto as FocusEntryDto, conversation_ListConversationsResponse as ListConversationsResponse, conversation_MatchedEntityDto as MatchedEntityDto, conversation_ProofTraceNodeDto as ProofTraceNodeDto, conversation_ReasoningStageDto as ReasoningStageDto, conversation_ReasoningTraceDto as ReasoningTraceDto, conversation_RecordTurnRequest as RecordTurnRequest, conversation_RecordTurnResponse as RecordTurnResponse, conversation_ResolvedCoreferenceDto as ResolvedCoreferenceDto, conversation_SessionGraphDto as SessionGraphDto, SourceExcerptDto$1 as SourceExcerptDto, conversation_TurnDto as TurnDto, UICustomizationDto$1 as UICustomizationDto };
56762
57812
  }
56763
57813
 
56764
57814
  /**
@@ -57023,6 +58073,151 @@ declare class VerificationClient {
57023
58073
  getCertificate(certificateId: string): Promise<CertificateDetail>;
57024
58074
  }
57025
58075
 
58076
+ declare class Research<SecurityDataType = unknown> {
58077
+ http: HttpClient<SecurityDataType>;
58078
+ constructor(http: HttpClient<SecurityDataType>);
58079
+ /**
58080
+ * No description
58081
+ *
58082
+ * @tags research
58083
+ * @name ResearchCreateSession
58084
+ * @summary POST /research/sessions -- Create a new research session.
58085
+ * @request POST:/api/v1/research/sessions
58086
+ * @secure
58087
+ */
58088
+ researchCreateSession: (data: CreateResearchSessionRequest$1, params?: RequestParams) => Promise<HttpResponse<CreateResearchSessionResponse$1, ResearchErrorResponse>>;
58089
+ /**
58090
+ * No description
58091
+ *
58092
+ * @tags research
58093
+ * @name ResearchDeleteSession
58094
+ * @summary DELETE /research/sessions/{id} -- Delete a session.
58095
+ * @request DELETE:/api/v1/research/sessions/{id}
58096
+ * @secure
58097
+ */
58098
+ researchDeleteSession: (id: string, params?: RequestParams) => Promise<HttpResponse<void, ResearchErrorResponse>>;
58099
+ /**
58100
+ * No description
58101
+ *
58102
+ * @tags research
58103
+ * @name ResearchGetContradictions
58104
+ * @summary GET /research/sessions/{id}/contradictions -- Get contradictions.
58105
+ * @request GET:/api/v1/research/sessions/{id}/contradictions
58106
+ * @secure
58107
+ */
58108
+ researchGetContradictions: (id: string, params?: RequestParams) => Promise<HttpResponse<ResearchContradictionsResponse$1, ResearchErrorResponse>>;
58109
+ /**
58110
+ * No description
58111
+ *
58112
+ * @tags research
58113
+ * @name ResearchGetFindings
58114
+ * @summary GET /research/sessions/{id}/findings -- Get findings.
58115
+ * @request GET:/api/v1/research/sessions/{id}/findings
58116
+ * @secure
58117
+ */
58118
+ researchGetFindings: (id: string, params?: RequestParams) => Promise<HttpResponse<ResearchFindingsResponse$1, ResearchErrorResponse>>;
58119
+ /**
58120
+ * No description
58121
+ *
58122
+ * @tags research
58123
+ * @name ResearchGetGaps
58124
+ * @summary GET /research/sessions/{id}/gaps -- Get knowledge gaps.
58125
+ * @request GET:/api/v1/research/sessions/{id}/gaps
58126
+ * @secure
58127
+ */
58128
+ researchGetGaps: (id: string, params?: RequestParams) => Promise<HttpResponse<ResearchGapsResponse$1, ResearchErrorResponse>>;
58129
+ /**
58130
+ * @description Returns the cached report if already assembled (e.g., from run_to_completion). Otherwise assembles a fresh report from the session's current state.
58131
+ *
58132
+ * @tags research
58133
+ * @name ResearchGetReport
58134
+ * @summary GET /research/sessions/{id}/report -- Get research report.
58135
+ * @request GET:/api/v1/research/sessions/{id}/report
58136
+ * @secure
58137
+ */
58138
+ researchGetReport: (id: string, params?: RequestParams) => Promise<HttpResponse<ResearchReportResponse$1, ResearchErrorResponse>>;
58139
+ /**
58140
+ * No description
58141
+ *
58142
+ * @tags research
58143
+ * @name ResearchGetSession
58144
+ * @summary GET /research/sessions/{id} -- Get session status.
58145
+ * @request GET:/api/v1/research/sessions/{id}
58146
+ * @secure
58147
+ */
58148
+ researchGetSession: (id: string, params?: RequestParams) => Promise<HttpResponse<GetSessionResponse, ResearchErrorResponse>>;
58149
+ /**
58150
+ * @description With a `session_id`, a successful ingest is RECORDED on that session — see [`record_ingest_on_session`] — so the paper appears in `GET /sessions/{id}`'s `papers` and every term the ingestion touched resolves back to it. Without one, the paper is ingested under the configured owner and nothing is recorded: there is no session to attribute it to, and picking one would be a guess. The markdown itself is `paper_to_markdown`'s — the same function a cycle ingests through — over the same `fetch_full_text` lane, gated on the same `full_text_ingestion` switch. A paper ingested by hand is therefore the same document in the KB as one the pipeline found, which is the only way the two can be reasoned over together. **Which knowledge base it lands in follows the session.** With a `session_id` the paper is ingested through that session's own client (the `SessionScope` tenanted by the session id) — the KB `/run` and `/complete` drive and the one the session's own discovery reads. Without a `session_id` there is no session tenant to adopt and the configured one stands: the paper is ingested for the deployment, not for any session, and nothing is recorded either. This route used to ingest into the configured tenant unconditionally. The recorded `PaperTermLink` then named term ids in a KB the session never searches, so it resolved nothing — attribution that exists on the session row and nowhere the reasoning can reach.
58151
+ *
58152
+ * @tags research
58153
+ * @name ResearchIngestPaper
58154
+ * @summary POST /research/papers/ingest -- Ingest a paper.
58155
+ * @request POST:/api/v1/research/papers/ingest
58156
+ * @secure
58157
+ */
58158
+ researchIngestPaper: (data: IngestPaperRequest$1, params?: RequestParams) => Promise<HttpResponse<IngestPaperResponse$1, ResearchErrorResponse>>;
58159
+ /**
58160
+ * @description Tenant-scoped via the `X-Tenant-Id` header (matching how chat conversations are listed). Returns lightweight summaries, newest first.
58161
+ *
58162
+ * @tags research
58163
+ * @name ResearchListSessions
58164
+ * @summary GET /research/sessions -- List the requesting tenant's research sessions.
58165
+ * @request GET:/api/v1/research/sessions
58166
+ * @secure
58167
+ */
58168
+ researchListSessions: (params?: RequestParams) => Promise<HttpResponse<ListResearchSessionsResponse$1, ResearchErrorResponse>>;
58169
+ /**
58170
+ * @description A session interrupted (e.g. swept to `Failed` after a server restart killed its in-process pipeline) is otherwise stuck — this re-runs the SAME pipeline, continuing from its persisted partial progress (papers ingested, findings, cycles). Rejects an already-`Completed` session with 409.
58171
+ *
58172
+ * @tags research
58173
+ * @name ResearchResumeSession
58174
+ * @summary POST /research/sessions/{id}/resume -- Resume an interrupted/failed session.
58175
+ * @request POST:/api/v1/research/sessions/{id}/resume
58176
+ * @secure
58177
+ */
58178
+ researchResumeSession: (id: string, params?: RequestParams) => Promise<HttpResponse<ResearchReportResponse$1, ResearchErrorResponse>>;
58179
+ /**
58180
+ * @description The cycle runs against the SESSION's knowledge base — the tenant named by the session id, built by the one `session_scope` helper — which is the same KB `POST /sessions/{id}/complete` drives and the same one this session's own discovery reads. **This route used to run on the app-state orchestrator**, i.e. the deployment's `OSFKB_TENANT_ID`, so a cycle here and a cycle under `/complete` built two different knowledge bases for one session: entities the cycle ingested were unreachable from the session's own `find_by_sort`, and they merged instead with every other session's and with the chat data sharing the config tenant — the exact outcome the per-session tenant exists to prevent. Nothing in this repository, its SDKs or the two frontends calls `/run`; it is an operator-driven single-step route, so no client depended on the old destination. **Consequence for a session that ran `/run` before this fix:** those cycles' terms are in the config tenant and are NOT migrated. The session row itself is unaffected — cycles, findings, contradictions and gaps live on the session, not in the KB, so every `GET` on it reads back exactly what it did — but the term ids those older cycles recorded resolve in the config tenant only. A further `/run` (or `/complete`) on such a session ingests into the session's own KB, which starts out without that earlier work; re-running it there is the only way to bring it across.
58181
+ *
58182
+ * @tags research
58183
+ * @name ResearchRunCycle
58184
+ * @summary POST /research/sessions/{id}/run -- Run one research cycle.
58185
+ * @request POST:/api/v1/research/sessions/{id}/run
58186
+ * @secure
58187
+ */
58188
+ researchRunCycle: (id: string, params?: RequestParams) => Promise<HttpResponse<RunResearchCycleResponse, ResearchErrorResponse>>;
58189
+ /**
58190
+ * @description The research pipeline is long-running (multiple cycles, each ingesting papers through the LLM — minutes, sometimes longer than any reasonable HTTP client/proxy timeout). It runs in a DETACHED [`tokio::spawn`] task so that a client disconnect or timeout on THIS request does not cancel the run: tokio tasks are not aborted when their `JoinHandle` is dropped, so the work continues and keeps syncing status into `state.sessions` for `GET /sessions/{id}` pollers (the UI fires this fire-and-forget, then polls). If the client stays connected we still await the task and return the full report, preserving the synchronous response contract. `run_pipeline` releases the write lock between expensive operations so that `GET /sessions/{id}` can read the current status while the pipeline runs.
58191
+ *
58192
+ * @tags research
58193
+ * @name ResearchRunToCompletion
58194
+ * @summary POST /research/sessions/{id}/complete -- Run to completion.
58195
+ * @request POST:/api/v1/research/sessions/{id}/complete
58196
+ * @secure
58197
+ */
58198
+ researchRunToCompletion: (id: string, params?: RequestParams) => Promise<HttpResponse<ResearchReportResponse$1, ResearchErrorResponse>>;
58199
+ /**
58200
+ * No description
58201
+ *
58202
+ * @tags research
58203
+ * @name ResearchSearchPapers
58204
+ * @summary POST /research/papers/search -- Search for papers.
58205
+ * @request POST:/api/v1/research/papers/search
58206
+ * @secure
58207
+ */
58208
+ researchSearchPapers: (data: SearchPapersRequest$1, params?: RequestParams) => Promise<HttpResponse<SearchPapersResponse$1, any>>;
58209
+ /**
58210
+ * No description
58211
+ *
58212
+ * @tags research
58213
+ * @name ResearchVerifyClaim
58214
+ * @summary POST /research/claims/verify -- Verify a claim.
58215
+ * @request POST:/api/v1/research/claims/verify
58216
+ * @secure
58217
+ */
58218
+ researchVerifyClaim: (data: VerifyClaimRequest$1, params?: RequestParams) => Promise<HttpResponse<VerifyClaimResponse$1, ResearchErrorResponse>>;
58219
+ }
58220
+
57026
58221
  /** Source of paper metadata. */
57027
58222
  type PaperSource = 'PubMed' | 'SemanticScholar' | 'CrossRef' | 'ArXiv';
57028
58223
  /** Request to search for papers across external sources. */
@@ -57064,8 +58259,10 @@ interface PaperMetadataDto {
57064
58259
  * The join key between a paper listed on a session and the `paperKey`
57065
58260
  * carried by findings, evidence items and contradiction sides — `doi`,
57066
58261
  * `pmid` and `arxivId` are each individually optional, so this is the only
57067
- * identifier guaranteed for every paper. `null` only when talking to a
57068
- * backend that predates paper attribution.
58262
+ * identifier guaranteed for every paper. The backend derives it for every
58263
+ * one, and the spec marks it required; it is optional here only so the SDK
58264
+ * keeps working against a deployment that predates paper attribution, where
58265
+ * it arrives as `null`.
57069
58266
  */
57070
58267
  paperKey?: string | null;
57071
58268
  }
@@ -57143,6 +58340,17 @@ interface ResearchSessionResponse {
57143
58340
  * length. Empty against a backend that does not send it.
57144
58341
  */
57145
58342
  papers: PaperMetadataDto[];
58343
+ /**
58344
+ * Total papers retrieved from external sources, including by the cycle
58345
+ * currently running.
58346
+ *
58347
+ * Live throughout a run, unlike `cycles[].papersRetrieved`, which a cycle
58348
+ * only publishes once it completes — minutes after the papers arrived.
58349
+ * Deriving the figure from `cycles` alone therefore renders `0` over a
58350
+ * visibly growing paper list for most of a session; read this instead, and
58351
+ * keep `cycles[].papersRetrieved` for the per-cycle breakdown.
58352
+ */
58353
+ totalPapersRetrieved: number;
57146
58354
  /** Total papers ingested. */
57147
58355
  totalPapersIngested: number;
57148
58356
  /** Total findings. */
@@ -57164,6 +58372,12 @@ interface ResearchSessionSummaryDto {
57164
58372
  question: string;
57165
58373
  /** Current session status. */
57166
58374
  status: ResearchSessionStatusDto;
58375
+ /**
58376
+ * Total papers retrieved from external sources, including by the cycle
58377
+ * currently running — the list view's half of the same live progress
58378
+ * {@link ResearchSessionResponse.totalPapersRetrieved} carries.
58379
+ */
58380
+ totalPapersRetrieved: number;
57167
58381
  /** Total papers ingested. */
57168
58382
  totalPapersIngested: number;
57169
58383
  /** Total findings. */
@@ -57207,13 +58421,6 @@ interface ResearchCycleResultDto {
57207
58421
  /** Search queries used. */
57208
58422
  searchQueries: string[];
57209
58423
  }
57210
- /** Optional parameters for running a research cycle. */
57211
- interface RunResearchCycleRequest {
57212
- /** Additional search queries to include. */
57213
- additionalQueries?: string[];
57214
- /** Override maximum papers for this cycle. */
57215
- maxPapersThisCycle?: number;
57216
- }
57217
58424
  /** Response from running a research cycle. */
57218
58425
  interface ResearchCycleResponse {
57219
58426
  /** Session ID. */
@@ -57479,6 +58686,18 @@ interface VerifyClaimRequest {
57479
58686
  claimTermId: string;
57480
58687
  /** Evidence sort ID (UUID). */
57481
58688
  evidenceSortId: string;
58689
+ /**
58690
+ * Session whose knowledge base holds the claim, if any.
58691
+ *
58692
+ * A research session's terms live under a tenant of its own, so a claim a
58693
+ * run produced is invisible to a lookup against the deployment's configured
58694
+ * tenant — name the session and the verification is performed where the term
58695
+ * actually is. Omit it for a claim asserted outside any session.
58696
+ *
58697
+ * The session must belong to the caller's tenant; another tenant's session id
58698
+ * answers 404, exactly as an absent one does.
58699
+ */
58700
+ sessionId?: string | null;
57482
58701
  }
57483
58702
  /** Response from claim verification. */
57484
58703
  interface VerifyClaimResponse {
@@ -57524,13 +58743,12 @@ type research_ResearchSessionSummaryDto = ResearchSessionSummaryDto;
57524
58743
  type research_ResearchStatisticsDto = ResearchStatisticsDto;
57525
58744
  type research_ResiduatedFeatureDto = ResiduatedFeatureDto;
57526
58745
  type research_ResolutionStrategyDto = ResolutionStrategyDto;
57527
- type research_RunResearchCycleRequest = RunResearchCycleRequest;
57528
58746
  type research_SearchPapersRequest = SearchPapersRequest;
57529
58747
  type research_SearchPapersResponse = SearchPapersResponse;
57530
58748
  type research_VerifyClaimRequest = VerifyClaimRequest;
57531
58749
  type research_VerifyClaimResponse = VerifyClaimResponse;
57532
58750
  declare namespace research {
57533
- export type { research_ContradictionDto as ContradictionDto, research_ContradictionResolutionDto as ContradictionResolutionDto, research_CreateResearchSessionRequest as CreateResearchSessionRequest, research_CreateResearchSessionResponse as CreateResearchSessionResponse, research_EvidenceItemSummaryDto as EvidenceItemSummaryDto, research_IngestPaperRequest as IngestPaperRequest, research_IngestPaperResponse as IngestPaperResponse, research_KnowledgeGapDto as KnowledgeGapDto, research_ListResearchSessionsResponse as ListResearchSessionsResponse, research_PaperMetadataDto as PaperMetadataDto, research_PaperRefDto as PaperRefDto, research_PaperSearchResultDto as PaperSearchResultDto, research_PaperSource as PaperSource, research_ProvenanceStepDto as ProvenanceStepDto, research_ReportVerificationDto as ReportVerificationDto, research_ResearchContradictionsResponse as ResearchContradictionsResponse, research_ResearchCycleResponse as ResearchCycleResponse, research_ResearchCycleResultDto as ResearchCycleResultDto, research_ResearchFindingDto as ResearchFindingDto, research_ResearchFindingsResponse as ResearchFindingsResponse, research_ResearchGapsResponse as ResearchGapsResponse, research_ResearchReportResponse as ResearchReportResponse, research_ResearchSessionResponse as ResearchSessionResponse, research_ResearchSessionStatusDto as ResearchSessionStatusDto, research_ResearchSessionSummaryDto as ResearchSessionSummaryDto, research_ResearchStatisticsDto as ResearchStatisticsDto, research_ResiduatedFeatureDto as ResiduatedFeatureDto, research_ResolutionStrategyDto as ResolutionStrategyDto, research_RunResearchCycleRequest as RunResearchCycleRequest, research_SearchPapersRequest as SearchPapersRequest, research_SearchPapersResponse as SearchPapersResponse, research_VerifyClaimRequest as VerifyClaimRequest, research_VerifyClaimResponse as VerifyClaimResponse };
58751
+ export type { research_ContradictionDto as ContradictionDto, research_ContradictionResolutionDto as ContradictionResolutionDto, research_CreateResearchSessionRequest as CreateResearchSessionRequest, research_CreateResearchSessionResponse as CreateResearchSessionResponse, research_EvidenceItemSummaryDto as EvidenceItemSummaryDto, research_IngestPaperRequest as IngestPaperRequest, research_IngestPaperResponse as IngestPaperResponse, research_KnowledgeGapDto as KnowledgeGapDto, research_ListResearchSessionsResponse as ListResearchSessionsResponse, research_PaperMetadataDto as PaperMetadataDto, research_PaperRefDto as PaperRefDto, research_PaperSearchResultDto as PaperSearchResultDto, research_PaperSource as PaperSource, research_ProvenanceStepDto as ProvenanceStepDto, research_ReportVerificationDto as ReportVerificationDto, research_ResearchContradictionsResponse as ResearchContradictionsResponse, research_ResearchCycleResponse as ResearchCycleResponse, research_ResearchCycleResultDto as ResearchCycleResultDto, research_ResearchFindingDto as ResearchFindingDto, research_ResearchFindingsResponse as ResearchFindingsResponse, research_ResearchGapsResponse as ResearchGapsResponse, research_ResearchReportResponse as ResearchReportResponse, research_ResearchSessionResponse as ResearchSessionResponse, research_ResearchSessionStatusDto as ResearchSessionStatusDto, research_ResearchSessionSummaryDto as ResearchSessionSummaryDto, research_ResearchStatisticsDto as ResearchStatisticsDto, research_ResiduatedFeatureDto as ResiduatedFeatureDto, research_ResolutionStrategyDto as ResolutionStrategyDto, research_SearchPapersRequest as SearchPapersRequest, research_SearchPapersResponse as SearchPapersResponse, research_VerifyClaimRequest as VerifyClaimRequest, research_VerifyClaimResponse as VerifyClaimResponse };
57534
58752
  }
57535
58753
 
57536
58754
  /**
@@ -57546,14 +58764,14 @@ declare namespace research {
57546
58764
  * Research sessions progress through states: Created -> Bootstrapping ->
57547
58765
  * Retrieving -> Ingesting -> Verifying -> Reporting -> Completed (or Failed).
57548
58766
  *
57549
- * Delegates to the generated HTTP client for type-safe transport with
57550
- * automatic serialization, authentication, retry, and timeout behavior.
58767
+ * Delegates to the generated `Research` route class for type-safe transport
58768
+ * with automatic serialization, authentication, retry, and timeout behavior.
57551
58769
  */
57552
58770
  declare class ResearchClient {
57553
58771
  /** @internal */
57554
- private readonly http;
58772
+ private readonly api;
57555
58773
  /** @internal */
57556
- constructor(http: HttpClient);
58774
+ constructor(api: Research);
57557
58775
  /**
57558
58776
  * Create a new research session for a given research question.
57559
58777
  *
@@ -57621,7 +58839,6 @@ declare class ResearchClient {
57621
58839
  * Run a single research cycle within a session.
57622
58840
  *
57623
58841
  * @param sessionId - The session ID (UUID).
57624
- * @param request - Optional parameters for the cycle (additional queries, paper limit).
57625
58842
  * @returns Cycle results and whether the session has converged.
57626
58843
  * @throws {ApiError} If the session does not exist or the request fails.
57627
58844
  *
@@ -57631,39 +58848,52 @@ declare class ResearchClient {
57631
58848
  * claims, and detect contradictions. The `converged` field indicates
57632
58849
  * whether further cycles are needed.
57633
58850
  *
58851
+ * The endpoint takes no body: the cycle's budget and queries come from the
58852
+ * session, which fixed them when it was created. This method used to accept
58853
+ * `additionalQueries` and `maxPapersThisCycle` and send them as one; the
58854
+ * handler has no body extractor, so they were read by nothing and silently
58855
+ * changed nothing. Set the budget through `maxPapers` on
58856
+ * {@link createSession} instead.
58857
+ *
57634
58858
  * @example
57635
58859
  * ```typescript
57636
- * const result = await client.research.runCycle('session-uuid', {
57637
- * additionalQueries: ['beta-lactamase gene transfer'],
57638
- * maxPapersThisCycle: 10,
57639
- * });
58860
+ * const result = await client.research.runCycle('session-uuid');
57640
58861
  * console.log(result.cycle.papersIngested); // 8
57641
58862
  * console.log(result.cycle.contradictionsDetected); // 1
57642
58863
  * console.log(result.converged); // false
57643
58864
  * ```
57644
58865
  */
57645
- runCycle(sessionId: string, request?: RunResearchCycleRequest): Promise<ResearchCycleResponse>;
58866
+ runCycle(sessionId: string): Promise<ResearchCycleResponse>;
57646
58867
  /**
57647
58868
  * Run the research session to completion (all remaining cycles).
57648
58869
  *
57649
58870
  * @param sessionId - The session ID (UUID).
57650
- * @returns Final session state after all cycles have completed.
57651
- * @throws {ApiError} If the session does not exist or the request fails.
58871
+ * @returns The assembled report the same body {@link getReport} serves.
58872
+ * @throws {ApiError} 404 if the session does not exist, 409 if a pipeline is
58873
+ * already running for it.
57652
58874
  *
57653
58875
  * @remarks
57654
58876
  * Runs cycles until convergence (no new knowledge gaps) or the maximum
57655
58877
  * cycle count is reached. This may take significant time depending on
57656
- * the research question complexity and paper availability.
58878
+ * the research question complexity and paper availability, so the run is
58879
+ * detached server-side: a client that disconnects does not cancel it. Poll
58880
+ * {@link getSession} for progress.
58881
+ *
58882
+ * **This returns a report, not a session.** It was typed as
58883
+ * {@link ResearchSessionResponse} and normalized as one, so every field a
58884
+ * session has and a report does not — `cycles`, `papers`, `status`, the
58885
+ * totals — came back `undefined` while typed as present. The endpoint has
58886
+ * always answered with the report.
57657
58887
  *
57658
58888
  * @example
57659
58889
  * ```typescript
57660
- * const session = await client.research.runToCompletion('session-uuid');
57661
- * console.log(session.status); // "Completed"
57662
- * console.log(session.totalPapersIngested); // 47
57663
- * console.log(session.cycles.length); // 4
58890
+ * const report = await client.research.runToCompletion('session-uuid');
58891
+ * console.log(report.summary);
58892
+ * console.log(report.statistics.totalPapersIngested); // 47
58893
+ * console.log(report.statistics.totalCycles); // 4
57664
58894
  * ```
57665
58895
  */
57666
- runToCompletion(sessionId: string): Promise<ResearchSessionResponse>;
58896
+ runToCompletion(sessionId: string): Promise<ResearchReportResponse>;
57667
58897
  /**
57668
58898
  * Resume an interrupted or failed research session.
57669
58899
  *
@@ -57675,14 +58905,17 @@ declare class ResearchClient {
57675
58905
  * typically calls this fire-and-forget and polls {@link getSession}.
57676
58906
  *
57677
58907
  * @param sessionId - The session ID (UUID) to resume.
57678
- * @throws {ApiError} 409 if the session is already `Completed`, 404 if unknown.
58908
+ * @returns The assembled report, on the same terms as {@link runToCompletion}
58909
+ * — a report, not a session.
58910
+ * @throws {ApiError} 409 if the session is already `Completed` or a pipeline
58911
+ * is already running for it, 404 if unknown.
57679
58912
  *
57680
58913
  * @example
57681
58914
  * ```ts
57682
58915
  * await client.research.resumeSession('session-uuid');
57683
58916
  * ```
57684
58917
  */
57685
- resumeSession(sessionId: string): Promise<ResearchSessionResponse>;
58918
+ resumeSession(sessionId: string): Promise<ResearchReportResponse>;
57686
58919
  /**
57687
58920
  * Delete a research session and all associated data.
57688
58921
  *
@@ -58367,6 +59600,15 @@ declare class Ui<SecurityDataType = unknown> {
58367
59600
 
58368
59601
  /** Layout mode for the UI surface. Re-exported from generated types (no camelCase diff). */
58369
59602
  type LayoutModeDto = LayoutModeDto$1;
59603
+ /**
59604
+ * One accumulated UI customization from a multi-turn conversation.
59605
+ *
59606
+ * Re-exported from the generated types: the wire shape is already snake_case
59607
+ * throughout (`customization_type`, `props_override`), so there is no camelCase
59608
+ * counterpart to hand-write. Typed as `unknown[]` until the backend described
59609
+ * this surface, which is why nothing checked what a caller put here.
59610
+ */
59611
+ type UICustomizationDto = UICustomizationDto$2;
58370
59612
  /**
58371
59613
  * Safety tier the server assigns to an OSFQL statement carried by a UI action.
58372
59614
  *
@@ -58512,7 +59754,7 @@ interface UIAssemblyStatsDto {
58512
59754
  }
58513
59755
  /** Request to describe a UI for a sort. */
58514
59756
  interface UIDescribeRequest {
58515
- customizations?: unknown[] | null;
59757
+ customizations?: UICustomizationDto[] | null;
58516
59758
  loadData?: boolean;
58517
59759
  maxComponents?: number;
58518
59760
  maxDepth?: number;
@@ -58697,6 +59939,7 @@ type ui_UIActionResponse = UIActionResponse;
58697
59939
  type ui_UIAssemblyStatsDto = UIAssemblyStatsDto;
58698
59940
  type ui_UICatalogEntry = UICatalogEntry;
58699
59941
  type ui_UICatalogResponse = UICatalogResponse;
59942
+ type ui_UICustomizationDto = UICustomizationDto;
58700
59943
  type ui_UIDescribeRequest = UIDescribeRequest;
58701
59944
  type ui_UIDescribeResponse = UIDescribeResponse;
58702
59945
  type ui_UIDescriptorDto = UIDescriptorDto;
@@ -58706,7 +59949,7 @@ type ui_UiSort = UiSort;
58706
59949
  type ui_ValidationRuleDto = ValidationRuleDto;
58707
59950
  type ui_ValidationTypeDto = ValidationTypeDto;
58708
59951
  declare namespace ui {
58709
- export type { ui_AffectedPreviewDto as AffectedPreviewDto, ui_LayoutModeDto as LayoutModeDto, ui_LayoutSlotDto as LayoutSlotDto, ui_LayoutSurfaceDto as LayoutSurfaceDto, ui_RiskTier as RiskTier, ui_UIActionDto as UIActionDto, ui_UIActionRequest as UIActionRequest, ui_UIActionResponse as UIActionResponse, ui_UIAssemblyStatsDto as UIAssemblyStatsDto, ui_UICatalogEntry as UICatalogEntry, ui_UICatalogResponse as UICatalogResponse, ui_UIDescribeRequest as UIDescribeRequest, ui_UIDescribeResponse as UIDescribeResponse, ui_UIDescriptorDto as UIDescriptorDto, ui_UIGenerateRequest as UIGenerateRequest, ui_UIGenerateResponse as UIGenerateResponse, ui_UiSort as UiSort, ui_ValidationRuleDto as ValidationRuleDto, ui_ValidationTypeDto as ValidationTypeDto };
59952
+ export type { ui_AffectedPreviewDto as AffectedPreviewDto, ui_LayoutModeDto as LayoutModeDto, ui_LayoutSlotDto as LayoutSlotDto, ui_LayoutSurfaceDto as LayoutSurfaceDto, ui_RiskTier as RiskTier, ui_UIActionDto as UIActionDto, ui_UIActionRequest as UIActionRequest, ui_UIActionResponse as UIActionResponse, ui_UIAssemblyStatsDto as UIAssemblyStatsDto, ui_UICatalogEntry as UICatalogEntry, ui_UICatalogResponse as UICatalogResponse, ui_UICustomizationDto as UICustomizationDto, ui_UIDescribeRequest as UIDescribeRequest, ui_UIDescribeResponse as UIDescribeResponse, ui_UIDescriptorDto as UIDescriptorDto, ui_UIGenerateRequest as UIGenerateRequest, ui_UIGenerateResponse as UIGenerateResponse, ui_UiSort as UiSort, ui_ValidationRuleDto as ValidationRuleDto, ui_ValidationTypeDto as ValidationTypeDto };
58710
59953
  }
58711
59954
 
58712
59955
  /**
@@ -58846,22 +60089,22 @@ declare class Compliance<SecurityDataType = unknown> {
58846
60089
  * No description
58847
60090
  *
58848
60091
  * @tags compliance
58849
- * @name GetSnapshot
60092
+ * @name GetPredictionSnapshot
58850
60093
  * @summary `GET /api/v1/predictions/snapshot/{id}`
58851
60094
  * @request GET:/api/v1/predictions/snapshot/{id}
58852
60095
  * @secure
58853
60096
  */
58854
- getSnapshot: (id: string, params?: RequestParams) => Promise<HttpResponse<PredictionSnapshot$1, any>>;
60097
+ getPredictionSnapshot: (id: string, params?: RequestParams) => Promise<HttpResponse<PredictionSnapshot$1, any>>;
58855
60098
  /**
58856
60099
  * No description
58857
60100
  *
58858
60101
  * @tags compliance
58859
- * @name List
60102
+ * @name ListAuditReceipts
58860
60103
  * @summary `GET /api/v1/compliance/audit/list`
58861
60104
  * @request GET:/api/v1/compliance/audit/list
58862
60105
  * @secure
58863
60106
  */
58864
- list: (query?: {
60107
+ listAuditReceipts: (query?: {
58865
60108
  /**
58866
60109
  * Return the full filtered set (export use case), bypassing the
58867
60110
  * bounded `limit`/`offset` window.
@@ -69806,11 +71049,11 @@ declare class Conformal<SecurityDataType = unknown> {
69806
71049
  * @description Compute a split-conformal non-conformity threshold from a labeled calibration set. Returns the threshold `τ` and a coverage certificate. The returned `threshold` should be passed verbatim to `POST /api/v1/conformal/predict`.
69807
71050
  *
69808
71051
  * @tags conformal
69809
- * @name Calibrate
71052
+ * @name CalibrateConformal
69810
71053
  * @summary `POST /api/v1/conformal/calibrate`
69811
71054
  * @request POST:/api/v1/conformal/calibrate
69812
71055
  */
69813
- calibrate: (data: ConformalCalibrateRequest$1, params?: RequestParams) => Promise<HttpResponse<ConformalCalibrateResponse$1, void>>;
71056
+ calibrateConformal: (data: ConformalCalibrateRequest$1, params?: RequestParams) => Promise<HttpResponse<ConformalCalibrateResponse$1, void>>;
69814
71057
  /**
69815
71058
  * @description Apply a pre-computed conformal threshold to unlabeled test inputs and return prediction sets with coverage certificates. A class `y` is included in an input's prediction set iff `1 − class_scores[y] ≤ threshold` (equivalently, `class_scores[y] ≥ 1 − threshold`). When no class meets this criterion the prediction set is empty and `abstains = true` is set on that input's result.
69816
71059
  *
@@ -70621,7 +71864,7 @@ declare class Speech<SecurityDataType = unknown> {
70621
71864
  * @request POST:/api/v1/speech/synthesize
70622
71865
  * @secure
70623
71866
  */
70624
- synthesizeSpeech: (data: SynthesizeSpeechRequest$1, params?: RequestParams) => Promise<HttpResponse<void, void>>;
71867
+ synthesizeSpeech: (data: SynthesizeSpeechRequest$1, params?: RequestParams) => Promise<HttpResponse<Blob, void>>;
70625
71868
  /**
70626
71869
  * @description POST /api/v1/speech/transcribe
70627
71870
  *
@@ -70938,12 +72181,12 @@ declare class Connectors<SecurityDataType = unknown> {
70938
72181
  * @description GET /api/v1/connectors/manage
70939
72182
  *
70940
72183
  * @tags connectors
70941
- * @name List
72184
+ * @name ListConnectors
70942
72185
  * @summary List tenant's connectors.
70943
72186
  * @request GET:/api/v1/connectors/manage
70944
72187
  * @secure
70945
72188
  */
70946
- list: (params?: RequestParams) => Promise<HttpResponse<ConnectorInstanceDto[], void>>;
72189
+ listConnectors: (params?: RequestParams) => Promise<HttpResponse<ConnectorInstanceDto[], void>>;
70947
72190
  /**
70948
72191
  * @description GET /api/v1/connector-types
70949
72192
  *
@@ -71151,6 +72394,148 @@ declare class ConnectorsClient {
71151
72394
  oauthCallback(name: string, query?: OAuthCallbackQuery): Promise<Response>;
71152
72395
  }
71153
72396
 
72397
+ declare class Embeddings<SecurityDataType = unknown> {
72398
+ http: HttpClient<SecurityDataType>;
72399
+ constructor(http: HttpClient<SecurityDataType>);
72400
+ /**
72401
+ * @description POST /api/v1/embeddings/rank
72402
+ *
72403
+ * @tags embeddings
72404
+ * @name RankEmbeddings
72405
+ * @summary Score every candidate against the query by embedding cosine similarity.
72406
+ * @request POST:/api/v1/embeddings/rank
72407
+ * @secure
72408
+ */
72409
+ rankEmbeddings: (data: EmbeddingRankRequest$1, params?: RequestParams) => Promise<HttpResponse<EmbeddingRankResponse$1, void>>;
72410
+ }
72411
+
72412
+ /**
72413
+ * Embedding-space ranking — `POST /api/v1/embeddings/rank`.
72414
+ *
72415
+ * Scores candidate texts against a query by cosine similarity in the
72416
+ * deployment's shared sentence-embedding space. The endpoint never reorders and
72417
+ * never truncates: it reports one similarity per candidate, in request order,
72418
+ * and leaves the ranking policy to the caller.
72419
+ *
72420
+ * Distinct from the RAG search in `types/rag.ts` (which retrieves from the
72421
+ * knowledge base) — nothing here reads or writes the KB.
72422
+ *
72423
+ * @module
72424
+ */
72425
+ /** Body of `POST /api/v1/embeddings/rank` — one query, and the texts to score against it. */
72426
+ interface EmbeddingRankRequest {
72427
+ /**
72428
+ * Candidate texts, scored in place — the response is index-aligned with this
72429
+ * list, so the caller can zip the scores back onto whatever it retrieved.
72430
+ *
72431
+ * An empty list is valid and yields an empty score list. The backend caps the
72432
+ * list at 512 candidates and answers `400` above that; rank in pages instead.
72433
+ * A blank candidate is not an error — it keeps its slot and scores `0`.
72434
+ */
72435
+ candidates: string[];
72436
+ /**
72437
+ * The text every candidate is scored against. Must be non-blank
72438
+ * (the backend answers `400` otherwise).
72439
+ *
72440
+ * Capped at 8192 **characters**, as is each candidate; longer text is a `400`.
72441
+ */
72442
+ query: string;
72443
+ }
72444
+ /** Response of `POST /api/v1/embeddings/rank`. */
72445
+ interface EmbeddingRankResponse {
72446
+ /**
72447
+ * Cosine similarity in `[-1, 1]`, same length and same order as the request's
72448
+ * `candidates` — index `i` scores `candidates[i]`.
72449
+ *
72450
+ * Higher is more similar. A candidate with no scoreable text (blank or
72451
+ * whitespace-only) scores `0`, which is the same value an orthogonal candidate
72452
+ * gets: absence of signal, not evidence of dissimilarity.
72453
+ */
72454
+ scores: number[];
72455
+ }
72456
+
72457
+ type embeddings_EmbeddingRankRequest = EmbeddingRankRequest;
72458
+ type embeddings_EmbeddingRankResponse = EmbeddingRankResponse;
72459
+ declare namespace embeddings {
72460
+ export type { embeddings_EmbeddingRankRequest as EmbeddingRankRequest, embeddings_EmbeddingRankResponse as EmbeddingRankResponse };
72461
+ }
72462
+
72463
+ /**
72464
+ * Resource client for embedding-space ranking
72465
+ * (`POST /api/v1/embeddings/rank`).
72466
+ *
72467
+ * @remarks
72468
+ * Scores candidate texts against a query by cosine similarity in the
72469
+ * deployment's shared sentence-embedding space — the same embedder the backend
72470
+ * already loads, so a caller does not have to ship a second sentence
72471
+ * transformer into its own process just to choose which of N retrieved items to
72472
+ * spend an expensive step on.
72473
+ *
72474
+ * The endpoint is a pure function of the request: it reads no tenant data,
72475
+ * writes nothing, and never reorders or truncates. It reports a similarity per
72476
+ * candidate and stops there; the ranking policy stays with the caller.
72477
+ *
72478
+ * Uses the snake_case wire format (every field here happens to be a single
72479
+ * word); no value serialization (`ValueDto` / `FeatureValueDto`) is involved.
72480
+ *
72481
+ * Delegates to the generated `Embeddings` route class for the type-safe HTTP call.
72482
+ */
72483
+ declare class EmbeddingsClient {
72484
+ /** @internal */
72485
+ private readonly api;
72486
+ /** @internal */
72487
+ constructor(api: Embeddings);
72488
+ /**
72489
+ * Score every candidate against the query by embedding cosine similarity.
72490
+ *
72491
+ * @param request - The query and the candidate texts to score against it.
72492
+ * @returns `scores` — one cosine similarity in `[-1, 1]` per candidate,
72493
+ * **index-aligned with `request.candidates`** (index `i` scores
72494
+ * `candidates[i]`) and the same length, so the scores can be zipped straight
72495
+ * back onto whatever was retrieved. Higher is more similar; a candidate
72496
+ * whose text is blank scores `0`.
72497
+ * @throws {BadRequestError} `400` — the query is blank, the candidate list is
72498
+ * over the backend's 512-candidate cap, or the query / a candidate is over
72499
+ * 8192 characters.
72500
+ * @throws {ApiError} `503` when the deployment has **no embedding backend
72501
+ * configured** (or its embedder is unreachable / misconfigured). The SDK
72502
+ * surfaces every 5xx as an `InternalServerError`; read its `status` to tell
72503
+ * `503` (no embedder) from `500` (ranking failed).
72504
+ *
72505
+ * @remarks
72506
+ * Distinguish "no embedder" from "no similarity": a deployment without an
72507
+ * embedding backend answers `503` rather than a fabricated score, precisely so
72508
+ * a caller cannot mistake it for "everything scored 0" and silently rank by
72509
+ * noise. The documented fallback on a `503` is to keep the source order.
72510
+ *
72511
+ * An empty `candidates` list is valid, not an error: it answers `200` with an
72512
+ * empty `scores` array, so a caller that retrieved nothing still gets a
72513
+ * well-formed, index-aligned response.
72514
+ *
72515
+ * A `0` score is absence of signal, not evidence of dissimilarity — it is also
72516
+ * what an orthogonal candidate and a blank candidate both receive.
72517
+ *
72518
+ * @example
72519
+ * ```typescript
72520
+ * const retrieved = [
72521
+ * { id: 'doc-1', text: 'Chaperones assist protein folding in the cytosol.' },
72522
+ * { id: 'doc-2', text: 'Quarterly revenue rose 12% year over year.' },
72523
+ * ];
72524
+ *
72525
+ * const { scores } = await client.embeddings.rank({
72526
+ * query: 'how proteins fold',
72527
+ * candidates: retrieved.map((doc) => doc.text),
72528
+ * });
72529
+ *
72530
+ * // Scores are index-aligned — zip them back onto what was retrieved.
72531
+ * const ranked = retrieved
72532
+ * .map((doc, i) => ({ doc, score: scores[i] }))
72533
+ * .sort((a, b) => b.score - a.score);
72534
+ * ```
72535
+ */
72536
+ rank(request: EmbeddingRankRequest): Promise<EmbeddingRankResponse>;
72537
+ }
72538
+
71154
72539
  /** Core knowledge base operations — types, records, rules, functions, constraints, and queries. */
71155
72540
  interface CoreGroup {
71156
72541
  readonly types: SortsClient;
@@ -71442,6 +72827,8 @@ declare class ReasoningLayerClient {
71442
72827
  readonly speech: SpeechClient;
71443
72828
  /** External data connectors — register / list / remove / connect / disconnect + OAuth callback. */
71444
72829
  readonly connectors: ConnectorsClient;
72830
+ /** Embedding-space ranking — cosine score per candidate against a query, index-aligned. */
72831
+ readonly embeddings: EmbeddingsClient;
71445
72832
  private _core?;
71446
72833
  private _ai?;
71447
72834
  private _reasoning?;
@@ -72916,4 +74303,4 @@ declare function toUntaggedFeatures(features: PlainFeatureMap): Record<string, F
72916
74303
  */
72917
74304
  declare function toTermInputDto(input: PsiTermInput | TermInputDto): TermInputDto;
72918
74305
 
72919
- export { ANY_ROLE, actionReviews as ActionReviews, actions as Actions, type AddFactRequest, type AddFactResponse, type AddRuleRequest, type AddRuleResponse, admin as Admin, agui as Agui, type AguiContextItem, type AguiEvent, type AguiFunctionCall, type AguiMessage, type AguiRole, type AguiRunOptions, type AguiTool, type AguiToolCall, type AiGroup, type AlcConcept, analysis as Analysis, type AnalysisGroup, anonymization as Anonymization, ApiError, type ApiResponse, type ArithmeticOp, type AuthConfig, AuthenticationError, authz as Authz, type AuthzAction, type AuthzDryRunRequest, type AuthzDryRunResponse, type AuthzEffect, type BackwardChainRequest, type BackwardChainResponse, BadRequestError, type BulkAddTermsRequest, type BulkAddTermsResponse, type BulkCreateSortsRequest, type BulkCreateSortsResponse, cdl as CDL, type CascadeOptions, type CatalogPage, causal as Causal, type CertificateDetail, chase as Chase, type ChaseArgDto, type ChaseAtomDto, type ChaseRunRequest, type ChaseRunResponse, type CheckDocumentRequest, type CheckDocumentResponse, type CheckFinding, type CheckSummary, type ClaimAssessment, type ClaimCitation, type ClaimSubtype, type ClaimVerdict, type ClassifyEdgesInput, type ClassifyEdgesVars, type ClearTermsResponse, type ClientConfig, cognitive as Cognitive, type CognitiveStrategyDto, coherence as Coherence, type CoherenceAnalyzeRequest, type CoherenceAnalyzeResponse, collections as Collections, communities as Communities, type CompareDocumentsRequest, type ComparisonOp, compliance as Compliance, complianceMarkings as ComplianceMarkings, conformal as Conformal, conformance as Conformance, type ConformanceCheckResponse, type ConformanceRepairResponse, type ConformanceRequest, connectors as Connectors, type ConstrainedPlainVar, Constraint, ConstraintViolationError, constraints as Constraints, control as Control, conversation as Conversation, type ConversationMessageRequest, type ConversationMessageResponse, type ConversationSummaryDto, type ConversationTurnsResponse, type CoreGroup, corpus as Corpus, type CorpusBridgesRequest, type CorpusBridgesResponse, type CorpusCommunitiesRequest, type CorpusCommunitiesResponse, type CorpusCrossCuttingRequest, type CorpusCrossCuttingResponse, type CorpusScope, type CreateResearchSessionRequest, type CreateResearchSessionResponse, type CreateSortRequest, type CreateTermRequest, type CtlFormula, dl as DL, type DataGroup, demo as Demo, discovery as Discovery, type DlSatisfiableRequest, type DlSatisfiableResponse, type DlSubsumesRequest, type DlSubsumesResponse, documentCheck as DocumentCheck, documents as Documents, type EqLiteralDto, type EqualityAtomDto, type ErrorResponse$1 as ErrorResponse, execution as Execution, extract as Extract, feasibility as Feasibility, type FeatureInputValueDto, type FeatureValueDto, type FindingKind, type FindingSeverity, Flow, type FlowProblem as FlowBuilderProblem, type FlowEdgeInput, type FlowEdgeOptions, flowNetworks as FlowNetworks, type FlowNode, type FlowProblemInputBase, type FocusEntryDto, ForbiddenError, forecast as Forecast, type ForecastDomain, type ForecastDomainsResponse, type ForecastEntityInput, type ForecastRequest, type ForecastResponse, type ForwardChainRequest, type ForwardChainResponse, functions as Functions, fuzzy as Fuzzy, FuzzyShape, type FuzzyShapeDto, generation as Generation, type GlbRequest, type GlbResponse, type GraphSparqlQueryRequest, type GraphSparqlResults, guardrail as Guardrail, type GuardrailReport, type GuardrailRequest, type GuardrailSummary, 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 InlineDocument, type InstallList, type InstallPluginRequest, type InstallPluginResponse, type InstallState, type InstallSummary, type Interceptor, InternalServerError, type JsonValue$1 as JsonValue, type KripkeState, type KripkeTransition, LP, ltn as LTN, type ListCatalogParams, type ListConversationsResponse, type ListInstallsParams, type ListResearchSessionsResponse, type LtnInstance, type LtnQueryRequest, type LtnQueryResponse, type LtnRefuteRequest, type LtnRefuteResponse, type LtnRule, type LtnTrainRequest, type LtnTrainResponse, type LubRequest, type LubResponse, marketplace as Marketplace, type MarketplaceScope, 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, ontologyExport as OntologyExport, type OntologyExportDocument, type OntologyExportFormat, type OntologyExportOptions, ontologyFacade as OntologyFacade, type Operand, operations as Operations, optimize as Optimize, osfDiff as OsfDiff, type OsfDiffReport, type OsfDiffRequest, type OsfDiffResponse, type OsfDiffSelector, type OsfDiffSequenceReport, type OsfDiffSequenceRequest, type OsfDiffSequenceResponse, type OsfDiffTemporalRequest, 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, type PluginDependency, type PluginDetail, type PluginManifest, type PluginSummary, type PluginVersion, preferences as Preferences, proofEngine as ProofEngine, propertyGraph as PropertyGraph, type PropertyGraphErrorResponse, type PropertyGraphExecuteResponse, type PropertyGraphQueryRequest, type PropertyGraphTranslateResponse, type PropertyGraphValue, type PsiTermDto, type PsiTermInput, type PublishPluginRequest, type PublishPluginResponse, query as Query, rag as RAG, RateLimitError, type RateLimitInfo, reasoning as Reasoning, type ReasoningGroup, ReasoningLayerClient, ReasoningLayerError, type ReasoningStageDto, type ReasoningTraceDto, type RequestOptions, research as Research, type ResearchContradictionsResponse, type ResearchCycleResponse, type ResearchFindingsResponse, type ResearchGapsResponse, type ResearchReportResponse, type ResearchSessionResponse, type ResearchSessionSummaryDto, type ResolvedCoreferenceDto, reviews as Reviews, reward as Reward, row as Row, type RuleAggregatorDto, type RunAgentRequest, SDK_VERSION, sat as Sat, type SatLiteralDto, type SatSolveRequest, type SatSolveResponse, type SatVerdict, scenarios as Scenarios, scheduling as Scheduling, type SearchCatalogRequest, type SearchCatalogResponse, type SearchPapersRequest, type SearchPapersResponse, type SessionGraphDto, type SimpleTgdDto, smt as Smt, type SmtCheckRequest, type SmtCheckResponse, type SmtFunctionApplicationDto, type SmtVerdict, solver as Solver, SortBuilder, type SortDto, type SortInfoDto, sorts as Sorts, sources as Sources, spaces as Spaces, sparql as Sparql, type SparqlAskResults, type SparqlBindingSet, type SparqlEntailmentRegime, type SparqlQueryRequest, type SparqlQueryResults, type SparqlRdfTerm, type SparqlSelectResults, type SparqlTranslation, type SparqlUpdateRequest, type SparqlUpdateTranslation, speakers as Speakers, speech as Speech, statistical as Statistical, streaming as Streaming, synthetic as Synthetic, type SystemGroup, temporal as Temporal, type TemporalModelCheckRequest, type TemporalModelCheckResponse, type TemporalSeriesRequest, type TemporalSeriesResponse, type TemporalSeriesSpec, type TermDto, type TermInputArg, type TermInputDto, type TermListResponse, type TermPatternDto, type TermResponse, type TermSetSelector, terms as Terms, TimeoutError, translation as Translation, type TurnDto, ui as UI, type UpdateTermRequest, type UpgradeInstallRequest, utilities as Utilities, ValidationError, Value, type ValueDto, values as Values, verification as Verification, type VerifyClaimRequest, type VerifyClaimResponse, vision as Vision, visualization as Visualization, WebSocketClient, WebSocketConnection, webhookActions as WebhookActions, type WorkflowGroup, type YankPluginRequest, type YankPluginResponse, allen, constrained, discriminateFeatureValue, guard, isConstrainedPlainVar, isPsiTermInput, isTaggedValueDto, isUuid, psi, toTaggedFeatures, toTaggedValue, toTermInputDto, toUntaggedFeatures, toUntaggedValue };
74306
+ export { ANY_ROLE, actionReviews as ActionReviews, actions as Actions, type AddFactRequest, type AddFactResponse, type AddRuleRequest, type AddRuleResponse, admin as Admin, agui as Agui, type AguiContextItem, type AguiEvent, type AguiFunctionCall, type AguiMessage, type AguiRole, type AguiRunOptions, type AguiTool, type AguiToolCall, type AiGroup, type AlcConcept, analysis as Analysis, type AnalysisGroup, anonymization as Anonymization, ApiError, type ApiResponse, type ArithmeticOp, type AuthConfig, AuthenticationError, authz as Authz, type AuthzAction, type AuthzDryRunRequest, type AuthzDryRunResponse, type AuthzEffect, type BackwardChainRequest, type BackwardChainResponse, BadRequestError, type BulkAddTermsRequest, type BulkAddTermsResponse, type BulkCreateSortsRequest, type BulkCreateSortsResponse, cdl as CDL, type CascadeOptions, type CatalogPage, causal as Causal, type CertificateDetail, chase as Chase, type ChaseArgDto, type ChaseAtomDto, type ChaseRunRequest, type ChaseRunResponse, type CheckDocumentRequest, type CheckDocumentResponse, type CheckFinding, type CheckSummary, type ClaimAssessment, type ClaimCitation, type ClaimSubtype, type ClaimVerdict, type ClassifyEdgesInput, type ClassifyEdgesVars, type ClearTermsResponse, type ClientConfig, cognitive as Cognitive, type CognitiveStrategyDto, coherence as Coherence, type CoherenceAnalyzeRequest, type CoherenceAnalyzeResponse, collections as Collections, communities as Communities, type CompareDocumentsRequest, type ComparisonOp, compliance as Compliance, complianceMarkings as ComplianceMarkings, conformal as Conformal, conformance as Conformance, type ConformanceCheckResponse, type ConformanceRepairResponse, type ConformanceRequest, connectors as Connectors, type ConstrainedPlainVar, Constraint, ConstraintViolationError, constraints as Constraints, control as Control, conversation as Conversation, type ConversationMessageRequest, type ConversationMessageResponse, type ConversationSummaryDto, type ConversationTurnsResponse, type CoreGroup, corpus as Corpus, type CorpusBridgesRequest, type CorpusBridgesResponse, type CorpusCommunitiesRequest, type CorpusCommunitiesResponse, type CorpusCrossCuttingRequest, type CorpusCrossCuttingResponse, type CorpusScope, type CreateResearchSessionRequest, type CreateResearchSessionResponse, type CreateSortRequest, type CreateTermRequest, type CtlFormula, dl as DL, type DataGroup, demo as Demo, discovery as Discovery, type DlSatisfiableRequest, type DlSatisfiableResponse, type DlSubsumesRequest, type DlSubsumesResponse, documentCheck as DocumentCheck, documents as Documents, embeddings as Embeddings, type EqLiteralDto, type EqualityAtomDto, type ErrorResponse$1 as ErrorResponse, execution as Execution, extract as Extract, feasibility as Feasibility, type FeatureInputValueDto, type FeatureValueDto, type FindingKind, type FindingSeverity, Flow, type FlowProblem as FlowBuilderProblem, type FlowEdgeInput, type FlowEdgeOptions, flowNetworks as FlowNetworks, type FlowNode, type FlowProblemInputBase, type FocusEntryDto, ForbiddenError, forecast as Forecast, type ForecastDomain, type ForecastDomainsResponse, type ForecastEntityInput, type ForecastRequest, type ForecastResponse, type ForwardChainRequest, type ForwardChainResponse, functions as Functions, fuzzy as Fuzzy, FuzzyShape, type FuzzyShapeDto, generation as Generation, type GlbRequest, type GlbResponse, type GraphSparqlQueryRequest, type GraphSparqlResults, guardrail as Guardrail, type GuardrailReport, type GuardrailRequest, type GuardrailSummary, 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 InlineDocument, type InstallList, type InstallPluginRequest, type InstallPluginResponse, type InstallState, type InstallSummary, type Interceptor, InternalServerError, type JsonValue$1 as JsonValue, type KripkeState, type KripkeTransition, LP, ltn as LTN, type ListCatalogParams, type ListConversationsResponse, type ListInstallsParams, type ListResearchSessionsResponse, type LtnInstance, type LtnQueryRequest, type LtnQueryResponse, type LtnRefuteRequest, type LtnRefuteResponse, type LtnRule, type LtnTrainRequest, type LtnTrainResponse, type LubRequest, type LubResponse, marketplace as Marketplace, type MarketplaceScope, 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, ontologyExport as OntologyExport, type OntologyExportDocument, type OntologyExportFormat, type OntologyExportOptions, ontologyFacade as OntologyFacade, type Operand, operations as Operations, optimize as Optimize, osfDiff as OsfDiff, type OsfDiffReport, type OsfDiffRequest, type OsfDiffResponse, type OsfDiffSelector, type OsfDiffSequenceReport, type OsfDiffSequenceRequest, type OsfDiffSequenceResponse, type OsfDiffTemporalRequest, 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, type PluginDependency, type PluginDetail, type PluginManifest, type PluginSummary, type PluginVersion, preferences as Preferences, proofEngine as ProofEngine, propertyGraph as PropertyGraph, type PropertyGraphErrorResponse, type PropertyGraphExecuteResponse, type PropertyGraphQueryRequest, type PropertyGraphTranslateResponse, type PropertyGraphValue, type PsiTermDto, type PsiTermInput, type PublishPluginRequest, type PublishPluginResponse, query as Query, rag as RAG, RateLimitError, type RateLimitInfo, reasoning as Reasoning, type ReasoningGroup, ReasoningLayerClient, ReasoningLayerError, type ReasoningStageDto, type ReasoningTraceDto, type RequestOptions, research as Research, type ResearchContradictionsResponse, type ResearchCycleResponse, type ResearchFindingsResponse, type ResearchGapsResponse, type ResearchReportResponse, type ResearchSessionResponse, type ResearchSessionSummaryDto, type ResolvedCoreferenceDto, reviews as Reviews, reward as Reward, row as Row, type RuleAggregatorDto, type RunAgentRequest, SDK_VERSION, sat as Sat, type SatLiteralDto, type SatSolveRequest, type SatSolveResponse, type SatVerdict, scenarios as Scenarios, scheduling as Scheduling, type SearchCatalogRequest, type SearchCatalogResponse, type SearchPapersRequest, type SearchPapersResponse, type SessionGraphDto, type SimpleTgdDto, smt as Smt, type SmtCheckRequest, type SmtCheckResponse, type SmtFunctionApplicationDto, type SmtVerdict, solver as Solver, SortBuilder, type SortDto, type SortInfoDto, sorts as Sorts, sources as Sources, spaces as Spaces, sparql as Sparql, type SparqlAskResults, type SparqlBindingSet, type SparqlEntailmentRegime, type SparqlQueryRequest, type SparqlQueryResults, type SparqlRdfTerm, type SparqlSelectResults, type SparqlTranslation, type SparqlUpdateRequest, type SparqlUpdateTranslation, speakers as Speakers, speech as Speech, statistical as Statistical, streaming as Streaming, synthetic as Synthetic, type SystemGroup, temporal as Temporal, type TemporalModelCheckRequest, type TemporalModelCheckResponse, type TemporalSeriesRequest, type TemporalSeriesResponse, type TemporalSeriesSpec, type TermDto, type TermInputArg, type TermInputDto, type TermListResponse, type TermPatternDto, type TermResponse, type TermSetSelector, terms as Terms, TimeoutError, translation as Translation, type TurnDto, ui as UI, type UpdateTermRequest, type UpgradeInstallRequest, utilities as Utilities, ValidationError, Value, type ValueDto, values as Values, verification as Verification, type VerifyClaimRequest, type VerifyClaimResponse, vision as Vision, visualization as Visualization, WebSocketClient, WebSocketConnection, webhookActions as WebhookActions, type WorkflowGroup, type YankPluginRequest, type YankPluginResponse, allen, constrained, discriminateFeatureValue, guard, isConstrainedPlainVar, isPsiTermInput, isTaggedValueDto, isUuid, psi, toTaggedFeatures, toTaggedValue, toTermInputDto, toUntaggedFeatures, toUntaggedValue };