refactor(web): rewrite webserver as a plain route-registration plugin

HttpServerService provides ctx.httpServer: register(route) -> disposer
(duplicate patterns throw), tapIndex transforms in registration order, and
the bound port; matching is exact > longest prefix > static dist fallback
(403/405/SPA semantics preserved). The server listens on activation, answers
per-request failures with 400 + a log line instead of exiting the process,
and knows no harness concepts — the boot graph, bundle routes, SSE channel,
and /api prefix all moved to their owning plugins.
This commit is contained in:
imccyu
2026-07-25 01:18:29 +08:00
parent 3cad7f6957
commit f499872cec
10 changed files with 194 additions and 1449 deletions
+4 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@deepseek-ai/dsh-host-webserver",
"description": "Web-shape HTTP carrier: static file serving plus the /api/* bridge to an injected fetch-shaped handler (SSE streamed through)",
"description": "Plain HTTP route-registration plugin: named-route registry (webServer service) + index transform taps + static dist fallback; knows no harness concepts",
"version": "0.0.1",
"private": true,
"type": "module",
@@ -30,6 +30,9 @@
"cordis": "^4.0.0-rc.7",
"@deepseek-ai/dsh-invariants": "^0.0.1"
},
"dependencies": {
"schemastery": "^3.18.0"
},
"devDependencies": {
"cordis": "^4.0.0-rc.7",
"@deepseek-ai/dsh-invariants": "workspace:^"