@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,115 @@
|
|
|
1
|
+
import {} from '@cat-factory/kernel';
|
|
2
|
+
import { boardScanLogic } from '@cat-factory/orchestration';
|
|
3
|
+
// Unlike `/run`, scan/bootstrap stay synchronous request/response. This caps how
|
|
4
|
+
// long the Worker will wait so a wedged container can't block the caller forever;
|
|
5
|
+
// the harness's shared git timeouts bound the underlying git operations too.
|
|
6
|
+
const CONTAINER_SYNC_TIMEOUT_MS = 30 * 60_000;
|
|
7
|
+
/** The role prompt the scanner agent runs under inside the container. */
|
|
8
|
+
const SCAN_SYSTEM_PROMPT = 'You are a Domain-Driven Design architect mapping an existing repository. You have ' +
|
|
9
|
+
'a fresh, read-only clone. Decompose it into ONE top-level service and the modules ' +
|
|
10
|
+
'inside it, where each module is a DOMAIN — a cohesive area of the BUSINESS, in the ' +
|
|
11
|
+
'language of the problem space (a DDD bounded context / aggregate / subdomain). ' +
|
|
12
|
+
'Name modules after business concepts, not technical layers. ' +
|
|
13
|
+
'A module MUST represent a business capability or domain model (e.g. Billing, ' +
|
|
14
|
+
'Catalog, Ordering, Identity), NOT a technical layer or shape: "api", "routes", ' +
|
|
15
|
+
'"controllers", "utils", "helpers", "lib", "common", "config", "types", "models", ' +
|
|
16
|
+
'"db" and the like are NOT domains and MUST NOT be modules. ' +
|
|
17
|
+
'Group the genuinely non-business, technical/cross-cutting plumbing (persistence ' +
|
|
18
|
+
'wiring, HTTP/transport, logging, configuration, auth middleware, build/deploy, ' +
|
|
19
|
+
'shared utilities) into a SINGLE module named "infrastructure" rather than ' +
|
|
20
|
+
'scattering it into many technical modules. ' +
|
|
21
|
+
'Prefer organising code by domain (the ubiquitous language) over organising by ' +
|
|
22
|
+
'file type. Anchor every node to the codebase with explicit repo-relative ' +
|
|
23
|
+
'file/directory references. Keep names short and descriptive. ' +
|
|
24
|
+
'Respond with ONLY a JSON object of shape {"type","name","summary","references":[],' +
|
|
25
|
+
'"modules":[{"name","summary","references":[]}]} — no prose, no code fences.';
|
|
26
|
+
/**
|
|
27
|
+
* A {@link RepoScanner} that performs the side-effecting half of a "scan
|
|
28
|
+
* repository" run: it spins up a per-run Cloudflare Container that clones the
|
|
29
|
+
* repository read-only, has the scanner agent decompose it into the canonical
|
|
30
|
+
* service → modules blueprint (with codebase references), and returns
|
|
31
|
+
* that structure. The agent's JSON is coerced into a well-formed tree here.
|
|
32
|
+
*
|
|
33
|
+
* Secrets never reach the container image: the per-run GitHub installation token
|
|
34
|
+
* and the model-locked LLM-proxy session token are minted here and handed over in
|
|
35
|
+
* the dispatch body, exactly as the implementation executor and bootstrapper do.
|
|
36
|
+
*/
|
|
37
|
+
export class ContainerRepoScanner {
|
|
38
|
+
deps;
|
|
39
|
+
constructor(deps) {
|
|
40
|
+
this.deps = deps;
|
|
41
|
+
}
|
|
42
|
+
async scan(request) {
|
|
43
|
+
const installation = await this.deps.installationRepository.getByWorkspace(request.workspaceId);
|
|
44
|
+
if (!installation || installation.deletedAt) {
|
|
45
|
+
throw new Error(`Workspace '${request.workspaceId}' is not connected to GitHub`);
|
|
46
|
+
}
|
|
47
|
+
if (!isProxyableProvider(this.deps.model.provider)) {
|
|
48
|
+
throw new Error(`Repository scanning needs a model the LLM proxy can serve ` +
|
|
49
|
+
`(Workers AI, or a direct OpenAI-compatible provider); ` +
|
|
50
|
+
`'${this.deps.model.provider}' is not supported.`);
|
|
51
|
+
}
|
|
52
|
+
const ghToken = await this.deps.mintInstallationToken(installation.installationId);
|
|
53
|
+
const sessionToken = await this.deps.sessionService.mint({
|
|
54
|
+
workspaceId: request.workspaceId,
|
|
55
|
+
executionId: `scan-${request.repo.owner}-${request.repo.name}`,
|
|
56
|
+
agentKind: 'architect',
|
|
57
|
+
provider: this.deps.model.provider,
|
|
58
|
+
model: this.deps.model.model,
|
|
59
|
+
});
|
|
60
|
+
const webBase = (this.deps.webBaseUrl ?? 'https://github.com').replace(/\/+$/, '');
|
|
61
|
+
const cloneUrl = `${webBase}/${request.repo.owner}/${request.repo.name}.git`;
|
|
62
|
+
const body = {
|
|
63
|
+
systemPrompt: SCAN_SYSTEM_PROMPT,
|
|
64
|
+
instructions: request.instructions || 'Map the repository into the blueprint structure.',
|
|
65
|
+
model: this.deps.model.model,
|
|
66
|
+
proxyBaseUrl: this.deps.proxyBaseUrl,
|
|
67
|
+
sessionToken,
|
|
68
|
+
ghToken,
|
|
69
|
+
repo: {
|
|
70
|
+
owner: request.repo.owner,
|
|
71
|
+
name: request.repo.name,
|
|
72
|
+
cloneUrl,
|
|
73
|
+
},
|
|
74
|
+
...(this.deps.githubApiBase ? { githubApiBase: this.deps.githubApiBase } : {}),
|
|
75
|
+
};
|
|
76
|
+
// One container instance per repo scan (keyed by owner/name), mirroring the
|
|
77
|
+
// per-run implementation and bootstrap containers.
|
|
78
|
+
const key = `scan-${request.repo.owner}/${request.repo.name}`;
|
|
79
|
+
const stub = this.deps.container.get(this.deps.container.idFromName(key));
|
|
80
|
+
const res = await stub.fetch('http://container/scan', {
|
|
81
|
+
method: 'POST',
|
|
82
|
+
headers: { 'content-type': 'application/json' },
|
|
83
|
+
body: JSON.stringify(body),
|
|
84
|
+
signal: AbortSignal.timeout(CONTAINER_SYNC_TIMEOUT_MS),
|
|
85
|
+
});
|
|
86
|
+
if (!res.ok) {
|
|
87
|
+
throw new Error(`Scan container failed (HTTP ${res.status}): ${await safeText(res)}`);
|
|
88
|
+
}
|
|
89
|
+
const result = (await res.json());
|
|
90
|
+
if (result.error)
|
|
91
|
+
throw new Error(`Scan failed: ${result.error}`);
|
|
92
|
+
const service = boardScanLogic.coerceService(result.service, request.repo.name);
|
|
93
|
+
if (!service) {
|
|
94
|
+
throw new Error('Scan produced no usable blueprint');
|
|
95
|
+
}
|
|
96
|
+
return { source: 'llm', service };
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
/** Providers the LLM proxy can serve (mirrors ContainerAgentExecutor). */
|
|
100
|
+
function isProxyableProvider(provider) {
|
|
101
|
+
return (provider === 'workers-ai' ||
|
|
102
|
+
provider === 'qwen' ||
|
|
103
|
+
provider === 'deepseek' ||
|
|
104
|
+
provider === 'moonshot' ||
|
|
105
|
+
provider === 'openai');
|
|
106
|
+
}
|
|
107
|
+
async function safeText(res) {
|
|
108
|
+
try {
|
|
109
|
+
return (await res.text()).slice(0, 500);
|
|
110
|
+
}
|
|
111
|
+
catch {
|
|
112
|
+
return '(no body)';
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
//# sourceMappingURL=ContainerRepoScanner.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ContainerRepoScanner.js","sourceRoot":"","sources":["../../../src/infrastructure/ai/ContainerRepoScanner.ts"],"names":[],"mappings":"AAAA,OAAO,EAMN,MAAM,qBAAqB,CAAA;AAC5B,OAAO,EAAE,cAAc,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B,QAAQ,KAAK,QAAQ,CACtB,CAAA;AACH,CAAC;AAED,KAAK,UAAU,QAAQ,CAAC,GAAa;IACnC,IAAI,CAAC;QACH,OAAO,CAAC,MAAM,GAAG,CAAC,IAAI,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,GAAG,CAAC,CAAA;IACzC,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,WAAW,CAAA;IACpB,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LlmFragmentSelector.d.ts","sourceRoot":"","sources":["../../../src/infrastructure/ai/LlmFragmentSelector.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,mBAAmB,EAAE,KAAK,+BAA+B,EAAE,MAAM,qBAAqB,CAAA"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
// Moved to the runtime-neutral @cat-factory/agents package (so the Node service runs
|
|
2
|
+
// the same LLM fragment selector); re-exported here for existing Worker imports.
|
|
3
|
+
export { LlmFragmentSelector } from '@cat-factory/agents';
|
|
4
|
+
//# sourceMappingURL=LlmFragmentSelector.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LlmFragmentSelector.js","sourceRoot":"","sources":["../../../src/infrastructure/ai/LlmFragmentSelector.ts"],"names":[],"mappings":"AAAA,qFAAqF;AACrF,iFAAiF;AACjF,OAAO,EAAE,mBAAmB,EAAwC,MAAM,qBAAqB,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RunnerJobClient.d.ts","sourceRoot":"","sources":["../../../src/infrastructure/ai/RunnerJobClient.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,eAAe,EAAE,KAAK,sBAAsB,EAAE,MAAM,qBAAqB,CAAA"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
// Moved to the runtime-neutral @cat-factory/server package (so the Node service
|
|
2
|
+
// drives container jobs through the same plumbing); re-exported here for existing
|
|
3
|
+
// Worker imports (the bootstrapper + the implementation executor).
|
|
4
|
+
export { RunnerJobClient } from '@cat-factory/server';
|
|
5
|
+
//# sourceMappingURL=RunnerJobClient.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RunnerJobClient.js","sourceRoot":"","sources":["../../../src/infrastructure/ai/RunnerJobClient.ts"],"names":[],"mappings":"AAAA,gFAAgF;AAChF,kFAAkF;AAClF,mEAAmE;AACnE,OAAO,EAAE,eAAe,EAA+B,MAAM,qBAAqB,CAAA"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type { LlmInProcessRequest, LlmTokenUsage, LlmUpstream, LlmUpstreamEndpoint } from '@cat-factory/server';
|
|
2
|
+
import type { Env } from '../env';
|
|
3
|
+
export declare class WorkersAiLlmUpstream implements LlmUpstream {
|
|
4
|
+
private readonly env;
|
|
5
|
+
constructor(env: Env);
|
|
6
|
+
resolveOpenAiCompatible(provider: string): LlmUpstreamEndpoint | null;
|
|
7
|
+
runInProcess(request: LlmInProcessRequest): Promise<Response> | null;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Build the ordered OpenAI `chat.completion.chunk` payloads for a single, completed
|
|
11
|
+
* generation, replayed as a stream: a role chunk, ONE content chunk (only when there
|
|
12
|
+
* is text — never per-token, which is the doubling regression this guards against),
|
|
13
|
+
* the tool-call chunk (if any), the finish chunk, then a trailing usage-only chunk
|
|
14
|
+
* (matching `stream_options.include_usage`). The `[DONE]` sentinel is appended by the
|
|
15
|
+
* caller. Pure + synchronous so the streamed shape can be unit-tested without the
|
|
16
|
+
* `AI` binding or `generateText`.
|
|
17
|
+
*/
|
|
18
|
+
export declare function buildStreamChunks(meta: {
|
|
19
|
+
id: string;
|
|
20
|
+
created: number;
|
|
21
|
+
model: string;
|
|
22
|
+
}, gen: {
|
|
23
|
+
text: string;
|
|
24
|
+
toolCalls: Array<Record<string, unknown>>;
|
|
25
|
+
finishReason: string;
|
|
26
|
+
usage: LlmTokenUsage;
|
|
27
|
+
}): Array<Record<string, unknown>>;
|
|
28
|
+
//# sourceMappingURL=WorkersAiLlmUpstream.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"WorkersAiLlmUpstream.d.ts","sourceRoot":"","sources":["../../../src/infrastructure/ai/WorkersAiLlmUpstream.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,mBAAmB,EACnB,aAAa,EACb,WAAW,EACX,mBAAmB,EACpB,MAAM,qBAAqB,CAAA;AAY5B,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,QAAQ,CAAA;AASjC,qBAAa,oBAAqB,YAAW,WAAW;IAC1C,OAAO,CAAC,QAAQ,CAAC,GAAG;IAAhC,YAA6B,GAAG,EAAE,GAAG,EAAI;IAEzC,uBAAuB,CAAC,QAAQ,EAAE,MAAM,GAAG,mBAAmB,GAAG,IAAI,CAEpE;IAED,YAAY,CAAC,OAAO,EAAE,mBAAmB,GAAG,OAAO,CAAC,QAAQ,CAAC,GAAG,IAAI,CAWnE;CACF;AA6QD;;;;;;;;GAQG;AACH,wBAAgB,iBAAiB,CAC/B,IAAI,EAAE;IAAE,EAAE,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,EACpD,GAAG,EAAE;IACH,IAAI,EAAE,MAAM,CAAA;IACZ,SAAS,EAAE,KAAK,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAA;IACzC,YAAY,EAAE,MAAM,CAAA;IACpB,KAAK,EAAE,aAAa,CAAA;CACrB,GACA,KAAK,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CA6BhC"}
|