mindkeeper-openclaw 0.3.0 → 0.3.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.
Files changed (3) hide show
  1. package/dist/index.js +7 -5
  2. package/package.json +10 -9
  3. package/LICENSE +0 -21
package/dist/index.js CHANGED
@@ -1061,20 +1061,18 @@ var Watcher = class {
1061
1061
  lockfilePath;
1062
1062
  onSnapshot;
1063
1063
  onError;
1064
+ onReady;
1064
1065
  constructor(options) {
1065
1066
  this.tracker = options.tracker;
1066
1067
  this.debounceMs = options.debounceMs ?? options.tracker.getConfig().snapshot.debounceMs;
1067
1068
  this.lockfilePath = import_node_path4.default.join(options.tracker.gitDir, LOCKFILE_NAME);
1068
1069
  this.onSnapshot = options.onSnapshot;
1069
1070
  this.onError = options.onError;
1071
+ this.onReady = options.onReady;
1070
1072
  }
1071
1073
  async start() {
1072
1074
  await this.acquireLock();
1073
- const config = this.tracker.getConfig();
1074
- const watchPaths = config.tracking.include.map(
1075
- (pattern) => import_node_path4.default.join(this.tracker.workDir, pattern)
1076
- );
1077
- this.watcher = (0, import_chokidar.watch)(watchPaths, {
1075
+ this.watcher = (0, import_chokidar.watch)(this.tracker.workDir, {
1078
1076
  ignoreInitial: true,
1079
1077
  persistent: true,
1080
1078
  ignored: [
@@ -1086,6 +1084,10 @@ var Watcher = class {
1086
1084
  this.watcher.on("add", (filePath) => this.handleChange(filePath));
1087
1085
  this.watcher.on("unlink", (filePath) => this.handleChange(filePath));
1088
1086
  this.watcher.on("error", (err) => this.onError?.(err instanceof Error ? err : new Error(String(err))));
1087
+ this.watcher.on("ready", () => this.onReady?.());
1088
+ await new Promise((resolve) => {
1089
+ this.watcher.once("ready", resolve);
1090
+ });
1089
1091
  }
1090
1092
  async stop() {
1091
1093
  if (this.debounceTimer) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mindkeeper-openclaw",
3
- "version": "0.3.0",
3
+ "version": "0.3.1",
4
4
  "description": "OpenClaw plugin for mindkeeper: auto-snapshot, diff, and rollback for agent context files",
5
5
  "keywords": [
6
6
  "openclaw",
@@ -29,6 +29,14 @@
29
29
  "scripts/postinstall-merge-config.cjs",
30
30
  "README.md"
31
31
  ],
32
+ "scripts": {
33
+ "build": "node build.mjs",
34
+ "test": "vitest run",
35
+ "typecheck": "tsc --noEmit",
36
+ "clean": "rm -rf dist",
37
+ "prepublishOnly": "npm run clean && npm run build",
38
+ "postinstall": "node scripts/postinstall-merge-config.cjs"
39
+ },
32
40
  "openclaw": {
33
41
  "extensions": [
34
42
  "./dist/index.js"
@@ -55,12 +63,5 @@
55
63
  },
56
64
  "publishConfig": {
57
65
  "access": "public"
58
- },
59
- "scripts": {
60
- "build": "node build.mjs",
61
- "test": "vitest run",
62
- "typecheck": "tsc --noEmit",
63
- "clean": "rm -rf dist",
64
- "postinstall": "node scripts/postinstall-merge-config.cjs"
65
66
  }
66
- }
67
+ }
package/LICENSE DELETED
@@ -1,21 +0,0 @@
1
- MIT License
2
-
3
- Copyright (c) 2026 context-vault contributors
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.