@cat-factory/node-server 0.112.0 → 0.113.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.
@@ -0,0 +1,82 @@
1
+ import { type GitHubInstallationRepository } from '@cat-factory/kernel';
2
+ import { type CoreDependencies } from '@cat-factory/orchestration';
3
+ import { type AppConfig, resolveUrlSafetyPolicy } from '@cat-factory/server';
4
+ import type { DrizzleDb } from './db/client.js';
5
+ import { createNodeGateways } from './gateways.js';
6
+ import { createDrizzleRepositories } from './repositories/drizzle.js';
7
+ import type { NodeAppRegistriesResult } from './container-foundation.js';
8
+ import type { NodeContainerOptions, NodeModelDepsResult, NodeTransportDeployResult, NodeRunServicesResult, NodeGitHubDepsResult, NodeBootstrapperResult, NodeRealtimeDepsResult, NodeAccountDepsResult } from './container.js';
9
+ /**
10
+ * The engine {@link CoreDependencies} assembly for the Node facade, carved out of the
11
+ * `container.ts` composition root so neither the bundle contract nor the (large) dependency
12
+ * literal keeps that god-file — or its own function — over budget
13
+ * (docs/initiatives/lint-complexity-size-ratchet.md). Behaviour-neutral: the literal is split
14
+ * along a persistence/services seam into two builders whose spreads are concatenated in the
15
+ * SAME order, so later keys still override earlier ones exactly as when it was one literal.
16
+ */
17
+ /**
18
+ * The intermediate values {@link buildNodeContainer} builds before it assembles the engine
19
+ * {@link CoreDependencies}: the resolved config/options, the shared Drizzle repo set + the
20
+ * mothership-aware `sourced` picker, and every build*Deps / select*Deps fragment.
21
+ * Bundled so {@link assembleNodeCoreDependencies} can own the large `dependencies` object
22
+ * literal (a size-only split — behaviour is identical), keeping the composition root within the
23
+ * function-size budget.
24
+ */
25
+ export interface NodeCoreDepsBundle {
26
+ config: AppConfig;
27
+ options: NodeContainerOptions;
28
+ env: NodeJS.ProcessEnv;
29
+ db: DrizzleDb;
30
+ repos: ReturnType<typeof createDrizzleRepositories>;
31
+ sourced: <T>(name: string, build: (d: DrizzleDb) => T) => T;
32
+ idGenerator: CoreDependencies['idGenerator'];
33
+ clock: CoreDependencies['clock'];
34
+ gateways: ReturnType<typeof createNodeGateways>;
35
+ runnerUrlPolicy: ReturnType<typeof resolveUrlSafetyPolicy>;
36
+ githubInstallationRepository: GitHubInstallationRepository;
37
+ environmentBackendRegistry: NodeAppRegistriesResult['environmentBackendRegistry'];
38
+ runnerBackendRegistry: NodeAppRegistriesResult['runnerBackendRegistry'];
39
+ customManifestTypeRegistry: NodeAppRegistriesResult['customManifestTypeRegistry'];
40
+ agentKindRegistry: NodeAppRegistriesResult['agentKindRegistry'];
41
+ gateRegistry: NodeAppRegistriesResult['gateRegistry'];
42
+ stepResolverRegistry: NodeAppRegistriesResult['stepResolverRegistry'];
43
+ initiativePresetRegistry: NodeAppRegistriesResult['initiativePresetRegistry'];
44
+ providerRegistry: NodeAppRegistriesResult['providerRegistry'];
45
+ apiKeys: NodeModelDepsResult['apiKeys'];
46
+ subscriptions: NodeModelDepsResult['subscriptions'];
47
+ personalSubscriptions: NodeModelDepsResult['personalSubscriptions'];
48
+ localModelEndpoints: NodeModelDepsResult['localModelEndpoints'];
49
+ openRouterCatalog: NodeModelDepsResult['openRouterCatalog'];
50
+ modelProviderResolver: NodeModelDepsResult['modelProviderResolver'];
51
+ cloudflareModelsEnabled: NodeModelDepsResult['cloudflareModelsEnabled'];
52
+ deployDeps: NodeTransportDeployResult['deployDeps'];
53
+ runnerPoolConnectionRepository: CoreDependencies['runnerPoolConnectionRepository'];
54
+ agentContextObservability: NodeRunServicesResult['agentContextObservability'];
55
+ searchQueryObservability: NodeRunServicesResult['searchQueryObservability'];
56
+ resolveTestSecretRefs: NodeRunServicesResult['resolveTestSecretRefs'];
57
+ githubClient: NodeGitHubDepsResult['githubClient'];
58
+ tasks: NodeGitHubDepsResult['tasks'];
59
+ fileGitHubIssue: NodeGitHubDepsResult['fileGitHubIssue'];
60
+ issueWritebackProvider: NodeGitHubDepsResult['issueWritebackProvider'];
61
+ githubGateDeps: NodeGitHubDepsResult['githubGateDeps'];
62
+ githubModuleDeps: NodeGitHubDepsResult['githubModuleDeps'];
63
+ bootstrapJobRepository: NodeBootstrapperResult['bootstrapJobRepository'];
64
+ repoBootstrapper: NodeBootstrapperResult['repoBootstrapper'];
65
+ slackDeps: NodeRealtimeDepsResult['slackDeps'];
66
+ executionEventPublisher: NodeRealtimeDepsResult['executionEventPublisher'];
67
+ agentExecutor: NodeRealtimeDepsResult['agentExecutor'];
68
+ notificationChannel: NodeRealtimeDepsResult['notificationChannel'];
69
+ releaseHealthDeps: NodeAccountDepsResult['releaseHealthDeps'];
70
+ packageRegistryDeps: NodeAccountDepsResult['packageRegistryDeps'];
71
+ incidentEnrichmentDeps: NodeAccountDepsResult['incidentEnrichmentDeps'];
72
+ accountSettings: NodeAccountDepsResult['accountSettings'];
73
+ resolveBinaryArtifactStore: NodeAccountDepsResult['resolveBinaryArtifactStore'];
74
+ }
75
+ /**
76
+ * Assemble the engine {@link CoreDependencies} from the {@link NodeCoreDepsBundle} the composition
77
+ * root built. The object is split across two builders purely for the function-size ratchet — they
78
+ * are spread in declaration order, so the resulting object is identical to the former single
79
+ * literal (later spreads still override earlier ones).
80
+ */
81
+ export declare function assembleNodeCoreDependencies(bundle: NodeCoreDepsBundle): CoreDependencies;
82
+ //# sourceMappingURL=container-core-deps.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"container-core-deps.d.ts","sourceRoot":"","sources":["../src/container-core-deps.ts"],"names":[],"mappings":"AAiBA,OAAO,EAIL,KAAK,4BAA4B,EAGlC,MAAM,qBAAqB,CAAA;AAC5B,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,4BAA4B,CAAA;AAClE,OAAO,EACL,KAAK,SAAS,EAKd,sBAAsB,EAEvB,MAAM,qBAAqB,CAAA;AAI5B,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAA;AAM/C,OAAO,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAA;AAGlD,OAAO,EAAE,yBAAyB,EAA4B,MAA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uB,EAAE,sBAAsB,CAAC,yBAAyB,CAAC,CAAA;IAC1E,aAAa,EAAE,sBAAsB,CAAC,eAAe,CAAC,CAAA;IACtD,mBAAmB,EAAE,sBAAsB,CAAC,qBAAqB,CAAC,CAAA;IAClE,iBAAiB,EAAE,qBAAqB,CAAC,mBAAmB,CAAC,CAAA;IAC7D,mBAAmB,EAAE,qBAAqB,CAAC,qBAAqB,CAAC,CAAA;IACjE,sBAAsB,EAAE,qBAAqB,CAAC,wBAAwB,CAAC,CAAA;IACvE,eAAe,EAAE,qBAAqB,CAAC,iBAAiB,CAAC,CAAA;IACzD,0BAA0B,EAAE,qBAAqB,CAAC,4BAA4B,CAAC,CAAA;CAChF;AAED;;;;;GAKG;AACH,wBAAgB,4BAA4B,CAAC,MAAM,EAAE,kBAAkB,GAAG,gBAAgB,CAEzF"}
@@ -0,0 +1,470 @@
1
+ // Opt-in AWS EKS backends (runner + environment), registered by reference below (the Worker
2
+ // facade registers the same pair, keeping the runtimes symmetric with the native `kubernetes`
3
+ // backend these extend). They are pass-throughs until a workspace actually connects an `eks`
4
+ // backend, and carry NO runtime AWS SDK dependency (the token is minted with WebCrypto), so this
5
+ // adds no cost to a deployment that never uses EKS.
6
+ import { ConfluenceProvider, FigmaProvider, ZeplinProvider, GitHubDocsProvider, LinearDocumentProvider, HttpRunnerPoolProvider, NotionProvider, EMAIL_CIPHER_INFO, createEmailSender, TicketTrackerService, } from '@cat-factory/integrations';
7
+ import { DEFAULT_MODEL_PRESET_ID, } from '@cat-factory/kernel';
8
+ import {} from '@cat-factory/orchestration';
9
+ import { runWithInitiator, WebCryptoPasswordHasher, WebCryptoSecretCipher, logger, resolveUrlSafetyPolicy, resolveWorkspaceCapabilities, } from '@cat-factory/server';
10
+ import { executionRuntime } from './execution/config.js';
11
+ import { PgBossBootstrapRunner } from './execution/bootstrapRunner.js';
12
+ import { PgBossEnvConfigRepairRunner } from './execution/envConfigRepairRunner.js';
13
+ import { PgBossEnvironmentTestRunner } from './execution/envTestRunner.js';
14
+ import { PgBossWorkRunner } from './execution/pgBossRunner.js';
15
+ import { createNodeGateways } from './gateways.js';
16
+ import { baseUrlForNode } from './modelProvider.js';
17
+ import { DrizzleSubscriptionActivationRepository } from './repositories/personalSubscription.js';
18
+ import { createDrizzleRepositories, createDrizzleSandboxDeps } from './repositories/drizzle.js';
19
+ import { DrizzleReferenceArchitectureRepository } from './repositories/bootstrap.js';
20
+ import { DrizzleEnvConfigRepairJobRepository } from './repositories/envConfigRepair.js';
21
+ import { DrizzleEnvironmentTestRunRepository } from './repositories/environmentTest.js';
22
+ import { DrizzleDocumentConnectionRepository, DrizzleDocumentRepository, } from './repositories/documents.js';
23
+ import { DrizzleEnvironmentConnectionRepository, DrizzleEnvironmentRegistryRepository, } from './repositories/environments.js';
24
+ import { DrizzleCustomManifestTypeRepository } from './repositories/customManifestType.js';
25
+ import { DrizzleNotificationRepository } from './repositories/notifications.js';
26
+ import { selectNodeFragmentLibraryDeps, selectNodeSkillLibraryDeps, } from './container-content-library-deps.js';
27
+ // The container-agent-executor wiring (transport resolver, provisioning-log wrapper, container
28
+ // executor + bootstrapper + env-config repairer, GitHub-issue filer, trace-sink builder), lifted
29
+ // into a sibling module so this composition root stays within the file-size budget.
30
+ import { RUNNERS_CIPHER_INFO, buildTraceSink } from './container-executor-deps.js';
31
+ /**
32
+ * Assemble the engine {@link CoreDependencies} from the {@link NodeCoreDepsBundle} the composition
33
+ * root built. The object is split across two builders purely for the function-size ratchet — they
34
+ * are spread in declaration order, so the resulting object is identical to the former single
35
+ * literal (later spreads still override earlier ones).
36
+ */
37
+ export function assembleNodeCoreDependencies(bundle) {
38
+ return { ...buildNodeStoreDeps(bundle), ...buildNodeServiceDeps(bundle) };
39
+ }
40
+ /**
41
+ * The first half of the dependency literal: the app-owned registries, every persisted
42
+ * repository the engine reads, and the module fragments that carry their own stores
43
+ * (release-health / incident-enrichment / package-registry / tasks).
44
+ */
45
+ function buildNodeStoreDeps(bundle) {
46
+ const { config, options, db, repos, sourced, environmentBackendRegistry, runnerBackendRegistry, customManifestTypeRegistry, agentKindRegistry, gateRegistry, stepResolverRegistry, initiativePresetRegistry, providerRegistry, modelProviderResolver, agentContextObservability, searchQueryObservability, resolveTestSecretRefs, tasks, fileGitHubIssue, releaseHealthDeps, packageRegistryDeps, incidentEnrichmentDeps, accountSettings, resolveBinaryArtifactStore, } = bundle;
47
+ return {
48
+ ...releaseHealthDeps,
49
+ ...incidentEnrichmentDeps,
50
+ ...packageRegistryDeps,
51
+ // Fold the service frame's SENSITIVE test-credential refs (key + description, never values)
52
+ // into the tester prompt. Present when ENCRYPTION_KEY is set; absent ⇒ no advertised secrets.
53
+ ...(resolveTestSecretRefs ? { resolveTestSecretRefs } : {}),
54
+ // App-owned backend registries (kind → provider) the connection services resolve through.
55
+ environmentBackendRegistry,
56
+ runnerBackendRegistry,
57
+ // The app-owned agent-kind registry (built-ins + any deployment-registered kinds); the
58
+ // engine reads it (traits / inline-surface / pre-post-op hooks) and re-exposes it on Core.
59
+ agentKindRegistry,
60
+ // The app-owned gate + step-resolver registries; the engine's gate machine + completion hub
61
+ // read them, and the gate registry is re-exposed on Core for the boot-time validation.
62
+ gateRegistry,
63
+ stepResolverRegistry,
64
+ // The app-owned provider registry the gate providers were wired onto above; the engine's gate
65
+ // machine reads the SAME instance through its GateContext.
66
+ providerRegistry,
67
+ // The app-owned pipeline registry (deployment-registered extra pipelines); createCore threads
68
+ // it into the workspace + pipeline services and re-exposes it on Core for boot-time validation.
69
+ pipelineRegistry: options.pipelineRegistry,
70
+ // The app-owned custom task-type registry (deployment-registered namespaced task types);
71
+ // createCore threads it into the board service (default-pipeline resolution) and re-exposes it
72
+ // on Core for the snapshot projection (`customTaskTypes`) + boot-time validation.
73
+ taskTypeRegistry: options.taskTypeRegistry,
74
+ // The app-owned initiative-preset registry; the initiative services read it and it is
75
+ // re-exposed on Core for the snapshot descriptors + preset probe.
76
+ initiativePresetRegistry,
77
+ // The code-defined custom provision-type catalog, merged with the workspace rows by
78
+ // `listCustomTypes` so a programmatically-registered type surfaces in the infra editor + the
79
+ // per-service provisioning picker.
80
+ customManifestTypeRegistry,
81
+ ...(accountSettings ? { accountSettings } : {}),
82
+ // Resolves the per-account binary-artifact store (screenshots) for the visual-confirmation
83
+ // gate; resolving to null (no storage configured) ⇒ the gate passes through.
84
+ resolveBinaryArtifactStore,
85
+ workspaceRepository: repos.workspaceRepository,
86
+ workspaceMemberRepository: repos.workspaceMemberRepository,
87
+ accountRepository: repos.accountRepository,
88
+ membershipRepository: repos.membershipRepository,
89
+ userRepository: repos.userRepository,
90
+ passwordHasher: new WebCryptoPasswordHasher(),
91
+ blockRepository: repos.blockRepository,
92
+ pipelineRepository: repos.pipelineRepository,
93
+ executionRepository: repos.executionRepository,
94
+ // Clear a finished run's personal-credential activation promptly (TTL sweep is the backstop).
95
+ // In mothership mode its home is the LOCAL `node:sqlite` credential bucket (the activation
96
+ // re-seals the token for the run, and the LOCAL container executor decrypts it), injected via
97
+ // `options.subscriptionActivationRepository` — the SAME instance the personal-subscription
98
+ // service above mints into, so mint + clear agree. Absent (plain Node / siloed-Postgres local)
99
+ // → the Drizzle repo over `db`. This is NEVER routed through `sourced` (the remote registry):
100
+ // every no-db (mothership) caller injects the override — `buildLocalContainer` in production
101
+ // and `makeMothershipConformanceApp` in tests — so `db` here is always a real Postgres handle,
102
+ // and routing an activation clear to the mothership (where `deleteByExecution` isn't
103
+ // allow-listed) is a path no caller takes.
104
+ subscriptionActivationRepository: options.subscriptionActivationRepository ?? new DrizzleSubscriptionActivationRepository(db),
105
+ // In-org shared services. When a realtime hub is wired (start()), the engine's
106
+ // event publisher (composed above) is a `FanOutEventPublisher` over these two repos,
107
+ // so a shared service's live events reach every board that mounts it — parity with
108
+ // the Cloudflare facade. Without a hub (createServer/tests) the engine uses its
109
+ // NoopEventPublisher and nothing is pushed.
110
+ serviceRepository: repos.serviceRepository,
111
+ workspaceMountRepository: repos.workspaceMountRepository,
112
+ tokenUsageRepository: repos.tokenUsageRepository,
113
+ llmCallMetricRepository: repos.llmCallMetricRepository,
114
+ // Deployment-level rollups over `agent_runs` for the operator dashboard.
115
+ platformMetricsRepository: repos.platformMetricsRepository,
116
+ // Unified provisioning event log (its own Postgres schema). Threads the recorder
117
+ // into the env services and exposes the read service for the logs controller.
118
+ provisioningLogRepository: repos.provisioningLogRepository,
119
+ recordLlmPrompts: config.observability.recordPrompts,
120
+ // Re-exposed on the core for the agent-context read endpoint; the same instance
121
+ // is injected into the container executor above for the write path.
122
+ agentContextObservability,
123
+ // Re-exposed on the core for the search-query read endpoint AND the search proxy's
124
+ // write path (it reads it off the request container).
125
+ searchQueryObservability,
126
+ // Opt-in external trace sink(s) — Langfuse and/or OpenTelemetry — fanning every
127
+ // recorded LLM call out as a generation. Built only when configured; otherwise
128
+ // undefined and there is no external emission.
129
+ llmTraceSink: buildTraceSink(config),
130
+ modelPresetRepository: repos.modelPresetRepository,
131
+ // A fresh workspace's model-preset library is seeded with this built-in as the default
132
+ // (Node deploy → Kimi K2.7, the Cloudflare-runnable baseline; the local facade injects
133
+ // Claude). Applied only at first seed, so a user's later manual default choice wins.
134
+ defaultModelPresetId: options.defaultModelPresetId ?? DEFAULT_MODEL_PRESET_ID,
135
+ serviceFragmentDefaultsRepository: repos.serviceFragmentDefaultsRepository,
136
+ // Requirements-review feature (stateless reviewer + the requirements-rework
137
+ // step). Wired identically to the Cloudflare facade's `selectRequirementsDeps`
138
+ // so both runtimes serve the review/rework API AND substitute a block's reworked
139
+ // requirements into the agent context (the cross-runtime conformance suite asserts
140
+ // the substitution against both stores). The reviewer's model resolves exactly
141
+ // like a pipeline step: block-pin > workspace per-kind default > routing default
142
+ // (which falls back to Cloudflare Workers AI unless a direct key is set).
143
+ requirementReviewRepository: repos.requirementReviewRepository,
144
+ // Interactive document-interview sessions (WS5). Wired unconditionally; the interviewer
145
+ // reuses the requirements reviewer's model config resolved just below.
146
+ docInterviewRepository: repos.docInterviewRepository,
147
+ // Kaizen agent (post-run grading). Wired unconditionally, mirroring the Cloudflare
148
+ // facade, so the engine schedules gradings at run completion and the background sweep
149
+ // runs them. The grader resolves its model for the `kaizen` kind exactly like a step.
150
+ kaizenGradingRepository: repos.kaizenGradingRepository,
151
+ kaizenVerifiedComboRepository: repos.kaizenVerifiedComboRepository,
152
+ clarityReviewRepository: repos.clarityReviewRepository,
153
+ brainstormSessionRepository: repos.brainstormSessionRepository,
154
+ // Initiatives (the long-running multi-task work container). Wired unconditionally,
155
+ // mirroring the Worker's `selectMergeLifecycleDeps`, so the create/read API + the
156
+ // planning pipeline's ingest/committer steps work identically on both runtimes.
157
+ initiativeRepository: repos.initiativeRepository,
158
+ // Merge threshold presets: the per-workspace auto-merge ceiling library a task's
159
+ // merge gate resolves (block-pinned preset > workspace default). Wired
160
+ // unconditionally, exactly like the Worker's `selectMergeLifecycleDeps`, so the
161
+ // preset CRUD API + the merger step's threshold resolution work identically.
162
+ riskPolicyRepository: repos.riskPolicyRepository,
163
+ // Shared stacks (long-lived compose infra a consumer environment attaches to). Wired
164
+ // unconditionally like the merge presets so the CRUD API works identically on both
165
+ // runtimes; the bring-up (`ensureUp`) needs a host daemon, so plain Node has no
166
+ // `composeRuntime` — the local facade injects one via `overrides.composeRuntime`.
167
+ sharedStackRepository: repos.sharedStackRepository,
168
+ // Sandbox (parallel prompt/model testing) — contributed as one sandbox-owned mixin,
169
+ // symmetric with the Worker's `...selectSandboxDeps(db)`; the run-driver reuses the
170
+ // reviewer model config below. The container body never enumerates the five repos.
171
+ ...createDrizzleSandboxDeps(db),
172
+ // Per-workspace runtime settings (human-wait escalation threshold + per-service task
173
+ // limit). Wired unconditionally so the settings API + the limit enforcement + the
174
+ // escalation sweep work identically to the Worker.
175
+ workspaceSettingsRepository: repos.workspaceSettingsRepository,
176
+ userSettingsRepository: repos.userSettingsRepository,
177
+ modelProviderResolver,
178
+ requirementReviewModel: config.agents.routing.default.ref,
179
+ requirementReviewResolveModel: config.agents.resolveBlockModel,
180
+ // Local mode runs the inline reviewers/brainstorm/estimator on the ambient Claude Code /
181
+ // Codex CLI when the pinned model is a subscription harness (undefined on stock Node, so
182
+ // such refs degrade to the routing default). Also drives the preset satisfiability guard.
183
+ ...(config.agents.inlineHarnessRef ? { inlineHarnessRef: config.agents.inlineHarnessRef } : {}),
184
+ // Notifications subsystem (parity with the Worker, which wires it unconditionally):
185
+ // the inbox + the human-action surfaces. Node has no real-time push, so the rows
186
+ // persist (inbox + snapshot) and any channel composed below — e.g. Slack — delivers.
187
+ notificationRepository: sourced('notificationRepository', (d) => new DrizzleNotificationRepository(d)),
188
+ ...tasks.deps,
189
+ // Recurring pipelines + the workspace tracker selection. The tracker provider
190
+ // files the tech-debt pipeline's issue by resolving the *workspace's* connected
191
+ // integration: GitHub issues through the workspace's GitHub App installation,
192
+ // Jira tickets from the per-workspace encrypted connection store — both per-tenant.
193
+ pipelineScheduleRepository: repos.pipelineScheduleRepository,
194
+ trackerSettingsRepository: repos.trackerSettingsRepository,
195
+ ticketTrackerProvider: new TicketTrackerService({
196
+ trackerSettingsRepository: repos.trackerSettingsRepository,
197
+ fetchImpl: fetch,
198
+ ...(fileGitHubIssue ? { fileGitHubIssue } : {}),
199
+ ...(tasks.taskConnectionRepository
200
+ ? {
201
+ resolveJiraConnection: async (workspaceId) => {
202
+ const connection = await tasks.taskConnectionRepository.getByWorkspace(workspaceId, 'jira');
203
+ const { baseUrl, accountEmail, apiToken } = connection?.credentials ?? {};
204
+ if (!baseUrl || !accountEmail || !apiToken)
205
+ return null;
206
+ return { baseUrl, accountEmail, apiToken };
207
+ },
208
+ resolveLinearConnection: async (workspaceId) => {
209
+ const connection = await tasks.taskConnectionRepository.getByWorkspace(workspaceId, 'linear');
210
+ const { apiKey, token } = connection?.credentials ?? {};
211
+ return apiKey || token ? { apiKey, token } : null;
212
+ },
213
+ }
214
+ : {}),
215
+ }),
216
+ };
217
+ }
218
+ /**
219
+ * The second half of the dependency literal: the runtime collaborators (executor, gateways,
220
+ * bootstrapper, deploy/runner transports, GitHub + Slack module wiring, the capability resolver)
221
+ * and — LAST, exactly as before — the caller's `overrides`.
222
+ */
223
+ function buildNodeServiceDeps(bundle) {
224
+ const { config, options, env, db, repos, sourced, idGenerator, clock, gateways, runnerUrlPolicy, githubInstallationRepository, apiKeys, subscriptions, personalSubscriptions, localModelEndpoints, openRouterCatalog, modelProviderResolver, cloudflareModelsEnabled, deployDeps, runnerPoolConnectionRepository, githubClient, issueWritebackProvider, githubGateDeps, githubModuleDeps, bootstrapJobRepository, repoBootstrapper, slackDeps, executionEventPublisher, agentExecutor, notificationChannel, accountSettings, } = bundle;
225
+ return {
226
+ issueWritebackProvider,
227
+ idGenerator,
228
+ clock,
229
+ agentExecutor,
230
+ spendPricing: config.spend,
231
+ // Price metered dynamic OpenRouter models at their real per-model rate (not the
232
+ // bare-`openrouter` fallback) using this workspace's enabled catalog.
233
+ dynamicModelPricesFor: openRouterCatalog
234
+ ? (ws) => openRouterCatalog.capabilitiesFor(ws)
235
+ : undefined,
236
+ // The runner-pool integration assembles when enabled, so a workspace can
237
+ // register the self-hosted pool its container agents dispatch to.
238
+ ...(config.runners.enabled && config.runners.encryptionKey
239
+ ? {
240
+ runnerPoolConnectionRepository,
241
+ runnerSecretCipher: new WebCryptoSecretCipher({
242
+ masterKeyBase64: config.runners.encryptionKey,
243
+ info: RUNNERS_CIPHER_INFO,
244
+ }),
245
+ // The pool provider instance backs the connection service's describeProvider +
246
+ // testConnection (the manifest editor's secret-key form + a pre-save probe). An
247
+ // injected native adapter wins here too (same instance that drives dispatch), so
248
+ // its describeConfig/testConnection render — else the generic manifest provider
249
+ // (same SSRF policy as the dispatch transport).
250
+ runnerPoolProvider: options.runnerPoolProvider ??
251
+ new HttpRunnerPoolProvider(runnerUrlPolicy ? { urlPolicy: runnerUrlPolicy } : {}),
252
+ // Node (and local) has undici, so it can verify a private CA / skip TLS for a
253
+ // Kubernetes apiserver — accept such a config at registration.
254
+ runnerCustomTlsSupported: true,
255
+ ...(runnerUrlPolicy ? { runnerUrlSafetyPolicy: runnerUrlPolicy } : {}),
256
+ }
257
+ : {}),
258
+ ...(options.boss
259
+ ? {
260
+ workRunner: new PgBossWorkRunner(options.boss, executionRuntime(config, env).queue),
261
+ // The durable bootstrap driver (analogue of the Worker's BootstrapWorkflow):
262
+ // BootstrapService.startRun enqueues a drive job that polls the run to terminal.
263
+ bootstrapRunner: new PgBossBootstrapRunner(options.boss, executionRuntime(config, env).queue),
264
+ // The durable env-config-repair driver (analogue of the Worker's
265
+ // EnvConfigRepairWorkflow): start enqueues a drive job that polls the run to terminal.
266
+ envConfigRepairRunner: new PgBossEnvConfigRepairRunner(options.boss, executionRuntime(config, env).queue),
267
+ // The durable ephemeral-environment self-test driver (analogue of the Worker's
268
+ // EnvironmentTestWorkflow): startRun enqueues a drive job that advances the run.
269
+ environmentTestRunner: new PgBossEnvironmentTestRunner(options.boss, executionRuntime(config, env).queue),
270
+ }
271
+ : {}),
272
+ ...githubGateDeps,
273
+ // GitHub installation + repo/branch/PR/issue/commit/check-run projections + the
274
+ // sync/webhook module (inline ingest persists to these repos on Node).
275
+ ...githubModuleDeps,
276
+ // Repo-bootstrap: the reference-architecture library + bootstrap-run store make the
277
+ // module + API available; `repoBootstrapper` (when wired) dispatches the bootstrap
278
+ // container through the shared runner seam, and `bootstrapRunner` (pg-boss, below)
279
+ // durably drives its poll loop — parity with the Worker's BootstrapWorkflow.
280
+ referenceArchitectureRepository: sourced('referenceArchitectureRepository', (d) => new DrizzleReferenceArchitectureRepository(d)),
281
+ bootstrapJobRepository,
282
+ ...(repoBootstrapper ? { repoBootstrapper } : {}),
283
+ // Env-config-repair runs share the unified agent_runs table (kind-scoped). The job
284
+ // repository is wired unconditionally; the repairer (agent fallback) is wired
285
+ // post-overrides below over the FINAL provider, and the durable runner in the
286
+ // `options.boss` block above — parity with the Worker's EnvConfigRepairWorkflow.
287
+ envConfigRepairJobRepository: sourced('envConfigRepairJobRepository', (d) => new DrizzleEnvConfigRepairJobRepository(d)),
288
+ // Ephemeral-environment self-test runs (their own table). The store is wired
289
+ // unconditionally; the environments module builds the service when it + a git provider
290
+ // are present, and the durable runner is wired in the `options.boss` block above.
291
+ environmentTestRunRepository: sourced('environmentTestRunRepository', (d) => new DrizzleEnvironmentTestRunRepository(d)),
292
+ // Document sources (Confluence / Notion / GitHub docs): wired from the shared
293
+ // integration providers exactly like the Worker, so a workspace can connect a
294
+ // source and import requirement/PRD/RFC pages as agent context.
295
+ ...selectNodeDocumentsDeps(config, db, githubClient, githubInstallationRepository),
296
+ // Ephemeral environments (opt-in): a workspace registers its own environment
297
+ // management API; the tester provisions/destroys per-run environments from it. A
298
+ // trusted in-house adapter can replace the default HTTP provider via the seam.
299
+ // The environment integration scopes its own URL/host policy from
300
+ // `config.environments` inside this selector (separate from the runner pool's).
301
+ ...selectNodeEnvironmentsDeps(config, db),
302
+ // The async container-backed Kubernetes deploy lifecycle (deployJobClient +
303
+ // resolveDeployCloneTarget) — pool-backed by default, overridable by the local facade.
304
+ ...deployDeps,
305
+ // Prompt-fragment library (ADR 0006; opt-in): the managed tenant-scoped catalog
306
+ // of best-practice fragments feeding every agent run, wired exactly like the
307
+ // Worker's selectFragmentLibraryDeps (repos + installation resolver + selector).
308
+ ...selectNodeFragmentLibraryDeps(config, env, db, githubClient, githubInstallationRepository, modelProviderResolver),
309
+ // Repo-sourced Claude Skills library (docs/initiatives/repo-skills.md; opt-in): the
310
+ // account's catalog of repo-authored skills, wired exactly like the Worker's
311
+ // selectSkillLibraryDeps (account repos + installation resolver).
312
+ ...selectNodeSkillLibraryDeps(config, db, githubClient, githubInstallationRepository),
313
+ // Push-webhook skill-source freshness fan-out (slice 4): resync affected sources via the
314
+ // pg-boss GitHub-sync queue. No boss (pure-logic test) ⇒ no proactive resync; the
315
+ // dispatch-time probe is the freshness backstop.
316
+ enqueueSkillResync: async ({ accountId, sourceId }) => {
317
+ await gateways.githubWebhook.queueSkillResync(accountId, sourceId);
318
+ },
319
+ // Slack: an extra notification transport (the channel) + its management module.
320
+ // Default-off; when enabled its channel is composed into `notificationChannel` below
321
+ // alongside the in-app push, identically to the Worker.
322
+ ...slackDeps,
323
+ // Account invitations + per-account email senders (UI-onboarded, DB-stored).
324
+ ...selectNodeEmailInvitationDeps(config, repos),
325
+ // The pipeline-start guard resolves what's configured for a workspace + initiator.
326
+ resolveProviderCapabilities: (workspaceId, initiatedBy) => resolveWorkspaceCapabilities({
327
+ apiKeys,
328
+ subscriptions,
329
+ personalSubscriptions,
330
+ cloudflareModelsEnabled,
331
+ baseUrlFor: (provider) => baseUrlForNode(provider, env),
332
+ localModelEndpoints,
333
+ openRouterCatalog,
334
+ accountSettings,
335
+ workspaceAccountOf: (workspaceId) => repos.workspaceRepository.accountOf(workspaceId),
336
+ modelPolicySupported: config.infrastructure?.modelPolicy?.supported ?? false,
337
+ ...(options.caches ? { caches: options.caches } : {}),
338
+ }, workspaceId, initiatedBy),
339
+ // Real-time push (when a hub is wired) + the composed notification channel (in-app
340
+ // push + Slack). These come AFTER the spreads so the composite replaces the bare
341
+ // Slack channel `slackDeps` set; both are absent (no override) when nothing is wired.
342
+ ...(executionEventPublisher ? { executionEventPublisher } : {}),
343
+ ...(notificationChannel ? { notificationChannel } : {}),
344
+ // Run the engine's gate-probe / merge GitHub reads under the run initiator's ambient
345
+ // context, so a per-user PAT (when set) is preferred over the App/env token.
346
+ runInitiatorScope: runWithInitiator,
347
+ // The process-wide cache bag from start() (Redis-notified invalidation when REDIS_URL
348
+ // is set). Absent ⇒ createCore builds bare in-memory defaults.
349
+ ...(options.caches ? { caches: options.caches } : {}),
350
+ ...options.overrides,
351
+ };
352
+ }
353
+ /**
354
+ * Wire account invitations + per-account email senders for the Node facade (parity
355
+ * with the Worker's `selectEmailInvitationDeps`). Invitations are always available (an
356
+ * invite link works without email); the email-connection store + cipher are wired only
357
+ * when EMAIL is enabled, so an account can onboard a SendGrid/Resend key in the UI and
358
+ * have invites emailed. The provider key is sealed with the shared ENCRYPTION_KEY.
359
+ */
360
+ function selectNodeEmailInvitationDeps(config, repos) {
361
+ const deps = {
362
+ invitationRepository: repos.invitationRepository,
363
+ // Password reset works without email (the link is logged in dev); the system sender
364
+ // below upgrades it to real delivery when configured.
365
+ passwordResetTokenRepository: repos.passwordResetTokenRepository,
366
+ resolveSystemEmailSender: buildSystemEmailSender(config),
367
+ appBaseUrl: config.email.appBaseUrl || undefined,
368
+ logger,
369
+ };
370
+ if (config.email.enabled && config.email.encryptionKey) {
371
+ deps.emailConnectionRepository = repos.emailConnectionRepository;
372
+ deps.emailSecretCipher = new WebCryptoSecretCipher({
373
+ masterKeyBase64: config.email.encryptionKey,
374
+ info: EMAIL_CIPHER_INFO,
375
+ });
376
+ }
377
+ return deps;
378
+ }
379
+ /**
380
+ * Build the deployment-level system email sender (auth emails like password reset) from
381
+ * the env-driven `email.system` config, or undefined when not configured.
382
+ */
383
+ function buildSystemEmailSender(config) {
384
+ const system = config.email.system;
385
+ if (!system)
386
+ return undefined;
387
+ const sender = createEmailSender({
388
+ provider: system.provider,
389
+ from: system.from,
390
+ sendgrid: system.provider === 'sendgrid' ? { apiKey: system.apiKey } : undefined,
391
+ resend: system.provider === 'resend' ? { apiKey: system.apiKey } : undefined,
392
+ });
393
+ if (!sender)
394
+ return undefined;
395
+ return async () => sender;
396
+ }
397
+ /**
398
+ * Wire the document-source integration for the Node facade, mirroring the Worker's
399
+ * `selectDocumentsDeps`: the shared `@cat-factory/integrations` provider shells
400
+ * (Confluence/Notion always; GitHub-docs only when a GitHub client is available, since
401
+ * it reuses the workspace's App installation), the Drizzle connection/document repos,
402
+ * and — in `llm` planner mode — the default model ref the doc→board planner runs with
403
+ * (the container's `modelProvider` is shared). Source credentials are encrypted at rest
404
+ * under a documents-scoped HKDF info, keyed by the shared ENCRYPTION_KEY.
405
+ */
406
+ function selectNodeDocumentsDeps(config, db, githubClient, installations) {
407
+ if (!config.documents.enabled || !config.documents.encryptionKey)
408
+ return {};
409
+ const providers = [];
410
+ if (config.documents.sources.includes('confluence'))
411
+ providers.push(new ConfluenceProvider());
412
+ if (config.documents.sources.includes('notion'))
413
+ providers.push(new NotionProvider());
414
+ // Figma + Zeplin authenticate with a per-workspace PAT (no GitHub client needed), like
415
+ // Notion/Confluence.
416
+ if (config.documents.sources.includes('figma'))
417
+ providers.push(new FigmaProvider());
418
+ if (config.documents.sources.includes('zeplin'))
419
+ providers.push(new ZeplinProvider());
420
+ if (config.documents.sources.includes('linear'))
421
+ providers.push(new LinearDocumentProvider());
422
+ if (config.documents.sources.includes('github') && githubClient) {
423
+ providers.push(new GitHubDocsProvider({ githubClient, installations, logger }));
424
+ }
425
+ if (providers.length === 0)
426
+ return {};
427
+ return {
428
+ documentSourceProviders: providers,
429
+ documentConnectionRepository: new DrizzleDocumentConnectionRepository(db, new WebCryptoSecretCipher({
430
+ masterKeyBase64: config.documents.encryptionKey,
431
+ info: 'cat-factory:documents',
432
+ })),
433
+ documentRepository: new DrizzleDocumentRepository(db),
434
+ ...(config.documents.planner === 'llm'
435
+ ? { documentPlannerModel: config.agents.routing.default.ref }
436
+ : {}),
437
+ };
438
+ }
439
+ /**
440
+ * Wire the ephemeral-environment integration for the Node facade when enabled,
441
+ * mirroring the Worker's `selectEnvironmentsDeps`: the Drizzle connection + registry repos
442
+ * and the environment-scoped `SecretCipher`. The provider itself is resolved per-workspace
443
+ * from the env-backend registry by the stored `kind` (built-in `manifest`/`kubernetes`, or a
444
+ * deployment's programmatically-registered custom kind), so nothing is injected here.
445
+ * Per-tenant management-API secrets are encrypted at rest with the shared ENCRYPTION_KEY.
446
+ * No key configured → `{}` and the module stays off (there is no separate enable flag).
447
+ */
448
+ function selectNodeEnvironmentsDeps(config, db) {
449
+ if (!config.environments.encryptionKey)
450
+ return {};
451
+ // The provider is resolved per-workspace from the env-backend registry by the stored
452
+ // `kind`. Node honors custom-CA / insecure-skip TLS (undici), so a Kubernetes env config
453
+ // with a CA is allowed (environmentCustomTlsSupported defaults to supported).
454
+ const urlPolicy = resolveUrlSafetyPolicy(config.environments);
455
+ return {
456
+ environmentConnectionRepository: new DrizzleEnvironmentConnectionRepository(db),
457
+ environmentRegistryRepository: new DrizzleEnvironmentRegistryRepository(db),
458
+ // The workspace-defined custom-manifest-type catalog is a workspace feature on every facade.
459
+ customManifestTypeRepository: new DrizzleCustomManifestTypeRepository(db),
460
+ secretCipher: new WebCryptoSecretCipher({
461
+ masterKeyBase64: config.environments.encryptionKey,
462
+ }),
463
+ ...(urlPolicy ? { environmentUrlSafetyPolicy: urlPolicy } : {}),
464
+ // Deployment-level, additive extensions to the built-in provisioning-detection conventions.
465
+ ...(config.environments.detectionConventions
466
+ ? { detectionConventions: config.environments.detectionConventions }
467
+ : {}),
468
+ };
469
+ }
470
+ //# sourceMappingURL=container-core-deps.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"container-core-deps.js","sourceRoot":"","sources":["../src/container-core-deps.ts"],"names":[],"mappings":"AAAA,4FAA4F;AAC5F,8FAA8F;AAC9F,6FAA6F;AAC7F,iGAAiG;AACjG,oDAAoD;AACpD,OAAO,EACL,kBAAkB,EAClB,aAAa,EACb,cAAc,EACd,kBAAkB,EAClB,sBAAsB,EACtB,sBAAsB,EACtB,cAAc,EACd,iBAAiB,EACjB,iBAAiB,EACjB,oBAAoB,GACrB,MAAM,2BAA2B,CAAA;AAClC,OAAO,EAML,uBAAuB,GACxB,MAAM,qBAAqB,CAAA;AAC5B,OAAO,EAAyB,MAAM,4BAA4B,CAAA;AAClE,OAAO,EAEL,gBAAgB,EAChB,uBAAuB,EACvB,qBAAqB,EACrB,MAAM,EACN,sBAAsB,EACtB,4BAA4B,GAC7B,MAAM,qBAAqB,CAAA;AAK5B,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAA;AACxD,OAAO,EAAE,qBAAqB,EAAE,MAAM,gCAAgC,CAAA;AACtE,OAAO,EAAE,2BAA2B,EAAE,MAAM,sCAAsC,CAAA;AAClF,OAAO,EAAE,2BAA2B,EAAE,MAAM,8BAA8B,CAAA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