clawvault 3.4.0 → 3.5.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.
Files changed (37) hide show
  1. package/CHANGELOG.md +543 -0
  2. package/LICENSE +21 -0
  3. package/README.md +26 -26
  4. package/SKILL.md +369 -0
  5. package/dist/{chunk-X3SPPUFG.js → chunk-JI7VUQV7.js} +118 -132
  6. package/dist/{chunk-QYQAGBTM.js → chunk-QUFQBAHP.js} +148 -125
  7. package/dist/cli/index.js +1 -1
  8. package/dist/commands/compat.js +1 -1
  9. package/dist/commands/observe.js +1 -1
  10. package/dist/commands/status.js +4 -4
  11. package/dist/index.js +11 -8
  12. package/dist/openclaw-plugin.js +6 -1
  13. package/docs/clawhub-security-release-playbook.md +75 -0
  14. package/docs/getting-started/installation.md +99 -0
  15. package/docs/openclaw-plugin-usage.md +152 -0
  16. package/openclaw.plugin.json +1 -1
  17. package/package.json +26 -8
  18. package/bin/command-registration.test.js +0 -179
  19. package/bin/command-runtime.test.js +0 -154
  20. package/bin/help-contract.test.js +0 -55
  21. package/bin/register-config-route-commands.test.js +0 -121
  22. package/bin/register-core-commands.test.js +0 -80
  23. package/bin/register-kanban-commands.test.js +0 -83
  24. package/bin/register-project-commands.test.js +0 -206
  25. package/bin/register-query-commands.test.js +0 -80
  26. package/bin/register-resilience-commands.test.js +0 -81
  27. package/bin/register-task-commands.test.js +0 -69
  28. package/bin/register-template-commands.test.js +0 -87
  29. package/bin/test-helpers/cli-command-fixtures.js +0 -120
  30. package/dashboard/lib/graph-diff.test.js +0 -75
  31. package/dashboard/lib/vault-parser.test.js +0 -254
  32. package/hooks/clawvault/HOOK.md +0 -130
  33. package/hooks/clawvault/handler.js +0 -1696
  34. package/hooks/clawvault/handler.test.js +0 -576
  35. package/hooks/clawvault/integrity.js +0 -112
  36. package/hooks/clawvault/integrity.test.js +0 -32
  37. package/hooks/clawvault/openclaw.plugin.json +0 -190
