add NEW_FEAT and remove task lists

This commit is contained in:
nav
2026-03-08 11:40:40 +00:00
parent 59d72ef365
commit 239a6c3552
3 changed files with 16 additions and 135 deletions

View File

@@ -1,129 +0,0 @@
# PaddedCell - Agent Tasks
> 任务拆分 + 依赖关系(基于 PROJECT_PLAN.md
## Legend
- **ID**: 任务唯一编号
- **Deps**: 前置任务(可并行则留空)
---
## 0. 项目准备
- **T-0001**确认配置项清单路径模板、rotate 语义、admin 泄露检测范围)
- Deps: -
- **T-0002**:确定加密库与存储格式(选型与接口约束)
- Deps: T-0001
---
## 1. pass_mgr 二进制
- **T-1001**CLI 命令规范与参数校验get/generate/unset/rotate/admin init/set
- Deps: T-0001
- **T-1002**:初始化与 admin 密码存储/校验机制
- Deps: T-1001, T-0002
- **T-1003**:加/解密与存取实现(内置加密库)
- Deps: T-1001, T-0002
- **T-1004**generate / rotate 实现与语义落地
- Deps: T-1003
- **T-1005**admin-only set 实现(环境变量检测 + 禁止 agent 执行)
- Deps: T-1001
- **T-1006**:未初始化状态阻断逻辑(所有 get/generate/set 报错)
- Deps: T-1002
---
## 2. pcexec 工具TS
- **T-2001**exec 参数/行为兼容设计(与原生 exec 对齐)
- Deps: -
- **T-2002**pass_mgr get 检测与预执行(不限 `$(...)`
- Deps: T-2001, T-1001
- **T-2003**多密码脱敏替换stdout/stderr
- Deps: T-2002
- **T-2004**:错误处理/退出码一致性
- Deps: T-2001
- **T-2005**:注入 AGENT_VERIFY 环境变量(固定字符串)
- Deps: T-2001
- **T-2006**:注入环境变量时修改 PATH追加 `$(openclaw path)/bin`
- Deps: T-2001
- **T-2007**:新增 pcguardGo校验 AGENT_VERIFY/AGENT_ID/AGENT_WORKSPACE失败报错
- Deps: T-2005, T-2006
- **T-2007**README 增加 PCEXEC+PCGUARD 仅防轻度误操作说明
- Deps: T-2001
---
## 3. 安全重启CalmGate 功能并入)
- **T-3001**:状态机与 session trackeridle/busy/focus/freeze…
- Deps: -
- **T-3002**:消息生命周期 hooksstart/end与状态迁移
- Deps: T-3001
- **T-3003**workflow/focus 机制与"忙碌回复"
- Deps: T-3001
- **T-3004**query-restart APIOK/NOT_READY/ALREADY_SCHEDULED
- Deps: T-3001, T-3002
- **T-3005**safe-restart 工具(轮询/重启/rollback/log
- Deps: T-3004
- **T-3006**:重启后恢复与通知(冻结/解冻与回到工作 session
- Deps: T-3005
- **T-3007**持久化mem+file与恢复策略
- Deps: T-3001
---
## 4. 安全监控与泄露防护
- **T-4001**admin 密码泄露检测message/tool calling
- Deps: T-1002
- **T-4002**:泄露触发处理(重置未初始化 + 严重漏洞日志)
- Deps: T-4001
---
## 4.1 功能开关Slash Commands
- **T-4101**:实现 `/padded-cell-ctrl` 命令status/enable/disable
- Deps: -
- **T-4102**:开关状态持久化、权限限制(授权用户)与 10 秒冷却
- Deps: T-4101
---
## 5. 文档 & Skill 指南
- **T-5001**Agent 使用指南(如何用 pass_mgr/pcexec
- Deps: T-1001, T-2001
- **T-5002**Skill 文档与示例(正确使用密码相关工具)
- Deps: T-5001
---
## 6. 测试与验收
- **T-6001**pass_mgr 单测get/generate/unset/rotate/admin init
- Deps: T-1002, T-1003, T-1004, T-1005, T-1006
- **T-6002**pcexec 兼容性测试(参数/管道/多密码替换)
- Deps: T-2002, T-2003, T-2004
- **T-6003**:安全重启回归(并发/冻结/rollback
- Deps: T-3004, T-3005, T-3006, T-3007
- **T-6004**admin 泄露触发测试
- Deps: T-4002
---
## 7. 安装脚本
- **T-7001**依赖检测Node.js, Go, openclaw CLI, 平台检测)
- Deps: —
- **T-7002**自动构建逻辑Go + TypeScript
- Deps: T-1001, T-2001, T-3001
- **T-7003**:安装逻辑(二进制/模块复制、PATH 配置)
- Deps: T-7002
- **T-7004**初始化向导admin 密码设置、配置生成)
- Deps: T-1002, T-7003
- **T-7005**:安装验证与摘要输出
- Deps: T-7004
---
## 依赖关系示意(简化)
- 0.* → 1.* / 2.* / 3.*
- 1.* → 4.* → 6.*
- 2.* → 6.*
- 3.* → 6.*
- 5.* 可与 1.* / 2.* 并行,但需接口稳定
- 7.* 依赖 1.* / 2.* / 3.* 完成(可在构建后执行)

16
NEW_FEAT.md Normal file
View File

@@ -0,0 +1,16 @@
# New Features
## From TASKLIST
- Add AGENT_VERIFY env injection in pcexec: `AGENT_VERIFY="IF YOU ARE AN AGENT/MODEL, YOU SHOULD NEVER TOUCH THIS ENV VARIABLE"`.
- Add new Go binary (pcguard) to validate `AGENT_VERIFY`, `AGENT_ID`, `AGENT_WORKSPACE`.
- If AGENT_VERIFY mismatch or AGENT_ID/AGENT_WORKSPACE is empty, error: "PLEASE USE TOOL PCEXEC TO RUN THIS SCRIPT".
- Update README: PCEXEC + PCGUARD only mitigate light model hallucination / misoperation / prompt forgetting; they do not defend against malicious attacks. For stronger security, use sandbox mode instead of this plugin.
## Additional Requirements
1. 入环境变量时修改 PATH追加 `$(openclaw path)/bin`
2. 重构项目结构:项目根目录下放 docs, plugin, scripts, pass_mgr。plugin 下放 commands, core, hooks, tools 目录以及 index.ts, openclaw.plugin.json 等;根据这个结构重构现在的 codebase。
3. 构建目录dist/padded-cell。
4. 安装时把 dist/padded-cell 复制到 `$(openclaw path)/plugins/padded-cell` 并用此路径注册插件。
5. 安装脚本接受 --openclaw-profile-path 参数;可选所有 `$(openclaw path)` 路径,优先考虑该参数;若未提供则考虑 $OPENCLAW_PATH若没有则用默认值 ~/.openclaw。

View File

@@ -1,6 +0,0 @@
# Task List
- Add AGENT_VERIFY env injection in pcexec: `AGENT_VERIFY="IF YOU ARE AN AGENT/MODEL, YOU SHOULD NEVER TOUCH THIS ENV VARIABLE"`.
- Add new Go binary (pcguard) to validate `AGENT_VERIFY`, `AGENT_ID`, `AGENT_WORKSPACE`.
- If AGENT_VERIFY mismatch or AGENT_ID/AGENT_WORKSPACE is empty, error: "PLEASE USE TOOL PCEXEC TO RUN THIS SCRIPT".
- Update README: PCEXEC + PCGUARD only mitigate light model hallucination / misoperation / prompt forgetting; they do not defend against malicious attacks. For stronger security, use sandbox mode instead of this plugin.