@kortexya/reasoninglayer 1.9.0 → 1.11.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.cjs +301 -17
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +47 -3
- package/dist/index.d.ts +47 -3
- package/dist/index.js +301 -17
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -109,7 +109,7 @@ type JsonValue$1 = string | number | boolean | null | JsonValue$1[] | object;
|
|
|
109
109
|
* This is the single source of truth for the version constant.
|
|
110
110
|
* The `scripts/release.sh` script updates this value alongside `package.json`.
|
|
111
111
|
*/
|
|
112
|
-
declare const SDK_VERSION = "1.
|
|
112
|
+
declare const SDK_VERSION = "1.11.0";
|
|
113
113
|
/**
|
|
114
114
|
* Authentication mode for the SDK.
|
|
115
115
|
*
|
|
@@ -44514,6 +44514,32 @@ interface ResearchSessionResponse {
|
|
|
44514
44514
|
/** When the session was last updated (ISO 8601). */
|
|
44515
44515
|
updatedAt: string;
|
|
44516
44516
|
}
|
|
44517
|
+
/** One row in the session list — a lightweight summary for list views. */
|
|
44518
|
+
interface ResearchSessionSummaryDto {
|
|
44519
|
+
/** Session ID (UUID). */
|
|
44520
|
+
sessionId: string;
|
|
44521
|
+
/** The research question. */
|
|
44522
|
+
question: string;
|
|
44523
|
+
/** Current session status. */
|
|
44524
|
+
status: ResearchSessionStatusDto;
|
|
44525
|
+
/** Total papers ingested. */
|
|
44526
|
+
totalPapersIngested: number;
|
|
44527
|
+
/** Total findings. */
|
|
44528
|
+
totalFindings: number;
|
|
44529
|
+
/** Total contradictions. */
|
|
44530
|
+
totalContradictions: number;
|
|
44531
|
+
/** Total knowledge gaps. */
|
|
44532
|
+
totalGaps: number;
|
|
44533
|
+
/** When the session was created (ISO 8601). */
|
|
44534
|
+
createdAt: string;
|
|
44535
|
+
/** When the session was last updated (ISO 8601). */
|
|
44536
|
+
updatedAt: string;
|
|
44537
|
+
}
|
|
44538
|
+
/** Response from listing the tenant's research sessions (newest first). */
|
|
44539
|
+
interface ListResearchSessionsResponse {
|
|
44540
|
+
/** Session summaries. */
|
|
44541
|
+
sessions: ResearchSessionSummaryDto[];
|
|
44542
|
+
}
|
|
44517
44543
|
/** Results from a single research cycle. */
|
|
44518
44544
|
interface ResearchCycleResultDto {
|
|
44519
44545
|
/** Cycle number (1-indexed). */
|
|
@@ -44758,6 +44784,7 @@ type research_EvidenceItemSummaryDto = EvidenceItemSummaryDto;
|
|
|
44758
44784
|
type research_IngestPaperRequest = IngestPaperRequest;
|
|
44759
44785
|
type research_IngestPaperResponse = IngestPaperResponse;
|
|
44760
44786
|
type research_KnowledgeGapDto = KnowledgeGapDto;
|
|
44787
|
+
type research_ListResearchSessionsResponse = ListResearchSessionsResponse;
|
|
44761
44788
|
type research_PaperMetadataDto = PaperMetadataDto;
|
|
44762
44789
|
type research_PaperSearchResultDto = PaperSearchResultDto;
|
|
44763
44790
|
type research_PaperSource = PaperSource;
|
|
@@ -44772,6 +44799,7 @@ type research_ResearchGapsResponse = ResearchGapsResponse;
|
|
|
44772
44799
|
type research_ResearchReportResponse = ResearchReportResponse;
|
|
44773
44800
|
type research_ResearchSessionResponse = ResearchSessionResponse;
|
|
44774
44801
|
type research_ResearchSessionStatusDto = ResearchSessionStatusDto;
|
|
44802
|
+
type research_ResearchSessionSummaryDto = ResearchSessionSummaryDto;
|
|
44775
44803
|
type research_ResearchStatisticsDto = ResearchStatisticsDto;
|
|
44776
44804
|
type research_RunResearchCycleRequest = RunResearchCycleRequest;
|
|
44777
44805
|
type research_SearchPapersRequest = SearchPapersRequest;
|
|
@@ -44779,7 +44807,7 @@ type research_SearchPapersResponse = SearchPapersResponse;
|
|
|
44779
44807
|
type research_VerifyClaimRequest = VerifyClaimRequest;
|
|
44780
44808
|
type research_VerifyClaimResponse = VerifyClaimResponse;
|
|
44781
44809
|
declare namespace research {
|
|
44782
|
-
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 };
|
|
44810
|
+
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_ListResearchSessionsResponse as ListResearchSessionsResponse, 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_ResearchSessionSummaryDto as ResearchSessionSummaryDto, research_ResearchStatisticsDto as ResearchStatisticsDto, research_RunResearchCycleRequest as RunResearchCycleRequest, research_SearchPapersRequest as SearchPapersRequest, research_SearchPapersResponse as SearchPapersResponse, research_VerifyClaimRequest as VerifyClaimRequest, research_VerifyClaimResponse as VerifyClaimResponse };
|
|
44783
44811
|
}
|
|
44784
44812
|
|
|
44785
44813
|
/**
|
|
@@ -44850,6 +44878,22 @@ declare class ResearchClient {
|
|
|
44850
44878
|
* ```
|
|
44851
44879
|
*/
|
|
44852
44880
|
getSession(sessionId: string): Promise<ResearchSessionResponse>;
|
|
44881
|
+
/**
|
|
44882
|
+
* List the current tenant's research sessions, newest first.
|
|
44883
|
+
*
|
|
44884
|
+
* Tenant-scoped via the `X-Tenant-Id` header (set on the client), mirroring
|
|
44885
|
+
* how conversations are listed. Returns lightweight summaries — use
|
|
44886
|
+
* {@link getSession} / {@link getReport} for a session's full detail.
|
|
44887
|
+
*
|
|
44888
|
+
* @returns The tenant's session summaries.
|
|
44889
|
+
*
|
|
44890
|
+
* @example
|
|
44891
|
+
* ```ts
|
|
44892
|
+
* const { sessions } = await client.research.listSessions();
|
|
44893
|
+
* sessions.forEach((s) => console.log(s.sessionId, s.status, s.question));
|
|
44894
|
+
* ```
|
|
44895
|
+
*/
|
|
44896
|
+
listSessions(): Promise<ListResearchSessionsResponse>;
|
|
44853
44897
|
/**
|
|
44854
44898
|
* Run a single research cycle within a session.
|
|
44855
44899
|
*
|
|
@@ -49864,4 +49908,4 @@ declare function toUntaggedFeatures(features: PlainFeatureMap): Record<string, F
|
|
|
49864
49908
|
*/
|
|
49865
49909
|
declare function toTermInputDto(input: PsiTermInput | TermInputDto): TermInputDto;
|
|
49866
49910
|
|
|
49867
|
-
export { ANY_ROLE, actionReviews as ActionReviews, actions as Actions, type AddFactRequest, type AddFactResponse, type AddRuleRequest, type AddRuleResponse, admin as Admin, type AiGroup, analysis as Analysis, type AnalysisGroup, ApiError, type ApiResponse, type ArithmeticOp, type AuthConfig, AuthenticationError, type BackwardChainRequest, type BackwardChainResponse, BadRequestError, type BulkAddTermsRequest, type BulkAddTermsResponse, type BulkCreateSortsRequest, type BulkCreateSortsResponse, cdl as CDL, causal as Causal, type CertificateDetail, type ClassifyEdgesInput, type ClassifyEdgesVars, type ClearTermsResponse, type ClientConfig, cognitive as Cognitive, type CognitiveStrategyDto, collections as Collections, communities as Communities, type ComparisonOp, compliance as Compliance, complianceMarkings as ComplianceMarkings, type ConstrainedPlainVar, Constraint, ConstraintViolationError, constraints as Constraints, control as Control, conversation as Conversation, type ConversationMessageRequest, type ConversationMessageResponse, type ConversationSummaryDto, type ConversationTurnsResponse, type CoreGroup, type CreateResearchSessionRequest, type CreateResearchSessionResponse, type CreateSortRequest, type CreateTermRequest, type DataGroup, discovery as Discovery, documents as Documents, type ErrorResponse$1 as ErrorResponse, execution as Execution, extract as Extract, feasibility as Feasibility, type FeatureInputValueDto, type FeatureValueDto, Flow, type FlowProblem as FlowBuilderProblem, type FlowEdgeInput, type FlowEdgeOptions, flowNetworks as FlowNetworks, type FlowNode, type FlowProblemInputBase, type FocusEntryDto, ForbiddenError, type ForwardChainRequest, type ForwardChainResponse, functions as Functions, fuzzy as Fuzzy, FuzzyShape, type FuzzyShapeDto, generation as Generation, type GlbRequest, type GlbResponse, health as Health, homoiconic as Homoiconic, ilp as ILP, imageExtraction as ImageExtraction, inference as Inference, type IngestPaperRequest, type IngestPaperResponse, ingestion as Ingestion, IngestionFailedError, IngestionSession, type IngestionSyncOptions, type Interceptor, InternalServerError, type JsonValue$1 as JsonValue, LP, type ListConversationsResponse, type LubRequest, type LubResponse, type MaxFlowInput, type MaxFlowVars, type MinCostMaxFlowInput, type MinCostMaxFlowVars, type MinCutInput, type MinCutVars, namespaces as Namespaces, NetworkError, neuroSymbolic as NeuroSymbolic, NotFoundError, ontology as Ontology, ontologyAlignment as OntologyAlignment, ontologyBridge as OntologyBridge, ontologyFacade as OntologyFacade, type Operand, operations as Operations, optimize as Optimize, type OsfSearchRequest, type OsfSearchResponse, osfql as Osfql, type OsfqlRequest, type OsfqlResponse, type OsfqlValue, oversight as Oversight, type PaginationParams, type PaperMetadataDto, type PaperSource, type PlainFeatureMap, type PlainFeatureValue, plainValues as PlainValues, preferences as Preferences, proofEngine as ProofEngine, type PsiTermDto, type PsiTermInput, query as Query, rag as RAG, RateLimitError, type RateLimitInfo, reasoning as Reasoning, type ReasoningGroup, ReasoningLayerClient, ReasoningLayerError, type ReasoningStageDto, type ReasoningTraceDto, type RequestOptions, research as Research, type ResearchContradictionsResponse, type ResearchCycleResponse, type ResearchFindingsResponse, type ResearchGapsResponse, type ResearchReportResponse, type ResearchSessionResponse, type ResolvedCoreferenceDto, reviews as Reviews, row as Row, SDK_VERSION, scenarios as Scenarios, scheduling as Scheduling, type SearchPapersRequest, type SearchPapersResponse, type SessionGraphDto, solver as Solver, SortBuilder, type SortDto, type SortInfoDto, sorts as Sorts, sources as Sources, spaces as Spaces, statistical as Statistical, synthetic as Synthetic, type SystemGroup, type TermDto, type TermInputArg, type TermInputDto, type TermListResponse, type TermPatternDto, type TermResponse, terms as Terms, TimeoutError, type TurnDto, type UpdateTermRequest, utilities as Utilities, ValidationError, Value, type ValueDto, values as Values, verification as Verification, 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 };
|
|
49911
|
+
export { ANY_ROLE, actionReviews as ActionReviews, actions as Actions, type AddFactRequest, type AddFactResponse, type AddRuleRequest, type AddRuleResponse, admin as Admin, type AiGroup, analysis as Analysis, type AnalysisGroup, ApiError, type ApiResponse, type ArithmeticOp, type AuthConfig, AuthenticationError, type BackwardChainRequest, type BackwardChainResponse, BadRequestError, type BulkAddTermsRequest, type BulkAddTermsResponse, type BulkCreateSortsRequest, type BulkCreateSortsResponse, cdl as CDL, causal as Causal, type CertificateDetail, type ClassifyEdgesInput, type ClassifyEdgesVars, type ClearTermsResponse, type ClientConfig, cognitive as Cognitive, type CognitiveStrategyDto, collections as Collections, communities as Communities, type ComparisonOp, compliance as Compliance, complianceMarkings as ComplianceMarkings, type ConstrainedPlainVar, Constraint, ConstraintViolationError, constraints as Constraints, control as Control, conversation as Conversation, type ConversationMessageRequest, type ConversationMessageResponse, type ConversationSummaryDto, type ConversationTurnsResponse, type CoreGroup, type CreateResearchSessionRequest, type CreateResearchSessionResponse, type CreateSortRequest, type CreateTermRequest, type DataGroup, discovery as Discovery, documents as Documents, type ErrorResponse$1 as ErrorResponse, execution as Execution, extract as Extract, feasibility as Feasibility, type FeatureInputValueDto, type FeatureValueDto, Flow, type FlowProblem as FlowBuilderProblem, type FlowEdgeInput, type FlowEdgeOptions, flowNetworks as FlowNetworks, type FlowNode, type FlowProblemInputBase, type FocusEntryDto, ForbiddenError, type ForwardChainRequest, type ForwardChainResponse, functions as Functions, fuzzy as Fuzzy, FuzzyShape, type FuzzyShapeDto, generation as Generation, type GlbRequest, type GlbResponse, health as Health, homoiconic as Homoiconic, ilp as ILP, imageExtraction as ImageExtraction, inference as Inference, type IngestPaperRequest, type IngestPaperResponse, ingestion as Ingestion, IngestionFailedError, IngestionSession, type IngestionSyncOptions, type Interceptor, InternalServerError, type JsonValue$1 as JsonValue, LP, type ListConversationsResponse, type ListResearchSessionsResponse, type LubRequest, type LubResponse, type MaxFlowInput, type MaxFlowVars, type MinCostMaxFlowInput, type MinCostMaxFlowVars, type MinCutInput, type MinCutVars, namespaces as Namespaces, NetworkError, neuroSymbolic as NeuroSymbolic, NotFoundError, ontology as Ontology, ontologyAlignment as OntologyAlignment, ontologyBridge as OntologyBridge, ontologyFacade as OntologyFacade, type Operand, operations as Operations, optimize as Optimize, type OsfSearchRequest, type OsfSearchResponse, osfql as Osfql, type OsfqlRequest, type OsfqlResponse, type OsfqlValue, oversight as Oversight, type PaginationParams, type PaperMetadataDto, type PaperSource, type PlainFeatureMap, type PlainFeatureValue, plainValues as PlainValues, preferences as Preferences, proofEngine as ProofEngine, type PsiTermDto, type PsiTermInput, query as Query, rag as RAG, RateLimitError, type RateLimitInfo, reasoning as Reasoning, type ReasoningGroup, ReasoningLayerClient, ReasoningLayerError, type ReasoningStageDto, type ReasoningTraceDto, type RequestOptions, research as Research, type ResearchContradictionsResponse, type ResearchCycleResponse, type ResearchFindingsResponse, type ResearchGapsResponse, type ResearchReportResponse, type ResearchSessionResponse, type ResearchSessionSummaryDto, type ResolvedCoreferenceDto, reviews as Reviews, row as Row, SDK_VERSION, scenarios as Scenarios, scheduling as Scheduling, type SearchPapersRequest, type SearchPapersResponse, type SessionGraphDto, solver as Solver, SortBuilder, type SortDto, type SortInfoDto, sorts as Sorts, sources as Sources, spaces as Spaces, statistical as Statistical, synthetic as Synthetic, type SystemGroup, type TermDto, type TermInputArg, type TermInputDto, type TermListResponse, type TermPatternDto, type TermResponse, terms as Terms, TimeoutError, type TurnDto, type UpdateTermRequest, utilities as Utilities, ValidationError, Value, type ValueDto, values as Values, verification as Verification, 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 };
|
package/dist/index.d.ts
CHANGED
|
@@ -109,7 +109,7 @@ type JsonValue$1 = string | number | boolean | null | JsonValue$1[] | object;
|
|
|
109
109
|
* This is the single source of truth for the version constant.
|
|
110
110
|
* The `scripts/release.sh` script updates this value alongside `package.json`.
|
|
111
111
|
*/
|
|
112
|
-
declare const SDK_VERSION = "1.
|
|
112
|
+
declare const SDK_VERSION = "1.11.0";
|
|
113
113
|
/**
|
|
114
114
|
* Authentication mode for the SDK.
|
|
115
115
|
*
|
|
@@ -44514,6 +44514,32 @@ interface ResearchSessionResponse {
|
|
|
44514
44514
|
/** When the session was last updated (ISO 8601). */
|
|
44515
44515
|
updatedAt: string;
|
|
44516
44516
|
}
|
|
44517
|
+
/** One row in the session list — a lightweight summary for list views. */
|
|
44518
|
+
interface ResearchSessionSummaryDto {
|
|
44519
|
+
/** Session ID (UUID). */
|
|
44520
|
+
sessionId: string;
|
|
44521
|
+
/** The research question. */
|
|
44522
|
+
question: string;
|
|
44523
|
+
/** Current session status. */
|
|
44524
|
+
status: ResearchSessionStatusDto;
|
|
44525
|
+
/** Total papers ingested. */
|
|
44526
|
+
totalPapersIngested: number;
|
|
44527
|
+
/** Total findings. */
|
|
44528
|
+
totalFindings: number;
|
|
44529
|
+
/** Total contradictions. */
|
|
44530
|
+
totalContradictions: number;
|
|
44531
|
+
/** Total knowledge gaps. */
|
|
44532
|
+
totalGaps: number;
|
|
44533
|
+
/** When the session was created (ISO 8601). */
|
|
44534
|
+
createdAt: string;
|
|
44535
|
+
/** When the session was last updated (ISO 8601). */
|
|
44536
|
+
updatedAt: string;
|
|
44537
|
+
}
|
|
44538
|
+
/** Response from listing the tenant's research sessions (newest first). */
|
|
44539
|
+
interface ListResearchSessionsResponse {
|
|
44540
|
+
/** Session summaries. */
|
|
44541
|
+
sessions: ResearchSessionSummaryDto[];
|
|
44542
|
+
}
|
|
44517
44543
|
/** Results from a single research cycle. */
|
|
44518
44544
|
interface ResearchCycleResultDto {
|
|
44519
44545
|
/** Cycle number (1-indexed). */
|
|
@@ -44758,6 +44784,7 @@ type research_EvidenceItemSummaryDto = EvidenceItemSummaryDto;
|
|
|
44758
44784
|
type research_IngestPaperRequest = IngestPaperRequest;
|
|
44759
44785
|
type research_IngestPaperResponse = IngestPaperResponse;
|
|
44760
44786
|
type research_KnowledgeGapDto = KnowledgeGapDto;
|
|
44787
|
+
type research_ListResearchSessionsResponse = ListResearchSessionsResponse;
|
|
44761
44788
|
type research_PaperMetadataDto = PaperMetadataDto;
|
|
44762
44789
|
type research_PaperSearchResultDto = PaperSearchResultDto;
|
|
44763
44790
|
type research_PaperSource = PaperSource;
|
|
@@ -44772,6 +44799,7 @@ type research_ResearchGapsResponse = ResearchGapsResponse;
|
|
|
44772
44799
|
type research_ResearchReportResponse = ResearchReportResponse;
|
|
44773
44800
|
type research_ResearchSessionResponse = ResearchSessionResponse;
|
|
44774
44801
|
type research_ResearchSessionStatusDto = ResearchSessionStatusDto;
|
|
44802
|
+
type research_ResearchSessionSummaryDto = ResearchSessionSummaryDto;
|
|
44775
44803
|
type research_ResearchStatisticsDto = ResearchStatisticsDto;
|
|
44776
44804
|
type research_RunResearchCycleRequest = RunResearchCycleRequest;
|
|
44777
44805
|
type research_SearchPapersRequest = SearchPapersRequest;
|
|
@@ -44779,7 +44807,7 @@ type research_SearchPapersResponse = SearchPapersResponse;
|
|
|
44779
44807
|
type research_VerifyClaimRequest = VerifyClaimRequest;
|
|
44780
44808
|
type research_VerifyClaimResponse = VerifyClaimResponse;
|
|
44781
44809
|
declare namespace research {
|
|
44782
|
-
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 };
|
|
44810
|
+
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_ListResearchSessionsResponse as ListResearchSessionsResponse, 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_ResearchSessionSummaryDto as ResearchSessionSummaryDto, research_ResearchStatisticsDto as ResearchStatisticsDto, research_RunResearchCycleRequest as RunResearchCycleRequest, research_SearchPapersRequest as SearchPapersRequest, research_SearchPapersResponse as SearchPapersResponse, research_VerifyClaimRequest as VerifyClaimRequest, research_VerifyClaimResponse as VerifyClaimResponse };
|
|
44783
44811
|
}
|
|
44784
44812
|
|
|
44785
44813
|
/**
|
|
@@ -44850,6 +44878,22 @@ declare class ResearchClient {
|
|
|
44850
44878
|
* ```
|
|
44851
44879
|
*/
|
|
44852
44880
|
getSession(sessionId: string): Promise<ResearchSessionResponse>;
|
|
44881
|
+
/**
|
|
44882
|
+
* List the current tenant's research sessions, newest first.
|
|
44883
|
+
*
|
|
44884
|
+
* Tenant-scoped via the `X-Tenant-Id` header (set on the client), mirroring
|
|
44885
|
+
* how conversations are listed. Returns lightweight summaries — use
|
|
44886
|
+
* {@link getSession} / {@link getReport} for a session's full detail.
|
|
44887
|
+
*
|
|
44888
|
+
* @returns The tenant's session summaries.
|
|
44889
|
+
*
|
|
44890
|
+
* @example
|
|
44891
|
+
* ```ts
|
|
44892
|
+
* const { sessions } = await client.research.listSessions();
|
|
44893
|
+
* sessions.forEach((s) => console.log(s.sessionId, s.status, s.question));
|
|
44894
|
+
* ```
|
|
44895
|
+
*/
|
|
44896
|
+
listSessions(): Promise<ListResearchSessionsResponse>;
|
|
44853
44897
|
/**
|
|
44854
44898
|
* Run a single research cycle within a session.
|
|
44855
44899
|
*
|
|
@@ -49864,4 +49908,4 @@ declare function toUntaggedFeatures(features: PlainFeatureMap): Record<string, F
|
|
|
49864
49908
|
*/
|
|
49865
49909
|
declare function toTermInputDto(input: PsiTermInput | TermInputDto): TermInputDto;
|
|
49866
49910
|
|
|
49867
|
-
export { ANY_ROLE, actionReviews as ActionReviews, actions as Actions, type AddFactRequest, type AddFactResponse, type AddRuleRequest, type AddRuleResponse, admin as Admin, type AiGroup, analysis as Analysis, type AnalysisGroup, ApiError, type ApiResponse, type ArithmeticOp, type AuthConfig, AuthenticationError, type BackwardChainRequest, type BackwardChainResponse, BadRequestError, type BulkAddTermsRequest, type BulkAddTermsResponse, type BulkCreateSortsRequest, type BulkCreateSortsResponse, cdl as CDL, causal as Causal, type CertificateDetail, type ClassifyEdgesInput, type ClassifyEdgesVars, type ClearTermsResponse, type ClientConfig, cognitive as Cognitive, type CognitiveStrategyDto, collections as Collections, communities as Communities, type ComparisonOp, compliance as Compliance, complianceMarkings as ComplianceMarkings, type ConstrainedPlainVar, Constraint, ConstraintViolationError, constraints as Constraints, control as Control, conversation as Conversation, type ConversationMessageRequest, type ConversationMessageResponse, type ConversationSummaryDto, type ConversationTurnsResponse, type CoreGroup, type CreateResearchSessionRequest, type CreateResearchSessionResponse, type CreateSortRequest, type CreateTermRequest, type DataGroup, discovery as Discovery, documents as Documents, type ErrorResponse$1 as ErrorResponse, execution as Execution, extract as Extract, feasibility as Feasibility, type FeatureInputValueDto, type FeatureValueDto, Flow, type FlowProblem as FlowBuilderProblem, type FlowEdgeInput, type FlowEdgeOptions, flowNetworks as FlowNetworks, type FlowNode, type FlowProblemInputBase, type FocusEntryDto, ForbiddenError, type ForwardChainRequest, type ForwardChainResponse, functions as Functions, fuzzy as Fuzzy, FuzzyShape, type FuzzyShapeDto, generation as Generation, type GlbRequest, type GlbResponse, health as Health, homoiconic as Homoiconic, ilp as ILP, imageExtraction as ImageExtraction, inference as Inference, type IngestPaperRequest, type IngestPaperResponse, ingestion as Ingestion, IngestionFailedError, IngestionSession, type IngestionSyncOptions, type Interceptor, InternalServerError, type JsonValue$1 as JsonValue, LP, type ListConversationsResponse, type LubRequest, type LubResponse, type MaxFlowInput, type MaxFlowVars, type MinCostMaxFlowInput, type MinCostMaxFlowVars, type MinCutInput, type MinCutVars, namespaces as Namespaces, NetworkError, neuroSymbolic as NeuroSymbolic, NotFoundError, ontology as Ontology, ontologyAlignment as OntologyAlignment, ontologyBridge as OntologyBridge, ontologyFacade as OntologyFacade, type Operand, operations as Operations, optimize as Optimize, type OsfSearchRequest, type OsfSearchResponse, osfql as Osfql, type OsfqlRequest, type OsfqlResponse, type OsfqlValue, oversight as Oversight, type PaginationParams, type PaperMetadataDto, type PaperSource, type PlainFeatureMap, type PlainFeatureValue, plainValues as PlainValues, preferences as Preferences, proofEngine as ProofEngine, type PsiTermDto, type PsiTermInput, query as Query, rag as RAG, RateLimitError, type RateLimitInfo, reasoning as Reasoning, type ReasoningGroup, ReasoningLayerClient, ReasoningLayerError, type ReasoningStageDto, type ReasoningTraceDto, type RequestOptions, research as Research, type ResearchContradictionsResponse, type ResearchCycleResponse, type ResearchFindingsResponse, type ResearchGapsResponse, type ResearchReportResponse, type ResearchSessionResponse, type ResolvedCoreferenceDto, reviews as Reviews, row as Row, SDK_VERSION, scenarios as Scenarios, scheduling as Scheduling, type SearchPapersRequest, type SearchPapersResponse, type SessionGraphDto, solver as Solver, SortBuilder, type SortDto, type SortInfoDto, sorts as Sorts, sources as Sources, spaces as Spaces, statistical as Statistical, synthetic as Synthetic, type SystemGroup, type TermDto, type TermInputArg, type TermInputDto, type TermListResponse, type TermPatternDto, type TermResponse, terms as Terms, TimeoutError, type TurnDto, type UpdateTermRequest, utilities as Utilities, ValidationError, Value, type ValueDto, values as Values, verification as Verification, 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 };
|
|
49911
|
+
export { ANY_ROLE, actionReviews as ActionReviews, actions as Actions, type AddFactRequest, type AddFactResponse, type AddRuleRequest, type AddRuleResponse, admin as Admin, type AiGroup, analysis as Analysis, type AnalysisGroup, ApiError, type ApiResponse, type ArithmeticOp, type AuthConfig, AuthenticationError, type BackwardChainRequest, type BackwardChainResponse, BadRequestError, type BulkAddTermsRequest, type BulkAddTermsResponse, type BulkCreateSortsRequest, type BulkCreateSortsResponse, cdl as CDL, causal as Causal, type CertificateDetail, type ClassifyEdgesInput, type ClassifyEdgesVars, type ClearTermsResponse, type ClientConfig, cognitive as Cognitive, type CognitiveStrategyDto, collections as Collections, communities as Communities, type ComparisonOp, compliance as Compliance, complianceMarkings as ComplianceMarkings, type ConstrainedPlainVar, Constraint, ConstraintViolationError, constraints as Constraints, control as Control, conversation as Conversation, type ConversationMessageRequest, type ConversationMessageResponse, type ConversationSummaryDto, type ConversationTurnsResponse, type CoreGroup, type CreateResearchSessionRequest, type CreateResearchSessionResponse, type CreateSortRequest, type CreateTermRequest, type DataGroup, discovery as Discovery, documents as Documents, type ErrorResponse$1 as ErrorResponse, execution as Execution, extract as Extract, feasibility as Feasibility, type FeatureInputValueDto, type FeatureValueDto, Flow, type FlowProblem as FlowBuilderProblem, type FlowEdgeInput, type FlowEdgeOptions, flowNetworks as FlowNetworks, type FlowNode, type FlowProblemInputBase, type FocusEntryDto, ForbiddenError, type ForwardChainRequest, type ForwardChainResponse, functions as Functions, fuzzy as Fuzzy, FuzzyShape, type FuzzyShapeDto, generation as Generation, type GlbRequest, type GlbResponse, health as Health, homoiconic as Homoiconic, ilp as ILP, imageExtraction as ImageExtraction, inference as Inference, type IngestPaperRequest, type IngestPaperResponse, ingestion as Ingestion, IngestionFailedError, IngestionSession, type IngestionSyncOptions, type Interceptor, InternalServerError, type JsonValue$1 as JsonValue, LP, type ListConversationsResponse, type ListResearchSessionsResponse, type LubRequest, type LubResponse, type MaxFlowInput, type MaxFlowVars, type MinCostMaxFlowInput, type MinCostMaxFlowVars, type MinCutInput, type MinCutVars, namespaces as Namespaces, NetworkError, neuroSymbolic as NeuroSymbolic, NotFoundError, ontology as Ontology, ontologyAlignment as OntologyAlignment, ontologyBridge as OntologyBridge, ontologyFacade as OntologyFacade, type Operand, operations as Operations, optimize as Optimize, type OsfSearchRequest, type OsfSearchResponse, osfql as Osfql, type OsfqlRequest, type OsfqlResponse, type OsfqlValue, oversight as Oversight, type PaginationParams, type PaperMetadataDto, type PaperSource, type PlainFeatureMap, type PlainFeatureValue, plainValues as PlainValues, preferences as Preferences, proofEngine as ProofEngine, type PsiTermDto, type PsiTermInput, query as Query, rag as RAG, RateLimitError, type RateLimitInfo, reasoning as Reasoning, type ReasoningGroup, ReasoningLayerClient, ReasoningLayerError, type ReasoningStageDto, type ReasoningTraceDto, type RequestOptions, research as Research, type ResearchContradictionsResponse, type ResearchCycleResponse, type ResearchFindingsResponse, type ResearchGapsResponse, type ResearchReportResponse, type ResearchSessionResponse, type ResearchSessionSummaryDto, type ResolvedCoreferenceDto, reviews as Reviews, row as Row, SDK_VERSION, scenarios as Scenarios, scheduling as Scheduling, type SearchPapersRequest, type SearchPapersResponse, type SessionGraphDto, solver as Solver, SortBuilder, type SortDto, type SortInfoDto, sorts as Sorts, sources as Sources, spaces as Spaces, statistical as Statistical, synthetic as Synthetic, type SystemGroup, type TermDto, type TermInputArg, type TermInputDto, type TermListResponse, type TermPatternDto, type TermResponse, terms as Terms, TimeoutError, type TurnDto, type UpdateTermRequest, utilities as Utilities, ValidationError, Value, type ValueDto, values as Values, verification as Verification, 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 };
|
package/dist/index.js
CHANGED
|
@@ -5,7 +5,7 @@ var __export = (target, all) => {
|
|
|
5
5
|
};
|
|
6
6
|
|
|
7
7
|
// src/config.ts
|
|
8
|
-
var SDK_VERSION = "1.
|
|
8
|
+
var SDK_VERSION = "1.11.0";
|
|
9
9
|
function resolveConfig(config) {
|
|
10
10
|
if (!config.baseUrl) {
|
|
11
11
|
throw new Error("ClientConfig.baseUrl is required");
|
|
@@ -22873,6 +22873,266 @@ var VerificationClient = class {
|
|
|
22873
22873
|
}
|
|
22874
22874
|
};
|
|
22875
22875
|
|
|
22876
|
+
// src/normalizers/research.ts
|
|
22877
|
+
function PaperMetadataFromApiToFront(dto) {
|
|
22878
|
+
return {
|
|
22879
|
+
title: dto.title,
|
|
22880
|
+
authors: dto.authors,
|
|
22881
|
+
doi: dto.doi ?? null,
|
|
22882
|
+
pmid: dto.pmid ?? null,
|
|
22883
|
+
arxivId: dto.arxiv_id ?? null,
|
|
22884
|
+
journal: dto.journal ?? null,
|
|
22885
|
+
year: dto.year ?? null,
|
|
22886
|
+
abstractText: dto.abstract_text ?? null,
|
|
22887
|
+
citationCount: dto.citation_count ?? null,
|
|
22888
|
+
source: dto.source,
|
|
22889
|
+
fullTextUrl: dto.full_text_url ?? null
|
|
22890
|
+
};
|
|
22891
|
+
}
|
|
22892
|
+
function PaperSearchResultFromApiToFront(dto) {
|
|
22893
|
+
return {
|
|
22894
|
+
metadata: PaperMetadataFromApiToFront(dto.metadata),
|
|
22895
|
+
relevanceScore: dto.relevance_score ?? null
|
|
22896
|
+
};
|
|
22897
|
+
}
|
|
22898
|
+
function SearchPapersResponseFromApiToFront(raw) {
|
|
22899
|
+
const dto = raw;
|
|
22900
|
+
return {
|
|
22901
|
+
results: (dto.results ?? []).map(PaperSearchResultFromApiToFront),
|
|
22902
|
+
totalFound: dto.total_found
|
|
22903
|
+
};
|
|
22904
|
+
}
|
|
22905
|
+
function CreateResearchSessionResponseFromApiToFront(raw) {
|
|
22906
|
+
const dto = raw;
|
|
22907
|
+
return {
|
|
22908
|
+
sessionId: dto.session_id,
|
|
22909
|
+
status: dto.status,
|
|
22910
|
+
question: dto.question,
|
|
22911
|
+
createdAt: dto.created_at
|
|
22912
|
+
};
|
|
22913
|
+
}
|
|
22914
|
+
function ResearchCycleResultFromApiToFront(dto) {
|
|
22915
|
+
return {
|
|
22916
|
+
cycleNumber: dto.cycle_number,
|
|
22917
|
+
gapsDetected: dto.gaps_detected,
|
|
22918
|
+
gapsResolved: dto.gaps_resolved,
|
|
22919
|
+
papersRetrieved: dto.papers_retrieved,
|
|
22920
|
+
papersIngested: dto.papers_ingested,
|
|
22921
|
+
claimsVerified: dto.claims_verified,
|
|
22922
|
+
contradictionsDetected: dto.contradictions_detected,
|
|
22923
|
+
processingTimeMs: dto.processing_time_ms,
|
|
22924
|
+
searchQueries: dto.search_queries ?? []
|
|
22925
|
+
};
|
|
22926
|
+
}
|
|
22927
|
+
function ResearchSessionResponseFromApiToFront(raw) {
|
|
22928
|
+
const dto = raw;
|
|
22929
|
+
return {
|
|
22930
|
+
sessionId: dto.session_id,
|
|
22931
|
+
question: dto.question,
|
|
22932
|
+
status: dto.status,
|
|
22933
|
+
error: dto.error ?? null,
|
|
22934
|
+
cycles: (dto.cycles ?? []).map(ResearchCycleResultFromApiToFront),
|
|
22935
|
+
totalPapersIngested: dto.total_papers_ingested,
|
|
22936
|
+
totalFindings: dto.total_findings,
|
|
22937
|
+
totalContradictions: dto.total_contradictions,
|
|
22938
|
+
totalGaps: dto.total_gaps,
|
|
22939
|
+
createdAt: dto.created_at,
|
|
22940
|
+
updatedAt: dto.updated_at
|
|
22941
|
+
};
|
|
22942
|
+
}
|
|
22943
|
+
function ResearchSessionSummaryFromApiToFront(raw) {
|
|
22944
|
+
const dto = raw;
|
|
22945
|
+
return {
|
|
22946
|
+
sessionId: dto.session_id,
|
|
22947
|
+
question: dto.question,
|
|
22948
|
+
status: dto.status,
|
|
22949
|
+
totalPapersIngested: dto.total_papers_ingested,
|
|
22950
|
+
totalFindings: dto.total_findings,
|
|
22951
|
+
totalContradictions: dto.total_contradictions,
|
|
22952
|
+
totalGaps: dto.total_gaps,
|
|
22953
|
+
createdAt: dto.created_at,
|
|
22954
|
+
updatedAt: dto.updated_at
|
|
22955
|
+
};
|
|
22956
|
+
}
|
|
22957
|
+
function ListResearchSessionsResponseFromApiToFront(raw) {
|
|
22958
|
+
const dto = raw;
|
|
22959
|
+
return {
|
|
22960
|
+
sessions: (dto.sessions ?? []).map(ResearchSessionSummaryFromApiToFront)
|
|
22961
|
+
};
|
|
22962
|
+
}
|
|
22963
|
+
function ResearchCycleResponseFromApiToFront(raw) {
|
|
22964
|
+
const dto = raw;
|
|
22965
|
+
return {
|
|
22966
|
+
sessionId: dto.session_id,
|
|
22967
|
+
status: dto.status,
|
|
22968
|
+
cycle: ResearchCycleResultFromApiToFront(dto.cycle),
|
|
22969
|
+
converged: dto.converged
|
|
22970
|
+
};
|
|
22971
|
+
}
|
|
22972
|
+
function EvidenceItemSummaryFromApiToFront(dto) {
|
|
22973
|
+
return {
|
|
22974
|
+
termId: dto.term_id,
|
|
22975
|
+
description: dto.description,
|
|
22976
|
+
qualityWeight: dto.quality_weight,
|
|
22977
|
+
supports: dto.supports,
|
|
22978
|
+
contribution: dto.contribution,
|
|
22979
|
+
paperDoi: dto.paper_doi ?? null
|
|
22980
|
+
};
|
|
22981
|
+
}
|
|
22982
|
+
function ProvenanceStepFromApiToFront(dto) {
|
|
22983
|
+
return {
|
|
22984
|
+
stepType: dto.step_type,
|
|
22985
|
+
description: dto.description,
|
|
22986
|
+
entityId: dto.entity_id ?? null,
|
|
22987
|
+
timestamp: dto.timestamp ?? null
|
|
22988
|
+
};
|
|
22989
|
+
}
|
|
22990
|
+
function ResearchFindingFromApiToFront(dto) {
|
|
22991
|
+
return {
|
|
22992
|
+
claimId: dto.claim_id,
|
|
22993
|
+
statement: dto.statement,
|
|
22994
|
+
truthfulness: dto.truthfulness,
|
|
22995
|
+
label: dto.label,
|
|
22996
|
+
supportingEvidence: (dto.supporting_evidence ?? []).map(EvidenceItemSummaryFromApiToFront),
|
|
22997
|
+
contradictingEvidence: (dto.contradicting_evidence ?? []).map(EvidenceItemSummaryFromApiToFront),
|
|
22998
|
+
provenanceChain: (dto.provenance_chain ?? []).map(ProvenanceStepFromApiToFront),
|
|
22999
|
+
residuated: dto.residuated,
|
|
23000
|
+
residuationReason: dto.residuation_reason ?? null
|
|
23001
|
+
};
|
|
23002
|
+
}
|
|
23003
|
+
function ResearchFindingsResponseFromApiToFront(raw) {
|
|
23004
|
+
const dto = raw;
|
|
23005
|
+
return {
|
|
23006
|
+
sessionId: dto.session_id,
|
|
23007
|
+
findings: (dto.findings ?? []).map(ResearchFindingFromApiToFront),
|
|
23008
|
+
total: dto.total
|
|
23009
|
+
};
|
|
23010
|
+
}
|
|
23011
|
+
function KnowledgeGapFromApiToFront(dto) {
|
|
23012
|
+
return {
|
|
23013
|
+
sortName: dto.sort_name,
|
|
23014
|
+
infoGain: dto.info_gain,
|
|
23015
|
+
neededBy: dto.needed_by ?? [],
|
|
23016
|
+
wakeTrigger: dto.wake_trigger,
|
|
23017
|
+
suggestedSearchQuery: dto.suggested_search_query ?? null
|
|
23018
|
+
};
|
|
23019
|
+
}
|
|
23020
|
+
function ResearchGapsResponseFromApiToFront(raw) {
|
|
23021
|
+
const dto = raw;
|
|
23022
|
+
return {
|
|
23023
|
+
sessionId: dto.session_id,
|
|
23024
|
+
gaps: (dto.gaps ?? []).map(KnowledgeGapFromApiToFront),
|
|
23025
|
+
total: dto.total
|
|
23026
|
+
};
|
|
23027
|
+
}
|
|
23028
|
+
function ContradictionFromApiToFront(dto) {
|
|
23029
|
+
return {
|
|
23030
|
+
claimAId: dto.claim_a_id,
|
|
23031
|
+
claimBId: dto.claim_b_id,
|
|
23032
|
+
statementA: dto.statement_a,
|
|
23033
|
+
statementB: dto.statement_b,
|
|
23034
|
+
confidence: dto.confidence,
|
|
23035
|
+
explanation: dto.explanation
|
|
23036
|
+
};
|
|
23037
|
+
}
|
|
23038
|
+
function ResearchContradictionsResponseFromApiToFront(raw) {
|
|
23039
|
+
const dto = raw;
|
|
23040
|
+
return {
|
|
23041
|
+
sessionId: dto.session_id,
|
|
23042
|
+
contradictions: (dto.contradictions ?? []).map(ContradictionFromApiToFront),
|
|
23043
|
+
total: dto.total
|
|
23044
|
+
};
|
|
23045
|
+
}
|
|
23046
|
+
function ResearchStatisticsFromApiToFront(dto) {
|
|
23047
|
+
return {
|
|
23048
|
+
totalCycles: dto.total_cycles,
|
|
23049
|
+
totalPapersRetrieved: dto.total_papers_retrieved,
|
|
23050
|
+
totalPapersIngested: dto.total_papers_ingested,
|
|
23051
|
+
totalClaimsExtracted: dto.total_claims_extracted,
|
|
23052
|
+
totalClaimsVerified: dto.total_claims_verified,
|
|
23053
|
+
totalContradictions: dto.total_contradictions,
|
|
23054
|
+
totalProcessingTimeMs: dto.total_processing_time_ms,
|
|
23055
|
+
gapsResolved: dto.gaps_resolved,
|
|
23056
|
+
gapsRemaining: dto.gaps_remaining
|
|
23057
|
+
};
|
|
23058
|
+
}
|
|
23059
|
+
function ReportVerificationFromApiToFront(dto) {
|
|
23060
|
+
return {
|
|
23061
|
+
verdict: dto.verdict,
|
|
23062
|
+
score: dto.score,
|
|
23063
|
+
computationTimeMs: dto.computation_time_ms
|
|
23064
|
+
};
|
|
23065
|
+
}
|
|
23066
|
+
function ResearchReportResponseFromApiToFront(raw) {
|
|
23067
|
+
const dto = raw;
|
|
23068
|
+
return {
|
|
23069
|
+
sessionId: dto.session_id,
|
|
23070
|
+
question: dto.question,
|
|
23071
|
+
summary: dto.summary,
|
|
23072
|
+
findings: (dto.findings ?? []).map(ResearchFindingFromApiToFront),
|
|
23073
|
+
knowledgeGaps: (dto.knowledge_gaps ?? []).map(KnowledgeGapFromApiToFront),
|
|
23074
|
+
contradictions: (dto.contradictions ?? []).map(ContradictionFromApiToFront),
|
|
23075
|
+
statistics: ResearchStatisticsFromApiToFront(dto.statistics),
|
|
23076
|
+
generatedContent: dto.generated_content ?? null,
|
|
23077
|
+
verification: dto.verification ? ReportVerificationFromApiToFront(dto.verification) : null
|
|
23078
|
+
};
|
|
23079
|
+
}
|
|
23080
|
+
function IngestPaperResponseFromApiToFront(raw) {
|
|
23081
|
+
const dto = raw;
|
|
23082
|
+
return {
|
|
23083
|
+
success: dto.success,
|
|
23084
|
+
metadata: dto.metadata ? PaperMetadataFromApiToFront(dto.metadata) : null,
|
|
23085
|
+
entitiesExtracted: dto.entities_extracted,
|
|
23086
|
+
claimsExtracted: dto.claims_extracted,
|
|
23087
|
+
error: dto.error ?? null
|
|
23088
|
+
};
|
|
23089
|
+
}
|
|
23090
|
+
function VerifyClaimResponseFromApiToFront(raw) {
|
|
23091
|
+
const dto = raw;
|
|
23092
|
+
return {
|
|
23093
|
+
truthfulness: dto.truthfulness,
|
|
23094
|
+
label: dto.label,
|
|
23095
|
+
supportingCount: dto.supporting_count,
|
|
23096
|
+
contradictingCount: dto.contradicting_count,
|
|
23097
|
+
residuated: dto.residuated,
|
|
23098
|
+
residuationReason: dto.residuation_reason ?? null
|
|
23099
|
+
};
|
|
23100
|
+
}
|
|
23101
|
+
function CreateResearchSessionRequestFromFrontToApi(model) {
|
|
23102
|
+
return {
|
|
23103
|
+
question: model.question,
|
|
23104
|
+
max_cycles: model.maxCycles,
|
|
23105
|
+
max_papers: model.maxPapers,
|
|
23106
|
+
paper_sources: model.paperSources
|
|
23107
|
+
};
|
|
23108
|
+
}
|
|
23109
|
+
function RunResearchCycleRequestFromFrontToApi(model) {
|
|
23110
|
+
return {
|
|
23111
|
+
additional_queries: model.additionalQueries,
|
|
23112
|
+
max_papers_this_cycle: model.maxPapersThisCycle
|
|
23113
|
+
};
|
|
23114
|
+
}
|
|
23115
|
+
function SearchPapersRequestFromFrontToApi(model) {
|
|
23116
|
+
return {
|
|
23117
|
+
query: model.query,
|
|
23118
|
+
max_results: model.maxResults,
|
|
23119
|
+
sources: model.sources
|
|
23120
|
+
};
|
|
23121
|
+
}
|
|
23122
|
+
function IngestPaperRequestFromFrontToApi(model) {
|
|
23123
|
+
return {
|
|
23124
|
+
identifier: model.identifier,
|
|
23125
|
+
identifier_type: model.identifierType,
|
|
23126
|
+
session_id: model.sessionId
|
|
23127
|
+
};
|
|
23128
|
+
}
|
|
23129
|
+
function VerifyClaimRequestFromFrontToApi(model) {
|
|
23130
|
+
return {
|
|
23131
|
+
claim_term_id: model.claimTermId,
|
|
23132
|
+
evidence_sort_id: model.evidenceSortId
|
|
23133
|
+
};
|
|
23134
|
+
}
|
|
23135
|
+
|
|
22876
23136
|
// src/resources/research.ts
|
|
22877
23137
|
var ResearchClient = class {
|
|
22878
23138
|
/** @internal */
|
|
@@ -22909,12 +23169,12 @@ var ResearchClient = class {
|
|
|
22909
23169
|
const response = await this.http.request({
|
|
22910
23170
|
path: "/api/v1/research/sessions",
|
|
22911
23171
|
method: "POST",
|
|
22912
|
-
body: request,
|
|
23172
|
+
body: CreateResearchSessionRequestFromFrontToApi(request),
|
|
22913
23173
|
secure: true,
|
|
22914
23174
|
type: "application/json" /* Json */,
|
|
22915
23175
|
format: "json"
|
|
22916
23176
|
});
|
|
22917
|
-
return response.data;
|
|
23177
|
+
return CreateResearchSessionResponseFromApiToFront(response.data);
|
|
22918
23178
|
}
|
|
22919
23179
|
/**
|
|
22920
23180
|
* Get the current state of a research session.
|
|
@@ -22944,7 +23204,31 @@ var ResearchClient = class {
|
|
|
22944
23204
|
secure: true,
|
|
22945
23205
|
format: "json"
|
|
22946
23206
|
});
|
|
22947
|
-
return response.data;
|
|
23207
|
+
return ResearchSessionResponseFromApiToFront(response.data);
|
|
23208
|
+
}
|
|
23209
|
+
/**
|
|
23210
|
+
* List the current tenant's research sessions, newest first.
|
|
23211
|
+
*
|
|
23212
|
+
* Tenant-scoped via the `X-Tenant-Id` header (set on the client), mirroring
|
|
23213
|
+
* how conversations are listed. Returns lightweight summaries — use
|
|
23214
|
+
* {@link getSession} / {@link getReport} for a session's full detail.
|
|
23215
|
+
*
|
|
23216
|
+
* @returns The tenant's session summaries.
|
|
23217
|
+
*
|
|
23218
|
+
* @example
|
|
23219
|
+
* ```ts
|
|
23220
|
+
* const { sessions } = await client.research.listSessions();
|
|
23221
|
+
* sessions.forEach((s) => console.log(s.sessionId, s.status, s.question));
|
|
23222
|
+
* ```
|
|
23223
|
+
*/
|
|
23224
|
+
async listSessions() {
|
|
23225
|
+
const response = await this.http.request({
|
|
23226
|
+
path: `/api/v1/research/sessions`,
|
|
23227
|
+
method: "GET",
|
|
23228
|
+
secure: true,
|
|
23229
|
+
format: "json"
|
|
23230
|
+
});
|
|
23231
|
+
return ListResearchSessionsResponseFromApiToFront(response.data);
|
|
22948
23232
|
}
|
|
22949
23233
|
/**
|
|
22950
23234
|
* Run a single research cycle within a session.
|
|
@@ -22975,12 +23259,12 @@ var ResearchClient = class {
|
|
|
22975
23259
|
const response = await this.http.request({
|
|
22976
23260
|
path: `/api/v1/research/sessions/${encodeURIComponent(sessionId)}/run`,
|
|
22977
23261
|
method: "POST",
|
|
22978
|
-
body: request,
|
|
23262
|
+
body: request ? RunResearchCycleRequestFromFrontToApi(request) : void 0,
|
|
22979
23263
|
secure: true,
|
|
22980
23264
|
type: "application/json" /* Json */,
|
|
22981
23265
|
format: "json"
|
|
22982
23266
|
});
|
|
22983
|
-
return response.data;
|
|
23267
|
+
return ResearchCycleResponseFromApiToFront(response.data);
|
|
22984
23268
|
}
|
|
22985
23269
|
/**
|
|
22986
23270
|
* Run the research session to completion (all remaining cycles).
|
|
@@ -23009,7 +23293,7 @@ var ResearchClient = class {
|
|
|
23009
23293
|
secure: true,
|
|
23010
23294
|
format: "json"
|
|
23011
23295
|
});
|
|
23012
|
-
return response.data;
|
|
23296
|
+
return ResearchSessionResponseFromApiToFront(response.data);
|
|
23013
23297
|
}
|
|
23014
23298
|
/**
|
|
23015
23299
|
* Delete a research session and all associated data.
|
|
@@ -23062,7 +23346,7 @@ var ResearchClient = class {
|
|
|
23062
23346
|
secure: true,
|
|
23063
23347
|
format: "json"
|
|
23064
23348
|
});
|
|
23065
|
-
return response.data;
|
|
23349
|
+
return ResearchFindingsResponseFromApiToFront(response.data);
|
|
23066
23350
|
}
|
|
23067
23351
|
/**
|
|
23068
23352
|
* Get knowledge gaps for a research session.
|
|
@@ -23095,7 +23379,7 @@ var ResearchClient = class {
|
|
|
23095
23379
|
secure: true,
|
|
23096
23380
|
format: "json"
|
|
23097
23381
|
});
|
|
23098
|
-
return response.data;
|
|
23382
|
+
return ResearchGapsResponseFromApiToFront(response.data);
|
|
23099
23383
|
}
|
|
23100
23384
|
/**
|
|
23101
23385
|
* Get detected contradictions for a research session.
|
|
@@ -23127,7 +23411,7 @@ var ResearchClient = class {
|
|
|
23127
23411
|
secure: true,
|
|
23128
23412
|
format: "json"
|
|
23129
23413
|
});
|
|
23130
|
-
return response.data;
|
|
23414
|
+
return ResearchContradictionsResponseFromApiToFront(response.data);
|
|
23131
23415
|
}
|
|
23132
23416
|
/**
|
|
23133
23417
|
* Get the full research report for a session.
|
|
@@ -23161,7 +23445,7 @@ var ResearchClient = class {
|
|
|
23161
23445
|
secure: true,
|
|
23162
23446
|
format: "json"
|
|
23163
23447
|
});
|
|
23164
|
-
return response.data;
|
|
23448
|
+
return ResearchReportResponseFromApiToFront(response.data);
|
|
23165
23449
|
}
|
|
23166
23450
|
/**
|
|
23167
23451
|
* Search for papers across external scientific databases.
|
|
@@ -23193,12 +23477,12 @@ var ResearchClient = class {
|
|
|
23193
23477
|
const response = await this.http.request({
|
|
23194
23478
|
path: "/api/v1/research/papers/search",
|
|
23195
23479
|
method: "POST",
|
|
23196
|
-
body: request,
|
|
23480
|
+
body: SearchPapersRequestFromFrontToApi(request),
|
|
23197
23481
|
secure: true,
|
|
23198
23482
|
type: "application/json" /* Json */,
|
|
23199
23483
|
format: "json"
|
|
23200
23484
|
});
|
|
23201
|
-
return response.data;
|
|
23485
|
+
return SearchPapersResponseFromApiToFront(response.data);
|
|
23202
23486
|
}
|
|
23203
23487
|
/**
|
|
23204
23488
|
* Ingest a specific paper into the knowledge base.
|
|
@@ -23230,12 +23514,12 @@ var ResearchClient = class {
|
|
|
23230
23514
|
const response = await this.http.request({
|
|
23231
23515
|
path: "/api/v1/research/papers/ingest",
|
|
23232
23516
|
method: "POST",
|
|
23233
|
-
body: request,
|
|
23517
|
+
body: IngestPaperRequestFromFrontToApi(request),
|
|
23234
23518
|
secure: true,
|
|
23235
23519
|
type: "application/json" /* Json */,
|
|
23236
23520
|
format: "json"
|
|
23237
23521
|
});
|
|
23238
|
-
return response.data;
|
|
23522
|
+
return IngestPaperResponseFromApiToFront(response.data);
|
|
23239
23523
|
}
|
|
23240
23524
|
/**
|
|
23241
23525
|
* Verify a specific claim against evidence in the knowledge base.
|
|
@@ -23268,12 +23552,12 @@ var ResearchClient = class {
|
|
|
23268
23552
|
const response = await this.http.request({
|
|
23269
23553
|
path: "/api/v1/research/claims/verify",
|
|
23270
23554
|
method: "POST",
|
|
23271
|
-
body: request,
|
|
23555
|
+
body: VerifyClaimRequestFromFrontToApi(request),
|
|
23272
23556
|
secure: true,
|
|
23273
23557
|
type: "application/json" /* Json */,
|
|
23274
23558
|
format: "json"
|
|
23275
23559
|
});
|
|
23276
|
-
return response.data;
|
|
23560
|
+
return VerifyClaimResponseFromApiToFront(response.data);
|
|
23277
23561
|
}
|
|
23278
23562
|
};
|
|
23279
23563
|
|