feat: add install script and update project docs
- Add install.mjs: unified installer with dependency check, build, install, config - Update PROJECT_PLAN.md: add section 6 for installation script requirements - Update AGENT_TASKS.md: add T-7001~T-7005 for installation tasks - Support flags: --prefix, --build-only, --skip-check, --verbose
This commit is contained in:
@@ -244,6 +244,50 @@ Request:
|
||||
- 任务分配清单
|
||||
- 测试用例列表
|
||||
|
||||
## 6. 安装脚本
|
||||
|
||||
### 6.1 需求
|
||||
提供统一的插件安装脚本 `install.mjs`,实现以下功能:
|
||||
|
||||
**检测与依赖**
|
||||
- 检测系统平台 (Linux/macOS)
|
||||
- 检测必要依赖 (Node.js, Go, openclaw CLI)
|
||||
- 检测 openclaw 配置目录
|
||||
|
||||
**构建**
|
||||
- 自动构建 pass_mgr Go 二进制
|
||||
- 自动构建 pcexec TypeScript 模块
|
||||
- 自动构建 safe-restart TypeScript 模块
|
||||
|
||||
**安装**
|
||||
- 安装 pass_mgr 到系统 PATH (或 openclaw bin 目录)
|
||||
- 安装 TypeScript 模块到 openclaw skills 目录
|
||||
- 创建必要的配置文件和目录
|
||||
|
||||
**配置**
|
||||
- 初始化 pass_mgr admin (引导用户设置 admin 密码)
|
||||
- 配置环境变量
|
||||
- 注册 safe-restart API 服务
|
||||
|
||||
**验证**
|
||||
- 验证所有组件安装成功
|
||||
- 输出安装摘要和下一步操作提示
|
||||
|
||||
### 6.2 使用方式
|
||||
```bash
|
||||
# 默认安装
|
||||
node install.mjs
|
||||
|
||||
# 指定安装路径
|
||||
node install.mjs --prefix /usr/local
|
||||
|
||||
# 仅构建不安装
|
||||
node install.mjs --build-only
|
||||
|
||||
# 跳过依赖检测
|
||||
node install.mjs --skip-check
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
> 更新日志:v0.1(基于当前需求整理)
|
||||
|
||||
Reference in New Issue
Block a user