@digilogiclabs/platform-core 1.20.3 → 1.23.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.
Files changed (38) hide show
  1. package/dist/{ConsoleEmail-CO0OM4UT.d.ts → ConsoleEmail-CgSIvRdj.d.mts} +5 -46
  2. package/dist/{ConsoleEmail-DDB28vyS.d.mts → ConsoleEmail-iJO7Cb_v.d.ts} +5 -46
  3. package/dist/{IAI-D8wA_i8N.d.mts → IAI-B7pp322X.d.mts} +1 -170
  4. package/dist/{IAI-D8wA_i8N.d.ts → IAI-B7pp322X.d.ts} +1 -170
  5. package/dist/ICache-BWSuTuhz.d.mts +66 -0
  6. package/dist/ICache-BWSuTuhz.d.ts +66 -0
  7. package/dist/IEmail-CsOcaQcb.d.mts +45 -0
  8. package/dist/IEmail-CsOcaQcb.d.ts +45 -0
  9. package/dist/ILogger-DLDBZaH4.d.mts +105 -0
  10. package/dist/ILogger-DLDBZaH4.d.ts +105 -0
  11. package/dist/{agents-DGciJI27.d.mts → agents-C7FPA8y9.d.mts} +3 -1
  12. package/dist/{agents-Cc65YUoW.d.ts → agents-qyQ3BtXy.d.ts} +3 -1
  13. package/dist/agents.d.mts +4 -2
  14. package/dist/agents.d.ts +4 -2
  15. package/dist/auth.d.mts +386 -1
  16. package/dist/auth.d.ts +386 -1
  17. package/dist/auth.js +451 -0
  18. package/dist/auth.js.map +1 -1
  19. package/dist/auth.mjs +434 -0
  20. package/dist/auth.mjs.map +1 -1
  21. package/dist/circuit-breaker-CP6kw0P5.d.ts +351 -0
  22. package/dist/circuit-breaker-CsQivd57.d.mts +351 -0
  23. package/dist/email-templates.d.mts +106 -1
  24. package/dist/email-templates.d.ts +106 -1
  25. package/dist/email-templates.js +608 -0
  26. package/dist/email-templates.js.map +1 -1
  27. package/dist/email-templates.mjs +596 -0
  28. package/dist/email-templates.mjs.map +1 -1
  29. package/dist/index.d.mts +14 -355
  30. package/dist/index.d.ts +14 -355
  31. package/dist/index.js +10 -7
  32. package/dist/index.js.map +1 -1
  33. package/dist/index.mjs +10 -7
  34. package/dist/index.mjs.map +1 -1
  35. package/dist/migrate.js +0 -0
  36. package/dist/testing.d.mts +6 -3
  37. package/dist/testing.d.ts +6 -3
  38. package/package.json +11 -11
@@ -1,4 +1,7 @@
1
- import { I as ICache, a as ILogger, b as ITracing, c as IAI } from './IAI-D8wA_i8N.js';
1
+ import { I as ICache } from './ICache-BWSuTuhz.mjs';
2
+ import { I as IEmail, E as EmailMessage, a as EmailResult } from './IEmail-CsOcaQcb.mjs';
3
+ import { I as ILogger } from './ILogger-DLDBZaH4.mjs';
4
+ import { I as ITracing, a as IAI } from './IAI-B7pp322X.mjs';
2
5
  import { z } from 'zod';
3
6
 
