mirror of
https://github.com/moltbot/moltbot.git
synced 2026-04-27 00:17:29 +00:00
* 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:
@@ -41,12 +41,11 @@ The hooks system allows you to:
|
||||
|
||||
### Bundled Hooks
|
||||
|
||||
OpenClaw ships with four bundled hooks that are automatically discovered:
|
||||
OpenClaw ships with three bundled hooks that are automatically discovered:
|
||||
|
||||
- **💾 session-memory**: Saves session context to your agent workspace (default `~/.openclaw/workspace/memory/`) when you issue `/new`
|
||||
- **📝 command-logger**: Logs all command events to `~/.openclaw/logs/commands.log`
|
||||
- **🚀 boot-md**: Runs `BOOT.md` when the gateway starts (requires internal hooks enabled)
|
||||
- **😈 soul-evil**: Swaps injected `SOUL.md` content with `SOUL_EVIL.md` during a purge window or by random chance
|
||||
|
||||
List available hooks:
|
||||
|
||||
@@ -527,42 +526,6 @@ grep '"action":"new"' ~/.openclaw/logs/commands.log | jq .
|
||||
openclaw hooks enable command-logger
|
||||
```
|
||||
|
||||
### soul-evil
|
||||
|
||||
Swaps injected `SOUL.md` content with `SOUL_EVIL.md` during a purge window or by random chance.
|
||||
|
||||
**Events**: `agent:bootstrap`
|
||||
|
||||
**Docs**: [SOUL Evil Hook](/hooks/soul-evil)
|
||||
|
||||
**Output**: No files written; swaps happen in-memory only.
|
||||
|
||||
**Enable**:
|
||||
|
||||
```bash
|
||||
openclaw hooks enable soul-evil
|
||||
```
|
||||
|
||||
**Config**:
|
||||
|
||||
```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
|
||||
|
||||
Runs `BOOT.md` when the gateway starts (after channels start).
|
||||
|
||||
@@ -32,13 +32,12 @@ List all discovered hooks from workspace, managed, and bundled directories.
|
||||
**Example output:**
|
||||
|
||||
```
|
||||
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
|
||||
```
|
||||
|
||||
**Example (verbose):**
|
||||
@@ -277,18 +276,6 @@ grep '"action":"new"' ~/.openclaw/logs/commands.log | jq .
|
||||
|
||||
**See:** [command-logger documentation](/automation/hooks#command-logger)
|
||||
|
||||
### soul-evil
|
||||
|
||||
Swaps injected `SOUL.md` content with `SOUL_EVIL.md` during a purge window or by random chance.
|
||||
|
||||
**Enable:**
|
||||
|
||||
```bash
|
||||
openclaw hooks enable soul-evil
|
||||
```
|
||||
|
||||
**See:** [SOUL Evil Hook](/hooks/soul-evil)
|
||||
|
||||
### boot-md
|
||||
|
||||
Runs `BOOT.md` when the gateway starts (after channels start).
|
||||
|
||||
@@ -1003,10 +1003,6 @@
|
||||
"automation/auth-monitoring"
|
||||
]
|
||||
},
|
||||
{
|
||||
"group": "Hooks",
|
||||
"pages": ["hooks/soul-evil"]
|
||||
},
|
||||
{
|
||||
"group": "Media and devices",
|
||||
"pages": [
|
||||
@@ -1523,10 +1519,6 @@
|
||||
"zh-CN/automation/auth-monitoring"
|
||||
]
|
||||
},
|
||||
{
|
||||
"group": "Hooks",
|
||||
"pages": ["zh-CN/hooks/soul-evil"]
|
||||
},
|
||||
{
|
||||
"group": "媒体与设备",
|
||||
"pages": [
|
||||
|
||||
@@ -1,69 +0,0 @@
|
||||
---
|
||||
summary: "SOUL Evil hook (swap SOUL.md with SOUL_EVIL.md)"
|
||||
read_when:
|
||||
- You want to enable or tune the SOUL Evil hook
|
||||
- You want a purge window or random-chance persona swap
|
||||
title: "SOUL Evil Hook"
|
||||
---
|
||||
|
||||
# SOUL Evil Hook
|
||||
|
||||
The SOUL Evil hook swaps the **injected** `SOUL.md` content with `SOUL_EVIL.md` during
|
||||
a purge window or by random chance. It does **not** modify files on disk.
|
||||
|
||||
## How It Works
|
||||
|
||||
When `agent:bootstrap` runs, the hook can replace the `SOUL.md` content in memory
|
||||
before the system prompt is assembled. If `SOUL_EVIL.md` is missing or empty,
|
||||
OpenClaw logs a warning and keeps the normal `SOUL.md`.
|
||||
|
||||
Sub-agent runs do **not** include `SOUL.md` in their bootstrap files, so this hook
|
||||
has no effect on sub-agents.
|
||||
|
||||
## Enable
|
||||
|
||||
```bash
|
||||
openclaw hooks enable soul-evil
|
||||
```
|
||||
|
||||
Then set the config:
|
||||
|
||||
```json
|
||||
{
|
||||
"hooks": {
|
||||
"internal": {
|
||||
"enabled": true,
|
||||
"entries": {
|
||||
"soul-evil": {
|
||||
"enabled": true,
|
||||
"file": "SOUL_EVIL.md",
|
||||
"chance": 0.1,
|
||||
"purge": { "at": "21:00", "duration": "15m" }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
Create `SOUL_EVIL.md` in the agent workspace root (next to `SOUL.md`).
|
||||
|
||||
## Options
|
||||
|
||||
- `file` (string): alternate SOUL filename (default: `SOUL_EVIL.md`)
|
||||
- `chance` (number 0–1): random chance per run to use `SOUL_EVIL.md`
|
||||
- `purge.at` (HH:mm): daily purge start (24-hour clock)
|
||||
- `purge.duration` (duration): window length (e.g. `30s`, `10m`, `1h`)
|
||||
|
||||
**Precedence:** purge window wins over chance.
|
||||
|
||||
**Timezone:** uses `agents.defaults.userTimezone` when set; otherwise host timezone.
|
||||
|
||||
## Notes
|
||||
|
||||
- No files are written or modified on disk.
|
||||
- If `SOUL.md` is not in the bootstrap list, the hook does nothing.
|
||||
|
||||
## See Also
|
||||
|
||||
- [Hooks](/automation/hooks)
|
||||
@@ -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`(在渠道启动之后)。
|
||||
|
||||
@@ -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`。
|
||||
|
||||
@@ -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`(数字 0–1):每次运行使用 `SOUL_EVIL.md` 的随机概率
|
||||
- `purge.at`(HH:mm):每日清除开始时间(24 小时制)
|
||||
- `purge.duration`(时长):窗口长度(例如 `30s`、`10m`、`1h`)
|
||||
|
||||
**优先级:** 清除窗口优先于随机概率。
|
||||
|
||||
**时区:** 设置了 `agents.defaults.userTimezone` 时使用该时区;否则使用主机时区。
|
||||
|
||||
## 注意事项
|
||||
|
||||
- 不会在磁盘上写入或修改任何文件。
|
||||
- 如果 `SOUL.md` 不在引导列表中,该钩子不执行任何操作。
|
||||
|
||||
## 另请参阅
|
||||
|
||||
- [钩子](/automation/hooks)
|
||||
Reference in New Issue
Block a user