Commit Graph

1 Commits

Author SHA1 Message Date
582f292114 feat(release): 新增开箱启动脚本 setup.sh / start.sh(P4 第一步)
为 release 开箱即用提供入口,把首启向导串进启动流程。Python/Node 均
依赖系统已装运行时(不内置解释器),便携包只带源码 + venv 创建逻辑。

- _bootstrap.sh: 共享引导逻辑(被 source)
  - ensure_python_env: 系统 python 建/复用 .venv,装 requirements.lock.txt
  - ensure_node_env: 系统 node 装 easyagent 依赖 + 前端构建(缺失才装)
  - has_env_file: 首启判断
- setup.sh: 初始化入口 → 备好环境 → 跑 python -m scripts.setup 向导
- start.sh: 启动入口 → 备好环境 → 无 .env 自动跑向导 → python -m server.app
  (透传参数给 server.app,如 --thinking-mode)
- CLAUDE.md: Build & Run 增加开箱方式(./setup.sh / ./start.sh)与
  requirements.lock 说明

验证:bash -n 语法通过;_bootstrap 函数逻辑(ROOT 定位 / 选系统 python /
has_env_file / node_modules 已存在时跳过)实测正确;setup 向导在系统
Python 3.9 下端到端跑通(含写文件),确认 from __future__ annotations
使新式类型注解在 3.9 兼容。

注:实际「建 venv + 联网装依赖 + 解压验证」需在本机网络环境执行;
沙箱内仅做了不联网的逻辑校验。

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-01 17:19:45 +08:00