@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,81 @@
1
+ import { type GitHubClient } from '@cat-factory/kernel';
2
+ import type { DrizzleDb } from './db/client.js';
3
+ import { CryptoIdGenerator, SystemClock } from './runtime.js';
4
+ import type { NodeContainerOptions } from './container.js';
5
+ /**
6
+ * The Node composition root's FOUNDATION: everything {@link buildNodeContainer} resolves before it
7
+ * starts wiring modules — the effective env/config (with the Node infrastructure descriptor filled
8
+ * in), the clock + id generator, the repository set plus the mothership-aware `sourced` picker, the
9
+ * app-owned registries, the opt-in GitLab engine client, and the workspace model-preset resolver.
10
+ * Carved out of `container.ts` for the per-function line budget
11
+ * (docs/initiatives/lint-complexity-size-ratchet.md); the ordering of every side effect is
12
+ * preserved exactly, so this is behaviour-neutral.
13
+ */
14
+ /**
15
+ * Source one org/durable repository that a standard build constructs directly from the Drizzle
16
+ * `db`. In mothership mode (no Postgres) `remote` is the full-surface remote registry — a
17
+ * `Proxy` (`createRemoteRepositoryRegistry`) that forwards any repo name to the hosted
18
+ * mothership over the `/internal/persistence` RPC — so the repo comes from THERE instead of the
19
+ * absent db; otherwise `build()` constructs the Drizzle repo over `db` as before. This is the
20
+ * Phase-3 `db: undefined` audit seam: every direct-db store on the board-load + run path routes
21
+ * through it. Routing is orthogonal to the server-side allow-list — an un-allow-listed remote
22
+ * method still returns a clean `unknown_method`, never a `db`-undefined `TypeError`. Mirrors the
23
+ * credential-repo override seam (`providerApiKeyRepository`), which keeps credentials local while
24
+ * org state goes remote. See docs/initiatives/mothership-mode.md (Phase 3, part 1).
25
+ */
26
+ export declare function pickRepoSource<T>(remote: Record<string, unknown> | undefined, name: string, build: () => T): T;
27
+ /**
28
+ * Resolve every app-owned registry the container wires: the backend-kind registries (env + runner
29
+ * + custom-manifest + user-secret), the agent-kind / gate / step-resolver / initiative-preset /
30
+ * VCS-provider / gate-provider registries. Each is the injected instance when `options` supplies it
31
+ * (a deployment's custom entries, or the conformance harness's pre-loaded instance) else the
32
+ * built-ins-only default, and the opt-in AWS EKS backends are registered by reference. Extracted
33
+ * from {@link buildNodeContainer} to keep it under the complexity ceiling.
34
+ */
35
+ declare function resolveNodeAppRegistries(options: NodeContainerOptions): {
36
+ environmentBackendRegistry: import("@cat-factory/integrations").EnvironmentBackendRegistry;
37
+ runnerBackendRegistry: import("@cat-factory/integrations").RunnerBackendRegistry;
38
+ customManifestTypeRegistry: import("@cat-factory/integrations").CustomManifestTypeRegistry;
39
+ userSecretKindRegistry: import("@cat-factory/integrations").UserSecretKindRegistry;
40
+ agentKindRegistry: import("@cat-factory/agents").AgentKindRegistry;
41
+ gateRegistry: import("@cat-factory/kernel").GateRegistry;
42
+ stepResolverRegistry: import("@cat-factory/kernel").StepResolverRegistry;
43
+ initiativePresetRegistry: import("@cat-factory/kernel").InitiativePresetRegistry;
44
+ vcsRegistry: import("@cat-factory/kernel").VcsProviderRegistry;
45
+ providerRegistry: import("@cat-factory/kernel").ProviderRegistry;
46
+ };
47
+ /**
48
+ * Resolve the composition root's foundation (see the module doc). Called FIRST by
49
+ * {@link buildNodeContainer}, so its side effects — filling `config.infrastructure` and
50
+ * registering the GitLab VCS provider — happen in the same order as when this was inline.
51
+ */
52
+ export declare function resolveNodeContainerFoundation(options: NodeContainerOptions): {
53
+ env: NodeJS.ProcessEnv;
54
+ config: import("@cat-factory/server").AppConfig;
55
+ clock: SystemClock;
56
+ idGenerator: CryptoIdGenerator;
57
+ repos: import("./index.js").CoreRepositories;
58
+ db: import("drizzle-orm/node-postgres").NodePgDatabase<import("drizzle-orm").EmptyRelations> & {
59
+ $client: import("pg").Pool;
60
+ };
61
+ remoteRepos: Record<string, unknown> | undefined;
62
+ sourced: <T>(name: string, build: (d: DrizzleDb) => T) => T;
63
+ registries: {
64
+ environmentBackendRegistry: import("@cat-factory/integrations").EnvironmentBackendRegistry;
65
+ runnerBackendRegistry: import("@cat-factory/integrations").RunnerBackendRegistry;
66
+ customManifestTypeRegistry: import("@cat-factory/integrations").CustomManifestTypeRegistry;
67
+ userSecretKindRegistry: import("@cat-factory/integrations").UserSecretKindRegistry;
68
+ agentKindRegistry: import("@cat-factory/agents").AgentKindRegistry;
69
+ gateRegistry: import("@cat-factory/kernel").GateRegistry;
70
+ stepResolverRegistry: import("@cat-factory/kernel").StepResolverRegistry;
71
+ initiativePresetRegistry: import("@cat-factory/kernel").InitiativePresetRegistry;
72
+ vcsRegistry: import("@cat-factory/kernel").VcsProviderRegistry;
73
+ providerRegistry: import("@cat-factory/kernel").ProviderRegistry;
74
+ };
75
+ gitlabEngineClient: GitHubClient | undefined;
76
+ resolveWorkspaceModelDefault: (workspaceId: string, agentKind: string, modelPresetId?: string) => Promise<string>;
77
+ };
78
+ /** The app-owned registry set {@link resolveNodeAppRegistries} produces. */
79
+ export type NodeAppRegistriesResult = ReturnType<typeof resolveNodeAppRegistries>;
80
+ export {};
81
+ //# sourceMappingURL=container-foundation.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"container-foundation.d.ts","sourceRoot":"","sources":["../src/container-foundation.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,KAAK,YAAY,EAA+C,MAAM,qBAAqB,CAAA;AAapG,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAA;AAE/C,OAAO,EAAE,iBAAiB,EAAE,WAAW,EAAE,MAAM,cAAc,CAAA;AAK7D,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAA;AAE1D;;;;;;;;GAQG;AACH;;;;;;;;;;;GAWG;AACH,wBAAgB,cAAc,CAAC,CAAC,EAC9B,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,EAC3C,IAAI,EAAE,MAAM,EACZ,KAAK,EAAE,MAAM,CAAC,GACb,CAAC,CAEH;AAED;;;;;;;GAOG;AACH,iBAAS,wBAAwB,CAAC,OAAO,EAAE,oBAAoB;;;;;;;;;;;EAyC9D;AAED;;;;GAIG;AACH,wBAAgB,8BAA8B,CAAC,OAAO,EAAE,oBAAoB;;;;;;;;;;cAuDzD,CAAC,QAAQ,MAAM,SAAS,CAAC,CAAC,EAAE,SAAS,KAAK,CAAC,KAAG,CAAC;;;;;;;;;;;;;;gDAwCjD,MAAM,aACR,MAAM,kBACD,MAAM;EAgBzB;AAED,4EAA4E;AAC5E,MAAM,MAAM,uBAAuB,GAAG,UAAU,CAAC,OAAO,wBAAwB,CAAC,CAAA"}
@@ -0,0 +1,193 @@
1
+ import { defaultAgentKindRegistry, defaultInitiativePresetRegistry } from '@cat-factory/agents';
2
+ // Opt-in AWS EKS backends (runner + environment), registered by reference below (the Worker
3
+ // facade registers the same pair, keeping the runtimes symmetric with the native `kubernetes`
4
+ // backend these extend). They are pass-throughs until a workspace actually connects an `eks`
5
+ // backend, and carry NO runtime AWS SDK dependency (the token is minted with WebCrypto), so this
6
+ // adds no cost to a deployment that never uses EKS.
7
+ import { eksEnvironmentBackend, eksRunnerBackend } from '@cat-factory/eks';
8
+ import { createBackendRegistries } from '@cat-factory/integrations';
9
+ import { defaultProviderRegistry, defaultVcsRegistry } from '@cat-factory/kernel';
10
+ import { defaultStepResolverRegistry, resolvePresetModelForKind } from '@cat-factory/orchestration';
11
+ import { buildInfrastructureCapabilities } from '@cat-factory/server';
12
+ // The built-in polling-gate suite (ci / conflicts / post-release-health + on-call). The facade
13
+ // builds an app-owned `GateRegistry` pre-loaded with the suite via `gateRegistryWithBuiltins()`
14
+ // below, then wires each gate's provider.
15
+ import { gateRegistryWithBuiltins } from '@cat-factory/gates';
16
+ import { buildGitLabEngineClient, registerGitLab, StaticGitLabTokenSource, } from '@cat-factory/gitlab';
17
+ import { loadNodeConfig } from './config.js';
18
+ import { createDrizzleRepositories } from './repositories/drizzle.js';
19
+ import { CryptoIdGenerator, SystemClock } from './runtime.js';
20
+ /**
21
+ * The Node composition root's FOUNDATION: everything {@link buildNodeContainer} resolves before it
22
+ * starts wiring modules — the effective env/config (with the Node infrastructure descriptor filled
23
+ * in), the clock + id generator, the repository set plus the mothership-aware `sourced` picker, the
24
+ * app-owned registries, the opt-in GitLab engine client, and the workspace model-preset resolver.
25
+ * Carved out of `container.ts` for the per-function line budget
26
+ * (docs/initiatives/lint-complexity-size-ratchet.md); the ordering of every side effect is
27
+ * preserved exactly, so this is behaviour-neutral.
28
+ */
29
+ /**
30
+ * Source one org/durable repository that a standard build constructs directly from the Drizzle
31
+ * `db`. In mothership mode (no Postgres) `remote` is the full-surface remote registry — a
32
+ * `Proxy` (`createRemoteRepositoryRegistry`) that forwards any repo name to the hosted
33
+ * mothership over the `/internal/persistence` RPC — so the repo comes from THERE instead of the
34
+ * absent db; otherwise `build()` constructs the Drizzle repo over `db` as before. This is the
35
+ * Phase-3 `db: undefined` audit seam: every direct-db store on the board-load + run path routes
36
+ * through it. Routing is orthogonal to the server-side allow-list — an un-allow-listed remote
37
+ * method still returns a clean `unknown_method`, never a `db`-undefined `TypeError`. Mirrors the
38
+ * credential-repo override seam (`providerApiKeyRepository`), which keeps credentials local while
39
+ * org state goes remote. See docs/initiatives/mothership-mode.md (Phase 3, part 1).
40
+ */
41
+ export function pickRepoSource(remote, name, build) {
42
+ return remote ? remote[name] : build();
43
+ }
44
+ /**
45
+ * Resolve every app-owned registry the container wires: the backend-kind registries (env + runner
46
+ * + custom-manifest + user-secret), the agent-kind / gate / step-resolver / initiative-preset /
47
+ * VCS-provider / gate-provider registries. Each is the injected instance when `options` supplies it
48
+ * (a deployment's custom entries, or the conformance harness's pre-loaded instance) else the
49
+ * built-ins-only default, and the opt-in AWS EKS backends are registered by reference. Extracted
50
+ * from {@link buildNodeContainer} to keep it under the complexity ceiling.
51
+ */
52
+ function resolveNodeAppRegistries(options) {
53
+ const { environmentBackendRegistry, runnerBackendRegistry, customManifestTypeRegistry, userSecretKindRegistry, } = options.backendRegistries ?? createBackendRegistries();
54
+ // Register the opt-in AWS EKS backends by reference (the default registries stay AWS-free).
55
+ // Reuses the native Kubernetes transport/provider behind a minted IAM apiserver token; a
56
+ // pass-through until a workspace connects an `eks` backend. Registered on BOTH facades (the
57
+ // Worker registers the same pair in its container build) so the runtimes stay symmetric with
58
+ // the native `kubernetes` backend these extend — a real EKS cluster's private-CA apiserver is
59
+ // only reachable from a runtime that can pin a custom CA (Node/local), the same constraint a
60
+ // private-CA `kubernetes` connection already carries.
61
+ runnerBackendRegistry.register(eksRunnerBackend);
62
+ environmentBackendRegistry.register(eksEnvironmentBackend);
63
+ return {
64
+ environmentBackendRegistry,
65
+ runnerBackendRegistry,
66
+ customManifestTypeRegistry,
67
+ userSecretKindRegistry,
68
+ // The app-owned agent-kind registry: the injected instance (so a deployment's custom kinds
69
+ // are visible) else the built-ins-only default.
70
+ agentKindRegistry: options.agentKindRegistry ?? defaultAgentKindRegistry(),
71
+ // The app-owned gate registry: the injected instance (conformance / a deployment pre-loads it),
72
+ // else a fresh one with the built-in `@cat-factory/gates` suite installed.
73
+ gateRegistry: options.gateRegistry ?? gateRegistryWithBuiltins(),
74
+ // The app-owned step-resolver registry: the injected instance else an empty default (the
75
+ // built-in `merger` resolver is a privileged engine built-in, not a registry entry).
76
+ stepResolverRegistry: options.stepResolverRegistry ?? defaultStepResolverRegistry(),
77
+ // The app-owned initiative-preset registry: the injected instance else the built-ins-only
78
+ // default (generic / docs-refresh / tech-migration).
79
+ initiativePresetRegistry: options.initiativePresetRegistry ?? defaultInitiativePresetRegistry(),
80
+ // Opt-in GitLab VCS provider registry (a no-op unless GITLAB_TOKEN is set; the wiring lives in
81
+ // the caller, symmetric with the Worker facade per "keep the runtimes symmetric").
82
+ vcsRegistry: options.vcsRegistry ?? defaultVcsRegistry(),
83
+ // The app-owned provider registry the built-in gates probe through (fresh empty unless injected).
84
+ providerRegistry: options.providerRegistry ?? defaultProviderRegistry(),
85
+ };
86
+ }
87
+ /**
88
+ * Resolve the composition root's foundation (see the module doc). Called FIRST by
89
+ * {@link buildNodeContainer}, so its side effects — filling `config.infrastructure` and
90
+ * registering the GitLab VCS provider — happen in the same order as when this was inline.
91
+ */
92
+ export function resolveNodeContainerFoundation(options) {
93
+ const env = options.env ?? process.env;
94
+ const config = options.config ?? loadNodeConfig(env);
95
+ // A browsable preview needs a per-runtime host-port-publish transport. Plain Node (runner
96
+ // pool) has none, so advertise support ONLY when a `previewTransport` is actually wired
97
+ // (local mode, or a facade/test that injects one) — otherwise the SPA would offer a Start
98
+ // button that 503s. Local pre-sets its own descriptor before calling in, so this ??= is
99
+ // skipped there; the check covers a stock Node build (false) and the conformance harness
100
+ // (which injects a fake transport via `overrides` → true).
101
+ const previewTransportWired = Boolean(options.previewTransport ?? options.overrides?.previewTransport);
102
+ // The Node service has no built-in per-run container runtime: repo-operating agents run on
103
+ // a self-hosted runner pool, and Tester environments via the environment provider. Surface
104
+ // that so the SPA's infrastructure selector reads accurately. Local mode pre-sets its own
105
+ // descriptor (host Docker + pool) before calling in, so only fill it when absent.
106
+ config.infrastructure ??= buildInfrastructureCapabilities({
107
+ execution: { available: ['runner-pool'], active: 'runner-pool' },
108
+ testEnv: { available: ['environment-provider'], active: 'environment-provider' },
109
+ frontendPreview: { supported: previewTransportWired },
110
+ // A remote Node deployment has account admins to govern the account-wide model policy.
111
+ // (Local mode sets `config.infrastructure` itself before delegating here, so its
112
+ // mothership-gated value wins over this `??=`.)
113
+ modelPolicy: { supported: true },
114
+ });
115
+ const clock = new SystemClock();
116
+ const idGenerator = new CryptoIdGenerator();
117
+ // Mothership mode runs with NO Postgres (`options.db` undefined): org/durable state is served
118
+ // remotely via `options.repos`, so that set is REQUIRED there. (A standard Node/local build
119
+ // passes `db` and we build the Drizzle set from it.)
120
+ if (!options.repos && !options.db) {
121
+ throw new Error('buildNodeContainer requires `repos` when `db` is undefined (mothership mode supplies the ' +
122
+ 'composite remote + local-credential repositories).');
123
+ }
124
+ const repos = options.repos ?? createDrizzleRepositories(options.db, clock);
125
+ // The Drizzle constructors only stash the handle — no build-time work (audited) — so BUILDING
126
+ // the stores below over an `undefined` db is safe; `db` carries the non-null type for those
127
+ // constructions, and the per-user credential services take the OPTIONAL `options.db` and turn
128
+ // themselves off when it is absent.
129
+ const db = options.db;
130
+ // Mothership mode (`options.db` undefined): the org/durable stores a standard build constructs
131
+ // directly from the db — the GitHub installation + projections, runner-pool connection,
132
+ // bootstrap + env-config-repair job stores, notifications, reference-architecture library,
133
+ // task + subscription-activation stores — are sourced from the REMOTE registry instead (here
134
+ // `options.repos` is the full-surface remote `Proxy` from `composeMothership`, which forwards
135
+ // any repo name to the mothership over RPC). `pickRepoSource(remoteRepos, name, build)` picks
136
+ // the remote entry when there is no db, else builds the Drizzle repo — see the Phase-3 audit in
137
+ // docs/initiatives/mothership-mode.md. The feature-flagged integration repos owned by the
138
+ // sub-helpers (tasks/documents/environments/fragments/slack) are opt-in and off by default, so
139
+ // they are NOT on the default board-load + run path and remain a follow-up sub-slice.
140
+ const remoteRepos = options.db ? undefined : repos;
141
+ // `remoteRepos` + `db` are fixed for this build, so bind them once: `sourced('name', (d) => …)`
142
+ // picks the remote registry entry in mothership mode, else builds the Drizzle repo over `db`.
143
+ const sourced = (name, build) => pickRepoSource(remoteRepos, name, () => build(db));
144
+ // The app-owned registries (backend kinds, agent kinds, gates, step resolvers, initiative
145
+ // presets, VCS providers, gate-provider registry) — injected instances when supplied (a
146
+ // deployment's custom entries / the conformance harness) else the built-ins-only defaults.
147
+ // The SAME instances flow to the executors, createCore, and the ServerContainer projection.
148
+ const registries = resolveNodeAppRegistries(options);
149
+ const { vcsRegistry } = registries;
150
+ // The built-in gates' providers are wired onto the app-owned `providerRegistry` (fresh unless
151
+ // injected via `options`). The GitHub + release-health wiring runs only inside its
152
+ // `enabled`/`githubClient` branches; a fresh registry starts empty, so an unconfigured gate just
153
+ // stays unwired (pass-through) — no reset needed (the former `clearGateProviders()` guarded a
154
+ // module-global that no longer exists). Mirrors the Worker facade (keep the runtimes symmetric).
155
+ // Any test-injected gate providers (`options.gateProviders`) are applied at the END of this build
156
+ // so they OVERRIDE the config wiring (local mode wires a PAT-backed CI provider here that would
157
+ // otherwise clobber a faked one) — gates read their provider lazily at probe time, last write wins.
158
+ let gitlabEngineClient;
159
+ if (config.gitlab?.enabled && env.GITLAB_TOKEN) {
160
+ registerGitLab(vcsRegistry, {
161
+ tokenSource: new StaticGitLabTokenSource(env.GITLAB_TOKEN, config.gitlab.apiBase),
162
+ clock,
163
+ webhookSecret: config.gitlab.webhookSecret || undefined,
164
+ });
165
+ // Bridge the GitLab VcsClient onto the legacy GitHubClient port the engine's gate / merge /
166
+ // RepoFiles paths consume, so a GitLab-only deployment (no GitHub App) gates on real CI and
167
+ // merges the MR for real — the SAME wiring local mode already does, now on the Node facade
168
+ // too (keep the runtimes symmetric). The GitHub App client wins when both are configured.
169
+ gitlabEngineClient = buildGitLabEngineClient({
170
+ token: env.GITLAB_TOKEN,
171
+ apiBase: config.gitlab.apiBase,
172
+ clock,
173
+ });
174
+ }
175
+ // Honour the workspace's model presets at run time (block-pinned > the task's
176
+ // selected/default model preset > env routing), uniformly for inline and container
177
+ // kinds. The built-in default preset points every agent kind at Kimi K2.7.
178
+ const resolveWorkspaceModelDefault = (workspaceId, agentKind, modelPresetId) => resolvePresetModelForKind(repos.modelPresetRepository, workspaceId, agentKind, modelPresetId);
179
+ return {
180
+ env,
181
+ config,
182
+ clock,
183
+ idGenerator,
184
+ repos,
185
+ db,
186
+ remoteRepos,
187
+ sourced,
188
+ registries,
189
+ gitlabEngineClient,
190
+ resolveWorkspaceModelDefault,
191
+ };
192
+ }
193
+ //# sourceMappingURL=container-foundation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"container-foundation.js","sourceRoot":"","sources":["../src/container-foundation.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,+BAA+B,EAAE,MAAM,qBAAqB,CAAA;AAC/F,4FAA4F;AAC5F,8FAA8F;AAC9F,6FAA6F;AAC7F,iGAAiG;AACjG,o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AAC,EAAE,sBAAsB,CAAA;IAC/C,kGAAkG;IAClG,kBAAkB,EAAE,YAAY,GAAG,SAAS,CAAA;IAC5C,gBAAgB,EAAE,gBAAgB,CAAA;IAClC,iBAAiB,EAAE,iBAAiB,CAAA;IACpC,4BAA4B,EAAE,4BAA4B,CAAA;IAC1D,wBAAwB,EAAE,wBAAwB,CAAA;IAClD,eAAe,EAAE,eAAe,CAAA;IAChC,yBAAyB,EAAE,yBAAyB,CAAA;IACpD,0FAA0F;IAC1F,mBAAmB,EAAE,mBAAmB,CAAA;IACxC,MAAM,CAAC,EAAE,SAAS,CAAA;CACnB;AAED,gFAAgF;AAChF,MAAM,WAAW,cAAc;IAC7B,mFAAmF;IACnF,YAAY,EAAE,YAAY,GAAG,SAAS,CAAA;IACtC,KAAK,EAAE,aAAa,CAAA;IACpB,eAAe,EAAE,UAAU,CAAC,OAAO,yBAAyB,CAAC,CAAA;IAC7D,sBAAsB,EAAE,qBAAqB,CAAA;IAC7C,cAAc,EAAE,OAAO,CAAC,gBAAgB,CAAC,CAAA;IACzC,gBAAgB,EAAE,OAAO,CAAC,gBAAgB,CAAC,CAAA;CAC5C;AAED;;;;;;;;GAQG;AACH,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,mBAAmB,GAAG,cAAc,CAmU/E"}
1
+ {"version":3,"file":"container-github-deps.d.ts","sourceRoot":"","sources":["../src/container-github-deps.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,qBAAqB,EAKtB,MAAM,2BAA2B,CAAA;AAElC,OAAO,KAAK,EACV,SAAS,EACT,eAAe,EACf,KAAK,EACL,YAAY,EACZ,4BAA4B,EAC5B,WAAW,EACX,gBAAgB,EAGhB,wBAAwB,EACxB,sBAAsB,EACtB,wBAAwB,EAExB,yBAAyB,EACzB,mBAAmB,EACpB,MAAM,qBAAqB,CAAA;AAC5B,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAA;AAClE,OAAO,EACL,KAAK,SAAS,EACd,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WAAW,cAAc;IAC7B,mFAAmF;IACnF,YAAY,EAAE,YAAY,GAAG,SAAS,CAAA;IACtC,KAAK,EAAE,aAAa,CAAA;IACpB,eAAe,EAAE,UAAU,CAAC,OAAO,yBAAyB,CAAC,CAAA;IAC7D,sBAAsB,EAAE,qBAAqB,CAAA;IAC7C,cAAc,EAAE,OAAO,CAAC,gBAAgB,CAAC,CAAA;IACzC,gBAAgB,EAAE,OAAO,CAAC,gBAAgB,CAAC,CAAA;CAC5C;AAED;;;;;;;;GAQG;AACH,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,mBAAmB,GAAG,cAAc,CAuK/E"}
@@ -104,63 +104,13 @@ export function selectNodeGitHubDeps(input) {
104
104
  // is available — kept here, after the client is built, for parity with the Worker.
105
105
  const tasks = selectNodeTasksDeps(config, db, githubClient, githubInstallationRepository);
106
106
  // Issue-tracker writeback (comment-on-PR-open + close-on-merge of a task's linked
107
- // issue), gated per workspace + per task inside the provider. GitHub uses the same
108
- // per-tenant client + installation lookup as the tracker/CI/merge providers; Jira
109
- // reuses the workspace's encrypted connection. Wired whenever the tracker-settings
110
- // repo exists (always on Node) so the engine can write back when a tracker is set.
111
- const resolveWritebackIssue = githubClient
112
- ? async (workspaceId, externalId) => {
113
- const parsed = githubIssuesLogic.parseGitHubIssueExternalId(externalId);
114
- if (!parsed)
115
- return null;
116
- const installation = await githubInstallationRepository.getByWorkspace(workspaceId);
117
- if (!installation)
118
- return null;
119
- return { installationId: installation.installationId, parsed };
120
- }
121
- : undefined;
122
- const issueWritebackProvider = new IssueWritebackService({
107
+ // issue), gated per workspace + per task inside the provider.
108
+ const issueWritebackProvider = buildNodeIssueWriteback({
109
+ githubClient,
110
+ githubInstallationRepository,
123
111
  trackerSettingsRepository,
124
- taskRepository: sourced('taskRepository', (d) => new DrizzleTaskRepository(d)),
125
- fetchImpl: fetch,
126
- ...(githubClient && resolveWritebackIssue
127
- ? {
128
- commentOnGitHubIssue: async (workspaceId, externalId, body) => {
129
- const target = await resolveWritebackIssue(workspaceId, externalId);
130
- if (!target)
131
- return;
132
- await githubClient.comment(target.installationId, { owner: target.parsed.owner, repo: target.parsed.repo }, target.parsed.number, body);
133
- },
134
- closeGitHubIssue: async (workspaceId, externalId) => {
135
- const target = await resolveWritebackIssue(workspaceId, externalId);
136
- if (!target)
137
- return;
138
- await githubClient.closeIssue(target.installationId, { owner: target.parsed.owner, repo: target.parsed.repo }, target.parsed.number);
139
- },
140
- labelGitHubIssue: async (workspaceId, externalId, label) => {
141
- const target = await resolveWritebackIssue(workspaceId, externalId);
142
- if (!target)
143
- return;
144
- await githubClient.applyIssueLabel?.(target.installationId, { owner: target.parsed.owner, repo: target.parsed.repo }, target.parsed.number, label);
145
- },
146
- }
147
- : {}),
148
- ...(tasks.taskConnectionRepository
149
- ? {
150
- resolveJiraConnection: async (workspaceId) => {
151
- const connection = await tasks.taskConnectionRepository.getByWorkspace(workspaceId, 'jira');
152
- const { baseUrl, accountEmail, apiToken } = connection?.credentials ?? {};
153
- if (!baseUrl || !accountEmail || !apiToken)
154
- return null;
155
- return { baseUrl, accountEmail, apiToken };
156
- },
157
- resolveLinearConnection: async (workspaceId) => {
158
- const connection = await tasks.taskConnectionRepository.getByWorkspace(workspaceId, 'linear');
159
- const { apiKey, token } = connection?.credentials ?? {};
160
- return apiKey || token ? { apiKey, token } : null;
161
- },
162
- }
163
- : {}),
112
+ sourced,
113
+ taskConnectionRepository: tasks.taskConnectionRepository,
164
114
  });
165
115
  let githubGateDeps = {};
166
116
  if (engineVcsClient) {
@@ -218,6 +168,64 @@ export function selectNodeGitHubDeps(input) {
218
168
  }),
219
169
  };
220
170
  }
171
+ const githubModuleDeps = buildNodeGitHubModuleDeps({
172
+ input,
173
+ githubClient,
174
+ });
175
+ return {
176
+ githubClient,
177
+ tasks,
178
+ fileGitHubIssue,
179
+ issueWritebackProvider,
180
+ githubGateDeps,
181
+ githubModuleDeps,
182
+ };
183
+ }
184
+ /**
185
+ * Wire the per-workspace GitLab PAT connect deps: the GitLab-backed `GitHubClient` (its token
186
+ * source decrypts each workspace's sealed PAT) that the `github` module reads through for a
187
+ * `gitlab` connection, plus the `VcsPatConnectionService` the connect controller drives. Enabled
188
+ * only when GitLab is configured AND a sealing key is present. Runtime-neutral inputs, so the
189
+ * Worker facade wires it the same way (per "keep the runtimes symmetric").
190
+ */
191
+ function selectVcsConnectDeps(input) {
192
+ const { config, installations, workspaceRepository, clock } = input;
193
+ const gitlab = config.gitlab;
194
+ if (!gitlab?.enabled || !gitlab.encryptionKey)
195
+ return undefined;
196
+ // One cipher seals (connect) and unseals (token source) under the same domain, so the two
197
+ // instances the client + service build from the same key + info interoperate.
198
+ const cipher = new WebCryptoSecretCipher({
199
+ masterKeyBase64: gitlab.encryptionKey,
200
+ info: 'cat-factory:vcs-token',
201
+ });
202
+ const client = buildGitLabConnectClient({
203
+ installations,
204
+ cipher,
205
+ apiBase: gitlab.apiBase,
206
+ clock,
207
+ });
208
+ const service = new VcsPatConnectionService({
209
+ provider: 'gitlab',
210
+ installations,
211
+ workspaceRepository,
212
+ identityResolver: new GitLabIdentityResolver({ apiBase: gitlab.apiBase }),
213
+ cipher,
214
+ clock,
215
+ });
216
+ return { client, service };
217
+ }
218
+ /**
219
+ * Assemble the deps for the `github` module (installation + the five projections + sync/webhook),
220
+ * including the per-workspace GitLab PAT connect wiring and the provider-routing client that
221
+ * fronts them when BOTH a GitHub App and GitLab connect are configured. Split out of
222
+ * {@link selectNodeGitHubDeps} along the module-deps seam so that selector stays within the
223
+ * per-function line budget, in the same shape as its {@link selectNodeTasksDeps} sibling.
224
+ * Behaviour-neutral: the same values are built in the same order.
225
+ */
226
+ function buildNodeGitHubModuleDeps(args) {
227
+ const { input, githubClient } = args;
228
+ const { config, db, sourced, clock, appRegistry, githubInstallationRepository, repoProjectionRepository, } = input;
221
229
  // GitHub installation + projections + sync/webhook module: wired when the App is
222
230
  // configured (a real githubClient), mirroring the Worker's selectGitHubDeps. This
223
231
  // turns the GitHub read endpoints + the inline webhook/backfill sync on for Node —
@@ -250,7 +258,7 @@ export function selectNodeGitHubDeps(input) {
250
258
  gitlab: gitlabConnectClient,
251
259
  })
252
260
  : (appClient ?? gitlabConnectClient);
253
- const githubModuleDeps = moduleClient
261
+ return moduleClient
254
262
  ? {
255
263
  githubClient: moduleClient,
256
264
  // Surfaced on the container for the GitLab connect controller (a CoreDependency, so it
@@ -296,47 +304,71 @@ export function selectNodeGitHubDeps(input) {
296
304
  : {}),
297
305
  }
298
306
  : {};
299
- return {
300
- githubClient,
301
- tasks,
302
- fileGitHubIssue,
303
- issueWritebackProvider,
304
- githubGateDeps,
305
- githubModuleDeps,
306
- };
307
307
  }
