clawvault 2.0.2 → 2.1.1
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 +5 -0
- package/bin/register-query-commands.js +16 -0
- package/dist/chunk-UPHUI5PD.js +723 -0
- package/dist/{chunk-NU7VKTWG.js → chunk-USAY3OIO.js} +16 -6
- package/dist/commands/observe.d.ts +5 -0
- package/dist/commands/observe.js +4 -2
- package/dist/commands/sleep.js +1 -1
- package/dist/index.js +2 -2
- package/hooks/clawvault/HOOK.md +4 -2
- package/hooks/clawvault/handler.js +238 -2
- package/hooks/clawvault/handler.test.js +82 -0
- package/package.json +1 -1
- package/dist/chunk-BAS32WLF.js +0 -319
package/README.md
CHANGED
|
@@ -77,6 +77,9 @@ Automatically compress conversations into prioritized observations:
|
|
|
77
77
|
# One-shot: compress a conversation file
|
|
78
78
|
clawvault observe --compress session.md
|
|
79
79
|
|
|
80
|
+
# Active sessions: incremental observe from OpenClaw transcripts
|
|
81
|
+
clawvault observe --active
|
|
82
|
+
|
|
80
83
|
# Watch mode: monitor a directory for new session files
|
|
81
84
|
clawvault observe --watch ./sessions/
|
|
82
85
|
|
|
@@ -91,6 +94,8 @@ Observations use emoji priorities:
|
|
|
91
94
|
|
|
92
95
|
Critical and notable observations are automatically routed to vault categories (`decisions/`, `lessons/`, `people/`, etc.). The system uses LLM compression (Gemini, Anthropic, or OpenAI) with a rule-based fallback.
|
|
93
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
|
+
|
|
94
99
|
Integrated into the sleep/wake lifecycle:
|
|
95
100
|
```bash
|
|
96
101
|
clawvault sleep "task summary" --session-transcript conversation.md
|
|
@@ -167,6 +167,11 @@ export function registerQueryCommands(
|
|
|
167
167
|
.command('observe')
|
|
168
168
|
.description('Observe session files and build observational memory')
|
|
169
169
|
.option('--watch <path>', 'Watch session file or directory')
|
|
170
|
+
.option('--active', 'Observe active OpenClaw sessions incrementally')
|
|
171
|
+
.option('--agent <id>', 'OpenClaw agent ID (default: OPENCLAW_AGENT_ID or clawdious)')
|
|
172
|
+
.option('--min-new <bytes>', 'Override minimum new-content threshold in bytes')
|
|
173
|
+
.option('--sessions-dir <path>', 'Override OpenClaw sessions directory')
|
|
174
|
+
.option('--dry-run', 'Show active observation candidates without compressing')
|
|
170
175
|
.option('--threshold <n>', 'Compression token threshold', '30000')
|
|
171
176
|
.option('--reflect-threshold <n>', 'Reflection token threshold', '40000')
|
|
172
177
|
.option('--model <model>', 'LLM model override')
|
|
@@ -178,15 +183,26 @@ export function registerQueryCommands(
|
|
|
178
183
|
const { observeCommand } = await import('../dist/commands/observe.js');
|
|
179
184
|
const threshold = Number.parseInt(options.threshold, 10);
|
|
180
185
|
const reflectThreshold = Number.parseInt(options.reflectThreshold, 10);
|
|
186
|
+
const minNew = options.minNew === undefined
|
|
187
|
+
? undefined
|
|
188
|
+
: Number.parseInt(options.minNew, 10);
|
|
181
189
|
if (Number.isNaN(threshold) || threshold <= 0) {
|
|
182
190
|
throw new Error(`Invalid --threshold value: ${options.threshold}`);
|
|
183
191
|
}
|
|
184
192
|
if (Number.isNaN(reflectThreshold) || reflectThreshold <= 0) {
|
|
185
193
|
throw new Error(`Invalid --reflect-threshold value: ${options.reflectThreshold}`);
|
|
186
194
|
}
|
|
195
|
+
if (options.minNew !== undefined && (Number.isNaN(minNew) || minNew <= 0)) {
|
|
196
|
+
throw new Error(`Invalid --min-new value: ${options.minNew}`);
|
|
197
|
+
}
|
|
187
198
|
|
|
188
199
|
await observeCommand({
|
|
189
200
|
watch: options.watch,
|
|
201
|
+
active: options.active,
|
|
202
|
+
agent: options.agent,
|
|
203
|
+
minNew,
|
|
204
|
+
sessionsDir: options.sessionsDir,
|
|
205
|
+
dryRun: options.dryRun,
|
|
190
206
|
threshold,
|
|
191
207
|
reflectThreshold,
|
|
192
208
|
model: options.model,
|