clawvault 2.5.4 → 2.6.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 +159 -159
- package/bin/clawvault.js +111 -111
- package/bin/command-registration.test.js +166 -166
- package/bin/command-runtime.js +93 -93
- package/bin/command-runtime.test.js +154 -154
- package/bin/help-contract.test.js +39 -39
- package/bin/register-config-commands.js +153 -153
- package/bin/register-config-route-commands.test.js +121 -121
- package/bin/register-core-commands.js +237 -237
- package/bin/register-kanban-commands.js +56 -56
- package/bin/register-kanban-commands.test.js +83 -83
- package/bin/register-maintenance-commands.js +282 -282
- package/bin/register-project-commands.js +209 -209
- package/bin/register-project-commands.test.js +206 -206
- package/bin/register-query-commands.js +317 -317
- package/bin/register-query-commands.test.js +65 -65
- package/bin/register-resilience-commands.js +182 -182
- package/bin/register-resilience-commands.test.js +81 -81
- package/bin/register-route-commands.js +114 -114
- package/bin/register-session-lifecycle-commands.js +206 -206
- package/bin/register-tailscale-commands.js +106 -106
- package/bin/register-task-commands.js +348 -348
- package/bin/register-task-commands.test.js +69 -69
- package/bin/register-template-commands.js +75 -72
- package/bin/register-template-commands.test.js +87 -0
- package/bin/register-vault-operations-commands.js +300 -300
- package/bin/test-helpers/cli-command-fixtures.js +119 -119
- package/dashboard/lib/graph-diff.js +104 -104
- package/dashboard/lib/graph-diff.test.js +75 -75
- package/dashboard/lib/vault-parser.js +556 -556
- package/dashboard/lib/vault-parser.test.js +254 -254
- package/dashboard/public/app.js +796 -796
- package/dashboard/public/index.html +52 -52
- package/dashboard/public/styles.css +221 -221
- package/dashboard/server.js +374 -374
- package/dist/{chunk-J5EMBUPK.js → chunk-4OXMU5S2.js} +1 -1
- package/dist/{chunk-4IV3R2F5.js → chunk-4TE4JMLA.js} +1 -1
- package/dist/{chunk-5GZFTAL7.js → chunk-AZYOKJYC.js} +128 -42
- package/dist/{chunk-JDLOL2PL.js → chunk-HA5M6KJB.js} +1 -1
- package/dist/{chunk-IZEY5S74.js → chunk-IEVLHNLU.js} +1 -1
- package/dist/{chunk-OSMS7QIG.js → chunk-ME37YNW3.js} +2 -2
- package/dist/chunk-MFAWT5O5.js +301 -0
- package/dist/{chunk-TPDH3JPP.js → chunk-PBEE567J.js} +1 -1
- package/dist/{chunk-S2IG7VNM.js → chunk-Q2J5YTUF.js} +2 -2
- package/dist/{chunk-IOALNTAN.js → chunk-QWQ3TIKS.js} +103 -29
- package/dist/{chunk-YCVDVI5B.js → chunk-R2MIW5G7.js} +1 -1
- package/dist/{chunk-W2HNZC22.js → chunk-UEOUADMO.js} +1 -1
- package/dist/cli/index.js +8 -6
- package/dist/commands/backlog.js +3 -1
- package/dist/commands/blocked.js +3 -1
- package/dist/commands/canvas.js +3 -1
- package/dist/commands/doctor.js +7 -5
- package/dist/commands/kanban.js +4 -2
- package/dist/commands/observe.js +7 -5
- package/dist/commands/project.js +5 -3
- package/dist/commands/rebuild.js +6 -4
- package/dist/commands/replay.js +6 -4
- package/dist/commands/setup.js +1 -1
- package/dist/commands/sleep.js +5 -3
- package/dist/commands/status.js +6 -4
- package/dist/commands/task.js +4 -2
- package/dist/commands/template.d.ts +10 -1
- package/dist/commands/template.js +47 -55
- package/dist/index.js +16 -15
- package/dist/lib/project-utils.js +4 -2
- package/dist/lib/task-utils.d.ts +14 -13
- package/dist/lib/task-utils.js +3 -1
- package/dist/lib/template-engine.d.ts +1 -0
- package/hooks/clawvault/HOOK.md +83 -83
- package/hooks/clawvault/handler.js +816 -816
- package/hooks/clawvault/handler.test.js +263 -263
- package/package.json +94 -94
- package/templates/checkpoint.md +34 -19
- package/templates/daily-note.md +34 -19
- package/templates/daily.md +34 -19
- package/templates/decision.md +39 -17
- package/templates/handoff.md +34 -19
- package/templates/lesson.md +31 -16
- package/templates/person.md +37 -19
- package/templates/project.md +84 -23
- package/templates/task.md +81 -0
- /package/dist/{chunk-AXKYDCNN.js → chunk-RVYA52PY.js} +0 -0
package/dist/index.js
CHANGED
|
@@ -1,7 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
buildTemplateVariables,
|
|
3
|
-
renderTemplate
|
|
4
|
-
} from "./chunk-7766SIJP.js";
|
|
5
1
|
import {
|
|
6
2
|
buildSessionRecap,
|
|
7
3
|
formatSessionRecapMarkdown,
|
|
@@ -9,7 +5,7 @@ import {
|
|
|
9
5
|
} from "./chunk-ZKGY7WTT.js";
|
|
10
6
|
import {
|
|
11
7
|
setupCommand
|
|
12
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-RVYA52PY.js";
|
|
13
9
|
import {
|
|
14
10
|
registerSyncBdCommand,
|
|
15
11
|
syncBdCommand
|
|
@@ -22,14 +18,14 @@ import {
|
|
|
22
18
|
import {
|
|
23
19
|
rebuildCommand,
|
|
24
20
|
registerRebuildCommand
|
|
25
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-PBEE567J.js";
|
|
26
22
|
import {
|
|
27
23
|
registerReplayCommand,
|
|
28
24
|
replayCommand
|
|
29
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-4TE4JMLA.js";
|
|
30
26
|
import {
|
|
31
27
|
doctor
|
|
32
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-UEOUADMO.js";
|
|
33
29
|
import "./chunk-7ZRP733D.js";
|
|
34
30
|
import {
|
|
35
31
|
graphCommand,
|
|
@@ -44,12 +40,12 @@ import {
|
|
|
44
40
|
kanbanCommand,
|
|
45
41
|
parseKanbanMarkdown,
|
|
46
42
|
syncKanbanBoard
|
|
47
|
-
} from "./chunk-
|
|
43
|
+
} from "./chunk-4OXMU5S2.js";
|
|
48
44
|
import "./chunk-4VQTUVH7.js";
|
|
49
45
|
import "./chunk-J7ZWCI2C.js";
|
|
50
46
|
import {
|
|
51
47
|
registerCliCommands
|
|
52
|
-
} from "./chunk-
|
|
48
|
+
} from "./chunk-HA5M6KJB.js";
|
|
53
49
|
import {
|
|
54
50
|
registerTailscaleCommands,
|
|
55
51
|
registerTailscaleDiscoverCommand,
|
|
@@ -87,7 +83,7 @@ import {
|
|
|
87
83
|
SessionWatcher,
|
|
88
84
|
observeCommand,
|
|
89
85
|
registerObserveCommand
|
|
90
|
-
} from "./chunk-
|
|
86
|
+
} from "./chunk-ME37YNW3.js";
|
|
91
87
|
import {
|
|
92
88
|
parseSessionFile
|
|
93
89
|
} from "./chunk-P5EPF6MB.js";
|
|
@@ -112,13 +108,13 @@ import {
|
|
|
112
108
|
getScaledObservationThresholdBytes,
|
|
113
109
|
observeActiveSessions,
|
|
114
110
|
parseSessionSourceLabel
|
|
115
|
-
} from "./chunk-
|
|
111
|
+
} from "./chunk-IEVLHNLU.js";
|
|
116
112
|
import "./chunk-HRLWZGMA.js";
|
|
117
113
|
import {
|
|
118
114
|
Compressor,
|
|
119
115
|
Observer,
|
|
120
116
|
Reflector
|
|
121
|
-
} from "./chunk-
|
|
117
|
+
} from "./chunk-Q2J5YTUF.js";
|
|
122
118
|
import {
|
|
123
119
|
archiveProject,
|
|
124
120
|
createProject,
|
|
@@ -127,7 +123,7 @@ import {
|
|
|
127
123
|
listProjects,
|
|
128
124
|
readProject,
|
|
129
125
|
updateProject
|
|
130
|
-
} from "./chunk-
|
|
126
|
+
} from "./chunk-AZYOKJYC.js";
|
|
131
127
|
import {
|
|
132
128
|
ClawVault,
|
|
133
129
|
createVault,
|
|
@@ -211,7 +207,12 @@ import {
|
|
|
211
207
|
queryTransitions,
|
|
212
208
|
readAllTransitions,
|
|
213
209
|
updateTask
|
|
214
|
-
} from "./chunk-
|
|
210
|
+
} from "./chunk-QWQ3TIKS.js";
|
|
211
|
+
import "./chunk-MFAWT5O5.js";
|
|
212
|
+
import {
|
|
213
|
+
buildTemplateVariables,
|
|
214
|
+
renderTemplate
|
|
215
|
+
} from "./chunk-7766SIJP.js";
|
|
215
216
|
import {
|
|
216
217
|
checkOpenClawCompatibility,
|
|
217
218
|
compatCommand,
|
|
@@ -6,8 +6,10 @@ import {
|
|
|
6
6
|
listProjects,
|
|
7
7
|
readProject,
|
|
8
8
|
updateProject
|
|
9
|
-
} from "../chunk-
|
|
10
|
-
import "../chunk-
|
|
9
|
+
} from "../chunk-AZYOKJYC.js";
|
|
10
|
+
import "../chunk-QWQ3TIKS.js";
|
|
11
|
+
import "../chunk-MFAWT5O5.js";
|
|
12
|
+
import "../chunk-7766SIJP.js";
|
|
11
13
|
export {
|
|
12
14
|
archiveProject,
|
|
13
15
|
createProject,
|
package/dist/lib/task-utils.d.ts
CHANGED
|
@@ -63,6 +63,19 @@ interface TaskTransitionOptions {
|
|
|
63
63
|
confidence?: number;
|
|
64
64
|
reason?: string | null;
|
|
65
65
|
}
|
|
66
|
+
type CreateTaskOptions = {
|
|
67
|
+
source?: string;
|
|
68
|
+
owner?: string;
|
|
69
|
+
project?: string;
|
|
70
|
+
priority?: TaskPriority;
|
|
71
|
+
due?: string;
|
|
72
|
+
content?: string;
|
|
73
|
+
tags?: string[];
|
|
74
|
+
description?: string;
|
|
75
|
+
estimate?: string;
|
|
76
|
+
parent?: string;
|
|
77
|
+
depends_on?: string[];
|
|
78
|
+
};
|
|
66
79
|
/**
|
|
67
80
|
* Slugify a title for use as filename
|
|
68
81
|
* Deterministic: same title = same slug
|
|
@@ -111,19 +124,7 @@ declare function listBacklogItems(vaultPath: string, filters?: BacklogFilterOpti
|
|
|
111
124
|
/**
|
|
112
125
|
* Create a new task
|
|
113
126
|
*/
|
|
114
|
-
declare function createTask(vaultPath: string, title: string, options?:
|
|
115
|
-
source?: string;
|
|
116
|
-
owner?: string;
|
|
117
|
-
project?: string;
|
|
118
|
-
priority?: TaskPriority;
|
|
119
|
-
due?: string;
|
|
120
|
-
content?: string;
|
|
121
|
-
tags?: string[];
|
|
122
|
-
description?: string;
|
|
123
|
-
estimate?: string;
|
|
124
|
-
parent?: string;
|
|
125
|
-
depends_on?: string[];
|
|
126
|
-
}): Task;
|
|
127
|
+
declare function createTask(vaultPath: string, title: string, options?: CreateTaskOptions): Task;
|
|
127
128
|
/**
|
|
128
129
|
* Update an existing task
|
|
129
130
|
*/
|
package/dist/lib/task-utils.js
CHANGED
|
@@ -3,6 +3,7 @@ interface TemplateVariables {
|
|
|
3
3
|
date: string;
|
|
4
4
|
datetime: string;
|
|
5
5
|
type: string;
|
|
6
|
+
[key: string]: string | number | boolean | null | undefined;
|
|
6
7
|
}
|
|
7
8
|
declare function buildTemplateVariables(input?: Partial<TemplateVariables>, now?: Date): TemplateVariables;
|
|
8
9
|
declare function renderTemplate(template: string, variables: TemplateVariables): string;
|
package/hooks/clawvault/HOOK.md
CHANGED
|
@@ -1,83 +1,83 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: clawvault
|
|
3
|
-
description: "Context resilience - recovery detection, auto-checkpoint, and session context injection"
|
|
4
|
-
metadata:
|
|
5
|
-
openclaw:
|
|
6
|
-
emoji: "🐘"
|
|
7
|
-
events: ["gateway:startup", "gateway:heartbeat", "command:new", "session:start", "compaction:memoryFlush", "cron.weekly"]
|
|
8
|
-
requires:
|
|
9
|
-
bins: ["clawvault"]
|
|
10
|
-
---
|
|
11
|
-
|
|
12
|
-
# ClawVault Hook
|
|
13
|
-
|
|
14
|
-
Integrates ClawVault's context death resilience into OpenClaw:
|
|
15
|
-
|
|
16
|
-
- **On gateway startup**: Checks for context death, alerts agent
|
|
17
|
-
- **On heartbeat**: Runs cheap threshold checks and observes active sessions when needed
|
|
18
|
-
- **On /new command**: Auto-checkpoints before session reset
|
|
19
|
-
- **On context compaction**: Forces incremental observation flush before context is lost
|
|
20
|
-
- **On session start**: Injects relevant vault context for the initial prompt
|
|
21
|
-
- **On weekly cron**: Runs `clawvault reflect` every Sunday midnight (UTC)
|
|
22
|
-
|
|
23
|
-
## Installation
|
|
24
|
-
|
|
25
|
-
```bash
|
|
26
|
-
npm install -g clawvault
|
|
27
|
-
openclaw hooks install clawvault
|
|
28
|
-
openclaw hooks enable clawvault
|
|
29
|
-
|
|
30
|
-
# Verify
|
|
31
|
-
openclaw hooks list --verbose
|
|
32
|
-
openclaw hooks info clawvault
|
|
33
|
-
openclaw hooks check
|
|
34
|
-
```
|
|
35
|
-
|
|
36
|
-
After enabling, restart your OpenClaw gateway process so hook registration reloads.
|
|
37
|
-
|
|
38
|
-
## Requirements
|
|
39
|
-
|
|
40
|
-
- ClawVault CLI installed globally
|
|
41
|
-
- Vault initialized (`clawvault setup` or `CLAWVAULT_PATH` set)
|
|
42
|
-
|
|
43
|
-
## What It Does
|
|
44
|
-
|
|
45
|
-
### Gateway Startup
|
|
46
|
-
|
|
47
|
-
1. Runs `clawvault recover --clear`
|
|
48
|
-
2. If context death detected, injects warning into first agent turn
|
|
49
|
-
3. Clears dirty death flag for clean session start
|
|
50
|
-
|
|
51
|
-
### Command: /new
|
|
52
|
-
|
|
53
|
-
1. Creates automatic checkpoint with session info
|
|
54
|
-
2. Captures state even if agent forgot to handoff
|
|
55
|
-
3. Ensures continuity across session resets
|
|
56
|
-
|
|
57
|
-
### Session Start
|
|
58
|
-
|
|
59
|
-
1. Extracts the initial user prompt (`context.initialPrompt` or first user message)
|
|
60
|
-
2. Runs `clawvault context "<prompt>" --format json --profile auto -v <vaultPath>`
|
|
61
|
-
- Delegates profile selection to the shared context intent policy (`incident`, `planning`, `handoff`, or `default`)
|
|
62
|
-
3. Injects up to 4 relevant context bullets into session messages
|
|
63
|
-
|
|
64
|
-
Injection format:
|
|
65
|
-
|
|
66
|
-
```text
|
|
67
|
-
[ClawVault] Relevant context for this task:
|
|
68
|
-
- <title> (<age>): <snippet>
|
|
69
|
-
- <title> (<age>): <snippet>
|
|
70
|
-
```
|
|
71
|
-
|
|
72
|
-
### Event Compatibility
|
|
73
|
-
|
|
74
|
-
The hook accepts canonical OpenClaw events (`gateway:startup`, `gateway:heartbeat`, `command:new`, `session:start`, `compaction:memoryFlush`, `cron.weekly`) and tolerates alias payload shapes (`event`, `eventName`, `name`, `hook`, `trigger`) to remain robust across runtime wrappers.
|
|
75
|
-
|
|
76
|
-
## Configuration Notes
|
|
77
|
-
|
|
78
|
-
The hook auto-detects vault path via:
|
|
79
|
-
|
|
80
|
-
1. `CLAWVAULT_PATH` environment variable
|
|
81
|
-
2. Walking up from cwd to find `.clawvault.json`
|
|
82
|
-
|
|
83
|
-
If `openclaw hooks enable clawvault` fails with hook-not-found, run `openclaw hooks install clawvault` first and verify discovery with `openclaw hooks list --verbose`.
|
|
1
|
+
---
|
|
2
|
+
name: clawvault
|
|
3
|
+
description: "Context resilience - recovery detection, auto-checkpoint, and session context injection"
|
|
4
|
+
metadata:
|
|
5
|
+
openclaw:
|
|
6
|
+
emoji: "🐘"
|
|
7
|
+
events: ["gateway:startup", "gateway:heartbeat", "command:new", "session:start", "compaction:memoryFlush", "cron.weekly"]
|
|
8
|
+
requires:
|
|
9
|
+
bins: ["clawvault"]
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
# ClawVault Hook
|
|
13
|
+
|
|
14
|
+
Integrates ClawVault's context death resilience into OpenClaw:
|
|
15
|
+
|
|
16
|
+
- **On gateway startup**: Checks for context death, alerts agent
|
|
17
|
+
- **On heartbeat**: Runs cheap threshold checks and observes active sessions when needed
|
|
18
|
+
- **On /new command**: Auto-checkpoints before session reset
|
|
19
|
+
- **On context compaction**: Forces incremental observation flush before context is lost
|
|
20
|
+
- **On session start**: Injects relevant vault context for the initial prompt
|
|
21
|
+
- **On weekly cron**: Runs `clawvault reflect` every Sunday midnight (UTC)
|
|
22
|
+
|
|
23
|
+
## Installation
|
|
24
|
+
|
|
25
|
+
```bash
|
|
26
|
+
npm install -g clawvault
|
|
27
|
+
openclaw hooks install clawvault
|
|
28
|
+
openclaw hooks enable clawvault
|
|
29
|
+
|
|
30
|
+
# Verify
|
|
31
|
+
openclaw hooks list --verbose
|
|
32
|
+
openclaw hooks info clawvault
|
|
33
|
+
openclaw hooks check
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
After enabling, restart your OpenClaw gateway process so hook registration reloads.
|
|
37
|
+
|
|
38
|
+
## Requirements
|
|
39
|
+
|
|
40
|
+
- ClawVault CLI installed globally
|
|
41
|
+
- Vault initialized (`clawvault setup` or `CLAWVAULT_PATH` set)
|
|
42
|
+
|
|
43
|
+
## What It Does
|
|
44
|
+
|
|
45
|
+
### Gateway Startup
|
|
46
|
+
|
|
47
|
+
1. Runs `clawvault recover --clear`
|
|
48
|
+
2. If context death detected, injects warning into first agent turn
|
|
49
|
+
3. Clears dirty death flag for clean session start
|
|
50
|
+
|
|
51
|
+
### Command: /new
|
|
52
|
+
|
|
53
|
+
1. Creates automatic checkpoint with session info
|
|
54
|
+
2. Captures state even if agent forgot to handoff
|
|
55
|
+
3. Ensures continuity across session resets
|
|
56
|
+
|
|
57
|
+
### Session Start
|
|
58
|
+
|
|
59
|
+
1. Extracts the initial user prompt (`context.initialPrompt` or first user message)
|
|
60
|
+
2. Runs `clawvault context "<prompt>" --format json --profile auto -v <vaultPath>`
|
|
61
|
+
- Delegates profile selection to the shared context intent policy (`incident`, `planning`, `handoff`, or `default`)
|
|
62
|
+
3. Injects up to 4 relevant context bullets into session messages
|
|
63
|
+
|
|
64
|
+
Injection format:
|
|
65
|
+
|
|
66
|
+
```text
|
|
67
|
+
[ClawVault] Relevant context for this task:
|
|
68
|
+
- <title> (<age>): <snippet>
|
|
69
|
+
- <title> (<age>): <snippet>
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
### Event Compatibility
|
|
73
|
+
|
|
74
|
+
The hook accepts canonical OpenClaw events (`gateway:startup`, `gateway:heartbeat`, `command:new`, `session:start`, `compaction:memoryFlush`, `cron.weekly`) and tolerates alias payload shapes (`event`, `eventName`, `name`, `hook`, `trigger`) to remain robust across runtime wrappers.
|
|
75
|
+
|
|
76
|
+
## Configuration Notes
|
|
77
|
+
|
|
78
|
+
The hook auto-detects vault path via:
|
|
79
|
+
|
|
80
|
+
1. `CLAWVAULT_PATH` environment variable
|
|
81
|
+
2. Walking up from cwd to find `.clawvault.json`
|
|
82
|
+
|
|
83
|
+
If `openclaw hooks enable clawvault` fails with hook-not-found, run `openclaw hooks install clawvault` first and verify discovery with `openclaw hooks list --verbose`.
|