@cat-factory/server 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/agents/CompositeAgentExecutor.d.ts +39 -0
- package/dist/agents/CompositeAgentExecutor.d.ts.map +1 -0
- package/dist/agents/CompositeAgentExecutor.js +169 -0
- package/dist/agents/CompositeAgentExecutor.js.map +1 -0
- package/dist/agents/ContainerAgentExecutor.d.ts +235 -0
- package/dist/agents/ContainerAgentExecutor.d.ts.map +1 -0
- package/dist/agents/ContainerAgentExecutor.js +825 -0
- package/dist/agents/ContainerAgentExecutor.js.map +1 -0
- package/dist/agents/ContainerRepoBootstrapper.d.ts +78 -0
- package/dist/agents/ContainerRepoBootstrapper.d.ts.map +1 -0
- package/dist/agents/ContainerRepoBootstrapper.js +279 -0
- package/dist/agents/ContainerRepoBootstrapper.js.map +1 -0
- package/dist/agents/ModelRouter.d.ts +69 -0
- package/dist/agents/ModelRouter.d.ts.map +1 -0
- package/dist/agents/ModelRouter.js +84 -0
- package/dist/agents/ModelRouter.js.map +1 -0
- package/dist/agents/RunnerJobClient.d.ts +41 -0
- package/dist/agents/RunnerJobClient.d.ts.map +1 -0
- package/dist/agents/RunnerJobClient.js +43 -0
- package/dist/agents/RunnerJobClient.js.map +1 -0
- package/dist/agents/modelProviderResolver.d.ts +33 -0
- package/dist/agents/modelProviderResolver.d.ts.map +1 -0
- package/dist/agents/modelProviderResolver.js +48 -0
- package/dist/agents/modelProviderResolver.js.map +1 -0
- package/dist/agents/providerCapabilities.d.ts +22 -0
- package/dist/agents/providerCapabilities.d.ts.map +1 -0
- package/dist/agents/providerCapabilities.js +43 -0
- package/dist/agents/providerCapabilities.js.map +1 -0
- package/dist/agents/resolveRepoTarget.d.ts +33 -0
- package/dist/agents/resolveRepoTarget.d.ts.map +1 -0
- package/dist/agents/resolveRepoTarget.js +81 -0
- package/dist/agents/resolveRepoTarget.js.map +1 -0
- package/dist/app.d.ts +12 -0
- package/dist/app.d.ts.map +1 -0
- package/dist/app.js +102 -0
- package/dist/app.js.map +1 -0
- package/dist/auth/GitHubOAuth.d.ts +39 -0
- package/dist/auth/GitHubOAuth.d.ts.map +1 -0
- package/dist/auth/GitHubOAuth.js +90 -0
- package/dist/auth/GitHubOAuth.js.map +1 -0
- package/dist/auth/GoogleOAuth.d.ts +35 -0
- package/dist/auth/GoogleOAuth.d.ts.map +1 -0
- package/dist/auth/GoogleOAuth.js +66 -0
- package/dist/auth/GoogleOAuth.js.map +1 -0
- package/dist/auth/middleware.d.ts +15 -0
- package/dist/auth/middleware.d.ts.map +1 -0
- package/dist/auth/middleware.js +63 -0
- package/dist/auth/middleware.js.map +1 -0
- package/dist/auth/signing.d.ts +50 -0
- package/dist/auth/signing.d.ts.map +1 -0
- package/dist/auth/signing.js +96 -0
- package/dist/auth/signing.js.map +1 -0
- package/dist/auth/wsTicket.d.ts +34 -0
- package/dist/auth/wsTicket.d.ts.map +1 -0
- package/dist/auth/wsTicket.js +50 -0
- package/dist/auth/wsTicket.js.map +1 -0
- package/dist/config/types.d.ts +294 -0
- package/dist/config/types.d.ts.map +1 -0
- package/dist/config/types.js +2 -0
- package/dist/config/types.js.map +1 -0
- package/dist/config/url-safety.d.ts +8 -0
- package/dist/config/url-safety.d.ts.map +1 -0
- package/dist/config/url-safety.js +11 -0
- package/dist/config/url-safety.js.map +1 -0
- package/dist/containers/ContainerSessionService.d.ts +67 -0
- package/dist/containers/ContainerSessionService.d.ts.map +1 -0
- package/dist/containers/ContainerSessionService.js +44 -0
- package/dist/containers/ContainerSessionService.js.map +1 -0
- package/dist/crypto/WebCryptoPasswordHasher.d.ts +9 -0
- package/dist/crypto/WebCryptoPasswordHasher.d.ts.map +1 -0
- package/dist/crypto/WebCryptoPasswordHasher.js +67 -0
- package/dist/crypto/WebCryptoPasswordHasher.js.map +1 -0
- package/dist/crypto/WebCryptoPersonalSecretCipher.d.ts +6 -0
- package/dist/crypto/WebCryptoPersonalSecretCipher.d.ts.map +1 -0
- package/dist/crypto/WebCryptoPersonalSecretCipher.js +57 -0
- package/dist/crypto/WebCryptoPersonalSecretCipher.js.map +1 -0
- package/dist/crypto/WebCryptoSecretCipher.d.ts +23 -0
- package/dist/crypto/WebCryptoSecretCipher.d.ts.map +1 -0
- package/dist/crypto/WebCryptoSecretCipher.js +60 -0
- package/dist/crypto/WebCryptoSecretCipher.js.map +1 -0
- package/dist/crypto/encoding.d.ts +14 -0
- package/dist/crypto/encoding.d.ts.map +1 -0
- package/dist/crypto/encoding.js +58 -0
- package/dist/crypto/encoding.js.map +1 -0
- package/dist/events/FanOutEventPublisher.d.ts +32 -0
- package/dist/events/FanOutEventPublisher.d.ts.map +1 -0
- package/dist/events/FanOutEventPublisher.js +76 -0
- package/dist/events/FanOutEventPublisher.js.map +1 -0
- package/dist/events/InAppNotificationChannel.d.ts +20 -0
- package/dist/events/InAppNotificationChannel.d.ts.map +1 -0
- package/dist/events/InAppNotificationChannel.js +23 -0
- package/dist/events/InAppNotificationChannel.js.map +1 -0
- package/dist/github/FetchGitHubClient.d.ts +72 -0
- package/dist/github/FetchGitHubClient.d.ts.map +1 -0
- package/dist/github/FetchGitHubClient.js +485 -0
- package/dist/github/FetchGitHubClient.js.map +1 -0
- package/dist/github/FetchGitHubProvisioningClient.d.ts +13 -0
- package/dist/github/FetchGitHubProvisioningClient.d.ts.map +1 -0
- package/dist/github/FetchGitHubProvisioningClient.js +59 -0
- package/dist/github/FetchGitHubProvisioningClient.js.map +1 -0
- package/dist/github/GitHubAppAuth.d.ts +30 -0
- package/dist/github/GitHubAppAuth.d.ts.map +1 -0
- package/dist/github/GitHubAppAuth.js +95 -0
- package/dist/github/GitHubAppAuth.js.map +1 -0
- package/dist/github/GitHubAppRegistry.d.ts +57 -0
- package/dist/github/GitHubAppRegistry.d.ts.map +1 -0
- package/dist/github/GitHubAppRegistry.js +51 -0
- package/dist/github/GitHubAppRegistry.js.map +1 -0
- package/dist/github/GitHubCiStatusProvider.d.ts +21 -0
- package/dist/github/GitHubCiStatusProvider.d.ts.map +1 -0
- package/dist/github/GitHubCiStatusProvider.js +39 -0
- package/dist/github/GitHubCiStatusProvider.js.map +1 -0
- package/dist/github/GitHubMergeabilityProvider.d.ts +26 -0
- package/dist/github/GitHubMergeabilityProvider.d.ts.map +1 -0
- package/dist/github/GitHubMergeabilityProvider.js +38 -0
- package/dist/github/GitHubMergeabilityProvider.js.map +1 -0
- package/dist/github/GitHubPullRequestMerger.d.ts +23 -0
- package/dist/github/GitHubPullRequestMerger.d.ts.map +1 -0
- package/dist/github/GitHubPullRequestMerger.js +38 -0
- package/dist/github/GitHubPullRequestMerger.js.map +1 -0
- package/dist/github/WebCryptoWebhookVerifier.d.ts +9 -0
- package/dist/github/WebCryptoWebhookVerifier.d.ts.map +1 -0
- package/dist/github/WebCryptoWebhookVerifier.js +40 -0
- package/dist/github/WebCryptoWebhookVerifier.js.map +1 -0
- package/dist/github/ensureWorkBranch.d.ts +26 -0
- package/dist/github/ensureWorkBranch.d.ts.map +1 -0
- package/dist/github/ensureWorkBranch.js +97 -0
- package/dist/github/ensureWorkBranch.js.map +1 -0
- package/dist/github/state.d.ts +19 -0
- package/dist/github/state.d.ts.map +1 -0
- package/dist/github/state.js +55 -0
- package/dist/github/state.js.map +1 -0
- package/dist/http/authGate.d.ts +21 -0
- package/dist/http/authGate.d.ts.map +1 -0
- package/dist/http/authGate.js +77 -0
- package/dist/http/authGate.js.map +1 -0
- package/dist/http/cors.d.ts +13 -0
- package/dist/http/cors.d.ts.map +1 -0
- package/dist/http/cors.js +30 -0
- package/dist/http/cors.js.map +1 -0
- package/dist/http/env.d.ts +68 -0
- package/dist/http/env.d.ts.map +1 -0
- package/dist/http/env.js +2 -0
- package/dist/http/env.js.map +1 -0
- package/dist/http/errorHandler.d.ts +4 -0
- package/dist/http/errorHandler.d.ts.map +1 -0
- package/dist/http/errorHandler.js +33 -0
- package/dist/http/errorHandler.js.map +1 -0
- package/dist/http/params.d.ts +8 -0
- package/dist/http/params.d.ts.map +1 -0
- package/dist/http/params.js +13 -0
- package/dist/http/params.js.map +1 -0
- package/dist/http/validation.d.ts +12 -0
- package/dist/http/validation.d.ts.map +1 -0
- package/dist/http/validation.js +21 -0
- package/dist/http/validation.js.map +1 -0
- package/dist/index.d.ts +46 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +63 -0
- package/dist/index.js.map +1 -0
- package/dist/modules/accounts/AccountController.d.ts +10 -0
- package/dist/modules/accounts/AccountController.d.ts.map +1 -0
- package/dist/modules/accounts/AccountController.js +197 -0
- package/dist/modules/accounts/AccountController.js.map +1 -0
- package/dist/modules/agentRuns/AgentRunController.d.ts +10 -0
- package/dist/modules/agentRuns/AgentRunController.d.ts.map +1 -0
- package/dist/modules/agentRuns/AgentRunController.js +65 -0
- package/dist/modules/agentRuns/AgentRunController.js.map +1 -0
- package/dist/modules/auth/AuthController.d.ts +12 -0
- package/dist/modules/auth/AuthController.d.ts.map +1 -0
- package/dist/modules/auth/AuthController.js +457 -0
- package/dist/modules/auth/AuthController.js.map +1 -0
- package/dist/modules/board/BoardController.d.ts +8 -0
- package/dist/modules/board/BoardController.d.ts.map +1 -0
- package/dist/modules/board/BoardController.js +89 -0
- package/dist/modules/board/BoardController.js.map +1 -0
- package/dist/modules/boardScan/BoardScanController.d.ts +10 -0
- package/dist/modules/boardScan/BoardScanController.d.ts.map +1 -0
- package/dist/modules/boardScan/BoardScanController.js +53 -0
- package/dist/modules/boardScan/BoardScanController.js.map +1 -0
- package/dist/modules/bootstrap/BootstrapController.d.ts +10 -0
- package/dist/modules/bootstrap/BootstrapController.d.ts.map +1 -0
- package/dist/modules/bootstrap/BootstrapController.js +75 -0
- package/dist/modules/bootstrap/BootstrapController.js.map +1 -0
- package/dist/modules/clarity/ClarityReviewController.d.ts +11 -0
- package/dist/modules/clarity/ClarityReviewController.d.ts.map +1 -0
- package/dist/modules/clarity/ClarityReviewController.js +97 -0
- package/dist/modules/clarity/ClarityReviewController.js.map +1 -0
- package/dist/modules/consensus/ConsensusController.d.ts +12 -0
- package/dist/modules/consensus/ConsensusController.d.ts.map +1 -0
- package/dist/modules/consensus/ConsensusController.js +23 -0
- package/dist/modules/consensus/ConsensusController.js.map +1 -0
- package/dist/modules/documents/DocumentSourceController.d.ts +10 -0
- package/dist/modules/documents/DocumentSourceController.d.ts.map +1 -0
- package/dist/modules/documents/DocumentSourceController.js +116 -0
- package/dist/modules/documents/DocumentSourceController.js.map +1 -0
- package/dist/modules/environments/EnvironmentController.d.ts +10 -0
- package/dist/modules/environments/EnvironmentController.d.ts.map +1 -0
- package/dist/modules/environments/EnvironmentController.js +95 -0
- package/dist/modules/environments/EnvironmentController.js.map +1 -0
- package/dist/modules/events/EventsController.d.ts +26 -0
- package/dist/modules/events/EventsController.d.ts.map +1 -0
- package/dist/modules/events/EventsController.js +56 -0
- package/dist/modules/events/EventsController.js.map +1 -0
- package/dist/modules/execution/ExecutionController.d.ts +10 -0
- package/dist/modules/execution/ExecutionController.d.ts.map +1 -0
- package/dist/modules/execution/ExecutionController.js +156 -0
- package/dist/modules/execution/ExecutionController.js.map +1 -0
- package/dist/modules/fragmentLibrary/FragmentLibraryController.d.ts +14 -0
- package/dist/modules/fragmentLibrary/FragmentLibraryController.d.ts.map +1 -0
- package/dist/modules/fragmentLibrary/FragmentLibraryController.js +128 -0
- package/dist/modules/fragmentLibrary/FragmentLibraryController.js.map +1 -0
- package/dist/modules/github/GitHubController.d.ts +12 -0
- package/dist/modules/github/GitHubController.d.ts.map +1 -0
- package/dist/modules/github/GitHubController.js +234 -0
- package/dist/modules/github/GitHubController.js.map +1 -0
- package/dist/modules/github/GitHubWebhookController.d.ts +13 -0
- package/dist/modules/github/GitHubWebhookController.d.ts.map +1 -0
- package/dist/modules/github/GitHubWebhookController.js +74 -0
- package/dist/modules/github/GitHubWebhookController.js.map +1 -0
- package/dist/modules/llmProxy/LlmProxyController.d.ts +18 -0
- package/dist/modules/llmProxy/LlmProxyController.d.ts.map +1 -0
- package/dist/modules/llmProxy/LlmProxyController.js +567 -0
- package/dist/modules/llmProxy/LlmProxyController.js.map +1 -0
- package/dist/modules/localModels/LocalModelEndpointController.d.ts +4 -0
- package/dist/modules/localModels/LocalModelEndpointController.d.ts.map +1 -0
- package/dist/modules/localModels/LocalModelEndpointController.js +58 -0
- package/dist/modules/localModels/LocalModelEndpointController.js.map +1 -0
- package/dist/modules/merge/MergePresetController.d.ts +9 -0
- package/dist/modules/merge/MergePresetController.d.ts.map +1 -0
- package/dist/modules/merge/MergePresetController.js +46 -0
- package/dist/modules/merge/MergePresetController.js.map +1 -0
- package/dist/modules/modelDefaults/ModelDefaultsController.d.ts +9 -0
- package/dist/modules/modelDefaults/ModelDefaultsController.d.ts.map +1 -0
- package/dist/modules/modelDefaults/ModelDefaultsController.js +32 -0
- package/dist/modules/modelDefaults/ModelDefaultsController.js.map +1 -0
- package/dist/modules/models/ModelController.d.ts +11 -0
- package/dist/modules/models/ModelController.d.ts.map +1 -0
- package/dist/modules/models/ModelController.js +38 -0
- package/dist/modules/models/ModelController.js.map +1 -0
- package/dist/modules/notifications/NotificationController.d.ts +13 -0
- package/dist/modules/notifications/NotificationController.d.ts.map +1 -0
- package/dist/modules/notifications/NotificationController.js +67 -0
- package/dist/modules/notifications/NotificationController.js.map +1 -0
- package/dist/modules/pipelines/PipelineController.d.ts +5 -0
- package/dist/modules/pipelines/PipelineController.d.ts.map +1 -0
- package/dist/modules/pipelines/PipelineController.js +46 -0
- package/dist/modules/pipelines/PipelineController.js.map +1 -0
- package/dist/modules/promptFragments/PromptFragmentController.d.ts +11 -0
- package/dist/modules/promptFragments/PromptFragmentController.d.ts.map +1 -0
- package/dist/modules/promptFragments/PromptFragmentController.js +18 -0
- package/dist/modules/promptFragments/PromptFragmentController.js.map +1 -0
- package/dist/modules/providers/ApiKeyController.d.ts +13 -0
- package/dist/modules/providers/ApiKeyController.d.ts.map +1 -0
- package/dist/modules/providers/ApiKeyController.js +98 -0
- package/dist/modules/providers/ApiKeyController.js.map +1 -0
- package/dist/modules/providers/PersonalSubscriptionController.d.ts +4 -0
- package/dist/modules/providers/PersonalSubscriptionController.d.ts.map +1 -0
- package/dist/modules/providers/PersonalSubscriptionController.js +48 -0
- package/dist/modules/providers/PersonalSubscriptionController.js.map +1 -0
- package/dist/modules/providers/VendorCredentialController.d.ts +4 -0
- package/dist/modules/providers/VendorCredentialController.d.ts.map +1 -0
- package/dist/modules/providers/VendorCredentialController.js +55 -0
- package/dist/modules/providers/VendorCredentialController.js.map +1 -0
- package/dist/modules/providers/personalCredentialGate.d.ts +34 -0
- package/dist/modules/providers/personalCredentialGate.d.ts.map +1 -0
- package/dist/modules/providers/personalCredentialGate.js +106 -0
- package/dist/modules/providers/personalCredentialGate.js.map +1 -0
- package/dist/modules/recurring/RecurringPipelineController.d.ts +8 -0
- package/dist/modules/recurring/RecurringPipelineController.d.ts.map +1 -0
- package/dist/modules/recurring/RecurringPipelineController.js +58 -0
- package/dist/modules/recurring/RecurringPipelineController.js.map +1 -0
- package/dist/modules/recurring/TrackerSettingsController.d.ts +8 -0
- package/dist/modules/recurring/TrackerSettingsController.d.ts.map +1 -0
- package/dist/modules/recurring/TrackerSettingsController.js +30 -0
- package/dist/modules/recurring/TrackerSettingsController.js.map +1 -0
- package/dist/modules/releaseHealth/ReleaseHealthController.d.ts +9 -0
- package/dist/modules/releaseHealth/ReleaseHealthController.d.ts.map +1 -0
- package/dist/modules/releaseHealth/ReleaseHealthController.js +58 -0
- package/dist/modules/releaseHealth/ReleaseHealthController.js.map +1 -0
- package/dist/modules/requirements/RequirementReviewController.d.ts +12 -0
- package/dist/modules/requirements/RequirementReviewController.d.ts.map +1 -0
- package/dist/modules/requirements/RequirementReviewController.js +107 -0
- package/dist/modules/requirements/RequirementReviewController.js.map +1 -0
- package/dist/modules/runners/RunnerPoolController.d.ts +10 -0
- package/dist/modules/runners/RunnerPoolController.d.ts.map +1 -0
- package/dist/modules/runners/RunnerPoolController.js +52 -0
- package/dist/modules/runners/RunnerPoolController.js.map +1 -0
- package/dist/modules/serviceFragmentDefaults/ServiceFragmentDefaultsController.d.ts +9 -0
- package/dist/modules/serviceFragmentDefaults/ServiceFragmentDefaultsController.d.ts.map +1 -0
- package/dist/modules/serviceFragmentDefaults/ServiceFragmentDefaultsController.js +32 -0
- package/dist/modules/serviceFragmentDefaults/ServiceFragmentDefaultsController.js.map +1 -0
- package/dist/modules/services/ServiceMountController.d.ts +11 -0
- package/dist/modules/services/ServiceMountController.d.ts.map +1 -0
- package/dist/modules/services/ServiceMountController.js +64 -0
- package/dist/modules/services/ServiceMountController.js.map +1 -0
- package/dist/modules/settings/WorkspaceSettingsController.d.ts +9 -0
- package/dist/modules/settings/WorkspaceSettingsController.d.ts.map +1 -0
- package/dist/modules/settings/WorkspaceSettingsController.js +32 -0
- package/dist/modules/settings/WorkspaceSettingsController.js.map +1 -0
- package/dist/modules/slack/SlackController.d.ts +17 -0
- package/dist/modules/slack/SlackController.d.ts.map +1 -0
- package/dist/modules/slack/SlackController.js +135 -0
- package/dist/modules/slack/SlackController.js.map +1 -0
- package/dist/modules/tasks/TaskSourceController.d.ts +9 -0
- package/dist/modules/tasks/TaskSourceController.d.ts.map +1 -0
- package/dist/modules/tasks/TaskSourceController.js +103 -0
- package/dist/modules/tasks/TaskSourceController.js.map +1 -0
- package/dist/modules/webSearch/WebSearchProxyController.d.ts +4 -0
- package/dist/modules/webSearch/WebSearchProxyController.d.ts.map +1 -0
- package/dist/modules/webSearch/WebSearchProxyController.js +78 -0
- package/dist/modules/webSearch/WebSearchProxyController.js.map +1 -0
- package/dist/modules/webSearch/upstreams.d.ts +50 -0
- package/dist/modules/webSearch/upstreams.d.ts.map +1 -0
- package/dist/modules/webSearch/upstreams.js +107 -0
- package/dist/modules/webSearch/upstreams.js.map +1 -0
- package/dist/modules/workspaces/WorkspaceController.d.ts +5 -0
- package/dist/modules/workspaces/WorkspaceController.d.ts.map +1 -0
- package/dist/modules/workspaces/WorkspaceController.js +167 -0
- package/dist/modules/workspaces/WorkspaceController.js.map +1 -0
- package/dist/observability/logger.d.ts +9 -0
- package/dist/observability/logger.d.ts.map +1 -0
- package/dist/observability/logger.js +39 -0
- package/dist/observability/logger.js.map +1 -0
- package/dist/persistence/mappers.d.ts +101 -0
- package/dist/persistence/mappers.d.ts.map +1 -0
- package/dist/persistence/mappers.js +260 -0
- package/dist/persistence/mappers.js.map +1 -0
- package/dist/runtime/escalateNotifications.d.ts +12 -0
- package/dist/runtime/escalateNotifications.d.ts.map +1 -0
- package/dist/runtime/escalateNotifications.js +25 -0
- package/dist/runtime/escalateNotifications.js.map +1 -0
- package/dist/runtime/gateways.d.ts +159 -0
- package/dist/runtime/gateways.d.ts.map +1 -0
- package/dist/runtime/gateways.js +2 -0
- package/dist/runtime/gateways.js.map +1 -0
- package/package.json +44 -0
package/dist/index.js
ADDED
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
// @cat-factory/server — the runtime-neutral HTTP layer shared by every deployment
|
|
2
|
+
// facade. This first slice hosts the cross-cutting primitives (logging, request
|
|
3
|
+
// helpers, validation envelope, error mapping, CORS policy); the controllers,
|
|
4
|
+
// middleware and the Hono app factory move here in subsequent steps.
|
|
5
|
+
export { logger } from './observability/logger.js';
|
|
6
|
+
export {} from './http/env.js';
|
|
7
|
+
export {} from './runtime/gateways.js';
|
|
8
|
+
export { BraveWebSearchUpstream, SearxngWebSearchUpstream, createWebSearchUpstreamFromEnv, DEFAULT_WEB_SEARCH_COUNT, } from './modules/webSearch/upstreams.js';
|
|
9
|
+
export { escalateStaleNotifications } from './runtime/escalateNotifications.js';
|
|
10
|
+
export { StateSigner } from './github/state.js';
|
|
11
|
+
export { GitHubOAuth, } from './auth/GitHubOAuth.js';
|
|
12
|
+
export { GoogleOAuth, } from './auth/GoogleOAuth.js';
|
|
13
|
+
export { WebCryptoPasswordHasher } from './crypto/WebCryptoPasswordHasher.js';
|
|
14
|
+
export { authController, pickPostLoginRedirect } from './modules/auth/AuthController.js';
|
|
15
|
+
export { llmProxyController } from './modules/llmProxy/LlmProxyController.js';
|
|
16
|
+
export { ContainerSessionService, DEFAULT_SESSION_TTL_MS, } from './containers/ContainerSessionService.js';
|
|
17
|
+
// Runtime-neutral container-agent execution machinery, shared by both facades: the
|
|
18
|
+
// composite that routes repo-operating kinds to a sandbox, the container executor
|
|
19
|
+
// that builds + dispatches the harness job, and the backend-polymorphic job client.
|
|
20
|
+
export { CompositeAgentExecutor } from './agents/CompositeAgentExecutor.js';
|
|
21
|
+
export { ContainerAgentExecutor, } from './agents/ContainerAgentExecutor.js';
|
|
22
|
+
export { ensureWorkBranchViaRest } from './github/ensureWorkBranch.js';
|
|
23
|
+
export { RunnerJobClient } from './agents/RunnerJobClient.js';
|
|
24
|
+
export { createScopedModelProviderResolver, } from './agents/modelProviderResolver.js';
|
|
25
|
+
export { resolveWorkspaceCapabilities, } from './agents/providerCapabilities.js';
|
|
26
|
+
export { ContainerRepoBootstrapper, } from './agents/ContainerRepoBootstrapper.js';
|
|
27
|
+
export { buildResolveRepoTarget, } from './agents/resolveRepoTarget.js';
|
|
28
|
+
export { bearerToken, requireAuth, verifySession } from './auth/middleware.js';
|
|
29
|
+
export { registerCoreControllers } from './app.js';
|
|
30
|
+
export { FanOutEventPublisher, } from './events/FanOutEventPublisher.js';
|
|
31
|
+
export { InAppNotificationChannel } from './events/InAppNotificationChannel.js';
|
|
32
|
+
export { mountAuthGate } from './http/authGate.js';
|
|
33
|
+
export { param } from './http/params.js';
|
|
34
|
+
export { jsonBody } from './http/validation.js';
|
|
35
|
+
export { handleError } from './http/errorHandler.js';
|
|
36
|
+
export { parseAllowedOrigins, resolveCorsOrigin } from './http/cors.js';
|
|
37
|
+
export { base64url, base64urlToBytes, pkcs8PemToDer, timingSafeEqual } from './crypto/encoding.js';
|
|
38
|
+
// Runtime-neutral (Web Crypto) credential encryption + GitHub-App authentication,
|
|
39
|
+
// shared by both facades so the Node service can mint installation tokens and
|
|
40
|
+
// encrypt runner-pool secrets at rest exactly as the Worker does.
|
|
41
|
+
export { WebCryptoSecretCipher, } from './crypto/WebCryptoSecretCipher.js';
|
|
42
|
+
export { WebCryptoPersonalSecretCipher } from './crypto/WebCryptoPersonalSecretCipher.js';
|
|
43
|
+
export { GitHubAppAuth } from './github/GitHubAppAuth.js';
|
|
44
|
+
export { GitHubAppRegistry, } from './github/GitHubAppRegistry.js';
|
|
45
|
+
// The runtime-neutral fetch-based GitHub client + the CI / merge / mergeability
|
|
46
|
+
// providers (shared by every facade so a facade can gate on real CI and merge for
|
|
47
|
+
// real). The client authenticates via the App registry or any AppTokenSource (e.g. a
|
|
48
|
+
// static PAT in local mode).
|
|
49
|
+
export { FetchGitHubClient, GitHubApiError, } from './github/FetchGitHubClient.js';
|
|
50
|
+
// The privileged provisioning slice (ADR 0005): runtime-neutral so every facade can
|
|
51
|
+
// back the create-repo endpoint when a privileged App is configured.
|
|
52
|
+
export { FetchGitHubProvisioningClient, } from './github/FetchGitHubProvisioningClient.js';
|
|
53
|
+
export { WebCryptoWebhookVerifier } from './github/WebCryptoWebhookVerifier.js';
|
|
54
|
+
export { GitHubCiStatusProvider, } from './github/GitHubCiStatusProvider.js';
|
|
55
|
+
export { GitHubMergeabilityProvider, classifyMergeability, } from './github/GitHubMergeabilityProvider.js';
|
|
56
|
+
export { GitHubPullRequestMerger, } from './github/GitHubPullRequestMerger.js';
|
|
57
|
+
export { HmacSigner, TOKEN_AUDIENCE, } from './auth/signing.js';
|
|
58
|
+
export { WS_TICKET_TTL_MS, authorizeWsUpgrade, mintWsTicket, } from './auth/wsTicket.js';
|
|
59
|
+
export { resolveUrlSafetyPolicy } from './config/url-safety.js';
|
|
60
|
+
// Row <-> domain mappers for the SQL persistence layer (shared by the D1 repos and
|
|
61
|
+
// the Drizzle/Postgres repos — both use the same column shapes).
|
|
62
|
+
export * from './persistence/mappers.js';
|
|
63
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceR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CAAA;AAC/C,OAAO,EACL,uBAAuB,GAExB,MAAM,qCAAqC,CAAA;AAC5C,OAAO,EACL,UAAU,EACV,cAAc,GAIf,MAAM,mBAAmB,CAAA;AAC1B,OAAO,EACL,gBAAgB,EAChB,kBAAkB,EAClB,YAAY,GAGb,MAAM,oBAAoB,CAAA;AAsB3B,OAAO,EAAE,sBAAsB,EAAE,MAAM,wBAAwB,CAAA;AAE/D,mFAAmF;AACnF,iEAAiE;AACjE,cAAc,0BAA0B,CAAA"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Hono } from 'hono';
|
|
2
|
+
import type { AppEnv } from '../../http/env.js';
|
|
3
|
+
/**
|
|
4
|
+
* Account tenancy: the accounts a user can switch between (their personal account
|
|
5
|
+
* plus any orgs they belong to), org creation, and membership management. Accounts
|
|
6
|
+
* are an authenticated concept; with auth disabled (no signed-in user) there is a
|
|
7
|
+
* single implicit dev context, so the list is empty and mutations are refused.
|
|
8
|
+
*/
|
|
9
|
+
export declare function accountController(): Hono<AppEnv>;
|
|
10
|
+
//# sourceMappingURL=AccountController.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AccountController.d.ts","sourceRoot":"","sources":["../../../src/modules/accounts/AccountController.ts"],"names":[],"mappings":"AAUA,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAA;AAE3B,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAA;AAc/C;;;;;GAKG;AACH,wBAAgB,iBAAiB,IAAI,IAAI,CAAC,MAAM,CAAC,CAsMhD"}
|
|
@@ -0,0 +1,197 @@
|
|
|
1
|
+
import { addApiKeySchema, addMemberSchema, connectEmailSchema, createAccountSchema, createInvitationSchema, setMemberRolesSchema, testEmailSchema, updateAccountSchema, } from '@cat-factory/contracts';
|
|
2
|
+
import { Hono } from 'hono';
|
|
3
|
+
import { param } from '../../http/params.js';
|
|
4
|
+
import { jsonBody } from '../../http/validation.js';
|
|
5
|
+
import { apiKeyToWire } from '../providers/ApiKeyController.js';
|
|
6
|
+
/** The signed-in user, narrowed to what the tenancy layer needs. */
|
|
7
|
+
function accountUser(c) {
|
|
8
|
+
const user = c.get('user');
|
|
9
|
+
return user ? { id: user.id, login: user.login, name: user.name } : null;
|
|
10
|
+
}
|
|
11
|
+
const signInRequired = (c) => c.json({ error: { code: 'unauthorized', message: 'Sign in to manage accounts' } }, 401);
|
|
12
|
+
/**
|
|
13
|
+
* Account tenancy: the accounts a user can switch between (their personal account
|
|
14
|
+
* plus any orgs they belong to), org creation, and membership management. Accounts
|
|
15
|
+
* are an authenticated concept; with auth disabled (no signed-in user) there is a
|
|
16
|
+
* single implicit dev context, so the list is empty and mutations are refused.
|
|
17
|
+
*/
|
|
18
|
+
export function accountController() {
|
|
19
|
+
const app = new Hono();
|
|
20
|
+
app.get('/accounts', async (c) => {
|
|
21
|
+
const user = accountUser(c);
|
|
22
|
+
if (!user)
|
|
23
|
+
return c.json([]);
|
|
24
|
+
return c.json(await c.get('container').accountService.listForUser(user));
|
|
25
|
+
});
|
|
26
|
+
app.post('/accounts', jsonBody(createAccountSchema), async (c) => {
|
|
27
|
+
const user = accountUser(c);
|
|
28
|
+
if (!user)
|
|
29
|
+
return signInRequired(c);
|
|
30
|
+
const account = await c.get('container').accountService.createOrg(user, c.req.valid('json'));
|
|
31
|
+
return c.json(account, 201);
|
|
32
|
+
});
|
|
33
|
+
app.patch('/accounts/:accountId', jsonBody(updateAccountSchema), async (c) => {
|
|
34
|
+
const user = accountUser(c);
|
|
35
|
+
if (!user)
|
|
36
|
+
return signInRequired(c);
|
|
37
|
+
const account = await c
|
|
38
|
+
.get('container')
|
|
39
|
+
.accountService.updateSettings(param(c, 'accountId'), user.id, c.req.valid('json'));
|
|
40
|
+
return c.json(account);
|
|
41
|
+
});
|
|
42
|
+
app.get('/accounts/:accountId/members', async (c) => {
|
|
43
|
+
const user = accountUser(c);
|
|
44
|
+
if (!user)
|
|
45
|
+
return signInRequired(c);
|
|
46
|
+
const accounts = c.get('container').accountService;
|
|
47
|
+
// Membership in the account is required to see its roster (404 otherwise).
|
|
48
|
+
await accounts.requireMember(param(c, 'accountId'), user.id);
|
|
49
|
+
return c.json(await accounts.members(param(c, 'accountId')));
|
|
50
|
+
});
|
|
51
|
+
app.post('/accounts/:accountId/members', jsonBody(addMemberSchema), async (c) => {
|
|
52
|
+
const user = accountUser(c);
|
|
53
|
+
if (!user)
|
|
54
|
+
return signInRequired(c);
|
|
55
|
+
const body = c.req.valid('json');
|
|
56
|
+
const member = await c
|
|
57
|
+
.get('container')
|
|
58
|
+
.accountService.addMember(param(c, 'accountId'), user.id, body.userId, body.roles);
|
|
59
|
+
return c.json(member, 201);
|
|
60
|
+
});
|
|
61
|
+
// Set a member's role set (admin-only). The acting admin can't drop their own admin.
|
|
62
|
+
app.patch('/accounts/:accountId/members/:userId/roles', jsonBody(setMemberRolesSchema), async (c) => {
|
|
63
|
+
const user = accountUser(c);
|
|
64
|
+
if (!user)
|
|
65
|
+
return signInRequired(c);
|
|
66
|
+
const member = await c
|
|
67
|
+
.get('container')
|
|
68
|
+
.accountService.setMemberRoles(param(c, 'accountId'), user.id, param(c, 'userId'), c.req.valid('json').roles);
|
|
69
|
+
return c.json(member);
|
|
70
|
+
});
|
|
71
|
+
// ---- Invitations (email-based org onboarding) ---------------------------
|
|
72
|
+
// Available only when the invitation repository is wired (opt-in feature).
|
|
73
|
+
app.get('/accounts/:accountId/invitations', async (c) => {
|
|
74
|
+
const user = accountUser(c);
|
|
75
|
+
if (!user)
|
|
76
|
+
return signInRequired(c);
|
|
77
|
+
const container = c.get('container');
|
|
78
|
+
if (!container.invitations)
|
|
79
|
+
return c.json([]);
|
|
80
|
+
// Membership is required to view the account's pending invitations.
|
|
81
|
+
await container.accountService.requireMember(param(c, 'accountId'), user.id);
|
|
82
|
+
return c.json(await container.invitations.list(param(c, 'accountId')));
|
|
83
|
+
});
|
|
84
|
+
app.post('/accounts/:accountId/invitations', jsonBody(createInvitationSchema), async (c) => {
|
|
85
|
+
const user = accountUser(c);
|
|
86
|
+
if (!user)
|
|
87
|
+
return signInRequired(c);
|
|
88
|
+
const container = c.get('container');
|
|
89
|
+
if (!container.invitations) {
|
|
90
|
+
return c.json({ error: { code: 'unavailable', message: 'Invitations are not configured' } }, 503);
|
|
91
|
+
}
|
|
92
|
+
const body = c.req.valid('json');
|
|
93
|
+
const created = await container.invitations.invite(param(c, 'accountId'), user.id, body.email, body.roles);
|
|
94
|
+
// The raw accept link is returned so an operator can share it manually when no
|
|
95
|
+
// email transport is configured; never re-derivable afterwards.
|
|
96
|
+
return c.json({ invitation: created.invitation, acceptUrl: created.acceptUrl }, 201);
|
|
97
|
+
});
|
|
98
|
+
app.delete('/accounts/:accountId/invitations/:invitationId', async (c) => {
|
|
99
|
+
const user = accountUser(c);
|
|
100
|
+
if (!user)
|
|
101
|
+
return signInRequired(c);
|
|
102
|
+
const container = c.get('container');
|
|
103
|
+
if (!container.invitations)
|
|
104
|
+
return c.body(null, 204);
|
|
105
|
+
await container.invitations.revoke(param(c, 'accountId'), user.id, param(c, 'invitationId'));
|
|
106
|
+
return c.body(null, 204);
|
|
107
|
+
});
|
|
108
|
+
// ---- Account-scoped provider API keys (admin-onboarded, shared org pool) ----
|
|
109
|
+
// Direct-provider keys (OpenAI/Anthropic/Qwen/DeepSeek/Moonshot) shared by every
|
|
110
|
+
// workspace in the account. Admin-gated like the other account-scoped credentials;
|
|
111
|
+
// the raw key is write-only — only secret-free metadata is ever returned. Available
|
|
112
|
+
// only when the API-key store is wired (ENCRYPTION_KEY).
|
|
113
|
+
const apiKeysUnavailable = (c) => c.json({ error: { code: 'unavailable', message: 'API key storage is not configured' } }, 503);
|
|
114
|
+
app.get('/accounts/:accountId/api-keys', async (c) => {
|
|
115
|
+
const user = accountUser(c);
|
|
116
|
+
if (!user)
|
|
117
|
+
return signInRequired(c);
|
|
118
|
+
const container = c.get('container');
|
|
119
|
+
if (!container.apiKeys)
|
|
120
|
+
return apiKeysUnavailable(c);
|
|
121
|
+
await container.accountService.requireAdmin(param(c, 'accountId'), user.id);
|
|
122
|
+
const keys = await container.apiKeys.listKeys('account', param(c, 'accountId'));
|
|
123
|
+
return c.json({ keys: keys.map(apiKeyToWire) });
|
|
124
|
+
});
|
|
125
|
+
app.post('/accounts/:accountId/api-keys', jsonBody(addApiKeySchema), async (c) => {
|
|
126
|
+
const user = accountUser(c);
|
|
127
|
+
if (!user)
|
|
128
|
+
return signInRequired(c);
|
|
129
|
+
const container = c.get('container');
|
|
130
|
+
if (!container.apiKeys)
|
|
131
|
+
return apiKeysUnavailable(c);
|
|
132
|
+
await container.accountService.requireAdmin(param(c, 'accountId'), user.id);
|
|
133
|
+
const summary = await container.apiKeys.addKey('account', param(c, 'accountId'), c.req.valid('json'));
|
|
134
|
+
return c.json(apiKeyToWire(summary), 201);
|
|
135
|
+
});
|
|
136
|
+
app.delete('/accounts/:accountId/api-keys/:id', async (c) => {
|
|
137
|
+
const user = accountUser(c);
|
|
138
|
+
if (!user)
|
|
139
|
+
return signInRequired(c);
|
|
140
|
+
const container = c.get('container');
|
|
141
|
+
if (!container.apiKeys)
|
|
142
|
+
return apiKeysUnavailable(c);
|
|
143
|
+
await container.accountService.requireAdmin(param(c, 'accountId'), user.id);
|
|
144
|
+
await container.apiKeys.removeKey('account', param(c, 'accountId'), param(c, 'id'));
|
|
145
|
+
return c.body(null, 204);
|
|
146
|
+
});
|
|
147
|
+
// ---- Email sender connection (per-account, UI-onboarded) ----------------
|
|
148
|
+
// Owner-only mutations; available only when the email module is wired.
|
|
149
|
+
app.get('/accounts/:accountId/email-connection', async (c) => {
|
|
150
|
+
const user = accountUser(c);
|
|
151
|
+
if (!user)
|
|
152
|
+
return signInRequired(c);
|
|
153
|
+
const container = c.get('container');
|
|
154
|
+
if (!container.email)
|
|
155
|
+
return c.json({ connection: null, configured: false });
|
|
156
|
+
await container.accountService.requireMember(param(c, 'accountId'), user.id);
|
|
157
|
+
const connection = await container.email.getConnection(param(c, 'accountId'));
|
|
158
|
+
return c.json({ connection, configured: true });
|
|
159
|
+
});
|
|
160
|
+
app.post('/accounts/:accountId/email-connection', jsonBody(connectEmailSchema), async (c) => {
|
|
161
|
+
const user = accountUser(c);
|
|
162
|
+
if (!user)
|
|
163
|
+
return signInRequired(c);
|
|
164
|
+
const container = c.get('container');
|
|
165
|
+
if (!container.email) {
|
|
166
|
+
return c.json({ error: { code: 'unavailable', message: 'Email is not configured' } }, 503);
|
|
167
|
+
}
|
|
168
|
+
await c.get('container').accountService.requireAdmin(param(c, 'accountId'), user.id);
|
|
169
|
+
const connection = await container.email.connect(param(c, 'accountId'), c.req.valid('json'));
|
|
170
|
+
return c.json(connection, 201);
|
|
171
|
+
});
|
|
172
|
+
app.delete('/accounts/:accountId/email-connection', async (c) => {
|
|
173
|
+
const user = accountUser(c);
|
|
174
|
+
if (!user)
|
|
175
|
+
return signInRequired(c);
|
|
176
|
+
const container = c.get('container');
|
|
177
|
+
if (!container.email)
|
|
178
|
+
return c.body(null, 204);
|
|
179
|
+
await c.get('container').accountService.requireAdmin(param(c, 'accountId'), user.id);
|
|
180
|
+
await container.email.disconnect(param(c, 'accountId'));
|
|
181
|
+
return c.body(null, 204);
|
|
182
|
+
});
|
|
183
|
+
app.post('/accounts/:accountId/email-connection/test', jsonBody(testEmailSchema), async (c) => {
|
|
184
|
+
const user = accountUser(c);
|
|
185
|
+
if (!user)
|
|
186
|
+
return signInRequired(c);
|
|
187
|
+
const container = c.get('container');
|
|
188
|
+
if (!container.email) {
|
|
189
|
+
return c.json({ error: { code: 'unavailable', message: 'Email is not configured' } }, 503);
|
|
190
|
+
}
|
|
191
|
+
await c.get('container').accountService.requireAdmin(param(c, 'accountId'), user.id);
|
|
192
|
+
await container.email.sendTest(param(c, 'accountId'), c.req.valid('json').to);
|
|
193
|
+
return c.json({ ok: true });
|
|
194
|
+
});
|
|
195
|
+
return app;
|
|
196
|
+
}
|
|
197
|
+
//# sourceMappingURL=AccountController.js.map
|
|
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|
2
|
+
import type { AppEnv } from '../../http/env.js';
|
|
3
|
+
/**
|
|
4
|
+
* Cross-cutting endpoints over any "agent run" (bootstrap or execution),
|
|
5
|
+
* dispatching to the right service by the run's kind. Mounted under
|
|
6
|
+
* `/workspaces/:workspaceId`. This is the single retry path the board uses for a
|
|
7
|
+
* failed run of either flow (replacing the bootstrap-only retry route).
|
|
8
|
+
*/
|
|
9
|
+
export declare function agentRunController(): Hono<AppEnv>;
|
|
10
|
+
//# sourceMappingURL=AgentRunController.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AgentRunController.d.ts","sourceRoot":"","sources":["../../../src/modules/agentRuns/AgentRunController.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAA;AAE3B,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAA;AAO/C;;;;;GAKG;AACH,wBAAgB,kBAAkB,IAAI,IAAI,CAAC,MAAM,CAAC,CAqEjD"}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { Hono } from 'hono';
|
|
2
|
+
import { param } from '../../http/params.js';
|
|
3
|
+
import { personalGateForRun, readPersonalPassword } from '../providers/personalCredentialGate.js';
|
|
4
|
+
const unavailable = (c, message) => c.json({ error: { code: 'unavailable', message } }, 503);
|
|
5
|
+
/**
|
|
6
|
+
* Cross-cutting endpoints over any "agent run" (bootstrap or execution),
|
|
7
|
+
* dispatching to the right service by the run's kind. Mounted under
|
|
8
|
+
* `/workspaces/:workspaceId`. This is the single retry path the board uses for a
|
|
9
|
+
* failed run of either flow (replacing the bootstrap-only retry route).
|
|
10
|
+
*/
|
|
11
|
+
export function agentRunController() {
|
|
12
|
+
const app = new Hono();
|
|
13
|
+
// Retry a failed run. Resolves the kind from the unified agent_runs table, then
|
|
14
|
+
// re-drives via the matching service (both 409 if the run isn't `failed`).
|
|
15
|
+
app.post('/agent-runs/:id/retry', async (c) => {
|
|
16
|
+
const container = c.get('container');
|
|
17
|
+
const workspaceId = param(c, 'workspaceId');
|
|
18
|
+
const id = param(c, 'id');
|
|
19
|
+
const ref = await container.agentRunRepository.getRef(workspaceId, id);
|
|
20
|
+
if (!ref) {
|
|
21
|
+
return c.json({ error: { code: 'not_found', message: `Agent run '${id}' not found` } }, 404);
|
|
22
|
+
}
|
|
23
|
+
if (ref.kind === 'bootstrap') {
|
|
24
|
+
const bootstrap = container.bootstrap;
|
|
25
|
+
if (!bootstrap)
|
|
26
|
+
return unavailable(c, 'Repo bootstrap is not configured');
|
|
27
|
+
if (!bootstrap.service.canBootstrap) {
|
|
28
|
+
return unavailable(c, 'Repo bootstrapping needs the GitHub App and the implementation container to be configured');
|
|
29
|
+
}
|
|
30
|
+
const run = await bootstrap.service.retry(workspaceId, id);
|
|
31
|
+
return c.json({ kind: ref.kind, run }, 201);
|
|
32
|
+
}
|
|
33
|
+
// Individual-usage models (Claude) require the retrying user's personal
|
|
34
|
+
// subscription: resolve the initiator + activation closure (throws 428 when a
|
|
35
|
+
// password is needed). The password rides on the X-Personal-Password header. A
|
|
36
|
+
// non-individual run gets a no-op gate.
|
|
37
|
+
const { initiatedBy, activate } = await personalGateForRun(container, workspaceId, id, c.get('user'), readPersonalPassword(c));
|
|
38
|
+
const run = await container.executionService.retry(workspaceId, id, initiatedBy, activate);
|
|
39
|
+
return c.json({ kind: ref.kind, run }, 201);
|
|
40
|
+
});
|
|
41
|
+
// Explicitly stop a running run (bootstrap or execution). Kills the per-run
|
|
42
|
+
// container and tears down the durable driver, then marks the run terminally
|
|
43
|
+
// `cancelled` so the board stops showing it as running. Resolves the kind from
|
|
44
|
+
// the unified agent_runs table and dispatches to the matching service.
|
|
45
|
+
app.post('/agent-runs/:id/stop', async (c) => {
|
|
46
|
+
const container = c.get('container');
|
|
47
|
+
const workspaceId = param(c, 'workspaceId');
|
|
48
|
+
const id = param(c, 'id');
|
|
49
|
+
const ref = await container.agentRunRepository.getRef(workspaceId, id);
|
|
50
|
+
if (!ref) {
|
|
51
|
+
return c.json({ error: { code: 'not_found', message: `Agent run '${id}' not found` } }, 404);
|
|
52
|
+
}
|
|
53
|
+
if (ref.kind === 'bootstrap') {
|
|
54
|
+
const bootstrap = container.bootstrap;
|
|
55
|
+
if (!bootstrap)
|
|
56
|
+
return unavailable(c, 'Repo bootstrap is not configured');
|
|
57
|
+
const run = await bootstrap.service.stop(workspaceId, id);
|
|
58
|
+
return c.json({ kind: ref.kind, run });
|
|
59
|
+
}
|
|
60
|
+
const run = await container.executionService.stopRun(workspaceId, id);
|
|
61
|
+
return c.json({ kind: ref.kind, run });
|
|
62
|
+
});
|
|
63
|
+
return app;
|
|
64
|
+
}
|
|
65
|
+
//# sourceMappingURL=AgentRunController.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AgentRunController.js","sourceRoot":"","sources":["../../../src/modules/agentRuns/AgentRunController.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAA;AAG3B,OAAO,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAA;AAC5C,OAAO,EAAE,kBAAkB,EAAE,oBAAoB,EAAE,MAAM,wCAAwC,CAAA;AAEjG,MAAM,WAAW,GAAG,CAAC,CAAkB,EAAE,OAAe,EAAE,EAAE,CAC1D,CAAC,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,EAAE,IAAI,EAAE,aAAa,EAAE,OAAO,EAAE,EAAE,EAAE,GAAG,CAAC,CAAA;AAE1D;;;;;GAKG;AACH,MAAM,UAAU,kBAAkB;IAChC,MAAM,GAAG,GAAG,IAAI,IAAI,EAAU,CAAA;IAE9B,gFAAgF;IAChF,2EAA2E;IAC3E,GAAG,CAAC,IAAI,CAAC,uBAAuB,EAAE,KAAK,EAAE,CAAC,EAAE,EAAE;QAC5C,MAAM,SAAS,GAAG,CAAC,CAAC,GAAG,CAAC,WAAW,CAAC,CAAA;QACpC,MAAM,WAAW,GAAG,KAAK,CAAC,CA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QAED,MAAM,GAAG,GAAG,MAAM,SAAS,CAAC,gBAAgB,CAAC,OAAO,CAAC,WAAW,EAAE,EAAE,CAAC,CAAA;QACrE,OAAO,CAAC,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,GAAG,CAAC,IAAI,EAAE,GAAG,EAAE,CAAC,CAAA;IACxC,CAAC,CAAC,CAAA;IAEF,OAAO,GAAG,CAAA;AACZ,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Hono } from 'hono';
|
|
2
|
+
import type { AuthConfig } from '../../config/types.js';
|
|
3
|
+
import type { AppEnv } from '../../http/env.js';
|
|
4
|
+
/**
|
|
5
|
+
* Choose the post-login landing URL from the (untrusted) `redirect` query. The
|
|
6
|
+
* session token is appended as a fragment, so an unrestricted redirect is a
|
|
7
|
+
* token-exfiltration primitive — only same-origin or explicitly allowlisted origins
|
|
8
|
+
* are honoured, else the request origin.
|
|
9
|
+
*/
|
|
10
|
+
export declare function pickPostLoginRedirect(requested: string | undefined, requestOrigin: string, cfg: Pick<AuthConfig, 'successRedirectUrl' | 'allowedRedirectOrigins'>): string;
|
|
11
|
+
export declare function authController(): Hono<AppEnv>;
|
|
12
|
+
//# sourceMappingURL=AuthController.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AuthController.d.ts","sourceRoot":"","sources":["../../../src/modules/auth/AuthController.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAA;AAY3B,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAA;AACvD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAA;AAiE/C;;;;;GAKG;AACH,wBAAgB,qBAAqB,CACnC,SAAS,EAAE,MAAM,GAAG,SAAS,EAC7B,aAAa,EAAE,MAAM,EACrB,GAAG,EAAE,IAAI,CAAC,UAAU,EAAE,oBAAoB,GAAG,wBAAwB,CAAC,GACrE,MAAM,CAcR;AAmGD,wBAAgB,cAAc,IAAI,IAAI,CAAC,MAAM,CAAC,CA4R7C"}
|