@kortexya/reasoninglayer 0.8.0 → 0.9.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 = "0.8.0";
112
+ declare const SDK_VERSION = "0.9.0";
113
113
  /**
114
114
  * Configuration for the Reasoning Layer client.
115
115
  *
@@ -6217,6 +6217,93 @@ type FuzzyShapeDto$1 = {
6217
6217
  period: number;
6218
6218
  /** @format double */
6219
6219
  stdDev: number;
6220
+ } | {
6221
+ kind: "Sigmoid";
6222
+ /** @format double */
6223
+ midpoint: number;
6224
+ /** @format double */
6225
+ steepness: number;
6226
+ } | {
6227
+ kind: "Bell";
6228
+ /** @format double */
6229
+ center: number;
6230
+ /** @format double */
6231
+ width: number;
6232
+ /** @format double */
6233
+ slope: number;
6234
+ } | {
6235
+ kind: "SigmoidDifference";
6236
+ /** @format double */
6237
+ midpoint1: number;
6238
+ /** @format double */
6239
+ steepness1: number;
6240
+ /** @format double */
6241
+ midpoint2: number;
6242
+ /** @format double */
6243
+ steepness2: number;
6244
+ } | {
6245
+ kind: "GaussianProduct";
6246
+ /** @format double */
6247
+ mean1: number;
6248
+ /** @format double */
6249
+ stdDev1: number;
6250
+ /** @format double */
6251
+ mean2: number;
6252
+ /** @format double */
6253
+ stdDev2: number;
6254
+ } | {
6255
+ kind: "SigmoidProduct";
6256
+ /** @format double */
6257
+ midpoint1: number;
6258
+ /** @format double */
6259
+ steepness1: number;
6260
+ /** @format double */
6261
+ midpoint2: number;
6262
+ /** @format double */
6263
+ steepness2: number;
6264
+ } | {
6265
+ kind: "Cosine";
6266
+ /** @format double */
6267
+ center: number;
6268
+ /** @format double */
6269
+ width: number;
6270
+ } | {
6271
+ kind: "Spike";
6272
+ /** @format double */
6273
+ center: number;
6274
+ /** @format double */
6275
+ width: number;
6276
+ } | {
6277
+ kind: "Cauchy";
6278
+ /** @format double */
6279
+ center: number;
6280
+ /** @format double */
6281
+ gamma: number;
6282
+ } | {
6283
+ kind: "SShape";
6284
+ /** @format double */
6285
+ a: number;
6286
+ /** @format double */
6287
+ b: number;
6288
+ } | {
6289
+ kind: "ZShape";
6290
+ /** @format double */
6291
+ a: number;
6292
+ /** @format double */
6293
+ b: number;
6294
+ } | {
6295
+ kind: "PiShape";
6296
+ /** @format double */
6297
+ a: number;
6298
+ /** @format double */
6299
+ b: number;
6300
+ /** @format double */
6301
+ c: number;
6302
+ /** @format double */
6303
+ d: number;
6304
+ } | {
6305
+ kind: "PiecewiseLinear";
6306
+ points: [number, number][];
6220
6307
  };
6221
6308
  /** Request for fuzzy subsumption check */
