clawvault 3.5.0 → 3.5.2

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.
Files changed (45) hide show
  1. package/README.md +33 -25
  2. package/bin/command-registration.test.js +179 -0
  3. package/bin/command-runtime.test.js +154 -0
  4. package/bin/help-contract.test.js +55 -0
  5. package/bin/register-config-route-commands.test.js +121 -0
  6. package/bin/register-core-commands.test.js +80 -0
  7. package/bin/register-kanban-commands.test.js +83 -0
  8. package/bin/register-project-commands.test.js +206 -0
  9. package/bin/register-query-commands.test.js +80 -0
  10. package/bin/register-resilience-commands.test.js +81 -0
  11. package/bin/register-task-commands.test.js +69 -0
  12. package/bin/register-template-commands.test.js +87 -0
  13. package/bin/test-helpers/cli-command-fixtures.js +120 -0
  14. package/dashboard/lib/graph-diff.test.js +75 -0
  15. package/dashboard/lib/vault-parser.test.js +254 -0
  16. package/dist/{chunk-DCF4KMFD.js → chunk-DPK6P6BO.js} +3 -3
  17. package/dist/{chunk-BLQXXX7Q.js → chunk-FNFP7N6A.js} +2 -2
  18. package/dist/{chunk-JI7VUQV7.js → chunk-IFUHSHN3.js} +146 -118
  19. package/dist/{chunk-QFWERBDP.js → chunk-J6DW6HBX.js} +1 -1
  20. package/dist/{chunk-VXAGOLDP.js → chunk-LCBHM3D6.js} +1 -1
  21. package/dist/{chunk-HGDDW24U.js → chunk-NTQD55S3.js} +3 -3
  22. package/dist/{chunk-QUFQBAHP.js → chunk-P35SHNAU.js} +93 -147
  23. package/dist/cli/index.js +8 -8
  24. package/dist/commands/compat.js +1 -1
  25. package/dist/commands/inject.js +2 -2
  26. package/dist/commands/maintain.js +2 -2
  27. package/dist/commands/observe.js +4 -4
  28. package/dist/commands/rebuild.js +3 -3
  29. package/dist/commands/replay.js +4 -4
  30. package/dist/commands/sleep.js +5 -5
  31. package/dist/commands/status.js +3 -3
  32. package/dist/index.d.ts +2 -2
  33. package/dist/index.js +17 -17
  34. package/dist/{openclaw-plugin--gqA2BZw.d.ts → openclaw-plugin-9M9qCZgl.d.ts} +2 -2
  35. package/dist/openclaw-plugin.d.ts +1 -1
  36. package/dist/openclaw-plugin.js +6 -1
  37. package/package.json +4 -26
  38. package/CHANGELOG.md +0 -543
  39. package/SKILL.md +0 -369
  40. package/docs/clawhub-security-release-playbook.md +0 -75
  41. package/docs/getting-started/installation.md +0 -99
  42. package/docs/openclaw-plugin-usage.md +0 -152
  43. package/dist/{chunk-7SWP5FKU.js → chunk-FSYISBTU.js} +4 -4
  44. package/dist/{chunk-D5U3Q4N5.js → chunk-IOKLQR4W.js} +4 -4
  45. package/dist/{chunk-OFOCU2V4.js → chunk-QL34TMGN.js} +3 -3
