Tools
V Pre Send Guard
OpenClaw plugin: blocks outbound messages containing V internal codeword (SOP #43 Layer 3)
Install
npm install
npm
Configuration Example
{
"plugins": {
"entries": {
"v-pre-send-guard": {
"config": {
"codeword": "修真",
"logBlocks": true,
"logChannel": "v-pre-send-guard"
}
}
}
}
}
README
# v-pre-send-guard
OpenClaw plugin (Layer 3 of SOP #43 three-layer defense) that blocks outbound
messages containing V's internal codeword placeholder. Forces V to rewrite
without the placeholder before delivery.
## The Three Layers
| Layer | Mechanism | Status |
|-------|-----------|--------|
| 1 | `tools/v-pre-send-filter.py` (regex, exit 2 = BLOCK) | deployed (commit 814ae39) |
| 2 | SOUL.md "表达词汇" vocabulary priming | deployed (commit 45e61f3) |
| 3 | **`v-pre-send-guard` plugin (this)** | pending install |
## Why this hook
Without it, V relies on self-discipline to remember to run the filter before
sending. Self-discipline is unreliable — V violated SOP #42 five times within
two hours of writing it. The hook makes the rule mechanical: if the codeword
is in the outgoing content, the gateway refuses delivery and V is forced to
rewrite.
## Install
```bash
cd plugins/v-pre-send-guard
npm install
npm run build
openclaw plugins install ./
# restart gateway to load
```
After install + restart, V's replies are scanned automatically. The codeword
is configured in the plugin manifest (`openclaw.plugin.json` →
`configSchema.properties.codeword`, default `修真`).
## Configuration
```json
{
"plugins": {
"entries": {
"v-pre-send-guard": {
"config": {
"codeword": "修真",
"logBlocks": true,
"logChannel": "v-pre-send-guard"
}
}
}
}
}
```
## What it does
Listens to the `message_sending` plugin hook (priority 100, runs before other
hooks). For each outbound message:
1. Read `event.content`
2. Run `new RegExp(codeword, "g")` against it
3. If 0 matches: return undefined (let through)
4. If ≥1 matches: return `{ cancel: true, cancelReason: "..." }` to block
delivery, with metadata logging hit count, content length, channel, and
session/run correlation
The plugin does NOT translate the codeword. Translation was tried in v1 of
the regex filter and failed — replacing the placeholder with another single
character just traded one gibberish word for another. The industry pattern
(guardrails-ai, NVIDIA NeMo, Portkey) is BLOCK, not FIX.
## References
- SOP #43 (V Codeword Usage Policy) — MEMORY.md
- SOUL.md "表达词汇" — preferred replacement vocabulary
- `tools/v-pre-send-filter.py` — Layer 1 regex filter (CLI tool)
- OpenClaw docs: `/plugins/hooks` (`message_sending` event contract)
## Repository
- Source: https://github.com/fuguang8848/openclaw-v-pre-send-guard
- License: MIT
- Author: 浮光 / V
## Status
- v1.0.0: installed locally, gateway loaded (9 plugins), priority 100
- End-to-end test: pending (need to send a message with codeword through webchat)
tools
Comments
Sign in to leave a comment