local-mcp 3.0.150 → 3.0.152
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/download.js +41 -0
- package/package.json +3 -3
- package/setup.js +3 -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
|
|
595
|
+
try { spawn(trayPath, [], { detached: true, stdio: 'ignore' }).unref() } 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,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "local-mcp",
|
|
3
|
-
"version": "3.0.
|
|
4
|
-
"description": "LMCP
|
|
3
|
+
"version": "3.0.152",
|
|
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": {
|
|
7
7
|
"local-mcp": "index.js"
|
|
@@ -73,4 +73,4 @@
|
|
|
73
73
|
"url": "https://github.com/lanchuske/local-mcp/issues"
|
|
74
74
|
},
|
|
75
75
|
"mcpName": "com.local-mcp/local-mcp"
|
|
76
|
-
}
|
|
76
|
+
}
|
package/setup.js
CHANGED
|
@@ -699,12 +699,11 @@ async function _installSlackProxy() {
|
|
|
699
699
|
}
|
|
700
700
|
|
|
701
701
|
async function _installTray() {
|
|
702
|
-
|
|
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
|
|
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`)
|
|
@@ -833,6 +832,7 @@ function _trackSetupStep(step, status, client, detail) {
|
|
|
833
832
|
status,
|
|
834
833
|
client: client || '',
|
|
835
834
|
error: (detail && detail.error) ? String(detail.error).slice(0, 300) : '',
|
|
835
|
+
ref: _getRef(),
|
|
836
836
|
}
|
|
837
837
|
if (detail) {
|
|
838
838
|
if (detail.existingMcpCount >= 0) payload.existing_mcp_count = detail.existingMcpCount
|