308
308
  /**
309
- * Wire the per-workspace GitLab PAT connect deps: the GitLab-backed `GitHubClient` (its token
310
- * source decrypts each workspace's sealed PAT) that the `github` module reads through for a
311
- * `gitlab` connection, plus the `VcsPatConnectionService` the connect controller drives. Enabled
312
- * only when GitLab is configured AND a sealing key is present. Runtime-neutral inputs, so the
313
- * Worker facade wires it the same way (per "keep the runtimes symmetric").
309
+ * Assemble the issue-tracker writeback provider (comment-on-PR-open + close/label-on-merge of a
310
+ * task's linked issue), gated per workspace + per task inside the provider. GitHub uses the same
311
+ * per-tenant client + installation lookup as the tracker/CI/merge providers; Jira and Linear reuse
312
+ * the workspace's encrypted connection. Split out of {@link selectNodeGitHubDeps} for the
313
+ * per-function line budget, in the same shape as its {@link selectNodeTasksDeps} sibling.
314
314
  */
315
- function selectVcsConnectDeps(input) {
316
- const { config, installations, workspaceRepository, clock } = input;
317
- const gitlab = config.gitlab;
318
- if (!gitlab?.enabled || !gitlab.encryptionKey)
319
- return undefined;
320
- // One cipher seals (connect) and unseals (token source) under the same domain, so the two
321
- // instances the client + service build from the same key + info interoperate.
322
- const cipher = new WebCryptoSecretCipher({
323
- masterKeyBase64: gitlab.encryptionKey,
324
- info: 'cat-factory:vcs-token',
325
- });
326
- const client = buildGitLabConnectClient({
327
- installations,
328
- cipher,
329
- apiBase: gitlab.apiBase,
330
- clock,
331
- });
332
- const service = new VcsPatConnectionService({
333
- provider: 'gitlab',
334
- installations,
335
- workspaceRepository,
336
- identityResolver: new GitLabIdentityResolver({ apiBase: gitlab.apiBase }),
337
- cipher,
338
- clock,
315
+ function buildNodeIssueWriteback(args) {
316
+ const { githubClient, githubInstallationRepository, trackerSettingsRepository, sourced, taskConnectionRepository, } = args;
317
+ // Wired whenever the tracker-settings repo exists (always on Node) so the engine can write
318
+ // back when a tracker is set; the GitHub half resolves the workspace's installation per issue.
319
+ const resolveWritebackIssue = githubClient
320
+ ? async (workspaceId, externalId) => {
321
+ const parsed = githubIssuesLogic.parseGitHubIssueExternalId(externalId);
322
+ if (!parsed)
323
+ return null;
324
+ const installation = await githubInstallationRepository.getByWorkspace(workspaceId);
325
+ if (!installation)
326
+ return null;
327
+ return { installationId: installation.installationId, parsed };
328
+ }
329
+ : undefined;
330
+ return new IssueWritebackService({
331
+ trackerSettingsRepository,
332
+ taskRepository: sourced('taskRepository', (d) => new DrizzleTaskRepository(d)),
333
+ fetchImpl: fetch,
334
+ ...(githubClient && resolveWritebackIssue
335
+ ? {
336
+ commentOnGitHubIssue: async (workspaceId, externalId, body) => {
337
+ const target = await resolveWritebackIssue(workspaceId, externalId);
338
+ if (!target)
339
+ return;
340
+ await githubClient.comment(target.installationId, { owner: target.parsed.owner, repo: target.parsed.repo }, target.parsed.number, body);
341
+ },
342
+ closeGitHubIssue: async (workspaceId, externalId) => {
343
+ const target = await resolveWritebackIssue(workspaceId, externalId);
344
+ if (!target)
345
+ return;
346
+ await githubClient.closeIssue(target.installationId, { owner: target.parsed.owner, repo: target.parsed.repo }, target.parsed.number);
347
+ },
348
+ labelGitHubIssue: async (workspaceId, externalId, label) => {
349
+ const target = await resolveWritebackIssue(workspaceId, externalId);
350
+ if (!target)
351
+ return;
352
+ await githubClient.applyIssueLabel?.(target.installationId, { owner: target.parsed.owner, repo: target.parsed.repo }, target.parsed.number, label);
353
+ },
354
+ }
355
+ : {}),
356
+ ...(taskConnectionRepository
357
+ ? {
358
+ resolveJiraConnection: async (workspaceId) => {
359
+ const connection = await taskConnectionRepository.getByWorkspace(workspaceId, 'jira');
360
+ const { baseUrl, accountEmail, apiToken } = connection?.credentials ?? {};
361
+ if (!baseUrl || !accountEmail || !apiToken)
362
+ return null;
363
+ return { baseUrl, accountEmail, apiToken };
364
+ },
365
+ resolveLinearConnection: async (workspaceId) => {
366
+ const connection = await taskConnectionRepository.getByWorkspace(workspaceId, 'linear');
367
+ const { apiKey, token } = connection?.credentials ?? {};
368
+ return apiKey || token ? { apiKey, token } : null;
369
+ },
370
+ }
371
+ : {}),
339
372
  });
340
- return { client, service };
341
373
  }
342
374
  //# sourceMappingURL=container-github-deps.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"container-github-deps.js","sourceRoot":"","sources":["../src/container-github-deps.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,oBAAoB,EACpB,qBAAqB,EACrB,YAAY,EACZ,kBAAkB,EAClB,uBAAuB,EACvB,iBAAiB,GAClB,MAAM,2BAA2B,CAAA;AAClC,OAAO,EAAE,sBAAsB,EAAE,wBAAwB,EAAE,MAAM,qBAAqB,CAAA;AAmBtF,OAAO,EAIL,iBAAiB,EACjB,6BAA6B,EAC7B,mBAAmB,EACnB,sBAAsB,EACtB,wBAAwB,EACxB,0BAA0B,EAC1B,uBAAuB,EACvB,+BAA+B,EAC/B,wBAAwB,EACxB,2BAA2B,EAC3B,qBAAqB,EACrB,wBAAwB,EACxB,6BAA6B,EAC7B,yBAAyB,GAC1B,MAAM,qBAAqB,CAAA;AAC5B,OAAO,EACL,oBAAoB,EACpB,sBAAsB,EACtB,wBAAwB,EACxB,6BAA6B,GAC9B,MAAM,oBAAoB,CAAA;AAC3B,OAAO,EAAE,yBAAyB,EAAE,MAAM,8BAA8B,CAAA;AAExE,OAAO,EAAE,yBAAyB,EAAE,MAAM,6BAA6B,CAAA;AACvE,OAAO,EACL,iCAAiC,EACjC,mCAAmC,EACnC,i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oBAAoB,CAAC,KAK7B;IACC,MAAM,EAAE,MAAM,EAAE,aAAa,EAAE,mBAAmB,EAAE,KAAK,EAAE,GAAG,KAAK,CAAA;IACnE,MAAM,MAAM,GAAG,MAAM,CAAC,MAAM,CAAA;IAC5B,IAAI,CAAC,MAAM,EAAE,OAAO,IAAI,CAAC,MAAM,CAAC,aAAa;QAAE,OAAO,SAAS,CAAA;IAC/D,0FAA0F;IAC1F,8EAA8E;IAC9E,MAAM,MAAM,GAAG,IAAI,qBAAqB,CAAC;QACvC,eAAe,EAAE,MAAM,CAAC,aAAa;QACrC,IAAI,EAAE,uBAAuB;KAC9B,CAAC,CAAA;IACF,MAAM,MAAM,GAAG,wBAAwB,CAAC;QACtC,aAAa;QACb,MAAM;QACN,OAAO,EAAE,MAAM,CAAC,OAAO;QACvB,KAAK;KACN,CAAC,CAAA;IACF,MAAM,OAAO,GAAG,IAAI,uBAAuB,CAAC;QAC1C,QAAQ,EAAE,QAAQ;QAClB,aAAa;QACb,mBAAmB;QACnB,gBAAgB,EAAE,IAAI,sBAAsB,CAAC,EAAE,OAAO,EAAE,MAAM,CAAC,OAAO,EAAE,CAAC;QACzE,MAAM;QACN,KAAK;KACN,CAAC,CAAA;IACF,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,CAAA;AAC5B,CAAC"}
1
+ {"version":3,"file":"container-github-deps.js","sourceRoot":"","sources":["../src/container-github-deps.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,oBAAoB,EACpB,qBAAqB,EACrB,YAAY,EACZ,kBAAkB,EAClB,uBAAuB,EACvB,iBAAiB,GAClB,MAAM,2BAA2B,CAAA;AAClC,OAAO,EAAE,sBAAsB,EAAE,wBAAwB,EAAE,MAAM,qBAAqB,CAAA;AAmBtF,OAAO,EAIL,iBAAiB,EACjB,6BAA6B,EAC7B,mBAAmB,EACnB,sBAAsB,EACtB,wBAAwB,EACxB,0BAA0B,EAC1B,uBAAuB,EACvB,+BAA+B,EAC/B,wBAAwB,EACxB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AI,CAAA;oBACvD,OAAO,EAAE,OAAO,EAAE,YAAY,EAAE,QAAQ,EAAE,CAAA;gBAC5C,CAAC;gBACD,uBAAuB,EAAE,KAAK,EAAE,WAAmB,EAAE,EAAE;oBACrD,MAAM,UAAU,GAAG,MAAM,wBAAwB,CAAC,cAAc,CAAC,WAAW,EAAE,QAAQ,CAAC,CAAA;oBACvF,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,GAAG,UAAU,EAAE,WAAW,IAAI,EAAE,CAAA;oBACvD,OAAO,MAAM,IAAI,KAAK,CAAC,CAAC,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC,CAAC,CAAC,IAAI,CAAA;gBACnD,CAAC;aACF;YACH,CAAC,CAAC,EAAE,CAAC;KACR,CAAC,CAAA;AACJ,CAAC"}
@@ -17,6 +17,13 @@ export interface NodeRealtimeDepsInput {
17
17
  modelProviderResolver: ModelProviderResolver;
18
18
  resolveWorkspaceModelDefault: (workspaceId: string, agentKind: string, modelPresetId?: string) => Promise<string | undefined>;
19
19
  agentKindRegistry: AgentKindRegistry;
20
+ /**
21
+ * Extra delivery channels contributed by a downstream facade, composed alongside the ones built
22
+ * here. Local mode in mothership mode contributes its `RemoteNotificationChannel` (the org's
23
+ * external transports live on the mothership), so a laptop-raised notification still reaches
24
+ * the team's Slack. Empty/absent on a stock Node deployment.
25
+ */
26
+ extraNotificationChannels?: NotificationChannel[];
20
27
  }
21
28
  /**
22
29
  * The real-time event-publisher + notification-channel + optional consensus wrap of the Node
@@ -29,6 +36,7 @@ export declare function buildNodeRealtimeDeps(input: NodeRealtimeDepsInput): {
29
36
  executionEventPublisher: FanOutEventPublisher | undefined;
30
37
  agentExecutor: AgentExecutor;
31
38
  notificationChannel: NotificationChannel | undefined;
39
+ externalNotificationChannel: NotificationChannel | undefined;
32
40
  };
33
41
  export {};
34
42
  //# sourceMappingURL=container-realtime-deps.d.ts.map