clawvault 3.0.0-beta.5 → 3.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 CHANGED
@@ -1,158 +1,209 @@
1
- # ClawVault 🐘
1
+ # ClawVault
2
2
 
3
- Structured memory system for AI agents and operators: typed markdown memory, graph-aware context, task/project primitives, Obsidian views, and OpenClaw hook integration.
3
+ Structured memory for AI agents. Typed markdown primitives that compound over time.
4
4
 
5
5
  [![npm](https://img.shields.io/npm/v/clawvault)](https://www.npmjs.com/package/clawvault)
6
6
 
7
- > Local-first. Markdown-first. Built to survive long-running autonomous work.
7
+ Every memory is a markdown file with YAML frontmatter — a task, a decision, a person, a lesson — each following a schema defined in `templates/`. The agent reads and writes these files. The human browses them in Obsidian. No database. No vendor lock-in. Just files.
8
8
 
9
9
  ## Requirements
10
10
 
11
11
  - Node.js 18+
12
- - `qmd` installed and available on `PATH`
13
-
14
- ClawVault currently relies on `qmd` for core vault/query flows. Install it before first use.
12
+ - [`qmd`](https://github.com/qmd-project/qmd) installed and on `PATH` (hybrid BM25 + vector search)
15
13
 
16
14
  ## Install
17
15
 
16
+ ### As an OpenClaw Plugin (recommended)
17
+
18
18
  ```bash
19
- npm install -g clawvault
19
+ openclaw plugins install clawvault
20
20
  ```
21
21
 
22
- ## 5-Minute Setup
22
+ This installs ClawVault as a memory plugin. It replaces OpenClaw's built-in memory with:
23
23
 
24
- ```bash
25
- # 1) Create or initialize a vault
26
- clawvault init ~/memory --name my-brain
24
+ - **Auto-recall** — injects relevant memories before each agent turn
25
+ - **Auto-capture** observes conversations and stores durable knowledge automatically
26
+ - **Session recap** on wake, provides context from active tasks, recent decisions, and preferences
27
+ - **4 tools** — `memory_search`, `memory_store`, `memory_get`, `memory_forget`
27
28
 
28
- # 2) Optional vault bootstrap for Obsidian
29
- clawvault setup --theme neural --canvas
29
+ After install, configure the vault path:
30
30
 
31
- # 3) Verify OpenClaw compatibility in this environment
32
- clawvault compat
31
+ ```bash
32
+ openclaw config set plugins.clawvault.config.vaultPath ~/my-vault
33
33
  ```
34
34
 
35
- ## OpenClaw Setup (Canonical)
36
-
37
- If you want hook-based lifecycle integration, use this sequence:
35
+ ### As a Standalone CLI
38
36
 
39
37
  ```bash
40
- # Install CLI
41
38
  npm install -g clawvault
39
+ ```
42
40
 
43
- # Install and enable hook pack
44
- openclaw hooks install clawvault
45
- openclaw hooks enable clawvault
41
+ ## Quick Start
46
42
 
47
- # Verify
48
- openclaw hooks list --verbose
49
- openclaw hooks info clawvault
50
- openclaw hooks check
51
- clawvault compat
43
+ ```bash
44
+ # Initialize a new vault
45
+ clawvault init ~/my-vault --name my-brain
46
+
47
+ # Set up Obsidian Bases views (tasks, projects, backlog)
48
+ clawvault setup
49
+
50
+ # Check vault health
51
+ clawvault doctor
52
+
53
+ # Search your vault
54
+ clawvault search "deployment decision"
52
55
  ```
53
56
 
54
- Important:
57
+ ## How It Works
58
+
59
+ ### Typed Primitives
60
+
61
+ Every piece of memory has a type defined by a template:
62
+
63
+ ```yaml
64
+ ---
65
+ primitive: task
66
+ fields:
67
+ status:
68
+ type: string
69
+ required: true
70
+ default: open
71
+ enum: [open, in-progress, blocked, done]
72
+ priority:
73
+ type: string
74
+ enum: [critical, high, medium, low]
75
+ owner:
76
+ type: string
77
+ due:
78
+ type: date
79
+ ---
80
+ ```
55
81
 
56
- - `clawhub install clawvault` installs skill guidance, but does not replace hook-pack installation.
57
- - After enabling hooks, restart the OpenClaw gateway process so hook registration reloads.
82
+ Default templates: `task`, `decision`, `lesson`, `person`, `project`, `checkpoint`, `handoff`, `daily`, `trigger`, `run`, `party`, `workspace`.
58
83
 
59
- ## Minimal AGENTS.md Additions
84
+ ### Malleable Schemas
60
85
 
61
- Append these to your existing memory workflow. Do not replace your full prompt setup:
86
+ Don't like the defaults? Drop your own template in your vault's `templates/` directory. Add fields, remove fields, create entirely new types. The plugin reads YOUR schemas, not ours.
62
87
 
63
- ```markdown
64
- ## ClawVault
65
- - Run `clawvault wake` at session start.
66
- - Run `clawvault checkpoint` during heavy work.
67
- - Run `clawvault sleep "summary" --next "next steps"` before ending.
68
- - Use `clawvault context "<task>"` or `clawvault inject "<message>"` before complex decisions.
69
- ```
88
+ ### Hybrid Search
70
89
 
71
- ## Real CLI Surface (Current)
90
+ ClawVault uses `qmd` for search — BM25 keyword matching combined with vector similarity and reranking. Entirely local. No API keys needed.
72
91
 
73
- Core:
92
+ ### Obsidian Integration
74
93
 
75
- - `init`, `setup`, `store`, `capture`
76
- - `remember`, `list`, `get`, `stats`, `reindex`, `sync`
94
+ Your vault IS an Obsidian vault. Tasks become Kanban boards. Decisions are searchable. Wiki-links build a knowledge graph. Five generated Bases views out of the box:
77
95
 
78
- Context + memory:
96
+ - All tasks
97
+ - Blocked items
98
+ - By project
99
+ - By owner
100
+ - Backlog
79
101
 
80
- - `search`, `vsearch`, `context`, `inject`
81
- - `observe`, `reflect`, `session-recap`
82
- - `graph`, `entities`, `link`, `embed`
102
+ ## CLI Commands
83
103
 
84
- Resilience:
104
+ ### Core
85
105
 
86
- - `wake`, `sleep`, `handoff`, `recap`
87
- - `checkpoint`, `recover`, `status`, `clean-exit`, `repair-session`
88
- - `compat`, `doctor`
106
+ | Command | Description |
107
+ |---------|-------------|
108
+ | `init [path]` | Initialize a new vault |
109
+ | `setup` | Auto-discover and configure a vault, create Obsidian views |
110
+ | `store` | Store a new typed memory document |
111
+ | `capture <note>` | Quick-capture a note to inbox |
112
+ | `doctor` | Diagnose vault health |
89
113
 
90
- Execution primitives:
114
+ ### Search & Context
91
115
 
92
- - `task ...`, `backlog ...`, `blocked`, `project ...`, `kanban ...`
93
- - `canvas` (generates default `dashboard.canvas`)
116
+ | Command | Description |
117
+ |---------|-------------|
118
+ | `search <query>` | BM25 keyword search via qmd |
119
+ | `vsearch <query>` | Semantic vector search via qmd |
120
+ | `context <task>` | Generate task-relevant context |
121
+ | `inject <message>` | Inject relevant rules and decisions |
94
122
 
95
- Networking:
123
+ ### Session Lifecycle
96
124
 
97
- - `tailscale-status`, `tailscale-sync`, `tailscale-serve`, `tailscale-discover`
125
+ | Command | Description |
126
+ |---------|-------------|
127
+ | `wake` | Start a session (recover + recap) |
128
+ | `sleep <summary>` | End a session with a handoff |
129
+ | `checkpoint` | Save state for context-death resilience |
130
+ | `recover` | Check for and recover from context death |
98
131
 
99
- ## Quick Usage
132
+ ### Observation Pipeline
100
133
 
101
- ```bash
102
- # Store and retrieve memory
103
- clawvault remember decision "Use PostgreSQL" --content "Chosen for JSONB and reliability"
104
- clawvault search "postgresql"
105
- clawvault vsearch "what did we decide about storage"
106
-
107
- # Session lifecycle
108
- clawvault wake
109
- clawvault checkpoint --working-on "auth rollout" --focus "token refresh edge cases"
110
- clawvault sleep "finished auth rollout plan" --next "implement migration"
111
-
112
- # Work management
113
- clawvault task add "Ship v2 onboarding" --owner agent --project core --priority high
114
- clawvault blocked
115
- clawvault project list --status active
116
- clawvault kanban sync
117
-
118
- # Obsidian projection
119
- clawvault canvas
120
- ```
134
+ | Command | Description |
135
+ |---------|-------------|
136
+ | `observe` | Process sessions into observational memory |
137
+ | `reflect` | Promote observations to weekly reflections |
138
+ | `reweave` | Backward consolidation mark superseded observations |
121
139
 
122
- ## Obsidian Integration
140
+ ### Tasks & Projects
123
141
 
124
- - Setup can generate:
125
- - graph theme/snippet config (`--theme neural|minimal|none`)
126
- - Bases views (`all-tasks.base`, `blocked.base`, `by-project.base`, `by-owner.base`, `backlog.base`)
127
- - default canvas (`dashboard.canvas`) via `--canvas` or `clawvault canvas`
128
- - Kanban round-trip:
129
- - export: `clawvault kanban sync`
130
- - import lane changes back to task metadata: `clawvault kanban import`
142
+ | Command | Description |
143
+ |---------|-------------|
144
+ | `task` | Task management (create, list, update, transition) |
145
+ | `project` | Project management |
146
+ | `kanban` | Kanban board view |
147
+ | `status` | Vault health and statistics |
131
148
 
132
- ## Tailscale + WebDAV
149
+ ### Utilities
133
150
 
134
- ClawVault can serve vault content for sync over Tailscale and exposes WebDAV under `/webdav` for mobile-oriented workflows.
151
+ | Command | Description |
152
+ |---------|-------------|
153
+ | `template` | Manage document templates |
154
+ | `graph` | Show typed memory graph summary |
155
+ | `entities` | List all linkable entities |
156
+ | `link [file]` | Auto-link entity mentions |
157
+ | `compat` | Check OpenClaw compatibility |
158
+ | `embed` | Run qmd embedding for pending documents |
135
159
 
136
- ```bash
137
- clawvault tailscale-status
138
- clawvault tailscale-serve --vault ~/memory
139
- clawvault tailscale-discover
160
+ ## Architecture
161
+
162
+ ```
163
+ HUMAN (Obsidian)
164
+ Browse, edit, approve
165
+
166
+
167
+ ┌─── VAULT (markdown) ───┐
168
+ │ Typed primitives │
169
+ │ Knowledge graph │
170
+ │ Template schemas │
171
+ └───┬──────────────┬──────┘
172
+ │ │
173
+ AGENT (Plugin) CLI (Developer)
174
+ Auto-capture Direct CRUD
175
+ Auto-recall Search, graph
176
+ Session recap Tasks, projects
140
177
  ```
141
178
 
142
- ## Troubleshooting
143
-
144
- - Hook not found after enable:
145
- - run `openclaw hooks install clawvault` first
146
- - then `openclaw hooks enable clawvault`
147
- - restart gateway
148
- - verify with `openclaw hooks list --verbose`
149
- - `qmd` errors:
150
- - ensure `qmd --version` works from same shell
151
- - rerun `clawvault setup` after qmd install
152
- - OpenClaw integration drift:
153
- - run `clawvault compat`
154
- - Session transcript corruption:
155
- - run `clawvault repair-session --dry-run` then `clawvault repair-session`
179
+ ## OpenClaw Plugin Details
180
+
181
+ The plugin hooks into the OpenClaw lifecycle:
182
+
183
+ - **`before_agent_start`** auto-recall: searches vault for context relevant to the current conversation and injects it
184
+ - **`message_received`** — auto-capture: observes incoming messages for durable information worth storing
185
+ - **`agent_end`** captures any final observations from the agent's response
186
+ - **`before_compaction`** — preserves important context before conversation compaction
187
+
188
+ Configuration in `openclaw.plugin.json`:
189
+
190
+ | Option | Default | Description |
191
+ |--------|---------|-------------|
192
+ | `vaultPath` | | Path to vault directory |
193
+ | `collection` | `clawvault` | qmd search collection name |
194
+ | `autoRecall` | `true` | Inject memories before each turn |
195
+ | `autoCapture` | `true` | Auto-store from conversations |
196
+ | `recallLimit` | `5` | Max memories per recall |
197
+
198
+ ## What Compounds
199
+
200
+ - **Decisions** accumulate into institutional knowledge
201
+ - **Lessons** prevent repeated mistakes
202
+ - **Tasks** with transition ledgers track how work happened
203
+ - **Projects** group related work across hundreds of sessions
204
+ - **Wiki-links** build a knowledge graph that grows richer over time
205
+
206
+ The agent that runs for a year generates compounding value. Every lesson stored makes the next task cheaper.
156
207
 
157
208
  ## License
158
209
 
package/bin/clawvault.js CHANGED
@@ -23,7 +23,6 @@ import { registerProjectCommands } from './register-project-commands.js';
23
23
 
24
24
  import { registerTaskCommands } from './register-task-commands.js';
25
25
 
26
- import { registerTailscaleCommands } from './register-tailscale-commands.js';
27
26
  import {
28
27
  getVault,
29
28
  resolveVaultPath,
@@ -104,7 +103,6 @@ registerProjectCommands(program, {
104
103
  resolveVaultPath
105
104
  });
106
105
 
107
- registerTailscaleCommands(program, { chalk });
108
106
  registerConfigCommands(program, { chalk, resolveVaultPath });
109
107
  registerRouteCommands(program, { chalk, resolveVaultPath });
110
108
 
@@ -1,6 +1,3 @@
1
- import {
2
- registerTailscaleCommands
3
- } from "./chunk-THRJVD4L.js";
4
1
  import {
5
2
  registerObserveCommand
6
3
  } from "./chunk-F2JEUD4J.js";
@@ -71,7 +68,6 @@ function registerCliCommands(program) {
71
68
  registerReflectCommand(program);
72
69
  registerEmbedCommand(program);
73
70
  registerReweaveCommand(program);
74
- registerTailscaleCommands(program);
75
71
  return program;
76
72
  }
77
73