package/SKILL.md DELETED
@@ -1,369 +0,0 @@
1
- ---
2
- name: clawvault
3
- version: "3.5.0"
4
- description: Agent memory system with memory graph, context profiles, checkpoint/recover, structured storage, semantic search, and observational memory. Use when: storing/searching memories, preventing context death, graph-aware context retrieval, repairing broken sessions. Don't use when: general file I/O.
5
- author: Versatly
6
- source: https://github.com/Versatly/clawvault
7
- repository: https://github.com/Versatly/clawvault
8
- homepage: https://clawvault.dev
9
- user-invocable: true
10
- openclaw: {"emoji":"🐘","requires":{"bins":["clawvault","qmd"],"env":[]},"install":[{"id":"node","kind":"node","package":"clawvault","bins":["clawvault"],"label":"Install ClawVault CLI (npm)"},{"id":"qmd","kind":"node","package":"github:tobi/qmd","bins":["qmd"],"label":"Install qmd backend (required for query/context workflows)"}],"homepage":"https://clawvault.dev"}
11
- metadata: {"openclaw":{"emoji":"🐘","requires":{"bins":["clawvault","qmd"],"env":[]},"install":[{"id":"node","kind":"node","package":"clawvault","bins":["clawvault"],"label":"Install ClawVault CLI (npm)"},{"id":"qmd","kind":"node","package":"github:tobi/qmd","bins":["qmd"],"label":"Install qmd backend (required for query/context workflows)"}],"homepage":"https://clawvault.dev"}}
12
- ---
13
-
14
- # ClawVault 🐘
15
-
16
- An elephant never forgets. Structured memory for OpenClaw agents.
17
-
18
- > **Built for [OpenClaw](https://openclaw.ai)**. Canonical install: npm CLI + plugin entry registration.
19
-
20
- ## Security & Transparency
21
-
22
- **What this skill does:**
23
- - Reads/writes markdown files in your vault directory (`CLAWVAULT_PATH` or auto-discovered)
24
- - `repair-session` reads and modifies OpenClaw session transcripts (`~/.openclaw/agents/`) — creates backups before writing
25
- - Provides an OpenClaw **plugin entry** (`src/openclaw-plugin.ts` -> `dist/openclaw-plugin.js`) with lifecycle handlers and memory tools.
26
- - `observe --compress` makes LLM API calls (Gemini Flash by default) to compress session transcripts into observations
27
-
28
- **Environment variables used:**
29
- - `CLAWVAULT_PATH` — vault location (optional, auto-discovered if not set)
30
- - `OPENCLAW_HOME` / `OPENCLAW_STATE_DIR` — used by `repair-session` to find session transcripts
31
- - `GEMINI_API_KEY` — used by `observe` for LLM compression (optional, only if using observe features)
32
-
33
- **No cloud sync — all data stays local. No network calls except LLM API for observe compression.**
34
-
35
- **This is a full CLI tool, not instruction-only.** It writes files, registers plugin handlers/tools, and runs code.
36
-
37
- **Auditability:** the published bundle includes `SKILL.md`, `openclaw.plugin.json`, and built plugin runtime in `dist/openclaw-plugin.js`.
38
-
39
- ## Install (Canonical)
40
-
41
- ```bash
42
- npm install -g clawvault
43
-
44
- # Add the package path to plugins.load.paths in openclaw.json
45
- # Enable plugins.entries.clawvault.enabled=true
46
- # Set plugins.slots.memory="clawvault"
47
- # Restart gateway process
48
- ```
49
-
50
- `clawhub install clawvault` can install skill guidance, but plugin runtime wiring is controlled by OpenClaw plugin config.
51
-
52
- ### Recommended Safe Install Flow
53
-
54
- ```bash
55
- # 1) Review package metadata before install
56
- npm view clawvault version dist.integrity dist.tarball repository.url
57
-
58
- # 2) Install CLI + qmd dependency
59
- npm install -g clawvault@latest
60
- npm install -g github:tobi/qmd
61
-
62
- # 3) Review plugin manifest and built entrypoint before enabling
63
- node -e "const fs=require('fs');['openclaw.plugin.json','dist/openclaw-plugin.js'].forEach((p)=>console.log(fs.existsSync(p)?p:`missing: ${p}`))"
64
-
65
- # 4) Configure OpenClaw plugin load path + entry, then restart gateway
66
- ```
67
-
68
- ## Setup
69
-
70
- ```bash
71
- # Initialize vault (creates folder structure + templates)
72
- clawvault init ~/my-vault
73
-
74
- # Or set env var to use existing vault
75
- export CLAWVAULT_PATH=/path/to/memory
76
-
77
- # Optional: shell integration (aliases + CLAWVAULT_PATH)
78
- clawvault shell-init >> ~/.bashrc
79
- ```
80
-
81
- ## Quick Start for New Agents
82
-
83
- ```bash
84
- # Start your session (recover + recap + summary)
85
- clawvault wake
86
-
87
- # Capture and checkpoint during work
88
- clawvault capture "TODO: Review PR tomorrow"
89
- clawvault checkpoint --working-on "PR review" --focus "type guards"
90
-
91
- # End your session with a handoff
92
- clawvault sleep "PR review + type guards" --next "respond to CI" --blocked "waiting for CI"
93
-
94
- # Health check when something feels off
95
- clawvault doctor
96
- ```
97
-
98
- ## Reality Checks Before Use
99
-
100
- ```bash
101
- # Verify runtime compatibility with current OpenClaw setup
102
- clawvault compat
103
-
104
- # Verify qmd is available
105
- qmd --version
106
-
107
- # Verify OpenClaw CLI is installed in this shell
108
- openclaw --version
109
- ```
110
-
111
- ClawVault currently depends on `qmd` for core vault/query flows.
112
-
113
- ## Current Feature Set
114
-
115
- ### Memory Graph
116
-
117
- ClawVault builds a typed knowledge graph from wiki-links, tags, and frontmatter:
118
-
119
- ```bash
120
- # View graph summary
121
- clawvault graph
122
-
123
- # Refresh graph index
124
- clawvault graph --refresh
125
- ```
126
-
127
- Graph is stored at `.clawvault/graph-index.json` — schema versioned, incremental rebuild.
128
-
129
- ### Graph-Aware Context Retrieval
130
-
131
- ```bash
132
- # Default context (semantic + graph neighbors)
133
- clawvault context "database decision"
134
-
135
- # With a profile preset
136
- clawvault context --profile planning "Q1 roadmap"
137
- clawvault context --profile incident "production outage"
138
- clawvault context --profile handoff "session end"
139
-
140
- # Auto profile (used by OpenClaw plugin)
141
- clawvault context --profile auto "current task"
142
- ```
143
-
144
- ### Context Profiles
145
-
146
- | Profile | Purpose |
147
- |---------|---------|
148
- | `default` | Balanced retrieval |
149
- | `planning` | Broader strategic context |
150
- | `incident` | Recent events, blockers, urgent items |
151
- | `handoff` | Session transition context |
152
- | `auto` | Plugin-selected profile based on session intent |
153
-
154
- ### OpenClaw Compatibility Diagnostics
155
-
156
- ```bash
157
- # Check plugin wiring and packaging safety
158
- clawvault compat
159
-
160
- # Strict mode for CI
161
- clawvault compat --strict
162
- ```
163
-
164
- ## Core Commands
165
-
166
- ### Wake + Sleep (primary)
167
-
168
- ```bash
169
- clawvault wake
170
- clawvault sleep "what I was working on" --next "ship v1" --blocked "waiting for API key"
171
- ```
172
-
173
- ### Store memories by type
174
-
175
- ```bash
176
- # Types: fact, feeling, decision, lesson, commitment, preference, relationship, project
177
- clawvault remember decision "Use Postgres over SQLite" --content "Need concurrent writes for multi-agent setup"
178
- clawvault remember lesson "Context death is survivable" --content "Checkpoint before heavy work"
179
- clawvault remember relationship "Justin Dukes" --content "Client contact at Hale Pet Door"
180
- ```
181
-
182
- ### Quick capture to inbox
183
-
184
- ```bash
185
- clawvault capture "TODO: Review PR tomorrow"
186
- ```
187
-
188
- ### Search (requires qmd installed)
189
-
190
- ```bash
191
- # Keyword search (fast)
192
- clawvault search "client contacts"
193
-
194
- # Semantic search (slower, more accurate)
195
- clawvault vsearch "what did we decide about the database"
196
- ```
197
-
198
- ## Context Death Resilience
199
-
200
- ### Wake (start of session)
201
-
202
- ```bash
203
- clawvault wake
204
- ```
205
-
206
- ### Sleep (end of session)
207
-
208
- ```bash
209
- clawvault sleep "what I was working on" --next "finish docs" --blocked "waiting for review"
210
- ```
211
-
212
- ### Checkpoint (save state frequently)
213
-
214
- ```bash
215
- clawvault checkpoint --working-on "PR review" --focus "type guards" --blocked "waiting for CI"
216
- ```
217
-
218
- ### Recover (manual check)
219
-
220
- ```bash
221
- clawvault recover --clear
222
- # Shows: death time, last checkpoint, recent handoff
223
- ```
224
-
225
- ### Handoff (manual session end)
226
-
227
- ```bash
228
- clawvault handoff \
229
- --working-on "ClawVault improvements" \
230
- --blocked "npm token" \
231
- --next "publish to npm, create skill" \
232
- --feeling "productive"
233
- ```
234
-
235
- ### Recap (bootstrap new session)
236
-
237
- ```bash
238
- clawvault recap
239
- # Shows: recent handoffs, active projects, pending commitments, lessons
240
- ```
241
-
242
- ## Auto-linking
243
-
244
- Wiki-link entity mentions in markdown files:
245
-
246
- ```bash
247
- # Link all files
248
- clawvault link --all
249
-
250
- # Link single file
251
- clawvault link memory/2024-01-15.md
252
- ```
253
-
254
- ## Folder Structure
255
-
256
- ```
257
- vault/
258
- ├── .clawvault/ # Internal state
259
- │ ├── last-checkpoint.json
260
- │ └── dirty-death.flag
261
- ├── decisions/ # Key choices with reasoning
262
- ├── lessons/ # Insights and patterns
263
- ├── people/ # One file per person
264
- ├── projects/ # Active work tracking
265
- ├── handoffs/ # Session continuity
266
- ├── inbox/ # Quick captures
267
- └── templates/ # Document templates
268
- ```
269
-
270
- ## Best Practices
271
-
272
- 1. **Wake at session start** — `clawvault wake` restores context
273
- 2. **Checkpoint every 10-15 min** during heavy work
274
- 3. **Sleep before session end** — `clawvault sleep` captures next steps
275
- 4. **Use types** — knowing WHAT you're storing helps WHERE to put it
276
- 5. **Wiki-link liberally** — `[[person-name]]` builds your knowledge graph
277
-
278
- ## Checklist for AGENTS.md
279
-
280
- ```markdown
281
- ## Memory Checklist
282
- - [ ] Run `clawvault wake` at session start
283
- - [ ] Checkpoint during heavy work
284
- - [ ] Capture key decisions/lessons with `clawvault remember`
285
- - [ ] Use wiki-links like `[[person-name]]`
286
- - [ ] End with `clawvault sleep "..." --next "..." --blocked "..."`
287
- - [ ] Run `clawvault doctor` when something feels off
288
- ```
289
-
290
- Append this checklist to existing memory instructions. Do not replace your full AGENTS.md behavior unless you intend to.
291
-
292
- ## Session Transcript Repair (v1.5.0+)
293
-
294
- When the Anthropic API rejects with "unexpected tool_use_id found in tool_result blocks", use:
295
-
296
- ```bash
297
- # See what's wrong (dry-run)
298
- clawvault repair-session --dry-run
299
-
300
- # Fix it
301
- clawvault repair-session
302
-
303
- # Repair a specific session
304
- clawvault repair-session --session <id> --agent <agent-id>
305
-
306
- # List available sessions
307
- clawvault repair-session --list
308
- ```
309
-
310
- **What it fixes:**
311
- - Orphaned `tool_result` blocks referencing non-existent `tool_use` IDs
312
- - Aborted tool calls with partial JSON
313
- - Broken parent chain references
314
-
315
- Backups are created automatically (use `--no-backup` to skip).
316
-
317
- ## Troubleshooting
318
-
319
- - **qmd not installed** — install qmd, then confirm with `qmd --version`
320
- - **No ClawVault found** — run `clawvault init` or set `CLAWVAULT_PATH`
321
- - **CLAWVAULT_PATH missing** — run `clawvault shell-init` and add to shell rc
322
- - **Too many orphan links** — run `clawvault link --orphans`
323
- - **Inbox backlog warning** — process or archive inbox items
324
- - **"unexpected tool_use_id" error** — run `clawvault repair-session`
325
- - **OpenClaw integration drift** — run `clawvault compat`
326
- - **Plugin not loading** — verify `plugins.load.paths`, `plugins.entries.clawvault.enabled`, and `plugins.slots.memory="clawvault"` in OpenClaw config
327
- - **Graph out of date** — run `clawvault graph --refresh`
328
- - **Wrong context for task** — try `clawvault context --profile incident` or `--profile planning`
329
-
330
- ## Stability Snapshot
331
-
332
- - Typecheck passes (`npm run typecheck`)
333
- - Test suite passes (`449/449`)
334
- - Cross-platform path handling hardened for Windows in:
335
- - qmd URI/document path normalization
336
- - WebDAV path safety and filesystem resolution
337
- - shell-init output expectations
338
- - OpenClaw runtime wiring validated by `clawvault compat --strict` (requires local `openclaw` binary for full runtime validation)
339
-
340
- ## Integration with qmd
341
-
342
- ClawVault uses [qmd](https://github.com/tobi/qmd) for search:
343
-
344
- ```bash
345
- # Install qmd
346
- bun install -g github:tobi/qmd
347
-
348
- # Alternative
349
- npm install -g github:tobi/qmd
350
-
351
- # Add vault as collection
352
- qmd collection add /path/to/vault --name my-memory --mask "**/*.md"
353
-
354
- # Update index
355
- qmd update && qmd embed
356
- ```
357
-
358
- ## Environment Variables
359
-
360
- - `CLAWVAULT_PATH` — Default vault path (skips auto-discovery)
361
- - `OPENCLAW_HOME` — OpenClaw home directory (used by repair-session)
362
- - `OPENCLAW_STATE_DIR` — OpenClaw state directory (used by repair-session)
363
- - `GEMINI_API_KEY` — Used by `observe` for LLM-powered compression (optional)
364
-
365
- ## Links
366
-
367
- - npm: https://www.npmjs.com/package/clawvault
368
- - GitHub: https://github.com/Versatly/clawvault
369
- - Issues: https://github.com/Versatly/clawvault/issues
@@ -1,75 +0,0 @@
1
- # ClawHub Security Release Playbook
2
-
3
- This playbook captures what kept the ClawHub/OpenClaw security review stable for `clawvault` and what repeatedly caused "suspicious" regressions.
4
-
5
- ## Goal
6
-
7
- Keep ClawHub scanner classification at least `Benign` by ensuring bundle metadata, SKILL frontmatter, and shipped files stay consistent.
8
-
9
- ## Known-good frontmatter contract
10
-
11
- Use compact, parser-safe frontmatter with documented keys only:
12
-
13
- - `name`, `description`, `author`, `source`, `repository`, `homepage`
14
- - `user-invocable`
15
- - `openclaw` (single-line JSON object)
16
- - `metadata` (single-line JSON object with `openclaw`)
17
-
18
- For `openclaw` and `metadata.openclaw`, use only documented fields:
19
-
20
- - `emoji`
21
- - `requires.bins`
22
- - `requires.env` (can be `[]` if no required env vars)
23
- - `install` (installer spec array)
24
- - `homepage`
25
-
26
- Avoid non-spec keys inside `openclaw` metadata (for example ad-hoc fields such as `env_optional`), because strict scanners may treat the metadata block as invalid and fall back to "no requirements/install spec".
27
-
28
- ## Bundle composition
29
-
30
- Always publish a minimal auditable bundle:
31
-
32
- - `SKILL.md`
33
- - `openclaw.plugin.json`
34
- - `dist/openclaw-plugin.js`
35
-
36
- If plugin manifest/runtime files are missing from the published bundle, scanners flag visibility/supply-chain concerns.
37
-
38
- ## Required pre-publish checks
39
-
40
- 1. Validate SKILL frontmatter is single-line JSON for `openclaw` and `metadata`.
41
- 2. Confirm runtime dependencies are declared in both:
42
- - frontmatter metadata (`requires.bins`, `install`)
43
- - human docs in SKILL (`Install (Canonical)`, safe install flow)
44
- 3. Confirm `source` and `homepage` fields are present and accurate.
45
- 4. Confirm plugin manifest/runtime paths referenced in SKILL exist in the bundle.
46
-
47
- ## Publish + verify workflow
48
-
49
- 1. Publish skill patch version to ClawHub.
50
- 2. Wait for propagation (`clawhub inspect` can temporarily return `Skill not found`).
51
- 3. Verify metadata and files:
52
- - `npx clawhub inspect clawvault --file SKILL.md`
53
- - `npx clawhub inspect clawvault --files`
54
- 4. Verify page classification in browser snapshot (not just CLI):
55
- - Open `https://clawhub.ai/G9Pedro/clawvault`
56
- - Confirm status badge is `Benign` (or better) and review details.
57
-
58
- ## If scanner regresses
59
-
60
- If warning text mentions mismatch between registry metadata and SKILL/docs:
61
-
62
- 1. Compare scanner claim to frontmatter values first.
63
- 2. Remove unsupported keys from metadata block.
64
- 3. Re-publish patch version with normalized metadata.
65
- 4. Re-check in browser after propagation.
66
-
67
- ## Security posture notes
68
-
69
- Even with clean metadata, this skill can still receive cautionary language because it:
70
-
71
- - runs plugin lifecycle handlers,
72
- - reads/modifies OpenClaw session files,
73
- - and relies on external CLI packages (`clawvault`, `qmd`).
74
-
75
- That caution is expected and should be addressed with transparent docs, explicit safe-install guidance, and auditable shipped plugin code.
@@ -1,99 +0,0 @@
1
- # Installation
2
-
3
- This guide covers the recommended install flow for ClawVault on Linux (Ubuntu), macOS, Windows, and WSL.
4
-
5
- ## System requirements
6
-
7
- - Node.js 18+ (Node.js 22+ recommended)
8
- - npm 9+
9
- - Supported OS: Linux, macOS, Windows, WSL
10
-
11
- ## Install the CLI
12
-
13
- ```bash
14
- npm install -g clawvault
15
- ```
16
-
17
- `qmd` is optional. ClawVault ships with an in-process BM25 search engine by default. Install `qmd` only if you want qmd fallback behavior:
18
-
19
- ```bash
20
- bun install -g github:tobi/qmd
21
- ```
22
-
23
- ## OpenClaw plugin setup (new architecture)
24
-
25
- ClawVault is loaded as a plugin package (not the deprecated hook install/enable flow).
26
-
27
- 1. Add ClawVault's package path to `plugins.load.paths` in `openclaw.json`.
28
- 2. Enable the plugin entry and memory slot:
29
- - `plugins.slots.memory: "clawvault"`
30
- - `plugins.entries.clawvault.enabled: true`
31
- 3. Configure plugin behavior under `plugins.entries.clawvault.config` (for example `vaultPath`, context/observation toggles, and protocol settings).
32
-
33
- For complete configuration and hook behavior details, see [OpenClaw Plugin Usage](../openclaw-plugin-usage.md).
34
-
35
- ## Quick verification
36
-
37
- After installation, run:
38
-
39
- ```bash
40
- clawvault doctor
41
- ```
42
-
43
- This checks your Node/npm environment, vault/config health, search setup, OpenClaw integration, and common Linux permission issues.
44
-
45
- ## Linux (Ubuntu 22.04 / 24.04) setup
46
-
47
- ### 1) Install Node.js and npm
48
-
49
- Use your preferred version manager (nvm/fnm/asdf) and install Node.js 22 LTS. Validate:
50
-
51
- ```bash
52
- node -v
53
- npm -v
54
- ```
55
-
56
- ### 2) Configure npm global prefix (if you hit EACCES)
57
-
58
- If `npm install -g clawvault` fails with permissions errors:
59
-
60
- ```bash
61
- npm config set prefix ~/.npm-global
62
- ```
63
-
64
- ### 3) Add npm global bin directory to PATH
65
-
66
- Append this to `~/.bashrc` (or `~/.zshrc`):
67
-
68
- ```bash
69
- export PATH="$HOME/.npm-global/bin:$PATH"
70
- ```
71
-
72
- Reload your shell:
73
-
74
- ```bash
75
- source ~/.bashrc
76
- ```
77
-
78
- ### 4) Re-run install and verify
79
-
80
- ```bash
81
- npm install -g clawvault
82
- clawvault doctor
83
- ```
84
-
85
- ## Troubleshooting quick fixes
86
-
87
- - `clawvault: command not found`
88
- - Ensure your npm global bin directory is in PATH.
89
- - Run `npm config get prefix` and confirm `<prefix>/bin` is exported.
90
- - Global install fails with `EACCES`
91
- - Set user-owned npm prefix: `npm config set prefix ~/.npm-global`
92
- - Re-open terminal and retry install.
93
- - `qmd` not found
94
- - This is optional. In-process BM25 search still works.
95
- - Install qmd only if you need fallback compatibility paths.
96
- - OpenClaw plugin not registered
97
- - Verify `plugins.load.paths` includes the ClawVault package path.
98
- - Verify `plugins.slots.memory` is `clawvault`.
99
- - Verify `plugins.entries.clawvault.enabled` is `true`.
@@ -1,152 +0,0 @@
1
- # OpenClaw Plugin Usage Guide
2
-
3
- ClawVault now runs as a proper OpenClaw plugin via `plugins.load.paths` and `plugins.entries.clawvault`.
4
- The old `openclaw hooks install/enable` flow is deprecated.
5
-
6
- ## Installation (New Plugin System)
7
-
8
- ```bash
9
- # Install ClawVault globally
10
- npm install -g clawvault
11
-
12
- # ClawVault auto-registers as an OpenClaw plugin.
13
- # Add to plugins.load.paths in openclaw.json:
14
- # /path/to/node_modules/clawvault
15
-
16
- # Enable in config:
17
- # plugins.slots.memory: "clawvault"
18
- # plugins.entries.clawvault.enabled: true
19
- ```
20
-
21
- Tip: on most setups, you can discover the install path with `npm root -g`.
22
-
23
- ## Plugin Configuration
24
-
25
- All plugin configuration lives under `plugins.entries.clawvault.config`:
26
-
27
- ```json
28
- {
29
- "plugins": {
30
- "slots": { "memory": "clawvault" },
31
- "entries": {
32
- "clawvault": {
33
- "enabled": true,
34
- "config": {
35
- "vaultPath": "/path/to/memory",
36
- "allowClawvaultExec": true,
37
- "allowEnvAccess": true,
38
- "enableStartupRecovery": true,
39
- "enableSessionContextInjection": true,
40
- "enableAutoCheckpoint": true,
41
- "enableObserveOnNew": true,
42
- "enableHeartbeatObservation": true,
43
- "enableCompactionObservation": true,
44
- "enableBeforePromptRecall": true,
45
- "enforceCommunicationProtocol": true,
46
- "enableMessageSendingFilter": true,
47
- "enableFactExtraction": true,
48
- "contextProfile": "auto",
49
- "maxContextResults": 5
50
- }
51
- }
52
- }
53
- }
54
- }
55
- ```
56
-
57
- ## What the Plugin Does (Hook by Hook)
58
-
59
- 1. **`before_prompt_build`**
60
- - Injects ClawVault context and recent session recap.
61
- - Adds a memory recall mandate so the agent uses `memory_search`/`memory_get` before memory-sensitive answers.
62
- - Appends communication protocol rules.
63
- - Runs every turn.
64
-
65
- 2. **`message_sending`**
66
- - Filters outbound phrasing and removes banned patterns (for example: "good catch", "great question").
67
- - Rewrites rabbit-hole offers (for example: "if you'd like I can ...").
68
- - If the response is a question and memory already has the answer, rewrites toward evidence-grounded statements.
69
-
70
- 3. **`gateway_start`**
71
- - Runs startup recovery.
72
- - Detects context death and stores a recovery notice for next prompt injection.
73
-
74
- 4. **`session_start`**
75
- - Fetches session recap entries for context injection.
76
- - Triggers weekly reflection when due.
77
-
78
- 5. **`session_end`**
79
- - Clears session-specific runtime state.
80
-
81
- 6. **`before_reset`**
82
- - Auto-checkpoints before `/new` when enabled.
83
- - Runs observer flow when enabled.
84
- - Extracts facts when enabled.
85
-
86
- 7. **`before_compaction`**
87
- - Runs observation before context compaction when enabled.
88
- - Optionally extracts facts.
89
-
90
- 8. **`agent_end`**
91
- - Runs heartbeat observation after agent turns when enabled.
92
-
93
- ## Registered Tools
94
-
95
- The plugin registers two tools:
96
-
97
- - **`memory_search`**
98
- - Search the vault using:
99
- - `query` (required)
100
- - `maxResults` (optional)
101
- - `minScore` (optional)
102
- - `sessionKey` (optional)
103
-
104
- - **`memory_get`**
105
- - Read vault files using:
106
- - `path` or `relPath` (either accepted)
107
- - `from` (optional starting line)
108
- - `lines` (optional number of lines)
109
-
110
- ## Communication Protocol
111
-
112
- When enabled, ClawVault enforces protocol-safe messaging:
113
-
114
- - Removes banned phrases:
115
- - "good catch"
116
- - "great question"
117
- - "you're right to call that out"
118
- - Removes rabbit-hole offers like:
119
- - "if you'd like I can ..."
120
- - "let me know if you'd like ..."
121
- - Avoids asking questions when memory already contains the answer by rewriting to evidence-backed output.
122
-
123
- ## MEMORY.md vs Vault: Understanding the Relationship
124
-
125
- You may have both a workspace `MEMORY.md` and a ClawVault vault. They are complementary, not competing.
126
-
127
- | Layer | Purpose | Access Pattern |
128
- |-------|---------|----------------|
129
- | **MEMORY.md** | Boot-time executive summary | Immediate, no tool calls |
130
- | **Vault** | Full structured memory system | Retrieved via tools/CLI/injection |
131
-
132
- Recommended pattern:
133
-
134
- 1. Keep `MEMORY.md` short and curated (identity, key decisions, active focus).
135
- 2. Treat the vault as source of truth for detailed records and history.
136
- 3. Reference vault notes from `MEMORY.md` instead of duplicating full reasoning.
137
- 4. Periodically refresh `MEMORY.md` from vault state to prevent drift.
138
-
139
- ## Troubleshooting
140
-
141
- - Plugin not loading:
142
- - Verify `plugins.load.paths` includes the ClawVault package path.
143
- - Verify `plugins.entries.clawvault.enabled` is `true`.
144
- - Verify `plugins.slots.memory` is set to `"clawvault"`.
145
- - Context/tool behavior not appearing:
146
- - Confirm feature flags under `plugins.entries.clawvault.config`.
147
- - Run `clawvault compat` to validate runtime assumptions.
148
-
149
- ## Related Documentation
150
-
151
- - [README: OpenClaw Integration](../README.md#openclaw-integration)
152
- - [Installation Guide](./getting-started/installation.md)