@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,55 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Drives runs durably via Cloudflare Workflows. Each run maps to one Workflows
|
|
3
|
+
* instance whose id is the execution id, which makes start idempotent and lets
|
|
4
|
+
* decisions/cancels address the instance directly. When a queue is configured,
|
|
5
|
+
* `startRun` enqueues instead of creating directly so the consumer's
|
|
6
|
+
* `max_concurrency` bounds how fast runs are kicked off.
|
|
7
|
+
*/
|
|
8
|
+
export class WorkflowsWorkRunner {
|
|
9
|
+
workflow;
|
|
10
|
+
queue;
|
|
11
|
+
constructor({ workflow, queue }) {
|
|
12
|
+
this.workflow = workflow;
|
|
13
|
+
this.queue = queue;
|
|
14
|
+
}
|
|
15
|
+
async startRun(workspaceId, executionId) {
|
|
16
|
+
if (this.queue) {
|
|
17
|
+
await this.queue.send({ workspaceId, executionId });
|
|
18
|
+
return;
|
|
19
|
+
}
|
|
20
|
+
await this.create(workspaceId, executionId);
|
|
21
|
+
}
|
|
22
|
+
/** Create the Workflows instance, tolerating an existing one (idempotent). */
|
|
23
|
+
async create(workspaceId, executionId) {
|
|
24
|
+
try {
|
|
25
|
+
await this.workflow.create({
|
|
26
|
+
id: executionId,
|
|
27
|
+
params: { workspaceId, executionId },
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
catch {
|
|
31
|
+
// An instance with this id already exists (a duplicate start or a sweeper
|
|
32
|
+
// re-drive racing a live instance). The existing instance is authoritative.
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
async signalDecision(_workspaceId, executionId, decisionId, choice) {
|
|
36
|
+
try {
|
|
37
|
+
const instance = await this.workflow.get(executionId);
|
|
38
|
+
await instance.sendEvent({ type: `decision-${decisionId}`, payload: { choice } });
|
|
39
|
+
}
|
|
40
|
+
catch {
|
|
41
|
+
// No live instance to signal (tick fallback / already finished). The DB
|
|
42
|
+
// write in resolveDecision remains the source of truth.
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
async cancelRun(_workspaceId, executionId) {
|
|
46
|
+
try {
|
|
47
|
+
const instance = await this.workflow.get(executionId);
|
|
48
|
+
await instance.terminate();
|
|
49
|
+
}
|
|
50
|
+
catch {
|
|
51
|
+
// Nothing live to cancel.
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
//# sourceMappingURL=WorkflowsWorkRunner.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"WorkflowsWorkRunner.js","sourceRoot":"","sources":["../../../src/infrastructure/workflows/WorkflowsWorkRunner.ts"],"names":[],"mappings":"AAgBA;;;;;;GAMG;AACH,MAAM,OAAO,mBAAmB;IACb,QAAQ,CAAU;IAClB,KAAK,CAA+B;IAErD,YAAY,EAAE,QAAQ,EAAE,KAAK,EAA2B;QACt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AAM,QAAQ,CAAC,SAAS,EAAE,CAAA;QAC5B,CAAC;QAAC,MAAM,CAAC;YACP,0BAA0B;QAC5B,CAAC;IACH,CAAC;CACF"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import type { Clock, CommitProjectionRepository, LlmCallMetricRepository, PipelineScheduleRepository, RateLimitRepository, TokenUsageRepository } from '@cat-factory/kernel';
|
|
2
|
+
/** Recurring-pipeline run history is kept ~1 week (the inspector's window). */
|
|
3
|
+
export declare const SCHEDULE_RUN_RETENTION_MS: number;
|
|
4
|
+
/** Per-table retention ages in milliseconds; 0 (or less) disables that table's pass. */
|
|
5
|
+
export interface RetentionPolicy {
|
|
6
|
+
tokenUsageMs: number;
|
|
7
|
+
rateLimitMs: number;
|
|
8
|
+
commitMs: number;
|
|
9
|
+
llmCallMetricsMs: number;
|
|
10
|
+
}
|
|
11
|
+
export interface RetentionDeps {
|
|
12
|
+
tokenUsageRepository: TokenUsageRepository;
|
|
13
|
+
rateLimitRepository: RateLimitRepository;
|
|
14
|
+
commitRepository: CommitProjectionRepository;
|
|
15
|
+
llmCallMetricRepository: LlmCallMetricRepository;
|
|
16
|
+
/** Optional: prunes recurring-pipeline run history to {@link SCHEDULE_RUN_RETENTION_MS}. */
|
|
17
|
+
pipelineScheduleRepository?: PipelineScheduleRepository;
|
|
18
|
+
clock: Clock;
|
|
19
|
+
policy: RetentionPolicy;
|
|
20
|
+
}
|
|
21
|
+
/** Rows reclaimed from each table, for logging. */
|
|
22
|
+
export interface RetentionResult {
|
|
23
|
+
tokenUsage: number;
|
|
24
|
+
rateLimits: number;
|
|
25
|
+
commits: number;
|
|
26
|
+
llmCallMetrics: number;
|
|
27
|
+
scheduleRuns: number;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Prune each unbounded table to its retention window. The deletes are
|
|
31
|
+
* range-scans on indexed columns and usually reclaim nothing, so this is cheap
|
|
32
|
+
* to run on the every-2-min cron. Returns the counts removed per table.
|
|
33
|
+
*/
|
|
34
|
+
export declare function sweepRetention({ tokenUsageRepository, rateLimitRepository, commitRepository, llmCallMetricRepository, pipelineScheduleRepository, clock, policy, }: RetentionDeps): Promise<RetentionResult>;
|
|
35
|
+
//# sourceMappingURL=retention.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"retention.d.ts","sourceRoot":"","sources":["../../../src/infrastructure/workflows/retention.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,KAAK,EACL,0BAA0B,EAC1B,uBAAuB,EACvB,0BAA0B,EAC1B,mBAAmB,EACnB,oBAAoB,EACrB,MAAM,qBAAqB,CAAA;AAE5B,+EAA+E;AAC/E,eAAO,MAAM,yBAAyB,QAA0B,CAAA;AAShE,wFAAwF;AACxF,MAAM,WAAW,eAAe;IAC9B,YAAY,EAAE,MAAM,CAAA;IACpB,WAAW,EAAE,MAAM,CAAA;IACnB,QAAQ,EAAE,MAAM,CAAA;IAChB,gBAAgB,EAAE,MAAM,CAAA;CACzB;AAED,MAAM,WAAW,aAAa;IAC5B,oBAAoB,EAAE,oBAAoB,CAAA;IAC1C,mBAAmB,EAAE,mBAAmB,CAAA;IACxC,gBAAgB,EAAE,0BAA0B,CAAA;IAC5C,uBAAuB,EAAE,uBAAuB,CAAA;IAChD,4FAA4F;IAC5F,0BAA0B,CAAC,EAAE,0BAA0B,CAAA;IACvD,KAAK,EAAE,KAAK,CAAA;IACZ,MAAM,EAAE,eAAe,CAAA;CACxB;AAED,mDAAmD;AACnD,MAAM,WAAW,eAAe;IAC9B,UAAU,EAAE,MAAM,CAAA;IAClB,UAAU,EAAE,MAAM,CAAA;IAClB,OAAO,EAAE,MAAM,CAAA;IACf,cAAc,EAAE,MAAM,CAAA;IACtB,YAAY,EAAE,MAAM,CAAA;CACrB;AAYD;;;;GAIG;AACH,wBAAsB,cAAc,CAAC,EACnC,oBAAoB,EACpB,mBAAmB,EACnB,gBAAgB,EAChB,uBAAuB,EACvB,0BAA0B,EAC1B,KAAK,EACL,MAAM,GACP,EAAE,aAAa,GAAG,OAAO,CAAC,eAAe,CAAC,CAiB1C"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/** Recurring-pipeline run history is kept ~1 week (the inspector's window). */
|
|
2
|
+
export const SCHEDULE_RUN_RETENTION_MS = 7 * 24 * 60 * 60 * 1000;
|
|
3
|
+
/** Delete rows older than `now - windowMs`, treating a non-positive window as "disabled". */
|
|
4
|
+
async function prune(windowMs, now, del) {
|
|
5
|
+
if (windowMs <= 0)
|
|
6
|
+
return 0;
|
|
7
|
+
return del(now - windowMs);
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Prune each unbounded table to its retention window. The deletes are
|
|
11
|
+
* range-scans on indexed columns and usually reclaim nothing, so this is cheap
|
|
12
|
+
* to run on the every-2-min cron. Returns the counts removed per table.
|
|
13
|
+
*/
|
|
14
|
+
export async function sweepRetention({ tokenUsageRepository, rateLimitRepository, commitRepository, llmCallMetricRepository, pipelineScheduleRepository, clock, policy, }) {
|
|
15
|
+
const now = clock.now();
|
|
16
|
+
return {
|
|
17
|
+
tokenUsage: await prune(policy.tokenUsageMs, now, (c) => tokenUsageRepository.deleteOlderThan(c)),
|
|
18
|
+
rateLimits: await prune(policy.rateLimitMs, now, (c) => rateLimitRepository.deleteOlderThan(c)),
|
|
19
|
+
commits: await prune(policy.commitMs, now, (c) => commitRepository.deleteOlderThan(c)),
|
|
20
|
+
llmCallMetrics: await prune(policy.llmCallMetricsMs, now, (c) => llmCallMetricRepository.deleteOlderThan(c)),
|
|
21
|
+
scheduleRuns: pipelineScheduleRepository
|
|
22
|
+
? await prune(SCHEDULE_RUN_RETENTION_MS, now, (c) => pipelineScheduleRepository.pruneRunsBefore(c))
|
|
23
|
+
: 0,
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
//# sourceMappingURL=retention.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"retention.js","sourceRoot":"","sources":["../../../src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yB,EAAE,GAAG,EAAE,CAAC,CAAC,EAAE,EAAE,CAChD,0BAA0B,CAAC,eAAe,CAAC,CAAC,CAAC,CAC9C;YACH,CAAC,CAAC,CAAC;KACN,CAAA;AACH,CAAC"}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import type { AgentRunRef, AgentRunRepository, Clock } from '@cat-factory/kernel';
|
|
2
|
+
import type { Workflow } from '@cloudflare/workers-types';
|
|
3
|
+
/**
|
|
4
|
+
* A run's durable instance, as the sweeper needs to classify it:
|
|
5
|
+
* - `alive` — running/queued/waiting/paused; leave it.
|
|
6
|
+
* - `terminal` — the instance exists but completed/errored/terminated. It can NOT
|
|
7
|
+
* be recreated (instance ids are unique), so a re-drive via
|
|
8
|
+
* `create` is a silent no-op — the run must be FINALIZED instead.
|
|
9
|
+
* - `missing` — no instance for this id; safe to (re-)create via `redrive`.
|
|
10
|
+
*/
|
|
11
|
+
export type InstanceState = 'alive' | 'terminal' | 'missing';
|
|
12
|
+
/** Tells the sweeper the state of a run's durable instance. */
|
|
13
|
+
export interface WorkflowLookup {
|
|
14
|
+
instanceState(runId: string): Promise<InstanceState>;
|
|
15
|
+
}
|
|
16
|
+
/** WorkflowLookup over a Cloudflare Workflows binding. */
|
|
17
|
+
export declare class WorkflowsLookup implements WorkflowLookup {
|
|
18
|
+
private readonly workflow;
|
|
19
|
+
constructor(workflow: Workflow);
|
|
20
|
+
instanceState(runId: string): Promise<InstanceState>;
|
|
21
|
+
}
|
|
22
|
+
export interface SweepDeps {
|
|
23
|
+
agentRunRepository: AgentRunRepository;
|
|
24
|
+
/** State of the durable instance backing this run (by kind). */
|
|
25
|
+
instanceState(ref: AgentRunRef): Promise<InstanceState>;
|
|
26
|
+
/** (Re-)create the durable driver for a run whose instance is `missing`. */
|
|
27
|
+
redrive(ref: AgentRunRef): Promise<void>;
|
|
28
|
+
/**
|
|
29
|
+
* Finalize a run whose instance is `terminal` (so it can't be re-created): mark it
|
|
30
|
+
* stopped/failed and reclaim any leftover container, routed by kind. Without this,
|
|
31
|
+
* such a run would show as `running` forever (the re-drive is a silent no-op).
|
|
32
|
+
*/
|
|
33
|
+
finalizeOrphan(ref: AgentRunRef): Promise<void>;
|
|
34
|
+
clock: Clock;
|
|
35
|
+
/** A run is considered stuck if its lease is older than this many ms. */
|
|
36
|
+
leaseMs: number;
|
|
37
|
+
}
|
|
38
|
+
/** What a sweep did, for logging. */
|
|
39
|
+
export interface SweepResult {
|
|
40
|
+
/** Runs whose lost instance was re-created. */
|
|
41
|
+
redriven: number;
|
|
42
|
+
/** Runs whose instance was terminal and so were finalized instead. */
|
|
43
|
+
finalized: number;
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* Backstop for runs that are still `running` in storage but whose Workflows
|
|
47
|
+
* instance is no longer driving them. Cron invokes this across BOTH agent flows
|
|
48
|
+
* (execution + bootstrap). For each stale run it inspects the durable instance:
|
|
49
|
+
* - `missing` → re-create it (the instance was lost: eviction, a missed event).
|
|
50
|
+
* - `terminal` → FINALIZE the run (the instance completed/terminated and can't be
|
|
51
|
+
* recreated under the same id, so re-driving is a no-op — without
|
|
52
|
+
* this the run would be stuck `running` forever).
|
|
53
|
+
* - `alive` → leave it.
|
|
54
|
+
* Pure orchestration over its ports so it is unit-testable with fakes.
|
|
55
|
+
*/
|
|
56
|
+
export declare function sweepStuckRuns({ agentRunRepository, instanceState, redrive, finalizeOrphan, clock, leaseMs, }: SweepDeps): Promise<SweepResult>;
|
|
57
|
+
//# sourceMappingURL=sweeper.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sweeper.d.ts","sourceRoot":"","sources":["../../../src/infrastructure/workflows/sweeper.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,kBAAkB,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAA;AACjF,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,2BAA2B,CAAA;AAEzD;;;;;;;GAOG;AACH,M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ow) {
|
|
5
|
+
this.workflow = workflow;
|
|
6
|
+
}
|
|
7
|
+
async instanceState(runId) {
|
|
8
|
+
let instance;
|
|
9
|
+
try {
|
|
10
|
+
instance = await this.workflow.get(runId);
|
|
11
|
+
}
|
|
12
|
+
catch {
|
|
13
|
+
// No instance with this id was ever created → safe to create one.
|
|
14
|
+
return 'missing';
|
|
15
|
+
}
|
|
16
|
+
try {
|
|
17
|
+
const { status } = await instance.status();
|
|
18
|
+
return status === 'running' ||
|
|
19
|
+
status === 'queued' ||
|
|
20
|
+
status === 'waiting' ||
|
|
21
|
+
status === 'paused'
|
|
22
|
+
? 'alive'
|
|
23
|
+
: 'terminal';
|
|
24
|
+
}
|
|
25
|
+
catch {
|
|
26
|
+
// The instance handle resolved but status is unreadable — treat as missing so
|
|
27
|
+
// the sweeper tries to (re-)create rather than wrongly finalizing a live run.
|
|
28
|
+
return 'missing';
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Backstop for runs that are still `running` in storage but whose Workflows
|
|
34
|
+
* instance is no longer driving them. Cron invokes this across BOTH agent flows
|
|
35
|
+
* (execution + bootstrap). For each stale run it inspects the durable instance:
|
|
36
|
+
* - `missing` → re-create it (the instance was lost: eviction, a missed event).
|
|
37
|
+
* - `terminal` → FINALIZE the run (the instance completed/terminated and can't be
|
|
38
|
+
* recreated under the same id, so re-driving is a no-op — without
|
|
39
|
+
* this the run would be stuck `running` forever).
|
|
40
|
+
* - `alive` → leave it.
|
|
41
|
+
* Pure orchestration over its ports so it is unit-testable with fakes.
|
|
42
|
+
*/
|
|
43
|
+
export async function sweepStuckRuns({ agentRunRepository, instanceState, redrive, finalizeOrphan, clock, leaseMs, }) {
|
|
44
|
+
const stale = await agentRunRepository.listStale(clock.now() - leaseMs);
|
|
45
|
+
let redriven = 0;
|
|
46
|
+
let finalized = 0;
|
|
47
|
+
for (const ref of stale) {
|
|
48
|
+
const state = await instanceState(ref);
|
|
49
|
+
if (state === 'alive')
|
|
50
|
+
continue;
|
|
51
|
+
if (state === 'missing') {
|
|
52
|
+
await redrive(ref);
|
|
53
|
+
redriven++;
|
|
54
|
+
}
|
|
55
|
+
else {
|
|
56
|
+
await finalizeOrphan(ref);
|
|
57
|
+
finalized++;
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
return { redriven, finalized };
|
|
61
|
+
}
|
|
62
|
+
//# sourceMappingURL=sweeper.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sweeper.js","sourceRoot":"","sources":["../../../src/infrastructure/workflows/sweeper.ts"],"names":[],"mappings":"AAkBA,0DAA0D;AAC1D,MAAM,OAAO,eAAe;IACG,QAAQ;IAArC,YAA6B,QAAkB;wBAAlB,QAAQ;IAAa,CAAC;IAEnD,KAAK,CAAC,aAAa,CAAC,KAAa;QAC/B,IAAI,QAAQ,CAAA;QACZ,IAAI,CAAC;YACH,QAAQ,GAAG,MAAM,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,KAAK,CAAC,CAAA;QAC3C,CAAC;QAAC,MAAM,CAAC;YACP,kEAAkE;YAClE,OAAO,SAAS,CAAA;QAClB,CAAC;QACD,IAAI,CAAC;YACH,MAAM,EAAE,MAAM,EAAE,GAAG,MAAM,QAAQ,CAAC,MAAM,EAAE,CAAA;YAC1C,OAAO,MAAM,KAAK,SAAS;gBACzB,MAAM,KAAK,QAAQ;gBACnB,MAAM,KAAK,SAAS;gBACpB,MAAM,KAAK,QAAQ;gBACnB,CAAC,CAAC,OAAO;gBACT,CAAC,CAAC,UAAU,CAAA;QAChB,CAAC;QAAC,MAAM,CAAC;YACP,8EAA8E;YAC9E,8EAA8E;YAC9E,OAAO,SAAS,CAAA;QAClB,CAAC;IACH,CAAC;CACF;AA2BD;;;;;;;;;;GAUG;AACH,MAAM,CAAC,KAAK,UAAU,cAAc,CAAC,EACnC,kBAAkB,EAClB,aAAa,EACb,OAAO,EACP,cAAc,EACd,KAAK,EACL,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