@yemi33/minions 0.1.2330 → 0.1.2331
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/engine/kb-sweep.js +3 -3
- package/package.json +1 -1
package/engine/kb-sweep.js
CHANGED
|
@@ -14,7 +14,7 @@ const path = require('path');
|
|
|
14
14
|
const crypto = require('crypto');
|
|
15
15
|
const shared = require('./shared');
|
|
16
16
|
const queries = require('./queries');
|
|
17
|
-
const { safeRead, safeWrite, safeJson, safeUnlink, log, ts } = shared;
|
|
17
|
+
const { safeRead, safeReadOrNull, safeWrite, safeJson, safeUnlink, log, ts } = shared;
|
|
18
18
|
const { MINIONS_DIR, ENGINE_DIR } = queries;
|
|
19
19
|
|
|
20
20
|
const KB_DIR = path.join(MINIONS_DIR, 'knowledge');
|
|
@@ -58,11 +58,10 @@ function _serializeFrontmatter(fm, body) {
|
|
|
58
58
|
}
|
|
59
59
|
|
|
60
60
|
function _archiveKbFile(filePath, reason) {
|
|
61
|
-
if (!fs.existsSync(filePath)) return false;
|
|
62
61
|
if (!fs.existsSync(SWEPT_DIR)) fs.mkdirSync(SWEPT_DIR, { recursive: true });
|
|
63
62
|
const destPath = shared.uniquePath(path.join(SWEPT_DIR, path.basename(filePath)));
|
|
64
63
|
try {
|
|
65
|
-
const content =
|
|
64
|
+
const content = safeReadOrNull(filePath);
|
|
66
65
|
if (content === null) return false;
|
|
67
66
|
safeWrite(destPath, `<!-- swept: ${new Date().toISOString()} | reason: ${reason} -->\n${content}`);
|
|
68
67
|
safeUnlink(filePath);
|
|
@@ -707,6 +706,7 @@ module.exports = {
|
|
|
707
706
|
_parseFrontmatter,
|
|
708
707
|
_serializeFrontmatter,
|
|
709
708
|
_hashDedup,
|
|
709
|
+
_archiveKbFile,
|
|
710
710
|
COMPRESS_THRESHOLD_BYTES,
|
|
711
711
|
SWEPT_FLAG_KEY,
|
|
712
712
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@yemi33/minions",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.2331",
|
|
4
4
|
"description": "Multi-agent AI dev team that runs from ~/.minions/ — five autonomous agents share a single engine, dashboard, and knowledge base",
|
|
5
5
|
"bin": {
|
|
6
6
|
"minions": "bin/minions.js"
|