Skip to main content

Module module

Module module 

Source
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 shutdown

Structs§

ChatEngineModule
Chat Engine module entrypoint.

Constants§

DEFAULT_WEBHOOK_COMPAT_INSTANCE_ID
GTS plugin instance ID used to register the default WebhookCompatPlugin instance. Operators that want multiple webhook bindings can register additional WebhookCompatPlugin instances themselves; the default one is keyed under this stable id.