@soulguard/openclaw 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +67 -0
- package/dist/index.js +5901 -0
- package/openclaw.plugin.json +11 -0
- package/package.json +19 -0
- package/src/guard.test.ts +58 -0
- package/src/guard.ts +74 -0
- package/src/index.ts +31 -0
- package/src/openclaw-types.ts +50 -0
- package/src/plugin.ts +162 -0
- package/src/templates.test.ts +36 -0
- package/src/templates.ts +113 -0
- package/tsconfig.json +10 -0
package/README.md
ADDED
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
# @soulguard/openclaw
|
|
2
|
+
|
|
3
|
+
OpenClaw framework plugin for soulguard. Provides protection templates and soulguard integration for OpenClaw agents.
|
|
4
|
+
|
|
5
|
+
For the core system, see [@soulguard/core](../core/).
|
|
6
|
+
|
|
7
|
+
## Protection Templates
|
|
8
|
+
|
|
9
|
+
Templates define which paths go to vault, ledger, or are left unprotected. Every known path is explicitly categorized โ no silent omissions.
|
|
10
|
+
|
|
11
|
+
| Path | Relaxed | Default | Paranoid |
|
|
12
|
+
| --------------- | :-----: | :-----: | :------: |
|
|
13
|
+
| **Identity** | | | |
|
|
14
|
+
| SOUL.md | ๐ | ๐ | ๐ |
|
|
15
|
+
| AGENTS.md | ๐ | ๐ | ๐ |
|
|
16
|
+
| IDENTITY.md | ๐ | ๐ | ๐ |
|
|
17
|
+
| USER.md | ๐ | ๐ | ๐ |
|
|
18
|
+
| **Session** | | | |
|
|
19
|
+
| TOOLS.md | ๐ | ๐ | ๐ |
|
|
20
|
+
| HEARTBEAT.md | ๐ | ๐ | ๐ |
|
|
21
|
+
| BOOTSTRAP.md | ๐ | ๐ | ๐ |
|
|
22
|
+
| **Memory** | | | |
|
|
23
|
+
| MEMORY.md | ๐ | ๐ | ๐ |
|
|
24
|
+
| memory/\*\* | ๐ | ๐ | ๐ |
|
|
25
|
+
| **Skills** | | | |
|
|
26
|
+
| skills/\*\* | ๐ | ๐ | ๐ |
|
|
27
|
+
| **Config** | | | |
|
|
28
|
+
| soulguard.json | ๐ | ๐ | ๐ |
|
|
29
|
+
| openclaw.json | ๐ | ๐ | ๐ |
|
|
30
|
+
| cron/jobs.json | ๐ | ๐ | ๐ |
|
|
31
|
+
| extensions/\*\* | ๐ | ๐ | ๐ |
|
|
32
|
+
| **Other** | | | |
|
|
33
|
+
| sessions/\*\* | โ | โ | ๐ |
|
|
34
|
+
|
|
35
|
+
๐ Vault (requires owner approval) ยท ๐ Ledger (tracked, agent writes freely) ยท โ Unprotected
|
|
36
|
+
|
|
37
|
+
**Relaxed** โ Onboarding mode. Only `soulguard.json` is locked. Everything else tracked.
|
|
38
|
+
|
|
39
|
+
**Default** โ Steady state. Identity files and config locked. Memory and skills tracked.
|
|
40
|
+
|
|
41
|
+
**Paranoid** โ Maximum lockdown. Everything vaulted except sessions.
|
|
42
|
+
|
|
43
|
+
## Plugin
|
|
44
|
+
|
|
45
|
+
The OpenClaw plugin integrates soulguard status into the agent's context and provides helpful guidance when vault writes fail.
|
|
46
|
+
|
|
47
|
+
### Current
|
|
48
|
+
|
|
49
|
+
- Reports soulguard status (vault/ledger health) in agent context
|
|
50
|
+
- Detects vault write failures and suggests staging workflow
|
|
51
|
+
|
|
52
|
+
### Planned
|
|
53
|
+
|
|
54
|
+
- `before_tool_call` hook to intercept vault writes and redirect to staging
|
|
55
|
+
- Native agent tools (`soulguard.propose`, `soulguard.status`, `soulguard.diff`)
|
|
56
|
+
- Cron job gating for vaulted cron configs
|
|
57
|
+
- Tool access control per configuration
|
|
58
|
+
|
|
59
|
+
## Why a Plugin?
|
|
60
|
+
|
|
61
|
+
Soulguard's core provides hard security via OS file permissions. The agent literally cannot write to vault files. But without the plugin, the agent sees raw `Permission denied` errors and may waste tokens retrying. The plugin:
|
|
62
|
+
|
|
63
|
+
1. Tells the agent _why_ the write failed
|
|
64
|
+
2. Guides it to edit `.soulguard/staging/` instead
|
|
65
|
+
3. Provides soulguard operations as native tools
|
|
66
|
+
|
|
67
|
+
The plugin adds zero security responsibility โ if it has bugs, vault files are still protected by OS permissions.
|