feat(server): ServerModule skeleton with shared ServerContext, worker runs engine + outbox relay (B6)

modules/{auth-settings,sources-identity,acquisition-organize,agent} placeholders listed in
SERVER_MODULES; ServerModule registers routes (under /api/v1, authenticated), tasks,
outbox routes, capabilities and background loops. bootstrap() builds ServerContext (db,
config, logger, events, engine, outbox writer, secrets placeholder, settings reader,
capability registry), fills unregistered tasks with stubs and rejects duplicate task or
outbox ownership. worker starts the OpenWorkflow worker, OutboxRelay and module start().
--role migrate also migrates the engine schema; api/worker connect without migrating.
tasks: TaskRegistry.has, migrateEngineSchema.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
rootandClaude Opus 5.5 committed 2026-09-27 19:30:55 +08:00
1 parent ef3998767c
commit 9858b8494d
23 files changed
+829 -22

No files matched your search

@@ -0,0 +1,12 @@
import type { ServerModule } from "../types.ts";
/**
* W2-B 来源/身份/元数据:site、site_account、feed_source;ingestFeed / resolveObservation / refreshMetadata;
* observation/source_release 写入与去重;身份解析、待识别池与 decision;站点工作台 API。
* 发出 release.resolved、decision.created(经 ctx.outbox.emit)。
*/
export const sourcesIdentityModule: ServerModule = {
name: "sources-identity",
registerRoutes() {},
registerTasks() {},
};