Expand description
ChatEngineModule — Phase 15 integration entrypoint.
Wires the per-feature services produced by Phases 1-13, mounts the
REST surface assembled by Phase 14, and runs the retention-cleanup
background task on a tokio::time::interval driven by a
CancellationToken.
§Topology
GearCtx ─▶ ChatEngineModule::new() (deferred wiring lives in init())
│
├── ChatEngineConfig ─ validated
├── toolkit-db Db ── sea_orm::DatabaseConnection
├── SeaORM repos (session, message, reaction, plugin_config,
│ session_type)
├── ClientHub (registers LlmGatewayPlugin + WebhookCompatPlugin
│ under `ChatEngineBackendPlugin`)
├── domain services (PluginService, SessionService, MessageService,
│ VariantService, IntelligenceService,
│ ReactionService, SearchService, ExportService)
└── REST router (api::rest::register_routes + Extension DI)
serve(cancel, ready)
├── spawn retention-cleanup task (tokio::time::interval)
├── ready.notify()
└── await cancel.cancelled() → graceful shutdownStructs§
- Chat
Engine Module - Chat Engine module entrypoint.
Constants§
- DEFAULT_
WEBHOOK_ COMPAT_ INSTANCE_ ID - GTS plugin instance ID used to register the default
WebhookCompatPlugininstance. Operators that want multiple webhook bindings can register additionalWebhookCompatPlugininstances themselves; the default one is keyed under this stable id.