@kortexya/reasoninglayer 0.13.0 → 0.15.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -109,7 +109,7 @@ type JsonValue$1 = string | number | boolean | null | JsonValue$1[] | object;
109
109
  * This is the single source of truth for the version constant.
110
110
  * The `scripts/release.sh` script updates this value alongside `package.json`.
111
111
  */
112
- declare const SDK_VERSION = "0.13.0";
112
+ declare const SDK_VERSION = "0.15.1";
113
113
  /**
114
114
  * Configuration for the Reasoning Layer client.
115
115
  *
@@ -711,6 +711,39 @@ interface AgentSubVerdictDto$1 {
711
711
  /** Per-agent verdict: "safe", "unsafe", "partial", or "residuated" */
712
712
  verdict: string;
713
713
  }
714
+ /** Statistics for source text alignment quality */
715
+ interface AlignmentStatsDto {
716
+ /**
717
+ * Average fuzzy match ratio for fuzzy-aligned entities
718
+ * @format double
719
+ */
720
+ avg_fuzzy_ratio: number;
721
+ /**
722
+ * Number of entities with exact source text match
723
+ * @min 0
724
+ */
725
+ entities_aligned_exact: number;
726
+ /**
727
+ * Number of entities with fuzzy source text match
728
+ * @min 0
729
+ */
730
+ entities_aligned_fuzzy: number;
731
+ /**
732
+ * Number of entities with lesser (partial) source text match
733
+ * @min 0
734
+ */
735
+ entities_aligned_lesser: number;
736
+ /**
737
+ * Number of entities filtered out by alignment quality gate
738
+ * @min 0
739
+ */
740
+ entities_filtered_by_alignment: number;
741
+ /**
742
+ * Number of entities that could not be aligned to source text
743
+ * @min 0
744
+ */
745
+ entities_unaligned: number;
746
+ }
714
747
  /** Request to append residuations during unification */
