refactor: consolidate chat state and task bridges

Centralize session scope, chat projections and typed task bridges.
Keep historical interaction replies authoritative and publish terminal state to subscribers. Validate Server contracts before replacing generated artifacts.
This commit is contained in:
2026-11-09 17:55:00 +08:00
parent addc81e106
commit 6279a4b555
31 changed files with 849 additions and 522 deletions
+2 -1
View File
@@ -11,7 +11,8 @@
"dev": "bun --watch src/server.ts",
"build": "bun run check",
"generate:openapi": "openapi-typescript openapi/openapi.json -o src/generated/server-api.d.ts",
"check:openapi": "bun run generate:openapi && git diff --exit-code -- openapi/openapi.json src/generated/server-api.d.ts",
"check:openapi": "bun scripts/server-contract.ts",
"sync:openapi": "bun scripts/server-contract.ts --sync",
"check": "bun run typecheck && bun run typecheck:opencode",
"check:models": "bun scripts/check-models.ts",
"check:websearch": "bun scripts/check-websearch.ts",