fix: remove bundled soul-evil hook (closes #8776) (#14757)

* fix: remove bundled soul-evil hook (closes #8776)

* fix: remove soul-evil docs (#14757) (thanks @Imccccc)

---------

Co-authored-by: OpenClaw Bot <bot@openclaw.ai>
Co-authored-by: Peter Steinberger <steipete@gmail.com>
This commit is contained in:
Tyler
2026-02-13 01:52:09 +08:00
committed by GitHub
parent 971ac0886b
commit 4c86010b06
16 changed files with 9 additions and 981 deletions
+1 -38
View File
@@ -48,12 +48,11 @@ hooks 系统允许你:
### 捆绑的 Hooks
OpenClaw 附带个自动发现的捆绑 hooks
OpenClaw 附带个自动发现的捆绑 hooks
- **💾 session-memory**:当你发出 `/new` 时将会话上下文保存到智能体工作区(默认 `~/.openclaw/workspace/memory/`
- **📝 command-logger**:将所有命令事件记录到 `~/.openclaw/logs/commands.log`
- **🚀 boot-md**:当 Gateway 网关启动时运行 `BOOT.md`(需要启用内部 hooks
- **😈 soul-evil**:在清除窗口期间或随机机会下将注入的 `SOUL.md` 内容替换为 `SOUL_EVIL.md`
列出可用的 hooks
@@ -533,42 +532,6 @@ grep '"action":"new"' ~/.openclaw/logs/commands.log | jq .
openclaw hooks enable command-logger
```
### soul-evil
在清除窗口期间或随机机会下将注入的 `SOUL.md` 内容替换为 `SOUL_EVIL.md`
**事件**`agent:bootstrap`
**文档**[SOUL Evil Hook](/hooks/soul-evil)
**输出**:不写入文件;替换仅在内存中发生。
**启用**
```bash
openclaw hooks enable soul-evil
```
**配置**
```json
{
"hooks": {
"internal": {
"enabled": true,
"entries": {
"soul-evil": {
"enabled": true,
"file": "SOUL_EVIL.md",
"chance": 0.1,
"purge": { "at": "21:00", "duration": "15m" }
}
}
}
}
}
```
### boot-md
当 Gateway 网关启动时运行 `BOOT.md`(在渠道启动之后)。
+1 -14
View File
@@ -39,13 +39,12 @@ openclaw hooks list
**示例输出:**
```
Hooks (4/4 ready)
Hooks (3/3 ready)
Ready:
🚀 boot-md ✓ - Run BOOT.md on gateway startup
📝 command-logger ✓ - Log all command events to a centralized audit file
💾 session-memory ✓ - Save session context to memory when /new command is issued
😈 soul-evil ✓ - Swap injected SOUL content during a purge window or by random chance
```
**示例(详细模式):**
@@ -284,18 +283,6 @@ grep '"action":"new"' ~/.openclaw/logs/commands.log | jq .
**参见:** [command-logger 文档](/automation/hooks#command-logger)
### soul-evil
在清除窗口期间或随机情况下,将注入的 `SOUL.md` 内容替换为 `SOUL_EVIL.md`
**启用:**
```bash
openclaw hooks enable soul-evil
```
**参见:** [SOUL Evil 钩子](/hooks/soul-evil)
### boot-md
在 Gateway 网关启动时(渠道启动后)运行 `BOOT.md`
-72
View File
@@ -1,72 +0,0 @@
---
read_when:
- 你想要启用或调整 SOUL Evil 钩子
- 你想要设置清除窗口或随机概率的人格替换
summary: SOUL Evil 钩子(将 SOUL.md 替换为 SOUL_EVIL.md
title: SOUL Evil 钩子
x-i18n:
generated_at: "2026-02-01T20:42:18Z"
model: claude-opus-4-5
provider: pi
source_hash: cc32c1e207f2b6923a6ede8299293f8fc07f3c8d6b2a377775237c0173fe8d1b
source_path: hooks/soul-evil.md
workflow: 14
---
# SOUL Evil 钩子
SOUL Evil 钩子在清除窗口期间或随机概率下,将**注入的** `SOUL.md` 内容替换为 `SOUL_EVIL.md`。它**不会**修改磁盘上的文件。
## 工作原理
`agent:bootstrap` 运行时,该钩子可以在系统提示词组装之前,在内存中替换 `SOUL.md` 的内容。如果 `SOUL_EVIL.md` 缺失或为空,OpenClaw 会记录警告并保留正常的 `SOUL.md`
子智能体运行**不会**在其引导文件中包含 `SOUL.md`,因此此钩子对子智能体没有影响。
## 启用
```bash
openclaw hooks enable soul-evil
```
然后设置配置:
```json
{
"hooks": {
"internal": {
"enabled": true,
"entries": {
"soul-evil": {
"enabled": true,
"file": "SOUL_EVIL.md",
"chance": 0.1,
"purge": { "at": "21:00", "duration": "15m" }
}
}
}
}
}
```
在智能体工作区根目录(`SOUL.md` 旁边)创建 `SOUL_EVIL.md`
## 选项
- `file`(字符串):替代的 SOUL 文件名(默认:`SOUL_EVIL.md`
- `chance`(数字 01):每次运行使用 `SOUL_EVIL.md` 的随机概率
- `purge.at`(HH:mm):每日清除开始时间(24 小时制)
- `purge.duration`(时长):窗口长度(例如 `30s``10m``1h`
**优先级:** 清除窗口优先于随机概率。
**时区:** 设置了 `agents.defaults.userTimezone` 时使用该时区;否则使用主机时区。
## 注意事项
- 不会在磁盘上写入或修改任何文件。
- 如果 `SOUL.md` 不在引导列表中,该钩子不执行任何操作。
## 另请参阅
- [钩子](/automation/hooks)