@breadstone/archipel-mcp 0.0.7 → 0.0.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.
Files changed (181) hide show
  1. package/data/packages/index.md +13 -6
  2. package/data/packages/platform-analytics/api/Class.AppInsightsAnalyticsClient.md +7 -7
  3. package/data/packages/platform-analytics/api/Class.DatadogAnalyticsClient.md +7 -7
  4. package/data/packages/platform-analytics/api/Class.SentryAnalyticsClient.md +7 -7
  5. package/data/packages/platform-authentication/api/{Class.AppleStrategy.md → Class.AppleConnector.md} +18 -12
  6. package/data/packages/platform-authentication/api/Class.AuthModule.md +3 -3
  7. package/data/packages/platform-authentication/api/Class.ChallengeService.md +6 -6
  8. package/data/packages/platform-authentication/api/Class.GithubConnector.md +79 -0
  9. package/data/packages/platform-authentication/api/{Class.GoogleStrategy.md → Class.GoogleConnector.md} +18 -12
  10. package/data/packages/platform-authentication/api/Class.MfaService.md +11 -11
  11. package/data/packages/platform-authentication/api/{Class.MicrosoftStrategy.md → Class.MicrosoftConnector.md} +18 -12
  12. package/data/packages/platform-authentication/api/Class.TotpMfaChannel.md +145 -0
  13. package/data/packages/platform-authentication/api/Class.VerificationService.md +7 -7
  14. package/data/packages/platform-authentication/api/Interface.IAuthModuleOptions.md +38 -8
  15. package/data/packages/platform-authentication/api/Interface.IMfaChallengeState.md +12 -12
  16. package/data/packages/platform-authentication/api/Variable.APPLE_AUTH_CONFIG_ENTRIES.md +1 -1
  17. package/data/packages/platform-authentication/api/Variable.AUTH_APPLE_CALLBACK_URL.md +1 -1
  18. package/data/packages/platform-authentication/api/Variable.AUTH_APPLE_CLIENT_ID.md +1 -1
  19. package/data/packages/platform-authentication/api/Variable.AUTH_APPLE_KEY_ID.md +1 -1
  20. package/data/packages/platform-authentication/api/Variable.AUTH_APPLE_PRIVATE_KEY.md +1 -1
  21. package/data/packages/platform-authentication/api/Variable.AUTH_APPLE_SCOPE.md +1 -1
  22. package/data/packages/platform-authentication/api/Variable.AUTH_APPLE_TEAM_ID.md +1 -1
  23. package/data/packages/platform-authentication/api/Variable.AUTH_GITHUB_CALLBACK_URL.md +1 -1
  24. package/data/packages/platform-authentication/api/Variable.AUTH_GITHUB_CLIENT_ID.md +1 -1
  25. package/data/packages/platform-authentication/api/Variable.AUTH_GITHUB_CLIENT_SECRET.md +1 -1
  26. package/data/packages/platform-authentication/api/Variable.AUTH_GITHUB_SCOPE.md +1 -1
  27. package/data/packages/platform-authentication/api/Variable.AUTH_GOOGLE_CALLBACK_URL.md +1 -1
  28. package/data/packages/platform-authentication/api/Variable.AUTH_GOOGLE_CLIENT_ID.md +1 -1
  29. package/data/packages/platform-authentication/api/Variable.AUTH_GOOGLE_CLIENT_SECRET.md +1 -1
  30. package/data/packages/platform-authentication/api/Variable.AUTH_GOOGLE_SCOPE.md +1 -1
  31. package/data/packages/platform-authentication/api/Variable.AUTH_MFA_EMAIL_CODE_TTL.md +1 -1
  32. package/data/packages/platform-authentication/api/Variable.AUTH_MFA_EMAIL_MIN_RESEND.md +1 -1
  33. package/data/packages/platform-authentication/api/Variable.AUTH_MFA_ISSUER.md +15 -0
  34. package/data/packages/platform-authentication/api/Variable.AUTH_MFA_PUSH_CODE_TTL.md +1 -1
  35. package/data/packages/platform-authentication/api/Variable.AUTH_MFA_PUSH_MIN_RESEND.md +1 -1
  36. package/data/packages/platform-authentication/api/Variable.AUTH_MFA_SMS_CODE_TTL.md +1 -1
  37. package/data/packages/platform-authentication/api/Variable.AUTH_MFA_SMS_MIN_RESEND.md +1 -1
  38. package/data/packages/platform-authentication/api/Variable.AUTH_MICROSOFT_CALLBACK_URL.md +1 -1
  39. package/data/packages/platform-authentication/api/Variable.AUTH_MICROSOFT_CLIENT_ID.md +1 -1
  40. package/data/packages/platform-authentication/api/Variable.AUTH_MICROSOFT_CLIENT_SECRET.md +1 -1
  41. package/data/packages/platform-authentication/api/Variable.AUTH_MICROSOFT_SCOPE.md +1 -1
  42. package/data/packages/platform-authentication/api/Variable.AUTH_MICROSOFT_TENANT.md +1 -1
  43. package/data/packages/platform-authentication/api/Variable.GITHUB_AUTH_CONFIG_ENTRIES.md +1 -1
  44. package/data/packages/platform-authentication/api/Variable.GOOGLE_AUTH_CONFIG_ENTRIES.md +1 -1
  45. package/data/packages/platform-authentication/api/Variable.MICROSOFT_AUTH_CONFIG_ENTRIES.md +1 -1
  46. package/data/packages/platform-authentication/api/Variable.PLATFORM_AUTHENTICATION_CONFIG_ENTRIES.md +1 -1
  47. package/data/packages/platform-authentication/api/Variable.SEED_ANONYMOUS_USERNAME.md +1 -1
  48. package/data/packages/platform-authentication/api/Variable.TOTP_MFA_PROVIDERS.md +30 -0
  49. package/data/packages/platform-authentication/api/index.md +7 -4
  50. package/data/packages/platform-blob-storage/api/Class.BlobModule.md +2 -2
  51. package/data/packages/platform-blob-storage/api/Interface.IAwsS3BlobProviderRegistration.md +3 -3
  52. package/data/packages/platform-blob-storage/api/Interface.IAzureBlobProviderRegistration.md +3 -3
  53. package/data/packages/platform-blob-storage/api/Interface.IBlobModuleOptions.md +5 -5
  54. package/data/packages/platform-blob-storage/api/Interface.ICustomBlobProviderRegistration.md +3 -3
  55. package/data/packages/platform-blob-storage/api/Interface.IVercelBlobProviderRegistration.md +3 -3
  56. package/data/packages/platform-blob-storage/api/TypeAlias.IBlobProviderRegistration.md +1 -1
  57. package/data/packages/{platform-core → platform-caching}/api/Class.MemoryLayeredCache.md +41 -33
  58. package/data/packages/platform-caching/api/Class.NoopCacheMetricsRecorder.md +158 -0
  59. package/data/packages/platform-caching/api/Class.RedisLayeredCache.md +296 -0
  60. package/data/packages/platform-caching/api/Interface.ICacheMetricsRecorder.md +122 -0
  61. package/data/packages/platform-caching/api/Interface.ICacheStats.md +71 -0
  62. package/data/packages/platform-caching/api/Interface.ILayeredCache.md +199 -0
  63. package/data/packages/platform-caching/api/Interface.ILayeredCacheOptions.md +76 -0
  64. package/data/packages/platform-caching/api/Interface.IRedisLayeredCacheOptions.md +122 -0
  65. package/data/packages/platform-caching/api/index.md +25 -0
  66. package/data/packages/platform-caching/index.md +116 -0
  67. package/data/packages/platform-core/api/Class.AppHealthIndicator.md +3 -3
  68. package/data/packages/platform-core/api/Class.ErrorTemplateService.md +5 -5
  69. package/data/packages/platform-core/api/Class.HostService.md +8 -8
  70. package/data/packages/platform-core/api/Class.ResourceManager.md +19 -19
  71. package/data/packages/platform-core/api/Interface.IErrorPageParams.md +10 -10
  72. package/data/packages/platform-core/api/Interface.IHostContentParams.md +10 -10
  73. package/data/packages/platform-core/api/Interface.IResourceManagerConfig.md +4 -4
  74. package/data/packages/platform-core/api/Variable.APP_NAME.md +15 -0
  75. package/data/packages/platform-core/api/Variable.GIT_COMMIT.md +15 -0
  76. package/data/packages/platform-core/api/Variable.INTELLIGENCE_MAX_OUTPUT_TOKENS.md +1 -1
  77. package/data/packages/platform-core/api/Variable.INTELLIGENCE_MODEL.md +1 -1
  78. package/data/packages/platform-core/api/Variable.INTELLIGENCE_TEMPERATURE.md +1 -1
  79. package/data/packages/platform-core/api/Variable.INTELLIGENCE_TOP_P.md +1 -1
  80. package/data/packages/platform-core/api/Variable.NODE_ENV.md +1 -1
  81. package/data/packages/platform-core/api/Variable.PLATFORM_CORE_CONFIG_ENTRIES.md +1 -1
  82. package/data/packages/platform-core/api/index.md +106 -150
  83. package/data/packages/platform-core/index.md +5 -3
  84. package/data/packages/platform-cryptography/api/Class.BcryptService.md +73 -0
  85. package/data/packages/platform-cryptography/api/Class.CryptoService.md +52 -0
  86. package/data/packages/{platform-core → platform-cryptography}/api/Class.OtpService.md +8 -4
  87. package/data/packages/{platform-core → platform-cryptography}/api/Interface.IOtpService.md +8 -4
  88. package/data/packages/platform-cryptography/api/Interface.IOtpUriOptions.md +47 -0
  89. package/data/packages/{platform-core → platform-cryptography}/api/Variable.OTP_SERVICE_TOKEN.md +1 -1
  90. package/data/packages/{platform-core → platform-cryptography}/api/Variable.TOTP_EPOCH_TOLERANCE.md +1 -1
  91. package/data/packages/platform-cryptography/api/index.md +29 -0
  92. package/data/packages/platform-cryptography/index.md +132 -0
  93. package/data/packages/{platform-core → platform-intelligence}/api/Class.IntelligenceCapabilityRegistrarBase.md +7 -5
  94. package/data/packages/{platform-core → platform-intelligence}/api/Class.IntelligenceCapabilityRegistry.md +19 -15
  95. package/data/packages/{platform-core → platform-intelligence}/api/Class.IntelligenceModule.md +1 -1
  96. package/data/packages/{platform-core → platform-intelligence}/api/Class.IntelligenceTextGenerator.md +7 -7
  97. package/data/packages/platform-intelligence/api/Function.createProviderOptions.md +27 -0
  98. package/data/packages/platform-intelligence/api/Function.loadAnthropicLanguageModel.md +27 -0
  99. package/data/packages/platform-intelligence/api/Function.loadGoogleLanguageModel.md +27 -0
  100. package/data/packages/platform-intelligence/api/Function.loadGrokLanguageModel.md +27 -0
  101. package/data/packages/platform-intelligence/api/Function.loadOpenAILanguageModel.md +27 -0
  102. package/data/packages/platform-intelligence/api/Function.loadProviderFactory.md +32 -0
  103. package/data/packages/platform-intelligence/api/Interface.IIntelligenceArtifact.md +35 -0
  104. package/data/packages/platform-intelligence/api/Interface.IIntelligenceCapability.md +72 -0
  105. package/data/packages/platform-intelligence/api/Interface.IIntelligenceCapabilityMetadata.md +71 -0
  106. package/data/packages/platform-intelligence/api/Interface.IIntelligenceCapabilityPayload.md +47 -0
  107. package/data/packages/platform-intelligence/api/Interface.IIntelligenceCapabilityRegistry.md +79 -0
  108. package/data/packages/platform-intelligence/api/Interface.IIntelligenceCapabilityResult.md +47 -0
  109. package/data/packages/platform-intelligence/api/Interface.IIntelligenceCompletionUsage.md +47 -0
  110. package/data/packages/platform-intelligence/api/Interface.IIntelligenceContext.md +73 -0
  111. package/data/packages/platform-intelligence/api/Interface.IIntelligenceContextBuilder.md +36 -0
  112. package/data/packages/platform-intelligence/api/Interface.IIntelligenceConversationMessageSnapshot.md +71 -0
  113. package/data/packages/platform-intelligence/api/Interface.IIntelligenceConversationSnapshot.md +59 -0
  114. package/data/packages/platform-intelligence/api/Interface.IIntelligenceFollowUpQuestion.md +47 -0
  115. package/data/packages/platform-intelligence/api/Interface.IIntelligenceIntent.md +47 -0
  116. package/data/packages/platform-intelligence/api/Interface.IIntelligenceIntentEntity.md +35 -0
  117. package/data/packages/platform-intelligence/api/Interface.IIntelligenceMessageModel.md +71 -0
  118. package/data/packages/platform-intelligence/api/Interface.IIntelligenceMessagePayload.md +35 -0
  119. package/data/packages/platform-intelligence/api/Interface.IIntelligencePrompt.md +35 -0
  120. package/data/packages/platform-intelligence/api/Interface.IIntelligencePromptMessage.md +35 -0
  121. package/data/packages/platform-intelligence/api/Interface.IIntelligenceProviderConfiguration.md +95 -0
  122. package/data/packages/platform-intelligence/api/Interface.IIntelligenceResponseMessage.md +35 -0
  123. package/data/packages/platform-intelligence/api/Interface.IIntelligenceTextCompletion.md +61 -0
  124. package/data/packages/platform-intelligence/api/Interface.IIntelligenceTextGenerationOptions.md +47 -0
  125. package/data/packages/platform-intelligence/api/Interface.IIntelligenceTextGenerator.md +54 -0
  126. package/data/packages/{platform-core → platform-intelligence}/api/TypeAlias.IntelligenceConversationMessageRole.md +1 -1
  127. package/data/packages/platform-intelligence/api/TypeAlias.IntelligenceLanguageModelLoader.md +25 -0
  128. package/data/packages/{platform-core → platform-intelligence}/api/TypeAlias.IntelligenceProviderName.md +1 -1
  129. package/data/packages/{platform-core → platform-intelligence}/api/Variable.IntelligenceConversationMessageRoles.md +6 -6
  130. package/data/packages/platform-intelligence/api/Variable.IntelligenceProviderNames.md +29 -0
  131. package/data/packages/platform-intelligence/api/index.md +70 -0
  132. package/data/packages/platform-intelligence/index.md +131 -0
  133. package/data/packages/platform-mailing/api/Class.MailService.md +4 -4
  134. package/data/packages/platform-mailing/api/Class.MailVerificationService.md +4 -4
  135. package/data/packages/platform-mailing/api/Class.MailgunDeliveryStrategy.md +3 -3
  136. package/data/packages/platform-mailing/api/Class.PostmarkDeliveryStrategy.md +3 -3
  137. package/data/packages/platform-mailing/api/Class.ResendDeliveryStrategy.md +3 -3
  138. package/data/packages/platform-mailing/api/Class.SendGridDeliveryStrategy.md +3 -3
  139. package/data/packages/platform-mailing/api/Class.SmtpDeliveryStrategy.md +3 -3
  140. package/data/packages/platform-openapi/api/Function.SwaggerFeature.md +1 -1
  141. package/data/packages/platform-payments/api/Class.LemonSqueezyClient.md +6 -6
  142. package/data/packages/platform-payments/api/Class.MollieClient.md +6 -6
  143. package/data/packages/platform-payments/api/Class.PaddleClient.md +6 -6
  144. package/data/packages/platform-payments/api/Class.StripeClient.md +6 -6
  145. package/data/packages/platform-telemetry/api/Class.TelemetryCacheMetricsRecorder.md +15 -15
  146. package/package.json +1 -1
  147. package/data/packages/platform-authentication/api/Class.GithubStrategy.md +0 -73
  148. package/data/packages/platform-core/api/Class.BcryptService.md +0 -69
  149. package/data/packages/platform-core/api/Class.CryptoService.md +0 -50
  150. package/data/packages/platform-core/api/Class.NoopCacheMetricsRecorder.md +0 -157
  151. package/data/packages/platform-core/api/Class.RedisLayeredCache.md +0 -275
  152. package/data/packages/platform-core/api/Interface.ICacheMetricsRecorder.md +0 -121
  153. package/data/packages/platform-core/api/Interface.ICacheStats.md +0 -71
  154. package/data/packages/platform-core/api/Interface.IIntelligenceArtifact.md +0 -31
  155. package/data/packages/platform-core/api/Interface.IIntelligenceCapability.md +0 -62
  156. package/data/packages/platform-core/api/Interface.IIntelligenceCapabilityMetadata.md +0 -61
  157. package/data/packages/platform-core/api/Interface.IIntelligenceCapabilityPayload.md +0 -41
  158. package/data/packages/platform-core/api/Interface.IIntelligenceCapabilityRegistry.md +0 -69
  159. package/data/packages/platform-core/api/Interface.IIntelligenceCapabilityResult.md +0 -41
  160. package/data/packages/platform-core/api/Interface.IIntelligenceCompletionUsage.md +0 -41
  161. package/data/packages/platform-core/api/Interface.IIntelligenceContext.md +0 -63
  162. package/data/packages/platform-core/api/Interface.IIntelligenceContextBuilder.md +0 -32
  163. package/data/packages/platform-core/api/Interface.IIntelligenceConversationMessageSnapshot.md +0 -61
  164. package/data/packages/platform-core/api/Interface.IIntelligenceConversationSnapshot.md +0 -51
  165. package/data/packages/platform-core/api/Interface.IIntelligenceFollowUpQuestion.md +0 -41
  166. package/data/packages/platform-core/api/Interface.IIntelligenceIntent.md +0 -41
  167. package/data/packages/platform-core/api/Interface.IIntelligenceIntentEntity.md +0 -31
  168. package/data/packages/platform-core/api/Interface.IIntelligenceMessageModel.md +0 -61
  169. package/data/packages/platform-core/api/Interface.IIntelligenceMessagePayload.md +0 -31
  170. package/data/packages/platform-core/api/Interface.IIntelligencePrompt.md +0 -31
  171. package/data/packages/platform-core/api/Interface.IIntelligencePromptMessage.md +0 -31
  172. package/data/packages/platform-core/api/Interface.IIntelligenceProviderConfiguration.md +0 -81
  173. package/data/packages/platform-core/api/Interface.IIntelligenceResponseMessage.md +0 -31
  174. package/data/packages/platform-core/api/Interface.IIntelligenceTextCompletion.md +0 -53
  175. package/data/packages/platform-core/api/Interface.IIntelligenceTextGenerationOptions.md +0 -41
  176. package/data/packages/platform-core/api/Interface.IIntelligenceTextGenerator.md +0 -46
  177. package/data/packages/platform-core/api/Interface.ILayeredCache.md +0 -194
  178. package/data/packages/platform-core/api/Interface.ILayeredCacheOptions.md +0 -71
  179. package/data/packages/platform-core/api/Interface.IOtpUriOptions.md +0 -47
  180. package/data/packages/platform-core/api/Interface.IRedisLayeredCacheOptions.md +0 -108
  181. package/data/packages/platform-core/api/Variable.IntelligenceProviderNames.md +0 -29
