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 CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "beast-agent",
3
3
  "productName": "Beast Agent",
4
- "version": "1.6.1",
4
+ "version": "1.7.0",
5
5
  "description": "Ultra-fast local agent shell for Windows.",
6
6
  "author": "algokodcom (AlgoKod)",
7
7
  "license": "MIT",
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,