beast-agent 2.44.1 → 2.44.2
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/bin/beast-agent.js +6 -0
- package/package.json +1 -1
- package/src/main.js +67 -41
package/bin/beast-agent.js
CHANGED
|
@@ -37,6 +37,12 @@ if (process.argv[2] === 'uninstall') {
|
|
|
37
37
|
"$d=[Environment]::GetFolderPath('Desktop'); if(Test-Path \"$d\\Beast Agent.lnk\"){ Remove-Item \"$d\\Beast Agent.lnk\" -Force; Write-Host '\u2022 desktop shortcut removed' }"],
|
|
38
38
|
{ stdio: 'inherit' });
|
|
39
39
|
} catch {}
|
|
40
|
+
/* remove the Start Menu shortcut (Windows AUMID registration) */
|
|
41
|
+
try {
|
|
42
|
+
spawnSync('powershell.exe', ['-NoProfile', '-Command',
|
|
43
|
+
"$s=Join-Path $env:APPDATA 'Microsoft\\Windows\\Start Menu\\Programs\\Beast Agent.lnk'; if(Test-Path $s){ Remove-Item $s -Force; Write-Host '\u2022 Start Menu shortcut removed' }"],
|
|
44
|
+
{ stdio: 'inherit' });
|
|
45
|
+
} catch {}
|
|
40
46
|
} else {
|
|
41
47
|
try { spawnSync('pkill', ['-f', 'node_modules/beast-agent'], { stdio: 'ignore' }); } catch {}
|
|
42
48
|
}
|
package/package.json
CHANGED
package/src/main.js
CHANGED
|
@@ -272,15 +272,21 @@ try {
|
|
|
272
272
|
try { nodemailer = require('nodemailer'); } catch {}
|
|
273
273
|
|
|
274
274
|
const APP_DIR = path.join(app.getPath('appData'), 'beast');
|
|
275
|
-
/* Windows
|
|
276
|
-
AUMID,
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
275
|
+
/* Windows kimliği: görev çubuğu ikonu + toast bildirim adı/işareti için
|
|
276
|
+
AppUserModelID ŞART. Özel AUMID, kayıtlı kısayol yoksa taskbar ikonunu
|
|
277
|
+
electron.exe logosuna düşürür — bu yüzden atama, whenReady'de AUMID'li
|
|
278
|
+
kısayollar (masaüstü + Başlat menüsü) hazırlandıktan SONRA yapılır. */
|
|
279
|
+
const BEAST_AUMID = 'com.quantumalgo.beastagent';
|
|
280
|
+
try { app.setName('Beast Agent'); } catch {}
|
|
281
|
+
function assignAppUserModelId() {
|
|
282
|
+
try {
|
|
283
|
+
const startMenu = path.join(app.getPath('appData'), 'Microsoft', 'Windows', 'Start Menu', 'Programs', 'Beast Agent.lnk');
|
|
284
|
+
const desktop = path.join(app.getPath('desktop'), 'Beast Agent.lnk');
|
|
285
|
+
if (app.isPackaged || fs.existsSync(startMenu) || fs.existsSync(desktop)) {
|
|
286
|
+
app.setAppUserModelId(BEAST_AUMID);
|
|
287
|
+
}
|
|
288
|
+
} catch {}
|
|
289
|
+
}
|
|
284
290
|
/* mem0-native embedding modeli whisper ile AYNI cache'i kullanır (src/agent/mem0.js okur) */
|
|
285
291
|
process.env.BEAST_MODELS_DIR = path.join(APP_DIR, 'models');
|
|
286
292
|
|
|
@@ -3583,38 +3589,55 @@ if (!gotLock) {
|
|
|
3583
3589
|
try { showWin(); } catch {}
|
|
3584
3590
|
});
|
|
3585
3591
|
|
|
3586
|
-
/*
|
|
3587
|
-
|
|
3588
|
-
|
|
3589
|
-
|
|
3590
|
-
|
|
3591
|
-
|
|
3592
|
-
|
|
3593
|
-
|
|
3594
|
-
|
|
3595
|
-
|
|
3596
|
-
|
|
3597
|
-
|
|
3598
|
-
|
|
3599
|
-
|
|
3600
|
-
|
|
3601
|
-
|
|
3602
|
-
|
|
3603
|
-
|
|
3604
|
-
return
|
|
3605
|
-
|
|
3606
|
-
|
|
3607
|
-
|
|
3608
|
-
|
|
3609
|
-
|
|
3610
|
-
|
|
3611
|
-
|
|
3612
|
-
|
|
3613
|
-
|
|
3614
|
-
|
|
3615
|
-
|
|
3592
|
+
/* Kısayol yazıcı: masaüstü + Başlat menüsü kısayolları AUMID, ikon ve
|
|
3593
|
+
çalışma klasörüyle HER AÇILIŞTA tazelenir — eski kısayolda AUMID yoksa
|
|
3594
|
+
Windows görev çubuğunda/toast'ta electron.exe kimliğini gösteriyordu. */
|
|
3595
|
+
function writeBeastShortcut(lnk) {
|
|
3596
|
+
const goodCwd = app.getPath('home');
|
|
3597
|
+
const base = {
|
|
3598
|
+
target: process.execPath,
|
|
3599
|
+
args: app.getAppPath(),
|
|
3600
|
+
cwd: goodCwd,
|
|
3601
|
+
description: 'Beast Agent — fast, light and resourceful',
|
|
3602
|
+
icon: path.join(__dirname, '..', 'assets', 'app.ico'),
|
|
3603
|
+
iconIndex: 0,
|
|
3604
|
+
appUserModelId: BEAST_AUMID,
|
|
3605
|
+
};
|
|
3606
|
+
if (fs.existsSync(lnk)) {
|
|
3607
|
+
/* mevcut kısayolu onar: AUMID + ikon + çalışma klasörü garantiye alınır */
|
|
3608
|
+
try {
|
|
3609
|
+
const cur = shell.readShortcutLink(lnk);
|
|
3610
|
+
return shell.writeShortcutLink(lnk, 'update', {
|
|
3611
|
+
...cur,
|
|
3612
|
+
cwd: goodCwd,
|
|
3613
|
+
icon: base.icon,
|
|
3614
|
+
iconIndex: 0,
|
|
3615
|
+
appUserModelId: BEAST_AUMID,
|
|
3616
|
+
});
|
|
3617
|
+
} catch {}
|
|
3618
|
+
}
|
|
3619
|
+
return shell.writeShortcutLink(lnk, 'create', base);
|
|
3620
|
+
}
|
|
3621
|
+
|
|
3622
|
+
/* npm (global) kurulumda masaüstü + Başlat menüsü kısayolları.
|
|
3623
|
+
(NSIS packaged modda kısayolları electron-builder zaten oluşturur.) */
|
|
3624
|
+
function ensureShortcuts() {
|
|
3625
|
+
try {
|
|
3626
|
+
const desktopLnk = path.join(app.getPath('desktop'), 'Beast Agent.lnk');
|
|
3627
|
+
const okDesktop = writeBeastShortcut(desktopLnk);
|
|
3628
|
+
log.info('main', okDesktop ? 'Masaüstü kısayolu hazır (AUMID + ikon)' : 'Masaüstü kısayolu oluşturulamadı');
|
|
3629
|
+
} catch (e) {
|
|
3630
|
+
log.info('main', 'Masaüstü kısayol hatası: ' + String((e && e.message) || e));
|
|
3631
|
+
}
|
|
3632
|
+
try {
|
|
3633
|
+
/* Başlat menüsü kısayolu: Windows AUMID çözümünü (görev çubuğu ikonu +
|
|
3634
|
+
toast bildirim adı) öncelikle buradan okur */
|
|
3635
|
+
const startDir = path.join(app.getPath('appData'), 'Microsoft', 'Windows', 'Start Menu', 'Programs');
|
|
3636
|
+
fs.mkdirSync(startDir, { recursive: true });
|
|
3637
|
+
const okStart = writeBeastShortcut(path.join(startDir, 'Beast Agent.lnk'));
|
|
3638
|
+
log.info('main', okStart ? 'Başlat menüsü kısayolu hazır (AUMID + ikon)' : 'Başlat menüsü kısayolu oluşturulamadı');
|
|
3616
3639
|
} catch (e) {
|
|
3617
|
-
log.info('main', '
|
|
3640
|
+
log.info('main', 'Başlat menüsü kısayol hatası: ' + String((e && e.message) || e));
|
|
3618
3641
|
}
|
|
3619
3642
|
}
|
|
3620
3643
|
|
|
@@ -3646,8 +3669,11 @@ app.whenReady().then(() => {
|
|
|
3646
3669
|
} catch (e) {
|
|
3647
3670
|
log.error('main', 'Startup kaydı (npm) başarısız: ' + String((e && e.message) || e));
|
|
3648
3671
|
}
|
|
3649
|
-
|
|
3672
|
+
ensureShortcuts();
|
|
3650
3673
|
}
|
|
3674
|
+
/* AUMID ataması kısayollardan SONRA: görev çubuğu ve toast bildirimleri
|
|
3675
|
+
böylece Beast ikonunu/adını çözer (electron.exe kimliği ezilir) */
|
|
3676
|
+
assignAppUserModelId();
|
|
3651
3677
|
reloadBackend();
|
|
3652
3678
|
syncWhitelist(); // bot sistemi: whitelist.json aynası ilk açılışta garanti
|
|
3653
3679
|
try { bots.ensureBotCodes(); } catch {} // her bota benzersiz 5 haneli kod garanti
|