6222
6309
  interface FuzzySubsumptionRequest$1 {
@@ -15570,6 +15657,176 @@ interface CyclicGaussianShape {
15570
15657
  stdDev: number;
15571
15658
  period: number;
15572
15659
  }
15660
+ /**
15661
+ * Sigmoid (logistic) fuzzy membership function: monotonic S-curve transition.
15662
+ *
15663
+ * Membership: `μ(x) = 1 / (1 + exp(-steepness * (x - midpoint)))`.
15664
+ * Positive steepness = increasing (left-open), negative = decreasing (right-open).
15665
+ *
15666
+ * Use case: threshold transitions (e.g., DNA match confidence, toxicity cutoffs).
15667
+ *
15668
+ * @remarks Discriminator field is `"kind"`, NOT `"type"`.
15669
+ */
15670
+ interface SigmoidShape {
15671
+ kind: 'Sigmoid';
15672
+ midpoint: number;
15673
+ steepness: number;
15674
+ }
15675
+ /**
15676
+ * Generalized bell fuzzy membership function: tunable flat-top bell shape.
15677
+ *
15678
+ * Membership: `μ(x) = 1 / (1 + |((x - center) / width)|^(2*slope))`.
15679
+ * Unlike Gaussian, the slope parameter controls how sharply the curve falls off
15680
+ * and the width parameter controls the flat-top region.
15681
+ *
15682
+ * @remarks Discriminator field is `"kind"`, NOT `"type"`.
15683
+ */
15684
+ interface BellShape {
15685
+ kind: 'Bell';
15686
+ center: number;
15687
+ width: number;
15688
+ slope: number;
15689
+ }
15690
+ /**
15691
+ * Difference of two sigmoids: creates a smooth bounded region.
15692
+ *
15693
+ * Membership: `μ(x) = sigmoid(x, midpoint1, steepness1) - sigmoid(x, midpoint2, steepness2)`.
15694
+ * Creates a smooth "bump" between two transition points (like a smooth trapezoidal).
15695
+ *
15696
+ * @remarks Discriminator field is `"kind"`, NOT `"type"`.
15697
+ */
15698
+ interface SigmoidDifferenceShape {
15699
+ kind: 'SigmoidDifference';
15700
+ midpoint1: number;
15701
+ steepness1: number;
15702
+ midpoint2: number;
15703
+ steepness2: number;
15704
+ }
15705
+ /**
15706
+ * Product of two Gaussians (gauss2mf): asymmetric flat-top bell shape.
15707
+ *
15708
+ * Membership: left Gaussian up to mean1, flat 1.0 in [mean1, mean2],
15709
+ * right Gaussian after mean2.
15710
+ * `μ(x) = exp(-(x - mean1)^2 / (2 * stdDev1^2))` for x < mean1,
15711
+ * `μ(x) = 1` for mean1 <= x <= mean2,
15712
+ * `μ(x) = exp(-(x - mean2)^2 / (2 * stdDev2^2))` for x > mean2.
15713
+ *
15714
+ * @remarks Discriminator field is `"kind"`, NOT `"type"`.
15715
+ */
15716
+ interface GaussianProductShape {
15717
+ kind: 'GaussianProduct';
15718
+ mean1: number;
15719
+ stdDev1: number;
15720
+ mean2: number;
15721
+ stdDev2: number;
15722
+ }
15723
+ /**
15724
+ * Product of two sigmoids: always non-negative bounded region.
15725
+ *
15726
+ * Membership: `μ(x) = sigmoid(x, midpoint1, steepness1) * sigmoid(x, midpoint2, steepness2)`.
15727
+ * Unlike {@link SigmoidDifferenceShape}, the product is always non-negative.
15728
+ *
15729
+ * @remarks Discriminator field is `"kind"`, NOT `"type"`.
15730
+ */
15731
+ interface SigmoidProductShape {
15732
+ kind: 'SigmoidProduct';
15733
+ midpoint1: number;
15734
+ steepness1: number;
15735
+ midpoint2: number;
15736
+ steepness2: number;
15737
+ }
15738
+ /**
15739
+ * Cosine fuzzy membership function with compact support.
15740
+ *
15741
+ * Membership: `μ(x) = 0.5 * (1 + cos(2π/width * (x - center)))` for `|x - center| <= width/2`,
15742
+ * `μ(x) = 0` otherwise.
15743
+ *
15744
+ * @remarks Discriminator field is `"kind"`, NOT `"type"`.
15745
+ */
15746
+ interface CosineShape {
15747
+ kind: 'Cosine';
15748
+ center: number;
15749
+ width: number;
15750
+ }
15751
+ /**
15752
+ * Spike (Laplacian/double-exponential) fuzzy membership function.
15753
+ *
15754
+ * Membership: `μ(x) = exp(-|x - center| / width)`.
15755
+ * Sharp cusp at center with exponential tails.
15756
+ *
15757
+ * @remarks Discriminator field is `"kind"`, NOT `"type"`.
15758
+ */
15759
+ interface SpikeShape {
15760
+ kind: 'Spike';
15761
+ center: number;
15762
+ width: number;
15763
+ }
15764
+ /**
15765
+ * Cauchy (Lorentzian) fuzzy membership function with heavy tails.
15766
+ *
15767
+ * Membership: `μ(x) = 1 / (1 + ((x - center) / gamma)^2)`.
15768
+ * Unlike Gaussian, the tails never reach zero.
15769
+ *
15770
+ * @remarks Discriminator field is `"kind"`, NOT `"type"`.
15771
+ */
15772
+ interface CauchyShape {
15773
+ kind: 'Cauchy';
15774
+ center: number;
15775
+ gamma: number;
15776
+ }
15777
+ /**
15778
+ * S-shaped (smf) fuzzy membership function: smooth monotonic spline from 0 to 1.
15779
+ *
15780
+ * Membership: piecewise quadratic transition from 0 at `a` to 1 at `b`.
15781
+ * Unlike {@link SigmoidShape}, reaches exact 0 and 1.
15782
+ *
15783
+ * @remarks Discriminator field is `"kind"`, NOT `"type"`.
15784
+ */
15785
+ interface SShapeShape {
15786
+ kind: 'SShape';
15787
+ a: number;
15788
+ b: number;
15789
+ }
15790
+ /**
15791
+ * Z-shaped (zmf) fuzzy membership function: smooth monotonic spline from 1 to 0.
15792
+ *
15793
+ * Membership: mirror of {@link SShapeShape}. Piecewise quadratic transition
15794
+ * from 1 at `a` to 0 at `b`.
15795
+ *
15796
+ * @remarks Discriminator field is `"kind"`, NOT `"type"`.
15797
+ */
15798
+ interface ZShapeShape {
15799
+ kind: 'ZShape';
15800
+ a: number;
15801
+ b: number;
15802
+ }
15803
+ /**
15804
+ * Pi-shaped (pimf) fuzzy membership function: smooth compact flat-top bump.
15805
+ *
15806
+ * Membership: `μ(x) = SShape(x, a, b) * ZShape(x, c, d)`.
15807
+ * Like a smooth {@link TrapezoidalShape}.
15808
+ *
15809
+ * @remarks Discriminator field is `"kind"`, NOT `"type"`.
15810
+ */
15811
+ interface PiShapeShape {
15812
+ kind: 'PiShape';
15813
+ a: number;
15814
+ b: number;
15815
+ c: number;
15816
+ d: number;
15817
+ }
15818
+ /**
15819
+ * Piecewise linear fuzzy membership function defined by (x, mu) data points.
15820
+ *
15821
+ * Membership is linearly interpolated between the provided points.
15822
+ * Each point is a `[x, mu]` tuple where `mu` is the membership degree.
15823
+ *
15824
+ * @remarks Discriminator field is `"kind"`, NOT `"type"`.
15825
+ */
15826
+ interface PiecewiseLinearShape {
15827
+ kind: 'PiecewiseLinear';
15828
+ points: [number, number][];
15829
+ }
15573
15830
  /**
15574
15831
  * Fuzzy membership function shape.
15575
15832
  *
@@ -15582,10 +15839,11 @@ interface CyclicGaussianShape {
15582
15839
  * @example
15583
15840
  * ```json
15584
15841
  * {"kind": "Triangular", "a": 20, "b": 22, "c": 24}
15585
- * {"kind": "Gaussian", "mean": 100, "std_dev": 15}
15842
+ * {"kind": "Gaussian", "mean": 100, "stdDev": 15}
15843
+ * {"kind": "Sigmoid", "midpoint": 0.95, "steepness": 20}
15586
15844
  * ```
15587
15845
  */
15588
- type FuzzyShapeDto = TriangularShape | TrapezoidalShape | GaussianShape | CyclicGaussianShape;
15846
+ type FuzzyShapeDto = TriangularShape | TrapezoidalShape | GaussianShape | CyclicGaussianShape | SigmoidShape | BellShape | SigmoidDifferenceShape | GaussianProductShape | SigmoidProductShape | CosineShape | SpikeShape | CauchyShape | SShapeShape | ZShapeShape | PiShapeShape | PiecewiseLinearShape;
15589
15847
  /**
15590
15848
  * Tagged feature value types used in OsfConstraintDto Feature variant.
15591
15849
  *
@@ -15644,27 +15902,39 @@ type FeatureTargetDto = TaggedFeatureValueDto | string;
15644
15902
  */
15645
15903
  type FeatureValueDto = string | number | boolean | null | FeatureValueDto[];
15646
15904
 
15905
+ type values_BellShape = BellShape;
15647
15906
  type values_BooleanValue = BooleanValue;
15907
+ type values_CauchyShape = CauchyShape;
15908
+ type values_CosineShape = CosineShape;
15648
15909
  type values_CyclicGaussianShape = CyclicGaussianShape;
15649
15910
  type values_FeatureTargetDto = FeatureTargetDto;
15650
15911
  type values_FeatureValueDto = FeatureValueDto;
15651
15912
  type values_FuzzyNumberValue = FuzzyNumberValue;
15652
15913
  type values_FuzzyScalarValue = FuzzyScalarValue;
15653
15914
  type values_FuzzyShapeDto = FuzzyShapeDto;
15915
+ type values_GaussianProductShape = GaussianProductShape;
15654
15916
  type values_GaussianShape = GaussianShape;
15655
15917
  type values_IntegerValue = IntegerValue;
15656
15918
  type values_ListValue = ListValue;
15919
+ type values_PiShapeShape = PiShapeShape;
15920
+ type values_PiecewiseLinearShape = PiecewiseLinearShape;
15657
15921
  type values_RealValue = RealValue;
15658
15922
  type values_ReferenceValue = ReferenceValue;
15923
+ type values_SShapeShape = SShapeShape;
15659
15924
  type values_SetValue = SetValue;
15925
+ type values_SigmoidDifferenceShape = SigmoidDifferenceShape;
15926
+ type values_SigmoidProductShape = SigmoidProductShape;
15927
+ type values_SigmoidShape = SigmoidShape;
15928
+ type values_SpikeShape = SpikeShape;
15660
15929
  type values_StringValue = StringValue;
15661
15930
  type values_TaggedFeatureValueDto = TaggedFeatureValueDto;
15662
15931
  type values_TrapezoidalShape = TrapezoidalShape;
15663
15932
  type values_TriangularShape = TriangularShape;
15664
15933
  type values_UninstantiatedValue = UninstantiatedValue;
15665
15934
  type values_ValueDto = ValueDto;
15935
+ type values_ZShapeShape = ZShapeShape;
15666
15936
  declare namespace values {
15667
- export type { values_BooleanValue as BooleanValue, values_CyclicGaussianShape as CyclicGaussianShape, values_FeatureTargetDto as FeatureTargetDto, values_FeatureValueDto as FeatureValueDto, values_FuzzyNumberValue as FuzzyNumberValue, values_FuzzyScalarValue as FuzzyScalarValue, values_FuzzyShapeDto as FuzzyShapeDto, values_GaussianShape as GaussianShape, values_IntegerValue as IntegerValue, values_ListValue as ListValue, values_RealValue as RealValue, values_ReferenceValue as ReferenceValue, values_SetValue as SetValue, values_StringValue as StringValue, values_TaggedFeatureValueDto as TaggedFeatureValueDto, values_TrapezoidalShape as TrapezoidalShape, values_TriangularShape as TriangularShape, values_UninstantiatedValue as UninstantiatedValue, values_ValueDto as ValueDto };
15937
+ export type { values_BellShape as BellShape, values_BooleanValue as BooleanValue, values_CauchyShape as CauchyShape, values_CosineShape as CosineShape, values_CyclicGaussianShape as CyclicGaussianShape, values_FeatureTargetDto as FeatureTargetDto, values_FeatureValueDto as FeatureValueDto, values_FuzzyNumberValue as FuzzyNumberValue, values_FuzzyScalarValue as FuzzyScalarValue, values_FuzzyShapeDto as FuzzyShapeDto, values_GaussianProductShape as GaussianProductShape, values_GaussianShape as GaussianShape, values_IntegerValue as IntegerValue, values_ListValue as ListValue, values_PiShapeShape as PiShapeShape, values_PiecewiseLinearShape as PiecewiseLinearShape, values_RealValue as RealValue, values_ReferenceValue as ReferenceValue, values_SShapeShape as SShapeShape, values_SetValue as SetValue, values_SigmoidDifferenceShape as SigmoidDifferenceShape, values_SigmoidProductShape as SigmoidProductShape, values_SigmoidShape as SigmoidShape, values_SpikeShape as SpikeShape, values_StringValue as StringValue, values_TaggedFeatureValueDto as TaggedFeatureValueDto, values_TrapezoidalShape as TrapezoidalShape, values_TriangularShape as TriangularShape, values_UninstantiatedValue as UninstantiatedValue, values_ValueDto as ValueDto, values_ZShapeShape as ZShapeShape };
15668
15938
  }
15669
15939
 
15670
15940
  /**
@@ -21507,7 +21777,7 @@ declare class FuzzyClient {
21507
21777
  * @returns Similarity comparison result.
21508
21778
  * @see fuzzyUnify
21509
21779
  */
21510
- compareSimilarity(term1Id: string, term2Id: string, options?: Partial<Omit<FuzzyUnifyRequest, 'term1_id' | 'term2_id'>>): Promise<FuzzyUnifyResponse>;
21780
+ compareSimilarity(term1Id: string, term2Id: string, options?: Partial<Omit<FuzzyUnifyRequest, 'term1Id' | 'term2Id'>>): Promise<FuzzyUnifyResponse>;
21511
21781
  /**
21512
21782
  * Fuzzy merge two terms.
21513
21783
  *
@@ -37304,6 +37574,686 @@ declare class ConversationClient {
37304
37574
  deleteConversation(conversationId: string): Promise<void>;
37305
37575
  }
37306
37576
 
37577
+ /** Source of paper metadata. */
37578
+ type PaperSource = 'PubMed' | 'SemanticScholar' | 'CrossRef' | 'ArXiv';
37579
+ /** Request to search for papers across external sources. */
37580
+ interface SearchPapersRequest {
37581
+ /** Search query string. */
37582
+ query: string;
37583
+ /** Maximum number of results to return. */
37584
+ maxResults?: number;
37585
+ /** Restrict to specific sources. */
37586
+ sources?: PaperSource[];
37587
+ }
37588
+ /** Metadata about a scientific paper. */
37589
+ interface PaperMetadataDto {
37590
+ /** Paper title. */
37591
+ title: string;
37592
+ /** Author names. */
37593
+ authors: string[];
37594
+ /** Digital Object Identifier. */
37595
+ doi?: string | null;
37596
+ /** PubMed ID. */
37597
+ pmid?: string | null;
37598
+ /** arXiv ID. */
37599
+ arxivId?: string | null;
37600
+ /** Journal or venue name. */
37601
+ journal?: string | null;
37602
+ /** Publication year. */
37603
+ year?: number | null;
37604
+ /** Abstract text. */
37605
+ abstractText?: string | null;
37606
+ /** Citation count. */
37607
+ citationCount?: number | null;
37608
+ /** Source database. */
37609
+ source: PaperSource;
37610
+ /** URL to full text. */
37611
+ fullTextUrl?: string | null;
37612
+ }
37613
+ /** A search result with relevance score. */
37614
+ interface PaperSearchResultDto {
37615
+ /** Paper metadata. */
37616
+ metadata: PaperMetadataDto;
37617
+ /** Relevance score (0.0-1.0). */
37618
+ relevanceScore?: number | null;
37619
+ }
37620
+ /** Response from paper search. */
37621
+ interface SearchPapersResponse {
37622
+ /** Search results. */
37623
+ results: PaperSearchResultDto[];
37624
+ /** Total results found (may exceed returned count). */
37625
+ totalFound: number;
37626
+ }
37627
+ /** Status of a research session. */
37628
+ type ResearchSessionStatusDto = 'Created' | 'Bootstrapping' | 'Retrieving' | 'Ingesting' | 'Verifying' | 'Reporting' | 'Completed' | 'Failed';
37629
+ /** Request to create a new research session. */
37630
+ interface CreateResearchSessionRequest {
37631
+ /** The research question to investigate. */
37632
+ question: string;
37633
+ /** Maximum number of research cycles. */
37634
+ maxCycles?: number;
37635
+ /** Maximum number of papers to ingest. */
37636
+ maxPapers?: number;
37637
+ /** Restrict paper search to specific sources. */
37638
+ paperSources?: PaperSource[];
37639
+ }
37640
+ /** Response from creating a research session. */
37641
+ interface CreateResearchSessionResponse {
37642
+ /** Session ID (UUID). */
37643
+ sessionId: string;
37644
+ /** Current session status. */
37645
+ status: ResearchSessionStatusDto;
37646
+ /** The research question. */
37647
+ question: string;
37648
+ /** When the session was created (ISO 8601). */
37649
+ createdAt: string;
37650
+ }
37651
+ /** Full research session state. */
37652
+ interface ResearchSessionResponse {
37653
+ /** Session ID (UUID). */
37654
+ sessionId: string;
37655
+ /** The research question. */
37656
+ question: string;
37657
+ /** Current session status. */
37658
+ status: ResearchSessionStatusDto;
37659
+ /** Error message if status is Failed. */
37660
+ error?: string | null;
37661
+ /** Results from each completed cycle. */
37662
+ cycles: ResearchCycleResultDto[];
37663
+ /** Total papers ingested. */
37664
+ totalPapersIngested: number;
37665
+ /** Total findings. */
37666
+ totalFindings: number;
37667
+ /** Total contradictions. */
37668
+ totalContradictions: number;
37669
+ /** Total knowledge gaps. */
37670
+ totalGaps: number;
37671
+ /** When the session was created (ISO 8601). */
37672
+ createdAt: string;
37673
+ /** When the session was last updated (ISO 8601). */
37674
+ updatedAt: string;
37675
+ }
37676
+ /** Results from a single research cycle. */
37677
+ interface ResearchCycleResultDto {
37678
+ /** Cycle number (1-indexed). */
37679
+ cycleNumber: number;
37680
+ /** Knowledge gaps detected at start of cycle. */
37681
+ gapsDetected: number;
37682
+ /** Gaps resolved during this cycle. */
37683
+ gapsResolved: number;
37684
+ /** Papers retrieved from external APIs. */
37685
+ papersRetrieved: number;
37686
+ /** Papers successfully ingested. */
37687
+ papersIngested: number;
37688
+ /** Claims verified. */
37689
+ claimsVerified: number;
37690
+ /** Contradictions detected. */
37691
+ contradictionsDetected: number;
37692
+ /** Processing time for this cycle in milliseconds. */
37693
+ processingTimeMs: number;
37694
+ /** Search queries used. */
37695
+ searchQueries: string[];
37696
+ }
37697
+ /** Optional parameters for running a research cycle. */
37698
+ interface RunResearchCycleRequest {
37699
+ /** Additional search queries to include. */
37700
+ additionalQueries?: string[];
37701
+ /** Override maximum papers for this cycle. */
37702
+ maxPapersThisCycle?: number;
37703
+ }
37704
+ /** Response from running a research cycle. */
37705
+ interface ResearchCycleResponse {
37706
+ /** Session ID. */
37707
+ sessionId: string;
37708
+ /** Current session status after cycle. */
37709
+ status: ResearchSessionStatusDto;
37710
+ /** Results from this cycle. */
37711
+ cycle: ResearchCycleResultDto;
37712
+ /** Whether the session has converged (no more cycles needed). */
37713
+ converged: boolean;
37714
+ }
37715
+ /** Summary of a single evidence item. */
37716
+ interface EvidenceItemSummaryDto {
37717
+ /** OSFKB term ID of the evidence. */
37718
+ termId: string;
37719
+ /** Description of the evidence. */
37720
+ description: string;
37721
+ /** Quality weight (0.0-1.0). */
37722
+ qualityWeight: number;
37723
+ /** Whether this evidence supports the claim. */
37724
+ supports: boolean;
37725
+ /** Contribution to the overall assessment. */
37726
+ contribution: number;
37727
+ /** DOI of the paper providing this evidence. */
37728
+ paperDoi?: string | null;
37729
+ }
37730
+ /** A step in the provenance chain. */
37731
+ interface ProvenanceStepDto {
37732
+ /** Type of step: "extraction", "inference", "assessment". */
37733
+ stepType: string;
37734
+ /** Description of what happened. */
37735
+ description: string;
37736
+ /** OSFKB entity ID involved. */
37737
+ entityId?: string | null;
37738
+ /** Timestamp (ISO 8601). */
37739
+ timestamp?: string | null;
37740
+ }
37741
+ /** A verified research finding. */
37742
+ interface ResearchFindingDto {
37743
+ /** OSFKB term ID of the claim. */
37744
+ claimId: string;
37745
+ /** The claim statement. */
37746
+ statement: string;
37747
+ /** Evidence assessment truthfulness score (0.0-1.0). */
37748
+ truthfulness: number;
37749
+ /** Assessment label. */
37750
+ label: string;
37751
+ /** Supporting evidence items. */
37752
+ supportingEvidence: EvidenceItemSummaryDto[];
37753
+ /** Contradicting evidence items. */
37754
+ contradictingEvidence: EvidenceItemSummaryDto[];
37755
+ /** Full provenance chain. */
37756
+ provenanceChain: ProvenanceStepDto[];
37757
+ /** Whether assessment was residuated. */
37758
+ residuated: boolean;
37759
+ /** Reason for residuation. */
37760
+ residuationReason?: string | null;
37761
+ }
37762
+ /** Response containing research findings. */
37763
+ interface ResearchFindingsResponse {
37764
+ /** Session ID. */
37765
+ sessionId: string;
37766
+ /** Verified findings. */
37767
+ findings: ResearchFindingDto[];
37768
+ /** Total findings count. */
37769
+ total: number;
37770
+ }
37771
+ /** A knowledge gap identified by goal residuation. */
37772
+ interface KnowledgeGapDto {
37773
+ /** The sort name that is missing. */
37774
+ sortName: string;
37775
+ /** Information gain score. */
37776
+ infoGain: number;
37777
+ /** Rule head names that need this sort. */
37778
+ neededBy: string[];
37779
+ /** What would resolve this gap. */
37780
+ wakeTrigger: string;
37781
+ /** Suggested search query. */
37782
+ suggestedSearchQuery?: string | null;
37783
+ }
37784
+ /** Response containing knowledge gaps. */
37785
+ interface ResearchGapsResponse {
37786
+ /** Session ID. */
37787
+ sessionId: string;
37788
+ /** Knowledge gaps. */
37789
+ gaps: KnowledgeGapDto[];
37790
+ /** Total gaps count. */
37791
+ total: number;
37792
+ }
37793
+ /** A detected contradiction between two claims. */
37794
+ interface ContradictionDto {
37795
+ /** OSFKB term ID of the first claim. */
37796
+ claimAId: string;
37797
+ /** OSFKB term ID of the second claim. */
37798
+ claimBId: string;
37799
+ /** Statement of the first claim. */
37800
+ statementA: string;
37801
+ /** Statement of the second claim. */
37802
+ statementB: string;
37803
+ /** Disentailment confidence score. */
37804
+ confidence: number;
37805
+ /** Explanation of the contradiction. */
37806
+ explanation: string;
37807
+ }
37808
+ /** Response containing contradictions. */
37809
+ interface ResearchContradictionsResponse {
37810
+ /** Session ID. */
37811
+ sessionId: string;
37812
+ /** Contradictions. */
37813
+ contradictions: ContradictionDto[];
37814
+ /** Total contradictions count. */
37815
+ total: number;
37816
+ }
37817
+ /** Research statistics. */
37818
+ interface ResearchStatisticsDto {
37819
+ /** Total research cycles. */
37820
+ totalCycles: number;
37821
+ /** Total papers retrieved. */
37822
+ totalPapersRetrieved: number;
37823
+ /** Total papers ingested. */
37824
+ totalPapersIngested: number;
37825
+ /** Total claims extracted. */
37826
+ totalClaimsExtracted: number;
37827
+ /** Total claims verified. */
37828
+ totalClaimsVerified: number;
37829
+ /** Total contradictions detected. */
37830
+ totalContradictions: number;
37831
+ /** Total processing time in milliseconds. */
37832
+ totalProcessingTimeMs: number;
37833
+ /** Knowledge gaps resolved. */
37834
+ gapsResolved: number;
37835
+ /** Knowledge gaps remaining. */
37836
+ gapsRemaining: number;
37837
+ }
37838
+ /** Report verification result. */
37839
+ interface ReportVerificationDto {
37840
+ /** Overall verdict. */
37841
+ verdict: string;
37842
+ /** Verification score (0.0-1.0). */
37843
+ score: number;
37844
+ /** Computation time in milliseconds. */
37845
+ computationTimeMs: number;
37846
+ }
37847
+ /** Full research report response. */
37848
+ interface ResearchReportResponse {
37849
+ /** Session ID. */
37850
+ sessionId: string;
37851
+ /** The original research question. */
37852
+ question: string;
37853
+ /** Executive summary. */
37854
+ summary: string;
37855
+ /** Verified findings. */
37856
+ findings: ResearchFindingDto[];
37857
+ /** Unresolved knowledge gaps. */
37858
+ knowledgeGaps: KnowledgeGapDto[];
37859
+ /** Detected contradictions. */
37860
+ contradictions: ContradictionDto[];
37861
+ /** Research statistics. */
37862
+ statistics: ResearchStatisticsDto;
37863
+ /** Generated report content (markdown). */
37864
+ generatedContent?: string | null;
37865
+ /** Oversight verification result. */
37866
+ verification?: ReportVerificationDto | null;
37867
+ }
37868
+ /** Request to ingest a specific paper. */
37869
+ interface IngestPaperRequest {
37870
+ /** Paper identifier (DOI, PMID, arXiv ID, or URL). */
37871
+ identifier: string;
37872
+ /** Type of identifier. */
37873
+ identifierType: 'doi' | 'pmid' | 'arxiv_id' | 'url';
37874
+ /** Session ID to associate ingestion with. */
37875
+ sessionId?: string | null;
37876
+ }
37877
+ /** Response from paper ingestion. */
37878
+ interface IngestPaperResponse {
37879
+ /** Whether ingestion succeeded. */
37880
+ success: boolean;
37881
+ /** Paper metadata. */
37882
+ metadata?: PaperMetadataDto | null;
37883
+ /** Number of entities extracted. */
37884
+ entitiesExtracted: number;
37885
+ /** Number of claims extracted. */
37886
+ claimsExtracted: number;
37887
+ /** Error message if failed. */
37888
+ error?: string | null;
37889
+ }
37890
+ /** Request to verify a specific claim. */
37891
+ interface VerifyClaimRequest {
37892
+ /** Claim term ID (UUID). */
37893
+ claimTermId: string;
37894
+ /** Evidence sort ID (UUID). */
37895
+ evidenceSortId: string;
37896
+ }
37897
+ /** Response from claim verification. */
37898
+ interface VerifyClaimResponse {
37899
+ /** Truthfulness score (0.0-1.0). */
37900
+ truthfulness: number;
37901
+ /** Assessment label. */
37902
+ label: string;
37903
+ /** Number of supporting evidence items. */
37904
+ supportingCount: number;
37905
+ /** Number of contradicting evidence items. */
37906
+ contradictingCount: number;
37907
+ /** Whether assessment was residuated. */
37908
+ residuated: boolean;
37909
+ /** Reason for residuation. */
37910
+ residuationReason?: string | null;
37911
+ }
37912
+
37913
+ type research_ContradictionDto = ContradictionDto;
37914
+ type research_CreateResearchSessionRequest = CreateResearchSessionRequest;
37915
+ type research_CreateResearchSessionResponse = CreateResearchSessionResponse;
37916
+ type research_EvidenceItemSummaryDto = EvidenceItemSummaryDto;
37917
+ type research_IngestPaperRequest = IngestPaperRequest;
37918
+ type research_IngestPaperResponse = IngestPaperResponse;
37919
+ type research_KnowledgeGapDto = KnowledgeGapDto;
37920
+ type research_PaperMetadataDto = PaperMetadataDto;
37921
+ type research_PaperSearchResultDto = PaperSearchResultDto;
37922
+ type research_PaperSource = PaperSource;
37923
+ type research_ProvenanceStepDto = ProvenanceStepDto;
37924
+ type research_ReportVerificationDto = ReportVerificationDto;
37925
+ type research_ResearchContradictionsResponse = ResearchContradictionsResponse;
37926
+ type research_ResearchCycleResponse = ResearchCycleResponse;
37927
+ type research_ResearchCycleResultDto = ResearchCycleResultDto;
37928
+ type research_ResearchFindingDto = ResearchFindingDto;
37929
+ type research_ResearchFindingsResponse = ResearchFindingsResponse;
37930
+ type research_ResearchGapsResponse = ResearchGapsResponse;
37931
+ type research_ResearchReportResponse = ResearchReportResponse;
37932
+ type research_ResearchSessionResponse = ResearchSessionResponse;
37933
+ type research_ResearchSessionStatusDto = ResearchSessionStatusDto;
37934
+ type research_ResearchStatisticsDto = ResearchStatisticsDto;
37935
+ type research_RunResearchCycleRequest = RunResearchCycleRequest;
37936
+ type research_SearchPapersRequest = SearchPapersRequest;
37937
+ type research_SearchPapersResponse = SearchPapersResponse;
37938
+ type research_VerifyClaimRequest = VerifyClaimRequest;
37939
+ type research_VerifyClaimResponse = VerifyClaimResponse;
37940
+ declare namespace research {
37941
+ export type { research_ContradictionDto as ContradictionDto, 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_PaperMetadataDto as PaperMetadataDto, 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_ResearchStatisticsDto as ResearchStatisticsDto, research_RunResearchCycleRequest as RunResearchCycleRequest, research_SearchPapersRequest as SearchPapersRequest, research_SearchPapersResponse as SearchPapersResponse, research_VerifyClaimRequest as VerifyClaimRequest, research_VerifyClaimResponse as VerifyClaimResponse };
37942
+ }
37943
+
37944
+ /**
37945
+ * Resource client for verified scientific research pipeline operations.
37946
+ *
37947
+ * @remarks
37948
+ * Wraps the scientific-research microservice endpoints which orchestrate
37949
+ * a multi-cycle research pipeline: paper retrieval, ingestion into the
37950
+ * OSFKB, claim extraction, evidence assessment via backward chaining,
37951
+ * contradiction detection via disentailment, knowledge gap analysis via
37952
+ * goal residuation, and report generation with FormalJudge verification.
37953
+ *
37954
+ * Research sessions progress through states: Created -> Bootstrapping ->
37955
+ * Retrieving -> Ingesting -> Verifying -> Reporting -> Completed (or Failed).
37956
+ *
37957
+ * Delegates to the generated HTTP client for type-safe transport with
37958
+ * automatic serialization, authentication, retry, and timeout behavior.
37959
+ */
37960
+ declare class ResearchClient {
37961
+ /** @internal */
37962
+ private readonly http;
37963
+ /** @internal */
37964
+ constructor(http: HttpClient);
37965
+ /**
37966
+ * Create a new research session for a given research question.
37967
+ *
37968
+ * @param request - The research session creation request.
37969
+ * @returns The created session with its ID, status, and creation timestamp.
37970
+ * @throws {ApiError} If the request fails.
37971
+ *
37972
+ * @remarks
37973
+ * Initializes a new research pipeline session. The session starts in
37974
+ * "Created" status and must be advanced by calling {@link runCycle} or
37975
+ * {@link runToCompletion}.
37976
+ *
37977
+ * @example
37978
+ * ```typescript
37979
+ * const session = await client.research.createSession({
37980
+ * question: 'What are the mechanisms of antibiotic resistance in E. coli?',
37981
+ * maxCycles: 5,
37982
+ * maxPapers: 50,
37983
+ * paperSources: ['PubMed', 'SemanticScholar'],
37984
+ * });
37985
+ * console.log(session.sessionId); // UUID
37986
+ * console.log(session.status); // "Created"
37987
+ * ```
37988
+ */
37989
+ createSession(request: CreateResearchSessionRequest): Promise<CreateResearchSessionResponse>;
37990
+ /**
37991
+ * Get the current state of a research session.
37992
+ *
37993
+ * @param sessionId - The session ID (UUID).
37994
+ * @returns Full session state including cycles, totals, and timestamps.
37995
+ * @throws {ApiError} If the session does not exist or the request fails.
37996
+ *
37997
+ * @remarks
37998
+ * Returns the complete session state including all completed cycle results,
37999
+ * aggregate counts (papers ingested, findings, contradictions, gaps), and
38000
+ * the current session status.
38001
+ *
38002
+ * @example
38003
+ * ```typescript
38004
+ * const session = await client.research.getSession('session-uuid');
38005
+ * console.log(session.status); // "Completed"
38006
+ * console.log(session.totalPapersIngested); // 42
38007
+ * console.log(session.totalFindings); // 17
38008
+ * console.log(session.cycles.length); // 3
38009
+ * ```
38010
+ */
38011
+ getSession(sessionId: string): Promise<ResearchSessionResponse>;
38012
+ /**
38013
+ * Run a single research cycle within a session.
38014
+ *
38015
+ * @param sessionId - The session ID (UUID).
38016
+ * @param request - Optional parameters for the cycle (additional queries, paper limit).
38017
+ * @returns Cycle results and whether the session has converged.
38018
+ * @throws {ApiError} If the session does not exist or the request fails.
38019
+ *
38020
+ * @remarks
38021
+ * Executes one iteration of the research pipeline: detect knowledge gaps,
38022
+ * generate search queries, retrieve papers, ingest into OSFKB, verify
38023
+ * claims, and detect contradictions. The `converged` field indicates
38024
+ * whether further cycles are needed.
38025
+ *
38026
+ * @example
38027
+ * ```typescript
38028
+ * const result = await client.research.runCycle('session-uuid', {
38029
+ * additionalQueries: ['beta-lactamase gene transfer'],
38030
+ * maxPapersThisCycle: 10,
38031
+ * });
38032
+ * console.log(result.cycle.papersIngested); // 8
38033
+ * console.log(result.cycle.contradictionsDetected); // 1
38034
+ * console.log(result.converged); // false
38035
+ * ```
38036
+ */
38037
+ runCycle(sessionId: string, request?: RunResearchCycleRequest): Promise<ResearchCycleResponse>;
38038
+ /**
38039
+ * Run the research session to completion (all remaining cycles).
38040
+ *
38041
+ * @param sessionId - The session ID (UUID).
38042
+ * @returns Final session state after all cycles have completed.
38043
+ * @throws {ApiError} If the session does not exist or the request fails.
38044
+ *
38045
+ * @remarks
38046
+ * Runs cycles until convergence (no new knowledge gaps) or the maximum
38047
+ * cycle count is reached. This may take significant time depending on
38048
+ * the research question complexity and paper availability.
38049
+ *
38050
+ * @example
38051
+ * ```typescript
38052
+ * const session = await client.research.runToCompletion('session-uuid');
38053
+ * console.log(session.status); // "Completed"
38054
+ * console.log(session.totalPapersIngested); // 47
38055
+ * console.log(session.cycles.length); // 4
38056
+ * ```
38057
+ */
38058
+ runToCompletion(sessionId: string): Promise<ResearchSessionResponse>;
38059
+ /**
38060
+ * Delete a research session and all associated data.
38061
+ *
38062
+ * @param sessionId - The session ID (UUID) to delete.
38063
+ * @throws {ApiError} If the session does not exist or the request fails.
38064
+ *
38065
+ * @remarks
38066
+ * Permanently removes the session, its cycles, findings, gaps, and
38067
+ * contradictions. This operation cannot be undone.
38068
+ *
38069
+ * @example
38070
+ * ```typescript
38071
+ * await client.research.deleteSession('session-uuid');
38072
+ * ```
38073
+ */
38074
+ deleteSession(sessionId: string): Promise<void>;
38075
+ /**
38076
+ * Get verified findings for a research session.
38077
+ *
38078
+ * @param sessionId - The session ID (UUID).
38079
+ * @returns Findings with evidence assessments, provenance chains, and residuation status.
38080
+ * @throws {ApiError} If the session does not exist or the request fails.
38081
+ *
38082
+ * @remarks
38083
+ * Returns all claims that have been verified through evidence assessment.
38084
+ * Each finding includes supporting and contradicting evidence items,
38085
+ * a truthfulness score, and the full provenance chain from paper to claim.
38086
+ *
38087
+ * @example
38088
+ * ```typescript
38089
+ * const { findings, total } = await client.research.getFindings('session-uuid');
38090
+ * for (const finding of findings) {
38091
+ * console.log(`${finding.statement}: ${finding.label} (${finding.truthfulness})`);
38092
+ * console.log(` Supporting: ${finding.supportingEvidence.length}`);
38093
+ * console.log(` Contradicting: ${finding.contradictingEvidence.length}`);
38094
+ * }
38095
+ * ```
38096
+ */
38097
+ getFindings(sessionId: string): Promise<ResearchFindingsResponse>;
38098
+ /**
38099
+ * Get knowledge gaps for a research session.
38100
+ *
38101
+ * @param sessionId - The session ID (UUID).
38102
+ * @returns Knowledge gaps with information gain scores and suggested queries.
38103
+ * @throws {ApiError} If the session does not exist or the request fails.
38104
+ *
38105
+ * @remarks
38106
+ * Returns sorts that are needed by rule heads but have no matching facts,
38107
+ * identified via goal residuation. Each gap includes the information gain
38108
+ * score, the rules that need it, and a suggested search query to resolve it.
38109
+ *
38110
+ * @example
38111
+ * ```typescript
38112
+ * const { gaps, total } = await client.research.getGaps('session-uuid');
38113
+ * for (const gap of gaps) {
38114
+ * console.log(`Missing: ${gap.sortName} (info gain: ${gap.infoGain})`);
38115
+ * console.log(` Needed by: ${gap.neededBy.join(', ')}`);
38116
+ * if (gap.suggestedSearchQuery) {
38117
+ * console.log(` Suggested query: ${gap.suggestedSearchQuery}`);
38118
+ * }
38119
+ * }
38120
+ * ```
38121
+ */
38122
+ getGaps(sessionId: string): Promise<ResearchGapsResponse>;
38123
+ /**
38124
+ * Get detected contradictions for a research session.
38125
+ *
38126
+ * @param sessionId - The session ID (UUID).
38127
+ * @returns Contradictions with claim pairs, confidence scores, and explanations.
38128
+ * @throws {ApiError} If the session does not exist or the request fails.
38129
+ *
38130
+ * @remarks
38131
+ * Returns pairs of claims where disentailment has been detected. Each
38132
+ * contradiction includes both claim statements, a confidence score, and
38133
+ * an explanation of the logical conflict.
38134
+ *
38135
+ * @example
38136
+ * ```typescript
38137
+ * const { contradictions, total } = await client.research.getContradictions('session-uuid');
38138
+ * for (const c of contradictions) {
38139
+ * console.log(`Contradiction (confidence: ${c.confidence}):`);
38140
+ * console.log(` A: ${c.statementA}`);
38141
+ * console.log(` B: ${c.statementB}`);
38142
+ * console.log(` Explanation: ${c.explanation}`);
38143
+ * }
38144
+ * ```
38145
+ */
38146
+ getContradictions(sessionId: string): Promise<ResearchContradictionsResponse>;
38147
+ /**
38148
+ * Get the full research report for a session.
38149
+ *
38150
+ * @param sessionId - The session ID (UUID).
38151
+ * @returns Complete report with findings, gaps, contradictions, statistics, and verification.
38152
+ * @throws {ApiError} If the session does not exist or the request fails.
38153
+ *
38154
+ * @remarks
38155
+ * Generates and returns a comprehensive research report including the
38156
+ * executive summary, all verified findings, unresolved knowledge gaps,
38157
+ * detected contradictions, research statistics, and an optional
38158
+ * FormalJudge verification result.
38159
+ *
38160
+ * @example
38161
+ * ```typescript
38162
+ * const report = await client.research.getReport('session-uuid');
38163
+ * console.log(report.summary);
38164
+ * console.log(`Findings: ${report.findings.length}`);
38165
+ * console.log(`Gaps: ${report.knowledgeGaps.length}`);
38166
+ * console.log(`Contradictions: ${report.contradictions.length}`);
38167
+ * if (report.verification) {
38168
+ * console.log(`Verdict: ${report.verification.verdict} (${report.verification.score})`);
38169
+ * }
38170
+ * ```
38171
+ */
38172
+ getReport(sessionId: string): Promise<ResearchReportResponse>;
38173
+ /**
38174
+ * Search for papers across external scientific databases.
38175
+ *
38176
+ * @param request - Search parameters including query, max results, and source filters.
38177
+ * @returns Search results with paper metadata and relevance scores.
38178
+ * @throws {ApiError} If the request fails.
38179
+ *
38180
+ * @remarks
38181
+ * Queries external paper databases (PubMed, Semantic Scholar, CrossRef, arXiv)
38182
+ * and returns unified results with relevance scores. Results are not
38183
+ * automatically ingested — use {@link ingestPaper} to add specific papers
38184
+ * to the knowledge base.
38185
+ *
38186
+ * @example
38187
+ * ```typescript
38188
+ * const { results, totalFound } = await client.research.searchPapers({
38189
+ * query: 'CRISPR gene editing efficiency',
38190
+ * maxResults: 20,
38191
+ * sources: ['PubMed', 'SemanticScholar'],
38192
+ * });
38193
+ * console.log(`Found ${totalFound} papers, returning ${results.length}`);
38194
+ * for (const r of results) {
38195
+ * console.log(`${r.metadata.title} (${r.metadata.year}) — score: ${r.relevanceScore}`);
38196
+ * }
38197
+ * ```
38198
+ */
38199
+ searchPapers(request: SearchPapersRequest): Promise<SearchPapersResponse>;
38200
+ /**
38201
+ * Ingest a specific paper into the knowledge base.
38202
+ *
38203
+ * @param request - Paper identifier and type, with optional session association.
38204
+ * @returns Ingestion result with metadata and extraction counts.
38205
+ * @throws {ApiError} If the request fails.
38206
+ *
38207
+ * @remarks
38208
+ * Retrieves the paper by its identifier (DOI, PMID, arXiv ID, or URL),
38209
+ * extracts entities and claims, and ingests them into the OSFKB. If a
38210
+ * session ID is provided, the ingested data is associated with that
38211
+ * research session.
38212
+ *
38213
+ * @example
38214
+ * ```typescript
38215
+ * const result = await client.research.ingestPaper({
38216
+ * identifier: '10.1038/s41586-023-06004-9',
38217
+ * identifierType: 'doi',
38218
+ * sessionId: 'session-uuid',
38219
+ * });
38220
+ * if (result.success) {
38221
+ * console.log(`Extracted ${result.entitiesExtracted} entities`);
38222
+ * console.log(`Extracted ${result.claimsExtracted} claims`);
38223
+ * }
38224
+ * ```
38225
+ */
38226
+ ingestPaper(request: IngestPaperRequest): Promise<IngestPaperResponse>;
38227
+ /**
38228
+ * Verify a specific claim against evidence in the knowledge base.
38229
+ *
38230
+ * @param request - Claim term ID and evidence sort ID.
38231
+ * @returns Verification result with truthfulness score and evidence counts.
38232
+ * @throws {ApiError} If the request fails.
38233
+ *
38234
+ * @remarks
38235
+ * Runs evidence assessment on a single claim by collecting all evidence
38236
+ * of the specified sort and computing a truthfulness score. The result
38237
+ * includes the assessment label, counts of supporting/contradicting
38238
+ * evidence, and residuation status if insufficient evidence exists.
38239
+ *
38240
+ * @example
38241
+ * ```typescript
38242
+ * const result = await client.research.verifyClaim({
38243
+ * claimTermId: 'claim-term-uuid',
38244
+ * evidenceSortId: 'evidence-sort-uuid',
38245
+ * });
38246
+ * console.log(`Truthfulness: ${result.truthfulness}`);
38247
+ * console.log(`Label: ${result.label}`);
38248
+ * console.log(`Supporting: ${result.supportingCount}, Contradicting: ${result.contradictingCount}`);
38249
+ * if (result.residuated) {
38250
+ * console.log(`Residuated: ${result.residuationReason}`);
38251
+ * }
38252
+ * ```
38253
+ */
38254
+ verifyClaim(request: VerifyClaimRequest): Promise<VerifyClaimResponse>;
38255
+ }
38256
+
37307
38257
  /** Core knowledge base operations — types, records, rules, functions, constraints, and queries. */
37308
38258
  interface CoreGroup {
37309
38259
  readonly types: SortsClient;
@@ -37477,6 +38427,8 @@ declare class ReasoningLayerClient {
37477
38427
  readonly osfql: OsfqlClient;
37478
38428
  /** Conversational AI operations (NL → OSFQL with self-correction). */
37479
38429
  readonly conversation: ConversationClient;
38430
+ /** Verified scientific research pipeline operations. */
38431
+ readonly research: ResearchClient;
37480
38432
  private _core?;
37481
38433
  private _ai?;
37482
38434
  private _reasoning?;
@@ -37856,6 +38808,253 @@ declare const FuzzyShape: {
37856
38808
  * ```
37857
38809
  */
37858
38810
  readonly cyclicGaussian: (mean: number, stdDev: number, period: number) => CyclicGaussianShape;
38811
+ /**
38812
+ * Create a sigmoid (logistic) fuzzy membership function.
38813
+ *
38814
+ * Monotonic S-curve transition: `μ(x) = 1 / (1 + exp(-steepness * (x - midpoint)))`.
38815
+ * Positive steepness = increasing, negative = decreasing.
38816
+ *
38817
+ * @param midpoint - The x-value where membership = 0.5 (inflection point).
38818
+ * @param steepness - Controls transition sharpness. Positive = left-to-right rise.
38819
+ * @returns A `SigmoidShape`.
38820
+ *
38821
+ * @remarks
38822
+ * Serialization format: Tagged by `"kind"` (FuzzyShapeDto).
38823
+ *
38824
+ * @example
38825
+ * ```typescript
38826
+ * // DNA match confidence: sharp transition around 95%
38827
+ * FuzzyShape.sigmoid(0.95, 20)
38828
+ * // {"kind": "Sigmoid", "midpoint": 0.95, "steepness": 20}
38829
+ * ```
38830
+ */
38831
+ readonly sigmoid: (midpoint: number, steepness: number) => SigmoidShape;
38832
+ /**
38833
+ * Create a generalized bell fuzzy membership function.
38834
+ *
38835
+ * Tunable flat-top bell: `μ(x) = 1 / (1 + |((x - center) / width)|^(2*slope))`.
38836
+ * Unlike Gaussian, the slope controls how sharply the curve drops off.
38837
+ *
38838
+ * @param center - Center of the bell (membership = 1).
38839
+ * @param width - Half-width of the bell at the crossover point.
38840
+ * @param slope - Controls steepness of the sides. Higher = sharper edges.
38841
+ * @returns A `BellShape`.
38842
+ *
38843
+ * @remarks
38844
+ * Serialization format: Tagged by `"kind"` (FuzzyShapeDto).
38845
+ *
38846
+ * @example
38847
+ * ```typescript
38848
+ * FuzzyShape.bell(100, 15, 3)
38849
+ * // {"kind": "Bell", "center": 100, "width": 15, "slope": 3}
38850
+ * ```
38851
+ */
38852
+ readonly bell: (center: number, width: number, slope: number) => BellShape;
38853
+ /**
38854
+ * Create a sigmoid difference fuzzy membership function.
38855
+ *
38856
+ * Difference of two sigmoids: creates a smooth bounded region (like a smooth trapezoidal).
38857
+ * `μ(x) = sigmoid(x, midpoint1, steepness1) - sigmoid(x, midpoint2, steepness2)`.
38858
+ *
38859
+ * @param midpoint1 - Left transition inflection point.
38860
+ * @param steepness1 - Left transition sharpness (positive = rising).
38861
+ * @param midpoint2 - Right transition inflection point.
38862
+ * @param steepness2 - Right transition sharpness (positive = falling).
38863
+ * @returns A `SigmoidDifferenceShape`.
38864
+ *
38865
+ * @remarks
38866
+ * Serialization format: Tagged by `"kind"` (FuzzyShapeDto).
38867
+ *
38868
+ * @example
38869
+ * ```typescript
38870
+ * // Smooth region between pH 6.5 and 7.5
38871
+ * FuzzyShape.sigmoidDifference(6.5, 10, 7.5, 10)
38872
+ * // {"kind": "SigmoidDifference", "midpoint1": 6.5, "steepness1": 10, "midpoint2": 7.5, "steepness2": 10}
38873
+ * ```
38874
+ */
38875
+ readonly sigmoidDifference: (midpoint1: number, steepness1: number, midpoint2: number, steepness2: number) => SigmoidDifferenceShape;
38876
+ /**
38877
+ * Create a Gaussian product (gauss2mf) fuzzy membership function.
38878
+ *
38879
+ * Asymmetric flat-top bell: left Gaussian up to mean1, flat 1.0 in [mean1, mean2],
38880
+ * right Gaussian after mean2.
38881
+ *
38882
+ * @param mean1 - Left Gaussian center.
38883
+ * @param stdDev1 - Left Gaussian standard deviation.
38884
+ * @param mean2 - Right Gaussian center.
38885
+ * @param stdDev2 - Right Gaussian standard deviation.
38886
+ * @returns A `GaussianProductShape`.
38887
+ *
38888
+ * @remarks
38889
+ * Serialization format: Tagged by `"kind"` (FuzzyShapeDto).
38890
+ *
38891
+ * @example
38892
+ * ```typescript
38893
+ * FuzzyShape.gaussianProduct(36.5, 0.3, 37.5, 0.2)
38894
+ * // {"kind": "GaussianProduct", "mean1": 36.5, "stdDev1": 0.3, "mean2": 37.5, "stdDev2": 0.2}
38895
+ * ```
38896
+ */
38897
+ readonly gaussianProduct: (mean1: number, stdDev1: number, mean2: number, stdDev2: number) => GaussianProductShape;
38898
+ /**
38899
+ * Create a sigmoid product fuzzy membership function.
38900
+ *
38901
+ * Product of two sigmoids: `μ(x) = sigmoid(x, midpoint1, steepness1) * sigmoid(x, midpoint2, steepness2)`.
38902
+ * Always non-negative (unlike {@link sigmoidDifference}).
38903
+ *
38904
+ * @param midpoint1 - First sigmoid inflection point.
38905
+ * @param steepness1 - First sigmoid sharpness.
38906
+ * @param midpoint2 - Second sigmoid inflection point.
38907
+ * @param steepness2 - Second sigmoid sharpness.
38908
+ * @returns A `SigmoidProductShape`.
38909
+ *
38910
+ * @remarks
38911
+ * Serialization format: Tagged by `"kind"` (FuzzyShapeDto).
38912
+ *
38913
+ * @example
38914
+ * ```typescript
38915
+ * FuzzyShape.sigmoidProduct(6.5, 10, 7.5, -10)
38916
+ * // {"kind": "SigmoidProduct", "midpoint1": 6.5, "steepness1": 10, "midpoint2": 7.5, "steepness2": -10}
38917
+ * ```
38918
+ */
38919
+ readonly sigmoidProduct: (midpoint1: number, steepness1: number, midpoint2: number, steepness2: number) => SigmoidProductShape;
38920
+ /**
38921
+ * Create a cosine fuzzy membership function with compact support.
38922
+ *
38923
+ * `μ(x) = 0.5 * (1 + cos(2π/width * (x - center)))` for `|x - center| <= width/2`,
38924
+ * `μ(x) = 0` otherwise.
38925
+ *
38926
+ * @param center - Center of the cosine curve (membership = 1).
38927
+ * @param width - Full width of the support region.
38928
+ * @returns A `CosineShape`.
38929
+ *
38930
+ * @remarks
38931
+ * Serialization format: Tagged by `"kind"` (FuzzyShapeDto).
38932
+ *
38933
+ * @example
38934
+ * ```typescript
38935
+ * FuzzyShape.cosine(50, 10)
38936
+ * // {"kind": "Cosine", "center": 50, "width": 10}
38937
+ * ```
38938
+ */
38939
+ readonly cosine: (center: number, width: number) => CosineShape;
38940
+ /**
38941
+ * Create a spike (Laplacian/double-exponential) fuzzy membership function.
38942
+ *
38943
+ * `μ(x) = exp(-|x - center| / width)`. Sharp cusp at center with exponential tails.
38944
+ *
38945
+ * @param center - Peak of the spike (membership = 1).
38946
+ * @param width - Controls the rate of exponential decay.
38947
+ * @returns A `SpikeShape`.
38948
+ *
38949
+ * @remarks
38950
+ * Serialization format: Tagged by `"kind"` (FuzzyShapeDto).
38951
+ *
38952
+ * @example
38953
+ * ```typescript
38954
+ * FuzzyShape.spike(100, 5)
38955
+ * // {"kind": "Spike", "center": 100, "width": 5}
38956
+ * ```
38957
+ */
38958
+ readonly spike: (center: number, width: number) => SpikeShape;
38959
+ /**
38960
+ * Create a Cauchy (Lorentzian) fuzzy membership function.
38961
+ *
38962
+ * `μ(x) = 1 / (1 + ((x - center) / gamma)^2)`. Heavy-tailed bell whose tails never reach zero.
38963
+ *
38964
+ * @param center - Center of the Cauchy curve (membership = 1).
38965
+ * @param gamma - Half-width at half-maximum, controlling the spread.
38966
+ * @returns A `CauchyShape`.
38967
+ *
38968
+ * @remarks
38969
+ * Serialization format: Tagged by `"kind"` (FuzzyShapeDto).
38970
+ *
38971
+ * @example
38972
+ * ```typescript
38973
+ * FuzzyShape.cauchy(0, 1)
38974
+ * // {"kind": "Cauchy", "center": 0, "gamma": 1}
38975
+ * ```
38976
+ */
38977
+ readonly cauchy: (center: number, gamma: number) => CauchyShape;
38978
+ /**
38979
+ * Create an S-shaped (smf) fuzzy membership function.
38980
+ *
38981
+ * Smooth monotonic spline from 0 to 1 using piecewise quadratic.
38982
+ * Reaches exact 0 and 1 (unlike {@link sigmoid}).
38983
+ *
38984
+ * @param a - Foot: x-value where membership starts rising from 0.
38985
+ * @param b - Shoulder: x-value where membership reaches 1.
38986
+ * @returns An `SShapeShape`.
38987
+ *
38988
+ * @remarks
38989
+ * Serialization format: Tagged by `"kind"` (FuzzyShapeDto).
38990
+ *
38991
+ * @example
38992
+ * ```typescript
38993
+ * FuzzyShape.sShape(20, 80)
38994
+ * // {"kind": "SShape", "a": 20, "b": 80}
38995
+ * ```
38996
+ */
38997
+ readonly sShape: (a: number, b: number) => SShapeShape;
38998
+ /**
38999
+ * Create a Z-shaped (zmf) fuzzy membership function.
39000
+ *
39001
+ * Mirror of {@link sShape}. Smooth monotonic spline from 1 to 0
39002
+ * using piecewise quadratic.
39003
+ *
39004
+ * @param a - Shoulder: x-value where membership starts falling from 1.
39005
+ * @param b - Foot: x-value where membership reaches 0.
39006
+ * @returns A `ZShapeShape`.
39007
+ *
39008
+ * @remarks
39009
+ * Serialization format: Tagged by `"kind"` (FuzzyShapeDto).
39010
+ *
39011
+ * @example
39012
+ * ```typescript
39013
+ * FuzzyShape.zShape(20, 80)
39014
+ * // {"kind": "ZShape", "a": 20, "b": 80}
39015
+ * ```
39016
+ */
39017
+ readonly zShape: (a: number, b: number) => ZShapeShape;
39018
+ /**
39019
+ * Create a Pi-shaped (pimf) fuzzy membership function.
39020
+ *
39021
+ * Smooth flat-top bump: `μ(x) = SShape(x, a, b) * ZShape(x, c, d)`.
39022
+ * Like a smooth trapezoidal.
39023
+ *
39024
+ * @param a - Left foot (SShape start).
39025
+ * @param b - Left shoulder (SShape end).
39026
+ * @param c - Right shoulder (ZShape start).
39027
+ * @param d - Right foot (ZShape end).
39028
+ * @returns A `PiShapeShape`.
39029
+ *
39030
+ * @remarks
39031
+ * Serialization format: Tagged by `"kind"` (FuzzyShapeDto).
39032
+ *
39033
+ * @example
39034
+ * ```typescript
39035
+ * FuzzyShape.piShape(10, 20, 60, 80)
39036
+ * // {"kind": "PiShape", "a": 10, "b": 20, "c": 60, "d": 80}
39037
+ * ```
39038
+ */
39039
+ readonly piShape: (a: number, b: number, c: number, d: number) => PiShapeShape;
39040
+ /**
39041
+ * Create a piecewise linear fuzzy membership function.
39042
+ *
39043
+ * Membership is linearly interpolated between the provided (x, mu) data points.
39044
+ *
39045
+ * @param points - Array of `[x, mu]` tuples defining the membership function.
39046
+ * @returns A `PiecewiseLinearShape`.
39047
+ *
39048
+ * @remarks
39049
+ * Serialization format: Tagged by `"kind"` (FuzzyShapeDto).
39050
+ *
39051
+ * @example
39052
+ * ```typescript
39053
+ * FuzzyShape.piecewiseLinear([[0, 0], [0.5, 1], [1, 0]])
39054
+ * // {"kind": "PiecewiseLinear", "points": [[0, 0], [0.5, 1], [1, 0]]}
39055
+ * ```
39056
+ */
39057
+ readonly piecewiseLinear: (points: [number, number][]) => PiecewiseLinearShape;
37859
39058
  };
37860
39059
 
37861
39060
  /**
@@ -38457,4 +39656,4 @@ declare function toUntaggedFeatures(features: PlainFeatureMap): Record<string, F
38457
39656
  */
38458
39657
  declare function toTermInputDto(input: PsiTermInput | TermInputDto): TermInputDto;
38459
39658
 
38460
- export { actionReviews as ActionReviews, type AddFactRequest, type AddFactResponse, type AddRuleRequest, type AddRuleResponse, admin as Admin, type AiGroup, analysis as Analysis, type AnalysisGroup, ApiError, type ApiResponse, AuthenticationError, type BackwardChainRequest, type BackwardChainResponse, BadRequestError, type BulkAddTermsRequest, type BulkAddTermsResponse, type BulkCreateSortsRequest, type BulkCreateSortsResponse, cdl as CDL, causal as Causal, type ClearTermsResponse, type ClientConfig, cognitive as Cognitive, collections as Collections, communities as Communities, type ConstrainedPlainVar, ConstraintViolationError, constraints as Constraints, control as Control, conversation as Conversation, type ConversationMessageRequest, type ConversationMessageResponse, type ConversationSummaryDto, type ConversationTurnsResponse, type CoreGroup, type CreateSortRequest, type CreateTermRequest, type DataGroup, discovery as Discovery, type ErrorResponse, execution as Execution, extract as Extract, type FeatureInputValueDto, type FeatureValueDto, ForbiddenError, type ForwardChainRequest, type ForwardChainResponse, functions as Functions, fuzzy as Fuzzy, FuzzyShape, type FuzzyShapeDto, generation as Generation, type GlbRequest, type GlbResponse, health as Health, homoiconic as Homoiconic, ilp as ILP, imageExtraction as ImageExtraction, inference as Inference, ingestion as Ingestion, type Interceptor, InternalServerError, type JsonValue$1 as JsonValue, LP, type ListConversationsResponse, type LubRequest, type LubResponse, namespaces as Namespaces, NetworkError, neuroSymbolic as NeuroSymbolic, NotFoundError, ontology as Ontology, optimize as Optimize, type OsfSearchRequest, type OsfSearchResponse, osfql as Osfql, type OsfqlRequest, type OsfqlResponse, type OsfqlValue, oversight as Oversight, type PaginationParams, type PlainFeatureMap, type PlainFeatureValue, plainValues as PlainValues, preferences as Preferences, proofEngine as ProofEngine, type PsiTermDto, type PsiTermInput, query as Query, rag as RAG, RateLimitError, type RateLimitInfo, reasoning as Reasoning, type ReasoningGroup, ReasoningLayerClient, ReasoningLayerError, type RequestOptions, reviews as Reviews, row as Row, SDK_VERSION, scenarios as Scenarios, SortBuilder, type SortDto, type SortInfoDto, sorts as Sorts, sources as Sources, spaces as Spaces, statistical as Statistical, synthetic as Synthetic, type SystemGroup, type TermDto, type TermInputArg, type TermInputDto, type TermListResponse, type TermPatternDto, type TermResponse, terms as Terms, TimeoutError, type TurnDto, type UpdateTermRequest, utilities as Utilities, ValidationError, Value, type ValueDto, values as Values, visualization as Visualization, WebSocketClient, WebSocketConnection, webhookActions as WebhookActions, type WorkflowGroup, allen, constrained, discriminateFeatureValue, guard, isConstrainedPlainVar, isPsiTermInput, isTaggedValueDto, isUuid, psi, toTaggedFeatures, toTaggedValue, toTermInputDto, toUntaggedFeatures, toUntaggedValue };
39659
+ export { actionReviews as ActionReviews, type AddFactRequest, type AddFactResponse, type AddRuleRequest, type AddRuleResponse, admin as Admin, type AiGroup, analysis as Analysis, type AnalysisGroup, ApiError, type ApiResponse, AuthenticationError, type BackwardChainRequest, type BackwardChainResponse, BadRequestError, type BulkAddTermsRequest, type BulkAddTermsResponse, type BulkCreateSortsRequest, type BulkCreateSortsResponse, cdl as CDL, causal as Causal, type ClearTermsResponse, type ClientConfig, cognitive as Cognitive, collections as Collections, communities as Communities, type ConstrainedPlainVar, ConstraintViolationError, constraints as Constraints, control as Control, conversation as Conversation, type ConversationMessageRequest, type ConversationMessageResponse, type ConversationSummaryDto, type ConversationTurnsResponse, type CoreGroup, type CreateResearchSessionRequest, type CreateResearchSessionResponse, type CreateSortRequest, type CreateTermRequest, type DataGroup, discovery as Discovery, type ErrorResponse, execution as Execution, extract as Extract, type FeatureInputValueDto, type FeatureValueDto, ForbiddenError, type ForwardChainRequest, type ForwardChainResponse, functions as Functions, fuzzy as Fuzzy, FuzzyShape, type FuzzyShapeDto, generation as Generation, type GlbRequest, type GlbResponse, health as Health, homoiconic as Homoiconic, ilp as ILP, imageExtraction as ImageExtraction, inference as Inference, type IngestPaperRequest, type IngestPaperResponse, ingestion as Ingestion, type Interceptor, InternalServerError, type JsonValue$1 as JsonValue, LP, type ListConversationsResponse, type LubRequest, type LubResponse, namespaces as Namespaces, NetworkError, neuroSymbolic as NeuroSymbolic, NotFoundError, ontology as Ontology, optimize as Optimize, type OsfSearchRequest, type OsfSearchResponse, osfql as Osfql, type OsfqlRequest, type OsfqlResponse, type OsfqlValue, oversight as Oversight, type PaginationParams, type PaperMetadataDto, type PaperSource, type PlainFeatureMap, type PlainFeatureValue, plainValues as PlainValues, preferences as Preferences, proofEngine as ProofEngine, type PsiTermDto, type PsiTermInput, query as Query, rag as RAG, RateLimitError, type RateLimitInfo, reasoning as Reasoning, type ReasoningGroup, ReasoningLayerClient, ReasoningLayerError, type RequestOptions, research as Research, type ResearchContradictionsResponse, type ResearchCycleResponse, type ResearchFindingsResponse, type ResearchGapsResponse, type ResearchReportResponse, type ResearchSessionResponse, reviews as Reviews, row as Row, SDK_VERSION, scenarios as Scenarios, type SearchPapersRequest, type SearchPapersResponse, SortBuilder, type SortDto, type SortInfoDto, sorts as Sorts, sources as Sources, spaces as Spaces, statistical as Statistical, synthetic as Synthetic, type SystemGroup, type TermDto, type TermInputArg, type TermInputDto, type TermListResponse, type TermPatternDto, type TermResponse, terms as Terms, TimeoutError, type TurnDto, type UpdateTermRequest, utilities as Utilities, ValidationError, Value, type ValueDto, values as Values, type VerifyClaimRequest, type VerifyClaimResponse, visualization as Visualization, WebSocketClient, WebSocketConnection, webhookActions as WebhookActions, type WorkflowGroup, allen, constrained, discriminateFeatureValue, guard, isConstrainedPlainVar, isPsiTermInput, isTaggedValueDto, isUuid, psi, toTaggedFeatures, toTaggedValue, toTermInputDto, toUntaggedFeatures, toUntaggedValue };