@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
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { localRunnerSchema, testLocalModelEndpointSchema, upsertLocalModelEndpointSchema, } from '@cat-factory/contracts';
|
|
2
|
+
import * as v from 'valibot';
|
|
3
|
+
import { Hono } from 'hono';
|
|
4
|
+
import { param } from '../../http/params.js';
|
|
5
|
+
import { jsonBody } from '../../http/validation.js';
|
|
6
|
+
// Per-USER locally-run model endpoints (Ollama / LM Studio / llama.cpp / vLLM / custom
|
|
7
|
+
// OpenAI-compatible runners). A runner lives on the user's own machine, so endpoints are
|
|
8
|
+
// scoped to the signed-in user — mounted at the root (not under a workspace) and require
|
|
9
|
+
// a signed-in user, like personal subscriptions. The optional bearer key is write-only.
|
|
10
|
+
const signInRequired = (c) => c.json({ error: { code: 'unauthorized', message: 'Sign in to manage local model runners' } }, 401);
|
|
11
|
+
const unavailable = (c) => c.json({ error: { code: 'unavailable', message: 'Local model runner storage is not configured' } }, 503);
|
|
12
|
+
export function localModelEndpointController() {
|
|
13
|
+
const app = new Hono();
|
|
14
|
+
app.get('/local-model-endpoints', async (c) => {
|
|
15
|
+
const local = c.get('container').localModelEndpoints;
|
|
16
|
+
if (!local)
|
|
17
|
+
return unavailable(c);
|
|
18
|
+
const user = c.get('user');
|
|
19
|
+
if (!user)
|
|
20
|
+
return signInRequired(c);
|
|
21
|
+
return c.json({ endpoints: await local.list(user.id) });
|
|
22
|
+
});
|
|
23
|
+
app.put('/local-model-endpoints/:provider', jsonBody(upsertLocalModelEndpointSchema), async (c) => {
|
|
24
|
+
const local = c.get('container').localModelEndpoints;
|
|
25
|
+
if (!local)
|
|
26
|
+
return unavailable(c);
|
|
27
|
+
const user = c.get('user');
|
|
28
|
+
if (!user)
|
|
29
|
+
return signInRequired(c);
|
|
30
|
+
const provider = v.parse(localRunnerSchema, param(c, 'provider'));
|
|
31
|
+
const body = c.req.valid('json');
|
|
32
|
+
const endpoint = await local.upsert(user.id, { ...body, provider });
|
|
33
|
+
return c.json(endpoint, 201);
|
|
34
|
+
});
|
|
35
|
+
app.delete('/local-model-endpoints/:provider', async (c) => {
|
|
36
|
+
const local = c.get('container').localModelEndpoints;
|
|
37
|
+
if (!local)
|
|
38
|
+
return unavailable(c);
|
|
39
|
+
const user = c.get('user');
|
|
40
|
+
if (!user)
|
|
41
|
+
return signInRequired(c);
|
|
42
|
+
const provider = v.parse(localRunnerSchema, param(c, 'provider'));
|
|
43
|
+
await local.remove(user.id, provider);
|
|
44
|
+
return c.body(null, 204);
|
|
45
|
+
});
|
|
46
|
+
// Probe a runner's `/models` server-side so the UI can validate the URL + list models.
|
|
47
|
+
app.post('/local-model-endpoints/test', jsonBody(testLocalModelEndpointSchema), async (c) => {
|
|
48
|
+
const local = c.get('container').localModelEndpoints;
|
|
49
|
+
if (!local)
|
|
50
|
+
return unavailable(c);
|
|
51
|
+
const user = c.get('user');
|
|
52
|
+
if (!user)
|
|
53
|
+
return signInRequired(c);
|
|
54
|
+
return c.json(await local.testConnection(c.req.valid('json')));
|
|
55
|
+
});
|
|
56
|
+
return app;
|
|
57
|
+
}
|
|
58
|
+
//# sourceMappingURL=LocalModelEndpointController.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LocalModelEndpointController.js","sourceRoot":"","sources":["../../../src/modules/localModels/LocalModelEndpointController.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,iBAAiB,EACjB,4BAA4B,EAC5B,8BAA8B,GAC/B,MAAM,wBAAwB,CAAA;AAC/B,OAAO,KAAK,CAAC,MAAM,SAAS,CAAA;AAC5B,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAA;AAG3B,OAAO,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAA;AAC5C,OAAO,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAA;AAEnD,uFAAuF;AACvF,yFAAyF;AACzF,yFAAyF;AACzF,wFAAwF;AAExF,MAAM,cAAc,GAAG,CAAC,CAAkB,EAAE,EAAE,CAC5C,CAAC,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,EAAE,IAAI,EAAE,cAAc,EAAE,OAAO,EAAE,uCAAuC,EAAE,EAAE,EAAE,GAAG,CAAC,CAAA;AAEpG,MAAM,WAAW,GAAG,CAAC,CAAkB,EAAE,EAAE,CACzC,CAAC,CAAC,IAAI,CACJ,EAAE,KAAK,EAAE,EAAE,IAAI,EAAE,aAAa,EAAE,OAAO,EAAE,8CAA8C,EAAE,EAAE,EAC3F,GAAG,CACJ,CAAA;AAEH,MAAM,UAAU,4BAA4B;IAC1C,MAAM,GAAG,GAAG,IAAI,IAAI,EAAU,CAAA;IAE9B,GAAG,CAAC,GAAG,CAAC,wBAAwB,EAAE,KAAK,EAAE,CAAC,EAAE,EAAE;QAC5C,MAAM,KAAK,GAAG,CAAC,CAAC,GAAG,CAAC,WAAW,CAAC,CAAC,mBAAmB,CAAA;QACpD,IAAI,CAAC,KAAK;YAAE,OAAO,WAAW,CAAC,CAAC,CAAC,CAAA;QACjC,MAAM,IAAI,GAAG,CAAC,CAAC,GAAG,CAAC,MAAM,CAAC,CAAA;QAC1B,IAAI,CAAC,IAAI;YAAE,OAAO,cAAc,CAAC,CAA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AM,CAAC,CAAA;QAC1B,IAAI,CAAC,IAAI;YAAE,OAAO,cAAc,CAAC,CAAC,CAAC,CAAA;QACnC,MAAM,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,iBAAiB,EAAE,KAAK,CAAC,CAAC,EAAE,UAAU,CAAC,CAAC,CAAA;QACjE,MAAM,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE,EAAE,QAAQ,CAAC,CAAA;QACrC,OAAO,CAAC,CAAC,IAAI,CAAC,IAAI,EAAE,GAAG,CAAC,CAAA;IAC1B,CAAC,CAAC,CAAA;IAEF,uFAAuF;IACvF,GAAG,CAAC,IAAI,CAAC,6BAA6B,EAAE,QAAQ,CAAC,4BAA4B,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,EAAE;QAC1F,MAAM,KAAK,GAAG,CAAC,CAAC,GAAG,CAAC,WAAW,CAAC,CAAC,mBAAmB,CAAA;QACpD,IAAI,CAAC,KAAK;YAAE,OAAO,WAAW,CAAC,CAAC,CAAC,CAAA;QACjC,MAAM,IAAI,GAAG,CAAC,CAAC,GAAG,CAAC,MAAM,CAAC,CAAA;QAC1B,IAAI,CAAC,IAAI;YAAE,OAAO,cAAc,CAAC,CAAC,CAAC,CAAA;QACnC,OAAO,CAAC,CAAC,IAAI,CAAC,MAAM,KAAK,CAAC,cAAc,CAAC,CAAC,CAAC,GAAG,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,CAAA;IAChE,CAAC,CAAC,CAAA;IAEF,OAAO,GAAG,CAAA;AACZ,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Hono } from 'hono';
|
|
2
|
+
import type { AppEnv } from '../../http/env.js';
|
|
3
|
+
/**
|
|
4
|
+
* CRUD for a workspace's merge threshold presets (the library a task picks its
|
|
5
|
+
* auto-merge policy from). The default preset is seeded lazily on first list and
|
|
6
|
+
* cannot be deleted/unset. Mounted under `/workspaces/:workspaceId`.
|
|
7
|
+
*/
|
|
8
|
+
export declare function mergePresetController(): Hono<AppEnv>;
|
|
9
|
+
//# sourceMappingURL=MergePresetController.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MergePresetController.d.ts","sourceRoot":"","sources":["../../../src/modules/merge/MergePresetController.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAA;AAG3B,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAA;AAY/C;;;;GAIG;AACH,wBAAgB,qBAAqB,IAAI,IAAI,CAAC,MAAM,CAAC,CAmCpD"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { createMergePresetSchema, updateMergePresetSchema } from '@cat-factory/contracts';
|
|
2
|
+
import { Hono } from 'hono';
|
|
3
|
+
import { param } from '../../http/params.js';
|
|
4
|
+
import { jsonBody } from '../../http/validation.js';
|
|
5
|
+
/** Resolve the merge-preset module or send a 503, returning null when unconfigured. */
|
|
6
|
+
function requireMergePresets(c) {
|
|
7
|
+
return c.get('container').mergePresets ?? null;
|
|
8
|
+
}
|
|
9
|
+
const unavailable = (c) => c.json({ error: { code: 'unavailable', message: 'Merge presets are not configured' } }, 503);
|
|
10
|
+
/**
|
|
11
|
+
* CRUD for a workspace's merge threshold presets (the library a task picks its
|
|
12
|
+
* auto-merge policy from). The default preset is seeded lazily on first list and
|
|
13
|
+
* cannot be deleted/unset. Mounted under `/workspaces/:workspaceId`.
|
|
14
|
+
*/
|
|
15
|
+
export function mergePresetController() {
|
|
16
|
+
const app = new Hono();
|
|
17
|
+
app.get('/merge-presets', async (c) => {
|
|
18
|
+
const presets = requireMergePresets(c);
|
|
19
|
+
if (!presets)
|
|
20
|
+
return unavailable(c);
|
|
21
|
+
return c.json(await presets.service.list(param(c, 'workspaceId')));
|
|
22
|
+
});
|
|
23
|
+
app.post('/merge-presets', jsonBody(createMergePresetSchema), async (c) => {
|
|
24
|
+
const presets = requireMergePresets(c);
|
|
25
|
+
if (!presets)
|
|
26
|
+
return unavailable(c);
|
|
27
|
+
const preset = await presets.service.create(param(c, 'workspaceId'), c.req.valid('json'));
|
|
28
|
+
return c.json(preset, 201);
|
|
29
|
+
});
|
|
30
|
+
app.patch('/merge-presets/:presetId', jsonBody(updateMergePresetSchema), async (c) => {
|
|
31
|
+
const presets = requireMergePresets(c);
|
|
32
|
+
if (!presets)
|
|
33
|
+
return unavailable(c);
|
|
34
|
+
const preset = await presets.service.update(param(c, 'workspaceId'), param(c, 'presetId'), c.req.valid('json'));
|
|
35
|
+
return c.json(preset);
|
|
36
|
+
});
|
|
37
|
+
app.delete('/merge-presets/:presetId', async (c) => {
|
|
38
|
+
const presets = requireMergePresets(c);
|
|
39
|
+
if (!presets)
|
|
40
|
+
return unavailable(c);
|
|
41
|
+
await presets.service.remove(param(c, 'workspaceId'), param(c, 'presetId'));
|
|
42
|
+
return c.body(null, 204);
|
|
43
|
+
});
|
|
44
|
+
return app;
|
|
45
|
+
}
|
|
46
|
+
//# sourceMappingURL=MergePresetController.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MergePresetController.js","sourceRoot":"","sources":["../../../src/modules/merge/MergePresetController.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,uBAAuB,EAAE,MAAM,wBAAwB,CAAA;AACzF,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAA;AAI3B,OAAO,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAA;AAC5C,OAAO,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAA;AAEnD,uFAAuF;AACvF,SAAS,mBAAmB,CAAC,CAAkB;IAC7C,OAAO,CAAC,CAAC,GAAG,CAAC,WAAW,CAAC,CAAC,YAAY,IAAI,IAAI,CAAA;AAChD,CAAC;AAED,MAAM,WAAW,GAAG,CAAC,CAAkB,EAAE,EAAE,CACzC,CAAC,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,EAAE,IAAI,EAAE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AAA;QACnC,MAAM,MAAM,GAAG,MAAM,OAAO,CAAC,OAAO,CAAC,MAAM,CACzC,KAAK,CAAC,CAAC,EAAE,aAAa,CAAC,EACvB,KAAK,CAAC,CAAC,EAAE,UAAU,CAAC,EACpB,CAAC,CAAC,GAAG,CAAC,KAAK,CAAC,MAAM,CAAC,CACpB,CAAA;QACD,OAAO,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,CAAA;IACvB,CAAC,CAAC,CAAA;IAEF,GAAG,CAAC,MAAM,CAAC,0BAA0B,EAAE,KAAK,EAAE,CAAC,EAAE,EAAE;QACjD,MAAM,OAAO,GAAG,mBAAmB,CAAC,CAAC,CAAC,CAAA;QACtC,IAAI,CAAC,OAAO;YAAE,OAAO,WAAW,CAAC,CAAC,CAAC,CAAA;QACnC,MAAM,OAAO,CAAC,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,EAAE,aAAa,CAAC,EAAE,KAAK,CAAC,CAAC,EAAE,UAAU,CAAC,CAAC,CAAA;QAC3E,OAAO,CAAC,CAAC,IAAI,CAAC,IAAI,EAAE,GAAG,CAAC,CAAA;IAC1B,CAAC,CAAC,CAAA;IAEF,OAAO,GAAG,CAAA;AACZ,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Hono } from 'hono';
|
|
2
|
+
import type { AppEnv } from '../../http/env.js';
|
|
3
|
+
/**
|
|
4
|
+
* Read/replace a workspace's per-agent-kind default models (the model each agent
|
|
5
|
+
* kind defaults to, overriding the env routing for that workspace). PUT replaces
|
|
6
|
+
* the whole map wholesale. Mounted under `/workspaces/:workspaceId`.
|
|
7
|
+
*/
|
|
8
|
+
export declare function modelDefaultsController(): Hono<AppEnv>;
|
|
9
|
+
//# sourceMappingURL=ModelDefaultsController.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ModelDefaultsController.d.ts","sourceRoot":"","sources":["../../../src/modules/modelDefaults/ModelDefaultsController.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAA;AAG3B,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAA;AAY/C;;;;GAIG;AACH,wBAAgB,uBAAuB,IAAI,IAAI,CAAC,MAAM,CAAC,CAiBtD"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { setModelDefaultsSchema } from '@cat-factory/contracts';
|
|
2
|
+
import { Hono } from 'hono';
|
|
3
|
+
import { param } from '../../http/params.js';
|
|
4
|
+
import { jsonBody } from '../../http/validation.js';
|
|
5
|
+
/** Resolve the model-defaults module or send a 503, returning null when unconfigured. */
|
|
6
|
+
function requireModelDefaults(c) {
|
|
7
|
+
return c.get('container').modelDefaults ?? null;
|
|
8
|
+
}
|
|
9
|
+
const unavailable = (c) => c.json({ error: { code: 'unavailable', message: 'Model defaults are not configured' } }, 503);
|
|
10
|
+
/**
|
|
11
|
+
* Read/replace a workspace's per-agent-kind default models (the model each agent
|
|
12
|
+
* kind defaults to, overriding the env routing for that workspace). PUT replaces
|
|
13
|
+
* the whole map wholesale. Mounted under `/workspaces/:workspaceId`.
|
|
14
|
+
*/
|
|
15
|
+
export function modelDefaultsController() {
|
|
16
|
+
const app = new Hono();
|
|
17
|
+
app.get('/model-defaults', async (c) => {
|
|
18
|
+
const defaults = requireModelDefaults(c);
|
|
19
|
+
if (!defaults)
|
|
20
|
+
return unavailable(c);
|
|
21
|
+
return c.json(await defaults.service.get(param(c, 'workspaceId')));
|
|
22
|
+
});
|
|
23
|
+
app.put('/model-defaults', jsonBody(setModelDefaultsSchema), async (c) => {
|
|
24
|
+
const defaults = requireModelDefaults(c);
|
|
25
|
+
if (!defaults)
|
|
26
|
+
return unavailable(c);
|
|
27
|
+
const stored = await defaults.service.set(param(c, 'workspaceId'), c.req.valid('json'));
|
|
28
|
+
return c.json(stored);
|
|
29
|
+
});
|
|
30
|
+
return app;
|
|
31
|
+
}
|
|
32
|
+
//# sourceMappingURL=ModelDefaultsController.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ModelDefaultsController.js","sourceRoot":"","sources":["../../../src/modules/modelDefaults/ModelDefaultsController.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,MAAM,wBAAwB,CAAA;AAC/D,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAA;AAI3B,OAAO,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAA;AAC5C,OAAO,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAA;AAEnD,yFAAyF;AACzF,SAAS,oBAAoB,CAAC,CAAkB;IAC9C,OAAO,CAAC,CAAC,GAAG,CAAC,WAAW,CAAC,CAAC,aAAa,IAAI,IAAI,CAAA;AACjD,CAAC;AAED,MAAM,WAAW,GAAG,CAAC,CAAkB,EAAE,EAAE,CACzC,CAAC,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,EAAE,IAAI,EAAE,aAAa,EAAE,OAAO,EAAE,mCAAmC,EAAE,EAAE,EAAE,GAAG,CAAC,CAAA;AAE/F;;;;GAIG;AACH,MAAM,UAAU,uBAAuB;IACrC,MAAM,GAAG,GAAG,IAAI,IAAI,EAAU,CAAA;IAE9B,GAAG,CAAC,GAAG,CAAC,iBAAiB,EAAE,KAAK,EAAE,CAAC,EAAE,EAAE;QACrC,MAAM,QAAQ,GAAG,oBAAoB,CAAC,CAAC,CAAC,CAAA;QACxC,IAAI,CAAC,QAAQ;YAAE,OAAO,WAAW,CAAC,CAAC,CAAC,CAAA;QACpC,OAAO,CAAC,CAAC,IAAI,CAAC,MAAM,QAAQ,CAAC,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,EAAE,aAAa,CAAC,CAAC,CAAC,CAAA;IACpE,CAAC,CAAC,CAAA;IAEF,GAAG,CAAC,GAAG,CAAC,iBAAiB,EAAE,QAAQ,CAAC,sBAAsB,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,EAAE;QACvE,MAAM,QAAQ,GAAG,oBAAoB,CAAC,CAAC,CAAC,CAAA;QACxC,IAAI,CAAC,QAAQ;YAAE,OAAO,WAAW,CAAC,CAAC,CAAC,CAAA;QACpC,MAAM,MAAM,GAAG,MAAM,QAAQ,CAAC,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,EAAE,aAAa,CAAC,EAAE,CAAC,CAAC,GAAG,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAA;QACvF,OAAO,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,CAAA;IACvB,CAAC,CAAC,CAAA;IAEF,OAAO,GAAG,CAAA;AACZ,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Hono } from 'hono';
|
|
2
|
+
import type { AppEnv } from '../../http/env.js';
|
|
3
|
+
/**
|
|
4
|
+
* Serves the model picker catalog. Selectability is derived from what is actually
|
|
5
|
+
* configured — a direct API key for the model's provider (the DB pool, scoped to the
|
|
6
|
+
* workspace + its account + the caller), a connected subscription vendor, or the
|
|
7
|
+
* opt-in Cloudflare Workers AI lib being enabled. It exposes only labels and
|
|
8
|
+
* provider/model ids + an `available` flag — never the keys themselves.
|
|
9
|
+
*/
|
|
10
|
+
export declare function modelController(): Hono<AppEnv>;
|
|
11
|
+
//# sourceMappingURL=ModelController.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ModelController.d.ts","sourceRoot":"","sources":["../../../src/modules/models/ModelController.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAA;AAC3B,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAA;AAI/C;;;;;;GAMG;AACH,wBAAgB,eAAe,IAAI,IAAI,CAAC,MAAM,CAAC,CA4B9C"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { effectiveCatalogWith, localSelectableModels } from '@cat-factory/kernel';
|
|
2
|
+
import { modelCostResolver } from '@cat-factory/spend';
|
|
3
|
+
import { Hono } from 'hono';
|
|
4
|
+
import { param } from '../../http/params.js';
|
|
5
|
+
import { resolveWorkspaceCapabilities } from '../../agents/providerCapabilities.js';
|
|
6
|
+
/**
|
|
7
|
+
* Serves the model picker catalog. Selectability is derived from what is actually
|
|
8
|
+
* configured — a direct API key for the model's provider (the DB pool, scoped to the
|
|
9
|
+
* workspace + its account + the caller), a connected subscription vendor, or the
|
|
10
|
+
* opt-in Cloudflare Workers AI lib being enabled. It exposes only labels and
|
|
11
|
+
* provider/model ids + an `available` flag — never the keys themselves.
|
|
12
|
+
*/
|
|
13
|
+
export function modelController() {
|
|
14
|
+
const app = new Hono();
|
|
15
|
+
// Deployment-level catalog (no workspace context): deployment-wide selectability
|
|
16
|
+
// only (no per-workspace direct keys / subscriptions). The picker uses the
|
|
17
|
+
// per-workspace route below; this stays for contexts without a workspace.
|
|
18
|
+
app.get('/models', (c) => {
|
|
19
|
+
c.header('Cache-Control', 'public, max-age=60');
|
|
20
|
+
return c.json(c.get('container').config.models);
|
|
21
|
+
});
|
|
22
|
+
// Per-workspace catalog: selectability reflects this workspace's (+ its account's +
|
|
23
|
+
// the caller's) configured API keys and subscription tokens.
|
|
24
|
+
app.get('/workspaces/:workspaceId/models', async (c) => {
|
|
25
|
+
const container = c.get('container');
|
|
26
|
+
const userId = c.get('user')?.id;
|
|
27
|
+
const caps = await resolveWorkspaceCapabilities(container, param(c, 'workspaceId'), userId);
|
|
28
|
+
const costFor = modelCostResolver(container.config.spend);
|
|
29
|
+
// Surface the caller's own locally-run models (Ollama / LM Studio / …) alongside the
|
|
30
|
+
// built-in catalog. They're scoped to the user (a runner lives on their machine).
|
|
31
|
+
const local = userId && container.localModelEndpoints
|
|
32
|
+
? await container.localModelEndpoints.capabilitiesFor(userId)
|
|
33
|
+
: [];
|
|
34
|
+
return c.json(effectiveCatalogWith(localSelectableModels(local), caps, costFor));
|
|
35
|
+
});
|
|
36
|
+
return app;
|
|
37
|
+
}
|
|
38
|
+
//# sourceMappingURL=ModelController.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ModelController.js","sourceRoot":"","sources":["../../../src/modules/models/ModelController.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAA;AACjF,OAAO,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAA;AACtD,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAA;AAE3B,OAAO,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAA;AAC5C,OAAO,EAAE,4BAA4B,EAAE,MAAM,sCAAsC,CAAA;AAEnF;;;;;;GAMG;AACH,MAAM,UAAU,eAAe;IAC7B,MAAM,GAAG,GAAG,IAAI,IAAI,EAAU,CAAA;IAE9B,iFAAiF;IACjF,2EAA2E;IAC3E,0EAA0E;IAC1E,GAAG,CAAC,GAAG,CAAC,SAAS,EAAE,CAAC,CAAC,EAAE,EAAE;QACvB,CAAC,CAAC,MAAM,CAAC,eAAe,EAAE,oBAAoB,CAAC,CAAA;QAC/C,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,GAAG,CAAC,WAAW,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,CAAA;IACjD,CAAC,CAAC,CAAA;IAEF,oFAAoF;IACpF,6DAA6D;IAC7D,GAAG,CAAC,GAAG,CAAC,iCAAiC,EAAE,KAAK,EAAE,CAAC,EAAE,EAAE;QACrD,MAAM,SAAS,GAAG,CAAC,CAAC,GAAG,CAAC,WAAW,CAAC,CAAA;QACpC,MAAM,MAAM,GAAG,CAAC,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE,EAAE,CAAA;QAChC,MAAM,IAAI,GAAG,MAAM,4BAA4B,CAAC,SAAS,EAAE,KAAK,CAAC,CAAC,EAAE,aAAa,CAAC,EAAE,MAAM,CAAC,CAAA;QAC3F,MAAM,OAAO,GAAG,iBAAiB,CAAC,SAAS,CAAC,MAAM,CAAC,KAAK,CAAC,CAAA;QACzD,qFAAqF;QACrF,kFAAkF;QAClF,MAAM,KAAK,GACT,MAAM,IAAI,SAAS,CAAC,mBAAmB;YACrC,CAAC,CAAC,MAAM,SAAS,CAAC,mBAAmB,CAAC,eAAe,CAAC,MAAM,CAAC;YAC7D,CAAC,CAAC,EAAE,CAAA;QACR,OAAO,CAAC,CAAC,IAAI,CAAC,oBAAoB,CAAC,qBAAqB,CAAC,KAAK,CAAC,EAAE,IAAI,EAAE,OAAO,CAAC,CAAC,CAAA;IAClF,CAAC,CAAC,CAAA;IAEF,OAAO,GAAG,CAAA;AACZ,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Hono } from 'hono';
|
|
2
|
+
import type { AppEnv } from '../../http/env.js';
|
|
3
|
+
/**
|
|
4
|
+
* Human-actionable notifications. `act` performs the notification's typed
|
|
5
|
+
* side-effect (merge the PR for a `merge_review` / `pipeline_complete`, retry the
|
|
6
|
+
* run for a `ci_failed` / `test_failed`) and then resolves it; `dismiss` just
|
|
7
|
+
* resolves it. The
|
|
8
|
+
* board patches its store from the `notification` WorkspaceEvent the service emits
|
|
9
|
+
* on resolve, but the responses also carry the updated notification.
|
|
10
|
+
* Mounted under `/workspaces/:workspaceId`.
|
|
11
|
+
*/
|
|
12
|
+
export declare function notificationController(): Hono<AppEnv>;
|
|
13
|
+
//# sourceMappingURL=NotificationController.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NotificationController.d.ts","sourceRoot":"","sources":["../../../src/modules/notifications/NotificationController.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAA;AAI3B,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAA;AAW/C;;;;;;;;GAQG;AACH,wBAAgB,sBAAsB,IAAI,IAAI,CAAC,MAAM,CAAC,CAsDrD"}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { Hono } from 'hono';
|
|
2
|
+
import { NotFoundError } from '@cat-factory/kernel';
|
|
3
|
+
import { param } from '../../http/params.js';
|
|
4
|
+
/** Resolve the notifications module or send a 503, returning null when unconfigured. */
|
|
5
|
+
function requireNotifications(c) {
|
|
6
|
+
return c.get('container').notifications ?? null;
|
|
7
|
+
}
|
|
8
|
+
const unavailable = (c) => c.json({ error: { code: 'unavailable', message: 'Notifications are not configured' } }, 503);
|
|
9
|
+
/**
|
|
10
|
+
* Human-actionable notifications. `act` performs the notification's typed
|
|
11
|
+
* side-effect (merge the PR for a `merge_review` / `pipeline_complete`, retry the
|
|
12
|
+
* run for a `ci_failed` / `test_failed`) and then resolves it; `dismiss` just
|
|
13
|
+
* resolves it. The
|
|
14
|
+
* board patches its store from the `notification` WorkspaceEvent the service emits
|
|
15
|
+
* on resolve, but the responses also carry the updated notification.
|
|
16
|
+
* Mounted under `/workspaces/:workspaceId`.
|
|
17
|
+
*/
|
|
18
|
+
export function notificationController() {
|
|
19
|
+
const app = new Hono();
|
|
20
|
+
// Open notifications for the board inbox (the snapshot also carries these).
|
|
21
|
+
app.get('/notifications', async (c) => {
|
|
22
|
+
const notifications = requireNotifications(c);
|
|
23
|
+
if (!notifications)
|
|
24
|
+
return unavailable(c);
|
|
25
|
+
return c.json(await notifications.service.listOpen(param(c, 'workspaceId')));
|
|
26
|
+
});
|
|
27
|
+
// Act on a notification: run its side-effect, then mark it acted.
|
|
28
|
+
app.post('/notifications/:notificationId/act', async (c) => {
|
|
29
|
+
const notifications = requireNotifications(c);
|
|
30
|
+
if (!notifications)
|
|
31
|
+
return unavailable(c);
|
|
32
|
+
const workspaceId = param(c, 'workspaceId');
|
|
33
|
+
const id = param(c, 'notificationId');
|
|
34
|
+
const notification = await notifications.service.get(workspaceId, id);
|
|
35
|
+
if (!notification)
|
|
36
|
+
throw new NotFoundError('Notification', id);
|
|
37
|
+
if (notification.status !== 'open')
|
|
38
|
+
return c.json(notification);
|
|
39
|
+
const container = c.get('container');
|
|
40
|
+
switch (notification.type) {
|
|
41
|
+
case 'merge_review':
|
|
42
|
+
case 'pipeline_complete':
|
|
43
|
+
// Confirm + merge the PR for real (block is `pr_ready` → `done`).
|
|
44
|
+
if (notification.blockId) {
|
|
45
|
+
await container.executionService.mergePr(workspaceId, notification.blockId);
|
|
46
|
+
}
|
|
47
|
+
break;
|
|
48
|
+
case 'ci_failed':
|
|
49
|
+
case 'test_failed':
|
|
50
|
+
// Re-run the failed pipeline once CI / the tests are presumably fixed.
|
|
51
|
+
if (notification.executionId) {
|
|
52
|
+
await container.executionService.retry(workspaceId, notification.executionId);
|
|
53
|
+
}
|
|
54
|
+
break;
|
|
55
|
+
}
|
|
56
|
+
return c.json(await notifications.service.resolve(workspaceId, id, 'act'));
|
|
57
|
+
});
|
|
58
|
+
// Dismiss a notification without acting on it.
|
|
59
|
+
app.post('/notifications/:notificationId/dismiss', async (c) => {
|
|
60
|
+
const notifications = requireNotifications(c);
|
|
61
|
+
if (!notifications)
|
|
62
|
+
return unavailable(c);
|
|
63
|
+
return c.json(await notifications.service.resolve(param(c, 'workspaceId'), param(c, 'notificationId'), 'dismiss'));
|
|
64
|
+
});
|
|
65
|
+
return app;
|
|
66
|
+
}
|
|
67
|
+
//# sourceMappingURL=NotificationController.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NotificationController.js","sourceRoot":"","sources":["../../../src/modules/notifications/NotificationController.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAA;AAG3B,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAA;AAEnD,OAAO,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAA;AAE5C,wFAAwF;AACxF,SAAS,oBAAoB,CAAC,CAAkB;IAC9C,OAAO,CAAC,CAAC,GAAG,CAAC,WAAW,CAAC,CAAC,aAAa,IAAI,IAAI,CAAA;AACjD,CAAC;AAED,MAAM,WAAW,GAAG,CAAC,CAA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{"version":3,"file":"PipelineController.d.ts","sourceRoot":"","sources":["../../../src/modules/pipelines/PipelineController.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAA;AAC3B,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAA;AAI/C,uEAAuE;AACvE,wBAAgB,kBAAkB,IAAI,IAAI,CAAC,MAAM,CAAC,CAkDjD"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { clonePipelineSchema, createPipelineSchema, organizePipelineSchema, updatePipelineSchema, } from '@cat-factory/contracts';
|
|
2
|
+
import { Hono } from 'hono';
|
|
3
|
+
import { param } from '../../http/params.js';
|
|
4
|
+
import { jsonBody } from '../../http/validation.js';
|
|
5
|
+
/** Pipeline palette CRUD. Mounted under `/workspaces/:workspaceId`. */
|
|
6
|
+
export function pipelineController() {
|
|
7
|
+
const app = new Hono();
|
|
8
|
+
app.get('/pipelines', async (c) => {
|
|
9
|
+
return c.json(await c.get('container').pipelineService.list(param(c, 'workspaceId')));
|
|
10
|
+
});
|
|
11
|
+
app.post('/pipelines', jsonBody(createPipelineSchema), async (c) => {
|
|
12
|
+
const pipeline = await c
|
|
13
|
+
.get('container')
|
|
14
|
+
.pipelineService.create(param(c, 'workspaceId'), c.req.valid('json'));
|
|
15
|
+
return c.json(pipeline, 201);
|
|
16
|
+
});
|
|
17
|
+
// Clone any pipeline (built-in or custom) into a new, editable copy.
|
|
18
|
+
app.post('/pipelines/:pipelineId/clone', jsonBody(clonePipelineSchema), async (c) => {
|
|
19
|
+
const pipeline = await c
|
|
20
|
+
.get('container')
|
|
21
|
+
.pipelineService.clone(param(c, 'workspaceId'), param(c, 'pipelineId'), c.req.valid('json'));
|
|
22
|
+
return c.json(pipeline, 201);
|
|
23
|
+
});
|
|
24
|
+
// Edit a custom pipeline in place. Built-in pipelines reject this (clone first).
|
|
25
|
+
app.patch('/pipelines/:pipelineId', jsonBody(updatePipelineSchema), async (c) => {
|
|
26
|
+
const pipeline = await c
|
|
27
|
+
.get('container')
|
|
28
|
+
.pipelineService.update(param(c, 'workspaceId'), param(c, 'pipelineId'), c.req.valid('json'));
|
|
29
|
+
return c.json(pipeline);
|
|
30
|
+
});
|
|
31
|
+
// Organize a pipeline in the library: set labels / archive state. The only mutation
|
|
32
|
+
// allowed on a built-in pipeline (view metadata, not structure), so built-ins reject
|
|
33
|
+
// `update`/`delete` but accept this.
|
|
34
|
+
app.patch('/pipelines/:pipelineId/organize', jsonBody(organizePipelineSchema), async (c) => {
|
|
35
|
+
const pipeline = await c
|
|
36
|
+
.get('container')
|
|
37
|
+
.pipelineService.organize(param(c, 'workspaceId'), param(c, 'pipelineId'), c.req.valid('json'));
|
|
38
|
+
return c.json(pipeline);
|
|
39
|
+
});
|
|
40
|
+
app.delete('/pipelines/:pipelineId', async (c) => {
|
|
41
|
+
await c.get('container').pipelineService.remove(param(c, 'workspaceId'), param(c, 'pipelineId'));
|
|
42
|
+
return c.body(null, 204);
|
|
43
|
+
});
|
|
44
|
+
return app;
|
|
45
|
+
}
|
|
46
|
+
//# sourceMappingURL=PipelineController.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PipelineController.js","sourceRoot":"","sources":["../../../src/modules/pipelines/PipelineController.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,mBAAmB,EACnB,oBAAoB,EACpB,sBAAsB,EACtB,oBAAoB,GACrB,MAAM,wBAAwB,CAAA;AAC/B,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAA;AAE3B,OAAO,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAA;AAC5C,OAAO,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAA;AAEnD,uEAAuE;AACvE,MAAM,UAAU,kBAAkB;IAChC,MAAM,GAAG,GAAG,IAAI,IAAI,EAAU,CAAA;IAE9B,GAAG,CAAC,GAAG,CAAC,YAAY,EAAE,KAAK,EAAE,CAAC,EAAE,EAAE;QAChC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ompt fragment pool read-only — the
|
|
5
|
+
* build-static catalog (compiled into the facade from @cat-factory/prompt-fragments)
|
|
6
|
+
* plus any fragments a deployment registered at startup. It is workspace-independent,
|
|
7
|
+
* so it lives outside the workspace-scoped API and is cacheable. The frontend fetches
|
|
8
|
+
* it once to populate the per-service and per-block pickers.
|
|
9
|
+
*/
|
|
10
|
+
export declare function promptFragmentController(): Hono<AppEnv>;
|
|
11
|
+
//# sourceMappingURL=PromptFragmentController.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PromptFragmentController.d.ts","sourceRoot":"","sources":["../../../src/modules/promptFragments/PromptFragmentController.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAA;AAC3B,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAA;AAE/C;;;;;;GAMG;AACH,wBAAgB,wBAAwB,IAAI,IAAI,CAAC,MAAM,CAAC,CASvD"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { universalFragments } from '@cat-factory/prompt-fragments';
|
|
2
|
+
import { Hono } from 'hono';
|
|
3
|
+
/**
|
|
4
|
+
* Serves the universal best-practice prompt fragment pool read-only — the
|
|
5
|
+
* build-static catalog (compiled into the facade from @cat-factory/prompt-fragments)
|
|
6
|
+
* plus any fragments a deployment registered at startup. It is workspace-independent,
|
|
7
|
+
* so it lives outside the workspace-scoped API and is cacheable. The frontend fetches
|
|
8
|
+
* it once to populate the per-service and per-block pickers.
|
|
9
|
+
*/
|
|
10
|
+
export function promptFragmentController() {
|
|
11
|
+
const app = new Hono();
|
|
12
|
+
app.get('/prompt-fragments', (c) => {
|
|
13
|
+
c.header('Cache-Control', 'public, max-age=3600');
|
|
14
|
+
return c.json(universalFragments());
|
|
15
|
+
});
|
|
16
|
+
return app;
|
|
17
|
+
}
|
|
18
|
+
//# sourceMappingURL=PromptFragmentController.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PromptFragmentController.js","sourceRoot":"","sources":["../../../src/modules/promptFragments/PromptFragmentController.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,+BAA+B,CAAA;AAClE,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAA;AAG3B;;;;;;GAMG;AACH,MAAM,UAAU,wBAAwB;IACtC,MAAM,GAAG,GAAG,IAAI,IAAI,EAAU,CAAA;IAE9B,GAAG,CAAC,GAAG,CAAC,mBAAmB,EAAE,CAAC,CAAC,EAAE,EAAE;QACjC,CAAC,CAAC,MAAM,CAAC,eAAe,EAAE,sBAAsB,CAAC,CAAA;QACjD,OAAO,CAAC,CAAC,IAAI,CAAC,kBAAkB,EAAE,CAAC,CAAA;IACrC,CAAC,CAAC,CAAA;IAEF,OAAO,GAAG,CAAA;AACZ,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { type ApiKey } from '@cat-factory/contracts';
|
|
2
|
+
import type { ApiKeySummary } from '@cat-factory/integrations';
|
|
3
|
+
import { Hono } from 'hono';
|
|
4
|
+
import type { AppEnv } from '../../http/env.js';
|
|
5
|
+
/** Project the service summary onto the wire type (already secret-free). */
|
|
6
|
+
export declare function apiKeyToWire(summary: ApiKeySummary): ApiKey;
|
|
7
|
+
/** Workspace-scoped API-key routes, mounted under `/workspaces/:workspaceId`. */
|
|
8
|
+
export declare function workspaceApiKeyController(): Hono<AppEnv>;
|
|
9
|
+
/** User-scoped API-key routes (the caller's own pool), mounted at the root. */
|
|
10
|
+
export declare function userApiKeyController(): Hono<AppEnv>;
|
|
11
|
+
/** Parse a provider id from a query/path value, or undefined when absent/invalid. */
|
|
12
|
+
export declare function parseApiKeyProvider(value: string | undefined): "anthropic" | "deepseek" | "litellm" | "moonshot" | "openai" | "openrouter" | "qwen" | undefined;
|
|
13
|
+
//# sourceMappingURL=ApiKeyController.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ApiKeyController.d.ts","sourceRoot":"","sources":["../../../src/modules/providers/ApiKeyController.ts"],"names":[],"mappings":"AAAA,OAAO,EAAyC,KAAK,MAAM,EAAE,MAAM,wBAAwB,CAAA;AAC3F,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAA;AAE9D,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAA;AAE3B,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAA;AAkB/C,4EAA4E;AAC5E,wBAAgB,YAAY,CAAC,OAAO,EAAE,aAAa,GAAG,MAAM,CAa3D;AAED,iFAAiF;AACjF,wBAAgB,yBAAyB,IAAI,IAAI,CAAC,MAAM,CAAC,CAyBxD;AAED,+EAA+E;AAC/E,wBAAgB,oBAAoB,IAAI,IAAI,CAAC,MAAM,CAAC,CA+BnD;AAED,qFAAqF;AACrF,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,MAAM,GAAG,SAAS,oGAI5D"}
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
import { addApiKeySchema, apiKeyProviderSchema } from '@cat-factory/contracts';
|
|
2
|
+
import * as v from 'valibot';
|
|
3
|
+
import { Hono } from 'hono';
|
|
4
|
+
import { param } from '../../http/params.js';
|
|
5
|
+
import { jsonBody } from '../../http/validation.js';
|
|
6
|
+
// Direct-provider API-key endpoints. Keys (OpenAI/Anthropic/Qwen/DeepSeek/Moonshot)
|
|
7
|
+
// are onboarded here and stored encrypted, replacing deployment-env onboarding. The
|
|
8
|
+
// raw key is write-only — only metadata + rolling-window usage is ever returned.
|
|
9
|
+
//
|
|
10
|
+
// This controller mounts the WORKSPACE-scoped routes (under `/workspaces/:workspaceId`)
|
|
11
|
+
// and the USER-scoped routes (`/me/api-keys`, the caller's own pool). ACCOUNT-scoped
|
|
12
|
+
// keys are managed by the AccountController, which admin-gates them.
|
|
13
|
+
const unavailable = (c) => c.json({ error: { code: 'unavailable', message: 'API key storage is not configured' } }, 503);
|
|
14
|
+
const signInRequired = (c) => c.json({ error: { code: 'unauthorized', message: 'Sign in to manage your API keys' } }, 401);
|
|
15
|
+
/** Project the service summary onto the wire type (already secret-free). */
|
|
16
|
+
export function apiKeyToWire(summary) {
|
|
17
|
+
return {
|
|
18
|
+
id: summary.id,
|
|
19
|
+
scope: summary.scope,
|
|
20
|
+
scopeId: summary.scopeId,
|
|
21
|
+
provider: summary.provider,
|
|
22
|
+
label: summary.label,
|
|
23
|
+
createdAt: summary.createdAt,
|
|
24
|
+
lastUsedAt: summary.lastUsedAt,
|
|
25
|
+
inputTokens: summary.inputTokens,
|
|
26
|
+
outputTokens: summary.outputTokens,
|
|
27
|
+
requestCount: summary.requestCount,
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
/** Workspace-scoped API-key routes, mounted under `/workspaces/:workspaceId`. */
|
|
31
|
+
export function workspaceApiKeyController() {
|
|
32
|
+
const app = new Hono();
|
|
33
|
+
app.get('/api-keys', async (c) => {
|
|
34
|
+
const apiKeys = c.get('container').apiKeys;
|
|
35
|
+
if (!apiKeys)
|
|
36
|
+
return unavailable(c);
|
|
37
|
+
const keys = await apiKeys.listKeys('workspace', param(c, 'workspaceId'));
|
|
38
|
+
return c.json({ keys: keys.map(apiKeyToWire) });
|
|
39
|
+
});
|
|
40
|
+
app.post('/api-keys', jsonBody(addApiKeySchema), async (c) => {
|
|
41
|
+
const apiKeys = c.get('container').apiKeys;
|
|
42
|
+
if (!apiKeys)
|
|
43
|
+
return unavailable(c);
|
|
44
|
+
const summary = await apiKeys.addKey('workspace', param(c, 'workspaceId'), c.req.valid('json'));
|
|
45
|
+
return c.json(apiKeyToWire(summary), 201);
|
|
46
|
+
});
|
|
47
|
+
app.delete('/api-keys/:id', async (c) => {
|
|
48
|
+
const apiKeys = c.get('container').apiKeys;
|
|
49
|
+
if (!apiKeys)
|
|
50
|
+
return unavailable(c);
|
|
51
|
+
await apiKeys.removeKey('workspace', param(c, 'workspaceId'), param(c, 'id'));
|
|
52
|
+
return c.body(null, 204);
|
|
53
|
+
});
|
|
54
|
+
return app;
|
|
55
|
+
}
|
|
56
|
+
/** User-scoped API-key routes (the caller's own pool), mounted at the root. */
|
|
57
|
+
export function userApiKeyController() {
|
|
58
|
+
const app = new Hono();
|
|
59
|
+
app.get('/me/api-keys', async (c) => {
|
|
60
|
+
const apiKeys = c.get('container').apiKeys;
|
|
61
|
+
if (!apiKeys)
|
|
62
|
+
return unavailable(c);
|
|
63
|
+
const user = c.get('user');
|
|
64
|
+
if (!user)
|
|
65
|
+
return signInRequired(c);
|
|
66
|
+
const keys = await apiKeys.listKeys('user', user.id);
|
|
67
|
+
return c.json({ keys: keys.map(apiKeyToWire) });
|
|
68
|
+
});
|
|
69
|
+
app.post('/me/api-keys', jsonBody(addApiKeySchema), async (c) => {
|
|
70
|
+
const apiKeys = c.get('container').apiKeys;
|
|
71
|
+
if (!apiKeys)
|
|
72
|
+
return unavailable(c);
|
|
73
|
+
const user = c.get('user');
|
|
74
|
+
if (!user)
|
|
75
|
+
return signInRequired(c);
|
|
76
|
+
const summary = await apiKeys.addKey('user', user.id, c.req.valid('json'));
|
|
77
|
+
return c.json(apiKeyToWire(summary), 201);
|
|
78
|
+
});
|
|
79
|
+
app.delete('/me/api-keys/:id', async (c) => {
|
|
80
|
+
const apiKeys = c.get('container').apiKeys;
|
|
81
|
+
if (!apiKeys)
|
|
82
|
+
return unavailable(c);
|
|
83
|
+
const user = c.get('user');
|
|
84
|
+
if (!user)
|
|
85
|
+
return signInRequired(c);
|
|
86
|
+
await apiKeys.removeKey('user', user.id, param(c, 'id'));
|
|
87
|
+
return c.body(null, 204);
|
|
88
|
+
});
|
|
89
|
+
return app;
|
|
90
|
+
}
|
|
91
|
+
/** Parse a provider id from a query/path value, or undefined when absent/invalid. */
|
|
92
|
+
export function parseApiKeyProvider(value) {
|
|
93
|
+
if (!value)
|
|
94
|
+
return undefined;
|
|
95
|
+
const parsed = v.safeParse(apiKeyProviderSchema, value);
|
|
96
|
+
return parsed.success ? parsed.output : undefined;
|
|
97
|
+
}
|
|
98
|
+
//# sourceMappingURL=ApiKeyController.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ApiKeyController.js","sourceRoot":"","sources":["../../../src/modules/providers/ApiKeyController.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,oBAAoB,EAAe,MAAM,wBAAwB,CAAA;AAE3F,OAAO,KAAK,CAAC,MAAM,SAAS,CAAA;AAC5B,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAA;AAG3B,OAAO,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAA;AAC5C,OAAO,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAA;AAEnD,oFAAoF;AACpF,oFAAoF;AACpF,iFAAiF;AACjF,EAAE;AACF,wFAAwF;AACxF,qFAAqF;AACrF,qEAAqE;AAErE,MAAM,WAAW,GAAG,CAAC,CAAkB,EAAE,EAAE,CACzC,CAAC,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,EAAE,IAAI,EAAE,aAAa,EAAE,OAAO,EAAE,mCAAmC,EAAE,EAAE,EAAE,GAAG,CAAC,CAAA;AAE/F,MAAM,cAAc,GAAG,CAAC,CAAkB,EAAE,EAAE,CAC5C,CAAC,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,EAAE,IAAI,EAAE,cAAc,EAAE,OAAO,EAAE,iCAAiC,EAAE,EAAE,EAAE,GAAG,CAAC,CAAA;AAE9F,4EAA4E;AAC5E,MAAM,UAAU,YAAY,CAAC,OAAsB;IACjD,OAAO;QACL,EAAE,EAAE,OAAO,CAAC,EAAE;QACd,KAAK,EAAE,OAAO,CAAC,KAAK;QACpB,OAAO,EAAE,OAAO,CAAC,OAAO;QACxB,QAAQ,EAAE,OAAO,CAAC,QAAQ;QAC1B,KAAK,EAAE,OAAO,CAAC,KAAK;QACpB,SAAS,EAAE,OAAO,CAAC,SAAS;QAC5B,UAAU,EAAE,OAAO,CAA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AAC,KAAK;QAAE,OAAO,SAAS,CAAA;IAC5B,MAAM,MAAM,GAAG,CAAC,CAAC,SAAS,CAAC,oBAAoB,EAAE,KAAK,CAAC,CAAA;IACvD,OAAO,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,SAAS,CAAA;AACnD,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PersonalSubscriptionController.d.ts","sourceRoot":"","sources":["../../../src/modules/providers/PersonalSubscriptionController.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAA;AAE3B,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAA;AAuB/C,wBAAgB,8BAA8B,IAAI,IAAI,CAAC,MAAM,CAAC,CA+B7D"}
|