fix: resolve build errors in pass_mgr, pcexec, and safe-restart

- Fix Go syntax error: use BoolVar for --username flag instead of string
- Fix TypeScript type errors: filter undefined values from process.env
- Fix TypeScript type error: add type assertion for fetch response
- Add .gitignore to exclude node_modules and build outputs
This commit is contained in:
zhi
2026-03-05 10:00:30 +00:00
parent 849effd301
commit 28af11cfbb
9 changed files with 8811 additions and 15 deletions

71
TEST_PLAN.md Normal file
View File

@@ -0,0 +1,71 @@
# PaddedCell 测试计划 - 2026-03-05
## 当前状态
- 代码已推送到 `dev/zhi` 分支
- install.mjs 安装脚本已完成
- 准备进行安装测试
## 测试步骤
### 1. 安装脚本测试
```bash
cd /root/.openclaw/workspace-developer/PaddedCell
node install.mjs --verbose
```
### 2. 验证安装
- [ ] pass_mgr 二进制可执行
- [ ] pcexec 模块存在
- [ ] safe-restart 模块存在
- [ ] manifest.json 已创建
### 3. pass_mgr 功能测试
```bash
# 初始化
pass_mgr admin init
# 设置测试密码
pass_mgr set test_key test_password --username testuser
# 获取密码
pass_mgr get test_key
# 获取用户名
pass_mgr get test_key --username
# 生成新密码
pass_mgr generate new_key --username newuser
# 轮换密码
pass_mgr rotate new_key
# 删除密码
pass_mgr unset test_key
```
### 4. pcexec 功能测试
- 测试密码脱敏功能
- 测试多次 pass_mgr get 替换
### 5. safe-restart 功能测试
- 测试状态机
- 测试 API 接口
## 可能遇到的问题
1. **Go 依赖问题** - 需要确保 go mod tidy 能正常下载依赖
2. **Node.js 构建问题** - npm install 可能需要较长时间
3. **权限问题** - 二进制可能需要 chmod +x
## 重启后计划
如果测试过程中需要重启 OpenClaw gateway重启后我需要
1. **验证环境变量** - 检查 PATH 和 PADDEDCELL_SKILLS_DIR 是否正确设置
2. **继续安装测试** - 重新运行 install.mjs 或验证已安装组件
3. **功能测试** - 测试 pass_mgr/pcexec/safe-restart 是否正常工作
4. **记录结果** - 更新此文件,记录测试通过/失败项
## 阻塞点
当前无阻塞,可以立即开始测试。