@digilogiclabs/platform-core 1.20.3 → 1.21.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 (36) hide show
  1. package/dist/{ConsoleEmail-CO0OM4UT.d.ts → ConsoleEmail-BbdpINKx.d.ts} +4 -46
  2. package/dist/{ConsoleEmail-DDB28vyS.d.mts → ConsoleEmail-DpxhsG9C.d.mts} +4 -46
  3. package/dist/{IAI-D8wA_i8N.d.mts → IAI-CWd11dzL.d.mts} +1 -105
  4. package/dist/{IAI-D8wA_i8N.d.ts → IAI-CWd11dzL.d.ts} +1 -105
  5. package/dist/IEmail-CsOcaQcb.d.mts +45 -0
  6. package/dist/IEmail-CsOcaQcb.d.ts +45 -0
  7. package/dist/ILogger-DLDBZaH4.d.mts +105 -0
  8. package/dist/ILogger-DLDBZaH4.d.ts +105 -0
  9. package/dist/{agents-Cc65YUoW.d.ts → agents-C42rGwRl.d.ts} +2 -1
  10. package/dist/{agents-DGciJI27.d.mts → agents-CES-Aq1K.d.mts} +2 -1
  11. package/dist/agents.d.mts +3 -2
  12. package/dist/agents.d.ts +3 -2
  13. package/dist/auth.d.mts +238 -1
  14. package/dist/auth.d.ts +238 -1
  15. package/dist/auth.js +198 -0
  16. package/dist/auth.js.map +1 -1
  17. package/dist/auth.mjs +183 -0
  18. package/dist/auth.mjs.map +1 -1
  19. package/dist/circuit-breaker-CP6kw0P5.d.ts +351 -0
  20. package/dist/circuit-breaker-CsQivd57.d.mts +351 -0
  21. package/dist/email-templates.d.mts +106 -1
  22. package/dist/email-templates.d.ts +106 -1
  23. package/dist/email-templates.js +608 -0
  24. package/dist/email-templates.js.map +1 -1
  25. package/dist/email-templates.mjs +596 -0
  26. package/dist/email-templates.mjs.map +1 -1
  27. package/dist/index.d.mts +12 -355
  28. package/dist/index.d.ts +12 -355
  29. package/dist/index.js +10 -7
  30. package/dist/index.js.map +1 -1
  31. package/dist/index.mjs +10 -7
  32. package/dist/index.mjs.map +1 -1
  33. package/dist/migrate.js +0 -0
  34. package/dist/testing.d.mts +5 -3
  35. package/dist/testing.d.ts +5 -3
  36. package/package.json +11 -11
@@ -1,4 +1,6 @@
1
- import { I as ICache, a as ILogger, b as ITracing, c as IAI } from './IAI-D8wA_i8N.js';
1
+ import { I as ICache, a as ITracing, b as IAI } from './IAI-CWd11dzL.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';
2
4
  import { z } from 'zod';
3
5
 
