@retrivora-ai/rag-engine 2.3.7 → 2.3.9

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/server.d.mts CHANGED
@@ -2,61 +2,39 @@ import { V as VectorDBConfig, L as LLMConfig, d as EmbeddingConfig, n as RagConf
2
2
  export { A as AuthMode, K as BarChartData, M as CarouselProduct, N as IRetriever, h as LatencyBreakdown, Q as LineChartDataPoint, S as MessageRole, X as MetricCardData, O as ObservabilityTrace, Y as PieChartData, Z as Product, i as ProjectAiSettings, j as ProjectAuthSettings, k as ProjectBrandingSettings, P as ProjectChatSettings, l as ProjectTelemetrySettings, m as ProjectWidgetSettings, o as RagMessage, p as RetrievalConfig, _ as RetrievalResult, q as RetrievedChunk, $ as RetrivoraChunkMetadata, a0 as RetrivoraIngestedDocument, a1 as ScatterPlotDataPoint, a2 as SuggestionsResponse, a3 as TableData, T as ThemeMode, r as TokenUsage, U as UseRagChatOptions, a as UseRagChatReturn, a4 as VisualizationType, W as WidgetPosition, x as WorkflowConfig, y as createDefaultProjectSettings, z as normalizeProjectSettings, B as projectSettingsToUiConfig } from './ILLMProvider-B8TAVx3j.mjs';
3
3
  import { l as DecisionContext, n as IntentCategory, I as IRenderRule, y as RenderDecision, m as IRendererStrategy } from './BatchProcessor-BhLczWj5.mjs';
4
4
  export { Q as ArchitectureCardProps, A as AuthenticationException, B as BatchOptions, e as BatchProcessor, f as BatchResult, g as ChartType, T as ChatViewportSize, C as ChatWidgetProps, a as ChatWindowProps, h as Chunk, i as ChunkOptions, c as ClientConfig, j as ConfigFetcher, b as ConfigProviderProps, k as ConfigurationException, U as DocumentChunker, D as DocumentUploadProps, E as EmbeddingFailedException, V as LicenseConfigResolver, L as LicenseTierConfig, o as LicenseValidationError, p as LicenseValidationRequest, q as LicenseValidationResponse, r as LicenseValidator, M as MessageBubbleProps, W as Pipeline, X as PipelineStep, P as ProductCardProps, d as ProductCarouselProps, s as ProviderCredentials, t as ProviderNotFoundException, Y as ProviderPill, u as RateLimitException, R as RemoteConfig, v as RemoteEmbeddingConfig, w as RemoteLLMConfig, x as RemoteVectorConfig, Z as RenderSectionDecision, z as RenderType, F as RetrievalException, G as Retrivora, H as RetrivoraError, J as RetrivoraErrorCode, K as SDKVersionUnsupportedError, N as SDK_VERSION, _ as Snippet, S as SourceCardProps, $ as wrapError } from './BatchProcessor-BhLczWj5.mjs';
5
- import { H as HealthCheckResult, I as IProviderValidator, a as IProviderHealthChecker } from './index-xxQOFx-u.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 createRagHandler, j as createSessionsHandler, k as createStreamHandler, l as createUploadHandler, s as sseErrorFrame, m as sseFrame, n as sseMetaFrame, o as sseTextFrame } from './index-xxQOFx-u.mjs';
5
+ import { H as HealthCheckResult, I as IProviderValidator, a as IProviderHealthChecker } from './index-C7aHK7_g.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 createRagHandler, j as createSessionsHandler, k as createStreamHandler, l as createUploadHandler, s as sseErrorFrame, m as sseFrame, n as sseMetaFrame, o as sseTextFrame } from './index-C7aHK7_g.mjs';
7
7
  import 'react';
8
8
  import 'next/server';
9
9
 
10
10
  /**
11
11
  * Decoded payload of a Retrivora license JWT.
12
- *
13
- * Retrivora licenses are signed with RS256 using a key held exclusively by
14
- * Retrivora SaaS. They carry the project binding, the expiration time, and
15
- * the customer tier, which the SDK uses to enforce per-tier feature limits
16
- * (vector DB provider whitelist).
17
12
  */
18
13
  interface LicensePayload {
19
- /** Project ID this license is bound to — used to prevent cross-tenant reuse. */
20
14
  projectId: string;
21
- /** UNIX timestamp in seconds after which the license must be considered expired. */
22
15
  expiresAt: number;
23
- /** Customer tier (hobby | pro | enterprise). */
24
16
  tier: string;
25
- /** Optional: License lifecycle status propagated by the server validator (ACTIVE/TERMINATED/etc). */
26
17
  licenseStatus?: string;
18
+ minimumSupportedVersion?: string;
19
+ forceUpgrade?: boolean;
27
20
  }
28
21
  /**
29
- * Zero-latency cryptographic license verifier.
30
- *
31
- * Responsibilities:
32
- * 1. Parse the `rtv_`-prefixed JWT (base64url header.payload.signature)
33
- * 2. Verify the RS256 signature against Retrivora's embedded PUBLIC_KEY
34
- * 3. Match the license's projectId to the currently configured projectId
35
- * 4. Enforce expiration (current UNIX seconds > expiresAt)
36
- * 5. Enforce per-tier vector DB provider whitelist in production
37
- *
38
- * Fail-open policy: In non-production environments a missing license key
39
- * produces a console-warning and a synthetic 24h "hobby" payload so that
40
- * local development continues to work without signing up. In production
41
- * any missing/invalid key throws `ConfigurationException`.
42
- *
43
- * Caching: Cryptographic verification is CPU-expensive — successful results
44
- * are cached for 60 seconds keyed by (licenseKey, projectId, provider,
45
- * publicKeyOverride). Cache hits still re-verify expiresAt.
22
+ * Validates licenses against the central Retrivora API.
23
+ * Replaces the old zero-latency local cryptographic verifier.
46
24
  */
47
25
  declare class LicenseVerifier {
48
26
  private static readonly cache;
49
27
  private static readonly CACHE_TTL_MS;
50
- private static readonly PUBLIC_KEY;
51
28
  /**
52
- * Decodes, verifies signature, and checks metadata of a license key.
29
+ * Validates the license key asynchronously by calling the Retrivora backend.
53
30
  *
54
31
  * @param licenseKey - Base64url signed JWT license key.
55
32
  * @param currentProjectId - Project namespace ID.
56
- * @param publicKeyOverride - Optional override for unit/integration tests.
33
+ * @param provider - Optional provider for tier checks.
57
34
  */
58
- static verify(licenseKey: string | undefined, currentProjectId: string, provider?: string, publicKeyOverride?: string): LicensePayload;
35
+ static verifyAsync(licenseKey: string | undefined, currentProjectId: string, provider?: string): Promise<LicensePayload>;
59
36
  static verifyIP(licenseKey: string | undefined): Promise<void>;
37
+ static extractTier(licenseKey: string | undefined): string;
60
38
  }
61
39
 
62
40
  /**
@@ -742,7 +720,9 @@ declare class Rule7LargeTableRule implements IRenderRule {
742
720
  declare class PineconeProvider extends BaseVectorProvider {
743
721
  private client;
744
722
  private apiKey;
723
+ private licenseKey?;
745
724
  constructor(config: VectorDBConfig);
725
+ private getControlPlaneUrl;
746
726
  static getValidator(): IProviderValidator;
747
727
  static getHealthChecker(): IProviderHealthChecker;
748
728
  initialize(): Promise<void>;
package/dist/server.d.ts CHANGED
@@ -2,61 +2,39 @@ import { V as VectorDBConfig, L as LLMConfig, d as EmbeddingConfig, n as RagConf
2
2
  export { A as AuthMode, K as BarChartData, M as CarouselProduct, N as IRetriever, h as LatencyBreakdown, Q as LineChartDataPoint, S as MessageRole, X as MetricCardData, O as ObservabilityTrace, Y as PieChartData, Z as Product, i as ProjectAiSettings, j as ProjectAuthSettings, k as ProjectBrandingSettings, P as ProjectChatSettings, l as ProjectTelemetrySettings, m as ProjectWidgetSettings, o as RagMessage, p as RetrievalConfig, _ as RetrievalResult, q as RetrievedChunk, $ as RetrivoraChunkMetadata, a0 as RetrivoraIngestedDocument, a1 as ScatterPlotDataPoint, a2 as SuggestionsResponse, a3 as TableData, T as ThemeMode, r as TokenUsage, U as UseRagChatOptions, a as UseRagChatReturn, a4 as VisualizationType, W as WidgetPosition, x as WorkflowConfig, y as createDefaultProjectSettings, z as normalizeProjectSettings, B as projectSettingsToUiConfig } from './ILLMProvider-B8TAVx3j.js';
3
3
  import { l as DecisionContext, n as IntentCategory, I as IRenderRule, y as RenderDecision, m as IRendererStrategy } from './BatchProcessor-C42_RVWO.js';
4
4
  export { Q as ArchitectureCardProps, A as AuthenticationException, B as BatchOptions, e as BatchProcessor, f as BatchResult, g as ChartType, T as ChatViewportSize, C as ChatWidgetProps, a as ChatWindowProps, h as Chunk, i as ChunkOptions, c as ClientConfig, j as ConfigFetcher, b as ConfigProviderProps, k as ConfigurationException, U as DocumentChunker, D as DocumentUploadProps, E as EmbeddingFailedException, V as LicenseConfigResolver, L as LicenseTierConfig, o as LicenseValidationError, p as LicenseValidationRequest, q as LicenseValidationResponse, r as LicenseValidator, M as MessageBubbleProps, W as Pipeline, X as PipelineStep, P as ProductCardProps, d as ProductCarouselProps, s as ProviderCredentials, t as ProviderNotFoundException, Y as ProviderPill, u as RateLimitException, R as RemoteConfig, v as RemoteEmbeddingConfig, w as RemoteLLMConfig, x as RemoteVectorConfig, Z as RenderSectionDecision, z as RenderType, F as RetrievalException, G as Retrivora, H as RetrivoraError, J as RetrivoraErrorCode, K as SDKVersionUnsupportedError, N as SDK_VERSION, _ as Snippet, S as SourceCardProps, $ as wrapError } from './BatchProcessor-C42_RVWO.js';
5
- import { H as HealthCheckResult, I as IProviderValidator, a as IProviderHealthChecker } from './index-ejOWsaqb.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 createRagHandler, j as createSessionsHandler, k as createStreamHandler, l as createUploadHandler, s as sseErrorFrame, m as sseFrame, n as sseMetaFrame, o as sseTextFrame } from './index-ejOWsaqb.js';
5
+ import { H as HealthCheckResult, I as IProviderValidator, a as IProviderHealthChecker } from './index-BQd6Bax0.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 createRagHandler, j as createSessionsHandler, k as createStreamHandler, l as createUploadHandler, s as sseErrorFrame, m as sseFrame, n as sseMetaFrame, o as sseTextFrame } from './index-BQd6Bax0.js';
7
7
  import 'react';
8
8
  import 'next/server';
9
9
 
10
10
  /**
11
11
  * Decoded payload of a Retrivora license JWT.
12
- *
13
- * Retrivora licenses are signed with RS256 using a key held exclusively by
14
- * Retrivora SaaS. They carry the project binding, the expiration time, and
15
- * the customer tier, which the SDK uses to enforce per-tier feature limits
16
- * (vector DB provider whitelist).
17
12
  */
18
13
  interface LicensePayload {
19
- /** Project ID this license is bound to — used to prevent cross-tenant reuse. */
20
14
  projectId: string;
21
- /** UNIX timestamp in seconds after which the license must be considered expired. */
22
15
  expiresAt: number;
23
- /** Customer tier (hobby | pro | enterprise). */
24
16
  tier: string;
25
- /** Optional: License lifecycle status propagated by the server validator (ACTIVE/TERMINATED/etc). */
26
17
  licenseStatus?: string;
18
+ minimumSupportedVersion?: string;
19
+ forceUpgrade?: boolean;
27
20
  }
28
21
  /**
29
- * Zero-latency cryptographic license verifier.
30
- *
31
- * Responsibilities:
32
- * 1. Parse the `rtv_`-prefixed JWT (base64url header.payload.signature)
33
- * 2. Verify the RS256 signature against Retrivora's embedded PUBLIC_KEY
34
- * 3. Match the license's projectId to the currently configured projectId
35
- * 4. Enforce expiration (current UNIX seconds > expiresAt)
36
- * 5. Enforce per-tier vector DB provider whitelist in production
37
- *
38
- * Fail-open policy: In non-production environments a missing license key
39
- * produces a console-warning and a synthetic 24h "hobby" payload so that
40
- * local development continues to work without signing up. In production
41
- * any missing/invalid key throws `ConfigurationException`.
42
- *
43
- * Caching: Cryptographic verification is CPU-expensive — successful results
44
- * are cached for 60 seconds keyed by (licenseKey, projectId, provider,
45
- * publicKeyOverride). Cache hits still re-verify expiresAt.
22
+ * Validates licenses against the central Retrivora API.
23
+ * Replaces the old zero-latency local cryptographic verifier.
46
24
  */
47
25
  declare class LicenseVerifier {
48
26
  private static readonly cache;
49
27
  private static readonly CACHE_TTL_MS;
50
- private static readonly PUBLIC_KEY;
51
28
  /**
52
- * Decodes, verifies signature, and checks metadata of a license key.
29
+ * Validates the license key asynchronously by calling the Retrivora backend.
53
30
  *
54
31
  * @param licenseKey - Base64url signed JWT license key.
55
32
  * @param currentProjectId - Project namespace ID.
56
- * @param publicKeyOverride - Optional override for unit/integration tests.
33
+ * @param provider - Optional provider for tier checks.
57
34
  */
58
- static verify(licenseKey: string | undefined, currentProjectId: string, provider?: string, publicKeyOverride?: string): LicensePayload;
35
+ static verifyAsync(licenseKey: string | undefined, currentProjectId: string, provider?: string): Promise<LicensePayload>;
59
36
  static verifyIP(licenseKey: string | undefined): Promise<void>;
37
+ static extractTier(licenseKey: string | undefined): string;
60
38
  }
61
39
 
62
40
  /**
@@ -742,7 +720,9 @@ declare class Rule7LargeTableRule implements IRenderRule {
742
720
  declare class PineconeProvider extends BaseVectorProvider {
743
721
  private client;
744
722
  private apiKey;
723
+ private licenseKey?;
745
724
  constructor(config: VectorDBConfig);
725
+ private getControlPlaneUrl;
746
726
  static getValidator(): IProviderValidator;
747
727
  static getHealthChecker(): IProviderHealthChecker;
748
728
  initialize(): Promise<void>;