Commit Graph

4 Commits

Author SHA1 Message Date
66fa90d6cc feat(server): headless 启动入口(Gateway 专用路由面)+ approval 拆独立蓝图
- 新增 server/headless_app.py:仅挂 gateway/tasks/status/approval/usage 五件蓝图,
  无 web 站点路由面(/login、会话管理、静态页全砍),根路径返回 HTML 告知页;
  供 CLI 探测无服务时 spawn(同 RuntimeService 单例/数据目录/端口 8091,
  与 full 形态互斥不并存)
- server/chat/approval.py 拆出 approval_bp(tool/plan/question 6 条路由 URL 不变),
  解除对 chat_bp 的 import 循环,full/headless 双形态共用
- cli/src/gateway.ts:spawn 切 server.headless_app;python 解释器改 pickPython
  依赖探测(import yaml/flask 逐个试 .venv → homebrew 3.12/3.11 → python3),
  修本机 .venv 缺 pyyaml 导致的自启动即崩
- 修复 socket 移除残留雷:make_terminal_callback 定义随 broadcast.py 被删,
  workflow_runtime_api 模块级 import 即炸;resources.py 补兼容空操作(恒返 None)
- AGENTS.md §2 补 headless 启动命令、§12.5 补兼容空操作与 headless 形态说明

验证:tsc  py_compile  冒烟 6/6  headless 装配 47 路由 
8093 真实冒烟(health/Bearer/404 面/告知页)

Co-authored-by: Astrion powered by Kimi-K3 <astrion-agent@users.noreply.github.com>
2026-09-11 19:00:22 +08:00
d97c1423b1 feat(cli): rewrite CLI on opentui with Gateway host Bearer channel
- replace Ink implementation with opentui + React 19 (old version kept at cli/legacy-ink-src/ for field reference)
- all traffic goes through Gateway host Bearer token; workspace bound via X-Astrion-Workspace-Id header
- auto-spawn server only when no instance is alive (never kill/restart running ones); stale server without token is detected
- astrion launcher (bin/astrion, symlink-aware, --version/--help fast-exit)
- slash menu panels (session/model/mode/permission/path/context/approvals...) with shared selector component
- backend: host workspace list/create dual-channel endpoints, host token generated at startup
- i18n reads OS locale at startup (zh/en)

Co-authored-by: Astrion powered by Kimi-K3 <astrion-agent@users.noreply.github.com>
2026-09-11 17:27:53 +08:00
0381557fe9 feat(runtime): 客户端事件窗口缺口处理——Web 快照对账 + CLI 窗口对齐
- Web stores/task.ts:检测 offset < window_start 发合成事件
  event_window_gap(复用 runtime_queue_sync 解耦模式)
- lifecycle.ts 新增 case:fetchAndDisplayHistory({force:true})
  会话 JSON 权威重读对账(协议 §5.4)+ toast 提示
- i18n:stores.eventWindowGap / eventWindowGapReload(zh/en)
- CLI api.ts TaskPollResult 补 window_start;App.tsx pollTask
  检测后提示用户并对齐窗口续读
- 协议文档 §5.2 标注客户端兑现状态

验证:i18n 栏杆通过;CLI typecheck+build 通过;改动文件
eslint 0 errors;前端 vite build 受沙箱读边界限制未跑
(PostCSS 搜索 /Users/jojo/package.json EPERM,环境问题)
2026-09-08 08:59:01 +08:00
10654c407d release: sync from main @0f9fd1b2 (2026-08-22) 2026-08-22 12:27:19 +08:00