4
6
  /**
@@ -106,50 +108,6 @@ interface IStorage {
106
108
  healthCheck(): Promise<boolean>;
107
109
  }
108
110
 
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
111
  /**
154
112
  * Queue abstraction interface
155
113
  * Provides a vendor-agnostic way to work with job queues
@@ -2146,4 +2104,4 @@ declare class ConsoleEmail implements IEmail {
2146
2104
  private formatAddresses;
2147
2105
  }
2148
2106
 
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 };
2107
+ 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,6 @@
1
- import { I as ICache, a as ILogger, b as ITracing, c as IAI } from './IAI-D8wA_i8N.mjs';
1
+ import { I as ICache, a as ITracing, b as IAI } from './IAI-CWd11dzL.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';
2
4
  import { z } from 'zod';
3
5
 
4
6
  /**
@@ -106,50 +108,6 @@ interface IStorage {
106
108
  healthCheck(): Promise<boolean>;
107
109
  }
108
110
 
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
111
  /**
154
112
  * Queue abstraction interface
155
113
  * Provides a vendor-agnostic way to work with job queues
@@ -2146,4 +2104,4 @@ declare class ConsoleEmail implements IEmail {
2146
2104
  private formatAddresses;
2147
2105
  }
2148
2106
 
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 };
2107
+ 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 };
@@ -63,110 +63,6 @@ interface ICache {
63
63
  close(): Promise<void>;
64
64
  }
65
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
66
  /**
171
67
  * Distributed Tracing Interface
172
68
  *
@@ -715,4 +611,4 @@ declare class MemoryAI implements IAI {
715
611
  private cosineSimilarity;
716
612
  }
717
613
 
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 };
614
+ export { type AIConfig as A, type AIError as B, MemoryTracing as C, type ISpan as D, type SpanOptions as E, type SpanStatus as F, type SpanKind as G, type SpanStatusCode as H, type ICache as I, type SpanEvent as J, MemoryAI as M, NoopTracing as N, type RoutingStrategy as R, type SpanContext as S, type TracingConfig as T, type ITracing as a, type IAI as b, type AIChatRequest as c, type AIChatResponse as d, type AIStreamChunk as e, type AIStreamCallback as f, type AICompletionRequest as g, type AICompletionResponse as h, type AIEmbeddingRequest as i, type AIEmbeddingResponse as j, type AIModelConfig as k, type AIModelType as l, type AIProvider as m, type ICacheOptions as n, createAIError as o, isAIError as p, AIErrorMessages as q, type AIRole as r, type AIMessage as s, type AIToolCall as t, type AITool as u, type AIChatChoice as v, type AIFinishReason as w, type AIUsageInfo as x, type AIRouterConfig as y, type AIErrorCode as z };
@@ -63,110 +63,6 @@ interface ICache {
63
63
  close(): Promise<void>;
64
64
  }
65
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
66
  /**
171
67
  * Distributed Tracing Interface
172
68
  *
@@ -715,4 +611,4 @@ declare class MemoryAI implements IAI {
715
611
  private cosineSimilarity;
716
612
  }
717
613
 
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 };
614
+ export { type AIConfig as A, type AIError as B, MemoryTracing as C, type ISpan as D, type SpanOptions as E, type SpanStatus as F, type SpanKind as G, type SpanStatusCode as H, type ICache as I, type SpanEvent as J, MemoryAI as M, NoopTracing as N, type RoutingStrategy as R, type SpanContext as S, type TracingConfig as T, type ITracing as a, type IAI as b, type AIChatRequest as c, type AIChatResponse as d, type AIStreamChunk as e, type AIStreamCallback as f, type AICompletionRequest as g, type AICompletionResponse as h, type AIEmbeddingRequest as i, type AIEmbeddingResponse as j, type AIModelConfig as k, type AIModelType as l, type AIProvider as m, type ICacheOptions as n, createAIError as o, isAIError as p, AIErrorMessages as q, type AIRole as r, type AIMessage as s, type AIToolCall as t, type AITool as u, type AIChatChoice as v, type AIFinishReason as w, type AIUsageInfo as x, type AIRouterConfig as y, type AIErrorCode as z };
@@ -0,0 +1,45 @@
1
+ /**
2
+ * Email abstraction interface
3
+ * Provides a vendor-agnostic way to send emails
4
+ */
5
+ interface EmailAddress {
6
+ email: string;
7
+ name?: string;
8
+ }
9
+ interface EmailAttachment {
10
+ filename: string;
11
+ content: Buffer | string;
12
+ contentType?: string;
13
+ }
14
+ interface EmailMessage {
15
+ to: EmailAddress | EmailAddress[];
16
+ from?: EmailAddress;
17
+ replyTo?: EmailAddress;
18
+ subject: string;
19
+ text?: string;
20
+ html?: string;
21
+ attachments?: EmailAttachment[];
22
+ headers?: Record<string, string>;
23
+ tags?: string[];
24
+ }
25
+ interface EmailResult {
26
+ id: string;
27
+ success: boolean;
28
+ error?: Error;
29
+ }
30
+ interface IEmail {
31
+ /**
32
+ * Send an email
33
+ */
34
+ send(message: EmailMessage): Promise<EmailResult>;
35
+ /**
36
+ * Send multiple emails (batch)
37
+ */
38
+ sendBatch(messages: EmailMessage[]): Promise<EmailResult[]>;
39
+ /**
40
+ * Check email service connectivity
41
+ */
42
+ healthCheck(): Promise<boolean>;
43
+ }
44
+
45
+ export type { EmailMessage as E, IEmail as I, EmailResult as a, EmailAddress as b, EmailAttachment as c };
@@ -0,0 +1,45 @@
1
+ /**
2
+ * Email abstraction interface
3
+ * Provides a vendor-agnostic way to send emails
4
+ */
5
+ interface EmailAddress {
6
+ email: string;
7
+ name?: string;
8
+ }
9
+ interface EmailAttachment {
10
+ filename: string;
11
+ content: Buffer | string;
12
+ contentType?: string;
13
+ }
14
+ interface EmailMessage {
15
+ to: EmailAddress | EmailAddress[];
16
+ from?: EmailAddress;
17
+ replyTo?: EmailAddress;
18
+ subject: string;
19
+ text?: string;
20
+ html?: string;
21
+ attachments?: EmailAttachment[];
22
+ headers?: Record<string, string>;
23
+ tags?: string[];
24
+ }
25
+ interface EmailResult {
26
+ id: string;
27
+ success: boolean;
28
+ error?: Error;
29
+ }
30
+ interface IEmail {
31
+ /**
32
+ * Send an email
33
+ */
34
+ send(message: EmailMessage): Promise<EmailResult>;
35
+ /**
36
+ * Send multiple emails (batch)
37
+ */
38
+ sendBatch(messages: EmailMessage[]): Promise<EmailResult[]>;
39
+ /**
40
+ * Check email service connectivity
41
+ */
42
+ healthCheck(): Promise<boolean>;
43
+ }
44
+
45
+ export type { EmailMessage as E, IEmail as I, EmailResult as a, EmailAddress as b, EmailAttachment as c };
@@ -0,0 +1,105 @@
1
+ /**
2
+ * Logger Interface
3
+ * Standardizes logging across the platform
4
+ */
5
+ /**
6
+ * Log levels in order of severity
7
+ */
8
+ type LogLevel = "debug" | "info" | "warn" | "error";
9
+ /**
10
+ * Metadata that can be attached to log entries
11
+ */
12
+ interface LogMeta {
13
+ /** Error object if logging an error */
14
+ error?: Error;
15
+ /** Duration in milliseconds (for timing operations) */
16
+ duration?: number;
17
+ /** Request ID for tracing */
18
+ requestId?: string;
19
+ /** User ID if applicable */
20
+ userId?: string;
21
+ /** Any additional key-value pairs */
22
+ [key: string]: unknown;
23
+ }
24
+ /**
25
+ * A structured log entry
26
+ */
27
+ interface LogEntry {
28
+ /** Log level */
29
+ level: LogLevel;
30
+ /** Log message */
31
+ message: string;
32
+ /** When the log was created */
33
+ timestamp: Date;
34
+ /** Optional metadata */
35
+ meta?: LogMeta;
36
+ /** Logger context (e.g., service name) */
37
+ context?: Record<string, unknown>;
38
+ }
39
+ /**
40
+ * Logger interface for structured logging
41
+ */
42
+ interface ILogger {
43
+ /**
44
+ * Log a debug message (for development/troubleshooting)
45
+ */
46
+ debug(message: string, meta?: LogMeta): void;
47
+ /**
48
+ * Log an informational message
49
+ */
50
+ info(message: string, meta?: LogMeta): void;
51
+ /**
52
+ * Log a warning message
53
+ */
54
+ warn(message: string, meta?: LogMeta): void;
55
+ /**
56
+ * Log an error message
57
+ */
58
+ error(message: string, meta?: LogMeta): void;
59
+ /**
60
+ * Create a child logger with additional context
61
+ * @param context Additional context to include in all logs from this child
62
+ */
63
+ child(context: Record<string, unknown>): ILogger;
64
+ }
65
+ /**
66
+ * Configuration options for loggers
67
+ */
68
+ interface LoggerConfig {
69
+ /** Minimum level to log */
70
+ level?: LogLevel;
71
+ /** Whether to pretty print (for development) */
72
+ pretty?: boolean;
73
+ /** Service name to include in logs */
74
+ service?: string;
75
+ /** Environment name */
76
+ environment?: string;
77
+ }
78
+ /**
79
+ * Console logger implementation (for development)
80
+ */
81
+ declare class ConsoleLogger implements ILogger {
82
+ private context;
83
+ private level;
84
+ private static levelPriority;
85
+ constructor(config?: LoggerConfig);
86
+ private shouldLog;
87
+ private log;
88
+ debug(message: string, meta?: LogMeta): void;
89
+ info(message: string, meta?: LogMeta): void;
90
+ warn(message: string, meta?: LogMeta): void;
91
+ error(message: string, meta?: LogMeta): void;
92
+ child(context: Record<string, unknown>): ILogger;
93
+ }
94
+ /**
95
+ * No-op logger for testing or when logging is disabled
96
+ */
97
+ declare class NoopLogger implements ILogger {
98
+ debug(): void;
99
+ info(): void;
100
+ warn(): void;
101
+ error(): void;
102
+ child(): ILogger;
103
+ }
104
+
105
+ export { ConsoleLogger as C, type ILogger as I, type LogLevel as L, NoopLogger as N, type LogMeta as a, type LogEntry as b, type LoggerConfig as c };