4
7
  /**
@@ -106,50 +109,6 @@ interface IStorage {
106
109
  healthCheck(): Promise<boolean>;
107
110
  }
108
111
 
109
- /**
110
- * Email abstraction interface
111
- * Provides a vendor-agnostic way to send emails
112
- */
113
- interface EmailAddress {
114
- email: string;
115
- name?: string;
116
- }
117
- interface EmailAttachment {
118
- filename: string;
119
- content: Buffer | string;
120
- contentType?: string;
121
- }
122
- interface EmailMessage {
123
- to: EmailAddress | EmailAddress[];
124
- from?: EmailAddress;
125
- replyTo?: EmailAddress;
126
- subject: string;
127
- text?: string;
128
- html?: string;
129
- attachments?: EmailAttachment[];
130
- headers?: Record<string, string>;
131
- tags?: string[];
132
- }
133
- interface EmailResult {
134
- id: string;
135
- success: boolean;
136
- error?: Error;
137
- }
138
- interface IEmail {
139
- /**
140
- * Send an email
141
- */
142
- send(message: EmailMessage): Promise<EmailResult>;
143
- /**
144
- * Send multiple emails (batch)
145
- */
146
- sendBatch(messages: EmailMessage[]): Promise<EmailResult[]>;
147
- /**
148
- * Check email service connectivity
149
- */
150
- healthCheck(): Promise<boolean>;
151
- }
152
-
153
112
  /**
154
113
  * Queue abstraction interface
155
114
  * Provides a vendor-agnostic way to work with job queues
@@ -2146,4 +2105,4 @@ declare class ConsoleEmail implements IEmail {
2146
2105
  private formatAddresses;
2147
2106
  }
2148
2107
 
2149
- export { type RAGPipeline as $, type RAGConfig as A, type CreateCollectionOptions as B, ConsoleEmail as C, type DeterministicEncryptedField as D, EnvSecrets as E, type RAGCollection as F, type RAGDocument as G, type IngestionOptions as H, type IPlatform as I, type Job as J, type KeyRotationResult as K, type BulkIngestionResult as L, MemoryDatabase as M, NoopMetrics as N, type IngestionResult as O, type PlatformHealthStatus as P, type QueryResult as Q, type RepeatOptions as R, type StorageFile as S, type DocumentStatus as T, type UploadOptions as U, type RAGChunk as V, type RAGSearchQuery as W, type RAGSearchResponse as X, type RAGSearchResult as Y, type ContextAssemblyConfig as Z, type AssembledContext as _, MemoryCache as a, type QueueConfig as a$, type JobResult as a0, type JobContext as a1, type JobEvent as a2, type QueueStats as a3, type BackoffOptions as a4, type MetricTags as a5, type HistogramStats as a6, type TimingStats as a7, type Secret as a8, type SecretMetadata as a9, AIProviderSchema as aA, RAGProviderSchema as aB, DatabaseConfigSchema as aC, CacheConfigSchema as aD, StorageConfigSchema as aE, EmailConfigSchema as aF, QueueConfigSchema as aG, AIConfigSchema as aH, RAGConfigSchema as aI, CryptoConfigSchema as aJ, SecurityConfigSchema as aK, RetryConfigSchema as aL, CircuitBreakerConfigSchema as aM, TimeoutConfigSchema as aN, BulkheadConfigSchema as aO, ResilienceConfigSchema as aP, LoggingConfigSchema as aQ, MetricsConfigSchema as aR, TracingConfigSchema as aS, ObservabilityConfigSchema as aT, MiddlewareConfigSchema as aU, PlatformConfigSchema as aV, type PlatformConfig as aW, type DatabaseConfig as aX, type CacheConfig as aY, type StorageConfig as aZ, type EmailConfig as a_, type GetSecretOptions as aa, type SetSecretOptions as ab, type RotateSecretOptions as ac, type RotationResult as ad, MemoryRAG as ae, ChunkingPresets as af, type ChunkingStrategy as ag, type ChunkingConfig as ah, type SearchMode as ai, type RAGFilter as aj, type RAGPipelineStep as ak, type CryptoKeyStatus as al, type CryptoAlgorithm as am, createPlatformAsync as an, createScopedMetrics as ao, type EmailAddress as ap, type EmailAttachment as aq, calculateBackoff as ar, generateJobId as as, DatabaseProviderSchema as at, CacheProviderSchema as au, StorageProviderSchema as av, EmailProviderSchema as aw, QueueProviderSchema as ax, TracingProviderSchema as ay, LogLevelSchema as az, MemoryStorage as b, type ResilienceConfig as b0, type ObservabilityConfig as b1, type MiddlewareConfig as b2, type CryptoConfig as b3, type SecurityConfig as b4, loadConfig as b5, validateConfig as b6, safeValidateConfig as b7, getDefaultConfig as b8, MemoryEmail as c, MemoryQueue as d, type IDatabase as e, MemorySecrets as f, createPlatform as g, MemoryMetrics as h, type IQueryBuilder as i, type IStorage as j, type IEmail as k, type IQueue as l, type IMetrics as m, type ISecrets as n, type JobOptions as o, type EmailMessage as p, type MetricsSummary as q, type ICrypto as r, type EncryptOptions as s, type EncryptedField as t, type CryptoKeyMetadata as u, type EmailResult as v, type JobState as w, type JobEventType as x, type JobEventHandler as y, type IRAG as z };
2108
+ export { type JobEvent as $, type RAGDocument as A, type IngestionOptions as B, ConsoleEmail as C, type DeterministicEncryptedField as D, EnvSecrets as E, type BulkIngestionResult as F, type IngestionResult as G, type DocumentStatus as H, type IPlatform as I, type Job as J, type KeyRotationResult as K, type RAGChunk as L, MemoryDatabase as M, NoopMetrics as N, type RAGSearchQuery as O, type PlatformHealthStatus as P, type QueryResult as Q, type RepeatOptions as R, type StorageFile as S, type RAGSearchResponse as T, type UploadOptions as U, type RAGSearchResult as V, type ContextAssemblyConfig as W, type AssembledContext as X, type RAGPipeline as Y, type JobResult as Z, type JobContext as _, MemoryCache as a, type SecurityConfig as a$, type QueueStats as a0, type BackoffOptions as a1, type MetricTags as a2, type HistogramStats as a3, type TimingStats as a4, type Secret as a5, type SecretMetadata as a6, type GetSecretOptions as a7, type SetSecretOptions as a8, type RotateSecretOptions as a9, EmailConfigSchema as aA, QueueConfigSchema as aB, AIConfigSchema as aC, RAGConfigSchema as aD, CryptoConfigSchema as aE, SecurityConfigSchema as aF, RetryConfigSchema as aG, CircuitBreakerConfigSchema as aH, TimeoutConfigSchema as aI, BulkheadConfigSchema as aJ, ResilienceConfigSchema as aK, LoggingConfigSchema as aL, MetricsConfigSchema as aM, TracingConfigSchema as aN, ObservabilityConfigSchema as aO, MiddlewareConfigSchema as aP, PlatformConfigSchema as aQ, type PlatformConfig as aR, type DatabaseConfig as aS, type CacheConfig as aT, type StorageConfig as aU, type EmailConfig as aV, type QueueConfig as aW, type ResilienceConfig as aX, type ObservabilityConfig as aY, type MiddlewareConfig as aZ, type CryptoConfig as a_, type RotationResult as aa, MemoryRAG as ab, ChunkingPresets as ac, type ChunkingStrategy as ad, type ChunkingConfig as ae, type SearchMode as af, type RAGFilter as ag, type RAGPipelineStep as ah, type CryptoKeyStatus as ai, type CryptoAlgorithm as aj, createPlatformAsync as ak, createScopedMetrics as al, calculateBackoff as am, generateJobId as an, DatabaseProviderSchema as ao, CacheProviderSchema as ap, StorageProviderSchema as aq, EmailProviderSchema as ar, QueueProviderSchema as as, TracingProviderSchema as at, LogLevelSchema as au, AIProviderSchema as av, RAGProviderSchema as aw, DatabaseConfigSchema as ax, CacheConfigSchema as ay, StorageConfigSchema as az, MemoryStorage as b, loadConfig as b0, validateConfig as b1, safeValidateConfig as b2, getDefaultConfig as b3, MemoryEmail as c, MemoryQueue as d, type IDatabase as e, MemorySecrets as f, createPlatform as g, MemoryMetrics as h, type IQueryBuilder as i, type IStorage as j, type IQueue as k, type IMetrics as l, type ISecrets as m, type JobOptions as n, type MetricsSummary as o, type ICrypto as p, type EncryptOptions as q, type EncryptedField as r, type CryptoKeyMetadata as s, type JobState as t, type JobEventType as u, type JobEventHandler as v, type IRAG as w, type RAGConfig as x, type CreateCollectionOptions as y, type RAGCollection as z };
@@ -1,4 +1,7 @@
1
- import { I as ICache, a as ILogger, b as ITracing, c as IAI } from './IAI-D8wA_i8N.mjs';
1
+ import { I as ICache } from './ICache-BWSuTuhz.js';
2
+ import { I as IEmail, E as EmailMessage, a as EmailResult } from './IEmail-CsOcaQcb.js';
3
+ import { I as ILogger } from './ILogger-DLDBZaH4.js';
4
+ import { I as ITracing, a as IAI } from './IAI-B7pp322X.js';
2
5
  import { z } from 'zod';
3
6
 
4
7
  /**
@@ -106,50 +109,6 @@ interface IStorage {
106
109
  healthCheck(): Promise<boolean>;
107
110
  }
108
111
 
109
- /**
110
- * Email abstraction interface
111
- * Provides a vendor-agnostic way to send emails
112
- */
113
- interface EmailAddress {
114
- email: string;
115
- name?: string;
116
- }
117
- interface EmailAttachment {
118
- filename: string;
119
- content: Buffer | string;
120
- contentType?: string;
121
- }
122
- interface EmailMessage {
123
- to: EmailAddress | EmailAddress[];
124
- from?: EmailAddress;
125
- replyTo?: EmailAddress;
126
- subject: string;
127
- text?: string;
128
- html?: string;
129
- attachments?: EmailAttachment[];
130
- headers?: Record<string, string>;
131
- tags?: string[];
132
- }
133
- interface EmailResult {
134
- id: string;
135
- success: boolean;
136
- error?: Error;
137
- }
138
- interface IEmail {
139
- /**
140
- * Send an email
141
- */
142
- send(message: EmailMessage): Promise<EmailResult>;
143
- /**
144
- * Send multiple emails (batch)
145
- */
146
- sendBatch(messages: EmailMessage[]): Promise<EmailResult[]>;
147
- /**
148
- * Check email service connectivity
149
- */
150
- healthCheck(): Promise<boolean>;
151
- }
152
-
153
112
  /**
154
113
  * Queue abstraction interface
155
114
  * Provides a vendor-agnostic way to work with job queues
@@ -2146,4 +2105,4 @@ declare class ConsoleEmail implements IEmail {
2146
2105
  private formatAddresses;
2147
2106
  }
2148
2107
 
2149
- export { type RAGPipeline as $, type RAGConfig as A, type CreateCollectionOptions as B, ConsoleEmail as C, type DeterministicEncryptedField as D, EnvSecrets as E, type RAGCollection as F, type RAGDocument as G, type IngestionOptions as H, type IPlatform as I, type Job as J, type KeyRotationResult as K, type BulkIngestionResult as L, MemoryDatabase as M, NoopMetrics as N, type IngestionResult as O, type PlatformHealthStatus as P, type QueryResult as Q, type RepeatOptions as R, type StorageFile as S, type DocumentStatus as T, type UploadOptions as U, type RAGChunk as V, type RAGSearchQuery as W, type RAGSearchResponse as X, type RAGSearchResult as Y, type ContextAssemblyConfig as Z, type AssembledContext as _, MemoryCache as a, type QueueConfig as a$, type JobResult as a0, type JobContext as a1, type JobEvent as a2, type QueueStats as a3, type BackoffOptions as a4, type MetricTags as a5, type HistogramStats as a6, type TimingStats as a7, type Secret as a8, type SecretMetadata as a9, AIProviderSchema as aA, RAGProviderSchema as aB, DatabaseConfigSchema as aC, CacheConfigSchema as aD, StorageConfigSchema as aE, EmailConfigSchema as aF, QueueConfigSchema as aG, AIConfigSchema as aH, RAGConfigSchema as aI, CryptoConfigSchema as aJ, SecurityConfigSchema as aK, RetryConfigSchema as aL, CircuitBreakerConfigSchema as aM, TimeoutConfigSchema as aN, BulkheadConfigSchema as aO, ResilienceConfigSchema as aP, LoggingConfigSchema as aQ, MetricsConfigSchema as aR, TracingConfigSchema as aS, ObservabilityConfigSchema as aT, MiddlewareConfigSchema as aU, PlatformConfigSchema as aV, type PlatformConfig as aW, type DatabaseConfig as aX, type CacheConfig as aY, type StorageConfig as aZ, type EmailConfig as a_, type GetSecretOptions as aa, type SetSecretOptions as ab, type RotateSecretOptions as ac, type RotationResult as ad, MemoryRAG as ae, ChunkingPresets as af, type ChunkingStrategy as ag, type ChunkingConfig as ah, type SearchMode as ai, type RAGFilter as aj, type RAGPipelineStep as ak, type CryptoKeyStatus as al, type CryptoAlgorithm as am, createPlatformAsync as an, createScopedMetrics as ao, type EmailAddress as ap, type EmailAttachment as aq, calculateBackoff as ar, generateJobId as as, DatabaseProviderSchema as at, CacheProviderSchema as au, StorageProviderSchema as av, EmailProviderSchema as aw, QueueProviderSchema as ax, TracingProviderSchema as ay, LogLevelSchema as az, MemoryStorage as b, type ResilienceConfig as b0, type ObservabilityConfig as b1, type MiddlewareConfig as b2, type CryptoConfig as b3, type SecurityConfig as b4, loadConfig as b5, validateConfig as b6, safeValidateConfig as b7, getDefaultConfig as b8, MemoryEmail as c, MemoryQueue as d, type IDatabase as e, MemorySecrets as f, createPlatform as g, MemoryMetrics as h, type IQueryBuilder as i, type IStorage as j, type IEmail as k, type IQueue as l, type IMetrics as m, type ISecrets as n, type JobOptions as o, type EmailMessage as p, type MetricsSummary as q, type ICrypto as r, type EncryptOptions as s, type EncryptedField as t, type CryptoKeyMetadata as u, type EmailResult as v, type JobState as w, type JobEventType as x, type JobEventHandler as y, type IRAG as z };
2108
+ export { type JobEvent as $, type RAGDocument as A, type IngestionOptions as B, ConsoleEmail as C, type DeterministicEncryptedField as D, EnvSecrets as E, type BulkIngestionResult as F, type IngestionResult as G, type DocumentStatus as H, type IPlatform as I, type Job as J, type KeyRotationResult as K, type RAGChunk as L, MemoryDatabase as M, NoopMetrics as N, type RAGSearchQuery as O, type PlatformHealthStatus as P, type QueryResult as Q, type RepeatOptions as R, type StorageFile as S, type RAGSearchResponse as T, type UploadOptions as U, type RAGSearchResult as V, type ContextAssemblyConfig as W, type AssembledContext as X, type RAGPipeline as Y, type JobResult as Z, type JobContext as _, MemoryCache as a, type SecurityConfig as a$, type QueueStats as a0, type BackoffOptions as a1, type MetricTags as a2, type HistogramStats as a3, type TimingStats as a4, type Secret as a5, type SecretMetadata as a6, type GetSecretOptions as a7, type SetSecretOptions as a8, type RotateSecretOptions as a9, EmailConfigSchema as aA, QueueConfigSchema as aB, AIConfigSchema as aC, RAGConfigSchema as aD, CryptoConfigSchema as aE, SecurityConfigSchema as aF, RetryConfigSchema as aG, CircuitBreakerConfigSchema as aH, TimeoutConfigSchema as aI, BulkheadConfigSchema as aJ, ResilienceConfigSchema as aK, LoggingConfigSchema as aL, MetricsConfigSchema as aM, TracingConfigSchema as aN, ObservabilityConfigSchema as aO, MiddlewareConfigSchema as aP, PlatformConfigSchema as aQ, type PlatformConfig as aR, type DatabaseConfig as aS, type CacheConfig as aT, type StorageConfig as aU, type EmailConfig as aV, type QueueConfig as aW, type ResilienceConfig as aX, type ObservabilityConfig as aY, type MiddlewareConfig as aZ, type CryptoConfig as a_, type RotationResult as aa, MemoryRAG as ab, ChunkingPresets as ac, type ChunkingStrategy as ad, type ChunkingConfig as ae, type SearchMode as af, type RAGFilter as ag, type RAGPipelineStep as ah, type CryptoKeyStatus as ai, type CryptoAlgorithm as aj, createPlatformAsync as ak, createScopedMetrics as al, calculateBackoff as am, generateJobId as an, DatabaseProviderSchema as ao, CacheProviderSchema as ap, StorageProviderSchema as aq, EmailProviderSchema as ar, QueueProviderSchema as as, TracingProviderSchema as at, LogLevelSchema as au, AIProviderSchema as av, RAGProviderSchema as aw, DatabaseConfigSchema as ax, CacheConfigSchema as ay, StorageConfigSchema as az, MemoryStorage as b, loadConfig as b0, validateConfig as b1, safeValidateConfig as b2, getDefaultConfig as b3, MemoryEmail as c, MemoryQueue as d, type IDatabase as e, MemorySecrets as f, createPlatform as g, MemoryMetrics as h, type IQueryBuilder as i, type IStorage as j, type IQueue as k, type IMetrics as l, type ISecrets as m, type JobOptions as n, type MetricsSummary as o, type ICrypto as p, type EncryptOptions as q, type EncryptedField as r, type CryptoKeyMetadata as s, type JobState as t, type JobEventType as u, type JobEventHandler as v, type IRAG as w, type RAGConfig as x, type CreateCollectionOptions as y, type RAGCollection as z };
@@ -1,172 +1,3 @@
1
- /**
2
- * Cache abstraction interface
3
- * Provides a vendor-agnostic way to interact with key-value caches
4
- */
5
- interface ICacheOptions {
6
- /** Time to live in seconds */
7
- ttl?: number;
8
- /** Cache key prefix */
9
- prefix?: string;
10
- }
11
- interface ICache {
12
- /**
13
- * Get a value from cache
14
- */
15
- get<T = unknown>(key: string): Promise<T | null>;
16
- /**
17
- * Set a value in cache
18
- */
19
- set<T = unknown>(key: string, value: T, ttl?: number): Promise<void>;
20
- /**
21
- * Delete a value from cache
22
- */
23
- delete(key: string): Promise<void>;
24
- /**
25
- * Check if key exists
26
- */
27
- exists(key: string): Promise<boolean>;
28
- /**
29
- * Delete all keys matching pattern
30
- */
31
- deletePattern(pattern: string): Promise<number>;
32
- /**
33
- * Get multiple values
34
- */
35
- mget<T = unknown>(keys: string[]): Promise<(T | null)[]>;
36
- /**
37
- * Set multiple values
38
- */
39
- mset<T = unknown>(entries: Array<{
40
- key: string;
41
- value: T;
42
- ttl?: number;
43
- }>): Promise<void>;
44
- /**
45
- * Increment a numeric value
46
- */
47
- incr(key: string, by?: number): Promise<number>;
48
- /**
49
- * Publish a message to a channel
50
- */
51
- publish(channel: string, message: string): Promise<void>;
52
- /**
53
- * Subscribe to a channel
54
- */
55
- subscribe(channel: string, callback: (message: string) => void): Promise<() => void>;
56
- /**
57
- * Check cache connectivity
58
- */
59
- healthCheck(): Promise<boolean>;
60
- /**
61
- * Close cache connection
62
- */
63
- close(): Promise<void>;
64
- }
65
-
66
- /**
67
- * Logger Interface
68
- * Standardizes logging across the platform
69
- */
70
- /**
71
- * Log levels in order of severity
72
- */
73
- type LogLevel = "debug" | "info" | "warn" | "error";
74
- /**
75
- * Metadata that can be attached to log entries
76
- */
77
- interface LogMeta {
78
- /** Error object if logging an error */
79
- error?: Error;
80
- /** Duration in milliseconds (for timing operations) */
81
- duration?: number;
82
- /** Request ID for tracing */
83
- requestId?: string;
84
- /** User ID if applicable */
85
- userId?: string;
86
- /** Any additional key-value pairs */
87
- [key: string]: unknown;
88
- }
89
- /**
90
- * A structured log entry
91
- */
92
- interface LogEntry {
93
- /** Log level */
94
- level: LogLevel;
95
- /** Log message */
96
- message: string;
97
- /** When the log was created */
98
- timestamp: Date;
99
- /** Optional metadata */
100
- meta?: LogMeta;
101
- /** Logger context (e.g., service name) */
102
- context?: Record<string, unknown>;
103
- }
104
- /**
105
- * Logger interface for structured logging
106
- */
107
- interface ILogger {
108
- /**
109
- * Log a debug message (for development/troubleshooting)
110
- */
111
- debug(message: string, meta?: LogMeta): void;
112
- /**
113
- * Log an informational message
114
- */
115
- info(message: string, meta?: LogMeta): void;
116
- /**
117
- * Log a warning message
118
- */
119
- warn(message: string, meta?: LogMeta): void;
120
- /**
121
- * Log an error message
122
- */
123
- error(message: string, meta?: LogMeta): void;
124
- /**
125
- * Create a child logger with additional context
126
- * @param context Additional context to include in all logs from this child
127
- */
128
- child(context: Record<string, unknown>): ILogger;
129
- }
130
- /**
131
- * Configuration options for loggers
132
- */
133
- interface LoggerConfig {
134
- /** Minimum level to log */
135
- level?: LogLevel;
136
- /** Whether to pretty print (for development) */
137
- pretty?: boolean;
138
- /** Service name to include in logs */
139
- service?: string;
140
- /** Environment name */
141
- environment?: string;
142
- }
143
- /**
144
- * Console logger implementation (for development)
145
- */
146
- declare class ConsoleLogger implements ILogger {
147
- private context;
148
- private level;
149
- private static levelPriority;
150
- constructor(config?: LoggerConfig);
151
- private shouldLog;
152
- private log;
153
- debug(message: string, meta?: LogMeta): void;
154
- info(message: string, meta?: LogMeta): void;
155
- warn(message: string, meta?: LogMeta): void;
156
- error(message: string, meta?: LogMeta): void;
157
- child(context: Record<string, unknown>): ILogger;
158
- }
159
- /**
160
- * No-op logger for testing or when logging is disabled
161
- */
162
- declare class NoopLogger implements ILogger {
163
- debug(): void;
164
- info(): void;
165
- warn(): void;
166
- error(): void;
167
- child(): ILogger;
168
- }
169
-
170
1
  /**
171
2
  * Distributed Tracing Interface
172
3
  *
@@ -715,4 +546,4 @@ declare class MemoryAI implements IAI {
715
546
  private cosineSimilarity;
716
547
  }
717
548
 
718
- export { type AIConfig as A, type AIFinishReason as B, ConsoleLogger as C, type AIUsageInfo as D, type AIRouterConfig as E, type AIErrorCode as F, type AIError as G, MemoryTracing as H, type ICache as I, NoopTracing as J, type ISpan as K, type LogLevel as L, MemoryAI as M, NoopLogger as N, type SpanOptions as O, type SpanStatus as P, type SpanKind as Q, type RoutingStrategy as R, type SpanContext as S, type TracingConfig as T, type SpanStatusCode as U, type SpanEvent as V, type ILogger as a, type ITracing as b, type IAI as c, type AIChatRequest as d, type AIChatResponse as e, type AIStreamChunk as f, type AIStreamCallback as g, type AICompletionRequest as h, type AICompletionResponse as i, type AIEmbeddingRequest as j, type AIEmbeddingResponse as k, type AIModelConfig as l, type AIModelType as m, type AIProvider as n, type ICacheOptions as o, type LogMeta as p, type LogEntry as q, type LoggerConfig as r, createAIError as s, isAIError as t, AIErrorMessages as u, type AIRole as v, type AIMessage as w, type AIToolCall as x, type AITool as y, type AIChatChoice as z };
549
+ export { type AIConfig as A, type ISpan as B, type SpanOptions as C, type SpanStatus as D, type SpanKind as E, type SpanStatusCode as F, type SpanEvent as G, type ITracing as I, MemoryAI as M, NoopTracing as N, type RoutingStrategy as R, type SpanContext as S, type TracingConfig as T, type IAI as a, type AIChatRequest as b, type AIChatResponse as c, type AIStreamChunk as d, type AIStreamCallback as e, type AICompletionRequest as f, type AICompletionResponse as g, type AIEmbeddingRequest as h, type AIEmbeddingResponse as i, type AIModelConfig as j, type AIModelType as k, type AIProvider as l, createAIError as m, isAIError as n, AIErrorMessages as o, type AIRole as p, type AIMessage as q, type AIToolCall as r, type AITool as s, type AIChatChoice as t, type AIFinishReason as u, type AIUsageInfo as v, type AIRouterConfig as w, type AIErrorCode as x, type AIError as y, MemoryTracing as z };
@@ -1,172 +1,3 @@
1
- /**
2
- * Cache abstraction interface
3
- * Provides a vendor-agnostic way to interact with key-value caches
4
- */
5
- interface ICacheOptions {
6
- /** Time to live in seconds */
7
- ttl?: number;
8
- /** Cache key prefix */
9
- prefix?: string;
10
- }
11
- interface ICache {
12
- /**
13
- * Get a value from cache
14
- */
15
- get<T = unknown>(key: string): Promise<T | null>;
16
- /**
17
- * Set a value in cache
18
- */
19
- set<T = unknown>(key: string, value: T, ttl?: number): Promise<void>;
20
- /**
21
- * Delete a value from cache
22
- */
23
- delete(key: string): Promise<void>;
24
- /**
25
- * Check if key exists
26
- */
27
- exists(key: string): Promise<boolean>;
28
- /**
29
- * Delete all keys matching pattern
30
- */
31
- deletePattern(pattern: string): Promise<number>;
32
- /**
33
- * Get multiple values
34
- */
35
- mget<T = unknown>(keys: string[]): Promise<(T | null)[]>;
36
- /**
37
- * Set multiple values
38
- */
39
- mset<T = unknown>(entries: Array<{
40
- key: string;
41
- value: T;
42
- ttl?: number;
43
- }>): Promise<void>;
44
- /**
45
- * Increment a numeric value
46
- */
47
- incr(key: string, by?: number): Promise<number>;
48
- /**
49
- * Publish a message to a channel
50
- */
51
- publish(channel: string, message: string): Promise<void>;
52
- /**
53
- * Subscribe to a channel
54
- */
55
- subscribe(channel: string, callback: (message: string) => void): Promise<() => void>;
56
- /**
57
- * Check cache connectivity
58
- */
59
- healthCheck(): Promise<boolean>;
60
- /**
61
- * Close cache connection
62
- */
63
- close(): Promise<void>;
64
- }
65
-
66
- /**
67
- * Logger Interface
68
- * Standardizes logging across the platform
69
- */
70
- /**
71
- * Log levels in order of severity
72
- */
73
- type LogLevel = "debug" | "info" | "warn" | "error";
74
- /**
75
- * Metadata that can be attached to log entries
76
- */
77
- interface LogMeta {
78
- /** Error object if logging an error */
79
- error?: Error;
80
- /** Duration in milliseconds (for timing operations) */
81
- duration?: number;
82
- /** Request ID for tracing */
83
- requestId?: string;
84
- /** User ID if applicable */
85
- userId?: string;
86
- /** Any additional key-value pairs */
87
- [key: string]: unknown;
88
- }
89
- /**
90
- * A structured log entry
91
- */
92
- interface LogEntry {
93
- /** Log level */
94
- level: LogLevel;
95
- /** Log message */
96
- message: string;
97
- /** When the log was created */
98
- timestamp: Date;
99
- /** Optional metadata */
100
- meta?: LogMeta;
101
- /** Logger context (e.g., service name) */
102
- context?: Record<string, unknown>;
103
- }
104
- /**
105
- * Logger interface for structured logging
106
- */
107
- interface ILogger {
108
- /**
109
- * Log a debug message (for development/troubleshooting)
110
- */
111
- debug(message: string, meta?: LogMeta): void;
112
- /**
113
- * Log an informational message
114
- */
115
- info(message: string, meta?: LogMeta): void;
116
- /**
117
- * Log a warning message
118
- */
119
- warn(message: string, meta?: LogMeta): void;
120
- /**
121
- * Log an error message
122
- */
123
- error(message: string, meta?: LogMeta): void;
124
- /**
125
- * Create a child logger with additional context
126
- * @param context Additional context to include in all logs from this child
127
- */
128
- child(context: Record<string, unknown>): ILogger;
129
- }
130
- /**
131
- * Configuration options for loggers
132
- */
133
- interface LoggerConfig {
134
- /** Minimum level to log */
135
- level?: LogLevel;
136
- /** Whether to pretty print (for development) */
137
- pretty?: boolean;
138
- /** Service name to include in logs */
139
- service?: string;
140
- /** Environment name */
141
- environment?: string;
142
- }
143
- /**
144
- * Console logger implementation (for development)
145
- */
146
- declare class ConsoleLogger implements ILogger {
147
- private context;
148
- private level;
149
- private static levelPriority;
150
- constructor(config?: LoggerConfig);
151
- private shouldLog;
152
- private log;
153
- debug(message: string, meta?: LogMeta): void;
154
- info(message: string, meta?: LogMeta): void;
155
- warn(message: string, meta?: LogMeta): void;
156
- error(message: string, meta?: LogMeta): void;
157
- child(context: Record<string, unknown>): ILogger;
158
- }
159
- /**
160
- * No-op logger for testing or when logging is disabled
161
- */
162
- declare class NoopLogger implements ILogger {
163
- debug(): void;
164
- info(): void;
165
- warn(): void;
166
- error(): void;
167
- child(): ILogger;
168
- }
169
-
170
1
  /**
171
2
  * Distributed Tracing Interface
172
3
  *
@@ -715,4 +546,4 @@ declare class MemoryAI implements IAI {
715
546
  private cosineSimilarity;
716
547
  }
717
548
 
718
- export { type AIConfig as A, type AIFinishReason as B, ConsoleLogger as C, type AIUsageInfo as D, type AIRouterConfig as E, type AIErrorCode as F, type AIError as G, MemoryTracing as H, type ICache as I, NoopTracing as J, type ISpan as K, type LogLevel as L, MemoryAI as M, NoopLogger as N, type SpanOptions as O, type SpanStatus as P, type SpanKind as Q, type RoutingStrategy as R, type SpanContext as S, type TracingConfig as T, type SpanStatusCode as U, type SpanEvent as V, type ILogger as a, type ITracing as b, type IAI as c, type AIChatRequest as d, type AIChatResponse as e, type AIStreamChunk as f, type AIStreamCallback as g, type AICompletionRequest as h, type AICompletionResponse as i, type AIEmbeddingRequest as j, type AIEmbeddingResponse as k, type AIModelConfig as l, type AIModelType as m, type AIProvider as n, type ICacheOptions as o, type LogMeta as p, type LogEntry as q, type LoggerConfig as r, createAIError as s, isAIError as t, AIErrorMessages as u, type AIRole as v, type AIMessage as w, type AIToolCall as x, type AITool as y, type AIChatChoice as z };
549
+ export { type AIConfig as A, type ISpan as B, type SpanOptions as C, type SpanStatus as D, type SpanKind as E, type SpanStatusCode as F, type SpanEvent as G, type ITracing as I, MemoryAI as M, NoopTracing as N, type RoutingStrategy as R, type SpanContext as S, type TracingConfig as T, type IAI as a, type AIChatRequest as b, type AIChatResponse as c, type AIStreamChunk as d, type AIStreamCallback as e, type AICompletionRequest as f, type AICompletionResponse as g, type AIEmbeddingRequest as h, type AIEmbeddingResponse as i, type AIModelConfig as j, type AIModelType as k, type AIProvider as l, createAIError as m, isAIError as n, AIErrorMessages as o, type AIRole as p, type AIMessage as q, type AIToolCall as r, type AITool as s, type AIChatChoice as t, type AIFinishReason as u, type AIUsageInfo as v, type AIRouterConfig as w, type AIErrorCode as x, type AIError as y, MemoryTracing as z };
@@ -0,0 +1,66 @@
1
+ /**
2
+ * Cache abstraction interface
3
+ * Provides a vendor-agnostic way to interact with key-value caches
4
+ */
5
+ interface ICacheOptions {
6
+ /** Time to live in seconds */
7
+ ttl?: number;
8
+ /** Cache key prefix */
9
+ prefix?: string;
10
+ }
11
+ interface ICache {
12
+ /**
13
+ * Get a value from cache
14
+ */
15
+ get<T = unknown>(key: string): Promise<T | null>;
16
+ /**
17
+ * Set a value in cache
18
+ */
19
+ set<T = unknown>(key: string, value: T, ttl?: number): Promise<void>;
20
+ /**
21
+ * Delete a value from cache
22
+ */
23
+ delete(key: string): Promise<void>;
24
+ /**
25
+ * Check if key exists
26
+ */
27
+ exists(key: string): Promise<boolean>;
28
+ /**
29
+ * Delete all keys matching pattern
30
+ */
31
+ deletePattern(pattern: string): Promise<number>;
32
+ /**
33
+ * Get multiple values
34
+ */
35
+ mget<T = unknown>(keys: string[]): Promise<(T | null)[]>;
36
+ /**
37
+ * Set multiple values
38
+ */
39
+ mset<T = unknown>(entries: Array<{
40
+ key: string;
41
+ value: T;
42
+ ttl?: number;
43
+ }>): Promise<void>;
44
+ /**
45
+ * Increment a numeric value
46
+ */
47
+ incr(key: string, by?: number): Promise<number>;
48
+ /**
49
+ * Publish a message to a channel
50
+ */
51
+ publish(channel: string, message: string): Promise<void>;
52
+ /**
53
+ * Subscribe to a channel
54
+ */
55
+ subscribe(channel: string, callback: (message: string) => void): Promise<() => void>;
56
+ /**
57
+ * Check cache connectivity
58
+ */
59
+ healthCheck(): Promise<boolean>;
60
+ /**
61
+ * Close cache connection
62
+ */
63
+ close(): Promise<void>;
64
+ }
65
+
66
+ export type { ICache as I, ICacheOptions as a };
@@ -0,0 +1,66 @@
1
+ /**
2
+ * Cache abstraction interface
3
+ * Provides a vendor-agnostic way to interact with key-value caches
4
+ */
5
+ interface ICacheOptions {
6
+ /** Time to live in seconds */
7
+ ttl?: number;
8
+ /** Cache key prefix */
9
+ prefix?: string;
10
+ }
11
+ interface ICache {
12
+ /**
13
+ * Get a value from cache
14
+ */
15
+ get<T = unknown>(key: string): Promise<T | null>;
16
+ /**
17
+ * Set a value in cache
18
+ */
19
+ set<T = unknown>(key: string, value: T, ttl?: number): Promise<void>;
20
+ /**
21
+ * Delete a value from cache
22
+ */
23
+ delete(key: string): Promise<void>;
24
+ /**
25
+ * Check if key exists
26
+ */
27
+ exists(key: string): Promise<boolean>;
28
+ /**
29
+ * Delete all keys matching pattern
30
+ */
31
+ deletePattern(pattern: string): Promise<number>;
32
+ /**
33
+ * Get multiple values
34
+ */
35
+ mget<T = unknown>(keys: string[]): Promise<(T | null)[]>;
36
+ /**
37
+ * Set multiple values
38
+ */
39
+ mset<T = unknown>(entries: Array<{
40
+ key: string;
41
+ value: T;
42
+ ttl?: number;
43
+ }>): Promise<void>;
44
+ /**
45
+ * Increment a numeric value
46
+ */
47
+ incr(key: string, by?: number): Promise<number>;
48
+ /**
49
+ * Publish a message to a channel
50
+ */
51
+ publish(channel: string, message: string): Promise<void>;
52
+ /**
53
+ * Subscribe to a channel
54
+ */
55
+ subscribe(channel: string, callback: (message: string) => void): Promise<() => void>;
56
+ /**
57
+ * Check cache connectivity
58
+ */
59
+ healthCheck(): Promise<boolean>;
60
+ /**
61
+ * Close cache connection
62
+ */
63
+ close(): Promise<void>;
64
+ }
65
+
66
+ export type { ICache as I, ICacheOptions as a };