@breadstone/archipel-mcp 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +80 -0
- package/data/packages/index.md +42 -0
- package/data/packages/platform-authentication/api/Class.AnonymousAuthGuard.md +45 -0
- package/data/packages/platform-authentication/api/Class.AuthModule.md +72 -0
- package/data/packages/platform-authentication/api/Class.AuthSubjectPort.md +100 -0
- package/data/packages/platform-authentication/api/Class.AuthTokenService.md +64 -0
- package/data/packages/platform-authentication/api/Class.ChallengeService.md +136 -0
- package/data/packages/platform-authentication/api/Class.GithubAuthGuard.md +45 -0
- package/data/packages/platform-authentication/api/Class.JwtAuthGuard.md +45 -0
- package/data/packages/platform-authentication/api/Class.JwtPayloadBase.md +116 -0
- package/data/packages/platform-authentication/api/Class.LastActiveMiddleware.md +76 -0
- package/data/packages/platform-authentication/api/Class.LocalAuthGuard.md +45 -0
- package/data/packages/platform-authentication/api/Class.MfaService.md +257 -0
- package/data/packages/platform-authentication/api/Class.MfaSubjectPort.md +75 -0
- package/data/packages/platform-authentication/api/Class.RolesGuard.md +65 -0
- package/data/packages/platform-authentication/api/Class.SessionMappingProfile.md +65 -0
- package/data/packages/platform-authentication/api/Class.SessionPersistencePort.md +170 -0
- package/data/packages/platform-authentication/api/Class.SessionResponse.md +157 -0
- package/data/packages/platform-authentication/api/Class.SessionService.md +167 -0
- package/data/packages/platform-authentication/api/Class.SocialAuthGuard.md +66 -0
- package/data/packages/platform-authentication/api/Class.SocialAuthPort.md +53 -0
- package/data/packages/platform-authentication/api/Class.TokenEnricherPort.md +52 -0
- package/data/packages/platform-authentication/api/Class.VerificationService.md +159 -0
- package/data/packages/platform-authentication/api/Class.VerificationSubjectPort.md +121 -0
- package/data/packages/platform-authentication/api/Interface.IAuthModuleOptions.md +89 -0
- package/data/packages/platform-authentication/api/Interface.IAuthSubject.md +112 -0
- package/data/packages/platform-authentication/api/Interface.IMfaChallengePayload.md +87 -0
- package/data/packages/platform-authentication/api/Interface.IMfaChallengeState.md +123 -0
- package/data/packages/platform-authentication/api/Interface.IMfaConfirmation.md +27 -0
- package/data/packages/platform-authentication/api/Interface.IMfaSetup.md +63 -0
- package/data/packages/platform-authentication/api/Interface.IMfaSubject.md +136 -0
- package/data/packages/platform-authentication/api/Interface.IMfaSubjectUpdate.md +96 -0
- package/data/packages/platform-authentication/api/Interface.ISessionRecord.md +165 -0
- package/data/packages/platform-authentication/api/Interface.ISignInResult.md +87 -0
- package/data/packages/platform-authentication/api/Interface.ISocialProfile.md +63 -0
- package/data/packages/platform-authentication/api/Interface.IStoreSessionArgs.md +75 -0
- package/data/packages/platform-authentication/api/Interface.IVerifiableSubject.md +76 -0
- package/data/packages/platform-authentication/api/_media/ENVIRONMENT_VARIABLES.md +151 -0
- package/data/packages/platform-authentication/api/index.md +508 -0
- package/data/packages/platform-authentication/index.md +635 -0
- package/data/packages/platform-blob-storage/api/Class.BlobHealthIndicator.md +84 -0
- package/data/packages/platform-blob-storage/api/Class.BlobModule.md +54 -0
- package/data/packages/platform-blob-storage/api/Class.BlobObjectPersistencePort.md +80 -0
- package/data/packages/platform-blob-storage/api/Class.BlobService.md +253 -0
- package/data/packages/platform-blob-storage/api/Class.BlobVariantPersistencePort.md +56 -0
- package/data/packages/platform-blob-storage/api/Class.VercelBlobProvider.md +202 -0
- package/data/packages/platform-blob-storage/api/Interface.IBlobDeleteRequest.md +43 -0
- package/data/packages/platform-blob-storage/api/Interface.IBlobDownloadRequest.md +53 -0
- package/data/packages/platform-blob-storage/api/Interface.IBlobDownloadResult.md +69 -0
- package/data/packages/platform-blob-storage/api/Interface.IBlobModuleOptions.md +53 -0
- package/data/packages/platform-blob-storage/api/Interface.IBlobObjectMetadata.md +143 -0
- package/data/packages/platform-blob-storage/api/Interface.IBlobProvider.md +119 -0
- package/data/packages/platform-blob-storage/api/Interface.IBlobSignedUrlRequest.md +53 -0
- package/data/packages/platform-blob-storage/api/Interface.IBlobUploadRequest.md +103 -0
- package/data/packages/platform-blob-storage/api/Interface.IBlobUploadResult.md +33 -0
- package/data/packages/platform-blob-storage/api/Interface.ICustomBlobProviderRegistration.md +33 -0
- package/data/packages/platform-blob-storage/api/Interface.IVercelBlobProviderOptions.md +73 -0
- package/data/packages/platform-blob-storage/api/Interface.IVercelBlobProviderRegistration.md +33 -0
- package/data/packages/platform-blob-storage/api/TypeAlias.BlobDownloadResponseType.md +17 -0
- package/data/packages/platform-blob-storage/api/TypeAlias.BlobUploadBody.md +17 -0
- package/data/packages/platform-blob-storage/api/TypeAlias.IBlobProviderRegistration.md +17 -0
- package/data/packages/platform-blob-storage/api/index.md +111 -0
- package/data/packages/platform-blob-storage/index.md +280 -0
- package/data/packages/platform-core/api/Class.AppHealthIndicator.md +51 -0
- package/data/packages/platform-core/api/Class.BcryptService.md +69 -0
- package/data/packages/platform-core/api/Class.BlobResourceStrategy.md +196 -0
- package/data/packages/platform-core/api/Class.BooleanUtils.md +83 -0
- package/data/packages/platform-core/api/Class.CUIDGenerator.md +121 -0
- package/data/packages/platform-core/api/Class.CasingInterceptor.md +84 -0
- package/data/packages/platform-core/api/Class.CatchUtils.md +94 -0
- package/data/packages/platform-core/api/Class.ConfigModule.md +70 -0
- package/data/packages/platform-core/api/Class.ConfigRegistry.md +116 -0
- package/data/packages/platform-core/api/Class.ConfigService.md +139 -0
- package/data/packages/platform-core/api/Class.ConfigStrategyBase.md +110 -0
- package/data/packages/platform-core/api/Class.ContentTemplateEngine.md +64 -0
- package/data/packages/platform-core/api/Class.CryptoService.md +50 -0
- package/data/packages/platform-core/api/Class.DateTimeUtils.md +102 -0
- package/data/packages/platform-core/api/Class.DeviceParserService.md +53 -0
- package/data/packages/platform-core/api/Class.EmbeddedResourceStrategy.md +216 -0
- package/data/packages/platform-core/api/Class.EnvironmentConfigStrategy.md +144 -0
- package/data/packages/platform-core/api/Class.ErrorTemplateService.md +110 -0
- package/data/packages/platform-core/api/Class.EventHub.md +164 -0
- package/data/packages/platform-core/api/Class.EventModule.md +23 -0
- package/data/packages/platform-core/api/Class.FileConfigStrategy.md +150 -0
- package/data/packages/platform-core/api/Class.FileResourceStrategy.md +193 -0
- package/data/packages/platform-core/api/Class.GUIDGenerator.md +86 -0
- package/data/packages/platform-core/api/Class.GlobalExceptionFilter.md +67 -0
- package/data/packages/platform-core/api/Class.HealthModule.md +43 -0
- package/data/packages/platform-core/api/Class.HealthOrchestrator.md +65 -0
- package/data/packages/platform-core/api/Class.HostModule.md +33 -0
- package/data/packages/platform-core/api/Class.HostService.md +150 -0
- package/data/packages/platform-core/api/Class.HttpLoggerMiddleware.md +60 -0
- package/data/packages/platform-core/api/Class.IdGeneratorBase.md +88 -0
- package/data/packages/platform-core/api/Class.IdentifierModule.md +41 -0
- package/data/packages/platform-core/api/Class.IntelligenceCapabilityRegistrarBase.md +39 -0
- package/data/packages/platform-core/api/Class.IntelligenceCapabilityRegistry.md +103 -0
- package/data/packages/platform-core/api/Class.IntelligenceModule.md +23 -0
- package/data/packages/platform-core/api/Class.IntelligenceTextGenerator.md +82 -0
- package/data/packages/platform-core/api/Class.LimitRequestSizeMiddleware.md +60 -0
- package/data/packages/platform-core/api/Class.LocalizedTextRequest.md +43 -0
- package/data/packages/platform-core/api/Class.LocalizedTextResponse.md +43 -0
- package/data/packages/platform-core/api/Class.MappingBuilder.md +111 -0
- package/data/packages/platform-core/api/Class.MappingModule.md +47 -0
- package/data/packages/platform-core/api/Class.MappingNotRegisteredError.md +57 -0
- package/data/packages/platform-core/api/Class.MappingProfileBase.md +53 -0
- package/data/packages/platform-core/api/Class.MappingService.md +285 -0
- package/data/packages/platform-core/api/Class.MemoryLayeredCache.md +251 -0
- package/data/packages/platform-core/api/Class.NoopCacheMetricsRecorder.md +157 -0
- package/data/packages/platform-core/api/Class.NormalizedUtils.md +149 -0
- package/data/packages/platform-core/api/Class.OtpService.md +106 -0
- package/data/packages/platform-core/api/Class.PageableRequest.md +43 -0
- package/data/packages/platform-core/api/Class.PageableResponse.md +63 -0
- package/data/packages/platform-core/api/Class.ProblemDetailException.md +62 -0
- package/data/packages/platform-core/api/Class.ProblemDetailExceptionFilter.md +85 -0
- package/data/packages/platform-core/api/Class.QuantityResponse.md +43 -0
- package/data/packages/platform-core/api/Class.RedisLayeredCache.md +275 -0
- package/data/packages/platform-core/api/Class.ResourceManager.md +566 -0
- package/data/packages/platform-core/api/Class.ResourceModule.md +47 -0
- package/data/packages/platform-core/api/Class.ResponseReturn.md +504 -0
- package/data/packages/platform-core/api/Class.SseHub.md +184 -0
- package/data/packages/platform-core/api/Class.SseModule.md +43 -0
- package/data/packages/platform-core/api/Class.TimeStampResponse.md +43 -0
- package/data/packages/platform-core/api/Class.TypeMappingNotRegisteredError.md +58 -0
- package/data/packages/platform-core/api/Class.UUIDGenerator.md +86 -0
- package/data/packages/platform-core/api/Class.UserAvatarGeneratorService.md +48 -0
- package/data/packages/platform-core/api/Class.UserNameGeneratorService.md +65 -0
- package/data/packages/platform-core/api/Interface.IBlobResourceStrategyConfig.md +29 -0
- package/data/packages/platform-core/api/Interface.IBlobServiceAdapter.md +41 -0
- package/data/packages/platform-core/api/Interface.ICacheMetricsRecorder.md +121 -0
- package/data/packages/platform-core/api/Interface.ICacheStats.md +71 -0
- package/data/packages/platform-core/api/Interface.IConfigKey.md +64 -0
- package/data/packages/platform-core/api/Interface.IConfigModuleOptions.md +41 -0
- package/data/packages/platform-core/api/Interface.IConfigRegistryEntry.md +80 -0
- package/data/packages/platform-core/api/Interface.IDeviceInfo.md +81 -0
- package/data/packages/platform-core/api/Interface.IErrorPageParams.md +154 -0
- package/data/packages/platform-core/api/Interface.IEventKey.md +58 -0
- package/data/packages/platform-core/api/Interface.IEventMap.md +17 -0
- package/data/packages/platform-core/api/Interface.IFileResourceStrategyConfig.md +73 -0
- package/data/packages/platform-core/api/Interface.IHealthCheckResult.md +47 -0
- package/data/packages/platform-core/api/Interface.IHealthIndicator.md +42 -0
- package/data/packages/platform-core/api/Interface.IHostContentParams.md +233 -0
- package/data/packages/platform-core/api/Interface.IIdGenerator.md +58 -0
- package/data/packages/platform-core/api/Interface.IIntelligenceArtifact.md +31 -0
- package/data/packages/platform-core/api/Interface.IIntelligenceCapability.md +62 -0
- package/data/packages/platform-core/api/Interface.IIntelligenceCapabilityMetadata.md +61 -0
- package/data/packages/platform-core/api/Interface.IIntelligenceCapabilityPayload.md +41 -0
- package/data/packages/platform-core/api/Interface.IIntelligenceCapabilityRegistry.md +69 -0
- package/data/packages/platform-core/api/Interface.IIntelligenceCapabilityResult.md +41 -0
- package/data/packages/platform-core/api/Interface.IIntelligenceCompletionUsage.md +41 -0
- package/data/packages/platform-core/api/Interface.IIntelligenceContext.md +63 -0
- package/data/packages/platform-core/api/Interface.IIntelligenceContextBuilder.md +32 -0
- package/data/packages/platform-core/api/Interface.IIntelligenceConversationMessageSnapshot.md +61 -0
- package/data/packages/platform-core/api/Interface.IIntelligenceConversationSnapshot.md +51 -0
- package/data/packages/platform-core/api/Interface.IIntelligenceFollowUpQuestion.md +41 -0
- package/data/packages/platform-core/api/Interface.IIntelligenceIntent.md +41 -0
- package/data/packages/platform-core/api/Interface.IIntelligenceIntentEntity.md +31 -0
- package/data/packages/platform-core/api/Interface.IIntelligenceMessageModel.md +61 -0
- package/data/packages/platform-core/api/Interface.IIntelligenceMessagePayload.md +31 -0
- package/data/packages/platform-core/api/Interface.IIntelligencePrompt.md +31 -0
- package/data/packages/platform-core/api/Interface.IIntelligencePromptMessage.md +31 -0
- package/data/packages/platform-core/api/Interface.IIntelligenceProviderConfiguration.md +81 -0
- package/data/packages/platform-core/api/Interface.IIntelligenceResponseMessage.md +31 -0
- package/data/packages/platform-core/api/Interface.IIntelligenceTextCompletion.md +53 -0
- package/data/packages/platform-core/api/Interface.IIntelligenceTextGenerationOptions.md +41 -0
- package/data/packages/platform-core/api/Interface.IIntelligenceTextGenerator.md +46 -0
- package/data/packages/platform-core/api/Interface.ILayeredCache.md +194 -0
- package/data/packages/platform-core/api/Interface.ILayeredCacheOptions.md +71 -0
- package/data/packages/platform-core/api/Interface.IMappingBuilder.md +77 -0
- package/data/packages/platform-core/api/Interface.IMappingKey.md +59 -0
- package/data/packages/platform-core/api/Interface.IMappingProfile.md +33 -0
- package/data/packages/platform-core/api/Interface.IOtpService.md +78 -0
- package/data/packages/platform-core/api/Interface.IOtpUriOptions.md +47 -0
- package/data/packages/platform-core/api/Interface.IRedisLayeredCacheOptions.md +108 -0
- package/data/packages/platform-core/api/Interface.IResourceManagerConfig.md +72 -0
- package/data/packages/platform-core/api/Interface.IResourceMetadata.md +95 -0
- package/data/packages/platform-core/api/Interface.IResourceResult.md +35 -0
- package/data/packages/platform-core/api/Interface.IResourceStrategy.md +135 -0
- package/data/packages/platform-core/api/Interface.ISseEventData.md +37 -0
- package/data/packages/platform-core/api/Interface.ISseHub.md +92 -0
- package/data/packages/platform-core/api/Namespace.ISseEventData.md +34 -0
- package/data/packages/platform-core/api/TypeAlias.CamelCase.md +19 -0
- package/data/packages/platform-core/api/TypeAlias.IntelligenceConversationMessageRole.md +16 -0
- package/data/packages/platform-core/api/TypeAlias.IntelligenceProviderName.md +15 -0
- package/data/packages/platform-core/api/TypeAlias.ProblemDetail.md +29 -0
- package/data/packages/platform-core/api/TypeAlias.ProblemDetailTypeUrlResolver.md +26 -0
- package/data/packages/platform-core/api/TypeAlias.SetOptional.md +22 -0
- package/data/packages/platform-core/api/TypeAlias.StringValue.md +13 -0
- package/data/packages/platform-core/api/index.md +645 -0
- package/data/packages/platform-core/index.md +483 -0
- package/data/packages/platform-database/api/Class.DatabaseHealthIndicator.md +80 -0
- package/data/packages/platform-database/api/Class.DatabaseModule.md +75 -0
- package/data/packages/platform-database/api/Class.DatabaseService.md +165 -0
- package/data/packages/platform-database/api/Class.PrismaService.md +116 -0
- package/data/packages/platform-database/api/Class.RepositoryBase.md +526 -0
- package/data/packages/platform-database/api/Class.RepositoryExceptionFilter.md +60 -0
- package/data/packages/platform-database/api/Interface.IDatabaseModuleConfig.md +27 -0
- package/data/packages/platform-database/api/Interface.IPaginateOptions.md +33 -0
- package/data/packages/platform-database/api/Interface.IPaginatedResult.md +82 -0
- package/data/packages/platform-database/api/Interface.IRepositoryQuery.md +56 -0
- package/data/packages/platform-database/api/Interface.ITransactionalRepositoryQuery.md +55 -0
- package/data/packages/platform-database/api/TypeAlias.DelegateArgs.md +23 -0
- package/data/packages/platform-database/api/TypeAlias.DelegateReturnTypes.md +23 -0
- package/data/packages/platform-database/api/TypeAlias.PaginateFunction.md +36 -0
- package/data/packages/platform-database/api/TypeAlias.QueryResultType.md +32 -0
- package/data/packages/platform-database/api/TypeAlias.TransactionalQueryResultType.md +31 -0
- package/data/packages/platform-database/api/index.md +183 -0
- package/data/packages/platform-database/index.md +300 -0
- package/data/packages/platform-documents/api/Class.BaseDocumentRenderer.md +103 -0
- package/data/packages/platform-documents/api/Class.DocumentEngine.md +85 -0
- package/data/packages/platform-documents/api/Class.DocumentModule.md +52 -0
- package/data/packages/platform-documents/api/Class.SharpImageProcessor.md +136 -0
- package/data/packages/platform-documents/api/Interface.IDocumentModuleOptions.md +100 -0
- package/data/packages/platform-documents/api/Interface.IDocumentPlaceholderDetail.md +75 -0
- package/data/packages/platform-documents/api/Interface.IDocumentProbeReport.md +123 -0
- package/data/packages/platform-documents/api/Interface.IDocumentRenderer.md +52 -0
- package/data/packages/platform-documents/api/Interface.IImagePayload.md +63 -0
- package/data/packages/platform-documents/api/Interface.IImageProcessor.md +100 -0
- package/data/packages/platform-documents/api/Interface.IRenderOptions.md +69 -0
- package/data/packages/platform-documents/api/Interface.IRenderResult.md +63 -0
- package/data/packages/platform-documents/api/TypeAlias.DocumentFormat.md +19 -0
- package/data/packages/platform-documents/api/TypeAlias.EngineType.md +19 -0
- package/data/packages/platform-documents/api/TypeAlias.ImageMimeType.md +19 -0
- package/data/packages/platform-documents/api/TypeAlias.TemplateFormat.md +19 -0
- package/data/packages/platform-documents/api/TypeAlias.TemplateType.md +19 -0
- package/data/packages/platform-documents/api/index.md +91 -0
- package/data/packages/platform-documents/index.md +219 -0
- package/data/packages/platform-logging/api/Class.AnalyticsService.md +113 -0
- package/data/packages/platform-logging/api/Class.LoggerModule.md +25 -0
- package/data/packages/platform-logging/api/index.md +42 -0
- package/data/packages/platform-logging/index.md +92 -0
- package/data/packages/platform-mailing/api/Class.BlobTemplateFetchStrategy.md +67 -0
- package/data/packages/platform-mailing/api/Class.DeliveryStrategyBase.md +55 -0
- package/data/packages/platform-mailing/api/Class.FileTemplateFetchStrategy.md +65 -0
- package/data/packages/platform-mailing/api/Class.LogDeliveryStrategy.md +82 -0
- package/data/packages/platform-mailing/api/Class.MailHealthIndicator.md +83 -0
- package/data/packages/platform-mailing/api/Class.MailModule.md +27 -0
- package/data/packages/platform-mailing/api/Class.MailService.md +101 -0
- package/data/packages/platform-mailing/api/Class.MailTemplateEngine.md +98 -0
- package/data/packages/platform-mailing/api/Class.MailVerificationService.md +90 -0
- package/data/packages/platform-mailing/api/Class.MailgunDeliveryStrategy.md +82 -0
- package/data/packages/platform-mailing/api/Class.PostmarkDeliveryStrategy.md +82 -0
- package/data/packages/platform-mailing/api/Class.ResendDeliveryStrategy.md +82 -0
- package/data/packages/platform-mailing/api/Class.SendGridDeliveryStrategy.md +82 -0
- package/data/packages/platform-mailing/api/Class.SmtpDeliveryStrategy.md +82 -0
- package/data/packages/platform-mailing/api/Class.TemplateFetchStrategyBase.md +42 -0
- package/data/packages/platform-mailing/api/Interface.IMailEvents.md +71 -0
- package/data/packages/platform-mailing/api/Interface.IMailTemplateVariants.md +35 -0
- package/data/packages/platform-mailing/api/TypeAlias.MailTemplateFormat.md +19 -0
- package/data/packages/platform-mailing/api/index.md +404 -0
- package/data/packages/platform-mailing/index.md +335 -0
- package/data/packages/platform-mcp/api/Class.McpDiscoveryService.md +65 -0
- package/data/packages/platform-mcp/api/Class.McpModule.md +83 -0
- package/data/packages/platform-mcp/api/Class.McpRegistryService.md +147 -0
- package/data/packages/platform-mcp/api/Class.McpServerService.md +197 -0
- package/data/packages/platform-mcp/api/Interface.IMcpHandlerMetadata.md +47 -0
- package/data/packages/platform-mcp/api/Interface.IMcpModuleAsyncOptions.md +76 -0
- package/data/packages/platform-mcp/api/Interface.IMcpModuleOptions.md +126 -0
- package/data/packages/platform-mcp/api/Interface.IMcpModuleOptionsFactory.md +28 -0
- package/data/packages/platform-mcp/api/Interface.IMcpPromptMetadata.md +59 -0
- package/data/packages/platform-mcp/api/Interface.IMcpResourceMetadata.md +73 -0
- package/data/packages/platform-mcp/api/Interface.IMcpToolMetadata.md +83 -0
- package/data/packages/platform-mcp/api/Interface.IRegisteredPrompt.md +41 -0
- package/data/packages/platform-mcp/api/Interface.IRegisteredResource.md +41 -0
- package/data/packages/platform-mcp/api/Interface.IRegisteredTool.md +41 -0
- package/data/packages/platform-mcp/api/Interface.ISseTransportOptions.md +23 -0
- package/data/packages/platform-mcp/api/Interface.IStreamableHttpTransportOptions.md +39 -0
- package/data/packages/platform-mcp/api/index.md +123 -0
- package/data/packages/platform-mcp/index.md +299 -0
- package/data/packages/platform-openapi/api/Class.SwaggerFeatureDiscovery.md +71 -0
- package/data/packages/platform-openapi/api/Class.SwaggerFeatureRegistry.md +104 -0
- package/data/packages/platform-openapi/api/Class.SwaggerMultiDocumentService.md +82 -0
- package/data/packages/platform-openapi/api/Class.SwaggerTheme.md +51 -0
- package/data/packages/platform-openapi/api/Interface.IFeatureSwaggerConfig.md +73 -0
- package/data/packages/platform-openapi/api/Interface.ISwaggerFeatureMetadata.md +73 -0
- package/data/packages/platform-openapi/api/index.md +209 -0
- package/data/packages/platform-openapi/index.md +170 -0
- package/data/packages/platform-payments/api/Class.FeatureAccessPort.md +79 -0
- package/data/packages/platform-payments/api/Class.FeatureGuard.md +73 -0
- package/data/packages/platform-payments/api/Class.FeatureUsageInterceptor.md +74 -0
- package/data/packages/platform-payments/api/Class.LemonSqueezyClient.md +168 -0
- package/data/packages/platform-payments/api/Class.MollieClient.md +168 -0
- package/data/packages/platform-payments/api/Class.PaddleClient.md +168 -0
- package/data/packages/platform-payments/api/Class.PaymentClientPort.md +147 -0
- package/data/packages/platform-payments/api/Class.PaymentModule.md +53 -0
- package/data/packages/platform-payments/api/Class.StripeClient.md +168 -0
- package/data/packages/platform-payments/api/Interface.IFeatureAccessResult.md +75 -0
- package/data/packages/platform-payments/api/Interface.INormalizedCheckoutSession.md +75 -0
- package/data/packages/platform-payments/api/Interface.INormalizedPrice.md +85 -0
- package/data/packages/platform-payments/api/Interface.INormalizedSubscription.md +105 -0
- package/data/packages/platform-payments/api/Interface.INormalizedWebhookEvent.md +89 -0
- package/data/packages/platform-payments/api/Interface.IPaymentModuleOptions.md +65 -0
- package/data/packages/platform-payments/api/TypeAlias.SubscriptionStatus.md +27 -0
- package/data/packages/platform-payments/api/index.md +243 -0
- package/data/packages/platform-payments/index.md +532 -0
- package/data/packages/platform-reporting/api/Class.ReportingContributorRegistry.md +57 -0
- package/data/packages/platform-reporting/api/Class.ReportingDatasetNotFoundError.md +41 -0
- package/data/packages/platform-reporting/api/Class.ReportingFacade.md +85 -0
- package/data/packages/platform-reporting/api/Class.ReportingModule.md +23 -0
- package/data/packages/platform-reporting/api/Interface.IReportingContributor.md +62 -0
- package/data/packages/platform-reporting/api/Interface.IReportingDataset.md +83 -0
- package/data/packages/platform-reporting/api/Interface.IReportingDatasetField.md +71 -0
- package/data/packages/platform-reporting/api/Interface.IReportingQuery.md +61 -0
- package/data/packages/platform-reporting/api/Interface.IReportingQueryFilter.md +41 -0
- package/data/packages/platform-reporting/api/Interface.IReportingQueryResult.md +61 -0
- package/data/packages/platform-reporting/api/Interface.IReportingQuerySort.md +31 -0
- package/data/packages/platform-reporting/api/TypeAlias.ReportingFieldType.md +13 -0
- package/data/packages/platform-reporting/api/TypeAlias.ReportingFilterOperator.md +13 -0
- package/data/packages/platform-reporting/api/TypeAlias.ReportingQueryResultRow.md +15 -0
- package/data/packages/platform-reporting/api/index.md +90 -0
- package/data/packages/platform-reporting/index.md +229 -0
- package/data/packages/platform-telemetry/api/Class.NoopTelemetryFacade.md +118 -0
- package/data/packages/platform-telemetry/api/Class.TelemetryCacheMetricsRecorder.md +180 -0
- package/data/packages/platform-telemetry/api/Class.TelemetryFacade.md +132 -0
- package/data/packages/platform-telemetry/api/Class.TelemetryLoggerService.md +231 -0
- package/data/packages/platform-telemetry/api/Class.TelemetryModule.md +45 -0
- package/data/packages/platform-telemetry/api/Class.TelemetryRuleEngine.md +53 -0
- package/data/packages/platform-telemetry/api/Interface.ITelemetryFacade.md +90 -0
- package/data/packages/platform-telemetry/api/Interface.ITelemetryMetricsOptions.md +43 -0
- package/data/packages/platform-telemetry/api/Interface.ITelemetryOptions.md +141 -0
- package/data/packages/platform-telemetry/api/Interface.ITelemetryTracesOptions.md +43 -0
- package/data/packages/platform-telemetry/api/index.md +81 -0
- package/data/packages/platform-telemetry/index.md +234 -0
- package/package.json +39 -0
- package/src/DocsLoader.d.ts +14 -0
- package/src/DocsLoader.js +103 -0
- package/src/knowledge/configPattern.d.ts +5 -0
- package/src/knowledge/configPattern.js +211 -0
- package/src/knowledge/dtoPattern.d.ts +5 -0
- package/src/knowledge/dtoPattern.js +286 -0
- package/src/knowledge/errorHandlingPattern.d.ts +5 -0
- package/src/knowledge/errorHandlingPattern.js +219 -0
- package/src/knowledge/guardPattern.d.ts +5 -0
- package/src/knowledge/guardPattern.js +256 -0
- package/src/knowledge/mappingPattern.d.ts +6 -0
- package/src/knowledge/mappingPattern.js +322 -0
- package/src/knowledge/modulePattern.d.ts +6 -0
- package/src/knowledge/modulePattern.js +283 -0
- package/src/knowledge/queryPattern.d.ts +6 -0
- package/src/knowledge/queryPattern.js +215 -0
- package/src/knowledge/repositoryPattern.d.ts +6 -0
- package/src/knowledge/repositoryPattern.js +367 -0
- package/src/knowledge/testingPattern.d.ts +5 -0
- package/src/knowledge/testingPattern.js +356 -0
- package/src/main.d.ts +2 -0
- package/src/main.js +226 -0
- package/src/models/IPackageDoc.d.ts +19 -0
- package/src/models/IPackageDoc.js +3 -0
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: '@breadstone/archipel-platform-telemetry'
|
|
3
|
+
generated: true
|
|
4
|
+
editUrl: false
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
[**@breadstone/archipel-platform-telemetry**](../)
|
|
8
|
+
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
# @breadstone/archipel-platform-telemetry
|
|
12
|
+
|
|
13
|
+
## Classes
|
|
14
|
+
|
|
15
|
+
| Class | Description |
|
|
16
|
+
| -------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- |
|
|
17
|
+
| [NoopTelemetryFacade](Class.NoopTelemetryFacade) | - |
|
|
18
|
+
| [TelemetryCacheMetricsRecorder](Class.TelemetryCacheMetricsRecorder) | Generic cache metrics recorder that forwards cache lifecycle events into the telemetry facade (which may be a noop when disabled). |
|
|
19
|
+
| [TelemetryFacade](Class.TelemetryFacade) | - |
|
|
20
|
+
| [TelemetryLoggerService](Class.TelemetryLoggerService) | - |
|
|
21
|
+
| [TelemetryModule](Class.TelemetryModule) | - |
|
|
22
|
+
| [TelemetryRuleEngine](Class.TelemetryRuleEngine) | - |
|
|
23
|
+
|
|
24
|
+
## Interfaces
|
|
25
|
+
|
|
26
|
+
| Interface | Description |
|
|
27
|
+
| -------------------------------------------------------------- | ----------- |
|
|
28
|
+
| [ITelemetryFacade](Interface.ITelemetryFacade) | - |
|
|
29
|
+
| [ITelemetryMetricsOptions](Interface.ITelemetryMetricsOptions) | - |
|
|
30
|
+
| [ITelemetryOptions](Interface.ITelemetryOptions) | - |
|
|
31
|
+
| [ITelemetryTracesOptions](Interface.ITelemetryTracesOptions) | - |
|
|
32
|
+
|
|
33
|
+
## Variables
|
|
34
|
+
|
|
35
|
+
### defaultTelemetryOptions
|
|
36
|
+
|
|
37
|
+
```ts
|
|
38
|
+
const defaultTelemetryOptions: ITelemetryOptions;
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
Defined in: [options/TelemetryOptions.ts:35](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-telemetry/src/options/TelemetryOptions.ts#L35)
|
|
42
|
+
|
|
43
|
+
---
|
|
44
|
+
|
|
45
|
+
### TELEMETRY_ENABLED
|
|
46
|
+
|
|
47
|
+
```ts
|
|
48
|
+
const TELEMETRY_ENABLED: typeof TELEMETRY_ENABLED;
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
Defined in: [tokens.ts:4](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-telemetry/src/tokens.ts#L4)
|
|
52
|
+
|
|
53
|
+
---
|
|
54
|
+
|
|
55
|
+
### TELEMETRY_FACADE
|
|
56
|
+
|
|
57
|
+
```ts
|
|
58
|
+
const TELEMETRY_FACADE: typeof TELEMETRY_FACADE;
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
Defined in: [tokens.ts:3](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-telemetry/src/tokens.ts#L3)
|
|
62
|
+
|
|
63
|
+
---
|
|
64
|
+
|
|
65
|
+
### TELEMETRY_OPTIONS
|
|
66
|
+
|
|
67
|
+
```ts
|
|
68
|
+
const TELEMETRY_OPTIONS: typeof TELEMETRY_OPTIONS;
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
Defined in: [tokens.ts:2](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-telemetry/src/tokens.ts#L2)
|
|
72
|
+
|
|
73
|
+
---
|
|
74
|
+
|
|
75
|
+
### TELEMETRY_SHUTDOWN
|
|
76
|
+
|
|
77
|
+
```ts
|
|
78
|
+
const TELEMETRY_SHUTDOWN: typeof TELEMETRY_SHUTDOWN;
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
Defined in: [tokens.ts:5](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-telemetry/src/tokens.ts#L5)
|
|
@@ -0,0 +1,234 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: platform-telemetry
|
|
3
|
+
description: OpenTelemetry integration with tracing, metrics, and graceful no-op fallback.
|
|
4
|
+
order: 11
|
|
5
|
+
tags: [telemetry, opentelemetry, tracing, metrics, observability]
|
|
6
|
+
package: '@breadstone/archipel-platform-telemetry'
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# platform-telemetry
|
|
10
|
+
|
|
11
|
+
OpenTelemetry integration providing distributed tracing, metrics collection, and a graceful no-op fallback when telemetry is disabled. Wraps the OTEL SDK with a clean facade pattern.
|
|
12
|
+
|
|
13
|
+
**Package:** `@breadstone/archipel-platform-telemetry`
|
|
14
|
+
|
|
15
|
+
## Quick Start
|
|
16
|
+
|
|
17
|
+
```typescript
|
|
18
|
+
import { Module } from '@nestjs/common';
|
|
19
|
+
import { TelemetryModule } from '@breadstone/archipel-platform-telemetry';
|
|
20
|
+
|
|
21
|
+
@Module({
|
|
22
|
+
imports: [
|
|
23
|
+
TelemetryModule.register({
|
|
24
|
+
enabled: true,
|
|
25
|
+
}),
|
|
26
|
+
],
|
|
27
|
+
})
|
|
28
|
+
export class AppModule {}
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
---
|
|
32
|
+
|
|
33
|
+
## Module Configuration
|
|
34
|
+
|
|
35
|
+
### ITelemetryOptions
|
|
36
|
+
|
|
37
|
+
| Property | Type | Default | Description |
|
|
38
|
+
| --------- | --------- | ------- | ------------------------ |
|
|
39
|
+
| `enabled` | `boolean` | `false` | Enable/disable telemetry |
|
|
40
|
+
|
|
41
|
+
When disabled, the `NoopTelemetryFacade` is injected instead — all method calls are no-ops with zero overhead.
|
|
42
|
+
|
|
43
|
+
```typescript
|
|
44
|
+
// Disabled telemetry — safe, no-overhead
|
|
45
|
+
TelemetryModule.register({ enabled: false });
|
|
46
|
+
|
|
47
|
+
// Enabled telemetry — full OTEL SDK
|
|
48
|
+
TelemetryModule.register({ enabled: true });
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
---
|
|
52
|
+
|
|
53
|
+
## TelemetryFacade
|
|
54
|
+
|
|
55
|
+
Main API for recording operations, cache events, and custom metrics.
|
|
56
|
+
|
|
57
|
+
### Wrap Operations
|
|
58
|
+
|
|
59
|
+
Automatically trace async operations with duration, success/failure status, and error capture:
|
|
60
|
+
|
|
61
|
+
```typescript
|
|
62
|
+
import { TelemetryFacade, TELEMETRY_FACADE } from '@breadstone/archipel-platform-telemetry';
|
|
63
|
+
|
|
64
|
+
@Injectable()
|
|
65
|
+
export class OrderService {
|
|
66
|
+
constructor(@Inject(TELEMETRY_FACADE) private readonly _telemetry: TelemetryFacade) {}
|
|
67
|
+
|
|
68
|
+
public async processOrder(orderId: string): Promise<IOrder> {
|
|
69
|
+
return this._telemetry.runOperation('processOrder', async () => {
|
|
70
|
+
const order = await this._orderRepo.findById(orderId);
|
|
71
|
+
await this._paymentService.charge(order);
|
|
72
|
+
await this._inventoryService.reserve(order.items);
|
|
73
|
+
return order;
|
|
74
|
+
});
|
|
75
|
+
// Automatically records:
|
|
76
|
+
// - operation.name = 'processOrder'
|
|
77
|
+
// - duration_ms
|
|
78
|
+
// - status = 'success' | 'error'
|
|
79
|
+
// - error details (if thrown)
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
### Record Cache Events
|
|
85
|
+
|
|
86
|
+
Track cache hits and misses:
|
|
87
|
+
|
|
88
|
+
```typescript
|
|
89
|
+
this._telemetry.recordCacheEvent({
|
|
90
|
+
cache: 'products',
|
|
91
|
+
outcome: 'hit', // 'hit' | 'miss'
|
|
92
|
+
phase: 'memory', // optional: 'memory' | 'redis' | 'db'
|
|
93
|
+
});
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
### Record Custom Metrics
|
|
97
|
+
|
|
98
|
+
```typescript
|
|
99
|
+
this._telemetry.recordClientMetric('order_total_amount', 'histogram', order.total, { currency: 'EUR', region: 'DE' });
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
### Get Logger
|
|
103
|
+
|
|
104
|
+
```typescript
|
|
105
|
+
const logger = this._telemetry.getLogger();
|
|
106
|
+
logger.log('Order processed', { orderId, total: order.total });
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
---
|
|
110
|
+
|
|
111
|
+
## TelemetryCacheMetricsRecorder
|
|
112
|
+
|
|
113
|
+
Bridges the `ICacheMetricsRecorder` interface (from `platform-core`) with the telemetry facade:
|
|
114
|
+
|
|
115
|
+
```typescript
|
|
116
|
+
import { TelemetryCacheMetricsRecorder } from '@breadstone/archipel-platform-telemetry';
|
|
117
|
+
import { MemoryLayeredCache } from '@breadstone/archipel-platform-core';
|
|
118
|
+
|
|
119
|
+
// In a module provider
|
|
120
|
+
{
|
|
121
|
+
provide: 'PRODUCT_CACHE',
|
|
122
|
+
useFactory: (recorder: TelemetryCacheMetricsRecorder) => {
|
|
123
|
+
return new MemoryLayeredCache<string, IProduct>(
|
|
124
|
+
async (key) => fetchProduct(key),
|
|
125
|
+
{
|
|
126
|
+
ttlMs: 60_000,
|
|
127
|
+
metricsRecorder: recorder,
|
|
128
|
+
cacheName: 'products',
|
|
129
|
+
}
|
|
130
|
+
);
|
|
131
|
+
},
|
|
132
|
+
inject: [TelemetryCacheMetricsRecorder],
|
|
133
|
+
}
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
---
|
|
137
|
+
|
|
138
|
+
## TelemetryRuleEngine
|
|
139
|
+
|
|
140
|
+
Conditionally enable/disable telemetry recording per operation:
|
|
141
|
+
|
|
142
|
+
```typescript
|
|
143
|
+
import { TelemetryRuleEngine } from '@breadstone/archipel-platform-telemetry';
|
|
144
|
+
|
|
145
|
+
@Injectable()
|
|
146
|
+
export class AppTelemetryRules extends TelemetryRuleEngine {
|
|
147
|
+
public shouldRecord(operationName: string): boolean {
|
|
148
|
+
// Skip noisy health checks
|
|
149
|
+
if (operationName === 'healthCheck') return false;
|
|
150
|
+
return true;
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
---
|
|
156
|
+
|
|
157
|
+
## OpenTelemetry Internals
|
|
158
|
+
|
|
159
|
+
The module initializes these OTEL components:
|
|
160
|
+
|
|
161
|
+
| Component | Implementation |
|
|
162
|
+
| ----------------------- | ---------------------------------------- |
|
|
163
|
+
| Trace exporter | OTLP/HTTP |
|
|
164
|
+
| Metrics exporter | OTLP/HTTP |
|
|
165
|
+
| Express instrumentation | `@opentelemetry/instrumentation-express` |
|
|
166
|
+
| HTTP instrumentation | `@opentelemetry/instrumentation-http` |
|
|
167
|
+
| SDK shutdown hook | Graceful on `OnModuleDestroy` |
|
|
168
|
+
|
|
169
|
+
---
|
|
170
|
+
|
|
171
|
+
## Real-World Example: Full Observability Stack
|
|
172
|
+
|
|
173
|
+
```typescript
|
|
174
|
+
@Module({
|
|
175
|
+
imports: [
|
|
176
|
+
TelemetryModule.register({ enabled: process.env.OTEL_ENABLED === 'true' }),
|
|
177
|
+
LoggerModule, // Sentry integration
|
|
178
|
+
DatabaseModule.forRoot(),
|
|
179
|
+
],
|
|
180
|
+
})
|
|
181
|
+
export class AppModule {}
|
|
182
|
+
|
|
183
|
+
// In a service
|
|
184
|
+
@Injectable()
|
|
185
|
+
export class ProductService {
|
|
186
|
+
constructor(
|
|
187
|
+
@Inject(TELEMETRY_FACADE) private readonly _telemetry: TelemetryFacade,
|
|
188
|
+
private readonly _analytics: AnalyticsService,
|
|
189
|
+
private readonly _productRepo: ProductRepository,
|
|
190
|
+
) {}
|
|
191
|
+
|
|
192
|
+
public async searchProducts(query: string): Promise<IProduct[]> {
|
|
193
|
+
return this._telemetry.runOperation('searchProducts', async () => {
|
|
194
|
+
const results = await this._productRepo.execute(searchProducts(query));
|
|
195
|
+
|
|
196
|
+
this._telemetry.recordClientMetric('search_results_count', 'histogram', results.length, {
|
|
197
|
+
query_length: query.length.toString(),
|
|
198
|
+
});
|
|
199
|
+
|
|
200
|
+
return results;
|
|
201
|
+
});
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
```
|
|
205
|
+
|
|
206
|
+
---
|
|
207
|
+
|
|
208
|
+
## Graceful Degradation
|
|
209
|
+
|
|
210
|
+
When `enabled: false` or when the OTEL SDK fails to initialize:
|
|
211
|
+
|
|
212
|
+
- `NoopTelemetryFacade` is injected instead of `TelemetryFacade`
|
|
213
|
+
- All operations execute normally without tracing overhead
|
|
214
|
+
- `runOperation()` simply invokes the callback
|
|
215
|
+
- `recordCacheEvent()` and `recordClientMetric()` are no-ops
|
|
216
|
+
- No errors thrown — the application runs normally
|
|
217
|
+
|
|
218
|
+
---
|
|
219
|
+
|
|
220
|
+
## Exports Summary
|
|
221
|
+
|
|
222
|
+
| Export | Type | Description |
|
|
223
|
+
| ------------------------------- | ------------- | -------------------------- |
|
|
224
|
+
| `TelemetryModule` | NestJS Module | `register()` configuration |
|
|
225
|
+
| `TelemetryFacade` | Service | Main telemetry API |
|
|
226
|
+
| `NoopTelemetryFacade` | Service | Disabled-mode fallback |
|
|
227
|
+
| `TelemetryCacheMetricsRecorder` | Service | Bridge for cache metrics |
|
|
228
|
+
| `TelemetryRuleEngine` | Service | Conditional recording |
|
|
229
|
+
| `TelemetryLoggerService` | Service | Logger integration |
|
|
230
|
+
| `OperationTelemetryInterceptor` | Interceptor | Auto-trace HTTP requests |
|
|
231
|
+
| `TELEMETRY_FACADE` | Token | Injection token for facade |
|
|
232
|
+
| `TELEMETRY_ENABLED` | Token | Boolean enabled flag |
|
|
233
|
+
| `TELEMETRY_OPTIONS` | Token | Configuration options |
|
|
234
|
+
| `TELEMETRY_SHUTDOWN` | Token | Shutdown hook |
|
package/package.json
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@breadstone/archipel-mcp",
|
|
3
|
+
"version": "0.0.1",
|
|
4
|
+
"description": "MCP server providing Archipel platform knowledge — documentation, query patterns, and coding conventions — to AI development tools.",
|
|
5
|
+
"type": "commonjs",
|
|
6
|
+
"main": "./src/main.js",
|
|
7
|
+
"bin": "./src/main.js",
|
|
8
|
+
"license": "MIT",
|
|
9
|
+
"repository": {
|
|
10
|
+
"type": "git",
|
|
11
|
+
"url": "https://github.com/RueDeRennes/archipel",
|
|
12
|
+
"directory": "tools/mcp"
|
|
13
|
+
},
|
|
14
|
+
"keywords": [
|
|
15
|
+
"mcp",
|
|
16
|
+
"model-context-protocol",
|
|
17
|
+
"ai",
|
|
18
|
+
"copilot",
|
|
19
|
+
"nestjs",
|
|
20
|
+
"archipel",
|
|
21
|
+
"code-generation"
|
|
22
|
+
],
|
|
23
|
+
"engines": {
|
|
24
|
+
"node": ">=20"
|
|
25
|
+
},
|
|
26
|
+
"files": [
|
|
27
|
+
"src/**/*.js",
|
|
28
|
+
"src/**/*.d.ts",
|
|
29
|
+
"data/**/*.md",
|
|
30
|
+
"README.md"
|
|
31
|
+
],
|
|
32
|
+
"dependencies": {
|
|
33
|
+
"@modelcontextprotocol/sdk": "1.29.0",
|
|
34
|
+
"gray-matter": "4.0.3",
|
|
35
|
+
"tslib": "2.8.1",
|
|
36
|
+
"zod": "4.3.6"
|
|
37
|
+
},
|
|
38
|
+
"types": "./src/main.d.ts"
|
|
39
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { IPackageDoc } from './models/IPackageDoc';
|
|
2
|
+
/**
|
|
3
|
+
* Loads and indexes Archipel platform documentation from the `.docs/packages/`
|
|
4
|
+
* directory (monorepo dev) or from the bundled `data/packages/` directory
|
|
5
|
+
* (published npm package).
|
|
6
|
+
*/
|
|
7
|
+
export declare class DocsLoader {
|
|
8
|
+
private readonly _packages;
|
|
9
|
+
get packages(): ReadonlyMap<string, IPackageDoc>;
|
|
10
|
+
load(): void;
|
|
11
|
+
search(query: string): IPackageDoc[];
|
|
12
|
+
private loadApiDocs;
|
|
13
|
+
private resolveDocsDirectory;
|
|
14
|
+
}
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DocsLoader = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const gray_matter_1 = tslib_1.__importDefault(require("gray-matter"));
|
|
6
|
+
const fs = tslib_1.__importStar(require("node:fs"));
|
|
7
|
+
const path = tslib_1.__importStar(require("node:path"));
|
|
8
|
+
/**
|
|
9
|
+
* Loads and indexes Archipel platform documentation from the `.docs/packages/`
|
|
10
|
+
* directory (monorepo dev) or from the bundled `data/packages/` directory
|
|
11
|
+
* (published npm package).
|
|
12
|
+
*/
|
|
13
|
+
class DocsLoader {
|
|
14
|
+
constructor() {
|
|
15
|
+
// #region Fields
|
|
16
|
+
this._packages = new Map();
|
|
17
|
+
// #endregion
|
|
18
|
+
}
|
|
19
|
+
// #endregion
|
|
20
|
+
// #region Properties
|
|
21
|
+
get packages() {
|
|
22
|
+
return this._packages;
|
|
23
|
+
}
|
|
24
|
+
// #endregion
|
|
25
|
+
// #region Methods
|
|
26
|
+
load() {
|
|
27
|
+
const docsDirectory = this.resolveDocsDirectory();
|
|
28
|
+
if (!docsDirectory) {
|
|
29
|
+
process.stderr.write('[archipel-mcp] Warning: Could not locate documentation directory.\n');
|
|
30
|
+
return;
|
|
31
|
+
}
|
|
32
|
+
const entries = fs.readdirSync(docsDirectory, { withFileTypes: true });
|
|
33
|
+
for (const entry of entries) {
|
|
34
|
+
if (!entry.isDirectory()) {
|
|
35
|
+
continue;
|
|
36
|
+
}
|
|
37
|
+
const indexPath = path.join(docsDirectory, entry.name, 'index.md');
|
|
38
|
+
if (!fs.existsSync(indexPath)) {
|
|
39
|
+
continue;
|
|
40
|
+
}
|
|
41
|
+
const raw = fs.readFileSync(indexPath, 'utf-8');
|
|
42
|
+
const parsed = (0, gray_matter_1.default)(raw);
|
|
43
|
+
const apiDirectory = path.join(docsDirectory, entry.name, 'api');
|
|
44
|
+
const apiContent = fs.existsSync(apiDirectory) ? this.loadApiDocs(apiDirectory) : '';
|
|
45
|
+
this._packages.set(entry.name, {
|
|
46
|
+
name: entry.name,
|
|
47
|
+
title: parsed.data['title'] || entry.name,
|
|
48
|
+
description: parsed.data['description'] || '',
|
|
49
|
+
tags: parsed.data['tags'] || [],
|
|
50
|
+
packageScope: parsed.data['package'] || `@breadstone/archipel-${entry.name}`,
|
|
51
|
+
content: parsed.content.trim(),
|
|
52
|
+
apiContent,
|
|
53
|
+
});
|
|
54
|
+
}
|
|
55
|
+
process.stderr.write(`[archipel-mcp] Loaded documentation for ${this._packages.size} package(s)\n`);
|
|
56
|
+
}
|
|
57
|
+
search(query) {
|
|
58
|
+
const lowerQuery = query.toLowerCase();
|
|
59
|
+
const results = [];
|
|
60
|
+
for (const packageDoc of this._packages.values()) {
|
|
61
|
+
if (packageDoc.name.toLowerCase().includes(lowerQuery) ||
|
|
62
|
+
packageDoc.description.toLowerCase().includes(lowerQuery) ||
|
|
63
|
+
packageDoc.content.toLowerCase().includes(lowerQuery) ||
|
|
64
|
+
packageDoc.tags.some((tag) => tag.toLowerCase().includes(lowerQuery))) {
|
|
65
|
+
results.push(packageDoc);
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
return results;
|
|
69
|
+
}
|
|
70
|
+
loadApiDocs(apiDirectory) {
|
|
71
|
+
const parts = [];
|
|
72
|
+
const files = fs
|
|
73
|
+
.readdirSync(apiDirectory)
|
|
74
|
+
.filter((file) => file.endsWith('.md'))
|
|
75
|
+
.sort();
|
|
76
|
+
for (const file of files) {
|
|
77
|
+
const raw = fs.readFileSync(path.join(apiDirectory, file), 'utf-8');
|
|
78
|
+
const parsed = (0, gray_matter_1.default)(raw);
|
|
79
|
+
parts.push(parsed.content.trim());
|
|
80
|
+
}
|
|
81
|
+
return parts.join('\n\n---\n\n');
|
|
82
|
+
}
|
|
83
|
+
resolveDocsDirectory() {
|
|
84
|
+
// 1. Bundled data (published npm package)
|
|
85
|
+
const bundledPath = path.resolve(__dirname, '..', 'data', 'packages');
|
|
86
|
+
if (fs.existsSync(bundledPath)) {
|
|
87
|
+
return bundledPath;
|
|
88
|
+
}
|
|
89
|
+
// 2. Workspace root (monorepo dev)
|
|
90
|
+
const cwdPath = path.resolve(process.cwd(), '.docs', 'packages');
|
|
91
|
+
if (fs.existsSync(cwdPath)) {
|
|
92
|
+
return cwdPath;
|
|
93
|
+
}
|
|
94
|
+
// 3. Relative from compiled source (dist/tools/mcp/src/)
|
|
95
|
+
const relativePath = path.resolve(__dirname, '..', '..', '..', '..', '.docs', 'packages');
|
|
96
|
+
if (fs.existsSync(relativePath)) {
|
|
97
|
+
return relativePath;
|
|
98
|
+
}
|
|
99
|
+
return null;
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
exports.DocsLoader = DocsLoader;
|
|
103
|
+
//# sourceMappingURL=DocsLoader.js.map
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Static knowledge content for the Archipel configuration pattern.
|
|
3
|
+
* Returned by the get-config-pattern tool.
|
|
4
|
+
*/
|
|
5
|
+
export declare const CONFIG_PATTERN_KNOWLEDGE = "# Archipel Configuration Pattern\n\n## Overview\n\nArchipel uses a **typed configuration key** system with a **central registry**.\nEach platform library declares its required and optional config keys in an `env.ts`\nfile, which are registered into the global `ConfigRegistry`. At runtime, the\n`ConfigService` resolves values through a pluggable strategy (environment variables,\nAzure App Configuration, etc.).\n\n**Rule:** No direct `process.env` access outside of config strategy implementations.\n\n## Core Types\n\n### IConfigKey<TType>\n\n```typescript\nexport interface IConfigKey<TType = unknown> {\n readonly _type?: TType; // Phantom type for compile-time safety\n readonly key: string; // The actual config key string\n}\n```\n\n### createConfigKey<TType>\n\n```typescript\nimport { createConfigKey } from '@breadstone/archipel-platform-core';\n\nexport const APP_URL = createConfigKey<string>('APP_URL');\nexport const APP_PORT = createConfigKey<number>('APP_PORT');\nexport const FEATURE_ENABLED = createConfigKey<boolean>('FEATURE_ENABLED');\n```\n\n## ConfigService API\n\n```typescript\n@Injectable()\nexport class ConfigService {\n\n // Throws if key not found\n public get<T>(key: string): T;\n\n // Returns fallback if key not found\n public tryGet<T>(key: string, fallback: T): T;\n\n // Compares a key's value to an expected value\n public compare<T>(key: string, value: T): boolean;\n\n}\n```\n\n**Auto-parsing:** String values are automatically converted:\n- `'true'` / `'false'` \u2192 `boolean`\n- Numeric strings \u2192 `number`\n- Empty strings \u2192 `null`\n\n## ConfigRegistry\n\nA static global registry that collects all declared config keys at module initialization.\n\n```typescript\nexport class ConfigRegistry {\n\n // Register keys for a module\n public static register(module: string, entries: ReadonlyArray<Omit<IConfigRegistryEntry, 'module'>>): void;\n\n // Query all registered entries\n public static getAll(): ReadonlyArray<IConfigRegistryEntry>;\n public static getByModule(): ReadonlyMap<string, ReadonlyArray<IConfigRegistryEntry>>;\n public static getRequired(): ReadonlyArray<IConfigRegistryEntry>;\n public static getModules(): ReadonlyArray<string>;\n\n}\n```\n\n### IConfigRegistryEntry\n\n```typescript\nexport interface IConfigRegistryEntry<TType = unknown> {\n readonly key: IConfigKey<TType>;\n readonly module: string;\n readonly required: boolean;\n readonly defaultValue?: TType;\n readonly description?: string;\n}\n```\n\n## How to Add Configuration to a Library\n\n### Step 1: Define typed config keys in env.ts\n\n```typescript\n// src/env.ts\nimport { createConfigKey } from '@breadstone/archipel-platform-core';\nimport { ConfigRegistry, IConfigRegistryEntry } from '@breadstone/archipel-platform-core';\n\n// \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n// Keys\n// \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n\nexport const STRIPE_SECRET_KEY = createConfigKey<string>('STRIPE_SECRET_KEY');\nexport const STRIPE_WEBHOOK_SECRET = createConfigKey<string>('STRIPE_WEBHOOK_SECRET');\nexport const PAYMENT_CURRENCY = createConfigKey<string>('PAYMENT_CURRENCY');\n\n// \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n// Registry entries\n// \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n\nexport const PLATFORM_PAYMENTS_CONFIG_ENTRIES: ReadonlyArray<Omit<IConfigRegistryEntry, 'module'>> = [\n { key: STRIPE_SECRET_KEY, required: true, description: 'Stripe API secret key.' },\n { key: STRIPE_WEBHOOK_SECRET, required: true, description: 'Stripe webhook signing secret.' },\n { key: PAYMENT_CURRENCY, required: false, defaultValue: 'EUR', description: 'Default payment currency.' },\n];\n```\n\n### Step 2: Register in ConfigModule\n\n```typescript\n// In the module's register() method:\nimports: [ConfigModule.register('platform-payments', PLATFORM_PAYMENTS_CONFIG_ENTRIES)]\n```\n\nOr for libraries without a dedicated module (self-registration):\n\n```typescript\n// At the bottom of env.ts:\nConfigRegistry.register('platform-payments', PLATFORM_PAYMENTS_CONFIG_ENTRIES);\n```\n\n### Step 3: Use in services\n\n```typescript\n@Injectable()\nexport class StripeClient {\n\n private readonly _configService: ConfigService;\n\n public constructor(configService: ConfigService) {\n this._configService = configService;\n }\n\n private getApiKey(): string {\n return this._configService.get<string>('STRIPE_SECRET_KEY');\n }\n\n}\n```\n\n## ConfigModule\n\n### register() \u2014 Per-library config registration\n\nDeclares which config keys a library needs. Used in `imports` of feature modules.\n\n```typescript\nConfigModule.register('platform-authentication', PLATFORM_AUTHENTICATION_CONFIG_ENTRIES)\n```\n\n### forRoot() \u2014 Application bootstrap\n\nConfigures the global strategy and static overrides. Used once in the root module.\n\n```typescript\nConfigModule.forRoot({\n strategyFactory: () => new EnvironmentConfigStrategy(),\n statics: { APP_VERSION: '1.0.0' },\n})\n```\n\n## ConfigStrategyBase\n\nPluggable strategy for resolving config values:\n\n```typescript\nexport abstract class ConfigStrategyBase {\n public abstract initialize(): void;\n public abstract resolve<T>(key: string): T;\n public abstract tryResolve<T>(key: string, fallback: T): T;\n public abstract has(key: string): boolean;\n}\n```\n\nImplementations can read from environment variables, Azure App Configuration, Consul, etc.\n\n## Existing Config Modules\n\n| Module | Prefix | Example Keys |\n|--------|--------|-------------|\n| platform-core | APP_, NODE_ENV, INTELLIGENCE_ | APP_URL, APP_PORT, APP_VERSION, INTELLIGENCE_MODEL |\n| platform-authentication | AUTH_ | AUTH_JWT_SECRET, AUTH_JWT_EXPIRES_IN |\n| platform-payments | STRIPE_ | STRIPE_SECRET_KEY, STRIPE_WEBHOOK_SECRET |\n| platform-openapi | SWAGGER_ | SWAGGER_CONTACT_NAME, SWAGGER_CONTACT_URL |\n\n## Rules\n\n1. **All config keys defined via `createConfigKey<T>()`** \u2014 never raw `process.env` access.\n2. **Each library declares entries in `env.ts`** with required flag, default value, and description.\n3. **Registration via `ConfigModule.register()`** in the module, or self-registration for libraries without modules.\n4. **`ConfigService.get()` throws on missing required keys** \u2014 fail-fast at startup.\n5. **Use `tryGet()` with fallback** for optional keys.\n6. **Config key names use UPPER_SNAKE_CASE** matching environment variable conventions.\n7. **Group related keys** with comment separators in env.ts.\n";
|