-
Notifications
You must be signed in to change notification settings - Fork 11
[spec ⑥] WebChat 多租户收尾 — 前端一等公民化 + 后端潜伏接线 + 文档同步 #760
Copy link
Copy link
Open
Labels
area/sessionScope: session manager, state machine, store, poolScope: session manager, state machine, store, poolarea/webchatScope: Next.js UI, runtime adapter, componentsScope: Next.js UI, runtime adapter, componentsenhancementFeature: new capabilities or improvementsFeature: new capabilities or improvementsepicEpic: large feature tracking across multiple PRsEpic: large feature tracking across multiple PRs
Metadata
Metadata
Assignees
Labels
area/sessionScope: session manager, state machine, store, poolScope: session manager, state machine, store, poolarea/webchatScope: Next.js UI, runtime adapter, componentsScope: Next.js UI, runtime adapter, componentsenhancementFeature: new capabilities or improvementsFeature: new capabilities or improvementsepicEpic: large feature tracking across multiple PRsEpic: large feature tracking across multiple PRs
背景
WebChat 多租户线路图 spec ①-⑤ 后端已全部合入(#746 / #748 / #753 / #757 / #755)。spec ⑥(前端一等公民化)是线路图最后一个 spec,也是愿景达成的集大成环节。本 issue 跟踪从最后一个 PR(#757 spec ④ 企业 SSO)到线路图愿景完成的所有剩余代办。
A. 后端潜伏接线(spec ⑥ 前端的前提 · 端到端跑通的硬依赖)
internal/gateway/workspace_handlers.go已实现Create/List/Get/Update/Delete五方法,但cmd/hotplex/routes.go未注册任何/api/workspaces*路由(grep 仅见传入WorkspaceStore,无mux.Handle)→ 潜伏代码。internal/gateway/conn.go无任何WorkspaceID引用,WS 协议创建的 session 绕过 workspace 隔离 + session key 方案3 分叉。api.go:237-240),WS init 路径未对齐。internal/security/auth.go:80 AuthenticateRequest(API key)不查users.status,cookie auth 同理。登录入口(local/oauth)已查 disabled,但已认证 session 在有效期内(cookie 7d / API key 永久)disable 用户仍可访问。internal/security/cookie.go:52仍rand.Read内存生成 secret,重启即失效,所有已登录用户被踢;多实例也无法共享。POST /api/sessions已强制workspace_id(api.go:237-240),webchat 前端尚未发送 → 当前 webchat REST 建会话可能 400。需先确认对现有 webchat 流程的影响,再由 spec ⑥ 前端对齐。B. spec ⑥ 前端一等公民化(主体工作)
GET /api/auth/oauth/providers)/api/workspacesCRUD)worker_preference)agent_config_overrides)internal/gateway/oauth_handlers.go:175,254留有spec ⑥注释)C. 文档同步(可立即做,不阻塞)
docs/specs/README.md索引滞后:Roadmap/Foundation 仍标proposed/draft 0%(实际完成);缺 spec ②③④⑤ 四个子 spec 索引行;状态统计数字失真。docs/specs/WebChat-Multitenancy-Roadmap-Spec.md正文 §3 阶段B表格 spec ④ 未标 ✅、§4 spec ④ 详述未标完成(与头部 L4 已更新不一致)。D. 遗留 / 升级时处理
DeriveSessionKey派生键断裂(升级孤儿行,spec ① R9 跟进项 ✨ feat(gateway,webchat): OpenCode CLI/Server workers, webchat UI, persistent sessions, and platform messaging extension #6)参考
WebChat-Multitenancy-Roadmap-Spec.md