clawvault 2.4.0 → 2.4.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.
- package/README.md +125 -333
- package/bin/register-core-commands.js +68 -8
- package/dist/{chunk-Q3WBH4P4.js → chunk-BMOQI62Q.js} +16 -5
- package/dist/{chunk-33GW63WK.js → chunk-XDCFXFGH.js} +1 -1
- package/dist/commands/context.js +2 -2
- package/dist/commands/doctor.js +1 -1
- package/dist/commands/sleep.js +1 -1
- package/dist/commands/status.js +1 -1
- package/dist/commands/wake.js +1 -1
- package/dist/index.d.ts +10 -2
- package/dist/index.js +2 -2
- package/package.json +10 -8
package/README.md
CHANGED
|
@@ -2,401 +2,193 @@
|
|
|
2
2
|
|
|
3
3
|
**An elephant never forgets.**
|
|
4
4
|
|
|
5
|
-
Structured memory system for AI agents.
|
|
5
|
+
Structured memory system for AI agents. Typed storage, knowledge graph, task management, and Obsidian-native dashboards — all local, all markdown.
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
[](https://www.npmjs.com/package/clawvault) []()
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
🌐 [clawvault.dev](https://clawvault.dev) · 📚 [docs.clawvault.dev](https://docs.clawvault.dev) · 🛠️ [ClawHub Skill](https://clawhub.com/skills/clawvault)
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
> Works with [OpenClaw](https://openclaw.ai) agents or standalone. No cloud. No API keys. Just files.
|
|
12
12
|
|
|
13
|
-
|
|
14
|
-
# Install the skill (recommended for OpenClaw agents)
|
|
15
|
-
clawhub install clawvault
|
|
16
|
-
|
|
17
|
-
# Or install the CLI globally
|
|
18
|
-
npm install -g clawvault
|
|
19
|
-
```
|
|
20
|
-
|
|
21
|
-
## Requirements
|
|
22
|
-
|
|
23
|
-
- **Node.js 18+**
|
|
24
|
-
- **[qmd](https://github.com/Versatly/qmd)** — Local semantic search (required)
|
|
13
|
+
## Install
|
|
25
14
|
|
|
26
15
|
```bash
|
|
27
|
-
# Install qmd first
|
|
28
|
-
bun install -g qmd # or: npm install -g qmd
|
|
29
|
-
|
|
30
|
-
# Then install clawvault
|
|
31
16
|
npm install -g clawvault
|
|
32
17
|
```
|
|
33
18
|
|
|
34
|
-
## Why ClawVault?
|
|
35
|
-
|
|
36
|
-
AI agents forget things. Context windows overflow, sessions end, important details get lost. ClawVault fixes that:
|
|
37
|
-
|
|
38
|
-
- **Structured storage** — Organized categories, not random notes
|
|
39
|
-
- **Local search** — qmd provides BM25 + semantic search with local embeddings (no API quotas)
|
|
40
|
-
- **Wiki-links** — `[[connections]]` visible in Obsidian's graph view
|
|
41
|
-
- **Session continuity** — Handoff/recap system for context death
|
|
42
|
-
- **Token efficient** — Search instead of loading entire memory files
|
|
43
|
-
|
|
44
19
|
## Quick Start
|
|
45
20
|
|
|
46
21
|
```bash
|
|
47
|
-
#
|
|
48
|
-
clawvault init ~/memory --
|
|
49
|
-
|
|
50
|
-
# Store memories
|
|
51
|
-
clawvault remember decision "Use qmd" --content "Local embeddings, no API limits"
|
|
52
|
-
clawvault remember lesson "Context death is survivable" --content "Write it down"
|
|
53
|
-
clawvault capture "Quick note to process later"
|
|
54
|
-
|
|
55
|
-
# Search (uses qmd)
|
|
56
|
-
clawvault search "decision" # BM25 keyword search
|
|
57
|
-
clawvault vsearch "what did I decide" # Semantic search
|
|
58
|
-
|
|
59
|
-
# Session management
|
|
60
|
-
clawvault wake
|
|
61
|
-
clawvault sleep "build wake/sleep commands" --next "run doctor"
|
|
62
|
-
clawvault handoff --working-on "task1" --next "task2" # Manual handoff (advanced)
|
|
63
|
-
clawvault recap # Manual recap (advanced)
|
|
64
|
-
```
|
|
22
|
+
# Create a vault
|
|
23
|
+
clawvault init ~/memory --name my-brain
|
|
65
24
|
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
```
|
|
71
|
-
|
|
72
|
-
## Observational Memory
|
|
25
|
+
# Store memories by type
|
|
26
|
+
clawvault remember decision "Use PostgreSQL" --content "Chose for JSONB support"
|
|
27
|
+
clawvault remember lesson "Always checkpoint" --content "Context death is real"
|
|
28
|
+
clawvault capture "Quick thought to process later"
|
|
73
29
|
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
# One-shot: compress a conversation file
|
|
78
|
-
clawvault observe --compress session.md
|
|
30
|
+
# Search
|
|
31
|
+
clawvault search "postgresql" # Keyword (BM25)
|
|
32
|
+
clawvault vsearch "what database?" # Semantic (local embeddings)
|
|
79
33
|
|
|
80
|
-
#
|
|
81
|
-
clawvault
|
|
34
|
+
# Session lifecycle
|
|
35
|
+
clawvault wake # Start session, load context
|
|
36
|
+
clawvault sleep "built auth system" \ # End session with handoff
|
|
37
|
+
--next "deploy to staging"
|
|
82
38
|
|
|
83
|
-
#
|
|
84
|
-
clawvault
|
|
39
|
+
# Task management
|
|
40
|
+
clawvault task add "Ship v2" --owner agent --project acme --priority high
|
|
41
|
+
clawvault task list
|
|
42
|
+
clawvault blocked
|
|
43
|
+
clawvault backlog add "Explore caching" --project acme
|
|
85
44
|
|
|
86
|
-
#
|
|
87
|
-
clawvault
|
|
45
|
+
# Visual dashboards (Obsidian JSON Canvas)
|
|
46
|
+
clawvault canvas --template brain # System architecture overview
|
|
47
|
+
clawvault canvas --template project-board # Task board by owner
|
|
88
48
|
```
|
|
89
49
|
|
|
90
|
-
|
|
91
|
-
- 🔴 **Critical** — decisions, errors, blockers, deadlines
|
|
92
|
-
- 🟡 **Notable** — preferences, architecture discussions, people interactions
|
|
93
|
-
- 🟢 **Info** — routine updates, deployments, general progress
|
|
50
|
+
## Features
|
|
94
51
|
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
For long-running OpenClaw sessions, `observe --active` tracks per-session byte cursors in `.clawvault/observe-cursors.json` and only compresses new transcript deltas once threshold windows are crossed.
|
|
98
|
-
|
|
99
|
-
Integrated into the sleep/wake lifecycle:
|
|
100
|
-
```bash
|
|
101
|
-
clawvault sleep "task summary" --session-transcript conversation.md
|
|
102
|
-
# → observations auto-generated and routed
|
|
52
|
+
### 📁 Typed Memory Storage
|
|
53
|
+
Every memory has a category: `decisions/`, `lessons/`, `people/`, `projects/`, `commitments/`. No more dumping everything into one file. "Show me all decisions" actually works.
|
|
103
54
|
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
```
|
|
55
|
+
### 🧠 Knowledge Graph
|
|
56
|
+
Wiki-links (`[[connections]]`) build a typed graph index. Query with graph-aware context that blends semantic search with relationship traversal.
|
|
107
57
|
|
|
108
|
-
Token-budget-aware context injection:
|
|
109
58
|
```bash
|
|
110
|
-
clawvault
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
clawvault context "what decisions were made" --format json
|
|
114
|
-
# → includes explain metadata (signals + rationale) per entry
|
|
115
|
-
|
|
116
|
-
clawvault context "plan database migration" --profile planning
|
|
117
|
-
# → profile-tuned ordering for planning, incident, handoff, or default
|
|
118
|
-
|
|
119
|
-
clawvault context "URGENT outage: rollback failed" --profile auto
|
|
120
|
-
# → auto infers incident/planning/handoff/default from prompt intent
|
|
59
|
+
clawvault graph # Graph summary
|
|
60
|
+
clawvault context "database migration" \ # Graph-aware context
|
|
61
|
+
--profile planning --budget 2000
|
|
121
62
|
```
|
|
122
63
|
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
Use `clawvault search` / `qmd` for vault search — it indexes the **entire vault** (decisions/, people/, lessons/, observations/, etc.).
|
|
126
|
-
|
|
127
|
-
OpenClaw's built-in `memory_search` only indexes `MEMORY.md` + `memory/**/*.md`. If your vault lives inside `memory/`, it'll work. If your vault is elsewhere, `memory_search` won't find your ClawVault categories.
|
|
64
|
+
### ✅ Task Management
|
|
65
|
+
Tasks and backlog stored as markdown with frontmatter. Agents and humans share the same system.
|
|
128
66
|
|
|
129
67
|
```bash
|
|
130
|
-
|
|
131
|
-
clawvault
|
|
132
|
-
clawvault
|
|
133
|
-
|
|
134
|
-
# OpenClaw memory search (only MEMORY.md + memory/*.md)
|
|
135
|
-
# Works if vault is inside memory/, misses vault categories otherwise
|
|
68
|
+
clawvault task add "Fix auth" --owner bot --priority critical
|
|
69
|
+
clawvault task update fix-auth --status blocked --blocked-by "api-key"
|
|
70
|
+
clawvault blocked # Triage blocked work
|
|
71
|
+
clawvault backlog promote explore-caching # Backlog → active task
|
|
136
72
|
```
|
|
137
73
|
|
|
138
|
-
|
|
74
|
+
### 🎨 Obsidian Dashboards
|
|
75
|
+
Generate visual dashboards as [JSON Canvas](https://jsoncanvas.org) files:
|
|
139
76
|
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
├── lessons/ # Things learned
|
|
147
|
-
├── people/ # One file per person
|
|
148
|
-
├── projects/ # Active work
|
|
149
|
-
├── commitments/ # Promises and deadlines
|
|
150
|
-
├── inbox/ # Quick capture (process later)
|
|
151
|
-
└── handoffs/ # Session continuity
|
|
152
|
-
```
|
|
153
|
-
|
|
154
|
-
## Commands
|
|
155
|
-
|
|
156
|
-
### Store Memories
|
|
77
|
+
| Template | Description |
|
|
78
|
+
|----------|-------------|
|
|
79
|
+
| `brain` | 4-quadrant architecture: vault structure, direction, agent workspace, knowledge graph |
|
|
80
|
+
| `project-board` | Owner-centric kanban with status columns, priority icons, agent/human cards |
|
|
81
|
+
| `default` | Two-column dashboard with activity metrics and task triage |
|
|
82
|
+
| `sprint` | Weekly focus with sprint metrics and open loops |
|
|
157
83
|
|
|
158
84
|
```bash
|
|
159
|
-
|
|
160
|
-
clawvault
|
|
161
|
-
# Types: decision, lesson, fact, commitment, project, person
|
|
162
|
-
|
|
163
|
-
# Quick capture
|
|
164
|
-
clawvault capture "Note to self"
|
|
165
|
-
|
|
166
|
-
# Manual store
|
|
167
|
-
clawvault store -c decisions -t "Title" --content "..."
|
|
85
|
+
clawvault canvas --template brain
|
|
86
|
+
clawvault canvas --template project-board --owner my-agent
|
|
168
87
|
```
|
|
169
88
|
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
### Search
|
|
89
|
+
### 🔭 Observational Memory
|
|
90
|
+
Auto-compress conversations into prioritized observations. Critical items route to vault categories automatically.
|
|
173
91
|
|
|
174
92
|
```bash
|
|
175
|
-
clawvault
|
|
176
|
-
clawvault
|
|
177
|
-
clawvault vsearch "query" # Semantic (local embeddings)
|
|
93
|
+
clawvault observe --compress session.md # One-shot compression
|
|
94
|
+
clawvault observe --active # Incremental from transcripts
|
|
178
95
|
```
|
|
179
96
|
|
|
180
|
-
###
|
|
97
|
+
### 🛡️ Context Death Recovery
|
|
98
|
+
Checkpoint/recover system keeps agents alive across crashes and session resets.
|
|
181
99
|
|
|
182
100
|
```bash
|
|
183
|
-
clawvault
|
|
184
|
-
clawvault
|
|
185
|
-
clawvault get decisions/title # Specific document
|
|
186
|
-
clawvault stats # Vault overview
|
|
187
|
-
clawvault graph --refresh # Typed memory graph summary
|
|
101
|
+
clawvault checkpoint --working-on "migration" --focus "step 3"
|
|
102
|
+
clawvault recover # After crash/reset
|
|
188
103
|
```
|
|
189
104
|
|
|
190
|
-
###
|
|
105
|
+
### 🌐 Tailscale Networking
|
|
106
|
+
Multi-vault collaboration over Tailscale with trust levels and cross-vault search.
|
|
191
107
|
|
|
192
108
|
```bash
|
|
193
|
-
# Start
|
|
194
|
-
clawvault
|
|
195
|
-
|
|
196
|
-
# End a session with a handoff
|
|
197
|
-
clawvault sleep "building CRM, fixing webhook" \
|
|
198
|
-
--blocked "waiting for API key" \
|
|
199
|
-
--next "deploy to production" \
|
|
200
|
-
--decisions "chose Supabase over Firebase" \
|
|
201
|
-
--feeling "focused"
|
|
202
|
-
|
|
203
|
-
# Manual tools (advanced)
|
|
204
|
-
clawvault handoff --working-on "task1" --next "task2"
|
|
205
|
-
clawvault recap --brief # Token-efficient recap
|
|
206
|
-
|
|
207
|
-
# Health check
|
|
208
|
-
clawvault doctor
|
|
209
|
-
|
|
210
|
-
# OpenClaw compatibility check
|
|
211
|
-
clawvault compat
|
|
212
|
-
|
|
213
|
-
# CI/automation-friendly compatibility gate
|
|
214
|
-
clawvault compat --strict # exits non-zero on warnings/errors
|
|
215
|
-
# validates openclaw CLI readiness, hook events/requirements, handler safety/profile delegation, and SKILL metadata
|
|
216
|
-
# flags missing, non-zero, or signal-terminated openclaw CLI checks as warnings
|
|
217
|
-
# warns on unsafe handler execution conventions (execSync usage, shell:true options, missing --profile auto delegation)
|
|
218
|
-
|
|
219
|
-
# Validate a specific project root (fixtures/CI)
|
|
220
|
-
clawvault compat --strict --base-dir ./tests/compat-fixtures/healthy
|
|
221
|
-
|
|
222
|
-
# Run strict compatibility fixture matrix (healthy + intentional drift cases)
|
|
223
|
-
npm run test:compat-fixtures
|
|
224
|
-
# fixture expectations are defined in tests/compat-fixtures/cases.json
|
|
225
|
-
# fixture manifest includes schemaVersion for explicit contract evolution (current schemaVersion=2)
|
|
226
|
-
# includes expectedCheckLabels to lock compat check-label contract
|
|
227
|
-
# supports expected status, detail snippets, and hint snippets per check
|
|
228
|
-
# supports openclawExitCode/openclawSignal/openclawMissing for declarative CLI failure simulation cases
|
|
229
|
-
# each case also owns its scenario description (README coverage is validated)
|
|
230
|
-
# expected check labels are validated against live compat output to catch stale contracts
|
|
231
|
-
# includes a fresh build before running fixtures
|
|
232
|
-
|
|
233
|
-
# Quick smoke check (healthy fixture only)
|
|
234
|
-
npm run test:compat-smoke
|
|
235
|
-
# runs fast contract validation + healthy fixture check (requires existing dist build)
|
|
236
|
-
# fails fast if build artifacts are stale
|
|
237
|
-
|
|
238
|
-
# Validate compatibility fixture contract only (no full matrix execution)
|
|
239
|
-
npm run test:compat-contract
|
|
240
|
-
# includes manifest/docs/runtime-label parity checks with a fresh build
|
|
241
|
-
|
|
242
|
-
# Fast contract-only validation (requires existing dist build)
|
|
243
|
-
npm run test:compat-contract:fast
|
|
244
|
-
# fails fast if compat source is newer than dist build artifacts
|
|
245
|
-
|
|
246
|
-
# Run full local CI gate (typecheck + tests + compat fixtures)
|
|
247
|
-
npm run ci
|
|
248
|
-
# runs build-backed contract validation, fixture matrix execution, and standalone summary artifact validation
|
|
249
|
-
|
|
250
|
-
# Optional: run only specific compatibility fixtures
|
|
251
|
-
COMPAT_CASES=healthy,missing-events npm run test:compat-fixtures
|
|
252
|
-
# duplicate COMPAT_CASES entries are rejected to prevent ambiguous selection
|
|
253
|
-
# empty/whitespace-only COMPAT_CASES values are rejected as invalid selection input
|
|
254
|
-
# runner logs resolved case selection before execution for easier verification
|
|
255
|
-
|
|
256
|
-
# Optional: run fast fixture checks without building
|
|
257
|
-
npm run test:compat-fixtures:fast
|
|
258
|
-
|
|
259
|
-
# Optional: write per-fixture JSON reports to a directory
|
|
260
|
-
COMPAT_REPORT_DIR=/tmp/clawvault-compat-reports npm run test:compat-fixtures
|
|
261
|
-
# includes per-case reports and summary.json (summarySchemaVersion + mode/schemaVersion/selectedCases/selectedTotal + expected/runtime labels + passed/failed case lists + preflight/overall timing + slowest cases)
|
|
262
|
-
# summary artifacts are validated for schema/field invariants before write (fail-fast on malformed report generation)
|
|
263
|
-
# validator now also enforces result-entry schema and passed/failed list coherence with selected case ordering
|
|
264
|
-
# slowestCases telemetry is also validated against case-result durations and sort order
|
|
265
|
-
# summary validation is enforced centrally in summary artifact writing, so all emitters share one contract path
|
|
266
|
-
# per-case report artifacts are also validated centrally before write
|
|
267
|
-
|
|
268
|
-
# Optional: validate an existing compatibility summary artifact set
|
|
269
|
-
node scripts/validate-compat-summary.mjs /tmp/clawvault-compat-reports/summary.json
|
|
270
|
-
# explicit option form (also supports custom case-report directory)
|
|
271
|
-
node scripts/validate-compat-summary.mjs --summary /tmp/clawvault-compat-reports/summary.json --report-dir /tmp/clawvault-compat-reports
|
|
272
|
-
# summary-only mode when per-case reports are unavailable
|
|
273
|
-
node scripts/validate-compat-summary.mjs --summary /tmp/summary.json --allow-missing-case-reports
|
|
274
|
-
# machine-readable success output for automation
|
|
275
|
-
node scripts/validate-compat-summary.mjs --summary /tmp/summary.json --json
|
|
276
|
-
# json output is schema-versioned and also used for machine-readable error payloads
|
|
277
|
-
# success payload includes summary/fixture schema versions for downstream compatibility checks
|
|
278
|
-
# write validator result payload (success/error) to a file
|
|
279
|
-
node scripts/validate-compat-summary.mjs --summary /tmp/summary.json --json --out /tmp/validator-result.json
|
|
280
|
-
# in CI, compat-summary artifacts now include summary.json + report-schema-validator-result.json + validator-result.json + schema-validator-result.json + validator-result-verifier-result.json + artifact-bundle-validator-result.json + artifact-bundle-manifest-validator-result.json
|
|
281
|
-
# validator payload schema/validation is centralized in scripts/lib/compat-summary-validator-output.mjs
|
|
282
|
-
# JSON schema artifacts for payload contracts live in /schemas (including json-schema-validator-output)
|
|
283
|
-
# generic schema checker CLI lives at scripts/validate-json-schema.mjs
|
|
284
|
-
# schema-validator result payload is written to schema-validator-result.json in compat report dirs
|
|
285
|
-
# summary/case-report artifacts can also be schema-validated via scripts/validate-compat-report-schemas.mjs
|
|
286
|
-
# see validator usage/help
|
|
287
|
-
node scripts/validate-compat-summary.mjs --help
|
|
288
|
-
# equivalent npm wrapper (supports arg passthrough, env fallback)
|
|
289
|
-
npm run test:compat-summary:verify -- /tmp/clawvault-compat-reports/summary.json
|
|
290
|
-
# validate previously emitted validator-result payload directly
|
|
291
|
-
npm run test:compat-validator-result:verify -- /tmp/clawvault-compat-reports/validator-result.json
|
|
292
|
-
# npm verifier wrapper enforces --require-ok by default
|
|
293
|
-
# validate validator-result payload against its JSON schema contract
|
|
294
|
-
npm run test:compat-validator-result:schema
|
|
295
|
-
# validate schema-validator-result payload against its own schema contract
|
|
296
|
-
npm run test:compat-schema-validator-result:verify
|
|
297
|
-
# validate summary.json and per-case report artifacts against schema documents
|
|
298
|
-
npm run test:compat-report-schemas:verify
|
|
299
|
-
# emit report-schema validator output payload + validate its schema contract
|
|
300
|
-
npm run test:compat-report-schemas:verify:report
|
|
301
|
-
npm run test:compat-report-schemas:verify:schema
|
|
302
|
-
# emit verifier output payload + validate verifier payload schema
|
|
303
|
-
npm run test:compat-validator-result:verify:report
|
|
304
|
-
npm run test:compat-validator-result:verify:schema
|
|
305
|
-
# verify full compat artifact bundle contract + emit schema-validated bundle result
|
|
306
|
-
npm run test:compat-artifact-bundle:verify
|
|
307
|
-
npm run test:compat-artifact-bundle:verify:report
|
|
308
|
-
npm run test:compat-artifact-bundle:verify:schema
|
|
309
|
-
npm run test:compat-artifact-bundle:manifest:schema
|
|
310
|
-
npm run test:compat-artifact-bundle:manifest:verify
|
|
311
|
-
npm run test:compat-artifact-bundle:manifest:verify:report
|
|
312
|
-
npm run test:compat-artifact-bundle:manifest:verify:schema
|
|
313
|
-
# bundle result now includes an artifactContracts manifest (artifact path + schema id + expected/actual schema version), now including artifact-bundle-manifest-validator-result.json
|
|
314
|
-
# bundle validator supports --manifest <path> to override the default contract manifest
|
|
315
|
-
# manifest verifier emits artifact-bundle-manifest-validator-result.json with schemaId/version-field contract checks
|
|
316
|
-
# explicit verifier CLI options:
|
|
317
|
-
node scripts/validate-compat-validator-result.mjs --validator-result /tmp/clawvault-compat-reports/validator-result.json --json --out /tmp/verifier-result.json
|
|
318
|
-
# enforce success-only validator-result status in strict automation paths
|
|
319
|
-
node scripts/validate-compat-validator-result.mjs --validator-result /tmp/clawvault-compat-reports/validator-result.json --require-ok
|
|
320
|
-
# use --help for verifier usage and path-resolution rules
|
|
321
|
-
# or run fixture generation + standalone summary validation together
|
|
322
|
-
npm run test:compat-summary:fast
|
|
323
|
-
# debug stack wrappers individually when isolating compat contract drift
|
|
324
|
-
npm run test:compat-report-stack:fast
|
|
325
|
-
npm run test:compat-validator-stack:fast
|
|
326
|
-
npm run test:compat-artifact-stack:fast
|
|
327
|
-
# script behavior is covered by dedicated unit tests (success + failure + env fallback)
|
|
328
|
-
# validator exits with a clear error when no summary path/source input is provided
|
|
329
|
-
# summary scripts respect COMPAT_REPORT_DIR (defaults to .compat-reports when unset)
|
|
330
|
-
# report parsing now validates per-check schema and warning/error count coherence before artifact evaluation
|
|
109
|
+
clawvault serve # Start API server
|
|
110
|
+
clawvault peers # Manage vault peers
|
|
111
|
+
clawvault net-search "query" # Search across vaults
|
|
331
112
|
```
|
|
332
113
|
|
|
114
|
+
## Setup & Customization
|
|
333
115
|
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
```markdown
|
|
339
|
-
## Memory
|
|
116
|
+
```bash
|
|
117
|
+
# Full setup with neural graph theme + Obsidian Bases views
|
|
118
|
+
clawvault setup --theme neural --canvas brain
|
|
340
119
|
|
|
341
|
-
|
|
120
|
+
# Minimal agent vault
|
|
121
|
+
clawvault init ./memory --minimal
|
|
342
122
|
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
qmd search "query" -c your-memory # Fast keyword
|
|
346
|
-
qmd vsearch "query" -c your-memory # Semantic
|
|
347
|
-
\`\`\`
|
|
123
|
+
# Custom categories
|
|
124
|
+
clawvault init ./memory --categories "notes,research,code"
|
|
348
125
|
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
clawvault remember lesson "Title" --content "..."
|
|
353
|
-
\`\`\`
|
|
126
|
+
# Skip visual config
|
|
127
|
+
clawvault setup --no-graph-colors --no-bases
|
|
128
|
+
```
|
|
354
129
|
|
|
355
|
-
###
|
|
356
|
-
\`\`\`bash
|
|
357
|
-
clawvault wake
|
|
358
|
-
\`\`\`
|
|
130
|
+
### Graph Themes
|
|
359
131
|
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
132
|
+
| Theme | Description |
|
|
133
|
+
|-------|-------------|
|
|
134
|
+
| `neural` | Dark background, colored nodes by category, green network links, golden glow |
|
|
135
|
+
| `minimal` | Subtle category colors, no background changes |
|
|
136
|
+
| `none` | Skip graph theming |
|
|
364
137
|
|
|
365
|
-
|
|
366
|
-
\`\`\`bash
|
|
367
|
-
clawvault checkpoint --working-on "..." --focus "..." --blocked "..."
|
|
368
|
-
\`\`\`
|
|
138
|
+
## Vault Structure
|
|
369
139
|
|
|
370
140
|
```
|
|
141
|
+
memory/
|
|
142
|
+
├── .clawvault.json # Vault config
|
|
143
|
+
├── .clawvault/
|
|
144
|
+
│ └── graph-index.json # Knowledge graph
|
|
145
|
+
├── tasks/ # Active tasks (markdown + frontmatter)
|
|
146
|
+
├── backlog/ # Ideas and future work
|
|
147
|
+
├── decisions/ # Choices with reasoning
|
|
148
|
+
├── lessons/ # Things learned
|
|
149
|
+
├── people/ # One file per person
|
|
150
|
+
├── projects/ # Active work
|
|
151
|
+
├── commitments/ # Promises and deadlines
|
|
152
|
+
├── inbox/ # Quick captures
|
|
153
|
+
├── handoffs/ # Session continuity
|
|
154
|
+
├── ledger/
|
|
155
|
+
│ ├── raw/ # Raw session transcripts
|
|
156
|
+
│ ├── observations/ # Compressed observations
|
|
157
|
+
│ └── reflections/ # Weekly reflections
|
|
158
|
+
├── all-tasks.base # Obsidian Bases view
|
|
159
|
+
├── by-owner.base # Tasks by owner
|
|
160
|
+
└── dashboard.canvas # Generated dashboard
|
|
161
|
+
```
|
|
162
|
+
|
|
163
|
+
## For OpenClaw Agents
|
|
371
164
|
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
165
|
+
```bash
|
|
166
|
+
# Install as a skill
|
|
167
|
+
clawhub install clawvault
|
|
375
168
|
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
- `project.md` — Active work
|
|
380
|
-
- `handoff.md` — Session state before context death
|
|
381
|
-
- `daily.md` — Daily notes
|
|
169
|
+
# Or add to your agent's tools
|
|
170
|
+
npm install -g clawvault
|
|
171
|
+
```
|
|
382
172
|
|
|
383
|
-
|
|
173
|
+
Add to your `AGENTS.md`:
|
|
384
174
|
|
|
385
|
-
|
|
175
|
+
```markdown
|
|
176
|
+
## Memory
|
|
177
|
+
- `clawvault wake` on session start
|
|
178
|
+
- `clawvault sleep "summary" --next "next steps"` on session end
|
|
179
|
+
- `clawvault checkpoint` every 10-15 min during heavy work
|
|
180
|
+
- `clawvault remember <type> "title" --content "..."` for important items
|
|
181
|
+
- `clawvault search "query"` before asking questions
|
|
182
|
+
```
|
|
386
183
|
|
|
387
|
-
|
|
388
|
-
import { ClawVault, createVault, findVault } from 'clawvault';
|
|
184
|
+
## Requirements
|
|
389
185
|
|
|
390
|
-
|
|
186
|
+
- **Node.js 18+**
|
|
187
|
+
- **[qmd](https://github.com/Versatly/qmd)** — Local semantic search (optional but recommended)
|
|
391
188
|
|
|
392
|
-
|
|
393
|
-
category: 'decisions',
|
|
394
|
-
title: 'Use ClawVault',
|
|
395
|
-
content: 'Decided to use ClawVault for memory.',
|
|
396
|
-
});
|
|
189
|
+
## Docs
|
|
397
190
|
|
|
398
|
-
|
|
399
|
-
```
|
|
191
|
+
Full documentation at **[docs.clawvault.dev](https://docs.clawvault.dev)**
|
|
400
192
|
|
|
401
193
|
## License
|
|
402
194
|
|
|
@@ -404,4 +196,4 @@ MIT
|
|
|
404
196
|
|
|
405
197
|
---
|
|
406
198
|
|
|
407
|
-
*
|
|
199
|
+
*Built by [Versatly](https://versatly.com) — autonomous AI employees for businesses.* 🐘
|
|
@@ -22,22 +22,50 @@ export function registerCoreCommands(
|
|
|
22
22
|
.option('--minimal', 'Create minimal vault (memory categories only, no tasks/bases/graph)')
|
|
23
23
|
.action(async (vaultPath, options) => {
|
|
24
24
|
const targetPath = vaultPath || '.';
|
|
25
|
-
|
|
25
|
+
const resolvedPath = path.resolve(targetPath);
|
|
26
|
+
console.log(chalk.cyan(`\n🐘 Initializing ClawVault at ${resolvedPath}...\n`));
|
|
27
|
+
|
|
28
|
+
// Check for existing vault
|
|
29
|
+
const existingConfig = path.join(resolvedPath, '.clawvault.json');
|
|
30
|
+
if (fs.existsSync(existingConfig)) {
|
|
31
|
+
console.error(chalk.red(`Error: A ClawVault already exists at ${resolvedPath}`));
|
|
32
|
+
console.error(chalk.dim(' Use --force to reinitialize (not yet supported) or choose a different path.'));
|
|
33
|
+
process.exit(1);
|
|
34
|
+
}
|
|
26
35
|
|
|
27
36
|
try {
|
|
37
|
+
// Resolve --minimal shorthand
|
|
38
|
+
const isMinimal = !!options.minimal;
|
|
39
|
+
const skipBases = isMinimal || options.bases === false;
|
|
40
|
+
const skipTasks = isMinimal || !!options.noTasks;
|
|
41
|
+
const skipGraph = isMinimal || !!options.noGraph;
|
|
42
|
+
|
|
43
|
+
// Resolve custom categories
|
|
44
|
+
const { DEFAULT_CATEGORIES } = await import('../dist/index.js');
|
|
45
|
+
let categories = [...DEFAULT_CATEGORIES];
|
|
46
|
+
if (options.categories) {
|
|
47
|
+
const customCats = options.categories.split(',').map(c => c.trim()).filter(Boolean);
|
|
48
|
+
categories = customCats;
|
|
49
|
+
}
|
|
50
|
+
|
|
28
51
|
const vault = await createVault(targetPath, {
|
|
29
|
-
name: options.name || path.basename(
|
|
30
|
-
qmdCollection: options.qmdCollection
|
|
31
|
-
|
|
52
|
+
name: options.name || path.basename(resolvedPath),
|
|
53
|
+
qmdCollection: options.qmdCollection,
|
|
54
|
+
categories
|
|
55
|
+
}, { skipBases, skipTasks, skipGraph });
|
|
32
56
|
|
|
33
|
-
const
|
|
34
|
-
const memoryCategories =
|
|
35
|
-
const workCategories =
|
|
57
|
+
const vaultCategories = vault.getCategories();
|
|
58
|
+
const memoryCategories = vaultCategories.filter(c => !['templates', 'tasks', 'backlog'].includes(c));
|
|
59
|
+
const workCategories = vaultCategories.filter(c => ['tasks', 'backlog'].includes(c));
|
|
36
60
|
|
|
37
61
|
console.log(chalk.green('✓ Vault created'));
|
|
38
62
|
console.log(chalk.dim(` Memory: ${memoryCategories.join(', ')}`));
|
|
39
|
-
|
|
63
|
+
if (workCategories.length > 0) {
|
|
64
|
+
console.log(chalk.dim(` Work: ${workCategories.join(', ')}`));
|
|
65
|
+
}
|
|
40
66
|
console.log(chalk.dim(` Ledger: ledger/raw, ledger/observations, ledger/reflections`));
|
|
67
|
+
if (skipBases) console.log(chalk.dim(' Bases: skipped'));
|
|
68
|
+
if (skipGraph) console.log(chalk.dim(' Graph: skipped'));
|
|
41
69
|
|
|
42
70
|
console.log(chalk.cyan('\nSetting up qmd collection...'));
|
|
43
71
|
try {
|
|
@@ -55,6 +83,38 @@ export function registerCoreCommands(
|
|
|
55
83
|
console.log(chalk.yellow('⚠ qmd collection may already exist'));
|
|
56
84
|
}
|
|
57
85
|
|
|
86
|
+
// Apply theme if requested
|
|
87
|
+
if (options.theme && options.theme !== 'none') {
|
|
88
|
+
try {
|
|
89
|
+
const { setupCommand } = await import('../dist/commands/setup.js');
|
|
90
|
+
await setupCommand({
|
|
91
|
+
graphColors: true,
|
|
92
|
+
bases: false,
|
|
93
|
+
canvas: false,
|
|
94
|
+
theme: options.theme,
|
|
95
|
+
vault: resolvedPath
|
|
96
|
+
});
|
|
97
|
+
} catch {
|
|
98
|
+
console.log(chalk.yellow(`⚠ Could not apply ${options.theme} theme`));
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
// Generate canvas if requested
|
|
103
|
+
if (options.canvas) {
|
|
104
|
+
try {
|
|
105
|
+
const { setupCommand } = await import('../dist/commands/setup.js');
|
|
106
|
+
await setupCommand({
|
|
107
|
+
graphColors: false,
|
|
108
|
+
bases: false,
|
|
109
|
+
canvas: options.canvas === true ? 'default' : options.canvas,
|
|
110
|
+
theme: 'none',
|
|
111
|
+
vault: resolvedPath
|
|
112
|
+
});
|
|
113
|
+
} catch {
|
|
114
|
+
console.log(chalk.yellow(`⚠ Could not generate canvas`));
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
|
|
58
118
|
console.log(chalk.green('\n✅ ClawVault ready!\n'));
|
|
59
119
|
console.log(' ' + chalk.bold('Try these:'));
|
|
60
120
|
console.log(chalk.dim(' clawvault capture "my first thought" # quick capture'));
|
|
@@ -42,13 +42,19 @@ var ClawVault = class {
|
|
|
42
42
|
/**
|
|
43
43
|
* Initialize a new vault
|
|
44
44
|
*/
|
|
45
|
-
async init(options = {}) {
|
|
45
|
+
async init(options = {}, initFlags) {
|
|
46
46
|
if (!hasQmd()) {
|
|
47
47
|
throw new QmdUnavailableError();
|
|
48
48
|
}
|
|
49
49
|
const vaultPath = this.config.path;
|
|
50
|
+
const flags = initFlags || {};
|
|
50
51
|
this.config = { ...this.config, ...options };
|
|
51
52
|
this.applyQmdConfig();
|
|
53
|
+
if (flags.skipTasks) {
|
|
54
|
+
this.config.categories = this.config.categories.filter(
|
|
55
|
+
(c) => !["tasks", "backlog"].includes(c)
|
|
56
|
+
);
|
|
57
|
+
}
|
|
52
58
|
if (!fs.existsSync(vaultPath)) {
|
|
53
59
|
fs.mkdirSync(vaultPath, { recursive: true });
|
|
54
60
|
}
|
|
@@ -83,8 +89,12 @@ var ClawVault = class {
|
|
|
83
89
|
qmdRoot: this.getQmdRoot()
|
|
84
90
|
};
|
|
85
91
|
fs.writeFileSync(configPath, JSON.stringify(meta, null, 2));
|
|
86
|
-
this.
|
|
87
|
-
|
|
92
|
+
if (!flags.skipBases && this.config.categories.includes("tasks")) {
|
|
93
|
+
this.createBasesFiles();
|
|
94
|
+
}
|
|
95
|
+
if (!flags.skipGraph) {
|
|
96
|
+
await this.syncMemoryGraphIndex({ forceFull: true });
|
|
97
|
+
}
|
|
88
98
|
this.initialized = true;
|
|
89
99
|
}
|
|
90
100
|
createBasesFiles() {
|
|
@@ -734,6 +744,7 @@ var ClawVault = class {
|
|
|
734
744
|
}
|
|
735
745
|
}
|
|
736
746
|
async createWelcomeNote() {
|
|
747
|
+
if (!this.config.categories.includes("inbox")) return;
|
|
737
748
|
const inboxPath = path.join(this.config.path, "inbox", "welcome.md");
|
|
738
749
|
if (fs.existsSync(inboxPath)) return;
|
|
739
750
|
const now = (/* @__PURE__ */ new Date()).toISOString().split("T")[0];
|
|
@@ -871,9 +882,9 @@ async function findVault(startPath = process.cwd()) {
|
|
|
871
882
|
}
|
|
872
883
|
return null;
|
|
873
884
|
}
|
|
874
|
-
async function createVault(vaultPath, options = {}) {
|
|
885
|
+
async function createVault(vaultPath, options = {}, initFlags) {
|
|
875
886
|
const vault = new ClawVault(vaultPath);
|
|
876
|
-
await vault.init(options);
|
|
887
|
+
await vault.init(options, initFlags);
|
|
877
888
|
return vault;
|
|
878
889
|
}
|
|
879
890
|
|
package/dist/commands/context.js
CHANGED
|
@@ -3,8 +3,8 @@ import {
|
|
|
3
3
|
contextCommand,
|
|
4
4
|
formatContextMarkdown,
|
|
5
5
|
registerContextCommand
|
|
6
|
-
} from "../chunk-
|
|
7
|
-
import "../chunk-
|
|
6
|
+
} from "../chunk-XDCFXFGH.js";
|
|
7
|
+
import "../chunk-BMOQI62Q.js";
|
|
8
8
|
import "../chunk-FDJIZKCW.js";
|
|
9
9
|
import "../chunk-L3DJ36BZ.js";
|
|
10
10
|
import "../chunk-ZZA73MFY.js";
|
package/dist/commands/doctor.js
CHANGED
package/dist/commands/sleep.js
CHANGED
package/dist/commands/status.js
CHANGED
package/dist/commands/wake.js
CHANGED
package/dist/index.d.ts
CHANGED
|
@@ -32,7 +32,11 @@ declare class ClawVault {
|
|
|
32
32
|
/**
|
|
33
33
|
* Initialize a new vault
|
|
34
34
|
*/
|
|
35
|
-
init(options?: Partial<VaultConfig
|
|
35
|
+
init(options?: Partial<VaultConfig>, initFlags?: {
|
|
36
|
+
skipBases?: boolean;
|
|
37
|
+
skipTasks?: boolean;
|
|
38
|
+
skipGraph?: boolean;
|
|
39
|
+
}): Promise<void>;
|
|
36
40
|
private createBasesFiles;
|
|
37
41
|
/**
|
|
38
42
|
* Load an existing vault
|
|
@@ -161,7 +165,11 @@ declare function findVault(startPath?: string): Promise<ClawVault | null>;
|
|
|
161
165
|
/**
|
|
162
166
|
* Create a new vault
|
|
163
167
|
*/
|
|
164
|
-
declare function createVault(vaultPath: string, options?: Partial<VaultConfig
|
|
168
|
+
declare function createVault(vaultPath: string, options?: Partial<VaultConfig>, initFlags?: {
|
|
169
|
+
skipBases?: boolean;
|
|
170
|
+
skipTasks?: boolean;
|
|
171
|
+
skipGraph?: boolean;
|
|
172
|
+
}): Promise<ClawVault>;
|
|
165
173
|
|
|
166
174
|
/**
|
|
167
175
|
* ClawVault Search Engine - qmd Backend
|
package/dist/index.js
CHANGED
|
@@ -111,12 +111,12 @@ import {
|
|
|
111
111
|
normalizeContextProfileInput,
|
|
112
112
|
registerContextCommand,
|
|
113
113
|
resolveContextProfile
|
|
114
|
-
} from "./chunk-
|
|
114
|
+
} from "./chunk-XDCFXFGH.js";
|
|
115
115
|
import {
|
|
116
116
|
ClawVault,
|
|
117
117
|
createVault,
|
|
118
118
|
findVault
|
|
119
|
-
} from "./chunk-
|
|
119
|
+
} from "./chunk-BMOQI62Q.js";
|
|
120
120
|
import {
|
|
121
121
|
DEFAULT_CATEGORIES,
|
|
122
122
|
DEFAULT_CONFIG,
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "clawvault",
|
|
3
|
-
"version": "2.4.
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "2.4.2",
|
|
4
|
+
"description": "Structured memory system for AI agents — typed storage, knowledge graph, task management, and Obsidian dashboards. An elephant never forgets. 🐘",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.cjs",
|
|
7
7
|
"module": "dist/index.js",
|
|
@@ -69,16 +69,18 @@
|
|
|
69
69
|
"prepublishOnly": "npm run build"
|
|
70
70
|
},
|
|
71
71
|
"keywords": [
|
|
72
|
-
"
|
|
73
|
-
"ai",
|
|
74
|
-
"agent",
|
|
72
|
+
"ai-agent",
|
|
75
73
|
"memory",
|
|
76
|
-
"
|
|
74
|
+
"knowledge-graph",
|
|
77
75
|
"obsidian",
|
|
78
76
|
"markdown",
|
|
79
|
-
"
|
|
77
|
+
"task-management",
|
|
80
78
|
"context-death",
|
|
81
|
-
"
|
|
79
|
+
"openclaw",
|
|
80
|
+
"llm",
|
|
81
|
+
"agent-memory",
|
|
82
|
+
"canvas-dashboard",
|
|
83
|
+
"semantic-search"
|
|
82
84
|
],
|
|
83
85
|
"author": "Versatly",
|
|
84
86
|
"license": "MIT",
|