@@ -1,32 +0,0 @@
1
- import { describe, expect, it } from 'vitest';
2
- import { createHash } from 'crypto';
3
- import * as fs from 'fs';
4
- import {
5
- resolveExecutablePath,
6
- sanitizeExecArgs,
7
- verifyExecutableIntegrity
8
- } from './integrity.js';
9
-
10
- describe('hook executable integrity helpers', () => {
11
- it('resolves an explicit executable path', () => {
12
- const resolved = resolveExecutablePath('clawvault', { explicitPath: process.execPath });
13
- expect(resolved).toBe(process.execPath);
14
- });
15
-
16
- it('rejects non-array arguments', () => {
17
- expect(() => sanitizeExecArgs('not-an-array')).toThrow('Arguments must be an array');
18
- });
19
-
20
- it('rejects null-byte arguments', () => {
21
- expect(() => sanitizeExecArgs(['ok', 'bad\0arg'])).toThrow('contains a null byte');
22
- });
23
-
24
- it('verifies expected executable sha256', () => {
25
- const expected = createHash('sha256')
26
- .update(fs.readFileSync(process.execPath))
27
- .digest('hex');
28
- const result = verifyExecutableIntegrity(process.execPath, expected);
29
- expect(result.ok).toBe(true);
30
- expect(result.actualSha256).toBe(expected);
31
- });
32
- });
@@ -1,190 +0,0 @@
1
- {
2
- "id": "clawvault",
3
- "name": "ClawVault",
4
- "version": "2.7.0",
5
- "description": "Structured memory system for AI agents with context death resilience",
6
- "kind": "memory",
7
- "configSchema": {
8
- "type": "object",
9
- "properties": {
10
- "vaultPath": {
11
- "type": "string",
12
- "description": "Path to the ClawVault vault directory. Used as fallback when agentVaults is not set or agent not found."
13
- },
14
- "agentVaults": {
15
- "type": "object",
16
- "description": "Mapping of agent names to vault paths. Allows each agent to have its own vault. Falls back to vaultPath if agent not found.",
17
- "additionalProperties": {
18
- "type": "string",
19
- "description": "Path to the vault directory for this agent"
20
- }
21
- },
22
- "allowClawvaultExec": {
23
- "type": "boolean",
24
- "description": "Security gate for all child_process execution from the plugin. Must be true to run clawvault CLI commands.",
25
- "default": false
26
- },
27
- "clawvaultBinaryPath": {
28
- "type": "string",
29
- "description": "Optional absolute path to the clawvault executable. When omitted, the plugin resolves clawvault from PATH."
30
- },
31
- "clawvaultBinarySha256": {
32
- "type": "string",
33
- "description": "Optional SHA-256 checksum for clawvaultBinaryPath (or resolved clawvault executable) to enforce binary integrity verification."
34
- },
35
- "allowEnvAccess": {
36
- "type": "boolean",
37
- "description": "Allow reading OPENCLAW_* and CLAWVAULT_PATH environment variables for vault and agent discovery.",
38
- "default": false
39
- },
40
- "enableStartupRecovery": {
41
- "type": "boolean",
42
- "description": "Enable recovery checks on gateway startup.",
43
- "default": false
44
- },
45
- "enableSessionContextInjection": {
46
- "type": "boolean",
47
- "description": "Enable recap/context injection on session start.",
48
- "default": false
49
- },
50
- "enableAutoCheckpoint": {
51
- "type": "boolean",
52
- "description": "Enable automatic checkpointing on /new.",
53
- "default": false
54
- },
55
- "enableObserveOnNew": {
56
- "type": "boolean",
57
- "description": "Enable observer flush on /new.",
58
- "default": false
59
- },
60
- "enableHeartbeatObservation": {
61
- "type": "boolean",
62
- "description": "Enable observation threshold checks on heartbeat.",
63
- "default": false
64
- },
65
- "enableCompactionObservation": {
66
- "type": "boolean",
67
- "description": "Enable forced observer flush on compaction events.",
68
- "default": false
69
- },
70
- "enableWeeklyReflection": {
71
- "type": "boolean",
72
- "description": "Enable weekly reflection on Sunday midnight UTC.",
73
- "default": false
74
- },
75
- "enableFactExtraction": {
76
- "type": "boolean",
77
- "description": "Enable extraction of structured facts from observed text during hook events.",
78
- "default": false
79
- },
80
- "autoCheckpoint": {
81
- "type": "boolean",
82
- "description": "Deprecated alias for enableAutoCheckpoint.",
83
- "default": false
84
- },
85
- "contextProfile": {
86
- "type": "string",
87
- "enum": ["default", "planning", "incident", "handoff", "auto"],
88
- "description": "Default context profile for session start injection",
89
- "default": "auto"
90
- },
91
- "maxContextResults": {
92
- "type": "integer",
93
- "minimum": 1,
94
- "maximum": 20,
95
- "description": "Maximum number of context results to inject on session start",
96
- "default": 4
97
- },
98
- "observeOnHeartbeat": {
99
- "type": "boolean",
100
- "description": "Deprecated alias for enableHeartbeatObservation.",
101
- "default": false
102
- },
103
- "weeklyReflection": {
104
- "type": "boolean",
105
- "description": "Deprecated alias for enableWeeklyReflection.",
106
- "default": false
107
- }
108
- },
109
- "additionalProperties": false
110
- },
111
- "uiHints": {
112
- "vaultPath": {
113
- "label": "Vault Path",
114
- "placeholder": "~/my-vault",
115
- "description": "Path to your ClawVault memory vault (fallback when agentVaults not set)"
116
- },
117
- "agentVaults": {
118
- "label": "Agent Vaults",
119
- "description": "Per-agent vault paths (e.g., {\"agent1\": \"/path/to/vault1\", \"agent2\": \"/path/to/vault2\"})"
120
- },
121
- "allowClawvaultExec": {
122
- "label": "Allow CLI Execution",
123
- "description": "Required opt-in to run child_process calls from the plugin."
124
- },
125
- "clawvaultBinaryPath": {
126
- "label": "ClawVault Binary Path",
127
- "description": "Absolute path to clawvault executable for stricter execution controls."
128
- },
129
- "clawvaultBinarySha256": {
130
- "label": "ClawVault Binary SHA-256",
131
- "description": "Optional checksum to verify executable integrity before execution."
132
- },
133
- "allowEnvAccess": {
134
- "label": "Allow Environment Access",
135
- "description": "Allow OPENCLAW_* and CLAWVAULT_PATH reads for fallback discovery."
136
- },
137
- "enableStartupRecovery": {
138
- "label": "Startup Recovery",
139
- "description": "Run recovery checks on gateway startup."
140
- },
141
- "enableSessionContextInjection": {
142
- "label": "Session Context Injection",
143
- "description": "Inject recap and memory context on session start."
144
- },
145
- "enableAutoCheckpoint": {
146
- "label": "Auto Checkpoint",
147
- "description": "Automatically checkpoint before /new."
148
- },
149
- "enableObserveOnNew": {
150
- "label": "Observe On /new",
151
- "description": "Run observer flush on /new."
152
- },
153
- "enableHeartbeatObservation": {
154
- "label": "Observe On Heartbeat",
155
- "description": "Check observation thresholds during heartbeat events."
156
- },
157
- "enableCompactionObservation": {
158
- "label": "Observe On Compaction",
159
- "description": "Force observer flush during compaction events."
160
- },
161
- "enableWeeklyReflection": {
162
- "label": "Weekly Reflection",
163
- "description": "Run weekly reflection on Sunday midnight UTC."
164
- },
165
- "enableFactExtraction": {
166
- "label": "Fact Extraction",
167
- "description": "Extract structured facts from hook event payloads."
168
- },
169
- "autoCheckpoint": {
170
- "label": "Auto Checkpoint (Legacy Alias)",
171
- "description": "Deprecated alias for enableAutoCheckpoint."
172
- },
173
- "contextProfile": {
174
- "label": "Context Profile",
175
- "description": "Profile used for context injection at session start"
176
- },
177
- "maxContextResults": {
178
- "label": "Max Context Results",
179
- "description": "Number of vault memories to inject"
180
- },
181
- "observeOnHeartbeat": {
182
- "label": "Observe on Heartbeat (Legacy Alias)",
183
- "description": "Deprecated alias for enableHeartbeatObservation."
184
- },
185
- "weeklyReflection": {
186
- "label": "Weekly Reflection (Legacy Alias)",
187
- "description": "Deprecated alias for enableWeeklyReflection."
188
- }
189
- }
190
- }