d6ae4dbe13
前端从 mock 切换到真实数据源(按 ⑧ 前端 API 契约,复用现有 :4517 daemon API): - src/api.js:REST 封装 + WS 单向订阅(断线指数退避重连) - src/adapt.js:纯映射层,把 API 的 camelCase 行映射成各 surface 期望形状 (扁平任务→children 树、priority 整数→P0/1/2、complexity→cplx、终态→归档卡) - src/app.jsx:改为 useEffect 拉取 + WS 增量刷新;decide/sync 走真实 POST; 审批闸收紧到 plan/spec/exec_review 三态(needs_attention 仍在任务树可见) - vite.config.js:加 /api + /ws 反代到 :4517;去掉 jsxInject(surface 走全局 React,避免生产构建 rollup 从 design/ 解析 react 失败) - main.jsx:移除 data.js mock 导入 验证:dev + 生产构建双通过;真实数据渲染(4 项目/审批闸带 diff/真实配额), WS 已连接,0 console 错误。token/成本类(agentSummary)属 ⑧ ★ 新 /api/usage (预算特性),暂留空待补。 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>