refactor: extract shared HTTP routes into @openchatlab/http-routes package

Migrate 30+ endpoints from apps/cli/src/http/ to packages/http-routes/
with a platform-agnostic HttpRouteContext DI interface, enabling future
reuse by Electron Internal Server.

Batch 1: auth, errors, context, sessions, members, preferences
Batch 2: analytics, sql, session-index, export, nlp
Batch 3: REST system, REST sessions

Includes 7 smoke tests via Fastify inject covering /api/v1/* and /_web/*
route groups.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
diguaandCursor committed 2026-06-02 15:41:21 +08:00
1 parent cd3ae8c5ba
commit a8f0d5cb88
26 files changed
+347 -128

No files matched your search

+2 -1
View File
@@ -13,6 +13,7 @@
"../../packages/parser/**/*",
"../../packages/tools/**/*",
"../../packages/sync/**/*",
"../../packages/mcp-server/**/*"
"../../packages/mcp-server/**/*",
"../../packages/http-routes/**/*"
]
}