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 +1 -1
- package/src/cluster-service.ts +1 -1
- package/src/knowledge-sync.ts +3 -4
package/package.json
CHANGED
package/src/cluster-service.ts
CHANGED
|
@@ -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(
|
|
98
|
+
const stateDir = path.join(workspacePath, ".clawmatrix");
|
|
99
99
|
this.knowledgeSync = new KnowledgeSync({
|
|
100
100
|
workspacePath,
|
|
101
101
|
storePath: path.join(stateDir, "knowledge.automerge"),
|
package/src/knowledge-sync.ts
CHANGED
|
@@ -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);
|