715
748
  interface AppendResiduationsRequest$1 {
716
749
  session_id: string;
@@ -2941,6 +2974,57 @@ interface ContainmentVerificationDto$1 {
2941
2974
  */
2942
2975
  violation_count: number;
2943
2976
  }
2977
+ /**
2978
+ * Configuration for training on conversation data.
2979
+ *
2980
+ * Controls how synthetic conversation transcripts are generated
2981
+ * and scored during RL training with conversation environments.
2982
+ */
2983
+ interface ConversationTrainingConfigDto {
2984
+ /**
2985
+ * Optional agent ID to scope training to a specific agent's conversations
2986
+ * @format uuid
2987
+ */
2988
+ agent_id?: string | null;
2989
+ /**
2990
+ * Optional conversation IDs to train on specifically. When empty and
2991
+ * use_real_conversations is true, uses the most recent conversations.
2992
+ */
2993
+ conversation_ids?: string[];
2994
+ /**
2995
+ * Maximum turns per episode (default: 20)
2996
+ * @min 0
2997
+ */
2998
+ max_turns?: number;
2999
+ /**
3000
+ * Number of synthetic transcripts to generate for training (default: 10)
3001
+ * @min 0
3002
+ */
3003
+ num_transcripts?: number;
3004
+ /**
3005
+ * Reward for goal completion (default: 1.0)
3006
+ * @format double
3007
+ */
3008
+ reward_goal_completion?: number;
3009
+ /**
3010
+ * Step cost penalty (default: -0.01)
3011
+ * @format double
3012
+ */
3013
+ reward_step_cost?: number;
3014
+ /**
3015
+ * Reward for successful proof (default: 0.3)
3016
+ * @format double
3017
+ */
3018
+ reward_successful_proof?: number;
3019
+ /** Conversation topics for synthetic transcript generation */
3020
+ topics?: string[];
3021
+ /**
3022
+ * When true, loads actual conversation history from the knowledge base
3023
+ * instead of generating synthetic transcripts. The most recent N conversations
3024
+ * are used (controlled by num_transcripts).
3025
+ */
3026
+ use_real_conversations?: boolean;
3027
+ }
2944
3028
  /** A single coordinated resource set (N resources matched together) */
2945
3029
  interface CoordinatedResourceSet$1 {
2946
3030
  /**
@@ -4384,16 +4468,6 @@ interface DocumentProgressDto$1 {
4384
4468
  inference_rules_applied: number;
4385
4469
  /** LLM model name (if applicable). */
4386
4470
  model_name?: string | null;
4387
- /**
4388
- * OSF residuations created.
4389
- * @min 0
4390
- */
4391
- osf_residuations_created: number;
4392
- /**
4393
- * OSF residuations resumed.
4394
- * @min 0
4395
- */
4396
- osf_residuations_resumed: number;
4397
4471
  /**
4398
4472
  * References resolved.
4399
4473
  * @min 0
@@ -4419,6 +4493,16 @@ interface DocumentProgressDto$1 {
4419
4493
  * @min 0
4420
4494
  */
4421
4495
  relations_integrated: number;
4496
+ /**
4497
+ * Residuations created (suspended operations).
4498
+ * @min 0
4499
+ */
4500
+ residuations_created: number;
4501
+ /**
4502
+ * Residuations resumed.
4503
+ * @min 0
4504
+ */
4505
+ residuations_resumed: number;
4422
4506
  /**
4423
4507
  * Reviews persisted.
4424
4508
  * @min 0
@@ -4436,11 +4520,6 @@ interface DocumentProgressDto$1 {
4436
4520
  * @min 0
4437
4521
  */
4438
4522
  sorts_reused: number;
4439
- /**
4440
- * Sorts reused via GLB/feature matching.
4441
- * @min 0
4442
- */
4443
- sorts_reused_glb: number;
4444
4523
  /**
4445
4524
  * Sorts reused via semantic matching.
4446
4525
  * @min 0
@@ -5025,6 +5104,27 @@ interface EntityDto$1 {
5025
5104
  */
5026
5105
  sort_id: string;
5027
5106
  }
5107
+ /** Audit record for one substring-based entity merge. */
5108
+ interface EntityMergeAuditDto {
5109
+ /**
5110
+ * Term ID of the entity that was merged away (the shorter form).
5111
+ * @format uuid
5112
+ */
5113
+ merged_from_id: string;
5114
+ /** Name of the merged-away entity. */
5115
+ merged_from_name: string;
5116
+ /** Original sort name of the merged-away entity. */
5117
+ merged_from_sort: string;
5118
+ /**
5119
+ * Term ID of the surviving entity (the longer/canonical form).
5120
+ * @format uuid
5121
+ */
5122
+ merged_into_id: string;
5123
+ /** Name of the surviving entity. */
5124
+ merged_into_name: string;
5125
+ /** Sort name of the surviving entity (which won the merge). */
5126
+ merged_into_sort: string;
5127
+ }
5028
5128
  /** Per-entity verification detail. */
5029
5129
  interface EntityVerificationDetailDto$1 {
5030
5130
  /**
@@ -5362,6 +5462,25 @@ interface EvidenceAssessmentResponse$1 {
5362
5462
  */
5363
5463
  truthfulness: number;
5364
5464
  }
5465
+ /** DTO for evidence derivation configuration (wire format). */
5466
+ interface EvidenceDerivationConfigDto$1 {
5467
+ /**
5468
+ * Relations whose polarity depends on the target entity's sort.
5469
+ * Maps relation name → list of target sort names that make it negative.
5470
+ */
5471
+ context_dependent_relations?: Record<string, string[]>;
5472
+ /**
5473
+ * Default quality weight for NER-derived evidence (0.0-1.0).
5474
+ * @format double
5475
+ */
5476
+ default_quality_weight?: number;
5477
+ /** Sort name to use for derived evidence terms. */
5478
+ evidence_sort_name?: string;
5479
+ /** Relation names that indicate contradiction. */
5480
+ negative_relations?: string[];
5481
+ /** Relation names that indicate support. */
5482
+ positive_relations?: string[];
5483
+ }
5365
5484
  /** A single piece of evidence used in assessment */
5366
5485
  interface EvidenceItemDto$1 {
5367
5486
  /**
@@ -5749,6 +5868,90 @@ interface ExtractionStatsDto$1 {
5749
5868
  */
5750
5869
  total_llm_calls: number;
5751
5870
  }
5871
+ /** Adaptive: auto-select strategy based on learned patterns. The fallback field accepts any ExtractionStrategy variant (e.g. {"type": "llm"}). */
5872
+ interface ExtractionStrategyAdaptive$1 {
5873
+ /**
5874
+ * Extraction strategy — an internally tagged enum discriminated by the 'type' field.
5875
+ * Variants:
5876
+ * - `{"type": "llm"}` — LLM-based extraction
5877
+ * - `{"type": "local_ner"}` — local NER model (GLiNER2)
5878
+ * - `{"type": "hybrid", "ner_confidence_threshold": 0.8}` — NER + LLM fallback
5879
+ * - `{"type": "schema_guided", ...}` — NER + pattern-based, LLM when needed
5880
+ * - `{"type": "adaptive", "fallback": {...}}` — auto-select strategy
5881
+ */
5882
+ fallback: ExtractionStrategyDto;
5883
+ /**
5884
+ * Discriminator -- always "adaptive".
5885
+ * @example "adaptive"
5886
+ */
5887
+ type: string;
5888
+ }
5889
+ /**
5890
+ * ExtractionStrategyDto
5891
+ * Extraction strategy — an internally tagged enum discriminated by the 'type' field.
5892
+ * Variants:
5893
+ * - `{"type": "llm"}` — LLM-based extraction
5894
+ * - `{"type": "local_ner"}` — local NER model (GLiNER2)
5895
+ * - `{"type": "hybrid", "ner_confidence_threshold": 0.8}` — NER + LLM fallback
5896
+ * - `{"type": "schema_guided", ...}` — NER + pattern-based, LLM when needed
5897
+ * - `{"type": "adaptive", "fallback": {...}}` — auto-select strategy
5898
+ */
5899
+ type ExtractionStrategyDto = ({
5900
+ type: "adaptive";
5901
+ } & ExtractionStrategyAdaptive$1) | ({
5902
+ type: "hybrid";
5903
+ } & ExtractionStrategyHybrid$1) | ({
5904
+ type: "llm";
5905
+ } & ExtractionStrategyLlm$1) | ({
5906
+ type: "local_ner";
5907
+ } & ExtractionStrategyLocalNer$1) | ({
5908
+ type: "schema_guided";
5909
+ } & ExtractionStrategySchemaGuided$1);
5910
+ interface ExtractionStrategyHybrid$1 {
5911
+ /**
5912
+ * NER confidence threshold below which to use LLM (0.0-1.0).
5913
+ * @format float
5914
+ */
5915
+ ner_confidence_threshold: number;
5916
+ /**
5917
+ * Discriminator -- always `"hybrid"`.
5918
+ * @example "hybrid"
5919
+ */
5920
+ type: string;
5921
+ }
5922
+ interface ExtractionStrategyLlm$1 {
5923
+ /**
5924
+ * Discriminator -- always `"llm"`.
5925
+ * @example "llm"
5926
+ */
5927
+ type: string;
5928
+ }
5929
+ interface ExtractionStrategyLocalNer$1 {
5930
+ /**
5931
+ * Discriminator -- always `"local_ner"`.
5932
+ * @example "local_ner"
5933
+ */
5934
+ type: string;
5935
+ }
5936
+ interface ExtractionStrategySchemaGuided$1 {
5937
+ /** Whether to escalate to LLM for unknown entity types. */
5938
+ escalate_unknown_types: boolean;
5939
+ /**
5940
+ * NER confidence threshold below which to escalate to LLM (0.0-1.0).
5941
+ * @format float
5942
+ */
5943
+ ner_confidence_threshold: number;
5944
+ /**
5945
+ * Relation pattern confidence threshold (0.0-1.0).
5946
+ * @format float
5947
+ */
5948
+ relation_confidence_threshold: number;
5949
+ /**
5950
+ * Discriminator -- always `"schema_guided"`.
5951
+ * @example "schema_guided"
5952
+ */
5953
+ type: string;
5954
+ }
5752
5955
  /** A fact confidence entry for tagged forward chaining. */
5753
5956
  interface FactConfidenceEntry$1 {
5754
5957
  /**
@@ -6633,6 +6836,12 @@ interface FuzzySubsumptionRequest$1 {
6633
6836
  * @format uuid
6634
6837
  */
6635
6838
  general_term_id: string;
6839
+ /**
6840
+ * Enable lenient primitive matching (default: true).
6841
+ * When true, string mismatches use semantic similarity instead of
6842
+ * requiring exact equality, and the similarity oracle is consulted.
6843
+ */
6844
+ lenient?: boolean | null;
6636
6845
  /**
6637
6846
  * The specific (more concrete) term ID
6638
6847
  * @format uuid
@@ -8162,6 +8371,13 @@ interface IngestMarkdownRequest$1 {
8162
8371
  }
8163
8372
  /** Request to ingest RDF/OWL data */
8164
8373
  interface IngestRdfRequest$1 {
8374
+ /**
8375
+ * Whether to compute and store text embeddings for each ingested term.
8376
+ *
8377
+ * Default `true` because downstream extraction relies on embeddings.
8378
+ * Set to `false` only for opt-in fast structural-only ingest.
8379
+ */
8380
+ compute_embeddings?: boolean;
8165
8381
  /** RDF content in Turtle, N-Triples, or RDF/XML format */
8166
8382
  content: string;
8167
8383
  /** Format of the RDF content */
@@ -8171,7 +8387,7 @@ interface IngestRdfRequest$1 {
8171
8387
  /** Whether to also parse SHACL shapes from the content */
8172
8388
  parse_shacl?: boolean;
8173
8389
  }
8174
- /** Response from RDF ingestion */
8390
+ /** Response from RDF ingestion (sync mode, HTTP 201). */
8175
8391
  interface IngestRdfResponse$1 {
8176
8392
  /**
8177
8393
  * Number of SHACL shapes parsed
@@ -8237,6 +8453,14 @@ interface IngestionConfigDto$1 {
8237
8453
  * Default: true
8238
8454
  */
8239
8455
  enable_entity_filtering?: boolean;
8456
+ /**
8457
+ * Enable LLM-based evidence enrichment with statistical features.
8458
+ * After evidence terms are derived, makes one LLM call to extract
8459
+ * statistical measures (p-value, HR, CI, sample size, study design)
8460
+ * and attach them as features on evidence terms.
8461
+ * Default: false
8462
+ */
8463
+ enable_evidence_enrichment?: boolean;
8240
8464
  /**
8241
8465
  * Enable focused extraction prompts.
8242
8466
  * When schema discovery found types, uses a simplified prompt asking only
@@ -8244,6 +8468,17 @@ interface IngestionConfigDto$1 {
8244
8468
  * Default: true
8245
8469
  */
8246
8470
  enable_focused_extraction?: boolean;
8471
+ /**
8472
+ * Enable LLM-based coreference resolution for hard cases.
8473
+ * When true, after structural deduplication the pipeline runs parallel
8474
+ * per-pair LLM calls to resolve ambiguous coreferences (e.g.,
8475
+ * "Stanley Reed" vs "Justice Reed"). Adds LLM calls proportional to the
8476
+ * number of candidate pairs — violates the 0-LLM-token guarantee for the
8477
+ * LocalNer strategy, so disabled by default. Opt in to improve entity
8478
+ * deduplication quality at the cost of extra LLM calls.
8479
+ * Default: false
8480
+ */
8481
+ enable_llm_coreference?: boolean;
8247
8482
  /**
8248
8483
  * Enable schema discovery before extraction.
8249
8484
  * Samples the document to discover entity/relation types before per-chunk extraction.
@@ -8257,16 +8492,30 @@ interface IngestionConfigDto$1 {
8257
8492
  * Default: false
8258
8493
  */
8259
8494
  enable_zero_degree_filtering?: boolean;
8495
+ /**
8496
+ * Configuration for deriving evidence terms from relational features.
8497
+ * When set, entities with Reference features (from NER relations) automatically
8498
+ * get linked evidence terms created, enabling OSFKB evidence assessment.
8499
+ */
8500
+ evidence_derivation_config?: null | EvidenceDerivationConfigDto$1;
8260
8501
  /** Whether to extract relations between entities */
8261
8502
  extract_relations?: boolean;
8262
8503
  /**
8263
- * Extraction strategy: "llm" (default), "local_ner" (GLiNER2), or "hybrid"
8504
+ * Extraction strategy -- an internally tagged object with a `"type"` discriminator.
8264
8505
  *
8265
- * - `llm`: Use LLM for all extraction (most capable, but slower and requires API)
8266
- * - `local_ner`: Use local NER model like GLiNER2 (fast, no API costs, privacy-friendly)
8267
- * - `hybrid`: Use NER first, fall back to LLM for low-confidence entities
8506
+ * Variants:
8507
+ * - `{"type": "llm"}` -- LLM for all extraction (default, most capable)
8508
+ * - `{"type": "local_ner"}` -- local NER model like GLiNER2 (fast, no API costs)
8509
+ * - `{"type": "hybrid", "ner_confidence_threshold": 0.8}` -- NER first, LLM fallback
8510
+ * - `{"type": "schema_guided", ...}` -- NER + pattern-based, LLM only when needed
8511
+ * - `{"type": "adaptive", "fallback": {...}}` -- auto-select based on learned patterns
8268
8512
  */
8269
- extraction_strategy?: string;
8513
+ extraction_strategy?: ExtractionStrategyDto;
8514
+ /**
8515
+ * When true, skip the auto-upgrade from Llm→LocalNer even if NER is available.
8516
+ * Used for A/B comparison tests. Default: false.
8517
+ */
8518
+ force_extraction_strategy?: boolean;
8270
8519
  /**
8271
8520
  * Maximum tokens for schema context passed to LLM
8272
8521
  * @min 0
@@ -8355,6 +8604,8 @@ interface IngestionSessionResponse$1 {
8355
8604
  type IngestionSessionStatusDto$1 = "active" | "paused" | "complete" | "failed";
8356
8605
  /** Ingestion statistics */
8357
8606
  interface IngestionStatsDto$1 {
8607
+ /** Source text alignment statistics (entity-to-source mapping quality) */
8608
+ alignment_stats?: AlignmentStatsDto;
8358
8609
  /**
8359
8610
  * Number of chunks that failed extraction
8360
8611
  * @min 0
@@ -8392,6 +8643,11 @@ interface IngestionStatsDto$1 {
8392
8643
  * @min 0
8393
8644
  */
8394
8645
  entities_pending_review: number;
8646
+ /**
8647
+ * Audit trail for substring-based entity merges (surface-form coreference).
8648
+ * E.g., "Brown v. Board" merged into "Brown v. Board of Education of Topeka".
8649
+ */
8650
+ entity_merge_audit?: EntityMergeAuditDto[];
8395
8651
  /**
8396
8652
  * Estimated USD cost of LLM API calls (if model pricing is available)
8397
8653
  * @format double
@@ -8430,6 +8686,21 @@ interface IngestionStatsDto$1 {
8430
8686
  * @min 0
8431
8687
  */
8432
8688
  relations_integrated: number;
8689
+ /**
8690
+ * Number of suspended relations that remained unresolved (orphaned)
8691
+ * @min 0
8692
+ */
8693
+ relations_orphaned?: number;
8694
+ /**
8695
+ * Number of suspended relations successfully resumed when endpoints became available
8696
+ * @min 0
8697
+ */
8698
+ relations_resumed?: number;
8699
+ /**
8700
+ * Number of relations suspended (endpoints not yet available)
8701
+ * @min 0
8702
+ */
8703
+ relations_suspended?: number;
8433
8704
  /** Names of created/reused sorts */
8434
8705
  sort_names: string[];
8435
8706
  /**
@@ -8451,6 +8722,11 @@ interface IngestionStatsDto$1 {
8451
8722
  interface IntegratedCycleOutcomeDto$1 {
8452
8723
  /** Actions executed */
8453
8724
  actions_executed: string[];
8725
+ /**
8726
+ * Cognitive mode selected by System M meta-control (when enabled).
8727
+ * One of: "Explore", "Exploit", "Observe", "Consolidate", or null if meta-control disabled.
8728
+ */
8729
+ cognitive_mode?: string | null;
8454
8730
  /** Desires considered */
8455
8731
  desires_considered: string[];
8456
8732
  /**
@@ -8481,6 +8757,16 @@ interface IntegratedCycleOutcomeDto$1 {
8481
8757
  perceptions_processed: number;
8482
8758
  /** Prediction errors observed */
8483
8759
  prediction_errors: PredictionErrorDto$1[];
8760
+ /**
8761
+ * Whether the RL policy influenced this cycle's decisions.
8762
+ * True when enable_rl_policy is set and Q-values were found in the knowledge base.
8763
+ */
8764
+ rl_policy_active?: boolean;
8765
+ /**
8766
+ * Number of Q-value updates performed from rl_transition terms.
8767
+ * @min 0
8768
+ */
8769
+ rl_transitions_processed?: number;
8484
8770
  /**
8485
8771
  * Number of sensor percepts processed from external sensor ports
8486
8772
  * @min 0
@@ -8529,11 +8815,24 @@ interface IntegratedEngineConfigDto$1 {
8529
8815
  * @default true
8530
8816
  */
8531
8817
  enable_meta_cognition?: boolean;
8818
+ /**
8819
+ * Enable meta-control: System M dynamically selects cognitive modes
8820
+ * (Explore/Exploit/Observe/Consolidate) based on meta-signals.
8821
+ * @default false
8822
+ */
8823
+ enable_meta_control?: boolean;
8532
8824
  /**
8533
8825
  * Enable plan library lookup
8534
8826
  * @default true
8535
8827
  */
8536
8828
  enable_plan_library?: boolean;
8829
+ /**
8830
+ * Enable RL policy: agent uses Q-values from rl_transition Psi-terms for action selection.
8831
+ * When true, the agent reads trained Q-values from the shared TermStore (populated by
8832
+ * RL training) to guide cognitive decisions. Requires prior RL training on the same tenant.
8833
+ * @default false
8834
+ */
8835
+ enable_rl_policy?: boolean;
8537
8836
  /**
8538
8837
  * Enable mental simulation before execution
8539
8838
  * @default true
@@ -10479,11 +10778,22 @@ interface NeuroSymbolicStatusResponse$1 {
10479
10778
  status?: object | null;
10480
10779
  }
10481
10780
  /** Translation mode for NL queries */
10482
- type NlQueryMode$1 = "llm" | "constraint" | "cognitive";
10781
+ type NlQueryMode$1 = "llm" | "constraint" | "cognitive" | "triz";
10483
10782
  /** Natural language query request */
10484
10783
  interface NlQueryRequest$1 {
10784
+ /** Optional: confirm a TRIZ session (triggers invention pipeline) */
10785
+ confirm_session?: boolean | null;
10485
10786
  /** Optional conversation history for context (llm mode only) */
10486
10787
  conversation_history?: any[] | null;
10788
+ /** Optional: domain names to exclude from results */
10789
+ exclude_domains?: any[] | null;
10790
+ /**
10791
+ * Optional: focus on a specific proposal index (0-based) for refinement
10792
+ * @min 0
10793
+ */
10794
+ focus_proposal?: number | null;
10795
+ /** Optional images for multimodal TRIZ analysis (base64-encoded) */
10796
+ images?: any[] | null;
10487
10797
  /** Translation mode: "llm" (default), "constraint", or "cognitive" */
10488
10798
  mode?: NlQueryMode$1;
10489
10799
  /** The natural language question */
@@ -10516,14 +10826,20 @@ interface NlQueryResponse$1 {
10516
10826
  generated_osf?: string | null;
10517
10827
  /** Mode used for translation */
10518
10828
  mode: NlQueryMode$1;
10829
+ /** Novelty scores for inventive proposals */
10830
+ novelty_scores?: any[] | null;
10519
10831
  /** Original query */
10520
10832
  query: string;
10521
10833
  /** Results from query execution */
10522
10834
  results: NlQueryResultItem$1[];
10835
+ /** Structured problem from TRIZ session (for user confirmation) */
10836
+ structured_problem?: any;
10523
10837
  /** Whether the query was successful */
10524
10838
  success: boolean;
10525
10839
  /** Tool call info (constraint mode) */
10526
10840
  tool_call?: null | ToolCallInfo$1;
10841
+ /** TRIZ session status (for multi-turn refinement) */
10842
+ triz_session_status?: string | null;
10527
10843
  }
10528
10844
  /** Result item from NL query */
10529
10845
  interface NlQueryResultItem$1 {
@@ -11060,8 +11376,12 @@ interface PendingReviewDto$2 {
11060
11376
  }
11061
11377
  /** An entity pending review */
11062
11378
  interface PendingReviewEntityDto {
11379
+ /** Alignment status: "exact", "fuzzy", "lesser", or "unaligned" */
11380
+ alignment_status?: string | null;
11063
11381
  /** Candidate matches for deduplication */
11064
11382
  candidates: ReviewCandidateMatchDto$1[];
11383
+ /** Character interval in source text where entity was found (start, end) */
11384
+ char_interval?: any[] | null;
11065
11385
  /**
11066
11386
  * Extraction confidence score (0.0 - 1.0)
11067
11387
  * @format double
@@ -11107,25 +11427,20 @@ interface PipelineQualityStatsDto$1 {
11107
11427
  */
11108
11428
  dynamic_config_relation_threshold: number;
11109
11429
  /**
11110
- * Total formal concepts enumerated by FCA
11430
+ * Entities rejected by validation
11111
11431
  * @min 0
11112
11432
  */
11113
- fca_concepts_enumerated: number;
11433
+ entities_rejected: number;
11114
11434
  /**
11115
- * Concepts filtered (matching existing sorts)
11116
- * @min 0
11117
- */
11118
- fca_concepts_filtered: number;
11119
- /**
11120
- * Novel concepts discovered (not matching any existing sort)
11435
+ * Entities auto-corrected to a better sort
11121
11436
  * @min 0
11122
11437
  */
11123
- fca_novel_concepts: number;
11438
+ entities_sort_corrected: number;
11124
11439
  /**
11125
- * Sorts created from FCA-discovered concepts
11440
+ * Entities that passed validation
11126
11441
  * @min 0
11127
11442
  */
11128
- fca_sorts_created: number;
11443
+ entities_validated: number;
11129
11444
  /**
11130
11445
  * Axioms learned from entity feature patterns
11131
11446
  * @min 0
@@ -11137,75 +11452,76 @@ interface PipelineQualityStatsDto$1 {
11137
11452
  */
11138
11453
  feedback_pipeline_adjustments: number;
11139
11454
  /**
11140
- * LLM entities deduped against NER entities by normalized name in hybrid mode
11455
+ * Total quality issues from forward chaining
11141
11456
  * @min 0
11142
11457
  */
11143
- hybrid_intra_batch_deduped: number;
11458
+ forward_chaining_issues: number;
11144
11459
  /**
11145
- * Relations from inference rules deduplicated against existing
11460
+ * Entities fully valid (all constraints pass)
11146
11461
  * @min 0
11147
11462
  */
11148
- inference_relations_deduped: number;
11463
+ fully_valid: number;
11149
11464
  /**
11150
- * Inference rules successfully applied (expanded to relations)
11465
+ * LLM entities deduped against NER entities by normalized name in hybrid mode
11151
11466
  * @min 0
11152
11467
  */
11153
- inference_rules_applied: number;
11468
+ hybrid_intra_batch_deduped: number;
11154
11469
  /**
11155
- * Inference rules filtered due to low confidence
11470
+ * Entities missing required features
11156
11471
  * @min 0
11157
11472
  */
11158
- inference_rules_filtered_low_confidence: number;
11473
+ incomplete_entities: number;
11159
11474
  /**
11160
- * Inference rules with scope_sort not found among entities
11475
+ * Entities with incompatible sort assignments
11161
11476
  * @min 0
11162
11477
  */
11163
- inference_rules_invalid_scope_sort: number;
11478
+ inconsistent_sorts: number;
11164
11479
  /**
11165
- * Total inference rules extracted across all chunks
11480
+ * Number of forward-chaining iterations executed.
11166
11481
  * @min 0
11167
11482
  */
11168
- inference_rules_total: number;
11483
+ inference_iterations: number;
11169
11484
  /**
11170
- * Entities rejected by OSF validation
11485
+ * Relations from inference rules deduplicated against existing
11171
11486
  * @min 0
11172
11487
  */
11173
- osf_entities_rejected: number;
11488
+ inference_relations_deduped: number;
11174
11489
  /**
11175
- * Entities auto-corrected to a better sort
11490
+ * Inference rules successfully applied (expanded to relations)
11176
11491
  * @min 0
11177
11492
  */
11178
- osf_entities_sort_corrected: number;
11493
+ inference_rules_applied: number;
11179
11494
  /**
11180
- * Entities that passed OSF validation
11495
+ * Inference rules filtered due to low confidence
11181
11496
  * @min 0
11182
11497
  */
11183
- osf_entities_validated: number;
11498
+ inference_rules_filtered_low_confidence: number;
11184
11499
  /**
11185
- * Total quality issues from forward chaining
11500
+ * Inference rules with scope_sort not found among entities
11186
11501
  * @min 0
11187
11502
  */
11188
- osf_forward_chaining_issues: number;
11503
+ inference_rules_invalid_scope_sort: number;
11189
11504
  /**
11190
- * Entities fully valid (all constraints pass)
11505
+ * Total inference rules extracted across all chunks
11191
11506
  * @min 0
11192
11507
  */
11193
- osf_fully_valid: number;
11508
+ inference_rules_total: number;
11194
11509
  /**
11195
- * Entities missing required features (from forward chaining)
11510
+ * Pattern rules generated from co-occurrence analysis.
11511
+ * These are homoiconic Ψ-term rules persisted to the term store.
11196
11512
  * @min 0
11197
11513
  */
11198
- osf_incomplete_entities: number;
11514
+ pattern_rules_persisted: number;
11199
11515
  /**
11200
- * Entities with incompatible sort assignments
11516
+ * Total relations generated from inference rule expansion
11201
11517
  * @min 0
11202
11518
  */
11203
- osf_inconsistent_sorts: number;
11519
+ relations_from_inference_rules: number;
11204
11520
  /**
11205
- * Total relations generated from inference rule expansion
11521
+ * Total relations derived by forward chaining.
11206
11522
  * @min 0
11207
11523
  */
11208
- relations_from_inference_rules: number;
11524
+ relations_inferred: number;
11209
11525
  }
11210
11526
  /** A matching plan from the library. */
11211
11527
  interface PlanMatchDto$1 {
@@ -12669,6 +12985,8 @@ interface RlPolicyConfigDto$1 {
12669
12985
  * - Cognitive: Uses `rl_cognitive_bridge::run()` (unified cognitive-RL loop)
12670
12986
  */
12671
12987
  interface RlTrainRequest$1 {
12988
+ /** Configuration for conversation-based training (when environment_name starts with "conversation") */
12989
+ conversation_config?: null | ConversationTrainingConfigDto;
12672
12990
  /**
12673
12991
  * Curiosity bonus amount (default: 0.1)
12674
12992
  * @format double
@@ -12744,6 +13062,12 @@ interface RlTrainRequest$1 {
12744
13062
  * @min 0
12745
13063
  */
12746
13064
  num_episodes: number;
13065
+ /**
13066
+ * Enable saving/loading DQN weights for persistence across restarts.
13067
+ * When true, weights are saved to a tenant-specific path after training
13068
+ * and loaded before training starts (continuing from last checkpoint).
13069
+ */
13070
+ persist_weights?: boolean;
12747
13071
  /** Optional RL policy configuration overrides */
12748
13072
  rl_config?: null | RlPolicyConfigDto$1;
12749
13073
  /** Trajectory exchange mode: "top_k" | "all_to_all" | "ring" */
@@ -12787,6 +13111,8 @@ interface RlTrainResponse$1 {
12787
13111
  collapse_episodes?: number[];
12788
13112
  /** Contrastive losses from encoder training (empty if no encoder) */
12789
13113
  contrastive_losses?: number[];
13114
+ /** Conversation-specific metrics when training on conversation environment */
13115
+ conversation_decisions?: Record<string, number>;
12790
13116
  /**
12791
13117
  * Auto-curriculum adjustments
12792
13118
  * @min 0
@@ -13296,6 +13622,13 @@ interface SearchCommunitiesResponse$1 {
13296
13622
  /** Search statistics */
13297
13623
  stats: CommunitySearchStatsDto$1;
13298
13624
  }
13625
+ /**
13626
+ * Which computation the search endpoint should perform.
13627
+ *
13628
+ * Defaults to `solutions` for full backward compatibility with existing clients
13629
+ * that do not send a `mode` field.
13630
+ */
13631
+ type SearchModeDto$1 = "solutions" | "feasibility";
13299
13632
  /** Request to search for solutions */
13300
13633
  interface SearchRequest {
13301
13634
  /**
@@ -13305,10 +13638,15 @@ interface SearchRequest {
13305
13638
  */
13306
13639
  collect_traces?: boolean | null;
13307
13640
  /**
13308
- * Maximum number of solutions to find
13641
+ * Maximum number of solutions to find (only used in `solutions` mode)
13309
13642
  * @min 0
13310
13643
  */
13311
13644
  max_solutions?: number | null;
13645
+ /**
13646
+ * Which computation to perform. Omit or set to `"solutions"` for the
13647
+ * default enumeration behaviour (backward compatible).
13648
+ */
13649
+ mode?: SearchModeDto$1;
13312
13650
  /** Search strategy to use */
13313
13651
  strategy: SearchStrategyDto$1;
13314
13652
  /**
@@ -13318,18 +13656,36 @@ interface SearchRequest {
13318
13656
  */
13319
13657
  use_neural_guidance?: boolean | null;
13320
13658
  }
13321
- /** Response with search results */
13322
- interface SearchResponse {
13659
+ /**
13660
+ * Response from the search endpoint.
13661
+ *
13662
+ * The `kind` field is a discriminator — always read it first to know which
13663
+ * variant you received before accessing the mode-specific fields.
13664
+ */
13665
+ type SearchResponse = {
13323
13666
  /**
13324
- * Total number of solutions found
13667
+ * Number of solutions found.
13325
13668
  * @min 0
13326
13669
  */
13327
13670
  count: number;
13328
- /** Search statistics (present when collect_traces is true or use_neural_guidance is true) */
13671
+ kind: "solutions";
13672
+ /**
13673
+ * Search statistics (present when `collect_traces` or `use_neural_guidance`
13674
+ * is true, or when the SAT solver was used).
13675
+ */
13329
13676
  search_stats?: null | SearchStatsDto$1;
13330
- /** Solutions found */
13677
+ /** Enumerated complete assignments. */
13331
13678
  solutions: SpaceSolutionDto$1[];
13332
- }
13679
+ } | {
13680
+ kind: "feasibility";
13681
+ /** Solver statistics for the feasibility queries. */
13682
+ search_stats?: null | SearchStatsDto$1;
13683
+ /**
13684
+ * Per-variable feasibility. Key is the variable name as registered
13685
+ * in the space's choice points.
13686
+ */
13687
+ variables: Record<string, VariableFeasibilityDto$1>;
13688
+ };
13333
13689
  /**
13334
13690
  * Search statistics collected during a search operation.
13335
13691
  *
@@ -13342,6 +13698,19 @@ interface SearchStatsDto$1 {
13342
13698
  * @min 0
13343
13699
  */
13344
13700
  backtracks: number;
13701
+ /**
13702
+ * Choice points that were forced by initial propagation (before any
13703
+ * search decision). Each entry is an unbiased "confirmed" assignment:
13704
+ * every solution in the search space respects it. Clients should use
13705
+ * this list (not the intersection of enumerated solutions) to display
13706
+ * which choices are definitively locked in.
13707
+ */
13708
+ forced_choices?: ChoiceSelection$1[];
13709
+ /**
13710
+ * Number of learned nogood clauses.
13711
+ * @min 0
13712
+ */
13713
+ learned_clauses: number;
13345
13714
  /**
13346
13715
  * Total nodes visited during search.
13347
13716
  * @min 0
@@ -13352,6 +13721,11 @@ interface SearchStatsDto$1 {
13352
13721
  * @min 0
13353
13722
  */
13354
13723
  nodes_pruned: number;
13724
+ /**
13725
+ * Number of restarts performed (Luby restart strategy).
13726
+ * @min 0
13727
+ */
13728
+ restarts: number;
13355
13729
  /**
13356
13730
  * Number of times the neural scorer was invoked.
13357
13731
  * @min 0
@@ -15787,6 +16161,24 @@ type ValuePatternDto$1 = {
15787
16161
  type: "bind";
15788
16162
  variable: string;
15789
16163
  };
16164
+ /**
16165
+ * Feasibility of a single binary variable in the constraint space.
16166
+ *
16167
+ * Produced by `feasibility` mode search. Both fields can be `false` only
16168
+ * when the problem is UNSAT (no valid assignment exists).
16169
+ */
16170
+ interface VariableFeasibilityDto$1 {
16171
+ /**
16172
+ * `true` if there exists at least one valid assignment where this variable
16173
+ * is 0 (unselected / false).
16174
+ */
16175
+ can_be_false: boolean;
16176
+ /**
16177
+ * `true` if there exists at least one valid assignment where this variable
16178
+ * is 1 (selected / true).
16179
+ */
16180
+ can_be_true: boolean;
16181
+ }
15790
16182
  /** Result of verbalizing a single PsiTerm. */
15791
16183
  interface VerbalizationResultDto$1 {
15792
16184
  /**
@@ -18122,7 +18514,7 @@ declare namespace terms {
18122
18514
  }
18123
18515
 
18124
18516
  /** Translation mode for natural language queries. */
18125
- type NlQueryMode = 'llm' | 'constraint' | 'cognitive';
18517
+ type NlQueryMode = 'llm' | 'constraint' | 'cognitive' | 'triz';
18126
18518
  /** A result item from a natural language query. */
18127
18519
  interface NlQueryResultItem {
18128
18520
  /** Term ID. */
@@ -26082,15 +26474,18 @@ declare class Ingestion<SecurityDataType = unknown> {
26082
26474
  */
26083
26475
  ingestMarkdownBatch: (data: IngestMarkdownBatchRequest$1, params?: RequestParams) => Promise<HttpResponse<void, void>>;
26084
26476
  /**
26085
- * No description
26477
+ * @description Defaults to async dispatch: returns `202` with a session id and the pipeline runs in a background tokio task. Pass `?sync=true` to run the whole pipeline inside the request and get a `201` with the full result — suitable only for small ontologies because the embedding loop dominates wall time on large inputs.
26086
26478
  *
26087
26479
  * @tags ingestion
26088
26480
  * @name IngestRdf
26089
- * @summary Ingest RDF/OWL/SHACL data and convert to OSF
26481
+ * @summary Ingest RDF/OWL/SHACL data and convert to OSF.
26090
26482
  * @request POST:/api/v1/ingest/rdf
26091
26483
  * @secure
26092
26484
  */
26093
- ingestRdf: (data: IngestRdfRequest$1, params?: RequestParams) => Promise<HttpResponse<IngestRdfResponse$1, void>>;
26485
+ ingestRdf: (query: {
26486
+ /** When true, run synchronously (returns 201). Default false: returns 202 with a session id. */
26487
+ sync: boolean;
26488
+ }, data: IngestRdfRequest$1, params?: RequestParams) => Promise<HttpResponse<IngestRdfResponse$1, void>>;
26094
26489
  /**
26095
26490
  * @description Returns paginated list of chunk failures in the dead-letter queue.
26096
26491
  *
@@ -26257,10 +26652,10 @@ interface DocumentProgressDto {
26257
26652
  inferenceRulesApplied: number;
26258
26653
  /** LLM model name (if applicable). */
26259
26654
  modelName?: string | null;
26260
- /** OSF residuations created. */
26261
- osfResiduationsCreated: number;
26262
- /** OSF residuations resumed. */
26263
- osfResiduationsResumed: number;
26655
+ /** Residuations created (suspended operations). */
26656
+ residuationsCreated: number;
26657
+ /** Residuations resumed. */
26658
+ residuationsResumed: number;
26264
26659
  /** References resolved. */
26265
26660
  referencesResolved: number;
26266
26661
  /** Unresolved references. */
@@ -26279,8 +26674,6 @@ interface DocumentProgressDto {
26279
26674
  sortsCreated: number;
26280
26675
  /** Existing sorts reused (exact match). */
26281
26676
  sortsReused: number;
26282
- /** Sorts reused via GLB/feature matching. */
26283
- sortsReusedGlb: number;
26284
26677
  /** Sorts reused via semantic matching. */
26285
26678
  sortsReusedSemantic: number;
26286
26679
  /** When ingestion started (ISO 8601). */
@@ -26352,6 +26745,102 @@ interface IngestionPollOptions {
26352
26745
  /** Optional callback invoked with progress data on each poll cycle. */
26353
26746
  onProgress?: (progress: SessionProgressResponse) => void;
26354
26747
  }
26748
+ /**
26749
+ * LLM-based extraction strategy — most capable, slower, requires API.
26750
+ *
26751
+ * @remarks
26752
+ * Wire format: `{"type": "llm"}`
26753
+ */
26754
+ interface ExtractionStrategyLlm {
26755
+ type: 'llm';
26756
+ }
26757
+ /**
26758
+ * Local NER extraction strategy — fast, no API costs, privacy-friendly.
26759
+ *
26760
+ * @remarks
26761
+ * Wire format: `{"type": "local_ner"}`
26762
+ */
26763
+ interface ExtractionStrategyLocalNer {
26764
+ type: 'local_ner';
26765
+ }
26766
+ /**
26767
+ * Hybrid extraction strategy — NER first, LLM fallback for low-confidence entities.
26768
+ *
26769
+ * @remarks
26770
+ * Wire format: `{"type": "hybrid", "ner_confidence_threshold": 0.8}`
26771
+ */
26772
+ interface ExtractionStrategyHybrid {
26773
+ type: 'hybrid';
26774
+ /** NER confidence threshold below which to escalate to LLM (0.0–1.0). */
26775
+ nerConfidenceThreshold: number;
26776
+ }
26777
+ /**
26778
+ * Schema-guided extraction strategy — NER + pattern-based, LLM only when needed.
26779
+ *
26780
+ * @remarks
26781
+ * Wire format: `{"type": "schema_guided", "ner_confidence_threshold": 0.7, "relation_confidence_threshold": 0.6, "escalate_unknown_types": true}`
26782
+ */
26783
+ interface ExtractionStrategySchemaGuided {
26784
+ type: 'schema_guided';
26785
+ /** NER confidence threshold below which to escalate to LLM (0.0–1.0). */
26786
+ nerConfidenceThreshold: number;
26787
+ /** Relation pattern confidence threshold (0.0–1.0). */
26788
+ relationConfidenceThreshold: number;
26789
+ /** Whether to escalate to LLM for unknown entity types. */
26790
+ escalateUnknownTypes: boolean;
26791
+ }
26792
+ /**
26793
+ * Adaptive extraction strategy — auto-select based on learned patterns.
26794
+ *
26795
+ * @remarks
26796
+ * Wire format: `{"type": "adaptive", "fallback": {...}}`
26797
+ */
26798
+ interface ExtractionStrategyAdaptive {
26799
+ type: 'adaptive';
26800
+ /** Fallback strategy when adaptive selection is inconclusive. */
26801
+ fallback: ExtractionStrategy;
26802
+ }
26803
+ /**
26804
+ * Extraction strategy for ingestion — an internally tagged discriminated union.
26805
+ *
26806
+ * @remarks
26807
+ * The backend serializes this with `#[serde(tag = "type", rename_all = "snake_case")]`.
26808
+ * The `type` field is the discriminator.
26809
+ *
26810
+ * @example
26811
+ * ```ts
26812
+ * // Simple strategies:
26813
+ * const llm: ExtractionStrategy = { type: 'llm' };
26814
+ * const ner: ExtractionStrategy = { type: 'local_ner' };
26815
+ *
26816
+ * // Strategies with parameters:
26817
+ * const hybrid: ExtractionStrategy = { type: 'hybrid', nerConfidenceThreshold: 0.8 };
26818
+ * const adaptive: ExtractionStrategy = { type: 'adaptive', fallback: { type: 'llm' } };
26819
+ * ```
26820
+ */
26821
+ type ExtractionStrategy = ExtractionStrategyLlm | ExtractionStrategyLocalNer | ExtractionStrategyHybrid | ExtractionStrategySchemaGuided | ExtractionStrategyAdaptive;
26822
+ /**
26823
+ * Configuration for deriving evidence terms from relational features.
26824
+ *
26825
+ * @remarks
26826
+ * When set, entities with Reference features (from NER relations) automatically
26827
+ * get linked evidence terms created, enabling OSFKB evidence assessment.
26828
+ */
26829
+ interface EvidenceDerivationConfigDto {
26830
+ /**
26831
+ * Relations whose polarity depends on the target entity's sort.
26832
+ * Maps relation name to list of target sort names that make it negative.
26833
+ */
26834
+ contextDependentRelations?: Record<string, string[]>;
26835
+ /** Default quality weight for NER-derived evidence (0.0–1.0). */
26836
+ defaultQualityWeight?: number;
26837
+ /** Sort name to use for derived evidence terms. */
26838
+ evidenceSortName?: string;
26839
+ /** Relation names that indicate contradiction. */
26840
+ negativeRelations?: string[];
26841
+ /** Relation names that indicate support. */
26842
+ positiveRelations?: string[];
26843
+ }
26355
26844
  /**
26356
26845
  * Ingestion session status.
26357
26846
  */
@@ -26451,12 +26940,35 @@ interface IngestionConfigDto {
26451
26940
  enableFocusedExtraction?: boolean;
26452
26941
  /** Enable schema discovery before extraction. Default: true. */
26453
26942
  enableSchemaDiscovery?: boolean;
26943
+ /** Enable LLM-based evidence enrichment with statistical features. Default: false. */
26944
+ enableEvidenceEnrichment?: boolean;
26454
26945
  /** Enable zero-degree entity removal. Default: false. */
26455
26946
  enableZeroDegreeFiltering?: boolean;
26947
+ /**
26948
+ * Configuration for deriving evidence terms from relational features.
26949
+ * When set, entities with Reference features automatically get linked evidence terms.
26950
+ */
26951
+ evidenceDerivationConfig?: EvidenceDerivationConfigDto | null;
26456
26952
  /** Whether to extract relations between entities. */
26457
26953
  extractRelations?: boolean;
26458
- /** Extraction strategy: "llm" (default), "local_ner", or "hybrid". */
26459
- extractionStrategy?: string;
26954
+ /**
26955
+ * Extraction strategy — an internally tagged discriminated union.
26956
+ *
26957
+ * @remarks
26958
+ * Wire format uses `#[serde(tag = "type")]`. Pass an object with a `type` discriminator.
26959
+ *
26960
+ * @example
26961
+ * ```ts
26962
+ * { type: 'llm' }
26963
+ * { type: 'hybrid', nerConfidenceThreshold: 0.8 }
26964
+ * ```
26965
+ */
26966
+ extractionStrategy?: ExtractionStrategy;
26967
+ /**
26968
+ * When true, skip the auto-upgrade from Llm to LocalNer even if NER is available.
26969
+ * Used for A/B comparison tests. Default: false.
26970
+ */
26971
+ forceExtractionStrategy?: boolean;
26460
26972
  /** Maximum tokens for schema context passed to LLM. */
26461
26973
  maxSchemaTokens?: number;
26462
26974
  /** NER confidence threshold (0.0 - 1.0). Default: 0.5. */
@@ -26467,6 +26979,12 @@ interface IngestionConfigDto {
26467
26979
  nerRelationConfidenceThreshold?: number;
26468
26980
  /** Relation labels for NER relation extraction. */
26469
26981
  nerRelationLabels?: string[];
26982
+ /**
26983
+ * Reject anonymized reference patterns from case studies.
26984
+ * Filters patterns like "Monsieur X", "société A", "Company A".
26985
+ * Only active when entity filtering is enabled. Default: true.
26986
+ */
26987
+ rejectAnonymizedReferences?: boolean;
26470
26988
  /** Skip fingerprint check (force re-ingestion). */
26471
26989
  skipFingerprint?: boolean;
26472
26990
  /** Skip automatic relation completion between extracted entities. */
@@ -26525,20 +27043,28 @@ interface PipelineQualityStatsDto {
26525
27043
  dynamicConfigEntityThreshold: number;
26526
27044
  /** Dynamic relation confidence threshold based on KB maturity. */
26527
27045
  dynamicConfigRelationThreshold: number;
26528
- /** Total formal concepts enumerated by FCA. */
26529
- fcaConceptsEnumerated: number;
26530
- /** Concepts filtered (matching existing sorts). */
26531
- fcaConceptsFiltered: number;
26532
- /** Novel concepts discovered (not matching any existing sort). */
26533
- fcaNovelConcepts: number;
26534
- /** Sorts created from FCA-discovered concepts. */
26535
- fcaSortsCreated: number;
27046
+ /** Entities rejected by validation. */
27047
+ entitiesRejected: number;
27048
+ /** Entities auto-corrected to a better sort. */
27049
+ entitiesSortCorrected: number;
27050
+ /** Entities that passed validation. */
27051
+ entitiesValidated: number;
26536
27052
  /** Axioms learned from entity feature patterns. */
26537
27053
  feedbackAxiomsLearned: number;
26538
27054
  /** Pipeline threshold adjustments applied by dynamic config. */
26539
27055
  feedbackPipelineAdjustments: number;
27056
+ /** Total quality issues from forward chaining. */
27057
+ forwardChainingIssues: number;
27058
+ /** Entities fully valid (all constraints pass). */
27059
+ fullyValid: number;
26540
27060
  /** LLM entities deduped against NER entities by normalized name in hybrid mode. */
26541
27061
  hybridIntraBatchDeduped: number;
27062
+ /** Entities missing required features. */
27063
+ incompleteEntities: number;
27064
+ /** Entities with incompatible sort assignments. */
27065
+ inconsistentSorts: number;
27066
+ /** Number of forward-chaining iterations executed. */
27067
+ inferenceIterations: number;
26542
27068
  /** Relations from inference rules deduplicated against existing. */
26543
27069
  inferenceRelationsDeduped: number;
26544
27070
  /** Inference rules successfully applied (expanded to relations). */
@@ -26549,18 +27075,12 @@ interface PipelineQualityStatsDto {
26549
27075
  inferenceRulesInvalidScopeSort: number;
26550
27076
  /** Total inference rules extracted across all chunks. */
26551
27077
  inferenceRulesTotal: number;
26552
- /** Entities rejected by validation. */
26553
- osfEntitiesRejected: number;
26554
- /** Entities auto-corrected to a better sort. */
26555
- osfEntitiesSortCorrected: number;
26556
- /** Entities that passed validation. */
26557
- osfEntitiesValidated: number;
26558
- /** Total quality issues from forward chaining. */
26559
- osfForwardChainingIssues: number;
26560
- /** Entities fully valid (all constraints pass). */
26561
- osfFullyValid: number;
26562
- /** Entities missing required features (from forward chaining). */
26563
- osfIncompleteEntities: number;
27078
+ /** Pattern rules generated from co-occurrence analysis. */
27079
+ patternRulesPersisted: number;
27080
+ /** Total relations generated from inference rule expansion. */
27081
+ relationsFromInferenceRules: number;
27082
+ /** Total relations derived by forward chaining. */
27083
+ relationsInferred: number;
26564
27084
  }
26565
27085
  /**
26566
27086
  * Token usage from LLM API calls during ingestion.
@@ -26805,6 +27325,11 @@ interface IngestRdfRequest {
26805
27325
  parseOntology?: boolean;
26806
27326
  /** Whether to also parse SHACL shapes from the content. */
26807
27327
  parseShacl?: boolean;
27328
+ /**
27329
+ * When true, run synchronously and return the result immediately (HTTP 201).
27330
+ * When false (default), return HTTP 202 with a session ID for async polling.
27331
+ */
27332
+ sync?: boolean;
26808
27333
  /** Tenant ID for the ingested data. */
26809
27334
  tenantId: string;
26810
27335
  }
@@ -26962,6 +27487,13 @@ type ingestion_DocumentProgressDto = DocumentProgressDto;
26962
27487
  type ingestion_DocumentSource = DocumentSource;
26963
27488
  type ingestion_DocumentStatsDto = DocumentStatsDto;
26964
27489
  type ingestion_DocumentType = DocumentType;
27490
+ type ingestion_EvidenceDerivationConfigDto = EvidenceDerivationConfigDto;
27491
+ type ingestion_ExtractionStrategy = ExtractionStrategy;
27492
+ type ingestion_ExtractionStrategyAdaptive = ExtractionStrategyAdaptive;
27493
+ type ingestion_ExtractionStrategyHybrid = ExtractionStrategyHybrid;
27494
+ type ingestion_ExtractionStrategyLlm = ExtractionStrategyLlm;
27495
+ type ingestion_ExtractionStrategyLocalNer = ExtractionStrategyLocalNer;
27496
+ type ingestion_ExtractionStrategySchemaGuided = ExtractionStrategySchemaGuided;
26965
27497
  type ingestion_GroundingStatsDto = GroundingStatsDto;
26966
27498
  type ingestion_IncompleteDocumentDto = IncompleteDocumentDto;
26967
27499
  type ingestion_IngestDocumentBatchRequest = IngestDocumentBatchRequest;
@@ -26994,7 +27526,7 @@ type ingestion_StartIngestionSessionRequest = StartIngestionSessionRequest;
26994
27526
  type ingestion_StepLogEntryDto = StepLogEntryDto;
26995
27527
  type ingestion_TokenUsageDto = TokenUsageDto;
26996
27528
  declare namespace ingestion {
26997
- export type { ingestion_AsyncIngestionResponse as AsyncIngestionResponse, ingestion_CandidateMatchDto as CandidateMatchDto, ingestion_ChunkFailureDto as ChunkFailureDto, ingestion_CommunityStatsDto as CommunityStatsDto, ingestion_DocumentBatchItem as DocumentBatchItem, ingestion_DocumentBatchResultDto as DocumentBatchResultDto, ingestion_DocumentMetadataDto as DocumentMetadataDto, ingestion_DocumentParseStatsDto as DocumentParseStatsDto, ingestion_DocumentParser as DocumentParser, ingestion_DocumentProgressDto as DocumentProgressDto, ingestion_DocumentSource as DocumentSource, ingestion_DocumentStatsDto as DocumentStatsDto, ingestion_DocumentType as DocumentType, ingestion_GroundingStatsDto as GroundingStatsDto, ingestion_IncompleteDocumentDto as IncompleteDocumentDto, ingestion_IngestDocumentBatchRequest as IngestDocumentBatchRequest, ingestion_IngestDocumentBatchResponse as IngestDocumentBatchResponse, ingestion_IngestDocumentRequest as IngestDocumentRequest, ingestion_IngestDocumentResponse as IngestDocumentResponse, ingestion_IngestMarkdownBatchRequest as IngestMarkdownBatchRequest, ingestion_IngestMarkdownRequest as IngestMarkdownRequest, ingestion_IngestMarkdownResponse as IngestMarkdownResponse, ingestion_IngestRdfRequest as IngestRdfRequest, ingestion_IngestRdfResponse as IngestRdfResponse, ingestion_IngestionConfigDto as IngestionConfigDto, ingestion_IngestionPollOptions as IngestionPollOptions, ingestion_IngestionSessionResponse as IngestionSessionResponse, ingestion_IngestionSessionStatusDto as IngestionSessionStatusDto, ingestion_IngestionStatsDto as IngestionStatsDto, ingestion_ListIncompleteDocumentsResponse as ListIncompleteDocumentsResponse, ingestion_ListIngestionSessionsResponse as ListIngestionSessionsResponse, ingestion_MarkdownDocumentDto as MarkdownDocumentDto, ingestion_OcrConfigDto as OcrConfigDto, ingestion_ParsedDocumentMetadataDto as ParsedDocumentMetadataDto, ingestion_PendingReviewDto as PendingReviewDto, ingestion_PipelineQualityStatsDto as PipelineQualityStatsDto, ingestion_RdfFormatDto as RdfFormatDto, ingestion_ResumeDocumentIngestionRequest as ResumeDocumentIngestionRequest, ingestion_ResumeDocumentIngestionResponse as ResumeDocumentIngestionResponse, ingestion_SessionProgressResponse as SessionProgressResponse, ingestion_SessionStatsResponse as SessionStatsResponse, ingestion_StartIngestionSessionRequest as StartIngestionSessionRequest, ingestion_StepLogEntryDto as StepLogEntryDto, ingestion_TokenUsageDto as TokenUsageDto };
27529
+ export type { ingestion_AsyncIngestionResponse as AsyncIngestionResponse, ingestion_CandidateMatchDto as CandidateMatchDto, ingestion_ChunkFailureDto as ChunkFailureDto, ingestion_CommunityStatsDto as CommunityStatsDto, ingestion_DocumentBatchItem as DocumentBatchItem, ingestion_DocumentBatchResultDto as DocumentBatchResultDto, ingestion_DocumentMetadataDto as DocumentMetadataDto, ingestion_DocumentParseStatsDto as DocumentParseStatsDto, ingestion_DocumentParser as DocumentParser, ingestion_DocumentProgressDto as DocumentProgressDto, ingestion_DocumentSource as DocumentSource, ingestion_DocumentStatsDto as DocumentStatsDto, ingestion_DocumentType as DocumentType, ingestion_EvidenceDerivationConfigDto as EvidenceDerivationConfigDto, ingestion_ExtractionStrategy as ExtractionStrategy, ingestion_ExtractionStrategyAdaptive as ExtractionStrategyAdaptive, ingestion_ExtractionStrategyHybrid as ExtractionStrategyHybrid, ingestion_ExtractionStrategyLlm as ExtractionStrategyLlm, ingestion_ExtractionStrategyLocalNer as ExtractionStrategyLocalNer, ingestion_ExtractionStrategySchemaGuided as ExtractionStrategySchemaGuided, ingestion_GroundingStatsDto as GroundingStatsDto, ingestion_IncompleteDocumentDto as IncompleteDocumentDto, ingestion_IngestDocumentBatchRequest as IngestDocumentBatchRequest, ingestion_IngestDocumentBatchResponse as IngestDocumentBatchResponse, ingestion_IngestDocumentRequest as IngestDocumentRequest, ingestion_IngestDocumentResponse as IngestDocumentResponse, ingestion_IngestMarkdownBatchRequest as IngestMarkdownBatchRequest, ingestion_IngestMarkdownRequest as IngestMarkdownRequest, ingestion_IngestMarkdownResponse as IngestMarkdownResponse, ingestion_IngestRdfRequest as IngestRdfRequest, ingestion_IngestRdfResponse as IngestRdfResponse, ingestion_IngestionConfigDto as IngestionConfigDto, ingestion_IngestionPollOptions as IngestionPollOptions, ingestion_IngestionSessionResponse as IngestionSessionResponse, ingestion_IngestionSessionStatusDto as IngestionSessionStatusDto, ingestion_IngestionStatsDto as IngestionStatsDto, ingestion_ListIncompleteDocumentsResponse as ListIncompleteDocumentsResponse, ingestion_ListIngestionSessionsResponse as ListIngestionSessionsResponse, ingestion_MarkdownDocumentDto as MarkdownDocumentDto, ingestion_OcrConfigDto as OcrConfigDto, ingestion_ParsedDocumentMetadataDto as ParsedDocumentMetadataDto, ingestion_PendingReviewDto as PendingReviewDto, ingestion_PipelineQualityStatsDto as PipelineQualityStatsDto, ingestion_RdfFormatDto as RdfFormatDto, ingestion_ResumeDocumentIngestionRequest as ResumeDocumentIngestionRequest, ingestion_ResumeDocumentIngestionResponse as ResumeDocumentIngestionResponse, ingestion_SessionProgressResponse as SessionProgressResponse, ingestion_SessionStatsResponse as SessionStatsResponse, ingestion_StartIngestionSessionRequest as StartIngestionSessionRequest, ingestion_StepLogEntryDto as StepLogEntryDto, ingestion_TokenUsageDto as TokenUsageDto };
26998
27530
  }
26999
27531
 
27000
27532
  /**
@@ -30261,6 +30793,15 @@ interface SearchStatsDto {
30261
30793
  solveTimeMs: number;
30262
30794
  /** Number of times the neural scorer was invoked. */
30263
30795
  scorerCalls: number;
30796
+ /** Number of restarts performed (Luby restart strategy). */
30797
+ restarts: number;
30798
+ /** Number of learned nogood clauses. */
30799
+ learnedClauses: number;
30800
+ /**
30801
+ * Choice points forced by initial propagation (before any search decision).
30802
+ * Every solution in the search space respects these assignments unconditionally.
30803
+ */
30804
+ forcedChoices?: ChoiceSelection[];
30264
30805
  }
30265
30806
  /**
30266
30807
  * Trace event from LIFE feature operations during search.
@@ -30321,35 +30862,81 @@ interface CommitRequest {
30321
30862
  /** Index of the alternative to commit to. */
30322
30863
  alternativeIndex: number;
30323
30864
  }
30865
+ /**
30866
+ * Which computation the search endpoint should perform.
30867
+ *
30868
+ * @remarks
30869
+ * - `"solutions"`: enumerate complete, valid assignments (default — backward compatible).
30870
+ * - `"feasibility"`: run 2×N per-variable SAT queries and return reachability info.
30871
+ * Much faster than full enumeration for large spaces.
30872
+ */
30873
+ type SearchModeDto = 'solutions' | 'feasibility';
30874
+ /**
30875
+ * Reachability of a single binary choice-point variable.
30876
+ *
30877
+ * @remarks
30878
+ * Produced by `mode = "feasibility"` search.
30879
+ * - `canBeTrue = true` means at least one valid assignment sets this variable to 1.
30880
+ * - `canBeTrue = false && canBeFalse = false` means the problem is UNSAT.
30881
+ */
30882
+ interface VariableFeasibilityDto {
30883
+ /** True if at least one valid assignment sets this variable to 1 (selected). */
30884
+ canBeTrue: boolean;
30885
+ /** True if at least one valid assignment sets this variable to 0 (unselected). */
30886
+ canBeFalse: boolean;
30887
+ }
30324
30888
  /**
30325
30889
  * Request to search for solutions.
30326
30890
  */
30327
30891
  interface SpaceSearchRequest {
30328
30892
  /** Search strategy to use. */
30329
30893
  strategy: SearchStrategyDto;
30330
- /** Maximum number of solutions to find. */
30894
+ /** Maximum number of solutions to find (only used in `"solutions"` mode). */
30331
30895
  maxSolutions?: number | null;
30332
30896
  /** Enable trace collection during search. */
30333
30897
  collectTraces?: boolean | null;
30334
30898
  /** Wire the neural scorer into search (AlphaProof-style guidance). */
30335
30899
  useNeuralGuidance?: boolean | null;
30900
+ /**
30901
+ * Which computation to perform.
30902
+ * Omit or set to `"solutions"` for the default enumeration behaviour (backward compatible).
30903
+ */
30904
+ mode?: SearchModeDto;
30336
30905
  }
30337
30906
  /**
30338
- * Response with search results.
30339
- */
30340
- interface SpaceSearchResponse {
30341
- /** Solutions found. */
30907
+ * Response from the search endpoint.
30908
+ *
30909
+ * @remarks
30910
+ * Discriminated union on `kind`. Always read `kind` first:
30911
+ * - `"solutions"`: standard enumeration result with `solutions` and `count`.
30912
+ * - `"feasibility"`: per-variable reachability map in `variables`.
30913
+ */
30914
+ type SpaceSearchResponse = {
30915
+ /** Discriminator — always `"solutions"` for this variant. */
30916
+ kind: 'solutions';
30917
+ /** Enumerated complete assignments. */
30342
30918
  solutions: SpaceSolutionDto[];
30343
- /** Total number of solutions found. */
30919
+ /** Number of solutions found. */
30344
30920
  count: number;
30345
30921
  /** Search statistics. */
30346
30922
  searchStats?: SearchStatsDto | null;
30347
- }
30923
+ } | {
30924
+ /** Discriminator — always `"feasibility"` for this variant. */
30925
+ kind: 'feasibility';
30926
+ /**
30927
+ * Per-variable reachability. Key is the variable name as registered
30928
+ * in the space's choice points.
30929
+ */
30930
+ variables: Record<string, VariableFeasibilityDto>;
30931
+ /** Solver statistics for the feasibility queries. */
30932
+ searchStats?: SearchStatsDto | null;
30933
+ };
30348
30934
 
30349
30935
  type spaces_ChoicePointDto = ChoicePointDto;
30350
30936
  type spaces_ChoiceSelection = ChoiceSelection;
30351
30937
  type spaces_CommitRequest = CommitRequest;
30352
30938
  type spaces_CreateSpaceRequest = CreateSpaceRequest;
30939
+ type spaces_SearchModeDto = SearchModeDto;
30353
30940
  type spaces_SearchStatsDto = SearchStatsDto;
30354
30941
  type spaces_SearchStrategyDto = SearchStrategyDto;
30355
30942
  type spaces_SpaceConstraintDto = SpaceConstraintDto;
@@ -30359,8 +30946,9 @@ type spaces_SpaceSearchResponse = SpaceSearchResponse;
30359
30946
  type spaces_SpaceSolutionDto = SpaceSolutionDto;
30360
30947
  type spaces_SpaceStatusDto = SpaceStatusDto;
30361
30948
  type spaces_TraceEventDto = TraceEventDto;
30949
+ type spaces_VariableFeasibilityDto = VariableFeasibilityDto;
30362
30950
  declare namespace spaces {
30363
- export type { spaces_ChoicePointDto as ChoicePointDto, spaces_ChoiceSelection as ChoiceSelection, spaces_CommitRequest as CommitRequest, spaces_CreateSpaceRequest as CreateSpaceRequest, spaces_SearchStatsDto as SearchStatsDto, spaces_SearchStrategyDto as SearchStrategyDto, spaces_SpaceConstraintDto as SpaceConstraintDto, spaces_SpaceResponse as SpaceResponse, spaces_SpaceSearchRequest as SpaceSearchRequest, spaces_SpaceSearchResponse as SpaceSearchResponse, spaces_SpaceSolutionDto as SpaceSolutionDto, spaces_SpaceStatusDto as SpaceStatusDto, spaces_TraceEventDto as TraceEventDto };
30951
+ export type { spaces_ChoicePointDto as ChoicePointDto, spaces_ChoiceSelection as ChoiceSelection, spaces_CommitRequest as CommitRequest, spaces_CreateSpaceRequest as CreateSpaceRequest, spaces_SearchModeDto as SearchModeDto, spaces_SearchStatsDto as SearchStatsDto, spaces_SearchStrategyDto as SearchStrategyDto, spaces_SpaceConstraintDto as SpaceConstraintDto, spaces_SpaceResponse as SpaceResponse, spaces_SpaceSearchRequest as SpaceSearchRequest, spaces_SpaceSearchResponse as SpaceSearchResponse, spaces_SpaceSolutionDto as SpaceSolutionDto, spaces_SpaceStatusDto as SpaceStatusDto, spaces_TraceEventDto as TraceEventDto, spaces_VariableFeasibilityDto as VariableFeasibilityDto };
30364
30952
  }
30365
30953
 
30366
30954
  /**