@retrivora-ai/rag-engine 2.6.0 → 2.6.2
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/README.md +8 -6
- package/dist/{ILLMProvider-DUCL1r75.d.mts → ILLMProvider-CzXcTA6d.d.mts} +21 -3
- package/dist/{ILLMProvider-DUCL1r75.d.ts → ILLMProvider-CzXcTA6d.d.ts} +21 -3
- package/dist/handlers/index.d.mts +2 -2
- package/dist/handlers/index.d.ts +2 -2
- package/dist/handlers/index.js +9692 -9343
- package/dist/handlers/index.mjs +9692 -9351
- package/dist/{index-BVSHblli.d.mts → index-BST9Gzsv.d.mts} +8 -7
- package/dist/{index-CsBcqng1.d.ts → index-CFl4KrKq.d.ts} +58 -46
- package/dist/{index-D6Oq2zyc.d.mts → index-D7FuQRSb.d.mts} +58 -46
- package/dist/{index-DGW0NNmR.d.ts → index-qLvtMUr-.d.ts} +8 -7
- package/dist/index.css +23 -0
- package/dist/index.d.mts +4 -4
- package/dist/index.d.ts +4 -4
- package/dist/index.js +267 -187
- package/dist/index.min.css +1 -1
- package/dist/index.mjs +268 -193
- package/dist/server.d.mts +58 -12
- package/dist/server.d.ts +58 -12
- package/dist/server.js +915 -557
- package/dist/server.mjs +910 -563
- package/package.json +1 -1
package/dist/server.d.mts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export { A as AuthMode,
|
|
3
|
-
import { o as DecisionContext, q as IntentCategory, I as IRenderRule, G as RenderDecision, p as IRendererStrategy } from './index-
|
|
4
|
-
export {
|
|
5
|
-
import { I as IProviderValidator, a as IProviderHealthChecker, H as HealthCheckResult } from './index-
|
|
6
|
-
export { C as ConfigValidator, b as HandlerOptions, V as ValidationError, c as VectorPlugin, d as createChatHandler, e as createFeedbackHandler, f as createHealthHandler, g as createHistoryHandler, h as createIngestHandler, i as
|
|
1
|
+
import { b as RagConfig, f as UniversalRagConfig, h as VectorDBConfig, y as UpsertDocument, V as VectorMatch, H as GraphDBConfig, J as GraphNode, K as Edge, M as GraphSearchResult, L as LLMConfig, E as EmbeddingConfig, I as ILLMProvider, z as VectorDBProvider, n as LLMProvider, m as EmbeddingProvider, u as RAGConfig, U as UIConfig, C as ChatMessage, g as UITransformationResponse, k as ChatOptions, l as EmbedOptions, c as IngestDocument, d as ChatResponse } from './ILLMProvider-CzXcTA6d.mjs';
|
|
2
|
+
export { A as AuthMode, N as BarChartData, Q as CarouselProduct, S as IRetriever, o as LatencyBreakdown, X as LineChartDataPoint, Y as MessageRole, Z as MetricCardData, O as ObservabilityTrace, _ as PieChartData, P as Product, p as ProjectAiSettings, q as ProjectAuthSettings, r as ProjectBrandingSettings, a as ProjectChatSettings, s as ProjectTelemetrySettings, t as ProjectWidgetSettings, R as RagMessage, v as RetrievalConfig, e as RetrievalResult, w as RetrievedChunk, $ as RetrivoraChunkMetadata, a0 as RetrivoraIngestedDocument, a1 as ScatterPlotDataPoint, a2 as SuggestionsResponse, a3 as TableData, T as ThemeMode, x as TokenUsage, i as UseRagChatOptions, j as UseRagChatReturn, a4 as VisualizationType, W as WidgetPosition, B as WorkflowConfig, D as createDefaultProjectSettings, F as normalizeProjectSettings, G as projectSettingsToUiConfig } from './ILLMProvider-CzXcTA6d.mjs';
|
|
3
|
+
import { V as Pipeline, o as DecisionContext, q as IntentCategory, I as IRenderRule, G as RenderDecision, p as IRendererStrategy } from './index-BST9Gzsv.mjs';
|
|
4
|
+
export { W as ArchitectureCardProps, A as AuthenticationException, B as BatchOptions, f as BatchProcessor, g as BatchResult, h as ChartType, e as ChatViewportSize, C as ChatWidgetProps, a as ChatWindowProps, i as Chunk, j as ChunkOptions, c as ClientConfig, m as ConfigFetcher, b as ConfigProviderProps, n as ConfigurationException, X as DocumentChunker, D as DocumentUploadProps, E as EmbeddingFailedException, Y as LicenseConfigResolver, L as LicenseTierConfig, r as LicenseValidationError, s as LicenseValidationRequest, t as LicenseValidationResponse, u as LicenseValidator, M as MessageBubbleProps, Z as PipelineStep, P as ProductCardProps, d as ProductCarouselProps, v as ProviderCredentials, w as ProviderNotFoundException, _ as ProviderPill, x as RateLimitException, R as RemoteConfig, y as RemoteEmbeddingConfig, z as RemoteLLMConfig, F as RemoteVectorConfig, $ as RenderSectionDecision, H as RenderType, J as RetrievalException, K as Retrivora, N as RetrivoraError, O as RetrivoraErrorCode, Q as SDKVersionUnsupportedError, T as SDK_VERSION, a0 as Snippet, S as SourceCardProps, a1 as wrapError } from './index-BST9Gzsv.mjs';
|
|
5
|
+
import { I as IProviderValidator, a as IProviderHealthChecker, H as HealthCheckResult } from './index-D7FuQRSb.mjs';
|
|
6
|
+
export { C as ConfigValidator, b as HandlerOptions, V as ValidationError, c as VectorPlugin, d as createChatHandler, e as createFeedbackHandler, f as createHealthHandler, g as createHistoryHandler, h as createIngestHandler, i as createLicenseHandler, j as createRagHandler, k as createSessionsHandler, l as createStreamHandler, m as createSuggestionsHandler, n as createUploadHandler, s as sseErrorFrame, o as sseFrame, p as sseMetaFrame, q as sseObservabilityFrame, r as sseTextFrame, t as sseUIFrame } from './index-D7FuQRSb.mjs';
|
|
7
7
|
import 'react';
|
|
8
8
|
import 'next/server';
|
|
9
9
|
|
|
@@ -18,10 +18,6 @@ interface LicensePayload {
|
|
|
18
18
|
minimumSupportedVersion?: string;
|
|
19
19
|
forceUpgrade?: boolean;
|
|
20
20
|
}
|
|
21
|
-
/**
|
|
22
|
-
* Validates licenses against the central Retrivora API.
|
|
23
|
-
* Replaces the old zero-latency local cryptographic verifier.
|
|
24
|
-
*/
|
|
25
21
|
declare class LicenseVerifier {
|
|
26
22
|
private static readonly cache;
|
|
27
23
|
private static readonly CACHE_TTL_MS;
|
|
@@ -37,10 +33,53 @@ declare class LicenseVerifier {
|
|
|
37
33
|
* @param provider - Optional provider for tier checks.
|
|
38
34
|
*/
|
|
39
35
|
static verifyAsync(licenseKey: string | undefined, currentProjectId: string, provider?: string): Promise<LicensePayload>;
|
|
36
|
+
private static cachedIps;
|
|
40
37
|
static verifyIP(licenseKey: string | undefined): Promise<void>;
|
|
41
38
|
static extractTier(licenseKey: string | undefined): string;
|
|
42
39
|
}
|
|
43
40
|
|
|
41
|
+
/**
|
|
42
|
+
* LangChainAgent — Orchestration layer that turns the RAG pipeline into an Agent.
|
|
43
|
+
*
|
|
44
|
+
* Uses dynamic imports to keep LangChain an optional peer dependency.
|
|
45
|
+
* Requires `langchain` (v1.x) and `@langchain/core` to be installed.
|
|
46
|
+
*
|
|
47
|
+
* LangChain v1.x migration notes:
|
|
48
|
+
* - `AgentExecutor` and `createOpenAIFunctionsAgent` are removed.
|
|
49
|
+
* - The replacement is `createAgent` from the `langchain` root package,
|
|
50
|
+
* which returns a `ReactAgent` (LangGraph-backed ReAct agent).
|
|
51
|
+
* - Invocation uses `{ messages: [...] }` instead of `{ input, chat_history }`.
|
|
52
|
+
*/
|
|
53
|
+
declare class LangChainAgent {
|
|
54
|
+
private pipeline;
|
|
55
|
+
private config;
|
|
56
|
+
private agent?;
|
|
57
|
+
constructor(pipeline: Pipeline, config: RagConfig);
|
|
58
|
+
/**
|
|
59
|
+
* Initializes the LangChain ReAct agent with the RAG pipeline as a tool.
|
|
60
|
+
* Dynamically imports langchain so the package doesn't crash if it isn't installed.
|
|
61
|
+
*/
|
|
62
|
+
initialize(chatModel: unknown): Promise<void>;
|
|
63
|
+
/**
|
|
64
|
+
* Run the agentic flow.
|
|
65
|
+
*
|
|
66
|
+
* LangChain v1.x: invoke takes `{ messages: [...] }` instead of `{ input, chat_history }`.
|
|
67
|
+
* The agent returns `{ messages: [...] }` — the last message is the final answer.
|
|
68
|
+
*/
|
|
69
|
+
run(input: string, chatHistory?: unknown[]): Promise<any>;
|
|
70
|
+
/**
|
|
71
|
+
* Run the agentic flow in streaming mode, emitting granular SSE event frames.
|
|
72
|
+
* Leverages LangChain/LangGraph `streamEvents` (v2 API) to stream:
|
|
73
|
+
* - Token-by-token LLM output (`type: "text"`)
|
|
74
|
+
* - Tool invocation / thinking steps (`type: "thinking"`)
|
|
75
|
+
* - Tool execution metadata & search sources
|
|
76
|
+
*/
|
|
77
|
+
streamRun(input: string, chatHistory?: unknown[]): AsyncGenerator<{
|
|
78
|
+
type: string;
|
|
79
|
+
text: any;
|
|
80
|
+
}, void, unknown>;
|
|
81
|
+
}
|
|
82
|
+
|
|
44
83
|
/**
|
|
45
84
|
* ConfigResolver — validates and normalizes host configuration.
|
|
46
85
|
* It merges host-provided config with environment defaults.
|
|
@@ -915,9 +954,11 @@ declare class IntentClassifier {
|
|
|
915
954
|
signals: DataSignals;
|
|
916
955
|
};
|
|
917
956
|
/**
|
|
918
|
-
* Extract key data structure signals from retrieved documents.
|
|
957
|
+
* Extract key data structure signals dynamically from retrieved documents.
|
|
958
|
+
* Inspects both structured metadata and parsed chunk text.
|
|
919
959
|
*/
|
|
920
960
|
static extractDataSignals(context: DecisionContext): DataSignals;
|
|
961
|
+
private static isDiscoveryQuery;
|
|
921
962
|
private static isInformationLookup;
|
|
922
963
|
private static isComparisonQuery;
|
|
923
964
|
private static isProductQuery;
|
|
@@ -1638,6 +1679,11 @@ declare function createRetrivora(options: LicensedRetrivoraOptions): Promise<Lic
|
|
|
1638
1679
|
* Axios added ~25KB gzipped to every consumer's bundle purely for non-critical
|
|
1639
1680
|
* fire-and-forget POST calls. fetch is available in Node.js 18+ and all
|
|
1640
1681
|
* Next.js deployment targets (Vercel, Edge, Node runtime).
|
|
1682
|
+
*
|
|
1683
|
+
* @deprecated The streaming and handler paths use `reportTelemetry()` in
|
|
1684
|
+
* `packages/sdk/src/handlers/index.ts` directly. TelemetryService is only
|
|
1685
|
+
* consumed by `LicensedRetrivora` (the non-streaming API). Its event queue
|
|
1686
|
+
* and auto-flush are functional but not exercised by the main request path.
|
|
1641
1687
|
*/
|
|
1642
1688
|
declare enum EventType {
|
|
1643
1689
|
EMBEDDING_GENERATED = "embedding_generated",
|
|
@@ -1774,4 +1820,4 @@ declare function initializeTelemetryService(projectId: string, licenseKey: strin
|
|
|
1774
1820
|
*/
|
|
1775
1821
|
declare function shutdownTelemetryService(): Promise<void>;
|
|
1776
1822
|
|
|
1777
|
-
export { AnthropicProvider, BaseVectorProvider, CarouselRendererStrategy, ChartRendererStrategy, ChatMessage, ChatOptions, ChatResponse, ChromaDBProvider, ConfigBuilder, ConfigResolver, type CustomEmbeddingOptions, CustomEmbeddingProvider, DecisionContext, DocumentParser, Edge, EmbedOptions, EmbeddingConfig, EmbeddingProvider, EmbeddingStrategy, EmbeddingStrategyResolver, EventType, GraphNode, GraphSearchResult, GroqProvider, HealthCheckResult, HybridSearch, type HybridSearchOptions, ILLMProvider, IProviderHealthChecker, IProviderValidator, IRenderRule, IRendererStrategy, IngestDocument, IntentCategory, IntentClassifier, LLMConfig, LLMFactory, LLMProvider, LLM_PROFILES, type LicensePayload, LicenseVerifier, LicensedRetrivora, type LicensedRetrivoraOptions, MilvusProvider, MixedRendererStrategy, MongoDBProvider, MultiTablePostgresProvider, OllamaProvider, OpenAIProvider, type OptimizedPromptResult, PIIMasker, type PIIMaskerOptions, PRESETS, type ParsedTableResult, PineconeProvider, PostgreSQLProvider, PromptGuard, type PromptGuardResult, type PromptOptimizationOptions, PromptOptimizer, ProviderHealthCheck, ProviderRegistry, QdrantProvider, QwenProvider, RAGConfig, RAGEvaluator, type RAGTriadScore, RagConfig, RedisProvider, RenderDecision, RendererRegistry, type RerankOptions, Reranker, Rule1SpecificInfoRule, Rule2ComparisonRule, Rule3ProductDiscoveryRule, Rule4AnalyticalRule, Rule5MixedResponseRule, Rule6SmallResultSetRule, Rule7LargeTableRule, RuleEngine, type RuntimeTierConfig, TableRendererStrategy, type TelemetryEvent, TelemetryService, TextRendererStrategy, UIConfig, UITransformationResponse, UniversalLLMAdapter, UniversalRagConfig, UniversalTableParser, UniversalVectorProvider, UpsertDocument, VECTOR_PROFILES, VectorDBConfig, VectorDBProvider, VectorMatch, type VisionExtractOptions, VisionExtractor, VisualizationDecisionEngine, WeaviateProvider, createFromPreset, createRetrivora, decideVisualization, getRagConfig, getRuntimeConfig, getTelemetryService, initializeTelemetryService, injectRuntimeConfig, shutdownTelemetryService };
|
|
1823
|
+
export { AnthropicProvider, BaseVectorProvider, CarouselRendererStrategy, ChartRendererStrategy, ChatMessage, ChatOptions, ChatResponse, ChromaDBProvider, ConfigBuilder, ConfigResolver, type CustomEmbeddingOptions, CustomEmbeddingProvider, DecisionContext, DocumentParser, Edge, EmbedOptions, EmbeddingConfig, EmbeddingProvider, EmbeddingStrategy, EmbeddingStrategyResolver, EventType, GraphNode, GraphSearchResult, GroqProvider, HealthCheckResult, HybridSearch, type HybridSearchOptions, ILLMProvider, IProviderHealthChecker, IProviderValidator, IRenderRule, IRendererStrategy, IngestDocument, IntentCategory, IntentClassifier, LLMConfig, LLMFactory, LLMProvider, LLM_PROFILES, LangChainAgent, type LicensePayload, LicenseVerifier, LicensedRetrivora, type LicensedRetrivoraOptions, MilvusProvider, MixedRendererStrategy, MongoDBProvider, MultiTablePostgresProvider, OllamaProvider, OpenAIProvider, type OptimizedPromptResult, PIIMasker, type PIIMaskerOptions, PRESETS, type ParsedTableResult, PineconeProvider, Pipeline, PostgreSQLProvider, PromptGuard, type PromptGuardResult, type PromptOptimizationOptions, PromptOptimizer, ProviderHealthCheck, ProviderRegistry, QdrantProvider, QwenProvider, RAGConfig, RAGEvaluator, type RAGTriadScore, RagConfig, RedisProvider, RenderDecision, RendererRegistry, type RerankOptions, Reranker, Rule1SpecificInfoRule, Rule2ComparisonRule, Rule3ProductDiscoveryRule, Rule4AnalyticalRule, Rule5MixedResponseRule, Rule6SmallResultSetRule, Rule7LargeTableRule, RuleEngine, type RuntimeTierConfig, TableRendererStrategy, type TelemetryEvent, TelemetryService, TextRendererStrategy, UIConfig, UITransformationResponse, UniversalLLMAdapter, UniversalRagConfig, UniversalTableParser, UniversalVectorProvider, UpsertDocument, VECTOR_PROFILES, VectorDBConfig, VectorDBProvider, VectorMatch, type VisionExtractOptions, VisionExtractor, VisualizationDecisionEngine, WeaviateProvider, createFromPreset, createRetrivora, decideVisualization, getRagConfig, getRuntimeConfig, getTelemetryService, initializeTelemetryService, injectRuntimeConfig, shutdownTelemetryService };
|
package/dist/server.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export { A as AuthMode,
|
|
3
|
-
import { o as DecisionContext, q as IntentCategory, I as IRenderRule, G as RenderDecision, p as IRendererStrategy } from './index-
|
|
4
|
-
export {
|
|
5
|
-
import { I as IProviderValidator, a as IProviderHealthChecker, H as HealthCheckResult } from './index-
|
|
6
|
-
export { C as ConfigValidator, b as HandlerOptions, V as ValidationError, c as VectorPlugin, d as createChatHandler, e as createFeedbackHandler, f as createHealthHandler, g as createHistoryHandler, h as createIngestHandler, i as
|
|
1
|
+
import { b as RagConfig, f as UniversalRagConfig, h as VectorDBConfig, y as UpsertDocument, V as VectorMatch, H as GraphDBConfig, J as GraphNode, K as Edge, M as GraphSearchResult, L as LLMConfig, E as EmbeddingConfig, I as ILLMProvider, z as VectorDBProvider, n as LLMProvider, m as EmbeddingProvider, u as RAGConfig, U as UIConfig, C as ChatMessage, g as UITransformationResponse, k as ChatOptions, l as EmbedOptions, c as IngestDocument, d as ChatResponse } from './ILLMProvider-CzXcTA6d.js';
|
|
2
|
+
export { A as AuthMode, N as BarChartData, Q as CarouselProduct, S as IRetriever, o as LatencyBreakdown, X as LineChartDataPoint, Y as MessageRole, Z as MetricCardData, O as ObservabilityTrace, _ as PieChartData, P as Product, p as ProjectAiSettings, q as ProjectAuthSettings, r as ProjectBrandingSettings, a as ProjectChatSettings, s as ProjectTelemetrySettings, t as ProjectWidgetSettings, R as RagMessage, v as RetrievalConfig, e as RetrievalResult, w as RetrievedChunk, $ as RetrivoraChunkMetadata, a0 as RetrivoraIngestedDocument, a1 as ScatterPlotDataPoint, a2 as SuggestionsResponse, a3 as TableData, T as ThemeMode, x as TokenUsage, i as UseRagChatOptions, j as UseRagChatReturn, a4 as VisualizationType, W as WidgetPosition, B as WorkflowConfig, D as createDefaultProjectSettings, F as normalizeProjectSettings, G as projectSettingsToUiConfig } from './ILLMProvider-CzXcTA6d.js';
|
|
3
|
+
import { V as Pipeline, o as DecisionContext, q as IntentCategory, I as IRenderRule, G as RenderDecision, p as IRendererStrategy } from './index-qLvtMUr-.js';
|
|
4
|
+
export { W as ArchitectureCardProps, A as AuthenticationException, B as BatchOptions, f as BatchProcessor, g as BatchResult, h as ChartType, e as ChatViewportSize, C as ChatWidgetProps, a as ChatWindowProps, i as Chunk, j as ChunkOptions, c as ClientConfig, m as ConfigFetcher, b as ConfigProviderProps, n as ConfigurationException, X as DocumentChunker, D as DocumentUploadProps, E as EmbeddingFailedException, Y as LicenseConfigResolver, L as LicenseTierConfig, r as LicenseValidationError, s as LicenseValidationRequest, t as LicenseValidationResponse, u as LicenseValidator, M as MessageBubbleProps, Z as PipelineStep, P as ProductCardProps, d as ProductCarouselProps, v as ProviderCredentials, w as ProviderNotFoundException, _ as ProviderPill, x as RateLimitException, R as RemoteConfig, y as RemoteEmbeddingConfig, z as RemoteLLMConfig, F as RemoteVectorConfig, $ as RenderSectionDecision, H as RenderType, J as RetrievalException, K as Retrivora, N as RetrivoraError, O as RetrivoraErrorCode, Q as SDKVersionUnsupportedError, T as SDK_VERSION, a0 as Snippet, S as SourceCardProps, a1 as wrapError } from './index-qLvtMUr-.js';
|
|
5
|
+
import { I as IProviderValidator, a as IProviderHealthChecker, H as HealthCheckResult } from './index-CFl4KrKq.js';
|
|
6
|
+
export { C as ConfigValidator, b as HandlerOptions, V as ValidationError, c as VectorPlugin, d as createChatHandler, e as createFeedbackHandler, f as createHealthHandler, g as createHistoryHandler, h as createIngestHandler, i as createLicenseHandler, j as createRagHandler, k as createSessionsHandler, l as createStreamHandler, m as createSuggestionsHandler, n as createUploadHandler, s as sseErrorFrame, o as sseFrame, p as sseMetaFrame, q as sseObservabilityFrame, r as sseTextFrame, t as sseUIFrame } from './index-CFl4KrKq.js';
|
|
7
7
|
import 'react';
|
|
8
8
|
import 'next/server';
|
|
9
9
|
|
|
@@ -18,10 +18,6 @@ interface LicensePayload {
|
|
|
18
18
|
minimumSupportedVersion?: string;
|
|
19
19
|
forceUpgrade?: boolean;
|
|
20
20
|
}
|
|
21
|
-
/**
|
|
22
|
-
* Validates licenses against the central Retrivora API.
|
|
23
|
-
* Replaces the old zero-latency local cryptographic verifier.
|
|
24
|
-
*/
|
|
25
21
|
declare class LicenseVerifier {
|
|
26
22
|
private static readonly cache;
|
|
27
23
|
private static readonly CACHE_TTL_MS;
|
|
@@ -37,10 +33,53 @@ declare class LicenseVerifier {
|
|
|
37
33
|
* @param provider - Optional provider for tier checks.
|
|
38
34
|
*/
|
|
39
35
|
static verifyAsync(licenseKey: string | undefined, currentProjectId: string, provider?: string): Promise<LicensePayload>;
|
|
36
|
+
private static cachedIps;
|
|
40
37
|
static verifyIP(licenseKey: string | undefined): Promise<void>;
|
|
41
38
|
static extractTier(licenseKey: string | undefined): string;
|
|
42
39
|
}
|
|
43
40
|
|
|
41
|
+
/**
|
|
42
|
+
* LangChainAgent — Orchestration layer that turns the RAG pipeline into an Agent.
|
|
43
|
+
*
|
|
44
|
+
* Uses dynamic imports to keep LangChain an optional peer dependency.
|
|
45
|
+
* Requires `langchain` (v1.x) and `@langchain/core` to be installed.
|
|
46
|
+
*
|
|
47
|
+
* LangChain v1.x migration notes:
|
|
48
|
+
* - `AgentExecutor` and `createOpenAIFunctionsAgent` are removed.
|
|
49
|
+
* - The replacement is `createAgent` from the `langchain` root package,
|
|
50
|
+
* which returns a `ReactAgent` (LangGraph-backed ReAct agent).
|
|
51
|
+
* - Invocation uses `{ messages: [...] }` instead of `{ input, chat_history }`.
|
|
52
|
+
*/
|
|
53
|
+
declare class LangChainAgent {
|
|
54
|
+
private pipeline;
|
|
55
|
+
private config;
|
|
56
|
+
private agent?;
|
|
57
|
+
constructor(pipeline: Pipeline, config: RagConfig);
|
|
58
|
+
/**
|
|
59
|
+
* Initializes the LangChain ReAct agent with the RAG pipeline as a tool.
|
|
60
|
+
* Dynamically imports langchain so the package doesn't crash if it isn't installed.
|
|
61
|
+
*/
|
|
62
|
+
initialize(chatModel: unknown): Promise<void>;
|
|
63
|
+
/**
|
|
64
|
+
* Run the agentic flow.
|
|
65
|
+
*
|
|
66
|
+
* LangChain v1.x: invoke takes `{ messages: [...] }` instead of `{ input, chat_history }`.
|
|
67
|
+
* The agent returns `{ messages: [...] }` — the last message is the final answer.
|
|
68
|
+
*/
|
|
69
|
+
run(input: string, chatHistory?: unknown[]): Promise<any>;
|
|
70
|
+
/**
|
|
71
|
+
* Run the agentic flow in streaming mode, emitting granular SSE event frames.
|
|
72
|
+
* Leverages LangChain/LangGraph `streamEvents` (v2 API) to stream:
|
|
73
|
+
* - Token-by-token LLM output (`type: "text"`)
|
|
74
|
+
* - Tool invocation / thinking steps (`type: "thinking"`)
|
|
75
|
+
* - Tool execution metadata & search sources
|
|
76
|
+
*/
|
|
77
|
+
streamRun(input: string, chatHistory?: unknown[]): AsyncGenerator<{
|
|
78
|
+
type: string;
|
|
79
|
+
text: any;
|
|
80
|
+
}, void, unknown>;
|
|
81
|
+
}
|
|
82
|
+
|
|
44
83
|
/**
|
|
45
84
|
* ConfigResolver — validates and normalizes host configuration.
|
|
46
85
|
* It merges host-provided config with environment defaults.
|
|
@@ -915,9 +954,11 @@ declare class IntentClassifier {
|
|
|
915
954
|
signals: DataSignals;
|
|
916
955
|
};
|
|
917
956
|
/**
|
|
918
|
-
* Extract key data structure signals from retrieved documents.
|
|
957
|
+
* Extract key data structure signals dynamically from retrieved documents.
|
|
958
|
+
* Inspects both structured metadata and parsed chunk text.
|
|
919
959
|
*/
|
|
920
960
|
static extractDataSignals(context: DecisionContext): DataSignals;
|
|
961
|
+
private static isDiscoveryQuery;
|
|
921
962
|
private static isInformationLookup;
|
|
922
963
|
private static isComparisonQuery;
|
|
923
964
|
private static isProductQuery;
|
|
@@ -1638,6 +1679,11 @@ declare function createRetrivora(options: LicensedRetrivoraOptions): Promise<Lic
|
|
|
1638
1679
|
* Axios added ~25KB gzipped to every consumer's bundle purely for non-critical
|
|
1639
1680
|
* fire-and-forget POST calls. fetch is available in Node.js 18+ and all
|
|
1640
1681
|
* Next.js deployment targets (Vercel, Edge, Node runtime).
|
|
1682
|
+
*
|
|
1683
|
+
* @deprecated The streaming and handler paths use `reportTelemetry()` in
|
|
1684
|
+
* `packages/sdk/src/handlers/index.ts` directly. TelemetryService is only
|
|
1685
|
+
* consumed by `LicensedRetrivora` (the non-streaming API). Its event queue
|
|
1686
|
+
* and auto-flush are functional but not exercised by the main request path.
|
|
1641
1687
|
*/
|
|
1642
1688
|
declare enum EventType {
|
|
1643
1689
|
EMBEDDING_GENERATED = "embedding_generated",
|
|
@@ -1774,4 +1820,4 @@ declare function initializeTelemetryService(projectId: string, licenseKey: strin
|
|
|
1774
1820
|
*/
|
|
1775
1821
|
declare function shutdownTelemetryService(): Promise<void>;
|
|
1776
1822
|
|
|
1777
|
-
export { AnthropicProvider, BaseVectorProvider, CarouselRendererStrategy, ChartRendererStrategy, ChatMessage, ChatOptions, ChatResponse, ChromaDBProvider, ConfigBuilder, ConfigResolver, type CustomEmbeddingOptions, CustomEmbeddingProvider, DecisionContext, DocumentParser, Edge, EmbedOptions, EmbeddingConfig, EmbeddingProvider, EmbeddingStrategy, EmbeddingStrategyResolver, EventType, GraphNode, GraphSearchResult, GroqProvider, HealthCheckResult, HybridSearch, type HybridSearchOptions, ILLMProvider, IProviderHealthChecker, IProviderValidator, IRenderRule, IRendererStrategy, IngestDocument, IntentCategory, IntentClassifier, LLMConfig, LLMFactory, LLMProvider, LLM_PROFILES, type LicensePayload, LicenseVerifier, LicensedRetrivora, type LicensedRetrivoraOptions, MilvusProvider, MixedRendererStrategy, MongoDBProvider, MultiTablePostgresProvider, OllamaProvider, OpenAIProvider, type OptimizedPromptResult, PIIMasker, type PIIMaskerOptions, PRESETS, type ParsedTableResult, PineconeProvider, PostgreSQLProvider, PromptGuard, type PromptGuardResult, type PromptOptimizationOptions, PromptOptimizer, ProviderHealthCheck, ProviderRegistry, QdrantProvider, QwenProvider, RAGConfig, RAGEvaluator, type RAGTriadScore, RagConfig, RedisProvider, RenderDecision, RendererRegistry, type RerankOptions, Reranker, Rule1SpecificInfoRule, Rule2ComparisonRule, Rule3ProductDiscoveryRule, Rule4AnalyticalRule, Rule5MixedResponseRule, Rule6SmallResultSetRule, Rule7LargeTableRule, RuleEngine, type RuntimeTierConfig, TableRendererStrategy, type TelemetryEvent, TelemetryService, TextRendererStrategy, UIConfig, UITransformationResponse, UniversalLLMAdapter, UniversalRagConfig, UniversalTableParser, UniversalVectorProvider, UpsertDocument, VECTOR_PROFILES, VectorDBConfig, VectorDBProvider, VectorMatch, type VisionExtractOptions, VisionExtractor, VisualizationDecisionEngine, WeaviateProvider, createFromPreset, createRetrivora, decideVisualization, getRagConfig, getRuntimeConfig, getTelemetryService, initializeTelemetryService, injectRuntimeConfig, shutdownTelemetryService };
|
|
1823
|
+
export { AnthropicProvider, BaseVectorProvider, CarouselRendererStrategy, ChartRendererStrategy, ChatMessage, ChatOptions, ChatResponse, ChromaDBProvider, ConfigBuilder, ConfigResolver, type CustomEmbeddingOptions, CustomEmbeddingProvider, DecisionContext, DocumentParser, Edge, EmbedOptions, EmbeddingConfig, EmbeddingProvider, EmbeddingStrategy, EmbeddingStrategyResolver, EventType, GraphNode, GraphSearchResult, GroqProvider, HealthCheckResult, HybridSearch, type HybridSearchOptions, ILLMProvider, IProviderHealthChecker, IProviderValidator, IRenderRule, IRendererStrategy, IngestDocument, IntentCategory, IntentClassifier, LLMConfig, LLMFactory, LLMProvider, LLM_PROFILES, LangChainAgent, type LicensePayload, LicenseVerifier, LicensedRetrivora, type LicensedRetrivoraOptions, MilvusProvider, MixedRendererStrategy, MongoDBProvider, MultiTablePostgresProvider, OllamaProvider, OpenAIProvider, type OptimizedPromptResult, PIIMasker, type PIIMaskerOptions, PRESETS, type ParsedTableResult, PineconeProvider, Pipeline, PostgreSQLProvider, PromptGuard, type PromptGuardResult, type PromptOptimizationOptions, PromptOptimizer, ProviderHealthCheck, ProviderRegistry, QdrantProvider, QwenProvider, RAGConfig, RAGEvaluator, type RAGTriadScore, RagConfig, RedisProvider, RenderDecision, RendererRegistry, type RerankOptions, Reranker, Rule1SpecificInfoRule, Rule2ComparisonRule, Rule3ProductDiscoveryRule, Rule4AnalyticalRule, Rule5MixedResponseRule, Rule6SmallResultSetRule, Rule7LargeTableRule, RuleEngine, type RuntimeTierConfig, TableRendererStrategy, type TelemetryEvent, TelemetryService, TextRendererStrategy, UIConfig, UITransformationResponse, UniversalLLMAdapter, UniversalRagConfig, UniversalTableParser, UniversalVectorProvider, UpsertDocument, VECTOR_PROFILES, VectorDBConfig, VectorDBProvider, VectorMatch, type VisionExtractOptions, VisionExtractor, VisualizationDecisionEngine, WeaviateProvider, createFromPreset, createRetrivora, decideVisualization, getRagConfig, getRuntimeConfig, getTelemetryService, initializeTelemetryService, injectRuntimeConfig, shutdownTelemetryService };
|