ConusAI vendor v0.1.0-beta.114
ci / gate (push) Waiting to run

This commit is contained in:
ConusAI vendor v0.1.0-beta.114
2026-11-14 09:56:45 +00:00
commit 1ce8d23c35
867 changed files with 122104 additions and 0 deletions
+24
View File
@@ -0,0 +1,24 @@
// SPDX-License-Identifier: LicenseRef-ConusAI-Template-1.0
// The worker's composition root for what runs beside `createPostgresWorker` (spec §2): this app's modules
// and ports on `@conusai-kit/host/worker`. The seed job builds on it.
import { type AppEnv, businessServiceComposition, type ServerObservability } from "@app/config"
import { appModules } from "@app/modules"
import { buildPostgresWorkerRuntime, type WorkerRuntime } from "@conusai-kit/host/worker"
import { bindModulePorts, nativeHelpSelectors } from "./ports.js"
export type { WorkerRuntime }
export function buildWorkerRuntime(env: AppEnv, observe: ServerObservability): WorkerRuntime {
const postgres = env.postgres
if (!postgres) throw new Error("The selected profile has no Postgres worker")
const runtime = buildPostgresWorkerRuntime({ modules: appModules, env: { ...env, postgres }, observe })
bindModulePorts(
runtime.container,
runtime.platform,
runtime.registry,
businessServiceComposition(env, appModules, "postgres", { model: runtime.platform.model, ...nativeHelpSelectors })
.serviceReadiness,
)
return runtime
}