clawmatrix 0.1.18 → 0.1.20

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "clawmatrix",
3
- "version": "0.1.18",
3
+ "version": "0.1.20",
4
4
  "description": "Decentralized mesh cluster plugin for OpenClaw — inter-gateway communication, model proxy, task handoff, and tool proxy.",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -95,7 +95,7 @@ export class ClusterRuntime {
95
95
  if (this.config.knowledge?.enabled) {
96
96
  const workspacePath = this.resolveWorkspacePath();
97
97
  if (workspacePath) {
98
- const stateDir = path.join(path.dirname(workspacePath), ".clawmatrix");
98
+ const stateDir = path.join(workspacePath, ".clawmatrix");
99
99
  this.knowledgeSync = new KnowledgeSync({
100
100
  workspacePath,
101
101
  storePath: path.join(stateDir, "knowledge.automerge"),
@@ -280,13 +280,12 @@ export class KnowledgeSync {
280
280
  const relPath = rel ? `${rel}/${entry.name}` : entry.name;
281
281
  // Skip hidden files/dirs
282
282
  if (entry.name.startsWith(".")) continue;
283
- // Skip gitignored paths
284
- if (this.isIgnored(relPath)) continue;
285
283
  if (entry.isDirectory()) {
286
- // For directories, check with trailing slash
284
+ // For directories, check with trailing slash so negation rules like !memory/ work
287
285
  if (this.isIgnored(relPath + "/")) continue;
288
286
  await this.walkDir(base, relPath, result);
289
287
  } else if (entry.isFile()) {
288
+ if (this.isIgnored(relPath)) continue;
290
289
  const content = await readFile(path.join(base, relPath), "utf-8");
291
290
  result[relPath] = content;
292
291
  }
@@ -300,7 +299,6 @@ export class KnowledgeSync {
300
299
  const currentFiles = await this.readWorkspaceFiles();
301
300
 
302
301
  let written = 0;
303
- let removed = 0;
304
302
 
305
303
  for (const [relPath, content] of Object.entries(docFiles)) {
306
304
  // Don't export files that would be gitignored
@@ -313,6 +311,7 @@ export class KnowledgeSync {
313
311
  }
314
312
  }
315
313
 
314
+ let removed = 0;
316
315
  for (const relPath of Object.keys(currentFiles)) {
317
316
  if (!(relPath in docFiles)) {
318
317
  const absPath = path.join(this.opts.workspacePath, relPath);