@cat-factory/worker 0.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/dist/app.d.ts +22 -0
- package/dist/app.d.ts.map +1 -0
- package/dist/app.js +49 -0
- package/dist/app.js.map +1 -0
- package/dist/index.d.ts +17 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +234 -0
- package/dist/index.js.map +1 -0
- package/dist/infrastructure/ai/CloudflareModelProvider.d.ts +23 -0
- package/dist/infrastructure/ai/CloudflareModelProvider.d.ts.map +1 -0
- package/dist/infrastructure/ai/CloudflareModelProvider.js +62 -0
- package/dist/infrastructure/ai/CloudflareModelProvider.js.map +1 -0
- package/dist/infrastructure/ai/CompositeAgentExecutor.d.ts +2 -0
- package/dist/infrastructure/ai/CompositeAgentExecutor.d.ts.map +1 -0
- package/dist/infrastructure/ai/CompositeAgentExecutor.js +5 -0
- package/dist/infrastructure/ai/CompositeAgentExecutor.js.map +1 -0
- package/dist/infrastructure/ai/ContainerAgentExecutor.d.ts +2 -0
- package/dist/infrastructure/ai/ContainerAgentExecutor.d.ts.map +1 -0
- package/dist/infrastructure/ai/ContainerAgentExecutor.js +5 -0
- package/dist/infrastructure/ai/ContainerAgentExecutor.js.map +1 -0
- package/dist/infrastructure/ai/ContainerRepoBootstrapper.d.ts +2 -0
- package/dist/infrastructure/ai/ContainerRepoBootstrapper.d.ts.map +1 -0
- package/dist/infrastructure/ai/ContainerRepoBootstrapper.js +5 -0
- package/dist/infrastructure/ai/ContainerRepoBootstrapper.js.map +1 -0
- package/dist/infrastructure/ai/ContainerRepoScanner.d.ts +39 -0
- package/dist/infrastructure/ai/ContainerRepoScanner.d.ts.map +1 -0
- package/dist/infrastructure/ai/ContainerRepoScanner.js +115 -0
- package/dist/infrastructure/ai/ContainerRepoScanner.js.map +1 -0
- package/dist/infrastructure/ai/LlmFragmentSelector.d.ts +2 -0
- package/dist/infrastructure/ai/LlmFragmentSelector.d.ts.map +1 -0
- package/dist/infrastructure/ai/LlmFragmentSelector.js +4 -0
- package/dist/infrastructure/ai/LlmFragmentSelector.js.map +1 -0
- package/dist/infrastructure/ai/RunnerJobClient.d.ts +2 -0
- package/dist/infrastructure/ai/RunnerJobClient.d.ts.map +1 -0
- package/dist/infrastructure/ai/RunnerJobClient.js +5 -0
- package/dist/infrastructure/ai/RunnerJobClient.js.map +1 -0
- package/dist/infrastructure/ai/WorkersAiLlmUpstream.d.ts +28 -0
- package/dist/infrastructure/ai/WorkersAiLlmUpstream.d.ts.map +1 -0
- package/dist/infrastructure/ai/WorkersAiLlmUpstream.js +486 -0
- package/dist/infrastructure/ai/WorkersAiLlmUpstream.js.map +1 -0
- package/dist/infrastructure/ai/providerEndpoints.d.ts +17 -0
- package/dist/infrastructure/ai/providerEndpoints.d.ts.map +1 -0
- package/dist/infrastructure/ai/providerEndpoints.js +42 -0
- package/dist/infrastructure/ai/providerEndpoints.js.map +1 -0
- package/dist/infrastructure/ai/registries.d.ts +11 -0
- package/dist/infrastructure/ai/registries.d.ts.map +1 -0
- package/dist/infrastructure/ai/registries.js +14 -0
- package/dist/infrastructure/ai/registries.js.map +1 -0
- package/dist/infrastructure/auth/GitHubOAuth.d.ts +2 -0
- package/dist/infrastructure/auth/GitHubOAuth.d.ts.map +1 -0
- package/dist/infrastructure/auth/GitHubOAuth.js +3 -0
- package/dist/infrastructure/auth/GitHubOAuth.js.map +1 -0
- package/dist/infrastructure/auth/middleware.d.ts +2 -0
- package/dist/infrastructure/auth/middleware.d.ts.map +1 -0
- package/dist/infrastructure/auth/middleware.js +3 -0
- package/dist/infrastructure/auth/middleware.js.map +1 -0
- package/dist/infrastructure/auth/signing.d.ts +3 -0
- package/dist/infrastructure/auth/signing.d.ts.map +1 -0
- package/dist/infrastructure/auth/signing.js +3 -0
- package/dist/infrastructure/auth/signing.js.map +1 -0
- package/dist/infrastructure/config/agents.d.ts +6 -0
- package/dist/infrastructure/config/agents.d.ts.map +1 -0
- package/dist/infrastructure/config/agents.js +100 -0
- package/dist/infrastructure/config/agents.js.map +1 -0
- package/dist/infrastructure/config/auth.d.ts +13 -0
- package/dist/infrastructure/config/auth.d.ts.map +1 -0
- package/dist/infrastructure/config/auth.js +80 -0
- package/dist/infrastructure/config/auth.js.map +1 -0
- package/dist/infrastructure/config/cors.d.ts +2 -0
- package/dist/infrastructure/config/cors.d.ts.map +1 -0
- package/dist/infrastructure/config/cors.js +3 -0
- package/dist/infrastructure/config/cors.js.map +1 -0
- package/dist/infrastructure/config/datadog.d.ts +6 -0
- package/dist/infrastructure/config/datadog.d.ts.map +1 -0
- package/dist/infrastructure/config/datadog.js +22 -0
- package/dist/infrastructure/config/datadog.js.map +1 -0
- package/dist/infrastructure/config/documents.d.ts +5 -0
- package/dist/infrastructure/config/documents.d.ts.map +1 -0
- package/dist/infrastructure/config/documents.js +36 -0
- package/dist/infrastructure/config/documents.js.map +1 -0
- package/dist/infrastructure/config/email.d.ts +5 -0
- package/dist/infrastructure/config/email.d.ts.map +1 -0
- package/dist/infrastructure/config/email.js +12 -0
- package/dist/infrastructure/config/email.js.map +1 -0
- package/dist/infrastructure/config/environments.d.ts +5 -0
- package/dist/infrastructure/config/environments.d.ts.map +1 -0
- package/dist/infrastructure/config/environments.js +15 -0
- package/dist/infrastructure/config/environments.js.map +1 -0
- package/dist/infrastructure/config/execution.d.ts +5 -0
- package/dist/infrastructure/config/execution.d.ts.map +1 -0
- package/dist/infrastructure/config/execution.js +21 -0
- package/dist/infrastructure/config/execution.js.map +1 -0
- package/dist/infrastructure/config/fragmentLibrary.d.ts +5 -0
- package/dist/infrastructure/config/fragmentLibrary.d.ts.map +1 -0
- package/dist/infrastructure/config/fragmentLibrary.js +7 -0
- package/dist/infrastructure/config/fragmentLibrary.js.map +1 -0
- package/dist/infrastructure/config/github.d.ts +5 -0
- package/dist/infrastructure/config/github.d.ts.map +1 -0
- package/dist/infrastructure/config/github.js +25 -0
- package/dist/infrastructure/config/github.js.map +1 -0
- package/dist/infrastructure/config/index.d.ts +20 -0
- package/dist/infrastructure/config/index.d.ts.map +1 -0
- package/dist/infrastructure/config/index.js +52 -0
- package/dist/infrastructure/config/index.js.map +1 -0
- package/dist/infrastructure/config/langfuse.d.ts +10 -0
- package/dist/infrastructure/config/langfuse.d.ts.map +1 -0
- package/dist/infrastructure/config/langfuse.js +17 -0
- package/dist/infrastructure/config/langfuse.js.map +1 -0
- package/dist/infrastructure/config/observability.d.ts +10 -0
- package/dist/infrastructure/config/observability.d.ts.map +1 -0
- package/dist/infrastructure/config/observability.js +11 -0
- package/dist/infrastructure/config/observability.js.map +1 -0
- package/dist/infrastructure/config/retention.d.ts +5 -0
- package/dist/infrastructure/config/retention.d.ts.map +1 -0
- package/dist/infrastructure/config/retention.js +15 -0
- package/dist/infrastructure/config/retention.js.map +1 -0
- package/dist/infrastructure/config/runners.d.ts +5 -0
- package/dist/infrastructure/config/runners.d.ts.map +1 -0
- package/dist/infrastructure/config/runners.js +13 -0
- package/dist/infrastructure/config/runners.js.map +1 -0
- package/dist/infrastructure/config/slack.d.ts +5 -0
- package/dist/infrastructure/config/slack.d.ts.map +1 -0
- package/dist/infrastructure/config/slack.js +17 -0
- package/dist/infrastructure/config/slack.js.map +1 -0
- package/dist/infrastructure/config/spending.d.ts +4 -0
- package/dist/infrastructure/config/spending.d.ts.map +1 -0
- package/dist/infrastructure/config/spending.js +36 -0
- package/dist/infrastructure/config/spending.js.map +1 -0
- package/dist/infrastructure/config/tasks.d.ts +5 -0
- package/dist/infrastructure/config/tasks.d.ts.map +1 -0
- package/dist/infrastructure/config/tasks.js +31 -0
- package/dist/infrastructure/config/tasks.js.map +1 -0
- package/dist/infrastructure/config/utils.d.ts +6 -0
- package/dist/infrastructure/config/utils.d.ts.map +1 -0
- package/dist/infrastructure/config/utils.js +24 -0
- package/dist/infrastructure/config/utils.js.map +1 -0
- package/dist/infrastructure/container.d.ts +8 -0
- package/dist/infrastructure/container.d.ts.map +1 -0
- package/dist/infrastructure/container.js +1157 -0
- package/dist/infrastructure/container.js.map +1 -0
- package/dist/infrastructure/containers/CloudflareContainerTransport.d.ts +22 -0
- package/dist/infrastructure/containers/CloudflareContainerTransport.d.ts.map +1 -0
- package/dist/infrastructure/containers/CloudflareContainerTransport.js +129 -0
- package/dist/infrastructure/containers/CloudflareContainerTransport.js.map +1 -0
- package/dist/infrastructure/containers/ContainerInstanceRegistry.d.ts +62 -0
- package/dist/infrastructure/containers/ContainerInstanceRegistry.d.ts.map +1 -0
- package/dist/infrastructure/containers/ContainerInstanceRegistry.js +74 -0
- package/dist/infrastructure/containers/ContainerInstanceRegistry.js.map +1 -0
- package/dist/infrastructure/containers/ContainerSessionService.d.ts +2 -0
- package/dist/infrastructure/containers/ContainerSessionService.d.ts.map +1 -0
- package/dist/infrastructure/containers/ContainerSessionService.js +3 -0
- package/dist/infrastructure/containers/ContainerSessionService.js.map +1 -0
- package/dist/infrastructure/containers/ExecutionContainer.d.ts +48 -0
- package/dist/infrastructure/containers/ExecutionContainer.d.ts.map +1 -0
- package/dist/infrastructure/containers/ExecutionContainer.js +88 -0
- package/dist/infrastructure/containers/ExecutionContainer.js.map +1 -0
- package/dist/infrastructure/documents/ConfluenceProvider.d.ts +29 -0
- package/dist/infrastructure/documents/ConfluenceProvider.d.ts.map +1 -0
- package/dist/infrastructure/documents/ConfluenceProvider.js +179 -0
- package/dist/infrastructure/documents/ConfluenceProvider.js.map +1 -0
- package/dist/infrastructure/documents/GitHubDocsProvider.d.ts +42 -0
- package/dist/infrastructure/documents/GitHubDocsProvider.d.ts.map +1 -0
- package/dist/infrastructure/documents/GitHubDocsProvider.js +85 -0
- package/dist/infrastructure/documents/GitHubDocsProvider.js.map +1 -0
- package/dist/infrastructure/documents/NotionProvider.d.ts +32 -0
- package/dist/infrastructure/documents/NotionProvider.d.ts.map +1 -0
- package/dist/infrastructure/documents/NotionProvider.js +220 -0
- package/dist/infrastructure/documents/NotionProvider.js.map +1 -0
- package/dist/infrastructure/durable-objects/WorkspaceEventsHub.d.ts +20 -0
- package/dist/infrastructure/durable-objects/WorkspaceEventsHub.d.ts.map +1 -0
- package/dist/infrastructure/durable-objects/WorkspaceEventsHub.js +62 -0
- package/dist/infrastructure/durable-objects/WorkspaceEventsHub.js.map +1 -0
- package/dist/infrastructure/env.d.ts +370 -0
- package/dist/infrastructure/env.d.ts.map +1 -0
- package/dist/infrastructure/env.js +2 -0
- package/dist/infrastructure/env.js.map +1 -0
- package/dist/infrastructure/environments/HttpEnvironmentProvider.d.ts +27 -0
- package/dist/infrastructure/environments/HttpEnvironmentProvider.d.ts.map +1 -0
- package/dist/infrastructure/environments/HttpEnvironmentProvider.js +314 -0
- package/dist/infrastructure/environments/HttpEnvironmentProvider.js.map +1 -0
- package/dist/infrastructure/environments/WebCryptoSecretCipher.d.ts +2 -0
- package/dist/infrastructure/environments/WebCryptoSecretCipher.d.ts.map +1 -0
- package/dist/infrastructure/environments/WebCryptoSecretCipher.js +5 -0
- package/dist/infrastructure/environments/WebCryptoSecretCipher.js.map +1 -0
- package/dist/infrastructure/environments/sweep.d.ts +5 -0
- package/dist/infrastructure/environments/sweep.d.ts.map +1 -0
- package/dist/infrastructure/environments/sweep.js +16 -0
- package/dist/infrastructure/environments/sweep.js.map +1 -0
- package/dist/infrastructure/events/DurableObjectEventPublisher.d.ts +25 -0
- package/dist/infrastructure/events/DurableObjectEventPublisher.d.ts.map +1 -0
- package/dist/infrastructure/events/DurableObjectEventPublisher.js +64 -0
- package/dist/infrastructure/events/DurableObjectEventPublisher.js.map +1 -0
- package/dist/infrastructure/events/InAppNotificationChannel.d.ts +19 -0
- package/dist/infrastructure/events/InAppNotificationChannel.d.ts.map +1 -0
- package/dist/infrastructure/events/InAppNotificationChannel.js +22 -0
- package/dist/infrastructure/events/InAppNotificationChannel.js.map +1 -0
- package/dist/infrastructure/gateways/DoRealtimeGateway.d.ts +15 -0
- package/dist/infrastructure/gateways/DoRealtimeGateway.d.ts.map +1 -0
- package/dist/infrastructure/gateways/DoRealtimeGateway.js +20 -0
- package/dist/infrastructure/gateways/DoRealtimeGateway.js.map +1 -0
- package/dist/infrastructure/gateways/GitHubGateways.d.ts +27 -0
- package/dist/infrastructure/gateways/GitHubGateways.d.ts.map +1 -0
- package/dist/infrastructure/gateways/GitHubGateways.js +48 -0
- package/dist/infrastructure/gateways/GitHubGateways.js.map +1 -0
- package/dist/infrastructure/github/FetchGitHubClient.d.ts +2 -0
- package/dist/infrastructure/github/FetchGitHubClient.d.ts.map +1 -0
- package/dist/infrastructure/github/FetchGitHubClient.js +4 -0
- package/dist/infrastructure/github/FetchGitHubClient.js.map +1 -0
- package/dist/infrastructure/github/FetchGitHubProvisioningClient.d.ts +2 -0
- package/dist/infrastructure/github/FetchGitHubProvisioningClient.d.ts.map +1 -0
- package/dist/infrastructure/github/FetchGitHubProvisioningClient.js +5 -0
- package/dist/infrastructure/github/FetchGitHubProvisioningClient.js.map +1 -0
- package/dist/infrastructure/github/GitHubAppAuth.d.ts +2 -0
- package/dist/infrastructure/github/GitHubAppAuth.d.ts.map +1 -0
- package/dist/infrastructure/github/GitHubAppAuth.js +5 -0
- package/dist/infrastructure/github/GitHubAppAuth.js.map +1 -0
- package/dist/infrastructure/github/GitHubAppRegistry.d.ts +2 -0
- package/dist/infrastructure/github/GitHubAppRegistry.d.ts.map +1 -0
- package/dist/infrastructure/github/GitHubAppRegistry.js +4 -0
- package/dist/infrastructure/github/GitHubAppRegistry.js.map +1 -0
- package/dist/infrastructure/github/GitHubCiStatusProvider.d.ts +2 -0
- package/dist/infrastructure/github/GitHubCiStatusProvider.d.ts.map +1 -0
- package/dist/infrastructure/github/GitHubCiStatusProvider.js +4 -0
- package/dist/infrastructure/github/GitHubCiStatusProvider.js.map +1 -0
- package/dist/infrastructure/github/GitHubMergeabilityProvider.d.ts +2 -0
- package/dist/infrastructure/github/GitHubMergeabilityProvider.d.ts.map +1 -0
- package/dist/infrastructure/github/GitHubMergeabilityProvider.js +4 -0
- package/dist/infrastructure/github/GitHubMergeabilityProvider.js.map +1 -0
- package/dist/infrastructure/github/GitHubPullRequestMerger.d.ts +2 -0
- package/dist/infrastructure/github/GitHubPullRequestMerger.d.ts.map +1 -0
- package/dist/infrastructure/github/GitHubPullRequestMerger.js +4 -0
- package/dist/infrastructure/github/GitHubPullRequestMerger.js.map +1 -0
- package/dist/infrastructure/github/WebCryptoWebhookVerifier.d.ts +2 -0
- package/dist/infrastructure/github/WebCryptoWebhookVerifier.d.ts.map +1 -0
- package/dist/infrastructure/github/WebCryptoWebhookVerifier.js +5 -0
- package/dist/infrastructure/github/WebCryptoWebhookVerifier.js.map +1 -0
- package/dist/infrastructure/github/encoding.d.ts +2 -0
- package/dist/infrastructure/github/encoding.d.ts.map +1 -0
- package/dist/infrastructure/github/encoding.js +3 -0
- package/dist/infrastructure/github/encoding.js.map +1 -0
- package/dist/infrastructure/github/state.d.ts +2 -0
- package/dist/infrastructure/github/state.d.ts.map +1 -0
- package/dist/infrastructure/github/state.js +3 -0
- package/dist/infrastructure/github/state.js.map +1 -0
- package/dist/infrastructure/github/sync-consumer.d.ts +16 -0
- package/dist/infrastructure/github/sync-consumer.d.ts.map +1 -0
- package/dist/infrastructure/github/sync-consumer.js +130 -0
- package/dist/infrastructure/github/sync-consumer.js.map +1 -0
- package/dist/infrastructure/http/errorHandler.d.ts +2 -0
- package/dist/infrastructure/http/errorHandler.d.ts.map +1 -0
- package/dist/infrastructure/http/errorHandler.js +3 -0
- package/dist/infrastructure/http/errorHandler.js.map +1 -0
- package/dist/infrastructure/http/params.d.ts +2 -0
- package/dist/infrastructure/http/params.d.ts.map +1 -0
- package/dist/infrastructure/http/params.js +3 -0
- package/dist/infrastructure/http/params.js.map +1 -0
- package/dist/infrastructure/http/types.d.ts +12 -0
- package/dist/infrastructure/http/types.d.ts.map +1 -0
- package/dist/infrastructure/http/types.js +2 -0
- package/dist/infrastructure/http/types.js.map +1 -0
- package/dist/infrastructure/http/validation.d.ts +2 -0
- package/dist/infrastructure/http/validation.d.ts.map +1 -0
- package/dist/infrastructure/http/validation.js +3 -0
- package/dist/infrastructure/http/validation.js.map +1 -0
- package/dist/infrastructure/observability/logger.d.ts +3 -0
- package/dist/infrastructure/observability/logger.d.ts.map +1 -0
- package/dist/infrastructure/observability/logger.js +4 -0
- package/dist/infrastructure/observability/logger.js.map +1 -0
- package/dist/infrastructure/repositories/D1AccountInvitationRepository.d.ts +15 -0
- package/dist/infrastructure/repositories/D1AccountInvitationRepository.d.ts.map +1 -0
- package/dist/infrastructure/repositories/D1AccountInvitationRepository.js +63 -0
- package/dist/infrastructure/repositories/D1AccountInvitationRepository.js.map +1 -0
- package/dist/infrastructure/repositories/D1AccountRepository.d.ts +15 -0
- package/dist/infrastructure/repositories/D1AccountRepository.d.ts.map +1 -0
- package/dist/infrastructure/repositories/D1AccountRepository.js +52 -0
- package/dist/infrastructure/repositories/D1AccountRepository.js.map +1 -0
- package/dist/infrastructure/repositories/D1AgentRunRepository.d.ts +18 -0
- package/dist/infrastructure/repositories/D1AgentRunRepository.d.ts.map +1 -0
- package/dist/infrastructure/repositories/D1AgentRunRepository.js +34 -0
- package/dist/infrastructure/repositories/D1AgentRunRepository.js.map +1 -0
- package/dist/infrastructure/repositories/D1BlockRepository.d.ts +23 -0
- package/dist/infrastructure/repositories/D1BlockRepository.d.ts.map +1 -0
- package/dist/infrastructure/repositories/D1BlockRepository.js +101 -0
- package/dist/infrastructure/repositories/D1BlockRepository.js.map +1 -0
- package/dist/infrastructure/repositories/D1BootstrapJobRepository.d.ts +16 -0
- package/dist/infrastructure/repositories/D1BootstrapJobRepository.d.ts.map +1 -0
- package/dist/infrastructure/repositories/D1BootstrapJobRepository.js +209 -0
- package/dist/infrastructure/repositories/D1BootstrapJobRepository.js.map +1 -0
- package/dist/infrastructure/repositories/D1BranchProjectionRepository.d.ts +12 -0
- package/dist/infrastructure/repositories/D1BranchProjectionRepository.d.ts.map +1 -0
- package/dist/infrastructure/repositories/D1BranchProjectionRepository.js +29 -0
- package/dist/infrastructure/repositories/D1BranchProjectionRepository.js.map +1 -0
- package/dist/infrastructure/repositories/D1CheckRunProjectionRepository.d.ts +12 -0
- package/dist/infrastructure/repositories/D1CheckRunProjectionRepository.d.ts.map +1 -0
- package/dist/infrastructure/repositories/D1CheckRunProjectionRepository.js +29 -0
- package/dist/infrastructure/repositories/D1CheckRunProjectionRepository.js.map +1 -0
- package/dist/infrastructure/repositories/D1ClarityReviewRepository.d.ts +19 -0
- package/dist/infrastructure/repositories/D1ClarityReviewRepository.d.ts.map +1 -0
- package/dist/infrastructure/repositories/D1ClarityReviewRepository.js +75 -0
- package/dist/infrastructure/repositories/D1ClarityReviewRepository.js.map +1 -0
- package/dist/infrastructure/repositories/D1CommitProjectionRepository.d.ts +13 -0
- package/dist/infrastructure/repositories/D1CommitProjectionRepository.d.ts.map +1 -0
- package/dist/infrastructure/repositories/D1CommitProjectionRepository.js +48 -0
- package/dist/infrastructure/repositories/D1CommitProjectionRepository.js.map +1 -0
- package/dist/infrastructure/repositories/D1ConsensusSessionRepository.d.ts +19 -0
- package/dist/infrastructure/repositories/D1ConsensusSessionRepository.d.ts.map +1 -0
- package/dist/infrastructure/repositories/D1ConsensusSessionRepository.js +88 -0
- package/dist/infrastructure/repositories/D1ConsensusSessionRepository.js.map +1 -0
- package/dist/infrastructure/repositories/D1DatadogConnectionRepository.d.ts +17 -0
- package/dist/infrastructure/repositories/D1DatadogConnectionRepository.d.ts.map +1 -0
- package/dist/infrastructure/repositories/D1DatadogConnectionRepository.js +47 -0
- package/dist/infrastructure/repositories/D1DatadogConnectionRepository.js.map +1 -0
- package/dist/infrastructure/repositories/D1DocumentConnectionRepository.d.ts +27 -0
- package/dist/infrastructure/repositories/D1DocumentConnectionRepository.d.ts.map +1 -0
- package/dist/infrastructure/repositories/D1DocumentConnectionRepository.js +89 -0
- package/dist/infrastructure/repositories/D1DocumentConnectionRepository.js.map +1 -0
- package/dist/infrastructure/repositories/D1DocumentRepository.d.ts +15 -0
- package/dist/infrastructure/repositories/D1DocumentRepository.d.ts.map +1 -0
- package/dist/infrastructure/repositories/D1DocumentRepository.js +66 -0
- package/dist/infrastructure/repositories/D1DocumentRepository.js.map +1 -0
- package/dist/infrastructure/repositories/D1EmailConnectionRepository.d.ts +13 -0
- package/dist/infrastructure/repositories/D1EmailConnectionRepository.d.ts.map +1 -0
- package/dist/infrastructure/repositories/D1EmailConnectionRepository.js +46 -0
- package/dist/infrastructure/repositories/D1EmailConnectionRepository.js.map +1 -0
- package/dist/infrastructure/repositories/D1EnvironmentConnectionRepository.d.ts +13 -0
- package/dist/infrastructure/repositories/D1EnvironmentConnectionRepository.d.ts.map +1 -0
- package/dist/infrastructure/repositories/D1EnvironmentConnectionRepository.js +48 -0
- package/dist/infrastructure/repositories/D1EnvironmentConnectionRepository.js.map +1 -0
- package/dist/infrastructure/repositories/D1EnvironmentRegistryRepository.d.ts +17 -0
- package/dist/infrastructure/repositories/D1EnvironmentRegistryRepository.d.ts.map +1 -0
- package/dist/infrastructure/repositories/D1EnvironmentRegistryRepository.js +95 -0
- package/dist/infrastructure/repositories/D1EnvironmentRegistryRepository.js.map +1 -0
- package/dist/infrastructure/repositories/D1ExecutionRepository.d.ts +28 -0
- package/dist/infrastructure/repositories/D1ExecutionRepository.d.ts.map +1 -0
- package/dist/infrastructure/repositories/D1ExecutionRepository.js +113 -0
- package/dist/infrastructure/repositories/D1ExecutionRepository.js.map +1 -0
- package/dist/infrastructure/repositories/D1FragmentSourceRepository.d.ts +15 -0
- package/dist/infrastructure/repositories/D1FragmentSourceRepository.d.ts.map +1 -0
- package/dist/infrastructure/repositories/D1FragmentSourceRepository.js +66 -0
- package/dist/infrastructure/repositories/D1FragmentSourceRepository.js.map +1 -0
- package/dist/infrastructure/repositories/D1GitHubInstallationRepository.d.ts +17 -0
- package/dist/infrastructure/repositories/D1GitHubInstallationRepository.d.ts.map +1 -0
- package/dist/infrastructure/repositories/D1GitHubInstallationRepository.js +79 -0
- package/dist/infrastructure/repositories/D1GitHubInstallationRepository.js.map +1 -0
- package/dist/infrastructure/repositories/D1IssueProjectionRepository.d.ts +13 -0
- package/dist/infrastructure/repositories/D1IssueProjectionRepository.d.ts.map +1 -0
- package/dist/infrastructure/repositories/D1IssueProjectionRepository.js +36 -0
- package/dist/infrastructure/repositories/D1IssueProjectionRepository.js.map +1 -0
- package/dist/infrastructure/repositories/D1LiveContainerRepository.d.ts +17 -0
- package/dist/infrastructure/repositories/D1LiveContainerRepository.d.ts.map +1 -0
- package/dist/infrastructure/repositories/D1LiveContainerRepository.js +40 -0
- package/dist/infrastructure/repositories/D1LiveContainerRepository.js.map +1 -0
- package/dist/infrastructure/repositories/D1LlmCallMetricRepository.d.ts +15 -0
- package/dist/infrastructure/repositories/D1LlmCallMetricRepository.d.ts.map +1 -0
- package/dist/infrastructure/repositories/D1LlmCallMetricRepository.js +123 -0
- package/dist/infrastructure/repositories/D1LlmCallMetricRepository.js.map +1 -0
- package/dist/infrastructure/repositories/D1LocalModelEndpointRepository.d.ts +15 -0
- package/dist/infrastructure/repositories/D1LocalModelEndpointRepository.d.ts.map +1 -0
- package/dist/infrastructure/repositories/D1LocalModelEndpointRepository.js +63 -0
- package/dist/infrastructure/repositories/D1LocalModelEndpointRepository.js.map +1 -0
- package/dist/infrastructure/repositories/D1MembershipRepository.d.ts +15 -0
- package/dist/infrastructure/repositories/D1MembershipRepository.d.ts.map +1 -0
- package/dist/infrastructure/repositories/D1MembershipRepository.js +58 -0
- package/dist/infrastructure/repositories/D1MembershipRepository.js.map +1 -0
- package/dist/infrastructure/repositories/D1MergePresetRepository.d.ts +21 -0
- package/dist/infrastructure/repositories/D1MergePresetRepository.d.ts.map +1 -0
- package/dist/infrastructure/repositories/D1MergePresetRepository.js +88 -0
- package/dist/infrastructure/repositories/D1MergePresetRepository.js.map +1 -0
- package/dist/infrastructure/repositories/D1ModelDefaultsRepository.d.ts +18 -0
- package/dist/infrastructure/repositories/D1ModelDefaultsRepository.d.ts.map +1 -0
- package/dist/infrastructure/repositories/D1ModelDefaultsRepository.js +47 -0
- package/dist/infrastructure/repositories/D1ModelDefaultsRepository.js.map +1 -0
- package/dist/infrastructure/repositories/D1NotificationRepository.d.ts +20 -0
- package/dist/infrastructure/repositories/D1NotificationRepository.d.ts.map +1 -0
- package/dist/infrastructure/repositories/D1NotificationRepository.js +81 -0
- package/dist/infrastructure/repositories/D1NotificationRepository.js.map +1 -0
- package/dist/infrastructure/repositories/D1PersonalSubscriptionRepository.d.ts +28 -0
- package/dist/infrastructure/repositories/D1PersonalSubscriptionRepository.d.ts.map +1 -0
- package/dist/infrastructure/repositories/D1PersonalSubscriptionRepository.js +142 -0
- package/dist/infrastructure/repositories/D1PersonalSubscriptionRepository.js.map +1 -0
- package/dist/infrastructure/repositories/D1PipelineRepository.d.ts +15 -0
- package/dist/infrastructure/repositories/D1PipelineRepository.d.ts.map +1 -0
- package/dist/infrastructure/repositories/D1PipelineRepository.js +46 -0
- package/dist/infrastructure/repositories/D1PipelineRepository.js.map +1 -0
- package/dist/infrastructure/repositories/D1PipelineScheduleRepository.d.ts +26 -0
- package/dist/infrastructure/repositories/D1PipelineScheduleRepository.d.ts.map +1 -0
- package/dist/infrastructure/repositories/D1PipelineScheduleRepository.js +192 -0
- package/dist/infrastructure/repositories/D1PipelineScheduleRepository.js.map +1 -0
- package/dist/infrastructure/repositories/D1PromptFragmentRepository.d.ts +15 -0
- package/dist/infrastructure/repositories/D1PromptFragmentRepository.d.ts.map +1 -0
- package/dist/infrastructure/repositories/D1PromptFragmentRepository.js +90 -0
- package/dist/infrastructure/repositories/D1PromptFragmentRepository.js.map +1 -0
- package/dist/infrastructure/repositories/D1ProviderApiKeyRepository.d.ts +21 -0
- package/dist/infrastructure/repositories/D1ProviderApiKeyRepository.d.ts.map +1 -0
- package/dist/infrastructure/repositories/D1ProviderApiKeyRepository.js +108 -0
- package/dist/infrastructure/repositories/D1ProviderApiKeyRepository.js.map +1 -0
- package/dist/infrastructure/repositories/D1ProviderSubscriptionTokenRepository.d.ts +19 -0
- package/dist/infrastructure/repositories/D1ProviderSubscriptionTokenRepository.d.ts.map +1 -0
- package/dist/infrastructure/repositories/D1ProviderSubscriptionTokenRepository.js +78 -0
- package/dist/infrastructure/repositories/D1ProviderSubscriptionTokenRepository.js.map +1 -0
- package/dist/infrastructure/repositories/D1PullRequestProjectionRepository.d.ts +13 -0
- package/dist/infrastructure/repositories/D1PullRequestProjectionRepository.d.ts.map +1 -0
- package/dist/infrastructure/repositories/D1PullRequestProjectionRepository.js +32 -0
- package/dist/infrastructure/repositories/D1PullRequestProjectionRepository.js.map +1 -0
- package/dist/infrastructure/repositories/D1RateLimitRepository.d.ts +18 -0
- package/dist/infrastructure/repositories/D1RateLimitRepository.d.ts.map +1 -0
- package/dist/infrastructure/repositories/D1RateLimitRepository.js +30 -0
- package/dist/infrastructure/repositories/D1RateLimitRepository.js.map +1 -0
- package/dist/infrastructure/repositories/D1ReferenceArchitectureRepository.d.ts +15 -0
- package/dist/infrastructure/repositories/D1ReferenceArchitectureRepository.d.ts.map +1 -0
- package/dist/infrastructure/repositories/D1ReferenceArchitectureRepository.js +77 -0
- package/dist/infrastructure/repositories/D1ReferenceArchitectureRepository.js.map +1 -0
- package/dist/infrastructure/repositories/D1ReleaseHealthConfigRepository.d.ts +17 -0
- package/dist/infrastructure/repositories/D1ReleaseHealthConfigRepository.d.ts.map +1 -0
- package/dist/infrastructure/repositories/D1ReleaseHealthConfigRepository.js +64 -0
- package/dist/infrastructure/repositories/D1ReleaseHealthConfigRepository.js.map +1 -0
- package/dist/infrastructure/repositories/D1RepoBlueprintRepository.d.ts +20 -0
- package/dist/infrastructure/repositories/D1RepoBlueprintRepository.d.ts.map +1 -0
- package/dist/infrastructure/repositories/D1RepoBlueprintRepository.js +64 -0
- package/dist/infrastructure/repositories/D1RepoBlueprintRepository.js.map +1 -0
- package/dist/infrastructure/repositories/D1RepoProjectionRepository.d.ts +20 -0
- package/dist/infrastructure/repositories/D1RepoProjectionRepository.d.ts.map +1 -0
- package/dist/infrastructure/repositories/D1RepoProjectionRepository.js +121 -0
- package/dist/infrastructure/repositories/D1RepoProjectionRepository.js.map +1 -0
- package/dist/infrastructure/repositories/D1RequirementReviewRepository.d.ts +20 -0
- package/dist/infrastructure/repositories/D1RequirementReviewRepository.d.ts.map +1 -0
- package/dist/infrastructure/repositories/D1RequirementReviewRepository.js +76 -0
- package/dist/infrastructure/repositories/D1RequirementReviewRepository.js.map +1 -0
- package/dist/infrastructure/repositories/D1RunnerPoolConnectionRepository.d.ts +13 -0
- package/dist/infrastructure/repositories/D1RunnerPoolConnectionRepository.d.ts.map +1 -0
- package/dist/infrastructure/repositories/D1RunnerPoolConnectionRepository.js +48 -0
- package/dist/infrastructure/repositories/D1RunnerPoolConnectionRepository.js.map +1 -0
- package/dist/infrastructure/repositories/D1ServiceFragmentDefaultsRepository.d.ts +16 -0
- package/dist/infrastructure/repositories/D1ServiceFragmentDefaultsRepository.d.ts.map +1 -0
- package/dist/infrastructure/repositories/D1ServiceFragmentDefaultsRepository.js +27 -0
- package/dist/infrastructure/repositories/D1ServiceFragmentDefaultsRepository.js.map +1 -0
- package/dist/infrastructure/repositories/D1ServiceRepository.d.ts +19 -0
- package/dist/infrastructure/repositories/D1ServiceRepository.d.ts.map +1 -0
- package/dist/infrastructure/repositories/D1ServiceRepository.js +114 -0
- package/dist/infrastructure/repositories/D1ServiceRepository.js.map +1 -0
- package/dist/infrastructure/repositories/D1SlackRepositories.d.ts +29 -0
- package/dist/infrastructure/repositories/D1SlackRepositories.d.ts.map +1 -0
- package/dist/infrastructure/repositories/D1SlackRepositories.js +119 -0
- package/dist/infrastructure/repositories/D1SlackRepositories.js.map +1 -0
- package/dist/infrastructure/repositories/D1TaskConnectionRepository.d.ts +27 -0
- package/dist/infrastructure/repositories/D1TaskConnectionRepository.d.ts.map +1 -0
- package/dist/infrastructure/repositories/D1TaskConnectionRepository.js +89 -0
- package/dist/infrastructure/repositories/D1TaskConnectionRepository.js.map +1 -0
- package/dist/infrastructure/repositories/D1TaskRepository.d.ts +15 -0
- package/dist/infrastructure/repositories/D1TaskRepository.d.ts.map +1 -0
- package/dist/infrastructure/repositories/D1TaskRepository.js +90 -0
- package/dist/infrastructure/repositories/D1TaskRepository.js.map +1 -0
- package/dist/infrastructure/repositories/D1TokenUsageRepository.d.ts +13 -0
- package/dist/infrastructure/repositories/D1TokenUsageRepository.d.ts.map +1 -0
- package/dist/infrastructure/repositories/D1TokenUsageRepository.js +41 -0
- package/dist/infrastructure/repositories/D1TokenUsageRepository.js.map +1 -0
- package/dist/infrastructure/repositories/D1TrackerSettingsRepository.d.ts +12 -0
- package/dist/infrastructure/repositories/D1TrackerSettingsRepository.d.ts.map +1 -0
- package/dist/infrastructure/repositories/D1TrackerSettingsRepository.js +32 -0
- package/dist/infrastructure/repositories/D1TrackerSettingsRepository.js.map +1 -0
- package/dist/infrastructure/repositories/D1UserRepository.d.ts +19 -0
- package/dist/infrastructure/repositories/D1UserRepository.d.ts.map +1 -0
- package/dist/infrastructure/repositories/D1UserRepository.js +108 -0
- package/dist/infrastructure/repositories/D1UserRepository.js.map +1 -0
- package/dist/infrastructure/repositories/D1WorkspaceMountRepository.d.ts +19 -0
- package/dist/infrastructure/repositories/D1WorkspaceMountRepository.d.ts.map +1 -0
- package/dist/infrastructure/repositories/D1WorkspaceMountRepository.js +115 -0
- package/dist/infrastructure/repositories/D1WorkspaceMountRepository.js.map +1 -0
- package/dist/infrastructure/repositories/D1WorkspaceRepository.d.ts +18 -0
- package/dist/infrastructure/repositories/D1WorkspaceRepository.d.ts.map +1 -0
- package/dist/infrastructure/repositories/D1WorkspaceRepository.js +77 -0
- package/dist/infrastructure/repositories/D1WorkspaceRepository.js.map +1 -0
- package/dist/infrastructure/repositories/D1WorkspaceSettingsRepository.d.ts +17 -0
- package/dist/infrastructure/repositories/D1WorkspaceSettingsRepository.d.ts.map +1 -0
- package/dist/infrastructure/repositories/D1WorkspaceSettingsRepository.js +50 -0
- package/dist/infrastructure/repositories/D1WorkspaceSettingsRepository.js.map +1 -0
- package/dist/infrastructure/repositories/chunk.d.ts +11 -0
- package/dist/infrastructure/repositories/chunk.d.ts.map +1 -0
- package/dist/infrastructure/repositories/chunk.js +17 -0
- package/dist/infrastructure/repositories/chunk.js.map +1 -0
- package/dist/infrastructure/repositories/github-mappers/branch.d.ts +11 -0
- package/dist/infrastructure/repositories/github-mappers/branch.d.ts.map +1 -0
- package/dist/infrastructure/repositories/github-mappers/branch.js +22 -0
- package/dist/infrastructure/repositories/github-mappers/branch.js.map +1 -0
- package/dist/infrastructure/repositories/github-mappers/check-run.d.ts +13 -0
- package/dist/infrastructure/repositories/github-mappers/check-run.d.ts.map +1 -0
- package/dist/infrastructure/repositories/github-mappers/check-run.js +24 -0
- package/dist/infrastructure/repositories/github-mappers/check-run.js.map +1 -0
- package/dist/infrastructure/repositories/github-mappers/commit.d.ts +12 -0
- package/dist/infrastructure/repositories/github-mappers/commit.d.ts.map +1 -0
- package/dist/infrastructure/repositories/github-mappers/commit.js +22 -0
- package/dist/infrastructure/repositories/github-mappers/commit.js.map +1 -0
- package/dist/infrastructure/repositories/github-mappers/index.d.ts +11 -0
- package/dist/infrastructure/repositories/github-mappers/index.d.ts.map +1 -0
- package/dist/infrastructure/repositories/github-mappers/index.js +14 -0
- package/dist/infrastructure/repositories/github-mappers/index.js.map +1 -0
- package/dist/infrastructure/repositories/github-mappers/installation.d.ts +16 -0
- package/dist/infrastructure/repositories/github-mappers/installation.d.ts.map +1 -0
- package/dist/infrastructure/repositories/github-mappers/installation.js +29 -0
- package/dist/infrastructure/repositories/github-mappers/installation.js.map +1 -0
- package/dist/infrastructure/repositories/github-mappers/issue.d.ts +15 -0
- package/dist/infrastructure/repositories/github-mappers/issue.d.ts.map +1 -0
- package/dist/infrastructure/repositories/github-mappers/issue.js +29 -0
- package/dist/infrastructure/repositories/github-mappers/issue.js.map +1 -0
- package/dist/infrastructure/repositories/github-mappers/pull-request.d.ts +18 -0
- package/dist/infrastructure/repositories/github-mappers/pull-request.d.ts.map +1 -0
- package/dist/infrastructure/repositories/github-mappers/pull-request.js +36 -0
- package/dist/infrastructure/repositories/github-mappers/pull-request.js.map +1 -0
- package/dist/infrastructure/repositories/github-mappers/repo.d.ts +15 -0
- package/dist/infrastructure/repositories/github-mappers/repo.d.ts.map +1 -0
- package/dist/infrastructure/repositories/github-mappers/repo.js +31 -0
- package/dist/infrastructure/repositories/github-mappers/repo.js.map +1 -0
- package/dist/infrastructure/repositories/github-mappers/serialize.d.ts +3 -0
- package/dist/infrastructure/repositories/github-mappers/serialize.d.ts.map +1 -0
- package/dist/infrastructure/repositories/github-mappers/serialize.js +4 -0
- package/dist/infrastructure/repositories/github-mappers/serialize.js.map +1 -0
- package/dist/infrastructure/repositories/github-mappers/sync-cursor.d.ts +8 -0
- package/dist/infrastructure/repositories/github-mappers/sync-cursor.d.ts.map +1 -0
- package/dist/infrastructure/repositories/github-mappers/sync-cursor.js +4 -0
- package/dist/infrastructure/repositories/github-mappers/sync-cursor.js.map +1 -0
- package/dist/infrastructure/repositories/github-mappers/upsert.d.ts +11 -0
- package/dist/infrastructure/repositories/github-mappers/upsert.d.ts.map +1 -0
- package/dist/infrastructure/repositories/github-mappers/upsert.js +18 -0
- package/dist/infrastructure/repositories/github-mappers/upsert.js.map +1 -0
- package/dist/infrastructure/repositories/mappers.d.ts +2 -0
- package/dist/infrastructure/repositories/mappers.d.ts.map +1 -0
- package/dist/infrastructure/repositories/mappers.js +4 -0
- package/dist/infrastructure/repositories/mappers.js.map +1 -0
- package/dist/infrastructure/runners/HttpRunnerPoolProvider.d.ts +2 -0
- package/dist/infrastructure/runners/HttpRunnerPoolProvider.d.ts.map +1 -0
- package/dist/infrastructure/runners/HttpRunnerPoolProvider.js +5 -0
- package/dist/infrastructure/runners/HttpRunnerPoolProvider.js.map +1 -0
- package/dist/infrastructure/runners/RunnerPoolTransport.d.ts +2 -0
- package/dist/infrastructure/runners/RunnerPoolTransport.d.ts.map +1 -0
- package/dist/infrastructure/runners/RunnerPoolTransport.js +5 -0
- package/dist/infrastructure/runners/RunnerPoolTransport.js.map +1 -0
- package/dist/infrastructure/runtime.d.ts +8 -0
- package/dist/infrastructure/runtime.d.ts.map +1 -0
- package/dist/infrastructure/runtime.js +13 -0
- package/dist/infrastructure/runtime.js.map +1 -0
- package/dist/infrastructure/tasks/GitHubIssuesProvider.d.ts +50 -0
- package/dist/infrastructure/tasks/GitHubIssuesProvider.d.ts.map +1 -0
- package/dist/infrastructure/tasks/GitHubIssuesProvider.js +91 -0
- package/dist/infrastructure/tasks/GitHubIssuesProvider.js.map +1 -0
- package/dist/infrastructure/tasks/JiraProvider.d.ts +29 -0
- package/dist/infrastructure/tasks/JiraProvider.d.ts.map +1 -0
- package/dist/infrastructure/tasks/JiraProvider.js +109 -0
- package/dist/infrastructure/tasks/JiraProvider.js.map +1 -0
- package/dist/infrastructure/workflows/BootstrapWorkflow.d.ts +21 -0
- package/dist/infrastructure/workflows/BootstrapWorkflow.d.ts.map +1 -0
- package/dist/infrastructure/workflows/BootstrapWorkflow.js +72 -0
- package/dist/infrastructure/workflows/BootstrapWorkflow.js.map +1 -0
- package/dist/infrastructure/workflows/ExecutionWorkflow.d.ts +15 -0
- package/dist/infrastructure/workflows/ExecutionWorkflow.d.ts.map +1 -0
- package/dist/infrastructure/workflows/ExecutionWorkflow.js +169 -0
- package/dist/infrastructure/workflows/ExecutionWorkflow.js.map +1 -0
- package/dist/infrastructure/workflows/GitHubBackfillWorkflow.d.ts +17 -0
- package/dist/infrastructure/workflows/GitHubBackfillWorkflow.d.ts.map +1 -0
- package/dist/infrastructure/workflows/GitHubBackfillWorkflow.js +24 -0
- package/dist/infrastructure/workflows/GitHubBackfillWorkflow.js.map +1 -0
- package/dist/infrastructure/workflows/WorkflowsBootstrapRunner.d.ts +15 -0
- package/dist/infrastructure/workflows/WorkflowsBootstrapRunner.d.ts.map +1 -0
- package/dist/infrastructure/workflows/WorkflowsBootstrapRunner.js +34 -0
- package/dist/infrastructure/workflows/WorkflowsBootstrapRunner.js.map +1 -0
- package/dist/infrastructure/workflows/WorkflowsWorkRunner.d.ts +31 -0
- package/dist/infrastructure/workflows/WorkflowsWorkRunner.d.ts.map +1 -0
- package/dist/infrastructure/workflows/WorkflowsWorkRunner.js +55 -0
- package/dist/infrastructure/workflows/WorkflowsWorkRunner.js.map +1 -0
- package/dist/infrastructure/workflows/retention.d.ts +35 -0
- package/dist/infrastructure/workflows/retention.d.ts.map +1 -0
- package/dist/infrastructure/workflows/retention.js +26 -0
- package/dist/infrastructure/workflows/retention.js.map +1 -0
- package/dist/infrastructure/workflows/sweeper.d.ts +57 -0
- package/dist/infrastructure/workflows/sweeper.d.ts.map +1 -0
- package/dist/infrastructure/workflows/sweeper.js +62 -0
- package/dist/infrastructure/workflows/sweeper.js.map +1 -0
- package/migrations/0001_init.sql +677 -0
- package/migrations/0002_clarity_reviews.sql +19 -0
- package/migrations/0002_consensus.sql +38 -0
- package/migrations/0002_llm_reasoning_text.sql +6 -0
- package/migrations/0002_local_model_endpoints.sql +16 -0
- package/migrations/0003_pipeline_labels_archive.sql +13 -0
- package/migrations/0003_release_health.sql +34 -0
- package/migrations/0004_run_timing_task_types.sql +24 -0
- package/package.json +65 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"middleware.js","sourceRoot":"","sources":["../../../src/infrastructure/auth/middleware.ts"],"names":[],"mappings":"AAAA,qFAAqF;AACrF,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"signing.d.ts","sourceRoot":"","sources":["../../../src/infrastructure/auth/signing.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAA;AAChE,YAAY,EAAE,cAAc,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"signing.js","sourceRoot":"","sources":["../../../src/infrastructure/auth/signing.ts"],"names":[],"mappings":"AAAA,qFAAqF;AACrF,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAA"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { type ProviderCapabilities } from '@cat-factory/kernel';
|
|
2
|
+
import type { AgentsConfig } from '@cat-factory/server';
|
|
3
|
+
import type { Env } from '../env';
|
|
4
|
+
export type { AgentsConfig };
|
|
5
|
+
export declare function loadAgentsConfig(env: Env, caps: ProviderCapabilities): AgentsConfig;
|
|
6
|
+
//# sourceMappingURL=agents.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"agents.d.ts","sourceRoot":"","sources":["../../../src/infrastructure/config/agents.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,oBAAoB,EAAmB,MAAM,qBAAqB,CAAA;AAEhF,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAA;AACvD,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,QAAQ,CAAA;AAKjC,YAAY,EAAE,YAAY,EAAE,CAAA;AAgC5B,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,GAAG,EAAE,IAAI,EAAE,oBAAoB,GAAG,YAAY,CAsEnF"}
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
import { resolveModelRef } from '@cat-factory/kernel';
|
|
2
|
+
import { num } from './utils';
|
|
3
|
+
function parseModelOverrides(raw) {
|
|
4
|
+
if (!raw || raw.trim() === '')
|
|
5
|
+
return {};
|
|
6
|
+
let parsed;
|
|
7
|
+
try {
|
|
8
|
+
parsed = JSON.parse(raw);
|
|
9
|
+
}
|
|
10
|
+
catch {
|
|
11
|
+
throw new Error('AGENT_MODELS is not valid JSON');
|
|
12
|
+
}
|
|
13
|
+
if (typeof parsed !== 'object' || parsed === null)
|
|
14
|
+
return {};
|
|
15
|
+
const out = {};
|
|
16
|
+
for (const [kind, value] of Object.entries(parsed)) {
|
|
17
|
+
const provider = value.provider;
|
|
18
|
+
const model = value.model;
|
|
19
|
+
if (typeof provider !== 'string' || typeof model !== 'string') {
|
|
20
|
+
throw new Error(`AGENT_MODELS.${kind} requires string "provider" and "model"`);
|
|
21
|
+
}
|
|
22
|
+
out[kind] = {
|
|
23
|
+
ref: { provider, model },
|
|
24
|
+
temperature: typeof value.temperature === 'number' ? value.temperature : undefined,
|
|
25
|
+
maxOutputTokens: typeof value.maxOutputTokens === 'number' ? value.maxOutputTokens : undefined,
|
|
26
|
+
system: typeof value.system === 'string' ? value.system : undefined,
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
return out;
|
|
30
|
+
}
|
|
31
|
+
export function loadAgentsConfig(env, caps) {
|
|
32
|
+
// Default unpinned agents/blocks to the Qwen model (its active flavour: the
|
|
33
|
+
// Cloudflare Workers AI variant when the Cloudflare lib is enabled, upgraded to
|
|
34
|
+
// direct DashScope per-workspace by the executor when a Qwen key is configured).
|
|
35
|
+
// An operator can still pin a specific provider/model via the env vars.
|
|
36
|
+
const qwenDefault = resolveModelRef('qwen', caps);
|
|
37
|
+
const defaultConfig = {
|
|
38
|
+
ref: {
|
|
39
|
+
provider: env.AGENT_DEFAULT_PROVIDER ?? qwenDefault?.provider ?? 'workers-ai',
|
|
40
|
+
model: env.AGENT_DEFAULT_MODEL ?? qwenDefault?.model ?? '@cf/qwen/qwen3-30b-a3b-fp8',
|
|
41
|
+
},
|
|
42
|
+
temperature: num(env.AGENT_DEFAULT_TEMPERATURE) ?? 0.4,
|
|
43
|
+
// 5000, not 512: the default model is a *reasoning* model whose `<think>`
|
|
44
|
+
// tokens count against this cap, so a tight limit truncates the answer mid
|
|
45
|
+
// reasoning (finish_reason: length). Operators can still override via env or
|
|
46
|
+
// pin a leaner cap per kind in AGENT_MODELS.
|
|
47
|
+
maxOutputTokens: num(env.AGENT_MAX_OUTPUT_TOKENS) ?? 5000,
|
|
48
|
+
};
|
|
49
|
+
// The agentic phases — design (bootstrap/architect), build (coder) and review
|
|
50
|
+
// (reviewer) — drive long multi-step tool loops, so they default to a strong
|
|
51
|
+
// agentic-coding model rather than the small default MoE (qwen3-30b-a3b), which
|
|
52
|
+
// is too weak to sustain that loop and tends to spin without committing changes.
|
|
53
|
+
// The cheap default still handles the lighter kinds (e.g. tester, fragment
|
|
54
|
+
// selection, doc planning). An operator's AGENT_MODELS env entry overrides any
|
|
55
|
+
// of these per kind.
|
|
56
|
+
const agenticDefault = {
|
|
57
|
+
ref: { provider: 'workers-ai', model: '@cf/zai-org/glm-5.2' },
|
|
58
|
+
temperature: num(env.AGENT_DEFAULT_TEMPERATURE) ?? 0.3,
|
|
59
|
+
maxOutputTokens: num(env.AGENT_MAX_OUTPUT_TOKENS) ?? 5000,
|
|
60
|
+
};
|
|
61
|
+
// The coder (implementer) runs the longest, most tool-heavy loop, where GLM-5.2
|
|
62
|
+
// on Workers AI was observed emitting malformed tool calls (e.g. `write` with no
|
|
63
|
+
// `path`) and looping until the harness no-progress guard aborted. Kimi K2.7 (a
|
|
64
|
+
// 1T-param model with structured outputs for agentic workloads, native on Workers
|
|
65
|
+
// AI) holds up better on that sustained tool loop, so the build phase defaults to
|
|
66
|
+
// it while design/review stay on GLM-5.2.
|
|
67
|
+
const coderDefault = {
|
|
68
|
+
ref: { provider: 'workers-ai', model: '@cf/moonshotai/kimi-k2.7-code' },
|
|
69
|
+
temperature: num(env.AGENT_DEFAULT_TEMPERATURE) ?? 0.3,
|
|
70
|
+
maxOutputTokens: num(env.AGENT_MAX_OUTPUT_TOKENS) ?? 5000,
|
|
71
|
+
};
|
|
72
|
+
// Companions (reviewer / spec-companion / architect-companion) return their whole
|
|
73
|
+
// verdict — rating + summary + per-item comments — as ONE inline JSON reply. On a
|
|
74
|
+
// reasoning model the <think> tokens share the output budget, so the 5000 cap can
|
|
75
|
+
// truncate the JSON mid-comment, leaving it unparseable (the run then can't read the
|
|
76
|
+
// review). Give companions a larger budget so the verdict fits. Strong agentic model,
|
|
77
|
+
// like the reviewer was already on.
|
|
78
|
+
const companionDefault = {
|
|
79
|
+
ref: { provider: 'workers-ai', model: '@cf/zai-org/glm-5.2' },
|
|
80
|
+
temperature: num(env.AGENT_DEFAULT_TEMPERATURE) ?? 0.3,
|
|
81
|
+
maxOutputTokens: num(env.AGENT_MAX_OUTPUT_TOKENS) ?? 12000,
|
|
82
|
+
};
|
|
83
|
+
const byKind = {
|
|
84
|
+
architect: agenticDefault,
|
|
85
|
+
reviewer: companionDefault,
|
|
86
|
+
'spec-companion': companionDefault,
|
|
87
|
+
'architect-companion': companionDefault,
|
|
88
|
+
coder: coderDefault,
|
|
89
|
+
};
|
|
90
|
+
// Env overrides win over the built-in agentic defaults.
|
|
91
|
+
Object.assign(byKind, parseModelOverrides(env.AGENT_MODELS));
|
|
92
|
+
return {
|
|
93
|
+
routing: {
|
|
94
|
+
default: defaultConfig,
|
|
95
|
+
byKind,
|
|
96
|
+
},
|
|
97
|
+
resolveBlockModel: (modelId) => resolveModelRef(modelId, caps),
|
|
98
|
+
};
|
|
99
|
+
}
|
|
100
|
+
//# sourceMappingURL=agents.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"agents.js","sourceRoot":"","sources":["../../../src/infrastructure/config/agents.ts"],"names":[],"mappings":"AACA,OAAO,EAA6B,eAAe,EAAE,MAAM,qBAAqB,CAAA;AAIhF,OAAO,EAAE,GAAG,EAAE,MAAM,SAAS,CAAA;AAM7B,SAAS,mBAAmB,CAC1B,GAAuB;IAEvB,IAAI,CAAC,GAAG,IAAI,GAAG,CAAC,IAAI,EAAE,KAAK,EAAE;QAAE,OAAO,EAAE,CAAA;IACxC,IAAI,MAAe,CAAA;IACnB,IAAI,CAAC;QACH,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAA;IAC1B,CAAC;IAAC,MAAM,CAAC;QACP,MAAM,IAAI,KAAK,CAAC,gCAAgC,CAAC,C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AAE;QAC7D,WAAW,EAAE,GAAG,CAAC,GAAG,CAAC,yBAAyB,CAAC,IAAI,GAAG;QACtD,eAAe,EAAE,GAAG,CAAC,GAAG,CAAC,uBAAuB,CAAC,IAAI,KAAK;KAC3D,CAAA;IACD,MAAM,MAAM,GAAiD;QAC3D,SAAS,EAAE,cAAc;QACzB,QAAQ,EAAE,gBAAgB;QAC1B,gBAAgB,EAAE,gBAAgB;QAClC,qBAAqB,EAAE,gBAAgB;QACvC,KAAK,EAAE,YAAY;KACpB,CAAA;IACD,wDAAwD;IACxD,MAAM,CAAC,MAAM,CAAC,MAAM,EAAE,mBAAmB,CAAC,GAAG,CAAC,YAAY,CAAC,CAAC,CAAA;IAE5D,OAAO;QACL,OAAO,EAAE;YACP,OAAO,EAAE,aAAa;YACtB,MAAM;SACP;QACD,iBAAiB,EAAE,CAAC,OAAO,EAAE,EAAE,CAAC,eAAe,CAAC,OAAO,EAAE,IAAI,CAAC;KAC/D,CAAA;AACH,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { AuthConfig } from '@cat-factory/server';
|
|
2
|
+
import type { Env } from '../env';
|
|
3
|
+
export type { AuthConfig };
|
|
4
|
+
/**
|
|
5
|
+
* Minimum length for AUTH_SESSION_SECRET. The same secret keys the HMAC over
|
|
6
|
+
* every session, OAuth-state, container-proxy and WS-ticket token; a short
|
|
7
|
+
* secret is offline-brute-forceable, which would let an attacker forge a session.
|
|
8
|
+
* A secret below this length is treated as misconfigured (auth disabled → the
|
|
9
|
+
* gate fails closed with 503) rather than silently accepted.
|
|
10
|
+
*/
|
|
11
|
+
export declare const MIN_SESSION_SECRET_LENGTH = 32;
|
|
12
|
+
export declare function loadAuthConfig(env: Env): AuthConfig;
|
|
13
|
+
//# sourceMappingURL=auth.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"auth.d.ts","sourceRoot":"","sources":["../../../src/infrastructure/config/auth.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAA;AACrD,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,QAAQ,CAAA;AAGjC,YAAY,EAAE,UAAU,EAAE,CAAA;AAE1B;;;;;;GAMG;AACH,eAAO,MAAM,yBAAyB,KAAK,CAAA;AAK3C,wBAAgB,cAAc,CAAC,GAAG,EAAE,GAAG,GAAG,UAAU,CAkEnD"}
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import { num } from './utils';
|
|
2
|
+
/**
|
|
3
|
+
* Minimum length for AUTH_SESSION_SECRET. The same secret keys the HMAC over
|
|
4
|
+
* every session, OAuth-state, container-proxy and WS-ticket token; a short
|
|
5
|
+
* secret is offline-brute-forceable, which would let an attacker forge a session.
|
|
6
|
+
* A secret below this length is treated as misconfigured (auth disabled → the
|
|
7
|
+
* gate fails closed with 503) rather than silently accepted.
|
|
8
|
+
*/
|
|
9
|
+
export const MIN_SESSION_SECRET_LENGTH = 32;
|
|
10
|
+
/** Deployment environments where the AUTH_DEV_OPEN escape hatch is refused. */
|
|
11
|
+
const PRODUCTION_ENVIRONMENTS = new Set(['production', 'prod', 'staging']);
|
|
12
|
+
export function loadAuthConfig(env) {
|
|
13
|
+
// Enabled when the OAuth credentials and a sufficiently strong session secret
|
|
14
|
+
// are all present, mirroring the GitHub-integration default-off convention.
|
|
15
|
+
const clientId = env.GITHUB_OAUTH_CLIENT_ID?.trim() ?? '';
|
|
16
|
+
const clientSecret = env.GITHUB_OAUTH_CLIENT_SECRET?.trim() ?? '';
|
|
17
|
+
const sessionSecret = env.AUTH_SESSION_SECRET?.trim() ?? '';
|
|
18
|
+
const ttlHours = num(env.AUTH_SESSION_TTL_HOURS);
|
|
19
|
+
// The local-dev escape hatch is honoured ONLY outside a production-like
|
|
20
|
+
// deployment, so leaving AUTH_DEV_OPEN=true set on a deployed worker can no
|
|
21
|
+
// longer silently re-open the API. Operators should set ENVIRONMENT=production.
|
|
22
|
+
const environment = env.ENVIRONMENT?.trim().toLowerCase() ?? '';
|
|
23
|
+
const devOpen = env.AUTH_DEV_OPEN?.trim() === 'true' && !PRODUCTION_ENVIRONMENTS.has(environment);
|
|
24
|
+
const strongSecret = sessionSecret.length >= MIN_SESSION_SECRET_LENGTH;
|
|
25
|
+
const githubEnabled = clientId !== '' && clientSecret !== '' && strongSecret;
|
|
26
|
+
// Google OAuth is offered only when its client id/secret are both present.
|
|
27
|
+
const googleClientId = env.GOOGLE_OAUTH_CLIENT_ID?.trim() ?? '';
|
|
28
|
+
const googleClientSecret = env.GOOGLE_OAUTH_CLIENT_SECRET?.trim() ?? '';
|
|
29
|
+
const googleEnabled = googleClientId !== '' && googleClientSecret !== '' && strongSecret;
|
|
30
|
+
const passwordEnabled = env.AUTH_PASSWORD_ENABLED?.trim() === 'true' && strongSecret;
|
|
31
|
+
return {
|
|
32
|
+
// Enabled when ANY provider is configured (with a strong session secret).
|
|
33
|
+
enabled: githubEnabled || googleEnabled || passwordEnabled,
|
|
34
|
+
devOpen,
|
|
35
|
+
githubEnabled,
|
|
36
|
+
clientId,
|
|
37
|
+
clientSecret,
|
|
38
|
+
sessionSecret,
|
|
39
|
+
apiBase: env.GITHUB_API_BASE?.trim() || 'https://api.github.com',
|
|
40
|
+
oauthBase: env.GITHUB_OAUTH_BASE?.trim() || 'https://github.com',
|
|
41
|
+
sessionTtlMs: (ttlHours !== undefined && ttlHours > 0 ? ttlHours : 168) * 60 * 60 * 1000,
|
|
42
|
+
successRedirectUrl: env.AUTH_SUCCESS_REDIRECT_URL?.trim() || '',
|
|
43
|
+
callbackUrl: env.AUTH_CALLBACK_URL?.trim() || '',
|
|
44
|
+
passwordEnabled,
|
|
45
|
+
...(googleEnabled
|
|
46
|
+
? {
|
|
47
|
+
google: {
|
|
48
|
+
clientId: googleClientId,
|
|
49
|
+
clientSecret: googleClientSecret,
|
|
50
|
+
redirectUrl: env.GOOGLE_OAUTH_REDIRECT_URL?.trim() || '',
|
|
51
|
+
},
|
|
52
|
+
}
|
|
53
|
+
: {}),
|
|
54
|
+
allowedEmailDomains: (env.AUTH_ALLOWED_EMAIL_DOMAINS ?? '')
|
|
55
|
+
.split(',')
|
|
56
|
+
.map((d) => d.trim().toLowerCase())
|
|
57
|
+
.filter(Boolean),
|
|
58
|
+
allowedLogins: (env.AUTH_ALLOWED_LOGINS ?? '')
|
|
59
|
+
.split(',')
|
|
60
|
+
.map((login) => login.trim().toLowerCase())
|
|
61
|
+
.filter(Boolean),
|
|
62
|
+
allowedOrgs: (env.AUTH_ALLOWED_ORGS ?? '')
|
|
63
|
+
.split(',')
|
|
64
|
+
.map((org) => org.trim().toLowerCase())
|
|
65
|
+
.filter(Boolean),
|
|
66
|
+
allowedRedirectOrigins: (env.AUTH_ALLOWED_REDIRECT_ORIGINS ?? '')
|
|
67
|
+
.split(',')
|
|
68
|
+
.map((origin) => origin.trim())
|
|
69
|
+
.filter(Boolean)
|
|
70
|
+
.map((origin) => {
|
|
71
|
+
try {
|
|
72
|
+
return new URL(origin).origin;
|
|
73
|
+
}
|
|
74
|
+
catch {
|
|
75
|
+
return origin;
|
|
76
|
+
}
|
|
77
|
+
}),
|
|
78
|
+
};
|
|
79
|
+
}
|
|
80
|
+
//# sourceMappingURL=auth.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"auth.js","sourceRoot":"","sources":["../../../src/infrastructure/config/auth.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,GAAG,EAAE,MAAM,SAAS,CAAA;AAI7B;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,yBAAyB,GAAG,EAAE,CAAA;AAE3C,+EAA+E;AAC/E,MAAM,uBAAuB,GAAG,IAAI,GAAG,CAAC,CAAC,YAAY,EAAE,MAAM,EAAE,SAAS,CAAC,CAAC,CAAA;AAE1E,MAAM,UAAU,cAAc,CAAC,GAAQ;IACrC,8EAA8E;IAC9E,4EAA4E;IAC5E,MAAM,QAAQ,GAAG,GAAG,CAAC,sBAAsB,EA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W,EAAE,CAAC;aACtC,MAAM,CAAC,OAAO,CAAC;QAClB,sBAAsB,EAAE,CAAC,GAAG,CAAC,6BAA6B,IAAI,EAAE,CAAC;aAC9D,KAAK,CAAC,GAAG,CAAC;aACV,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC;aAC9B,MAAM,CAAC,OAAO,CAAC;aACf,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE;YACd,IAAI,CAAC;gBACH,OAAO,IAAI,GAAG,CAAC,MAAM,CAAC,CAAC,MAAM,CAAA;YAC/B,CAAC;YAAC,MAAM,CAAC;gBACP,OAAO,MAAM,CAAA;YACf,CAAC;QACH,CAAC,CAAC;KACL,CAAA;AACH,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cors.d.ts","sourceRoot":"","sources":["../../../src/infrastructure/config/cors.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,mBAAmB,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cors.js","sourceRoot":"","sources":["../../../src/infrastructure/config/cors.ts"],"names":[],"mappings":"AAAA,qFAAqF;AACrF,OAAO,EAAE,mBAAmB,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAA"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { DatadogConfig, IncidentEnrichmentConfig } from '@cat-factory/server';
|
|
2
|
+
import type { Env } from '../env';
|
|
3
|
+
export type { DatadogConfig, IncidentEnrichmentConfig };
|
|
4
|
+
export declare function loadDatadogConfig(env: Env): DatadogConfig;
|
|
5
|
+
export declare function loadIncidentEnrichmentConfig(env: Env): IncidentEnrichmentConfig;
|
|
6
|
+
//# sourceMappingURL=datadog.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"datadog.d.ts","sourceRoot":"","sources":["../../../src/infrastructure/config/datadog.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,wBAAwB,EAAE,MAAM,qBAAqB,CAAA;AAClF,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,QAAQ,CAAA;AAEjC,YAAY,EAAE,aAAa,EAAE,wBAAwB,EAAE,CAAA;AAEvD,wBAAgB,iBAAiB,CAAC,GAAG,EAAE,GAAG,GAAG,aAAa,CASzD;AAED,wBAAgB,4BAA4B,CAAC,GAAG,EAAE,GAAG,GAAG,wBAAwB,CAU/E"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
export function loadDatadogConfig(env) {
|
|
2
|
+
// Opt-in via the enable flag; the per-workspace API/app keys are sealed with the shared
|
|
3
|
+
// ENCRYPTION_KEY (under a datadog-scoped HKDF info). Off → the post-release-health gate
|
|
4
|
+
// is a pass-through.
|
|
5
|
+
const encryptionKey = env.ENCRYPTION_KEY?.trim();
|
|
6
|
+
return {
|
|
7
|
+
enabled: env.DATADOG_ENABLED === 'true' && !!encryptionKey,
|
|
8
|
+
encryptionKey,
|
|
9
|
+
};
|
|
10
|
+
}
|
|
11
|
+
export function loadIncidentEnrichmentConfig(env) {
|
|
12
|
+
// Optional, additive: annotate (never re-alert) an incident PagerDuty / incident.io
|
|
13
|
+
// already opened from the same monitors/SLOs. Deployment-level credentials.
|
|
14
|
+
const pdToken = env.PAGERDUTY_API_TOKEN?.trim();
|
|
15
|
+
const pdFrom = env.PAGERDUTY_FROM_EMAIL?.trim();
|
|
16
|
+
const ioKey = env.INCIDENTIO_API_KEY?.trim();
|
|
17
|
+
return {
|
|
18
|
+
...(pdToken && pdFrom ? { pagerDuty: { apiToken: pdToken, fromEmail: pdFrom } } : {}),
|
|
19
|
+
...(ioKey ? { incidentIo: { apiKey: ioKey } } : {}),
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
//# sourceMappingURL=datadog.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"datadog.js","sourceRoot":"","sources":["../../../src/infrastructure/config/datadog.ts"],"names":[],"mappings":"AAKA,MAAM,UAAU,iBAAiB,CAAC,GAAQ;IACxC,wFAAwF;IACxF,wFAAwF;IACxF,qBAAqB;IACrB,MAAM,aAAa,GAAG,GAAG,CAAC,cAAc,EAAE,IAAI,EAAE,CAAA;IAChD,OAAO;QACL,OAAO,EAAE,GAAG,CAAC,eAAe,KAAK,MAAM,IAAI,CAAC,CAAC,aAAa;QAC1D,aAAa;KACd,CAAA;AACH,CAAC;AAED,MAAM,UAAU,4BAA4B,CAAC,GAAQ;IACnD,oFAAoF;IACpF,4EAA4E;IAC5E,MAAM,OAAO,GAAG,GAAG,CAAC,mBAAmB,EAAE,IAAI,EAAE,CAAA;IAC/C,MAAM,MAAM,GAAG,GAAG,CAAC,oBAAoB,EAAE,IAAI,EAAE,CAAA;IAC/C,MAAM,KAAK,GAAG,GAAG,CAAC,kBAAkB,EAAE,IAAI,EAAE,CAAA;IAC5C,OAAO;QACL,GAAG,CAAC,OAAO,IAAI,MAAM,CAAC,CAAC,CAAC,EAAE,SAAS,EAAE,EAAE,QAAQ,EAAE,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;QACrF,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,UAAU,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;KACpD,CAAA;AACH,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"documents.d.ts","sourceRoot":"","sources":["../../../src/infrastructure/config/documents.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAA;AAC1D,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,QAAQ,CAAA;AAEjC,YAAY,EAAE,eAAe,EAAE,CAAA;AAe/B,wBAAgB,mBAAmB,CAAC,GAAG,EAAE,GAAG,GAAG,eAAe,CAwB7D"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
const ALL_SOURCES = ['confluence', 'notion', 'github'];
|
|
2
|
+
/** Parse the comma-separated `DOCUMENT_SOURCES` allow-list, defaulting to all. */
|
|
3
|
+
function parseSources(raw) {
|
|
4
|
+
if (!raw?.trim())
|
|
5
|
+
return [...ALL_SOURCES];
|
|
6
|
+
const requested = raw
|
|
7
|
+
.split(',')
|
|
8
|
+
.map((s) => s.trim().toLowerCase())
|
|
9
|
+
.filter(Boolean);
|
|
10
|
+
const selected = ALL_SOURCES.filter((s) => requested.includes(s));
|
|
11
|
+
return selected.length > 0 ? selected : [...ALL_SOURCES];
|
|
12
|
+
}
|
|
13
|
+
export function loadDocumentsConfig(env) {
|
|
14
|
+
// The document-source integration (Notion/Confluence/GitHub docs) is always on:
|
|
15
|
+
// tenants connect their own sources interactively through the UI, so there is no
|
|
16
|
+
// service-level enable flag to forget. The one hard requirement is a master key
|
|
17
|
+
// for encrypting those per-workspace credentials at rest — without it we would be
|
|
18
|
+
// persisting tokens in plaintext, so we fail loudly at config load rather than
|
|
19
|
+
// silently disabling the feature (which is how it used to vanish from the UI).
|
|
20
|
+
// The planner defaults to LLM mode; the worker only wires a model provider when a
|
|
21
|
+
// provider credential is present, so absent that the planner still degrades to its
|
|
22
|
+
// deterministic heading parser.
|
|
23
|
+
const encryptionKey = env.ENCRYPTION_KEY?.trim();
|
|
24
|
+
if (!encryptionKey) {
|
|
25
|
+
throw new Error('ENCRYPTION_KEY is required: the document-source integration (Notion, Confluence, …) ' +
|
|
26
|
+
'encrypts per-workspace source credentials at rest. Set it to a base64-encoded key of ' +
|
|
27
|
+
'at least 32 bytes.');
|
|
28
|
+
}
|
|
29
|
+
return {
|
|
30
|
+
enabled: true,
|
|
31
|
+
sources: parseSources(env.DOCUMENT_SOURCES),
|
|
32
|
+
planner: env.DOCUMENT_PLANNER?.trim() === 'headings' ? 'headings' : 'llm',
|
|
33
|
+
encryptionKey,
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
//# sourceMappingURL=documents.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"documents.js","sourceRoot":"","sources":["../../../src/infrastructure/config/documents.ts"],"names":[],"mappings":"AAMA,MAAM,WAAW,GAAkC,CAAC,YAAY,EAAE,QAAQ,EAAE,QAAQ,CAAC,CAAA;AAErF,kFAAkF;AAClF,SAAS,YAAY,CAAC,GAAuB;IAC3C,IAAI,CAAC,GAAG,EAAE,IAAI,EAAE;QAAE,OAAO,CAAC,GAAG,WAAW,CAAC,CAAA;IACzC,MAAM,SAAS,GAAG,GAAG;SAClB,KAAK,CAAC,GAAG,CAAC;SACV,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,WAAW,EAAE,CAAC;SAClC,MAAM,CAAC,OAAO,CAAC,CAAA;IAClB,MAAM,QAAQ,GAAG,WAAW,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,SAAS,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAA;IACjE,OAAO,QAAQ,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,GAAG,WAAW,CAAC,CAAA;AAC1D,CAAC;AAED,MAAM,UAAU,mBAAmB,CAAC,GAAQ;IAC1C,gFAAgF;IAChF,iFAAiF;IACjF,gFAAgF;IAChF,kFAAkF;IAClF,+EAA+E;IAC/E,+EAA+E;IAC/E,kFAAkF;IAClF,mFAAmF;IACnF,gCAAgC;IAChC,MAAM,aAAa,GAAG,GAAG,CAAC,cAAc,EAAE,IAAI,EAAE,CAAA;IAChD,IAAI,CAAC,aAAa,EAAE,CAAC;QACnB,MAAM,IAAI,KAAK,CACb,sFAAsF;YACpF,uFAAuF;YACvF,oBAAoB,CACvB,CAAA;IACH,CAAC;IACD,OAAO;QACL,OAAO,EAAE,IAAI;QACb,OAAO,EAAE,YAAY,CAAC,GAAG,CAAC,gBAAgB,CAAC;QAC3C,OAAO,EAAE,GAAG,CAAC,gBAAgB,EAAE,IAAI,EAAE,KAAK,UAAU,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,KAAK;QACzE,aAAa;KACd,CAAA;AACH,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"email.d.ts","sourceRoot":"","sources":["../../../src/infrastructure/config/email.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAA;AACtD,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,QAAQ,CAAA;AAEjC,YAAY,EAAE,WAAW,EAAE,CAAA;AAE3B,wBAAgB,eAAe,CAAC,GAAG,EAAE,GAAG,GAAG,WAAW,CAUrD"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export function loadEmailConfig(env) {
|
|
2
|
+
// Opt-in via EMAIL_ENABLED; the per-account provider API key is sealed with the
|
|
3
|
+
// shared ENCRYPTION_KEY. The provider + key + From address are onboarded per-account
|
|
4
|
+
// in the UI (stored in the DB), NOT read from env.
|
|
5
|
+
const encryptionKey = env.EMAIL_ENCRYPTION_KEY?.trim() || env.ENCRYPTION_KEY?.trim();
|
|
6
|
+
return {
|
|
7
|
+
enabled: env.EMAIL_ENABLED === 'true' && !!encryptionKey,
|
|
8
|
+
encryptionKey,
|
|
9
|
+
appBaseUrl: env.APP_BASE_URL?.trim() || env.AUTH_SUCCESS_REDIRECT_URL?.trim() || '',
|
|
10
|
+
};
|
|
11
|
+
}
|
|
12
|
+
//# sourceMappingURL=email.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"email.js","sourceRoot":"","sources":["../../../src/infrastructure/config/email.ts"],"names":[],"mappings":"AAKA,MAAM,UAAU,eAAe,CAAC,GAAQ;IACtC,gFAAgF;IAChF,qFAAqF;IACrF,mDAAmD;IACnD,MAAM,aAAa,GAAG,GAAG,CAAC,oBAAoB,EAAE,IAAI,EAAE,IAAI,GAAG,CAAC,cAAc,EAAE,IAAI,EAAE,CAAA;IACpF,OAAO;QACL,OAAO,EAAE,GAAG,CAAC,aAAa,KAAK,MAAM,IAAI,CAAC,CAAC,aAAa;QACxD,aAAa;QACb,UAAU,EAAE,GAAG,CAAC,YAAY,EAAE,IAAI,EAAE,IAAI,GAAG,CAAC,yBAAyB,EAAE,IAAI,EAAE,IAAI,EAAE;KACpF,CAAA;AACH,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"environments.d.ts","sourceRoot":"","sources":["../../../src/infrastructure/config/environments.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAA;AAC7D,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,QAAQ,CAAA;AAGjC,YAAY,EAAE,kBAAkB,EAAE,CAAA;AAElC,wBAAgB,sBAAsB,CAAC,GAAG,EAAE,GAAG,GAAG,kBAAkB,CAYnE"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { csv } from './utils';
|
|
2
|
+
export function loadEnvironmentsConfig(env) {
|
|
3
|
+
// Opt-in via the enable flag; credentials are sealed with the shared ENCRYPTION_KEY
|
|
4
|
+
// (under an environments-scoped HKDF info).
|
|
5
|
+
const encryptionKey = env.ENCRYPTION_KEY?.trim();
|
|
6
|
+
return {
|
|
7
|
+
enabled: env.ENVIRONMENTS_ENABLED === 'true' && !!encryptionKey,
|
|
8
|
+
encryptionKey,
|
|
9
|
+
// Trusted-adapter escape hatch: permit an in-house env platform on an internal/VPN
|
|
10
|
+
// host (otherwise the strict public-https guard rejects it).
|
|
11
|
+
allowUrlHosts: csv(env.ENVIRONMENTS_ALLOW_URL_HOSTS),
|
|
12
|
+
allowHttpUrls: env.ENVIRONMENTS_ALLOW_HTTP_URLS === 'true',
|
|
13
|
+
};
|
|
14
|
+
}
|
|
15
|
+
//# sourceMappingURL=environments.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"environments.js","sourceRoot":"","sources":["../../../src/infrastructure/config/environments.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,GAAG,EAAE,MAAM,SAAS,CAAA;AAI7B,MAAM,UAAU,sBAAsB,CAAC,GAAQ;IAC7C,oFAAoF;IACpF,4CAA4C;IAC5C,MAAM,aAAa,GAAG,GAAG,CAAC,cAAc,EAAE,IAAI,EAAE,CAAA;IAChD,OAAO;QACL,OAAO,EAAE,GAAG,CAAC,oBAAoB,KAAK,MAAM,IAAI,CAAC,CAAC,aAAa;QAC/D,aAAa;QACb,mFAAmF;QACnF,6DAA6D;QAC7D,aAAa,EAAE,GAAG,CAAC,GAAG,CAAC,4BAA4B,CAAC;QACpD,aAAa,EAAE,GAAG,CAAC,4BAA4B,KAAK,MAAM;KAC3D,CAAA;AACH,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"execution.d.ts","sourceRoot":"","sources":["../../../src/infrastructure/config/execution.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAA;AAC1D,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,QAAQ,CAAA;AAEjC,YAAY,EAAE,eAAe,EAAE,CAAA;AAO/B,wBAAgB,mBAAmB,CAAC,GAAG,EAAE,GAAG,GAAG,eAAe,CAe7D"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
function intEnv(value, fallback) {
|
|
2
|
+
const n = value ? Number(value) : NaN;
|
|
3
|
+
return Number.isFinite(n) && n > 0 ? n : fallback;
|
|
4
|
+
}
|
|
5
|
+
export function loadExecutionConfig(env) {
|
|
6
|
+
return {
|
|
7
|
+
// NOT a hard deadline: a parked run waits for a human indefinitely and is never failed
|
|
8
|
+
// for waiting. This is just the chunk length for each `waitForEvent` wait — on expiry the
|
|
9
|
+
// driver re-loops (re-checking storage, then re-arming) rather than killing the run.
|
|
10
|
+
decisionTimeout: env.DECISION_TIMEOUT?.trim() || '24 hours',
|
|
11
|
+
jobPollInterval: env.JOB_POLL_INTERVAL?.trim() || '15 seconds',
|
|
12
|
+
jobMaxPolls: intEnv(env.JOB_MAX_POLLS, 280),
|
|
13
|
+
jobPollFailureTolerance: intEnv(env.JOB_POLL_FAILURE_TOLERANCE, 6),
|
|
14
|
+
ciPollInterval: env.CI_POLL_INTERVAL?.trim() || '30 seconds',
|
|
15
|
+
ciMaxPolls: intEnv(env.CI_MAX_POLLS, 120),
|
|
16
|
+
// Hard floor of 75 min: a misconfigured low value must never reap live work
|
|
17
|
+
// (the longest legitimate container lifetime is ≈70 min of driver polling).
|
|
18
|
+
containerMaxAgeMs: Math.max(75, intEnv(env.CONTAINER_MAX_AGE_MINUTES, 90)) * 60_000,
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
//# sourceMappingURL=execution.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"execution.js","sourceRoot":"","sources":["../../../src/infrastructure/config/execution.ts"],"names":[],"mappings":"AAKA,SAAS,MAAM,CAAC,KAAyB,EAAE,QAAgB;IACzD,MAAM,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,GAAG,CAAA;IACrC,OAAO,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAA;AACnD,CAAC;AAED,MAAM,UAAU,mBAAmB,CAAC,GAAQ;IAC1C,OAAO;QACL,uFAAuF;QACvF,0FAA0F;QAC1F,qFAAqF;QACrF,eAAe,EAAE,GAAG,CAAC,gBAAgB,EAAE,IAAI,EAAE,IAAI,UAAU;QAC3D,eAAe,EAAE,GAAG,CAAC,iBAAiB,EAAE,IAAI,EAAE,IAAI,YAAY;QAC9D,WAAW,EAAE,MAAM,CAAC,GAAG,CAAC,aAAa,EAAE,GAAG,CAAC;QAC3C,uBAAuB,EAAE,MAAM,CAAC,GAAG,CAAC,0BAA0B,EAAE,CAAC,CAAC;QAClE,cAAc,EAAE,GAAG,CAAC,gBAAgB,EAAE,IAAI,EAAE,IAAI,YAAY;QAC5D,UAAU,EAAE,MAAM,CAAC,GAAG,CAAC,YAAY,EAAE,GAAG,CAAC;QACzC,4EAA4E;QAC5E,4EAA4E;QAC5E,iBAAiB,EAAE,IAAI,CAAC,GAAG,CAAC,EAAE,EAAE,MAAM,CAAC,GAAG,CAAC,yBAAyB,EAAE,EAAE,CAAC,CAAC,GAAG,MAAM;KACpF,CAAA;AACH,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { FragmentLibraryConfig } from '@cat-factory/server';
|
|
2
|
+
import type { Env } from '../env';
|
|
3
|
+
export type { FragmentLibraryConfig };
|
|
4
|
+
export declare function loadFragmentLibraryConfig(env: Env): FragmentLibraryConfig;
|
|
5
|
+
//# sourceMappingURL=fragmentLibrary.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fragmentLibrary.d.ts","sourceRoot":"","sources":["../../../src/infrastructure/config/fragmentLibrary.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAA;AAChE,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,QAAQ,CAAA;AAEjC,YAAY,EAAE,qBAAqB,EAAE,CAAA;AAErC,wBAAgB,yBAAyB,CAAC,GAAG,EAAE,GAAG,GAAG,qBAAqB,CAKzE"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fragmentLibrary.js","sourceRoot":"","sources":["../../../src/infrastructure/config/fragmentLibrary.ts"],"names":[],"mappings":"AAKA,MAAM,UAAU,yBAAyB,CAAC,GAAQ;IAChD,OAAO;QACL,OAAO,EAAE,GAAG,CAAC,sBAAsB,KAAK,MAAM;QAC9C,QAAQ,EAAE,GAAG,CAAC,uBAAuB,EAAE,IAAI,EAAE,KAAK,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,eAAe;KAClF,CAAA;AACH,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { GitHubConfig, PrivilegedAppConfig } from '@cat-factory/server';
|
|
2
|
+
import type { Env } from '../env';
|
|
3
|
+
export type { GitHubConfig, PrivilegedAppConfig };
|
|
4
|
+
export declare function loadGitHubConfig(env: Env): GitHubConfig;
|
|
5
|
+
//# sourceMappingURL=github.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"github.d.ts","sourceRoot":"","sources":["../../../src/infrastructure/config/github.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAA;AAC5E,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,QAAQ,CAAA;AAEjC,YAAY,EAAE,YAAY,EAAE,mBAAmB,EAAE,CAAA;AAEjD,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,GAAG,GAAG,YAAY,CAcvD"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
export function loadGitHubConfig(env) {
|
|
2
|
+
// Enabled when the App id and both secrets are present; the integration is
|
|
3
|
+
// entirely opt-in (a default-off convention shared by the optional integrations).
|
|
4
|
+
const appId = env.GITHUB_APP_ID?.trim() ?? '';
|
|
5
|
+
const enabled = appId !== '' && !!env.GITHUB_APP_PRIVATE_KEY && !!env.GITHUB_WEBHOOK_SECRET;
|
|
6
|
+
return {
|
|
7
|
+
enabled,
|
|
8
|
+
appId,
|
|
9
|
+
appSlug: env.GITHUB_APP_SLUG?.trim() ?? '',
|
|
10
|
+
apiBase: env.GITHUB_API_BASE?.trim() || 'https://api.github.com',
|
|
11
|
+
setupRedirectUrl: env.GITHUB_SETUP_REDIRECT_URL?.trim() || '/',
|
|
12
|
+
webhookSecret: env.GITHUB_WEBHOOK_SECRET ?? '',
|
|
13
|
+
privilegedApp: loadPrivilegedApp(env),
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
// The privileged tier only activates when both its id and key are present;
|
|
17
|
+
// either alone is treated as unconfigured so a half-set env never silently
|
|
18
|
+
// authenticates as a misconfigured App.
|
|
19
|
+
function loadPrivilegedApp(env) {
|
|
20
|
+
const appId = env.GITHUB_PRIVILEGED_APP_ID?.trim() ?? '';
|
|
21
|
+
if (appId === '' || !env.GITHUB_PRIVILEGED_APP_PRIVATE_KEY)
|
|
22
|
+
return undefined;
|
|
23
|
+
return { appId };
|
|
24
|
+
}
|
|
25
|
+
//# sourceMappingURL=github.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"github.js","sourceRoot":"","sources":["../../../src/infrastructure/config/github.ts"],"names":[],"mappings":"AAKA,MAAM,UAAU,gBAAgB,CAAC,GAAQ;IACvC,2EAA2E;IAC3E,kFAAkF;IAClF,MAAM,KAAK,GAAG,GAAG,CAAC,aAAa,EAAE,IAAI,EAAE,IAAI,EAAE,CAAA;IAC7C,MAAM,OAAO,GAAG,KAAK,KAAK,EAAE,IAAI,CAAC,CAAC,GAAG,CAAC,sBAAsB,IAAI,CAAC,CAAC,GAAG,CAAC,qBAAqB,CAAA;IAC3F,OAAO;QACL,OAAO;QACP,KAAK;QACL,OAAO,EAAE,GAAG,CAAC,eAAe,EAAE,IAAI,EAAE,IAAI,EAAE;QAC1C,OAAO,EAAE,GAAG,CAAC,eAAe,EAAE,IAAI,EAAE,IAAI,wBAAwB;QAChE,gBAAgB,EAAE,GAAG,CAAC,yBAAyB,EAAE,IAAI,EAAE,IAAI,GAAG;QAC9D,aAAa,EAAE,GAAG,CAAC,qBAAqB,IAAI,EAAE;QAC9C,aAAa,EAAE,iBAAiB,CAAC,GAAG,CAAC;KACtC,CAAA;AACH,CAAC;AAED,2EAA2E;AAC3E,2EAA2E;AAC3E,wCAAwC;AACxC,SAAS,iBAAiB,CAAC,GAAQ;IACjC,MAAM,KAAK,GAAG,GAAG,CAAC,wBAAwB,EAAE,IAAI,EAAE,IAAI,EAAE,CAAA;IACxD,IAAI,KAAK,KAAK,EAAE,IAAI,CAAC,GAAG,CAAC,iCAAiC;QAAE,OAAO,SAAS,CAAA;IAC5E,OAAO,EAAE,KAAK,EAAE,CAAA;AAClB,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { AppConfig } from '@cat-factory/server';
|
|
2
|
+
import type { Env } from '../env';
|
|
3
|
+
import { type AgentsConfig } from './agents';
|
|
4
|
+
import { type ExecutionConfig } from './execution';
|
|
5
|
+
import { type GitHubConfig } from './github';
|
|
6
|
+
import { type AuthConfig } from './auth';
|
|
7
|
+
import { type DocumentsConfig } from './documents';
|
|
8
|
+
import { type TasksConfig } from './tasks';
|
|
9
|
+
import { type EnvironmentsConfig } from './environments';
|
|
10
|
+
import { type RunnerPoolConfig } from './runners';
|
|
11
|
+
import { type SlackConfig } from './slack';
|
|
12
|
+
import { type DatadogConfig, type IncidentEnrichmentConfig } from './datadog';
|
|
13
|
+
import { type EmailConfig } from './email';
|
|
14
|
+
import { type RetentionConfig } from './retention';
|
|
15
|
+
import { type FragmentLibraryConfig } from './fragmentLibrary';
|
|
16
|
+
import { type ObservabilityConfig } from './observability';
|
|
17
|
+
import { type LangfuseConfig } from './langfuse';
|
|
18
|
+
export type { AgentsConfig, AppConfig, ExecutionConfig, GitHubConfig, AuthConfig, DocumentsConfig, TasksConfig, EnvironmentsConfig, RunnerPoolConfig, SlackConfig, DatadogConfig, IncidentEnrichmentConfig, EmailConfig, RetentionConfig, FragmentLibraryConfig, ObservabilityConfig, LangfuseConfig, };
|
|
19
|
+
export declare function loadConfig(env: Env): AppConfig;
|
|
20
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/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Ac,GACf,CAAA;AAED,wBAAgB,UAAU,CAAC,GAAG,EAAE,GAAG,GAAG,SAAS,CAgC9C"}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { ALL_SUBSCRIPTION_VENDORS, effectiveCatalog, } from '@cat-factory/kernel';
|
|
2
|
+
import { modelCostResolver } from '@cat-factory/spend';
|
|
3
|
+
import { loadAgentsConfig } from './agents';
|
|
4
|
+
import { loadExecutionConfig } from './execution';
|
|
5
|
+
import { loadSpendPricing } from './spending';
|
|
6
|
+
import { loadGitHubConfig } from './github';
|
|
7
|
+
import { loadAuthConfig } from './auth';
|
|
8
|
+
import { loadDocumentsConfig } from './documents';
|
|
9
|
+
import { loadTasksConfig } from './tasks';
|
|
10
|
+
import { loadEnvironmentsConfig } from './environments';
|
|
11
|
+
import { loadRunnerPoolConfig } from './runners';
|
|
12
|
+
import { loadSlackConfig } from './slack';
|
|
13
|
+
import { loadDatadogConfig, loadIncidentEnrichmentConfig, } from './datadog';
|
|
14
|
+
import { loadEmailConfig } from './email';
|
|
15
|
+
import { loadRetentionConfig } from './retention';
|
|
16
|
+
import { loadFragmentLibraryConfig } from './fragmentLibrary';
|
|
17
|
+
import { loadObservabilityConfig } from './observability';
|
|
18
|
+
import { loadLangfuseConfig } from './langfuse';
|
|
19
|
+
export function loadConfig(env) {
|
|
20
|
+
// Deployment-level capabilities: direct keys are now per-workspace (resolved at run
|
|
21
|
+
// time from the DB pool), so none are known here; Cloudflare Workers AI is opt-in
|
|
22
|
+
// (the `AI` binding). The per-workspace `/models` endpoint recomputes selectability
|
|
23
|
+
// against each workspace's configured keys + subscriptions.
|
|
24
|
+
const caps = {
|
|
25
|
+
directProviders: new Set(),
|
|
26
|
+
subscriptionVendors: new Set(ALL_SUBSCRIPTION_VENDORS),
|
|
27
|
+
cloudflareEnabled: !!env.AI,
|
|
28
|
+
};
|
|
29
|
+
const spend = loadSpendPricing(env);
|
|
30
|
+
return {
|
|
31
|
+
agents: loadAgentsConfig(env, caps),
|
|
32
|
+
// Surface each model's informational list cost in the picker (from spend pricing).
|
|
33
|
+
models: effectiveCatalog(caps, modelCostResolver(spend)),
|
|
34
|
+
execution: loadExecutionConfig(env),
|
|
35
|
+
spend,
|
|
36
|
+
github: loadGitHubConfig(env),
|
|
37
|
+
auth: loadAuthConfig(env),
|
|
38
|
+
documents: loadDocumentsConfig(env),
|
|
39
|
+
tasks: loadTasksConfig(env),
|
|
40
|
+
environments: loadEnvironmentsConfig(env),
|
|
41
|
+
runners: loadRunnerPoolConfig(env),
|
|
42
|
+
slack: loadSlackConfig(env),
|
|
43
|
+
datadog: loadDatadogConfig(env),
|
|
44
|
+
incidentEnrichment: loadIncidentEnrichmentConfig(env),
|
|
45
|
+
email: loadEmailConfig(env),
|
|
46
|
+
retention: loadRetentionConfig(env),
|
|
47
|
+
fragmentLibrary: loadFragmentLibraryConfig(env),
|
|
48
|
+
observability: loadObservabilityConfig(env),
|
|
49
|
+
langfuse: loadLangfuseConfig(env),
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/infrastructure/config/index.ts"],"names":[],"mappings":"AACA,OAAO,EACL,wBAAwB,EAExB,gBAAgB,GACjB,MAAM,qBAAqB,CAAA;AAC5B,OAAO,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAA;AAEtD,OAAO,EAAqB,gBAAgB,EAAE,MAAM,UAAU,CAAA;AAC9D,OAAO,EAAwB,mBAAmB,EAAE,MAAM,aAAa,CAAA;AACvE,OAAO,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAA;AAC7C,OAAO,EAAqB,gBAAgB,EAAE,MAAM,UAAU,CAAA;AAC9D,OAAO,EAAmB,cAAc,EAAE,MAAM,QAAQ,CAAA;AACxD,OAAO,EAAwB,mBAAmB,EAAE,MAAM,aAAa,CAAA;AACvE,OAAO,EAAoB,eAAe,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