local-mcp 3.0.151 → 3.0.153

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.
Files changed (3) hide show
  1. package/download.js +41 -0
  2. package/package.json +1 -1
  3. package/setup.js +2 -3
package/download.js CHANGED
@@ -309,6 +309,10 @@ async function ensureTeamsProxy() {
309
309
  * @returns {Promise<string|null>} Ruta al .app instalado, o null si falla
310
310
  */
311
311
  async function ensureTray() {
312
+ // Windows: download lmcp-tray.exe
313
+ if (process.platform === 'win32') {
314
+ return _ensureTrayWindows()
315
+ }
312
316
 
313
317
  const info = await getLatestBinary()
314
318
  const version = info.version
@@ -557,4 +561,41 @@ async function ensureJXARunner() {
557
561
  }
558
562
  }
559
563
 
564
+ async function _ensureTrayWindows() {
565
+ const info = await getLatestBinary()
566
+ const version = info.version
567
+ const binDir = path.join(process.env.LOCALAPPDATA || path.join(os.homedir(), 'AppData', 'Local'), 'local-mcp', 'bin')
568
+ const trayPath = path.join(binDir, 'lmcp-tray.exe')
569
+ const verFile = path.join(binDir, '.tray-version')
570
+
571
+ if (fs.existsSync(trayPath) && fs.existsSync(verFile)) {
572
+ if (fs.readFileSync(verFile, 'utf8').trim() === version) return trayPath
573
+ }
574
+
575
+ const url = `https://download.local-mcp.com/lmcp-tray.exe?v=${version}`
576
+ process.stderr.write(`\nDescargando tray v${version}...\n`)
577
+ fs.mkdirSync(binDir, { recursive: true })
578
+ await downloadFile(url, trayPath)
579
+
580
+ const stat = fs.statSync(trayPath)
581
+ if (stat.size < 100000) {
582
+ try { fs.unlinkSync(trayPath) } catch {}
583
+ throw new Error(`Tray download incomplete (${stat.size} bytes)`)
584
+ }
585
+
586
+ fs.writeFileSync(verFile, version, 'utf8')
587
+
588
+ // Auto-start on login
589
+ const startupDir = path.join(process.env.APPDATA || '', 'Microsoft', 'Windows', 'Start Menu', 'Programs', 'Startup')
590
+ if (fs.existsSync(startupDir)) {
591
+ fs.writeFileSync(path.join(startupDir, 'LMCP Tray.cmd'), `@echo off\r\nstart "" "${trayPath}"`, 'ascii')
592
+ }
593
+
594
+ // Launch tray now (use cmd start on Windows for proper detach)
595
+ try { execSync(`start "" "${trayPath}"`, { stdio: 'ignore', shell: true }) } catch {}
596
+
597
+ process.stderr.write(` Tray installed at ${trayPath}\n`)
598
+ return trayPath
599
+ }
600
+
560
601
  module.exports = { ensureBinary, ensureRuntime, ensureTray, ensureTeamsProxy, ensureSlackProxy, ensureHelper, ensureJXARunner, CACHE_DIR, TRAY_DIR }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "local-mcp",
3
- "version": "3.0.151",
3
+ "version": "3.0.153",
4
4
  "description": "LMCP \u2014 connect Claude Desktop, Cursor, Windsurf to Mail, Calendar, Contacts, Teams, OneDrive on macOS. Privacy-first: all data stays on your Mac.",
5
5
  "main": "index.js",
6
6
  "bin": {
package/setup.js CHANGED
@@ -699,12 +699,11 @@ async function _installSlackProxy() {
699
699
  }
700
700
 
701
701
  async function _installTray() {
702
- // Tray is macOS-only — skip on Windows/Linux
703
- if (_IS_WIN || process.platform === 'linux') return
702
+ if (process.platform === 'linux') return
704
703
  try {
705
704
  const { ensureTray } = require('./download')
706
705
  const trayApp = await ensureTray()
707
- if (!trayApp) return // x64 — skip silencioso
706
+ if (!trayApp) return
708
707
  console.log('\n✓ Tray installed — look for the LMCP icon in your menu bar\n')
709
708
  } catch (err) {
710
709
  process.stderr.write(` (Tray not available: ${err.message})\n\n`)