local-mcp 1.108.0 → 1.110.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.
Files changed (2) hide show
  1. package/download.js +21 -1
  2. package/package.json +1 -1
package/download.js CHANGED
@@ -17,6 +17,23 @@ const CACHE_DIR = path.join(os.homedir(), '.local', 'share', 'local-mcp', 'bin
17
17
  const TRAY_DIR = path.join(os.homedir(), '.local', 'share', 'local-mcp', 'tray') // metadata dir
18
18
  const TRAY_APP = '/Applications/LocalMCPTray.app'
19
19
 
20
+ function _getMachineId() {
21
+ const { execSync } = require('child_process')
22
+ const crypto = require('crypto')
23
+ try {
24
+ const r = execSync('security find-generic-password -s com.local-mcp.machine-id -a machine-id -w 2>/dev/null', { stdio: 'pipe' })
25
+ const id = r.toString().trim()
26
+ if (id) return id
27
+ } catch {}
28
+ try {
29
+ const ioreg = execSync('ioreg -rd1 -c IOPlatformExpertDevice', { stdio: 'pipe' }).toString()
30
+ const match = ioreg.match(/"IOPlatformUUID"\s*=\s*"([^"]+)"/)
31
+ const hwUuid = match ? match[1] : os.hostname()
32
+ return crypto.createHash('sha256').update(hwUuid).digest('hex').slice(0, 24)
33
+ } catch {}
34
+ return ''
35
+ }
36
+
20
37
  function getArch() {
21
38
  const arch = process.arch
22
39
  if (arch === 'arm64') return 'darwin-arm64'
@@ -26,10 +43,13 @@ function getArch() {
26
43
 
27
44
  /**
28
45
  * Obtiene la versión más reciente del binario desde el backend.
46
+ * Si esta máquina está en beta_machines, el backend retorna la versión beta.
29
47
  */
30
48
  async function getLatestBinary() {
49
+ const machineId = _getMachineId()
50
+ const qs = machineId ? `?machine_id=${encodeURIComponent(machineId)}` : ''
31
51
  return new Promise((resolve, reject) => {
32
- const req = https.get(`${BACKEND_URL}/runtime/latest`, { timeout: 10000 }, (res) => {
52
+ const req = https.get(`${BACKEND_URL}/runtime/latest${qs}`, { timeout: 10000 }, (res) => {
33
53
  let data = ''
34
54
  res.on('data', chunk => data += chunk)
35
55
  res.on('end', () => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "local-mcp",
3
- "version": "1.108.0",
3
+ "version": "1.110.0",
4
4
  "description": "MCP server for macOS \u2014 connect Claude Desktop, Cursor, Windsurf to Mail, Calendar, Contacts, Teams, OneDrive. Privacy-first: all data stays on your Mac.",
5
5
  "main": "index.js",
6
6
  "bin": {