total-recall-brain 3.14.4 → 3.14.5
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
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
name: total-recall
|
|
3
3
|
provenance: total-recall
|
|
4
4
|
description: "Use this skill to operate Total Recall — portable memory, instructions, openwiki, skill deploy, and secrets. MANDATORY: Read this file before changing TR setup. Nested packages under modules/ are NOT agent skills."
|
|
5
|
-
version: 3.14.
|
|
5
|
+
version: 3.14.5
|
|
6
6
|
---
|
|
7
7
|
|
|
8
8
|
# Total Recall — Master Agent Skill
|
package/src/core/crons.mjs
CHANGED
|
@@ -62,4 +62,36 @@ export async function runCrons(options) {
|
|
|
62
62
|
logger.error({ subsystem: 'cron', message: `Secret/Instruction Check Failed: ${err.message}` });
|
|
63
63
|
}
|
|
64
64
|
}
|
|
65
|
+
|
|
66
|
+
// 5. Global Repo Auto-Discovery & Skill Sync (Every 1 Hour)
|
|
67
|
+
if (!global.lastSkillSyncTime || now - global.lastSkillSyncTime > ONE_HOUR) {
|
|
68
|
+
logger.info({ subsystem: 'cron', message: 'Running Global Auto-Discovery and Skill Sync...' });
|
|
69
|
+
try {
|
|
70
|
+
const githubDir = path.join(process.env.HOME || process.env.USERPROFILE || '', 'Github');
|
|
71
|
+
if (fs.existsSync(githubDir)) {
|
|
72
|
+
logger.info({ subsystem: 'cron', message: `Scanning ${githubDir} for repos to track...` });
|
|
73
|
+
const dirs = fs.readdirSync(githubDir);
|
|
74
|
+
for (const dir of dirs) {
|
|
75
|
+
const fullPath = path.join(githubDir, dir);
|
|
76
|
+
if (fs.statSync(fullPath).isDirectory() && !dir.startsWith('.')) {
|
|
77
|
+
// Track the repo silently
|
|
78
|
+
try {
|
|
79
|
+
execFileSync('npx', ['total-recall', 'skill', 'track', fullPath, '--register'], { stdio: 'ignore' });
|
|
80
|
+
} catch (e) {
|
|
81
|
+
// Ignore tracking errors for individual repos
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
// Push the latest skills to all tracked repos
|
|
87
|
+
logger.info({ subsystem: 'cron', message: 'Pushing latest skills to all tracked repos...' });
|
|
88
|
+
execFileSync('npx', ['total-recall', 'skill', 'push'], { stdio: 'ignore' });
|
|
89
|
+
logger.info({ subsystem: 'cron', message: 'Global Skill Sync completed successfully.' });
|
|
90
|
+
}
|
|
91
|
+
global.lastSkillSyncTime = now;
|
|
92
|
+
} catch (err) {
|
|
93
|
+
logger.error({ subsystem: 'cron', message: `Global Skill Sync Failed: ${err.message}` });
|
|
94
|
+
}
|
|
95
|
+
}
|
|
65
96
|
}
|
|
97
|
+
|