mindkeeper-openclaw 0.2.26 → 0.2.28
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 +7 -0
- package/dist/index.js +45 -0
- package/package.json +1 -1
- package/skills/mindkeeper/README.md +5 -2
- package/skills/mindkeeper/SKILL.md +29 -6
- package/skills/mindkeeper/clawhub.json +1 -1
package/README.md
CHANGED
|
@@ -24,6 +24,8 @@ openclaw plugins install mindkeeper-openclaw
|
|
|
24
24
|
|
|
25
25
|
Then restart your Gateway once.
|
|
26
26
|
|
|
27
|
+
On startup, the plugin mirrors its built-in `mindkeeper` skill into `<workspace>/skills/mindkeeper/` (OpenClaw's standard workspace skills path) so new sessions can find the bootstrap instructions even if no separate ClawHub skill was installed.
|
|
28
|
+
|
|
27
29
|
### Option 2 — Install the skill and let the AI guide setup
|
|
28
30
|
|
|
29
31
|
```bash
|
|
@@ -64,6 +66,11 @@ openclaw mind snapshot stable-v2
|
|
|
64
66
|
- Node.js >= 22
|
|
65
67
|
- OpenClaw with Gateway running
|
|
66
68
|
|
|
69
|
+
## Troubleshooting
|
|
70
|
+
|
|
71
|
+
- If a fresh `/new` session says the plugin is missing right after install, restart Gateway once and retry. Some OpenClaw flows do not expose plugin tools or the built-in skill until startup finishes.
|
|
72
|
+
- If tools still do not appear, verify that `mindkeeper-openclaw` is enabled in your OpenClaw config and that `mind_status`, `mind_history`, `mind_diff`, `mind_rollback`, and `mind_snapshot` are allowed tools.
|
|
73
|
+
|
|
67
74
|
## Commit Messages
|
|
68
75
|
|
|
69
76
|
OpenClaw Plugin mode is currently the only mode that supports LLM-generated commit messages. If no supported model or API key is available, mindkeeper falls back to template messages automatically.
|
package/dist/index.js
CHANGED
|
@@ -1179,6 +1179,49 @@ function resolveModelFromConfig(config) {
|
|
|
1179
1179
|
return { provider, model, baseUrl };
|
|
1180
1180
|
}
|
|
1181
1181
|
|
|
1182
|
+
// src/skill-mirror.ts
|
|
1183
|
+
var import_node_fs2 = require("node:fs");
|
|
1184
|
+
var import_node_path6 = __toESM(require("node:path"));
|
|
1185
|
+
var SKILL_DIR_NAME = "mindkeeper";
|
|
1186
|
+
var SKILL_FILES = ["SKILL.md", "README.md", "clawhub.json"];
|
|
1187
|
+
function ensureWorkspaceSkillMirror(workspaceDir, options = {}) {
|
|
1188
|
+
if (!workspaceDir) return;
|
|
1189
|
+
const sourceDir = options.sourceDir ?? resolveBundledSkillDir();
|
|
1190
|
+
const targetDir = import_node_path6.default.join(workspaceDir, "skills", SKILL_DIR_NAME);
|
|
1191
|
+
if (!(0, import_node_fs2.existsSync)(sourceDir)) {
|
|
1192
|
+
options.log?.warn?.(`[mindkeeper] Built-in skill directory not found: ${sourceDir}`);
|
|
1193
|
+
return;
|
|
1194
|
+
}
|
|
1195
|
+
try {
|
|
1196
|
+
(0, import_node_fs2.mkdirSync)(targetDir, { recursive: true });
|
|
1197
|
+
const copied = [];
|
|
1198
|
+
for (const file of SKILL_FILES) {
|
|
1199
|
+
const sourceFile = import_node_path6.default.join(sourceDir, file);
|
|
1200
|
+
const targetFile = import_node_path6.default.join(targetDir, file);
|
|
1201
|
+
if (!(0, import_node_fs2.existsSync)(sourceFile)) {
|
|
1202
|
+
options.log?.warn?.(`[mindkeeper] Built-in skill file missing: ${sourceFile}`);
|
|
1203
|
+
continue;
|
|
1204
|
+
}
|
|
1205
|
+
if ((0, import_node_fs2.existsSync)(targetFile)) continue;
|
|
1206
|
+
(0, import_node_fs2.copyFileSync)(sourceFile, targetFile);
|
|
1207
|
+
copied.push(file);
|
|
1208
|
+
}
|
|
1209
|
+
if (copied.length > 0) {
|
|
1210
|
+
options.log?.info?.(
|
|
1211
|
+
`[mindkeeper] Mirrored built-in skill files to ${targetDir}: ${copied.join(", ")}`
|
|
1212
|
+
);
|
|
1213
|
+
}
|
|
1214
|
+
} catch (err) {
|
|
1215
|
+
options.log?.warn?.(`[mindkeeper] Failed to mirror built-in skill: ${String(err)}`);
|
|
1216
|
+
}
|
|
1217
|
+
}
|
|
1218
|
+
function resolveBundledSkillDir() {
|
|
1219
|
+
if (typeof __dirname !== "string" || __dirname.length === 0) {
|
|
1220
|
+
throw new Error("mindkeeper: __dirname is unavailable while resolving the built-in skill");
|
|
1221
|
+
}
|
|
1222
|
+
return import_node_path6.default.resolve(__dirname, "..", "skills", SKILL_DIR_NAME);
|
|
1223
|
+
}
|
|
1224
|
+
|
|
1182
1225
|
// src/service.ts
|
|
1183
1226
|
function createWatcherService(api, trackerRef) {
|
|
1184
1227
|
let watcher = null;
|
|
@@ -1195,6 +1238,7 @@ function createWatcherService(api, trackerRef) {
|
|
|
1195
1238
|
log.warn("[mindkeeper] No workspace directory in service context. Watcher disabled.");
|
|
1196
1239
|
return;
|
|
1197
1240
|
}
|
|
1241
|
+
ensureWorkspaceSkillMirror(workspaceDir, { log: api.log });
|
|
1198
1242
|
const llmProvider = await createOpenClawLlmProvider({
|
|
1199
1243
|
config: ctx.config,
|
|
1200
1244
|
log
|
|
@@ -1243,6 +1287,7 @@ function mindkeeperPlugin(api) {
|
|
|
1243
1287
|
const trackerRef = { current: null };
|
|
1244
1288
|
registerTrackerTools(api, trackerRef);
|
|
1245
1289
|
registerTrackerCli(api, trackerRef);
|
|
1290
|
+
ensureWorkspaceSkillMirror(api.getWorkspaceDir?.(), { log: api.log });
|
|
1246
1291
|
const watcherService = createWatcherService(api, trackerRef);
|
|
1247
1292
|
api.registerService?.(watcherService);
|
|
1248
1293
|
ensureToolsInConfig(api);
|
package/package.json
CHANGED
|
@@ -17,7 +17,7 @@ This skill teaches the AI how to bootstrap and use the `mindkeeper-openclaw` plu
|
|
|
17
17
|
clawhub install mindkeeper
|
|
18
18
|
```
|
|
19
19
|
|
|
20
|
-
On first use, the AI checks whether `mindkeeper-openclaw` is available. If
|
|
20
|
+
On first use, the AI checks whether `mindkeeper-openclaw` is available. If the tools are not ready yet, it should first consider whether Gateway still needs to finish loading or restart before assuming the plugin is missing.
|
|
21
21
|
|
|
22
22
|
## What It Enables
|
|
23
23
|
|
|
@@ -34,6 +34,8 @@ On first use, the AI checks whether `mindkeeper-openclaw` is available. If it is
|
|
|
34
34
|
|
|
35
35
|
The `mindkeeper-openclaw` plugin provides the actual `mind_*` tools and background watcher. This skill provides the guidance and first-use bootstrap behavior.
|
|
36
36
|
|
|
37
|
+
In OpenClaw Plugin mode, the AI should prefer the `mind_*` tools for history, diff, snapshot, and rollback tasks. CLI commands are mainly for setup, troubleshooting, or manual terminal workflows.
|
|
38
|
+
|
|
37
39
|
If you prefer to install the plugin yourself first:
|
|
38
40
|
|
|
39
41
|
```bash
|
|
@@ -67,11 +69,12 @@ openclaw plugins install mindkeeper-openclaw
|
|
|
67
69
|
| "Show me the diff from last week" | `mind_history` → find commit → `mind_diff` |
|
|
68
70
|
| "Undo that change" | `mind_rollback` preview first, then execute after confirmation |
|
|
69
71
|
| "Save a checkpoint before I experiment" | `mind_snapshot` with a descriptive name |
|
|
72
|
+
| "Edit SOUL.md to change my tone" | Edit the file directly; mindkeeper should track the change automatically |
|
|
70
73
|
|
|
71
74
|
## Troubleshooting
|
|
72
75
|
|
|
73
76
|
- **History is empty** — Call `mind_status` to check whether mindkeeper is initialized. Make a small edit to a tracked file to trigger the first snapshot.
|
|
74
|
-
- **Tools not found** — Ensure the `mindkeeper-openclaw` plugin is installed and Gateway has been restarted.
|
|
77
|
+
- **Tools not found** — Ensure the `mindkeeper-openclaw` plugin is installed and Gateway has been restarted. A brand-new `/new` session can briefly miss the tool context while startup is still finishing.
|
|
75
78
|
- **Rollback not applying** — After rollback, run `/new` to reload the session with the restored file.
|
|
76
79
|
|
|
77
80
|
## Links
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: mindkeeper
|
|
3
3
|
description: Time Machine for Your AI's Brain — version control for agent context files. Use when the user asks about changes in SOUL.md, AGENTS.md, MEMORY.md, or other agent context files; when they want to undo, rollback, or compare versions; or when they need a checkpoint before risky edits.
|
|
4
|
-
version: 1.2.
|
|
4
|
+
version: 1.2.6
|
|
5
5
|
homepage: https://github.com/seekcontext/mindkeeper
|
|
6
6
|
repository: https://github.com/seekcontext/mindkeeper
|
|
7
7
|
---
|
|
@@ -12,11 +12,11 @@ Use mindkeeper tools when the user asks about changes, history, or versions of t
|
|
|
12
12
|
|
|
13
13
|
## Bootstrap (One-time setup)
|
|
14
14
|
|
|
15
|
-
**When the user enables mindkeeper or asks for mindkeeper capability**, first try `mind_status`. If it fails
|
|
15
|
+
**When the user enables mindkeeper or asks for mindkeeper capability**, first try `mind_status`. If it fails, do **not** assume the plugin is missing yet. It can also fail when Gateway has not finished loading the plugin, when tools are not exposed to the current session yet, or when the workspace copy of this skill is unavailable.
|
|
16
16
|
|
|
17
|
-
1. **
|
|
17
|
+
1. **Diagnose conservatively** — Tell the user: "I can't access the mindkeeper tools yet. The plugin may be missing, Gateway may still need a restart, or the current session may not have loaded the skill/tool context yet." Only say the plugin is definitely missing if the runtime explicitly shows that `mindkeeper-openclaw` is not installed.
|
|
18
18
|
|
|
19
|
-
2. **
|
|
19
|
+
2. **If the runtime confirms the plugin is missing and the user confirms**, run this flow:
|
|
20
20
|
- **Install the plugin** — Run via bash:
|
|
21
21
|
```bash
|
|
22
22
|
openclaw plugins install mindkeeper-openclaw
|
|
@@ -24,10 +24,20 @@ Use mindkeeper tools when the user asks about changes, history, or versions of t
|
|
|
24
24
|
- **Restart Gateway if the runtime supports it** — Use the available runtime mechanism to restart Gateway. If restart is unavailable or fails, tell the user: "Plugin installed. Restart your Gateway manually to apply."
|
|
25
25
|
- **Confirm** — If restart succeeded, tell the user: "Mindkeeper is ready. Restart complete — you can now ask about history, diffs, rollbacks, or snapshots." If restart did not happen, tell the user that the plugin is installed but Gateway must be restarted before the tools will appear.
|
|
26
26
|
|
|
27
|
-
3. **
|
|
27
|
+
3. **If the plugin appears installed already** — Tell the user to retry after Gateway finishes loading or after a manual restart. If a workspace copy of the skill appears to be missing, mention that the session may not have loaded the built-in mindkeeper skill correctly yet.
|
|
28
|
+
|
|
29
|
+
4. **Alternative** — If the user prefers to install manually, tell them: "Run `openclaw plugins install mindkeeper-openclaw` in your terminal, then restart your Gateway. After that, mindkeeper will be ready."
|
|
28
30
|
|
|
29
31
|
If `mind_status` succeeds, the plugin is already installed; skip the bootstrap and proceed with the user's request.
|
|
30
32
|
|
|
33
|
+
## Tool Preference
|
|
34
|
+
|
|
35
|
+
In OpenClaw Plugin mode, prefer the `mind_*` tools over CLI commands for normal mindkeeper operations.
|
|
36
|
+
|
|
37
|
+
- Use `mind_status`, `mind_history`, `mind_diff`, `mind_snapshot`, and `mind_rollback` whenever they are available.
|
|
38
|
+
- Do not use `openclaw mind ...` or `mindkeeper ...` for routine history, diff, snapshot, or rollback requests if the plugin tools are available.
|
|
39
|
+
- CLI commands are for one-time setup, troubleshooting, manual user workflows, or when the user explicitly asks for terminal commands.
|
|
40
|
+
|
|
31
41
|
## Available Tools
|
|
32
42
|
|
|
33
43
|
| Tool | Purpose |
|
|
@@ -60,14 +70,25 @@ Excluded by default: `BOOTSTRAP.md`, `canvas/**`, `.git/`, `.mindkeeper/`.
|
|
|
60
70
|
| "Is mindkeeper tracking my files?" | `mind_status` |
|
|
61
71
|
| "What does my history look like?" | `mind_history` without a file filter |
|
|
62
72
|
|
|
73
|
+
## Direct Edit Requests
|
|
74
|
+
|
|
75
|
+
If the user asks to directly edit a tracked file such as `SOUL.md`, `AGENTS.md`, or `MEMORY.md`, make the edit directly.
|
|
76
|
+
|
|
77
|
+
- Do not block on CLI availability.
|
|
78
|
+
- Do not mention unavailable CLI commands unless the user explicitly asked for a CLI-based workflow.
|
|
79
|
+
- Mindkeeper's background watcher should capture the change automatically after the edit.
|
|
80
|
+
- If relevant, you may mention that the change should now be tracked by mindkeeper.
|
|
81
|
+
|
|
63
82
|
## Tool Usage Guide
|
|
64
83
|
|
|
65
84
|
### mind_status
|
|
66
|
-
Call this first if you're unsure whether mindkeeper is initialized
|
|
85
|
+
Call this first when the user asks about history, tracking state, snapshots, or rollback, or if you're unsure whether mindkeeper is initialized.
|
|
67
86
|
```
|
|
68
87
|
mind_status → { initialized, workDir, pendingChanges, snapshots }
|
|
69
88
|
```
|
|
70
89
|
|
|
90
|
+
You do not need to call `mind_status` before a simple direct edit request unless the user specifically asks about tracking or history.
|
|
91
|
+
|
|
71
92
|
### mind_history
|
|
72
93
|
Returns a list of commits with short hash, date, and message.
|
|
73
94
|
- `file` (optional): filter to a specific file path, e.g. `"SOUL.md"`
|
|
@@ -117,6 +138,7 @@ After success, tell the user: **"Run `/new` to apply the changes to your current
|
|
|
117
138
|
## Important Notes
|
|
118
139
|
|
|
119
140
|
- **This skill is the guide, the plugin is the engine** — the `mindkeeper-openclaw` plugin provides the actual `mind_*` tools and watcher; this skill teaches the AI how to bootstrap and use them safely
|
|
141
|
+
- **Use plugin tools first** — in OpenClaw Plugin mode, prefer `mind_*` tools over CLI commands for normal operations
|
|
120
142
|
- **Rollback is per-file** — it only restores the specified file, not all files at once
|
|
121
143
|
- **Rollbacks are non-destructive** — every rollback creates a new commit, so it can itself be undone
|
|
122
144
|
- **Auto-snapshots run in the background** — the user doesn't need to manually save; mindkeeper captures every change automatically
|
|
@@ -124,3 +146,4 @@ After success, tell the user: **"Run `/new` to apply the changes to your current
|
|
|
124
146
|
- **Named snapshots are the safety net** — encourage users to snapshot before major personality or rule changes
|
|
125
147
|
- **If history is empty** — mindkeeper may not have initialized yet, or no changes have been made since install. Call `mind_status` to check.
|
|
126
148
|
- **Commit hashes** — always use the `oid` field from `mind_history` results. Short 8-character hashes are fine.
|
|
149
|
+
- **Keep user-facing messages focused** — if a task can be completed with file edits or `mind_*` tools, do not distract the user with unavailable CLI details
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"description": "Time Machine for Your AI's Brain — install this skill if you want your AI to inspect history, show diffs, create checkpoints, and guide rollback in natural language across agent context files.\n\nSetup: add this skill alone. On first use, the AI checks whether the mindkeeper-openclaw plugin is available. If it is not, the AI asks for explicit confirmation before installing the plugin and before restarting Gateway. User consent is required for plugin install and Gateway restart.\n\nUse this skill when the user asks about changes, history, or versions of their agent context files. The skill teaches the AI how to bootstrap and use the mind_status, mind_history, mind_diff, mind_rollback, and mind_snapshot tools safely.",
|
|
5
5
|
"category": "productivity",
|
|
6
6
|
"tags": ["version-control", "agent", "history", "rollback", "snapshot", "diff", "openclaw"],
|
|
7
|
-
"version": "1.2.
|
|
7
|
+
"version": "1.2.6",
|
|
8
8
|
"license": "MIT",
|
|
9
9
|
"pricing": "free",
|
|
10
10
|
"homepage": "https://github.com/seekcontext/mindkeeper",
|