total-recall-brain 3.14.3 → 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.
|
@@ -194,7 +194,29 @@ export default function InstructionsPage() {
|
|
|
194
194
|
|
|
195
195
|
// ─── Data Loading ─────────────────────────────────────────────────────────────
|
|
196
196
|
|
|
197
|
-
const
|
|
197
|
+
const applyFallback = useCallback(() => {
|
|
198
|
+
setSurfaces(FALLBACK_SURFACES)
|
|
199
|
+
setIsFallback(true)
|
|
200
|
+
setLastCompiled('')
|
|
201
|
+
setTotalNodes(0)
|
|
202
|
+
const first = FALLBACK_SURFACES[0]
|
|
203
|
+
setSelected(first)
|
|
204
|
+
setContent('Content unavailable — recompile to regenerate')
|
|
205
|
+
}, [])
|
|
206
|
+
|
|
207
|
+
const loadContent = useCallback(async (name: string) => {
|
|
208
|
+
setContentLoading(true)
|
|
209
|
+
try {
|
|
210
|
+
const data = await fetchInstructionContent(name)
|
|
211
|
+
setContent(data.content || 'Empty surface — no compiled content yet.')
|
|
212
|
+
} catch {
|
|
213
|
+
setContent('Content unavailable — recompile to regenerate')
|
|
214
|
+
} finally {
|
|
215
|
+
setContentLoading(false)
|
|
216
|
+
}
|
|
217
|
+
}, [])
|
|
218
|
+
|
|
219
|
+
const loadSurfaces = useCallback(async () => {
|
|
198
220
|
setLoading(true)
|
|
199
221
|
setError(null)
|
|
200
222
|
try {
|
|
@@ -220,29 +242,7 @@ export default function InstructionsPage() {
|
|
|
220
242
|
} finally {
|
|
221
243
|
setLoading(false)
|
|
222
244
|
}
|
|
223
|
-
}
|
|
224
|
-
|
|
225
|
-
const applyFallback = () => {
|
|
226
|
-
setSurfaces(FALLBACK_SURFACES)
|
|
227
|
-
setIsFallback(true)
|
|
228
|
-
setLastCompiled('')
|
|
229
|
-
setTotalNodes(0)
|
|
230
|
-
const first = FALLBACK_SURFACES[0]
|
|
231
|
-
setSelected(first)
|
|
232
|
-
setContent('Content unavailable — recompile to regenerate')
|
|
233
|
-
}
|
|
234
|
-
|
|
235
|
-
const loadContent = async (name: string) => {
|
|
236
|
-
setContentLoading(true)
|
|
237
|
-
try {
|
|
238
|
-
const data = await fetchInstructionContent(name)
|
|
239
|
-
setContent(data.content || 'Empty surface — no compiled content yet.')
|
|
240
|
-
} catch {
|
|
241
|
-
setContent('Content unavailable — recompile to regenerate')
|
|
242
|
-
} finally {
|
|
243
|
-
setContentLoading(false)
|
|
244
|
-
}
|
|
245
|
-
}
|
|
245
|
+
}, [applyFallback, loadContent])
|
|
246
246
|
|
|
247
247
|
const handleSelect = (surface: Surface) => {
|
|
248
248
|
setSelected(surface)
|
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
|
+
|