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.
@@ -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
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "beast-agent",
3
3
  "productName": "Beast Agent",
4
- "version": "2.44.1",
4
+ "version": "2.44.2",
5
5
  "description": "Ultra-fast local agent shell for Windows.",
6
6
  "author": "algokodcom (AlgoKod)",
7
7
  "license": "MIT",
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 toast bildirimleri için AppUserModelID erken ayarlanmalı. ANCAK özel
276
- AUMID, Windows'ta kayıtlı kısayol yoksa taskbar ikonunu electron.exe logosuna
277
- düşürür. Bu yüzden yalnız paketli kurulumda ya da npm modunda masaüstü
278
- kısayolu (aynı AUMID ile oluşturulur) mevcutsa atanır. */
279
- try {
280
- let aumidOk = app.isPackaged;
281
- if (!aumidOk) aumidOk = fs.existsSync(path.join(app.getPath('desktop'), 'Beast Agent.lnk'));
282
- if (aumidOk) app.setAppUserModelId('com.quantumalgo.beastagent');
283
- } catch {}
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
- /* npm (global) kurulumda masaüstü kısayolu — yoksa bir kez oluşturulur.
3587
- (NSIS packaged modda kısayolu electron-builder zaten yapar.) */
3588
- function ensureDesktopShortcut() {
3589
- try {
3590
- const desktop = app.getPath('desktop');
3591
- const lnk = path.join(desktop, 'Beast Agent.lnk');
3592
- /* çalışma klasörü kullanıcı home'u olsun: paket klasöründe başlarsa güncelleme
3593
- cmd'si orada açılır ve npm install -g klasör kilidi (EBUSY) yemek zorunda kalır */
3594
- const goodCwd = app.getPath('home');
3595
- if (fs.existsSync(lnk)) {
3596
- /* eski kısayollar paket klasörünü çalışma klasörü olarak taşıyordu — onar */
3597
- try {
3598
- const cur = shell.readShortcutLink(lnk);
3599
- if (cur && cur.cwd && /node_modules[\\/]beast-agent/i.test(cur.cwd)) {
3600
- shell.writeShortcutLink(lnk, 'update', { ...cur, cwd: goodCwd });
3601
- log.info('main', 'Masaüstü kısayolu çalışma klasörü home\u2019a taşındı');
3602
- }
3603
- } catch {}
3604
- return;
3605
- }
3606
- const ok = shell.writeShortcutLink(lnk, 'create', {
3607
- target: process.execPath,
3608
- args: app.getAppPath(),
3609
- cwd: goodCwd,
3610
- description: 'Beast Agent — hızlı, hafif ve becerikli',
3611
- icon: path.join(__dirname, '..', 'assets', 'app.ico'),
3612
- iconIndex: 0,
3613
- appUserModelId: 'com.quantumalgo.beastagent',
3614
- });
3615
- log.info('main', ok ? 'Masaüstü kısayolu oluşturuldu (npm modu)' : 'Masaüstü kısayolu oluşturulamadı');
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', 'Kısayol hatası: ' + String((e && e.message) || e));
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
- ensureDesktopShortcut();
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