@@ -0,0 +1,199 @@
1
+ ---
2
+ title: 'Interface: ILayeredCache\<TKey, TValue\>'
3
+ generated: true
4
+ editUrl: false
5
+ ---
6
+
7
+ # Interface: ILayeredCache\<TKey, TValue\>
8
+
9
+ Defined in: [ILayeredCache.ts:15](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-caching/src/ILayeredCache.ts#L15)
10
+
11
+ Generic layered cache contract supporting synchronous and asynchronous
12
+ access patterns with optional warm-up and statistics.
13
+
14
+ ## Type Parameters
15
+
16
+ | Type Parameter | Description |
17
+ | -------------- | ----------------------------- |
18
+ | `TKey` | The type of the cache keys. |
19
+ | `TValue` | The type of the cache values. |
20
+
21
+ ## Methods
22
+
23
+ ### get()
24
+
25
+ ```ts
26
+ get(key): TValue | undefined;
27
+ ```
28
+
29
+ Defined in: [ILayeredCache.ts:25](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-caching/src/ILayeredCache.ts#L25)
30
+
31
+ Retrieves a value from the cache synchronously.
32
+
33
+ #### Parameters
34
+
35
+ | Parameter | Type | Description |
36
+ | --------- | ------ | -------------------- |
37
+ | `key` | `TKey` | The key to retrieve. |
38
+
39
+ #### Returns
40
+
41
+ `TValue` \| `undefined`
42
+
43
+ The cached value or `undefined` on a miss.
44
+
45
+ ---
46
+
47
+ ### getAsync()
48
+
49
+ ```ts
50
+ getAsync(key): Promise<TValue | undefined>;
51
+ ```
52
+
53
+ Defined in: [ILayeredCache.ts:34](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-caching/src/ILayeredCache.ts#L34)
54
+
55
+ Retrieves a value from the cache asynchronously.
56
+
57
+ #### Parameters
58
+
59
+ | Parameter | Type | Description |
60
+ | --------- | ------ | -------------------- |
61
+ | `key` | `TKey` | The key to retrieve. |
62
+
63
+ #### Returns
64
+
65
+ `Promise`\<`TValue` \| `undefined`\>
66
+
67
+ A promise resolving to the cached value or `undefined` on a miss.
68
+
69
+ ---
70
+
71
+ ### invalidate()
72
+
73
+ ```ts
74
+ invalidate(key): void;
75
+ ```
76
+
77
+ Defined in: [ILayeredCache.ts:69](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-caching/src/ILayeredCache.ts#L69)
78
+
79
+ Invalidates a key in the cache synchronously.
80
+
81
+ #### Parameters
82
+
83
+ | Parameter | Type | Description |
84
+ | --------- | ------ | ---------------------- |
85
+ | `key` | `TKey` | The key to invalidate. |
86
+
87
+ #### Returns
88
+
89
+ `void`
90
+
91
+ ---
92
+
93
+ ### invalidateAsync()
94
+
95
+ ```ts
96
+ invalidateAsync(key): Promise<void>;
97
+ ```
98
+
99
+ Defined in: [ILayeredCache.ts:77](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-caching/src/ILayeredCache.ts#L77)
100
+
101
+ Invalidates a key in the cache asynchronously.
102
+
103
+ #### Parameters
104
+
105
+ | Parameter | Type | Description |
106
+ | --------- | ------ | ---------------------- |
107
+ | `key` | `TKey` | The key to invalidate. |
108
+
109
+ #### Returns
110
+
111
+ `Promise`\<`void`\>
112
+
113
+ ---
114
+
115
+ ### set()
116
+
117
+ ```ts
118
+ set(key, value): void;
119
+ ```
120
+
121
+ Defined in: [ILayeredCache.ts:43](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-caching/src/ILayeredCache.ts#L43)
122
+
123
+ Stores a value in the cache synchronously.
124
+
125
+ #### Parameters
126
+
127
+ | Parameter | Type | Description |
128
+ | --------- | -------- | ------------------- |
129
+ | `key` | `TKey` | The key to store. |
130
+ | `value` | `TValue` | The value to store. |
131
+
132
+ #### Returns
133
+
134
+ `void`
135
+
136
+ ---
137
+
138
+ ### setAsync()
139
+
140
+ ```ts
141
+ setAsync(key, value): Promise<void>;
142
+ ```
143
+
144
+ Defined in: [ILayeredCache.ts:52](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-caching/src/ILayeredCache.ts#L52)
145
+
146
+ Stores a value in the cache asynchronously.
147
+
148
+ #### Parameters
149
+
150
+ | Parameter | Type | Description |
151
+ | --------- | -------- | ------------------- |
152
+ | `key` | `TKey` | The key to store. |
153
+ | `value` | `TValue` | The value to store. |
154
+
155
+ #### Returns
156
+
157
+ `Promise`\<`void`\>
158
+
159
+ ---
160
+
161
+ ### stats()?
162
+
163
+ ```ts
164
+ optional stats(): ICacheStats;
165
+ ```
166
+
167
+ Defined in: [ILayeredCache.ts:85](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-caching/src/ILayeredCache.ts#L85)
168
+
169
+ Returns current cache statistics.
170
+
171
+ #### Returns
172
+
173
+ [`ICacheStats`](Interface.ICacheStats)
174
+
175
+ The cache statistics snapshot.
176
+
177
+ ---
178
+
179
+ ### warm()?
180
+
181
+ ```ts
182
+ optional warm(key): Promise<TValue | undefined>;
183
+ ```
184
+
185
+ Defined in: [ILayeredCache.ts:61](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-caching/src/ILayeredCache.ts#L61)
186
+
187
+ Proactively warms the cache for a given key.
188
+
189
+ #### Parameters
190
+
191
+ | Parameter | Type | Description |
192
+ | --------- | ------ | ---------------- |
193
+ | `key` | `TKey` | The key to warm. |
194
+
195
+ #### Returns
196
+
197
+ `Promise`\<`TValue` \| `undefined`\>
198
+
199
+ The value that was loaded and cached, or `undefined` if not found.
@@ -0,0 +1,76 @@
1
+ ---
2
+ title: 'Interface: ILayeredCacheOptions'
3
+ generated: true
4
+ editUrl: false
5
+ ---
6
+
7
+ # Interface: ILayeredCacheOptions
8
+
9
+ Defined in: [MemoryLayeredCache.ts:16](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-caching/src/MemoryLayeredCache.ts#L16)
10
+
11
+ Configuration options for [MemoryLayeredCache](Class.MemoryLayeredCache).
12
+
13
+ ## Properties
14
+
15
+ ### cacheName?
16
+
17
+ ```ts
18
+ optional cacheName?: string;
19
+ ```
20
+
21
+ Defined in: [MemoryLayeredCache.ts:57](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-caching/src/MemoryLayeredCache.ts#L57)
22
+
23
+ An optional name / label for the cache instance, used in metrics.
24
+ Defaults to `'memory'`.
25
+
26
+ ---
27
+
28
+ ### maxEntries?
29
+
30
+ ```ts
31
+ optional maxEntries?: number;
32
+ ```
33
+
34
+ Defined in: [MemoryLayeredCache.ts:41](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-caching/src/MemoryLayeredCache.ts#L41)
35
+
36
+ Maximum number of entries retained in the cache. Oldest entries are
37
+ evicted first (LRU). Defaults to infinite.
38
+
39
+ ---
40
+
41
+ ### metricsRecorder?
42
+
43
+ ```ts
44
+ optional metricsRecorder?: ICacheMetricsRecorder;
45
+ ```
46
+
47
+ Defined in: [MemoryLayeredCache.ts:49](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-caching/src/MemoryLayeredCache.ts#L49)
48
+
49
+ Optional metrics recorder forwarded cache operation statistics.
50
+ Falls back to [NoopCacheMetricsRecorder](Class.NoopCacheMetricsRecorder) when omitted.
51
+
52
+ ---
53
+
54
+ ### staleWhileRevalidate?
55
+
56
+ ```ts
57
+ optional staleWhileRevalidate?: boolean;
58
+ ```
59
+
60
+ Defined in: [MemoryLayeredCache.ts:33](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-caching/src/MemoryLayeredCache.ts#L33)
61
+
62
+ When `true`, expired entries are served immediately while a background
63
+ refresh is triggered. Defaults to `false`.
64
+
65
+ ---
66
+
67
+ ### ttlMs?
68
+
69
+ ```ts
70
+ optional ttlMs?: number;
71
+ ```
72
+
73
+ Defined in: [MemoryLayeredCache.ts:25](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-caching/src/MemoryLayeredCache.ts#L25)
74
+
75
+ Time to live in milliseconds. Entries older than this are considered expired.
76
+ Defaults to infinite (no expiration).
@@ -0,0 +1,122 @@
1
+ ---
2
+ title: 'Interface: IRedisLayeredCacheOptions\<TValue\>'
3
+ generated: true
4
+ editUrl: false
5
+ ---
6
+
7
+ # Interface: IRedisLayeredCacheOptions\<TValue\>
8
+
9
+ Defined in: [redis/RedisLayeredCache.ts:18](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-caching/src/redis/RedisLayeredCache.ts#L18)
10
+
11
+ Configuration options for [RedisLayeredCache](Class.RedisLayeredCache).
12
+
13
+ ## Type Parameters
14
+
15
+ | Type Parameter | Description |
16
+ | -------------- | ---------------------------------------- |
17
+ | `TValue` | The type of values stored in this cache. |
18
+
19
+ ## Properties
20
+
21
+ ### cacheName?
22
+
23
+ ```ts
24
+ optional cacheName?: string;
25
+ ```
26
+
27
+ Defined in: [redis/RedisLayeredCache.ts:67](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-caching/src/redis/RedisLayeredCache.ts#L67)
28
+
29
+ An optional name / label for the cache instance, used in metrics.
30
+ Defaults to `'redis'`.
31
+
32
+ ---
33
+
34
+ ### deserialize?
35
+
36
+ ```ts
37
+ optional deserialize?: (raw) => TValue;
38
+ ```
39
+
40
+ Defined in: [redis/RedisLayeredCache.ts:52](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-caching/src/redis/RedisLayeredCache.ts#L52)
41
+
42
+ Custom deserialization function. Defaults to `JSON.parse`.
43
+
44
+ #### Parameters
45
+
46
+ | Parameter | Type |
47
+ | --------- | -------- |
48
+ | `raw` | `string` |
49
+
50
+ #### Returns
51
+
52
+ `TValue`
53
+
54
+ ---
55
+
56
+ ### keyPrefix
57
+
58
+ ```ts
59
+ keyPrefix: string;
60
+ ```
61
+
62
+ Defined in: [redis/RedisLayeredCache.ts:31](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-caching/src/redis/RedisLayeredCache.ts#L31)
63
+
64
+ Key prefix applied to all Redis keys managed by this cache instance.
65
+
66
+ ---
67
+
68
+ ### metricsRecorder?
69
+
70
+ ```ts
71
+ optional metricsRecorder?: ICacheMetricsRecorder;
72
+ ```
73
+
74
+ Defined in: [redis/RedisLayeredCache.ts:59](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-caching/src/redis/RedisLayeredCache.ts#L59)
75
+
76
+ Optional metrics recorder forwarded cache operation statistics.
77
+
78
+ ---
79
+
80
+ ### serialize?
81
+
82
+ ```ts
83
+ optional serialize?: (value) => string;
84
+ ```
85
+
86
+ Defined in: [redis/RedisLayeredCache.ts:45](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-caching/src/redis/RedisLayeredCache.ts#L45)
87
+
88
+ Custom serialization function. Defaults to `JSON.stringify`.
89
+
90
+ #### Parameters
91
+
92
+ | Parameter | Type |
93
+ | --------- | -------- |
94
+ | `value` | `TValue` |
95
+
96
+ #### Returns
97
+
98
+ `string`
99
+
100
+ ---
101
+
102
+ ### ttlSeconds?
103
+
104
+ ```ts
105
+ optional ttlSeconds?: number;
106
+ ```
107
+
108
+ Defined in: [redis/RedisLayeredCache.ts:38](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-caching/src/redis/RedisLayeredCache.ts#L38)
109
+
110
+ Optional TTL in seconds applied to every stored entry.
111
+
112
+ ---
113
+
114
+ ### url
115
+
116
+ ```ts
117
+ url: string;
118
+ ```
119
+
120
+ Defined in: [redis/RedisLayeredCache.ts:24](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-caching/src/redis/RedisLayeredCache.ts#L24)
121
+
122
+ Redis connection URL (e.g. `redis://localhost:6379`).
@@ -0,0 +1,25 @@
1
+ ---
2
+ title: '@breadstone/archipel-platform-caching'
3
+ generated: true
4
+ editUrl: false
5
+ ---
6
+
7
+ # @breadstone/archipel-platform-caching
8
+
9
+ ## Classes
10
+
11
+ | Class | Description |
12
+ | ---------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
13
+ | [MemoryLayeredCache](Class.MemoryLayeredCache) | In-memory layered cache with LRU eviction, TTL expiration and optional stale-while-revalidate support. Falls back to an asynchronous loader function on cache misses. |
14
+ | [NoopCacheMetricsRecorder](Class.NoopCacheMetricsRecorder) | No-op implementation of [ICacheMetricsRecorder](Interface.ICacheMetricsRecorder) used as the default when no external metrics backend is configured. |
15
+ | [RedisLayeredCache](Class.RedisLayeredCache) | Redis-backed layered cache implementation. Falls back to an asynchronous loader function when the requested key is not present in Redis. |
16
+
17
+ ## Interfaces
18
+
19
+ | Interface | Description |
20
+ | ---------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------- |
21
+ | [ICacheMetricsRecorder](Interface.ICacheMetricsRecorder) | Metrics recorder for cache operations. Implementations can forward measurements to Prometheus, OpenTelemetry, or any other backend. |
22
+ | [ICacheStats](Interface.ICacheStats) | Cache statistics snapshot returned by cache implementations. |
23
+ | [ILayeredCache](Interface.ILayeredCache) | Generic layered cache contract supporting synchronous and asynchronous access patterns with optional warm-up and statistics. |
24
+ | [ILayeredCacheOptions](Interface.ILayeredCacheOptions) | Configuration options for [MemoryLayeredCache](Class.MemoryLayeredCache). |
25
+ | [IRedisLayeredCacheOptions](Interface.IRedisLayeredCacheOptions) | Configuration options for [RedisLayeredCache](Class.RedisLayeredCache). |
@@ -0,0 +1,116 @@
1
+ ---
2
+ title: platform-caching
3
+ description: Layered caching with in-memory LRU and Redis-backed implementations, TTL, stale-while-revalidate, and metrics.
4
+ order: 15
5
+ tags: [caching, lru, redis, ttl, stale-while-revalidate, metrics]
6
+ package: '@breadstone/archipel-platform-caching'
7
+ ---
8
+
9
+ # platform-caching
10
+
11
+ Layered caching library providing both an in-memory LRU cache and a Redis-backed distributed cache. Both implementations share the `ILayeredCache` contract and support TTL expiration, stale-while-revalidate, warm-up, and pluggable metrics recording.
12
+
13
+ **Package:** `@breadstone/archipel-platform-caching`
14
+
15
+ ## Quick Start
16
+
17
+ ```typescript
18
+ import { MemoryLayeredCache } from '@breadstone/archipel-platform-caching';
19
+
20
+ const cache = new MemoryLayeredCache<string, IProduct>(async (key) => productRepository.findById(key), {
21
+ ttlMs: 60_000,
22
+ maxEntries: 500,
23
+ staleWhileRevalidate: true,
24
+ });
25
+
26
+ const product = await cache.getAsync('prod-123');
27
+ ```
28
+
29
+ For Redis-backed caching:
30
+
31
+ ```typescript
32
+ import { RedisLayeredCache } from '@breadstone/archipel-platform-caching/redis';
33
+
34
+ const cache = new RedisLayeredCache<string, IProduct>(redisClient, async (key) => productRepository.findById(key), {
35
+ ttlMs: 300_000,
36
+ cacheName: 'products',
37
+ });
38
+ ```
39
+
40
+ ---
41
+
42
+ ## ILayeredCache Interface
43
+
44
+ Both implementations share this contract:
45
+
46
+ | Method | Description |
47
+ | ---------------------- | ----------------------------------------------------------------- |
48
+ | `get(key)` | Synchronous cache lookup. |
49
+ | `getAsync(key)` | Asynchronous cache lookup — triggers the load function on a miss. |
50
+ | `set(key, value)` | Synchronous write. |
51
+ | `setAsync(key, value)` | Asynchronous write. |
52
+ | `invalidate(key)` | Synchronous eviction. |
53
+ | `invalidateAsync(key)` | Asynchronous eviction. |
54
+ | `warm(key)` | Proactively loads and caches a value. |
55
+ | `stats()` | Returns hit/miss/eviction counters as `ICacheStats`. |
56
+
57
+ ---
58
+
59
+ ## Configuration Options
60
+
61
+ ### ILayeredCacheOptions (In-Memory)
62
+
63
+ | Property | Type | Default | Description |
64
+ | ---------------------- | ----------------------- | ---------- | ------------------------------------------------------- |
65
+ | `ttlMs` | `number` | ∞ | Time-to-live in milliseconds. |
66
+ | `staleWhileRevalidate` | `boolean` | `false` | Serve stale entries while refreshing in the background. |
67
+ | `maxEntries` | `number` | ∞ | LRU eviction threshold. |
68
+ | `metricsRecorder` | `ICacheMetricsRecorder` | Noop | Pluggable metrics hook. |
69
+ | `cacheName` | `string` | `'memory'` | Label used in metrics and logging. |
70
+
71
+ ### IRedisLayeredCacheOptions
72
+
73
+ | Property | Type | Default | Description |
74
+ | ---------------------- | ----------------------- | ---------------- | ------------------------------------------------------- |
75
+ | `ttlMs` | `number` | ∞ | Time-to-live in milliseconds. |
76
+ | `staleWhileRevalidate` | `boolean` | `false` | Serve stale entries while refreshing in the background. |
77
+ | `metricsRecorder` | `ICacheMetricsRecorder` | Noop | Pluggable metrics hook. |
78
+ | `cacheName` | `string` | `'redis'` | Label used in metrics and logging. |
79
+ | `serialize` | `(value) => string` | `JSON.stringify` | Custom serializer for cache values. |
80
+ | `deserialize` | `(raw) => value` | `JSON.parse` | Custom deserializer for cache entries. |
81
+
82
+ ---
83
+
84
+ ## Metrics
85
+
86
+ Implement `ICacheMetricsRecorder` to forward cache statistics to your telemetry system:
87
+
88
+ ```typescript
89
+ import { ICacheMetricsRecorder } from '@breadstone/archipel-platform-caching';
90
+
91
+ class TelemetryCacheRecorder implements ICacheMetricsRecorder {
92
+ recordHit(cacheName: string): void {
93
+ /* increment counter */
94
+ }
95
+ recordMiss(cacheName: string): void {
96
+ /* increment counter */
97
+ }
98
+ recordLoadSuccess(cacheName: string, durationMs: number): void {
99
+ /* histogram */
100
+ }
101
+ recordLoadError(cacheName: string): void {
102
+ /* increment counter */
103
+ }
104
+ recordEviction(cacheName: string): void {
105
+ /* increment counter */
106
+ }
107
+ }
108
+ ```
109
+
110
+ When no recorder is provided, `NoopCacheMetricsRecorder` is used as a silent fallback.
111
+
112
+ ---
113
+
114
+ ## API Reference
115
+
116
+ See the full [API documentation](./api/) for all exported types and classes.
@@ -6,7 +6,7 @@ editUrl: false
6
6
 
7
7
  # Class: AppHealthIndicator
8
8
 
9
- Defined in: [terminus/AppHealthIndicator.ts:15](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-core/src/terminus/AppHealthIndicator.ts#L15)
9
+ Defined in: [terminus/AppHealthIndicator.ts:16](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-core/src/terminus/AppHealthIndicator.ts#L16)
10
10
 
11
11
  Health indicator for the application.
12
12
 
@@ -18,7 +18,7 @@ Health indicator for the application.
18
18
  new AppHealthIndicator(configService): AppHealthIndicator;
19
19
  ```
20
20
 
21
- Defined in: [terminus/AppHealthIndicator.ts:30](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-core/src/terminus/AppHealthIndicator.ts#L30)
21
+ Defined in: [terminus/AppHealthIndicator.ts:31](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-core/src/terminus/AppHealthIndicator.ts#L31)
22
22
 
23
23
  Constructs a new instance of the `AppHealthIndicator` class.
24
24
 
@@ -40,7 +40,7 @@ Constructs a new instance of the `AppHealthIndicator` class.
40
40
  isHealthy(): HealthIndicatorResult<"app">;
41
41
  ```
42
42
 
43
- Defined in: [terminus/AppHealthIndicator.ts:46](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-core/src/terminus/AppHealthIndicator.ts#L46)
43
+ Defined in: [terminus/AppHealthIndicator.ts:47](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-core/src/terminus/AppHealthIndicator.ts#L47)
44
44
 
45
45
  Checks if the Open Food Facts API is reachable.
46
46
 
@@ -6,7 +6,7 @@ editUrl: false
6
6
 
7
7
  # Class: ErrorTemplateService
8
8
 
9
- Defined in: [services/ErrorTemplateService.ts:81](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-core/src/services/ErrorTemplateService.ts#L81)
9
+ Defined in: [services/ErrorTemplateService.ts:82](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-core/src/services/ErrorTemplateService.ts#L82)
10
10
 
11
11
  Service for rendering error page templates.
12
12
 
@@ -21,7 +21,7 @@ new ErrorTemplateService(
21
21
  resourceManager): ErrorTemplateService;
22
22
  ```
23
23
 
24
- Defined in: [services/ErrorTemplateService.ts:98](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-core/src/services/ErrorTemplateService.ts#L98)
24
+ Defined in: [services/ErrorTemplateService.ts:99](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-core/src/services/ErrorTemplateService.ts#L99)
25
25
 
26
26
  Constructs a new instance of the `ErrorTemplateService` class.
27
27
 
@@ -45,7 +45,7 @@ Constructs a new instance of the `ErrorTemplateService` class.
45
45
  getErrorMessage(statusCode): string;
46
46
  ```
47
47
 
48
- Defined in: [services/ErrorTemplateService.ts:184](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-core/src/services/ErrorTemplateService.ts#L184)
48
+ Defined in: [services/ErrorTemplateService.ts:185](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-core/src/services/ErrorTemplateService.ts#L185)
49
49
 
50
50
  Gets a human-readable error message based on status code.
51
51
 
@@ -69,7 +69,7 @@ The error message.
69
69
  getErrorPageContent(params): Promise<string>;
70
70
  ```
71
71
 
72
- Defined in: [services/ErrorTemplateService.ts:119](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-core/src/services/ErrorTemplateService.ts#L119)
72
+ Defined in: [services/ErrorTemplateService.ts:120](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-core/src/services/ErrorTemplateService.ts#L120)
73
73
 
74
74
  Retrieves the error page HTML content.
75
75
 
@@ -93,7 +93,7 @@ The rendered HTML content.
93
93
  getErrorTitle(statusCode): string;
94
94
  ```
95
95
 
96
- Defined in: [services/ErrorTemplateService.ts:155](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-core/src/services/ErrorTemplateService.ts#L155)
96
+ Defined in: [services/ErrorTemplateService.ts:156](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-core/src/services/ErrorTemplateService.ts#L156)
97
97
 
98
98
  Gets a human-readable error title based on status code.
99
99
 
@@ -6,7 +6,7 @@ editUrl: false
6
6
 
7
7
  # Class: HostService
8
8
 
9
- Defined in: [services/HostService.ts:142](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-core/src/services/HostService.ts#L142)
9
+ Defined in: [services/HostService.ts:143](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-core/src/services/HostService.ts#L143)
10
10
 
11
11
  The `HostService` class.
12
12
 
@@ -21,7 +21,7 @@ new HostService(
21
21
  resourceManager): HostService;
22
22
  ```
23
23
 
24
- Defined in: [services/HostService.ts:159](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-core/src/services/HostService.ts#L159)
24
+ Defined in: [services/HostService.ts:160](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-core/src/services/HostService.ts#L160)
25
25
 
26
26
  Constructs a new instance of the `HostService` class.
27
27
 
@@ -47,7 +47,7 @@ Constructs a new instance of the `HostService` class.
47
47
  get host(): string;
48
48
  ```
49
49
 
50
- Defined in: [services/HostService.ts:195](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-core/src/services/HostService.ts#L195)
50
+ Defined in: [services/HostService.ts:196](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-core/src/services/HostService.ts#L196)
51
51
 
52
52
  The full host (URL + port in development).
53
53
 
@@ -65,7 +65,7 @@ The full host (URL + port in development).
65
65
  get port(): number;
66
66
  ```
67
67
 
68
- Defined in: [services/HostService.ts:185](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-core/src/services/HostService.ts#L185)
68
+ Defined in: [services/HostService.ts:186](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-core/src/services/HostService.ts#L186)
69
69
 
70
70
  The port of the host.
71
71
 
@@ -83,7 +83,7 @@ The port of the host.
83
83
  get stage(): "unknown" | "local" | "development" | "preview" | "production";
84
84
  ```
85
85
 
86
- Defined in: [services/HostService.ts:207](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-core/src/services/HostService.ts#L207)
86
+ Defined in: [services/HostService.ts:208](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-core/src/services/HostService.ts#L208)
87
87
 
88
88
  The current stage of the application.
89
89
 
@@ -101,7 +101,7 @@ The current stage of the application.
101
101
  get url(): string;
102
102
  ```
103
103
 
104
- Defined in: [services/HostService.ts:175](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-core/src/services/HostService.ts#L175)
104
+ Defined in: [services/HostService.ts:176](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-core/src/services/HostService.ts#L176)
105
105
 
106
106
  The URL of the host.
107
107
 
@@ -119,7 +119,7 @@ The URL of the host.
119
119
  get version(): string;
120
120
  ```
121
121
 
122
- Defined in: [services/HostService.ts:228](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-core/src/services/HostService.ts#L228)
122
+ Defined in: [services/HostService.ts:229](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-core/src/services/HostService.ts#L229)
123
123
 
124
124
  The application version.
125
125
 
@@ -135,7 +135,7 @@ The application version.
135
135
  getHostContent(params): Promise<string>;
136
136
  ```
137
137
 
138
- Defined in: [services/HostService.ts:240](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-core/src/services/HostService.ts#L240)
138
+ Defined in: [services/HostService.ts:241](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-core/src/services/HostService.ts#L241)
139
139
 
140
140
  Retrieves the host content
141
141