@claude-flow/cli 3.5.60 → 3.5.61
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/dist/src/init/statusline-generator.d.ts.map +1 -1
- package/dist/src/init/statusline-generator.js +17 -2
- package/dist/src/init/statusline-generator.js.map +1 -1
- package/dist/src/mcp-tools/hooks-tools.d.ts.map +1 -1
- package/dist/src/mcp-tools/hooks-tools.js +63 -2
- package/dist/src/mcp-tools/hooks-tools.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"statusline-generator.d.ts","sourceRoot":"","sources":["../../../src/init/statusline-generator.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAE9C;;;;;;;;;GASG;AACH,wBAAgB,wBAAwB,CAAC,OAAO,EAAE,WAAW,GAAG,MAAM,
|
|
1
|
+
{"version":3,"file":"statusline-generator.d.ts","sourceRoot":"","sources":["../../../src/init/statusline-generator.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAE9C;;;;;;;;;GASG;AACH,wBAAgB,wBAAwB,CAAC,OAAO,EAAE,WAAW,GAAG,MAAM,CAszBrE;AAED;;GAEG;AACH,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,WAAW,GAAG,MAAM,CA8BnE"}
|
|
@@ -456,7 +456,7 @@ function getHooksStatus() {
|
|
|
456
456
|
return { enabled, total };
|
|
457
457
|
}
|
|
458
458
|
|
|
459
|
-
// AgentDB stats — count real entries
|
|
459
|
+
// AgentDB stats — count real entries from all data stores
|
|
460
460
|
function getAgentDBStats() {
|
|
461
461
|
let vectorCount = 0;
|
|
462
462
|
let dbSizeKB = 0;
|
|
@@ -475,7 +475,22 @@ function getAgentDBStats() {
|
|
|
475
475
|
} catch { /* fall back */ }
|
|
476
476
|
}
|
|
477
477
|
|
|
478
|
-
// 2. Count entries from
|
|
478
|
+
// 2. Count entries from hooks memory store (.claude-flow/memory/store.json)
|
|
479
|
+
const hooksStorePath = path.join(CWD, '.claude-flow', 'memory', 'store.json');
|
|
480
|
+
const hooksStoreStat = safeStat(hooksStorePath);
|
|
481
|
+
if (hooksStoreStat) {
|
|
482
|
+
dbSizeKB += hooksStoreStat.size / 1024;
|
|
483
|
+
try {
|
|
484
|
+
const store = JSON.parse(fs.readFileSync(hooksStorePath, 'utf-8'));
|
|
485
|
+
if (store && store.entries) {
|
|
486
|
+
const entryCount = Object.keys(store.entries).length;
|
|
487
|
+
vectorCount = Math.max(vectorCount, entryCount);
|
|
488
|
+
if (entryCount > 0) namespaces++;
|
|
489
|
+
}
|
|
490
|
+
} catch { /* fall back */ }
|
|
491
|
+
}
|
|
492
|
+
|
|
493
|
+
// 3. Count entries from ranked-context.json
|
|
479
494
|
try {
|
|
480
495
|
const ranked = readJSON(path.join(CWD, '.claude-flow', 'data', 'ranked-context.json'));
|
|
481
496
|
if (ranked && ranked.entries && ranked.entries.length > vectorCount) vectorCount = ranked.entries.length;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"statusline-generator.js","sourceRoot":"","sources":["../../../src/init/statusline-generator.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAIH;;;;;;;;;GASG;AACH,MAAM,UAAU,wBAAwB,CAAC,OAAoB;IAC3D,MAAM,SAAS,GAAG,OAAO,CAAC,OAAO,CAAC,SAAS,CAAC;IAE5C,OAAO;;;;;;;;;;;;;;;;;;;;;;;eAuBM,SAAS
|
|
1
|
+
{"version":3,"file":"statusline-generator.js","sourceRoot":"","sources":["../../../src/init/statusline-generator.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAIH;;;;;;;;;GASG;AACH,MAAM,UAAU,wBAAwB,CAAC,OAAoB;IAC3D,MAAM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;IAED,OAAO;;;;;;;;;;;;;;;;;;;;;;;;CAwBR,CAAC;AACF,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hooks-tools.d.ts","sourceRoot":"","sources":["../../../src/mcp-tools/hooks-tools.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,OAAO,EAAE,KAAK,OAAO,EAAiB,MAAM,YAAY,CAAC;AAgrBzD,eAAO,MAAM,YAAY,EAAE,OAsC1B,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE,OA4C3B,CAAC;AAEF,eAAO,MAAM,eAAe,EAAE,OAkC7B,CAAC;AAEF,eAAO,MAAM,gBAAgB,EAAE,OAiD9B,CAAC;AAEF,eAAO,MAAM,UAAU,EAAE,OA6KxB,CAAC;AAEF,eAAO,MAAM,YAAY,EAAE,OAyD1B,CAAC;AAEF,eAAO,MAAM,SAAS,EAAE,OA8CvB,CAAC;AAEF,eAAO,MAAM,YAAY,EAAE,OAoF1B,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE,
|
|
1
|
+
{"version":3,"file":"hooks-tools.d.ts","sourceRoot":"","sources":["../../../src/mcp-tools/hooks-tools.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,OAAO,EAAE,KAAK,OAAO,EAAiB,MAAM,YAAY,CAAC;AAgrBzD,eAAO,MAAM,YAAY,EAAE,OAsC1B,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE,OA4C3B,CAAC;AAEF,eAAO,MAAM,eAAe,EAAE,OAkC7B,CAAC;AAEF,eAAO,MAAM,gBAAgB,EAAE,OAiD9B,CAAC;AAEF,eAAO,MAAM,UAAU,EAAE,OA6KxB,CAAC;AAEF,eAAO,MAAM,YAAY,EAAE,OAyD1B,CAAC;AAEF,eAAO,MAAM,SAAS,EAAE,OA8CvB,CAAC;AAEF,eAAO,MAAM,YAAY,EAAE,OAoF1B,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE,OAoI3B,CAAC;AAGF,eAAO,MA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;AAGF,eAAO,MAAM,UAAU,EAAE,OAAO,EAwC/B,CAAC;AAEF,eAAe,UAAU,CAAC"}
|
|
@@ -1164,6 +1164,32 @@ export const hooksPostTask = {
|
|
|
1164
1164
|
catch { /* non-critical */ }
|
|
1165
1165
|
}
|
|
1166
1166
|
const duration = Date.now() - startTime;
|
|
1167
|
+
// Persist to auto-memory-store for statusline visibility
|
|
1168
|
+
try {
|
|
1169
|
+
const dataDir = join(getProjectCwd(), '.claude-flow', 'data');
|
|
1170
|
+
if (!existsSync(dataDir))
|
|
1171
|
+
mkdirSync(dataDir, { recursive: true });
|
|
1172
|
+
const storePath = join(dataDir, 'auto-memory-store.json');
|
|
1173
|
+
let store = [];
|
|
1174
|
+
try {
|
|
1175
|
+
if (existsSync(storePath)) {
|
|
1176
|
+
const parsed = JSON.parse(readFileSync(storePath, 'utf-8'));
|
|
1177
|
+
store = Array.isArray(parsed) ? parsed : [];
|
|
1178
|
+
}
|
|
1179
|
+
}
|
|
1180
|
+
catch { /* start fresh */ }
|
|
1181
|
+
store.push({
|
|
1182
|
+
id: `task-${taskId}`,
|
|
1183
|
+
key: taskId,
|
|
1184
|
+
content: `Task ${success ? 'completed' : 'failed'}: ${taskText || taskId}${agent ? ` (agent: ${agent})` : ''}`,
|
|
1185
|
+
namespace: 'tasks',
|
|
1186
|
+
type: 'task-outcome',
|
|
1187
|
+
metadata: { agent, success, quality },
|
|
1188
|
+
createdAt: Date.now(),
|
|
1189
|
+
});
|
|
1190
|
+
writeFileSync(storePath, JSON.stringify(store, null, 2), 'utf-8');
|
|
1191
|
+
}
|
|
1192
|
+
catch { /* non-critical */ }
|
|
1167
1193
|
return {
|
|
1168
1194
|
taskId,
|
|
1169
1195
|
success,
|
|
@@ -1544,6 +1570,41 @@ export const hooksSessionStart = {
|
|
|
1544
1570
|
catch {
|
|
1545
1571
|
// Bridge not available
|
|
1546
1572
|
}
|
|
1573
|
+
// Persist session record to auto-memory-store for statusline visibility
|
|
1574
|
+
try {
|
|
1575
|
+
const dataDir = join(getProjectCwd(), '.claude-flow', 'data');
|
|
1576
|
+
if (!existsSync(dataDir))
|
|
1577
|
+
mkdirSync(dataDir, { recursive: true });
|
|
1578
|
+
const storePath = join(dataDir, 'auto-memory-store.json');
|
|
1579
|
+
let store = [];
|
|
1580
|
+
try {
|
|
1581
|
+
if (existsSync(storePath)) {
|
|
1582
|
+
const raw = readFileSync(storePath, 'utf-8');
|
|
1583
|
+
const parsed = JSON.parse(raw);
|
|
1584
|
+
store = Array.isArray(parsed) ? parsed : [];
|
|
1585
|
+
}
|
|
1586
|
+
}
|
|
1587
|
+
catch { /* start fresh */ }
|
|
1588
|
+
// Add session entry (dedup by session ID)
|
|
1589
|
+
const entryId = `session-${sessionId}`;
|
|
1590
|
+
const existing = store.findIndex((e) => e.id === entryId);
|
|
1591
|
+
const entry = {
|
|
1592
|
+
id: entryId,
|
|
1593
|
+
key: sessionId,
|
|
1594
|
+
content: `Session started: ${sessionId}`,
|
|
1595
|
+
namespace: 'sessions',
|
|
1596
|
+
type: 'session',
|
|
1597
|
+
createdAt: Date.now(),
|
|
1598
|
+
};
|
|
1599
|
+
if (existing >= 0)
|
|
1600
|
+
store[existing] = entry;
|
|
1601
|
+
else
|
|
1602
|
+
store.push(entry);
|
|
1603
|
+
writeFileSync(storePath, JSON.stringify(store, null, 2), 'utf-8');
|
|
1604
|
+
}
|
|
1605
|
+
catch {
|
|
1606
|
+
// Non-critical — statusline just won't show this session
|
|
1607
|
+
}
|
|
1547
1608
|
return {
|
|
1548
1609
|
sessionId,
|
|
1549
1610
|
started: new Date().toISOString(),
|
|
@@ -1558,8 +1619,8 @@ export const hooksSessionStart = {
|
|
|
1558
1619
|
sessionMemory: sessionMemory || { controller: 'none', restoredPatterns: 0 },
|
|
1559
1620
|
previousSession: restoreLatest ? {
|
|
1560
1621
|
id: `session-${Date.now() - 86400000}`,
|
|
1561
|
-
tasksRestored: sessionMemory?.restoredPatterns ||
|
|
1562
|
-
memoryRestored: sessionMemory?.restoredPatterns ||
|
|
1622
|
+
tasksRestored: sessionMemory?.restoredPatterns || 0,
|
|
1623
|
+
memoryRestored: sessionMemory?.restoredPatterns || 0,
|
|
1563
1624
|
} : null,
|
|
1564
1625
|
};
|
|
1565
1626
|
},
|