feat(gateway): wire real services into Gateway API handlers

- Router accepts full Dependencies (memory/voice/orchestrator/WShub)
- Memory API: CRUD + search endpoints with PostgreSQL persistence
- Voice API: STT/TTS endpoints
- Admin dashboard: real uptime + service status
- WebSocket chat: routes to AI-Core orchestrator pipeline
- APIAdapter bridges memory domain model to REST interface
- Smoke test: memory CRUD + session creation verified
This commit is contained in:
Aska committed 2026-08-12 12:04:31 +08:00
1 parent 4a71965686
commit 6811480786
5 files changed
+448 -111

No files matched your search

+15 -2
View File
@@ -177,9 +177,22 @@ func main() {
// === 12. Gateway ===
authMgr := api.NewStubAuthManager()
apiRouter := api.New(authMgr)
wsHub := ws.NewHub()
// Build dependencies for gateway handlers
gwDeps := api.Dependencies{
AuthMgr: authMgr,
Orchestrator: orch,
}
if memSvc != nil {
gwDeps.MemorySvc = memory.NewAPIAdapter(memSvc)
}
gwDeps.VoiceSvc = voiceSvc
wsHub := ws.NewHub(orch)
gwDeps.WSHub = wsHub
apiRouter := api.New(gwDeps)
wsMux := http.NewServeMux()
wsMux.HandleFunc("/ws/chat", wsHub.UpgradeHandler())