beast-agent 1.6.1 → 1.7.0
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/agent/bots.js +13 -0
- package/src/agent/engine.js +4962 -4906
- package/src/agent/mem0.js +605 -0
- package/src/agent/memory.js +8 -0
- package/src/agent/tools.js +278 -37
- package/src/main.js +32 -18
- package/src/preload.js +1 -0
- package/src/renderer/i18n.js +4 -0
- package/src/renderer/index.html +5 -0
- package/src/renderer/renderer.js +72 -13
- package/src/renderer/style.css +38 -2
package/package.json
CHANGED
package/src/agent/bots.js
CHANGED
|
@@ -416,6 +416,13 @@ function writeMemoryFile(id, file, content) {
|
|
|
416
416
|
const d = botDir(id);
|
|
417
417
|
fs.mkdirSync(d, { recursive: true });
|
|
418
418
|
fs.writeFileSync(path.join(d, file), String(content ?? ''), 'utf8');
|
|
419
|
+
/* admin MEMORY.md'yi elle değiştirdiyse botun mem0 store'unu yeniden kur */
|
|
420
|
+
if (file === 'MEMORY.md') {
|
|
421
|
+
try {
|
|
422
|
+
const mem0 = require('./mem0');
|
|
423
|
+
mem0.reindexFromLines('bot:' + id, String(content ?? '').split('\n').map((l) => l.replace(/^[-*]\s*/, '').trim()).filter(Boolean));
|
|
424
|
+
} catch {}
|
|
425
|
+
}
|
|
419
426
|
logChange(id, `${file} admin tarafından güncellendi`);
|
|
420
427
|
return { ok: true };
|
|
421
428
|
} catch (e) {
|
|
@@ -423,6 +430,11 @@ function writeMemoryFile(id, file, content) {
|
|
|
423
430
|
}
|
|
424
431
|
}
|
|
425
432
|
|
|
433
|
+
/* botun MEMORY.md ayna dosyasının yolu (mem0 syncMirror kullanır) */
|
|
434
|
+
function memPath(id) {
|
|
435
|
+
return path.join(botDir(id), 'MEMORY.md');
|
|
436
|
+
}
|
|
437
|
+
|
|
426
438
|
/* ---------- BOT OTURUMU hafıza operasyonları ----------
|
|
427
439
|
Bot oturumlarında memory_write/memory_search GLOBAL Beast hafızasına DEĞİL,
|
|
428
440
|
botun kendi SOUL/USER/MEMORY dosyalarına gider (tam izolasyon). */
|
|
@@ -559,6 +571,7 @@ module.exports = {
|
|
|
559
571
|
readMemoryFiles,
|
|
560
572
|
writeMemoryFile,
|
|
561
573
|
readMem,
|
|
574
|
+
memPath,
|
|
562
575
|
appendMem,
|
|
563
576
|
appendUserMem,
|
|
564
577
|
searchMem,
|